Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Basic structure + AngularJS, Jasmine

  • Loading branch information...
commit dc775079cd56fe367f82b66abd3a0675a8577054 1 parent 46a3c59
@vojtajina authored
Showing with 46,094 additions and 0 deletions.
  1. +13 −0 app/index.html
  2. +1 −0  app/js/app.js
  3. +171 −0 app/lib/angular/angular-cookies.js
  4. +7 −0 app/lib/angular/angular-cookies.min.js
  5. +276 −0 app/lib/angular/angular-loader.js
  6. +7 −0 app/lib/angular/angular-loader.min.js
  7. +428 −0 app/lib/angular/angular-resource.js
  8. +10 −0 app/lib/angular/angular-resource.min.js
  9. +532 −0 app/lib/angular/angular-sanitize.js
  10. +13 −0 app/lib/angular/angular-sanitize.min.js
  11. +13,838 −0 app/lib/angular/angular.js
  12. +154 −0 app/lib/angular/angular.min.js
  13. +1 −0  app/lib/angular/version.txt
  14. +243 −0 scripts/web-server.js
  15. +1,690 −0 test/lib/angular/angular-mocks.js
  16. +25,448 −0 test/lib/angular/angular-scenario.js
  17. +185 −0 test/lib/angular/jstd-scenario-adapter.js
  18. +1 −0  test/lib/angular/version.txt
  19. +20 −0 test/lib/jasmine/MIT.LICENSE
  20. +180 −0 test/lib/jasmine/index.js
  21. +190 −0 test/lib/jasmine/jasmine-html.js
  22. +166 −0 test/lib/jasmine/jasmine.css
  23. +2,476 −0 test/lib/jasmine/jasmine.js
  24. BIN  test/lib/jasmine/jasmine_favicon.png
  25. +1 −0  test/lib/jasmine/version.txt
  26. +43 −0 test/unit/testacular.conf
