upgrade to angular 0.9.19 canine-psychokinesis

master
Igor Minar 13 years ago
parent 0face23481
commit b0267a5bd5

@ -1,5 +1,5 @@
/**
* @license AngularJS v0.9.18
* @license AngularJS v0.9.19
* (c) 2010-2011 AngularJS http://angularjs.org
* License: MIT
*/
@ -70,7 +70,6 @@ var _undefined = undefined,
$boolean = 'boolean',
$console = 'console',
$date = 'date',
$display = 'display',
$element = 'element',
$function = 'function',
$length = 'length',
@ -151,7 +150,7 @@ var _undefined = undefined,
* @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 {Objet|Array} Reference to `obj`.
* @returns {Object|Array} Reference to `obj`.
*/
function forEach(obj, iterator, context) {
var key;
@ -881,7 +880,7 @@ function toKeyValue(obj) {
/**
* we need our custom mehtod because encodeURIComponent is too agressive and doesn't follow
* We need our custom mehtod because encodeURIComponent is too agressive and doesn't follow
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
* segments:
* segment = *pchar
@ -1025,11 +1024,11 @@ function assertArgFn(arg, name) {
* - `codeName` `{string}` code name of the release, e.g. "jiggling-armfat"
*/
var version = {
full: '0.9.18', // all of these placeholder strings will be replaced by rake's
full: '0.9.19', // all of these placeholder strings will be replaced by rake's
major: 0, // compile task
minor: 9,
dot: 18,
codeName: 'jiggling-armfat'
dot: 19,
codeName: 'canine-psychokinesis'
};
var array = [].constructor;
@ -1273,7 +1272,7 @@ Template.prototype = {
* The compilation is a process of walking the DOM tree and trying to match DOM elements to
* {@link angular.markup markup}, {@link angular.attrMarkup attrMarkup},
* {@link angular.widget widgets}, and {@link angular.directive directives}. For each match it
* executes coresponding markup, attrMarkup, widget or directive template function and collects the
* executes corresponding markup, attrMarkup, widget or directive template function and collects the
* instance functions into a single template function which is then returned.
*
* The template function can then be used once to produce the view or as it is the case with
@ -1302,7 +1301,7 @@ Template.prototype = {
* root scope is created.
* * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
* `template` and call the `cloneAttachFn` function allowing the caller to attach the
* cloned elements to the DOM document at the approriate place. The `cloneAttachFn` is
* cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
* called as: <br/> `cloneAttachFn(clonedElement, scope)` where:
*
* * `clonedElement` - is a clone of the original `element` passed into the compiler.
@ -1418,7 +1417,7 @@ Compiler.prototype = {
* not a problem, but under some circumstances the values for data
* is not available until after the full view is computed. If such
* values are needed before they are computed the order of
* evaluation can be change using ng:eval-order
* evaluation can be changed using ng:eval-order
*
* @element ANY
* @param {integer|string=} [priority=0] priority integer, or FIRST, LAST constant
@ -1586,7 +1585,7 @@ function getter(instance, path, unboundFn) {
for ( var i = 0; i < len; i++) {
key = element[i];
if (!key.match(/^[\$\w][\$\w\d]*$/))
throw "Expression '" + path + "' is not a valid expression for accesing variables.";
throw "Expression '" + path + "' is not a valid expression for accessing variables.";
if (instance) {
lastInstance = instance;
instance = instance[key];
@ -1779,7 +1778,7 @@ function createScope(parent, providers, instanceCache) {
* @description
* Assigns a value to a property of the current scope specified via `property_chain`. Unlike in
* JavaScript, if there are any `undefined` intermediary properties, empty objects are created
* and assigned in to them instead of throwing an exception.
* and assigned to them instead of throwing an exception.
*
<pre>
var scope = angular.scope();
@ -1945,7 +1944,7 @@ function createScope(parent, providers, instanceCache) {
* parameters, `newValue` and `oldValue`.
* @param {(function()|DOMElement)=} [exceptionHanlder=angular.service.$exceptionHandler] Handler
* that gets called when `watchExp` or `listener` throws an exception. If a DOMElement is
* specified as handler, the element gets decorated by angular with the information about the
* specified as a handler, the element gets decorated by angular with the information about the
* exception.
* @param {boolean=} [initRun=true] Flag that prevents the first execution of the listener upon
* registration.
@ -2993,9 +2992,16 @@ ResourceFactory.prototype = {
case 4:
error = a4;
success = a3;
//fallthrough
case 3:
case 2:
if (isFunction(a2)) {
if (isFunction(a1)) {
success = a1;
error = a2;
break;
}
success = a2;
error = a3;
//fallthrough
@ -3021,7 +3027,7 @@ ResourceFactory.prototype = {
action.method,
route.url(extend({}, action.params || {}, extractParams(data), params)),
data,
function(status, response) {
function(status, response, responseHeaders) {
if (response) {
if (action.isArray) {
value.length = 0;
@ -3032,7 +3038,7 @@ ResourceFactory.prototype = {
copy(response, value);
}
}
(success||noop)(value);
(success||noop)(value, responseHeaders);
},
error || action.verifyCache,
action.verifyCache);
@ -3156,7 +3162,9 @@ function Browser(window, document, body, XHR, $log) {
* @param {string} method Requested method (get|post|put|delete|head|json)
* @param {string} url Requested url
* @param {?string} post Post data to send (null if nothing to post)
* @param {function(number, string)} callback Function that will be called on response
* @param {function(number, string, function([string]))} callback Function that will be called on
* response. The third argument is a function that can be called to return a specified response
* header or an Object containing all headers (when called with no arguments).
* @param {object=} header additional HTTP headers to send with XHR.
* Standard headers are:
* <ul>
@ -3169,15 +3177,24 @@ function Browser(window, document, body, XHR, $log) {
* Send ajax request
*/
self.xhr = function(method, url, post, callback, headers) {
var parsedHeaders;
outstandingRequestCount ++;
if (lowercase(method) == 'json') {
var callbackId = ("angular_" + Math.random() + '_' + (idCounter++)).replace(/\d\./, '');
var script = self.addJs(url.replace('JSON_CALLBACK', callbackId));
window[callbackId] = function(data){
window[callbackId] = function(data) {
window[callbackId].data = data;
};
var script = self.addJs(url.replace('JSON_CALLBACK', callbackId), null, function() {
if (window[callbackId].data) {
completeOutstandingRequest(callback, 200, window[callbackId].data);
} else {
completeOutstandingRequest(callback);
}
delete window[callbackId];
body[0].removeChild(script);
completeOutstandingRequest(callback, 200, data);
};
});
} else {
var xhr = new XHR();
xhr.open(method, url, true);
@ -3188,7 +3205,34 @@ function Browser(window, document, body, XHR, $log) {
if (xhr.readyState == 4) {
// normalize IE bug (http://bugs.jquery.com/ticket/1450)
var status = xhr.status == 1223 ? 204 : xhr.status || 200;
completeOutstandingRequest(callback, status, xhr.responseText);
completeOutstandingRequest(callback, status, xhr.responseText, function(header) {
header = lowercase(header);
if (header) {
return parsedHeaders
? parsedHeaders[header] || null
: xhr.getResponseHeader(header);
} else {
// Return an object containing each response header
parsedHeaders = {};
forEach(xhr.getAllResponseHeaders().split('\n'), function(line) {
var i = line.indexOf(':'),
key = lowercase(trim(line.substr(0, i))),
value = trim(line.substr(i + 1));
if (parsedHeaders[key]) {
// Combine repeated headers
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
parsedHeaders[key] += ', ' + value;
} else {
parsedHeaders[key] = value;
}
});
return parsedHeaders;
}
});
}
};
xhr.send(post || '');
@ -3196,11 +3240,9 @@ function Browser(window, document, body, XHR, $log) {
};
/**
* @workInProgress
* @ngdoc method
* @name angular.service.$browser#notifyWhenNoOutstandingRequests
* @methodOf angular.service.$browser
*
* @private
* Note: this method is used only by scenario runner
* TODO(vojta): prefix this method with $$ ?
* @param {function()} callback Function that will be called when no outstanding request
*/
self.notifyWhenNoOutstandingRequests = function(callback) {
@ -3311,7 +3353,7 @@ function Browser(window, document, body, XHR, $log) {
* The listener gets called with either HashChangeEvent object or simple object that also contains
* `oldURL` and `newURL` properties.
*
* NOTE: this api is intended for use only by the $location service. Please use the
* Note: this api is intended for use only by the $location service. Please use the
* {@link angular.service.$location $location service} to monitor hash changes in angular apps.
*
* @param {function(event)} listener Listener function to be called when url hash changes.
@ -3524,7 +3566,7 @@ function Browser(window, document, body, XHR, $log) {
* @description
* Adds a script tag to the head.
*/
self.addJs = function(url, domId) {
self.addJs = function(url, domId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@ -3537,6 +3579,15 @@ function Browser(window, document, body, XHR, $log) {
script.type = 'text/javascript';
script.src = url;
if (domId) script.id = domId;
if (msie) {
script.onreadystatechange = function() {
/loaded|complete/.test(script.readyState) && done && done();
};
} else {
if (done) script.onload = script.onerror = done;
}
body[0].appendChild(script);
return script;
@ -3836,7 +3887,7 @@ function htmlSanitizeWriter(buf){
* focus on the most commonly needed functionality and minimal footprint. For this reason only a
* limited number of jQuery methods, arguments and invocation styles are supported.
*
* NOTE: All element references in angular are always wrapped with jQuery (lite) and are never
* Note: All element references in angular are always wrapped with jQuery (lite) and are never
* raw DOM references.
*
* ## Angular's jQuery lite implements these functions:
@ -3860,8 +3911,6 @@ function htmlSanitizeWriter(buf){
* - [text()](http://api.jquery.com/text/)
* - [trigger()](http://api.jquery.com/trigger/)
* - [eq()](http://api.jquery.com/eq/)
* - [show()](http://api.jquery.com/show/)
* - [hide()](http://api.jquery.com/hide/)
*
* ## Additionally these methods extend the jQuery and are available in both jQuery and jQuery lite
* version:
@ -3965,7 +4014,7 @@ function JQLiteData(element, key, value) {
function JQLiteHasClass(element, selector, _) {
// the argument '_' is important, since it makes the function have 3 arguments, which
// is neede for delegate function to realize the this is a getter.
// is needed for delegate function to realize the this is a getter.
var className = " " + selector + " ";
return ((" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf( className ) > -1);
}
@ -4269,32 +4318,6 @@ forEach({
return element.getElementsByTagName(selector);
},
hide: function(element) {
if (element.style) {
if(element.style.display !=="none" && !JQLiteData(element,"olddisplay")) {
JQLiteData( element, "olddisplay", element.style.display);
}
element.style.display = "none";
}
},
show: function(element) {
if(element.style) {
var display = element.style.display;
if ( display === "" || display === "none" ) {
// restore the original value overwritten by hide if present or default to nothing (which
// will let browser correctly choose between 'inline' or 'block')
element.style.display = JQLiteData(element, "olddisplay") || "";
// if the previous didn't make the element visible then there are some cascading rules that
// are still hiding it, so let's default to 'block', which might be incorrect in case of
// elmenents that should be 'inline' by default, but oh well :-)
if (!isVisible([element])) element.style.display = "block";
}
}
},
clone: JQLiteClone
}, function(fn, name){
/**
@ -5243,10 +5266,10 @@ defineApi('Function', [angularGlobal, angularCollection, angularFunction]);
*
* @param {number} amount Input to filter.
* @param {string=} symbol Currency symbol or identifier to be displayed.
* @returns {string} Formated number.
* @returns {string} Formatted number.
*
* @css ng-format-negative
* When the value is negative, this css class is applied to the binding making it by default red.
* When the value is negative, this css class is applied to the binding making it (by default) red.
*
* @example
<doc:example>
@ -5285,7 +5308,7 @@ angularFilter.currency = function(amount, currencySymbol){
* @description
* Formats a number as text.
*
* If the input is not a number empty string is returned.
* If the input is not a number an empty string is returned.
*
* @param {number|string} number Number to format.
* @param {(number|string)=} [fractionSize=2] Number of decimal places to round the number to.
@ -5695,7 +5718,7 @@ angularFilter.uppercase = uppercase;
*
* The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
* then serialized back to properly escaped html string. This means that no unsafe input can make
* it into the returned string, however since our parser is more strict than a typical browser
* it into the returned string, however, since our parser is more strict than a typical browser
* parser, it's possible that some obscure input, which would be recognized as valid HTML by a
* browser, won't make it through the sanitizer.
*
@ -5784,7 +5807,7 @@ angularFilter.html = function(html, option){
*
* @description
* Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
* plane email address links.
* plain email address links.
*
* @param {string} text Input text.
* @returns {string} Html-linkified text.
@ -5880,7 +5903,7 @@ angularFilter.linky = function(text){
* @name angular.formatter
* @description
*
* Formatters are used for translating data formats between those used in for display and those used
* Formatters are used for translating data formats between those used for display and those used
* for storage.
*
* Following is the list of built-in angular formatters:
@ -6362,7 +6385,8 @@ extend(angularValidator, {
if (value.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/)) {
return null;
}
return "Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationaly.";
return "Phone number needs to be in 1(987)654-3210 format in North America " +
"or +999 (123) 45678 906 internationally.";
},
/**
@ -7435,9 +7459,15 @@ angularServiceInject("$log", $logFactory = function($window){
*
<pre>
var User = $resource('/user/:userId', {userId:'@id'});
User.get({userId:123}, function(u){
User.get({userId:123}, function(u, responseHeaders){
u.abc = true;
u.$save();
u.$save(function(u, responseHeaders) {
// Get an Object containing all response headers
var allHeaders = responseHeaders();
// Get a specific response header
u.newId = responseHeaders('Location');
});
});
</pre>
@ -7445,7 +7475,7 @@ angularServiceInject("$log", $logFactory = function($window){
Let's look at what a buzz client created with the `$resource` service looks like:
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function BuzzController($resource) {
this.Activity = $resource(
@ -7515,7 +7545,7 @@ angularServiceInject('$resource', function($xhr){
Try changing the URL in the input box to see changes.
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function MainCntl($route, $location) {
this.$route = $route;
@ -7561,6 +7591,8 @@ angularServiceInject('$route', function(location, $updateView) {
matcher = switchRouteMatcher,
parentScope = this,
dirty = 0,
lastHashPath,
lastRouteParams,
$route = {
routes: routes,
@ -7629,6 +7661,18 @@ angularServiceInject('$route', function(location, $updateView) {
* The custom `redirectTo` function is expected to return a string which will be used
* to update `$location.hash`.
*
* - `[reloadOnSearch=true]` - {boolean=} - reload route when $location.hashSearch
* changes. If this option is disabled, you should set up a $watch to be notified of
* param (hashSearch) changes as follows:
*
* function MyCtrl($route) {
* this.$watch(function() {
* return $route.current.params.myHashSearchParam;
* }, function(params) {
* //do stuff with params
* });
* }
*
* @returns {Object} route object
*
* @description
@ -7637,8 +7681,8 @@ angularServiceInject('$route', function(location, $updateView) {
when:function (path, params) {
if (isUndefined(path)) return routes; //TODO(im): remove - not needed!
var route = routes[path];
if (!route) route = routes[path] = {};
if (params) extend(route, params);
if (!route) route = routes[path] = {reloadOnSearch: true};
if (params) extend(route, params); //TODO(im): what the heck? merge two route definitions?
dirty++;
return route;
},
@ -7702,6 +7746,14 @@ angularServiceInject('$route', function(location, $updateView) {
function updateRoute(){
var childScope, routeParams, pathParams, segmentMatch, key, redir;
if ($route.current) {
if (!$route.current.reloadOnSearch && (lastHashPath == location.hashPath)) {
$route.current.params = extend({}, location.hashSearch, lastRouteParams);
return;
}
}
lastHashPath = location.hashPath;
$route.current = null;
forEach(routes, function(rParams, rPath) {
if (!pathParams) {
@ -7748,6 +7800,7 @@ angularServiceInject('$route', function(location, $updateView) {
scope: childScope,
params: extend({}, location.hashSearch, pathParams)
});
lastRouteParams = pathParams;
}
//fire onChange callbacks
@ -7759,7 +7812,7 @@ angularServiceInject('$route', function(location, $updateView) {
}
this.$watch(function(){return dirty + location.hash;}, updateRoute);
this.$watch(function(){ return dirty + location.hash; }, updateRoute);
return $route;
}, ['$location', '$updateView']);
@ -7798,7 +7851,7 @@ angularServiceInject('$route', function(location, $updateView) {
* or 'XHR' (instead of {@link angular.service.$xhr}) then you may be changing the model
* without angular knowledge and you may need to call '$updateView()' directly.
*
* NOTE: if you wish to update the view immediately (without delay), you can do so by calling
* Note: if you wish to update the view immediately (without delay), you can do so by calling
* {@link angular.scope.$eval} at any time from your code:
* <pre>scope.$root.$eval()</pre>
*
@ -7898,13 +7951,14 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
queue.requests = [];
queue.callbacks = [];
$xhr('POST', url, {requests: currentRequests},
function(code, response) {
function(code, response, responseHeaders) {
forEach(response, function(response, i) {
try {
if (response.status == 200) {
(currentRequests[i].success || noop)(response.status, response.response);
(currentRequests[i].success || noop)
(response.status, response.response, responseHeaders);
} else if (isFunction(currentRequests[i].error)) {
currentRequests[i].error(response.status, response.response);
currentRequests[i].error(response.status, response.response, responseHeaders);
} else {
$error(currentRequests[i], response);
}
@ -7914,11 +7968,11 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
});
(success || noop)();
},
function(code, response) {
function(code, response, responseHeaders) {
forEach(currentRequests, function(request, i) {
try {
if (isFunction(request.error)) {
request.error(code, response);
request.error(code, response, responseHeaders);
} else {
$error(request, response);
}
@ -7958,8 +8012,8 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
* @param {string} method HTTP method.
* @param {string} url Destination URL.
* @param {(string|Object)=} post Request body.
* @param {function(number, (string|Object))} success Response success callback.
* @param {function(number, (string|Object))=} error Response error callback.
* @param {function(number, (string|Object), Function)} success Response success callback.
* @param {function(number, (string|Object), Function)} error Response error callback.
* @param {boolean=} [verifyCache=false] If `true` then a result is immediately returned from cache
* (if present) while a request is sent to the server for a fresh response that will update the
* cached entry. The `success` function will be called when the response is received.
@ -7991,9 +8045,9 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
if (dataCached = cache.data[url]) {
if (sync) {
success(200, copy(dataCached.value));
success(200, copy(dataCached.value), copy(dataCached.headers));
} else {
$defer(function() { success(200, copy(dataCached.value)); });
$defer(function() { success(200, copy(dataCached.value), copy(dataCached.headers)); });
}
if (!verifyCache)
@ -8006,20 +8060,20 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
} else {
inflight[url] = {successes: [success], errors: [error]};
cache.delegate(method, url, post,
function(status, response) {
function(status, response, responseHeaders) {
if (status == 200)
cache.data[url] = {value: response};
cache.data[url] = {value: response, headers: responseHeaders};
var successes = inflight[url].successes;
delete inflight[url];
forEach(successes, function(success) {
try {
(success||noop)(status, copy(response));
(success||noop)(status, copy(response), responseHeaders);
} catch(e) {
$log.error(e);
}
});
},
function(status, response) {
function(status, response, responseHeaders) {
var errors = inflight[url].errors,
successes = inflight[url].successes;
delete inflight[url];
@ -8027,7 +8081,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
forEach(errors, function(error, i) {
try {
if (isFunction(error)) {
error(status, copy(response));
error(status, copy(response), copy(responseHeaders));
} else {
$error(
{method: method, url: url, data: post, success: successes[i]},
@ -8069,7 +8123,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
* - `method` `{string}` The http request method.
* - `url` `{string}` The request destination.
* - `data` `{(string|Object)=} An optional request body.
* - `callback` `{function()}` The callback function
* - `success` `{function()}` The success callback function
*
* @param {Object} response Response object.
*
@ -8098,7 +8152,7 @@ angularServiceInject('$xhr.error', function($log){
* @name angular.service.$xhr
* @function
* @requires $browser $xhr delegates all XHR requests to the `$browser.xhr()`. A mock version
* of the $browser exists which allows setting expectaitions on XHR requests
* of the $browser exists which allows setting expectations on XHR requests
* in your tests
* @requires $xhr.error $xhr delegates all non `2xx` response code to this service.
* @requires $log $xhr delegates all exceptions to `$log.error()`.
@ -8175,7 +8229,7 @@ angularServiceInject('$xhr.error', function($log){
* cookie called `XSRF-TOKEN` on first HTTP GET request. On subsequent non-GET requests the server
* can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure that only
* JavaScript running on your domain could have read the token. The token must be unique for each
* user and must be verifiable by the server (to prevent the JavaScript making up its own tokens).
* user and must be verifiable by the server (to prevent the JavaScript making up its own tokens).
* We recommend that the token is a digest of your site's authentication cookie with
* {@link http://en.wikipedia.org/wiki/Rainbow_table salt for added security}.
*
@ -8188,7 +8242,7 @@ angularServiceInject('$xhr.error', function($log){
* angular generated callback function.
* @param {(string|Object)=} post Request content as either a string or an object to be stringified
* as JSON before sent to the server.
* @param {function(number, (string|Object))} success A function to be called when the response is
* @param {function(number, (string|Object), Function)} success A function to be called when the response is
* received. The success function will be called with:
*
* - {number} code [HTTP status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) of
@ -8196,27 +8250,35 @@ angularServiceInject('$xhr.error', function($log){
* {@link angular.service.$xhr.error} service (or custom error callback).
* - {string|Object} response Response object as string or an Object if the response was in JSON
* format.
* - {function(string=)} responseHeaders A function that when called with a {string} header name,
* returns the value of that header or null if it does not exist; when called without
* arguments, returns an object containing every response header
* @param {function(number, (string|Object))} error A function to be called if the response code is
* not 2xx.. Accepts the same arguments as success, above.
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function FetchCntl($xhr) {
var self = this;
this.fetch = function() {
self.clear();
self.code = null;
self.response = null;
$xhr(self.method, self.url, function(code, response) {
self.code = code;
self.response = response;
}, function(code, response) {
self.code = code;
self.response = response || "Request failed";
});
};
this.clear = function() {
self.code = null;
self.response = null;
this.updateModel = function(method, url) {
self.method = method;
self.url = url;
};
}
FetchCntl.$inject = ['$xhr'];
@ -8226,15 +8288,38 @@ angularServiceInject('$xhr.error', function($log){
<option>GET</option>
<option>JSON</option>
</select>
<input type="text" name="url" value="index.html" size="80"/><br/>
<button ng:click="fetch()">fetch</button>
<button ng:click="clear()">clear</button>
<a href="" ng:click="method='GET'; url='index.html'">sample</a>
<a href="" ng:click="method='JSON'; url='https://www.googleapis.com/buzz/v1/activities/googlebuzz/@self?alt=json&callback=JSON_CALLBACK'">buzz</a>
<input type="text" name="url" value="index.html" size="80"/>
<button ng:click="fetch()">fetch</button><br>
<button ng:click="updateModel('GET', 'index.html')">Sample GET</button>
<button ng:click="updateModel('JSON', 'https://www.googleapis.com/buzz/v1/activities/googlebuzz/@self?alt=json&callback=JSON_CALLBACK')">Sample JSONP (Buzz API)</button>
<button ng:click="updateModel('JSON', 'https://www.invalid_JSONP_request.com&callback=JSON_CALLBACK')">Invalid JSONP</button>
<pre>code={{code}}</pre>
<pre>response={{response}}</pre>
</div>
</doc:source>
<doc:scenario>
it('should make xhr GET request', function() {
element(':button:contains("Sample GET")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=200');
expect(binding('response')).toMatch(/angularjs.org/);
});
it('should make JSONP request to the Buzz API', function() {
element(':button:contains("Buzz API")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=200');
expect(binding('response')).toMatch(/buzz-feed/);
});
it('should make JSONP request to invalid URL and invoke the error handler',
function() {
element(':button:contains("Invalid JSONP")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=');
expect(binding('response')).toBe('response=Request failed');
});
</doc:scenario>
</doc:example>
*/
angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
@ -8262,7 +8347,7 @@ angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
post = toJson(post);
}
$browser.xhr(method, url, post, function(code, response){
$browser.xhr(method, url, post, function(code, response, responseHeaders){
try {
if (isString(response)) {
if (response.match(/^\)\]\}',\n/)) response=response.substr(6);
@ -8271,9 +8356,9 @@ angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
}
}
if (200 <= code && code < 300) {
success(code, response);
success(code, response, responseHeaders);
} else if (isFunction(error)) {
error(code, response);
error(code, response, responseHeaders);
} else {
$error(
{method: method, url: url, data: post, success: success},
@ -8559,7 +8644,7 @@ angularDirective("ng:bind", function(expression, element){
error = formatError(e);
});
this.$element = oldElement;
// If we are HTML than save the raw HTML data so that we don't
// If we are HTML then save the raw HTML data so that we don't
// recompute sanitization since it is expensive.
// TODO: turn this into a more generic way to compute this
if (isHtml = (value instanceof HTML))
@ -8865,9 +8950,14 @@ function ngClass(selector) {
var existing = element[0].className + ' ';
return function(element){
this.$onEval(function(){
if (selector(this.$index)) {
var value = this.$eval(expression);
var scope = this;
if (selector(scope.$index)) {
var ngClassVal = scope.$eval(element.attr('ng:class') || '');
if (isArray(ngClassVal)) ngClassVal = ngClassVal.join(' ');
var value = scope.$eval(expression);
if (isArray(value)) value = value.join(' ');
if (ngClassVal && ngClassVal !== value) value = value + ' ' + ngClassVal;
element[0].className = trim(existing + value);
}
}, element);
@ -9027,7 +9117,7 @@ angularDirective("ng:class-even", ngClass(function(i){return i % 2 === 1;}));
angularDirective("ng:show", function(expression, element){
return function(element){
this.$onEval(function(){
toBoolean(this.$eval(expression)) ? element.show() : element.hide();
element.css('display', toBoolean(this.$eval(expression)) ? '' : 'none');
}, element);
};
});
@ -9068,7 +9158,7 @@ angularDirective("ng:show", function(expression, element){
angularDirective("ng:hide", function(expression, element){
return function(element){
this.$onEval(function(){
toBoolean(this.$eval(expression)) ? element.hide() : element.show();
element.css('display', toBoolean(this.$eval(expression)) ? 'none' : '');
}, element);
};
});
@ -9135,8 +9225,8 @@ angularDirective("ng:style", function(expression, element){
* Markup extensions do not themselves produce linking functions. Think of markup as a way to
* produce shorthand for a {@link angular.widget widget} or a {@link angular.directive directive}.
*
* The most prominent example of an markup in angular is the built-in double curly markup
* `{{expression}}`, which is a shorthand for `<span ng:bind="expression"></span>`.
* The most prominent example of a markup in angular is the built-in double curly markup
* `{{expression}}`, which is shorthand for `<span ng:bind="expression"></span>`.
*
* Create custom markup like this:
*
@ -9157,7 +9247,7 @@ angularDirective("ng:style", function(expression, element){
* @description
*
* Attribute markup extends the angular compiler in a very similar way as {@link angular.markup}
* except that it allows you to modify the state of the attribute text rather then the content of a
* except that it allows you to modify the state of the attribute text rather than the content of a
* node.
*
* Create custom attribute markup like this:
@ -9261,7 +9351,7 @@ angularTextMarkup('option', function(text, textNode, parentElement){
*
* @description
* Using <angular/> markup like {{hash}} in an href attribute makes
* the page open to a wrong URL, ff the user clicks that link before
* the page open to a wrong URL, if the user clicks that link before
* angular has a chance to replace the {{hash}} with actual URL, the
* link will be broken and will most likely return a 404 error.
* The `ng:href` solves this problem by placing the `href` in the
@ -9374,7 +9464,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* </div>
* </pre>
*
* the HTML specs do not require browsers preserve the special attributes such as disabled.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as disabled.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:disabled.
*
@ -9404,7 +9495,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:checked
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as checked.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as checked.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:checked.
* @example
@ -9433,7 +9525,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:multiple
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as multiple.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as multiple.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:multiple.
*
@ -9468,7 +9561,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:readonly
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as readonly.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as readonly.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:readonly.
* @example
@ -9497,7 +9591,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:selected
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as selected.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as selected.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:selected.
* @example
@ -9550,7 +9645,7 @@ angularAttrMarkup('{{}}', function(value, name, element){
* @name angular.widget
* @description
*
* An angular widget can be either a custom attribute that modifies an existing DOM elements or an
* An angular widget can be either a custom attribute that modifies an existing DOM element or an
* entirely new DOM element.
*
* During html compilation, widgets are processed after {@link angular.markup markup}, but before
@ -9583,7 +9678,7 @@ angularAttrMarkup('{{}}', function(value, name, element){
* @description
* The most common widgets you will use will be in the form of the
* standard HTML set. These widgets are bound using the `name` attribute
* to an expression. In addition they can have `ng:validate`, `ng:required`,
* to an expression. In addition, they can have `ng:validate`, `ng:required`,
* `ng:format`, `ng:change` attribute to further control their behavior.
*
* @usageContent
@ -9836,7 +9931,7 @@ function compileFormatter(expr) {
*
* @description
* The `ng:format` attribute widget formats stored data to user-readable text and parses the text
* back to the stored form. You might find this useful for example if you collect user input in a
* back to the stored form. You might find this useful, for example, if you collect user input in a
* text field but need to store the data in the model as a list. Check out
* {@link angular.formatter formatters} to learn more.
*
@ -9981,7 +10076,7 @@ function noopAccessor() { return { get: noop, set: noop }; }
/*
* TODO: refactor
*
* The table bellow is not quite right. In some cases the formatter is on the model side
* The table below is not quite right. In some cases the formatter is on the model side
* and in some cases it is on the view side. This is a historical artifact
*
* The concept of model/view accessor is useful for anyone who is trying to develop UI, and
@ -9991,16 +10086,11 @@ function noopAccessor() { return { get: noop, set: noop }; }
*
*/
var textWidget = inputWidget('keydown change', modelAccessor, valueAccessor, initWidgetValue(), true),
buttonWidget = inputWidget('click', noopAccessor, noopAccessor, noop),
INPUT_TYPE = {
'text': textWidget,
'textarea': textWidget,
'hidden': textWidget,
'password': textWidget,
'button': buttonWidget,
'submit': buttonWidget,
'reset': buttonWidget,
'image': buttonWidget,
'checkbox': inputWidget('click', modelFormattedAccessor, checkedAccessor, initWidgetValue(false)),
'radio': inputWidget('click', modelFormattedAccessor, radioAccessor, radioInit),
'select-one': inputWidget('change', modelAccessor, valueAccessor, initWidgetValue(null)),
@ -10111,7 +10201,7 @@ function inputWidgetSelector(element){
angularWidget('input', inputWidgetSelector);
angularWidget('textarea', inputWidgetSelector);
angularWidget('button', inputWidgetSelector);
/**
* @workInProgress
@ -10282,7 +10372,7 @@ angularWidget('select', function(element){
var optionGroup,
collection = valuesFn(scope) || [],
key = selectElement.val(),
tempScope = scope.$new(),
tempScope = inherit(scope),
value, optionElement, index, groupIndex, length, groupLength;
try {
@ -10340,7 +10430,7 @@ angularWidget('select', function(element){
fragment,
groupIndex, index,
optionElement,
optionScope = scope.$new(),
optionScope = inherit(scope),
modelValue = model.get(),
selected,
selectedSet = false, // nothing is selected yet
@ -10504,7 +10594,7 @@ angularWidget('select', function(element){
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<select name="url">
<option value="examples/ng-include/template1.html">template1.html</option>
<option value="examples/ng-include/template2.html">template2.html</option>
@ -10885,12 +10975,12 @@ angularWidget('@ng:repeat', function(expression, element){
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
* by angular. Use `ng:non-bindable` to make angular ignore a chunk of HTML.
*
* NOTE: `ng:non-bindable` looks like a directive, but is actually an attribute widget.
* Note: `ng:non-bindable` looks like a directive, but is actually an attribute widget.
*
* @element ANY
*
* @example
* In this example there are two location where a siple binding (`{{}}`) is present, but the one
* In this example there are two location where a simple binding (`{{}}`) is present, but the one
* wrapped in `ng:non-bindable` is left alone.
*
* @example
@ -10938,7 +11028,7 @@ angularWidget("@ng:non-bindable", noop);
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function MyCtrl($route) {
$route.when('/overview',
@ -11020,15 +11110,7 @@ angularWidget('ng:view', function(element) {
});
var browserSingleton;
/**
* @workInProgress
* @ngdoc service
* @name angular.service.$browser
* @requires $log
*
* @description
* Represents the browser.
*/
angularService('$browser', function($log){
if (!browserSingleton) {
browserSingleton = new Browser(window, jqLite(window.document), jqLite(window.document.body),

@ -1,126 +1,127 @@
/*
AngularJS v0.9.18
AngularJS v0.9.19
(c) 2010-2011 AngularJS http://angularjs.org
License: MIT
*/
'use strict';(function(w,K,x){function j(a,b,c){var d;if(a)if(r(a))for(d in a)d!="prototype"&&d!=lc&&d!=mc&&a.hasOwnProperty(d)&&b.call(c,a[d],d);else if(a.forEach&&a.forEach!==j)a.forEach(b,c);else if(M(a)&&ka(a.length))for(d=0;d<a.length;d++)b.call(c,a[d],d);else for(d in a)b.call(c,a[d],d);return a}function Pa(a,b,c){var d=[],e;for(e in a)d.push(e);d.sort();for(e=0;e<d.length;e++)b.call(c,a[d[e]],d[e]);return d}function Qa(a){a instanceof I&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?
"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function nc(){for(var a=T.length,b;a;){a--;b=T[a].charCodeAt(0);if(b==57)return T[a]="A",T.join("");if(b==90)T[a]="0";else return T[a]=String.fromCharCode(b+1),T.join("")}T.unshift("0");return T.join("")}function s(a){j(arguments,function(b){b!==a&&j(b,function(b,d){a[d]=b})});return a}function oc(a,b){return s(new (s(function(){},{prototype:a})),b)}function o(){}function ea(a){return a}function za(a){return function(){return a}}
function U(a,b,c){var d;return a[b]||(d=a[b]=function(a,b,g){a=(c||ea)(a);z(b)&&(d[a]=s(b,g||{}));return d[a]})}function t(a){return typeof a==la}function z(a){return typeof a!=la}function M(a){return a!=null&&typeof a==ob}function v(a){return typeof a==pc}function ka(a){return typeof a==qc}function Z(a){return a instanceof Array}function r(a){return typeof a==$}function ma(a){return v(a)?a.replace(/^\s*/,"").replace(/\s*$/,""):a}function aa(a){var b={},a=a.split(","),c;for(c=0;c<a.length;c++)b[a[c]]=
!0;return b}function Ra(a,b){this.html=a;this.get=B(b)=="unsafe"?za(a):function(){var b=[];pb(a,qb(b));return b.join("")}}function rb(a){var a=a[0].getBoundingClientRect(),b=a.height||a.bottom||0-a.top||0;return(a.width||a.right||0-a.left||0)>0&&b>0}function rc(a,b,c){var d=[];j(a,function(a,f,g){d.push(b.call(c,a,f,g))});return d}function sb(a,b){var c=0,d;if(Z(a)||v(a))return a.length;else if(M(a))for(d in a)(!b||a.hasOwnProperty(d))&&c++;return c}function tb(a,b){for(var c=0;c<a.length;c++)if(b===
a[c])return!0;return!1}function Aa(a,b){for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1}function sc(a){if(a)switch(a.nodeName){case "OPTION":case "PRE":case "TITLE":return!0}return!1}function C(a,b){if(b)if(Z(a)){for(;b.length;)b.pop();for(var c=0;c<a.length;c++)b.push(C(a[c]))}else for(c in j(b,function(a,c){delete b[c]}),a)b[c]=C(a[c]);else(b=a)&&(Z(a)?b=C(a,[]):a instanceof Date?b=new Date(a.getTime()):M(a)&&(b=C(a,{})));return b}function sa(a,b){if(a==b)return!0;if(a===null||b===null)return!1;
var c=typeof a,d;if(c==typeof b&&c=="object")if(a instanceof Array){if((c=a.length)==b.length){for(d=0;d<c;d++)if(!sa(a[d],b[d]))return!1;return!0}}else{c={};for(d in a){if(d.charAt(0)!=="$"&&!r(a[d])&&!sa(a[d],b[d]))return!1;c[d]=!0}for(d in b)if(!c[d]&&d.charAt(0)!=="$"&&!r(b[d]))return!1;return!0}return!1}function tc(a){return(a=a&&a[0]&&a[0].nodeName)&&a.charAt(0)!="#"&&!tb(["TR","COL","COLGROUP","TBODY","THEAD","TFOOT"],a)}function fa(a,b,c){for(var d;!tc(a);)if(d=a.parent(),d.length)a=a.parent();
else return;if(a[0].$NG_ERROR!==c)(a[0].$NG_ERROR=c)?(a.addClass(b),a.attr(b,c.message||c)):(a.removeClass(b),a.removeAttr(b))}function G(a,b){var c=arguments.length>2?na.call(arguments,2,arguments.length):[];return typeof b==$&&!(b instanceof RegExp)?c.length?function(){return arguments.length?b.apply(a,c.concat(na.call(arguments,0,arguments.length))):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}:b}function oa(a){a&&a.length!==0?(a=B(""+a),a=!(a=="f"||a=="0"||a==
"false"||a=="no"||a=="n"||a=="[]")):a=!1;return a}function ub(a){return(new vb(Sa,wb,D,Q)).compile(a)}function Ta(a){var b={},c,d;j((a||"").split("&"),function(a){a&&(c=a.split("="),d=unescape(c[0]),b[d]=z(c[1])?unescape(c[1]):!0)});return b}function xb(a){var b=[];j(a,function(a,d){b.push(escape(d)+(a===!0?"":"="+escape(a)))});return b.length?b.join("&"):""}function Ua(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(b?null:
/%20/g,"+")}function uc(a,b){yb();for(var c=a.getElementsByTagName("script"),d,b=s({ie_compat_id:"ng-ie-compat"},b),e=0;e<c.length;e++)if(d=(c[e].src||"").match(vc))b.base_url=d[1],b.ie_compat=d[1]+"angular-ie-compat"+(d[2]||"")+".js",s(b,Ta(d[6])),Ba(m(c[e]),function(a,c){/^ng:/.exec(c)&&(c=c.substring(3).replace(/-/g,"_"),b[c]=a||!0)});return b}function yb(){(Va=w.jQuery)?(m=Va,s(Va.fn,{scope:zb.scope})):m=Wa;y.element=m}function wc(a,b,c){if(!a)throw new I("Argument '"+(b||"?")+"' is "+(c||"required"));
}function R(a,b){var c=[];Xa(c,a,b?"\n ":null,[]);return c.join("")}function ga(a,b){function c(a){if(v(a)&&a.length===Ab)return Ya.toDate(a);else(Z(a)||M(a))&&j(a,function(b,d){a[d]=c(b)});return a}if(!v(a))return a;var d;try{return b&&w.JSON&&w.JSON.parse?(d=JSON.parse(a),c(d)):ha(a,!0).primary()()}catch(e){throw xc("fromJson error: ",a,e),e;}}function Xa(a,b,c,d){if(M(b)){if(b===w){a.push("WINDOW");return}if(b===K){a.push("DOCUMENT");return}if(tb(d,b)){a.push("RECURSION");return}d.push(b)}if(b===
null)a.push(Ca);else if(b instanceof RegExp)a.push(y.String.quoteUnicode(b.toString()));else if(r(b))return;else if(typeof b==yc)a.push(""+b);else if(ka(b))isNaN(b)?a.push(Ca):a.push(""+b);else if(v(b))return a.push(y.String.quoteUnicode(b));else if(M(b))if(Z(b)){a.push("[");for(var e=b.length,f=!1,g=0;g<e;g++){var h=b[g];f&&a.push(",");!(h instanceof RegExp)&&(r(h)||t(h))?a.push(Ca):Xa(a,h,c,d);f=!0}a.push("]")}else if(b instanceof Date)a.push(y.String.quoteUnicode(y.Date.toString(b)));else{a.push("{");
c&&a.push(c);e=!1;f=c?c+" ":!1;g=[];for(h in b)b.hasOwnProperty(h)&&b[h]!==x&&g.push(h);g.sort();for(h=0;h<g.length;h++){var i=g[h],k=b[i];typeof k!=$&&(e&&(a.push(","),c&&a.push(c)),a.push(y.String.quote(i)),a.push(":"),Xa(a,k,f,d),e=!0)}a.push("}")}M(b)&&d.pop()}function Za(a){this.paths=[];this.children=[];this.inits=[];this.priority=a;this.newScope=!1}function vb(a,b,c,d){this.markup=a;this.attrMarkup=b;this.directives=c;this.widgets=d}function Bb(a,b){var c,d=a[0].childNodes||[],e;for(c=0;c<
d.length;c++){var f=e=d[c];ta(f)=="#text"||b(m(e),c)}}function Ba(a,b){var c,d=a[0].attributes||[],e,f,g={};for(c=0;c<d.length;c++)e=d[c],f=e.name,e=e.value,ba&&f=="href"&&(e=decodeURIComponent(a[0].getAttribute(f,2))),g[f]=e;Pa(g,b)}function ua(a,b,c){if(!b)return a;for(var d=b.split("."),e,f=a,g=d.length,h=0;h<g;h++){e=d[h];if(!e.match(/^[\$\w][\$\w\d]*$/))throw"Expression '"+b+"' is not a valid expression for accesing variables.";a&&(f=a,a=a[e]);if(t(a)&&e.charAt(0)=="$"){var i=y.Global.typeOf(f);
if(e=(i=y[i.charAt(0).toUpperCase()+i.substring(1)])?i[[e.substring(1)]]:x)return a=G(f,e,f)}}return!c&&r(a)?G(f,a):a}function $a(a,b,c){for(var b=b.split("."),d=0;b.length>1;d++){var e=b.shift(),f=a[e];f||(f={},a[e]=f);a=f}return a[b.shift()]=c}function Cb(a){var b=Db[a];if(b)return b;var c="var l, fn, t;\n";j(a.split("."),function(a){a=Eb[a]?'["'+a+'"]':"."+a;c+="if(!s) return s;\nl=s;\ns=s"+a+';\nif(typeof s=="function" && !(s instanceof RegExp)) s = function(){ return l'+a+".apply(l, arguments); };\n";
a.charAt(1)=="$"&&(a=a.substr(2),c+='if(!s) {\n t = angular.Global.typeOf(l);\n fn = (angular[t.charAt(0).toUpperCase() + t.substring(1)]||{})["'+a+'"];\n if (fn) s = function(){ return fn.apply(l, [l].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n}\n')});c+="return s;";b=Function("s",c);b.toString=function(){return c};return Db[a]=b}function N(a){if(typeof a===$)return a;var b=Fb[a];if(!b)var c=ha(a).statements(),b=Fb[a]=s(function(){return c(this)},{fnSelf:c});return b}
function V(a,b,c){function d(){}var a=d.prototype=a||{},e=new d,f={sorted:[]},g,h;s(e,{"this":e,$id:zc++,$parent:a,$bind:G(e,G,e),$get:G(e,ua,e),$set:G(e,$a,e),$eval:function(a){var b=typeof a,c,d,g;if(b==la){a=0;for(b=f.sorted.length;a<b;a++){g=f.sorted[a];d=g.length;for(c=0;c<d;c++)e.$tryEval(g[c].fn,g[c].handler)}}else if(b===$)return a.call(e);else if(b==="string")return N(a).call(e)},$tryEval:function(a,b){var c=typeof a;try{if(c==$)return a.call(e);else if(c=="string")return N(a).call(e)}catch(d){g&&
g.error(d),r(b)?b(d):b?fa(b,Da,z(d)?Qa(d):d):r(h)&&h(d)}},$watch:function(a,b,c,d){function g(a){var d=f.call(e),i=h;if(a||i!==d)h=d,e.$tryEval(function(){return b.call(e,d,i)},c)}var f=N(a),h=f.call(e),b=N(b);e.$onEval(Gb,g);t(d)&&(d=!0);d&&g(!0)},$onEval:function(a,b,c){ka(a)||(c=b,b=a,a=0);var d=f[a];if(!d)d=f[a]=[],d.priority=a,f.sorted.push(d),f.sorted.sort(function(a,b){return a.priority-b.priority});d.push({fn:N(b),handler:c})},$become:function(a){if(r(a))e.constructor=a,j(a.prototype,function(a,
b){e[b]=G(e,a)}),e.$service.invoke(e,a,na.call(arguments,1,arguments.length)),r(a.prototype.init)&&e.init()},$new:function(a){var b=V(e);b.$become.apply(e,[a].concat(na.call(arguments,1,arguments.length)));e.$onEval(b.$eval);return b}});if(!a.$root)e.$root=e,e.$parent=e,(e.$service=Hb(e,b,c)).eager();g=e.$service("$log");h=e.$service("$exceptionHandler");return e}function Hb(a,b,c){function d(d){if(!(d in c)){var g=b[d];if(!g)throw I("Unknown provider for '"+d+"'.");c[d]=e(a,g)}return c[d]}function e(a,
b,c){for(var c=c||[],e=Ac(b),k=e.length;k--;)c.unshift(d(e[k]));return b.apply(a,c)}b=b||ab;c=c||{};a=a||{};d.invoke=e;d.eager=function(){j(b,function(a,b){a.$eager&&d(b);if(a.$creation)throw new I("Failed to register service '"+b+"': $creation property is unsupported. Use $eager:true or see release notes.");})};return d}function Ea(a,b){if(a instanceof Array)return b.$inject=a,b;else{for(var c=0,d=arguments.length-1,e=arguments[d].$inject=[];c<d;c++)e.push(arguments[c]);return arguments[d]}}function E(a,
b,c,d){ab(a,b,{$inject:c,$eager:d})}function Ac(a){wc(r(a,void 0,"not a function"));if(!a.$inject){var b=a.$inject=[],c=a.toString().replace(Bc,"").match(Cc);j(c[1].split(Dc),function(a){a.replace(Ec,function(a,c){b.push(c)})})}return a.$inject}function Fc(a,b){function c(a){return a.indexOf(p)!=-1}function d(){return q+1<a.length?a.charAt(q+1):!1}function e(a){return"0"<=a&&a<="9"}function f(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function g(a){return a=="-"||a=="+"||e(a)}function h(b,
c,d){d=d||q;throw I("Lexer Error: "+b+" at column"+(z(c)?"s "+c+"-"+q+" ["+a.substring(c,d)+"]":" "+d)+" in expression ["+a+"].");}function i(){for(var b="",c=q;q<a.length;){var f=B(a.charAt(q));if(f=="."||e(f))b+=f;else{var i=d();if(f=="e"&&g(i))b+=f;else if(g(f)&&i&&e(i)&&b.charAt(b.length-1)=="e")b+=f;else if(g(f)&&(!i||!e(i))&&b.charAt(b.length-1)=="e")h("Invalid exponent");else break}q++}b*=1;u.push({index:c,text:b,json:!0,fn:function(){return b}})}function k(){for(var b="",c=q,d;q<a.length;){d=
a.charAt(q);if(d=="."||f(d)||e(d))b+=d;else break;q++}d=bb[b];u.push({index:c,text:b,json:d,fn:d||s(Cb(b),{assign:function(a,c){return $a(a,b,c)}})})}function l(b){var c=q;q++;for(var d="",e=b,g=!1;q<a.length;){var f=a.charAt(q);e+=f;if(g)f=="u"?(f=a.substring(q+1,q+5),f.match(/[\da-f]{4}/i)||h("Invalid unicode escape [\\u"+f+"]"),q+=4,d+=String.fromCharCode(parseInt(f,16))):(g=Hc[f],d+=g?g:f),g=!1;else if(f=="\\")g=!0;else if(f==b){q++;u.push({index:c,text:e,string:d,json:!0,fn:function(){return d.length==
n?y.String.toDate(d):d}});return}else d+=f;q++}h("Unterminated quote",c)}for(var n=b?Ab:-1,u=[],A,q=0,j=[],p,O=":";q<a.length;){p=a.charAt(q);if(c("\"'"))l(p);else if(e(p)||c(".")&&e(d()))i();else if(f(p)){if(k(),"{,".indexOf(O)!=-1&&j[0]=="{"&&(A=u[u.length-1]))A.json=A.text.indexOf(".")==-1}else if(c("(){}[].,;:"))u.push({index:q,text:p,json:":[,".indexOf(O)!=-1&&c("{[")||c("}]:,")}),c("{[")&&j.unshift(p),c("}]")&&j.shift(),q++;else if(p==" "||p=="\r"||p=="\t"||p=="\n"||p=="\u000b"||p=="\u00a0"){q++;
continue}else{var L=p+d(),m=bb[p],da=bb[L];da?(u.push({index:q,text:L,fn:da}),q+=2):m?(u.push({index:q,text:p,fn:m,json:"[,:".indexOf(O)!=-1&&c("+-")}),q+=1):h("Unexpected next character ",q,q+1)}O=p}return u}function ha(a,b){function c(a){return function(){var b=a();P.length!==0&&d("is an unexpected token",P[0]);return b}}function d(b,c){throw I("Syntax Error: Token '"+c.text+"' "+b+" at column "+(c.index+1)+" of the expression ["+a+"] starting at ["+a.substring(c.index)+"].");}function e(){if(P.length===
0)throw I("Unexpected end of expression: "+a);return P[0]}function f(a,b,c,d){if(P.length>0){var e=P[0],g=e.text;if(g==a||g==b||g==c||g==d||!a&&!b&&!c&&!d)return e}return!1}function g(a,c,e,g){return(a=f(a,c,e,g))?(b&&!a.json&&d("is not valid json",a),P.shift(),a):!1}function h(a){g(a)||d("is unexpected, expecting ["+a+"]",f())}function i(a,b){return function(c){return a(c,b(c))}}function k(a,b,c){return function(d){return b(d,a(d),c(d))}}function l(){return cb(W)}function n(){for(var a=u(),b;;)if(b=
g("||"))a=k(a,b.fn,u());else return a}function u(){var a=A(),b;if(b=g("&&"))a=k(a,b.fn,u());return a}function A(){var a=q(),b;if(b=g("==","!="))a=k(a,b.fn,A());return a}function q(){var a;a=j();for(var b;b=g("+","-");)a=k(a,b.fn,j());if(b=g("<",">","<=",">="))a=k(a,b.fn,q());return a}function j(){for(var a=p(),b;b=g("*","/","%");)a=k(a,b.fn,p());return a}function p(){var a;return g("+")?O():(a=g("-"))?k(da,a.fn,p()):(a=g("!"))?i(a.fn,p()):O()}function O(){var a;if(g("("))a=db(),h(")");else if(g("["))a=
L();else if(g("{"))a=m();else{var b=g();(a=b.fn)||d("not a primary expression",b)}for(;b=g("(","[",".");)b.text==="("?a=Jb(a):b.text==="["?a=r(a):b.text==="."?a=y(a):d("IMPOSSIBLE");return a}function L(){var a=[];if(e().text!="]"){do a.push(ca());while(g(","))}h("]");return function(b){for(var c=[],d=0;d<a.length;d++)c.push(a[d](b));return c}}function m(){var a=[];if(e().text!="}"){do{var b=g(),b=b.string||b.text;h(":");var c=ca();a.push({key:b,value:c})}while(g(","))}h("}");return function(b){for(var c=
{},d=0;d<a.length;d++){var e=a[d],g=e.value(b);c[e.key]=g}return c}}var da=za(0),P=Fc(a,b),ca=function(){var b=n(),c,e;return(e=g("="))?(b.assign||d("implies assignment but ["+a.substring(0,e.index)+"] can not be assigned to",e),c=n(),function(a){return b.assign(a,c(a))}):b},Ib=n,Jb=function(a){var b=[];if(e().text!=")"){do b.push(ca());while(g(","))}h(")");return function(c){for(var d=[],e=0;e<b.length;e++)d.push(b[e](c));e=a(c)||o;return e.apply?e.apply(c,d):e(d[0],d[1],d[2],d[3],d[4])}},y=function(a){var b=
g().text,c=Cb(b);return s(function(b){return c(a(b))},{assign:function(c,d){return $a(a(c),b,d)}})},r=function(a){var b=ca();h("]");return s(function(c){var d=a(c),c=b(c);return d?d[c]:x},{assign:function(c,d){return a(c)[b(c)]=d}})},db=function(){for(var a=ca(),b;;)if(b=g("|"))a=k(a,b.fn,l());else return a},v=function(a){for(var b=g(),c=b.text.split("."),e,f=0;f<c.length;f++)e=c[f],a&&(a=a[e]);typeof a!=$&&d("should be a function",b);return a},cb=function(a){for(var b=v(a),c=[];;)if(g(":"))c.push(ca());
else{var d=function(a,d){for(var e=[d],g=0;g<c.length;g++)e.push(c[g](a));return b.apply(a,e)};return function(){return d}}};b&&(ca=n,Jb=y=r=Ib=db=v=cb=function(){d("is not valid json",{text:a,index:0})});return{assignable:c(Ib),primary:c(O),statements:c(function(){for(var a=[];;)if(P.length>0&&!f("}",")",";","]")&&a.push(db()),!g(";"))return a.length==1?a[0]:function(b){for(var c,d=0;d<a.length;d++){var e=a[d];e&&(c=e(b))}return c}}),validator:c(function(){return cb(eb)}),formatter:c(function(){function a(b){return function(a,
c){for(var d=[c],g=0;g<e.length;g++)d.push(e[g](a));return b.apply(a,d)}}var b=g(),c=ia[b.text],e=[];for(c||d("is not a valid formatter.",b);;)if(b=g(":"))e.push(ca());else return za({format:a(c.format),parse:a(c.parse)})}),filter:c(l)}}function Kb(a,b){this.template=a+="#";this.defaults=b||{};var c=this.urlParams={};j(a.split(/\W/),function(b){b&&a.match(RegExp(":"+b+"\\W"))&&(c[b]=!0)})}function Fa(a){this.xhr=a}function Ic(a,b,c,d,e){function f(a){try{a.apply(null,na.call(arguments,1))}finally{if(F--,
F===0)for(;p.length;)try{p.pop()()}catch(b){e.error(b)}}}function g(a,b){(function Gc(){j(O,function(a){a()});L=b(Gc,a)})()}var h=this,i=b[0],k=a.location,l=a.setTimeout,n=a.clearTimeout,u={},A;h.isMock=!1;var q=0,F=0,p=[];h.xhr=function(b,e,g,i,k){F++;if(B(b)=="json"){var l=("angular_"+Math.random()+"_"+q++).replace(/\d\./,""),u=h.addJs(e.replace("JSON_CALLBACK",l));a[l]=function(b){delete a[l];c[0].removeChild(u);f(i,200,b)}}else{var n=new d;n.open(b,e,!0);j(k,function(a,b){a&&n.setRequestHeader(b,
a)});n.onreadystatechange=function(){n.readyState==4&&f(i,n.status==1223?204:n.status||200,n.responseText)};n.send(g||"")}};h.notifyWhenNoOutstandingRequests=function(a){j(O,function(a){a()});F===0?a():p.push(a)};var O=[],L;h.addPollFn=function(a){t(L)&&g(100,l);O.push(a);return a};h.setUrl=function(a){var b=A;b.match(/#/)||(b+="#");a.match(/#/)||(a+="#");if(b!=a)k.href=a};h.getUrl=function(){return A=k.href};h.onHashChange=function(b){var c=a.document.documentMode;if("onhashchange"in a&&(t(c)||c>=
8))m(a).bind("hashchange",b);else{var d=h.getUrl();h.addPollFn(function(){d!=h.getUrl()&&(b(),d=h.getUrl())})}return b};var s={},da="";h.cookies=function(a,b){var c,d,g,f;if(a)if(b===x)i.cookie=escape(a)+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(v(b))i.cookie=escape(a)+"="+escape(b),c=a.length+b.length+1,c>4096&&e.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),s.length>20&&e.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+
s.length+" > 20 )")}else{if(i.cookie!==da){da=i.cookie;c=da.split("; ");s={};for(g=0;g<c.length;g++)d=c[g],f=d.indexOf("="),f>0&&(s[unescape(d.substring(0,f))]=unescape(d.substring(f+1)))}return s}};h.defer=function(a,b){var c;F++;c=l(function(){delete u[c];f(a)},b||0);u[c]=!0;return c};h.defer.cancel=function(a){if(u[a])return delete u[a],n(a),f(o),!0};var P=o;h.hover=function(a){P=a};h.bind=function(){b.bind("mouseover",function(a){P(m(ba?a.srcElement:a.target),!0);return!0});b.bind("mouseleave mouseout click dblclick keypress keyup",
function(a){P(m(a.target),!1);return!0})};h.addCss=function(a){var b=m(i.createElement("link"));b.attr("rel","stylesheet");b.attr("type","text/css");b.attr("href",a);c.append(b)};h.addJs=function(a,b){var d=i.createElement("script");d.type="text/javascript";d.src=a;if(b)d.id=b;c[0].appendChild(d);return d}}function pb(a,b){function c(a,c,e,f){c=B(c);if(Lb[c])for(;g.last()&&Mb[g.last()];)d("",g.last());Nb[c]&&g.last()==c&&d("",c);(f=Ob[c]||!!f)||g.push(c);var h={};e.replace(Jc,function(a,b,c,d,e){h[b]=
fb(c||d||e||"")});b.start&&b.start(c,h,f)}function d(a,c){var d=0,e;if(c=B(c))for(d=g.length-1;d>=0;d--)if(g[d]==c)break;if(d>=0){for(e=g.length-1;e>=d;e--)b.end&&b.end(g[e]);g.length=d}}var e,f,g=[],h=a;for(g.last=function(){return g[g.length-1]};a;){f=!0;if(!g.last()||!Pb[g.last()]){if(a.indexOf("<\!--")===0)e=a.indexOf("--\>"),e>=0&&(b.comment&&b.comment(a.substring(4,e)),a=a.substring(e+3),f=!1);else if(Kc.test(a)){if(e=a.match(Qb))a=a.substring(e[0].length),e[0].replace(Qb,d),f=!1}else if(Lc.test(a)&&
(e=a.match(Rb)))a=a.substring(e[0].length),e[0].replace(Rb,c),f=!1;f&&(e=a.indexOf("<"),f=e<0?a:a.substring(0,e),a=e<0?"":a.substring(e),b.chars&&b.chars(fb(f)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+g.last()+"[^>]*>","i"),function(a,c){c=c.replace(Mc,"$1").replace(Nc,"$1");b.chars&&b.chars(fb(c));return""}),d("",g.last());if(a==h)throw"Parse Error: "+a;h=a}d()}function fb(a){gb.innerHTML=a.replace(/</g,"&lt;");return gb.innerText||gb.textContent||""}function Sb(a){return a.replace(/&/g,"&amp;").replace(Oc,
function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function qb(a){var b=!1,c=G(a,a.push);return{start:function(a,e,f){a=B(a);!b&&Pb[a]&&(b=a);!b&&Tb[a]==!0&&(c("<"),c(a),j(e,function(a,b){var d=B(b);if(Pc[d]==!0&&(Ub[d]!==!0||a.match(Qc)))c(" "),c(b),c('="'),c(Sb(a)),c('"')}),c(f?"/>":">"))},end:function(a){a=B(a);!b&&Tb[a]==!0&&(c("</"),c(a),c(">"));a==b&&(b=!1)},chars:function(a){b||c(Sb(a))}}}function Rc(a){var b={},a=a[0].style,c,d;if(typeof a.length=="number")for(c=
0;c<a.length;c++)d=a[c],b[d]=a[d];else for(d in a)c=a[d],1*d!=d&&d!="cssText"&&c&&typeof c=="string"&&c!="false"&&(b[d]=c);return b}function Wa(a){if(v(a)&&a.charAt(0)!="<")throw new I("selectors not implemented");return new X(a)}function X(a){if(a instanceof X)return a;else if(v(a)){var b=K.createElement("div");b.innerHTML="<div>&nbsp;</div>"+a;b.removeChild(b.firstChild);hb(this,b.childNodes);this.remove()}else hb(this,a)}function va(a){Vb(a);for(var b=0,a=a.childNodes||[];b<a.length;b++)va(a[b])}
function Vb(a){var b=a[Ga],c=Ha[b];c&&(j(c.bind||{},function(b,c){Sc(a,c,b)}),delete Ha[b],a[Ga]=x)}function pa(a,b,c){var d=a[Ga],d=Ha[d||-1];if(z(c))d||(a[Ga]=d=Tc++,d=Ha[d]={}),d[b]=c;else return d?d[b]:null}function ib(a,b){var c;return(" "+a.className+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1}function Wb(a,b){a.className=ma((" "+a.className+" ").replace(/[\n\t]/g," ").replace(" "+b+" ",""))}function Xb(a,b){if(!ib(a,b))a.className=ma(a.className+" "+b)}function hb(a,b){if(b)for(var b=
!b.nodeName&&z(b.length)&&(!b||!b.document||!b.location||!b.alert||!b.setInterval)?b:[b],c=0;c<b.length;c++)a.push(b[c])}function jb(a){var b=typeof a,c=a;if(b=="object")if(typeof(c=a.$hashKey)=="function")c=a.$hashKey();else if(c===x)c=a.$hashKey=nc();return b+":"+c}function Yb(){}function ja(a,b){y[a]=y[a]||{};j(b,function(b){s(y[a],b)})}function Zb(a,b,c){var d=a<0,c=wa.PATTERNS[c||0],a=Math.abs(a),e=a+"",f="",g=[];if(e.indexOf("e")!==-1)f=e;else{e=(e.split($b)[1]||"").length;t(b)&&(b=Math.min(Math.max(c[1],
e),c[2]));var e=Math.pow(10,b),a=Math.round(a*e)/e,a=(""+a).split($b),e=a[0],a=a[1]||"",h=0,i=c[8],k=c[7];if(e.length>=i+k)for(var h=e.length-i,l=0;l<h;l++)(h-l)%k===0&&l!==0&&(f+=wa.GROUP_SEP),f+=e.charAt(l);for(l=h;l<e.length;l++)(e.length-l)%i===0&&l!==0&&(f+=wa.GROUP_SEP),f+=e.charAt(l);for(;a.length<b;)a+="0";b&&(f+=wa.DECIMAL_SEP+a.substr(0,b))}g.push(d?c[5]:c[3]);g.push(f);g.push(d?c[6]:c[4]);return g.join("")}function S(a,b,c){var d="";a<0&&(d="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;c&&(a=
a.substr(a.length-b));return d+a}function H(a,b,c,d){return function(e){e=e["get"+a]();if(c>0||e>-c)e+=c;e===0&&c==-12&&(e=12);return S(e,b,d)}}function Ia(a,b){return function(c){c=c["get"+a]();c=a=="Month"?Uc[c]:Vc[c];return b?c.substr(0,3):c}}function ac(a){return function(b){var c;return a||!(c=Wc.exec(b.toString()))?(b=b.getTimezoneOffset(),S(b/60,2)+S(Math.abs(b%60),2)):c[0]}}function qa(a,b){return{format:a,parse:b||a}}function bc(a){return z(a)&&a!==null?""+a:a}function kb(a){function b(){d=
!1;c.$eval()}var c=this,d;return a.isMock?b:function(){d||(d=!0,a.defer(b,kb.delay))}}function cc(a){var b=dc[a];if(!b){var c=[];j(Ja(a),function(a){var b=Ka(a);c.push(b?function(a){var c,d=this.$tryEval(b,function(a){c=R(a)});fa(a,Da,c);return c?c:d}:function(){return a})});dc[a]=b=function(a,b){var f=[],g=this.hasOwnProperty(ec)?this.$element:x;this.$element=a;for(var h=0;h<c.length;h++){var i=c[h].call(this,a);i&&(i.nodeName||i.bind&&i.find)?i="":M(i)&&(i=R(i,b));f.push(i)}this.$element=g;return f.join("")}}return b}
function lb(a){return function(b,c){var d=c[0].className+" ";return function(c){this.$onEval(function(){if(a(this.$index)){var f=this.$eval(b);Z(f)&&(f=f.join(" "));c[0].className=ma(d+f)}},c)}}}function Ja(a){for(var b=[],c=0,d;(d=a.indexOf("{{",c))>-1;)c<d&&b.push(a.substr(c,d-c)),c=d,d=a.indexOf("}}",d),d=d<0?a.length:d+2,b.push(a.substr(c,d-c)),c=d;c!=a.length&&b.push(a.substr(c,a.length-c));return b.length===0?[a]:b}function Ka(a){return(a=a.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/))?a[1]:
null}function xa(a,b){var c=b.attr("name"),d,e;if(c){d=ha(c).assignable();e=d.assign;if(!e)throw new I("Expression '"+c+"' is not assignable.");return{get:function(){return d(a)},set:function(c){if(c!==x)return a.$tryEval(function(){e(a,c)},b)}}}}function fc(a,b){var c=xa(a,b),d=b.attr("ng:format")||La,e=ha(d).formatter()();if(c)return{get:function(){return e.format(a,c.get())},set:function(b){return c.set(e.parse(a,b))}}}function gc(a,b){function c(){var c=ma(b.val());if(b[0].disabled||b[0].readOnly)fa(b,
ya,null),n.markValid(b);else{var d=oc(a,{$element:b}),c=l&&!c?"Required":c?e(d,c):null;fa(b,ya,c);(k=c)?n.markInvalid(b):n.markValid(b)}}var d=b.attr("ng:validate")||La,e=ha(d).validator()(),f=b.attr("ng:required"),g=b.attr("ng:format")||La,g=ha(g).formatter()(),h,i,k,l,n=a.$service("$invalidWidgets")||{markValid:o,markInvalid:o};if(!e)throw"Validator named '"+d+"' not found.";h=g.format;i=g.parse;f?a.$watch(f,function(a){l=a;c()}):l=f==="";b.data(mb,c);return{get:function(){k&&fa(b,ya,null);try{var d=
i(a,b.val());c();return d}catch(e){k=e,fa(b,ya,e)}},set:function(d){var e=b.val(),d=h(a,d);e!=d&&b.val(d||"");c()}}}function hc(){return{get:o,set:o}}function Ma(a){return function(b,c){var d=c.get();!d&&z(a)&&(d=C(a));t(b.get())&&z(d)&&b.set(d)}}function ra(a,b,c,d,e){return Ea("$updateView","$defer",function(f,g,h){var i=this,k=b(i,h),l=c(i,h),n=h.attr("ng:change")||"",u;k&&(d.call(i,k,l,h),this.$eval(h.attr("ng:init")||""),h.bind(a,function(a){function b(){var a=l.get();if(!e||a!=u)k.set(a),u=
k.get(),i.$tryEval(n,h),f()}a.type=="keydown"?g(b):b()}),i.$watch(k.get,function(a){u!==a&&l.set(u=a)}))})}function Na(a){this.directives(!0);this.descend(!0);return Xc[B(a[0].type)]||o}if(typeof K.getAttribute==la)K.getAttribute=function(){};var B=function(a){return v(a)?a.toLowerCase():a},nb=function(a){return v(a)?a.toUpperCase():a},ec="$element",mb="$validate",yc="boolean",$="function",lc="length",mc="name",Ca="null",qc="number",ob="object",pc="string",la="undefined",Da="ng-exception",ya="ng-validation-error",
La="noop",Gb=-1E3,Yc={FIRST:-99999,LAST:99999,WATCH:Gb},I=w.Error,ba=parseInt((/msie (\d+)/.exec(B(navigator.userAgent))||[])[1],10),m,Va,na=[].slice,J=[].push,xc=w.console?G(w.console,w.console.error||o):o,y=w.angular||(w.angular={}),Sa=U(y,"markup"),wb=U(y,"attrMarkup"),D=U(y,"directive"),Q=U(y,"widget",B),eb=U(y,"validator"),W=U(y,"filter"),ia=U(y,"formatter"),ab=U(y,"service");U(y,"callbacks");var ta,vc=/^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/,T=["0","0","0"],Ab=24;ta=ba<9?function(a){a=
a.nodeName?a:a[0];return a.scopeName&&a.scopeName!="HTML"?nb(a.scopeName+":"+a.nodeName):a.nodeName}:function(a){return a.nodeName?a.nodeName:a[0].nodeName};y.toJson=R;y.fromJson=ga;Za.prototype={attach:function(a,b){var c={};this.collectInits(a,c,b);Pa(c,function(a){j(a,function(a){a()})})},collectInits:function(a,b,c){var d=b[this.priority],e=c;d||(b[this.priority]=d=[]);this.newScope&&(e=V(c),c.$onEval(e.$eval),a.data("$scope",e));j(this.inits,function(b){d.push(function(){e.$tryEval(function(){return e.$service.invoke(e,
b,[a])},a)})});for(var f=a[0].childNodes,g=this.children,h=this.paths,i=h.length,c=0;c<i;c++)g[c].collectInits(m(f[h[c]]),b,e)},addInit:function(a){if(a){if(!a.$inject)a.$inject=[];this.inits.push(a)}},addChild:function(a,b){b&&(this.paths.push(a),this.children.push(b))},empty:function(){return this.inits.length===0&&this.paths.length===0}};vb.prototype={compile:function(a){var a=m(a),b=0,c,d=a.parent();if(a.length>1)throw I("Cannot compile multiple element roots: "+m("<div>").append(a.clone()).html());
if(d&&d[0])for(var d=d[0],e=0;e<d.childNodes.length;e++)d.childNodes[e]==a[0]&&(b=e);c=this.templatize(a,b,0)||new Za;return function(b,d){var e=d?zb.clone.call(a):a,b=b||V();e.data("$scope",b);b.$element=e;(d||o)(e,b);c.attach(e,b);b.$eval();return b}},templatize:function(a,b,c){var d=this,e,f,g=d.directives,h=!0,i=!0,k=ta(a),l=k.indexOf(":")>0?B(k).replace(":","-"):"",n,u={compile:G(d,d.compile),descend:function(a){z(a)&&(h=a);return h},directives:function(a){z(a)&&(i=a);return i},scope:function(a){if(z(a))n.newScope=
n.newScope||a;return n.newScope}};try{c=a.attr("ng:eval-order")||c||0}catch(A){c=c||0}a.addClass(l);v(c)&&(c=Yc[nb(c)]||parseInt(c,10));n=new Za(c);Ba(a,function(b,c){if(!e&&(e=d.widgets("@"+c)))a.addClass("ng-attr-widget"),e=G(u,e,b,a)});if(!e&&(e=d.widgets(k)))l&&a.addClass("ng-widget"),e=G(u,e,a);e&&(i=h=!1,k=a.parent(),n.addInit(e.call(u,a)),k&&k[0]&&(a=m(k[0].childNodes[b])));if(h)for(var q=0,F=a[0].childNodes;q<F.length;q++)ta(F[q])=="#text"&&j(d.markup,function(b){if(q<F.length){var c=m(F[q]);
b.call(u,c.text(),c,a)}});i&&(Ba(a,function(b,c){j(d.attrMarkup,function(d){d.call(u,b,c,a)})}),Ba(a,function(b,c){if(f=g[c])a.addClass("ng-directive"),n.addInit(g[c].call(u,b,a))}));h&&Bb(a,function(a,b){n.addChild(b,d.templatize(a,b,c))});return n.empty()?null:n}};var zc=0,Db={},Fb={},Eb={};j("abstract,boolean,break,byte,case,catch,char,class,const,continue,debugger,default,delete,do,double,else,enum,export,extends,false,final,finally,float,for,function,goto,if,implements,import,ininstanceof,intinterface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,var,volatile,void,undefined,while,with".split(/,/),
function(a){Eb[a]=!0});var Cc=/^function\s*[^\(]*\(([^\)]*)\)/m,Dc=/,/,Ec=/^\s*(.+?)\s*$/,Bc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,bb={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},$undefined:o,"+":function(a,b,c){return(z(b)?b:0)+(z(c)?c:0)},"-":function(a,b,c){return(z(b)?b:0)-(z(c)?c:0)},"*":function(a,b,c){return b*c},"/":function(a,b,c){return b/c},"%":function(a,b,c){return b%c},"^":function(a,b,c){return b^c},"=":o,"==":function(a,b,c){return b==c},"!=":function(a,
b,c){return b!=c},"<":function(a,b,c){return b<c},">":function(a,b,c){return b>c},"<=":function(a,b,c){return b<=c},">=":function(a,b,c){return b>=c},"&&":function(a,b,c){return b&&c},"||":function(a,b,c){return b||c},"&":function(a,b,c){return b&c},"|":function(a,b,c){return c(a,b)},"!":function(a,b){return!b}},Hc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'};Kb.prototype={url:function(a){var b=this,c=this.template,d,a=a||{};j(this.urlParams,function(e,g){d=Ua(a[g]||b.defaults[g]||
"",!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+");c=c.replace(RegExp(":"+g+"(\\W)"),d+"$1")});var c=c.replace(/\/?#$/,""),e=[];Pa(a,function(a,c){b.urlParams[c]||e.push(Ua(c)+"="+Ua(a))});c=c.replace(/\/*$/,"");return c+(e.length?"?"+e.join("&"):"")}};Fa.DEFAULT_ACTIONS={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}};Fa.prototype={route:function(a,b,c){function d(a){var c={};j(b||{},function(b,d){c[d]=
b.charAt&&b.charAt(0)=="@"?ua(a,b.substr(1)):b});return c}function e(a){C(a||{},this)}var f=this,g=new Kb(a),c=s({},Fa.DEFAULT_ACTIONS,c);j(c,function(h,i){var k=h.method=="POST"||h.method=="PUT";e[i]=function(a,b,c,i){var q={},F,p=o,m=null;switch(arguments.length){case 4:m=i,p=c;case 3:case 2:if(r(b))p=b,m=c;else{q=a;F=b;p=c;break}case 1:r(a)?p=a:k?F=a:q=a;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments.";}var L=this instanceof
e?this:h.isArray?[]:new e(F);f.xhr(h.method,g.url(s({},h.params||{},d(F),q)),F,function(a,b){if(b)h.isArray?(L.length=0,j(b,function(a){L.push(new e(a))})):C(b,L);(p||o)(L)},m||h.verifyCache,h.verifyCache);return L};e.bind=function(d){return f.route(a,s({},b,d),c)};e.prototype["$"+i]=function(a,b,c){var g=d(this),f=o,h;switch(arguments.length){case 3:g=a;f=b;h=c;break;case 2:case 1:r(a)?(f=a,h=b):(g=a,f=b||o);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
arguments.length+" arguments.";}e[i].call(this,g,k?this:x,f,h)}});return e}};var Zc=w.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw new I("This browser does not support XMLHttpRequest.");},Rb=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,Qb=/^<\s*\/\s*([\w:-]+)[^>]*>/,Jc=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
Lc=/^</,Kc=/^<\s*\//,Mc=/<\!--(.*?)--\>/g,Nc=/<!\[CDATA\[(.*?)]]\>/g,Qc=/^((ftp|https?):\/\/|mailto:|#)/,Oc=/([^\#-~| |!])/g,Ob=aa("area,br,col,hr,img"),Lb=aa("address,blockquote,center,dd,del,dir,div,dl,dt,hr,ins,li,map,menu,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),Mb=aa("a,abbr,acronym,b,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var"),Nb=aa("colgroup,dd,dt,li,p,td,tfoot,th,thead,tr"),Pb=aa("script,style"),Tb=s({},Ob,
Lb,Mb,Nb),Ub=aa("background,href,longdesc,src,usemap"),Pc=s({},Ub,aa("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),gb=K.createElement("pre"),Ha={},Ga="ng-"+(new Date).getTime(),Tc=1,$c=w.document.addEventListener?function(a,b,c){a.addEventListener(b,c,
!1)}:function(a,b,c){a.attachEvent("on"+b,c)},Sc=w.document.removeEventListener?function(a,b,c){a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent("on"+b,c)},zb=X.prototype={ready:function(a){function b(){c||(c=!0,a())}var c=!1;this.bind("DOMContentLoaded",b);Wa(w).bind("load",b)},toString:function(){var a=[];j(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return a>=0?m(this[a]):m(this[this.length+a])},length:0,push:J,sort:[].sort,splice:[].splice},ad=aa("multiple,selected,checked,disabled,readonly");
j({data:pa,scope:function(a){for(var b;a&&!(b=m(a).data("$scope"));)a=a.parentNode;return b},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:ib,css:function(a,b,c){if(z(c))a.style[b]=c;else return a.style[b]},attr:function(a,b,c){if(ad[b])if(z(c))a[b]=!!c;else return a[b];else if(z(c))a.setAttribute(b,c);else if(a.getAttribute)return a=a.getAttribute(b,2),a===null?x:a},text:s(ba<9?function(a,b){if(a.nodeType==3){if(t(b))return a.nodeValue;a.nodeValue=b}else{if(t(b))return a.innerText;a.innerText=
b}}:function(a,b){if(t(b))return a.textContent;a.textContent=b},{$dv:""}),val:function(a,b){if(t(b))return a.value;a.value=b},html:function(a,b){if(t(b))return a.innerHTML;for(var c=0,d=a.childNodes;c<d.length;c++)va(d[c]);a.innerHTML=b}},function(a,b){X.prototype[b]=function(b,d){var e,f;if((a.length==2?b:d)===x)if(M(b)){for(e=0;e<this.length;e++)for(f in b)a(this[e],f,b[f]);return this}else{if(this.length)return a(this[0],b,d)}else{for(e=0;e<this.length;e++)a(this[e],b,d);return this}return a.$dv}});
j({removeData:Vb,dealoc:va,bind:function(a,b,c){var d=pa(a,"bind");d||pa(a,"bind",d={});j(b.split(" "),function(b){var f=d[b];if(!f)d[b]=f=function(b){if(!b.preventDefault)b.preventDefault=function(){b.returnValue=!1};if(!b.stopPropagation)b.stopPropagation=function(){b.cancelBubble=!0};if(!b.target)b.target=b.srcElement||K;j(f.fns,function(c){c.call(a,b)})},f.fns=[],$c(a,b,f);f.fns.push(c)})},replaceWith:function(a,b){var c,d=a.parentNode;va(a);j(new X(b),function(b){c?d.insertBefore(b,c.nextSibling):
d.replaceChild(b,a);c=b})},children:function(a){var b=[];j(a.childNodes,function(a){a.nodeName!="#text"&&b.push(a)});return b},append:function(a,b){j(new X(b),function(b){a.nodeType===1&&a.appendChild(b)})},prepend:function(a,b){if(a.nodeType===1){var c=a.firstChild;j(new X(b),function(b){c?a.insertBefore(b,c):(a.appendChild(b),c=b)})}},remove:function(a){va(a);var b=a.parentNode;b&&b.removeChild(a)},after:function(a,b){var c=a,d=a.parentNode;j(new X(b),function(a){d.insertBefore(a,c.nextSibling);
c=a})},addClass:Xb,removeClass:Wb,toggleClass:function(a,b,c){t(c)&&(c=!ib(a,b));(c?Xb:Wb)(a,b)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){return a.nextSibling},find:function(a,b){return a.getElementsByTagName(b)},hide:function(a){if(a.style)a.style.display!=="none"&&!pa(a,"olddisplay")&&pa(a,"olddisplay",a.style.display),a.style.display="none"},show:function(a){if(a.style){var b=a.style.display;if(b===""||b==="none")if(a.style.display=pa(a,"olddisplay")||
"",!rb([a]))a.style.display="block"}},clone:function(a){return a.cloneNode(!0)}},function(a,b){X.prototype[b]=function(b,d){for(var e,f=0;f<this.length;f++)e==x?(e=a(this[f],b,d),e!==x&&(e=m(e))):hb(e,a(this[f],b,d));return e==x?this:e}});var J={typeOf:function(a){if(a===null)return Ca;var b=typeof a;if(b==ob){if(a instanceof Array)return"array";if(a instanceof Date)return"date";if(a.nodeType==1)return"element"}return b}},Y={copy:C,size:sb,equals:sa},bd={extend:s},cd={indexOf:Aa,sum:function(a,b){for(var c=
y.Function.compile(b),d=0,e=0;e<a.length;e++){var f=1*c(a[e]);isNaN(f)||(d+=f)}return d},remove:function(a,b){var c=Aa(a,b);c>=0&&a.splice(c,1);return b},filter:function(a,b){var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;
case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof b){case "boolean":case "number":case "string":b={$:b};case "object":for(var e in b)e=="$"?function(){var a=(""+b[e]).toLowerCase();a&&c.push(function(b){return d(b,a)})}():function(){var a=e,g=(""+b[e]).toLowerCase();g&&c.push(function(b){return d(ua(b,a),g)})}();break;case $:c.push(b);break;default:return a}for(var f=[],g=0;g<a.length;g++){var h=a[g];c.check(h)&&f.push(h)}return f},add:function(a,
b){a.push(t(b)?{}:b);return a},count:function(a,b){if(!b)return a.length;var c=y.Function.compile(b),d=0;j(a,function(a){c(a)&&d++});return d},orderBy:function(a,b,c){function d(a,b){return oa(b)?function(b,c){return a(c,b)}:a}if(!b)return a;for(var b=Z(b)?b:[b],b=rc(b,function(a){var b=!1,c=a||ea;if(v(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")b=a.charAt(0)=="-",a=a.substring(1);c=N(a).fnSelf}return d(function(a,b){var d;d=c(a);var e=c(b),g=typeof d,f=typeof e;g==f?(g=="string"&&(d=d.toLowerCase()),
g=="string"&&(e=e.toLowerCase()),d=d===e?0:d<e?-1:1):d=g<f?-1:1;return d},b)}),e=[],f=0;f<a.length;f++)e.push(a[f]);return e.sort(d(function(a,c){for(var d=0;d<b.length;d++){var e=b[d](a,c);if(e!==0)return e}return 0},c))},limitTo:function(a,b){var b=parseInt(b,10),c=[],d,e;b>0?(d=0,e=b):(d=a.length+b,e=a.length);for(;d<e;d++)c.push(a[d]);return c}},dd=/^(\d{4})-(\d\d)-(\d\d)(?:T(\d\d)(?:\:(\d\d)(?:\:(\d\d)(?:\.(\d{3}))?)?)?Z)?$/,Ya={quote:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,
'\\"').replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v")+'"'},quoteUnicode:function(a){for(var a=y.String.quote(a),b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b.push(a.charAt(c)):(d="000"+d.toString(16),b.push("\\u"+d.substring(d.length-4)))}return b.join("")},toDate:function(a){var b;if(v(a)&&(b=a.match(dd)))a=new Date(0),a.setUTCFullYear(b[1],b[2]-1,b[3]),a.setUTCHours(b[4]||0,b[5]||0,b[6]||0,b[7]||0);return a}},ic={toString:function(a){if(!a)return a;
var b=a.toISOString?a.toISOString():"";return b.length==24?b:S(a.getUTCFullYear(),4)+"-"+S(a.getUTCMonth()+1,2)+"-"+S(a.getUTCDate(),2)+"T"+S(a.getUTCHours(),2)+":"+S(a.getUTCMinutes(),2)+":"+S(a.getUTCSeconds(),2)+"."+S(a.getUTCMilliseconds(),3)+"Z"}};Yb.prototype={put:function(a,b){var c=jb(a),d=this[c];this[c]=b;return d},get:function(a){return this[jb(a)]},remove:function(a){var a=jb(a),b=this[a];delete this[a];return b}};ja("Global",[J]);ja("Collection",[J,Y]);ja("Array",[J,Y,cd]);ja("Object",
[J,Y,bd]);ja("String",[J,Ya]);ja("Date",[J,ic]);y.Date.toString=ic.toString;ja("Function",[J,Y,{compile:function(a){return r(a)?a:a?N(a).fnSelf:ea}}]);W.currency=function(a,b){this.$element.toggleClass("ng-format-negative",a<0);if(t(b))b=wa.CURRENCY_SYM;return Zb(a,2,1).replace(/\u00A4/g,b)};var wa={DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[[1,0,3,"","","-","",3,3],[1,2,2,"\u00a4","","(\u00a4",")",3,3]],CURRENCY_SYM:"$"},$b=".";W.number=function(a,b){return isNaN(a)||!isFinite(a)?"":Zb(a,b,0)};var Vc=
"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),Uc="January,February,March,April,May,June,July,August,September,October,November,December".split(","),ed={yyyy:H("FullYear",4),yy:H("FullYear",2,0,!0),y:H("FullYear",1),MMMM:Ia("Month"),MMM:Ia("Month",!0),MM:H("Month",2,1),M:H("Month",1,1),dd:H("Date",2),d:H("Date",1),HH:H("Hours",2),H:H("Hours",1),hh:H("Hours",2,-12),h:H("Hours",1,-12),mm:H("Minutes",2),m:H("Minutes",1),ss:H("Seconds",2),s:H("Seconds",1),EEEE:Ia("Day"),EEE:Ia("Day",
!0),a:function(a){return a.getHours()<12?"am":"pm"},z:ac(!1),Z:ac(!0)},fd={"long":"MMMM d, y h:mm:ss a z",medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",longTime:"h:mm:ss a z",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},Wc=/[A-Z]{3}(?![+\-])/,gd=/([^yMdHhmsazZE]*)(E+|y+|M+|d+|H+|h+|m+|s+|a|Z|z)(.*)/,hd=/^\d+$/;W.date=function(a,b){b=fd[b]||b;v(a)&&(a=hd.test(a)?parseInt(a,10):Ya.toDate(a));ka(a)&&(a=new Date(a));
if(!(a instanceof Date))return a;var c=a.toLocaleDateString(),d;if(b&&v(b)){for(var c="",e=[],f;b;)(f=gd.exec(b))?(e=e.concat(na.call(f,1,f.length)),b=e.pop()):(e.push(b),b=null);j(e,function(b){d=ed[b];c+=d?d(a):b})}return c};W.json=function(a){this.$element.addClass("ng-monospace");return R(a,!0)};W.lowercase=B;W.uppercase=nb;W.html=function(a,b){return new Ra(a,b)};W.linky=function(a){if(!a)return a;for(var b=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,c=a,d=[],
e=qb(d),f,g;a=c.match(b);)f=a[0],a[2]==a[3]&&(f="mailto:"+f),g=a.index,e.chars(c.substr(0,g)),e.start("a",{href:f}),e.chars(a[0].replace(/^mailto:/,"")),e.end("a"),c=c.substring(g+a[0].length);e.chars(c);return new Ra(d.join(""))};var id=/^\s*[-+]?\d*(\.\d*)?\s*$/;ia.noop=qa(ea,ea);ia.json=qa(R,function(a){return ga(a||"null")});ia["boolean"]=qa(bc,oa);ia.number=qa(bc,function(a){if(a==null||id.exec(a))return a===null||a===""?null:1*a;else throw"Not a number";});ia.list=qa(function(a){return a?a.join(", "):
a},function(a){var b=[];j((a||"").split(","),function(a){(a=ma(a))&&b.push(a)});return b});ia.trim=qa(function(a){return a?ma(""+a):""});s(eb,{noop:function(){return null},regexp:function(a,b,c){return a.match(b)?null:c||"Value does not match expected format "+b+"."},number:function(a,b,c){var d=1*a;return d==a?typeof b!=la&&d<b?"Value can not be less than "+b+".":typeof b!=la&&d>c?"Value can not be greater than "+c+".":null:"Not a number"},integer:function(a,b,c){return(b=eb.number(a,b,c))?b:!(""+
a).match(/^\s*[\d+]*\s*$/)||a!=Math.round(a)?"Not a whole number":null},date:function(a){var b=(a=/^(\d\d?)\/(\d\d?)\/(\d\d\d\d)$/.exec(a))?new Date(a[3],a[1]-1,a[2]):0;return b&&b.getFullYear()==a[3]&&b.getMonth()==a[1]-1&&b.getDate()==a[2]?null:"Value is not a date. (Expecting format: 12/31/2009)."},email:function(a){return a.match(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/)?null:"Email needs to be in username@host.com format."},phone:function(a){return a.match(/^1\(\d\d\d\)\d\d\d-\d\d\d\d$/)?
null:a.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/)?null:"Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationaly."},url:function(a){return a.match(/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/)?null:"URL needs to be in http://server[:port]/path format."},json:function(a){try{return ga(a),null}catch(b){return b.toString()}},asynchronous:function(a,b,c){if(a){var d=this,e=d.$element,f=e.data("$asyncValidator");
f||e.data("$asyncValidator",f={inputs:{}});f.current=a;var g=f.inputs[a],h=d.$service("$invalidWidgets");g?g.inFlight?h.markInvalid(d.$element):(c||o)(g.response):(f.inputs[a]=g={inFlight:!0},h.markInvalid(d.$element),e.addClass("ng-input-indicator-wait"),b(a,function(b,c){g.response=c;g.error=b;g.inFlight=!1;f.current==a&&(e.removeClass("ng-input-indicator-wait"),h.markValid(e));e.data(mb)();d.$service("$updateView")()}));return g.error}}});E("$cookieStore",function(a){return{get:function(b){return ga(a[b])},
put:function(b,c){a[b]=R(c)},remove:function(b){delete a[b]}}},["$cookies"]);E("$cookies",function(a){var b=this,c={},d={},e,f=!1;a.addPollFn(function(){var g=a.cookies();e!=g&&(e=g,C(g,d),C(g,c),f&&b.$eval())})();f=!0;this.$onEval(99999,function(){var b,e,f;for(b in d)t(c[b])&&a.cookies(b,x);for(b in c)e=c[b],v(e)?e!==d[b]&&(a.cookies(b,e),f=!0):z(d[b])?c[b]=d[b]:delete c[b];if(f)for(b in e=a.cookies(),c)c[b]!==e[b]&&(t(e[b])?delete c[b]:c[b]=e[b])});return c},["$browser"]);E("$defer",function(a,
b,c){return function(d,e){a.defer(function(){try{d()}catch(a){b(a)}finally{c()}},e)}},["$browser","$exceptionHandler","$updateView"]);E("$document",function(a){return m(a.document)},["$window"]);E("$exceptionHandler",function(a){return function(b){a.error(b)}},["$log"]);E("$hover",function(a,b){var c,d,e=m(b[0].body);a.hover(function(a,b){if(b&&(d=a.attr(Da)||a.attr(ya))){c||(c={callout:m('<div id="ng-callout"></div>'),arrow:m("<div></div>"),title:m('<div class="ng-title"></div>'),content:m('<div class="ng-content"></div>')},
c.callout.append(c.arrow),c.callout.append(c.title),c.callout.append(c.content),e.append(c.callout));var h=e[0].getBoundingClientRect(),i=a[0].getBoundingClientRect(),h=h.right-i.right-10;c.title.text(a.hasClass("ng-exception")?"EXCEPTION:":"Validation error...");c.content.text(d);h<300?(c.arrow.addClass("ng-arrow-right"),c.arrow.css({left:"301px"}),c.callout.css({position:"fixed",left:i.left-10-300-4+"px",top:i.top-3+"px",width:"300px"})):(c.arrow.addClass("ng-arrow-left"),c.callout.css({position:"fixed",
left:i.right+10+"px",top:i.top-3+"px",width:"300px"}))}else c&&(c.callout.remove(),c=null)})},["$browser","$document"],!0);E("$invalidWidgets",function(){function a(b){if(b==w.document)return!1;b=b.parentNode;return!b||a(b)}var b=[];b.markValid=function(a){a=Aa(b,a);a!=-1&&b.splice(a,1)};b.markInvalid=function(a){Aa(b,a)===-1&&b.push(a)};b.visible=function(){var a=0;j(b,function(b){a+=rb(b)?1:0});return a};this.$onEval(99999,function(){for(var c=0;c<b.length;){var d=b[c];a(d[0])?(b.splice(c,1),d.dealoc&&
d.dealoc()):c++}});return b});var jd=/^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,kd=/^([^\?]*)?(\?([^\?]*))?$/,jc={http:80,https:443,ftp:21};E("$location",function(a){function b(a){if(v(a)){var b=s,c=i,d={},h=jd.exec(a);if(h)d.href=a.replace(/#$/,""),d.protocol=h[1],d.host=h[3]||"",d.port=h[5]||jc[d.protocol]||null,d.path=h[6]||"",d.search=Ta(h[8]),d.hash=h[10]||"",s(d,g(d.hash));b(c,d)}else{z(a.hash)&&s(a,v(a.hash)?g(a.hash):a.hash);s(i,a);
if(z(a.hashPath||a.hashSearch))i.hash=f(i);i.href=e(i)}}function c(a,c){var d={};v(a)?(d.hashPath=a,d.hashSearch=c||{}):d.hashSearch=a;d.hash=f(d);b({hash:d})}function d(){if(!sa(i,k)){if(i.href==k.href)if(i.hash!=k.hash){var a=g(i.hash);c(a.hashPath,a.hashSearch)}else i.hash=f(i),i.href=e(i);b(i.href)}}function e(a){var b=xb(a.search),c=a.port==jc[a.protocol]?null:a.port;return a.protocol+"://"+a.host+(c?":"+c:"")+a.path+(b?"?"+b:"")+(a.hash?"#"+a.hash:"")}function f(a){var b=xb(a.hashSearch);return escape(a.hashPath).replace(/%21/gi,
"!").replace(/%3A/gi,":").replace(/%24/gi,"$")+(b?"?"+b:"")}function g(a){var b={},c=kd.exec(a);if(c)b.hash=a,b.hashPath=unescape(c[1]||""),b.hashSearch=Ta(c[3]);return b}var h=this,i={update:b,updateHash:c},k={};a.onHashChange(function(){b(a.getUrl());C(i,k);h.$eval()})();this.$onEval(-99999,d);this.$onEval(99999,function(){d();a.getUrl()!=i.href&&(a.setUrl(i.href),C(i,k))});return i},["$browser"]);E("$log",function(a){function b(b){var d=a.console||{},e=d[b]||d.log||o;return e.apply?function(){var a=
[];j(arguments,function(b){a.push(Qa(b))});return e.apply(d,a)}:e}return{log:b("log"),warn:b("warn"),info:b("info"),error:b("error")}},["$window"]);E("$resource",function(a){a=new Fa(a);return G(a,a.route)},["$xhr.cache"]);E("$route",function(a,b){var c={},d=[],e=function(a,b,c){var d="^"+b.replace(/[\.\\\(\)\^\$]/g,"$1")+"$",e=[],f={};j(b.split(/\W/),function(a){if(a){var b=RegExp(":"+a+"([\\W])");d.match(b)&&(d=d.replace(b,"([^/]*)$1"),e.push(a))}});var g=a.match(RegExp(d));g&&(j(e,function(a,b){f[a]=
g[b+1]}),c&&this.$set(c,f));return g?f:null},f=this,g=0,h={routes:c,onChange:function(a){d.push(a);return a},parent:function(a){a&&(f=a)},when:function(a,b){if(t(a))return c;var d=c[a];d||(d=c[a]={});b&&s(d,b);g++;return d},otherwise:function(a){h.when(null,a)},reload:function(){g++}};this.$watch(function(){return g+a.hash},function(){var g,k,l,n,u,A;h.current=null;j(c,function(b,c){if(!l&&(l=e(a.hashPath,c)))k=b});if(k=k||c[null]){if(k.redirectTo){v(k.redirectTo)?(A={hashPath:"",hashSearch:s({},
a.hashSearch,l)},j(k.redirectTo.split(":"),function(b,c){c==0?A.hashPath+=b:(n=b.match(/(\w+)(.*)/),u=n[1],A.hashPath+=l[u]||a.hashSearch[u],A.hashPath+=n[2]||"",delete A.hashSearch[u])})):A={hash:k.redirectTo(l,a.hash,a.hashPath,a.hashSearch)};a.update(A);b();return}g=V(f);h.current=s({},k,{scope:g,params:s({},a.hashSearch,l)})}j(d,f.$tryEval);g&&g.$become(h.current.controller)});return h},["$location","$updateView"]);kb.delay=25;E("$updateView",kb,["$browser"]);E("$window",G(w,ea,w));E("$xhr.bulk",
function(a,b,c){function d(b,c,e,i,k){r(e)&&(k=i,i=e,e=null);var l;j(d.urls,function(a){if(r(a.match)?a.match(c):a.match.exec(c))l=a});if(l){if(!l.requests)l.requests=[];b={method:b,url:c,data:e,success:i};if(k)b.error=k;l.requests.push(b)}else a(b,c,e,i,k)}var e=this;d.urls={};d.flush=function(f,g){j(d.urls,function(d,i){var k=d.requests;if(k&&k.length)d.requests=[],d.callbacks=[],a("POST",i,{requests:k},function(a,d){j(d,function(a,d){try{a.status==200?(k[d].success||o)(a.status,a.response):r(k[d].error)?
k[d].error(a.status,a.response):b(k[d],a)}catch(e){c.error(e)}});(f||o)()},function(a,d){j(k,function(e){try{r(e.error)?e.error(a,d):b(e,d)}catch(f){c.error(f)}});(g||o)()}),e.$eval()})};this.$onEval(99999,d.flush);return d},["$xhr","$xhr.error","$log"]);E("$xhr.cache",function(a,b,c,d){function e(a,h,i,k,l,n,u){r(i)?(r(k)?(u=n,n=l,l=k):(n=k,u=l,l=null),k=i,i=null):r(l)||(u=n,n=l,l=null);if(a=="GET"){var m;if(m=e.data[h])if(u?k(200,C(m.value)):b(function(){k(200,C(m.value))}),!n)return;(n=f[h])?(n.successes.push(k),
n.errors.push(l)):(f[h]={successes:[k],errors:[l]},e.delegate(a,h,i,function(a,b){a==200&&(e.data[h]={value:b});var c=f[h].successes;delete f[h];j(c,function(c){try{(c||o)(a,C(b))}catch(e){d.error(e)}})},function(b,e){var k=f[h].errors,l=f[h].successes;delete f[h];j(k,function(f,k){try{r(f)?f(b,C(e)):c({method:a,url:h,data:i,success:l[k]},{status:b,body:e})}catch(n){d.error(n)}})}))}else e.data={},e.delegate(a,h,i,k,l)}var f={};e.data={};e.delegate=a;return e},["$xhr.bulk","$defer","$xhr.error","$log"]);
E("$xhr.error",function(a){return function(b,c){a.error("ERROR: XHR: "+b.url,b,c)}},["$log"]);E("$xhr",function(a,b,c,d){function e(e,h,i,k,l){r(i)&&(l=k,k=i,i=null);i&&M(i)&&(i=R(i));a.xhr(e,h,i,function(a,f){try{v(f)&&(f.match(/^\)\]\}',\n/)&&(f=f.substr(6)),/^\s*[\[\{]/.exec(f)&&/[\}\]]\s*$/.exec(f)&&(f=ga(f,!0))),200<=a&&a<300?k(a,f):r(l)?l(a,f):b({method:e,url:h,data:i,success:k},{status:a,body:f})}catch(j){c.error(j)}finally{d()}},s({"X-XSRF-TOKEN":a.cookies()["XSRF-TOKEN"]},f.common,f[B(e)]))}
var f={common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/x-www-form-urlencoded"},get:{},head:{},put:{},"delete":{},patch:{}};e.defaults={headers:f};return e},["$browser","$xhr.error","$log","$updateView"]);D("ng:init",function(a){return function(b){this.$tryEval(a,b)}});D("ng:controller",function(a){this.scope(!0);return function(){var b=ua(w,a,!0)||ua(this,a,!0);if(!b)throw"Can not find '"+a+"' controller.";if(!r(b))throw"Reference '"+
a+"' is not a class.";this.$become(b)}});D("ng:eval",function(a){return function(b){this.$onEval(a,b)}});D("ng:bind",function(a,b){b.addClass("ng-binding");return function(b){var d=o,e=o;this.$onEval(function(){var f,g,h,i,k;i=this.hasOwnProperty(ec)?this.$element:x;this.$element=b;g=this.$tryEval(a,function(a){f=Qa(a)});this.$element=i;if(i=g instanceof Ra)g=(h=g).html;if(!(d===g&&e==f)&&(k=g&&(g.nodeName||g.bind&&g.find),!i&&!k&&M(g)&&(g=R(g,!0)),g!=d||f!=e))d=g,e=f,fa(b,Da,f),f&&(g=f),i?b.html(h.get()):
k?(b.html(""),b.append(g)):b.text(g==x?"":g)},b)}});var dc={};D("ng:bind-template",function(a,b){b.addClass("ng-binding");var c=cc(a);return function(a){var b;this.$onEval(function(){var f=c.call(this,a,!0);f!=b&&(a.text(f),b=f)},a)}});var ld={disabled:"disabled",readonly:"readOnly",checked:"checked",selected:"selected",multiple:"multiple"};D("ng:bind-attr",function(a){return function(b){var c={};this.$onEval(function(){var d=this.$eval(a),e;for(e in d){var f=cc(d[e]).call(this,b),g=ld[B(e)];c[e]!==
f&&(c[e]=f,g?(oa(f)?(b.attr(g,g),b.attr("ng-"+g,f)):(b.removeAttr(g),b.removeAttr("ng-"+g)),(b.data(mb)||o)()):b.attr(e,f))}},b)}});D("ng:click",function(a){return Ea("$updateView",function(b,c){var d=this;c.bind("click",function(e){d.$tryEval(a,c);b();e.stopPropagation()})})});D("ng:submit",function(a){return Ea("$updateView",function(b,c){var d=this;c.bind("submit",function(e){d.$tryEval(a,c);b();e.preventDefault()})})});D("ng:class",lb(function(){return!0}));D("ng:class-odd",lb(function(a){return a%
2===0}));D("ng:class-even",lb(function(a){return a%2===1}));D("ng:show",function(a){return function(b){this.$onEval(function(){oa(this.$eval(a))?b.show():b.hide()},b)}});D("ng:hide",function(a){return function(b){this.$onEval(function(){oa(this.$eval(a))?b.hide():b.show()},b)}});D("ng:style",function(a){return function(b){var c=Rc(b);this.$onEval(function(){var d=this.$eval(a)||{},e,f={};for(e in d)c[e]===x&&(c[e]=""),f[e]=d[e];for(e in c)f[e]=f[e]||c[e];b.css(f)},b)}});Sa("{{}}",function(a,b,c){var d=
Ja(a);if(d.length>1||Ka(d[0])!==null)if(sc(c[0]))c.attr("ng:bind-template",a);else{var e=b,f;j(Ja(a),function(a){var b=Ka(a);b?(f=m("<span>"),f.attr("ng:bind",b)):f=m(K.createTextNode(a));ba&&a.charAt(0)==" "&&(f=m("<span>&nbsp;</span>"),b=f.html(),f.text(a.substr(1)),f.html(b+f.html()));e.after(f);e=f});b.remove()}});Sa("option",function(a,b,c){B(ta(c))=="option"&&(ba<=7?pb(c[0].outerHTML,{start:function(b,e){t(e.value)&&c.attr("value",a)}}):c[0].getAttribute("value")==null&&c.attr("value",a))});
var kc={};j("src,href,checked,disabled,multiple,readonly,selected".split(","),function(a){kc["ng:"+a]=a});wb("{{}}",function(a,b,c){if(!D(b)&&!D("@"+b)){ba&&b=="src"&&(a=decodeURI(a));var d=Ja(a);if(d.length>1||Ka(d[0])!==null)c.removeAttr(b),d=ga(c.attr("ng:bind-attr")||"{}"),d[kc[b]||b]=a,c.attr("ng:bind-attr",R(d))}});var J=ra("keydown change",xa,gc,Ma(),!0),Y=ra("click",hc,hc,o),Xc={text:J,textarea:J,hidden:J,password:J,button:Y,submit:Y,reset:Y,image:Y,checkbox:ra("click",fc,function(a,b){var c=
b[0];return{get:function(){return!!c.checked},set:function(a){c.checked=oa(a)}}},Ma(!1)),radio:ra("click",fc,function(a,b){var c=b[0];return{get:function(){return c.checked?c.value:null},set:function(a){c.checked=a==c.value}}},function(a,b,c){var d=a.get(),e=b.get(),c=c[0];c.checked=!1;c.name=this.$id+"@"+c.name;t(d)&&a.set(d=null);d==null&&e!==null&&a.set(e);b.set(d)}),"select-one":ra("change",xa,gc,Ma(null)),"select-multiple":ra("change",xa,function(a,b){var c=b.attr("ng:format")||La,d=ha(c).formatter()();
return{get:function(){var c=[];j(b[0].options,function(b){b.selected&&c.push(d.parse(a,b.value))});return c},set:function(c){var f={};j(c,function(b){f[d.format(a,b)]=!0});j(b[0].options,function(a){a.selected=f[a.value]})}}},Ma([]))};Q("input",Na);Q("textarea",Na);Q("button",Na);var md=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/;Q("select",function(a){this.descend(!0);this.directives(!0);
var b=a.attr("multiple"),c=a.attr("ng:options"),d=N(a.attr("ng:change")||"").fnSelf,e;if(!c)return Na.call(this,a);if(!(e=c.match(md)))throw I("Expected ng:options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+c+"'.");var f=N(e[2]||e[1]).fnSelf,g=e[4]||e[6],h=e[5],i=N(e[3]||"").fnSelf,k=N(e[2]?e[1]:g).fnSelf,l=N(e[7]).fnSelf,n=m(K.createElement("option")),u=m(K.createElement("optgroup")),A=!1;return function(c){var e=[[{element:c,label:""}]],p=this,y=xa(p,a);
j(c.children(),function(a){a.value==""&&(A={label:m(a).text(),id:""})});c.html("");c.bind("change",function(){var a,f=l(p)||[],i=c.val(),j=p.$new(),n,u,m,s,A,r;try{if(b){n=[];s=0;for(r=e.length;s<r;s++){a=e[s];m=1;for(A=a.length;m<A;m++)if((u=a[m].element)[0].selected)h&&(j[h]=i),j[g]=f[u.val()],n.push(k(j))}}else i=="?"?n=x:i==""?n=null:(j[g]=f[i],h&&(j[h]=i),n=k(j));z(n)&&y.get()!==n&&(d(p),y.set(n));p.$tryEval(function(){p.$root.$eval()})}finally{j=null}});p.$onEval(function(){var a={"":[]},d=
[""],j,m,p,r,o;r=p=l(this)||[];var v,z,w,t;v=this.$new();w=y.get();var x=!1;if(b){if(x=new Yb,w&&ka(z=w.length))for(t=0;t<z;t++)x.put(w[t],!0)}else if(w===null||A)a[""].push(s({selected:w===null,id:"",label:""},A)),x=!0;if(h){r=[];for(m in p)p.hasOwnProperty(m)&&r.push(m);r.sort()}for(t=0;z=r.length,t<z;t++){v[g]=p[h?v[h]=r[t]:t];j=i(v)||"";if(!(m=a[j]))m=a[j]=[],d.push(j);b?j=!!x.remove(k(v)):(j=w===k(v),x=x||j);m.push({id:h?r[t]:t,label:f(v)||"",selected:j})}d.sort();!b&&!x&&a[""].unshift({id:"?",
label:"",selected:!0});w=0;for(v=d.length;w<v;w++){j=d[w];m=a[j];if(e.length<=w)e.push(r=[p={element:u.clone().attr("label",j),label:m.label}]),c.append(p.element);else if(r=e[w],p=r[0],p.label!=j)p.element.attr("label",p.label=j);x=null;t=0;for(z=m.length;t<z;t++)if(j=m[t],o=r[t+1]){x=o.element;if(o.label!==j.label)x.text(o.label=j.label);if(o.id!==j.id)x.val(o.id=j.id);o.selected!==j.selected&&x.attr("selected",j.selected)}else(o=n.clone()).val(j.id).attr("selected",j.selected).text(j.label),r.push({element:o,
label:j.label,id:j.id,checked:j.selected}),x?x.after(o):p.element.append(o),x=o;for(t++;r.length>t;)r.pop().element.remove()}for(;e.length>w;)e.pop()[0].element.remove()})}});Q("ng:include",function(a){var b=this,c=a.attr("src"),d=a.attr("scope")||"",e=a[0].getAttribute("onload")||"";if(a[0]["ng:compiled"])this.descend(!0),this.directives(!0);else return a[0]["ng:compiled"]=!0,s(function(a,g){function h(){j++}var i=this,k,j=0,n=!1;this.$watch(c,h);this.$watch(d,h);i.$onEval(function(){if(k&&!n){n=
!0;try{k.$eval()}finally{n=!1}}});this.$watch(function(){return j},function(){var h=this.$eval(c),j=this.$eval(d);h?a("GET",h,null,function(a,c){g.html(c);k=j||V(i);b.compile(g)(k);i.$eval(e)},!1,!0):(k=null,g.html(""))})},{$inject:["$xhr.cache"]})});var nd=Q("ng:switch",function(a){var b=this,c=a.attr("on"),d=a.attr("using")||"equals",e=d.split(":"),f=nd[e.shift()],g=a.attr("change")||"",h=[];if(!f)throw"Using expression '"+d+"' unknown.";if(!c)throw"Missing 'on' attribute.";Bb(a,function(a){var c=
a.attr("ng:switch-when"),d={change:g,element:a,template:b.compile(a)};if(v(c))d.when=function(a,b){var d=[b,c];j(e,function(a){d.push(a)});return f.apply(a,d)},h.unshift(d);else if(v(a.attr("ng:switch-default")))d.when=za(!0),h.push(d)});j(h,function(a){a.element.remove()});a.html("");return function(a){var b=this,d;this.$watch(c,function(c){var e=!1;a.html("");d=V(b);j(h,function(b){!e&&b.when(d,c)&&(e=!0,d.$tryEval(b.change,a),b.template(d,function(b){a.append(b)}))})});b.$onEval(function(){d&&
d.$eval()})}},{equals:function(a,b){return""+a==b}});Q("a",function(){this.descend(!0);this.directives(!0);return function(a){var b=(a.attr("ng:bind-attr")||"").indexOf('"href":')!==-1;!b&&!a.attr("name")&&!a.attr("href")&&a.attr("href","");a.attr("href")===""&&!b&&a.bind("click",function(a){a.preventDefault()})}});Q("@ng:repeat",function(a,b){b.removeAttr("ng:repeat");b.replaceWith(m("<\!-- ng:repeat: "+a+" --\>"));var c=this.compile(b);return function(d){var e=a.match(/^\s*(.+)\s+in\s+(.*)\s*$/),
f,g,h,i;if(!e)throw I("Expected ng:repeat in form of '_item_ in _collection_' but got '"+a+"'.");f=e[1];g=e[2];e=f.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);if(!e)throw I("'item' in 'item in collection' should be identifier or (key, value) but got '"+keyValue+"'.");h=e[3]||e[1];i=e[2];var j=[],l=this;this.$onEval(function(){var a=0,e=j.length,f=d,q=this.$tryEval(g,d),r=sb(q,!0),p=b[0].nodeName!="OPTION"?K.createDocumentFragment():null,s,o,t;for(t in q)if(q.hasOwnProperty(t))a<e?(o=j[a],o[h]=
q[t],i&&(o[i]=t),f=o.$element,o.$position=a==0?"first":a==r-1?"last":"middle",o.$eval()):(o=V(l),o[h]=q[t],i&&(o[i]=t),o.$index=a,o.$position=a==0?"first":a==r-1?"last":"middle",j.push(o),c(o,function(b){b.attr("ng:repeat-index",a);p?(p.appendChild(b[0]),s=!0):(f.after(b),f=b)})),a++;for(s&&f.after(m(p));j.length>a;)j.pop().$element.remove()},d)}});Q("@ng:non-bindable",o);Q("ng:view",function(a){var b=this;if(a[0]["ng:compiled"])this.descend(!0),this.directives(!0);else return a[0]["ng:compiled"]=
!0,Ea("$xhr.cache","$route",function(a,d,e){var f;d.onChange(function(){var g;if(d.current)g=d.current.template,f=d.current.scope;g?a("GET",g,function(a,c){e.html(c);b.compile(e)(f)}):e.html("")})();this.$onEval(function(){f&&f.$eval()})})});var Oa;ab("$browser",function(a){Oa||(Oa=new Ic(w,m(w.document),m(w.document.body),Zc,a),Oa.bind());return Oa},{$inject:["$log"]});s(y,{element:m,compile:ub,scope:V,copy:C,extend:s,equals:sa,forEach:j,injector:Hb,noop:o,bind:G,toJson:R,fromJson:ga,identity:ea,
isUndefined:t,isDefined:z,isString:v,isFunction:r,isObject:M,isNumber:ka,isArray:Z,version:{full:"0.9.18",major:0,minor:9,dot:18,codeName:"jiggling-armfat"}});yb();Wa(K).ready(function(){var a=uc(K),b=K,c=a.autobind;c&&(b=v(c)?b.getElementById(c):b,b=ub(b)(V({$config:a})).$service("$browser"),a.css?b.addCss(a.base_url+a.css):ba<8&&b.addJs(a.ie_compat,a.ie_compat_id))})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";.ng-format-negative{color:red;}.ng-exception{border:2px solid #FF0000;font-family:"Courier New",Courier,monospace;font-size:smaller;white-space:pre;}.ng-validation-error{border:2px solid #FF0000;}#ng-callout{margin:0;padding:0;border:0;outline:0;font-size:13px;font-weight:normal;font-family:Verdana,Arial,Helvetica,sans-serif;vertical-align:baseline;background:transparent;text-decoration:none;}#ng-callout .ng-arrow-left{background-image:url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrSLoc/AG8FeUUIN+sGebWAnbKSJodqqlsOxJtqYooU9vvk+vcJIcTkg+QAAA7");background-repeat:no-repeat;background-position:left top;position:absolute;z-index:101;left:-12px;height:23px;width:10px;top:-3px;}#ng-callout .ng-arrow-right{background-image:url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrCLTcoM29yN6k9socs91e5X3EyJloipYrO4ohTMqA0Fn2XVNswJe+H+SXAAA7");background-repeat:no-repeat;background-position:left top;position:absolute;z-index:101;height:23px;width:11px;top:-2px;}#ng-callout{position:absolute;z-index:100;border:2px solid #CCCCCC;background-color:#fff;}#ng-callout .ng-content{padding:10px 10px 10px 10px;color:#333333;}#ng-callout .ng-title{background-color:#CCCCCC;text-align:left;padding-left:8px;padding-bottom:5px;padding-top:2px;font-weight:bold;}.ng-input-indicator-wait{background-image:url("data:image/png;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==");background-position:right;background-repeat:no-repeat;}</style>');
'use strict';(function(v,K,B){function j(a,b,c){var d;if(a)if(y(a))for(d in a)d!="prototype"&&d!=kc&&d!=lc&&a.hasOwnProperty(d)&&b.call(c,a[d],d);else if(a.forEach&&a.forEach!==j)a.forEach(b,c);else if(M(a)&&ka(a.length))for(d=0;d<a.length;d++)b.call(c,a[d],d);else for(d in a)b.call(c,a[d],d);return a}function Oa(a,b,c){var d=[],e;for(e in a)d.push(e);d.sort();for(e=0;e<d.length;e++)b.call(c,a[d[e]],d[e]);return d}function Pa(a){a instanceof I&&(a.stack?a=a.message&&a.stack.indexOf(a.message)===-1?
"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function mc(){for(var a=T.length,b;a;){a--;b=T[a].charCodeAt(0);if(b==57)return T[a]="A",T.join("");if(b==90)T[a]="0";else return T[a]=String.fromCharCode(b+1),T.join("")}T.unshift("0");return T.join("")}function u(a){j(arguments,function(b){b!==a&&j(b,function(b,d){a[d]=b})});return a}function Qa(a,b){return u(new (u(function(){},{prototype:a})),b)}function w(){}function ea(a){return a}function xa(a){return function(){return a}}
function U(a,b,c){var d;return a[b]||(d=a[b]=function(a,b,g){a=(c||ea)(a);A(b)&&(d[a]=u(b,g||{}));return d[a]})}function t(a){return typeof a==la}function A(a){return typeof a!=la}function M(a){return a!=null&&typeof a==pb}function q(a){return typeof a==nc}function ka(a){return typeof a==oc}function V(a){return a instanceof Array}function y(a){return typeof a==$}function aa(a){return q(a)?a.replace(/^\s*/,"").replace(/\s*$/,""):a}function ba(a){var b={},a=a.split(","),c;for(c=0;c<a.length;c++)b[a[c]]=
!0;return b}function Ra(a,b){this.html=a;this.get=C(b)=="unsafe"?xa(a):function(){var b=[];qb(a,rb(b));return b.join("")}}function pc(a,b,c){var d=[];j(a,function(a,f,g){d.push(b.call(c,a,f,g))});return d}function sb(a,b){var c=0,d;if(V(a)||q(a))return a.length;else if(M(a))for(d in a)(!b||a.hasOwnProperty(d))&&c++;return c}function tb(a,b){for(var c=0;c<a.length;c++)if(b===a[c])return!0;return!1}function ya(a,b){for(var c=0;c<a.length;c++)if(b===a[c])return c;return-1}function qc(a){if(a)switch(a.nodeName){case "OPTION":case "PRE":case "TITLE":return!0}return!1}
function x(a,b){if(b)if(V(a)){for(;b.length;)b.pop();for(var c=0;c<a.length;c++)b.push(x(a[c]))}else for(c in j(b,function(a,c){delete b[c]}),a)b[c]=x(a[c]);else(b=a)&&(V(a)?b=x(a,[]):a instanceof Date?b=new Date(a.getTime()):M(a)&&(b=x(a,{})));return b}function pa(a,b){if(a==b)return!0;if(a===null||b===null)return!1;var c=typeof a,d;if(c==typeof b&&c=="object")if(a instanceof Array){if((c=a.length)==b.length){for(d=0;d<c;d++)if(!pa(a[d],b[d]))return!1;return!0}}else{c={};for(d in a){if(d.charAt(0)!==
"$"&&!y(a[d])&&!pa(a[d],b[d]))return!1;c[d]=!0}for(d in b)if(!c[d]&&d.charAt(0)!=="$"&&!y(b[d]))return!1;return!0}return!1}function rc(a){return(a=a&&a[0]&&a[0].nodeName)&&a.charAt(0)!="#"&&!tb(["TR","COL","COLGROUP","TBODY","THEAD","TFOOT"],a)}function fa(a,b,c){for(var d;!rc(a);)if(d=a.parent(),d.length)a=a.parent();else return;if(a[0].$NG_ERROR!==c)(a[0].$NG_ERROR=c)?(a.addClass(b),a.attr(b,c.message||c)):(a.removeClass(b),a.removeAttr(b))}function G(a,b){var c=arguments.length>2?ma.call(arguments,
2,arguments.length):[];return typeof b==$&&!(b instanceof RegExp)?c.length?function(){return arguments.length?b.apply(a,c.concat(ma.call(arguments,0,arguments.length))):b.apply(a,c)}:function(){return arguments.length?b.apply(a,arguments):b.call(a)}:b}function na(a){a&&a.length!==0?(a=C(""+a),a=!(a=="f"||a=="0"||a=="false"||a=="no"||a=="n"||a=="[]")):a=!1;return a}function ub(a){return(new vb(Sa,wb,D,Q)).compile(a)}function Ta(a){var b={},c,d;j((a||"").split("&"),function(a){a&&(c=a.split("="),d=
unescape(c[0]),b[d]=A(c[1])?unescape(c[1]):!0)});return b}function xb(a){var b=[];j(a,function(a,d){b.push(escape(d)+(a===!0?"":"="+escape(a)))});return b.length?b.join("&"):""}function Ua(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(b?null:/%20/g,"+")}function sc(a,b){yb();for(var c=a.getElementsByTagName("script"),d,b=u({ie_compat_id:"ng-ie-compat"},b),e=0;e<c.length;e++)if(d=(c[e].src||"").match(tc))b.base_url=d[1],
b.ie_compat=d[1]+"angular-ie-compat"+(d[2]||"")+".js",u(b,Ta(d[6])),za(l(c[e]),function(a,c){/^ng:/.exec(c)&&(c=c.substring(3).replace(/-/g,"_"),b[c]=a||!0)});return b}function yb(){(Va=v.jQuery)?(l=Va,u(Va.fn,{scope:zb.scope})):l=Wa;r.element=l}function uc(a,b,c){if(!a)throw new I("Argument '"+(b||"?")+"' is "+(c||"required"));}function R(a,b){var c=[];Xa(c,a,b?"\n ":null,[]);return c.join("")}function ga(a,b){function c(a){if(q(a)&&a.length===Ab)return Ya.toDate(a);else(V(a)||M(a))&&j(a,function(b,
d){a[d]=c(b)});return a}if(!q(a))return a;var d;try{return b&&v.JSON&&v.JSON.parse?(d=JSON.parse(a),c(d)):ha(a,!0).primary()()}catch(e){throw vc("fromJson error: ",a,e),e;}}function Xa(a,b,c,d){if(M(b)){if(b===v){a.push("WINDOW");return}if(b===K){a.push("DOCUMENT");return}if(tb(d,b)){a.push("RECURSION");return}d.push(b)}if(b===null)a.push(Aa);else if(b instanceof RegExp)a.push(r.String.quoteUnicode(b.toString()));else if(y(b))return;else if(typeof b==wc)a.push(""+b);else if(ka(b))isNaN(b)?a.push(Aa):
a.push(""+b);else if(q(b))return a.push(r.String.quoteUnicode(b));else if(M(b))if(V(b)){a.push("[");for(var e=b.length,f=!1,g=0;g<e;g++){var h=b[g];f&&a.push(",");!(h instanceof RegExp)&&(y(h)||t(h))?a.push(Aa):Xa(a,h,c,d);f=!0}a.push("]")}else if(b instanceof Date)a.push(r.String.quoteUnicode(r.Date.toString(b)));else{a.push("{");c&&a.push(c);e=!1;f=c?c+" ":!1;g=[];for(h in b)b.hasOwnProperty(h)&&b[h]!==B&&g.push(h);g.sort();for(h=0;h<g.length;h++){var i=g[h],k=b[i];typeof k!=$&&(e&&(a.push(","),
c&&a.push(c)),a.push(r.String.quote(i)),a.push(":"),Xa(a,k,f,d),e=!0)}a.push("}")}M(b)&&d.pop()}function Za(a){this.paths=[];this.children=[];this.inits=[];this.priority=a;this.newScope=!1}function vb(a,b,c,d){this.markup=a;this.attrMarkup=b;this.directives=c;this.widgets=d}function Bb(a,b){var c,d=a[0].childNodes||[],e;for(c=0;c<d.length;c++){var f=e=d[c];qa(f)=="#text"||b(l(e),c)}}function za(a,b){var c,d=a[0].attributes||[],e,f,g={};for(c=0;c<d.length;c++)e=d[c],f=e.name,e=e.value,W&&f=="href"&&
(e=decodeURIComponent(a[0].getAttribute(f,2))),g[f]=e;Oa(g,b)}function ra(a,b,c){if(!b)return a;for(var d=b.split("."),e,f=a,g=d.length,h=0;h<g;h++){e=d[h];if(!e.match(/^[\$\w][\$\w\d]*$/))throw"Expression '"+b+"' is not a valid expression for accessing variables.";a&&(f=a,a=a[e]);if(t(a)&&e.charAt(0)=="$"){var i=r.Global.typeOf(f);if(e=(i=r[i.charAt(0).toUpperCase()+i.substring(1)])?i[[e.substring(1)]]:B)return a=G(f,e,f)}}return!c&&y(a)?G(f,a):a}function $a(a,b,c){for(var b=b.split("."),d=0;b.length>
1;d++){var e=b.shift(),f=a[e];f||(f={},a[e]=f);a=f}return a[b.shift()]=c}function Cb(a){var b=Db[a];if(b)return b;var c="var l, fn, t;\n";j(a.split("."),function(a){a=Eb[a]?'["'+a+'"]':"."+a;c+="if(!s) return s;\nl=s;\ns=s"+a+';\nif(typeof s=="function" && !(s instanceof RegExp)) s = function(){ return l'+a+".apply(l, arguments); };\n";a.charAt(1)=="$"&&(a=a.substr(2),c+='if(!s) {\n t = angular.Global.typeOf(l);\n fn = (angular[t.charAt(0).toUpperCase() + t.substring(1)]||{})["'+a+'"];\n if (fn) s = function(){ return fn.apply(l, [l].concat(Array.prototype.slice.call(arguments, 0, arguments.length))); };\n}\n')});
c+="return s;";b=Function("s",c);b.toString=function(){return c};return Db[a]=b}function N(a){if(typeof a===$)return a;var b=Fb[a];if(!b)var c=ha(a).statements(),b=Fb[a]=u(function(){return c(this)},{fnSelf:c});return b}function X(a,b,c){function d(){}var a=d.prototype=a||{},e=new d,f={sorted:[]},g,h;u(e,{"this":e,$id:xc++,$parent:a,$bind:G(e,G,e),$get:G(e,ra,e),$set:G(e,$a,e),$eval:function(a){var b=typeof a,c,d,g;if(b==la){a=0;for(b=f.sorted.length;a<b;a++){g=f.sorted[a];d=g.length;for(c=0;c<d;c++)e.$tryEval(g[c].fn,
g[c].handler)}}else if(b===$)return a.call(e);else if(b==="string")return N(a).call(e)},$tryEval:function(a,b){var c=typeof a;try{if(c==$)return a.call(e);else if(c=="string")return N(a).call(e)}catch(d){g&&g.error(d),y(b)?b(d):b?fa(b,Ba,A(d)?Pa(d):d):y(h)&&h(d)}},$watch:function(a,b,c,d){function g(a){var d=f.call(e),i=h;if(a||i!==d)h=d,e.$tryEval(function(){return b.call(e,d,i)},c)}var f=N(a),h=f.call(e),b=N(b);e.$onEval(Gb,g);t(d)&&(d=!0);d&&g(!0)},$onEval:function(a,b,c){ka(a)||(c=b,b=a,a=0);
var d=f[a];if(!d)d=f[a]=[],d.priority=a,f.sorted.push(d),f.sorted.sort(function(a,b){return a.priority-b.priority});d.push({fn:N(b),handler:c})},$become:function(a){if(y(a))e.constructor=a,j(a.prototype,function(a,b){e[b]=G(e,a)}),e.$service.invoke(e,a,ma.call(arguments,1,arguments.length)),y(a.prototype.init)&&e.init()},$new:function(a){var b=X(e);b.$become.apply(e,[a].concat(ma.call(arguments,1,arguments.length)));e.$onEval(b.$eval);return b}});if(!a.$root)e.$root=e,e.$parent=e,(e.$service=Hb(e,
b,c)).eager();g=e.$service("$log");h=e.$service("$exceptionHandler");return e}function Hb(a,b,c){function d(d){if(!(d in c)){var g=b[d];if(!g)throw I("Unknown provider for '"+d+"'.");c[d]=e(a,g)}return c[d]}function e(a,b,c){for(var c=c||[],e=yc(b),k=e.length;k--;)c.unshift(d(e[k]));return b.apply(a,c)}b=b||ab;c=c||{};a=a||{};d.invoke=e;d.eager=function(){j(b,function(a,b){a.$eager&&d(b);if(a.$creation)throw new I("Failed to register service '"+b+"': $creation property is unsupported. Use $eager:true or see release notes.");
})};return d}function Ca(a,b){if(a instanceof Array)return b.$inject=a,b;else{for(var c=0,d=arguments.length-1,e=arguments[d].$inject=[];c<d;c++)e.push(arguments[c]);return arguments[d]}}function E(a,b,c,d){ab(a,b,{$inject:c,$eager:d})}function yc(a){uc(y(a,void 0,"not a function"));if(!a.$inject){var b=a.$inject=[],c=a.toString().replace(zc,"").match(Ac);j(c[1].split(Bc),function(a){a.replace(Cc,function(a,c){b.push(c)})})}return a.$inject}function Dc(a,b){function c(a){return a.indexOf(p)!=-1}function d(){return o+
1<a.length?a.charAt(o+1):!1}function e(a){return"0"<=a&&a<="9"}function f(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function g(a){return a=="-"||a=="+"||e(a)}function h(b,c,d){d=d||o;throw I("Lexer Error: "+b+" at column"+(A(c)?"s "+c+"-"+o+" ["+a.substring(c,d)+"]":" "+d)+" in expression ["+a+"].");}function i(){for(var b="",c=o;o<a.length;){var f=C(a.charAt(o));if(f=="."||e(f))b+=f;else{var i=d();if(f=="e"&&g(i))b+=f;else if(g(f)&&i&&e(i)&&b.charAt(b.length-1)=="e")b+=f;else if(g(f)&&
(!i||!e(i))&&b.charAt(b.length-1)=="e")h("Invalid exponent");else break}o++}b*=1;s.push({index:c,text:b,json:!0,fn:function(){return b}})}function k(){for(var b="",c=o,d;o<a.length;){d=a.charAt(o);if(d=="."||f(d)||e(d))b+=d;else break;o++}d=bb[b];s.push({index:c,text:b,json:d,fn:d||u(Cb(b),{assign:function(a,c){return $a(a,b,c)}})})}function n(b){var c=o;o++;for(var d="",e=b,g=!1;o<a.length;){var f=a.charAt(o);e+=f;if(g)f=="u"?(f=a.substring(o+1,o+5),f.match(/[\da-f]{4}/i)||h("Invalid unicode escape [\\u"+
f+"]"),o+=4,d+=String.fromCharCode(parseInt(f,16))):(g=Ec[f],d+=g?g:f),g=!1;else if(f=="\\")g=!0;else if(f==b){o++;s.push({index:c,text:e,string:d,json:!0,fn:function(){return d.length==m?r.String.toDate(d):d}});return}else d+=f;o++}h("Unterminated quote",c)}for(var m=b?Ab:-1,s=[],z,o=0,j=[],p,O=":";o<a.length;){p=a.charAt(o);if(c("\"'"))n(p);else if(e(p)||c(".")&&e(d()))i();else if(f(p)){if(k(),"{,".indexOf(O)!=-1&&j[0]=="{"&&(z=s[s.length-1]))z.json=z.text.indexOf(".")==-1}else if(c("(){}[].,;:"))s.push({index:o,
text:p,json:":[,".indexOf(O)!=-1&&c("{[")||c("}]:,")}),c("{[")&&j.unshift(p),c("}]")&&j.shift(),o++;else if(p==" "||p=="\r"||p=="\t"||p=="\n"||p=="\u000b"||p=="\u00a0"){o++;continue}else{var L=p+d(),l=bb[p],da=bb[L];da?(s.push({index:o,text:L,fn:da}),o+=2):l?(s.push({index:o,text:p,fn:l,json:"[,:".indexOf(O)!=-1&&c("+-")}),o+=1):h("Unexpected next character ",o,o+1)}O=p}return s}function ha(a,b){function c(a){return function(){var b=a();P.length!==0&&d("is an unexpected token",P[0]);return b}}function d(b,
c){throw I("Syntax Error: Token '"+c.text+"' "+b+" at column "+(c.index+1)+" of the expression ["+a+"] starting at ["+a.substring(c.index)+"].");}function e(){if(P.length===0)throw I("Unexpected end of expression: "+a);return P[0]}function f(a,b,c,d){if(P.length>0){var e=P[0],g=e.text;if(g==a||g==b||g==c||g==d||!a&&!b&&!c&&!d)return e}return!1}function g(a,c,e,g){return(a=f(a,c,e,g))?(b&&!a.json&&d("is not valid json",a),P.shift(),a):!1}function h(a){g(a)||d("is unexpected, expecting ["+a+"]",f())}
function i(a,b){return function(c){return a(c,b(c))}}function k(a,b,c){return function(d){return b(d,a(d),c(d))}}function n(){return q(Y)}function m(){for(var a=s(),b;;)if(b=g("||"))a=k(a,b.fn,s());else return a}function s(){var a=z(),b;if(b=g("&&"))a=k(a,b.fn,s());return a}function z(){var a=o(),b;if(b=g("==","!="))a=k(a,b.fn,z());return a}function o(){var a;a=j();for(var b;b=g("+","-");)a=k(a,b.fn,j());if(b=g("<",">","<=",">="))a=k(a,b.fn,o());return a}function j(){for(var a=p(),b;b=g("*","/","%");)a=
k(a,b.fn,p());return a}function p(){var a;return g("+")?O():(a=g("-"))?k(da,a.fn,p()):(a=g("!"))?i(a.fn,p()):O()}function O(){var a;if(g("("))a=cb(),h(")");else if(g("["))a=L();else if(g("{"))a=l();else{var b=g();(a=b.fn)||d("not a primary expression",b)}for(;b=g("(","[",".");)b.text==="("?a=Jb(a):b.text==="["?a=y(a):b.text==="."?a=Da(a):d("IMPOSSIBLE");return a}function L(){var a=[];if(e().text!="]"){do a.push(ca());while(g(","))}h("]");return function(b){for(var c=[],d=0;d<a.length;d++)c.push(a[d](b));
return c}}function l(){var a=[];if(e().text!="}"){do{var b=g(),b=b.string||b.text;h(":");var c=ca();a.push({key:b,value:c})}while(g(","))}h("}");return function(b){for(var c={},d=0;d<a.length;d++){var e=a[d],g=e.value(b);c[e.key]=g}return c}}var da=xa(0),P=Dc(a,b),ca=function(){var b=m(),c,e;return(e=g("="))?(b.assign||d("implies assignment but ["+a.substring(0,e.index)+"] can not be assigned to",e),c=m(),function(a){return b.assign(a,c(a))}):b},Ib=m,Jb=function(a){var b=[];if(e().text!=")"){do b.push(ca());
while(g(","))}h(")");return function(c){for(var d=[],e=0;e<b.length;e++)d.push(b[e](c));e=a(c)||w;return e.apply?e.apply(c,d):e(d[0],d[1],d[2],d[3],d[4])}},Da=function(a){var b=g().text,c=Cb(b);return u(function(b){return c(a(b))},{assign:function(c,d){return $a(a(c),b,d)}})},y=function(a){var b=ca();h("]");return u(function(c){var d=a(c),c=b(c);return d?d[c]:B},{assign:function(c,d){return a(c)[b(c)]=d}})},cb=function(){for(var a=ca(),b;;)if(b=g("|"))a=k(a,b.fn,n());else return a},r=function(a){for(var b=
g(),c=b.text.split("."),e,f=0;f<c.length;f++)e=c[f],a&&(a=a[e]);typeof a!=$&&d("should be a function",b);return a},q=function(a){for(var b=r(a),c=[];;)if(g(":"))c.push(ca());else{var d=function(a,d){for(var e=[d],g=0;g<c.length;g++)e.push(c[g](a));return b.apply(a,e)};return function(){return d}}};b&&(ca=m,Jb=Da=y=Ib=cb=r=q=function(){d("is not valid json",{text:a,index:0})});return{assignable:c(Ib),primary:c(O),statements:c(function(){for(var a=[];;)if(P.length>0&&!f("}",")",";","]")&&a.push(cb()),
!g(";"))return a.length==1?a[0]:function(b){for(var c,d=0;d<a.length;d++){var e=a[d];e&&(c=e(b))}return c}}),validator:c(function(){return q(db)}),formatter:c(function(){function a(b){return function(a,c){for(var d=[c],g=0;g<e.length;g++)d.push(e[g](a));return b.apply(a,d)}}var b=g(),c=ia[b.text],e=[];for(c||d("is not a valid formatter.",b);;)if(b=g(":"))e.push(ca());else return xa({format:a(c.format),parse:a(c.parse)})}),filter:c(n)}}function Kb(a,b){this.template=a+="#";this.defaults=b||{};var c=
this.urlParams={};j(a.split(/\W/),function(b){b&&a.match(RegExp(":"+b+"\\W"))&&(c[b]=!0)})}function Ea(a){this.xhr=a}function Fc(a,b,c,d,e){function f(a){try{a.apply(null,ma.call(arguments,1))}finally{if(F--,F===0)for(;p.length;)try{p.pop()()}catch(b){e.error(b)}}}function g(a,b){(function Da(){j(O,function(a){a()});L=b(Da,a)})()}var h=this,i=b[0],k=a.location,n=a.setTimeout,m=a.clearTimeout,s={},z;h.isMock=!1;var o=0,F=0,p=[];h.xhr=function(b,e,g,i,n){var k;F++;if(C(b)=="json"){var m=("angular_"+
Math.random()+"_"+o++).replace(/\d\./,"");a[m]=function(b){a[m].data=b};var s=h.addJs(e.replace("JSON_CALLBACK",m),null,function(){a[m].data?f(i,200,a[m].data):f(i);delete a[m];c[0].removeChild(s)})}else{var z=new d;z.open(b,e,!0);j(n,function(a,b){a&&z.setRequestHeader(b,a)});z.onreadystatechange=function(){z.readyState==4&&f(i,z.status==1223?204:z.status||200,z.responseText,function(a){return(a=C(a))?k?k[a]||null:z.getResponseHeader(a):(k={},j(z.getAllResponseHeaders().split("\n"),function(a){var b=
a.indexOf(":"),c=C(aa(a.substr(0,b))),a=aa(a.substr(b+1));k[c]?k[c]+=", "+a:k[c]=a}),k)})};z.send(g||"")}};h.notifyWhenNoOutstandingRequests=function(a){j(O,function(a){a()});F===0?a():p.push(a)};var O=[],L;h.addPollFn=function(a){t(L)&&g(100,n);O.push(a);return a};h.setUrl=function(a){var b=z;b.match(/#/)||(b+="#");a.match(/#/)||(a+="#");if(b!=a)k.href=a};h.getUrl=function(){return z=k.href};h.onHashChange=function(b){var c=a.document.documentMode;if("onhashchange"in a&&(t(c)||c>=8))l(a).bind("hashchange",
b);else{var d=h.getUrl();h.addPollFn(function(){d!=h.getUrl()&&(b(),d=h.getUrl())})}return b};var u={},da="";h.cookies=function(a,b){var c,d,g,f;if(a)if(b===B)i.cookie=escape(a)+"=;expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(q(b))i.cookie=escape(a)+"="+escape(b),c=a.length+b.length+1,c>4096&&e.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+c+" > 4096 bytes)!"),u.length>20&&e.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+
u.length+" > 20 )")}else{if(i.cookie!==da){da=i.cookie;c=da.split("; ");u={};for(g=0;g<c.length;g++)d=c[g],f=d.indexOf("="),f>0&&(u[unescape(d.substring(0,f))]=unescape(d.substring(f+1)))}return u}};h.defer=function(a,b){var c;F++;c=n(function(){delete s[c];f(a)},b||0);s[c]=!0;return c};h.defer.cancel=function(a){if(s[a])return delete s[a],m(a),f(w),!0};var P=w;h.hover=function(a){P=a};h.bind=function(){b.bind("mouseover",function(a){P(l(W?a.srcElement:a.target),!0);return!0});b.bind("mouseleave mouseout click dblclick keypress keyup",
function(a){P(l(a.target),!1);return!0})};h.addCss=function(a){var b=l(i.createElement("link"));b.attr("rel","stylesheet");b.attr("type","text/css");b.attr("href",a);c.append(b)};h.addJs=function(a,b,d){var e=i.createElement("script");e.type="text/javascript";e.src=a;if(b)e.id=b;if(W)e.onreadystatechange=function(){/loaded|complete/.test(e.readyState)&&d&&d()};else if(d)e.onload=e.onerror=d;c[0].appendChild(e);return e}}function qb(a,b){function c(a,c,e,f){c=C(c);if(Lb[c])for(;g.last()&&Mb[g.last()];)d("",
g.last());Nb[c]&&g.last()==c&&d("",c);(f=Ob[c]||!!f)||g.push(c);var h={};e.replace(Gc,function(a,b,c,d,e){h[b]=eb(c||d||e||"")});b.start&&b.start(c,h,f)}function d(a,c){var d=0,e;if(c=C(c))for(d=g.length-1;d>=0;d--)if(g[d]==c)break;if(d>=0){for(e=g.length-1;e>=d;e--)b.end&&b.end(g[e]);g.length=d}}var e,f,g=[],h=a;for(g.last=function(){return g[g.length-1]};a;){f=!0;if(!g.last()||!Pb[g.last()]){if(a.indexOf("<\!--")===0)e=a.indexOf("--\>"),e>=0&&(b.comment&&b.comment(a.substring(4,e)),a=a.substring(e+
3),f=!1);else if(Hc.test(a)){if(e=a.match(Qb))a=a.substring(e[0].length),e[0].replace(Qb,d),f=!1}else if(Ic.test(a)&&(e=a.match(Rb)))a=a.substring(e[0].length),e[0].replace(Rb,c),f=!1;f&&(e=a.indexOf("<"),f=e<0?a:a.substring(0,e),a=e<0?"":a.substring(e),b.chars&&b.chars(eb(f)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+g.last()+"[^>]*>","i"),function(a,c){c=c.replace(Jc,"$1").replace(Kc,"$1");b.chars&&b.chars(eb(c));return""}),d("",g.last());if(a==h)throw"Parse Error: "+a;h=a}d()}function eb(a){fb.innerHTML=
a.replace(/</g,"&lt;");return fb.innerText||fb.textContent||""}function Sb(a){return a.replace(/&/g,"&amp;").replace(Lc,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function rb(a){var b=!1,c=G(a,a.push);return{start:function(a,e,f){a=C(a);!b&&Pb[a]&&(b=a);!b&&Tb[a]==!0&&(c("<"),c(a),j(e,function(a,b){var d=C(b);if(Mc[d]==!0&&(Ub[d]!==!0||a.match(Nc)))c(" "),c(b),c('="'),c(Sb(a)),c('"')}),c(f?"/>":">"))},end:function(a){a=C(a);!b&&Tb[a]==!0&&(c("</"),c(a),
c(">"));a==b&&(b=!1)},chars:function(a){b||c(Sb(a))}}}function Oc(a){var b={},a=a[0].style,c,d;if(typeof a.length=="number")for(c=0;c<a.length;c++)d=a[c],b[d]=a[d];else for(d in a)c=a[d],1*d!=d&&d!="cssText"&&c&&typeof c=="string"&&c!="false"&&(b[d]=c);return b}function Wa(a){if(q(a)&&a.charAt(0)!="<")throw new I("selectors not implemented");return new Z(a)}function Z(a){if(a instanceof Z)return a;else if(q(a)){var b=K.createElement("div");b.innerHTML="<div>&nbsp;</div>"+a;b.removeChild(b.firstChild);
gb(this,b.childNodes);this.remove()}else gb(this,a)}function sa(a){Vb(a);for(var b=0,a=a.childNodes||[];b<a.length;b++)sa(a[b])}function Vb(a){var b=a[Fa],c=Ga[b];c&&(j(c.bind||{},function(b,c){Pc(a,c,b)}),delete Ga[b],a[Fa]=B)}function hb(a,b,c){var d=a[Fa],d=Ga[d||-1];if(A(c))d||(a[Fa]=d=Qc++,d=Ga[d]={}),d[b]=c;else return d?d[b]:null}function ib(a,b){var c;return(" "+a.className+" ").replace(/[\n\t]/g," ").indexOf(" "+b+" ")>-1}function Wb(a,b){a.className=aa((" "+a.className+" ").replace(/[\n\t]/g,
" ").replace(" "+b+" ",""))}function Xb(a,b){if(!ib(a,b))a.className=aa(a.className+" "+b)}function gb(a,b){if(b)for(var b=!b.nodeName&&A(b.length)&&(!b||!b.document||!b.location||!b.alert||!b.setInterval)?b:[b],c=0;c<b.length;c++)a.push(b[c])}function jb(a){var b=typeof a,c=a;if(b=="object")if(typeof(c=a.$hashKey)=="function")c=a.$hashKey();else if(c===B)c=a.$hashKey=mc();return b+":"+c}function Yb(){}function ja(a,b){r[a]=r[a]||{};j(b,function(b){u(r[a],b)})}function Zb(a,b,c){var d=a<0,c=ta.PATTERNS[c||
0],a=Math.abs(a),e=a+"",f="",g=[];if(e.indexOf("e")!==-1)f=e;else{e=(e.split($b)[1]||"").length;t(b)&&(b=Math.min(Math.max(c[1],e),c[2]));var e=Math.pow(10,b),a=Math.round(a*e)/e,a=(""+a).split($b),e=a[0],a=a[1]||"",h=0,i=c[8],k=c[7];if(e.length>=i+k)for(var h=e.length-i,n=0;n<h;n++)(h-n)%k===0&&n!==0&&(f+=ta.GROUP_SEP),f+=e.charAt(n);for(n=h;n<e.length;n++)(e.length-n)%i===0&&n!==0&&(f+=ta.GROUP_SEP),f+=e.charAt(n);for(;a.length<b;)a+="0";b&&(f+=ta.DECIMAL_SEP+a.substr(0,b))}g.push(d?c[5]:c[3]);
g.push(f);g.push(d?c[6]:c[4]);return g.join("")}function S(a,b,c){var d="";a<0&&(d="-",a=-a);for(a=""+a;a.length<b;)a="0"+a;c&&(a=a.substr(a.length-b));return d+a}function H(a,b,c,d){return function(e){e=e["get"+a]();if(c>0||e>-c)e+=c;e===0&&c==-12&&(e=12);return S(e,b,d)}}function Ha(a,b){return function(c){c=c["get"+a]();c=a=="Month"?Rc[c]:Sc[c];return b?c.substr(0,3):c}}function ac(a){return function(b){var c;return a||!(c=Tc.exec(b.toString()))?(b=b.getTimezoneOffset(),S(b/60,2)+S(Math.abs(b%
60),2)):c[0]}}function oa(a,b){return{format:a,parse:b||a}}function bc(a){return A(a)&&a!==null?""+a:a}function kb(a){function b(){d=!1;c.$eval()}var c=this,d;return a.isMock?b:function(){d||(d=!0,a.defer(b,kb.delay))}}function cc(a){var b=dc[a];if(!b){var c=[];j(Ia(a),function(a){var b=Ja(a);c.push(b?function(a){var c,d=this.$tryEval(b,function(a){c=R(a)});fa(a,Ba,c);return c?c:d}:function(){return a})});dc[a]=b=function(a,b){var f=[],g=this.hasOwnProperty(ec)?this.$element:B;this.$element=a;for(var h=
0;h<c.length;h++){var i=c[h].call(this,a);i&&(i.nodeName||i.bind&&i.find)?i="":M(i)&&(i=R(i,b));f.push(i)}this.$element=g;return f.join("")}}return b}function lb(a){return function(b,c){var d=c[0].className+" ";return function(c){this.$onEval(function(){if(a(this.$index)){var f=this.$eval(c.attr("ng:class")||"");V(f)&&(f=f.join(" "));var g=this.$eval(b);V(g)&&(g=g.join(" "));f&&f!==g&&(g=g+" "+f);c[0].className=aa(d+g)}},c)}}}function Ia(a){for(var b=[],c=0,d;(d=a.indexOf("{{",c))>-1;)c<d&&b.push(a.substr(c,
d-c)),c=d,d=a.indexOf("}}",d),d=d<0?a.length:d+2,b.push(a.substr(c,d-c)),c=d;c!=a.length&&b.push(a.substr(c,a.length-c));return b.length===0?[a]:b}function Ja(a){return(a=a.replace(/\n/gm," ").match(/^\{\{(.*)\}\}$/))?a[1]:null}function ua(a,b){var c=b.attr("name"),d,e;if(c){d=ha(c).assignable();e=d.assign;if(!e)throw new I("Expression '"+c+"' is not assignable.");return{get:function(){return d(a)},set:function(c){if(c!==B)return a.$tryEval(function(){e(a,c)},b)}}}}function fc(a,b){var c=ua(a,b),
d=b.attr("ng:format")||Ka,e=ha(d).formatter()();if(c)return{get:function(){return e.format(a,c.get())},set:function(b){return c.set(e.parse(a,b))}}}function gc(a,b){function c(){var c=aa(b.val());if(b[0].disabled||b[0].readOnly)fa(b,va,null),m.markValid(b);else{var d=Qa(a,{$element:b}),c=n&&!c?"Required":c?e(d,c):null;fa(b,va,c);(k=c)?m.markInvalid(b):m.markValid(b)}}var d=b.attr("ng:validate")||Ka,e=ha(d).validator()(),f=b.attr("ng:required"),g=b.attr("ng:format")||Ka,g=ha(g).formatter()(),h,i,k,
n,m=a.$service("$invalidWidgets")||{markValid:w,markInvalid:w};if(!e)throw"Validator named '"+d+"' not found.";h=g.format;i=g.parse;f?a.$watch(f,function(a){n=a;c()}):n=f==="";b.data(mb,c);return{get:function(){k&&fa(b,va,null);try{var d=i(a,b.val());c();return d}catch(e){k=e,fa(b,va,e)}},set:function(d){var e=b.val(),d=h(a,d);e!=d&&b.val(d||"");c()}}}function La(a){return function(b,c){var d=c.get();!d&&A(a)&&(d=x(a));t(b.get())&&A(d)&&b.set(d)}}function wa(a,b,c,d,e){return Ca("$updateView","$defer",
function(f,g,h){var i=this,k=b(i,h),n=c(i,h),m=h.attr("ng:change")||"",s;k&&(d.call(i,k,n,h),this.$eval(h.attr("ng:init")||""),h.bind(a,function(a){function b(){var a=n.get();if(!e||a!=s)k.set(a),s=k.get(),i.$tryEval(m,h),f()}a.type=="keydown"?g(b):b()}),i.$watch(k.get,function(a){s!==a&&n.set(s=a)}))})}function nb(a){this.directives(!0);this.descend(!0);return Uc[C(a[0].type)]||w}if(typeof K.getAttribute==la)K.getAttribute=function(){};var C=function(a){return q(a)?a.toLowerCase():a},ob=function(a){return q(a)?
a.toUpperCase():a},ec="$element",mb="$validate",wc="boolean",$="function",kc="length",lc="name",Aa="null",oc="number",pb="object",nc="string",la="undefined",Ba="ng-exception",va="ng-validation-error",Ka="noop",Gb=-1E3,Vc={FIRST:-99999,LAST:99999,WATCH:Gb},I=v.Error,W=parseInt((/msie (\d+)/.exec(C(navigator.userAgent))||[])[1],10),l,Va,ma=[].slice,J=[].push,vc=v.console?G(v.console,v.console.error||w):w,r=v.angular||(v.angular={}),Sa=U(r,"markup"),wb=U(r,"attrMarkup"),D=U(r,"directive"),Q=U(r,"widget",
C),db=U(r,"validator"),Y=U(r,"filter"),ia=U(r,"formatter"),ab=U(r,"service");U(r,"callbacks");var qa,tc=/^(|.*\/)angular(-.*?)?(\.min)?.js(\?[^#]*)?(#(.*))?$/,T=["0","0","0"],Ab=24;qa=W<9?function(a){a=a.nodeName?a:a[0];return a.scopeName&&a.scopeName!="HTML"?ob(a.scopeName+":"+a.nodeName):a.nodeName}:function(a){return a.nodeName?a.nodeName:a[0].nodeName};r.toJson=R;r.fromJson=ga;Za.prototype={attach:function(a,b){var c={};this.collectInits(a,c,b);Oa(c,function(a){j(a,function(a){a()})})},collectInits:function(a,
b,c){var d=b[this.priority],e=c;d||(b[this.priority]=d=[]);this.newScope&&(e=X(c),c.$onEval(e.$eval),a.data("$scope",e));j(this.inits,function(b){d.push(function(){e.$tryEval(function(){return e.$service.invoke(e,b,[a])},a)})});for(var f=a[0].childNodes,g=this.children,h=this.paths,i=h.length,c=0;c<i;c++)g[c].collectInits(l(f[h[c]]),b,e)},addInit:function(a){if(a){if(!a.$inject)a.$inject=[];this.inits.push(a)}},addChild:function(a,b){b&&(this.paths.push(a),this.children.push(b))},empty:function(){return this.inits.length===
0&&this.paths.length===0}};vb.prototype={compile:function(a){var a=l(a),b=0,c,d=a.parent();if(a.length>1)throw I("Cannot compile multiple element roots: "+l("<div>").append(a.clone()).html());if(d&&d[0])for(var d=d[0],e=0;e<d.childNodes.length;e++)d.childNodes[e]==a[0]&&(b=e);c=this.templatize(a,b,0)||new Za;return function(b,d){var e=d?zb.clone.call(a):a,b=b||X();e.data("$scope",b);b.$element=e;(d||w)(e,b);c.attach(e,b);b.$eval();return b}},templatize:function(a,b,c){var d=this,e,f,g=d.directives,
h=!0,i=!0,k=qa(a),n=k.indexOf(":")>0?C(k).replace(":","-"):"",m,s={compile:G(d,d.compile),descend:function(a){A(a)&&(h=a);return h},directives:function(a){A(a)&&(i=a);return i},scope:function(a){if(A(a))m.newScope=m.newScope||a;return m.newScope}};try{c=a.attr("ng:eval-order")||c||0}catch(z){c=c||0}a.addClass(n);q(c)&&(c=Vc[ob(c)]||parseInt(c,10));m=new Za(c);za(a,function(b,c){if(!e&&(e=d.widgets("@"+c)))a.addClass("ng-attr-widget"),e=G(s,e,b,a)});if(!e&&(e=d.widgets(k)))n&&a.addClass("ng-widget"),
e=G(s,e,a);e&&(i=h=!1,k=a.parent(),m.addInit(e.call(s,a)),k&&k[0]&&(a=l(k[0].childNodes[b])));if(h)for(var o=0,F=a[0].childNodes;o<F.length;o++)qa(F[o])=="#text"&&j(d.markup,function(b){if(o<F.length){var c=l(F[o]);b.call(s,c.text(),c,a)}});i&&(za(a,function(b,c){j(d.attrMarkup,function(d){d.call(s,b,c,a)})}),za(a,function(b,c){if(f=g[c])a.addClass("ng-directive"),m.addInit(g[c].call(s,b,a))}));h&&Bb(a,function(a,b){m.addChild(b,d.templatize(a,b,c))});return m.empty()?null:m}};var xc=0,Db={},Fb={},
Eb={};j("abstract,boolean,break,byte,case,catch,char,class,const,continue,debugger,default,delete,do,double,else,enum,export,extends,false,final,finally,float,for,function,goto,if,implements,import,ininstanceof,intinterface,long,native,new,null,package,private,protected,public,return,short,static,super,switch,synchronized,this,throw,throws,transient,true,try,typeof,var,volatile,void,undefined,while,with".split(/,/),function(a){Eb[a]=!0});var Ac=/^function\s*[^\(]*\(([^\)]*)\)/m,Bc=/,/,Cc=/^\s*(.+?)\s*$/,
zc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,bb={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},$undefined:w,"+":function(a,b,c){return(A(b)?b:0)+(A(c)?c:0)},"-":function(a,b,c){return(A(b)?b:0)-(A(c)?c:0)},"*":function(a,b,c){return b*c},"/":function(a,b,c){return b/c},"%":function(a,b,c){return b%c},"^":function(a,b,c){return b^c},"=":w,"==":function(a,b,c){return b==c},"!=":function(a,b,c){return b!=c},"<":function(a,b,c){return b<c},">":function(a,b,c){return b>
c},"<=":function(a,b,c){return b<=c},">=":function(a,b,c){return b>=c},"&&":function(a,b,c){return b&&c},"||":function(a,b,c){return b||c},"&":function(a,b,c){return b&c},"|":function(a,b,c){return c(a,b)},"!":function(a,b){return!b}},Ec={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'};Kb.prototype={url:function(a){var b=this,c=this.template,d,a=a||{};j(this.urlParams,function(e,g){d=Ua(a[g]||b.defaults[g]||"",!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+");c=c.replace(RegExp(":"+
g+"(\\W)"),d+"$1")});var c=c.replace(/\/?#$/,""),e=[];Oa(a,function(a,c){b.urlParams[c]||e.push(Ua(c)+"="+Ua(a))});c=c.replace(/\/*$/,"");return c+(e.length?"?"+e.join("&"):"")}};Ea.DEFAULT_ACTIONS={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}};Ea.prototype={route:function(a,b,c){function d(a){var c={};j(b||{},function(b,d){c[d]=b.charAt&&b.charAt(0)=="@"?ra(a,b.substr(1)):b});return c}function e(a){x(a||{},this)}var f=
this,g=new Kb(a),c=u({},Ea.DEFAULT_ACTIONS,c);j(c,function(h,i){var k=h.method=="POST"||h.method=="PUT";e[i]=function(a,b,c,i){var o={},F,p=w,l=null;switch(arguments.length){case 4:l=i,p=c;case 3:case 2:if(y(b)){if(y(a)){p=a;l=b;break}p=b;l=c}else{o=a;F=b;p=c;break}case 1:y(a)?p=a:k?F=a:o=a;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments.";}var L=this instanceof e?this:h.isArray?[]:new e(F);f.xhr(h.method,g.url(u({},
h.params||{},d(F),o)),F,function(a,b,c){if(b)h.isArray?(L.length=0,j(b,function(a){L.push(new e(a))})):x(b,L);(p||w)(L,c)},l||h.verifyCache,h.verifyCache);return L};e.bind=function(d){return f.route(a,u({},b,d),c)};e.prototype["$"+i]=function(a,b,c){var g=d(this),f=w,h;switch(arguments.length){case 3:g=a;f=b;h=c;break;case 2:case 1:y(a)?(f=a,h=b):(g=a,f=b||w);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments.";}e[i].call(this,g,
k?this:B,f,h)}});return e}};var Wc=v.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(b){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(c){}throw new I("This browser does not support XMLHttpRequest.");},Rb=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,Qb=/^<\s*\/\s*([\w:-]+)[^>]*>/,Gc=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
Ic=/^</,Hc=/^<\s*\//,Jc=/<\!--(.*?)--\>/g,Kc=/<!\[CDATA\[(.*?)]]\>/g,Nc=/^((ftp|https?):\/\/|mailto:|#)/,Lc=/([^\#-~| |!])/g,Ob=ba("area,br,col,hr,img"),Lb=ba("address,blockquote,center,dd,del,dir,div,dl,dt,hr,ins,li,map,menu,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul"),Mb=ba("a,abbr,acronym,b,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,q,s,samp,small,span,strike,strong,sub,sup,tt,u,var"),Nb=ba("colgroup,dd,dt,li,p,td,tfoot,th,thead,tr"),Pb=ba("script,style"),Tb=u({},Ob,
Lb,Mb,Nb),Ub=ba("background,href,longdesc,src,usemap"),Mc=u({},Ub,ba("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,span,start,summary,target,title,type,valign,value,vspace,width")),fb=K.createElement("pre"),Ga={},Fa="ng-"+(new Date).getTime(),Qc=1,Xc=v.document.addEventListener?function(a,b,c){a.addEventListener(b,c,
!1)}:function(a,b,c){a.attachEvent("on"+b,c)},Pc=v.document.removeEventListener?function(a,b,c){a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent("on"+b,c)},zb=Z.prototype={ready:function(a){function b(){c||(c=!0,a())}var c=!1;this.bind("DOMContentLoaded",b);Wa(v).bind("load",b)},toString:function(){var a=[];j(this,function(b){a.push(""+b)});return"["+a.join(", ")+"]"},eq:function(a){return a>=0?l(this[a]):l(this[this.length+a])},length:0,push:J,sort:[].sort,splice:[].splice},Yc=ba("multiple,selected,checked,disabled,readonly");
j({data:hb,scope:function(a){for(var b;a&&!(b=l(a).data("$scope"));)a=a.parentNode;return b},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:ib,css:function(a,b,c){if(A(c))a.style[b]=c;else return a.style[b]},attr:function(a,b,c){if(Yc[b])if(A(c))a[b]=!!c;else return a[b];else if(A(c))a.setAttribute(b,c);else if(a.getAttribute)return a=a.getAttribute(b,2),a===null?B:a},text:u(W<9?function(a,b){if(a.nodeType==3){if(t(b))return a.nodeValue;a.nodeValue=b}else{if(t(b))return a.innerText;a.innerText=
b}}:function(a,b){if(t(b))return a.textContent;a.textContent=b},{$dv:""}),val:function(a,b){if(t(b))return a.value;a.value=b},html:function(a,b){if(t(b))return a.innerHTML;for(var c=0,d=a.childNodes;c<d.length;c++)sa(d[c]);a.innerHTML=b}},function(a,b){Z.prototype[b]=function(b,d){var e,f;if((a.length==2?b:d)===B)if(M(b)){for(e=0;e<this.length;e++)for(f in b)a(this[e],f,b[f]);return this}else{if(this.length)return a(this[0],b,d)}else{for(e=0;e<this.length;e++)a(this[e],b,d);return this}return a.$dv}});
j({removeData:Vb,dealoc:sa,bind:function(a,b,c){var d=hb(a,"bind");d||hb(a,"bind",d={});j(b.split(" "),function(b){var f=d[b];if(!f)d[b]=f=function(b){if(!b.preventDefault)b.preventDefault=function(){b.returnValue=!1};if(!b.stopPropagation)b.stopPropagation=function(){b.cancelBubble=!0};if(!b.target)b.target=b.srcElement||K;j(f.fns,function(c){c.call(a,b)})},f.fns=[],Xc(a,b,f);f.fns.push(c)})},replaceWith:function(a,b){var c,d=a.parentNode;sa(a);j(new Z(b),function(b){c?d.insertBefore(b,c.nextSibling):
d.replaceChild(b,a);c=b})},children:function(a){var b=[];j(a.childNodes,function(a){a.nodeName!="#text"&&b.push(a)});return b},append:function(a,b){j(new Z(b),function(b){a.nodeType===1&&a.appendChild(b)})},prepend:function(a,b){if(a.nodeType===1){var c=a.firstChild;j(new Z(b),function(b){c?a.insertBefore(b,c):(a.appendChild(b),c=b)})}},remove:function(a){sa(a);var b=a.parentNode;b&&b.removeChild(a)},after:function(a,b){var c=a,d=a.parentNode;j(new Z(b),function(a){d.insertBefore(a,c.nextSibling);
c=a})},addClass:Xb,removeClass:Wb,toggleClass:function(a,b,c){t(c)&&(c=!ib(a,b));(c?Xb:Wb)(a,b)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){return a.nextSibling},find:function(a,b){return a.getElementsByTagName(b)},clone:function(a){return a.cloneNode(!0)}},function(a,b){Z.prototype[b]=function(b,d){for(var e,f=0;f<this.length;f++)e==B?(e=a(this[f],b,d),e!==B&&(e=l(e))):gb(e,a(this[f],b,d));return e==B?this:e}});var J={typeOf:function(a){if(a===null)return Aa;
var b=typeof a;if(b==pb){if(a instanceof Array)return"array";if(a instanceof Date)return"date";if(a.nodeType==1)return"element"}return b}},Ma={copy:x,size:sb,equals:pa},Zc={extend:u},$c={indexOf:ya,sum:function(a,b){for(var c=r.Function.compile(b),d=0,e=0;e<a.length;e++){var f=1*c(a[e]);isNaN(f)||(d+=f)}return d},remove:function(a,b){var c=ya(a,b);c>=0&&a.splice(c,1);return b},filter:function(a,b){var c=[];c.check=function(a){for(var b=0;b<c.length;b++)if(!c[b](a))return!1;return!0};var d=function(a,
b){if(b.charAt(0)==="!")return!d(a,b.substr(1));switch(typeof a){case "boolean":case "number":case "string":return(""+a).toLowerCase().indexOf(b)>-1;case "object":for(var c in a)if(c.charAt(0)!=="$"&&d(a[c],b))return!0;return!1;case "array":for(c=0;c<a.length;c++)if(d(a[c],b))return!0;return!1;default:return!1}};switch(typeof b){case "boolean":case "number":case "string":b={$:b};case "object":for(var e in b)e=="$"?function(){var a=(""+b[e]).toLowerCase();a&&c.push(function(b){return d(b,a)})}():function(){var a=
e,g=(""+b[e]).toLowerCase();g&&c.push(function(b){return d(ra(b,a),g)})}();break;case $:c.push(b);break;default:return a}for(var f=[],g=0;g<a.length;g++){var h=a[g];c.check(h)&&f.push(h)}return f},add:function(a,b){a.push(t(b)?{}:b);return a},count:function(a,b){if(!b)return a.length;var c=r.Function.compile(b),d=0;j(a,function(a){c(a)&&d++});return d},orderBy:function(a,b,c){function d(a,b){return na(b)?function(b,c){return a(c,b)}:a}if(!b)return a;for(var b=V(b)?b:[b],b=pc(b,function(a){var b=!1,
c=a||ea;if(q(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")b=a.charAt(0)=="-",a=a.substring(1);c=N(a).fnSelf}return d(function(a,b){var d;d=c(a);var e=c(b),g=typeof d,f=typeof e;g==f?(g=="string"&&(d=d.toLowerCase()),g=="string"&&(e=e.toLowerCase()),d=d===e?0:d<e?-1:1):d=g<f?-1:1;return d},b)}),e=[],f=0;f<a.length;f++)e.push(a[f]);return e.sort(d(function(a,c){for(var d=0;d<b.length;d++){var e=b[d](a,c);if(e!==0)return e}return 0},c))},limitTo:function(a,b){var b=parseInt(b,10),c=[],d,e;b>0?(d=0,e=b):
(d=a.length+b,e=a.length);for(;d<e;d++)c.push(a[d]);return c}},ad=/^(\d{4})-(\d\d)-(\d\d)(?:T(\d\d)(?:\:(\d\d)(?:\:(\d\d)(?:\.(\d{3}))?)?)?Z)?$/,Ya={quote:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v")+'"'},quoteUnicode:function(a){for(var a=r.String.quote(a),b=[],c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b.push(a.charAt(c)):(d="000"+d.toString(16),b.push("\\u"+d.substring(d.length-
4)))}return b.join("")},toDate:function(a){var b;if(q(a)&&(b=a.match(ad)))a=new Date(0),a.setUTCFullYear(b[1],b[2]-1,b[3]),a.setUTCHours(b[4]||0,b[5]||0,b[6]||0,b[7]||0);return a}},hc={toString:function(a){if(!a)return a;var b=a.toISOString?a.toISOString():"";return b.length==24?b:S(a.getUTCFullYear(),4)+"-"+S(a.getUTCMonth()+1,2)+"-"+S(a.getUTCDate(),2)+"T"+S(a.getUTCHours(),2)+":"+S(a.getUTCMinutes(),2)+":"+S(a.getUTCSeconds(),2)+"."+S(a.getUTCMilliseconds(),3)+"Z"}};Yb.prototype={put:function(a,
b){var c=jb(a),d=this[c];this[c]=b;return d},get:function(a){return this[jb(a)]},remove:function(a){var a=jb(a),b=this[a];delete this[a];return b}};ja("Global",[J]);ja("Collection",[J,Ma]);ja("Array",[J,Ma,$c]);ja("Object",[J,Ma,Zc]);ja("String",[J,Ya]);ja("Date",[J,hc]);r.Date.toString=hc.toString;ja("Function",[J,Ma,{compile:function(a){return y(a)?a:a?N(a).fnSelf:ea}}]);Y.currency=function(a,b){this.$element.toggleClass("ng-format-negative",a<0);if(t(b))b=ta.CURRENCY_SYM;return Zb(a,2,1).replace(/\u00A4/g,
b)};var ta={DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[[1,0,3,"","","-","",3,3],[1,2,2,"\u00a4","","(\u00a4",")",3,3]],CURRENCY_SYM:"$"},$b=".";Y.number=function(a,b){return isNaN(a)||!isFinite(a)?"":Zb(a,b,0)};var Sc="Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),Rc="January,February,March,April,May,June,July,August,September,October,November,December".split(","),bd={yyyy:H("FullYear",4),yy:H("FullYear",2,0,!0),y:H("FullYear",1),MMMM:Ha("Month"),MMM:Ha("Month",!0),MM:H("Month",
2,1),M:H("Month",1,1),dd:H("Date",2),d:H("Date",1),HH:H("Hours",2),H:H("Hours",1),hh:H("Hours",2,-12),h:H("Hours",1,-12),mm:H("Minutes",2),m:H("Minutes",1),ss:H("Seconds",2),s:H("Seconds",1),EEEE:Ha("Day"),EEE:Ha("Day",!0),a:function(a){return a.getHours()<12?"am":"pm"},z:ac(!1),Z:ac(!0)},cd={"long":"MMMM d, y h:mm:ss a z",medium:"MMM d, y h:mm:ss a","short":"M/d/yy h:mm a",fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",mediumDate:"MMM d, y",shortDate:"M/d/yy",longTime:"h:mm:ss a z",mediumTime:"h:mm:ss a",
shortTime:"h:mm a"},Tc=/[A-Z]{3}(?![+\-])/,dd=/([^yMdHhmsazZE]*)(E+|y+|M+|d+|H+|h+|m+|s+|a|Z|z)(.*)/,ed=/^\d+$/;Y.date=function(a,b){b=cd[b]||b;q(a)&&(a=ed.test(a)?parseInt(a,10):Ya.toDate(a));ka(a)&&(a=new Date(a));if(!(a instanceof Date))return a;var c=a.toLocaleDateString(),d;if(b&&q(b)){for(var c="",e=[],f;b;)(f=dd.exec(b))?(e=e.concat(ma.call(f,1,f.length)),b=e.pop()):(e.push(b),b=null);j(e,function(b){d=bd[b];c+=d?d(a):b})}return c};Y.json=function(a){this.$element.addClass("ng-monospace");
return R(a,!0)};Y.lowercase=C;Y.uppercase=ob;Y.html=function(a,b){return new Ra(a,b)};Y.linky=function(a){if(!a)return a;for(var b=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,c=a,d=[],e=rb(d),f,g;a=c.match(b);)f=a[0],a[2]==a[3]&&(f="mailto:"+f),g=a.index,e.chars(c.substr(0,g)),e.start("a",{href:f}),e.chars(a[0].replace(/^mailto:/,"")),e.end("a"),c=c.substring(g+a[0].length);e.chars(c);return new Ra(d.join(""))};var fd=/^\s*[-+]?\d*(\.\d*)?\s*$/;ia.noop=oa(ea,ea);ia.json=
oa(R,function(a){return ga(a||"null")});ia["boolean"]=oa(bc,na);ia.number=oa(bc,function(a){if(a==null||fd.exec(a))return a===null||a===""?null:1*a;else throw"Not a number";});ia.list=oa(function(a){return a?a.join(", "):a},function(a){var b=[];j((a||"").split(","),function(a){(a=aa(a))&&b.push(a)});return b});ia.trim=oa(function(a){return a?aa(""+a):""});u(db,{noop:function(){return null},regexp:function(a,b,c){return a.match(b)?null:c||"Value does not match expected format "+b+"."},number:function(a,
b,c){var d=1*a;return d==a?typeof b!=la&&d<b?"Value can not be less than "+b+".":typeof b!=la&&d>c?"Value can not be greater than "+c+".":null:"Not a number"},integer:function(a,b,c){return(b=db.number(a,b,c))?b:!(""+a).match(/^\s*[\d+]*\s*$/)||a!=Math.round(a)?"Not a whole number":null},date:function(a){var b=(a=/^(\d\d?)\/(\d\d?)\/(\d\d\d\d)$/.exec(a))?new Date(a[3],a[1]-1,a[2]):0;return b&&b.getFullYear()==a[3]&&b.getMonth()==a[1]-1&&b.getDate()==a[2]?null:"Value is not a date. (Expecting format: 12/31/2009)."},
email:function(a){return a.match(/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/)?null:"Email needs to be in username@host.com format."},phone:function(a){return a.match(/^1\(\d\d\d\)\d\d\d-\d\d\d\d$/)?null:a.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/)?null:"Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationally."},url:function(a){return a.match(/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/)?null:"URL needs to be in http://server[:port]/path format."},
json:function(a){try{return ga(a),null}catch(b){return b.toString()}},asynchronous:function(a,b,c){if(a){var d=this,e=d.$element,f=e.data("$asyncValidator");f||e.data("$asyncValidator",f={inputs:{}});f.current=a;var g=f.inputs[a],h=d.$service("$invalidWidgets");g?g.inFlight?h.markInvalid(d.$element):(c||w)(g.response):(f.inputs[a]=g={inFlight:!0},h.markInvalid(d.$element),e.addClass("ng-input-indicator-wait"),b(a,function(b,c){g.response=c;g.error=b;g.inFlight=!1;f.current==a&&(e.removeClass("ng-input-indicator-wait"),
h.markValid(e));e.data(mb)();d.$service("$updateView")()}));return g.error}}});E("$cookieStore",function(a){return{get:function(b){return ga(a[b])},put:function(b,c){a[b]=R(c)},remove:function(b){delete a[b]}}},["$cookies"]);E("$cookies",function(a){var b=this,c={},d={},e,f=!1;a.addPollFn(function(){var g=a.cookies();e!=g&&(e=g,x(g,d),x(g,c),f&&b.$eval())})();f=!0;this.$onEval(99999,function(){var b,e,f;for(b in d)t(c[b])&&a.cookies(b,B);for(b in c)e=c[b],q(e)?e!==d[b]&&(a.cookies(b,e),f=!0):A(d[b])?
c[b]=d[b]:delete c[b];if(f)for(b in e=a.cookies(),c)c[b]!==e[b]&&(t(e[b])?delete c[b]:c[b]=e[b])});return c},["$browser"]);E("$defer",function(a,b,c){return function(d,e){a.defer(function(){try{d()}catch(a){b(a)}finally{c()}},e)}},["$browser","$exceptionHandler","$updateView"]);E("$document",function(a){return l(a.document)},["$window"]);E("$exceptionHandler",function(a){return function(b){a.error(b)}},["$log"]);E("$hover",function(a,b){var c,d,e=l(b[0].body);a.hover(function(a,b){if(b&&(d=a.attr(Ba)||
a.attr(va))){c||(c={callout:l('<div id="ng-callout"></div>'),arrow:l("<div></div>"),title:l('<div class="ng-title"></div>'),content:l('<div class="ng-content"></div>')},c.callout.append(c.arrow),c.callout.append(c.title),c.callout.append(c.content),e.append(c.callout));var h=e[0].getBoundingClientRect(),i=a[0].getBoundingClientRect(),h=h.right-i.right-10;c.title.text(a.hasClass("ng-exception")?"EXCEPTION:":"Validation error...");c.content.text(d);h<300?(c.arrow.addClass("ng-arrow-right"),c.arrow.css({left:"301px"}),
c.callout.css({position:"fixed",left:i.left-10-300-4+"px",top:i.top-3+"px",width:"300px"})):(c.arrow.addClass("ng-arrow-left"),c.callout.css({position:"fixed",left:i.right+10+"px",top:i.top-3+"px",width:"300px"}))}else c&&(c.callout.remove(),c=null)})},["$browser","$document"],!0);E("$invalidWidgets",function(){function a(b){if(b==v.document)return!1;b=b.parentNode;return!b||a(b)}var b=[];b.markValid=function(a){a=ya(b,a);a!=-1&&b.splice(a,1)};b.markInvalid=function(a){ya(b,a)===-1&&b.push(a)};b.visible=
function(){var a=0;j(b,function(b){var e=a,b=b[0].getBoundingClientRect(),f=b.height||b.bottom||0-b.top||0;a=e+((b.width||b.right||0-b.left||0)>0&&f>0?1:0)});return a};this.$onEval(99999,function(){for(var c=0;c<b.length;){var d=b[c];a(d[0])?(b.splice(c,1),d.dealoc&&d.dealoc()):c++}});return b});var gd=/^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,hd=/^([^\?]*)?(\?([^\?]*))?$/,ic={http:80,https:443,ftp:21};E("$location",function(a){function b(a){if(q(a)){var b=
u,c=i,d={},h=gd.exec(a);if(h)d.href=a.replace(/#$/,""),d.protocol=h[1],d.host=h[3]||"",d.port=h[5]||ic[d.protocol]||null,d.path=h[6]||"",d.search=Ta(h[8]),d.hash=h[10]||"",u(d,g(d.hash));b(c,d)}else{A(a.hash)&&u(a,q(a.hash)?g(a.hash):a.hash);u(i,a);if(A(a.hashPath||a.hashSearch))i.hash=f(i);i.href=e(i)}}function c(a,c){var d={};q(a)?(d.hashPath=a,d.hashSearch=c||{}):d.hashSearch=a;d.hash=f(d);b({hash:d})}function d(){if(!pa(i,k)){if(i.href==k.href)if(i.hash!=k.hash){var a=g(i.hash);c(a.hashPath,a.hashSearch)}else i.hash=
f(i),i.href=e(i);b(i.href)}}function e(a){var b=xb(a.search),c=a.port==ic[a.protocol]?null:a.port;return a.protocol+"://"+a.host+(c?":"+c:"")+a.path+(b?"?"+b:"")+(a.hash?"#"+a.hash:"")}function f(a){var b=xb(a.hashSearch);return escape(a.hashPath).replace(/%21/gi,"!").replace(/%3A/gi,":").replace(/%24/gi,"$")+(b?"?"+b:"")}function g(a){var b={},c=hd.exec(a);if(c)b.hash=a,b.hashPath=unescape(c[1]||""),b.hashSearch=Ta(c[3]);return b}var h=this,i={update:b,updateHash:c},k={};a.onHashChange(function(){b(a.getUrl());
x(i,k);h.$eval()})();this.$onEval(-99999,d);this.$onEval(99999,function(){d();a.getUrl()!=i.href&&(a.setUrl(i.href),x(i,k))});return i},["$browser"]);E("$log",function(a){function b(b){var d=a.console||{},e=d[b]||d.log||w;return e.apply?function(){var a=[];j(arguments,function(b){a.push(Pa(b))});return e.apply(d,a)}:e}return{log:b("log"),warn:b("warn"),info:b("info"),error:b("error")}},["$window"]);E("$resource",function(a){a=new Ea(a);return G(a,a.route)},["$xhr.cache"]);E("$route",function(a,b){var c=
{},d=[],e=function(a,b,c){var d="^"+b.replace(/[\.\\\(\)\^\$]/g,"$1")+"$",e=[],f={};j(b.split(/\W/),function(a){if(a){var b=RegExp(":"+a+"([\\W])");d.match(b)&&(d=d.replace(b,"([^/]*)$1"),e.push(a))}});var g=a.match(RegExp(d));g&&(j(e,function(a,b){f[a]=g[b+1]}),c&&this.$set(c,f));return g?f:null},f=this,g=0,h,i,k={routes:c,onChange:function(a){d.push(a);return a},parent:function(a){a&&(f=a)},when:function(a,b){if(t(a))return c;var d=c[a];d||(d=c[a]={reloadOnSearch:!0});b&&u(d,b);g++;return d},otherwise:function(a){k.when(null,
a)},reload:function(){g++}};this.$watch(function(){return g+a.hash},function(){var g,m,s,z,o,l;if(k.current&&!k.current.reloadOnSearch&&h==a.hashPath)k.current.params=u({},a.hashSearch,i);else{h=a.hashPath;k.current=null;j(c,function(b,c){if(!s&&(s=e(a.hashPath,c)))m=b});if(m=m||c[null]){if(m.redirectTo){q(m.redirectTo)?(l={hashPath:"",hashSearch:u({},a.hashSearch,s)},j(m.redirectTo.split(":"),function(b,c){c==0?l.hashPath+=b:(z=b.match(/(\w+)(.*)/),o=z[1],l.hashPath+=s[o]||a.hashSearch[o],l.hashPath+=
z[2]||"",delete l.hashSearch[o])})):l={hash:m.redirectTo(s,a.hash,a.hashPath,a.hashSearch)};a.update(l);b();return}g=X(f);k.current=u({},m,{scope:g,params:u({},a.hashSearch,s)});i=s}j(d,f.$tryEval);g&&g.$become(k.current.controller)}});return k},["$location","$updateView"]);kb.delay=25;E("$updateView",kb,["$browser"]);E("$window",G(v,ea,v));E("$xhr.bulk",function(a,b,c){function d(b,c,e,i,k){y(e)&&(k=i,i=e,e=null);var n;j(d.urls,function(a){if(y(a.match)?a.match(c):a.match.exec(c))n=a});if(n){if(!n.requests)n.requests=
[];b={method:b,url:c,data:e,success:i};if(k)b.error=k;n.requests.push(b)}else a(b,c,e,i,k)}var e=this;d.urls={};d.flush=function(f,g){j(d.urls,function(d,i){var k=d.requests;if(k&&k.length)d.requests=[],d.callbacks=[],a("POST",i,{requests:k},function(a,d,e){j(d,function(a,d){try{a.status==200?(k[d].success||w)(a.status,a.response,e):y(k[d].error)?k[d].error(a.status,a.response,e):b(k[d],a)}catch(g){c.error(g)}});(f||w)()},function(a,d,e){j(k,function(g){try{y(g.error)?g.error(a,d,e):b(g,d)}catch(f){c.error(f)}});
(g||w)()}),e.$eval()})};this.$onEval(99999,d.flush);return d},["$xhr","$xhr.error","$log"]);E("$xhr.cache",function(a,b,c,d){function e(a,h,i,k,n,m,s){y(i)?(y(k)?(s=m,m=n,n=k):(m=k,s=n,n=null),k=i,i=null):y(n)||(s=m,m=n,n=null);if(a=="GET"){var l;if(l=e.data[h])if(s?k(200,x(l.value),x(l.headers)):b(function(){k(200,x(l.value),x(l.headers))}),!m)return;(m=f[h])?(m.successes.push(k),m.errors.push(n)):(f[h]={successes:[k],errors:[n]},e.delegate(a,h,i,function(a,b,c){a==200&&(e.data[h]={value:b,headers:c});
var g=f[h].successes;delete f[h];j(g,function(e){try{(e||w)(a,x(b),c)}catch(g){d.error(g)}})},function(b,e,k){var m=f[h].errors,n=f[h].successes;delete f[h];j(m,function(f,m){try{y(f)?f(b,x(e),x(k)):c({method:a,url:h,data:i,success:n[m]},{status:b,body:e})}catch(j){d.error(j)}})}))}else e.data={},e.delegate(a,h,i,k,n)}var f={};e.data={};e.delegate=a;return e},["$xhr.bulk","$defer","$xhr.error","$log"]);E("$xhr.error",function(a){return function(b,c){a.error("ERROR: XHR: "+b.url,b,c)}},["$log"]);E("$xhr",
function(a,b,c,d){function e(e,h,i,k,n){y(i)&&(n=k,k=i,i=null);i&&M(i)&&(i=R(i));a.xhr(e,h,i,function(a,f,j){try{q(f)&&(f.match(/^\)\]\}',\n/)&&(f=f.substr(6)),/^\s*[\[\{]/.exec(f)&&/[\}\]]\s*$/.exec(f)&&(f=ga(f,!0))),200<=a&&a<300?k(a,f,j):y(n)?n(a,f,j):b({method:e,url:h,data:i,success:k},{status:a,body:f})}catch(o){c.error(o)}finally{d()}},u({"X-XSRF-TOKEN":a.cookies()["XSRF-TOKEN"]},f.common,f[C(e)]))}var f={common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},
post:{"Content-Type":"application/x-www-form-urlencoded"},get:{},head:{},put:{},"delete":{},patch:{}};e.defaults={headers:f};return e},["$browser","$xhr.error","$log","$updateView"]);D("ng:init",function(a){return function(b){this.$tryEval(a,b)}});D("ng:controller",function(a){this.scope(!0);return function(){var b=ra(v,a,!0)||ra(this,a,!0);if(!b)throw"Can not find '"+a+"' controller.";if(!y(b))throw"Reference '"+a+"' is not a class.";this.$become(b)}});D("ng:eval",function(a){return function(b){this.$onEval(a,
b)}});D("ng:bind",function(a,b){b.addClass("ng-binding");return function(b){var d=w,e=w;this.$onEval(function(){var f,g,h,i,k;i=this.hasOwnProperty(ec)?this.$element:B;this.$element=b;g=this.$tryEval(a,function(a){f=Pa(a)});this.$element=i;if(i=g instanceof Ra)g=(h=g).html;if(!(d===g&&e==f)&&(k=g&&(g.nodeName||g.bind&&g.find),!i&&!k&&M(g)&&(g=R(g,!0)),g!=d||f!=e))d=g,e=f,fa(b,Ba,f),f&&(g=f),i?b.html(h.get()):k?(b.html(""),b.append(g)):b.text(g==B?"":g)},b)}});var dc={};D("ng:bind-template",function(a,
b){b.addClass("ng-binding");var c=cc(a);return function(a){var b;this.$onEval(function(){var f=c.call(this,a,!0);f!=b&&(a.text(f),b=f)},a)}});var id={disabled:"disabled",readonly:"readOnly",checked:"checked",selected:"selected",multiple:"multiple"};D("ng:bind-attr",function(a){return function(b){var c={};this.$onEval(function(){var d=this.$eval(a),e;for(e in d){var f=cc(d[e]).call(this,b),g=id[C(e)];c[e]!==f&&(c[e]=f,g?(na(f)?(b.attr(g,g),b.attr("ng-"+g,f)):(b.removeAttr(g),b.removeAttr("ng-"+g)),
(b.data(mb)||w)()):b.attr(e,f))}},b)}});D("ng:click",function(a){return Ca("$updateView",function(b,c){var d=this;c.bind("click",function(e){d.$tryEval(a,c);b();e.stopPropagation()})})});D("ng:submit",function(a){return Ca("$updateView",function(b,c){var d=this;c.bind("submit",function(e){d.$tryEval(a,c);b();e.preventDefault()})})});D("ng:class",lb(function(){return!0}));D("ng:class-odd",lb(function(a){return a%2===0}));D("ng:class-even",lb(function(a){return a%2===1}));D("ng:show",function(a){return function(b){this.$onEval(function(){b.css("display",
na(this.$eval(a))?"":"none")},b)}});D("ng:hide",function(a){return function(b){this.$onEval(function(){b.css("display",na(this.$eval(a))?"none":"")},b)}});D("ng:style",function(a){return function(b){var c=Oc(b);this.$onEval(function(){var d=this.$eval(a)||{},e,f={};for(e in d)c[e]===B&&(c[e]=""),f[e]=d[e];for(e in c)f[e]=f[e]||c[e];b.css(f)},b)}});Sa("{{}}",function(a,b,c){var d=Ia(a);if(d.length>1||Ja(d[0])!==null)if(qc(c[0]))c.attr("ng:bind-template",a);else{var e=b,f;j(Ia(a),function(a){var b=
Ja(a);b?(f=l("<span>"),f.attr("ng:bind",b)):f=l(K.createTextNode(a));W&&a.charAt(0)==" "&&(f=l("<span>&nbsp;</span>"),b=f.html(),f.text(a.substr(1)),f.html(b+f.html()));e.after(f);e=f});b.remove()}});Sa("option",function(a,b,c){C(qa(c))=="option"&&(W<=7?qb(c[0].outerHTML,{start:function(b,e){t(e.value)&&c.attr("value",a)}}):c[0].getAttribute("value")==null&&c.attr("value",a))});var jc={};j("src,href,checked,disabled,multiple,readonly,selected".split(","),function(a){jc["ng:"+a]=a});wb("{{}}",function(a,
b,c){if(!D(b)&&!D("@"+b)){W&&b=="src"&&(a=decodeURI(a));var d=Ia(a);if(d.length>1||Ja(d[0])!==null)c.removeAttr(b),d=ga(c.attr("ng:bind-attr")||"{}"),d[jc[b]||b]=a,c.attr("ng:bind-attr",R(d))}});var J=wa("keydown change",ua,gc,La(),!0),Uc={text:J,textarea:J,hidden:J,password:J,checkbox:wa("click",fc,function(a,b){var c=b[0];return{get:function(){return!!c.checked},set:function(a){c.checked=na(a)}}},La(!1)),radio:wa("click",fc,function(a,b){var c=b[0];return{get:function(){return c.checked?c.value:
null},set:function(a){c.checked=a==c.value}}},function(a,b,c){var d=a.get(),e=b.get(),c=c[0];c.checked=!1;c.name=this.$id+"@"+c.name;t(d)&&a.set(d=null);d==null&&e!==null&&a.set(e);b.set(d)}),"select-one":wa("change",ua,gc,La(null)),"select-multiple":wa("change",ua,function(a,b){var c=b.attr("ng:format")||Ka,d=ha(c).formatter()();return{get:function(){var c=[];j(b[0].options,function(b){b.selected&&c.push(d.parse(a,b.value))});return c},set:function(c){var f={};j(c,function(b){f[d.format(a,b)]=!0});
j(b[0].options,function(a){a.selected=f[a.value]})}}},La([]))};Q("input",nb);Q("textarea",nb);var jd=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/;Q("select",function(a){this.descend(!0);this.directives(!0);var b=a.attr("multiple"),c=a.attr("ng:options"),d=N(a.attr("ng:change")||"").fnSelf,e;if(!c)return nb.call(this,a);if(!(e=c.match(jd)))throw I("Expected ng:options in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+
c+"'.");var f=N(e[2]||e[1]).fnSelf,g=e[4]||e[6],h=e[5],i=N(e[3]||"").fnSelf,k=N(e[2]?e[1]:g).fnSelf,n=N(e[7]).fnSelf,m=l(K.createElement("option")),s=l(K.createElement("optgroup")),z=!1;return function(c){var e=[[{element:c,label:""}]],p=this,y=ua(p,a);j(c.children(),function(a){a.value==""&&(z={label:l(a).text(),id:""})});c.html("");c.bind("change",function(){var a,f=n(p)||[],i=c.val(),j=Qa(p),m,l,s,z,u,r;try{if(b){m=[];z=0;for(r=e.length;z<r;z++){a=e[z];s=1;for(u=a.length;s<u;s++)if((l=a[s].element)[0].selected)h&&
(j[h]=i),j[g]=f[l.val()],m.push(k(j))}}else i=="?"?m=B:i==""?m=null:(j[g]=f[i],h&&(j[h]=i),m=k(j));A(m)&&y.get()!==m&&(d(p),y.set(m));p.$tryEval(function(){p.$root.$eval()})}finally{j=null}});p.$onEval(function(){var a={"":[]},d=[""],j,l,p,r,q;r=p=n(this)||[];var w,A,v,t;w=Qa(this);v=y.get();var x=!1;if(b){if(x=new Yb,v&&ka(A=v.length))for(t=0;t<A;t++)x.put(v[t],!0)}else if(v===null||z)a[""].push(u({selected:v===null,id:"",label:""},z)),x=!0;if(h){r=[];for(l in p)p.hasOwnProperty(l)&&r.push(l);r.sort()}for(t=
0;A=r.length,t<A;t++){w[g]=p[h?w[h]=r[t]:t];j=i(w)||"";if(!(l=a[j]))l=a[j]=[],d.push(j);b?j=!!x.remove(k(w)):(j=v===k(w),x=x||j);l.push({id:h?r[t]:t,label:f(w)||"",selected:j})}d.sort();!b&&!x&&a[""].unshift({id:"?",label:"",selected:!0});v=0;for(w=d.length;v<w;v++){j=d[v];l=a[j];if(e.length<=v)e.push(r=[p={element:s.clone().attr("label",j),label:l.label}]),c.append(p.element);else if(r=e[v],p=r[0],p.label!=j)p.element.attr("label",p.label=j);x=null;t=0;for(A=l.length;t<A;t++)if(j=l[t],q=r[t+1]){x=
q.element;if(q.label!==j.label)x.text(q.label=j.label);if(q.id!==j.id)x.val(q.id=j.id);q.selected!==j.selected&&x.attr("selected",j.selected)}else(q=m.clone()).val(j.id).attr("selected",j.selected).text(j.label),r.push({element:q,label:j.label,id:j.id,checked:j.selected}),x?x.after(q):p.element.append(q),x=q;for(t++;r.length>t;)r.pop().element.remove()}for(;e.length>v;)e.pop()[0].element.remove()})}});Q("ng:include",function(a){var b=this,c=a.attr("src"),d=a.attr("scope")||"",e=a[0].getAttribute("onload")||
"";if(a[0]["ng:compiled"])this.descend(!0),this.directives(!0);else return a[0]["ng:compiled"]=!0,u(function(a,g){function h(){j++}var i=this,k,j=0,m=!1;this.$watch(c,h);this.$watch(d,h);i.$onEval(function(){if(k&&!m){m=!0;try{k.$eval()}finally{m=!1}}});this.$watch(function(){return j},function(){var h=this.$eval(c),j=this.$eval(d);h?a("GET",h,null,function(a,c){g.html(c);k=j||X(i);b.compile(g)(k);i.$eval(e)},!1,!0):(k=null,g.html(""))})},{$inject:["$xhr.cache"]})});var kd=Q("ng:switch",function(a){var b=
this,c=a.attr("on"),d=a.attr("using")||"equals",e=d.split(":"),f=kd[e.shift()],g=a.attr("change")||"",h=[];if(!f)throw"Using expression '"+d+"' unknown.";if(!c)throw"Missing 'on' attribute.";Bb(a,function(a){var c=a.attr("ng:switch-when"),d={change:g,element:a,template:b.compile(a)};if(q(c))d.when=function(a,b){var d=[b,c];j(e,function(a){d.push(a)});return f.apply(a,d)},h.unshift(d);else if(q(a.attr("ng:switch-default")))d.when=xa(!0),h.push(d)});j(h,function(a){a.element.remove()});a.html("");return function(a){var b=
this,d;this.$watch(c,function(c){var e=!1;a.html("");d=X(b);j(h,function(b){!e&&b.when(d,c)&&(e=!0,d.$tryEval(b.change,a),b.template(d,function(b){a.append(b)}))})});b.$onEval(function(){d&&d.$eval()})}},{equals:function(a,b){return""+a==b}});Q("a",function(){this.descend(!0);this.directives(!0);return function(a){var b=(a.attr("ng:bind-attr")||"").indexOf('"href":')!==-1;!b&&!a.attr("name")&&!a.attr("href")&&a.attr("href","");a.attr("href")===""&&!b&&a.bind("click",function(a){a.preventDefault()})}});
Q("@ng:repeat",function(a,b){b.removeAttr("ng:repeat");b.replaceWith(l("<\!-- ng:repeat: "+a+" --\>"));var c=this.compile(b);return function(d){var e=a.match(/^\s*(.+)\s+in\s+(.*)\s*$/),f,g,h,i;if(!e)throw I("Expected ng:repeat in form of '_item_ in _collection_' but got '"+a+"'.");f=e[1];g=e[2];e=f.match(/^([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\)$/);if(!e)throw I("'item' in 'item in collection' should be identifier or (key, value) but got '"+keyValue+"'.");h=e[3]||e[1];i=e[2];var j=[],n=this;this.$onEval(function(){var a=
0,e=j.length,f=d,o=this.$tryEval(g,d),r=sb(o,!0),p=b[0].nodeName!="OPTION"?K.createDocumentFragment():null,u,q,t;for(t in o)if(o.hasOwnProperty(t))a<e?(q=j[a],q[h]=o[t],i&&(q[i]=t),f=q.$element,q.$position=a==0?"first":a==r-1?"last":"middle",q.$eval()):(q=X(n),q[h]=o[t],i&&(q[i]=t),q.$index=a,q.$position=a==0?"first":a==r-1?"last":"middle",j.push(q),c(q,function(b){b.attr("ng:repeat-index",a);p?(p.appendChild(b[0]),u=!0):(f.after(b),f=b)})),a++;for(u&&f.after(l(p));j.length>a;)j.pop().$element.remove()},
d)}});Q("@ng:non-bindable",w);Q("ng:view",function(a){var b=this;if(a[0]["ng:compiled"])this.descend(!0),this.directives(!0);else return a[0]["ng:compiled"]=!0,Ca("$xhr.cache","$route",function(a,d,e){var f;d.onChange(function(){var g;if(d.current)g=d.current.template,f=d.current.scope;g?a("GET",g,function(a,c){e.html(c);b.compile(e)(f)}):e.html("")})();this.$onEval(function(){f&&f.$eval()})})});var Na;ab("$browser",function(a){Na||(Na=new Fc(v,l(v.document),l(v.document.body),Wc,a),Na.bind());return Na},
{$inject:["$log"]});u(r,{element:l,compile:ub,scope:X,copy:x,extend:u,equals:pa,forEach:j,injector:Hb,noop:w,bind:G,toJson:R,fromJson:ga,identity:ea,isUndefined:t,isDefined:A,isString:q,isFunction:y,isObject:M,isNumber:ka,isArray:V,version:{full:"0.9.19",major:0,minor:9,dot:19,codeName:"canine-psychokinesis"}});yb();Wa(K).ready(function(){var a=sc(K),b=K,c=a.autobind;c&&(b=q(c)?b.getElementById(c):b,b=ub(b)(X({$config:a})).$service("$browser"),a.css?b.addCss(a.base_url+a.css):W<8&&b.addJs(a.ie_compat,
a.ie_compat_id))})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";.ng-format-negative{color:red;}.ng-exception{border:2px solid #FF0000;font-family:"Courier New",Courier,monospace;font-size:smaller;white-space:pre;}.ng-validation-error{border:2px solid #FF0000;}#ng-callout{margin:0;padding:0;border:0;outline:0;font-size:13px;font-weight:normal;font-family:Verdana,Arial,Helvetica,sans-serif;vertical-align:baseline;background:transparent;text-decoration:none;}#ng-callout .ng-arrow-left{background-image:url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrSLoc/AG8FeUUIN+sGebWAnbKSJodqqlsOxJtqYooU9vvk+vcJIcTkg+QAAA7");background-repeat:no-repeat;background-position:left top;position:absolute;z-index:101;left:-12px;height:23px;width:10px;top:-3px;}#ng-callout .ng-arrow-right{background-image:url("data:image/gif;base64,R0lGODlhCwAXAKIAAMzMzO/v7/f39////////wAAAAAAAAAAACH5BAUUAAQALAAAAAALABcAAAMrCLTcoM29yN6k9socs91e5X3EyJloipYrO4ohTMqA0Fn2XVNswJe+H+SXAAA7");background-repeat:no-repeat;background-position:left top;position:absolute;z-index:101;height:23px;width:11px;top:-2px;}#ng-callout{position:absolute;z-index:100;border:2px solid #CCCCCC;background-color:#fff;}#ng-callout .ng-content{padding:10px 10px 10px 10px;color:#333333;}#ng-callout .ng-title{background-color:#CCCCCC;text-align:left;padding-left:8px;padding-bottom:5px;padding-top:2px;font-weight:bold;}.ng-input-indicator-wait{background-image:url("data:image/png;base64,R0lGODlhEAAQAPQAAP///wAAAPDw8IqKiuDg4EZGRnp6egAAAFhYWCQkJKysrL6+vhQUFJycnAQEBDY2NmhoaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAAFdyAgAgIJIeWoAkRCCMdBkKtIHIngyMKsErPBYbADpkSCwhDmQCBethRB6Vj4kFCkQPG4IlWDgrNRIwnO4UKBXDufzQvDMaoSDBgFb886MiQadgNABAokfCwzBA8LCg0Egl8jAggGAA1kBIA1BAYzlyILczULC2UhACH5BAkKAAAALAAAAAAQABAAAAV2ICACAmlAZTmOREEIyUEQjLKKxPHADhEvqxlgcGgkGI1DYSVAIAWMx+lwSKkICJ0QsHi9RgKBwnVTiRQQgwF4I4UFDQQEwi6/3YSGWRRmjhEETAJfIgMFCnAKM0KDV4EEEAQLiF18TAYNXDaSe3x6mjidN1s3IQAh+QQJCgAAACwAAAAAEAAQAAAFeCAgAgLZDGU5jgRECEUiCI+yioSDwDJyLKsXoHFQxBSHAoAAFBhqtMJg8DgQBgfrEsJAEAg4YhZIEiwgKtHiMBgtpg3wbUZXGO7kOb1MUKRFMysCChAoggJCIg0GC2aNe4gqQldfL4l/Ag1AXySJgn5LcoE3QXI3IQAh+QQJCgAAACwAAAAAEAAQAAAFdiAgAgLZNGU5joQhCEjxIssqEo8bC9BRjy9Ag7GILQ4QEoE0gBAEBcOpcBA0DoxSK/e8LRIHn+i1cK0IyKdg0VAoljYIg+GgnRrwVS/8IAkICyosBIQpBAMoKy9dImxPhS+GKkFrkX+TigtLlIyKXUF+NjagNiEAIfkECQoAAAAsAAAAABAAEAAABWwgIAICaRhlOY4EIgjH8R7LKhKHGwsMvb4AAy3WODBIBBKCsYA9TjuhDNDKEVSERezQEL0WrhXucRUQGuik7bFlngzqVW9LMl9XWvLdjFaJtDFqZ1cEZUB0dUgvL3dgP4WJZn4jkomWNpSTIyEAIfkECQoAAAAsAAAAABAAEAAABX4gIAICuSxlOY6CIgiD8RrEKgqGOwxwUrMlAoSwIzAGpJpgoSDAGifDY5kopBYDlEpAQBwevxfBtRIUGi8xwWkDNBCIwmC9Vq0aiQQDQuK+VgQPDXV9hCJjBwcFYU5pLwwHXQcMKSmNLQcIAExlbH8JBwttaX0ABAcNbWVbKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICSRBlOY7CIghN8zbEKsKoIjdFzZaEgUBHKChMJtRwcWpAWoWnifm6ESAMhO8lQK0EEAV3rFopIBCEcGwDKAqPh4HUrY4ICHH1dSoTFgcHUiZjBhAJB2AHDykpKAwHAwdzf19KkASIPl9cDgcnDkdtNwiMJCshACH5BAkKAAAALAAAAAAQABAAAAV3ICACAkkQZTmOAiosiyAoxCq+KPxCNVsSMRgBsiClWrLTSWFoIQZHl6pleBh6suxKMIhlvzbAwkBWfFWrBQTxNLq2RG2yhSUkDs2b63AYDAoJXAcFRwADeAkJDX0AQCsEfAQMDAIPBz0rCgcxky0JRWE1AmwpKyEAIfkECQoAAAAsAAAAABAAEAAABXkgIAICKZzkqJ4nQZxLqZKv4NqNLKK2/Q4Ek4lFXChsg5ypJjs1II3gEDUSRInEGYAw6B6zM4JhrDAtEosVkLUtHA7RHaHAGJQEjsODcEg0FBAFVgkQJQ1pAwcDDw8KcFtSInwJAowCCA6RIwqZAgkPNgVpWndjdyohACH5BAkKAAAALAAAAAAQABAAAAV5ICACAimc5KieLEuUKvm2xAKLqDCfC2GaO9eL0LABWTiBYmA06W6kHgvCqEJiAIJiu3gcvgUsscHUERm+kaCxyxa+zRPk0SgJEgfIvbAdIAQLCAYlCj4DBw0IBQsMCjIqBAcPAooCBg9pKgsJLwUFOhCZKyQDA3YqIQAh+QQJCgAAACwAAAAAEAAQAAAFdSAgAgIpnOSonmxbqiThCrJKEHFbo8JxDDOZYFFb+A41E4H4OhkOipXwBElYITDAckFEOBgMQ3arkMkUBdxIUGZpEb7kaQBRlASPg0FQQHAbEEMGDSVEAA1QBhAED1E0NgwFAooCDWljaQIQCE5qMHcNhCkjIQAh+QQJCgAAACwAAAAAEAAQAAAFeSAgAgIpnOSoLgxxvqgKLEcCC65KEAByKK8cSpA4DAiHQ/DkKhGKh4ZCtCyZGo6F6iYYPAqFgYy02xkSaLEMV34tELyRYNEsCQyHlvWkGCzsPgMCEAY7Cg04Uk48LAsDhRA8MVQPEF0GAgqYYwSRlycNcWskCkApIyEAOwAAAAAAAAAAAA==");background-position:right;background-repeat:no-repeat;}</style>');

@ -152,7 +152,14 @@ function MockBrowser() {
throw new Error("Missing HTTP request header: " + key + ": " + value);
}
});
callback(expectation.code, expectation.response);
callback(expectation.code, expectation.response, function(header) {
if (header) {
header = header.toLowerCase();
return expectation.responseHeaders && expectation.responseHeaders[header] || null;
} else {
return expectation.responseHeaders || {};
}
});
});
};
self.xhr.expectations = expectations;
@ -162,12 +169,22 @@ function MockBrowser() {
if (data && angular.isString(data)) url += "|" + data;
var expect = expectations[method] || (expectations[method] = {});
return {
respond: function(code, response) {
respond: function(code, response, responseHeaders) {
if (!angular.isNumber(code)) {
responseHeaders = response;
response = code;
code = 200;
}
expect[url] = {code:code, response:response, headers: headers || {}};
angular.forEach(responseHeaders, function(value, key) {
delete responseHeaders[key];
responseHeaders[key.toLowerCase()] = value;
});
expect[url] = {
code: code,
response: response,
headers: headers || {},
responseHeaders: responseHeaders || {}
};
}
};
};
@ -268,7 +285,7 @@ function MockBrowser() {
self.defer = function(fn, delay) {
delay = delay || 0;
self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
self.deferredFns.sort(function(a,b){ return a.time - b.time;});
self.deferredFns.sort(function(a,b){return a.time - b.time;});
return self.deferredNextId++;
};
@ -374,7 +391,7 @@ angular.service('$browser', function(){
* See {@link angular.mock} for more info on angular mocks.
*/
angular.service('$exceptionHandler', function() {
return function(e) { throw e;};
return function(e) {throw e;};
});
@ -394,10 +411,10 @@ angular.service('$log', MockLogFactory);
function MockLogFactory() {
var $log = {
log: function(){ $log.log.logs.push(arguments); },
warn: function(){ $log.warn.logs.push(arguments); },
info: function(){ $log.info.logs.push(arguments); },
error: function(){ $log.error.logs.push(arguments); }
log: function(){$log.log.logs.push(arguments);},
warn: function(){$log.warn.logs.push(arguments);},
info: function(){$log.info.logs.push(arguments);},
error: function(){$log.error.logs.push(arguments);}
};
$log.log.logs = [];

@ -6239,7 +6239,7 @@ window.jQuery = window.$ = jQuery;
})(window);
/**
* @license AngularJS v0.9.18
* @license AngularJS v0.9.19
* (c) 2010-2011 AngularJS http://angularjs.org
* License: MIT
*/
@ -6311,7 +6311,6 @@ var _undefined = undefined,
$boolean = 'boolean',
$console = 'console',
$date = 'date',
$display = 'display',
$element = 'element',
$function = 'function',
$length = 'length',
@ -6392,7 +6391,7 @@ var _undefined = undefined,
* @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 {Objet|Array} Reference to `obj`.
* @returns {Object|Array} Reference to `obj`.
*/
function forEach(obj, iterator, context) {
var key;
@ -7122,7 +7121,7 @@ function toKeyValue(obj) {
/**
* we need our custom mehtod because encodeURIComponent is too agressive and doesn't follow
* We need our custom mehtod because encodeURIComponent is too agressive and doesn't follow
* http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path
* segments:
* segment = *pchar
@ -7266,7 +7265,7 @@ function assertArgFn(arg, name) {
* - `codeName` `{string}` code name of the release, e.g. "jiggling-armfat"
*/
var version = {
full: '0.9.18', // all of these placeholder strings will be replaced by rake's
full: '0.9.19', // all of these placeholder strings will be replaced by rake's
major: "NG_VERSION_MAJOR", // compile task
minor: "NG_VERSION_MINOR",
dot: "NG_VERSION_DOT",
@ -7516,7 +7515,7 @@ Template.prototype = {
* The compilation is a process of walking the DOM tree and trying to match DOM elements to
* {@link angular.markup markup}, {@link angular.attrMarkup attrMarkup},
* {@link angular.widget widgets}, and {@link angular.directive directives}. For each match it
* executes coresponding markup, attrMarkup, widget or directive template function and collects the
* executes corresponding markup, attrMarkup, widget or directive template function and collects the
* instance functions into a single template function which is then returned.
*
* The template function can then be used once to produce the view or as it is the case with
@ -7545,7 +7544,7 @@ Template.prototype = {
* root scope is created.
* * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the
* `template` and call the `cloneAttachFn` function allowing the caller to attach the
* cloned elements to the DOM document at the approriate place. The `cloneAttachFn` is
* cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is
* called as: <br/> `cloneAttachFn(clonedElement, scope)` where:
*
* * `clonedElement` - is a clone of the original `element` passed into the compiler.
@ -7661,7 +7660,7 @@ Compiler.prototype = {
* not a problem, but under some circumstances the values for data
* is not available until after the full view is computed. If such
* values are needed before they are computed the order of
* evaluation can be change using ng:eval-order
* evaluation can be changed using ng:eval-order
*
* @element ANY
* @param {integer|string=} [priority=0] priority integer, or FIRST, LAST constant
@ -7831,7 +7830,7 @@ function getter(instance, path, unboundFn) {
for ( var i = 0; i < len; i++) {
key = element[i];
if (!key.match(/^[\$\w][\$\w\d]*$/))
throw "Expression '" + path + "' is not a valid expression for accesing variables.";
throw "Expression '" + path + "' is not a valid expression for accessing variables.";
if (instance) {
lastInstance = instance;
instance = instance[key];
@ -8024,7 +8023,7 @@ function createScope(parent, providers, instanceCache) {
* @description
* Assigns a value to a property of the current scope specified via `property_chain`. Unlike in
* JavaScript, if there are any `undefined` intermediary properties, empty objects are created
* and assigned in to them instead of throwing an exception.
* and assigned to them instead of throwing an exception.
*
<pre>
var scope = angular.scope();
@ -8190,7 +8189,7 @@ function createScope(parent, providers, instanceCache) {
* parameters, `newValue` and `oldValue`.
* @param {(function()|DOMElement)=} [exceptionHanlder=angular.service.$exceptionHandler] Handler
* that gets called when `watchExp` or `listener` throws an exception. If a DOMElement is
* specified as handler, the element gets decorated by angular with the information about the
* specified as a handler, the element gets decorated by angular with the information about the
* exception.
* @param {boolean=} [initRun=true] Flag that prevents the first execution of the listener upon
* registration.
@ -9246,9 +9245,16 @@ ResourceFactory.prototype = {
case 4:
error = a4;
success = a3;
//fallthrough
case 3:
case 2:
if (isFunction(a2)) {
if (isFunction(a1)) {
success = a1;
error = a2;
break;
}
success = a2;
error = a3;
//fallthrough
@ -9274,7 +9280,7 @@ ResourceFactory.prototype = {
action.method,
route.url(extend({}, action.params || {}, extractParams(data), params)),
data,
function(status, response) {
function(status, response, responseHeaders) {
if (response) {
if (action.isArray) {
value.length = 0;
@ -9285,7 +9291,7 @@ ResourceFactory.prototype = {
copy(response, value);
}
}
(success||noop)(value);
(success||noop)(value, responseHeaders);
},
error || action.verifyCache,
action.verifyCache);
@ -9410,7 +9416,9 @@ function Browser(window, document, body, XHR, $log) {
* @param {string} method Requested method (get|post|put|delete|head|json)
* @param {string} url Requested url
* @param {?string} post Post data to send (null if nothing to post)
* @param {function(number, string)} callback Function that will be called on response
* @param {function(number, string, function([string]))} callback Function that will be called on
* response. The third argument is a function that can be called to return a specified response
* header or an Object containing all headers (when called with no arguments).
* @param {object=} header additional HTTP headers to send with XHR.
* Standard headers are:
* <ul>
@ -9423,15 +9431,24 @@ function Browser(window, document, body, XHR, $log) {
* Send ajax request
*/
self.xhr = function(method, url, post, callback, headers) {
var parsedHeaders;
outstandingRequestCount ++;
if (lowercase(method) == 'json') {
var callbackId = ("angular_" + Math.random() + '_' + (idCounter++)).replace(/\d\./, '');
var script = self.addJs(url.replace('JSON_CALLBACK', callbackId));
window[callbackId] = function(data){
window[callbackId] = function(data) {
window[callbackId].data = data;
};
var script = self.addJs(url.replace('JSON_CALLBACK', callbackId), null, function() {
if (window[callbackId].data) {
completeOutstandingRequest(callback, 200, window[callbackId].data);
} else {
completeOutstandingRequest(callback);
}
delete window[callbackId];
body[0].removeChild(script);
completeOutstandingRequest(callback, 200, data);
};
});
} else {
var xhr = new XHR();
xhr.open(method, url, true);
@ -9442,7 +9459,34 @@ function Browser(window, document, body, XHR, $log) {
if (xhr.readyState == 4) {
// normalize IE bug (http://bugs.jquery.com/ticket/1450)
var status = xhr.status == 1223 ? 204 : xhr.status || 200;
completeOutstandingRequest(callback, status, xhr.responseText);
completeOutstandingRequest(callback, status, xhr.responseText, function(header) {
header = lowercase(header);
if (header) {
return parsedHeaders
? parsedHeaders[header] || null
: xhr.getResponseHeader(header);
} else {
// Return an object containing each response header
parsedHeaders = {};
forEach(xhr.getAllResponseHeaders().split('\n'), function(line) {
var i = line.indexOf(':'),
key = lowercase(trim(line.substr(0, i))),
value = trim(line.substr(i + 1));
if (parsedHeaders[key]) {
// Combine repeated headers
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
parsedHeaders[key] += ', ' + value;
} else {
parsedHeaders[key] = value;
}
});
return parsedHeaders;
}
});
}
};
xhr.send(post || '');
@ -9450,11 +9494,9 @@ function Browser(window, document, body, XHR, $log) {
};
/**
* @workInProgress
* @ngdoc method
* @name angular.service.$browser#notifyWhenNoOutstandingRequests
* @methodOf angular.service.$browser
*
* @private
* Note: this method is used only by scenario runner
* TODO(vojta): prefix this method with $$ ?
* @param {function()} callback Function that will be called when no outstanding request
*/
self.notifyWhenNoOutstandingRequests = function(callback) {
@ -9565,7 +9607,7 @@ function Browser(window, document, body, XHR, $log) {
* The listener gets called with either HashChangeEvent object or simple object that also contains
* `oldURL` and `newURL` properties.
*
* NOTE: this api is intended for use only by the $location service. Please use the
* Note: this api is intended for use only by the $location service. Please use the
* {@link angular.service.$location $location service} to monitor hash changes in angular apps.
*
* @param {function(event)} listener Listener function to be called when url hash changes.
@ -9778,7 +9820,7 @@ function Browser(window, document, body, XHR, $log) {
* @description
* Adds a script tag to the head.
*/
self.addJs = function(url, domId) {
self.addJs = function(url, domId, done) {
// we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:
// - fetches local scripts via XHR and evals them
// - adds and immediately removes script elements from the document
@ -9791,6 +9833,15 @@ function Browser(window, document, body, XHR, $log) {
script.type = 'text/javascript';
script.src = url;
if (domId) script.id = domId;
if (msie) {
script.onreadystatechange = function() {
/loaded|complete/.test(script.readyState) && done && done();
};
} else {
if (done) script.onload = script.onerror = done;
}
body[0].appendChild(script);
return script;
@ -10092,7 +10143,7 @@ function htmlSanitizeWriter(buf){
* focus on the most commonly needed functionality and minimal footprint. For this reason only a
* limited number of jQuery methods, arguments and invocation styles are supported.
*
* NOTE: All element references in angular are always wrapped with jQuery (lite) and are never
* Note: All element references in angular are always wrapped with jQuery (lite) and are never
* raw DOM references.
*
* ## Angular's jQuery lite implements these functions:
@ -10116,8 +10167,6 @@ function htmlSanitizeWriter(buf){
* - [text()](http://api.jquery.com/text/)
* - [trigger()](http://api.jquery.com/trigger/)
* - [eq()](http://api.jquery.com/eq/)
* - [show()](http://api.jquery.com/show/)
* - [hide()](http://api.jquery.com/hide/)
*
* ## Additionally these methods extend the jQuery and are available in both jQuery and jQuery lite
* version:
@ -10221,7 +10270,7 @@ function JQLiteData(element, key, value) {
function JQLiteHasClass(element, selector, _) {
// the argument '_' is important, since it makes the function have 3 arguments, which
// is neede for delegate function to realize the this is a getter.
// is needed for delegate function to realize the this is a getter.
var className = " " + selector + " ";
return ((" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf( className ) > -1);
}
@ -10525,32 +10574,6 @@ forEach({
return element.getElementsByTagName(selector);
},
hide: function(element) {
if (element.style) {
if(element.style.display !=="none" && !JQLiteData(element,"olddisplay")) {
JQLiteData( element, "olddisplay", element.style.display);
}
element.style.display = "none";
}
},
show: function(element) {
if(element.style) {
var display = element.style.display;
if ( display === "" || display === "none" ) {
// restore the original value overwritten by hide if present or default to nothing (which
// will let browser correctly choose between 'inline' or 'block')
element.style.display = JQLiteData(element, "olddisplay") || "";
// if the previous didn't make the element visible then there are some cascading rules that
// are still hiding it, so let's default to 'block', which might be incorrect in case of
// elmenents that should be 'inline' by default, but oh well :-)
if (!isVisible([element])) element.style.display = "block";
}
}
},
clone: JQLiteClone
}, function(fn, name){
/**
@ -11501,10 +11524,10 @@ defineApi('Function', [angularGlobal, angularCollection, angularFunction]);
*
* @param {number} amount Input to filter.
* @param {string=} symbol Currency symbol or identifier to be displayed.
* @returns {string} Formated number.
* @returns {string} Formatted number.
*
* @css ng-format-negative
* When the value is negative, this css class is applied to the binding making it by default red.
* When the value is negative, this css class is applied to the binding making it (by default) red.
*
* @example
<doc:example>
@ -11543,7 +11566,7 @@ angularFilter.currency = function(amount, currencySymbol){
* @description
* Formats a number as text.
*
* If the input is not a number empty string is returned.
* If the input is not a number an empty string is returned.
*
* @param {number|string} number Number to format.
* @param {(number|string)=} [fractionSize=2] Number of decimal places to round the number to.
@ -11953,7 +11976,7 @@ angularFilter.uppercase = uppercase;
*
* The input is sanitized by parsing the html into tokens. All safe tokens (from a whitelist) are
* then serialized back to properly escaped html string. This means that no unsafe input can make
* it into the returned string, however since our parser is more strict than a typical browser
* it into the returned string, however, since our parser is more strict than a typical browser
* parser, it's possible that some obscure input, which would be recognized as valid HTML by a
* browser, won't make it through the sanitizer.
*
@ -12042,7 +12065,7 @@ angularFilter.html = function(html, option){
*
* @description
* Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
* plane email address links.
* plain email address links.
*
* @param {string} text Input text.
* @returns {string} Html-linkified text.
@ -12139,7 +12162,7 @@ angularFilter.linky = function(text){
* @name angular.formatter
* @description
*
* Formatters are used for translating data formats between those used in for display and those used
* Formatters are used for translating data formats between those used for display and those used
* for storage.
*
* Following is the list of built-in angular formatters:
@ -12622,7 +12645,8 @@ extend(angularValidator, {
if (value.match(/^\+\d{2,3} (\(\d{1,5}\))?[\d ]+\d$/)) {
return null;
}
return "Phone number needs to be in 1(987)654-3210 format in North America or +999 (123) 45678 906 internationaly.";
return "Phone number needs to be in 1(987)654-3210 format in North America " +
"or +999 (123) 45678 906 internationally.";
},
/**
@ -13705,9 +13729,15 @@ angularServiceInject("$log", $logFactory = function($window){
*
<pre>
var User = $resource('/user/:userId', {userId:'@id'});
User.get({userId:123}, function(u){
User.get({userId:123}, function(u, responseHeaders){
u.abc = true;
u.$save();
u.$save(function(u, responseHeaders) {
// Get an Object containing all response headers
var allHeaders = responseHeaders();
// Get a specific response header
u.newId = responseHeaders('Location');
});
});
</pre>
@ -13715,7 +13745,7 @@ angularServiceInject("$log", $logFactory = function($window){
Let's look at what a buzz client created with the `$resource` service looks like:
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function BuzzController($resource) {
this.Activity = $resource(
@ -13786,7 +13816,7 @@ angularServiceInject('$resource', function($xhr){
Try changing the URL in the input box to see changes.
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function MainCntl($route, $location) {
this.$route = $route;
@ -13832,6 +13862,8 @@ angularServiceInject('$route', function(location, $updateView) {
matcher = switchRouteMatcher,
parentScope = this,
dirty = 0,
lastHashPath,
lastRouteParams,
$route = {
routes: routes,
@ -13900,6 +13932,18 @@ angularServiceInject('$route', function(location, $updateView) {
* The custom `redirectTo` function is expected to return a string which will be used
* to update `$location.hash`.
*
* - `[reloadOnSearch=true]` - {boolean=} - reload route when $location.hashSearch
* changes. If this option is disabled, you should set up a $watch to be notified of
* param (hashSearch) changes as follows:
*
* function MyCtrl($route) {
* this.$watch(function() {
* return $route.current.params.myHashSearchParam;
* }, function(params) {
* //do stuff with params
* });
* }
*
* @returns {Object} route object
*
* @description
@ -13908,8 +13952,8 @@ angularServiceInject('$route', function(location, $updateView) {
when:function (path, params) {
if (isUndefined(path)) return routes; //TODO(im): remove - not needed!
var route = routes[path];
if (!route) route = routes[path] = {};
if (params) extend(route, params);
if (!route) route = routes[path] = {reloadOnSearch: true};
if (params) extend(route, params); //TODO(im): what the heck? merge two route definitions?
dirty++;
return route;
},
@ -13973,6 +14017,14 @@ angularServiceInject('$route', function(location, $updateView) {
function updateRoute(){
var childScope, routeParams, pathParams, segmentMatch, key, redir;
if ($route.current) {
if (!$route.current.reloadOnSearch && (lastHashPath == location.hashPath)) {
$route.current.params = extend({}, location.hashSearch, lastRouteParams);
return;
}
}
lastHashPath = location.hashPath;
$route.current = null;
forEach(routes, function(rParams, rPath) {
if (!pathParams) {
@ -14019,6 +14071,7 @@ angularServiceInject('$route', function(location, $updateView) {
scope: childScope,
params: extend({}, location.hashSearch, pathParams)
});
lastRouteParams = pathParams;
}
//fire onChange callbacks
@ -14030,7 +14083,7 @@ angularServiceInject('$route', function(location, $updateView) {
}
this.$watch(function(){return dirty + location.hash;}, updateRoute);
this.$watch(function(){ return dirty + location.hash; }, updateRoute);
return $route;
}, ['$location', '$updateView']);
@ -14070,7 +14123,7 @@ angularServiceInject('$route', function(location, $updateView) {
* or 'XHR' (instead of {@link angular.service.$xhr}) then you may be changing the model
* without angular knowledge and you may need to call '$updateView()' directly.
*
* NOTE: if you wish to update the view immediately (without delay), you can do so by calling
* Note: if you wish to update the view immediately (without delay), you can do so by calling
* {@link angular.scope.$eval} at any time from your code:
* <pre>scope.$root.$eval()</pre>
*
@ -14172,13 +14225,14 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
queue.requests = [];
queue.callbacks = [];
$xhr('POST', url, {requests: currentRequests},
function(code, response) {
function(code, response, responseHeaders) {
forEach(response, function(response, i) {
try {
if (response.status == 200) {
(currentRequests[i].success || noop)(response.status, response.response);
(currentRequests[i].success || noop)
(response.status, response.response, responseHeaders);
} else if (isFunction(currentRequests[i].error)) {
currentRequests[i].error(response.status, response.response);
currentRequests[i].error(response.status, response.response, responseHeaders);
} else {
$error(currentRequests[i], response);
}
@ -14188,11 +14242,11 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
});
(success || noop)();
},
function(code, response) {
function(code, response, responseHeaders) {
forEach(currentRequests, function(request, i) {
try {
if (isFunction(request.error)) {
request.error(code, response);
request.error(code, response, responseHeaders);
} else {
$error(request, response);
}
@ -14233,8 +14287,8 @@ angularServiceInject('$xhr.bulk', function($xhr, $error, $log){
* @param {string} method HTTP method.
* @param {string} url Destination URL.
* @param {(string|Object)=} post Request body.
* @param {function(number, (string|Object))} success Response success callback.
* @param {function(number, (string|Object))=} error Response error callback.
* @param {function(number, (string|Object), Function)} success Response success callback.
* @param {function(number, (string|Object), Function)} error Response error callback.
* @param {boolean=} [verifyCache=false] If `true` then a result is immediately returned from cache
* (if present) while a request is sent to the server for a fresh response that will update the
* cached entry. The `success` function will be called when the response is received.
@ -14266,9 +14320,9 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
if (dataCached = cache.data[url]) {
if (sync) {
success(200, copy(dataCached.value));
success(200, copy(dataCached.value), copy(dataCached.headers));
} else {
$defer(function() { success(200, copy(dataCached.value)); });
$defer(function() { success(200, copy(dataCached.value), copy(dataCached.headers)); });
}
if (!verifyCache)
@ -14281,20 +14335,20 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
} else {
inflight[url] = {successes: [success], errors: [error]};
cache.delegate(method, url, post,
function(status, response) {
function(status, response, responseHeaders) {
if (status == 200)
cache.data[url] = {value: response};
cache.data[url] = {value: response, headers: responseHeaders};
var successes = inflight[url].successes;
delete inflight[url];
forEach(successes, function(success) {
try {
(success||noop)(status, copy(response));
(success||noop)(status, copy(response), responseHeaders);
} catch(e) {
$log.error(e);
}
});
},
function(status, response) {
function(status, response, responseHeaders) {
var errors = inflight[url].errors,
successes = inflight[url].successes;
delete inflight[url];
@ -14302,7 +14356,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
forEach(errors, function(error, i) {
try {
if (isFunction(error)) {
error(status, copy(response));
error(status, copy(response), copy(responseHeaders));
} else {
$error(
{method: method, url: url, data: post, success: successes[i]},
@ -14345,7 +14399,7 @@ angularServiceInject('$xhr.cache', function($xhr, $defer, $error, $log) {
* - `method` `{string}` The http request method.
* - `url` `{string}` The request destination.
* - `data` `{(string|Object)=} An optional request body.
* - `callback` `{function()}` The callback function
* - `success` `{function()}` The success callback function
*
* @param {Object} response Response object.
*
@ -14375,7 +14429,7 @@ angularServiceInject('$xhr.error', function($log){
* @name angular.service.$xhr
* @function
* @requires $browser $xhr delegates all XHR requests to the `$browser.xhr()`. A mock version
* of the $browser exists which allows setting expectaitions on XHR requests
* of the $browser exists which allows setting expectations on XHR requests
* in your tests
* @requires $xhr.error $xhr delegates all non `2xx` response code to this service.
* @requires $log $xhr delegates all exceptions to `$log.error()`.
@ -14452,7 +14506,7 @@ angularServiceInject('$xhr.error', function($log){
* cookie called `XSRF-TOKEN` on first HTTP GET request. On subsequent non-GET requests the server
* can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure that only
* JavaScript running on your domain could have read the token. The token must be unique for each
* user and must be verifiable by the server (to prevent the JavaScript making up its own tokens).
* user and must be verifiable by the server (to prevent the JavaScript making up its own tokens).
* We recommend that the token is a digest of your site's authentication cookie with
* {@link http://en.wikipedia.org/wiki/Rainbow_table salt for added security}.
*
@ -14465,7 +14519,7 @@ angularServiceInject('$xhr.error', function($log){
* angular generated callback function.
* @param {(string|Object)=} post Request content as either a string or an object to be stringified
* as JSON before sent to the server.
* @param {function(number, (string|Object))} success A function to be called when the response is
* @param {function(number, (string|Object), Function)} success A function to be called when the response is
* received. The success function will be called with:
*
* - {number} code [HTTP status code](http://en.wikipedia.org/wiki/List_of_HTTP_status_codes) of
@ -14473,27 +14527,35 @@ angularServiceInject('$xhr.error', function($log){
* {@link angular.service.$xhr.error} service (or custom error callback).
* - {string|Object} response Response object as string or an Object if the response was in JSON
* format.
* - {function(string=)} responseHeaders A function that when called with a {string} header name,
* returns the value of that header or null if it does not exist; when called without
* arguments, returns an object containing every response header
* @param {function(number, (string|Object))} error A function to be called if the response code is
* not 2xx.. Accepts the same arguments as success, above.
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function FetchCntl($xhr) {
var self = this;
this.fetch = function() {
self.clear();
self.code = null;
self.response = null;
$xhr(self.method, self.url, function(code, response) {
self.code = code;
self.response = response;
}, function(code, response) {
self.code = code;
self.response = response || "Request failed";
});
};
this.clear = function() {
self.code = null;
self.response = null;
this.updateModel = function(method, url) {
self.method = method;
self.url = url;
};
}
FetchCntl.$inject = ['$xhr'];
@ -14503,15 +14565,38 @@ angularServiceInject('$xhr.error', function($log){
<option>GET</option>
<option>JSON</option>
</select>
<input type="text" name="url" value="index.html" size="80"/><br/>
<button ng:click="fetch()">fetch</button>
<button ng:click="clear()">clear</button>
<a href="" ng:click="method='GET'; url='index.html'">sample</a>
<a href="" ng:click="method='JSON'; url='https://www.googleapis.com/buzz/v1/activities/googlebuzz/@self?alt=json&callback=JSON_CALLBACK'">buzz</a>
<input type="text" name="url" value="index.html" size="80"/>
<button ng:click="fetch()">fetch</button><br>
<button ng:click="updateModel('GET', 'index.html')">Sample GET</button>
<button ng:click="updateModel('JSON', 'https://www.googleapis.com/buzz/v1/activities/googlebuzz/@self?alt=json&callback=JSON_CALLBACK')">Sample JSONP (Buzz API)</button>
<button ng:click="updateModel('JSON', 'https://www.invalid_JSONP_request.com&callback=JSON_CALLBACK')">Invalid JSONP</button>
<pre>code={{code}}</pre>
<pre>response={{response}}</pre>
</div>
</doc:source>
<doc:scenario>
it('should make xhr GET request', function() {
element(':button:contains("Sample GET")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=200');
expect(binding('response')).toMatch(/angularjs.org/);
});
it('should make JSONP request to the Buzz API', function() {
element(':button:contains("Buzz API")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=200');
expect(binding('response')).toMatch(/buzz-feed/);
});
it('should make JSONP request to invalid URL and invoke the error handler',
function() {
element(':button:contains("Invalid JSONP")').click();
element(':button:contains("fetch")').click();
expect(binding('code')).toBe('code=');
expect(binding('response')).toBe('response=Request failed');
});
</doc:scenario>
</doc:example>
*/
angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
@ -14539,7 +14624,7 @@ angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
post = toJson(post);
}
$browser.xhr(method, url, post, function(code, response){
$browser.xhr(method, url, post, function(code, response, responseHeaders){
try {
if (isString(response)) {
if (response.match(/^\)\]\}',\n/)) response=response.substr(6);
@ -14548,9 +14633,9 @@ angularServiceInject('$xhr', function($browser, $error, $log, $updateView){
}
}
if (200 <= code && code < 300) {
success(code, response);
success(code, response, responseHeaders);
} else if (isFunction(error)) {
error(code, response);
error(code, response, responseHeaders);
} else {
$error(
{method: method, url: url, data: post, success: success},
@ -14837,7 +14922,7 @@ angularDirective("ng:bind", function(expression, element){
error = formatError(e);
});
this.$element = oldElement;
// If we are HTML than save the raw HTML data so that we don't
// If we are HTML then save the raw HTML data so that we don't
// recompute sanitization since it is expensive.
// TODO: turn this into a more generic way to compute this
if (isHtml = (value instanceof HTML))
@ -15143,9 +15228,14 @@ function ngClass(selector) {
var existing = element[0].className + ' ';
return function(element){
this.$onEval(function(){
if (selector(this.$index)) {
var value = this.$eval(expression);
var scope = this;
if (selector(scope.$index)) {
var ngClassVal = scope.$eval(element.attr('ng:class') || '');
if (isArray(ngClassVal)) ngClassVal = ngClassVal.join(' ');
var value = scope.$eval(expression);
if (isArray(value)) value = value.join(' ');
if (ngClassVal && ngClassVal !== value) value = value + ' ' + ngClassVal;
element[0].className = trim(existing + value);
}
}, element);
@ -15305,7 +15395,7 @@ angularDirective("ng:class-even", ngClass(function(i){return i % 2 === 1;}));
angularDirective("ng:show", function(expression, element){
return function(element){
this.$onEval(function(){
toBoolean(this.$eval(expression)) ? element.show() : element.hide();
element.css('display', toBoolean(this.$eval(expression)) ? '' : 'none');
}, element);
};
});
@ -15346,7 +15436,7 @@ angularDirective("ng:show", function(expression, element){
angularDirective("ng:hide", function(expression, element){
return function(element){
this.$onEval(function(){
toBoolean(this.$eval(expression)) ? element.hide() : element.show();
element.css('display', toBoolean(this.$eval(expression)) ? 'none' : '');
}, element);
};
});
@ -15415,8 +15505,8 @@ angularDirective("ng:style", function(expression, element){
* Markup extensions do not themselves produce linking functions. Think of markup as a way to
* produce shorthand for a {@link angular.widget widget} or a {@link angular.directive directive}.
*
* The most prominent example of an markup in angular is the built-in double curly markup
* `{{expression}}`, which is a shorthand for `<span ng:bind="expression"></span>`.
* The most prominent example of a markup in angular is the built-in double curly markup
* `{{expression}}`, which is shorthand for `<span ng:bind="expression"></span>`.
*
* Create custom markup like this:
*
@ -15437,7 +15527,7 @@ angularDirective("ng:style", function(expression, element){
* @description
*
* Attribute markup extends the angular compiler in a very similar way as {@link angular.markup}
* except that it allows you to modify the state of the attribute text rather then the content of a
* except that it allows you to modify the state of the attribute text rather than the content of a
* node.
*
* Create custom attribute markup like this:
@ -15541,7 +15631,7 @@ angularTextMarkup('option', function(text, textNode, parentElement){
*
* @description
* Using <angular/> markup like {{hash}} in an href attribute makes
* the page open to a wrong URL, ff the user clicks that link before
* the page open to a wrong URL, if the user clicks that link before
* angular has a chance to replace the {{hash}} with actual URL, the
* link will be broken and will most likely return a 404 error.
* The `ng:href` solves this problem by placing the `href` in the
@ -15654,7 +15744,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* </div>
* </pre>
*
* the HTML specs do not require browsers preserve the special attributes such as disabled.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as disabled.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:disabled.
*
@ -15684,7 +15775,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:checked
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as checked.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as checked.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:checked.
* @example
@ -15713,7 +15805,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:multiple
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as multiple.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as multiple.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:multiple.
*
@ -15748,7 +15841,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:readonly
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as readonly.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as readonly.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:readonly.
* @example
@ -15777,7 +15871,8 @@ angularTextMarkup('option', function(text, textNode, parentElement){
* @name angular.directive.ng:selected
*
* @description
* the HTML specs do not require browsers preserve the special attributes such as selected.(The presense of them means true and absense means false)
* The HTML specs do not require browsers to preserve the special attributes such as selected.
* (The presence of them means true and absence means false)
* This prevents the angular compiler from correctly retrieving the binding expression.
* To solve this problem, we introduce ng:selected.
* @example
@ -15831,7 +15926,7 @@ angularAttrMarkup('{{}}', function(value, name, element){
* @name angular.widget
* @description
*
* An angular widget can be either a custom attribute that modifies an existing DOM elements or an
* An angular widget can be either a custom attribute that modifies an existing DOM element or an
* entirely new DOM element.
*
* During html compilation, widgets are processed after {@link angular.markup markup}, but before
@ -15864,7 +15959,7 @@ angularAttrMarkup('{{}}', function(value, name, element){
* @description
* The most common widgets you will use will be in the form of the
* standard HTML set. These widgets are bound using the `name` attribute
* to an expression. In addition they can have `ng:validate`, `ng:required`,
* to an expression. In addition, they can have `ng:validate`, `ng:required`,
* `ng:format`, `ng:change` attribute to further control their behavior.
*
* @usageContent
@ -16117,7 +16212,7 @@ function compileFormatter(expr) {
*
* @description
* The `ng:format` attribute widget formats stored data to user-readable text and parses the text
* back to the stored form. You might find this useful for example if you collect user input in a
* back to the stored form. You might find this useful, for example, if you collect user input in a
* text field but need to store the data in the model as a list. Check out
* {@link angular.formatter formatters} to learn more.
*
@ -16262,7 +16357,7 @@ function noopAccessor() { return { get: noop, set: noop }; }
/*
* TODO: refactor
*
* The table bellow is not quite right. In some cases the formatter is on the model side
* The table below is not quite right. In some cases the formatter is on the model side
* and in some cases it is on the view side. This is a historical artifact
*
* The concept of model/view accessor is useful for anyone who is trying to develop UI, and
@ -16272,16 +16367,11 @@ function noopAccessor() { return { get: noop, set: noop }; }
*
*/
var textWidget = inputWidget('keydown change', modelAccessor, valueAccessor, initWidgetValue(), true),
buttonWidget = inputWidget('click', noopAccessor, noopAccessor, noop),
INPUT_TYPE = {
'text': textWidget,
'textarea': textWidget,
'hidden': textWidget,
'password': textWidget,
'button': buttonWidget,
'submit': buttonWidget,
'reset': buttonWidget,
'image': buttonWidget,
'checkbox': inputWidget('click', modelFormattedAccessor, checkedAccessor, initWidgetValue(false)),
'radio': inputWidget('click', modelFormattedAccessor, radioAccessor, radioInit),
'select-one': inputWidget('change', modelAccessor, valueAccessor, initWidgetValue(null)),
@ -16392,7 +16482,7 @@ function inputWidgetSelector(element){
angularWidget('input', inputWidgetSelector);
angularWidget('textarea', inputWidgetSelector);
angularWidget('button', inputWidgetSelector);
/**
* @workInProgress
@ -16563,7 +16653,7 @@ angularWidget('select', function(element){
var optionGroup,
collection = valuesFn(scope) || [],
key = selectElement.val(),
tempScope = scope.$new(),
tempScope = inherit(scope),
value, optionElement, index, groupIndex, length, groupLength;
try {
@ -16621,7 +16711,7 @@ angularWidget('select', function(element){
fragment,
groupIndex, index,
optionElement,
optionScope = scope.$new(),
optionScope = inherit(scope),
modelValue = model.get(),
selected,
selectedSet = false, // nothing is selected yet
@ -16785,7 +16875,7 @@ angularWidget('select', function(element){
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<select name="url">
<option value="examples/ng-include/template1.html">template1.html</option>
<option value="examples/ng-include/template2.html">template2.html</option>
@ -17166,12 +17256,12 @@ angularWidget('@ng:repeat', function(expression, element){
* Sometimes it is necessary to write code which looks like bindings but which should be left alone
* by angular. Use `ng:non-bindable` to make angular ignore a chunk of HTML.
*
* NOTE: `ng:non-bindable` looks like a directive, but is actually an attribute widget.
* Note: `ng:non-bindable` looks like a directive, but is actually an attribute widget.
*
* @element ANY
*
* @example
* In this example there are two location where a siple binding (`{{}}`) is present, but the one
* In this example there are two location where a simple binding (`{{}}`) is present, but the one
* wrapped in `ng:non-bindable` is left alone.
*
* @example
@ -17219,7 +17309,7 @@ angularWidget("@ng:non-bindable", noop);
*
* @example
<doc:example>
<doc:source>
<doc:source jsfiddle="false">
<script>
function MyCtrl($route) {
$route.when('/overview',
@ -17302,15 +17392,7 @@ angularWidget('ng:view', function(element) {
'use strict';
var browserSingleton;
/**
* @workInProgress
* @ngdoc service
* @name angular.service.$browser
* @requires $log
*
* @description
* Represents the browser.
*/
angularService('$browser', function($log){
if (!browserSingleton) {
browserSingleton = new Browser(window, jqLite(window.document), jqLite(window.document.body),