View
13 app/index.html
@@ -0,0 +1,13 @@
+<!doctype html>
+<html lang="en" ng-app="TD">
+<head>
+ <meta charset="utf-8">
+ <title>TextDrive</title>
+</head>
+<body>
+
+<script src="lib/angular/angular.js" type="text/javascript"></script>
+<script src="js/app.js" type="text/javascript"></script>
+
+</body>
+</html>
View
1  app/js/app.js
@@ -0,0 +1 @@
+angular.module('TD', []);
View
171 app/lib/angular/angular-cookies.js
@@ -0,0 +1,171 @@
+/**
+ * @license AngularJS v1.0.0rc9
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name angular.module.ngCookies
+ */
+
+
+angular.module('ngCookies', ['ng']).
+ /**
+ * @ngdoc object
+ * @name angular.module.ngCookies.$cookies
+ * @requires $browser
+ *
+ * @description
+ * Provides read/write access to browser's cookies.
+ *
+ * Only a simple Object is exposed and by adding or removing properties to/from
+ * this object, new cookies are created/deleted at the end of current $eval.
+ *
+ * @example
+ */
+ factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
+ var cookies = {},
+ lastCookies = {},
+ lastBrowserCookies,
+ runEval = false,
+ copy = angular.copy,
+ isUndefined = angular.isUndefined;
+
+ //creates a poller fn that copies all cookies from the $browser to service & inits the service
+ $browser.addPollFn(function() {
+ var currentCookies = $browser.cookies();
+ if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+ lastBrowserCookies = currentCookies;
+ copy(currentCookies, lastCookies);
+ copy(currentCookies, cookies);
+ if (runEval) $rootScope.$apply();
+ }
+ })();
+
+ runEval = true;
+
+ //at the end of each eval, push cookies
+ //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+ // strings or browser refuses to store some cookies, we update the model in the push fn.
+ $rootScope.$watch(push);
+
+ return cookies;
+
+
+ /**
+ * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
+ */
+ function push() {
+ var name,
+ value,
+ browserCookies,
+ updated;
+
+ //delete any cookies deleted in $cookies
+ for (name in lastCookies) {
+ if (isUndefined(cookies[name])) {
+ $browser.cookies(name, undefined);
+ }
+ }
+
+ //update all cookies updated in $cookies
+ for(name in cookies) {
+ value = cookies[name];
+ if (!angular.isString(value)) {
+ if (angular.isDefined(lastCookies[name])) {
+ cookies[name] = lastCookies[name];
+ } else {
+ delete cookies[name];
+ }
+ } else if (value !== lastCookies[name]) {
+ $browser.cookies(name, value);
+ updated = true;
+ }
+ }
+
+ //verify what was actually stored
+ if (updated){
+ updated = false;
+ browserCookies = $browser.cookies();
+
+ for (name in cookies) {
+ if (cookies[name] !== browserCookies[name]) {
+ //delete or reset all cookies that the browser dropped from $cookies
+ if (isUndefined(browserCookies[name])) {
+ delete cookies[name];
+ } else {
+ cookies[name] = browserCookies[name];
+ }
+ updated = true;
+ }
+ }
+ }
+ }
+ }]).
+
+
+ /**
+ * @ngdoc object
+ * @name angular.module.ngCookies.$cookieStore
+ * @requires $cookies
+ *
+ * @description
+ * Provides a key-value (string-object) storage, that is backed by session cookies.
+ * Objects put or retrieved from this storage are automatically serialized or
+ * deserialized by angular's toJson/fromJson.
+ * @example
+ */
+ factory('$cookieStore', ['$cookies', function($cookies) {
+
+ return {
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#get
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Returns the value of given cookie key
+ *
+ * @param {string} key Id to use for lookup.
+ * @returns {Object} Deserialized cookie value.
+ */
+ get: function(key) {
+ return angular.fromJson($cookies[key]);
+ },
+
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#put
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Sets a value for given cookie key
+ *
+ * @param {string} key Id for the `value`.
+ * @param {Object} value Value to be stored.
+ */
+ put: function(key, value) {
+ $cookies[key] = angular.toJson(value);
+ },
+
+ /**
+ * @ngdoc method
+ * @name angular.module.ngCookies.$cookieStore#remove
+ * @methodOf angular.module.ngCookies.$cookieStore
+ *
+ * @description
+ * Remove given cookie
+ *
+ * @param {string} key Id of the key-value pair to delete.
+ */
+ remove: function(key) {
+ delete $cookies[key];
+ }
+ };
+
+ }]);
+
+})(window, window.angular);
View
7 app/lib/angular/angular-cookies.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.0rc9
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(m,f,l){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,c){var b={},g={},h,i=!1,j=f.copy,k=f.isUndefined;c.addPollFn(function(){var a=c.cookies();h!=a&&(h=a,j(a,g),j(a,b),i&&d.$apply())})();i=!0;d.$watch(function(){var a,e,d;for(a in g)k(b[a])&&c.cookies(a,l);for(a in b)e=b[a],f.isString(e)?e!==g[a]&&(c.cookies(a,e),d=!0):f.isDefined(g[a])?b[a]=g[a]:delete b[a];if(d)for(a in e=c.cookies(),b)b[a]!==e[a]&&(k(e[a])?delete b[a]:b[a]=e[a])});return b}]).factory("$cookieStore",
+["$cookies",function(d){return{get:function(c){return f.fromJson(d[c])},put:function(c,b){d[c]=f.toJson(b)},remove:function(c){delete d[c]}}}])})(window,window.angular);
View
276 app/lib/angular/angular-loader.js
@@ -0,0 +1,276 @@
+/**
+ * @license AngularJS v1.0.0rc9
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+(
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+ function ensure(obj, name, factory) {
+ return obj[name] || (obj[name] = factory());
+ }
+
+ return ensure(ensure(window, 'angular', Object), 'module', function() {
+ /** @type {Object.<string, angular.Module>} */
+ var modules = {};
+
+ /**
+ * @ngdoc function
+ * @name angular.module
+ * @description
+ *
+ * The `angular.module` is a global place for creating and registering Angular modules. All
+ * modules (angular core or 3rd party) that should be available to an application must be
+ * registered using this mechanism.
+ *
+ *
+ * # Module
+ *
+ * A module is a collocation of services, directives, filters, and configure information. Module
+ * is used to configure the {@link angular.module.AUTO.$injector $injector}.
+ *
+ * <pre>
+ * // Create a new module
+ * var myModule = angular.module('myModule', []);
+ *
+ * // register a new service
+ * myModule.value('appName', 'MyCoolApp');
+ *
+ * // configure existing services inside initialization blocks.
+ * myModule.config(function($locationProvider) {
+'use strict';
+ * // Configure existing providers
+ * $locationProvider.hashPrefix('!');
+ * });
+ * </pre>
+ *
+ * Then you can create an injector and load your modules like this:
+ *
+ * <pre>
+ * var injector = angular.injector(['ng', 'MyModule'])
+ * </pre>
+ *
+ * However it's more likely that you'll just use
+ * {@link angular.module.ng.$compileProvider.directive.ngApp ngApp} or
+ * {@link angular.bootstrap} to simplify this process for you.
+ *
+ * @param {!string} name The name of the module to create or retrieve.
+ * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
+ * the module is being retrieved for further configuration.
+ * @param {Function} configFn Option configuration function for the module. Same as
+ * {@link angular.Module#config Module#config()}.
+ * @returns {module} new module with the {@link angular.Module} api.
+ */
+ return function module(name, requires, configFn) {
+ if (requires && modules.hasOwnProperty(name)) {
+ modules[name] = null;
+ }
+ return ensure(modules, name, function() {
+ if (!requires) {
+ throw Error('No module: ' + name);
+ }
+
+ /** @type {!Array.<Array.<*>>} */
+ var invokeQueue = [];
+
+ /** @type {!Array.<Function>} */
+ var runBlocks = [];
+
+ var config = invokeLater('$injector', 'invoke');
+
+ /** @type {angular.Module} */
+ var moduleInstance = {
+ // Private state
+ _invokeQueue: invokeQueue,
+ _runBlocks: runBlocks,
+
+ /**
+ * @ngdoc property
+ * @name angular.Module#requires
+ * @propertyOf angular.Module
+ * @returns {Array.<string>} List of module names which must be loaded before this module.
+ * @description
+ * Holds the list of modules which the injector will load before the current module is loaded.
+ */
+ requires: requires,
+
+ /**
+ * @ngdoc property
+ * @name angular.Module#name
+ * @propertyOf angular.Module
+ * @returns {string} Name of the module.
+ * @description
+ */
+ name: name,
+
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#provider
+ * @methodOf angular.Module
+ * @param {string} name service name
+ * @param {Function} providerType Construction function for creating new instance of the service.
+ * @description
+ * See {@link angular.module.AUTO.$provide#provider $provide.provider()}.
+ */
+ provider: invokeLater('$provide', 'provider'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#factory
+ * @methodOf angular.Module
+ * @param {string} name service name
+ * @param {Function} providerFunction Function for creating new instance of the service.
+ * @description
+ * See {@link angular.module.AUTO.$provide#factory $provide.factory()}.
+ */
+ factory: invokeLater('$provide', 'factory'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#service
+ * @methodOf angular.Module
+ * @param {string} name service name
+ * @param {Function} constructor A constructor function that will be instantiated.
+ * @description
+ * See {@link angular.module.AUTO.$provide#service $provide.service()}.
+ */
+ service: invokeLater('$provide', 'service'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#value
+ * @methodOf angular.Module
+ * @param {string} name service name
+ * @param {*} object Service instance object.
+ * @description
+ * See {@link angular.module.AUTO.$provide#value $provide.value()}.
+ */
+ value: invokeLater('$provide', 'value'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#constant
+ * @methodOf angular.Module
+ * @param {string} name constant name
+ * @param {*} object Constant value.
+ * @description
+ * Because the constant are fixed, they get applied before other provide methods.
+ * See {@link angular.module.AUTO.$provide#constant $provide.constant()}.
+ */
+ constant: invokeLater('$provide', 'constant', 'unshift'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#filter
+ * @methodOf angular.Module
+ * @param {string} name Filter name.
+ * @param {Function} filterFactory Factory function for creating new instance of filter.
+ * @description
+ * See {@link angular.module.ng.$filterProvider#register $filterProvider.register()}.
+ */
+ filter: invokeLater('$filterProvider', 'register'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#controller
+ * @methodOf angular.Module
+ * @param {string} name Controller name.
+ * @param {Function} constructor Controller constructor function.
+ * @description
+ * See {@link angular.module.ng.$controllerProvider#register $controllerProvider.register()}.
+ */
+ controller: invokeLater('$controllerProvider', 'register'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#directive
+ * @methodOf angular.Module
+ * @param {string} name directive name
+ * @param {Function} directiveFactory Factory function for creating new instance of
+ * directives.
+ * @description
+ * See {@link angular.module.ng.$compileProvider.directive $compileProvider.directive()}.
+ */
+ directive: invokeLater('$compileProvider', 'directive'),
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#config
+ * @methodOf angular.Module
+ * @param {Function} configFn Execute this function on module load. Useful for service
+ * configuration.
+ * @description
+ * Use this method to register work which needs to be performed on module loading.
+ */
+ config: config,
+
+ /**
+ * @ngdoc method
+ * @name angular.Module#run
+ * @methodOf angular.Module
+ * @param {Function} initializationFn Execute this function after injector creation.
+ * Useful for application initialization.
+ * @description
+ * Use this method to register work which needs to be performed when the injector with
+ * with the current module is finished loading.
+ */
+ run: function(block) {
+ runBlocks.push(block);
+ return this;
+ }
+ };
+
+ if (configFn) {
+ config(configFn);
+ }
+
+ return moduleInstance;
+
+ /**
+ * @param {string} provider
+ * @param {string} method
+ * @param {String=} insertMethod
+ * @returns {angular.Module}
+ */
+ function invokeLater(provider, method, insertMethod) {
+ return function() {
+ invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+ return moduleInstance;
+ }
+ }
+ });
+ };
+ });
+
+}
+)(window);
+
+/**
+ * Closure compiler type information
+ *
+ * @typedef { {
+ * requires: !Array.<string>,
+ * invokeQueue: !Array.<Array.<*>>,
+ *
+ * service: function(string, Function):angular.Module,
+ * factory: function(string, Function):angular.Module,
+ * value: function(string, *):angular.Module,
+ *
+ * filter: function(string, Function):angular.Module,
+ *
+ * init: function(Function):angular.Module
+ * } }
+ */
+angular.Module;
+
View
7 app/lib/angular/angular-loader.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.0rc9
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(i){'use strict';function d(c,b,e){return c[b]||(c[b]=e())}return d(d(i,"angular",Object),"module",function(){var c={};return function(b,e,f){e&&c.hasOwnProperty(b)&&(c[b]=null);return d(c,b,function(){function a(a,b,d){return function(){c[d||"push"]([a,b,arguments]);return g}}if(!e)throw Error("No module: "+b);var c=[],d=[],h=a("$injector","invoke"),g={_invokeQueue:c,_runBlocks:d,requires:e,name:b,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),
+value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:h,run:function(a){d.push(a);return this}};f&&h(f);return g})}})})(window);
View
428 app/lib/angular/angular-resource.js
@@ -0,0 +1,428 @@
+/**
+ * @license AngularJS v1.0.0rc9
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name angular.module.ngResource
+ * @description
+ */
+
+ /**
+ * @ngdoc object
+ * @name angular.module.ngResource.$resource
+ * @requires $http
+ *
+ * @description
+ * A factory which creates a resource object that lets you interact with
+ * [RESTful](http://en.wikipedia.org/wiki/Representational_State_Transfer) server-side data sources.
+ *
+ * The returned resource object has action methods which provide high-level behaviors without
+ * the need to interact with the low level {@link angular.module.ng.$http $http} service.
+ *
+ * @param {string} url A parameterized URL template with parameters prefixed by `:` as in
+ * `/user/:username`.
+ *
+ * @param {Object=} paramDefaults Default values for `url` parameters. These can be overridden in
+ * `actions` methods.
+ *
+ * Each key value in the parameter object is first bound to url template if present and then any
+ * excess keys are appended to the url search query after the `?`.
+ *
+ * Given a template `/path/:verb` and parameter `{verb:'greet', salutation:'Hello'}` results in
+ * URL `/path/greet?salutation=Hello`.
+ *
+ * If the parameter value is prefixed with `@` then the value of that parameter is extracted from
+ * the data object (useful for non-GET operations).
+ *
+ * @param {Object.<Object>=} actions Hash with declaration of custom action that should extend the
+ * default set of resource actions. The declaration should be created in the following format:
+ *
+ * {action1: {method:?, params:?, isArray:?},
+ * action2: {method:?, params:?, isArray:?},
+ * ...}
+ *
+ * Where:
+ *
+ * - `action` – {string} – The name of action. This name becomes the name of the method on your
+ * resource object.
+ * - `method` – {string} – HTTP request method. Valid methods are: `GET`, `POST`, `PUT`, `DELETE`,
+ * and `JSONP`
+ * - `params` – {object=} – Optional set of pre-bound parameters for this action.
+ * - isArray – {boolean=} – If true then the returned object for this action is an array, see
+ * `returns` section.
+ *
+ * @returns {Object} A resource "class" object with methods for the default set of resource actions
+ * optionally extended with custom `actions`. The default set contains these actions:
+ *
+ * { 'get': {method:'GET'},
+ * 'save': {method:'POST'},
+ * 'query': {method:'GET', isArray:true},
+ * 'remove': {method:'DELETE'},
+ * 'delete': {method:'DELETE'} };
+ *
+ * Calling these methods invoke an {@link angular.module.ng.$http} with the specified http method,
+ * destination and parameters. When the data is returned from the server then the object is an
+ * instance of the resource class `save`, `remove` and `delete` actions are available on it as
+ * methods with the `$` prefix. This allows you to easily perform CRUD operations (create, read,
+ * update, delete) on server-side data like this:
+ * <pre>
+ var User = $resource('/user/:userId', {userId:'@id'});
+ var user = User.get({userId:123}, function() {
+ user.abc = true;
+ user.$save();
+ });
+ </pre>
+ *
+ * It is important to realize that invoking a $resource object method immediately returns an
+ * empty reference (object or array depending on `isArray`). Once the data is returned from the
+ * server the existing reference is populated with the actual data. This is a useful trick since
+ * usually the resource is assigned to a model which is then rendered by the view. Having an empty
+ * object results in no rendering, once the data arrives from the server then the object is
+ * populated with the data and the view automatically re-renders itself showing the new data. This
+ * means that in most case one never has to write a callback function for the action methods.
+ *
+ * The action methods on the class object or instance object can be invoked with the following
+ * parameters:
+ *
+ * - HTTP GET "class" actions: `Resource.action([parameters], [success], [error])`
+ * - non-GET "class" actions: `Resource.action([parameters], postData, [success], [error])`
+ * - non-GET instance actions: `instance.$action([parameters], [success], [error])`
+ *
+ *
+ * @example
+ *
+ * # Credit card resource
+ *
+ * <pre>
+ // Define CreditCard class
+ var CreditCard = $resource('/user/:userId/card/:cardId',
+ {userId:123, cardId:'@id'}, {
+ charge: {method:'POST', params:{charge:true}}
+ });
+
+ // We can retrieve a collection from the server
+ var cards = CreditCard.query(function() {
+ // GET: /user/123/card
+ // server returns: [ {id:456, number:'1234', name:'Smith'} ];
+
+ var card = cards[0];
+ // each item is an instance of CreditCard
+ expect(card instanceof CreditCard).toEqual(true);
+ card.name = "J. Smith";
+ // non GET methods are mapped onto the instances
+ card.$save();
+ // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
+ // server returns: {id:456, number:'1234', name: 'J. Smith'};
+
+ // our custom method is mapped as well.
+ card.$charge({amount:9.99});
+ // POST: /user/123/card/456?amount=9.99&charge=true {id:456, number:'1234', name:'J. Smith'}
+ });
+
+ // we can create an instance as well
+ var newCard = new CreditCard({number:'0123'});
+ newCard.name = "Mike Smith";
+ newCard.$save();
+ // POST: /user/123/card {number:'0123', name:'Mike Smith'}
+ // server returns: {id:789, number:'01234', name: 'Mike Smith'};
+ expect(newCard.id).toEqual(789);
+ * </pre>
+ *
+ * The object returned from this function execution is a resource "class" which has "static" method
+ * for each action in the definition.
+ *
+ * Calling these methods invoke `$http` on the `url` template with the given `method` and `params`.
+ * When the data is returned from the server then the object is an instance of the resource type and
+ * all of the non-GET methods are available with `$` prefix. This allows you to easily support CRUD
+ * operations (create, read, update, delete) on server-side data.
+
+ <pre>
+ var User = $resource('/user/:userId', {userId:'@id'});
+ var user = User.get({userId:123}, function() {
+ user.abc = true;
+ user.$save();
+ });
+ </pre>
+ *
+ * It's worth noting that the success callback for `get`, `query` and other method gets passed
+ * in the response that came from the server as well as $http header getter function, so one
+ * could rewrite the above example and get access to http headers as:
+ *
+ <pre>
+ var User = $resource('/user/:userId', {userId:'@id'});
+ User.get({userId:123}, function(u, getResponseHeaders){
+ u.abc = true;
+ u.$save(function(u, putResponseHeaders) {
+ //u => saved user object
+ //putResponseHeaders => $http header getter
+ });
+ });
+ </pre>
+
+ * # Buzz client
+
+ Let's look at what a buzz client created with the `$resource` service looks like:
+ <doc:example>
+ <doc:source jsfiddle="false">
+ <script>
+ function BuzzController($resource) {
+ this.userId = 'googlebuzz';
+ this.Activity = $resource(
+ 'https://www.googleapis.com/buzz/v1/activities/:userId/:visibility/:activityId/:comments',
+ {alt:'json', callback:'JSON_CALLBACK'},
+ {get:{method:'JSONP', params:{visibility:'@self'}}, replies: {method:'JSONP', params:{visibility:'@self', comments:'@comments'}}}
+ );
+ }
+
+ BuzzController.prototype = {
+ fetch: function() {
+ this.activities = this.Activity.get({userId:this.userId});
+ },
+ expandReplies: function(activity) {
+ activity.replies = this.Activity.replies({userId:this.userId, activityId:activity.id});
+ }
+ };
+ BuzzController.$inject = ['$resource'];
+ </script>
+
+ <div ng-controller="BuzzController">
+ <input ng-model="userId"/>
+ <button ng-click="fetch()">fetch</button>
+ <hr/>
+ <div ng-repeat="item in activities.data.items">
+ <h1 style="font-size: 15px;">
+ <img src="{{item.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+ <a href="{{item.actor.profileUrl}}">{{item.actor.name}}</a>
+ <a href ng-click="expandReplies(item)" style="float: right;">Expand replies: {{item.links.replies[0].count}}</a>
+ </h1>
+ {{item.object.content | html}}
+ <div ng-repeat="reply in item.replies.data.items" style="margin-left: 20px;">
+ <img src="{{reply.actor.thumbnailUrl}}" style="max-height:30px;max-width:30px;"/>
+ <a href="{{reply.actor.profileUrl}}">{{reply.actor.name}}</a>: {{reply.content | html}}
+ </div>
+ </div>
+ </div>
+ </doc:source>
+ <doc:scenario>
+ </doc:scenario>
+ </doc:example>
+ */
+angular.module('ngResource', ['ng']).
+ factory('$resource', ['$http', '$parse', function($http, $parse) {
+ var DEFAULT_ACTIONS = {
+ 'get': {method:'GET'},
+ 'save': {method:'POST'},
+ 'query': {method:'GET', isArray:true},
+ 'remove': {method:'DELETE'},
+ 'delete': {method:'DELETE'}
+ };
+ var noop = angular.noop,
+ forEach = angular.forEach,
+ extend = angular.extend,
+ copy = angular.copy,
+ isFunction = angular.isFunction,
+ getter = function(obj, path) {
+ return $parse(path)(obj);
+ };
+
+ /**
+ * 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
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriSegment(val) {
+ return encodeUriQuery(val, true).
+ replace(/%26/gi, '&').
+ replace(/%3D/gi, '=').
+ replace(/%2B/gi, '+');
+ }
+
+
+ /**
+ * This method is intended for encoding *key* or *value* parts of query component. We need a custom
+ * method becuase encodeURIComponent is too agressive and encodes stuff that doesn't have to be
+ * encoded per http://tools.ietf.org/html/rfc3986:
+ * query = *( pchar / "/" / "?" )
+ * pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
+ * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
+ * pct-encoded = "%" HEXDIG HEXDIG
+ * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
+ * / "*" / "+" / "," / ";" / "="
+ */
+ function encodeUriQuery(val, pctEncodeSpaces) {
+ return encodeURIComponent(val).
+ replace(/%40/gi, '@').
+ replace(/%3A/gi, ':').
+ replace(/%24/g, '$').
+ replace(/%2C/gi, ',').
+ replace((pctEncodeSpaces ? null : /%20/g), '+');
+ }
+
+ function Route(template, defaults) {
+ this.template = template = template + '#';
+ this.defaults = defaults || {};
+ var urlParams = this.urlParams = {};
+ forEach(template.split(/\W/), function(param){
+ if (param && template.match(new RegExp("[^\\\\]:" + param + "\\W"))) {
+ urlParams[param] = true;
+ }
+ });
+ this.template = template.replace(/\\:/g, ':');
+ }
+
+ Route.prototype = {
+ url: function(params) {
+ var self = this,
+ url = this.template,
+ encodedVal;
+
+ params = params || {};
+ forEach(this.urlParams, function(_, urlParam){
+ encodedVal = encodeUriSegment(params[urlParam] || self.defaults[urlParam] || "");
+ url = url.replace(new RegExp(":" + urlParam + "(\\W)"), encodedVal + "$1");
+ });
+ url = url.replace(/\/?#$/, '');
+ var query = [];
+ forEach(params, function(value, key){
+ if (!self.urlParams[key]) {
+ query.push(encodeUriQuery(key) + '=' + encodeUriQuery(value));
+ }
+ });
+ query.sort();
+ url = url.replace(/\/*$/, '');
+ return url + (query.length ? '?' + query.join('&') : '');
+ }
+ };
+
+
+ function ResourceFactory(url, paramDefaults, actions) {
+ var route = new Route(url);
+
+ actions = extend({}, DEFAULT_ACTIONS, actions);
+
+ function extractParams(data){
+ var ids = {};
+ forEach(paramDefaults || {}, function(value, key){
+ ids[key] = value.charAt && value.charAt(0) == '@' ? getter(data, value.substr(1)) : value;
+ });
+ return ids;
+ }
+
+ function Resource(value){
+ copy(value || {}, this);
+ }
+
+ forEach(actions, function(action, name) {
+ var hasBody = action.method == 'POST' || action.method == 'PUT' || action.method == 'PATCH';
+ Resource[name] = function(a1, a2, a3, a4) {
+ var params = {};
+ var data;
+ var success = noop;
+ var error = null;
+ switch(arguments.length) {
+ 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
+ } else {
+ params = a1;
+ data = a2;
+ success = a3;
+ break;
+ }
+ case 1:
+ if (isFunction(a1)) success = a1;
+ else if (hasBody) data = a1;
+ else params = a1;
+ break;
+ case 0: break;
+ default:
+ throw "Expected between 0-4 arguments [params, data, success, error], got " +
+ arguments.length + " arguments.";
+ }
+
+ var value = this instanceof Resource ? this : (action.isArray ? [] : new Resource(data));
+ $http({
+ method: action.method,
+ url: route.url(extend({}, extractParams(data), action.params || {}, params)),
+ data: data
+ }).then(function(response) {
+ var data = response.data;
+
+ if (data) {
+ if (action.isArray) {
+ value.length = 0;
+ forEach(data, function(item) {
+ value.push(new Resource(item));
+ });
+ } else {
+ copy(data, value);
+ }
+ }
+ (success||noop)(value, response.headers);
+ }, error);
+
+ return value;
+ };
+
+
+ Resource.bind = function(additionalParamDefaults){
+ return ResourceFactory(url, extend({}, paramDefaults, additionalParamDefaults), actions);
+ };
+
+
+ Resource.prototype['$' + name] = function(a1, a2, a3) {
+ var params = extractParams(this),
+ success = noop,
+ error;
+
+ switch(arguments.length) {
+ case 3: params = a1; success = a2; error = a3; break;
+ case 2:
+ case 1:
+ if (isFunction(a1)) {
+ success = a1;
+ error = a2;
+ } else {
+ params = a1;
+ success = a2 || noop;
+ }
+ case 0: break;
+ default:
+ throw "Expected between 1-3 arguments [params, success, error], got " +
+ arguments.length + " arguments.";
+ }
+ var data = hasBody ? this : undefined;
+ Resource[name].call(this, params, data, success, error);
+ };
+ });
+ return Resource;
+ }
+
+ return ResourceFactory;
+ }]);
+
+})(window, window.angular);
View
10 app/lib/angular/angular-resource.min.js
@@ -0,0 +1,10 @@
+/*
+ AngularJS v1.0.0rc9
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(A,f,u){'use strict';f.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(v,w){function g(b,c){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(c?null:/%20/g,"+")}function l(b,c){this.template=b+="#";this.defaults=c||{};var a=this.urlParams={};j(b.split(/\W/),function(c){c&&b.match(RegExp("[^\\\\]:"+c+"\\W"))&&(a[c]=!0)});this.template=b.replace(/\\:/g,":")}function s(b,c,a){function f(d){var b=
+{};j(c||{},function(a,x){var m;a.charAt&&a.charAt(0)=="@"?(m=a.substr(1),m=w(m)(d)):m=a;b[x]=m});return b}function e(a){t(a||{},this)}var y=new l(b),a=r({},z,a);j(a,function(d,g){var l=d.method=="POST"||d.method=="PUT"||d.method=="PATCH";e[g]=function(a,b,c,g){var i={},h,k=o,p=null;switch(arguments.length){case 4:p=g,k=c;case 3:case 2:if(q(b)){if(q(a)){k=a;p=b;break}k=b;p=c}else{i=a;h=b;k=c;break}case 1:q(a)?k=a:l?h=a:i=a;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+
+arguments.length+" arguments.";}var n=this instanceof e?this:d.isArray?[]:new e(h);v({method:d.method,url:y.url(r({},f(h),d.params||{},i)),data:h}).then(function(a){var b=a.data;if(b)d.isArray?(n.length=0,j(b,function(a){n.push(new e(a))})):t(b,n);(k||o)(n,a.headers)},p);return n};e.bind=function(d){return s(b,r({},c,d),a)};e.prototype["$"+g]=function(a,b,d){var c=f(this),i=o,h;switch(arguments.length){case 3:c=a;i=b;h=d;break;case 2:case 1:q(a)?(i=a,h=b):(c=a,i=b||o);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
+arguments.length+" arguments.";}e[g].call(this,c,l?this:u,i,h)}});return e}var z={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},o=f.noop,j=f.forEach,r=f.extend,t=f.copy,q=f.isFunction;l.prototype={url:function(b){var c=this,a=this.template,f,b=b||{};j(this.urlParams,function(e,d){f=g(b[d]||c.defaults[d]||"",!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+");a=a.replace(RegExp(":"+d+"(\\W)"),f+"$1")});var a=
+a.replace(/\/?#$/,""),e=[];j(b,function(a,b){c.urlParams[b]||e.push(g(b)+"="+g(a))});e.sort();a=a.replace(/\/*$/,"");return a+(e.length?"?"+e.join("&"):"")}};return s}])})(window,window.angular);
View
532 app/lib/angular/angular-sanitize.js
@@ -0,0 +1,532 @@
+/**
+ * @license AngularJS v1.0.0rc9
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name angular.module.ngSanitize
+ * @description
+ */
+
+/*
+ * HTML Parser By Misko Hevery (misko@hevery.com)
+ * based on: HTML Parser By John Resig (ejohn.org)
+ * Original code by Erik Arvidsson, Mozilla Public License
+ * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
+ *
+ * // Use like so:
+ * htmlParser(htmlString, {
+ * start: function(tag, attrs, unary) {},
+ * end: function(tag) {},
+ * chars: function(text) {},
+ * comment: function(text) {}
+ * });
+ *
+ */
+
+
+/**
+ * @ngdoc service
+ * @name angular.module.ngSanitize.$sanitize
+ * @function
+ *
+ * @description
+ * 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
+ * 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.
+ *
+ * @param {string} html Html input.
+ * @returns {string} Sanitized html.
+ *
+ * @example
+ <doc:example module="ngSanitize">
+ <doc:source>
+ <script>
+ function Ctrl($scope) {
+ $scope.snippet =
+ '<p style="color:blue">an html\n' +
+ '<em onmouseover="this.textContent=\'PWN3D!\'">click here</em>\n' +
+ 'snippet</p>';
+ }
+ </script>
+ <div ng-controller="Ctrl">
+ Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+ <table>
+ <tr>
+ <td>Filter</td>
+ <td>Source</td>
+ <td>Rendered</td>
+ </tr>
+ <tr id="html-filter">
+ <td>html filter</td>
+ <td>
+ <pre>&lt;div ng-bind-html="snippet"&gt;<br/>&lt;/div&gt;</pre>
+ </td>
+ <td>
+ <div ng-bind-html="snippet"></div>
+ </td>
+ </tr>
+ <tr id="escaped-html">
+ <td>no filter</td>
+ <td><pre>&lt;div ng-bind="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+ <td><div ng-bind="snippet"></div></td>
+ </tr>
+ <tr id="html-unsafe-filter">
+ <td>unsafe html filter</td>
+ <td><pre>&lt;div ng-bind-html-unsafe="snippet"&gt;<br/>&lt;/div&gt;</pre></td>
+ <td><div ng-bind-html-unsafe="snippet"></div></td>
+ </tr>
+ </table>
+ </div>
+ </doc:source>
+ <doc:scenario>
+ it('should sanitize the html snippet ', function() {
+ expect(using('#html-filter').element('div').html()).
+ toBe('<p>an html\n<em>click here</em>\nsnippet</p>');
+ });
+
+ it('should escape snippet without any filter', function() {
+ expect(using('#escaped-html').element('div').html()).
+ toBe("&lt;p style=\"color:blue\"&gt;an html\n" +
+ "&lt;em onmouseover=\"this.textContent='PWN3D!'\"&gt;click here&lt;/em&gt;\n" +
+ "snippet&lt;/p&gt;");
+ });
+
+ it('should inline raw snippet if filtered as unsafe', function() {
+ expect(using('#html-unsafe-filter').element("div").html()).
+ toBe("<p style=\"color:blue\">an html\n" +
+ "<em onmouseover=\"this.textContent='PWN3D!'\">click here</em>\n" +
+ "snippet</p>");
+ });
+
+ it('should update', function() {
+ input('snippet').enter('new <b>text</b>');
+ expect(using('#html-filter').binding('snippet')).toBe('new <b>text</b>');
+ expect(using('#escaped-html').element('div').html()).toBe("new &lt;b&gt;text&lt;/b&gt;");
+ expect(using('#html-unsafe-filter').binding("snippet")).toBe('new <b>text</b>');
+ });
+ </doc:scenario>
+ </doc:example>
+ */
+var $sanitize = function(html) {
+ var buf = [];
+ htmlParser(html, htmlSanitizeWriter(buf));
+ return buf.join('');
+};
+
+
+// Regular Expressions for parsing tags and attributes
+var START_TAG_REGEXP = /^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,
+ END_TAG_REGEXP = /^<\s*\/\s*([\w:-]+)[^>]*>/,
+ ATTR_REGEXP = /([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,
+ BEGIN_TAG_REGEXP = /^</,
+ BEGING_END_TAGE_REGEXP = /^<\s*\//,
+ COMMENT_REGEXP = /<!--(.*?)-->/g,
+ CDATA_REGEXP = /<!\[CDATA\[(.*?)]]>/g,
+ URI_REGEXP = /^((ftp|https?):\/\/|mailto:|#)/,
+ NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; // Match everything outside of normal chars and " (quote character)
+
+
+// Good source of info about elements and attributes
+// http://dev.w3.org/html5/spec/Overview.html#semantics
+// http://simon.html5.org/html-elements
+
+// Safe Void Elements - HTML5
+// http://dev.w3.org/html5/spec/Overview.html#void-elements
+var voidElements = makeMap("area,br,col,hr,img,wbr");
+
+// Elements that you can, intentionally, leave open (and which close themselves)
+// http://dev.w3.org/html5/spec/Overview.html#optional-tags
+var optionalEndTagBlockElements = makeMap("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),
+ optionalEndTagInlineElements = makeMap("rp,rt"),
+ optionalEndTagElements = angular.extend({}, optionalEndTagInlineElements, optionalEndTagBlockElements);
+
+// Safe Block Elements - HTML5
+var blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap("address,article,aside," +
+ "blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6," +
+ "header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul"));
+
+// Inline Elements - HTML5
+var inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap("a,abbr,acronym,b,bdi,bdo," +
+ "big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small," +
+ "span,strike,strong,sub,sup,time,tt,u,var"));
+
+
+// Special Elements (can contain anything)
+var specialElements = makeMap("script,style");
+
+var validElements = angular.extend({}, voidElements, blockElements, inlineElements, optionalEndTagElements);
+
+//Attributes that have href and hence need to be sanitized
+var uriAttrs = makeMap("background,cite,href,longdesc,src,usemap");
+var validAttrs = angular.extend({}, uriAttrs, makeMap(
+ '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'));
+
+function makeMap(str) {
+ var obj = {}, items = str.split(','), i;
+ for (i = 0; i < items.length; i++) obj[items[i]] = true;
+ return obj;
+}
+
+
+/**
+ * @example
+ * htmlParser(htmlString, {
+ * start: function(tag, attrs, unary) {},
+ * end: function(tag) {},
+ * chars: function(text) {},
+ * comment: function(text) {}
+ * });
+ *
+ * @param {string} html string
+ * @param {object} handler
+ */
+function htmlParser( html, handler ) {
+ var index, chars, match, stack = [], last = html;
+ stack.last = function() { return stack[ stack.length - 1 ]; };
+
+ while ( html ) {
+ chars = true;
+
+ // Make sure we're not in a script or style element
+ if ( !stack.last() || !specialElements[ stack.last() ] ) {
+
+ // Comment
+ if ( html.indexOf("<!--") === 0 ) {
+ index = html.indexOf("-->");
+
+ if ( index >= 0 ) {
+ if (handler.comment) handler.comment( html.substring( 4, index ) );
+ html = html.substring( index + 3 );
+ chars = false;
+ }
+
+ // end tag
+ } else if ( BEGING_END_TAGE_REGEXP.test(html) ) {
+ match = html.match( END_TAG_REGEXP );
+
+ if ( match ) {
+ html = html.substring( match[0].length );
+ match[0].replace( END_TAG_REGEXP, parseEndTag );
+ chars = false;
+ }
+
+ // start tag
+ } else if ( BEGIN_TAG_REGEXP.test(html) ) {
+ match = html.match( START_TAG_REGEXP );
+
+ if ( match ) {
+ html = html.substring( match[0].length );
+ match[0].replace( START_TAG_REGEXP, parseStartTag );
+ chars = false;
+ }
+ }
+
+ if ( chars ) {
+ index = html.indexOf("<");
+
+ var text = index < 0 ? html : html.substring( 0, index );
+ html = index < 0 ? "" : html.substring( index );
+
+ if (handler.chars) handler.chars( decodeEntities(text) );
+ }
+
+ } else {
+ html = html.replace(new RegExp("(.*)<\\s*\\/\\s*" + stack.last() + "[^>]*>", 'i'), function(all, text){
+ text = text.
+ replace(COMMENT_REGEXP, "$1").
+ replace(CDATA_REGEXP, "$1");
+
+ if (handler.chars) handler.chars( decodeEntities(text) );
+
+ return "";
+ });
+
+ parseEndTag( "", stack.last() );
+ }
+
+ if ( html == last ) {
+ throw "Parse Error: " + html;
+ }
+ last = html;
+ }
+
+ // Clean up any remaining tags
+ parseEndTag();
+
+ function parseStartTag( tag, tagName, rest, unary ) {
+ tagName = angular.lowercase(tagName);
+ if ( blockElements[ tagName ] ) {
+ while ( stack.last() && inlineElements[ stack.last() ] ) {
+ parseEndTag( "", stack.last() );
+ }
+ }
+
+ if ( optionalEndTagElements[ tagName ] && stack.last() == tagName ) {
+ parseEndTag( "", tagName );
+ }
+
+ unary = voidElements[ tagName ] || !!unary;
+
+ if ( !unary )
+ stack.push( tagName );
+
+ var attrs = {};
+
+ rest.replace(ATTR_REGEXP, function(match, name, doubleQuotedValue, singleQoutedValue, unqoutedValue) {
+ var value = doubleQuotedValue
+ || singleQoutedValue
+ || unqoutedValue
+ || '';
+
+ attrs[name] = decodeEntities(value);
+ });
+ if (handler.start) handler.start( tagName, attrs, unary );
+ }
+
+ function parseEndTag( tag, tagName ) {
+ var pos = 0, i;
+ tagName = angular.lowercase(tagName);
+ if ( tagName )
+ // Find the closest opened tag of the same type
+ for ( pos = stack.length - 1; pos >= 0; pos-- )
+ if ( stack[ pos ] == tagName )
+ break;
+
+ if ( pos >= 0 ) {
+ // Close all the open elements, up the stack
+ for ( i = stack.length - 1; i >= pos; i-- )
+ if (handler.end) handler.end( stack[ i ] );
+
+ // Remove the open elements from the stack
+ stack.length = pos;
+ }
+ }
+}
+
+/**
+ * decodes all entities into regular string
+ * @param value
+ * @returns {string} A string with decoded entities.
+ */
+var hiddenPre=document.createElement("pre");
+function decodeEntities(value) {
+ hiddenPre.innerHTML=value.replace(/</g,"&lt;");
+ return hiddenPre.innerText || hiddenPre.textContent || '';
+}
+
+/**
+ * Escapes all potentially dangerous characters, so that the
+ * resulting string can be safely inserted into attribute or
+ * element text.
+ * @param value
+ * @returns escaped text
+ */
+function encodeEntities(value) {
+ return value.
+ replace(/&/g, '&amp;').
+ replace(NON_ALPHANUMERIC_REGEXP, function(value){
+ return '&#' + value.charCodeAt(0) + ';';
+ }).
+ replace(/</g, '&lt;').
+ replace(/>/g, '&gt;');
+}
+
+/**
+ * create an HTML/XML writer which writes to buffer
+ * @param {Array} buf use buf.jain('') to get out sanitized html string
+ * @returns {object} in the form of {
+ * start: function(tag, attrs, unary) {},
+ * end: function(tag) {},
+ * chars: function(text) {},
+ * comment: function(text) {}
+ * }
+ */
+function htmlSanitizeWriter(buf){
+ var ignore = false;
+ var out = angular.bind(buf, buf.push);
+ return {
+ start: function(tag, attrs, unary){
+ tag = angular.lowercase(tag);
+ if (!ignore && specialElements[tag]) {
+ ignore = tag;
+ }
+ if (!ignore && validElements[tag] == true) {
+ out('<');
+ out(tag);
+ angular.forEach(attrs, function(value, key){
+ var lkey=angular.lowercase(key);
+ if (validAttrs[lkey]==true && (uriAttrs[lkey]!==true || value.match(URI_REGEXP))) {
+ out(' ');
+ out(key);
+ out('="');
+ out(encodeEntities(value));
+ out('"');
+ }
+ });
+ out(unary ? '/>' : '>');
+ }
+ },
+ end: function(tag){
+ tag = angular.lowercase(tag);
+ if (!ignore && validElements[tag] == true) {
+ out('</');
+ out(tag);
+ out('>');
+ }
+ if (tag == ignore) {
+ ignore = false;
+ }
+ },
+ chars: function(chars){
+ if (!ignore) {
+ out(encodeEntities(chars));
+ }
+ }
+ };
+}
+
+
+// define ngSanitize module and register $sanitize service
+angular.module('ngSanitize', []).value('$sanitize', $sanitize);
+
+/**
+ * @ngdoc directive
+ * @name angular.module.ngSanitize.directive.ngBindHtml
+ *
+ * @description
+ * Creates a binding that will sanitize the result of evaluating the `expression` with the
+ * {@link angular.module.ngSanitize.$sanitize $sanitize} service and innerHTML the result into the current element.
+ *
+ * See {@link angular.module.ngSanitize.$sanitize $sanitize} docs for examples.
+ *
+ * @element ANY
+ * @param {expression} ngBindHtml {@link guide/dev_guide.expressions Expression} to evaluate.
+ */
+angular.module('ngSanitize').directive('ngBindHtml', ['$sanitize', function($sanitize) {
+ return function(scope, element, attr) {
+ element.addClass('ng-binding').data('$binding', attr.ngBindHtml);
+ scope.$watch(attr.ngBindHtml, function(value) {
+ value = $sanitize(value);
+ element.html(value || '');
+ });
+ };
+}]);
+/**
+ * @ngdoc filter
+ * @name angular.module.ngSanitize.filter.linky
+ * @function
+ *
+ * @description
+ * Finds links in text input and turns them into html links. Supports http/https/ftp/mailto and
+ * plain email address links.
+ *
+ * @param {string} text Input text.
+ * @returns {string} Html-linkified text.
+ *
+ * @example
+ <doc:example module="ngSanitize">
+ <doc:source>
+ <script>
+ function Ctrl($scope) {
+ $scope.snippet =
+ 'Pretty text with some links:\n'+
+ 'http://angularjs.org/,\n'+
+ 'mailto:us@somewhere.org,\n'+
+ 'another@somewhere.org,\n'+
+ 'and one more: ftp://127.0.0.1/.';
+ }
+ </script>
+ <div ng-controller="Ctrl">
+ Snippet: <textarea ng-model="snippet" cols="60" rows="3"></textarea>
+ <table>
+ <tr>
+ <td>Filter</td>
+ <td>Source</td>
+ <td>Rendered</td>
+ </tr>
+ <tr id="linky-filter">
+ <td>linky filter</td>
+ <td>
+ <pre>&lt;div ng-bind-html="snippet | linky"&gt;<br>&lt;/div&gt;</pre>
+ </td>
+ <td>
+ <div ng-bind-html="snippet | linky"></div>
+ </td>
+ </tr>
+ <tr id="escaped-html">
+ <td>no filter</td>
+ <td><pre>&lt;div ng-bind="snippet"&gt;<br>&lt;/div&gt;</pre></td>
+ <td><div ng-bind="snippet"></div></td>
+ </tr>
+ </table>
+ </doc:source>
+ <doc:scenario>
+ it('should linkify the snippet with urls', function() {
+ expect(using('#linky-filter').binding('snippet | linky')).
+ toBe('Pretty text with some links:&#10;' +
+ '<a href="http://angularjs.org/">http://angularjs.org/</a>,&#10;' +
+ '<a href="mailto:us@somewhere.org">us@somewhere.org</a>,&#10;' +
+ '<a href="mailto:another@somewhere.org">another@somewhere.org</a>,&#10;' +
+ 'and one more: <a href="ftp://127.0.0.1/">ftp://127.0.0.1/</a>.');
+ });
+
+ it ('should not linkify snippet without the linky filter', function() {
+ expect(using('#escaped-html').binding('snippet')).
+ toBe("Pretty text with some links:\n" +
+ "http://angularjs.org/,\n" +
+ "mailto:us@somewhere.org,\n" +
+ "another@somewhere.org,\n" +
+ "and one more: ftp://127.0.0.1/.");
+ });
+
+ it('should update', function() {
+ input('snippet').enter('new http://link.');
+ expect(using('#linky-filter').binding('snippet | linky')).
+ toBe('new <a href="http://link">http://link</a>.');
+ expect(using('#escaped-html').binding('snippet')).toBe('new http://link.');
+ });
+ </doc:scenario>
+ </doc:example>
+ */
+angular.module('ngSanitize').filter('linky', function() {
+ var LINKY_URL_REGEXP = /((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,
+ MAILTO_REGEXP = /^mailto:/;
+
+ return function(text) {
+ if (!text) return text;
+ var match;
+ var raw = text;
+ var html = [];
+ // TODO(vojta): use $sanitize instead
+ var writer = htmlSanitizeWriter(html);
+ var url;
+ var i;
+ while ((match = raw.match(LINKY_URL_REGEXP))) {
+ // We can not end in these as they are sometimes found at the end of the sentence
+ url = match[0];
+ // if we did not match ftp/http/mailto then assume mailto
+ if (match[2] == match[3]) url = 'mailto:' + url;
+ i = match.index;
+ writer.chars(raw.substr(0, i));
+ writer.start('a', {href:url});
+ writer.chars(match[0].replace(MAILTO_REGEXP, ''));
+ writer.end('a');
+ raw = raw.substring(i + match[0].length);
+ }
+ writer.chars(raw);
+ return html.join('');
+ };
+});
+
+})(window, window.angular);
View
13 app/lib/angular/angular-sanitize.min.js
@@ -0,0 +1,13 @@
+/*
+ AngularJS v1.0.0rc9
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(I,g){'use strict';function i(a){var d={},a=a.split(","),b;for(b=0;b<a.length;b++)d[a[b]]=!0;return d}function z(a,d){function b(a,b,c,h){b=g.lowercase(b);if(m[b])for(;f.last()&&n[f.last()];)e("",f.last());o[b]&&f.last()==b&&e("",b);(h=p[b]||!!h)||f.push(b);var j={};c.replace(A,function(a,b,d,e,c){j[b]=k(d||e||c||"")});d.start&&d.start(b,j,h)}function e(a,b){var e=0,c;if(b=g.lowercase(b))for(e=f.length-1;e>=0;e--)if(f[e]==b)break;if(e>=0){for(c=f.length-1;c>=e;c--)d.end&&d.end(f[c]);f.length=
+e}}var c,h,f=[],j=a;for(f.last=function(){return f[f.length-1]};a;){h=!0;if(!f.last()||!q[f.last()]){if(a.indexOf("<\!--")===0)c=a.indexOf("--\>"),c>=0&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),h=!1);else if(B.test(a)){if(c=a.match(r))a=a.substring(c[0].length),c[0].replace(r,e),h=!1}else if(C.test(a)&&(c=a.match(s)))a=a.substring(c[0].length),c[0].replace(s,b),h=!1;h&&(c=a.indexOf("<"),h=c<0?a:a.substring(0,c),a=c<0?"":a.substring(c),d.chars&&d.chars(k(h)))}else a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+
+f.last()+"[^>]*>","i"),function(b,a){a=a.replace(D,"$1").replace(E,"$1");d.chars&&d.chars(k(a));return""}),e("",f.last());if(a==j)throw"Parse Error: "+a;j=a}e()}function k(a){l.innerHTML=a.replace(/</g,"&lt;");return l.innerText||l.textContent||""}function t(a){return a.replace(/&/g,"&amp;").replace(F,function(a){return"&#"+a.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function u(a){var d=!1,b=g.bind(a,a.push);return{start:function(a,c,h){a=g.lowercase(a);!d&&q[a]&&(d=a);!d&&v[a]==
+!0&&(b("<"),b(a),g.forEach(c,function(a,c){var e=g.lowercase(c);if(G[e]==!0&&(w[e]!==!0||a.match(H)))b(" "),b(c),b('="'),b(t(a)),b('"')}),b(h?"/>":">"))},end:function(a){a=g.lowercase(a);!d&&v[a]==!0&&(b("</"),b(a),b(">"));a==d&&(d=!1)},chars:function(a){d||b(t(a))}}}var s=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,r=/^<\s*\/\s*([\w:-]+)[^>]*>/,A=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,C=/^</,B=/^<\s*\//,D=/<\!--(.*?)--\>/g,
+E=/<!\[CDATA\[(.*?)]]\>/g,H=/^((ftp|https?):\/\/|mailto:|#)/,F=/([^\#-~| |!])/g,p=i("area,br,col,hr,img,wbr"),x=i("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),y=i("rp,rt"),o=g.extend({},y,x),m=g.extend({},x,i("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),n=g.extend({},y,i("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
+q=i("script,style"),v=g.extend({},p,m,n,o),w=i("background,cite,href,longdesc,src,usemap"),G=g.extend({},w,i("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")),l=document.createElement("pre");g.module("ngSanitize",[]).value("$sanitize",function(a){var d=[];
+z(a,u(d));return d.join("")});g.module("ngSanitize").directive("ngBindHtml",["$sanitize",function(a){return function(d,b,e){b.addClass("ng-binding").data("$binding",e.ngBindHtml);d.$watch(e.ngBindHtml,function(c){c=a(c);b.html(c||"")})}}]);g.module("ngSanitize").filter("linky",function(){var a=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s\.\;\,\(\)\{\}\<\>]/,d=/^mailto:/;return function(b){if(!b)return b;for(var e=b,c=[],h=u(c),f,g;b=e.match(a);)f=b[0],b[2]==b[3]&&(f="mailto:"+f),g=b.index,
+h.chars(e.substr(0,g)),h.start("a",{href:f}),h.chars(b[0].replace(d,"")),h.end("a"),e=e.substring(g+b[0].length);h.chars(e);return c.join("")}})})(window,window.angular);
View
13,838 app/lib/angular/angular.js
13,838 additions, 0 deletions not shown
View
154 app/lib/angular/angular.min.js
@@ -0,0 +1,154 @@
+/*
+ AngularJS v1.0.0rc9
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(V,aa,p){'use strict';function m(b,a,c){var d;if(b)if(N(b))for(d in b)d!="prototype"&&d!="length"&&d!="name"&&b.hasOwnProperty(d)&&a.call(c,b[d],d);else if(b.forEach&&b.forEach!==m)b.forEach(a,c);else if(J(b)&&ua(b.length))for(d=0;d<b.length;d++)a.call(c,b[d],d);else for(d in b)b.hasOwnProperty(d)&&a.call(c,b[d],d);return b}function jb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function Zb(b,a,c){for(var d=jb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}
+function kb(b){return function(a,c){b(c,a)}}function va(){for(var b=Y.length,a;b;){b--;a=Y[b].charCodeAt(0);if(a==57)return Y[b]="A",Y.join("");if(a==90)Y[b]="0";else return Y[b]=String.fromCharCode(a+1),Y.join("")}Y.unshift("0");return Y.join("")}function C(b){m(arguments,function(a){a!==b&&m(a,function(a,d){b[d]=a})});return b}function x(b){return parseInt(b,10)}function Oa(b,a){return C(new (C(function(){},{prototype:b})),a)}function r(){}function wa(b){return b}function D(b){return function(){return b}}
+function t(b){return typeof b=="undefined"}function E(b){return typeof b!="undefined"}function J(b){return b!=null&&typeof b=="object"}function G(b){return typeof b=="string"}function ua(b){return typeof b=="number"}function ma(b){return Pa.apply(b)=="[object Date]"}function K(b){return Pa.apply(b)=="[object Array]"}function N(b){return typeof b=="function"}function na(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function S(b){return G(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function $b(b){return b&&
+(b.nodeName||b.bind&&b.find)}function Qa(b,a,c){var d=[];m(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function ac(b,a){var c=0,d;if(K(b)||G(b))return b.length;else if(J(b))for(d in b)(!a||b.hasOwnProperty(d))&&c++;return c}function Ra(b,a){if(b.indexOf)return b.indexOf(a);for(var c=0;c<b.length;c++)if(a===b[c])return c;return-1}function xa(b,a){var c=Ra(b,a);c>=0&&b.splice(c,1);return a}function W(b,a){if(na(b)||b&&b.$evalAsync&&b.$watch)throw w("Can't copy Window or Scope");if(a){if(b===
+a)throw w("Can't copy equivalent objects or arrays");if(K(b)){for(;a.length;)a.pop();for(var c=0;c<b.length;c++)a.push(W(b[c]))}else for(c in m(a,function(b,c){delete a[c]}),b)a[c]=W(b[c])}else(a=b)&&(K(b)?a=W(b,[]):ma(b)?a=new Date(b.getTime()):J(b)&&(a=W(b,{})));return a}function bc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ea(b,a){if(b===a)return!0;if(b===null||a===null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&
+c=="object")if(K(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ea(b[d],a[d]))return!1;return!0}}else if(ma(b))return ma(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||na(b)||na(a))return!1;c={};for(d in b){if(d.charAt(0)!=="$"&&!N(b[d])&&!ea(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&!N(a[d]))return!1;return!0}return!1}function Sa(b,a){var c=arguments.length>2?ha.call(arguments,2):[];return N(a)&&!(a instanceof RegExp)?c.length?
+function(){return arguments.length?a.apply(b,c.concat(ha.call(arguments,0))):a.apply(b,c)}:function(){return arguments.length?a.apply(b,arguments):a.call(b)}:a}function cc(b,a){var c=a;/^\$+/.test(b)?c=p:na(a)?c="$WINDOW":a&&aa===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function ba(b,a){return JSON.stringify(b,cc,a?" ":null)}function lb(b){return G(b)?JSON.parse(b):b}function Ta(b){b&&b.length!==0?(b=v(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;
+return b}function ya(b){b=u(b).clone();try{b.html("")}catch(a){}return u("<div>").append(b).html().match(/^(<[^>]+>)/)[1]}function Ua(b){var a={},c,d;m((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=E(c[1])?decodeURIComponent(c[1]):!0)});return a}function mb(b){var a=[];m(b,function(b,d){a.push(Va(d,!0)+(b===!0?"":"="+Va(b,!0)))});return a.length?a.join("&"):""}function Wa(b){return Va(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Va(b,
+a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function dc(b,a){function c(a){a&&d.push(a)}var d=[b],e,g,h=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;m(h,function(a){h[a]=!0;c(aa.getElementById(a));a=a.replace(":","\\:");b.querySelectorAll&&(m(b.querySelectorAll("."+a),c),m(b.querySelectorAll("."+a+"\\:"),c),m(b.querySelectorAll("["+a+"]"),c))});m(d,function(a){if(!e){var b=
+f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):m(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function nb(b,a){b=u(b);a=a||[];a.unshift("ng");var c=ob(a);c.invoke(["$rootScope","$compile","$injector",function(a,c,g){a.$apply(function(){b.data("$injector",g);c(b)(a)})}]);return c}function Xa(b,a){a=a||"_";return b.replace(ec,function(b,d){return(d?a:"")+b.toLowerCase()})}function oa(b,a,c){if(!b)throw new w("Argument '"+(a||"?")+"' is "+(c||"required"));
+return b}function pa(b,a,c){c&&K(b)&&(b=b[b.length-1]);oa(N(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function fc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),"module",function(){var b={};return function(d,e,g){e&&b.hasOwnProperty(d)&&(b[d]=null);return a(b,d,function(){function a(c,d,e){return function(){b[e||"push"]([c,d,arguments]);return j}}if(!e)throw w("No module: "+d);var b=[],c=[],k=a("$injector","invoke"),
+j={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:k,run:function(a){c.push(a);return this}};g&&k(g);return j})}})}function pb(b){return b.replace(gc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(hc,
+"Moz$1")}function Ya(b,a){function c(){var e;for(var b=[this],c=a,h,f,i,k,j,n,l;b.length;){h=b.shift();f=0;for(i=h.length;f<i;f++){k=u(h[f]);c?(l=(j=k.data("events"))&&j.$destroy)&&m(l,function(a){a.handler()}):c=!c;j=0;for(e=(n=k.children()).length,k=e;j<k;j++)b.push(ia(n[j]))}}return d.apply(this,arguments)}var d=ia.fn[b],d=d.$original||d;c.$original=d;ia.fn[b]=c}function L(b){if(b instanceof L)return b;if(!(this instanceof L)){if(G(b)&&b.charAt(0)!="<")throw w("selectors not implemented");return new L(b)}if(G(b)){var a=
+aa.createElement("div");a.innerHTML="<div>&nbsp;</div>"+b;a.removeChild(a.firstChild);Za(this,a.childNodes);this.remove()}else Za(this,b)}function $a(b){return b.cloneNode(!0)}function qa(b){qb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)qa(b[a])}function rb(b,a,c){var d=ca(b,"events");ca(b,"handle")&&(t(a)?m(d,function(a,c){sb(b,c,a);delete d[c]}):t(c)?(sb(b,a,d[a]),delete d[a]):xa(d[a],c))}function qb(b){var a=b[ja],c=fa[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),rb(b)),delete fa[a],
+b[ja]=p)}function ca(b,a,c){var d=b[ja],e=fa[d||-1];if(E(c))e||(b[ja]=d=++ab,e=fa[d]={}),e[a]=c;else if(E(a))if(J(a))d||(b[ja]=d=++ab),fa[d]=e=fa[d]||{},C(e,a);else return e?e[a]:p;else return d||(b[ja]=d=++ab),e?e:fa[d]={}}function za(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function tb(b,a){a&&m(a.split(" "),function(a){b.className=S((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+S(a)+" "," "))})}function ub(b,a){a&&m(a.split(" "),function(a){if(!za(b,
+a))b.className=S(b.className+" "+S(a))})}function Za(b,a){if(a)for(var a=!a.nodeName&&E(a.length)&&!na(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function vb(b,a){return Aa(b,"$"+(a||"ngController")+"Controller")}function Aa(b,a,c){b=u(b);for(b[0].nodeType==9&&(b=b.find("html"));b.length;){if(c=b.data(a))return c;b=b.parent()}}function wb(b,a){return xb[b.nodeName]&&Ba[a.toLowerCase()]}function ic(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=
+function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||aa;if(t(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};m(a[e||c.type],function(a){try{a.call(b,c)}catch(e){}});Z<=8?(c.preventDefault=null,c.stopPropagation=null,c.isDefaultPrevented=null):(delete c.preventDefault,delete c.stopPropagation,delete c.isDefaultPrevented)};c.elem=b;return c}function ka(b){var a=
+typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===p)c=b.$$hashKey=va()}else c=b;return a+":"+c}function Ca(b){m(b,this.put,this)}function bb(){}function jc(b){pa(b);if(!b.$inject){var a=b.$inject=[],c=b.toString().replace(kc,"").match(lc);m(c[1].split(mc),function(b){b.replace(nc,function(b,c,d){a.push(d)})})}return b.$inject}function ob(b){function a(a){return function(b,c){if(J(b))m(b,kb(a));else return a(b,c)}}function c(a,b){N(b)&&(b=n.instantiate(b));
+if(!b.$get)throw w("Provider "+a+" must define $get factory method.");return j[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];m(a,function(a){if(!k.get(a))if(k.put(a,!0),G(a)){var c=ra(a);b=b.concat(e(c.requires)).concat(c._runBlocks);try{for(var d=c._invokeQueue,c=0,f=d.length;c<f;c++){var i=d[c],g=i[0]=="$injector"?n:n.get(i[0]);g[i[1]].apply(g,i[2])}}catch(h){throw h.message&&(h.message+=" from "+a),h;}}else if(N(a))try{b.push(n.invoke(a))}catch(l){throw l.message&&(l.message+=
+" from "+a),l;}else if(K(a))try{b.push(n.invoke(a))}catch(j){throw j.message&&(j.message+=" from "+String(a[a.length-1])),j;}else pa(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw w("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw w("Circular dependency: "+i.join(" <- "));return a[d]}else try{return i.unshift(d),a[d]=h,a[d]=b(d)}finally{i.shift()}}function d(a,b,e){var f=[],g,k,h;typeof a=="function"?(g=jc(a),k=g.length):(K(a)&&(g=a,k=g.length-
+1,a=g[k]),pa(a,"fn"));for(var l=0;l<k;l++)h=g[l],f.push(e&&e.hasOwnProperty(h)?e[h]:c(h,i));switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],f[1]);case 3:return a(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return a(f[0],f[1],f[2],f[3],f[4]);case 6:return a(f[0],f[1],f[2],f[3],f[4],f[5]);case 7:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6]);case 8:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7]);case 9:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],
+f[8]);case 10:return a(f[0],f[1],f[2],f[3],f[4],f[5],f[6],f[7],f[8],f[9]);default:return a.apply(b,f)}}return{invoke:d,instantiate:function(a,b){var c=function(){},e;c.prototype=(K(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return J(e)?e:c},get:c}}var h={},f="Provider",i=[],k=new Ca,j={$provide:{provider:a(c),factory:a(d),service:a(function(a,b){return d(a,["$injector",function(a){return a.instantiate(b)}])}),value:a(function(a,b){return d(a,D(b))}),constant:a(function(a,b){j[a]=b;l[a]=b}),
+decorator:function(a,b){var c=n.get(a+f),d=c.$get;c.$get=function(){var a=s.invoke(d,c);return s.invoke(b,null,{$delegate:a})}}}},n=g(j,function(){throw w("Unknown provider: "+i.join(" <- "));}),l={},s=l.$injector=g(l,function(a){a=n.get(a+f);return s.invoke(a.$get,a)});m(e(b),function(a){s.invoke(a||r)});return s}function oc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;m(a,function(a){!b&&v(a.nodeName)===
+"a"&&(b=a)});return b}function g(){var b=c.hash(),d;b?(d=h.getElementById(b))?d.scrollIntoView():(d=e(h.getElementsByName(b)))?d.scrollIntoView():b==="top"&&a.scrollTo(0,0):a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function pc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(o--,o===0)for(;M.length;)try{M.pop()()}catch(b){c.error(b)}}}function g(a,b){(function ga(){m(q,function(a){a()});z=b(ga,a)})()}function h(){P!=
+f.url()&&(P=f.url(),m(O,function(a){a(f.url())}))}var f=this,i=a[0],k=b.location,j=b.history,n=b.setTimeout,l=b.clearTimeout,s={};f.isMock=!1;var o=0,M=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){o++};f.notifyWhenNoOutstandingRequests=function(a){m(q,function(a){a()});o===0?a():M.push(a)};var q=[],z;f.addPollFn=function(a){t(z)&&g(100,n);q.push(a);return a};var P=k.href,I=a.find("base");f.url=function(a,b){return a?(P=a,d.history?b?j.replaceState(null,"",a):(j.pushState(null,
+"",a),I.attr("href",I.attr("href"))):b?k.replace(a):k.href=a,f):k.href.replace(/%27/g,"'")};var O=[],R=!1;f.onUrlChange=function(a){R||(d.history&&u(b).bind("popstate",h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),R=!0);O.push(a);return a};f.baseHref=function(){var a=I.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):a};var $={},A="",H=f.baseHref();f.cookies=function(a,b){var d,e,f,g;if(a)if(b===p)i.cookie=escape(a)+"=;path="+H+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(G(b))d=
+(i.cookie=escape(a)+"="+escape(b)+";path="+H).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!"),$.length>20&&c.warn("Cookie '"+a+"' possibly not set or overflowed because too many cookies were already set ("+$.length+" > 20 )")}else{if(i.cookie!==A){A=i.cookie;d=A.split("; ");$={};for(f=0;f<d.length;f++)e=d[f],g=e.indexOf("="),g>0&&($[unescape(e.substring(0,g))]=unescape(e.substring(g+1)))}return $}};f.defer=function(a,b){var c;
+o++;c=n(function(){delete s[c];e(a)},b||0);s[c]=!0;return c};f.defer.cancel=function(a){return s[a]?(delete s[a],l(a),e(r),!0):!1}}function qc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new pc(b,d,a,c)}]}function rc(){this.$get=function(){function b(b,d){function e(a){if(a!=n){if(l){if(l==a)l=a.n}else l=a;g(a.n,a.p);g(a,n);n=a;n.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw w("cacheId "+b+" taken");var h=0,f=C({},d,{id:b}),i={},k=d&&d.capacity||
+Number.MAX_VALUE,j={},n=null,l=null;return a[b]={put:function(a,b){var c=j[a]||(j[a]={key:a});e(c);t(b)||(a in i||h++,i[a]=b,h>k&&this.remove(l.key))},get:function(a){var b=j[a];if(b)return e(b),i[a]},remove:function(a){var b=j[a];if(b==n)n=b.p;if(b==l)l=b.n;g(b.n,b.p);delete j[a];delete i[a];h--},removeAll:function(){i={};h=0;j={};n=l=null},destroy:function(){j=f=i=null;delete a[b]},info:function(){return C({},f,{size:h})}}}var a={};b.info=function(){var b={};m(a,function(a,e){b[e]=a.info()});return b};
+b.get=function(b){return a[b]};return b}}function sc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function yb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ";this.directive=function f(d,e){G(d)?(oa(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];m(a[d],function(a){try{var f=b.invoke(a);if(N(f))f={compile:D(f)};
+else if(!f.compile&&f.link)f.compile=D(f.link);f.priority=f.priority||0;f.name=f.name||d;f.require=f.require||f.controller&&f.name;f.restrict=f.restrict||"A";e.push(f)}catch(g){c(g)}});return e}])),a[d].push(e)):m(d,kb(f));return this};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller",function(b,i,k,j,n,l,s){function o(a,b,c){a instanceof u||(a=u(a));m(a,function(b,c){b.nodeType==3&&(a[c]=u(b).wrap("<span>").parent()[0])});var d=z(a,b,a,c);return function(b,
+c){oa(b,"scope");var e=c?sa.clone.call(a):a;e.data("$scope",b);q(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function M(a,b){throw w("Unsupported '"+b+"' for '"+a+"'.");}function q(a,b){try{a.addClass(b)}catch(c){}}function z(a,b,c,d){function e(a,c,d,i){for(var g,k,l,j,T,n=0,s=0,q=f.length;n<q;s++)l=c[s],g=f[n++],k=f[n++],g?(g.scope?(j=a.$new(J(g.scope)),u(l).data("$scope",j)):j=a,(T=g.transclude)||!i&&b?g(k,j,l,d,function(b){return function(c){var d=a.$new();return b(d,c).bind("$destroy",Sa(d,
+d.$destroy))}}(T||b)):g(k,j,l,p,i)):k&&k(a,l.childNodes,p,i)}for(var f=[],i,g,k,l=0;l<a.length;l++)g=new t,i=P(a[l],[],g,d),g=(i=i.length?I(i,a[l],g,b,c):null)&&i.terminal?null:z(a[l].childNodes,i?i.transclude:b),f.push(i),f.push(g),k=k||i||g;return k?e:null}function P(a,b,c,f){var i=c.$attr,g;switch(a.nodeType){case 1:O(b,da(zb(a).toLowerCase()),"E",f);var k,l,j;g=a.attributes;for(var n=0,s=g&&g.length;n<s;n++)if(k=g[n],k.specified)l=k.name,j=da(l.toLowerCase()),i[j]=l,c[j]=k=S(Z&&l=="href"?decodeURIComponent(a.getAttribute(l,
+2)):k.value),wb(a,j)&&(c[j]=!0),X(a,b,k,j),O(b,j,"A",f);a=a.className;if(G(a))for(;g=e.exec(a);)j=da(g[2]),O(b,j,"C",f)&&(c[j]=S(g[3])),a=a.substr(g.index+g[0].length);break;case 3:F(b,a.nodeValue);break;case 8:try{if(g=d.exec(a.nodeValue))j=da(g[1]),O(b,j,"M",f)&&(c[j]=S(g[2]))}catch(q){}}b.sort(A);return b}function I(a,b,c,d,e){function f(a,b){if(a)a.require=y.require,n.push(a);if(b)b.require=y.require,z.push(b)}function i(a,b){var c,d="data",e=!1;if(G(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=a.substr(1),
+c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw w("No controller: "+a);}else K(a)&&(c=[],m(a,function(a){c.push(i(a,b))}));return c}function l(a,d,e,f,g){var j,T,q,o,R;j=b===e?c:bc(c,new t(u(e),c.$attr));T=j.$$element;A&&J(A.scope)&&m(A.scope,function(a,b){(ga[a]||M)(b,a,d.$parent||d,d,j)});D&&m(D,function(a){var b={$scope:d,$element:T,$attrs:j,$transclude:g};m(a.inject||{},function(a,c){(ga[a]||M)(c,a,A?d.$parent||d:d,b,j)});R=a.controller;R=="@"&&(R=j[a.name]);
+T.data("$"+a.name+"Controller",s(R,b))});f=0;for(q=n.length;f<q;f++)try{o=n[f],o(d,T,j,o.require&&i(o.require,T))}catch(uc){k(uc,ya(T))}a&&a(d,e.childNodes,p,g);f=0;for(q=z.length;f<q;f++)try{o=z[f],o(d,T,j,o.require&&i(o.require,T))}catch(tc){k(tc,ya(T))}}for(var j=-Number.MAX_VALUE,n=[],z=[],A=null,I=null,O=null,F=c.$$element=u(b),y,X,r,C,E=d,D,x,v,B=0,L=a.length;B<L;B++){y=a[B];r=p;if(j>y.priority)break;if(v=y.scope)H("isolated scope",I,y,F),J(v)&&(q(F,"ng-isolate-scope"),I=y),q(F,"ng-scope"),
+A=A||y;X=y.name;if(v=y.controller)D=D||{},H("'"+X+"' controller",D[X],y,F),D[X]=y;if(v=y.transclude)H("transclusion",C,y,F),C=y,j=y.priority,v=="element"?(r=u(b),F=c.$$element=u("<\!-- "+X+": "+c[X]+" --\>"),b=F[0],Da(e,u(r[0]),b),E=o(r,d,j)):(r=u($a(b)).contents(),F.html(""),E=o(r,d));if(v=y.template)if(H("template",O,y,F),O=y,r=u("<div>"+S(v)+"</div>").contents(),b=r[0],y.replace){if(r.length!=1||b.nodeType!==1)throw new w(g+v);Da(e,F,b);X={$attr:{}};a=a.concat(P(b,a.splice(B+1,a.length-(B+1)),
+X));R(c,X);L=a.length}else F.html(v);if(y.templateUrl)H("template",O,y,F),O=y,l=$(a.splice(B,a.length-B),l,F,c,e,y.replace,E),L=a.length;else if(y.compile)try{x=y.compile(F,c,E),N(x)?f(null,x):x&&f(x.pre,x.post)}catch(Q){k(Q,ya(F))}if(y.terminal)l.terminal=!0,j=Math.max(j,y.priority)}l.scope=A&&A.scope;l.transclude=C&&E;return l}function O(d,e,i,g){var l=!1;if(a.hasOwnProperty(e))for(var j,e=b.get(e+c),n=0,s=e.length;n<s;n++)try{if(j=e[n],(g===p||g>j.priority)&&j.restrict.indexOf(i)!=-1)d.push(j),
+l=!0}catch(q){k(q)}return l}function R(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;m(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});m(b,function(b,f){f=="class"?q(e,b):f=="style"?e.attr("style",e.attr("style")+";"+b):f.charAt(0)!="$"&&!a.hasOwnProperty(f)&&(a[f]=b,d[f]=c[f])})}function $(a,b,c,d,e,f,i){var l=[],k,s,q=c[0],o=a.shift(),M=C({},o,{controller:null,templateUrl:null,transclude:null});c.html("");j.get(o.templateUrl,{cache:n}).success(function(j){var n,
+o;if(f){o=u("<div>"+S(j)+"</div>").contents();n=o[0];if(o.length!=1||n.nodeType!==1)throw new w(g+j);j={$attr:{}};Da(e,c,n);P(n,a,j);R(d,j)}else n=q,c.html(j);a.unshift(M);k=I(a,c,d,i);for(s=z(c.contents(),i);l.length;){var m=l.pop(),j=l.pop();o=l.pop();var A=l.pop(),H=n;o!==q&&(H=$a(n),Da(j,u(o),H));k(function(){b(s,A,H,e,m)},A,H,e,m)}l=null}).error(function(a,b,c,d){throw w("Failed to load template: "+d.url);});return function(a,c,d,e,f){l?(l.push(c),l.push(d),l.push(e),l.push(f)):k(function(){b(s,
+c,d,e,f)},c,d,e,f)}}function A(a,b){return b.priority-a.priority}function H(a,b,c,d){if(b)throw w("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+ya(d));}function F(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:D(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);q(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function X(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:D(function(a,b,c){d==="class"&&(e=i(c[d],!0));c.$$observers[d]=
+[];c[d]=p;a.$watch(e,function(a){c.$set(d,a)})})})}function Da(a,b,c){var d=b[0],e=d.parentNode,f,i;if(a){f=0;for(i=a.length;f<i;f++)if(a[f]==d){a[f]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ga={attribute:function(a,b,c,d,e){d[a]=e[a]},evaluate:function(a,b,c,d,e){d[a]=c.$eval(e[a])},bind:function(a,b,c,d,e){var f=i(e[a]);d.$watch(function(){return f(c)},function(b){d[a]=b})},accessor:function(a,b,c,d,e){var f=r,i=r,g=e[a];g&&(f=l(g),i=f.assign||function(){throw w("Expression '"+
+g+"' not assignable.");});d[a]=function(a){return arguments.length?i(c,a):f(c)}},expression:function(a,b,c,d,e){d[a]=function(b){l(e[a])(c,b)}}},t=function(a,b){this.$$element=a;this.$$observers={};this.$attr=b||{}};t.prototype={$normalize:da,$set:function(a,b,c,d){var e=wb(this.$$element[0],a.toLowerCase());e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Xa(a,"-"));c!==!1&&(b===null||b===p?this.$$element.removeAttr(d):this.$$element.attr(d,b));m(this.$$observers[a],
+function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){this.$$observers[a]&&this.$$observers[a].push(b);return b}};return o}]}function da(b){return pb(b.replace(vc,""))}function wc(){var b={};this.register=function(a,c){J(a)?C(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(G(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:cb(e.$scope,g,!0)||cb(c,g,!0);pa(d,g,!0)}return a.instantiate(d,e)}}]}function xc(){this.$get=["$rootScope","$browser",function(b,a){function c(c,
+e){return a.defer(function(){b.$apply(c)},e)}c.cancel=function(b){return a.defer.cancel(b)};return c}]}function yc(){this.$get=["$window",function(b){return u(b.document)}]}function zc(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ac(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(c){return c?(a=c,this):b};this.$get=["$parse",function(c){var d=b.length,e=a.length;return function(g,h){for(var f,i,k=0,j=[],
+n=g.length,l=!1,s=[];k<n;)(f=g.indexOf(b,k))!=-1&&(i=g.indexOf(a,f+d))!=-1?(k!=f&&j.push(g.substring(k,f)),j.push(k=c(l=g.substring(f+d,i))),k.exp=l,k=i+e,l=!0):(k!=n&&j.push(g.substring(k)),k=n);if(!(n=j.length))j.push(""),n=1;if(!h||l)return s.length=n,k=function(a){for(var b=0,c=n,d;b<c;b++){if(typeof(d=j[b])=="function")d=d(a),d==null||d==p?d="":typeof d!="string"&&(d=ba(d));s[b]=d}return s.join("")},k.exp=g,k.parts=j,k}}]}function Ab(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Wa(b[a]);return b.join("/")}
+function Ea(b,a){var c=Bb.exec(b),c={protocol:c[1],host:c[3],port:x(c[5])||Cb[c[1]]||null,path:c[6]||"/",search:c[8],hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function ta(b,a,c){return b+"://"+a+(c==Cb[b]?"":":"+c)}function Bc(b,a,c){var d=Ea(b);return decodeURIComponent(d.path)!=a||t(d.hash)||d.hash.indexOf(c)!==0?b:ta(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Cc(b,a,c){var d=Ea(b);if(decodeURIComponent(d.path)==
+a)return b;else{var e=d.search&&"?"+d.search||"",g=d.hash&&"#"+d.hash||"",h=a.substr(0,a.lastIndexOf("/")),f=d.path.substr(h.length);if(d.path.indexOf(h)!==0)throw'Invalid url "'+b+'", missing path prefix "'+h+'" !';return ta(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function db(b,a){a=a||"";this.$$parse=function(b){var d=Ea(b,this);if(d.path.indexOf(a)!==0)throw'Invalid url "'+b+'", missing path prefix "'+a+'" !';this.$$path=decodeURIComponent(d.path.substr(a.length));this.$$search=Ua(d.search);this.$$hash=
+d.hash&&decodeURIComponent(d.hash)||"";this.$$compose()};this.$$compose=function(){var b=mb(this.$$search),d=this.$$hash?"#"+Wa(this.$$hash):"";this.$$url=Ab(this.$$path)+(b?"?"+b:"")+d;this.$$absUrl=ta(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$parse(b)}function eb(b,a){var c;this.$$parse=function(b){var e=Ea(b,this);if(e.hash&&e.hash.indexOf(a)!==0)throw'Invalid url "'+b+'", missing hash prefix "'+a+'" !';c=e.path+(e.search?"?"+e.search:"");e=Dc.exec((e.hash||"").substr(a.length));
+this.$$path=e[1]?(e[1].charAt(0)=="/"?"":"/")+decodeURIComponent(e[1]):"";this.$$search=Ua(e[3]);this.$$hash=e[5]&&decodeURIComponent(e[5])||"";this.$$compose()};this.$$compose=function(){var b=mb(this.$$search),e=this.$$hash?"#"+Wa(this.$$hash):"";this.$$url=Ab(this.$$path)+(b?"?"+b:"")+e;this.$$absUrl=ta(this.$$protocol,this.$$host,this.$$port)+c+(this.$$url?"#"+a+this.$$url:"")};this.$$parse(b)}function Fa(b){return function(){return this[b]}}function Db(b,a){return function(c){if(t(c))return this[b];
+this[b]=a(c);this.$$compose();return this}}function Ec(){var b="",a=!1;this.hashPrefix=function(a){return E(a)?(b=a,this):b};this.html5Mode=function(b){return E(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$document",function(c,d,e,g){var h,f=d.baseHref()||"/",i=f.substr(0,f.lastIndexOf("/")),k=d.url();if(a){var e=h=e.history?new db(Bc(k,f,b),i):new eb(Cc(k,f,b),b),j=ta(e.protocol(),e.host(),e.port())+i;g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=
+u(a.target);b.length&&v(b[0].nodeName)!=="a";)b=b.parent();var d=b.prop("href");if(d&&!(b.attr("target")||d.indexOf(j)!==0))h.url(d.substr(j.length)),c.$apply(),a.preventDefault(),V.angular["ff-684208-preventDefault"]=!0}})}else h=new eb(k,b);h.absUrl()!=k&&d.url(h.absUrl(),!0);d.onUrlChange(function(a){h.absUrl()!=a&&(c.$evalAsync(function(){h.$$parse(a)}),c.$$phase||c.$digest())});var n=0;c.$watch(function(){d.url()!=h.absUrl()&&(n++,c.$evalAsync(function(){d.url(h.absUrl(),h.$$replace);h.$$replace=
+!1}));return n});return h}]}function Fc(){this.$get=["$window",function(b){function a(a){a instanceof w&&(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 c(c){var e=b.console||{},g=e[c]||e.log||r;return g.apply?function(){var b=[];m(arguments,function(c){b.push(a(c))});return g.apply(e,b)}:function(a,b){g(a,b)}}return{log:c("log"),warn:c("warn"),info:c("info"),error:c("error")}}]}
+function Gc(b,a){function c(a){return a.indexOf(q)!=-1}function d(){return o+1<b.length?b.charAt(o+1):!1}function e(a){return"0"<=a&&a<="9"}function g(a){return a==" "||a=="\r"||a=="\t"||a=="\n"||a=="\u000b"||a=="\u00a0"}function h(a){return"a"<=a&&a<="z"||"A"<=a&&a<="Z"||"_"==a||a=="$"}function f(a){return a=="-"||a=="+"||e(a)}function i(a,c,d){d=d||o;throw w("Lexer Error: "+a+" at column"+(E(c)?"s "+c+"-"+o+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function k(){for(var a="",c=
+o;o<b.length;){var g=v(b.charAt(o));if(g=="."||e(g))a+=g;else{var j=d();if(g=="e"&&f(j))a+=g;else if(f(g)&&j&&e(j)&&a.charAt(a.length-1)=="e")a+=g;else if(f(g)&&(!j||!e(j))&&a.charAt(a.length-1)=="e")i("Invalid exponent");else break}o++}a*=1;l.push({index:c,text:a,json:!0,fn:function(){return a}})}function j(){for(var c="",d=o,f,i,j;o<b.length;){var k=b.charAt(o);if(k=="."||h(k)||e(k))k=="."&&(f=o),c+=k;else break;o++}if(f)for(i=o;i<b.length;){k=b.charAt(i);if(k=="("){j=c.substr(f-d+1);c=c.substr(0,
+f-d);o=i;break}if(g(k))i++;else break}d={index:d,text:c};if(Ga.hasOwnProperty(c))d.fn=d.json=Ga[c];else{var n=Eb(c,a);d.fn=C(function(a,b){return n(a,b)},{assign:function(a,b){return Fb(a,c,b)}})}l.push(d);j&&(l.push({index:f,text:".",json:!1}),l.push({index:f+1,text:j,json:!1}))}function n(a){var c=o;o++;for(var d="",e=a,f=!1;o<b.length;){var g=b.charAt(o);e+=g;if(f)g=="u"?(g=b.substring(o+1,o+5),g.match(/[\da-f]{4}/i)||i("Invalid unicode escape [\\u"+g+"]"),o+=4,d+=String.fromCharCode(parseInt(g,
+16))):(f=Hc[g],d+=f?f:g),f=!1;else if(g=="\\")f=!0;else if(g==a){o++;l.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=g;o++}i("Unterminated quote",c)}for(var l=[],s,o=0,m=[],q,z=":";o<b.length;){q=b.charAt(o);if(c("\"'"))n(q);else if(e(q)||c(".")&&e(d()))k();else if(h(q)){if(j(),"{,".indexOf(z)!=-1&&m[0]=="{"&&(s=l[l.length-1]))s.json=s.text.indexOf(".")==-1}else if(c("(){}[].,;:"))l.push({index:o,text:q,json:":[,".indexOf(z)!=-1&&c("{[")||c("}]:,")}),c("{[")&&m.unshift(q),
+c("}]")&&m.shift(),o++;else if(g(q)){o++;continue}else{var P=q+d(),I=Ga[q],p=Ga[P];p?(l.push({index:o,text:P,fn:p}),o+=2):I?(l.push({index:o,text:q,fn:I,json:"[,:".indexOf(z)!=-1&&c("+-")}),o+=1):i("Unexpected next character ",o,o+1)}z=q}return l}function Ic(b,a,c,d){function e(a,c){throw w("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(H.length===0)throw w("Unexpected end of expression: "+b);return H[0]}
+function h(a,b,c,d){if(H.length>0){var e=H[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),H.shift(),b):!1}function i(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function k(a,b){return function(c,d){return a(c,d,b)}}function j(a,b,c){return function(d,e){return b(d,e,a,c)}}function n(){for(var a=[];;)if(H.length>0&&!h("}",")",";","]")&&a.push(v()),!f(";"))return a.length==1?a[0]:function(b,
+c){for(var d,e=0;e<a.length;e++){var f=a[e];f&&(d=f(b,c))}return d}}function l(){for(var a=f(),b=c(a.text),d=[];;)if(a=f(":"))d.push(F());else{var e=function(a,c,e){for(var e=[e],f=0;f<d.length;f++)e.push(d[f](a,c));return b.apply(a,e)};return function(){return e}}}function s(){for(var a=o(),b;;)if(b=f("||"))a=j(a,b.fn,o());else return a}function o(){var a=m(),b;if(b=f("&&"))a=j(a,b.fn,o());return a}function m(){var a=q(),b;if(b=f("==","!="))a=j(a,b.fn,m());return a}function q(){var a;a=z();for(var b;b=
+f("+","-");)a=j(a,b.fn,z());if(b=f("<",">","<=",">="))a=j(a,b.fn,q());return a}function z(){for(var a=P(),b;b=f("*","/","%");)a=j(a,b.fn,P());return a}function P(){var a;return f("+")?I():(a=f("-"))?j($,a.fn,P()):(a=f("!"))?k(a.fn,P()):I()}function I(){var a;if(f("("))a=v(),i(")");else if(f("["))a=O();else if(f("{"))a=R();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=u(a,c),c=null):b.text==="["?(c=a,a=ga(a)):b.text==="."?(c=a,a=t(a)):e("IMPOSSIBLE");
+return a}function O(){var a=[];if(g().text!="]"){do a.push(F());while(f(","))}i("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function R(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;i(":");var c=F();a.push({key:b,value:c})}while(f(","))}i("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],g=f.value(b,c);d[f.key]=g}return d}}var $=D(0),A,H=Gc(b,d),F=function(){var a=s(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+
+b.substring(0,d.index)+"] can not be assigned to",d),c=s(),function(b,d){return a.assign(b,c(b,d),d)}):a},u=function(a,b){var c=[];if(g().text!=")"){do c.push(F());while(f(","))}i(")");return function(d,e){for(var f=[],g=b?b(d,e):d,i=0;i<c.length;i++)f.push(c[i](d,e));i=a(d,e)||r;return i.apply?i.apply(g,f):i(f[0],f[1],f[2],f[3],f[4])}},t=function(a){var b=f().text,c=Eb(b,d);return C(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Fb(a(c,e),b,d)}})},ga=function(a){var b=F();i("]");
+return C(function(c,d){var e=a(c,d),f=b(c,d),g;if(!e)return p;if((e=e[f])&&e.then){g=e;if(!("$$v"in e))g.$$v=p,g.then(function(a){g.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},v=function(){for(var a=F(),b;;)if(b=f("|"))a=j(a,b.fn,l());else return a};a?(F=s,u=t=ga=v=function(){e("is not valid json",{text:b,index:0})},A=I()):A=n();H.length!==0&&e("is an unexpected token",H[0]);return A}function Fb(b,a,c){for(var a=a.split("."),d=0;a.length>1;d++){var e=a.shift(),g=
+b[e];g||(g={},b[e]=g);b=g}return b[a.shift()]=c}function cb(b,a,c){if(!a)return b;for(var a=a.split("."),d,e=b,g=a.length,h=0;h<g;h++)d=a[h],b&&(b=(e=b)[d]);return!c&&N(b)?Sa(e,b):b}function Gb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,i;if(f===null||f===p)return f;if((f=f[b])&&f.then){if(!("$$v"in f))i=f,i.$$v=p,i.then(function(a){i.$$v=a});f=f.$$v}if(!a||f===null||f===p)return f;if((f=f[a])&&f.then){if(!("$$v"in f))i=f,i.$$v=p,i.then(function(a){i.$$v=a});f=f.$$v}if(!c||f===
+null||f===p)return f;if((f=f[c])&&f.then){if(!("$$v"in f))i=f,i.$$v=p,i.then(function(a){i.$$v=a});f=f.$$v}if(!d||f===null||f===p)return f;if((f=f[d])&&f.then){if(!("$$v"in f))i=f,i.$$v=p,i.then(function(a){i.$$v=a});f=f.$$v}if(!e||f===null||f===p)return f;if((f=f[e])&&f.then){if(!("$$v"in f))i=f,i.$$v=p,i.then(function(a){i.$$v=a});f=f.$$v}return f}}function Eb(b,a){if(fb.hasOwnProperty(b))return fb[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Gb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,
+g;do g=Gb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=p,a=g;while(e<d);return g};else{var g="var l, fn, p;\n";m(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+(b?"s":'((k&&k.hasOwnProperty("'+a+'"))?k:s)')+'["'+a+'"];\nif (s && s.then) {\n if (!("$$v" in s)) {\n p=s;\n p.$$v = undefined;\n p.then(function(v) {p.$$v=v;});\n}\n s=s.$$v\n}\n'});g+="return s;";e=Function("s","k",g);e.toString=function(){return g}}return fb[b]=e}function Jc(){var b={};this.$get=["$filter","$sniffer",
+function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?b[d]:b[d]=Ic(d,!1,a,c.csp);case "function":return d;default:return r}}}]}function Kc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Lc(function(a){b.$evalAsync(a)},a)}]}function Lc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],i,k;return k={resolve:function(a){if(f){var c=f;f=p;i=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],i.then(a[0],
+a[1])})}},reject:function(a){k.resolve(h(a))},promise:{then:function(b,g){var l=e(),k=function(d){try{l.resolve((b||c)(d))}catch(e){a(e),l.reject(e)}},h=function(b){try{l.resolve((g||d)(b))}catch(c){a(c),l.reject(c)}};f?f.push([k,h]):i.then(k,h);return l.promise}}}},g=function(a){return a&&a.then?a:{then:function(c){var d=e();b(function(){d.resolve(c(a))});return d.promise}}},h=function(a){return{then:function(c,g){var j=e();b(function(){j.resolve((g||d)(a))});return j.promise}}};return{defer:e,reject:h,
+when:function(f,i,k){var j=e(),n,l=function(b){try{return(i||c)(b)}catch(d){return a(d),h(d)}},s=function(b){try{return(k||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){n||(n=!0,j.resolve(g(a).then(l,s)))},function(a){n||(n=!0,j.resolve(s(a)))})});return j.promise},all:function(a){var b=e(),c=a.length,d=[];c?m(a,function(a,e){g(a).then(function(a){e in d||(d[e]=a,--c||b.resolve(d))},function(a){e in d||b.reject(a)})}):b.resolve(d);return b.promise}}}function Mc(){var b={};this.when=
+function(a,c){b[a]=C({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,a.length-1):a+"/";b[d]={redirectTo:a}}return this};this.otherwise=function(a){this.when(null,a);return this};this.$get=["$rootScope","$location","$routeParams",function(a,c,d){function e(){var a,d;m(b,function(b,e){if(!d&&(a=h(c.path(),e)))d=Oa(b,{params:C({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&Oa(b[null],{params:{},pathParams:{}})}function g(a,b){var c=[];m((a||"").split(":"),function(a,
+d){if(d==0)c.push(a);else{var e=a.match(/(\w+)(.*)/),f=e[1];c.push(b[f]);c.push(e[2]||"");delete b[f]}});return c.join("")}var h=function(a,b){var c="^"+b.replace(/([\.\\\(\)\^\$])/g,"\\$1")+"$",d=[],e={};m(b.split(/\W/),function(a){if(a){var b=RegExp(":"+a+"([\\W])");c.match(b)&&(c=c.replace(b,"([^\\/]*)$1"),d.push(a))}});var f=a.match(RegExp(c));f&&m(d,function(a,b){e[a]=f[b+1]});return f?e:null},f=0,i=!1,k={routes:b,reload:function(){f++;i=!0}};a.$watch(function(){return f+c.url()},function(){var b=
+e(),f=k.current;if(b&&f&&b.$route===f.$route&&ea(b.pathParams,f.pathParams)&&!b.reloadOnSearch&&!i)f.params=b.params,W(f.params,d),a.$broadcast("$routeUpdate",f);else if(b||f)i=!1,a.$broadcast("$beforeRouteChange",b,f),(k.current=b)&&(b.redirectTo?G(b.redirectTo)?c.path(g(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace():W(b.params,d)),a.$broadcast("$afterRouteChange",b,f)});return k}]}function Nc(){this.$get=D({})}function Oc(){var b=
+10;this.digestTtl=function(a){arguments.length&&(b=a);return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=va();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$asyncQueue=[];this.$$listeners={}}function g(a,b){var c=a.$root;if(c.$$phase)throw w(c.$$phase+" already in progress");c.$$phase=b}function h(a,b){var c=d(a);pa(c,b);return c}function f(){}
+e.prototype={$new:function(a){if(N(a))throw w("API-CHANGE: Use $controller to instantiate controllers.");a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=va());a["this"]=a;a.$$listeners={};a.$parent=this;a.$$asyncQueue=[];a.$$watchers=a.$$nextSibling=a.$$childHead=a.$$childTail=null;a.$$prevSibling=this.$$childTail;this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=a:this.$$childHead=this.$$childTail=a;return a},$watch:function(a,b,c){var d=h(a,"watch"),
+e=this.$$watchers,g={fn:b,last:f,get:d,exp:a,eq:!!c};if(!N(b)){var o=h(b||r,"listener");g.fn=function(a,b,c){o(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){xa(e,g)}},$digest:function(){var a,d,e,h,l,s,o,m=b,q,z=[],p,I;g(this,"$digest");do{o=!1;q=this;do{for(l=q.$$asyncQueue;l.length;)try{q.$eval(l.shift())}catch(O){c(O)}if(h=q.$$watchers)for(s=h.length;s--;)try{if(a=h[s],(d=a.get(q))!==(e=a.last)&&!(a.eq?ea(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))o=!0,a.last=
+a.eq?W(d):d,a.fn(d,e===f?d:e,q),m<5&&(p=4-m,z[p]||(z[p]=[]),I=N(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,I+="; newVal: "+ba(d)+"; oldVal: "+ba(e),z[p].push(I))}catch(R){c(R)}if(!(h=q.$$childHead||q!==this&&q.$$nextSibling))for(;q!==this&&!(h=q.$$nextSibling);)q=q.$parent}while(q=h);if(o&&!m--)throw w(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+ba(z));}while(o||l.length);this.$root.$$phase=null},$destroy:function(){if(this.$root!=this){var a=this.$parent;
+this.$broadcast("$destroy");if(a.$$childHead==this)a.$$childHead=this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g(this,"$apply"),this.$eval(a)}catch(b){c(b)}finally{this.$root.$$phase=null,this.$root.$digest()}},
+$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){xa(c,b)}},$emit:function(a,b){var d=[],e,f=this,g={name:a,targetScope:f,cancel:function(){g.cancelled=!0},cancelled:!1},h=[g].concat(ha.call(arguments,1)),m,q;do{e=f.$$listeners[a]||d;g.currentScope=f;m=0;for(q=e.length;m<q;m++)try{if(e[m].apply(null,h),g.cancelled)return g}catch(z){c(z)}f=f.$parent}while(f);return g},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this},g=[f].concat(ha.call(arguments,
+1));do if(d=e,f.currentScope=d,m(d.$$listeners[a],function(a){try{a.apply(null,g)}catch(b){c(b)}}),!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent;while(d=e);return f}};return new e}]}function Pc(){this.$get=["$window",function(b){var a={},c=x((/android (\d+)/.exec(v(b.navigator.userAgent))||[])[1]);return{history:!(!b.history||!b.history.pushState||c<4),hashchange:"onhashchange"in b&&(!b.document.documentMode||b.document.documentMode>7),hasEvent:function(c){if(c==
+"input"&&Z==9)return!1;if(t(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Qc(){this.$get=D(V)}function Hb(b){var a={},c,d,e;if(!b)return a;m(b.split("\n"),function(b){e=b.indexOf(":");c=v(S(b.substr(0,e)));d=S(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ib(b){var a=J(b)?b:p;return function(c){a||(a=Hb(b));return c?a[v(c)]||null:a}}function Jb(b,a,c){if(N(c))return c(b,a);m(c,function(c){b=c(b,a)});return b}function Rc(){var b=/^\s*(\[|\{[^\{])/,
+a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){G(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=lb(d,!0)));return d}],transformRequest:[function(a){return J(a)&&Pa.apply(a)!=="[object File]"?ba(a):a}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json"},put:{"Content-Type":"application/json"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope",
+"$q","$injector",function(a,b,c,i,k,j){function n(a){function c(a){var b=C({},a,{data:Jb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:k.reject(b)}a.method=la(a.method);var e=a.transformRequest||d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=C({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[v(a.method)],a.headers),e=Jb(a.data,Ib(g),e),i;t(a.data)&&delete g["Content-Type"];i=l(a,e,g);i=i.then(c,c);m(M,function(a){i=a(i)});i.success=function(b){i.then(function(c){b(c.data,
+c.status,c.headers,a)});return i};i.error=function(b){i.then(null,function(c){b(c.data,c.status,c.headers,a)});return i};return i}function l(b,c,d){function e(a,b,c){m&&(200<=a&&a<300?m.put(M,[a,b,Hb(c)]):m.remove(M));f(b,a,c);i.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?l.resolve:l.reject)({data:a,status:c,headers:Ib(d),config:b})}function h(){var a=Ra(n.pendingRequests,b);a!==-1&&n.pendingRequests.splice(a,1)}var l=k.defer(),j=l.promise,m,p,M=s(b.url,b.params);n.pendingRequests.push(b);
+j.then(h,h);b.cache&&b.method=="GET"&&(m=J(b.cache)?b.cache:o);if(m)if(p=m.get(M))if(p.then)return p.then(h,h),p;else K(p)?f(p[1],p[0],W(p[2])):f(p,200,{});else m.put(M,j);p||a(b.method,M,c,e,d,b.timeout,b.withCredentials);return j}function s(a,b){if(!b)return a;var c=[];Zb(b,function(a,b){a==null||a==p||(J(a)&&(a=ba(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),M=[];m(e,function(a){M.push(G(a)?j.get(a):j.invoke(a))});
+n.pendingRequests=[];(function(a){m(arguments,function(a){n[a]=function(b,c){return n(C(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){m(arguments,function(a){n[a]=function(b,c,d){return n(C(d||{},{method:a,url:b,data:c}))}})})("post","put");n.defaults=d;return n}]}function Sc(){this.$get=["$browser","$window","$document",function(b,a,c){return Tc(b,Uc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Tc(b,a,c,d,e,g){function h(a,b){var c=
+e.createElement("script"),d=function(){e.body.removeChild(c);b&&b()};c.type="text/javascript";c.src=a;Z?c.onreadystatechange=function(){/loaded|complete/.test(c.readyState)&&d()}:c.onload=c.onerror=d;e.body.appendChild(c)}return function(e,i,k,j,n,l,s){function o(a,c,d,e){c=(i.match(Bb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(r)}b.$$incOutstandingRequestCount();i=i||b.url();if(v(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=
+a};h(i.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(j,200,d[p].data):o(j,-2);delete d[p]})}else{var q=new a;q.open(e,i,!0);m(n,function(a,b){a&&q.setRequestHeader(b,a)});var z;q.onreadystatechange=function(){q.readyState==4&&o(j,z||q.status,q.responseText,q.getAllResponseHeaders())};if(s)q.withCredentials=!0;q.send(k||"");l>0&&c(function(){z=-1;q.abort()},l)}}}function Vc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,
+minFrac:0,maxFrac:3,posPre:"",posSuf:"",negPre:"-",negSuf:"",gSize:3,lgSize:3},{minInt:1,minFrac:2,maxFrac:2,posPre:"\u00a4",posSuf:"",negPre:"(\u00a4",negSuf:")",gSize:3,lgSize:3}],CURRENCY_SYM:"$"},DATETIME_FORMATS:{MONTH:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),SHORTMONTH:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),DAY:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),SHORTDAY:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(","),
+AMPMS:["AM","PM"],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",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function Kb(b){function a(a,e){return b.factory(a+c,e)}var c="Filter";this.register=a;this.$get=["$injector",function(a){return function(b){return a.get(b+c)}}];a("currency",Lb);a("date",Mb);a("filter",Wc);a("json",Xc);a("limitTo",Yc);a("lowercase",
+Zc);a("number",Nb);a("orderBy",Ob);a("uppercase",$c)}function Wc(){return function(b,a){if(!(b instanceof Array))return 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 a){case "boolean":case "number":case "string":a={$:a};case "object":for(var e in a)e=="$"?function(){var b=(""+a[e]).toLowerCase();b&&c.push(function(a){return d(a,b)})}():function(){var b=e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(cb(a,b),f)})}();break;case "function":c.push(a);break;default:return b}for(var g=[],h=0;h<b.length;h++){var f=b[h];c.check(f)&&g.push(f)}return g}}function Lb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(t(d))d=
+a.CURRENCY_SYM;return Pb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Nb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Pb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Pb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",i=[];if(h.indexOf("e")!==-1)f=h;else{h=(h.split(Qb)[1]||"").length;t(e)&&(e=Math.min(Math.max(a.minFrac,h),a.maxFrac));var h=Math.pow(10,e),b=Math.round(b*h)/h,b=(""+b).split(Qb),h=b[0],b=b[1]||"",k=0,
+j=a.lgSize,n=a.gSize;if(h.length>=j+n)for(var k=h.length-j,l=0;l<k;l++)(k-l)%n===0&&l!==0&&(f+=c),f+=h.charAt(l);for(l=k;l<h.length;l++)(h.length-l)%j===0&&l!==0&&(f+=c),f+=h.charAt(l);for(;b.length<e;)b+="0";e&&(f+=d+b.substr(0,e))}i.push(g?a.negPre:a.posPre);i.push(f);i.push(g?a.negSuf:a.posSuf);return i.join("")}function gb(b,a,c){var d="";b<0&&(d="-",b=-b);for(b=""+b;b.length<a;)b="0"+b;c&&(b=b.substr(b.length-a));return d+b}function B(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=
+c;e===0&&c==-12&&(e=12);return gb(e,a,d)}}function Ha(b,a){return function(c,d){var e=c["get"+b](),g=la(a?"SHORT"+b:b);return d[g][e]}}function Mb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=x(b[9]+b[10]),h=x(b[9]+b[11]));a.setUTCFullYear(x(b[1]),x(b[2])-1,x(b[3]));a.setUTCHours(x(b[4]||0)-g,x(b[5]||0)-h,x(b[6]||0),x(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;return function(c,e){var g=
+"",h=[],f,i,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;G(c)&&(c=ad.test(c)?x(c):a(c));ua(c)&&(c=new Date(c));if(!ma(c))return c;for(;e;)(i=bd.exec(e))?(h=h.concat(ha.call(i,1)),e=h.pop()):(h.push(e),e=null);m(h,function(a){f=cd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function Xc(){return function(b){return ba(b,!0)}}function Yc(){return function(b,a){if(!(b instanceof Array))return b;var a=x(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?
+a=b.length:a<-b.length&&(a=-b.length);a>0?(d=0,e=a):(d=b.length+a,e=b.length);for(;d<e;d++)c.push(b[d]);return c}}function Ob(b){return function(a,c,d){function e(a,b){return Ta(b)?function(b,c){return a(c,b)}:a}if(!(a instanceof Array))return a;if(!c)return a;for(var c=K(c)?c:[c],c=Qa(c,function(a){var c=!1,d=a||wa;if(G(a)){if(a.charAt(0)=="+"||a.charAt(0)=="-")c=a.charAt(0)=="-",a=a.substring(1);d=b(a)}return e(function(a,b){var c;c=d(a);var e=d(b),f=typeof c,g=typeof e;f==g?(f=="string"&&(c=c.toLowerCase()),
+f=="string"&&(e=e.toLowerCase()),c=c===e?0:c<e?-1:1):c=f<g?-1:1;return c},c)}),g=[],h=0;h<a.length;h++)g.push(a[h]);return g.sort(e(function(a,b){for(var d=0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function Q(b){N(b)&&(b={link:b});b.restrict=b.restrict||"AC";return D(b)}function Rb(b,a){function c(a,c){c=c?"-"+Xa(c,"-"):"";b.removeClass((a?Ia:Ja)+c).addClass((a?Ja:Ia)+c)}var d=this,e=b.parent().controller("form")||Ka,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=
+!0;d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(La);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=