Post Thumbnail Editor - Version 2.2.0

Version Description

  • View the thumbnails you are planning on modifying from the crop tab
  • New documentation at http://sewpafly.github.io/post-thumbnail-editor
  • Resolved issue where users without capability could load the editor
  • Added new custom pte-edit capability.
  • Now use almondjs for the normal AMD loader
  • Fixed some crop constraint bugs
  • Removed requireJS domReady plugin
  • Upgraded angularjs
  • Improved startup
Download this release

Release Info

Developer sewpafly
Plugin Icon Post Thumbnail Editor
Version 2.2.0
Comparing to
See all releases

Code changes from version 2.1.0 to 2.2.0

Makefile CHANGED
@@ -14,6 +14,7 @@ all: gzip-js trans
14
  js:
15
  @echo "Building javascript"
16
  r.js -o build.js
 
17
 
18
  $(JS_OUTPUT): js
19
  gzip-js: $(JS_OUTPUT)
14
  js:
15
  @echo "Building javascript"
16
  r.js -o build.js
17
+ chmod -R 777 $(JS_OUTPUT)
18
 
19
  $(JS_OUTPUT): js
20
  gzip-js: $(JS_OUTPUT)
README.txt CHANGED
@@ -1,6 +1,6 @@
1
  === Post Thumbnail Editor ===
2
  Contributors: sewpafly
3
- Donate link: https://www.wepay.com/donate/34543
4
  Tags: post-thumbnail, post thumbnail, featured image, featured, editor, image, awesome, crop
5
  Requires at least: 3.5
6
  Tested up to: 3.6
@@ -35,7 +35,7 @@ To meet the needs of themes where the post-thumbnails have random and capricious
35
  1. Click "Edit Image"
36
  2. Click the "Post Thumbnail Editor" link under the other thumbnail options.
37
  3. Using Post Thumbnail Editor Interface
38
- 1. Select the thumbnails you want to edit. If a thumbnail defines a specific aspect ratio it will be applied to the editor. If you select thumbnails with more than 1 different aspect ratios, this feature is disabled. Be careful or you might make some of your pictures look funny.
39
  2. Select the cropped/scaled area, by clicking and dragging on the left-hand image.
40
  3. Click the "Crop" button.
41
  4. Use the save icon to save the pictures, or use the view tab to compare the old and new versions before you commit.
@@ -43,15 +43,27 @@ To meet the needs of themes where the post-thumbnails have random and capricious
43
 
44
  = Did you even test this? =
45
 
46
- Yes. No. Sort of. Thanks for asking. But [let me know if you're having problems](https://github.com/sewpafly/post-thumbnail-editor/issues) and I'll see what I can do.
47
 
48
- = Is there a way to regenerate images created by this plugin? =
49
 
50
- Do you really want this? I haven't gotten any feedback that this is desirable... So imma let it go for now.
51
 
52
- = What version of PHP do I need? =
53
 
54
- Using a version with [json_encode](http://www.php.net/manual/en/function.json-encode.php) enabled would be nice...
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
  == Screenshots ==
57
 
@@ -63,6 +75,17 @@ Using a version with [json_encode](http://www.php.net/manual/en/function.json-en
63
 
64
  == Changelog ==
65
 
 
 
 
 
 
 
 
 
 
 
 
66
  = 2.1.0 =
67
  * Crop Constraints are visually available: green is good and red means there will be upscaling
68
  * In the options panel change the size of the cropping image
@@ -126,5 +149,5 @@ Using a version with [json_encode](http://www.php.net/manual/en/function.json-en
126
 
127
  == Upgrade Notice ==
128
 
129
- = 2.1.0 =
130
- Several new features and bug fixes since 2.0.1
1
  === Post Thumbnail Editor ===
2
  Contributors: sewpafly
3
+ Donate link: http://sewpafly.github.io/post-thumbnail-editor/#toc_donations
4
  Tags: post-thumbnail, post thumbnail, featured image, featured, editor, image, awesome, crop
5
  Requires at least: 3.5
6
  Tested up to: 3.6
35
  1. Click "Edit Image"
36
  2. Click the "Post Thumbnail Editor" link under the other thumbnail options.
37
  3. Using Post Thumbnail Editor Interface
38
+ 1. Select the thumbnails you want to edit. If a thumbnail defines a specific aspect ratio it will be applied to the editor. If you select thumbnails with different aspect ratios (`width / height`), this feature is disabled. Be careful or you might make some of your pictures look funny.
39
  2. Select the cropped/scaled area, by clicking and dragging on the left-hand image.
40
  3. Click the "Crop" button.
41
  4. Use the save icon to save the pictures, or use the view tab to compare the old and new versions before you commit.
43
 
44
  = Did you even test this? =
45
 
46
+ Yes. No. Sort of. Thanks for asking. But [let me know if you're having problems][gh] and I'll see what I can do.
47
 
48
+ = So it's installed but it doesn't appear to be working, how do I troubleshoot the problems? =
49
 
50
+ Before posting a question or requesting support, disable all other plugins to verify that the problem isn't caused by some esoteric conflict. If you find a conflict with another plugin, let me know and I will fix it.
51
 
52
+ If you want to post a problem on the [support forums][wp] or at [github][gh] please include the following information:
53
 
54
+ 1. What browser (and version) are you using, or which browsers have you seen the behavior in?
55
+ 2. What wordpress version are you using?
56
+ 3. Does the javascript console report any exceptions/errors?
57
+ * Google Chrome: ctrl+shift+j
58
+ * Firefox: ctrl+shift+j
59
+ * IE: F12 to open developer tools, click on the "Script" tab and view the "Console" sidebar.
60
+ 4. Detail the steps to reproduce your problem
61
+ * What did you do?
62
+ * What did you expect to happen?
63
+ * What actually happened?
64
+
65
+ [wp]: http://wordpress.org/support/plugin/post-thumbnail-editor
66
+ [gh]: https://github.com/sewpafly/post-thumbnail-editor/issues
67
 
68
  == Screenshots ==
69
 
75
 
76
  == Changelog ==
77
 
78
+ = 2.2.0 =
79
+ * View the thumbnails you are planning on modifying from the crop tab
80
+ * New documentation at http://sewpafly.github.io/post-thumbnail-editor
81
+ * Resolved issue where users without capability could load the editor
82
+ * Added new custom `pte-edit` capability.
83
+ * Now use almondjs for the normal AMD loader
84
+ * Fixed some crop constraint bugs
85
+ * Removed requireJS domReady plugin
86
+ * Upgraded angularjs
87
+ * Improved startup
88
+
89
  = 2.1.0 =
90
  * Crop Constraints are visually available: green is good and red means there will be upscaling
91
  * In the options panel change the size of the cropping image
149
 
150
  == Upgrade Notice ==
151
 
152
+ = 2.2.0 =
153
+ Several new features and bug fixes since 2.1.0
apps/angular/angular-resource.min.js CHANGED
@@ -1,9 +1,9 @@
1
  /*
2
- AngularJS v1.0.5
3
  (c) 2010-2012 Google, Inc. http://angularjs.org
4
  License: MIT
5
  */
6
- (function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(e?null:/%20/g,"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b=
7
  {},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+
8
  arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
9
  arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi,
1
  /*
2
+ AngularJS v1.0.6
3
  (c) 2010-2012 Google, Inc. http://angularjs.org
4
  License: MIT
5
  */
6
+ (function(C,d,w){'use strict';d.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(x,y){function s(b,e){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,e?"%20":"+")}function t(b,e){this.template=b+="#";this.defaults=e||{};var a=this.urlParams={};h(b.split(/\W/),function(f){f&&RegExp("(^|[^\\\\]):"+f+"\\W").test(b)&&(a[f]=!0)});this.template=b.replace(/\\:/g,":")}function u(b,e,a){function f(m,a){var b=
7
  {},a=o({},e,a);h(a,function(a,z){var c;a.charAt&&a.charAt(0)=="@"?(c=a.substr(1),c=y(c)(m)):c=a;b[z]=c});return b}function g(a){v(a||{},this)}var k=new t(b),a=o({},A,a);h(a,function(a,b){a.method=d.uppercase(a.method);var e=a.method=="POST"||a.method=="PUT"||a.method=="PATCH";g[b]=function(b,c,d,B){var j={},i,l=p,q=null;switch(arguments.length){case 4:q=B,l=d;case 3:case 2:if(r(c)){if(r(b)){l=b;q=c;break}l=c;q=d}else{j=b;i=c;l=d;break}case 1:r(b)?l=b:e?i=b:j=b;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+
8
  arguments.length+" arguments.";}var n=this instanceof g?this:a.isArray?[]:new g(i);x({method:a.method,url:k.url(o({},f(i,a.params||{}),j)),data:i}).then(function(b){var c=b.data;if(c)a.isArray?(n.length=0,h(c,function(a){n.push(new g(a))})):v(c,n);(l||p)(n,b.headers)},q);return n};g.prototype["$"+b]=function(a,d,h){var m=f(this),j=p,i;switch(arguments.length){case 3:m=a;j=d;i=h;break;case 2:case 1:r(a)?(j=a,i=d):(m=a,j=d||p);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+
9
  arguments.length+" arguments.";}g[b].call(this,m,e?this:w,j,i)}});g.bind=function(d){return u(b,o({},e,d),a)};return g}var A={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},p=d.noop,h=d.forEach,o=d.extend,v=d.copy,r=d.isFunction;t.prototype={url:function(b){var e=this,a=this.template,f,g,b=b||{};h(this.urlParams,function(h,c){f=b.hasOwnProperty(c)?b[c]:e.defaults[c];d.isDefined(f)&&f!==null?(g=s(f,!0).replace(/%26/gi,"&").replace(/%3D/gi,
apps/angular/angular.min.js CHANGED
@@ -1,161 +1,162 @@
1
  /*
2
- AngularJS v1.0.5
3
  (c) 2010-2012 Google, Inc. http://angularjs.org
4
  License: MIT
5
  */
6
- (function(X,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(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!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof L||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")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],
7
- d);return b}function mb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=mb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function nb(b){return function(a,c){b(c,a)}}function ya(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function v(b){n(arguments,function(a){a!==b&&n(a,function(a,d){b[d]=
8
- a})});return b}function E(b){return parseInt(b,10)}function za(b,a){return v(new (v(function(){},{prototype:b})),a)}function C(){}function na(b){return b}function I(b){return function(){return b}}function w(b){return typeof b=="undefined"}function x(b){return typeof b!="undefined"}function M(b){return b!=null&&typeof b=="object"}function A(b){return typeof b=="string"}function Ra(b){return typeof b=="number"}function oa(b){return xa.apply(b)=="[object Date]"}function B(b){return xa.apply(b)=="[object Array]"}
9
- function H(b){return typeof b=="function"}function pa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function O(b){return A(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Sa(b,a,c){var d=[];n(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function Aa(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 Ta(b,a){var c=Aa(b,a);c>=0&&b.splice(c,1);return a}function U(b,a){if(pa(b)||
10
- b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(B(b))for(var c=a.length=0;c<b.length;c++)a.push(U(b[c]));else for(c in n(a,function(b,c){delete a[c]}),b)a[c]=U(b[c])}else(a=b)&&(B(b)?a=U(b,[]):oa(b)?a=new Date(b.getTime()):M(b)&&(a=U(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ga(b,a){if(b===a)return!0;if(b===null||a===
11
- null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(B(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ga(b[d],a[d]))return!1;return!0}}else if(oa(b))return oa(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||pa(b)||pa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!ga(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ua(b,a){var c=
12
- arguments.length>2?ha.call(arguments,2):[];return H(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 ic(b,a){var c=a;/^\$+/.test(b)?c=q:pa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function ob(b){return A(b)?JSON.parse(b):b}function Va(b){b&&b.length!==
13
- 0?(b=y(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function qa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?y(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+y(b)})}catch(d){return y(c)}}function Wa(b){var a={},c,d;n((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=x(c[1])?decodeURIComponent(c[1]):!0)});return a}function pb(b){var a=[];n(b,function(b,
14
- d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(a?null:/%20/g,"+")}function jc(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/;n(h,function(a){h[a]=!0;c(Y.getElementById(a));
15
- a=a.replace(":","\\:");b.querySelectorAll&&(n(b.querySelectorAll("."+a),c),n(b.querySelectorAll("."+a+"\\:"),c),n(b.querySelectorAll("["+a+"]"),c))});n(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):n(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function qb(b,a){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=rb(a);c.invoke(["$rootScope","$rootElement","$compile","$injector",
16
- function(a,b,c,h){a.$apply(function(){b.data("$injector",h);c(b)(a)})}]);return c}function Za(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function $a(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&B(b)&&(b=b[b.length-1]);$a(H(b),a,"not a function, got "+(b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(b){function a(a,b,e){return a[b]||(a[b]=e())}return a(a(b,"angular",Object),
17
- "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 k}}if(!e)throw Error("No module: "+d);var b=[],c=[],i=a("$injector","invoke"),k={_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",
18
- "register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function sb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function ab(b,a){function c(){var e;for(var b=[this],c=a,h,f,j,i,k,m;b.length;){h=b.shift();f=0;for(j=h.length;f<j;f++){i=u(h[f]);c?i.triggerHandler("$destroy"):c=!c;k=0;for(e=(m=i.children()).length,i=e;k<i;k++)b.push(ca(m[k]))}}return d.apply(this,
19
- arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function L(b){if(b instanceof L)return b;if(!(this instanceof L)){if(A(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new L(b)}if(A(b)){var a=Y.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);bb(this,a.childNodes);this.remove()}else bb(this,b)}function cb(b){return b.cloneNode(!0)}function sa(b){tb(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)sa(b[a])}function ub(b,a,c){var d=
20
- ba(b,"events");ba(b,"handle")&&(w(a)?n(d,function(a,c){db(b,c,a);delete d[c]}):w(c)?(db(b,a,d[a]),delete d[a]):Ta(d[a],c))}function tb(b){var a=b[Ba],c=Ca[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),ub(b)),delete Ca[a],b[Ba]=q)}function ba(b,a,c){var d=b[Ba],d=Ca[d||-1];if(x(c))d||(b[Ba]=d=++oc,d=Ca[d]={}),d[a]=c;else return d&&d[a]}function vb(b,a,c){var d=ba(b,"data"),e=x(c),g=!e&&x(a),h=g&&!M(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}
21
- function Da(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function wb(b,a){a&&n(a.split(" "),function(a){b.className=O((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+O(a)+" "," "))})}function xb(b,a){a&&n(a.split(" "),function(a){if(!Da(b,a))b.className=O(b.className+" "+O(a))})}function bb(b,a){if(a)for(var a=!a.nodeName&&x(a.length)&&!pa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function yb(b,a){return Ea(b,"$"+(a||"ngController")+"Controller")}function Ea(b,
22
- 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 zb(b,a){var c=Fa[a.toLowerCase()];return c&&Ab[b.nodeName]&&c}function pc(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||Y;if(w(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=
23
- !1}c.isDefaultPrevented=function(){return c.defaultPrevented};n(a[e||c.type],function(a){a.call(b,c)});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 fa(b){var a=typeof b,c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=ya()}else c=b;return a+":"+c}function Ga(b){n(b,this.put,this)}function eb(){}function Bb(b){var a,
24
- c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),n(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else B(b)?(c=b.length-1,ra(b[c],"fn"),a=b.slice(0,c)):ra(b,"fn",!0);return a}function rb(b){function a(a){return function(b,c){if(M(b))n(b,nb(a));else return a(b,c)}}function c(a,b){if(H(b)||B(b))b=m.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,
25
- {$get:b})}function e(a){var b=[];n(a,function(a){if(!i.get(a))if(i.put(a,!0),A(a)){var c=ta(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 g=d[c],h=g[0]=="$injector"?m:m.get(g[0]);h[g[1]].apply(h,g[2])}}catch(j){throw j.message&&(j.message+=" from "+a),j;}}else if(H(a))try{b.push(m.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+a),o;}else if(B(a))try{b.push(m.invoke(a))}catch(k){throw k.message&&(k.message+=" from "+String(a[a.length-
26
- 1])),k;}else ra(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+j.join(" <- "));return a[d]}else try{return j.unshift(d),a[d]=h,a[d]=b(d)}finally{j.shift()}}function d(a,b,e){var f=[],i=Bb(a),g,h,j;h=0;for(g=i.length;h<g;h++)j=i[h],f.push(e&&e.hasOwnProperty(j)?e[j]:c(j));a.$inject||(a=a[g]);switch(b?-1:f.length){case 0:return a();case 1:return a(f[0]);case 2:return a(f[0],
27
- 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=
28
- (B(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return M(e)?e:c},get:c,annotate:Bb}}var h={},f="Provider",j=[],i=new Ga,k={$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,I(b))}),constant:a(function(a,b){k[a]=b;l[a]=b}),decorator:function(a,b){var c=m.get(a+f),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},m=g(k,function(){throw Error("Unknown provider: "+
29
- j.join(" <- "));}),l={},t=l.$injector=g(l,function(a){a=m.get(a+f);return t.invoke(a.$get,a)});n(e(b),function(a){t.invoke(a||C)});return t}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=null;n(a,function(a){!b&&y(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):
30
- a.scrollTo(0,0)}var h=a.document;b&&d.$watch(function(){return c.hash()},function(){d.$evalAsync(g)});return g}]}function vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(o--,o===0)for(;p.length;)try{p.pop()()}catch(b){c.error(b)}}}function g(a,b){(function R(){n(s,function(a){a()});J=b(R,a)})()}function h(){F!=f.url()&&(F=f.url(),n(V,function(a){a(f.url())}))}var f=this,j=a[0],i=b.location,k=b.history,m=b.setTimeout,l=b.clearTimeout,t={};f.isMock=!1;var o=0,p=[];f.$$completeOutstandingRequest=
31
- e;f.$$incOutstandingRequestCount=function(){o++};f.notifyWhenNoOutstandingRequests=function(a){n(s,function(a){a()});o===0?a():p.push(a)};var s=[],J;f.addPollFn=function(a){w(J)&&g(100,m);s.push(a);return a};var F=i.href,z=a.find("base");f.url=function(a,b){if(a){if(F!=a)return F=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),z.attr("href",z.attr("href"))):b?i.replace(a):i.href=a,f}else return i.href.replace(/%27/g,"'")};var V=[],K=!1;f.onUrlChange=function(a){K||(d.history&&u(b).bind("popstate",
32
- h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),K=!0);V.push(a);return a};f.baseHref=function(){var a=z.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",P=f.baseHref();f.cookies=function(a,b){var d,e,f,i;if(a)if(b===q)j.cookie=escape(a)+"=;path="+P+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(A(b))d=(j.cookie=escape(a)+"="+escape(b)+";path="+P).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(j.cookie!==
33
- $){$=j.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],i=e.indexOf("="),i>0&&(r[unescape(e.substring(0,i))]=unescape(e.substring(i+1)))}return r}};f.defer=function(a,b){var c;o++;c=m(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};f.defer.cancel=function(a){return t[a]?(delete t[a],l(a),e(C),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=m){if(l){if(l==
34
- a)l=a.n}else l=a;g(a.n,a.p);g(a,m);m=a;m.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),j={},i=d&&d.capacity||Number.MAX_VALUE,k={},m=null,l=null;return a[b]={put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);w(b)||(a in j||h++,j[a]=b,h>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),j[a]},remove:function(a){var b=k[a];if(b){if(b==m)m=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete j[a];h--}},removeAll:function(){j=
35
- {};h=0;k={};m=l=null},destroy:function(){k=f=j=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};n(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Cb(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto):/;
36
- this.directive=function j(d,e){A(d)?($a(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];n(a[d],function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):n(d,nb(j));return this};this.urlSanitizationWhitelist=function(a){return x(a)?
37
- (h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,i,k,m,l,t,o,p,s){function J(a,b,c){a instanceof u||(a=u(a));n(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=z(a,b,a,c);return function(b,c){$a(b,"scope");for(var e=c?va.clone.call(a):a,g=0,i=e.length;g<i;g++){var h=e[g];(h.nodeType==1||h.nodeType==9)&&e.eq(g).data("$scope",b)}F(e,
38
- "ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function F(a,b){try{a.addClass(b)}catch(c){}}function z(a,b,c,d){function e(a,c,d,i){var h,j,k,o,l,m,t,s=[];l=0;for(m=c.length;l<m;l++)s.push(c[l]);t=l=0;for(m=g.length;l<m;t++)j=s[t],c=g[l++],h=g[l++],c?(c.scope?(k=a.$new(M(c.scope)),u(j).data("$scope",k)):k=a,(o=c.transclude)||!i&&b?c(h,k,j,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ua(d,d.$destroy))}}(o||b)):c(h,k,j,q,i)):h&&h(a,j.childNodes,q,i)}
39
- for(var g=[],i,h,j,k=0;k<a.length;k++)h=new ia,i=V(a[k],[],h,d),h=(i=i.length?K(i,a[k],h,b,c):null)&&i.terminal||!a[k].childNodes.length?null:z(a[k].childNodes,i?i.transclude:b),g.push(i),g.push(h),j=j||i||h;return j?e:null}function V(a,b,c,i){var g=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(fb(a).toLowerCase()),"E",i);var j,k,l;h=a.attributes;for(var o=0,m=h&&h.length;o<m;o++)if(j=h[o],j.specified)k=j.name,l=ea(k.toLowerCase()),g[l]=k,c[l]=j=O(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):
40
- j.value),zb(a,l)&&(c[l]=!0),R(a,b,j,l),r(b,l,"A",i);a=a.className;if(A(a)&&a!=="")for(;h=e.exec(a);)l=ea(h[2]),r(b,l,"C",i)&&(c[l]=O(h[3])),a=a.substr(h.index+h[0].length);break;case 3:x(b,a.nodeValue);break;case 8:try{if(h=d.exec(a.nodeValue))l=ea(h[1]),r(b,l,"M",i)&&(c[l]=O(h[2]))}catch(t){}}b.sort(G);return b}function K(a,b,c,d,e){function i(a,b){if(a)a.require=r.require,m.push(a);if(b)b.require=r.require,s.push(b)}function h(a,b){var c,d="data",e=!1;if(A(a)){for(;(c=a.charAt(0))=="^"||c=="?";)a=
41
- a.substr(1),c=="^"&&(d="inheritedData"),e=e||c=="?";c=b[d]("$"+a+"Controller");if(!c&&!e)throw Error("No controller: "+a);}else B(a)&&(c=[],n(a,function(a){c.push(h(a,b))}));return c}function j(a,d,e,i,g){var l,p,r,D,F;l=b===e?c:hc(c,new ia(u(e),c.$attr));p=l.$$element;if(K){var J=/^\s*([@=&])\s*(\w*)\s*$/,ja=d.$parent||d;n(K.scope,function(a,b){var c=a.match(J)||[],e=c[2]||b,c=c[1],i,g,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=ja;break;
42
- case "=":g=t(l[e]);h=g.assign||function(){i=d[b]=g(ja);throw Error(Db+l[e]+" (directive: "+K.name+")");};i=d[b]=g(ja);d.$watch(function(){var a=g(ja);a!==d[b]&&(a!==i?i=d[b]=a:h(ja,a=i=d[b]));return a});break;case "&":g=t(l[e]);d[b]=function(a){return g(ja,a)};break;default:throw Error("Invalid isolate scope definition for directive "+K.name+": "+a);}})}x&&n(x,function(a){var b={$scope:d,$element:p,$attrs:l,$transclude:g};F=a.controller;F=="@"&&(F=l[a.name]);p.data("$"+a.name+"Controller",o(F,b))});
43
- i=0;for(r=m.length;i<r;i++)try{D=m[i],D(d,p,l,D.require&&h(D.require,p))}catch(z){k(z,qa(p))}a&&a(d,e.childNodes,q,g);i=0;for(r=s.length;i<r;i++)try{D=s[i],D(d,p,l,D.require&&h(D.require,p))}catch(zc){k(zc,qa(p))}}for(var l=-Number.MAX_VALUE,m=[],s=[],p=null,K=null,z=null,D=c.$$element=u(b),r,G,S,ka,R=d,x,w,W,v=0,y=a.length;v<y;v++){r=a[v];S=q;if(l>r.priority)break;if(W=r.scope)ua("isolated scope",K,r,D),M(W)&&(F(D,"ng-isolate-scope"),K=r),F(D,"ng-scope"),p=p||r;G=r.name;if(W=r.controller)x=x||{},
44
- ua("'"+G+"' controller",x[G],r,D),x[G]=r;if(W=r.transclude)ua("transclusion",ka,r,D),ka=r,l=r.priority,W=="element"?(S=u(b),D=c.$$element=u(Y.createComment(" "+G+": "+c[G]+" ")),b=D[0],C(e,u(S[0]),b),R=J(S,d,l)):(S=u(cb(b)).contents(),D.html(""),R=J(S,d));if(W=r.template)if(ua("template",z,r,D),z=r,W=Eb(W),r.replace){S=u("<div>"+O(W)+"</div>").contents();b=S[0];if(S.length!=1||b.nodeType!==1)throw Error(g+W);C(e,D,b);G={$attr:{}};a=a.concat(V(b,a.splice(v+1,a.length-(v+1)),G));$(c,G);y=a.length}else D.html(W);
45
- if(r.templateUrl)ua("template",z,r,D),z=r,j=P(a.splice(v,a.length-v),j,D,c,e,r.replace,R),y=a.length;else if(r.compile)try{w=r.compile(D,c,R),H(w)?i(null,w):w&&i(w.pre,w.post)}catch(E){k(E,qa(D))}if(r.terminal)j.terminal=!0,l=Math.max(l,r.priority)}j.scope=p&&p.scope;j.transclude=ka&&R;return j}function r(d,e,i,g){var h=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),o=0,m=e.length;o<m;o++)try{if(l=e[o],(g===q||g>l.priority)&&l.restrict.indexOf(i)!=-1)d.push(l),h=!0}catch(t){k(t)}return h}function $(a,
46
- b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,i){i=="class"?(F(e,b),a["class"]=(a["class"]?a["class"]+" ":"")+b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function P(a,b,c,d,e,i,h){var j=[],k,o,t=c[0],s=a.shift(),p=v({},s,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");m.get(s.templateUrl,{cache:l}).success(function(l){var m,
47
- s,l=Eb(l);if(i){s=u("<div>"+O(l)+"</div>").contents();m=s[0];if(s.length!=1||m.nodeType!==1)throw Error(g+l);l={$attr:{}};C(e,c,m);V(m,a,l);$(d,l)}else m=t,c.html(l);a.unshift(p);k=K(a,m,d,h);for(o=z(c.contents(),h);j.length;){var ia=j.pop(),l=j.pop();s=j.pop();var r=j.pop(),D=m;s!==t&&(D=cb(m),C(l,u(s),D));k(function(){b(o,r,D,e,ia)},r,D,e,ia)}j=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,i){j?(j.push(c),j.push(d),j.push(e),j.push(i)):
48
- k(function(){b(o,c,d,e,i)},c,d,e,i)}}function G(a,b){return b.priority-a.priority}function ua(a,b,c,d){if(b)throw Error("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+qa(d));}function x(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);F(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function R(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||
49
- (c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function C(a,b,c){var d=b[0],e=d.parentNode,i,g;if(a){i=0;for(g=a.length;i<g;i++)if(a[i]==d){a[i]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=zb(this.$$element[0],a),i=this.$$observers;e&&(this.$$element.prop(a,
50
- b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=Za(a,"-"));if(fb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",b),e=D.href,e.match(h)||(this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));i&&n(i[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);p.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=s[0].createElement("a"),
51
- S=i.startSymbol(),ka=i.endSymbol(),Eb=S=="{{"||ka=="}}"?na:function(a){return a.replace(/\{\{/g,S).replace(/}}/g,ka)};return J}]}function ea(b){return sb(b.replace(Ac,""))}function Bc(){var b={};this.register=function(a,c){M(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(A(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:gb(e.$scope,g,!0)||gb(c,g,!0);ra(d,g,!0)}return a.instantiate(d,e)}}]}function Cc(){this.$get=["$window",function(b){return u(b.document)}]}function Dc(){this.$get=
52
- ["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ec(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var j,i,k=0,m=[],l=d.length,t=!1,o=[];k<l;)(j=d.indexOf(b,k))!=-1&&(i=d.indexOf(a,j+e))!=-1?(k!=j&&m.push(d.substring(k,j)),m.push(k=c(t=d.substring(j+e,i))),k.exp=t,k=i+g,t=!0):(k!=l&&m.push(d.substring(k)),k=l);if(!(l=m.length))m.push(""),l=1;
53
- if(!f||t)return o.length=l,k=function(a){for(var b=0,c=l,d;b<c;b++){if(typeof(d=m[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));o[b]=d}return o.join("")},k.exp=d,k.parts=m,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Fb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Ya(b[a]);return b.join("/")}function wa(b,a){var c=Gb.exec(b),c={protocol:c[1],host:c[3],port:E(c[5])||Hb[c[1]]||null,path:c[6]||"/",search:c[8],
54
- hash:c[10]};if(a)a.$$protocol=c.protocol,a.$$host=c.host,a.$$port=c.port;return c}function la(b,a,c){return b+"://"+a+(c==Hb[b]?"":":"+c)}function Fc(b,a,c){var d=wa(b);return decodeURIComponent(d.path)!=a||w(d.hash)||d.hash.indexOf(c)!==0?b:la(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Gc(b,a,c){var d=wa(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);
55
- if(d.path.indexOf(h)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return la(d.protocol,d.host,d.port)+a+"#"+c+f+e+g}}function hb(b,a,c){a=a||"";this.$$parse=function(b){var c=wa(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Wa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),
56
- c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ha(b,a,c){var d;this.$$parse=function(b){var c=wa(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Hc.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)==
57
- "/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Wa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||"";this.$$compose()};this.$$compose=function(){var b=pb(this.$$search),c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Fb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ib(b,a,c,d){Ha.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==
58
- 0)return c+d+"#"+a+b.substr(c.length)}}function Ia(b){return function(){return this[b]}}function Jb(b,a){return function(c){if(w(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Ic(){var b="",a=!1;this.hashPrefix=function(a){return x(a)?(b=a,this):b};this.html5Mode=function(b){return x(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,j,i,k=d.url(),m=wa(k);a?(j=
59
- d.baseHref()||"/",i=j.substr(0,j.lastIndexOf("/")),m=la(m.protocol,m.host,m.port)+i+"/",f=e.history?new hb(Fc(k,j,b),i,m):new Ib(Gc(k,j,b),b,m,j.substr(i.length+1))):(m=la(m.protocol,m.host,m.port)+(m.path||"")+(m.search?"?"+m.search:"")+"#"+b+"/",f=new Ha(k,b,m));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);y(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),
60
- c.$apply(),a.preventDefault(),X.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!l||a!=f.absUrl())l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return l});return f}]}function Jc(){this.$get=
61
- ["$window",function(b){function a(a){a instanceof Error&&(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||C;return g.apply?function(){var b=[];n(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 Kc(b,a){function c(a){return a.indexOf(s)!=
62
- -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 j(a,c,d){d=d||o;throw Error("Lexer Error: "+a+" at column"+(x(c)?"s "+c+"-"+o+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function i(){for(var a="",c=o;o<b.length;){var i=y(b.charAt(o));if(i=="."||
63
- e(i))a+=i;else{var g=d();if(i=="e"&&f(g))a+=i;else if(f(i)&&g&&e(g)&&a.charAt(a.length-1)=="e")a+=i;else if(f(i)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")j("Invalid exponent");else break}o++}a*=1;l.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){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,
64
- text:c};if(Ja.hasOwnProperty(c))d.fn=d.json=Ja[c];else{var m=Kb(c,a);d.fn=v(function(a,b){return m(a,b)},{assign:function(a,b){return Lb(a,c,b)}})}l.push(d);j&&(l.push({index:f,text:".",json:!1}),l.push({index:f+1,text:j,json:!1}))}function m(a){var c=o;o++;for(var d="",e=a,f=!1;o<b.length;){var i=b.charAt(o);e+=i;if(f)i=="u"?(i=b.substring(o+1,o+5),i.match(/[\da-f]{4}/i)||j("Invalid unicode escape [\\u"+i+"]"),o+=4,d+=String.fromCharCode(parseInt(i,16))):(f=Lc[i],d+=f?f:i),f=!1;else if(i=="\\")f=
65
- !0;else if(i==a){o++;l.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});return}else d+=i;o++}j("Unterminated quote",c)}for(var l=[],t,o=0,p=[],s,J=":";o<b.length;){s=b.charAt(o);if(c("\"'"))m(s);else if(e(s)||c(".")&&e(d()))i();else if(h(s)){if(k(),"{,".indexOf(J)!=-1&&p[0]=="{"&&(t=l[l.length-1]))t.json=t.text.indexOf(".")==-1}else if(c("(){}[].,;:"))l.push({index:o,text:s,json:":[,".indexOf(J)!=-1&&c("{[")||c("}]:,")}),c("{[")&&p.unshift(s),c("}]")&&p.shift(),o++;else if(g(s)){o++;
66
- continue}else{var n=s+d(),z=Ja[s],V=Ja[n];V?(l.push({index:o,text:n,fn:V}),o+=2):z?(l.push({index:o,text:s,fn:z,json:"[,:".indexOf(J)!=-1&&c("+-")}),o+=1):j("Unexpected next character ",o,o+1)}J=s}return l}function Mc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(P.length===0)throw Error("Unexpected end of expression: "+b);return P[0]}function h(a,b,c,d){if(P.length>
67
- 0){var e=P[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),P.shift(),b):!1}function j(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function i(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function m(){for(var a=[];;)if(P.length>0&&!h("}",")",";","]")&&a.push(w()),!f(";"))return a.length==1?a[0]:function(b,c){for(var d,e=0;e<a.length;e++){var f=
68
- 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(G());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 t(){for(var a=o(),b;;)if(b=f("||"))a=k(a,b.fn,o());else return a}function o(){var a=p(),b;if(b=f("&&"))a=k(a,b.fn,o());return a}function p(){var a=s(),b;if(b=f("==","!="))a=k(a,b.fn,p());return a}function s(){var a;a=J();for(var b;b=f("+","-");)a=k(a,b.fn,J());if(b=
69
- f("<",">","<=",">="))a=k(a,b.fn,s());return a}function J(){for(var a=n(),b;b=f("*","/","%");)a=k(a,b.fn,n());return a}function n(){var a;return f("+")?z():(a=f("-"))?k(r,a.fn,n()):(a=f("!"))?i(a.fn,n()):z()}function z(){var a;if(f("("))a=w(),j(")");else if(f("["))a=V();else if(f("{"))a=K();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=x(a,c),c=null):b.text==="["?(c=a,a=R(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function V(){var a=
70
- [];if(g().text!="]"){do a.push(G());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e<a.length;e++)d.push(a[e](b,c));return d}}function K(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;j(":");var c=G();a.push({key:b,value:c})}while(f(","))}j("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],i=f.value(b,c);d[f.key]=i}return d}}var r=I(0),$,P=Kc(b,d),G=function(){var a=t(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+
71
- "] can not be assigned to",d),c=t(),function(b,d){return a.assign(b,c(b,d),d)}):a},x=function(a,b){var c=[];if(g().text!=")"){do c.push(G());while(f(","))}j(")");return function(d,e){for(var f=[],i=b?b(d,e):d,g=0;g<c.length;g++)f.push(c[g](d,e));g=a(d,e)||C;return g.apply?g.apply(i,f):g(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Kb(b,d);return v(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Lb(a(c,e),b,d)}})},R=function(a){var b=G();j("]");return v(function(c,d){var e=
72
- a(c,d),f=b(c,d),i;if(!e)return q;if((e=e[f])&&e.then){i=e;if(!("$$v"in e))i.$$v=q,i.then(function(a){i.$$v=a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},w=function(){for(var a=G(),b;;)if(b=f("|"))a=k(a,b.fn,l());else return a};a?(G=t,x=u=R=w=function(){e("is not valid json",{text:b,index:0})},$=z()):$=m();P.length!==0&&e("is an unexpected token",P[0]);return $}function Lb(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()]=
73
- c}function gb(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&&H(b)?Ua(e,b):b}function Mb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,j;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in
74
- f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;if((f=f[d])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}return f}}function Kb(b,a){if(ib.hasOwnProperty(b))return ib[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Mb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,i;do i=Mb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,
75
- a=i;while(e<d);return i};else{var g="var l, fn, p;\n";n(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 ib[b]=e}function Nc(){var b={};this.$get=["$filter","$sniffer",function(a,c){return function(d){switch(typeof d){case "string":return b.hasOwnProperty(d)?
76
- b[d]:b[d]=Mc(d,!1,a,c.csp);case "function":return d;default:return C}}}]}function Oc(){this.$get=["$rootScope","$exceptionHandler",function(b,a){return Pc(function(a){b.$evalAsync(a)},a)}]}function Pc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],j,i;return i={resolve:function(a){if(f){var c=f;f=q;j=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],j.then(a[0],a[1])})}},reject:function(a){i.resolve(h(a))},promise:{then:function(b,i){var g=e(),h=
77
- function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},o=function(b){try{g.resolve((i||d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([h,o]):j.then(h,o);return g.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,i){var g=e();b(function(){g.resolve((i||d)(a))});return g.promise}}};return{defer:e,reject:h,when:function(f,j,i){var k=e(),m,l=function(b){try{return(j||c)(b)}catch(d){return a(d),
78
- h(d)}},t=function(b){try{return(i||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){m||(m=!0,k.resolve(g(a).then(l,t)))},function(a){m||(m=!0,k.resolve(t(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?n(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 Qc(){var b={};this.when=function(a,c){b[a]=v({reloadOnSearch:!0},c);if(a){var d=a[a.length-1]=="/"?a.substr(0,
79
- 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","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function j(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,i,g=0;(i=f.exec(b))!==null;)c+=b.slice(g,i.index),c+="([^\\/]*)",d.push(i[1]),g=f.lastIndex;c+=b.substr(g);var h=a.match(RegExp(c));h&&n(d,function(a,b){e[a]=h[b+1]});return h?
80
- e:null}function i(){var b=k(),i=t.current;if(b&&i&&b.$route===i.$route&&ga(b.pathParams,i.pathParams)&&!b.reloadOnSearch&&!l)i.params=b.params,U(i.params,d),a.$broadcast("$routeUpdate",i);else if(b||i)l=!1,a.$broadcast("$routeChangeStart",b,i),(t.current=b)&&b.redirectTo&&(A(b.redirectTo)?c.path(m(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;n(b.resolve||{},function(b,d){a.push(d);
81
- c.push(A(b)?g.get(b):g.invoke(b))});if(!x(d=b.template))if(x(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});x(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};n(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==t.current){if(b)b.locals=c,U(b.params,d);a.$broadcast("$routeChangeSuccess",b,i)}},function(c){b==t.current&&a.$broadcast("$routeChangeError",b,i,c)})}function k(){var a,d;n(b,function(b,e){if(!d&&(a=j(c.path(),e)))d=za(b,
82
- {params:v({},c.search(),a),pathParams:a}),d.$route=b});return d||b[null]&&za(b[null],{params:{},pathParams:{}})}function m(a,b){var c=[];n((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 l=!1,t={routes:b,reload:function(){l=!0;a.$evalAsync(i)}};a.$on("$locationChangeSuccess",i);return t}]}function Rc(){this.$get=I({})}function Sc(){var b=10;this.digestTtl=function(a){arguments.length&&(b=a);
83
- return b};this.$get=["$injector","$exceptionHandler","$parse",function(a,c,d){function e(){this.$id=ya();this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(j.$$phase)throw Error(j.$$phase+" already in progress");j.$$phase=a}function h(a,b){var c=d(a);ra(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");
84
- a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=this,a=new a,a.$id=ya());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(!H(b)){var j=h(b||C,"listener");g.fn=function(a,b,
85
- c){j(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ta(e,g)}},$digest:function(){var a,d,e,h,t,o,p,s=b,n,F=[],z,q;g("$digest");do{p=!1;n=this;do{for(t=n.$$asyncQueue;t.length;)try{n.$eval(t.shift())}catch(K){c(K)}if(h=n.$$watchers)for(o=h.length;o--;)try{if(a=h[o],(d=a.get(n))!==(e=a.last)&&!(a.eq?ga(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))p=!0,a.last=a.eq?U(d):d,a.fn(d,e===f?d:e,n),s<5&&(z=4-s,F[z]||(F[z]=[]),q=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):
86
- a.exp,q+="; newVal: "+da(d)+"; oldVal: "+da(e),F[z].push(q))}catch(r){c(r)}if(!(h=n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(h=n.$$nextSibling);)n=n.$parent}while(n=h);if(p&&!s--)throw j.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(F));}while(p||t.length);j.$$phase=null},$destroy:function(){if(!(j==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=
87
- 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;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{j.$$phase=null;try{j.$digest()}catch(d){throw c(d),
88
- d;}}},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[Aa(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},j=[h].concat(ha.call(arguments,1)),n,q;do{e=f.$$listeners[a]||d;h.currentScope=f;n=0;for(q=e.length;n<q;n++)if(e[n])try{if(e[n].apply(null,j),g)return h}catch(z){c(z)}else e.splice(n,1),n--,q--;f=f.$parent}while(f);
89
- return h},$broadcast:function(a,b){var d=this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,j;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(j=e.length;h<j;h++)if(e[h])try{e[h].apply(null,g)}catch(n){c(n)}else e.splice(h,1),h--,j--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var j=new e;return j}]}function Tc(){this.$get=
90
- ["$window",function(b){var a={},c=E((/android (\d+)/.exec(y(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(w(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(X)}function Nb(b){var a={},c,d,e;if(!b)return a;n(b.split("\n"),function(b){e=b.indexOf(":");c=y(O(b.substr(0,
91
- e)));d=O(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Ob(b){var a=M(b)?b:q;return function(c){a||(a=Nb(b));return c?a[y(c)]||null:a}}function Pb(b,a,c){if(H(c))return c(b,a);n(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){A(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=ob(d,!0)));return d}],transformRequest:[function(a){return M(a)&&xa.apply(a)!=="[object File]"?da(a):a}],
92
- headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,j,i,k){function m(a){function c(a){var b=v({},a,{data:Pb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=ma(a.method);var e=a.transformRequest||
93
- d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},g.common,g[y(a.method)],a.headers),e=Pb(a.data,Ob(g),e),j;w(a.data)&&delete g["Content-Type"];j=l(a,e,g);j=j.then(c,c);n(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){n&&(200<=a&&a<300?n.put(q,
94
- [a,b,Nb(c)]):n.remove(q));f(b,a,c);j.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,status:c,headers:Ob(d),config:b})}function h(){var a=Aa(m.pendingRequests,b);a!==-1&&m.pendingRequests.splice(a,1)}var k=i.defer(),l=k.promise,n,p,q=t(b.url,b.params);m.pendingRequests.push(b);l.then(h,h);b.cache&&b.method=="GET"&&(n=M(b.cache)?b.cache:o);if(n)if(p=n.get(q))if(p.then)return p.then(h,h),p;else B(p)?f(p[1],p[0],U(p[2])):f(p,200,{});else n.put(q,l);p||a(b.method,
95
- q,c,e,d,b.timeout,b.withCredentials);return l}function t(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(M(a)&&(a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),p=[];n(e,function(a){p.push(A(a)?k.get(a):k.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,function(a){m[a]=function(b,c){return m(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=
96
- function(b,c,d){return m(v(d||{},{method:a,url:b,data:c}))}})})("post","put");m.defaults=d;return m}]}function Wc(){this.$get=["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(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=
97
- d;e.body.appendChild(c)}return function(e,j,i,k,m,l,t){function o(a,c,d,e){c=(j.match(Gb)||["",g])[1]=="file"?d?200:404:c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(C)}b.$$incOutstandingRequestCount();j=j||b.url();if(y(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(j.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var s=new a;s.open(e,j,!0);n(m,function(a,b){a&&s.setRequestHeader(b,a)});
98
- var q;s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];a||(a="",n(b,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));o(k,q||s.status,s.responseText,a)}};if(t)s.withCredentials=!0;s.send(i||"");l>0&&c(function(){q=-1;s.abort()},l)}}}function Zc(){this.$get=function(){return{id:"en-us",NUMBER_FORMATS:{DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{minInt:1,minFrac:0,
99
- 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(","),
100
- 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 $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,j){var i=c.defer(),k=i.promise,m=x(j)&&!j,f=a.defer(function(){try{i.resolve(e())}catch(a){i.reject(a),d(a)}m||b.$apply()},f),j=function(){delete g[k.$$timeoutId]};
101
- k.$$timeoutId=f;g[f]=i;k.then(j,j);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Qb(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",Rb);a("date",Sb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Tb);a("orderBy",Ub);a("uppercase",ed)}function ad(){return function(b,
102
- a){if(!B(b))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=
103
- {$: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(gb(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 Rb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(w(d))d=a.CURRENCY_SYM;return Vb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,
104
- d)}}function Tb(b){var a=b.NUMBER_FORMATS;return function(b,d){return Vb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Vb(b,a,c,d,e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",j=[],i=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,i=!0)}if(!i){h=(h.split(Wb)[1]||"").length;w(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(Wb),h=b[0],b=b[1]||"",i=0,k=a.lgSize,
105
- m=a.gSize;if(h.length>=k+m)for(var i=h.length-k,l=0;l<i;l++)(i-l)%m===0&&l!==0&&(f+=c),f+=h.charAt(l);for(l=i;l<h.length;l++)(h.length-l)%k===0&&l!==0&&(f+=c),f+=h.charAt(l);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}j.push(g?a.negPre:a.posPre);j.push(f);j.push(g?a.negSuf:a.posSuf);return j.join("")}function jb(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 N(b,a,c,d){return function(e){e=e["get"+b]();if(c>0||e>-c)e+=
106
- c;e===0&&c==-12&&(e=12);return jb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=ma(a?"SHORT"+b:b);return d[g][e]}}function Sb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=E(b[9]+b[10]),h=E(b[9]+b[11]));a.setUTCFullYear(E(b[1]),E(b[2])-1,E(b[3]));a.setUTCHours(E(b[4]||0)-g,E(b[5]||0)-h,E(b[6]||0),E(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g=
107
- "",h=[],f,j,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;A(c)&&(c=fd.test(c)?E(c):a(c));Ra(c)&&(c=new Date(c));if(!oa(c))return c;for(;e;)(j=gd.exec(e))?(h=h.concat(ha.call(j,1)),e=h.pop()):(h.push(e),e=null);n(h,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=E(a),c=[],d,e;if(!b||!(b instanceof Array))return c;a>b.length?
108
- 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 Ub(b){return function(a,c,d){function e(a,b){return Va(b)?function(b,c){return a(c,b)}:a}if(!B(a))return a;if(!c)return a;for(var c=B(c)?c:[c],c=Sa(c,function(a){var c=!1,d=a||na;if(A(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==
109
- "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){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Xb(b,a){function c(a,c){c=c?"-"+Za(c,"-"):"";b.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}var d=this,e=b.parent().controller("form")||Na,g=0,h=d.$error={};d.$name=a.name;d.$dirty=!1;d.$pristine=!0;
110
- d.$valid=!0;d.$invalid=!1;e.$addControl(d);b.addClass(Oa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];n(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,i){var k=h[a];if(b){if(k&&(Ta(k,i),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(Aa(k,i)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,!1,
111
- d);k.push(i);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Oa).addClass(Yb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function T(b){return w(b)||b===""||b===null||b!==b}function Pa(b,a,c,d,e,g){var h=function(){var c=O(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){h();f=null}))});a.bind("change",h)}d.$render=
112
- function(){a.val(T(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,i=function(a,b){return T(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",!1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return i(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return i(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var k=E(c.ngMinlength),e=function(a){return!T(a)&&a.length<
113
- k?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var m=E(c.ngMaxlength),c=function(a){return!T(a)&&a.length>m?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function kb(b,a){b="ngClass"+b;return Q(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)j&&b!==j&&h(j),f(b);j=b}function h(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));d.removeClass(B(a)?
114
- a.join(" "):a)}function f(a){M(a)&&!B(a)&&(a=Sa(a,function(a,b){if(a)return b}));a&&d.addClass(B(a)?a.join(" "):a)}var j=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var y=function(b){return A(b)?b.toLowerCase():b},ma=function(b){return A(b)?b.toUpperCase():b},Z=E((/msie (\d+)/.exec(y(navigator.userAgent))||[])[1]),u,ca,ha=[].slice,Qa=[].push,xa=Object.prototype.toString,
115
- Zb=X.angular||(X.angular={}),ta,fb,aa=["0","0","0"];C.$inject=[];na.$inject=[];fb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ma(b.scopeName+":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.5",major:1,minor:0,dot:5,codeName:"flatulent-propulsion"},Ca=L.cache={},Ba=L.expando="ng-"+(new Date).getTime(),oc=1,$b=X.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+
116
- a,c)},db=X.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,va=L.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);L(X).bind("load",a)},toString:function(){var b=[];n(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Fa={};n("multiple,selected,checked,disabled,readOnly,required".split(","),
117
- function(b){Fa[y(b)]=b});var Ab={};n("input,select,option,textarea,button,form".split(","),function(b){Ab[ma(b)]=!0});n({data:vb,inheritedData:Ea,scope:function(b){return Ea(b,"$scope")},controller:yb,injector:function(b){return Ea(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Da,css:function(b,a,c){a=sb(a);if(x(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=
118
- y(a);if(Fa[d])if(x(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||C).specified?d:q;else if(x(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(x(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(w(a))return b.innerText;b.innerText=a}else{if(w(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(w(a))return b.textContent;b.textContent=a},{$dv:""}),
119
- val:function(b,a){if(w(a))return b.value;b.value=a},html:function(b,a){if(w(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)sa(d[c]);b.innerHTML=a}},function(b,a){L.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Da&&b!==yb?a:d)===q)if(M(a)){for(e=0;e<this.length;e++)if(b===vb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});n({removeData:tb,dealoc:sa,
120
- bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));n(d.split(" "),function(d){var j=g[d];if(!j){if(d=="mouseenter"||d=="mouseleave"){var i=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){i++;i==1&&h(a,"mouseenter")});a(c,"mouseout",function(a){i--;i==0&&h(a,"mouseleave")})}else $b(c,d,h),g[d]=[];j=g[d]}j.push(e)})},unbind:ub,replaceWith:function(a,c){var d,e=a.parentNode;sa(a);n(new L(c),function(c){d?e.insertBefore(c,d.nextSibling):
121
- e.replaceChild(c,a);d=c})},children:function(a){var c=[];n(a.childNodes,function(a){a.nodeType===1&&c.push(a)});return c},contents:function(a){return a.childNodes||[]},append:function(a,c){n(new L(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;n(new L(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){sa(a);var c=a.parentNode;
122
- c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;n(new L(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:xb,removeClass:wb,toggleClass:function(a,c,d){w(d)&&(d=!Da(a,c));(d?xb:wb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:cb,triggerHandler:function(a,
123
- c){var d=(ba(a,"events")||{})[c];n(d,function(c){c.call(a,null)})}},function(a,c){L.prototype[c]=function(c,e){for(var g,h=0;h<this.length;h++)g==q?(g=a(this[h],c,e),g!==q&&(g=u(g))):bb(g,a(this[h],c,e));return g==q?this:g}});Ga.prototype={put:function(a,c){this[fa(a)]=c},get:function(a){return this[fa(a)]},remove:function(a){var c=this[a=fa(a)];delete this[a];return c}};eb.prototype={push:function(a,c){var d=this[a=fa(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=fa(a)];if(c)return c.length==
124
- 1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[fa(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=/^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Db="Non-assignable model expression: ";Cb.$inject=["$provide"];var Ac=/^(x[\:\-_]|data[\:\-_])/i,Gb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Hc=ac,Hb={http:80,https:443,ftp:21};hb.prototype={$$replace:!1,absUrl:Ia("$$absUrl"),
125
- url:function(a,c){if(w(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||"");this.hash(d[5]||"",c);return this},protocol:Ia("$$protocol"),host:Ia("$$host"),port:Ia("$$port"),path:Jb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(w(a))return this.$$search;x(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=A(a)?Wa(a):a;this.$$compose();return this},hash:Jb("$$hash",na),replace:function(){this.$$replace=
126
- !0;return this}};Ha.prototype=za(hb.prototype);Ib.prototype=za(Ha.prototype);var Ja={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:C,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return x(d)?x(e)?d+e:d:x(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(x(d)?d:0)-(x(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},
127
- "=":C,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc=
128
- {n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},ib={},Yc=X.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");};Qb.$inject=["$provide"];Rb.$inject=["$locale"];Tb.$inject=["$locale"];var Wb=".",hd={yyyy:N("FullYear",4),yy:N("FullYear",2,0,!0),y:N("FullYear",1),MMMM:Ka("Month"),
129
- MMM:Ka("Month",!0),MM:N("Month",2,1),M:N("Month",1,1),dd:N("Date",2),d:N("Date",1),HH:N("Hours",2),H:N("Hours",1),hh:N("Hours",2,-12),h:N("Hours",1,-12),mm:N("Minutes",2),m:N("Minutes",1),ss:N("Seconds",2),s:N("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=-1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=jb(a/60,2)+jb(Math.abs(a%60),2);return c}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,
130
- fd=/^\d+$/;Sb.$inject=["$locale"];var dd=I(y),ed=I(ma);Ub.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(Y.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),lb={};n(Fa,function(a,c){var d=ea("ng-"+c);lb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});n(["src","href"],function(a){var c=ea("ng-"+
131
- a);lb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Na={$addControl:C,$removeControl:C,$setValidity:C,$setDirty:C};Xb.$inject=["$element","$attrs","$scope"];var Qa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",controller:Xb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var j=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",j);d.bind("$destroy",
132
- function(){c(function(){db(d[0],"submit",j)},0,!1)})}var i=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);i&&d.bind("$destroy",function(){i.$removeControl(f);k&&(a[k]=q);v(f,Na)})}}}};return a?v(U(d),{restrict:"EAC"}):d}]},kd=Qa(),ld=Qa(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Pa,number:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=
133
- T(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return T(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!T(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);e.$formatters.push(a)}if(d.max){var j=parseFloat(d.max),d=function(a){return!T(a)&&a>j?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return T(a)||
134
- Ra(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return T(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){w(d.name)&&c.attr("name",ya());c.bind("click",
135
- function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;A(g)||(g=!0);A(h)||(h=!1);c.bind("click",function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:C,button:C,submit:C,reset:C},
136
- cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[y(g.type)]||bc.text)(d,e,g,h,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Yb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",function(a,c,d,e,g){function h(a,c){c=c?"-"+Za(c,"-"):"";e.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=
137
- !0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),j=f.assign;if(!j)throw Error(Db+d.ngModel+" ("+qa(e)+")");this.$render=C;var i=e.inheritedData("$formController")||Na,k=0,m=this.$error={};e.addClass(Oa);h(!0);this.$setValidity=function(a,c){if(m[a]!==!c){if(c){if(m[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;m[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=
138
- !0,this.$pristine=!1,e.removeClass(Oa).addClass(Yb),i.$setDirty();n(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,j(a,d),n(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(function(){var c=f(a);if(l.$modelValue!==c){var d=l.$formatters,e=d.length;for(l.$modelValue=c;e--;)c=d[e](c);if(l.$viewValue!==c)l.$viewValue=c,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h=
139
- e[1]||Na;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=!0;var g=function(a){if(d.required&&(T(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",
140
- link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&n(a.split(g),function(a){a&&c.push(O(a))});return c});e.$formatters.push(function(a){return B(a)?a.join(", "):q})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=Q(function(a,c,d){c.addClass("ng-binding").data("$binding",
141
- d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=kb("",!0),zd=kb("Odd",0),Ad=kb("Even",1),Bd=Q({compile:function(a,c){c.$set("ngCloak",q);
142
- a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(y(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=Q(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),
143
- Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,j=h.onload||"",i=h.autoscroll;return function(g,h){var l=0,n,o=function(){n&&(n.$destroy(),n=null);h.html("")};g.$watch(f,function(f){var s=++l;f?a.get(f,{cache:c}).success(function(a){s===l&&(n&&n.$destroy(),n=g.$new(),h.html(a),e(h.contents())(n),x(i)&&(!i||g.$eval(i))&&d(),n.$emit("$includeContentLoaded"),g.$eval(j))}).error(function(){s===l&&
144
- o()}):o()})}}}}],Gd=Q({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=Q({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,j=g.attr(h.$attr.when),i=h.offset||0,k=e.$eval(j),m={},l=c.startSymbol(),t=c.endSymbol();n(k,function(a,e){m[e]=c(a.replace(d,l+f+"-"+i+t))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),m[c](e,g,!0))},function(a){g.text(a)})}}}],
145
- Jd=Q({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),j,i,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];j=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");i=h[3]||h[1];k=h[2];var m=new eb;a.$watch(function(a){var e,f,h=a.$eval(j),
146
- n=c,q=new eb,x,z,u,w,r,v;if(B(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}x=r.length;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];w=h[u];if(v=m.shift(w)){z=v.scope;q.push(w,v);if(e!==v.index)v.index=e,n.after(v.element);n=v.element}else z=a.$new();z[i]=w;k&&(z[k]=u);z.$index=e;z.$first=e===0;z.$last=e===x-1;z.$middle=!(z.$first||z.$last);v||d(z,function(a){n.after(a);v={scope:z,element:n=a,index:e};q.push(w,v)})}for(u in m)if(m.hasOwnProperty(u))for(r=m[u];r.length;)w=
147
- r.pop(),w.element.remove(),w.scope.$destroy();m=q})}}}),Kd=Q(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Va(a)?"":"none")})}),Ld=Q(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Va(a)?"none":"")})}),Md=Q(function(a,c,d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Nd=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(j){h&&
148
- (f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+j]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Od=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,f){f.cases["!"+c.ngSwitchWhen]=d}}}),Pd=Q({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Qd=Q({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Rd=["$http",
149
- "$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,i){function k(){var i=d.current&&d.current.locals,k=i&&i.$template;if(k){c.html(k);m&&(m.$destroy(),m=null);var k=g(c.contents()),n=d.current;m=n.scope=a.$new();if(n.controller)i.$scope=m,i=h(n.controller,i),c.children().data("$ngControllerController",i);k(m);m.$emit("$viewContentLoaded");m.$eval(l);e()}else c.html(""),m&&(m.$destroy(),m=null)}var m,l=i.onload||
150
- "";a.$on("$routeChangeSuccess",k);k()}}}],Sd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Td=I({terminal:!0}),Ud=["$compile","$parse",function(a,c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:C};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope",
151
- "$attrs",function(a,c,d){var j=this,i={},k=e,m;j.databound=d.ngModel;j.init=function(a,c,d){k=a;m=d};j.addOption=function(c){i[c]=!0;k.$viewValue==c&&(a.val(c),m.parent()&&m.remove())};j.removeOption=function(a){this.hasOption(a)&&(delete i[a],k.$viewValue==a&&this.renderUnknownOption(a))};j.renderUnknownOption=function(c){c="? "+fa(c)+" ?";m.val(c);a.prepend(m);a.val(c);m.prop("selected",!0)};j.hasOption=function(a){return i.hasOwnProperty(a)};c.$on("$destroy",function(){j.renderUnknownOption=C})}],
152
- link:function(e,h,f,j){function i(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(y.parent()&&y.remove(),c.val(a),a===""&&v.prop("selected",!0)):w(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){y.parent()&&y.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Ga(d.$viewValue);n(c.find("option"),function(c){c.selected=x(a.get(c.value))})};a.$watch(function(){ga(e,d.$viewValue)||(e=U(d.$viewValue),d.$render())});
153
- c.bind("change",function(){a.$apply(function(){var a=[];n(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function m(e,f,g){function h(){var a={"":[]},c=[""],d,i,p,u,v;p=g.$modelValue;u=t(e)||[];var w=l?mb(u):u,x,y,A;y={};v=!1;var B,E;if(o)v=new Ga(p);else if(p===null||s)a[""].push({selected:p===null,id:"",label:""}),v=!0;for(A=0;x=w.length,A<x;A++){y[k]=u[l?y[l]=w[A]:A];d=m(e,y)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);o?d=v.remove(n(e,y))!=q:(d=p===n(e,y),v=v||d);B=
154
- j(e,y);B=B===q?"":B;i.push({id:l?w[A]:A,label:B,selected:d})}!o&&!v&&a[""].unshift({id:"?",label:"",selected:!0});y=0;for(w=c.length;y<w;y++){d=c[y];i=a[d];if(r.length<=y)p={element:z.clone().attr("label",d),label:i.label},u=[p],r.push(u),f.append(p.element);else if(u=r[y],p=u[0],p.label!=d)p.element.attr("label",p.label=d);B=null;A=0;for(x=i.length;A<x;A++)if(d=i[A],v=u[A+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(v.element.selected!==d.selected)B.prop("selected",
155
- v.selected=d.selected)}else d.id===""&&s?E=s:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):p.element.append(E),B=E;for(A++;u.length>A;)u.pop().element.remove()}for(;r.length>y;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),
156
- n=c(i[2]?i[1]:k),t=c(i[7]),r=[[{element:f,label:""}]];s&&(a(s)(e),s.removeClass("ng-scope"),s.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=t(e)||[],d={},h,i,j,m,p,s;if(o){i=[];m=0;for(s=r.length;m<s;m++){a=r[m];j=1;for(p=a.length;j<p;j++)if((h=a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(j[1]){for(var l=j[0],t=j[1],o=
157
- f.multiple,p=f.ngOptions,s=!1,v,C=u(Y.createElement("option")),z=u(Y.createElement("optgroup")),y=C.clone(),j=0,A=h.children(),r=A.length;j<r;j++)if(A[j].value==""){v=s=A.eq(j);break}l.init(t,s,y);if(o&&(f.required||f.ngRequired)){var B=function(a){t.$setValidity("required",!f.required||a&&a.length);return a};t.$parsers.push(B);t.$formatters.unshift(B);f.$observe("required",function(){B(t.$viewValue)})}p?m(e,h,t):o?k(e,h,t):i(e,h,t,l)}}}}],Vd=["$interpolate",function(a){var c={addOption:C,removeOption:C};
158
- return{restrict:"E",priority:100,compile:function(d,e){if(w(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var i=d.parent(),k=i.data("$selectController")||i.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Wd=I({restrict:"E",terminal:!0});(ca=X.jQuery)?(u=ca,v(ca.fn,{scope:va.scope,
159
- controller:va.controller,injector:va.injector,inheritedData:va.inheritedData}),ab("remove",!0),ab("empty"),ab("html")):u=L;Zb.element=u;(function(a){v(a,{bootstrap:qb,copy:U,extend:v,equals:ga,element:u,forEach:n,injector:rb,noop:C,bind:Ua,toJson:da,fromJson:ob,identity:na,isUndefined:w,isDefined:x,isString:A,isFunction:H,isObject:M,isNumber:Ra,isElement:gc,isArray:B,version:id,isDate:oa,lowercase:y,uppercase:ma,callbacks:{counter:0}});ta=lc(X);try{ta("ngLocale")}catch(c){ta("ngLocale",[]).provider("$locale",
160
- Zc)}ta("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Cb).directive({a:jd,input:cc,textarea:cc,form:kd,script:Sd,select:Ud,style:Wd,option:Vd,ngBind:vd,ngBindHtmlUnsafe:xd,ngBindTemplate:wd,ngClass:yd,ngClassEven:Ad,ngClassOdd:zd,ngCsp:Dd,ngCloak:Bd,ngController:Cd,ngForm:ld,ngHide:Ld,ngInclude:Fd,ngInit:Gd,ngNonBindable:Hd,ngPluralize:Id,ngRepeat:Jd,ngShow:Kd,ngSubmit:Ed,ngStyle:Md,ngSwitch:Nd,ngSwitchWhen:Od,ngSwitchDefault:Pd,ngOptions:Td,ngView:Rd,ngTransclude:Qd,ngModel:qd,ngList:sd,
161
- ngChange:rd,required:dc,ngRequired:dc,ngValue:ud}).directive(lb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Bc,$document:Cc,$exceptionHandler:Dc,$filter:Qb,$interpolate:Ec,$http:Vc,$httpBackend:Wc,$location:Ic,$log:Jc,$parse:Nc,$route:Qc,$routeParams:Rc,$rootScope:Sc,$q:Oc,$sniffer:Tc,$templateCache:yc,$timeout:$c,$window:Uc})}])})(Zb);u(Y).ready(function(){jc(Y,qb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
 
1
  /*
2
+ AngularJS v1.0.6
3
  (c) 2010-2012 Google, Inc. http://angularjs.org
4
  License: MIT
5
  */
6
+ (function(N,Y,q){'use strict';function n(b,a,c){var d;if(b)if(H(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!==n)b.forEach(a,c);else if(!b||typeof b.length!=="number"?0:typeof b.hasOwnProperty!="function"&&typeof b.constructor!="function"||b instanceof K||ca&&b instanceof ca||xa.call(b)!=="[object Object]"||typeof b.callee==="function")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],
7
+ d);return b}function nb(b){var a=[],c;for(c in b)b.hasOwnProperty(c)&&a.push(c);return a.sort()}function fc(b,a,c){for(var d=nb(b),e=0;e<d.length;e++)a.call(c,b[d[e]],d[e]);return d}function ob(b){return function(a,c){b(c,a)}}function ya(){for(var b=aa.length,a;b;){b--;a=aa[b].charCodeAt(0);if(a==57)return aa[b]="A",aa.join("");if(a==90)aa[b]="0";else return aa[b]=String.fromCharCode(a+1),aa.join("")}aa.unshift("0");return aa.join("")}function v(b){n(arguments,function(a){a!==b&&n(a,function(a,d){b[d]=
8
+ a})});return b}function G(b){return parseInt(b,10)}function za(b,a){return v(new (v(function(){},{prototype:b})),a)}function w(){}function na(b){return b}function I(b){return function(){return b}}function x(b){return typeof b=="undefined"}function y(b){return typeof b!="undefined"}function L(b){return b!=null&&typeof b=="object"}function B(b){return typeof b=="string"}function Ra(b){return typeof b=="number"}function oa(b){return xa.apply(b)=="[object Date]"}function E(b){return xa.apply(b)=="[object Array]"}
9
+ function H(b){return typeof b=="function"}function pa(b){return b&&b.document&&b.location&&b.alert&&b.setInterval}function O(b){return B(b)?b.replace(/^\s*/,"").replace(/\s*$/,""):b}function gc(b){return b&&(b.nodeName||b.bind&&b.find)}function Sa(b,a,c){var d=[];n(b,function(b,g,h){d.push(a.call(c,b,g,h))});return d}function Aa(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 Ta(b,a){var c=Aa(b,a);c>=0&&b.splice(c,1);return a}function V(b,a){if(pa(b)||
10
+ b&&b.$evalAsync&&b.$watch)throw Error("Can't copy Window or Scope");if(a){if(b===a)throw Error("Can't copy equivalent objects or arrays");if(E(b))for(var c=a.length=0;c<b.length;c++)a.push(V(b[c]));else for(c in n(a,function(b,c){delete a[c]}),b)a[c]=V(b[c])}else(a=b)&&(E(b)?a=V(b,[]):oa(b)?a=new Date(b.getTime()):L(b)&&(a=V(b,{})));return a}function hc(b,a){var a=a||{},c;for(c in b)b.hasOwnProperty(c)&&c.substr(0,2)!=="$$"&&(a[c]=b[c]);return a}function ga(b,a){if(b===a)return!0;if(b===null||a===
11
+ null)return!1;if(b!==b&&a!==a)return!0;var c=typeof b,d;if(c==typeof a&&c=="object")if(E(b)){if((c=b.length)==a.length){for(d=0;d<c;d++)if(!ga(b[d],a[d]))return!1;return!0}}else if(oa(b))return oa(a)&&b.getTime()==a.getTime();else{if(b&&b.$evalAsync&&b.$watch||a&&a.$evalAsync&&a.$watch||pa(b)||pa(a))return!1;c={};for(d in b)if(!(d.charAt(0)==="$"||H(b[d]))){if(!ga(b[d],a[d]))return!1;c[d]=!0}for(d in a)if(!c[d]&&d.charAt(0)!=="$"&&a[d]!==q&&!H(a[d]))return!1;return!0}return!1}function Ua(b,a){var c=
12
+ arguments.length>2?ha.call(arguments,2):[];return H(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 ic(b,a){var c=a;/^\$+/.test(b)?c=q:pa(a)?c="$WINDOW":a&&Y===a?c="$DOCUMENT":a&&a.$evalAsync&&a.$watch&&(c="$SCOPE");return c}function da(b,a){return JSON.stringify(b,ic,a?" ":null)}function pb(b){return B(b)?JSON.parse(b):b}function Va(b){b&&b.length!==
13
+ 0?(b=A(""+b),b=!(b=="f"||b=="0"||b=="false"||b=="no"||b=="n"||b=="[]")):b=!1;return b}function qa(b){b=u(b).clone();try{b.html("")}catch(a){}var c=u("<div>").append(b).html();try{return b[0].nodeType===3?A(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+A(b)})}catch(d){return A(c)}}function Wa(b){var a={},c,d;n((b||"").split("&"),function(b){b&&(c=b.split("="),d=decodeURIComponent(c[0]),a[d]=y(c[1])?decodeURIComponent(c[1]):!0)});return a}function qb(b){var a=[];n(b,function(b,
14
+ d){a.push(Xa(d,!0)+(b===!0?"":"="+Xa(b,!0)))});return a.length?a.join("&"):""}function Ya(b){return Xa(b,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Xa(b,a){return encodeURIComponent(b).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,a?"%20":"+")}function jc(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/;n(h,function(a){h[a]=!0;c(Y.getElementById(a));
15
+ a=a.replace(":","\\:");b.querySelectorAll&&(n(b.querySelectorAll("."+a),c),n(b.querySelectorAll("."+a+"\\:"),c),n(b.querySelectorAll("["+a+"]"),c))});n(d,function(a){if(!e){var b=f.exec(" "+a.className+" ");b?(e=a,g=(b[2]||"").replace(/\s+/g,",")):n(a.attributes,function(b){if(!e&&h[b.name])e=a,g=b.value})}});e&&a(e,g?[g]:[])}function rb(b,a){var c=function(){b=u(b);a=a||[];a.unshift(["$provide",function(a){a.value("$rootElement",b)}]);a.unshift("ng");var c=sb(a);c.invoke(["$rootScope","$rootElement",
16
+ "$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},d=/^NG_DEFER_BOOTSTRAP!/;if(N&&!d.test(N.name))return c();N.name=N.name.replace(d,"");Za.resumeBootstrap=function(b){n(b,function(b){a.push(b)});c()}}function $a(b,a){a=a||"_";return b.replace(kc,function(b,d){return(d?a:"")+b.toLowerCase()})}function ab(b,a,c){if(!b)throw Error("Argument '"+(a||"?")+"' is "+(c||"required"));return b}function ra(b,a,c){c&&E(b)&&(b=b[b.length-1]);ab(H(b),a,"not a function, got "+
17
+ (b&&typeof b=="object"?b.constructor.name||"Object":typeof b));return b}function lc(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 k}}if(!e)throw Error("No module: "+d);var b=[],c=[],i=a("$injector","invoke"),k={_invokeQueue:b,_runBlocks:c,requires:e,name:d,provider:a("$provide","provider"),
18
+ 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:i,run:function(a){c.push(a);return this}};g&&i(g);return k})}})}function tb(b){return b.replace(mc,function(a,b,d,e){return e?d.toUpperCase():d}).replace(nc,"Moz$1")}function bb(b,a){function c(){var e;for(var b=[this],c=a,h,f,j,
19
+ i,k,m;b.length;){h=b.shift();f=0;for(j=h.length;f<j;f++){i=u(h[f]);c?i.triggerHandler("$destroy"):c=!c;k=0;for(e=(m=i.children()).length,i=e;k<i;k++)b.push(ca(m[k]))}}return d.apply(this,arguments)}var d=ca.fn[b],d=d.$original||d;c.$original=d;ca.fn[b]=c}function K(b){if(b instanceof K)return b;if(!(this instanceof K)){if(B(b)&&b.charAt(0)!="<")throw Error("selectors not implemented");return new K(b)}if(B(b)){var a=Y.createElement("div");a.innerHTML="<div>&#160;</div>"+b;a.removeChild(a.firstChild);
20
+ cb(this,a.childNodes);this.remove()}else cb(this,b)}function db(b){return b.cloneNode(!0)}function sa(b){ub(b);for(var a=0,b=b.childNodes||[];a<b.length;a++)sa(b[a])}function vb(b,a,c){var d=ba(b,"events");ba(b,"handle")&&(x(a)?n(d,function(a,c){eb(b,c,a);delete d[c]}):x(c)?(eb(b,a,d[a]),delete d[a]):Ta(d[a],c))}function ub(b){var a=b[Ba],c=Ca[a];c&&(c.handle&&(c.events.$destroy&&c.handle({},"$destroy"),vb(b)),delete Ca[a],b[Ba]=q)}function ba(b,a,c){var d=b[Ba],d=Ca[d||-1];if(y(c))d||(b[Ba]=d=++oc,
21
+ d=Ca[d]={}),d[a]=c;else return d&&d[a]}function wb(b,a,c){var d=ba(b,"data"),e=y(c),g=!e&&y(a),h=g&&!L(a);!d&&!h&&ba(b,"data",d={});if(e)d[a]=c;else if(g)if(h)return d&&d[a];else v(d,a);else return d}function Da(b,a){return(" "+b.className+" ").replace(/[\n\t]/g," ").indexOf(" "+a+" ")>-1}function xb(b,a){a&&n(a.split(" "),function(a){b.className=O((" "+b.className+" ").replace(/[\n\t]/g," ").replace(" "+O(a)+" "," "))})}function yb(b,a){a&&n(a.split(" "),function(a){if(!Da(b,a))b.className=O(b.className+
22
+ " "+O(a))})}function cb(b,a){if(a)for(var a=!a.nodeName&&y(a.length)&&!pa(a)?a:[a],c=0;c<a.length;c++)b.push(a[c])}function zb(b,a){return Ea(b,"$"+(a||"ngController")+"Controller")}function Ea(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 Ab(b,a){var c=Fa[a.toLowerCase()];return c&&Bb[b.nodeName]&&c}function pc(b,a){var c=function(c,e){if(!c.preventDefault)c.preventDefault=function(){c.returnValue=!1};if(!c.stopPropagation)c.stopPropagation=
23
+ function(){c.cancelBubble=!0};if(!c.target)c.target=c.srcElement||Y;if(x(c.defaultPrevented)){var g=c.preventDefault;c.preventDefault=function(){c.defaultPrevented=!0;g.call(c)};c.defaultPrevented=!1}c.isDefaultPrevented=function(){return c.defaultPrevented};n(a[e||c.type],function(a){a.call(b,c)});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 fa(b){var a=typeof b,
24
+ c;if(a=="object"&&b!==null)if(typeof(c=b.$$hashKey)=="function")c=b.$$hashKey();else{if(c===q)c=b.$$hashKey=ya()}else c=b;return a+":"+c}function Ga(b){n(b,this.put,this)}function fb(){}function Cb(b){var a,c;if(typeof b=="function"){if(!(a=b.$inject))a=[],c=b.toString().replace(qc,""),c=c.match(rc),n(c[1].split(sc),function(b){b.replace(tc,function(b,c,d){a.push(d)})}),b.$inject=a}else E(b)?(c=b.length-1,ra(b[c],"fn"),a=b.slice(0,c)):ra(b,"fn",!0);return a}function sb(b){function a(a){return function(b,
25
+ c){if(L(b))n(b,ob(a));else return a(b,c)}}function c(a,b){if(H(b)||E(b))b=m.instantiate(b);if(!b.$get)throw Error("Provider "+a+" must define $get factory method.");return k[a+f]=b}function d(a,b){return c(a,{$get:b})}function e(a){var b=[];n(a,function(a){if(!i.get(a))if(i.put(a,!0),B(a)){var c=ta(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 g=d[c],j=g[0]=="$injector"?m:m.get(g[0]);j[g[1]].apply(j,g[2])}}catch(h){throw h.message&&(h.message+=
26
+ " from "+a),h;}}else if(H(a))try{b.push(m.invoke(a))}catch(o){throw o.message&&(o.message+=" from "+a),o;}else if(E(a))try{b.push(m.invoke(a))}catch(k){throw k.message&&(k.message+=" from "+String(a[a.length-1])),k;}else ra(a,"module")});return b}function g(a,b){function c(d){if(typeof d!=="string")throw Error("Service name expected");if(a.hasOwnProperty(d)){if(a[d]===h)throw Error("Circular dependency: "+j.join(" <- "));return a[d]}else try{return j.unshift(d),a[d]=h,a[d]=b(d)}finally{j.shift()}}
27
+ function d(a,b,e){var f=[],i=Cb(a),g,h,j;h=0;for(g=i.length;h<g;h++)j=i[h],f.push(e&&e.hasOwnProperty(j)?e[j]:c(j));a.$inject||(a=a[g]);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],
28
+ 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=(E(a)?a[a.length-1]:a).prototype;c=new c;e=d(a,c,b);return L(e)?e:c},get:c,annotate:Cb}}var h={},f="Provider",j=[],i=new Ga,k={$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,I(b))}),
29
+ constant:a(function(a,b){k[a]=b;l[a]=b}),decorator:function(a,b){var c=m.get(a+f),d=c.$get;c.$get=function(){var a=t.invoke(d,c);return t.invoke(b,null,{$delegate:a})}}}},m=g(k,function(){throw Error("Unknown provider: "+j.join(" <- "));}),l={},t=l.$injector=g(l,function(a){a=m.get(a+f);return t.invoke(a.$get,a)});n(e(b),function(a){t.invoke(a||w)});return t}function uc(){var b=!0;this.disableAutoScrolling=function(){b=!1};this.$get=["$window","$location","$rootScope",function(a,c,d){function e(a){var b=
30
+ null;n(a,function(a){!b&&A(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 vc(b,a,c,d){function e(a){try{a.apply(null,ha.call(arguments,1))}finally{if(o--,o===0)for(;p.length;)try{p.pop()()}catch(b){c.error(b)}}}function g(a,b){(function S(){n(s,
31
+ function(a){a()});P=b(S,a)})()}function h(){C!=f.url()&&(C=f.url(),n(W,function(a){a(f.url())}))}var f=this,j=a[0],i=b.location,k=b.history,m=b.setTimeout,l=b.clearTimeout,t={};f.isMock=!1;var o=0,p=[];f.$$completeOutstandingRequest=e;f.$$incOutstandingRequestCount=function(){o++};f.notifyWhenNoOutstandingRequests=function(a){n(s,function(a){a()});o===0?a():p.push(a)};var s=[],P;f.addPollFn=function(a){x(P)&&g(100,m);s.push(a);return a};var C=i.href,z=a.find("base");f.url=function(a,b){if(a){if(C!=
32
+ a)return C=a,d.history?b?k.replaceState(null,"",a):(k.pushState(null,"",a),z.attr("href",z.attr("href"))):b?i.replace(a):i.href=a,f}else return i.href.replace(/%27/g,"'")};var W=[],J=!1;f.onUrlChange=function(a){J||(d.history&&u(b).bind("popstate",h),d.hashchange?u(b).bind("hashchange",h):f.addPollFn(h),J=!0);W.push(a);return a};f.baseHref=function(){var a=z.attr("href");return a?a.replace(/^https?\:\/\/[^\/]*/,""):""};var r={},$="",Q=f.baseHref();f.cookies=function(a,b){var d,e,f,i;if(a)if(b===q)j.cookie=
33
+ escape(a)+"=;path="+Q+";expires=Thu, 01 Jan 1970 00:00:00 GMT";else{if(B(b))d=(j.cookie=escape(a)+"="+escape(b)+";path="+Q).length+1,d>4096&&c.warn("Cookie '"+a+"' possibly not set or overflowed because it was too large ("+d+" > 4096 bytes)!")}else{if(j.cookie!==$){$=j.cookie;d=$.split("; ");r={};for(f=0;f<d.length;f++)e=d[f],i=e.indexOf("="),i>0&&(r[unescape(e.substring(0,i))]=unescape(e.substring(i+1)))}return r}};f.defer=function(a,b){var c;o++;c=m(function(){delete t[c];e(a)},b||0);t[c]=!0;return c};
34
+ f.defer.cancel=function(a){return t[a]?(delete t[a],l(a),e(w),!0):!1}}function wc(){this.$get=["$window","$log","$sniffer","$document",function(b,a,c,d){return new vc(b,d,a,c)}]}function xc(){this.$get=function(){function b(b,d){function e(a){if(a!=m){if(l){if(l==a)l=a.n}else l=a;g(a.n,a.p);g(a,m);m=a;m.n=null}}function g(a,b){if(a!=b){if(a)a.p=b;if(b)b.n=a}}if(b in a)throw Error("cacheId "+b+" taken");var h=0,f=v({},d,{id:b}),j={},i=d&&d.capacity||Number.MAX_VALUE,k={},m=null,l=null;return a[b]=
35
+ {put:function(a,b){var c=k[a]||(k[a]={key:a});e(c);x(b)||(a in j||h++,j[a]=b,h>i&&this.remove(l.key))},get:function(a){var b=k[a];if(b)return e(b),j[a]},remove:function(a){var b=k[a];if(b){if(b==m)m=b.p;if(b==l)l=b.n;g(b.n,b.p);delete k[a];delete j[a];h--}},removeAll:function(){j={};h=0;k={};m=l=null},destroy:function(){k=f=j=null;delete a[b]},info:function(){return v({},f,{size:h})}}}var a={};b.info=function(){var b={};n(a,function(a,e){b[e]=a.info()});return b};b.get=function(b){return a[b]};return b}}
36
+ function yc(){this.$get=["$cacheFactory",function(b){return b("templates")}]}function Db(b){var a={},c="Directive",d=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,e=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,g="Template must have exactly one root element. was: ",h=/^\s*(https?|ftp|mailto|file):/;this.directive=function j(d,e){B(d)?(ab(e,"directive"),a.hasOwnProperty(d)||(a[d]=[],b.factory(d+c,["$injector","$exceptionHandler",function(b,c){var e=[];n(a[d],function(a){try{var g=b.invoke(a);if(H(g))g={compile:I(g)};
37
+ else if(!g.compile&&g.link)g.compile=I(g.link);g.priority=g.priority||0;g.name=g.name||d;g.require=g.require||g.controller&&g.name;g.restrict=g.restrict||"A";e.push(g)}catch(h){c(h)}});return e}])),a[d].push(e)):n(d,ob(j));return this};this.urlSanitizationWhitelist=function(a){return y(a)?(h=a,this):h};this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(b,i,k,m,l,t,o,p,s){function P(a,b,c){a instanceof u||(a=u(a));
38
+ n(a,function(b,c){b.nodeType==3&&b.nodeValue.match(/\S+/)&&(a[c]=u(b).wrap("<span></span>").parent()[0])});var d=z(a,b,a,c);return function(b,c){ab(b,"scope");for(var e=c?va.clone.call(a):a,g=0,i=e.length;g<i;g++){var h=e[g];(h.nodeType==1||h.nodeType==9)&&e.eq(g).data("$scope",b)}C(e,"ng-scope");c&&c(e,b);d&&d(b,e,e);return e}}function C(a,b){try{a.addClass(b)}catch(c){}}function z(a,b,c,d){function e(a,c,d,i){var h,j,k,o,l,m,t,s=[];l=0;for(m=c.length;l<m;l++)s.push(c[l]);t=l=0;for(m=g.length;l<
39
+ m;t++)j=s[t],c=g[l++],h=g[l++],c?(c.scope?(k=a.$new(L(c.scope)),u(j).data("$scope",k)):k=a,(o=c.transclude)||!i&&b?c(h,k,j,d,function(b){return function(c){var d=a.$new();d.$$transcluded=!0;return b(d,c).bind("$destroy",Ua(d,d.$destroy))}}(o||b)):c(h,k,j,q,i)):h&&h(a,j.childNodes,q,i)}for(var g=[],i,h,j,k=0;k<a.length;k++)h=new ia,i=W(a[k],[],h,d),h=(i=i.length?J(i,a[k],h,b,c):null)&&i.terminal||!a[k].childNodes||!a[k].childNodes.length?null:z(a[k].childNodes,i?i.transclude:b),g.push(i),g.push(h),
40
+ j=j||i||h;return j?e:null}function W(a,b,c,i){var g=c.$attr,h;switch(a.nodeType){case 1:r(b,ea(gb(a).toLowerCase()),"E",i);var j,k,l;h=a.attributes;for(var o=0,m=h&&h.length;o<m;o++)if(j=h[o],j.specified)k=j.name,l=ea(k.toLowerCase()),g[l]=k,c[l]=j=O(Z&&k=="href"?decodeURIComponent(a.getAttribute(k,2)):j.value),Ab(a,l)&&(c[l]=!0),S(a,b,j,l),r(b,l,"A",i);a=a.className;if(B(a)&&a!=="")for(;h=e.exec(a);)l=ea(h[2]),r(b,l,"C",i)&&(c[l]=O(h[3])),a=a.substr(h.index+h[0].length);break;case 3:y(b,a.nodeValue);
41
+ break;case 8:try{if(h=d.exec(a.nodeValue))l=ea(h[1]),r(b,l,"M",i)&&(c[l]=O(h[2]))}catch(t){}}b.sort(F);return b}function J(a,b,c,d,e){function i(a,b){if(a)a.require=r.require,m.push(a);if(b)b.require=r.require,s.push(b)}function h(a,b){var c,d="data",e=!1;if(B(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 Error("No controller: "+a);}else E(a)&&(c=[],n(a,function(a){c.push(h(a,b))}));return c}function j(a,d,e,
42
+ i,g){var l,p,r,D,C;l=b===e?c:hc(c,new ia(u(e),c.$attr));p=l.$$element;if(J){var P=/^\s*([@=&])\s*(\w*)\s*$/,ja=d.$parent||d;n(J.scope,function(a,b){var c=a.match(P)||[],e=c[2]||b,c=c[1],i,g,h;d.$$isolateBindings[b]=c+e;switch(c){case "@":l.$observe(e,function(a){d[b]=a});l.$$observers[e].$$scope=ja;break;case "=":g=t(l[e]);h=g.assign||function(){i=d[b]=g(ja);throw Error(Eb+l[e]+" (directive: "+J.name+")");};i=d[b]=g(ja);d.$watch(function(){var a=g(ja);a!==d[b]&&(a!==i?i=d[b]=a:h(ja,a=i=d[b]));return a});
43
+ break;case "&":g=t(l[e]);d[b]=function(a){return g(ja,a)};break;default:throw Error("Invalid isolate scope definition for directive "+J.name+": "+a);}})}y&&n(y,function(a){var b={$scope:d,$element:p,$attrs:l,$transclude:g};C=a.controller;C=="@"&&(C=l[a.name]);p.data("$"+a.name+"Controller",o(C,b))});i=0;for(r=m.length;i<r;i++)try{D=m[i],D(d,p,l,D.require&&h(D.require,p))}catch(z){k(z,qa(p))}a&&a(d,e.childNodes,q,g);i=0;for(r=s.length;i<r;i++)try{D=s[i],D(d,p,l,D.require&&h(D.require,p))}catch(zc){k(zc,
44
+ qa(p))}}for(var l=-Number.MAX_VALUE,m=[],s=[],p=null,J=null,z=null,D=c.$$element=u(b),r,F,T,ka,S=d,y,x,X,v=0,A=a.length;v<A;v++){r=a[v];T=q;if(l>r.priority)break;if(X=r.scope)ua("isolated scope",J,r,D),L(X)&&(C(D,"ng-isolate-scope"),J=r),C(D,"ng-scope"),p=p||r;F=r.name;if(X=r.controller)y=y||{},ua("'"+F+"' controller",y[F],r,D),y[F]=r;if(X=r.transclude)ua("transclusion",ka,r,D),ka=r,l=r.priority,X=="element"?(T=u(b),D=c.$$element=u(Y.createComment(" "+F+": "+c[F]+" ")),b=D[0],w(e,u(T[0]),b),S=P(T,
45
+ d,l)):(T=u(db(b)).contents(),D.html(""),S=P(T,d));if(X=r.template)if(ua("template",z,r,D),z=r,X=Fb(X),r.replace){T=u("<div>"+O(X)+"</div>").contents();b=T[0];if(T.length!=1||b.nodeType!==1)throw Error(g+X);w(e,D,b);F={$attr:{}};a=a.concat(W(b,a.splice(v+1,a.length-(v+1)),F));$(c,F);A=a.length}else D.html(X);if(r.templateUrl)ua("template",z,r,D),z=r,j=Q(a.splice(v,a.length-v),j,D,c,e,r.replace,S),A=a.length;else if(r.compile)try{x=r.compile(D,c,S),H(x)?i(null,x):x&&i(x.pre,x.post)}catch(G){k(G,qa(D))}if(r.terminal)j.terminal=
46
+ !0,l=Math.max(l,r.priority)}j.scope=p&&p.scope;j.transclude=ka&&S;return j}function r(d,e,i,g){var h=!1;if(a.hasOwnProperty(e))for(var l,e=b.get(e+c),o=0,m=e.length;o<m;o++)try{if(l=e[o],(g===q||g>l.priority)&&l.restrict.indexOf(i)!=-1)d.push(l),h=!0}catch(t){k(t)}return h}function $(a,b){var c=b.$attr,d=a.$attr,e=a.$$element;n(a,function(d,e){e.charAt(0)!="$"&&(b[e]&&(d+=(e==="style"?";":" ")+b[e]),a.$set(e,d,!0,c[e]))});n(b,function(b,i){i=="class"?(C(e,b),a["class"]=(a["class"]?a["class"]+" ":
47
+ "")+b):i=="style"?e.attr("style",e.attr("style")+";"+b):i.charAt(0)!="$"&&!a.hasOwnProperty(i)&&(a[i]=b,d[i]=c[i])})}function Q(a,b,c,d,e,i,h){var j=[],k,o,t=c[0],s=a.shift(),p=v({},s,{controller:null,templateUrl:null,transclude:null,scope:null});c.html("");m.get(s.templateUrl,{cache:l}).success(function(l){var m,s,l=Fb(l);if(i){s=u("<div>"+O(l)+"</div>").contents();m=s[0];if(s.length!=1||m.nodeType!==1)throw Error(g+l);l={$attr:{}};w(e,c,m);W(m,a,l);$(d,l)}else m=t,c.html(l);a.unshift(p);k=J(a,m,
48
+ d,h);for(o=z(c[0].childNodes,h);j.length;){var ia=j.pop(),l=j.pop();s=j.pop();var r=j.pop(),D=m;s!==t&&(D=db(m),w(l,u(s),D));k(function(){b(o,r,D,e,ia)},r,D,e,ia)}j=null}).error(function(a,b,c,d){throw Error("Failed to load template: "+d.url);});return function(a,c,d,e,i){j?(j.push(c),j.push(d),j.push(e),j.push(i)):k(function(){b(o,c,d,e,i)},c,d,e,i)}}function F(a,b){return b.priority-a.priority}function ua(a,b,c,d){if(b)throw Error("Multiple directives ["+b.name+", "+c.name+"] asking for "+a+" on: "+
49
+ qa(d));}function y(a,b){var c=i(b,!0);c&&a.push({priority:0,compile:I(function(a,b){var d=b.parent(),e=d.data("$binding")||[];e.push(c);C(d.data("$binding",e),"ng-binding");a.$watch(c,function(a){b[0].nodeValue=a})})})}function S(a,b,c,d){var e=i(c,!0);e&&b.push({priority:100,compile:I(function(a,b,c){b=c.$$observers||(c.$$observers={});d==="class"&&(e=i(c[d],!0));c[d]=q;(b[d]||(b[d]=[])).$$inter=!0;(c.$$observers&&c.$$observers[d].$$scope||a).$watch(e,function(a){c.$set(d,a)})})})}function w(a,b,
50
+ c){var d=b[0],e=d.parentNode,i,g;if(a){i=0;for(g=a.length;i<g;i++)if(a[i]==d){a[i]=c;break}}e&&e.replaceChild(c,d);c[u.expando]=d[u.expando];b[0]=c}var ia=function(a,b){this.$$element=a;this.$attr=b||{}};ia.prototype={$normalize:ea,$set:function(a,b,c,d){var e=Ab(this.$$element[0],a),i=this.$$observers;e&&(this.$$element.prop(a,b),d=e);this[a]=b;d?this.$attr[a]=d:(d=this.$attr[a])||(this.$attr[a]=d=$a(a,"-"));if(gb(this.$$element[0])==="A"&&a==="href")D.setAttribute("href",b),e=D.href,e.match(h)||
51
+ (this[a]=b="unsafe:"+e);c!==!1&&(b===null||b===q?this.$$element.removeAttr(d):this.$$element.attr(d,b));i&&n(i[a],function(a){try{a(b)}catch(c){k(c)}})},$observe:function(a,b){var c=this,d=c.$$observers||(c.$$observers={}),e=d[a]||(d[a]=[]);e.push(b);p.$evalAsync(function(){e.$$inter||b(c[a])});return b}};var D=s[0].createElement("a"),T=i.startSymbol(),ka=i.endSymbol(),Fb=T=="{{"||ka=="}}"?na:function(a){return a.replace(/\{\{/g,T).replace(/}}/g,ka)};return P}]}function ea(b){return tb(b.replace(Ac,
52
+ ""))}function Bc(){var b={};this.register=function(a,c){L(a)?v(b,a):b[a]=c};this.$get=["$injector","$window",function(a,c){return function(d,e){if(B(d)){var g=d,d=b.hasOwnProperty(g)?b[g]:hb(e.$scope,g,!0)||hb(c,g,!0);ra(d,g,!0)}return a.instantiate(d,e)}}]}function Cc(){this.$get=["$window",function(b){return u(b.document)}]}function Dc(){this.$get=["$log",function(b){return function(a,c){b.error.apply(b,arguments)}}]}function Ec(){var b="{{",a="}}";this.startSymbol=function(a){return a?(b=a,this):
53
+ b};this.endSymbol=function(b){return b?(a=b,this):a};this.$get=["$parse",function(c){function d(d,f){for(var j,i,k=0,m=[],l=d.length,t=!1,o=[];k<l;)(j=d.indexOf(b,k))!=-1&&(i=d.indexOf(a,j+e))!=-1?(k!=j&&m.push(d.substring(k,j)),m.push(k=c(t=d.substring(j+e,i))),k.exp=t,k=i+g,t=!0):(k!=l&&m.push(d.substring(k)),k=l);if(!(l=m.length))m.push(""),l=1;if(!f||t)return o.length=l,k=function(a){for(var b=0,c=l,d;b<c;b++){if(typeof(d=m[b])=="function")d=d(a),d==null||d==q?d="":typeof d!="string"&&(d=da(d));
54
+ o[b]=d}return o.join("")},k.exp=d,k.parts=m,k}var e=b.length,g=a.length;d.startSymbol=function(){return b};d.endSymbol=function(){return a};return d}]}function Gb(b){for(var b=b.split("/"),a=b.length;a--;)b[a]=Ya(b[a]);return b.join("/")}function wa(b,a){var c=Hb.exec(b),c={protocol:c[1],host:c[3],port:G(c[5])||Ib[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 la(b,a,c){return b+"://"+a+(c==Ib[b]?"":":"+c)}function Fc(b,
55
+ a,c){var d=wa(b);return decodeURIComponent(d.path)!=a||x(d.hash)||d.hash.indexOf(c)!==0?b:la(d.protocol,d.host,d.port)+a.substr(0,a.lastIndexOf("/"))+d.hash.substr(c.length)}function Gc(b,a,c){var d=wa(b);if(decodeURIComponent(d.path)==a&&!x(d.hash)&&d.hash.indexOf(c)===0)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 Error('Invalid url "'+b+'", missing path prefix "'+h+'" !');return la(d.protocol,
56
+ d.host,d.port)+a+"#"+c+f+e+g}}function ib(b,a,c){a=a||"";this.$$parse=function(b){var c=wa(b,this);if(c.path.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing path prefix "'+a+'" !');this.$$path=decodeURIComponent(c.path.substr(a.length));this.$$search=Wa(c.search);this.$$hash=c.hash&&decodeURIComponent(c.hash)||"";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,
57
+ this.$$host,this.$$port)+a+this.$$url};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Ha(b,a,c){var d;this.$$parse=function(b){var c=wa(b,this);if(c.hash&&c.hash.indexOf(a)!==0)throw Error('Invalid url "'+b+'", missing hash prefix "'+a+'" !');d=c.path+(c.search?"?"+c.search:"");c=Hc.exec((c.hash||"").substr(a.length));this.$$path=c[1]?(c[1].charAt(0)=="/"?"":"/")+decodeURIComponent(c[1]):"";this.$$search=Wa(c[3]);this.$$hash=c[5]&&decodeURIComponent(c[5])||
58
+ "";this.$$compose()};this.$$compose=function(){var b=qb(this.$$search),c=this.$$hash?"#"+Ya(this.$$hash):"";this.$$url=Gb(this.$$path)+(b?"?"+b:"")+c;this.$$absUrl=la(this.$$protocol,this.$$host,this.$$port)+d+(this.$$url?"#"+a+this.$$url:"")};this.$$rewriteAppUrl=function(a){if(a.indexOf(c)==0)return a};this.$$parse(b)}function Jb(b,a,c,d){Ha.apply(this,arguments);this.$$rewriteAppUrl=function(b){if(b.indexOf(c)==0)return c+d+"#"+a+b.substr(c.length)}}function Ia(b){return function(){return this[b]}}
59
+ function Kb(b,a){return function(c){if(x(c))return this[b];this[b]=a(c);this.$$compose();return this}}function Ic(){var b="",a=!1;this.hashPrefix=function(a){return y(a)?(b=a,this):b};this.html5Mode=function(b){return y(b)?(a=b,this):a};this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(c,d,e,g){function h(a){c.$broadcast("$locationChangeSuccess",f.absUrl(),a)}var f,j,i,k=d.url(),m=wa(k);a?(j=d.baseHref()||"/",i=j.substr(0,j.lastIndexOf("/")),m=la(m.protocol,m.host,m.port)+i+"/",
60
+ f=e.history?new ib(Fc(k,j,b),i,m):new Jb(Gc(k,j,b),b,m,j.substr(i.length+1))):(m=la(m.protocol,m.host,m.port)+(m.path||"")+(m.search?"?"+m.search:"")+"#"+b+"/",f=new Ha(k,b,m));g.bind("click",function(a){if(!a.ctrlKey&&!(a.metaKey||a.which==2)){for(var b=u(a.target);A(b[0].nodeName)!=="a";)if(b[0]===g[0]||!(b=b.parent())[0])return;var d=b.prop("href"),e=f.$$rewriteAppUrl(d);d&&!b.attr("target")&&e&&(f.$$parse(e),c.$apply(),a.preventDefault(),N.angular["ff-684208-preventDefault"]=!0)}});f.absUrl()!=
61
+ k&&d.url(f.absUrl(),!0);d.onUrlChange(function(a){f.absUrl()!=a&&(c.$evalAsync(function(){var b=f.absUrl();f.$$parse(a);h(b)}),c.$$phase||c.$digest())});var l=0;c.$watch(function(){var a=d.url(),b=f.$$replace;if(!l||a!=f.absUrl())l++,c.$evalAsync(function(){c.$broadcast("$locationChangeStart",f.absUrl(),a).defaultPrevented?f.$$parse(a):(d.url(f.absUrl(),b),h(a))});f.$$replace=!1;return l});return f}]}function Jc(){this.$get=["$window",function(b){function a(a){a instanceof Error&&(a.stack?a=a.message&&
62
+ 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||w;return g.apply?function(){var b=[];n(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 Kc(b,a){function c(a){return a.indexOf(s)!=-1}function d(){return o+1<b.length?b.charAt(o+1):!1}function e(a){return"0"<=
63
+ 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 j(a,c,d){d=d||o;throw Error("Lexer Error: "+a+" at column"+(y(c)?"s "+c+"-"+o+" ["+b.substring(c,d)+"]":" "+d)+" in expression ["+b+"].");}function i(){for(var a="",c=o;o<b.length;){var i=A(b.charAt(o));if(i=="."||e(i))a+=i;else{var g=d();if(i=="e"&&f(g))a+=i;else if(f(i)&&g&&e(g)&&a.charAt(a.length-
64
+ 1)=="e")a+=i;else if(f(i)&&(!g||!e(g))&&a.charAt(a.length-1)=="e")j("Invalid exponent");else break}o++}a*=1;l.push({index:c,text:a,json:!0,fn:function(){return a}})}function k(){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(Ja.hasOwnProperty(c))d.fn=d.json=Ja[c];else{var m=Lb(c,a);d.fn=v(function(a,
65
+ b){return m(a,b)},{assign:function(a,b){return Mb(a,c,b)}})}l.push(d);j&&(l.push({index:f,text:".",json:!1}),l.push({index:f+1,text:j,json:!1}))}function m(a){var c=o;o++;for(var d="",e=a,f=!1;o<b.length;){var i=b.charAt(o);e+=i;if(f)i=="u"?(i=b.substring(o+1,o+5),i.match(/[\da-f]{4}/i)||j("Invalid unicode escape [\\u"+i+"]"),o+=4,d+=String.fromCharCode(parseInt(i,16))):(f=Lc[i],d+=f?f:i),f=!1;else if(i=="\\")f=!0;else if(i==a){o++;l.push({index:c,text:e,string:d,json:!0,fn:function(){return d}});
66
+ return}else d+=i;o++}j("Unterminated quote",c)}for(var l=[],t,o=0,p=[],s,P=":";o<b.length;){s=b.charAt(o);if(c("\"'"))m(s);else if(e(s)||c(".")&&e(d()))i();else if(h(s)){if(k(),"{,".indexOf(P)!=-1&&p[0]=="{"&&(t=l[l.length-1]))t.json=t.text.indexOf(".")==-1}else if(c("(){}[].,;:"))l.push({index:o,text:s,json:":[,".indexOf(P)!=-1&&c("{[")||c("}]:,")}),c("{[")&&p.unshift(s),c("}]")&&p.shift(),o++;else if(g(s)){o++;continue}else{var n=s+d(),z=Ja[s],W=Ja[n];W?(l.push({index:o,text:n,fn:W}),o+=2):z?(l.push({index:o,
67
+ text:s,fn:z,json:"[,:".indexOf(P)!=-1&&c("+-")}),o+=1):j("Unexpected next character ",o,o+1)}P=s}return l}function Mc(b,a,c,d){function e(a,c){throw Error("Syntax Error: Token '"+c.text+"' "+a+" at column "+(c.index+1)+" of the expression ["+b+"] starting at ["+b.substring(c.index)+"].");}function g(){if(Q.length===0)throw Error("Unexpected end of expression: "+b);return Q[0]}function h(a,b,c,d){if(Q.length>0){var e=Q[0],f=e.text;if(f==a||f==b||f==c||f==d||!a&&!b&&!c&&!d)return e}return!1}function f(b,
68
+ c,d,f){return(b=h(b,c,d,f))?(a&&!b.json&&e("is not valid json",b),Q.shift(),b):!1}function j(a){f(a)||e("is unexpected, expecting ["+a+"]",h())}function i(a,b){return function(c,d){return a(c,d,b)}}function k(a,b,c){return function(d,e){return b(d,e,a,c)}}function m(){for(var a=[];;)if(Q.length>0&&!h("}",")",";","]")&&a.push(x()),!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());
69
+ 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 t(){for(var a=o(),b;;)if(b=f("||"))a=k(a,b.fn,o());else return a}function o(){var a=p(),b;if(b=f("&&"))a=k(a,b.fn,o());return a}function p(){var a=s(),b;if(b=f("==","!="))a=k(a,b.fn,p());return a}function s(){var a;a=n();for(var b;b=f("+","-");)a=k(a,b.fn,n());if(b=f("<",">","<=",">="))a=k(a,b.fn,s());return a}function n(){for(var a=C(),b;b=f("*","/","%");)a=k(a,
70
+ b.fn,C());return a}function C(){var a;return f("+")?z():(a=f("-"))?k(r,a.fn,C()):(a=f("!"))?i(a.fn,C()):z()}function z(){var a;if(f("("))a=x(),j(")");else if(f("["))a=W();else if(f("{"))a=J();else{var b=f();(a=b.fn)||e("not a primary expression",b)}for(var c;b=f("(","[",".");)b.text==="("?(a=y(a,c),c=null):b.text==="["?(c=a,a=S(a)):b.text==="."?(c=a,a=u(a)):e("IMPOSSIBLE");return a}function W(){var a=[];if(g().text!="]"){do a.push(F());while(f(","))}j("]");return function(b,c){for(var d=[],e=0;e<
71
+ a.length;e++)d.push(a[e](b,c));return d}}function J(){var a=[];if(g().text!="}"){do{var b=f(),b=b.string||b.text;j(":");var c=F();a.push({key:b,value:c})}while(f(","))}j("}");return function(b,c){for(var d={},e=0;e<a.length;e++){var f=a[e],i=f.value(b,c);d[f.key]=i}return d}}var r=I(0),$,Q=Kc(b,d),F=function(){var a=t(),c,d;return(d=f("="))?(a.assign||e("implies assignment but ["+b.substring(0,d.index)+"] can not be assigned to",d),c=t(),function(b,d){return a.assign(b,c(b,d),d)}):a},y=function(a,
72
+ b){var c=[];if(g().text!=")"){do c.push(F());while(f(","))}j(")");return function(d,e){for(var f=[],i=b?b(d,e):d,g=0;g<c.length;g++)f.push(c[g](d,e));g=a(d,e)||w;return g.apply?g.apply(i,f):g(f[0],f[1],f[2],f[3],f[4])}},u=function(a){var b=f().text,c=Lb(b,d);return v(function(b,d){return c(a(b,d),d)},{assign:function(c,d,e){return Mb(a(c,e),b,d)}})},S=function(a){var b=F();j("]");return v(function(c,d){var e=a(c,d),f=b(c,d),i;if(!e)return q;if((e=e[f])&&e.then){i=e;if(!("$$v"in e))i.$$v=q,i.then(function(a){i.$$v=
73
+ a});e=e.$$v}return e},{assign:function(c,d,e){return a(c,e)[b(c,e)]=d}})},x=function(){for(var a=F(),b;;)if(b=f("|"))a=k(a,b.fn,l());else return a};a?(F=t,y=u=S=x=function(){e("is not valid json",{text:b,index:0})},$=z()):$=m();Q.length!==0&&e("is an unexpected token",Q[0]);return $}function Mb(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 hb(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],
74
+ b&&(b=(e=b)[d]);return!c&&H(b)?Ua(e,b):b}function Nb(b,a,c,d,e){return function(g,h){var f=h&&h.hasOwnProperty(b)?h:g,j;if(f===null||f===q)return f;if((f=f[b])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!a||f===null||f===q)return f;if((f=f[a])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!c||f===null||f===q)return f;if((f=f[c])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!d||f===null||f===q)return f;
75
+ if((f=f[d])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}if(!e||f===null||f===q)return f;if((f=f[e])&&f.then){if(!("$$v"in f))j=f,j.$$v=q,j.then(function(a){j.$$v=a});f=f.$$v}return f}}function Lb(b,a){if(jb.hasOwnProperty(b))return jb[b];var c=b.split("."),d=c.length,e;if(a)e=d<6?Nb(c[0],c[1],c[2],c[3],c[4]):function(a,b){var e=0,i;do i=Nb(c[e++],c[e++],c[e++],c[e++],c[e++])(a,b),b=q,a=i;while(e<d);return i};else{var g="var l, fn, p;\n";n(c,function(a,b){g+="if(s === null || s === undefined) return s;\nl=s;\ns="+
76
+ (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 jb[b]=e}function Nc(){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]=Mc(d,!1,a,c.csp);case "function":return d;default:return w}}}]}function Oc(){this.$get=
77
+ ["$rootScope","$exceptionHandler",function(b,a){return Pc(function(a){b.$evalAsync(a)},a)}]}function Pc(b,a){function c(a){return a}function d(a){return h(a)}var e=function(){var f=[],j,i;return i={resolve:function(a){if(f){var c=f;f=q;j=g(a);c.length&&b(function(){for(var a,b=0,d=c.length;b<d;b++)a=c[b],j.then(a[0],a[1])})}},reject:function(a){i.resolve(h(a))},promise:{then:function(b,i){var g=e(),h=function(d){try{g.resolve((b||c)(d))}catch(e){a(e),g.reject(e)}},o=function(b){try{g.resolve((i||
78
+ d)(b))}catch(c){a(c),g.reject(c)}};f?f.push([h,o]):j.then(h,o);return g.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,i){var g=e();b(function(){g.resolve((i||d)(a))});return g.promise}}};return{defer:e,reject:h,when:function(f,j,i){var k=e(),m,l=function(b){try{return(j||c)(b)}catch(d){return a(d),h(d)}},t=function(b){try{return(i||d)(b)}catch(c){return a(c),h(c)}};b(function(){g(f).then(function(a){m||
79
+ (m=!0,k.resolve(g(a).then(l,t)))},function(a){m||(m=!0,k.resolve(t(a)))})});return k.promise},all:function(a){var b=e(),c=a.length,d=[];c?n(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 Qc(){var b={};this.when=function(a,c){b[a]=v({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};
80
+ this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(a,c,d,e,g,h,f){function j(a,b){for(var b="^"+b.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",c="",d=[],e={},f=/:(\w+)/g,i,g=0;(i=f.exec(b))!==null;)c+=b.slice(g,i.index),c+="([^\\/]*)",d.push(i[1]),g=f.lastIndex;c+=b.substr(g);var h=a.match(RegExp(c));h&&n(d,function(a,b){e[a]=h[b+1]});return h?e:null}function i(){var b=k(),i=t.current;if(b&&i&&b.$$route===i.$$route&&ga(b.pathParams,i.pathParams)&&
81
+ !b.reloadOnSearch&&!l)i.params=b.params,V(i.params,d),a.$broadcast("$routeUpdate",i);else if(b||i)l=!1,a.$broadcast("$routeChangeStart",b,i),(t.current=b)&&b.redirectTo&&(B(b.redirectTo)?c.path(m(b.redirectTo,b.params)).search(b.params).replace():c.url(b.redirectTo(b.pathParams,c.path(),c.search())).replace()),e.when(b).then(function(){if(b){var a=[],c=[],d;n(b.resolve||{},function(b,d){a.push(d);c.push(B(b)?g.get(b):g.invoke(b))});if(!y(d=b.template))if(y(d=b.templateUrl))d=h.get(d,{cache:f}).then(function(a){return a.data});
82
+ y(d)&&(a.push("$template"),c.push(d));return e.all(c).then(function(b){var c={};n(b,function(b,d){c[a[d]]=b});return c})}}).then(function(c){if(b==t.current){if(b)b.locals=c,V(b.params,d);a.$broadcast("$routeChangeSuccess",b,i)}},function(c){b==t.current&&a.$broadcast("$routeChangeError",b,i,c)})}function k(){var a,d;n(b,function(b,e){if(!d&&(a=j(c.path(),e)))d=za(b,{params:v({},c.search(),a),pathParams:a}),d.$$route=b});return d||b[null]&&za(b[null],{params:{},pathParams:{}})}function m(a,b){var c=
83
+ [];n((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 l=!1,t={routes:b,reload:function(){l=!0;a.$evalAsync(i)}};a.$on("$locationChangeSuccess",i);return t}]}function Rc(){this.$get=I({})}function Sc(){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=ya();this.$$phase=this.$parent=this.$$watchers=
84
+ this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null;this["this"]=this.$root=this;this.$$destroyed=!1;this.$$asyncQueue=[];this.$$listeners={};this.$$isolateBindings={}}function g(a){if(j.$$phase)throw Error(j.$$phase+" already in progress");j.$$phase=a}function h(a,b){var c=d(a);ra(c,b);return c}function f(){}e.prototype={$new:function(a){if(H(a))throw Error("API-CHANGE: Use $controller to instantiate controllers.");a?(a=new e,a.$root=this.$root):(a=function(){},a.prototype=
85
+ this,a=new a,a.$id=ya());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(!H(b)){var j=h(b||w,"listener");g.fn=function(a,b,c){j(c)}}if(!e)e=this.$$watchers=[];e.unshift(g);return function(){Ta(e,
86
+ g)}},$digest:function(){var a,d,e,h,t,o,p,s=b,n,C=[],z,q;g("$digest");do{p=!1;n=this;do{for(t=n.$$asyncQueue;t.length;)try{n.$eval(t.shift())}catch(J){c(J)}if(h=n.$$watchers)for(o=h.length;o--;)try{if(a=h[o],(d=a.get(n))!==(e=a.last)&&!(a.eq?ga(d,e):typeof d=="number"&&typeof e=="number"&&isNaN(d)&&isNaN(e)))p=!0,a.last=a.eq?V(d):d,a.fn(d,e===f?d:e,n),s<5&&(z=4-s,C[z]||(C[z]=[]),q=H(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,q+="; newVal: "+da(d)+"; oldVal: "+da(e),C[z].push(q))}catch(r){c(r)}if(!(h=
87
+ n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(h=n.$$nextSibling);)n=n.$parent}while(n=h);if(p&&!s--)throw j.$$phase=null,Error(b+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+da(C));}while(p||t.length);j.$$phase=null},$destroy:function(){if(!(j==this||this.$$destroyed)){var a=this.$parent;this.$broadcast("$destroy");this.$$destroyed=!0;if(a.$$childHead==this)a.$$childHead=this.$$nextSibling;if(a.$$childTail==this)a.$$childTail=this.$$prevSibling;
88
+ if(this.$$prevSibling)this.$$prevSibling.$$nextSibling=this.$$nextSibling;if(this.$$nextSibling)this.$$nextSibling.$$prevSibling=this.$$prevSibling;this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(a,b){return d(a)(this,b)},$evalAsync:function(a){this.$$asyncQueue.push(a)},$apply:function(a){try{return g("$apply"),this.$eval(a)}catch(b){c(b)}finally{j.$$phase=null;try{j.$digest()}catch(d){throw c(d),d;}}},$on:function(a,b){var c=this.$$listeners[a];
89
+ c||(this.$$listeners[a]=c=[]);c.push(b);return function(){c[Aa(c,b)]=null}},$emit:function(a,b){var d=[],e,f=this,g=!1,h={name:a,targetScope:f,stopPropagation:function(){g=!0},preventDefault:function(){h.defaultPrevented=!0},defaultPrevented:!1},j=[h].concat(ha.call(arguments,1)),n,C;do{e=f.$$listeners[a]||d;h.currentScope=f;n=0;for(C=e.length;n<C;n++)if(e[n])try{if(e[n].apply(null,j),g)return h}catch(z){c(z)}else e.splice(n,1),n--,C--;f=f.$parent}while(f);return h},$broadcast:function(a,b){var d=
90
+ this,e=this,f={name:a,targetScope:this,preventDefault:function(){f.defaultPrevented=!0},defaultPrevented:!1},g=[f].concat(ha.call(arguments,1)),h,j;do{d=e;f.currentScope=d;e=d.$$listeners[a]||[];h=0;for(j=e.length;h<j;h++)if(e[h])try{e[h].apply(null,g)}catch(n){c(n)}else e.splice(h,1),h--,j--;if(!(e=d.$$childHead||d!==this&&d.$$nextSibling))for(;d!==this&&!(e=d.$$nextSibling);)d=d.$parent}while(d=e);return f}};var j=new e;return j}]}function Tc(){this.$get=["$window",function(b){var a={},c=G((/android (\d+)/.exec(A(b.navigator.userAgent))||
91
+ [])[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(x(a[c])){var e=b.document.createElement("div");a[c]="on"+c in e}return a[c]},csp:!1}}]}function Uc(){this.$get=I(N)}function Ob(b){var a={},c,d,e;if(!b)return a;n(b.split("\n"),function(b){e=b.indexOf(":");c=A(O(b.substr(0,e)));d=O(b.substr(e+1));c&&(a[c]?a[c]+=", "+d:a[c]=d)});return a}function Pb(b){var a=
92
+ L(b)?b:q;return function(c){a||(a=Ob(b));return c?a[A(c)]||null:a}}function Qb(b,a,c){if(H(c))return c(b,a);n(c,function(c){b=c(b,a)});return b}function Vc(){var b=/^\s*(\[|\{[^\{])/,a=/[\}\]]\s*$/,c=/^\)\]\}',?\n/,d=this.defaults={transformResponse:[function(d){B(d)&&(d=d.replace(c,""),b.test(d)&&a.test(d)&&(d=pb(d,!0)));return d}],transformRequest:[function(a){return L(a)&&xa.apply(a)!=="[object File]"?da(a):a}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},
93
+ post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},e=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(a,b,c,j,i,k){function m(a){function c(a){var b=v({},a,{data:Qb(a.data,a.headers,f)});return 200<=a.status&&a.status<300?b:i.reject(b)}a.method=ma(a.method);var e=a.transformRequest||d.transformRequest,f=a.transformResponse||d.transformResponse,g=d.headers,g=v({"X-XSRF-TOKEN":b.cookies()["XSRF-TOKEN"]},
94
+ g.common,g[A(a.method)],a.headers),e=Qb(a.data,Pb(g),e),j;x(a.data)&&delete g["Content-Type"];j=l(a,e,g);j=j.then(c,c);n(p,function(a){j=a(j)});j.success=function(b){j.then(function(c){b(c.data,c.status,c.headers,a)});return j};j.error=function(b){j.then(null,function(c){b(c.data,c.status,c.headers,a)});return j};return j}function l(b,c,d){function e(a,b,c){n&&(200<=a&&a<300?n.put(q,[a,b,Ob(c)]):n.remove(q));f(b,a,c);j.$apply()}function f(a,c,d){c=Math.max(c,0);(200<=c&&c<300?k.resolve:k.reject)({data:a,
95
+ status:c,headers:Pb(d),config:b})}function h(){var a=Aa(m.pendingRequests,b);a!==-1&&m.pendingRequests.splice(a,1)}var k=i.defer(),l=k.promise,n,p,q=t(b.url,b.params);m.pendingRequests.push(b);l.then(h,h);b.cache&&b.method=="GET"&&(n=L(b.cache)?b.cache:o);if(n)if(p=n.get(q))if(p.then)return p.then(h,h),p;else E(p)?f(p[1],p[0],V(p[2])):f(p,200,{});else n.put(q,l);p||a(b.method,q,c,e,d,b.timeout,b.withCredentials);return l}function t(a,b){if(!b)return a;var c=[];fc(b,function(a,b){a==null||a==q||(L(a)&&
96
+ (a=da(a)),c.push(encodeURIComponent(b)+"="+encodeURIComponent(a)))});return a+(a.indexOf("?")==-1?"?":"&")+c.join("&")}var o=c("$http"),p=[];n(e,function(a){p.push(B(a)?k.get(a):k.invoke(a))});m.pendingRequests=[];(function(a){n(arguments,function(a){m[a]=function(b,c){return m(v(c||{},{method:a,url:b}))}})})("get","delete","head","jsonp");(function(a){n(arguments,function(a){m[a]=function(b,c,d){return m(v(d||{},{method:a,url:b,data:c}))}})})("post","put");m.defaults=d;return m}]}function Wc(){this.$get=
97
+ ["$browser","$window","$document",function(b,a,c){return Xc(b,Yc,b.defer,a.angular.callbacks,c[0],a.location.protocol.replace(":",""))}]}function Xc(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,j,i,k,m,l,t){function o(a,c,d,e){c=(j.match(Hb)||["",g])[1]=="file"?d?200:404:
98
+ c;a(c==1223?204:c,d,e);b.$$completeOutstandingRequest(w)}b.$$incOutstandingRequestCount();j=j||b.url();if(A(e)=="jsonp"){var p="_"+(d.counter++).toString(36);d[p]=function(a){d[p].data=a};h(j.replace("JSON_CALLBACK","angular.callbacks."+p),function(){d[p].data?o(k,200,d[p].data):o(k,-2);delete d[p]})}else{var s=new a;s.open(e,j,!0);n(m,function(a,b){a&&s.setRequestHeader(b,a)});var q;s.onreadystatechange=function(){if(s.readyState==4){var a=s.getAllResponseHeaders(),b=["Cache-Control","Content-Language",
99
+ "Content-Type","Expires","Last-Modified","Pragma"];a||(a="",n(b,function(b){var c=s.getResponseHeader(b);c&&(a+=b+": "+c+"\n")}));o(k,q||s.status,s.responseText,a)}};if(t)s.withCredentials=!0;s.send(i||"");l>0&&c(function(){q=-1;s.abort()},l)}}}function Zc(){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",
100
+ 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",
101
+ shortDate:"M/d/yy",mediumTime:"h:mm:ss a",shortTime:"h:mm a"},pluralCat:function(b){return b===1?"one":"other"}}}}function $c(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(b,a,c,d){function e(e,f,j){var i=c.defer(),k=i.promise,m=y(j)&&!j,f=a.defer(function(){try{i.resolve(e())}catch(a){i.reject(a),d(a)}m||b.$apply()},f),j=function(){delete g[k.$$timeoutId]};k.$$timeoutId=f;g[f]=i;k.then(j,j);return k}var g={};e.cancel=function(b){return b&&b.$$timeoutId in g?(g[b.$$timeoutId].reject("canceled"),
102
+ a.defer.cancel(b.$$timeoutId)):!1};return e}]}function Rb(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",Sb);a("date",Tb);a("filter",ad);a("json",bd);a("limitTo",cd);a("lowercase",dd);a("number",Ub);a("orderBy",Vb);a("uppercase",ed)}function ad(){return function(b,a){if(!E(b))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,
103
+ 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=
104
+ e,f=(""+a[e]).toLowerCase();f&&c.push(function(a){return d(hb(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 Sb(b){var a=b.NUMBER_FORMATS;return function(b,d){if(x(d))d=a.CURRENCY_SYM;return Wb(b,a.PATTERNS[1],a.GROUP_SEP,a.DECIMAL_SEP,2).replace(/\u00A4/g,d)}}function Ub(b){var a=b.NUMBER_FORMATS;return function(b,d){return Wb(b,a.PATTERNS[0],a.GROUP_SEP,a.DECIMAL_SEP,d)}}function Wb(b,a,c,d,
105
+ e){if(isNaN(b)||!isFinite(b))return"";var g=b<0,b=Math.abs(b),h=b+"",f="",j=[],i=!1;if(h.indexOf("e")!==-1){var k=h.match(/([\d\.]+)e(-?)(\d+)/);k&&k[2]=="-"&&k[3]>e+1?h="0":(f=h,i=!0)}if(!i){h=(h.split(Xb)[1]||"").length;x(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(Xb),h=b[0],b=b[1]||"",i=0,k=a.lgSize,m=a.gSize;if(h.length>=k+m)for(var i=h.length-k,l=0;l<i;l++)(i-l)%m===0&&l!==0&&(f+=c),f+=h.charAt(l);for(l=i;l<h.length;l++)(h.length-
106
+ l)%k===0&&l!==0&&(f+=c),f+=h.charAt(l);for(;b.length<e;)b+="0";e&&e!=="0"&&(f+=d+b.substr(0,e))}j.push(g?a.negPre:a.posPre);j.push(f);j.push(g?a.negSuf:a.posSuf);return j.join("")}function kb(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 M(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 kb(e,a,d)}}function Ka(b,a){return function(c,d){var e=c["get"+b](),g=ma(a?"SHORT"+b:b);return d[g][e]}}
107
+ function Tb(b){function a(a){var b;if(b=a.match(c)){var a=new Date(0),g=0,h=0;b[9]&&(g=G(b[9]+b[10]),h=G(b[9]+b[11]));a.setUTCFullYear(G(b[1]),G(b[2])-1,G(b[3]));a.setUTCHours(G(b[4]||0)-g,G(b[5]||0)-h,G(b[6]||0),G(b[7]||0))}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,e){var g="",h=[],f,j,e=e||"mediumDate",e=b.DATETIME_FORMATS[e]||e;B(c)&&(c=fd.test(c)?G(c):a(c));Ra(c)&&(c=new Date(c));if(!oa(c))return c;for(;e;)(j=
108
+ gd.exec(e))?(h=h.concat(ha.call(j,1)),e=h.pop()):(h.push(e),e=null);n(h,function(a){f=hd[a];g+=f?f(c,b.DATETIME_FORMATS):a.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function bd(){return function(b){return da(b,!0)}}function cd(){return function(b,a){if(!(b instanceof Array))return b;var a=G(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 Vb(b){return function(a,
109
+ c,d){function e(a,b){return Va(b)?function(b,c){return a(c,b)}:a}if(!E(a))return a;if(!c)return a;for(var c=E(c)?c:[c],c=Sa(c,function(a){var c=!1,d=a||na;if(B(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=
110
+ 0;d<c.length;d++){var e=c[d](a,b);if(e!==0)return e}return 0},d))}}function R(b){H(b)&&(b={link:b});b.restrict=b.restrict||"AC";return I(b)}function Yb(b,a){function c(a,c){c=c?"-"+$a(c,"-"):"";b.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}var d=this,e=b.parent().controller("form")||Na,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(Oa);c(!0);d.$addControl=function(a){a.$name&&!d.hasOwnProperty(a.$name)&&(d[a.$name]=a)};d.$removeControl=
111
+ function(a){a.$name&&d[a.$name]===a&&delete d[a.$name];n(h,function(b,c){d.$setValidity(c,!0,a)})};d.$setValidity=function(a,b,i){var k=h[a];if(b){if(k&&(Ta(k,i),!k.length)){g--;if(!g)c(b),d.$valid=!0,d.$invalid=!1;h[a]=!1;c(!0,a);e.$setValidity(a,!0,d)}}else{g||c(b);if(k){if(Aa(k,i)!=-1)return}else h[a]=k=[],g++,c(!1,a),e.$setValidity(a,!1,d);k.push(i);d.$valid=!1;d.$invalid=!0}};d.$setDirty=function(){b.removeClass(Oa).addClass(Zb);d.$dirty=!0;d.$pristine=!1;e.$setDirty()}}function U(b){return x(b)||
112
+ b===""||b===null||b!==b}function Pa(b,a,c,d,e,g){var h=function(){var c=O(a.val());d.$viewValue!==c&&b.$apply(function(){d.$setViewValue(c)})};if(e.hasEvent("input"))a.bind("input",h);else{var f;a.bind("keydown",function(a){a=a.keyCode;a===91||15<a&&a<19||37<=a&&a<=40||f||(f=g.defer(function(){h();f=null}))});a.bind("change",h)}d.$render=function(){a.val(U(d.$viewValue)?"":d.$viewValue)};var j=c.ngPattern,i=function(a,b){return U(b)||a.test(b)?(d.$setValidity("pattern",!0),b):(d.$setValidity("pattern",
113
+ !1),q)};j&&(j.match(/^\/(.*)\/$/)?(j=RegExp(j.substr(1,j.length-2)),e=function(a){return i(j,a)}):e=function(a){var c=b.$eval(j);if(!c||!c.test)throw Error("Expected "+j+" to be a RegExp but was "+c);return i(c,a)},d.$formatters.push(e),d.$parsers.push(e));if(c.ngMinlength){var k=G(c.ngMinlength),e=function(a){return!U(a)&&a.length<k?(d.$setValidity("minlength",!1),q):(d.$setValidity("minlength",!0),a)};d.$parsers.push(e);d.$formatters.push(e)}if(c.ngMaxlength){var m=G(c.ngMaxlength),c=function(a){return!U(a)&&
114
+ a.length>m?(d.$setValidity("maxlength",!1),q):(d.$setValidity("maxlength",!0),a)};d.$parsers.push(c);d.$formatters.push(c)}}function lb(b,a){b="ngClass"+b;return R(function(c,d,e){function g(b){if(a===!0||c.$index%2===a)j&&b!==j&&h(j),f(b);j=b}function h(a){L(a)&&!E(a)&&(a=Sa(a,function(a,b){if(a)return b}));d.removeClass(E(a)?a.join(" "):a)}function f(a){L(a)&&!E(a)&&(a=Sa(a,function(a,b){if(a)return b}));a&&d.addClass(E(a)?a.join(" "):a)}var j=q;c.$watch(e[b],g,!0);e.$observe("class",function(){var a=
115
+ c.$eval(e[b]);g(a,a)});b!=="ngClass"&&c.$watch("$index",function(d,g){var j=d%2;j!==g%2&&(j==a?f(c.$eval(e[b])):h(c.$eval(e[b])))})})}var A=function(b){return B(b)?b.toLowerCase():b},ma=function(b){return B(b)?b.toUpperCase():b},Z=G((/msie (\d+)/.exec(A(navigator.userAgent))||[])[1]),u,ca,ha=[].slice,Qa=[].push,xa=Object.prototype.toString,Za=N.angular||(N.angular={}),ta,gb,aa=["0","0","0"];w.$inject=[];na.$inject=[];gb=Z<9?function(b){b=b.nodeName?b:b[0];return b.scopeName&&b.scopeName!="HTML"?ma(b.scopeName+
116
+ ":"+b.nodeName):b.nodeName}:function(b){return b.nodeName?b.nodeName:b[0].nodeName};var kc=/[A-Z]/g,id={full:"1.0.6",major:1,minor:0,dot:6,codeName:"universal-irreversibility"},Ca=K.cache={},Ba=K.expando="ng-"+(new Date).getTime(),oc=1,$b=N.document.addEventListener?function(b,a,c){b.addEventListener(a,c,!1)}:function(b,a,c){b.attachEvent("on"+a,c)},eb=N.document.removeEventListener?function(b,a,c){b.removeEventListener(a,c,!1)}:function(b,a,c){b.detachEvent("on"+a,c)},mc=/([\:\-\_]+(.))/g,nc=/^moz([A-Z])/,
117
+ va=K.prototype={ready:function(b){function a(){c||(c=!0,b())}var c=!1;this.bind("DOMContentLoaded",a);K(N).bind("load",a)},toString:function(){var b=[];n(this,function(a){b.push(""+a)});return"["+b.join(", ")+"]"},eq:function(b){return b>=0?u(this[b]):u(this[this.length+b])},length:0,push:Qa,sort:[].sort,splice:[].splice},Fa={};n("multiple,selected,checked,disabled,readOnly,required".split(","),function(b){Fa[A(b)]=b});var Bb={};n("input,select,option,textarea,button,form".split(","),function(b){Bb[ma(b)]=
118
+ !0});n({data:wb,inheritedData:Ea,scope:function(b){return Ea(b,"$scope")},controller:zb,injector:function(b){return Ea(b,"$injector")},removeAttr:function(b,a){b.removeAttribute(a)},hasClass:Da,css:function(b,a,c){a=tb(a);if(y(c))b.style[a]=c;else{var d;Z<=8&&(d=b.currentStyle&&b.currentStyle[a],d===""&&(d="auto"));d=d||b.style[a];Z<=8&&(d=d===""?q:d);return d}},attr:function(b,a,c){var d=A(a);if(Fa[d])if(y(c))c?(b[a]=!0,b.setAttribute(a,d)):(b[a]=!1,b.removeAttribute(d));else return b[a]||(b.attributes.getNamedItem(a)||
119
+ w).specified?d:q;else if(y(c))b.setAttribute(a,c);else if(b.getAttribute)return b=b.getAttribute(a,2),b===null?q:b},prop:function(b,a,c){if(y(c))b[a]=c;else return b[a]},text:v(Z<9?function(b,a){if(b.nodeType==1){if(x(a))return b.innerText;b.innerText=a}else{if(x(a))return b.nodeValue;b.nodeValue=a}}:function(b,a){if(x(a))return b.textContent;b.textContent=a},{$dv:""}),val:function(b,a){if(x(a))return b.value;b.value=a},html:function(b,a){if(x(a))return b.innerHTML;for(var c=0,d=b.childNodes;c<d.length;c++)sa(d[c]);
120
+ b.innerHTML=a}},function(b,a){K.prototype[a]=function(a,d){var e,g;if((b.length==2&&b!==Da&&b!==zb?a:d)===q)if(L(a)){for(e=0;e<this.length;e++)if(b===wb)b(this[e],a);else for(g in a)b(this[e],g,a[g]);return this}else{if(this.length)return b(this[0],a,d)}else{for(e=0;e<this.length;e++)b(this[e],a,d);return this}return b.$dv}});n({removeData:ub,dealoc:sa,bind:function a(c,d,e){var g=ba(c,"events"),h=ba(c,"handle");g||ba(c,"events",g={});h||ba(c,"handle",h=pc(c,g));n(d.split(" "),function(d){var j=g[d];
121
+ if(!j){if(d=="mouseenter"||d=="mouseleave"){var i=0;g.mouseenter=[];g.mouseleave=[];a(c,"mouseover",function(a){i++;i==1&&h(a,"mouseenter")});a(c,"mouseout",function(a){i--;i==0&&h(a,"mouseleave")})}else $b(c,d,h),g[d]=[];j=g[d]}j.push(e)})},unbind:vb,replaceWith:function(a,c){var d,e=a.parentNode;sa(a);n(new K(c),function(c){d?e.insertBefore(c,d.nextSibling):e.replaceChild(c,a);d=c})},children:function(a){var c=[];n(a.childNodes,function(a){a.nodeType===1&&c.push(a)});return c},contents:function(a){return a.childNodes||
122
+ []},append:function(a,c){n(new K(c),function(c){a.nodeType===1&&a.appendChild(c)})},prepend:function(a,c){if(a.nodeType===1){var d=a.firstChild;n(new K(c),function(c){d?a.insertBefore(c,d):(a.appendChild(c),d=c)})}},wrap:function(a,c){var c=u(c)[0],d=a.parentNode;d&&d.replaceChild(c,a);c.appendChild(a)},remove:function(a){sa(a);var c=a.parentNode;c&&c.removeChild(a)},after:function(a,c){var d=a,e=a.parentNode;n(new K(c),function(a){e.insertBefore(a,d.nextSibling);d=a})},addClass:yb,removeClass:xb,
123
+ toggleClass:function(a,c,d){x(d)&&(d=!Da(a,c));(d?yb:xb)(a,c)},parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},next:function(a){if(a.nextElementSibling)return a.nextElementSibling;for(a=a.nextSibling;a!=null&&a.nodeType!==1;)a=a.nextSibling;return a},find:function(a,c){return a.getElementsByTagName(c)},clone:db,triggerHandler:function(a,c){var d=(ba(a,"events")||{})[c];n(d,function(c){c.call(a,null)})}},function(a,c){K.prototype[c]=function(c,e){for(var g,h=0;h<this.length;h++)g==
124
+ q?(g=a(this[h],c,e),g!==q&&(g=u(g))):cb(g,a(this[h],c,e));return g==q?this:g}});Ga.prototype={put:function(a,c){this[fa(a)]=c},get:function(a){return this[fa(a)]},remove:function(a){var c=this[a=fa(a)];delete this[a];return c}};fb.prototype={push:function(a,c){var d=this[a=fa(a)];d?d.push(c):this[a]=[c]},shift:function(a){var c=this[a=fa(a)];if(c)return c.length==1?(delete this[a],c[0]):c.shift()},peek:function(a){if(a=this[fa(a)])return a[0]}};var rc=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,sc=/,/,tc=
125
+ /^\s*(_?)(\S+?)\1\s*$/,qc=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Eb="Non-assignable model expression: ";Db.$inject=["$provide"];var Ac=/^(x[\:\-_]|data[\:\-_])/i,Hb=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,ac=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,Hc=ac,Ib={http:80,https:443,ftp:21};ib.prototype={$$replace:!1,absUrl:Ia("$$absUrl"),url:function(a,c){if(x(a))return this.$$url;var d=ac.exec(a);d[1]&&this.path(decodeURIComponent(d[1]));if(d[2]||d[1])this.search(d[3]||
126
+ "");this.hash(d[5]||"",c);return this},protocol:Ia("$$protocol"),host:Ia("$$host"),port:Ia("$$port"),path:Kb("$$path",function(a){return a.charAt(0)=="/"?a:"/"+a}),search:function(a,c){if(x(a))return this.$$search;y(c)?c===null?delete this.$$search[a]:this.$$search[a]=c:this.$$search=B(a)?Wa(a):a;this.$$compose();return this},hash:Kb("$$hash",na),replace:function(){this.$$replace=!0;return this}};Ha.prototype=za(ib.prototype);Jb.prototype=za(Ha.prototype);var Ja={"null":function(){return null},"true":function(){return!0},
127
+ "false":function(){return!1},undefined:w,"+":function(a,c,d,e){d=d(a,c);e=e(a,c);return y(d)?y(e)?d+e:d:y(e)?e:q},"-":function(a,c,d,e){d=d(a,c);e=e(a,c);return(y(d)?d:0)-(y(e)?e:0)},"*":function(a,c,d,e){return d(a,c)*e(a,c)},"/":function(a,c,d,e){return d(a,c)/e(a,c)},"%":function(a,c,d,e){return d(a,c)%e(a,c)},"^":function(a,c,d,e){return d(a,c)^e(a,c)},"=":w,"==":function(a,c,d,e){return d(a,c)==e(a,c)},"!=":function(a,c,d,e){return d(a,c)!=e(a,c)},"<":function(a,c,d,e){return d(a,c)<e(a,c)},
128
+ ">":function(a,c,d,e){return d(a,c)>e(a,c)},"<=":function(a,c,d,e){return d(a,c)<=e(a,c)},">=":function(a,c,d,e){return d(a,c)>=e(a,c)},"&&":function(a,c,d,e){return d(a,c)&&e(a,c)},"||":function(a,c,d,e){return d(a,c)||e(a,c)},"&":function(a,c,d,e){return d(a,c)&e(a,c)},"|":function(a,c,d,e){return e(a,c)(a,c,d(a,c))},"!":function(a,c,d){return!d(a,c)}},Lc={n:"\n",f:"\u000c",r:"\r",t:"\t",v:"\u000b","'":"'",'"':'"'},jb={},Yc=N.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(a){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(c){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(d){}throw Error("This browser does not support XMLHttpRequest.");
129
+ };Rb.$inject=["$provide"];Sb.$inject=["$locale"];Ub.$inject=["$locale"];var Xb=".",hd={yyyy:M("FullYear",4),yy:M("FullYear",2,0,!0),y:M("FullYear",1),MMMM:Ka("Month"),MMM:Ka("Month",!0),MM:M("Month",2,1),M:M("Month",1,1),dd:M("Date",2),d:M("Date",1),HH:M("Hours",2),H:M("Hours",1),hh:M("Hours",2,-12),h:M("Hours",1,-12),mm:M("Minutes",2),m:M("Minutes",1),ss:M("Seconds",2),s:M("Seconds",1),EEEE:Ka("Day"),EEE:Ka("Day",!0),a:function(a,c){return a.getHours()<12?c.AMPMS[0]:c.AMPMS[1]},Z:function(a){var a=
130
+ -1*a.getTimezoneOffset(),c=a>=0?"+":"";c+=kb(Math[a>0?"floor":"ceil"](a/60),2)+kb(Math.abs(a%60),2);return c}},gd=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,fd=/^\d+$/;Tb.$inject=["$locale"];var dd=I(A),ed=I(ma);Vb.$inject=["$parse"];var jd=I({restrict:"E",compile:function(a,c){Z<=8&&(!c.href&&!c.name&&c.$set("href",""),a.append(Y.createComment("IE fix")));return function(a,c){c.bind("click",function(a){c.attr("href")||a.preventDefault()})}}}),mb={};n(Fa,function(a,
131
+ c){var d=ea("ng-"+c);mb[d]=function(){return{priority:100,compile:function(){return function(a,g,h){a.$watch(h[d],function(a){h.$set(c,!!a)})}}}}});n(["src","href"],function(a){var c=ea("ng-"+a);mb[c]=function(){return{priority:99,link:function(d,e,g){g.$observe(c,function(c){c&&(g.$set(a,c),Z&&e.prop(a,g[a]))})}}}});var Na={$addControl:w,$removeControl:w,$setValidity:w,$setDirty:w};Yb.$inject=["$element","$attrs","$scope"];var Qa=function(a){return["$timeout",function(c){var d={name:"form",restrict:"E",
132
+ controller:Yb,compile:function(){return{pre:function(a,d,h,f){if(!h.action){var j=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};$b(d[0],"submit",j);d.bind("$destroy",function(){c(function(){eb(d[0],"submit",j)},0,!1)})}var i=d.parent().controller("form"),k=h.name||h.ngForm;k&&(a[k]=f);i&&d.bind("$destroy",function(){i.$removeControl(f);k&&(a[k]=q);v(f,Na)})}}}};return a?v(V(d),{restrict:"EAC"}):d}]},kd=Qa(),ld=Qa(!0),md=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,
133
+ nd=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,od=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,bc={text:Pa,number:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);e.$parsers.push(function(a){var c=U(a);return c||od.test(a)?(e.$setValidity("number",!0),a===""?null:c?a:parseFloat(a)):(e.$setValidity("number",!1),q)});e.$formatters.push(function(a){return U(a)?"":""+a});if(d.min){var f=parseFloat(d.min),a=function(a){return!U(a)&&a<f?(e.$setValidity("min",!1),q):(e.$setValidity("min",!0),a)};e.$parsers.push(a);
134
+ e.$formatters.push(a)}if(d.max){var j=parseFloat(d.max),d=function(a){return!U(a)&&a>j?(e.$setValidity("max",!1),q):(e.$setValidity("max",!0),a)};e.$parsers.push(d);e.$formatters.push(d)}e.$formatters.push(function(a){return U(a)||Ra(a)?(e.$setValidity("number",!0),a):(e.$setValidity("number",!1),q)})},url:function(a,c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return U(a)||md.test(a)?(e.$setValidity("url",!0),a):(e.$setValidity("url",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},email:function(a,
135
+ c,d,e,g,h){Pa(a,c,d,e,g,h);a=function(a){return U(a)||nd.test(a)?(e.$setValidity("email",!0),a):(e.$setValidity("email",!1),q)};e.$formatters.push(a);e.$parsers.push(a)},radio:function(a,c,d,e){x(d.name)&&c.attr("name",ya());c.bind("click",function(){c[0].checked&&a.$apply(function(){e.$setViewValue(d.value)})});e.$render=function(){c[0].checked=d.value==e.$viewValue};d.$observe("value",e.$render)},checkbox:function(a,c,d,e){var g=d.ngTrueValue,h=d.ngFalseValue;B(g)||(g=!0);B(h)||(h=!1);c.bind("click",
136
+ function(){a.$apply(function(){e.$setViewValue(c[0].checked)})});e.$render=function(){c[0].checked=e.$viewValue};e.$formatters.push(function(a){return a===g});e.$parsers.push(function(a){return a?g:h})},hidden:w,button:w,submit:w,reset:w},cc=["$browser","$sniffer",function(a,c){return{restrict:"E",require:"?ngModel",link:function(d,e,g,h){h&&(bc[A(g.type)]||bc.text)(d,e,g,h,c,a)}}}],Ma="ng-valid",La="ng-invalid",Oa="ng-pristine",Zb="ng-dirty",pd=["$scope","$exceptionHandler","$attrs","$element","$parse",
137
+ function(a,c,d,e,g){function h(a,c){c=c?"-"+$a(c,"-"):"";e.removeClass((a?La:Ma)+c).addClass((a?Ma:La)+c)}this.$modelValue=this.$viewValue=Number.NaN;this.$parsers=[];this.$formatters=[];this.$viewChangeListeners=[];this.$pristine=!0;this.$dirty=!1;this.$valid=!0;this.$invalid=!1;this.$name=d.name;var f=g(d.ngModel),j=f.assign;if(!j)throw Error(Eb+d.ngModel+" ("+qa(e)+")");this.$render=w;var i=e.inheritedData("$formController")||Na,k=0,m=this.$error={};e.addClass(Oa);h(!0);this.$setValidity=function(a,
138
+ c){if(m[a]!==!c){if(c){if(m[a]&&k--,!k)h(!0),this.$valid=!0,this.$invalid=!1}else h(!1),this.$invalid=!0,this.$valid=!1,k++;m[a]=!c;h(c,a);i.$setValidity(a,c,this)}};this.$setViewValue=function(d){this.$viewValue=d;if(this.$pristine)this.$dirty=!0,this.$pristine=!1,e.removeClass(Oa).addClass(Zb),i.$setDirty();n(this.$parsers,function(a){d=a(d)});if(this.$modelValue!==d)this.$modelValue=d,j(a,d),n(this.$viewChangeListeners,function(a){try{a()}catch(d){c(d)}})};var l=this;a.$watch(function(){var c=
139
+ f(a);if(l.$modelValue!==c){var d=l.$formatters,e=d.length;for(l.$modelValue=c;e--;)c=d[e](c);if(l.$viewValue!==c)l.$viewValue=c,l.$render()}})}],qd=function(){return{require:["ngModel","^?form"],controller:pd,link:function(a,c,d,e){var g=e[0],h=e[1]||Na;h.$addControl(g);c.bind("$destroy",function(){h.$removeControl(g)})}}},rd=I({require:"ngModel",link:function(a,c,d,e){e.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),dc=function(){return{require:"?ngModel",link:function(a,c,d,e){if(e){d.required=
140
+ !0;var g=function(a){if(d.required&&(U(a)||a===!1))e.$setValidity("required",!1);else return e.$setValidity("required",!0),a};e.$formatters.push(g);e.$parsers.unshift(g);d.$observe("required",function(){g(e.$viewValue)})}}}},sd=function(){return{require:"ngModel",link:function(a,c,d,e){var g=(a=/\/(.*)\//.exec(d.ngList))&&RegExp(a[1])||d.ngList||",";e.$parsers.push(function(a){var c=[];a&&n(a.split(g),function(a){a&&c.push(O(a))});return c});e.$formatters.push(function(a){return E(a)?a.join(", "):
141
+ q})}}},td=/^(true|false|\d+)$/,ud=function(){return{priority:100,compile:function(a,c){return td.test(c.ngValue)?function(a,c,g){g.$set("value",a.$eval(g.ngValue))}:function(a,c,g){a.$watch(g.ngValue,function(a){g.$set("value",a,!1)})}}}},vd=R(function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBind);a.$watch(d.ngBind,function(a){c.text(a==q?"":a)})}),wd=["$interpolate",function(a){return function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate));d.addClass("ng-binding").data("$binding",c);e.$observe("ngBindTemplate",
142
+ function(a){d.text(a)})}}],xd=[function(){return function(a,c,d){c.addClass("ng-binding").data("$binding",d.ngBindHtmlUnsafe);a.$watch(d.ngBindHtmlUnsafe,function(a){c.html(a||"")})}}],yd=lb("",!0),zd=lb("Odd",0),Ad=lb("Even",1),Bd=R({compile:function(a,c){c.$set("ngCloak",q);a.removeClass("ng-cloak")}}),Cd=[function(){return{scope:!0,controller:"@"}}],Dd=["$sniffer",function(a){return{priority:1E3,compile:function(){a.csp=!0}}}],ec={};n("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),
143
+ function(a){var c=ea("ng-"+a);ec[c]=["$parse",function(d){return function(e,g,h){var f=d(h[c]);g.bind(A(a),function(a){e.$apply(function(){f(e,{$event:a})})})}}]});var Ed=R(function(a,c,d){c.bind("submit",function(){a.$apply(d.ngSubmit)})}),Fd=["$http","$templateCache","$anchorScroll","$compile",function(a,c,d,e){return{restrict:"ECA",terminal:!0,compile:function(g,h){var f=h.ngInclude||h.src,j=h.onload||"",i=h.autoscroll;return function(g,h){var l=0,n,o=function(){n&&(n.$destroy(),n=null);h.html("")};
144
+ g.$watch(f,function(f){var s=++l;f?a.get(f,{cache:c}).success(function(a){s===l&&(n&&n.$destroy(),n=g.$new(),h.html(a),e(h.contents())(n),y(i)&&(!i||g.$eval(i))&&d(),n.$emit("$includeContentLoaded"),g.$eval(j))}).error(function(){s===l&&o()}):o()})}}}}],Gd=R({compile:function(){return{pre:function(a,c,d){a.$eval(d.ngInit)}}}}),Hd=R({terminal:!0,priority:1E3}),Id=["$locale","$interpolate",function(a,c){var d=/{}/g;return{restrict:"EA",link:function(e,g,h){var f=h.count,j=g.attr(h.$attr.when),i=h.offset||
145
+ 0,k=e.$eval(j),m={},l=c.startSymbol(),t=c.endSymbol();n(k,function(a,e){m[e]=c(a.replace(d,l+f+"-"+i+t))});e.$watch(function(){var c=parseFloat(e.$eval(f));return isNaN(c)?"":(k[c]||(c=a.pluralCat(c-i)),m[c](e,g,!0))},function(a){g.text(a)})}}}],Jd=R({transclude:"element",priority:1E3,terminal:!0,compile:function(a,c,d){return function(a,c,h){var f=h.ngRepeat,h=f.match(/^\s*(.+)\s+in\s+(.*)\s*$/),j,i,k;if(!h)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+f+"'.");f=h[1];
146
+ j=h[2];h=f.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!h)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+f+"'.");i=h[3]||h[1];k=h[2];var m=new fb;a.$watch(function(a){var e,f,h=a.$eval(j),n=c,q=new fb,y,z,u,x,r,v;if(E(h))r=h||[];else{r=[];for(u in h)h.hasOwnProperty(u)&&u.charAt(0)!="$"&&r.push(u);r.sort()}y=r.length-1;e=0;for(f=r.length;e<f;e++){u=h===r?e:r[e];x=h[u];if(v=m.shift(x)){z=v.scope;q.push(x,v);if(e!==v.index)v.index=e,n.after(v.element);
147
+ n=v.element}else z=a.$new();z[i]=x;k&&(z[k]=u);z.$index=e;z.$first=e===0;z.$last=e===y;z.$middle=!(z.$first||z.$last);v||d(z,function(a){n.after(a);v={scope:z,element:n=a,index:e};q.push(x,v)})}for(u in m)if(m.hasOwnProperty(u))for(r=m[u];r.length;)x=r.pop(),x.element.remove(),x.scope.$destroy();m=q})}}}),Kd=R(function(a,c,d){a.$watch(d.ngShow,function(a){c.css("display",Va(a)?"":"none")})}),Ld=R(function(a,c,d){a.$watch(d.ngHide,function(a){c.css("display",Va(a)?"none":"")})}),Md=R(function(a,c,
148
+ d){a.$watch(d.ngStyle,function(a,d){d&&a!==d&&n(d,function(a,d){c.css(d,"")});a&&c.css(a)},!0)}),Nd=I({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(a,c,d,e){var g,h,f;a.$watch(d.ngSwitch||d.on,function(j){h&&(f.$destroy(),h.remove(),h=f=null);if(g=e.cases["!"+j]||e.cases["?"])a.$eval(d.change),f=a.$new(),g(f,function(a){h=a;c.append(a)})})}}),Od=R({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,g,h,
149
+ f){f.cases["!"+c.ngSwitchWhen]=d}}}),Pd=R({transclude:"element",priority:500,require:"^ngSwitch",compile:function(a,c,d){return function(a,c,h,f){f.cases["?"]=d}}}),Qd=R({controller:["$transclude","$element",function(a,c){a(function(a){c.append(a)})}]}),Rd=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(a,c,d,e,g,h){return{restrict:"ECA",terminal:!0,link:function(a,c,i){function k(){var i=d.current&&d.current.locals,k=i&&i.$template;if(k){c.html(k);m&&(m.$destroy(),
150
+ m=null);var k=g(c.contents()),n=d.current;m=n.scope=a.$new();if(n.controller)i.$scope=m,i=h(n.controller,i),c.children().data("$ngControllerController",i);k(m);m.$emit("$viewContentLoaded");m.$eval(l);e()}else c.html(""),m&&(m.$destroy(),m=null)}var m,l=i.onload||"";a.$on("$routeChangeSuccess",k);k()}}}],Sd=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(c,d){d.type=="text/ng-template"&&a.put(d.id,c[0].text)}}}],Td=I({terminal:!0}),Ud=["$compile","$parse",function(a,
151
+ c){var d=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,e={$setViewValue:w};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,c,d){var j=this,i={},k=e,m;j.databound=d.ngModel;j.init=function(a,c,d){k=a;m=d};j.addOption=function(c){i[c]=!0;k.$viewValue==c&&(a.val(c),m.parent()&&m.remove())};j.removeOption=function(a){this.hasOption(a)&&(delete i[a],
152
+ k.$viewValue==a&&this.renderUnknownOption(a))};j.renderUnknownOption=function(c){c="? "+fa(c)+" ?";m.val(c);a.prepend(m);a.val(c);m.prop("selected",!0)};j.hasOption=function(a){return i.hasOwnProperty(a)};c.$on("$destroy",function(){j.renderUnknownOption=w})}],link:function(e,h,f,j){function i(a,c,d,e){d.$render=function(){var a=d.$viewValue;e.hasOption(a)?(w.parent()&&w.remove(),c.val(a),a===""&&v.prop("selected",!0)):x(a)&&v?c.val(""):e.renderUnknownOption(a)};c.bind("change",function(){a.$apply(function(){w.parent()&&
153
+ w.remove();d.$setViewValue(c.val())})})}function k(a,c,d){var e;d.$render=function(){var a=new Ga(d.$viewValue);n(c.find("option"),function(c){c.selected=y(a.get(c.value))})};a.$watch(function(){ga(e,d.$viewValue)||(e=V(d.$viewValue),d.$render())});c.bind("change",function(){a.$apply(function(){var a=[];n(c.find("option"),function(c){c.selected&&a.push(c.value)});d.$setViewValue(a)})})}function m(e,f,g){function h(){var a={"":[]},c=[""],d,i,p,u,v;p=g.$modelValue;u=t(e)||[];var x=l?nb(u):u,y,w,A;w=
154
+ {};v=!1;var B,E;if(o)v=new Ga(p);else if(p===null||s)a[""].push({selected:p===null,id:"",label:""}),v=!0;for(A=0;y=x.length,A<y;A++){w[k]=u[l?w[l]=x[A]:A];d=m(e,w)||"";if(!(i=a[d]))i=a[d]=[],c.push(d);o?d=v.remove(n(e,w))!=q:(d=p===n(e,w),v=v||d);B=j(e,w);B=B===q?"":B;i.push({id:l?x[A]:A,label:B,selected:d})}!o&&!v&&a[""].unshift({id:"?",label:"",selected:!0});w=0;for(x=c.length;w<x;w++){d=c[w];i=a[d];if(r.length<=w)p={element:z.clone().attr("label",d),label:i.label},u=[p],r.push(u),f.append(p.element);
155
+ else if(u=r[w],p=u[0],p.label!=d)p.element.attr("label",p.label=d);B=null;A=0;for(y=i.length;A<y;A++)if(d=i[A],v=u[A+1]){B=v.element;if(v.label!==d.label)B.text(v.label=d.label);if(v.id!==d.id)B.val(v.id=d.id);if(v.element.selected!==d.selected)B.prop("selected",v.selected=d.selected)}else d.id===""&&s?E=s:(E=C.clone()).val(d.id).attr("selected",d.selected).text(d.label),u.push({element:E,label:d.label,id:d.id,selected:d.selected}),B?B.after(E):p.element.append(E),B=E;for(A++;u.length>A;)u.pop().element.remove()}for(;r.length>
156
+ w;)r.pop()[0].element.remove()}var i;if(!(i=p.match(d)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+p+"'.");var j=c(i[2]||i[1]),k=i[4]||i[6],l=i[5],m=c(i[3]||""),n=c(i[2]?i[1]:k),t=c(i[7]),r=[[{element:f,label:""}]];s&&(a(s)(e),s.removeClass("ng-scope"),s.remove());f.html("");f.bind("change",function(){e.$apply(function(){var a,c=t(e)||[],d={},h,i,j,m,p,s;if(o){i=[];m=0;for(s=r.length;m<s;m++){a=r[m];j=1;for(p=a.length;j<p;j++)if((h=
157
+ a[j].element)[0].selected)h=h.val(),l&&(d[l]=h),d[k]=c[h],i.push(n(e,d))}}else h=f.val(),h=="?"?i=q:h==""?i=null:(d[k]=c[h],l&&(d[l]=h),i=n(e,d));g.$setViewValue(i)})});g.$render=h;e.$watch(h)}if(j[1]){for(var l=j[0],t=j[1],o=f.multiple,p=f.ngOptions,s=!1,v,C=u(Y.createElement("option")),z=u(Y.createElement("optgroup")),w=C.clone(),j=0,A=h.children(),r=A.length;j<r;j++)if(A[j].value==""){v=s=A.eq(j);break}l.init(t,s,w);if(o&&(f.required||f.ngRequired)){var B=function(a){t.$setValidity("required",
158
+ !f.required||a&&a.length);return a};t.$parsers.push(B);t.$formatters.unshift(B);f.$observe("required",function(){B(t.$viewValue)})}p?m(e,h,t):o?k(e,h,t):i(e,h,t,l)}}}}],Vd=["$interpolate",function(a){var c={addOption:w,removeOption:w};return{restrict:"E",priority:100,compile:function(d,e){if(x(e.value)){var g=a(d.text(),!0);g||e.$set("value",d.text())}return function(a,d,e){var i=d.parent(),k=i.data("$selectController")||i.parent().data("$selectController");k&&k.databound?d.prop("selected",!1):k=
159
+ c;g?a.$watch(g,function(a,c){e.$set("value",a);a!==c&&k.removeOption(c);k.addOption(a)}):k.addOption(e.value);d.bind("$destroy",function(){k.removeOption(e.value)})}}}}],Wd=I({restrict:"E",terminal:!0});(ca=N.jQuery)?(u=ca,v(ca.fn,{scope:va.scope,controller:va.controller,injector:va.injector,inheritedData:va.inheritedData}),bb("remove",!0),bb("empty"),bb("html")):u=K;Za.element=u;(function(a){v(a,{bootstrap:rb,copy:V,extend:v,equals:ga,element:u,forEach:n,injector:sb,noop:w,bind:Ua,toJson:da,fromJson:pb,
160
+ identity:na,isUndefined:x,isDefined:y,isString:B,isFunction:H,isObject:L,isNumber:Ra,isElement:gc,isArray:E,version:id,isDate:oa,lowercase:A,uppercase:ma,callbacks:{counter:0}});ta=lc(N);try{ta("ngLocale")}catch(c){ta("ngLocale",[]).provider("$locale",Zc)}ta("ng",["ngLocale"],["$provide",function(a){a.provider("$compile",Db).directive({a:jd,input:cc,textarea:cc,form:kd,script:Sd,select:Ud,style:Wd,option:Vd,ngBind:vd,ngBindHtmlUnsafe:xd,ngBindTemplate:wd,ngClass:yd,ngClassEven:Ad,ngClassOdd:zd,ngCsp:Dd,
161
+ ngCloak:Bd,ngController:Cd,ngForm:ld,ngHide:Ld,ngInclude:Fd,ngInit:Gd,ngNonBindable:Hd,ngPluralize:Id,ngRepeat:Jd,ngShow:Kd,ngSubmit:Ed,ngStyle:Md,ngSwitch:Nd,ngSwitchWhen:Od,ngSwitchDefault:Pd,ngOptions:Td,ngView:Rd,ngTransclude:Qd,ngModel:qd,ngList:sd,ngChange:rd,required:dc,ngRequired:dc,ngValue:ud}).directive(mb).directive(ec);a.provider({$anchorScroll:uc,$browser:wc,$cacheFactory:xc,$controller:Bc,$document:Cc,$exceptionHandler:Dc,$filter:Rb,$interpolate:Ec,$http:Vc,$httpBackend:Wc,$location:Ic,
162
+ $log:Jc,$parse:Nc,$route:Qc,$routeParams:Rc,$rootScope:Sc,$q:Oc,$sniffer:Tc,$templateCache:yc,$timeout:$c,$window:Uc})}])})(Za);u(Y).ready(function(){jc(Y,rb)})})(window,document);angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>');
apps/requirejs/almond.js ADDED
@@ -0,0 +1,405 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
3
+ * Available via the MIT or new BSD license.
4
+ * see: http://github.com/jrburke/almond for details
5
+ */
6
+ //Going sloppy to avoid 'use strict' string cost, but strict practices should
7
+ //be followed.
8
+ /*jslint sloppy: true */
9
+ /*global setTimeout: false */
10
+
11
+ var requirejs, require, define;
12
+ (function (undef) {
13
+ var main, req, makeMap, handlers,
14
+ defined = {},
15
+ waiting = {},
16
+ config = {},
17
+ defining = {},
18
+ hasOwn = Object.prototype.hasOwnProperty,
19
+ aps = [].slice;
20
+
21
+ function hasProp(obj, prop) {
22
+ return hasOwn.call(obj, prop);
23
+ }
24
+
25
+ /**
26
+ * Given a relative module name, like ./something, normalize it to
27
+ * a real name that can be mapped to a path.
28
+ * @param {String} name the relative name
29
+ * @param {String} baseName a real name that the name arg is relative
30
+ * to.
31
+ * @returns {String} normalized name
32
+ */
33
+ function normalize(name, baseName) {
34
+ var nameParts, nameSegment, mapValue, foundMap,
35
+ foundI, foundStarMap, starI, i, j, part,
36
+ baseParts = baseName && baseName.split("/"),
37
+ map = config.map,
38
+ starMap = (map && map['*']) || {};
39
+
40
+ //Adjust any relative paths.
41
+ if (name && name.charAt(0) === ".") {
42
+ //If have a base name, try to normalize against it,
43
+ //otherwise, assume it is a top-level require that will
44
+ //be relative to baseUrl in the end.
45
+ if (baseName) {
46
+ //Convert baseName to array, and lop off the last part,
47
+ //so that . matches that "directory" and not name of the baseName's
48
+ //module. For instance, baseName of "one/two/three", maps to
49
+ //"one/two/three.js", but we want the directory, "one/two" for
50
+ //this normalization.
51
+ baseParts = baseParts.slice(0, baseParts.length - 1);
52
+
53
+ name = baseParts.concat(name.split("/"));
54
+
55
+ //start trimDots
56
+ for (i = 0; i < name.length; i += 1) {
57
+ part = name[i];
58
+ if (part === ".") {
59
+ name.splice(i, 1);
60
+ i -= 1;
61
+ } else if (part === "..") {
62
+ if (i === 1 && (name[2] === '..' || name[0] === '..')) {
63
+ //End of the line. Keep at least one non-dot
64
+ //path segment at the front so it can be mapped
65
+ //correctly to disk. Otherwise, there is likely
66
+ //no path mapping for a path starting with '..'.
67
+ //This can still fail, but catches the most reasonable
68
+ //uses of ..
69
+ break;
70
+ } else if (i > 0) {
71
+ name.splice(i - 1, 2);
72
+ i -= 2;
73
+ }
74
+ }
75
+ }
76
+ //end trimDots
77
+
78
+ name = name.join("/");
79
+ } else if (name.indexOf('./') === 0) {
80
+ // No baseName, so this is ID is resolved relative
81
+ // to baseUrl, pull off the leading dot.
82
+ name = name.substring(2);
83
+ }
84
+ }
85
+
86
+ //Apply map config if available.
87
+ if ((baseParts || starMap) && map) {
88
+ nameParts = name.split('/');
89
+
90
+ for (i = nameParts.length; i > 0; i -= 1) {
91
+ nameSegment = nameParts.slice(0, i).join("/");
92
+
93
+ if (baseParts) {
94
+ //Find the longest baseName segment match in the config.
95
+ //So, do joins on the biggest to smallest lengths of baseParts.
96
+ for (j = baseParts.length; j > 0; j -= 1) {
97
+ mapValue = map[baseParts.slice(0, j).join('/')];
98
+
99
+ //baseName segment has config, find if it has one for
100
+ //this name.
101
+ if (mapValue) {
102
+ mapValue = mapValue[nameSegment];
103
+ if (mapValue) {
104
+ //Match, update name to the new value.
105
+ foundMap = mapValue;
106
+ foundI = i;
107
+ break;
108
+ }
109
+ }
110
+ }
111
+ }
112
+
113
+ if (foundMap) {
114
+ break;
115
+ }
116
+
117
+ //Check for a star map match, but just hold on to it,
118
+ //if there is a shorter segment match later in a matching
119
+ //config, then favor over this star map.
120
+ if (!foundStarMap && starMap && starMap[nameSegment]) {
121
+ foundStarMap = starMap[nameSegment];
122
+ starI = i;
123
+ }
124
+ }
125
+
126
+ if (!foundMap && foundStarMap) {
127
+ foundMap = foundStarMap;
128
+ foundI = starI;
129
+ }
130
+
131
+ if (foundMap) {
132
+ nameParts.splice(0, foundI, foundMap);
133
+ name = nameParts.join('/');
134
+ }
135
+ }
136
+
137
+ return name;
138
+ }
139
+
140
+ function makeRequire(relName, forceSync) {
141
+ return function () {
142
+ //A version of a require function that passes a moduleName
143
+ //value for items that may need to
144
+ //look up paths relative to the moduleName
145
+ return req.apply(undef, aps.call(arguments, 0).concat([relName, forceSync]));
146
+ };
147
+ }
148
+
149
+ function makeNormalize(relName) {
150
+ return function (name) {
151
+ return normalize(name, relName);
152
+ };
153
+ }
154
+
155
+ function makeLoad(depName) {
156
+ return function (value) {
157
+ defined[depName] = value;
158
+ };
159
+ }
160
+
161
+ function callDep(name) {
162
+ if (hasProp(waiting, name)) {
163
+ var args = waiting[name];
164
+ delete waiting[name];
165
+ defining[name] = true;
166
+ main.apply(undef, args);
167
+ }
168
+
169
+ if (!hasProp(defined, name) && !hasProp(defining, name)) {
170
+ throw new Error('No ' + name);
171
+ }
172
+ return defined[name];
173
+ }
174
+
175
+ //Turns a plugin!resource to [plugin, resource]
176
+ //with the plugin being undefined if the name
177
+ //did not have a plugin prefix.
178
+ function splitPrefix(name) {
179
+ var prefix,
180
+ index = name ? name.indexOf('!') : -1;
181
+ if (index > -1) {
182
+ prefix = name.substring(0, index);
183
+ name = name.substring(index + 1, name.length);
184
+ }
185
+ return [prefix, name];
186
+ }
187
+
188
+ /**
189
+ * Makes a name map, normalizing the name, and using a plugin
190
+ * for normalization if necessary. Grabs a ref to plugin
191
+ * too, as an optimization.
192
+ */
193
+ makeMap = function (name, relName) {
194
+ var plugin,
195
+ parts = splitPrefix(name),
196
+ prefix = parts[0];
197
+
198
+ name = parts[1];
199
+
200
+ if (prefix) {
201
+ prefix = normalize(prefix, relName);
202
+ plugin = callDep(prefix);
203
+ }
204
+
205
+ //Normalize according
206
+ if (prefix) {
207
+ if (plugin && plugin.normalize) {
208
+ name = plugin.normalize(name, makeNormalize(relName));
209
+ } else {
210
+ name = normalize(name, relName);
211
+ }
212
+ } else {
213
+ name = normalize(name, relName);
214
+ parts = splitPrefix(name);
215
+ prefix = parts[0];
216
+ name = parts[1];
217
+ if (prefix) {
218
+ plugin = callDep(prefix);
219
+ }
220
+ }
221
+
222
+ //Using ridiculous property names for space reasons
223
+ return {
224
+ f: prefix ? prefix + '!' + name : name, //fullName
225
+ n: name,
226
+ pr: prefix,
227
+ p: plugin
228
+ };
229
+ };
230
+
231
+ function makeConfig(name) {
232
+ return function () {
233
+ return (config && config.config && config.config[name]) || {};
234
+ };
235
+ }
236
+
237
+ handlers = {
238
+ require: function (name) {
239
+ return makeRequire(name);
240
+ },
241
+ exports: function (name) {
242
+ var e = defined[name];
243
+ if (typeof e !== 'undefined') {
244
+ return e;
245
+ } else {
246
+ return (defined[name] = {});
247
+ }
248
+ },
249
+ module: function (name) {
250
+ return {
251
+ id: name,
252
+ uri: '',
253
+ exports: defined[name],
254
+ config: makeConfig(name)
255
+ };
256
+ }
257
+ };
258
+
259
+ main = function (name, deps, callback, relName) {
260
+ var cjsModule, depName, ret, map, i,
261
+ args = [],
262
+ usingExports;
263
+
264
+ //Use name if no relName
265
+ relName = relName || name;
266
+
267
+ //Call the callback to define the module, if necessary.
268
+ if (typeof callback === 'function') {
269
+
270
+ //Pull out the defined dependencies and pass the ordered
271
+ //values to the callback.
272
+ //Default to [require, exports, module] if no deps
273
+ deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;
274
+ for (i = 0; i < deps.length; i += 1) {
275
+ map = makeMap(deps[i], relName);
276
+ depName = map.f;
277
+
278
+ //Fast path CommonJS standard dependencies.
279
+ if (depName === "require") {
280
+ args[i] = handlers.require(name);
281
+ } else if (depName === "exports") {
282
+ //CommonJS module spec 1.1
283
+ args[i] = handlers.exports(name);
284
+ usingExports = true;
285
+ } else if (depName === "module") {
286
+ //CommonJS module spec 1.1
287
+ cjsModule = args[i] = handlers.module(name);
288
+ } else if (hasProp(defined, depName) ||
289
+ hasProp(waiting, depName) ||
290
+ hasProp(defining, depName)) {
291
+ args[i] = callDep(depName);
292
+ } else if (map.p) {
293
+ map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});
294
+ args[i] = defined[depName];
295
+ } else {
296
+ throw new Error(name + ' missing ' + depName);
297
+ }
298
+ }
299
+
300
+ ret = callback.apply(defined[name], args);
301
+
302
+ if (name) {
303
+ //If setting exports via "module" is in play,
304
+ //favor that over return value and exports. After that,
305
+ //favor a non-undefined return value over exports use.
306
+ if (cjsModule && cjsModule.exports !== undef &&
307
+ cjsModule.exports !== defined[name]) {
308
+ defined[name] = cjsModule.exports;
309
+ } else if (ret !== undef || !usingExports) {
310
+ //Use the return value from the function.
311
+ defined[name] = ret;
312
+ }
313
+ }
314
+ } else if (name) {
315
+ //May just be an object definition for the module. Only
316
+ //worry about defining if have a module name.
317
+ defined[name] = callback;
318
+ }
319
+ };
320
+
321
+ requirejs = require = req = function (deps, callback, relName, forceSync, alt) {
322
+ if (typeof deps === "string") {
323
+ if (handlers[deps]) {
324
+ //callback in this case is really relName
325
+ return handlers[deps](callback);
326
+ }
327
+ //Just return the module wanted. In this scenario, the
328
+ //deps arg is the module name, and second arg (if passed)
329
+ //is just the relName.
330
+ //Normalize module name, if it contains . or ..
331
+ return callDep(makeMap(deps, callback).f);
332
+ } else if (!deps.splice) {
333
+ //deps is a config object, not an array.
334
+ config = deps;
335
+ if (callback.splice) {
336
+ //callback is an array, which means it is a dependency list.
337
+ //Adjust args if there are dependencies
338
+ deps = callback;
339
+ callback = relName;
340
+ relName = null;
341
+ } else {
342
+ deps = undef;
343
+ }
344
+ }
345
+
346
+ //Support require(['a'])
347
+ callback = callback || function () {};
348
+
349
+ //If relName is a function, it is an errback handler,
350
+ //so remove it.
351
+ if (typeof relName === 'function') {
352
+ relName = forceSync;
353
+ forceSync = alt;
354
+ }
355
+
356
+ //Simulate async callback;
357
+ if (forceSync) {
358
+ main(undef, deps, callback, relName);
359
+ } else {
360
+ //Using a non-zero value because of concern for what old browsers
361
+ //do, and latest browsers "upgrade" to 4 if lower value is used:
362
+ //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:
363
+ //If want a value immediately, use require('id') instead -- something
364
+ //that works in almond on the global level, but not guaranteed and
365
+ //unlikely to work in other AMD implementations.
366
+ setTimeout(function () {
367
+ main(undef, deps, callback, relName);
368
+ }, 4);
369
+ }
370
+
371
+ return req;
372
+ };
373
+
374
+ /**
375
+ * Just drops the config on the floor, but returns req in case
376
+ * the config return value is used.
377
+ */
378
+ req.config = function (cfg) {
379
+ config = cfg;
380
+ if (config.deps) {
381
+ req(config.deps, config.callback);
382
+ }
383
+ return req;
384
+ };
385
+
386
+ define = function (name, deps, callback) {
387
+
388
+ //This module may not have dependencies
389
+ if (!deps.splice) {
390
+ //deps is not an array, so probably means
391
+ //an object literal or factory function for
392
+ //the value. Adjust args.
393
+ callback = deps;
394
+ deps = [];
395
+ }
396
+
397
+ if (!hasProp(defined, name) && !hasProp(waiting, name)) {
398
+ waiting[name] = [name, deps, callback];
399
+ }
400
+ };
401
+
402
+ define.amd = {
403
+ jQuery: true
404
+ };
405
+ }());
html/pte.php CHANGED
@@ -40,6 +40,7 @@ $options = pte_get_options();
40
  #pte-image { float: left; margin-right: 10px;}
41
  #pte-thumbnail-column {
42
  float: left;
 
43
  width: 400px;
44
  }
45
  #pte-thumbnail-column button {
@@ -175,8 +176,34 @@ $options = pte_get_options();
175
  [ng\:cloak], [ng-cloak], .ng-cloak {
176
  display: none;
177
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  </style>
179
- <div class="wrap ng-cloak" ng-controller="PteCtrl">
180
  <?php screen_icon(); ?>
181
  <h2><?php _e("Post Thumbnail Editor", PTE_DOMAIN);?> &ndash;
182
  <span id="pte-subtitle"><?php _e("crop and resize", PTE_DOMAIN); ?></span>
@@ -245,6 +272,9 @@ $options = pte_get_options();
245
  name="pte-crop-and-save"
246
  id="pte-crop-and-save"/>
247
  </li>
 
 
 
248
  </ul>
249
  </div>
250
  </div>
@@ -321,6 +351,20 @@ $options = pte_get_options();
321
  {{ aspectRatio.thumbnails.toString().replace(",",", ") }}</a></li>
322
  </ul>
323
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
324
  </div>
325
  </div>
326
  <div class="pte-page-switcher" ng-show="page.view" ng-controller="ViewCtrl">
@@ -366,15 +410,28 @@ $options = pte_get_options();
366
  </div>
367
  </div>
368
  </div>
369
- <script src="<?php ep(); ?>apps/requirejs/require.js" data-main="<?php
370
- ep();
371
- $options = pte_get_options();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
372
 
373
- if ( $options['pte_debug'] ){
374
- print "js";
375
- }
376
- else {
377
- print "js-build";
378
- }
379
 
380
- ?>/main"></script>
40
  #pte-image { float: left; margin-right: 10px;}
41
  #pte-thumbnail-column {
42
  float: left;
43
+ position: relative;
44
  width: 400px;
45
  }
46
  #pte-thumbnail-column button {
176
  [ng\:cloak], [ng-cloak], .ng-cloak {
177
  display: none;
178
  }
179
+
180
+ /** For thumbnail review **/
181
+ #pte-remember, #pte-remember-list {
182
+ margin: 0;
183
+ padding: 0;
184
+ z-index: 1000;
185
+ }
186
+ #pte-remember.horizontal {
187
+ width: 100%;
188
+ }
189
+ #pte-remember.vertical {
190
+ position: absolute;
191
+ top: -15px;
192
+ right: -130px;
193
+ /*top: -0px;*/
194
+ }
195
+ #pte-remember.horizontal #pte-remember-list {
196
+ overflow-x: auto;
197
+ width: 100%;
198
+ white-space: nowrap;
199
+ margin-right: -10px;
200
+ }
201
+ #pte-remember.horizontal li { display: inline-block; margin-left: 10px; }
202
+ #pte-remember.horizontal #pte-remember-list li:first-child { margin-left: 0; }
203
+ #pte-remember.horizontal li img { height: 100px; }
204
+ #pte-remember.vertical li img { width: 100px; }
205
  </style>
206
+ <div class="wrap ng-cloak" ng-init="currentThumbnailBarPosition='<?php echo $options['pte_thumbnail_bar'];?>'" ng-controller="PteCtrl">
207
  <?php screen_icon(); ?>
208
  <h2><?php _e("Post Thumbnail Editor", PTE_DOMAIN);?> &ndash;
209
  <span id="pte-subtitle"><?php _e("crop and resize", PTE_DOMAIN); ?></span>
272
  name="pte-crop-and-save"
273
  id="pte-crop-and-save"/>
274
  </li>
275
+ <li>
276
+ <?php _e( "Change the current thumbnails position:" ); ?>&nbsp;<button ng-click="toggleCurrentThumbnailBarPosition()">{{ currentThumbnailBarPosition }}</button>
277
+ </li>
278
  </ul>
279
  </div>
280
  </div>
351
  {{ aspectRatio.thumbnails.toString().replace(",",", ") }}</a></li>
352
  </ul>
353
  </div>
354
+ <div ng-class="currentThumbnailBarPosition" id="pte-remember" ng-show="anySelected()">
355
+ <h4><?php _e( "Current Thumbnails", PTE_DOMAIN ); ?></h4>
356
+ <ul id="pte-remember-list">
357
+ <li ng-repeat="thumbnail in thumbnails | filter:{selected:true}">
358
+ <img ng-src="{{ thumbnail.current.url | randomizeUrl }}"
359
+ ng-show="thumbnail.current"
360
+ alt="{{ thumbnail.name }}"
361
+ title="{{ thumbnail.name }}"/>
362
+ <span title="{{ thumbnail.name }}" class="no-current-image" ng-hide="thumbnail.current">
363
+ <i class="icon-exclamation-sign"></i>
364
+ </span>
365
+ </li>
366
+ </ul>
367
+ </div>
368
  </div>
369
  </div>
370
  <div class="pte-page-switcher" ng-show="page.view" ng-controller="ViewCtrl">
410
  </div>
411
  </div>
412
  </div>
413
+ <?php
414
+
415
+ function evaluate_attributes( $array ) {
416
+ foreach ( $array as $key => $value ) {
417
+ $attributes[] = "$key=\"$value\"";
418
+ }
419
+ return $attributes;
420
+ }
421
+
422
+ $script_tag = "<script %s></script>";
423
+ $options = pte_get_options();
424
+ if ( $options['pte_debug'] ) {
425
+ $script_attributes = evaluate_attributes( array(
426
+ 'src' => PTE_PLUGINURL . "apps/requirejs/require.js",
427
+ 'data-main' => PTE_PLUGINURL . 'js/main'
428
+ ) );
429
+ }
430
+ else {
431
+ $script_attributes = evaluate_attributes( array(
432
+ 'src' => PTE_PLUGINURL . "js-build/main.js"
433
+ ) );
434
+ }
435
 
 
 
 
 
 
 
436
 
437
+ echo sprintf( $script_tag, join( $script_attributes, " " ) );
html/test.php DELETED
@@ -1,63 +0,0 @@
1
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2
- "http://www.w3.org/TR/html4/loose.dtd">
3
- <html>
4
- <head>
5
- <title>QUnit Tests</title>
6
- <script src="http://code.jquery.com/jquery-latest.js"></script>
7
- <link rel="stylesheet" href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" media="screen" />
8
- <script type="text/javascript" src="http://code.jquery.com/qunit/git/qunit.js"></script>
9
-
10
- <script type="text/javascript">
11
- //set jquery to no conflict, so we do not have a problem with the version from in the page
12
- var $$ = jQuery.noConflict(true);
13
- var $ = jQuery = null; //we will be using the normal jquery vars soon enough
14
-
15
- </script>
16
-
17
- <script type="text/javascript" src="<?php echo( PTE_PLUGINURL . "js/stage2.js" ); ?>"></script>
18
- <script type="text/javascript" src="<?php echo( PTE_PLUGINURL . "js/stage1.js" ); ?>"></script>
19
-
20
-
21
- </head>
22
- <body>
23
- <h1 id="qunit-header">QUnit Tests</h1>
24
-
25
- <div style="width: 100%; height: 550px; float: left">
26
- <iframe style="width: 100%; height: 100%;" id="pteFrame"></iframe>
27
- </div>
28
-
29
- <h2 id="qunit-banner"></h2>
30
- <div id="qunit-testrunner-toolbar"></div>
31
- <h2 id="qunit-userAgent"></h2>
32
- <ol id="qunit-tests"></ol>
33
- <div id="qunit-fixture"></div>
34
- </body>
35
- <script>
36
- $$('#pteFrame').load(function(){
37
- udf = function(a){ return a; }();
38
- //grab jQuery from inside the document
39
- $ = jQuery = window.frames[0].jQuery;
40
-
41
- //turn off async so tests will wait for ajax results
42
- //$.ajaxSetup({ async: false });
43
-
44
- //turn off animations so they do not bork tests
45
- //$.fx.off = true;
46
-
47
- //test("a basic test example", function() {
48
- // ok( true, "this test is fine" );
49
- // var value = "hello";
50
- // equal( value, "hello", "We expect value to be hello" );
51
- //});
52
- var pte = window.frames[0].pte;
53
- stageOne(pte);
54
- /* TODO: Regression Going back and forth between stages 1 & 2 */
55
- // Call stage2
56
- // Redo tests for stage1 and 2
57
- });
58
-
59
- $$('#pteFrame').attr('src', '<?php echo( $testurl ); ?>');
60
-
61
- </script>
62
-
63
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
i18n/post-thumbnail-editor.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the same license as the Post Thumbnail Editor package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Post Thumbnail Editor 2.0.2-beta\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/post-thumbnail-editor\n"
7
- "POT-Creation-Date: 2013-04-26 19:43:47+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -32,104 +32,112 @@ msgstr ""
32
  msgid "Crop and Save"
33
  msgstr ""
34
 
35
- #: html/pte.php:23 html/pte.php:186
36
  msgid "Crop"
37
  msgstr ""
38
 
39
- #. #-#-#-#-# post-thumbnail-editor.pot (Post Thumbnail Editor 2.0.2-beta) #-#-#-#-#
40
  #. Plugin Name of the plugin/theme
41
- #: html/pte.php:181 php/options.php:72 post-thumbnail-editor.php:143
42
- #: post-thumbnail-editor.php:187 post-thumbnail-editor.php:271
43
- #: post-thumbnail-editor.php:272 post-thumbnail-editor.php:278
44
- #: post-thumbnail-editor.php:279 post-thumbnail-editor.php:316
45
  msgid "Post Thumbnail Editor"
46
  msgstr ""
47
 
48
- #: html/pte.php:182
49
  msgid "crop and resize"
50
  msgstr ""
51
 
52
- #: html/pte.php:187
53
  msgid "View"
54
  msgstr ""
55
 
56
- #: html/pte.php:216
57
  msgid "Options"
58
  msgstr ""
59
 
60
- #: html/pte.php:231
61
  msgid "Aspect Ratio"
62
  msgstr ""
63
 
64
- #: html/pte.php:234
65
  msgid "width/height"
66
  msgstr ""
67
 
68
- #: html/pte.php:240
69
  msgid "Crop and save"
70
  msgstr ""
71
 
72
- #: html/pte.php:259 php/options.php:49 post-thumbnail-editor.php:239
 
 
 
 
73
  msgid "Thumbnails"
74
  msgstr ""
75
 
76
- #: html/pte.php:260
77
  msgid "W"
78
  msgstr ""
79
 
80
- #: html/pte.php:261
81
  msgid "H"
82
  msgstr ""
83
 
84
- #: html/pte.php:262
85
  msgid "C"
86
  msgstr ""
87
 
88
- #: html/pte.php:268
89
  msgid "Save all"
90
  msgstr ""
91
 
92
- #: html/pte.php:273
93
  msgid "Reset all"
94
  msgstr ""
95
 
96
- #: html/pte.php:277
97
  msgid "View all/modified"
98
  msgstr ""
99
 
100
- #: html/pte.php:303
101
  msgid "Save"
102
  msgstr ""
103
 
104
- #: html/pte.php:306
105
  msgid "Reset"
106
  msgstr ""
107
 
108
- #: html/pte.php:309
109
  msgid "Compare/View"
110
  msgstr ""
111
 
112
- #: html/pte.php:316
113
  msgid "These thumbnails have an aspect ratio set:"
114
  msgstr ""
115
 
116
- #: html/pte.php:341
 
 
 
 
117
  msgid "Original"
118
  msgstr ""
119
 
120
- #: html/pte.php:348
121
  msgid "No image has been generated yet for image: "
122
  msgstr ""
123
 
124
- #: html/pte.php:355
125
  msgid "Proposed"
126
  msgstr ""
127
 
128
- #: php/functions.php:244
129
  msgid "Invalid meta data for POST #%d: %s"
130
  msgstr ""
131
 
132
- #: php/functions.php:249
133
  msgid "Please contact support"
134
  msgstr ""
135
 
@@ -243,12 +251,15 @@ msgstr ""
243
  msgid "These site-wide settings can only be changed by an administrator"
244
  msgstr ""
245
 
246
- #: post-thumbnail-editor.php:238
247
  msgid "Edit Thumbnails"
248
  msgstr ""
249
 
 
250
  #. Plugin URI of the plugin/theme
251
- msgid "http://wordpress.org/extend/plugins/post-thumbnail-editor/"
 
 
252
  msgstr ""
253
 
254
  #. Description of the plugin/theme
@@ -258,7 +269,3 @@ msgstr ""
258
  #. Author of the plugin/theme
259
  msgid "sewpafly"
260
  msgstr ""
261
-
262
- #. Author URI of the plugin/theme
263
- msgid "http://sewpafly.github.io/post-thumbnail-editor"
264
- msgstr ""
2
  # This file is distributed under the same license as the Post Thumbnail Editor package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Post Thumbnail Editor 2.2.0\n"
6
  "Report-Msgid-Bugs-To: http://wordpress.org/tag/post-thumbnail-editor\n"
7
+ "POT-Creation-Date: 2013-06-07 04:32:20+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=UTF-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
32
  msgid "Crop and Save"
33
  msgstr ""
34
 
35
+ #: html/pte.php:23 html/pte.php:213
36
  msgid "Crop"
37
  msgstr ""
38
 
39
+ #. #-#-#-#-# post-thumbnail-editor.pot (Post Thumbnail Editor 2.2.0) #-#-#-#-#
40
  #. Plugin Name of the plugin/theme
41
+ #: html/pte.php:208 php/options.php:72 post-thumbnail-editor.php:160
42
+ #: post-thumbnail-editor.php:204 post-thumbnail-editor.php:304
43
+ #: post-thumbnail-editor.php:305 post-thumbnail-editor.php:311
44
+ #: post-thumbnail-editor.php:312 post-thumbnail-editor.php:352
45
  msgid "Post Thumbnail Editor"
46
  msgstr ""
47
 
48
+ #: html/pte.php:209
49
  msgid "crop and resize"
50
  msgstr ""
51
 
52
+ #: html/pte.php:214
53
  msgid "View"
54
  msgstr ""
55
 
56
+ #: html/pte.php:243
57
  msgid "Options"
58
  msgstr ""
59
 
60
+ #: html/pte.php:258
61
  msgid "Aspect Ratio"
62
  msgstr ""
63
 
64
+ #: html/pte.php:261
65
  msgid "width/height"
66
  msgstr ""
67
 
68
+ #: html/pte.php:267
69
  msgid "Crop and save"
70
  msgstr ""
71
 
72
+ #: html/pte.php:276
73
+ msgid "Change the current thumbnails position:"
74
+ msgstr ""
75
+
76
+ #: html/pte.php:289 php/options.php:49 post-thumbnail-editor.php:272
77
  msgid "Thumbnails"
78
  msgstr ""
79
 
80
+ #: html/pte.php:290
81
  msgid "W"
82
  msgstr ""
83
 
84
+ #: html/pte.php:291
85
  msgid "H"
86
  msgstr ""
87
 
88
+ #: html/pte.php:292
89
  msgid "C"
90
  msgstr ""
91
 
92
+ #: html/pte.php:298
93
  msgid "Save all"
94
  msgstr ""
95
 
96
+ #: html/pte.php:303
97
  msgid "Reset all"
98
  msgstr ""
99
 
100
+ #: html/pte.php:307
101
  msgid "View all/modified"
102
  msgstr ""
103
 
104
+ #: html/pte.php:333
105
  msgid "Save"
106
  msgstr ""
107
 
108
+ #: html/pte.php:336
109
  msgid "Reset"
110
  msgstr ""
111
 
112
+ #: html/pte.php:339
113
  msgid "Compare/View"
114
  msgstr ""
115
 
116
+ #: html/pte.php:346
117
  msgid "These thumbnails have an aspect ratio set:"
118
  msgstr ""
119
 
120
+ #: html/pte.php:355
121
+ msgid "Current Thumbnails"
122
+ msgstr ""
123
+
124
+ #: html/pte.php:385
125
  msgid "Original"
126
  msgstr ""
127
 
128
+ #: html/pte.php:392
129
  msgid "No image has been generated yet for image: "
130
  msgstr ""
131
 
132
+ #: html/pte.php:399
133
  msgid "Proposed"
134
  msgstr ""
135
 
136
+ #: php/functions.php:228
137
  msgid "Invalid meta data for POST #%d: %s"
138
  msgstr ""
139
 
140
+ #: php/functions.php:233
141
  msgid "Please contact support"
142
  msgstr ""
143
 
251
  msgid "These site-wide settings can only be changed by an administrator"
252
  msgstr ""
253
 
254
+ #: post-thumbnail-editor.php:271
255
  msgid "Edit Thumbnails"
256
  msgstr ""
257
 
258
+ #. #-#-#-#-# post-thumbnail-editor.pot (Post Thumbnail Editor 2.2.0) #-#-#-#-#
259
  #. Plugin URI of the plugin/theme
260
+ #. #-#-#-#-# post-thumbnail-editor.pot (Post Thumbnail Editor 2.2.0) #-#-#-#-#
261
+ #. Author URI of the plugin/theme
262
+ msgid "http://sewpafly.github.io/post-thumbnail-editor/"
263
  msgstr ""
264
 
265
  #. Description of the plugin/theme
269
  #. Author of the plugin/theme
270
  msgid "sewpafly"
271
  msgstr ""
 
 
 
 
js-build/main.js CHANGED
@@ -1,5 +1,11 @@
 
 
 
 
 
 
1
  /*
2
- AngularJS v1.0.5
3
  (c) 2010-2012 Google, Inc. http://angularjs.org
4
  License: MIT
5
  */
@@ -11,10 +17,4 @@
11
  * https://github.com/tapmodo/Jcrop
12
  */
13
 
14
- /**
15
- * @license RequireJS domReady 2.0.1 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
16
- * Available via the MIT or new BSD license.
17
- * see: http://github.com/requirejs/domReady for details
18
- */
19
-
20
- define("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){define("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e,t,n){var i;if(e)if(E(e))for(i in e)i!="prototype"&&i!="length"&&i!="name"&&e.hasOwnProperty(i)&&t.call(n,e[i],i);else if(e.forEach&&e.forEach!==r)e.forEach(t,n);else if(!e||typeof e.length!="number"?0:typeof e.hasOwnProperty!="function"&&typeof e.constructor!="function"||e instanceof K||Ln&&e instanceof Ln||Mn.call(e)!=="[object Object]"||typeof e.callee=="function")for(i=0;i<e.length;i++)t.call(n,e[i],i);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i);return e}function i(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=i(e),s=0;s<r.length;s++)t.call(n,e[r[s]],r[s]);return r}function o(e){return function(t,n){e(n,t)}}function u(){for(var e=Hn.length,t;e;){e--,t=Hn[e].charCodeAt(0);if(t==57)return Hn[e]="A",Hn.join("");if(t!=90)return Hn[e]=String.fromCharCode(t+1),Hn.join("");Hn[e]="0"}return Hn.unshift("0"),Hn.join("")}function a(e){return r(arguments,function(t){t!==e&&r(t,function(t,n){e[n]=t})}),e}function f(e){return parseInt(e,10)}function l(e,t){return a(new(a(function(){},{prototype:e})),t)}function c(){}function h(e){return e}function p(e){return function(){return e}}function d(e){return typeof e=="undefined"}function v(e){return typeof e!="undefined"}function m(e){return e!=null&&typeof e=="object"}function g(e){return typeof e=="string"}function y(e){return typeof e=="number"}function b(e){return Mn.apply(e)=="[object Date]"}function w(e){return Mn.apply(e)=="[object Array]"}function E(e){return typeof e=="function"}function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function x(e){return g(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}function T(e){return e&&(e.nodeName||e.bind&&e.find)}function N(e,t,n){var i=[];return r(e,function(e,r,s){i.push(t.call(n,e,r,s))}),i}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function k(e,t){var n=C(e,t);return n>=0&&e.splice(n,1),t}function L(e,t){if(S(e)||e&&e.$evalAsync&&e.$watch)throw Error("Can't copy Window or Scope");if(t){if(e===t)throw Error("Can't copy equivalent objects or arrays");if(w(e))for(var n=t.length=0;n<e.length;n++)t.push(L(e[n]));else for(n in r(t,function(e,n){delete t[n]}),e)t[n]=L(e[n])}else(t=e)&&(w(e)?t=L(e,[]):b(e)?t=new Date(e.getTime()):m(e)&&(t=L(e,{})));return t}function A(e,t){var t=t||{},n;for(n in e)e.hasOwnProperty(n)&&n.substr(0,2)!=="$$"&&(t[n]=e[n]);return t}function O(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&r=="object"){if(!w(e)){if(b(e))return b(t)&&e.getTime()==t.getTime();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||S(e)||S(t))return!1;r={};for(i in e)if(i.charAt(0)!=="$"&&!E(e[i])){if(!O(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&i.charAt(0)!=="$"&&t[i]!==n&&!E(t[i]))return!1;return!0}if((r=e.length)==t.length){for(i=0;i<r;i++)if(!O(e[i],t[i]))return!1;return!0}}return!1}function M(e,t){var n=arguments.length>2?An.call(arguments,2):[];return!E(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(An.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function _(e,r){var i=r;return/^\$+/.test(e)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function D(e,t){return JSON.stringify(e,_,t?" ":null)}function P(e){return g(e)?JSON.parse(e):e}function H(e){return e&&e.length!==0?(e=Tn(""+e),e=e!="f"&&e!="0"&&e!="false"&&e!="no"&&e!="n"&&e!="[]"):e=!1,e}function B(e){e=kn(e).clone();try{e.html("")}catch(t){}var n=kn("<div>").append(e).html();try{return e[0].nodeType===3?Tn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tn(t)})}catch(r){return Tn(n)}}function j(e){var t={},n,i;return r((e||"").split("&"),function(e){e&&(n=e.split("="),i=decodeURIComponent(n[0]),t[i]=v(n[1])?decodeURIComponent(n[1]):!0)}),t}function F(e){var t=[];return r(e,function(e,n){t.push(q(n,!0)+(e===!0?"":"="+q(e,!0)))}),t.length?t.join("&"):""}function I(e){return q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(t?null:/%20/g,"+")}function R(e,n){function i(e){e&&s.push(e)}var s=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(a,function(n){a[n]=!0,i(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(r(e.querySelectorAll("."+n),i),r(e.querySelectorAll("."+n+"\\:"),i),r(e.querySelectorAll("["+n+"]"),i))}),r(s,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):r(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function U(e,t){e=kn(e),t=t||[],t.unshift(["$provide",function(t){t.value("$rootElement",e)}]),t.unshift("ng");var n=dt(t);return n.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),n}function z(e,t){return t=t||"_",e.replace(Bn,function(e,n){return(n?t:"")+e.toLowerCase()})}function W(e,t,n){if(!e)throw Error("Argument '"+(t||"?")+"' is "+(n||"required"));return e}function X(e,t,n){return n&&w(e)&&(e=e[e.length-1]),W(E(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function V(e){function t(e,t,n){return e[t]||(e[t]=n())}return t(t(e,"angular",Object),"module",function(){var e={};return function(n,r,i){return r&&e.hasOwnProperty(n)&&(e[n]=null),t(e,n,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),u}}if(!r)throw Error("No module: "+n);var t=[],s=[],o=e("$injector","invoke"),u={_invokeQueue:t,_runBlocks:s,requires:r,name:n,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:o,run:function(e){return s.push(e),this}};return i&&o(i),u})}})}function $(e){return e.replace(zn,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Wn,"Moz$1")}function J(e,t){function n(){var e;for(var n=[this],i=t,s,o,u,a,f,l;n.length;){s=n.shift(),o=0;for(u=s.length;o<u;o++){a=kn(s[o]),i?a.triggerHandler("$destroy"):i=!i,f=0;for(e=(l=a.children()).length,a=e;f<a;f++)n.push(Ln(l[f]))}}return r.apply(this,arguments)}var r=Ln.fn[e],r=r.$original||r;n.$original=r,Ln.fn[e]=n}function K(e){if(e instanceof K)return e;if(!(this instanceof K)){if(g(e)&&e.charAt(0)!="<")throw Error("selectors not implemented");return new K(e)}if(g(e)){var n=t.createElement("div");n.innerHTML="<div>&#160;</div>"+e,n.removeChild(n.firstChild),st(this,n.childNodes),this.remove()}else st(this,e)}function Q(e){return e.cloneNode(!0)}function G(e){Z(e);for(var t=0,e=e.childNodes||[];t<e.length;t++)G(e[t])}function Y(e,t,n){var i=et(e,"events");et(e,"handle")&&(d(t)?r(i,function(t,n){Un(e,n,t),delete i[n]}):d(n)?(Un(e,t,i[t]),delete i[t]):k(i[t],n))}function Z(e){var t=e[In],r=Fn[t];r&&(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Y(e)),delete Fn[t],e[In]=n)}function et(e,t,n){var r=e[In],r=Fn[r||-1];if(!v(n))return r&&r[t];r||(e[In]=r=++qn,r=Fn[r]={}),r[t]=n}function tt(e,t,n){var r=et(e,"data"),i=v(n),s=!i&&v(t),o=s&&!m(t);!r&&!o&&et(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];a(r,t)}}function nt(e,t){return(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function rt(e,t){t&&r(t.split(" "),function(t){e.className=x((" "+e.className+" ").replace(/[\n\t]/g," ").replace(" "+x(t)+" "," "))})}function it(e,t){t&&r(t.split(" "),function(t){nt(e,t)||(e.className=x(e.className+" "+x(t)))})}function st(e,t){if(t)for(var t=!t.nodeName&&v(t.length)&&!S(t)?t:[t],n=0;n<t.length;n++)e.push(t[n])}function ot(e,t){return ut(e,"$"+(t||"ngController")+"Controller")}function ut(e,t,n){e=kn(e);for(e[0].nodeType==9&&(e=e.find("html"));e.length;){if(n=e.data(t))return n;e=e.parent()}}function at(e,t){var n=Vn[t.toLowerCase()];return n&&$n[e.nodeName]&&n}function ft(e,n){var i=function(i,s){i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t);if(d(i.defaultPrevented)){var o=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,o.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){return i.defaultPrevented},r(n[s||i.type],function(t){t.call(e,i)}),Cn<=8?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(delete i.preventDefault,delete i.stopPropagation,delete i.isDefaultPrevented)};return i.elem=e,i}function lt(e){var t=typeof e,r;return t=="object"&&e!==null?typeof (r=e.$$hashKey)=="function"?r=e.$$hashKey():r===n&&(r=e.$$hashKey=u()):r=e,t+":"+r}function ct(e){r(e,this.put,this)}function ht(){}function pt(e){var t,n;return typeof e=="function"?(t=e.$inject)||(t=[],n=e.toString().replace(Gn,""),n=n.match(Jn),r(n[1].split(Kn),function(e){e.replace(Qn,function(e,n,r){t.push(r)})}),e.$inject=t):w(e)?(n=e.length-1,X(e[n],"fn"),t=e.slice(0,n)):X(e,"fn",!0),t}function dt(e){function t(e){return function(t,n){if(!m(t))return e(t,n);r(t,o(e))}}function n(e,t){if(E(t)||w(t))t=v.instantiate(t);if(!t.$get)throw Error("Provider "+e+" must define $get factory method.");return d[e+f]=t}function i(e,t){return n(e,{$get:t})}function s(e){var t=[];return r(e,function(e){if(!h.get(e))if(h.put(e,!0),g(e)){var n=Dn(e);t=t.concat(s(n.requires)).concat(n._runBlocks);try{for(var r=n._invokeQueue,n=0,i=r.length;n<i;n++){var o=r[n],u=o[0]=="$injector"?v:v.get(o[0]);u[o[1]].apply(u,o[2])}}catch(a){throw a.message&&(a.message+=" from "+e),a}}else if(E(e))try{t.push(v.invoke(e))}catch(f){throw f.message&&(f.message+=" from "+e),f}else if(w(e))try{t.push(v.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+String(e[e.length-1])),l}else X(e,"module")}),t}function u(e,t){function n(n){if(typeof n!="string")throw Error("Service name expected");if(e.hasOwnProperty(n)){if(e[n]===a)throw Error("Circular dependency: "+l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=a,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=pt(e),o,u,a;u=0;for(o=s.length;u<o;u++)a=s[u],i.push(r&&r.hasOwnProperty(a)?r[a]:n(a));e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(w(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),m(i)?i:n},get:n,annotate:pt}}var a={},f="Provider",l=[],h=new ct,d={$provide:{provider:t(n),factory:t(i),service:t(function(e,t){return i(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return i(e,p(t))}),constant:t(function(e,t){d[e]=t,y[e]=t}),decorator:function(e,t){var n=v.get(e+f),r=n.$get;n.$get=function(){var e=b.invoke(r,n);return b.invoke(t,null,{$delegate:e})}}}},v=u(d,function(){throw Error("Unknown provider: "+l.join(" <- "))}),y={},b=y.$injector=u(y,function(e){return e=v.get(e+f),b.invoke(e.$get,e)});return r(s(e),function(e){b.invoke(e||c)}),b}function vt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function s(e){var t=null;return r(e,function(e){!t&&Tn(e.nodeName)==="a"&&(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=s(u.getElementsByName(e)))?r.scrollIntoView():e==="top"&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(o)}),o}]}function mt(e,t,i,s){function o(e){try{e.apply(null,An.call(arguments,1))}finally{if(b--,b===0)for(;w.length;)try{w.pop()()}catch(t){i.error(t)}}}function u(e,t){(function n(){r(E,function(e){e()}),S=t(n,e)})()}function a(){x!=f.url()&&(x=f.url(),r(N,function(e){e(f.url())}))}var f=this,l=t[0],h=e.location,p=e.history,v=e.setTimeout,m=e.clearTimeout,y={};f.isMock=!1;var b=0,w=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){b++},f.notifyWhenNoOutstandingRequests=function(e){r(E,function(e){e()}),b===0?e():w.push(e)};var E=[],S;f.addPollFn=function(e){return d(S)&&u(100,v),E.push(e),e};var x=h.href,T=t.find("base");f.url=function(e,t){if(!e)return h.href.replace(/%27/g,"'");if(x!=e)return x=e,s.history?t?p.replaceState(null,"",e):(p.pushState(null,"",e),T.attr("href",T.attr("href"))):t?h.replace(e):h.href=e,f};var N=[],C=!1;f.onUrlChange=function(t){return C||(s.history&&kn(e).bind("popstate",a),s.hashchange?kn(e).bind("hashchange",a):f.addPollFn(a),C=!0),N.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var k={},L="",A=f.baseHref();f.cookies=function(e,t){var r,s,o,u;if(!e){if(l.cookie!==L){L=l.cookie,r=L.split("; "),k={};for(o=0;o<r.length;o++)s=r[o],u=s.indexOf("="),u>0&&(k[unescape(s.substring(0,u))]=unescape(s.substring(u+1)))}return k}t===n?l.cookie=escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":g(t)&&(r=(l.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return b++,n=v(function(){delete y[n],o(e)},t||0),y[n]=!0,n},f.defer.cancel=function(e){return y[e]?(delete y[e],m(e),o(c),!0):!1}}function gt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new mt(e,r,t,n)}]}function yt(){this.$get=function(){function e(e,n){function r(e){e!=c&&(h?h==e&&(h=e.n):h=e,i(e.n,e.p),i(e,c),c=e,c.n=null)}function i(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw Error("cacheId "+e+" taken");var s=0,o=a({},n,{id:e}),u={},f=n&&n.capacity||Number.MAX_VALUE,l={},c=null,h=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});r(n),d(t)||(e in u||s++,u[e]=t,s>f&&this.remove(h.key))},get:function(e){var t=l[e];if(t)return r(t),u[e]},remove:function(e){var t=l[e];t&&(t==c&&(c=t.p),t==h&&(h=t.n),i(t.n,t.p),delete l[e],delete u[e],s--)},removeAll:function(){u={},s=0,l={},c=h=null},destroy:function(){l=o=u=null,delete t[e]},info:function(){return a({},o,{size:s})}}}var t={};return e.info=function(){var e={};return r(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function bt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function wt(e){var i={},s="Directive",u=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,l="Template must have exactly one root element. was: ",c=/^\s*(https?|ftp|mailto):/;this.directive=function d(t,n){return g(t)?(W(n,"directive"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+s,["$injector","$exceptionHandler",function(e,n){var s=[];return r(i[t],function(r){try{var i=e.invoke(r);E(i)?i={compile:p(i)}:!i.compile&&i.link&&(i.compile=p(i.link)),i.priority=i.priority||0,i.name=i.name||t,i.require=i.require||i.controller&&i.name,i.restrict=i.restrict||"A",s.push(i)}catch(o){n(o)}}),s}])),i[t].push(n)):r(t,o(d)),this},this.urlSanitizationWhitelist=function(e){return v(e)?(c=e,this):c},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(e,o,d,v,y,b,S,T,N){function C(e,t,n){e instanceof kn||(e=kn(e)),r(e,function(t,n){t.nodeType==3&&t.nodeValue.match(/\S+/)&&(e[n]=kn(t).wrap("<span></span>").parent()[0])});var i=L(e,t,e,n);return function(t,n){W(t,"scope");for(var r=n?Xn.clone.call(e):e,s=0,o=r.length;s<o;s++){var u=r[s];(u.nodeType==1||u.nodeType==9)&&r.eq(s).data("$scope",t)}return k(r,"ng-scope"),n&&n(r,t),i&&i(t,r,r),r}}function k(e,t){try{e.addClass(t)}catch(n){}}function L(e,t,r,i){function s(e,r,i,s){var u,a,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=o.length;c<h;p++)a=d[p],r=o[c++],u=o[c++],r?(r.scope?(f=e.$new(m(r.scope)),kn(a).data("$scope",f)):f=e,(l=r.transclude)||!s&&t?r(u,f,a,i,function(t){return function(n){var r=e.$new();return r.$$transcluded=!0,t(r,n).bind("$destroy",M(r,r.$destroy))}}(l||t)):r(u,f,a,n,s)):u&&u(e,a.childNodes,n,s)}for(var o=[],u,a,f,l=0;l<e.length;l++)a=new U,u=O(e[l],[],a,i),a=(u=u.length?_(u,e[l],a,t,r):null)&&u.terminal||!e[l].childNodes.length?null:L(e[l].childNodes,u?u.transclude:t),o.push(u),o.push(a),f=f||u||a;return f?s:null}function O(e,t,n,r){var i=n.$attr,s;switch(e.nodeType){case 1:D(t,Et(Pn(e).toLowerCase()),"E",r);var o,a,l;s=e.attributes;for(var c=0,h=s&&s.length;c<h;c++)if(o=s[c],o.specified)a=o.name,l=Et(a.toLowerCase()),i[l]=a,n[l]=o=x(Cn&&a=="href"?decodeURIComponent(e.getAttribute(a,2)):o.value),at(e,l)&&(n[l]=!0),q(e,t,o,l),D(t,l,"A",r);e=e.className;if(g(e)&&e!=="")for(;s=f.exec(e);)l=Et(s[2]),D(t,l,"C",r)&&(n[l]=x(s[3])),e=e.substr(s.index+s[0].length);break;case 3:I(t,e.nodeValue);break;case 8:try{if(s=u.exec(e.nodeValue))l=Et(s[1]),D(t,l,"M",r)&&(n[l]=x(s[2]))}catch(p){}}return t.sort(j),t}function _(e,i,s,o,u){function a(e,t){e&&(e.require=M.require,p.push(e)),t&&(t.require=M.require,v.push(t))}function f(e,t){var n,i="data",s=!1;if(g(e)){for(;(n=e.charAt(0))=="^"||n=="?";)e=e.substr(1),n=="^"&&(i="inheritedData"),s=s||n=="?";n=t[i]("$"+e+"Controller");if(!n&&!s)throw Error("No controller: "+e)}else w(e)&&(n=[],r(e,function(e){n.push(f(e,t))}));return n}function c(e,t,o,u,a){var l,c,h,m,g;l=i===o?s:A(s,new U(kn(o),s.$attr)),c=l.$$element;if(T){var y=/^\s*([@=&])\s*(\w*)\s*$/,w=t.$parent||t;r(T.scope,function(e,n){var r=e.match(y)||[],i=r[2]||n,r=r[1],s,o,u;t.$$isolateBindings[n]=r+i;switch(r){case"@":l.$observe(i,function(e){t[n]=e}),l.$$observers[i].$$scope=w;break;case"=":o=b(l[i]),u=o.assign||function(){throw s=t[n]=o(w),Error(Yn+l[i]+" (directive: "+T.name+")")},s=t[n]=o(w),t.$watch(function(){var e=o(w);return e!==t[n]&&(e!==s?s=t[n]=e:u(w,e=s=t[n])),e});break;case"&":o=b(l[i]),t[n]=function(e){return o(w,e)};break;default:throw Error("Invalid isolate scope definition for directive "+T.name+": "+e)}})}q&&r(q,function(e){var n={$scope:t,$element:c,$attrs:l,$transclude:a};g=e.controller,g=="@"&&(g=l[e.name]),c.data("$"+e.name+"Controller",S(g,n))}),u=0;for(h=p.length;u<h;u++)try{m=p[u],m(t,c,l,m.require&&f(m.require,c))}catch(E){d(E,B(c))}e&&e(t,o.childNodes,n,a),u=0;for(h=v.length;u<h;u++)try{m=v[u],m(t,c,l,m.require&&f(m.require,c))}catch(x){d(x,B(c))}}for(var h=-Number.MAX_VALUE,p=[],v=[],y=null,T=null,N=null,L=s.$$element=kn(i),M,_,D,j,I=o,q,z,W,X=0,V=e.length;X<V;X++){M=e[X],D=n;if(h>M.priority)break;if(W=M.scope)F("isolated scope",T,M,L),m(W)&&(k(L,"ng-isolate-scope"),T=M),k(L,"ng-scope"),y=y||M;_=M.name;if(W=M.controller)q=q||{},F("'"+_+"' controller",q[_],M,L),q[_]=M;if(W=M.transclude)F("transclusion",j,M,L),j=M,h=M.priority,W=="element"?(D=kn(i),L=s.$$element=kn(t.createComment(" "+_+": "+s[_]+" ")),i=L[0],R(u,kn(D[0]),i),I=C(D,o,h)):(D=kn(Q(i)).contents(),L.html(""),I=C(D,o));if(W=M.template)if(F("template",N,M,L),N=M,W=J(W),M.replace){D=kn("<div>"+x(W)+"</div>").contents(),i=D[0];if(D.length!=1||i.nodeType!==1)throw Error(l+W);R(u,L,i),_={$attr:{}},e=e.concat(O(i,e.splice(X+1,e.length-(X+1)),_)),P(s,_),V=e.length}else L.html(W);if(M.templateUrl)F("template",N,M,L),N=M,c=H(e.splice(X,e.length-X),c,L,s,u,M.replace,I),V=e.length;else if(M.compile)try{z=M.compile(L,s,I),E(z)?a(null,z):z&&a(z.pre,z.post)}catch($){d($,B(L))}M.terminal&&(c.terminal=!0,h=Math.max(h,M.priority))}return c.scope=y&&y.scope,c.transclude=j&&I,c}function D(t,r,o,u){var a=!1;if(i.hasOwnProperty(r))for(var f,r=e.get(r+s),l=0,c=r.length;l<c;l++)try{if(f=r[l],(u===n||u>f.priority)&&f.restrict.indexOf(o)!=-1)t.push(f),a=!0}catch(h){d(h)}return a}function P(e,t){var n=t.$attr,i=e.$attr,s=e.$$element;r(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&(r+=(i==="style"?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){r=="class"?(k(s,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):r=="style"?s.attr("style",s.attr("style")+";"+t):r.charAt(0)!="$"&&!e.hasOwnProperty(r)&&(e[r]=t,i[r]=n[r])})}function H(e,t,n,r,i,s,o){var u=[],f,c,h=n[0],p=e.shift(),d=a({},p,{controller:null,templateUrl:null,transclude:null,scope:null});return n.html(""),v.get(p.templateUrl,{cache:y}).success(function(a){var p,v,a=J(a);if(s){v=kn("<div>"+x(a)+"</div>").contents(),p=v[0];if(v.length!=1||p.nodeType!==1)throw Error(l+a);a={$attr:{}},R(i,n,p),O(p,e,a),P(r,a)}else p=h,n.html(a);e.unshift(d),f=_(e,p,r,o);for(c=L(n.contents(),o);u.length;){var m=u.pop(),a=u.pop();v=u.pop();var g=u.pop(),y=p;v!==h&&(y=Q(p),R(a,kn(v),y)),f(function(){t(c,g,y,i,m)},g,y,i,m)}u=null}).error(function(e,t,n,r){throw Error("Failed to load template: "+r.url)}),function(e,n,r,i,s){u?(u.push(n),u.push(r),u.push(i),u.push(s)):f(function(){t(c,n,r,i,s)},n,r,i,s)}}function j(e,t){return t.priority-e.priority}function F(e,t,n,r){if(t)throw Error("Multiple directives ["+t.name+", "+n.name+"] asking for "+e+" on: "+B(r))}function I(e,t){var n=o(t,!0);n&&e.push({priority:0,compile:p(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),k(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function q(e,t,r,i){var s=o(r,!0);s&&t.push({priority:100,compile:p(function(e,t,r){t=r.$$observers||(r.$$observers={}),i==="class"&&(s=o(r[i],!0)),r[i]=n,(t[i]||(t[i]=[])).$$inter=!0,(r.$$observers&&r.$$observers[i].$$scope||e).$watch(s,function(e){r.$set(i,e)})})})}function R(e,t,n){var r=t[0],i=r.parentNode,s,o;if(e){s=0;for(o=e.length;s<o;s++)if(e[s]==r){e[s]=n;break}}i&&i.replaceChild(n,r),n[kn.expando]=r[kn.expando],t[0]=n}var U=function(e,t){this.$$element=e,this.$attr=t||{}};U.prototype={$normalize:Et,$set:function(e,t,i,s){var o=at(this.$$element[0],e),u=this.$$observers;o&&(this.$$element.prop(e,t),s=o),this[e]=t,s?this.$attr[e]=s:(s=this.$attr[e])||(this.$attr[e]=s=z(e,"-")),Pn(this.$$element[0])==="A"&&e==="href"&&(X.setAttribute("href",t),o=X.href,o.match(c)||(this[e]=t="unsafe:"+o)),i!==!1&&(t===null||t===n?this.$$element.removeAttr(s):this.$$element.attr(s,t)),u&&r(u[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),T.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var X=N[0].createElement("a"),V=o.startSymbol(),$=o.endSymbol(),J=V=="{{"||$=="}}"?h:function(e){return e.replace(/\{\{/g,V).replace(/}}/g,$)};return C}]}function Et(e){return $(e.replace(Zn,""))}function St(){var e={};this.register=function(t,n){m(t)?a(e,t):e[t]=n},this.$get=["$injector","$window",function(t,n){return function(r,i){if(g(r)){var s=r,r=e.hasOwnProperty(s)?e[s]:Rt(i.$scope,s,!0)||Rt(n,s,!0);X(r,s,!0)}return t.instantiate(r,i)}}]}function xt(){this.$get=["$window",function(e){return kn(e.document)}]}function Tt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse",function(r){function i(i,u){for(var a,f,l=0,c=[],h=i.length,p=!1,d=[];l<h;)(a=i.indexOf(e,l))!=-1&&(f=i.indexOf(t,a+s))!=-1?(l!=a&&c.push(i.substring(l,a)),c.push(l=r(p=i.substring(a+s,f))),l.exp=p,l=f+o,p=!0):(l!=h&&c.push(i.substring(l)),l=h);(h=c.length)||(c.push(""),h=1);if(!u||p)return d.length=h,l=function(e){for(var t=0,r=h,i;t<r;t++)typeof (i=c[t])=="function"&&(i=i(e),i==null||i==n?i="":typeof i!="string"&&(i=D(i))),d[t]=i;return d.join("")},l.exp=i,l.parts=c,l}var s=e.length,o=t.length;return i.startSymbol=function(){return e},i.endSymbol=function(){return t},i}]}function Ct(e){for(var e=e.split("/"),t=e.length;t--;)e[t]=I(e[t]);return e.join("/")}function kt(e,t){var n=er.exec(e),n={protocol:n[1],host:n[3],port:f(n[5])||rr[n[1]]||null,path:n[6]||"/",search:n[8],hash:n[10]};return t&&(t.$$protocol=n.protocol,t.$$host=n.host,t.$$port=n.port),n}function Lt(e,t,n){return e+"://"+t+(n==rr[e]?"":":"+n)}function At(e,t,n){var r=kt(e);return decodeURIComponent(r.path)!=t||d(r.hash)||r.hash.indexOf(n)!==0?e:Lt(r.protocol,r.host,r.port)+t.substr(0,t.lastIndexOf("/"))+r.hash.substr(n.length)}function Ot(e,t,n){var r=kt(e);if(decodeURIComponent(r.path)==t)return e;var i=r.search&&"?"+r.search||"",s=r.hash&&"#"+r.hash||"",o=t.substr(0,t.lastIndexOf("/")),u=r.path.substr(o.length);if(r.path.indexOf(o)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+o+'" !');return Lt(r.protocol,r.host,r.port)+t+"#"+n+u+i+s}function Mt(e,t,n){t=t||"",this.$$parse=function(e){var n=kt(e,this);if(n.path.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+t+'" !');this.$$path=decodeURIComponent(n.path.substr(t.length)),this.$$search=j(n.search),this.$$hash=n.hash&&decodeURIComponent(n.hash)||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+t+this.$$url},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function _t(e,t,n){var r;this.$$parse=function(e){var n=kt(e,this);if(n.hash&&n.hash.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing hash prefix "'+t+'" !');r=n.path+(n.search?"?"+n.search:""),n=nr.exec((n.hash||"").substr(t.length)),this.$$path=n[1]?(n[1].charAt(0)=="/"?"":"/")+decodeURIComponent(n[1]):"",this.$$search=j(n[3]),this.$$hash=n[5]&&decodeURIComponent(n[5])||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+r+(this.$$url?"#"+t+this.$$url:"")},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function Dt(e,t,n,r){_t.apply(this,arguments),this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return n+r+"#"+t+e.substr(n.length)}}function Pt(e){return function(){return this[e]}}function Ht(e,t){return function(n){return d(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Bt(){var t="",n=!1;this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return v(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f,l,c=i.url(),h=kt(c);n?(f=i.baseHref()||"/",l=f.substr(0,f.lastIndexOf("/")),h=Lt(h.protocol,h.host,h.port)+l+"/",a=s.history?new Mt(At(c,f,t),l,h):new Dt(Ot(c,f,t),t,h,f.substr(l.length+1))):(h=Lt(h.protocol,h.host,h.port)+(h.path||"")+(h.search?"?"+h.search:"")+"#"+t+"/",a=new _t(c,t,h)),o.bind("click",function(t){if(!t.ctrlKey&&!t.metaKey&&t.which!=2){for(var n=kn(t.target);Tn(n[0].nodeName)!=="a";)if(n[0]===o[0]||!(n=n.parent())[0])return;var i=n.prop("href"),s=a.$$rewriteAppUrl(i);i&&!n.attr("target")&&s&&(a.$$parse(s),r.$apply(),t.preventDefault(),e.angular["ff-684208-preventDefault"]=!0)}}),a.absUrl()!=c&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest())});var p=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;if(!p||e!=a.absUrl())p++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))});return a.$$replace=!1,p}),a}]}function jt(){this.$get=["$window",function(e){function t(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function n(n){var i=e.console||{},s=i[n]||i.log||c;return s.apply?function(){var e=[];return r(arguments,function(n){e.push(t(n))}),s.apply(i,e)}:function(e,t){s(e,t)}}return{log:n("log"),warn:n("warn"),info:n("info"),error:n("error")}}]}function Ft(e,t){function n(e){return e.indexOf(y)!=-1}function r(){return m+1<e.length?e.charAt(m+1):!1}function i(e){return"0"<=e&&e<="9"}function s(e){return e==" "||e=="\r"||e==" "||e=="\n"||e==""||e==" "}function o(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"==e||e=="$"}function u(e){return e=="-"||e=="+"||i(e)}function f(t,n,r){throw r=r||m,Error("Lexer Error: "+t+" at column"+(v(n)?"s "+n+"-"+m+" ["+e.substring(n,r)+"]":" "+r)+" in expression ["+e+"].")}function l(){for(var t="",n=m;m<e.length;){var s=Tn(e.charAt(m));if(s=="."||i(s))t+=s;else{var o=r();if(s=="e"&&u(o))t+=s;else if(u(s)&&o&&i(o)&&t.charAt(t.length-1)=="e")t+=s;else{if(!u(s)||!!o&&!!i(o)||t.charAt(t.length-1)!="e")break;f("Invalid exponent")}}m++}t*=1,p.push({index:n,text:t,json:!0,fn:function(){return t}})}function c(){for(var n="",r=m,u,f,l;m<e.length;){var c=e.charAt(m);if(c!="."&&!o(c)&&!i(c))break;c=="."&&(u=m),n+=c,m++}if(u)for(f=m;f<e.length;){c=e.charAt(f);if(c=="("){l=n.substr(u-r+1),n=n.substr(0,u-r),m=f;break}if(!s(c))break;f++}r={index:r,text:n};if(ir.hasOwnProperty(n))r.fn=r.json=ir[n];else{var h=zt(n,t);r.fn=a(function(e,t){return h(e,t)},{assign:function(e,t){return qt(e,n,t)}})}p.push(r),l&&(p.push({index:u,text:".",json:!1}),p.push({index:u+1,text:l,json:!1}))}function h(t){var n=m;m++;for(var r="",i=t,s=!1;m<e.length;){var o=e.charAt(m);i+=o;if(s)o=="u"?(o=e.substring(m+1,m+5),o.match(/[\da-f]{4}/i)||f("Invalid unicode escape [\\u"+o+"]"),m+=4,r+=String.fromCharCode(parseInt(o,16))):(s=sr[o],r+=s?s:o),s=!1;else if(o=="\\")s=!0;else{if(o==t){m++,p.push({index:n,text:i,string:r,json:!0,fn:function(){return r}});return}r+=o}m++}f("Unterminated quote",n)}for(var p=[],d,m=0,g=[],y,b=":";m<e.length;){y=e.charAt(m);if(n("\"'"))h(y);else if(i(y)||n(".")&&i(r()))l();else if(o(y)){if(c(),"{,".indexOf(b)!=-1&&g[0]=="{"&&(d=p[p.length-1]))d.json=d.text.indexOf(".")==-1}else if(n("(){}[].,;:"))p.push({index:m,text:y,json:":[,".indexOf(b)!=-1&&n("{[")||n("}]:,")}),n("{[")&&g.unshift(y),n("}]")&&g.shift(),m++;else{if(s(y)){m++;continue}var w=y+r(),E=ir[y],S=ir[w];S?(p.push({index:m,text:w,fn:S}),m+=2):E?(p.push({index:m,text:y,fn:E,json:"[,:".indexOf(b)!=-1&&n("+-")}),m+=1):f("Unexpected next character ",m,m+1)}b=y}return p}function It(e,t,r,i){function s(t,n){throw Error("Syntax Error: Token '"+n.text+"' "+t+" at column "+(n.index+1)+" of the expression ["+e+"] starting at ["+e.substring(n.index)+"].")}function o(){if(L.length===0)throw Error("Unexpected end of expression: "+e);return L[0]}function u(e,t,n,r){if(L.length>0){var i=L[0],s=i.text;if(s==e||s==t||s==n||s==r||!e&&!t&&!n&&!r)return i}return!1}function f(e,n,r,i){return(e=u(e,n,r,i))?(t&&!e.json&&s("is not valid json",e),L.shift(),e):!1}function l(e){f(e)||s("is unexpected, expecting ["+e+"]",u())}function h(e,t){return function(n,r){return e(n,r,t)}}function d(e,t,n){return function(r,i){return t(r,i,e,n)}}function v(){for(var e=[];;)if(L.length>0&&!u("}",")",";","]")&&e.push(D()),!f(";"))return e.length==1?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}}function m(){for(var e=f(),t=r(e.text),n=[];;){if(!(e=f(":"))){var i=function(e,r,i){for(var i=[i],s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return i}}n.push(A())}}function g(){for(var e=y(),t;;){if(!(t=f("||")))return e;e=d(e,t.fn,y())}}function y(){var e=b(),t;if(t=f("&&"))e=d(e,t.fn,y());return e}function b(){var e=w(),t;if(t=f("==","!="))e=d(e,t.fn,b());return e}function w(){var e;e=E();for(var t;t=f("+","-");)e=d(e,t.fn,E());if(t=f("<",">","<=",">="))e=d(e,t.fn,w());return e}function E(){for(var e=S(),t;t=f("*","/","%");)e=d(e,t.fn,S());return e}function S(){var e;return f("+")?x():(e=f("-"))?d(C,e.fn,S()):(e=f("!"))?h(e.fn,S()):x()}function x(){var e;if(f("("))e=D(),l(")");else if(f("["))e=T();else if(f("{"))e=N();else{var t=f();(e=t.fn)||s("not a primary expression",t)}for(var n;t=f("(","[",".");)t.text==="("?(e=O(e,n),n=null):t.text==="["?(n=e,e=_(e)):t.text==="."?(n=e,e=M(e)):s("IMPOSSIBLE");return e}function T(){var e=[];if(o().text!="]")do e.push(A());while(f(","));return l("]"),function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r}}function N(){var e=[];if(o().text!="}")do{var t=f(),t=t.string||t.text;l(":");var n=A();e.push({key:t,value:n})}while(f(","));return l("}"),function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i],o=s.value(t,n);r[s.key]=o}return r}}var C=p(0),k,L=Ft(e,i),A=function(){var t=g(),n,r;return(r=f("="))?(t.assign||s("implies assignment but ["+e.substring(0,r.index)+"] can not be assigned to",r),n=g(),function(e,r){return t.assign(e,n(e,r),r)}):t},O=function(e,t){var n=[];if(o().text!=")")do n.push(A());while(f(","));return l(")"),function(r,i){for(var s=[],o=t?t(r,i):r,u=0;u<n.length;u++)s.push(n[u](r,i));return u=e(r,i)||c,u.apply?u.apply(o,s):u(s[0],s[1],s[2],s[3],s[4])}},M=function(e){var t=f().text,n=zt(t,i);return a(function(t,r){return n(e(t,r),r)},{assign:function(n,r,i){return qt(e(n,i),t,r)}})},_=function(e){var t=A();return l("]"),a(function(r,i){var s=e(r,i),o=t(r,i),u;return s?((s=s[o])&&s.then&&(u=s,"$$v"in s||(u.$$v=n,u.then(function(e){u.$$v=e})),s=s.$$v),s):n},{assign:function(n,r,i){return e(n,i)[t(n,i)]=r}})},D=function(){for(var e=A(),t;;){if(!(t=f("|")))return e;e=d(e,t.fn,m())}};return t?(A=g,O=M=_=D=function(){s("is not valid json",{text:e,index:0})},k=x()):k=v(),L.length!==0&&s("is an unexpected token",L[0]),k}function qt(e,t,n){for(var t=t.split("."),r=0;t.length>1;r++){var i=t.shift(),s=e[i];s||(s={},e[i]=s),e=s}return e[t.shift()]=n}function Rt(e,t,n){if(!t)return e;for(var t=t.split("."),r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&E(e)?M(i,e):e}function Ut(e,t,r,i,s){return function(o,u){var a=u&&u.hasOwnProperty(e)?u:o,f;return a===null||a===n?a:((a=a[e])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!t||a===null||a===n?a:((a=a[t])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!r||a===null||a===n?a:((a=a[r])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!i||a===null||a===n?a:((a=a[i])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!s||a===null||a===n?a:((a=a[s])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),a)))))}}function zt(e,t){if(or.hasOwnProperty(e))return or[e];var i=e.split("."),s=i.length,o;if(t)o=s<6?Ut(i[0],i[1],i[2],i[3],i[4]):function(e,t){var r=0,o;do o=Ut(i[r++],i[r++],i[r++],i[r++],i[r++])(e,t),t=n,e=o;while(r<s);return o};else{var u="var l, fn, p;\n";r(i,function(e,t){u+="if(s === null || s === undefined) return s;\nl=s;\ns="+(t?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\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'}),u+="return s;",o=Function("s","k",u),o.toString=function(){return u}}return or[e]=o}function Wt(){var e={};this.$get=["$filter","$sniffer",function(t,n){return function(r){switch(typeof r){case"string":return e.hasOwnProperty(r)?e[r]:e[r]=It(r,!1,t,n.csp);case"function":return r;default:return c}}}]}function Xt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Vt(function(t){e.$evalAsync(t)},t)}]}function Vt(e,t){function i(e){return e}function s(e){return a(e)}var o=function(){var r=[],f,l;return l={resolve:function(t){if(r){var i=r;r=n,f=u(t),i.length&&e(function(){for(var e,t=0,n=i.length;t<n;t++)e=i[t],f.then(e[0],e[1])})}},reject:function(e){l.resolve(a(e))},promise:{then:function(e,n){var u=o(),a=function(n){try{u.resolve((e||i)(n))}catch(r){t(r),u.reject(r)}},l=function(e){try{u.resolve((n||s)(e))}catch(r){t(r),u.reject(r)}};return r?r.push([a,l]):f.then(a,l),u.promise}}}},u=function(t){return t&&t.then?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(t){return{then:function(n,r){var i=o();return e(function(){i.resolve((r||s)(t))}),i.promise}}};return{defer:o,reject:a,when:function(n,r,f){var l=o(),c,h=function(e){try{return(r||i)(e)}catch(n){return t(n),a(n)}},p=function(e){try{return(f||s)(e)}catch(n){return t(n),a(n)}};return e(function(){u(n).then(function(e){c||(c=!0,l.resolve(u(e).then(h,p)))},function(e){c||(c=!0,l.resolve(p(e)))})}),l.promise},all:function(e){var t=o(),n=e.length,i=[];return n?r(e,function(e,r){u(e).then(function(e){r in i||(i[r]=e,--n||t.resolve(i))},function(e){r in i||t.reject(e)})}):t.resolve(i),t.promise}}}function $t(){var e={};this.when=function(t,n){e[t]=a({reloadOnSearch:!0},n);if(t){var r=t[t.length-1]=="/"?t.substr(0,t.length-1):t+"/";e[r]={redirectTo:t}}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(t,n,i,s,o,u,f){function c(e,t){for(var t="^"+t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",n="",i=[],s={},o=/:(\w+)/g,u,a=0;(u=o.exec(t))!==null;)n+=t.slice(a,u.index),n+="([^\\/]*)",i.push(u[1]),a=o.lastIndex;n+=t.substr(a);var f=e.match(RegExp(n));return f&&r(i,function(e,t){s[e]=f[t+1]}),f?s:null}function h(){var e=p(),a=y.current;if(e&&a&&e.$route===a.$route&&O(e.pathParams,a.pathParams)&&!e.reloadOnSearch&&!m)a.params=e.params,L(a.params,i),t.$broadcast("$routeUpdate",a);else if(e||a)m=!1,t.$broadcast("$routeChangeStart",e,a),(y.current=e)&&e.redirectTo&&(g(e.redirectTo)?n.path(d(e.redirectTo,e.params)).search(e.params).replace():n.url(e.redirectTo(e.pathParams,n.path(),n.search())).replace()),s.when(e).then(function(){if(e){var t=[],n=[],i;return r(e.resolve||{},function(e,r){t.push(r),n.push(g(e)?o.get(e):o.invoke(e))}),v(i=e.template)||v(i=e.templateUrl)&&(i=u.get(i,{cache:f}).then(function(e){return e.data})),v(i)&&(t.push("$template"),n.push(i)),s.all(n).then(function(e){var n={};return r(e,function(e,r){n[t[r]]=e}),n})}}).then(function(n){e==y.current&&(e&&(e.locals=n,L(e.params,i)),t.$broadcast("$routeChangeSuccess",e,a))},function(n){e==y.current&&t.$broadcast("$routeChangeError",e,a,n)})}function p(){var t,i;return r(e,function(e,r){!i&&(t=c(n.path(),r))&&(i=l(e,{params:a({},n.search(),t),pathParams:t}),i.$route=e)}),i||e[null]&&l(e[null],{params:{},pathParams:{}})}function d(e,t){var n=[];return r((e||"").split(":"),function(e,r){if(r==0)n.push(e);else{var i=e.match(/(\w+)(.*)/),s=i[1];n.push(t[s]),n.push(i[2]||""),delete t[s]}}),n.join("")}var m=!1,y={routes:e,reload:function(){m=!0,t.$evalAsync(h)}};return t.$on("$locationChangeSuccess",h),y}]}function Jt(){this.$get=p({})}function Kt(){var e=10;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse",function(t,n,r){function i(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function s(e){if(f.$$phase)throw Error(f.$$phase+" already in progress");f.$$phase=e}function o(e,t){var n=r(e);return X(n,t),n}function a(){}i.prototype={$new:function(e){if(E(e))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return e?(e=new i,e.$root=this.$root):(e=function(){},e.prototype=this,e=new e,e.$id=u()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$asyncQueue=[],e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=o(e,"watch"),i=this.$$watchers,s={fn:t,last:a,get:r,exp:e,eq:!!n};if(!E(t)){var u=o(t||c,"listener");s.fn=function(e,t,n){u(n)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){k(i,s)}},$digest:function(){var t,r,i,o,u,l,c,h=e,p,d=[],v,m;s("$digest");do{c=!1,p=this;do{for(u=p.$$asyncQueue;u.length;)try{p.$eval(u.shift())}catch(g){n(g)}if(o=p.$$watchers)for(l=o.length;l--;)try{if(t=o[l],(r=t.get(p))!==(i=t.last)&&!(t.eq?O(r,i):typeof r=="number"&&typeof i=="number"&&isNaN(r)&&isNaN(i)))c=!0,t.last=t.eq?L(r):r,t.fn(r,i===a?r:i,p),h<5&&(v=4-h,d[v]||(d[v]=[]),m=E(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,m+="; newVal: "+D(r)+"; oldVal: "+D(i),d[v].push(m))}catch(y){n(y)}if(!(o=p.$$childHead||p!==this&&p.$$nextSibling))for(;p!==this&&!(o=p.$$nextSibling);)p=p.$parent}while(p=o);if(c&&!(h--))throw f.$$phase=null,Error(e+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+D(d))}while(c||u.length);f.$$phase=null},$destroy:function(){if(f!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return r(e)(this,t)},$evalAsync:function(e){this.$$asyncQueue.push(e)},$apply:function(e){try{return s("$apply"),this.$eval(e)}catch(t){n(t)}finally{f.$$phase=null;try{f.$digest()}catch(r){throw n(r),r}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[C(n,t)]=null}},$emit:function(e,t){var r=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(An.call(arguments,1)),f,l;do{i=s.$$listeners[e]||r,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{if(i[f].apply(null,a),o)return u}catch(c){n(c)}else i.splice(f,1),f--,l--;s=s.$parent}while(s);return u},$broadcast:function(e,t){var r=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(An.call(arguments,1)),u,a;do{r=i,s.currentScope=r,i=r.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){n(f)}else i.splice(u,1),u--,a--;if(!(i=r.$$childHead||r!==this&&r.$$nextSibling))for(;r!==this&&!(i=r.$$nextSibling);)r=r.$parent}while(r=i);return s}};var f=new i;return f}]}function Qt(){this.$get=["$window",function(e){var t={},n=f((/android (\d+)/.exec(Tn(e.navigator.userAgent))||[])[1]);return{history:!(!e.history||!e.history.pushState||n<4),hashchange:"onhashchange"in e&&(!e.document.documentMode||e.document.documentMode>7),hasEvent:function(n){if(n=="input"&&Cn==9)return!1;if(d(t[n])){var r=e.document.createElement("div");t[n]="on"+n in r}return t[n]},csp:!1}}]}function Gt(){this.$get=p(e)}function Yt(e){var t={},n,i,s;return e?(r(e.split("\n"),function(e){s=e.indexOf(":"),n=Tn(x(e.substr(0,s))),i=x(e.substr(s+1)),n&&(t[n]?t[n]+=", "+i:t[n]=i)}),t):t}function Zt(e){var t=m(e)?e:n;return function(n){return t||(t=Yt(e)),n?t[Tn(n)]||null:t}}function en(e,t,n){return E(n)?n(e,t):(r(n,function(n){e=n(e,t)}),e)}function tn(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,o=this.defaults={transformResponse:[function(n){return g(n)&&(n=n.replace(i,""),e.test(n)&&t.test(n)&&(n=P(n,!0))),n}],transformRequest:[function(e){return m(e)&&Mn.apply(e)!=="[object File]"?D(e):e}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},u=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,f,l,c){function h(e){function n(e){var t=a({},e,{data:en(e.data,e.headers,s)});return 200<=e.status&&e.status<300?t:l.reject(t)}e.method=Nn(e.method);var i=e.transformRequest||o.transformRequest,s=e.transformResponse||o.transformResponse,u=o.headers,u=a({"X-XSRF-TOKEN":t.cookies()["XSRF-TOKEN"]},u.common,u[Tn(e.method)],e.headers),i=en(e.data,Zt(u),i),f;return d(e.data)&&delete u["Content-Type"],f=p(e,i,u),f=f.then(n,n),r(b,function(e){f=e(f)}),f.success=function(t){return f.then(function(n){t(n.data,n.status,n.headers,e)}),f},f.error=function(t){return f.then(null,function(n){t(n.data,n.status,n.headers,e)}),f},f}function p(t,n,r){function i(e,t,n){c&&(200<=e&&e<300?c.put(d,[e,t,Yt(n)]):c.remove(d)),s(t,e,n),f.$apply()}function s(e,n,r){n=Math.max(n,0),(200<=n&&n<300?u.resolve:u.reject)({data:e,status:n,headers:Zt(r),config:t})}function o(){var e=C(h.pendingRequests,t);e!==-1&&h.pendingRequests.splice(e,1)}var u=l.defer(),a=u.promise,c,p,d=v(t.url,t.params);h.pendingRequests.push(t),a.then(o,o),t.cache&&t.method=="GET"&&(c=m(t.cache)?t.cache:y);if(c)if(p=c.get(d)){if(p.then)return p.then(o,o),p;w(p)?s(p[1],p[0],L(p[2])):s(p,200,{})}else c.put(d,a);return p||e(t.method,d,n,i,r,t.timeout,t.withCredentials),a}function v(e,t){if(!t)return e;var r=[];return s(t,function(e,t){e==null||e==n||(m(e)&&(e=D(e)),r.push(encodeURIComponent(t)+"="+encodeURIComponent(e)))}),e+(e.indexOf("?")==-1?"?":"&")+r.join("&")}var y=i("$http"),b=[];return r(u,function(e){b.push(g(e)?c.get(e):c.invoke(e))}),h.pendingRequests=[],function(e){r(arguments,function(e){h[e]=function(t,n){return h(a(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){r(arguments,function(e){h[e]=function(t,n,r){return h(a(r||{},{method:e,url:t,data:n}))}})}("post","put"),h.defaults=o,h}]}function nn(){this.$get=["$browser","$window","$document",function(e,t,n){return rn(e,ur,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function rn(e,t,n,i,s,o){function u(e,t){var n=s.createElement("script"),r=function(){s.body.removeChild(n),t&&t()};n.type="text/javascript",n.src=e,Cn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,s.body.appendChild(n)}return function(s,a,f,l,h,p,d){function v(t,n,r,i){n=(a.match(er)||["",o])[1]=="file"?r?200:404:n,t(n==1223?204:n,r,i),e.$$completeOutstandingRequest(c)}e.$$incOutstandingRequestCount(),a=a||e.url();if(Tn(s)=="jsonp"){var m="_"+(i.counter++).toString(36);i[m]=function(e){i[m].data=e},u(a.replace("JSON_CALLBACK","angular.callbacks."+m),function(){i[m].data?v(l,200,i[m].data):v(l,-2),delete i[m]})}else{var g=new t;g.open(s,a,!0),r(h,function(e,t){e&&g.setRequestHeader(t,e)});var y;g.onreadystatechange=function(){if(g.readyState==4){var e=g.getAllResponseHeaders(),t=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];e||(e="",r(t,function(t){var n=g.getResponseHeader(t);n&&(e+=t+": "+n+"\n")})),v(l,y||g.status,g.responseText,e)}},d&&(g.withCredentials=!0),g.send(f||""),p>0&&n(function(){y=-1,g.abort()},p)}}}function sn(){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:"¤",posSuf:"",negPre:"(¤",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(e){return e===1?"one":"other"}}}}function on(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=v(u)&&!u,o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}l||e.$apply()},o),u=function(){delete s[f.$$timeoutId]};return f.$$timeoutId=o,s[o]=a,f.then(u,u),f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),t.defer.cancel(e.$$timeoutId)):!1},i}]}function un(e){function t(t,r){return e.factory(t+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",fn),t("date",vn),t("filter",an),t("json",mn),t("limitTo",gn),t("lowercase",hr),t("number",ln),t("orderBy",yn),t("uppercase",pr)}function an(){return function(e,t){if(!w(e))return e;var n=[];n.check=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};var r=function(e,t){if(t.charAt(0)==="!")return!r(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return(""+e).toLowerCase().indexOf(t)>-1;case"object":for(var n in e)if(n.charAt(0)!=="$"&&r(e[n],t))return!0;return!1;case"array":for(n=0;n<e.length;n++)if(r(e[n],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var i in t)i=="$"?function(){var e=(""+t[i]).toLowerCase();e&&n.push(function(t){return r(t,e)})}():function(){var e=i,s=(""+t[i]).toLowerCase();s&&n.push(function(t){return r(Rt(t,e),s)})}();break;case"function":n.push(t);break;default:return e}for(var s=[],o=0;o<e.length;o++){var u=e[o];n.check(u)&&s.push(u)}return s}}function fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return d(n)&&(n=t.CURRENCY_SYM),cn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function ln(e){var t=e.NUMBER_FORMATS;return function(e,n){return cn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function cn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=e<0,e=Math.abs(e),o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?o="0":(u=o,f=!0)}if(!f){o=(o.split(ar)[1]||"").length,d(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac));var o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(ar),o=e[0],e=e[1]||"",f=0,l=t.lgSize,c=t.gSize;if(o.length>=l+c)for(var f=o.length-l,h=0;h<f;h++)(f-h)%c===0&&h!==0&&(u+=n),u+=o.charAt(h);for(h=f;h<o.length;h++)(o.length-h)%l===0&&h!==0&&(u+=n),u+=o.charAt(h);for(;e.length<i;)e+="0";i&&i!=="0"&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function hn(e,t,n){var r="";e<0&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function pn(e,t,n,r){return function(i){i=i["get"+e]();if(n>0||i>-n)i+=n;return i===0&&n==-12&&(i=12),hn(i,t,r)}}function dn(e,t){return function(n,r){var i=n["get"+e](),s=Nn(t?"SHORT"+e:e);return r[s][i]}}function vn(e){function t(e){var t;if(t=e.match(n)){var e=new Date(0),r=0,i=0;t[9]&&(r=f(t[9]+t[10]),i=f(t[9]+t[11])),e.setUTCFullYear(f(t[1]),f(t[2])-1,f(t[3])),e.setUTCHours(f(t[4]||0)-r,f(t[5]||0)-i,f(t[6]||0),f(t[7]||0))}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i){var s="",o=[],u,a,i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i;g(n)&&(n=cr.test(n)?f(n):t(n)),y(n)&&(n=new Date(n));if(!b(n))return n;for(;i;)(a=lr.exec(i))?(o=o.concat(An.call(a,1)),i=o.pop()):(o.push(i),i=null);return r(o,function(t){u=fr[t],s+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function mn(){return function(e){return D(e,!0)}}function gn(){return function(e,t){if(e instanceof Array){var t=f(t),n=[],r,i;if(!!e&&e instanceof Array){t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}return n}return e}}function yn(e){return function(t,n,r){function i(e,t){return H(t)?function(t,n){return e(n,t)}:e}if(!w(t))return t;if(!n)return t;for(var n=w(n)?n:[n],n=N(n,function(t){var n=!1,r=t||h;if(g(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?(s=="string"&&(n=n.toLowerCase()),s=="string"&&(i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)}),s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0},r))}}function bn(e){return E(e)&&(e={link:e}),e.restrict=e.restrict||"AC",p(e)}function wn(e,t){function n(t,n){n=n?"-"+z(n,"-"):"",e.removeClass((t?Nr:Tr)+n).addClass((t?Tr:Nr)+n)}var i=this,s=e.parent().controller("form")||mr,o=0,u=i.$error={};i.$name=t.name,i.$dirty=!1,i.$pristine=!0,i.$valid=!0,i.$invalid=!1,s.$addControl(i),e.addClass(Cr),n(!0),i.$addControl=function(e){e.$name&&!i.hasOwnProperty(e.$name)&&(i[e.$name]=e)},i.$removeControl=function(e){e.$name&&i[e.$name]===e&&delete i[e.$name],r(u,function(t,n){i.$setValidity(n,!0,e)})},i.$setValidity=function(e,t,r){var a=u[e];if(t)a&&(k(a,r),!a.length)&&(o--,o||(n(t),i.$valid=!0,i.$invalid=!1),u[e]=!1,n(!0,e),s.$setValidity(e,!0,i));else{o||n(t);if(a){if(C(a,r)!=-1)return}else u[e]=a=[],o++,n(!1,e),s.$setValidity(e,!1,i);a.push(r),i.$valid=!1,i.$invalid=!0}},i.$setDirty=function(){e.removeClass(Cr).addClass(kr),i.$dirty=!0,i.$pristine=!1,s.$setDirty()}}function En(e){return d(e)||e===""||e===null||e!==e}function Sn(e,t,r,i,s,o){var u=function(){var n=x(t.val());i.$viewValue!==n&&e.$apply(function(){i.$setViewValue(n)})};if(s.hasEvent("input"))t.bind("input",u);else{var a;t.bind("keydown",function(e){e=e.keyCode,e===91||15<e&&e<19||37<=e&&e<=40||a||(a=o.defer(function(){u(),a=null}))}),t.bind("change",u)}i.$render=function(){t.val(En(i.$viewValue)?"":i.$viewValue)};var l=r.ngPattern,c=function(e,t){return En(t)||e.test(t)?(i.$setValidity("pattern",!0),t):(i.$setValidity("pattern",!1),n)};l&&(l.match(/^\/(.*)\/$/)?(l=RegExp(l.substr(1,l.length-2)),s=function(e){return c(l,e)}):s=function(t){var n=e.$eval(l);if(!n||!n.test)throw Error("Expected "+l+" to be a RegExp but was "+n);return c(n,t)},i.$formatters.push(s),i.$parsers.push(s));if(r.ngMinlength){var h=f(r.ngMinlength),s=function(e){return!En(e)&&e.length<h?(i.$setValidity("minlength",!1),n):(i.$setValidity("minlength",!0),e)};i.$parsers.push(s),i.$formatters.push(s)}if(r.ngMaxlength){var p=f(r.ngMaxlength),r=function(e){return!En(e)&&e.length>p?(i.$setValidity("maxlength",!1),n):(i.$setValidity("maxlength",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}}function xn(e,t){return e="ngClass"+e,bn(function(r,i,s){function o(e){if(t===!0||r.$index%2===t)f&&e!==f&&u(f),a(e);f=e}function u(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),i.removeClass(w(e)?e.join(" "):e)}function a(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),e&&i.addClass(w(e)?e.join(" "):e)}var f=n;r.$watch(s[e],o,!0),s.$observe("class",function(){var t=r.$eval(s[e]);o(t,t)}),e!=="ngClass"&&r.$watch("$index",function(n,i){var o=n%2;o!==i%2&&(o==t?a(r.$eval(s[e])):u(r.$eval(s[e])))})})}var Tn=function(e){return g(e)?e.toLowerCase():e},Nn=function(e){return g(e)?e.toUpperCase():e},Cn=f((/msie (\d+)/.exec(Tn(navigator.userAgent))||[])[1]),kn,Ln,An=[].slice,On=[].push,Mn=Object.prototype.toString,_n=e.angular||(e.angular={}),Dn,Pn,Hn=["0","0","0"];c.$inject=[],h.$inject=[],Pn=Cn<9?function(e){return e=e.nodeName?e:e[0],e.scopeName&&e.scopeName!="HTML"?Nn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Bn=/[A-Z]/g,jn={full:"1.0.5",major:1,minor:0,dot:5,codeName:"flatulent-propulsion"},Fn=K.cache={},In=K.expando="ng-"+(new Date).getTime(),qn=1,Rn=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Un=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},zn=/([\:\-\_]+(.))/g,Wn=/^moz([A-Z])/,Xn=K.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;this.bind("DOMContentLoaded",n),K(e).bind("load",n)},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?kn(this[e]):kn(this[this.length+e])},length:0,push:On,sort:[].sort,splice:[].splice},Vn={};r("multiple,selected,checked,disabled,readOnly,required".split(","),function(e){Vn[Tn(e)]=e});var $n={};r("input,select,option,textarea,button,form".split(","),function(e){$n[Nn(e)]=!0}),r({data:tt,inheritedData:ut,scope:function(e){return ut(e,"$scope")},controller:ot,injector:function(e){return ut(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:nt,css:function(e,t,r){t=$(t);if(!v(r)){var i;return Cn<=8&&(i=e.currentStyle&&e.currentStyle[t],i===""&&(i="auto")),i=i||e.style[t],Cn<=8&&(i=i===""?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Tn(t);if(Vn[i]){if(!v(r))return e[t]||(e.attributes.getNamedItem(t)||c).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(v(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),e===null?n:e},prop:function(e,t,n){if(!v(n))return e[t];e[t]=n},text:a(Cn<9?function(e,t){if(e.nodeType==1){if(d(t))return e.innerText;e.innerText=t}else{if(d(t))return e.nodeValue;e.nodeValue=t}}:function(e,t){if(d(t))return e.textContent;e.textContent=t},{$dv:""}),val:function(e,t){if(d(t))return e.value;e.value=t},html:function(e,t){if(d(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)G(r[n]);e.innerHTML=t}},function(e,t){K.prototype[t]=function(t,r){var i,s;if((e.length==2&&e!==nt&&e!==ot?t:r)!==n){for(i=0;i<this.length;i++)e(this[i],t,r);return this}if(m(t)){for(i=0;i<this.length;i++)if(e===tt)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}return this.length?e(this[0],t,r):e.$dv}}),r({removeData:Z,dealoc:G,bind:function li(e,t,n){var i=et(e,"events"),s=et(e,"handle");i||et(e,"events",i={}),s||et(e,"handle",s=ft(e,i)),r(t.split(" "),function(t){var r=i[t];if(!r){if(t=="mouseenter"||t=="mouseleave"){var o=0;i.mouseenter=[],i.mouseleave=[],li(e,"mouseover",function(e){o++,o==1&&s(e,"mouseenter")}),li(e,"mouseout",function(e){o--,o==0&&s(e,"mouseleave")})}else Rn(e,t,s),i[t]=[];r=i[t]}r.push(n)})},unbind:Y,replaceWith:function(e,t){var n,i=e.parentNode;G(e),r(new K(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===1&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){r(new K(t),function(t){e.nodeType===1&&e.appendChild(t)})},prepend:function(e,t){if(e.nodeType===1){var n=e.firstChild;r(new K(t),function(t){n?e.insertBefore(t,n):(e.appendChild(t),n=t)})}},wrap:function(e,t){var t=kn(t)[0],n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){G(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,i=e.parentNode;r(new K(t),function(e){i.insertBefore(e,n.nextSibling),n=e})},addClass:it,removeClass:rt,toggleClass:function(e,t,n){d(n)&&(n=!nt(e,t)),(n?it:rt)(e,t)},parent:function(e){return(e=e.parentNode)&&e.nodeType!==11?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;e!=null&&e.nodeType!==1;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:Q,triggerHandler:function(e,t){var n=(et(e,"events")||{})[t];r(n,function(t){t.call(e,null)})}},function(e,t){K.prototype[t]=function(t,r){for(var i,s=0;s<this.length;s++)i==n?(i=e(this[s],t,r),i!==n&&(i=kn(i))):st(i,e(this[s],t,r));return i==n?this:i}}),ct.prototype={put:function(e,t){this[lt(e)]=t},get:function(e){return this[lt(e)]},remove:function(e){var t=this[e=lt(e)];return delete this[e],t}},ht.prototype={push:function(e,t){var n=this[e=lt(e)];n?n.push(t):this[e]=[t]},shift:function(e){var t=this[e=lt(e)];if(t)return t.length==1?(delete this[e],t[0]):t.shift()},peek:function(e){if(e=this[lt(e)])return e[0]}};var Jn=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Kn=/,/,Qn=/^\s*(_?)(\S+?)\1\s*$/,Gn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Yn="Non-assignable model expression: ";wt.$inject=["$provide"];var Zn=/^(x[\:\-_]|data[\:\-_])/i,er=/^([^:]+):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,tr=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,nr=tr,rr={http:80,https:443,ftp:21};Mt.prototype={$$replace:!1,absUrl:Pt("$$absUrl"),url:function(e,t){if(d(e))return this.$$url;var n=tr.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Pt("$$protocol"),host:Pt("$$host"),port:Pt("$$port"),path:Ht("$$path",function(e){return e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){return d(e)?this.$$search:(v(t)?t===null?delete this.$$search[e]:this.$$search[e]=t:this.$$search=g(e)?j(e):e,this.$$compose(),this)},hash:Ht("$$hash",h),replace:function(){return this.$$replace=!0,this}},_t.prototype=l(Mt.prototype),Dt.prototype=l(_t.prototype);var ir={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":c,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(v(n)?n:0)-(v(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":c,"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},sr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},or={},ur=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw Error("This browser does not support XMLHttpRequest.")};un.$inject=["$provide"],fn.$inject=["$locale"],ln.$inject=["$locale"];var ar=".",fr={yyyy:pn("FullYear",4),yy:pn("FullYear",2,0,!0),y:pn("FullYear",1),MMMM:dn("Month"),MMM:dn("Month",!0),MM:pn("Month",2,1),M:pn("Month",1,1),dd:pn("Date",2),d:pn("Date",1),HH:pn("Hours",2),H:pn("Hours",1),hh:pn("Hours",2,-12),h:pn("Hours",1,-12),mm:pn("Minutes",2),m:pn("Minutes",1),ss:pn("Seconds",2),s:pn("Seconds",1),EEEE:dn("Day"),EEE:dn("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){var e=-1*e.getTimezoneOffset(),t=e>=0?"+":"";return t+=hn(e/60,2)+hn(Math.abs(e%60),2),t}},lr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,cr=/^\d+$/;vn.$inject=["$locale"];var hr=p(Tn),pr=p(Nn);yn.$inject=["$parse"];var dr=p({restrict:"E",compile:function(e,n){return Cn<=8&&(!n.href&&!n.name&&n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.bind("click",function(e){t.attr("href")||e.preventDefault()})}}}),vr={};r(Vn,function(e,t){var n=Et("ng-"+t);vr[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),r(["src","href"],function(e){var t=Et("ng-"+e);vr[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),Cn&&r.prop(e,i[e]))})}}}});var mr={$addControl:c,$removeControl:c,$setValidity:c,$setDirty:c};wn.$inject=["$element","$attrs","$scope"];var On=function(e){return["$timeout",function(t){var r={name:"form",restrict:"E",controller:wn,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Rn(r[0],"submit",o),r.bind("$destroy",function(){t(function(){Un(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),f=i.name||i.ngForm;f&&(e[f]=s),u&&r.bind("$destroy",function(){u.$removeControl(s),f&&(e[f]=n),a(s,mr)})}}}};return e?a(L(r),{restrict:"EAC"}):r}]},gr=On(),yr=On(!0),br=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,wr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,Er=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sr={text:Sn,number:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=En(e);return t||Er.test(e)?(i.$setValidity("number",!0),e===""?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return En(e)?"":""+e});if(r.min){var u=parseFloat(r.min),e=function(e){return!En(e)&&e<u?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)};i.$parsers.push(e),i.$formatters.push(e)}if(r.max){var a=parseFloat(r.max),r=function(e){return!En(e)&&e>a?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}i.$formatters.push(function(e){return En(e)||y(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||br.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||wr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){d(n.name)&&t.attr("name",u()),t.bind("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;g(i)||(i=!0),g(s)||(s=!1),t.bind("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:c,button:c,submit:c,reset:c},xr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Sr[Tn(i.type)]||Sr.text)(n,r,i,s,t,e)}}}],Tr="ng-valid",Nr="ng-invalid",Cr="ng-pristine",kr="ng-dirty",Lr=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,s){function o(e,t){t=t?"-"+z(t,"-"):"",i.removeClass((e?Nr:Tr)+t).addClass((e?Tr:Nr)+t)}this.$modelValue=this.$viewValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var u=s(n.ngModel),a=u.assign;if(!a)throw Error(Yn+n.ngModel+" ("+B(i)+")");this.$render=c;var f=i.inheritedData("$formController")||mr,l=0,h=this.$error={};i.addClass(Cr),o(!0),this.$setValidity=function(e,t){if(h[e]!==!t){if(t){if(h[e]&&l--,!l)o(!0),this.$valid=!0,this.$invalid=!1}else o(!1),this.$invalid=!0,this.$valid=!1,l++;h[e]=!t,o(t,e),f.$setValidity(e,t,this)}},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(Cr).addClass(kr),f.$setDirty()),r(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,a(e,n),r(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=u(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],Ar=function(){return{require:["ngModel","^?form"],controller:Lr,link:function(e,t,n,r){var i=r[0],s=r[1]||mr;s.$addControl(i),t.bind("$destroy",function(){s.$removeControl(i)})}}},Or=p({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Mr=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!En(e)&&e!==!1)return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},_r=function(){return{require:"ngModel",link:function(e,t,i,s){var o=(e=/\/(.*)\//.exec(i.ngList))&&RegExp(e[1])||i.ngList||",";s.$parsers.push(function(e){var t=[];return e&&r(e.split(o),function(e){e&&t.push(x(e))}),t}),s.$formatters.push(function(e){return w(e)?e.join(", "):n})}}},Dr=/^(true|false|\d+)$/,Pr=function(){return{priority:100,compile:function(e,t){return Dr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e,!1)})}}}},Hr=bn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),Br=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],jr=[function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.ngBindHtmlUnsafe),e.$watch(n.ngBindHtmlUnsafe,function(e){t.html(e||"")})}}],Fr=xn("",!0),Ir=xn("Odd",0),qr=xn("Even",1),Rr=bn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ur=[function(){return{scope:!0,controller:"@"}}],zr=["$sniffer",function(e){return{priority:1e3,compile:function(){e.csp=!0}}}],Wr={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(e){var t=Et("ng-"+e);Wr[t]=["$parse",function(n){return function(r,i,s){var o=n(s[t]);i.bind(Tn(e),function(e){r.$apply(function(){o(r,{$event:e})})})}}]});var Xr=bn(function(e,t,n){t.bind("submit",function(){e.$apply(n.ngSubmit)})}),Vr=["$http","$templateCache","$anchorScroll","$compile",function(e,t,n,r){return{restrict:"ECA",terminal:!0,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s){var f=0,l,c=function(){l&&(l.$destroy(),l=null),s.html("")};i.$watch(o,function(o){var h=++f;o?e.get(o,{cache:t}).success(function(e){h===f&&(l&&l.$destroy(),l=i.$new(),s.html(e),r(s.contents())(l),v(a)&&(!a||i.$eval(a))&&n(),l.$emit("$includeContentLoaded"),i.$eval(u))}).error(function(){h===f&&c()}):c()})}}}}],$r=bn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Jr=bn({terminal:!0,priority:1e3}),Kr=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,s,o){var u=o.count,a=s.attr(o.$attr.when),f=o.offset||0,l=i.$eval(a),c={},h=t.startSymbol(),p=t.endSymbol();r(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),i.$watch(function(){var t=parseFloat(i.$eval(u));return isNaN(t)?"":(l[t]||(t=e.pluralCat(t-f)),c[t](i,s,!0))},function(e){s.text(e)})}}}],Qr=bn({transclude:"element",priority:1e3,terminal:!0,compile:function(e,t,n){return function(e,t,r){var i=r.ngRepeat,r=i.match(/^\s*(.+)\s+in\s+(.*)\s*$/),s,o,u;if(!r)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+i+"'.");i=r[1],s=r[2],r=i.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!r)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+i+"'.");o=r[3]||r[1],u=r[2];var a=new ht;e.$watch(function(e){var r,i,f=e.$eval(s),l=t,c=new ht,h,p,d,v,m,g;if(w(f))m=f||[];else{m=[];for(d in f)f.hasOwnProperty(d)&&d.charAt(0)!="$"&&m.push(d);m.sort()}h=m.length,r=0;for(i=m.length;r<i;r++)d=f===m?r:m[r],v=f[d],(g=a.shift(v))?(p=g.scope,c.push(v,g),r!==g.index&&(g.index=r,l.after(g.element)),l=g.element):p=e.$new(),p[o]=v,u&&(p[u]=d),p.$index=r,p.$first=r===0,p.$last=r===h-1,p.$middle=!p.$first&&!p.$last,g||n(p,function(e){l.after(e),g={scope:p,element:l=e,index:r},c.push(v,g)});for(d in a)if(a.hasOwnProperty(d))for(m=a[d];m.length;)v=m.pop(),v.element.remove(),v.scope.$destroy();a=c})}}}),Gr=bn(function(e,t,n){e.$watch(n.ngShow,function(e){t.css("display",H(e)?"":"none")})}),Yr=bn(function(e,t,n){e.$watch(n.ngHide,function(e){t.css("display",H(e)?"none":"")})}),Zr=bn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ei=p({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,r){var i,s,o;e.$watch(n.ngSwitch||n.on,function(u){s&&(o.$destroy(),s.remove(),s=o=null);if(i=r.cases["!"+u]||r.cases["?"])e.$eval(n.change),o=e.$new(),i(o,function(e){s=e,t.append(e)})})}}),ti=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,r,i,s){s.cases["!"+t.ngSwitchWhen]=n}}}),ni=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,t,r,i){i.cases["?"]=n}}}),ri=bn({controller:["$transclude","$element",function(e,t){e(function(e){t.append(e)})}]}),ii=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(e,t,n,r,i,s){return{restrict:"ECA",terminal:!0,link:function(e,t,o){function u(){var o=n.current&&n.current.locals,u=o&&o.$template;if(u){t.html(u),a&&(a.$destroy(),a=null);var u=i(t.contents()),l=n.current;a=l.scope=e.$new(),l.controller&&(o.$scope=a,o=s(l.controller,o),t.children().data("$ngControllerController",o)),u(a),a.$emit("$viewContentLoaded"),a.$eval(f),r()}else t.html(""),a&&(a.$destroy(),a=null)}var a,f=o.onload||"";e.$on("$routeChangeSuccess",u),u()}}}],si=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){n.type=="text/ng-template"&&e.put(n.id,t[0].text)}}}],oi=p({terminal:!0}),ui=["$compile","$parse",function(e,s){var o=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,u={$setViewValue:c};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+lt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=c})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(T.parent()&&T.remove(),t.val(e),e===""&&E.prop("selected",!0)):d(e)&&E?t.val(""):r.renderUnknownOption(e)},t.bind("change",function(){e.$apply(function(){T.parent()&&T.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var i;n.$render=function(){var e=new ct(n.$viewValue);r(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=L(n.$viewValue),n.$render())}),t.bind("change",function(){e.$apply(function(){var e=[];r(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,r,u){function a(){var e={"":[]},s=[""],o,a,f,g,b;f=u.$modelValue,g=v(t)||[];var E=h?i(g):g,T,N,C;N={},b=!1;var k,L;if(y)b=new ct(f);else if(f===null||w)e[""].push({selected:f===null,id:"",label:""}),b=!0;for(C=0;T=E.length,C<T;C++)N[c]=g[h?N[h]=E[C]:C],o=p(t,N)||"",(a=e[o])||(a=e[o]=[],s.push(o)),y?o=b.remove(d(t,N))!=n:(o=f===d(t,N),b=b||o),k=l(t,N),k=k===n?"":k,a.push({id:h?E[C]:C,label:k,selected:o});!y&&!b&&e[""].unshift({id:"?",label:"",selected:!0}),N=0;for(E=s.length;N<E;N++){o=s[N],a=e[o],m.length<=N?(f={element:x.clone().attr("label",o),label:a.label},g=[f],m.push(g),r.append(f.element)):(g=m[N],f=g[0],f.label!=o)&&f.element.attr("label",f.label=o),k=null,C=0;for(T=a.length;C<T;C++)(o=a[C],b=g[C+1])?(k=b.element,b.label!==o.label&&k.text(b.label=o.label),b.id!==o.id&&k.val(b.id=o.id),b.element.selected!==o.selected&&k.prop("selected",b.selected=o.selected)):(o.id===""&&w?L=w:(L=S.clone()).val(o.id).attr("selected",o.selected).text(o.label),g.push({element:L,label:o.label,id:o.id,selected:o.selected}),k?k.after(L):f.element.append(L),k=L);for(C++;g.length>C;)g.pop().element.remove()}for(;m.length>N;)m.pop()[0].element.remove()}var f;if(!(f=b.match(o)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+b+"'.");var l=s(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=s(f[3]||""),d=s(f[2]?f[1]:c),v=s(f[7]),m=[[{element:r,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),r.html(""),r.bind("change",function(){t.$apply(function(){var e,i=v(t)||[],s={},o,a,f,l,p,g;if(y){a=[],l=0;for(g=m.length;l<g;l++){e=m[l],f=1;for(p=e.length;f<p;f++)(o=e[f].element)[0].selected&&(o=o.val(),h&&(s[h]=o),s[c]=i[o],a.push(d(t,s)))}}else o=r.val(),o=="?"?a=n:o==""?a=null:(s[c]=i[o],h&&(s[h]=o),a=d(t,s));u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){for(var m=l[0],g=l[1],y=f.multiple,b=f.ngOptions,w=!1,E,S=kn(t.createElement("option")),x=kn(t.createElement("optgroup")),T=S.clone(),l=0,N=a.children(),C=N.length;l<C;l++)if(N[l].value==""){E=w=N.eq(l);break}m.init(g,w,T);if(y&&(f.required||f.ngRequired)){var k=function(e){return g.$setValidity("required",!f.required||e&&e.length),e};g.$parsers.push(k),g.$formatters.unshift(k),f.$observe("required",function(){k(g.$viewValue)})}b?p(u,a,g):y?h(u,a,g):c(u,a,g,m)}}}}],ai=["$interpolate",function(e){var t={addOption:c,removeOption:c};return{restrict:"E",priority:100,compile:function(n,r){if(d(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.bind("$destroy",function(){o.removeOption(r.value)})}}}}],fi=p({restrict:"E",terminal:!0});(Ln=e.jQuery)?(kn=Ln,a(Ln.fn,{scope:Xn.scope,controller:Xn.controller,injector:Xn.injector,inheritedData:Xn.inheritedData}),J("remove",!0),J("empty"),J("html")):kn=K,_n.element=kn,function(t){a(t,{bootstrap:U,copy:L,extend:a,equals:O,element:kn,forEach:r,injector:dt,noop:c,bind:M,toJson:D,fromJson:P,identity:h,isUndefined:d,isDefined:v,isString:g,isFunction:E,isObject:m,isNumber:y,isElement:T,isArray:w,version:jn,isDate:b,lowercase:Tn,uppercase:Nn,callbacks:{counter:0}}),Dn=V(e);try{Dn("ngLocale")}catch(n){Dn("ngLocale",[]).provider("$locale",sn)}Dn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",wt).directive({a:dr,input:xr,textarea:xr,form:gr,script:si,select:ui,style:fi,option:ai,ngBind:Hr,ngBindHtmlUnsafe:jr,ngBindTemplate:Br,ngClass:Fr,ngClassEven:qr,ngClassOdd:Ir,ngCsp:zr,ngCloak:Rr,ngController:Ur,ngForm:yr,ngHide:Yr,ngInclude:Vr,ngInit:$r,ngNonBindable:Jr,ngPluralize:Kr,ngRepeat:Qr,ngShow:Gr,ngSubmit:Xr,ngStyle:Zr,ngSwitch:ei,ngSwitchWhen:ti,ngSwitchDefault:ni,ngOptions:oi,ngView:ii,ngTransclude:ri,ngModel:Ar,ngList:_r,ngChange:Or,required:Mr,ngRequired:Mr,ngValue:Pr}).directive(vr).directive(Wr),e.provider({$anchorScroll:vt,$browser:gt,$cacheFactory:yt,$controller:St,$document:xt,$exceptionHandler:Tt,$filter:un,$interpolate:Nt,$http:tn,$httpBackend:nn,$location:Bt,$log:jt,$parse:Wt,$route:$t,$routeParams:Jt,$rootScope:Kt,$q:Xt,$sniffer:Qt,$templateCache:bt,$timeout:on,$window:Gt})}])}(_n),kn(t).ready(function(){R(t,U)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>'),define("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(e,t,n){t.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(e,r){function i(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(t?null:/%20/g,"+")}function s(e,t){this.template=e+="#",this.defaults=t||{};var n=this.urlParams={};f(e.split(/\W/),function(t){t&&RegExp("(^|[^\\\\]):"+t+"\\W").test(e)&&(n[t]=!0)}),this.template=e.replace(/\\:/g,":")}function o(i,m,g){function b(e,t){var n={},t=l({},m,t);return f(t,function(t,i){var s;t.charAt&&t.charAt(0)=="@"?(s=t.substr(1),s=r(s)(e)):s=t,n[i]=s}),n}function E(e){c(e||{},this)}var S=new s(i),g=l({},u,g);return f(g,function(r,i){r.method=t.uppercase(r.method);var s=r.method=="POST"||r.method=="PUT"||r.method=="PATCH";E[i]=function(t,n,i,o){var u={},d,m=a,g=null;switch(arguments.length){case 4:g=o,m=i;case 3:case 2:if(!h(n)){u=t,d=n,m=i;break}if(h(t)){m=t,g=n;break}m=n,g=i;case 1:h(t)?m=t:s?d=t:u=t;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments."}var y=this instanceof E?this:r.isArray?[]:new E(d);return e({method:r.method,url:S.url(l({},b(d,r.params||{}),u)),data:d}).then(function(e){var t=e.data;t&&(r.isArray?(y.length=0,f(t,function(e){y.push(new E(e))})):c(t,y)),(m||a)(y,e.headers)},g),y},E.prototype["$"+i]=function(e,t,r){var o=b(this),u=a,f;switch(arguments.length){case 3:o=e,u=t,f=r;break;case 2:case 1:h(e)?(u=e,f=t):(o=e,u=t||a);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments."}E[i].call(this,o,s?this:n,u,f)}}),E.bind=function(e){return o(i,l({},m,e),g)},E}var u={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},a=t.noop,f=t.forEach,l=t.extend,c=t.copy,h=t.isFunction;return s.prototype={url:function(e){var n=this,r=this.template,s,o,e=e||{};f(this.urlParams,function(u,a){s=e.hasOwnProperty(a)?e[a]:n.defaults[a],t.isDefined(s)&&s!==null?(o=i(s,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),r=r.replace(RegExp(":"+a+"(\\W)","g"),o+"$1")):r=r.replace(RegExp("(/?):"+a+"(\\W)","g"),function(e,t,n){return n.charAt(0)=="/"?n:t+n})});var r=r.replace(/\/?#$/,""),u=[];return f(e,function(e,t){n.urlParams[t]||u.push(i(t)+"="+i(e))}),u.sort(),r=r.replace(/\/*$/,""),r+(u.length?"?"+u.join("&"):"")}},o}])}(window,window.angular),define("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){define("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){define("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){define("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};define("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={crop:!0,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate?n.view(i):f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){return l(),t.forEach(n.thumbnails,function(e){return n.trash(e)})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(r.size===t){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){e.name=t,this.thumbnails.push(e),a(e)},n),n.updateSelected()}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};define("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),define("jcrop",function(){}),define("domReady",[],function(){function u(e){var t;for(t=0;t<e.length;t+=1)e[t](s)}function a(){var e=o;i&&e.length&&(o=[],u(e))}function f(){i||(i=!0,n&&clearInterval(n),a())}function c(e){return i?e(s):o.push(e),c}var e,t,n,r=typeof window!="undefined"&&window.document,i=!r,s=r?document:null,o=[];if(r){if(document.addEventListener)document.addEventListener("DOMContentLoaded",f,!1),window.addEventListener("load",f,!1);else if(window.attachEvent){window.attachEvent("onload",f),t=document.createElement("div");try{e=window.frameElement===null}catch(l){}t.doScroll&&e&&window.external&&(n=setInterval(function(){try{t.doScroll(),f()}catch(e){}},30))}document.readyState==="complete"&&f()}return c.version="2.0.1",c.load=function(e,t,n,r){r.isBuild?n(null):c(n)},c}),function(){define("cs!jcrop-api",["cs!jquery","cs!settings","jcrop","domReady!"],function(e,t){var n,r;return r=null,n={onChange:function(){var e,t,n,i,s,o,u,a;u=this.getOptions().cropConstraints,i=u[0],n=u[1],e=this.getOptions().bgColor,a=this.tellSelect(),o=a.w,s=a.h,r=this,t=function(t){t!==e&&r.setOptions({bgColor:t})},i&&i>o||n&&n>s?t("red"):t("green")},onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){define("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){var r,s;if(t===n)return;r={"pte-action":"change-options",pte_crop_save:e.pteCropSave?"true":"false"},i.log(r),s=e.thumbnailResource.get(r,function(){return i.log("Updated options")})}),e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.updateSelected())},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;n=null,s=[null,null];try{l=!1,t=null,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],i=c.crop,p=c.width,f=c.height,i=+i,p=+p,f=+f,h=p/f;if(c.selected){u=s[0],o=s[1];if(!u||0<p&&u<p)u=p;if(!o||0<f&&o<f)o=f;s=[u,o],l=!0}i>0&&(t===null?t=h:t>0&&t!==h&&(t=-1));if(c.selected&&i>0){if(n!==null&&n!==h)throw"PTE_EXCEPTION";n=h}}n===null&&l===!1&&(t!==null&&t>0?n=t:n=r.width/r.height)}catch(g){a=g,e.setInfoMessage(e.i18n.crop_problems),n=null}e.aspectRatio=n,e.cropConstraints=s},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d;if(e.cropInProgress)return;e.cropInProgress=!0,a=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(a.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}d=t.tellSelect(),l=d.x,h=d.y,f=d.w,u=d.h,c=d.x2,p=d.y2;if(l===0&&h===0&&f===0&&u===0&&c===0&&p===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}s={"pte-action":"resize-images",id:r.id,"pte-sizes":a,w:f,h:u,x:l,y:h},e.pteCropSave&&(s.save="true"),o=e.thumbnailResource.get(s,function(){e.cropInProgress=!1;if(o!=null?o.immediate:void 0)return e.confirmResults(o);e.setNonces({"pte-nonce":o["pte-nonce"],"pte-delete-nonce":o["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;o.thumbnails[t.name]&&(n={url:o.thumbnails[t.name].url,file:o.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){define("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),function(){define("cs!csmain",["cs!jquery","angular","cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e,t,n){t.bootstrap(e(".wrap"),[n.name])})}.call(this),require({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min",domReady:"../apps/requirejs/domReady"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),define("main",function(){});
1
+ /**
2
+ * almond 0.2.5 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
3
+ * Available via the MIT or new BSD license.
4
+ * see: http://github.com/jrburke/almond for details
5
+ */
6
+
7
  /*
8
+ AngularJS v1.0.6
9
  (c) 2010-2012 Google, Inc. http://angularjs.org
10
  License: MIT
11
  */
17
  * https://github.com/tapmodo/Jcrop
18
  */
19
 
20
+ (function(){var e,t,n;(function(r){function d(e,t){return h.call(e,t)}function v(e,t){var n,r,i,s,o,u,a,f,c,h,p=t&&t.split("/"),d=l.map,v=d&&d["*"]||{};if(e&&e.charAt(0)===".")if(t){p=p.slice(0,p.length-1),e=p.concat(e.split("/"));for(f=0;f<e.length;f+=1){h=e[f];if(h===".")e.splice(f,1),f-=1;else if(h===".."){if(f===1&&(e[2]===".."||e[0]===".."))break;f>0&&(e.splice(f-1,2),f-=2)}}e=e.join("/")}else e.indexOf("./")===0&&(e=e.substring(2));if((p||v)&&d){n=e.split("/");for(f=n.length;f>0;f-=1){r=n.slice(0,f).join("/");if(p)for(c=p.length;c>0;c-=1){i=d[p.slice(0,c).join("/")];if(i){i=i[r];if(i){s=i,o=f;break}}}if(s)break;!u&&v&&v[r]&&(u=v[r],a=f)}!s&&u&&(s=u,o=a),s&&(n.splice(0,o,s),e=n.join("/"))}return e}function m(e,t){return function(){return s.apply(r,p.call(arguments,0).concat([e,t]))}}function g(e){return function(t){return v(t,e)}}function y(e){return function(t){a[e]=t}}function b(e){if(d(f,e)){var t=f[e];delete f[e],c[e]=!0,i.apply(r,t)}if(!d(a,e)&&!d(c,e))throw new Error("No "+e);return a[e]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function E(e){return function(){return l&&l.config&&l.config[e]||{}}}var i,s,o,u,a={},f={},l={},c={},h=Object.prototype.hasOwnProperty,p=[].slice;o=function(e,t){var n,r=w(e),i=r[0];return e=r[1],i&&(i=v(i,t),n=b(i)),i?n&&n.normalize?e=n.normalize(e,g(t)):e=v(e,t):(e=v(e,t),r=w(e),i=r[0],e=r[1],i&&(n=b(i))),{f:i?i+"!"+e:e,n:e,pr:i,p:n}},u={require:function(e){return m(e)},exports:function(e){var t=a[e];return typeof t!="undefined"?t:a[e]={}},module:function(e){return{id:e,uri:"",exports:a[e],config:E(e)}}},i=function(e,t,n,i){var s,l,h,p,v,g=[],w;i=i||e;if(typeof n=="function"){t=!t.length&&n.length?["require","exports","module"]:t;for(v=0;v<t.length;v+=1){p=o(t[v],i),l=p.f;if(l==="require")g[v]=u.require(e);else if(l==="exports")g[v]=u.exports(e),w=!0;else if(l==="module")s=g[v]=u.module(e);else if(d(a,l)||d(f,l)||d(c,l))g[v]=b(l);else{if(!p.p)throw new Error(e+" missing "+l);p.p.load(p.n,m(i,!0),y(l),{}),g[v]=a[l]}}h=n.apply(a[e],g);if(e)if(s&&s.exports!==r&&s.exports!==a[e])a[e]=s.exports;else if(h!==r||!w)a[e]=h}else e&&(a[e]=n)},e=t=s=function(e,t,n,a,f){return typeof e=="string"?u[e]?u[e](t):b(o(e,t).f):(e.splice||(l=e,t.splice?(e=t,t=n,n=null):e=r),t=t||function(){},typeof n=="function"&&(n=a,a=f),a?i(r,e,t,n):setTimeout(function(){i(r,e,t,n)},4),s)},s.config=function(e){return l=e,l.deps&&s(l.deps,l.callback),s},n=function(e,t,n){t.splice||(n=t,t=[]),!d(a,e)&&!d(f,e)&&(f[e]=[e,t,n])},n.amd={jQuery:!0}})(),n("../apps/requirejs/almond",function(){}),n("cs",{load:function(e){throw new Error("Dynamic load not allowed: "+e)}}),function(){n("cs!jquery",[],function(){return jQuery?jQuery.noConflict():{}})}.call(this),function(e,t,n){function r(e,t,n){var i;if(e)if(E(e))for(i in e)i!="prototype"&&i!="length"&&i!="name"&&e.hasOwnProperty(i)&&t.call(n,e[i],i);else if(e.forEach&&e.forEach!==r)e.forEach(t,n);else if(!e||typeof e.length!="number"?0:typeof e.hasOwnProperty!="function"&&typeof e.constructor!="function"||e instanceof K||Ln&&e instanceof Ln||Mn.call(e)!=="[object Object]"||typeof e.callee=="function")for(i=0;i<e.length;i++)t.call(n,e[i],i);else for(i in e)e.hasOwnProperty(i)&&t.call(n,e[i],i);return e}function i(e){var t=[],n;for(n in e)e.hasOwnProperty(n)&&t.push(n);return t.sort()}function s(e,t,n){for(var r=i(e),s=0;s<r.length;s++)t.call(n,e[r[s]],r[s]);return r}function o(e){return function(t,n){e(n,t)}}function u(){for(var e=Hn.length,t;e;){e--,t=Hn[e].charCodeAt(0);if(t==57)return Hn[e]="A",Hn.join("");if(t!=90)return Hn[e]=String.fromCharCode(t+1),Hn.join("");Hn[e]="0"}return Hn.unshift("0"),Hn.join("")}function a(e){return r(arguments,function(t){t!==e&&r(t,function(t,n){e[n]=t})}),e}function f(e){return parseInt(e,10)}function l(e,t){return a(new(a(function(){},{prototype:e})),t)}function c(){}function h(e){return e}function p(e){return function(){return e}}function d(e){return typeof e=="undefined"}function v(e){return typeof e!="undefined"}function m(e){return e!=null&&typeof e=="object"}function g(e){return typeof e=="string"}function y(e){return typeof e=="number"}function b(e){return Mn.apply(e)=="[object Date]"}function w(e){return Mn.apply(e)=="[object Array]"}function E(e){return typeof e=="function"}function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function x(e){return g(e)?e.replace(/^\s*/,"").replace(/\s*$/,""):e}function T(e){return e&&(e.nodeName||e.bind&&e.find)}function N(e,t,n){var i=[];return r(e,function(e,r,s){i.push(t.call(n,e,r,s))}),i}function C(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0;n<e.length;n++)if(t===e[n])return n;return-1}function k(e,t){var n=C(e,t);return n>=0&&e.splice(n,1),t}function L(e,t){if(S(e)||e&&e.$evalAsync&&e.$watch)throw Error("Can't copy Window or Scope");if(t){if(e===t)throw Error("Can't copy equivalent objects or arrays");if(w(e))for(var n=t.length=0;n<e.length;n++)t.push(L(e[n]));else for(n in r(t,function(e,n){delete t[n]}),e)t[n]=L(e[n])}else(t=e)&&(w(e)?t=L(e,[]):b(e)?t=new Date(e.getTime()):m(e)&&(t=L(e,{})));return t}function A(e,t){var t=t||{},n;for(n in e)e.hasOwnProperty(n)&&n.substr(0,2)!=="$$"&&(t[n]=e[n]);return t}function O(e,t){if(e===t)return!0;if(e===null||t===null)return!1;if(e!==e&&t!==t)return!0;var r=typeof e,i;if(r==typeof t&&r=="object"){if(!w(e)){if(b(e))return b(t)&&e.getTime()==t.getTime();if(e&&e.$evalAsync&&e.$watch||t&&t.$evalAsync&&t.$watch||S(e)||S(t))return!1;r={};for(i in e)if(i.charAt(0)!=="$"&&!E(e[i])){if(!O(e[i],t[i]))return!1;r[i]=!0}for(i in t)if(!r[i]&&i.charAt(0)!=="$"&&t[i]!==n&&!E(t[i]))return!1;return!0}if((r=e.length)==t.length){for(i=0;i<r;i++)if(!O(e[i],t[i]))return!1;return!0}}return!1}function M(e,t){var n=arguments.length>2?An.call(arguments,2):[];return!E(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,n.concat(An.call(arguments,0))):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function _(e,r){var i=r;return/^\$+/.test(e)?i=n:S(r)?i="$WINDOW":r&&t===r?i="$DOCUMENT":r&&r.$evalAsync&&r.$watch&&(i="$SCOPE"),i}function D(e,t){return JSON.stringify(e,_,t?" ":null)}function P(e){return g(e)?JSON.parse(e):e}function H(e){return e&&e.length!==0?(e=Tn(""+e),e=e!="f"&&e!="0"&&e!="false"&&e!="no"&&e!="n"&&e!="[]"):e=!1,e}function B(e){e=kn(e).clone();try{e.html("")}catch(t){}var n=kn("<div>").append(e).html();try{return e[0].nodeType===3?Tn(n):n.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(e,t){return"<"+Tn(t)})}catch(r){return Tn(n)}}function j(e){var t={},n,i;return r((e||"").split("&"),function(e){e&&(n=e.split("="),i=decodeURIComponent(n[0]),t[i]=v(n[1])?decodeURIComponent(n[1]):!0)}),t}function F(e){var t=[];return r(e,function(e,n){t.push(q(n,!0)+(e===!0?"":"="+q(e,!0)))}),t.length?t.join("&"):""}function I(e){return q(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function q(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function R(e,n){function i(e){e&&s.push(e)}var s=[e],o,u,a=["ng:app","ng-app","x-ng-app","data-ng-app"],f=/\sng[:\-]app(:\s*([\w\d_]+);?)?\s/;r(a,function(n){a[n]=!0,i(t.getElementById(n)),n=n.replace(":","\\:"),e.querySelectorAll&&(r(e.querySelectorAll("."+n),i),r(e.querySelectorAll("."+n+"\\:"),i),r(e.querySelectorAll("["+n+"]"),i))}),r(s,function(e){if(!o){var t=f.exec(" "+e.className+" ");t?(o=e,u=(t[2]||"").replace(/\s+/g,",")):r(e.attributes,function(t){!o&&a[t.name]&&(o=e,u=t.value)})}}),o&&n(o,u?[u]:[])}function U(t,n){var i=function(){t=kn(t),n=n||[],n.unshift(["$provide",function(e){e.value("$rootElement",t)}]),n.unshift("ng");var e=dt(n);return e.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),e},s=/^NG_DEFER_BOOTSTRAP!/;if(e&&!s.test(e.name))return i();e.name=e.name.replace(s,""),_n.resumeBootstrap=function(e){r(e,function(e){n.push(e)}),i()}}function z(e,t){return t=t||"_",e.replace(Bn,function(e,n){return(n?t:"")+e.toLowerCase()})}function W(e,t,n){if(!e)throw Error("Argument '"+(t||"?")+"' is "+(n||"required"));return e}function X(e,t,n){return n&&w(e)&&(e=e[e.length-1]),W(E(e),t,"not a function, got "+(e&&typeof e=="object"?e.constructor.name||"Object":typeof e)),e}function V(e){function t(e,t,n){return e[t]||(e[t]=n())}return t(t(e,"angular",Object),"module",function(){var e={};return function(n,r,i){return r&&e.hasOwnProperty(n)&&(e[n]=null),t(e,n,function(){function e(e,n,r){return function(){return t[r||"push"]([e,n,arguments]),u}}if(!r)throw Error("No module: "+n);var t=[],s=[],o=e("$injector","invoke"),u={_invokeQueue:t,_runBlocks:s,requires:r,name:n,provider:e("$provide","provider"),factory:e("$provide","factory"),service:e("$provide","service"),value:e("$provide","value"),constant:e("$provide","constant","unshift"),filter:e("$filterProvider","register"),controller:e("$controllerProvider","register"),directive:e("$compileProvider","directive"),config:o,run:function(e){return s.push(e),this}};return i&&o(i),u})}})}function $(e){return e.replace(zn,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Wn,"Moz$1")}function J(e,t){function n(){var e;for(var n=[this],i=t,s,o,u,a,f,l;n.length;){s=n.shift(),o=0;for(u=s.length;o<u;o++){a=kn(s[o]),i?a.triggerHandler("$destroy"):i=!i,f=0;for(e=(l=a.children()).length,a=e;f<a;f++)n.push(Ln(l[f]))}}return r.apply(this,arguments)}var r=Ln.fn[e],r=r.$original||r;n.$original=r,Ln.fn[e]=n}function K(e){if(e instanceof K)return e;if(!(this instanceof K)){if(g(e)&&e.charAt(0)!="<")throw Error("selectors not implemented");return new K(e)}if(g(e)){var n=t.createElement("div");n.innerHTML="<div>&#160;</div>"+e,n.removeChild(n.firstChild),st(this,n.childNodes),this.remove()}else st(this,e)}function Q(e){return e.cloneNode(!0)}function G(e){Z(e);for(var t=0,e=e.childNodes||[];t<e.length;t++)G(e[t])}function Y(e,t,n){var i=et(e,"events");et(e,"handle")&&(d(t)?r(i,function(t,n){Un(e,n,t),delete i[n]}):d(n)?(Un(e,t,i[t]),delete i[t]):k(i[t],n))}function Z(e){var t=e[In],r=Fn[t];r&&(r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),Y(e)),delete Fn[t],e[In]=n)}function et(e,t,n){var r=e[In],r=Fn[r||-1];if(!v(n))return r&&r[t];r||(e[In]=r=++qn,r=Fn[r]={}),r[t]=n}function tt(e,t,n){var r=et(e,"data"),i=v(n),s=!i&&v(t),o=s&&!m(t);!r&&!o&&et(e,"data",r={});if(i)r[t]=n;else{if(!s)return r;if(o)return r&&r[t];a(r,t)}}function nt(e,t){return(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")>-1}function rt(e,t){t&&r(t.split(" "),function(t){e.className=x((" "+e.className+" ").replace(/[\n\t]/g," ").replace(" "+x(t)+" "," "))})}function it(e,t){t&&r(t.split(" "),function(t){nt(e,t)||(e.className=x(e.className+" "+x(t)))})}function st(e,t){if(t)for(var t=!t.nodeName&&v(t.length)&&!S(t)?t:[t],n=0;n<t.length;n++)e.push(t[n])}function ot(e,t){return ut(e,"$"+(t||"ngController")+"Controller")}function ut(e,t,n){e=kn(e);for(e[0].nodeType==9&&(e=e.find("html"));e.length;){if(n=e.data(t))return n;e=e.parent()}}function at(e,t){var n=Vn[t.toLowerCase()];return n&&$n[e.nodeName]&&n}function ft(e,n){var i=function(i,s){i.preventDefault||(i.preventDefault=function(){i.returnValue=!1}),i.stopPropagation||(i.stopPropagation=function(){i.cancelBubble=!0}),i.target||(i.target=i.srcElement||t);if(d(i.defaultPrevented)){var o=i.preventDefault;i.preventDefault=function(){i.defaultPrevented=!0,o.call(i)},i.defaultPrevented=!1}i.isDefaultPrevented=function(){return i.defaultPrevented},r(n[s||i.type],function(t){t.call(e,i)}),Cn<=8?(i.preventDefault=null,i.stopPropagation=null,i.isDefaultPrevented=null):(delete i.preventDefault,delete i.stopPropagation,delete i.isDefaultPrevented)};return i.elem=e,i}function lt(e){var t=typeof e,r;return t=="object"&&e!==null?typeof (r=e.$$hashKey)=="function"?r=e.$$hashKey():r===n&&(r=e.$$hashKey=u()):r=e,t+":"+r}function ct(e){r(e,this.put,this)}function ht(){}function pt(e){var t,n;return typeof e=="function"?(t=e.$inject)||(t=[],n=e.toString().replace(Gn,""),n=n.match(Jn),r(n[1].split(Kn),function(e){e.replace(Qn,function(e,n,r){t.push(r)})}),e.$inject=t):w(e)?(n=e.length-1,X(e[n],"fn"),t=e.slice(0,n)):X(e,"fn",!0),t}function dt(e){function t(e){return function(t,n){if(!m(t))return e(t,n);r(t,o(e))}}function n(e,t){if(E(t)||w(t))t=v.instantiate(t);if(!t.$get)throw Error("Provider "+e+" must define $get factory method.");return d[e+f]=t}function i(e,t){return n(e,{$get:t})}function s(e){var t=[];return r(e,function(e){if(!h.get(e))if(h.put(e,!0),g(e)){var n=Dn(e);t=t.concat(s(n.requires)).concat(n._runBlocks);try{for(var r=n._invokeQueue,n=0,i=r.length;n<i;n++){var o=r[n],u=o[0]=="$injector"?v:v.get(o[0]);u[o[1]].apply(u,o[2])}}catch(a){throw a.message&&(a.message+=" from "+e),a}}else if(E(e))try{t.push(v.invoke(e))}catch(f){throw f.message&&(f.message+=" from "+e),f}else if(w(e))try{t.push(v.invoke(e))}catch(l){throw l.message&&(l.message+=" from "+String(e[e.length-1])),l}else X(e,"module")}),t}function u(e,t){function n(n){if(typeof n!="string")throw Error("Service name expected");if(e.hasOwnProperty(n)){if(e[n]===a)throw Error("Circular dependency: "+l.join(" <- "));return e[n]}try{return l.unshift(n),e[n]=a,e[n]=t(n)}finally{l.shift()}}function r(e,t,r){var i=[],s=pt(e),o,u,a;u=0;for(o=s.length;u<o;u++)a=s[u],i.push(r&&r.hasOwnProperty(a)?r[a]:n(a));e.$inject||(e=e[o]);switch(t?-1:i.length){case 0:return e();case 1:return e(i[0]);case 2:return e(i[0],i[1]);case 3:return e(i[0],i[1],i[2]);case 4:return e(i[0],i[1],i[2],i[3]);case 5:return e(i[0],i[1],i[2],i[3],i[4]);case 6:return e(i[0],i[1],i[2],i[3],i[4],i[5]);case 7:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6]);case 8:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7]);case 9:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8]);case 10:return e(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],i[9]);default:return e.apply(t,i)}}return{invoke:r,instantiate:function(e,t){var n=function(){},i;return n.prototype=(w(e)?e[e.length-1]:e).prototype,n=new n,i=r(e,n,t),m(i)?i:n},get:n,annotate:pt}}var a={},f="Provider",l=[],h=new ct,d={$provide:{provider:t(n),factory:t(i),service:t(function(e,t){return i(e,["$injector",function(e){return e.instantiate(t)}])}),value:t(function(e,t){return i(e,p(t))}),constant:t(function(e,t){d[e]=t,y[e]=t}),decorator:function(e,t){var n=v.get(e+f),r=n.$get;n.$get=function(){var e=b.invoke(r,n);return b.invoke(t,null,{$delegate:e})}}}},v=u(d,function(){throw Error("Unknown provider: "+l.join(" <- "))}),y={},b=y.$injector=u(y,function(e){return e=v.get(e+f),b.invoke(e.$get,e)});return r(s(e),function(e){b.invoke(e||c)}),b}function vt(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(t,n,i){function s(e){var t=null;return r(e,function(e){!t&&Tn(e.nodeName)==="a"&&(t=e)}),t}function o(){var e=n.hash(),r;e?(r=u.getElementById(e))?r.scrollIntoView():(r=s(u.getElementsByName(e)))?r.scrollIntoView():e==="top"&&t.scrollTo(0,0):t.scrollTo(0,0)}var u=t.document;return e&&i.$watch(function(){return n.hash()},function(){i.$evalAsync(o)}),o}]}function mt(e,t,i,s){function o(e){try{e.apply(null,An.call(arguments,1))}finally{if(b--,b===0)for(;w.length;)try{w.pop()()}catch(t){i.error(t)}}}function u(e,t){(function n(){r(E,function(e){e()}),S=t(n,e)})()}function a(){x!=f.url()&&(x=f.url(),r(N,function(e){e(f.url())}))}var f=this,l=t[0],h=e.location,p=e.history,v=e.setTimeout,m=e.clearTimeout,y={};f.isMock=!1;var b=0,w=[];f.$$completeOutstandingRequest=o,f.$$incOutstandingRequestCount=function(){b++},f.notifyWhenNoOutstandingRequests=function(e){r(E,function(e){e()}),b===0?e():w.push(e)};var E=[],S;f.addPollFn=function(e){return d(S)&&u(100,v),E.push(e),e};var x=h.href,T=t.find("base");f.url=function(e,t){if(!e)return h.href.replace(/%27/g,"'");if(x!=e)return x=e,s.history?t?p.replaceState(null,"",e):(p.pushState(null,"",e),T.attr("href",T.attr("href"))):t?h.replace(e):h.href=e,f};var N=[],C=!1;f.onUrlChange=function(t){return C||(s.history&&kn(e).bind("popstate",a),s.hashchange?kn(e).bind("hashchange",a):f.addPollFn(a),C=!0),N.push(t),t},f.baseHref=function(){var e=T.attr("href");return e?e.replace(/^https?\:\/\/[^\/]*/,""):""};var k={},L="",A=f.baseHref();f.cookies=function(e,t){var r,s,o,u;if(!e){if(l.cookie!==L){L=l.cookie,r=L.split("; "),k={};for(o=0;o<r.length;o++)s=r[o],u=s.indexOf("="),u>0&&(k[unescape(s.substring(0,u))]=unescape(s.substring(u+1)))}return k}t===n?l.cookie=escape(e)+"=;path="+A+";expires=Thu, 01 Jan 1970 00:00:00 GMT":g(t)&&(r=(l.cookie=escape(e)+"="+escape(t)+";path="+A).length+1,r>4096&&i.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+r+" > 4096 bytes)!"))},f.defer=function(e,t){var n;return b++,n=v(function(){delete y[n],o(e)},t||0),y[n]=!0,n},f.defer.cancel=function(e){return y[e]?(delete y[e],m(e),o(c),!0):!1}}function gt(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new mt(e,r,t,n)}]}function yt(){this.$get=function(){function e(e,n){function r(e){e!=c&&(h?h==e&&(h=e.n):h=e,i(e.n,e.p),i(e,c),c=e,c.n=null)}function i(e,t){e!=t&&(e&&(e.p=t),t&&(t.n=e))}if(e in t)throw Error("cacheId "+e+" taken");var s=0,o=a({},n,{id:e}),u={},f=n&&n.capacity||Number.MAX_VALUE,l={},c=null,h=null;return t[e]={put:function(e,t){var n=l[e]||(l[e]={key:e});r(n),d(t)||(e in u||s++,u[e]=t,s>f&&this.remove(h.key))},get:function(e){var t=l[e];if(t)return r(t),u[e]},remove:function(e){var t=l[e];t&&(t==c&&(c=t.p),t==h&&(h=t.n),i(t.n,t.p),delete l[e],delete u[e],s--)},removeAll:function(){u={},s=0,l={},c=h=null},destroy:function(){l=o=u=null,delete t[e]},info:function(){return a({},o,{size:s})}}}var t={};return e.info=function(){var e={};return r(t,function(t,n){e[n]=t.info()}),e},e.get=function(e){return t[e]},e}}function bt(){this.$get=["$cacheFactory",function(e){return e("templates")}]}function wt(e){var i={},s="Directive",u=/^\s*directive\:\s*([\d\w\-_]+)\s+(.*)$/,f=/(([\d\w\-_]+)(?:\:([^;]+))?;?)/,l="Template must have exactly one root element. was: ",c=/^\s*(https?|ftp|mailto|file):/;this.directive=function d(t,n){return g(t)?(W(n,"directive"),i.hasOwnProperty(t)||(i[t]=[],e.factory(t+s,["$injector","$exceptionHandler",function(e,n){var s=[];return r(i[t],function(r){try{var i=e.invoke(r);E(i)?i={compile:p(i)}:!i.compile&&i.link&&(i.compile=p(i.link)),i.priority=i.priority||0,i.name=i.name||t,i.require=i.require||i.controller&&i.name,i.restrict=i.restrict||"A",s.push(i)}catch(o){n(o)}}),s}])),i[t].push(n)):r(t,o(d)),this},this.urlSanitizationWhitelist=function(e){return v(e)?(c=e,this):c},this.$get=["$injector","$interpolate","$exceptionHandler","$http","$templateCache","$parse","$controller","$rootScope","$document",function(e,o,d,v,y,b,S,T,N){function C(e,t,n){e instanceof kn||(e=kn(e)),r(e,function(t,n){t.nodeType==3&&t.nodeValue.match(/\S+/)&&(e[n]=kn(t).wrap("<span></span>").parent()[0])});var i=L(e,t,e,n);return function(t,n){W(t,"scope");for(var r=n?Xn.clone.call(e):e,s=0,o=r.length;s<o;s++){var u=r[s];(u.nodeType==1||u.nodeType==9)&&r.eq(s).data("$scope",t)}return k(r,"ng-scope"),n&&n(r,t),i&&i(t,r,r),r}}function k(e,t){try{e.addClass(t)}catch(n){}}function L(e,t,r,i){function s(e,r,i,s){var u,a,f,l,c,h,p,d=[];c=0;for(h=r.length;c<h;c++)d.push(r[c]);p=c=0;for(h=o.length;c<h;p++)a=d[p],r=o[c++],u=o[c++],r?(r.scope?(f=e.$new(m(r.scope)),kn(a).data("$scope",f)):f=e,(l=r.transclude)||!s&&t?r(u,f,a,i,function(t){return function(n){var r=e.$new();return r.$$transcluded=!0,t(r,n).bind("$destroy",M(r,r.$destroy))}}(l||t)):r(u,f,a,n,s)):u&&u(e,a.childNodes,n,s)}for(var o=[],u,a,f,l=0;l<e.length;l++)a=new U,u=O(e[l],[],a,i),a=(u=u.length?_(u,e[l],a,t,r):null)&&u.terminal||!e[l].childNodes||!e[l].childNodes.length?null:L(e[l].childNodes,u?u.transclude:t),o.push(u),o.push(a),f=f||u||a;return f?s:null}function O(e,t,n,r){var i=n.$attr,s;switch(e.nodeType){case 1:D(t,Et(Pn(e).toLowerCase()),"E",r);var o,a,l;s=e.attributes;for(var c=0,h=s&&s.length;c<h;c++)if(o=s[c],o.specified)a=o.name,l=Et(a.toLowerCase()),i[l]=a,n[l]=o=x(Cn&&a=="href"?decodeURIComponent(e.getAttribute(a,2)):o.value),at(e,l)&&(n[l]=!0),q(e,t,o,l),D(t,l,"A",r);e=e.className;if(g(e)&&e!=="")for(;s=f.exec(e);)l=Et(s[2]),D(t,l,"C",r)&&(n[l]=x(s[3])),e=e.substr(s.index+s[0].length);break;case 3:I(t,e.nodeValue);break;case 8:try{if(s=u.exec(e.nodeValue))l=Et(s[1]),D(t,l,"M",r)&&(n[l]=x(s[2]))}catch(p){}}return t.sort(j),t}function _(e,i,s,o,u){function a(e,t){e&&(e.require=M.require,p.push(e)),t&&(t.require=M.require,v.push(t))}function f(e,t){var n,i="data",s=!1;if(g(e)){for(;(n=e.charAt(0))=="^"||n=="?";)e=e.substr(1),n=="^"&&(i="inheritedData"),s=s||n=="?";n=t[i]("$"+e+"Controller");if(!n&&!s)throw Error("No controller: "+e)}else w(e)&&(n=[],r(e,function(e){n.push(f(e,t))}));return n}function c(e,t,o,u,a){var l,c,h,m,g;l=i===o?s:A(s,new U(kn(o),s.$attr)),c=l.$$element;if(T){var y=/^\s*([@=&])\s*(\w*)\s*$/,w=t.$parent||t;r(T.scope,function(e,n){var r=e.match(y)||[],i=r[2]||n,r=r[1],s,o,u;t.$$isolateBindings[n]=r+i;switch(r){case"@":l.$observe(i,function(e){t[n]=e}),l.$$observers[i].$$scope=w;break;case"=":o=b(l[i]),u=o.assign||function(){throw s=t[n]=o(w),Error(Yn+l[i]+" (directive: "+T.name+")")},s=t[n]=o(w),t.$watch(function(){var e=o(w);return e!==t[n]&&(e!==s?s=t[n]=e:u(w,e=s=t[n])),e});break;case"&":o=b(l[i]),t[n]=function(e){return o(w,e)};break;default:throw Error("Invalid isolate scope definition for directive "+T.name+": "+e)}})}q&&r(q,function(e){var n={$scope:t,$element:c,$attrs:l,$transclude:a};g=e.controller,g=="@"&&(g=l[e.name]),c.data("$"+e.name+"Controller",S(g,n))}),u=0;for(h=p.length;u<h;u++)try{m=p[u],m(t,c,l,m.require&&f(m.require,c))}catch(E){d(E,B(c))}e&&e(t,o.childNodes,n,a),u=0;for(h=v.length;u<h;u++)try{m=v[u],m(t,c,l,m.require&&f(m.require,c))}catch(x){d(x,B(c))}}for(var h=-Number.MAX_VALUE,p=[],v=[],y=null,T=null,N=null,L=s.$$element=kn(i),M,_,D,j,I=o,q,z,W,X=0,V=e.length;X<V;X++){M=e[X],D=n;if(h>M.priority)break;if(W=M.scope)F("isolated scope",T,M,L),m(W)&&(k(L,"ng-isolate-scope"),T=M),k(L,"ng-scope"),y=y||M;_=M.name;if(W=M.controller)q=q||{},F("'"+_+"' controller",q[_],M,L),q[_]=M;if(W=M.transclude)F("transclusion",j,M,L),j=M,h=M.priority,W=="element"?(D=kn(i),L=s.$$element=kn(t.createComment(" "+_+": "+s[_]+" ")),i=L[0],R(u,kn(D[0]),i),I=C(D,o,h)):(D=kn(Q(i)).contents(),L.html(""),I=C(D,o));if(W=M.template)if(F("template",N,M,L),N=M,W=J(W),M.replace){D=kn("<div>"+x(W)+"</div>").contents(),i=D[0];if(D.length!=1||i.nodeType!==1)throw Error(l+W);R(u,L,i),_={$attr:{}},e=e.concat(O(i,e.splice(X+1,e.length-(X+1)),_)),P(s,_),V=e.length}else L.html(W);if(M.templateUrl)F("template",N,M,L),N=M,c=H(e.splice(X,e.length-X),c,L,s,u,M.replace,I),V=e.length;else if(M.compile)try{z=M.compile(L,s,I),E(z)?a(null,z):z&&a(z.pre,z.post)}catch($){d($,B(L))}M.terminal&&(c.terminal=!0,h=Math.max(h,M.priority))}return c.scope=y&&y.scope,c.transclude=j&&I,c}function D(t,r,o,u){var a=!1;if(i.hasOwnProperty(r))for(var f,r=e.get(r+s),l=0,c=r.length;l<c;l++)try{if(f=r[l],(u===n||u>f.priority)&&f.restrict.indexOf(o)!=-1)t.push(f),a=!0}catch(h){d(h)}return a}function P(e,t){var n=t.$attr,i=e.$attr,s=e.$$element;r(e,function(r,i){i.charAt(0)!="$"&&(t[i]&&(r+=(i==="style"?";":" ")+t[i]),e.$set(i,r,!0,n[i]))}),r(t,function(t,r){r=="class"?(k(s,t),e["class"]=(e["class"]?e["class"]+" ":"")+t):r=="style"?s.attr("style",s.attr("style")+";"+t):r.charAt(0)!="$"&&!e.hasOwnProperty(r)&&(e[r]=t,i[r]=n[r])})}function H(e,t,n,r,i,s,o){var u=[],f,c,h=n[0],p=e.shift(),d=a({},p,{controller:null,templateUrl:null,transclude:null,scope:null});return n.html(""),v.get(p.templateUrl,{cache:y}).success(function(a){var p,v,a=J(a);if(s){v=kn("<div>"+x(a)+"</div>").contents(),p=v[0];if(v.length!=1||p.nodeType!==1)throw Error(l+a);a={$attr:{}},R(i,n,p),O(p,e,a),P(r,a)}else p=h,n.html(a);e.unshift(d),f=_(e,p,r,o);for(c=L(n[0].childNodes,o);u.length;){var m=u.pop(),a=u.pop();v=u.pop();var g=u.pop(),y=p;v!==h&&(y=Q(p),R(a,kn(v),y)),f(function(){t(c,g,y,i,m)},g,y,i,m)}u=null}).error(function(e,t,n,r){throw Error("Failed to load template: "+r.url)}),function(e,n,r,i,s){u?(u.push(n),u.push(r),u.push(i),u.push(s)):f(function(){t(c,n,r,i,s)},n,r,i,s)}}function j(e,t){return t.priority-e.priority}function F(e,t,n,r){if(t)throw Error("Multiple directives ["+t.name+", "+n.name+"] asking for "+e+" on: "+B(r))}function I(e,t){var n=o(t,!0);n&&e.push({priority:0,compile:p(function(e,t){var r=t.parent(),i=r.data("$binding")||[];i.push(n),k(r.data("$binding",i),"ng-binding"),e.$watch(n,function(e){t[0].nodeValue=e})})})}function q(e,t,r,i){var s=o(r,!0);s&&t.push({priority:100,compile:p(function(e,t,r){t=r.$$observers||(r.$$observers={}),i==="class"&&(s=o(r[i],!0)),r[i]=n,(t[i]||(t[i]=[])).$$inter=!0,(r.$$observers&&r.$$observers[i].$$scope||e).$watch(s,function(e){r.$set(i,e)})})})}function R(e,t,n){var r=t[0],i=r.parentNode,s,o;if(e){s=0;for(o=e.length;s<o;s++)if(e[s]==r){e[s]=n;break}}i&&i.replaceChild(n,r),n[kn.expando]=r[kn.expando],t[0]=n}var U=function(e,t){this.$$element=e,this.$attr=t||{}};U.prototype={$normalize:Et,$set:function(e,t,i,s){var o=at(this.$$element[0],e),u=this.$$observers;o&&(this.$$element.prop(e,t),s=o),this[e]=t,s?this.$attr[e]=s:(s=this.$attr[e])||(this.$attr[e]=s=z(e,"-")),Pn(this.$$element[0])==="A"&&e==="href"&&(X.setAttribute("href",t),o=X.href,o.match(c)||(this[e]=t="unsafe:"+o)),i!==!1&&(t===null||t===n?this.$$element.removeAttr(s):this.$$element.attr(s,t)),u&&r(u[e],function(e){try{e(t)}catch(n){d(n)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers={}),i=r[e]||(r[e]=[]);return i.push(t),T.$evalAsync(function(){i.$$inter||t(n[e])}),t}};var X=N[0].createElement("a"),V=o.startSymbol(),$=o.endSymbol(),J=V=="{{"||$=="}}"?h:function(e){return e.replace(/\{\{/g,V).replace(/}}/g,$)};return C}]}function Et(e){return $(e.replace(Zn,""))}function St(){var e={};this.register=function(t,n){m(t)?a(e,t):e[t]=n},this.$get=["$injector","$window",function(t,n){return function(r,i){if(g(r)){var s=r,r=e.hasOwnProperty(s)?e[s]:Rt(i.$scope,s,!0)||Rt(n,s,!0);X(r,s,!0)}return t.instantiate(r,i)}}]}function xt(){this.$get=["$window",function(e){return kn(e.document)}]}function Tt(){this.$get=["$log",function(e){return function(t,n){e.error.apply(e,arguments)}}]}function Nt(){var e="{{",t="}}";this.startSymbol=function(t){return t?(e=t,this):e},this.endSymbol=function(e){return e?(t=e,this):t},this.$get=["$parse",function(r){function i(i,u){for(var a,f,l=0,c=[],h=i.length,p=!1,d=[];l<h;)(a=i.indexOf(e,l))!=-1&&(f=i.indexOf(t,a+s))!=-1?(l!=a&&c.push(i.substring(l,a)),c.push(l=r(p=i.substring(a+s,f))),l.exp=p,l=f+o,p=!0):(l!=h&&c.push(i.substring(l)),l=h);(h=c.length)||(c.push(""),h=1);if(!u||p)return d.length=h,l=function(e){for(var t=0,r=h,i;t<r;t++)typeof (i=c[t])=="function"&&(i=i(e),i==null||i==n?i="":typeof i!="string"&&(i=D(i))),d[t]=i;return d.join("")},l.exp=i,l.parts=c,l}var s=e.length,o=t.length;return i.startSymbol=function(){return e},i.endSymbol=function(){return t},i}]}function Ct(e){for(var e=e.split("/"),t=e.length;t--;)e[t]=I(e[t]);return e.join("/")}function kt(e,t){var n=er.exec(e),n={protocol:n[1],host:n[3],port:f(n[5])||rr[n[1]]||null,path:n[6]||"/",search:n[8],hash:n[10]};return t&&(t.$$protocol=n.protocol,t.$$host=n.host,t.$$port=n.port),n}function Lt(e,t,n){return e+"://"+t+(n==rr[e]?"":":"+n)}function At(e,t,n){var r=kt(e);return decodeURIComponent(r.path)!=t||d(r.hash)||r.hash.indexOf(n)!==0?e:Lt(r.protocol,r.host,r.port)+t.substr(0,t.lastIndexOf("/"))+r.hash.substr(n.length)}function Ot(e,t,n){var r=kt(e);if(decodeURIComponent(r.path)==t&&!d(r.hash)&&r.hash.indexOf(n)===0)return e;var i=r.search&&"?"+r.search||"",s=r.hash&&"#"+r.hash||"",o=t.substr(0,t.lastIndexOf("/")),u=r.path.substr(o.length);if(r.path.indexOf(o)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+o+'" !');return Lt(r.protocol,r.host,r.port)+t+"#"+n+u+i+s}function Mt(e,t,n){t=t||"",this.$$parse=function(e){var n=kt(e,this);if(n.path.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing path prefix "'+t+'" !');this.$$path=decodeURIComponent(n.path.substr(t.length)),this.$$search=j(n.search),this.$$hash=n.hash&&decodeURIComponent(n.hash)||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+t+this.$$url},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function _t(e,t,n){var r;this.$$parse=function(e){var n=kt(e,this);if(n.hash&&n.hash.indexOf(t)!==0)throw Error('Invalid url "'+e+'", missing hash prefix "'+t+'" !');r=n.path+(n.search?"?"+n.search:""),n=nr.exec((n.hash||"").substr(t.length)),this.$$path=n[1]?(n[1].charAt(0)=="/"?"":"/")+decodeURIComponent(n[1]):"",this.$$search=j(n[3]),this.$$hash=n[5]&&decodeURIComponent(n[5])||"",this.$$compose()},this.$$compose=function(){var e=F(this.$$search),n=this.$$hash?"#"+I(this.$$hash):"";this.$$url=Ct(this.$$path)+(e?"?"+e:"")+n,this.$$absUrl=Lt(this.$$protocol,this.$$host,this.$$port)+r+(this.$$url?"#"+t+this.$$url:"")},this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return e},this.$$parse(e)}function Dt(e,t,n,r){_t.apply(this,arguments),this.$$rewriteAppUrl=function(e){if(e.indexOf(n)==0)return n+r+"#"+t+e.substr(n.length)}}function Pt(e){return function(){return this[e]}}function Ht(e,t){return function(n){return d(n)?this[e]:(this[e]=t(n),this.$$compose(),this)}}function Bt(){var t="",n=!1;this.hashPrefix=function(e){return v(e)?(t=e,this):t},this.html5Mode=function(e){return v(e)?(n=e,this):n},this.$get=["$rootScope","$browser","$sniffer","$rootElement",function(r,i,s,o){function u(e){r.$broadcast("$locationChangeSuccess",a.absUrl(),e)}var a,f,l,c=i.url(),h=kt(c);n?(f=i.baseHref()||"/",l=f.substr(0,f.lastIndexOf("/")),h=Lt(h.protocol,h.host,h.port)+l+"/",a=s.history?new Mt(At(c,f,t),l,h):new Dt(Ot(c,f,t),t,h,f.substr(l.length+1))):(h=Lt(h.protocol,h.host,h.port)+(h.path||"")+(h.search?"?"+h.search:"")+"#"+t+"/",a=new _t(c,t,h)),o.bind("click",function(t){if(!t.ctrlKey&&!t.metaKey&&t.which!=2){for(var n=kn(t.target);Tn(n[0].nodeName)!=="a";)if(n[0]===o[0]||!(n=n.parent())[0])return;var i=n.prop("href"),s=a.$$rewriteAppUrl(i);i&&!n.attr("target")&&s&&(a.$$parse(s),r.$apply(),t.preventDefault(),e.angular["ff-684208-preventDefault"]=!0)}}),a.absUrl()!=c&&i.url(a.absUrl(),!0),i.onUrlChange(function(e){a.absUrl()!=e&&(r.$evalAsync(function(){var t=a.absUrl();a.$$parse(e),u(t)}),r.$$phase||r.$digest())});var p=0;return r.$watch(function(){var e=i.url(),t=a.$$replace;if(!p||e!=a.absUrl())p++,r.$evalAsync(function(){r.$broadcast("$locationChangeStart",a.absUrl(),e).defaultPrevented?a.$$parse(e):(i.url(a.absUrl(),t),u(e))});return a.$$replace=!1,p}),a}]}function jt(){this.$get=["$window",function(e){function t(e){return e instanceof Error&&(e.stack?e=e.message&&e.stack.indexOf(e.message)===-1?"Error: "+e.message+"\n"+e.stack:e.stack:e.sourceURL&&(e=e.message+"\n"+e.sourceURL+":"+e.line)),e}function n(n){var i=e.console||{},s=i[n]||i.log||c;return s.apply?function(){var e=[];return r(arguments,function(n){e.push(t(n))}),s.apply(i,e)}:function(e,t){s(e,t)}}return{log:n("log"),warn:n("warn"),info:n("info"),error:n("error")}}]}function Ft(e,t){function n(e){return e.indexOf(y)!=-1}function r(){return m+1<e.length?e.charAt(m+1):!1}function i(e){return"0"<=e&&e<="9"}function s(e){return e==" "||e=="\r"||e==" "||e=="\n"||e==""||e==" "}function o(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"==e||e=="$"}function u(e){return e=="-"||e=="+"||i(e)}function f(t,n,r){throw r=r||m,Error("Lexer Error: "+t+" at column"+(v(n)?"s "+n+"-"+m+" ["+e.substring(n,r)+"]":" "+r)+" in expression ["+e+"].")}function l(){for(var t="",n=m;m<e.length;){var s=Tn(e.charAt(m));if(s=="."||i(s))t+=s;else{var o=r();if(s=="e"&&u(o))t+=s;else if(u(s)&&o&&i(o)&&t.charAt(t.length-1)=="e")t+=s;else{if(!u(s)||!!o&&!!i(o)||t.charAt(t.length-1)!="e")break;f("Invalid exponent")}}m++}t*=1,p.push({index:n,text:t,json:!0,fn:function(){return t}})}function c(){for(var n="",r=m,u,f,l;m<e.length;){var c=e.charAt(m);if(c!="."&&!o(c)&&!i(c))break;c=="."&&(u=m),n+=c,m++}if(u)for(f=m;f<e.length;){c=e.charAt(f);if(c=="("){l=n.substr(u-r+1),n=n.substr(0,u-r),m=f;break}if(!s(c))break;f++}r={index:r,text:n};if(ir.hasOwnProperty(n))r.fn=r.json=ir[n];else{var h=zt(n,t);r.fn=a(function(e,t){return h(e,t)},{assign:function(e,t){return qt(e,n,t)}})}p.push(r),l&&(p.push({index:u,text:".",json:!1}),p.push({index:u+1,text:l,json:!1}))}function h(t){var n=m;m++;for(var r="",i=t,s=!1;m<e.length;){var o=e.charAt(m);i+=o;if(s)o=="u"?(o=e.substring(m+1,m+5),o.match(/[\da-f]{4}/i)||f("Invalid unicode escape [\\u"+o+"]"),m+=4,r+=String.fromCharCode(parseInt(o,16))):(s=sr[o],r+=s?s:o),s=!1;else if(o=="\\")s=!0;else{if(o==t){m++,p.push({index:n,text:i,string:r,json:!0,fn:function(){return r}});return}r+=o}m++}f("Unterminated quote",n)}for(var p=[],d,m=0,g=[],y,b=":";m<e.length;){y=e.charAt(m);if(n("\"'"))h(y);else if(i(y)||n(".")&&i(r()))l();else if(o(y)){if(c(),"{,".indexOf(b)!=-1&&g[0]=="{"&&(d=p[p.length-1]))d.json=d.text.indexOf(".")==-1}else if(n("(){}[].,;:"))p.push({index:m,text:y,json:":[,".indexOf(b)!=-1&&n("{[")||n("}]:,")}),n("{[")&&g.unshift(y),n("}]")&&g.shift(),m++;else{if(s(y)){m++;continue}var w=y+r(),E=ir[y],S=ir[w];S?(p.push({index:m,text:w,fn:S}),m+=2):E?(p.push({index:m,text:y,fn:E,json:"[,:".indexOf(b)!=-1&&n("+-")}),m+=1):f("Unexpected next character ",m,m+1)}b=y}return p}function It(e,t,r,i){function s(t,n){throw Error("Syntax Error: Token '"+n.text+"' "+t+" at column "+(n.index+1)+" of the expression ["+e+"] starting at ["+e.substring(n.index)+"].")}function o(){if(L.length===0)throw Error("Unexpected end of expression: "+e);return L[0]}function u(e,t,n,r){if(L.length>0){var i=L[0],s=i.text;if(s==e||s==t||s==n||s==r||!e&&!t&&!n&&!r)return i}return!1}function f(e,n,r,i){return(e=u(e,n,r,i))?(t&&!e.json&&s("is not valid json",e),L.shift(),e):!1}function l(e){f(e)||s("is unexpected, expecting ["+e+"]",u())}function h(e,t){return function(n,r){return e(n,r,t)}}function d(e,t,n){return function(r,i){return t(r,i,e,n)}}function v(){for(var e=[];;)if(L.length>0&&!u("}",")",";","]")&&e.push(D()),!f(";"))return e.length==1?e[0]:function(t,n){for(var r,i=0;i<e.length;i++){var s=e[i];s&&(r=s(t,n))}return r}}function m(){for(var e=f(),t=r(e.text),n=[];;){if(!(e=f(":"))){var i=function(e,r,i){for(var i=[i],s=0;s<n.length;s++)i.push(n[s](e,r));return t.apply(e,i)};return function(){return i}}n.push(A())}}function g(){for(var e=y(),t;;){if(!(t=f("||")))return e;e=d(e,t.fn,y())}}function y(){var e=b(),t;if(t=f("&&"))e=d(e,t.fn,y());return e}function b(){var e=w(),t;if(t=f("==","!="))e=d(e,t.fn,b());return e}function w(){var e;e=E();for(var t;t=f("+","-");)e=d(e,t.fn,E());if(t=f("<",">","<=",">="))e=d(e,t.fn,w());return e}function E(){for(var e=S(),t;t=f("*","/","%");)e=d(e,t.fn,S());return e}function S(){var e;return f("+")?x():(e=f("-"))?d(C,e.fn,S()):(e=f("!"))?h(e.fn,S()):x()}function x(){var e;if(f("("))e=D(),l(")");else if(f("["))e=T();else if(f("{"))e=N();else{var t=f();(e=t.fn)||s("not a primary expression",t)}for(var n;t=f("(","[",".");)t.text==="("?(e=O(e,n),n=null):t.text==="["?(n=e,e=_(e)):t.text==="."?(n=e,e=M(e)):s("IMPOSSIBLE");return e}function T(){var e=[];if(o().text!="]")do e.push(A());while(f(","));return l("]"),function(t,n){for(var r=[],i=0;i<e.length;i++)r.push(e[i](t,n));return r}}function N(){var e=[];if(o().text!="}")do{var t=f(),t=t.string||t.text;l(":");var n=A();e.push({key:t,value:n})}while(f(","));return l("}"),function(t,n){for(var r={},i=0;i<e.length;i++){var s=e[i],o=s.value(t,n);r[s.key]=o}return r}}var C=p(0),k,L=Ft(e,i),A=function(){var t=g(),n,r;return(r=f("="))?(t.assign||s("implies assignment but ["+e.substring(0,r.index)+"] can not be assigned to",r),n=g(),function(e,r){return t.assign(e,n(e,r),r)}):t},O=function(e,t){var n=[];if(o().text!=")")do n.push(A());while(f(","));return l(")"),function(r,i){for(var s=[],o=t?t(r,i):r,u=0;u<n.length;u++)s.push(n[u](r,i));return u=e(r,i)||c,u.apply?u.apply(o,s):u(s[0],s[1],s[2],s[3],s[4])}},M=function(e){var t=f().text,n=zt(t,i);return a(function(t,r){return n(e(t,r),r)},{assign:function(n,r,i){return qt(e(n,i),t,r)}})},_=function(e){var t=A();return l("]"),a(function(r,i){var s=e(r,i),o=t(r,i),u;return s?((s=s[o])&&s.then&&(u=s,"$$v"in s||(u.$$v=n,u.then(function(e){u.$$v=e})),s=s.$$v),s):n},{assign:function(n,r,i){return e(n,i)[t(n,i)]=r}})},D=function(){for(var e=A(),t;;){if(!(t=f("|")))return e;e=d(e,t.fn,m())}};return t?(A=g,O=M=_=D=function(){s("is not valid json",{text:e,index:0})},k=x()):k=v(),L.length!==0&&s("is an unexpected token",L[0]),k}function qt(e,t,n){for(var t=t.split("."),r=0;t.length>1;r++){var i=t.shift(),s=e[i];s||(s={},e[i]=s),e=s}return e[t.shift()]=n}function Rt(e,t,n){if(!t)return e;for(var t=t.split("."),r,i=e,s=t.length,o=0;o<s;o++)r=t[o],e&&(e=(i=e)[r]);return!n&&E(e)?M(i,e):e}function Ut(e,t,r,i,s){return function(o,u){var a=u&&u.hasOwnProperty(e)?u:o,f;return a===null||a===n?a:((a=a[e])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!t||a===null||a===n?a:((a=a[t])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!r||a===null||a===n?a:((a=a[r])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!i||a===null||a===n?a:((a=a[i])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),!s||a===null||a===n?a:((a=a[s])&&a.then&&("$$v"in a||(f=a,f.$$v=n,f.then(function(e){f.$$v=e})),a=a.$$v),a)))))}}function zt(e,t){if(or.hasOwnProperty(e))return or[e];var i=e.split("."),s=i.length,o;if(t)o=s<6?Ut(i[0],i[1],i[2],i[3],i[4]):function(e,t){var r=0,o;do o=Ut(i[r++],i[r++],i[r++],i[r++],i[r++])(e,t),t=n,e=o;while(r<s);return o};else{var u="var l, fn, p;\n";r(i,function(e,t){u+="if(s === null || s === undefined) return s;\nl=s;\ns="+(t?"s":'((k&&k.hasOwnProperty("'+e+'"))?k:s)')+'["'+e+'"];\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'}),u+="return s;",o=Function("s","k",u),o.toString=function(){return u}}return or[e]=o}function Wt(){var e={};this.$get=["$filter","$sniffer",function(t,n){return function(r){switch(typeof r){case"string":return e.hasOwnProperty(r)?e[r]:e[r]=It(r,!1,t,n.csp);case"function":return r;default:return c}}}]}function Xt(){this.$get=["$rootScope","$exceptionHandler",function(e,t){return Vt(function(t){e.$evalAsync(t)},t)}]}function Vt(e,t){function i(e){return e}function s(e){return a(e)}var o=function(){var r=[],f,l;return l={resolve:function(t){if(r){var i=r;r=n,f=u(t),i.length&&e(function(){for(var e,t=0,n=i.length;t<n;t++)e=i[t],f.then(e[0],e[1])})}},reject:function(e){l.resolve(a(e))},promise:{then:function(e,n){var u=o(),a=function(n){try{u.resolve((e||i)(n))}catch(r){t(r),u.reject(r)}},l=function(e){try{u.resolve((n||s)(e))}catch(r){t(r),u.reject(r)}};return r?r.push([a,l]):f.then(a,l),u.promise}}}},u=function(t){return t&&t.then?t:{then:function(n){var r=o();return e(function(){r.resolve(n(t))}),r.promise}}},a=function(t){return{then:function(n,r){var i=o();return e(function(){i.resolve((r||s)(t))}),i.promise}}};return{defer:o,reject:a,when:function(n,r,f){var l=o(),c,h=function(e){try{return(r||i)(e)}catch(n){return t(n),a(n)}},p=function(e){try{return(f||s)(e)}catch(n){return t(n),a(n)}};return e(function(){u(n).then(function(e){c||(c=!0,l.resolve(u(e).then(h,p)))},function(e){c||(c=!0,l.resolve(p(e)))})}),l.promise},all:function(e){var t=o(),n=e.length,i=[];return n?r(e,function(e,r){u(e).then(function(e){r in i||(i[r]=e,--n||t.resolve(i))},function(e){r in i||t.reject(e)})}):t.resolve(i),t.promise}}}function $t(){var e={};this.when=function(t,n){e[t]=a({reloadOnSearch:!0},n);if(t){var r=t[t.length-1]=="/"?t.substr(0,t.length-1):t+"/";e[r]={redirectTo:t}}return this},this.otherwise=function(e){return this.when(null,e),this},this.$get=["$rootScope","$location","$routeParams","$q","$injector","$http","$templateCache",function(t,n,i,s,o,u,f){function c(e,t){for(var t="^"+t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"$",n="",i=[],s={},o=/:(\w+)/g,u,a=0;(u=o.exec(t))!==null;)n+=t.slice(a,u.index),n+="([^\\/]*)",i.push(u[1]),a=o.lastIndex;n+=t.substr(a);var f=e.match(RegExp(n));return f&&r(i,function(e,t){s[e]=f[t+1]}),f?s:null}function h(){var e=p(),a=y.current;if(e&&a&&e.$$route===a.$$route&&O(e.pathParams,a.pathParams)&&!e.reloadOnSearch&&!m)a.params=e.params,L(a.params,i),t.$broadcast("$routeUpdate",a);else if(e||a)m=!1,t.$broadcast("$routeChangeStart",e,a),(y.current=e)&&e.redirectTo&&(g(e.redirectTo)?n.path(d(e.redirectTo,e.params)).search(e.params).replace():n.url(e.redirectTo(e.pathParams,n.path(),n.search())).replace()),s.when(e).then(function(){if(e){var t=[],n=[],i;return r(e.resolve||{},function(e,r){t.push(r),n.push(g(e)?o.get(e):o.invoke(e))}),v(i=e.template)||v(i=e.templateUrl)&&(i=u.get(i,{cache:f}).then(function(e){return e.data})),v(i)&&(t.push("$template"),n.push(i)),s.all(n).then(function(e){var n={};return r(e,function(e,r){n[t[r]]=e}),n})}}).then(function(n){e==y.current&&(e&&(e.locals=n,L(e.params,i)),t.$broadcast("$routeChangeSuccess",e,a))},function(n){e==y.current&&t.$broadcast("$routeChangeError",e,a,n)})}function p(){var t,i;return r(e,function(e,r){!i&&(t=c(n.path(),r))&&(i=l(e,{params:a({},n.search(),t),pathParams:t}),i.$$route=e)}),i||e[null]&&l(e[null],{params:{},pathParams:{}})}function d(e,t){var n=[];return r((e||"").split(":"),function(e,r){if(r==0)n.push(e);else{var i=e.match(/(\w+)(.*)/),s=i[1];n.push(t[s]),n.push(i[2]||""),delete t[s]}}),n.join("")}var m=!1,y={routes:e,reload:function(){m=!0,t.$evalAsync(h)}};return t.$on("$locationChangeSuccess",h),y}]}function Jt(){this.$get=p({})}function Kt(){var e=10;this.digestTtl=function(t){return arguments.length&&(e=t),e},this.$get=["$injector","$exceptionHandler","$parse",function(t,n,r){function i(){this.$id=u(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,this["this"]=this.$root=this,this.$$destroyed=!1,this.$$asyncQueue=[],this.$$listeners={},this.$$isolateBindings={}}function s(e){if(f.$$phase)throw Error(f.$$phase+" already in progress");f.$$phase=e}function o(e,t){var n=r(e);return X(n,t),n}function a(){}i.prototype={$new:function(e){if(E(e))throw Error("API-CHANGE: Use $controller to instantiate controllers.");return e?(e=new i,e.$root=this.$root):(e=function(){},e.prototype=this,e=new e,e.$id=u()),e["this"]=e,e.$$listeners={},e.$parent=this,e.$$asyncQueue=[],e.$$watchers=e.$$nextSibling=e.$$childHead=e.$$childTail=null,e.$$prevSibling=this.$$childTail,this.$$childHead?this.$$childTail=this.$$childTail.$$nextSibling=e:this.$$childHead=this.$$childTail=e,e},$watch:function(e,t,n){var r=o(e,"watch"),i=this.$$watchers,s={fn:t,last:a,get:r,exp:e,eq:!!n};if(!E(t)){var u=o(t||c,"listener");s.fn=function(e,t,n){u(n)}}return i||(i=this.$$watchers=[]),i.unshift(s),function(){k(i,s)}},$digest:function(){var t,r,i,o,u,l,c,h=e,p,d=[],v,m;s("$digest");do{c=!1,p=this;do{for(u=p.$$asyncQueue;u.length;)try{p.$eval(u.shift())}catch(g){n(g)}if(o=p.$$watchers)for(l=o.length;l--;)try{if(t=o[l],(r=t.get(p))!==(i=t.last)&&!(t.eq?O(r,i):typeof r=="number"&&typeof i=="number"&&isNaN(r)&&isNaN(i)))c=!0,t.last=t.eq?L(r):r,t.fn(r,i===a?r:i,p),h<5&&(v=4-h,d[v]||(d[v]=[]),m=E(t.exp)?"fn: "+(t.exp.name||t.exp.toString()):t.exp,m+="; newVal: "+D(r)+"; oldVal: "+D(i),d[v].push(m))}catch(y){n(y)}if(!(o=p.$$childHead||p!==this&&p.$$nextSibling))for(;p!==this&&!(o=p.$$nextSibling);)p=p.$parent}while(p=o);if(c&&!(h--))throw f.$$phase=null,Error(e+" $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: "+D(d))}while(c||u.length);f.$$phase=null},$destroy:function(){if(f!=this&&!this.$$destroyed){var e=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,e.$$childHead==this&&(e.$$childHead=this.$$nextSibling),e.$$childTail==this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$parent=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null}},$eval:function(e,t){return r(e)(this,t)},$evalAsync:function(e){this.$$asyncQueue.push(e)},$apply:function(e){try{return s("$apply"),this.$eval(e)}catch(t){n(t)}finally{f.$$phase=null;try{f.$digest()}catch(r){throw n(r),r}}},$on:function(e,t){var n=this.$$listeners[e];return n||(this.$$listeners[e]=n=[]),n.push(t),function(){n[C(n,t)]=null}},$emit:function(e,t){var r=[],i,s=this,o=!1,u={name:e,targetScope:s,stopPropagation:function(){o=!0},preventDefault:function(){u.defaultPrevented=!0},defaultPrevented:!1},a=[u].concat(An.call(arguments,1)),f,l;do{i=s.$$listeners[e]||r,u.currentScope=s,f=0;for(l=i.length;f<l;f++)if(i[f])try{if(i[f].apply(null,a),o)return u}catch(c){n(c)}else i.splice(f,1),f--,l--;s=s.$parent}while(s);return u},$broadcast:function(e,t){var r=this,i=this,s={name:e,targetScope:this,preventDefault:function(){s.defaultPrevented=!0},defaultPrevented:!1},o=[s].concat(An.call(arguments,1)),u,a;do{r=i,s.currentScope=r,i=r.$$listeners[e]||[],u=0;for(a=i.length;u<a;u++)if(i[u])try{i[u].apply(null,o)}catch(f){n(f)}else i.splice(u,1),u--,a--;if(!(i=r.$$childHead||r!==this&&r.$$nextSibling))for(;r!==this&&!(i=r.$$nextSibling);)r=r.$parent}while(r=i);return s}};var f=new i;return f}]}function Qt(){this.$get=["$window",function(e){var t={},n=f((/android (\d+)/.exec(Tn(e.navigator.userAgent))||[])[1]);return{history:!(!e.history||!e.history.pushState||n<4),hashchange:"onhashchange"in e&&(!e.document.documentMode||e.document.documentMode>7),hasEvent:function(n){if(n=="input"&&Cn==9)return!1;if(d(t[n])){var r=e.document.createElement("div");t[n]="on"+n in r}return t[n]},csp:!1}}]}function Gt(){this.$get=p(e)}function Yt(e){var t={},n,i,s;return e?(r(e.split("\n"),function(e){s=e.indexOf(":"),n=Tn(x(e.substr(0,s))),i=x(e.substr(s+1)),n&&(t[n]?t[n]+=", "+i:t[n]=i)}),t):t}function Zt(e){var t=m(e)?e:n;return function(n){return t||(t=Yt(e)),n?t[Tn(n)]||null:t}}function en(e,t,n){return E(n)?n(e,t):(r(n,function(n){e=n(e,t)}),e)}function tn(){var e=/^\s*(\[|\{[^\{])/,t=/[\}\]]\s*$/,i=/^\)\]\}',?\n/,o=this.defaults={transformResponse:[function(n){return g(n)&&(n=n.replace(i,""),e.test(n)&&t.test(n)&&(n=P(n,!0))),n}],transformRequest:[function(e){return m(e)&&Mn.apply(e)!=="[object File]"?D(e):e}],headers:{common:{Accept:"application/json, text/plain, */*","X-Requested-With":"XMLHttpRequest"},post:{"Content-Type":"application/json;charset=utf-8"},put:{"Content-Type":"application/json;charset=utf-8"}}},u=this.responseInterceptors=[];this.$get=["$httpBackend","$browser","$cacheFactory","$rootScope","$q","$injector",function(e,t,i,f,l,c){function h(e){function n(e){var t=a({},e,{data:en(e.data,e.headers,s)});return 200<=e.status&&e.status<300?t:l.reject(t)}e.method=Nn(e.method);var i=e.transformRequest||o.transformRequest,s=e.transformResponse||o.transformResponse,u=o.headers,u=a({"X-XSRF-TOKEN":t.cookies()["XSRF-TOKEN"]},u.common,u[Tn(e.method)],e.headers),i=en(e.data,Zt(u),i),f;return d(e.data)&&delete u["Content-Type"],f=p(e,i,u),f=f.then(n,n),r(b,function(e){f=e(f)}),f.success=function(t){return f.then(function(n){t(n.data,n.status,n.headers,e)}),f},f.error=function(t){return f.then(null,function(n){t(n.data,n.status,n.headers,e)}),f},f}function p(t,n,r){function i(e,t,n){c&&(200<=e&&e<300?c.put(d,[e,t,Yt(n)]):c.remove(d)),s(t,e,n),f.$apply()}function s(e,n,r){n=Math.max(n,0),(200<=n&&n<300?u.resolve:u.reject)({data:e,status:n,headers:Zt(r),config:t})}function o(){var e=C(h.pendingRequests,t);e!==-1&&h.pendingRequests.splice(e,1)}var u=l.defer(),a=u.promise,c,p,d=v(t.url,t.params);h.pendingRequests.push(t),a.then(o,o),t.cache&&t.method=="GET"&&(c=m(t.cache)?t.cache:y);if(c)if(p=c.get(d)){if(p.then)return p.then(o,o),p;w(p)?s(p[1],p[0],L(p[2])):s(p,200,{})}else c.put(d,a);return p||e(t.method,d,n,i,r,t.timeout,t.withCredentials),a}function v(e,t){if(!t)return e;var r=[];return s(t,function(e,t){e==null||e==n||(m(e)&&(e=D(e)),r.push(encodeURIComponent(t)+"="+encodeURIComponent(e)))}),e+(e.indexOf("?")==-1?"?":"&")+r.join("&")}var y=i("$http"),b=[];return r(u,function(e){b.push(g(e)?c.get(e):c.invoke(e))}),h.pendingRequests=[],function(e){r(arguments,function(e){h[e]=function(t,n){return h(a(n||{},{method:e,url:t}))}})}("get","delete","head","jsonp"),function(e){r(arguments,function(e){h[e]=function(t,n,r){return h(a(r||{},{method:e,url:t,data:n}))}})}("post","put"),h.defaults=o,h}]}function nn(){this.$get=["$browser","$window","$document",function(e,t,n){return rn(e,ur,e.defer,t.angular.callbacks,n[0],t.location.protocol.replace(":",""))}]}function rn(e,t,n,i,s,o){function u(e,t){var n=s.createElement("script"),r=function(){s.body.removeChild(n),t&&t()};n.type="text/javascript",n.src=e,Cn?n.onreadystatechange=function(){/loaded|complete/.test(n.readyState)&&r()}:n.onload=n.onerror=r,s.body.appendChild(n)}return function(s,a,f,l,h,p,d){function v(t,n,r,i){n=(a.match(er)||["",o])[1]=="file"?r?200:404:n,t(n==1223?204:n,r,i),e.$$completeOutstandingRequest(c)}e.$$incOutstandingRequestCount(),a=a||e.url();if(Tn(s)=="jsonp"){var m="_"+(i.counter++).toString(36);i[m]=function(e){i[m].data=e},u(a.replace("JSON_CALLBACK","angular.callbacks."+m),function(){i[m].data?v(l,200,i[m].data):v(l,-2),delete i[m]})}else{var g=new t;g.open(s,a,!0),r(h,function(e,t){e&&g.setRequestHeader(t,e)});var y;g.onreadystatechange=function(){if(g.readyState==4){var e=g.getAllResponseHeaders(),t=["Cache-Control","Content-Language","Content-Type","Expires","Last-Modified","Pragma"];e||(e="",r(t,function(t){var n=g.getResponseHeader(t);n&&(e+=t+": "+n+"\n")})),v(l,y||g.status,g.responseText,e)}},d&&(g.withCredentials=!0),g.send(f||""),p>0&&n(function(){y=-1,g.abort()},p)}}}function sn(){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:"¤",posSuf:"",negPre:"(¤",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(e){return e===1?"one":"other"}}}}function on(){this.$get=["$rootScope","$browser","$q","$exceptionHandler",function(e,t,n,r){function i(i,o,u){var a=n.defer(),f=a.promise,l=v(u)&&!u,o=t.defer(function(){try{a.resolve(i())}catch(t){a.reject(t),r(t)}l||e.$apply()},o),u=function(){delete s[f.$$timeoutId]};return f.$$timeoutId=o,s[o]=a,f.then(u,u),f}var s={};return i.cancel=function(e){return e&&e.$$timeoutId in s?(s[e.$$timeoutId].reject("canceled"),t.defer.cancel(e.$$timeoutId)):!1},i}]}function un(e){function t(t,r){return e.factory(t+n,r)}var n="Filter";this.register=t,this.$get=["$injector",function(e){return function(t){return e.get(t+n)}}],t("currency",fn),t("date",vn),t("filter",an),t("json",mn),t("limitTo",gn),t("lowercase",hr),t("number",ln),t("orderBy",yn),t("uppercase",pr)}function an(){return function(e,t){if(!w(e))return e;var n=[];n.check=function(e){for(var t=0;t<n.length;t++)if(!n[t](e))return!1;return!0};var r=function(e,t){if(t.charAt(0)==="!")return!r(e,t.substr(1));switch(typeof e){case"boolean":case"number":case"string":return(""+e).toLowerCase().indexOf(t)>-1;case"object":for(var n in e)if(n.charAt(0)!=="$"&&r(e[n],t))return!0;return!1;case"array":for(n=0;n<e.length;n++)if(r(e[n],t))return!0;return!1;default:return!1}};switch(typeof t){case"boolean":case"number":case"string":t={$:t};case"object":for(var i in t)i=="$"?function(){var e=(""+t[i]).toLowerCase();e&&n.push(function(t){return r(t,e)})}():function(){var e=i,s=(""+t[i]).toLowerCase();s&&n.push(function(t){return r(Rt(t,e),s)})}();break;case"function":n.push(t);break;default:return e}for(var s=[],o=0;o<e.length;o++){var u=e[o];n.check(u)&&s.push(u)}return s}}function fn(e){var t=e.NUMBER_FORMATS;return function(e,n){return d(n)&&(n=t.CURRENCY_SYM),cn(e,t.PATTERNS[1],t.GROUP_SEP,t.DECIMAL_SEP,2).replace(/\u00A4/g,n)}}function ln(e){var t=e.NUMBER_FORMATS;return function(e,n){return cn(e,t.PATTERNS[0],t.GROUP_SEP,t.DECIMAL_SEP,n)}}function cn(e,t,n,r,i){if(isNaN(e)||!isFinite(e))return"";var s=e<0,e=Math.abs(e),o=e+"",u="",a=[],f=!1;if(o.indexOf("e")!==-1){var l=o.match(/([\d\.]+)e(-?)(\d+)/);l&&l[2]=="-"&&l[3]>i+1?o="0":(u=o,f=!0)}if(!f){o=(o.split(ar)[1]||"").length,d(i)&&(i=Math.min(Math.max(t.minFrac,o),t.maxFrac));var o=Math.pow(10,i),e=Math.round(e*o)/o,e=(""+e).split(ar),o=e[0],e=e[1]||"",f=0,l=t.lgSize,c=t.gSize;if(o.length>=l+c)for(var f=o.length-l,h=0;h<f;h++)(f-h)%c===0&&h!==0&&(u+=n),u+=o.charAt(h);for(h=f;h<o.length;h++)(o.length-h)%l===0&&h!==0&&(u+=n),u+=o.charAt(h);for(;e.length<i;)e+="0";i&&i!=="0"&&(u+=r+e.substr(0,i))}return a.push(s?t.negPre:t.posPre),a.push(u),a.push(s?t.negSuf:t.posSuf),a.join("")}function hn(e,t,n){var r="";e<0&&(r="-",e=-e);for(e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function pn(e,t,n,r){return function(i){i=i["get"+e]();if(n>0||i>-n)i+=n;return i===0&&n==-12&&(i=12),hn(i,t,r)}}function dn(e,t){return function(n,r){var i=n["get"+e](),s=Nn(t?"SHORT"+e:e);return r[s][i]}}function vn(e){function t(e){var t;if(t=e.match(n)){var e=new Date(0),r=0,i=0;t[9]&&(r=f(t[9]+t[10]),i=f(t[9]+t[11])),e.setUTCFullYear(f(t[1]),f(t[2])-1,f(t[3])),e.setUTCHours(f(t[4]||0)-r,f(t[5]||0)-i,f(t[6]||0),f(t[7]||0))}return e}var n=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(n,i){var s="",o=[],u,a,i=i||"mediumDate",i=e.DATETIME_FORMATS[i]||i;g(n)&&(n=cr.test(n)?f(n):t(n)),y(n)&&(n=new Date(n));if(!b(n))return n;for(;i;)(a=lr.exec(i))?(o=o.concat(An.call(a,1)),i=o.pop()):(o.push(i),i=null);return r(o,function(t){u=fr[t],s+=u?u(n,e.DATETIME_FORMATS):t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),s}}function mn(){return function(e){return D(e,!0)}}function gn(){return function(e,t){if(e instanceof Array){var t=f(t),n=[],r,i;if(!!e&&e instanceof Array){t>e.length?t=e.length:t<-e.length&&(t=-e.length),t>0?(r=0,i=t):(r=e.length+t,i=e.length);for(;r<i;r++)n.push(e[r]);return n}return n}return e}}function yn(e){return function(t,n,r){function i(e,t){return H(t)?function(t,n){return e(n,t)}:e}if(!w(t))return t;if(!n)return t;for(var n=w(n)?n:[n],n=N(n,function(t){var n=!1,r=t||h;if(g(t)){if(t.charAt(0)=="+"||t.charAt(0)=="-")n=t.charAt(0)=="-",t=t.substring(1);r=e(t)}return i(function(e,t){var n;n=r(e);var i=r(t),s=typeof n,o=typeof i;return s==o?(s=="string"&&(n=n.toLowerCase()),s=="string"&&(i=i.toLowerCase()),n=n===i?0:n<i?-1:1):n=s<o?-1:1,n},n)}),s=[],o=0;o<t.length;o++)s.push(t[o]);return s.sort(i(function(e,t){for(var r=0;r<n.length;r++){var i=n[r](e,t);if(i!==0)return i}return 0},r))}}function bn(e){return E(e)&&(e={link:e}),e.restrict=e.restrict||"AC",p(e)}function wn(e,t){function n(t,n){n=n?"-"+z(n,"-"):"",e.removeClass((t?Nr:Tr)+n).addClass((t?Tr:Nr)+n)}var i=this,s=e.parent().controller("form")||mr,o=0,u=i.$error={};i.$name=t.name,i.$dirty=!1,i.$pristine=!0,i.$valid=!0,i.$invalid=!1,s.$addControl(i),e.addClass(Cr),n(!0),i.$addControl=function(e){e.$name&&!i.hasOwnProperty(e.$name)&&(i[e.$name]=e)},i.$removeControl=function(e){e.$name&&i[e.$name]===e&&delete i[e.$name],r(u,function(t,n){i.$setValidity(n,!0,e)})},i.$setValidity=function(e,t,r){var a=u[e];if(t)a&&(k(a,r),!a.length)&&(o--,o||(n(t),i.$valid=!0,i.$invalid=!1),u[e]=!1,n(!0,e),s.$setValidity(e,!0,i));else{o||n(t);if(a){if(C(a,r)!=-1)return}else u[e]=a=[],o++,n(!1,e),s.$setValidity(e,!1,i);a.push(r),i.$valid=!1,i.$invalid=!0}},i.$setDirty=function(){e.removeClass(Cr).addClass(kr),i.$dirty=!0,i.$pristine=!1,s.$setDirty()}}function En(e){return d(e)||e===""||e===null||e!==e}function Sn(e,t,r,i,s,o){var u=function(){var n=x(t.val());i.$viewValue!==n&&e.$apply(function(){i.$setViewValue(n)})};if(s.hasEvent("input"))t.bind("input",u);else{var a;t.bind("keydown",function(e){e=e.keyCode,e===91||15<e&&e<19||37<=e&&e<=40||a||(a=o.defer(function(){u(),a=null}))}),t.bind("change",u)}i.$render=function(){t.val(En(i.$viewValue)?"":i.$viewValue)};var l=r.ngPattern,c=function(e,t){return En(t)||e.test(t)?(i.$setValidity("pattern",!0),t):(i.$setValidity("pattern",!1),n)};l&&(l.match(/^\/(.*)\/$/)?(l=RegExp(l.substr(1,l.length-2)),s=function(e){return c(l,e)}):s=function(t){var n=e.$eval(l);if(!n||!n.test)throw Error("Expected "+l+" to be a RegExp but was "+n);return c(n,t)},i.$formatters.push(s),i.$parsers.push(s));if(r.ngMinlength){var h=f(r.ngMinlength),s=function(e){return!En(e)&&e.length<h?(i.$setValidity("minlength",!1),n):(i.$setValidity("minlength",!0),e)};i.$parsers.push(s),i.$formatters.push(s)}if(r.ngMaxlength){var p=f(r.ngMaxlength),r=function(e){return!En(e)&&e.length>p?(i.$setValidity("maxlength",!1),n):(i.$setValidity("maxlength",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}}function xn(e,t){return e="ngClass"+e,bn(function(r,i,s){function o(e){if(t===!0||r.$index%2===t)f&&e!==f&&u(f),a(e);f=e}function u(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),i.removeClass(w(e)?e.join(" "):e)}function a(e){m(e)&&!w(e)&&(e=N(e,function(e,t){if(e)return t})),e&&i.addClass(w(e)?e.join(" "):e)}var f=n;r.$watch(s[e],o,!0),s.$observe("class",function(){var t=r.$eval(s[e]);o(t,t)}),e!=="ngClass"&&r.$watch("$index",function(n,i){var o=n%2;o!==i%2&&(o==t?a(r.$eval(s[e])):u(r.$eval(s[e])))})})}var Tn=function(e){return g(e)?e.toLowerCase():e},Nn=function(e){return g(e)?e.toUpperCase():e},Cn=f((/msie (\d+)/.exec(Tn(navigator.userAgent))||[])[1]),kn,Ln,An=[].slice,On=[].push,Mn=Object.prototype.toString,_n=e.angular||(e.angular={}),Dn,Pn,Hn=["0","0","0"];c.$inject=[],h.$inject=[],Pn=Cn<9?function(e){return e=e.nodeName?e:e[0],e.scopeName&&e.scopeName!="HTML"?Nn(e.scopeName+":"+e.nodeName):e.nodeName}:function(e){return e.nodeName?e.nodeName:e[0].nodeName};var Bn=/[A-Z]/g,jn={full:"1.0.6",major:1,minor:0,dot:6,codeName:"universal-irreversibility"},Fn=K.cache={},In=K.expando="ng-"+(new Date).getTime(),qn=1,Rn=e.document.addEventListener?function(e,t,n){e.addEventListener(t,n,!1)}:function(e,t,n){e.attachEvent("on"+t,n)},Un=e.document.removeEventListener?function(e,t,n){e.removeEventListener(t,n,!1)}:function(e,t,n){e.detachEvent("on"+t,n)},zn=/([\:\-\_]+(.))/g,Wn=/^moz([A-Z])/,Xn=K.prototype={ready:function(t){function n(){r||(r=!0,t())}var r=!1;this.bind("DOMContentLoaded",n),K(e).bind("load",n)},toString:function(){var e=[];return r(this,function(t){e.push(""+t)}),"["+e.join(", ")+"]"},eq:function(e){return e>=0?kn(this[e]):kn(this[this.length+e])},length:0,push:On,sort:[].sort,splice:[].splice},Vn={};r("multiple,selected,checked,disabled,readOnly,required".split(","),function(e){Vn[Tn(e)]=e});var $n={};r("input,select,option,textarea,button,form".split(","),function(e){$n[Nn(e)]=!0}),r({data:tt,inheritedData:ut,scope:function(e){return ut(e,"$scope")},controller:ot,injector:function(e){return ut(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:nt,css:function(e,t,r){t=$(t);if(!v(r)){var i;return Cn<=8&&(i=e.currentStyle&&e.currentStyle[t],i===""&&(i="auto")),i=i||e.style[t],Cn<=8&&(i=i===""?n:i),i}e.style[t]=r},attr:function(e,t,r){var i=Tn(t);if(Vn[i]){if(!v(r))return e[t]||(e.attributes.getNamedItem(t)||c).specified?i:n;r?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(v(r))e.setAttribute(t,r);else if(e.getAttribute)return e=e.getAttribute(t,2),e===null?n:e},prop:function(e,t,n){if(!v(n))return e[t];e[t]=n},text:a(Cn<9?function(e,t){if(e.nodeType==1){if(d(t))return e.innerText;e.innerText=t}else{if(d(t))return e.nodeValue;e.nodeValue=t}}:function(e,t){if(d(t))return e.textContent;e.textContent=t},{$dv:""}),val:function(e,t){if(d(t))return e.value;e.value=t},html:function(e,t){if(d(t))return e.innerHTML;for(var n=0,r=e.childNodes;n<r.length;n++)G(r[n]);e.innerHTML=t}},function(e,t){K.prototype[t]=function(t,r){var i,s;if((e.length==2&&e!==nt&&e!==ot?t:r)!==n){for(i=0;i<this.length;i++)e(this[i],t,r);return this}if(m(t)){for(i=0;i<this.length;i++)if(e===tt)e(this[i],t);else for(s in t)e(this[i],s,t[s]);return this}return this.length?e(this[0],t,r):e.$dv}}),r({removeData:Z,dealoc:G,bind:function li(e,t,n){var i=et(e,"events"),s=et(e,"handle");i||et(e,"events",i={}),s||et(e,"handle",s=ft(e,i)),r(t.split(" "),function(t){var r=i[t];if(!r){if(t=="mouseenter"||t=="mouseleave"){var o=0;i.mouseenter=[],i.mouseleave=[],li(e,"mouseover",function(e){o++,o==1&&s(e,"mouseenter")}),li(e,"mouseout",function(e){o--,o==0&&s(e,"mouseleave")})}else Rn(e,t,s),i[t]=[];r=i[t]}r.push(n)})},unbind:Y,replaceWith:function(e,t){var n,i=e.parentNode;G(e),r(new K(t),function(t){n?i.insertBefore(t,n.nextSibling):i.replaceChild(t,e),n=t})},children:function(e){var t=[];return r(e.childNodes,function(e){e.nodeType===1&&t.push(e)}),t},contents:function(e){return e.childNodes||[]},append:function(e,t){r(new K(t),function(t){e.nodeType===1&&e.appendChild(t)})},prepend:function(e,t){if(e.nodeType===1){var n=e.firstChild;r(new K(t),function(t){n?e.insertBefore(t,n):(e.appendChild(t),n=t)})}},wrap:function(e,t){var t=kn(t)[0],n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)},remove:function(e){G(e);var t=e.parentNode;t&&t.removeChild(e)},after:function(e,t){var n=e,i=e.parentNode;r(new K(t),function(e){i.insertBefore(e,n.nextSibling),n=e})},addClass:it,removeClass:rt,toggleClass:function(e,t,n){d(n)&&(n=!nt(e,t)),(n?it:rt)(e,t)},parent:function(e){return(e=e.parentNode)&&e.nodeType!==11?e:null},next:function(e){if(e.nextElementSibling)return e.nextElementSibling;for(e=e.nextSibling;e!=null&&e.nodeType!==1;)e=e.nextSibling;return e},find:function(e,t){return e.getElementsByTagName(t)},clone:Q,triggerHandler:function(e,t){var n=(et(e,"events")||{})[t];r(n,function(t){t.call(e,null)})}},function(e,t){K.prototype[t]=function(t,r){for(var i,s=0;s<this.length;s++)i==n?(i=e(this[s],t,r),i!==n&&(i=kn(i))):st(i,e(this[s],t,r));return i==n?this:i}}),ct.prototype={put:function(e,t){this[lt(e)]=t},get:function(e){return this[lt(e)]},remove:function(e){var t=this[e=lt(e)];return delete this[e],t}},ht.prototype={push:function(e,t){var n=this[e=lt(e)];n?n.push(t):this[e]=[t]},shift:function(e){var t=this[e=lt(e)];if(t)return t.length==1?(delete this[e],t[0]):t.shift()},peek:function(e){if(e=this[lt(e)])return e[0]}};var Jn=/^function\s*[^\(]*\(\s*([^\)]*)\)/m,Kn=/,/,Qn=/^\s*(_?)(\S+?)\1\s*$/,Gn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Yn="Non-assignable model expression: ";wt.$inject=["$provide"];var Zn=/^(x[\:\-_]|data[\:\-_])/i,er=/^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,tr=/^([^\?#]*)?(\?([^#]*))?(#(.*))?$/,nr=tr,rr={http:80,https:443,ftp:21};Mt.prototype={$$replace:!1,absUrl:Pt("$$absUrl"),url:function(e,t){if(d(e))return this.$$url;var n=tr.exec(e);return n[1]&&this.path(decodeURIComponent(n[1])),(n[2]||n[1])&&this.search(n[3]||""),this.hash(n[5]||"",t),this},protocol:Pt("$$protocol"),host:Pt("$$host"),port:Pt("$$port"),path:Ht("$$path",function(e){return e.charAt(0)=="/"?e:"/"+e}),search:function(e,t){return d(e)?this.$$search:(v(t)?t===null?delete this.$$search[e]:this.$$search[e]=t:this.$$search=g(e)?j(e):e,this.$$compose(),this)},hash:Ht("$$hash",h),replace:function(){return this.$$replace=!0,this}},_t.prototype=l(Mt.prototype),Dt.prototype=l(_t.prototype);var ir={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},"undefined":c,"+":function(e,t,r,i){return r=r(e,t),i=i(e,t),v(r)?v(i)?r+i:r:v(i)?i:n},"-":function(e,t,n,r){return n=n(e,t),r=r(e,t),(v(n)?n:0)-(v(r)?r:0)},"*":function(e,t,n,r){return n(e,t)*r(e,t)},"/":function(e,t,n,r){return n(e,t)/r(e,t)},"%":function(e,t,n,r){return n(e,t)%r(e,t)},"^":function(e,t,n,r){return n(e,t)^r(e,t)},"=":c,"==":function(e,t,n,r){return n(e,t)==r(e,t)},"!=":function(e,t,n,r){return n(e,t)!=r(e,t)},"<":function(e,t,n,r){return n(e,t)<r(e,t)},">":function(e,t,n,r){return n(e,t)>r(e,t)},"<=":function(e,t,n,r){return n(e,t)<=r(e,t)},">=":function(e,t,n,r){return n(e,t)>=r(e,t)},"&&":function(e,t,n,r){return n(e,t)&&r(e,t)},"||":function(e,t,n,r){return n(e,t)||r(e,t)},"&":function(e,t,n,r){return n(e,t)&r(e,t)},"|":function(e,t,n,r){return r(e,t)(e,t,n(e,t))},"!":function(e,t,n){return!n(e,t)}},sr={n:"\n",f:"\f",r:"\r",t:" ",v:"","'":"'",'"':'"'},or={},ur=e.XMLHttpRequest||function(){try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(n){}throw Error("This browser does not support XMLHttpRequest.")};un.$inject=["$provide"],fn.$inject=["$locale"],ln.$inject=["$locale"];var ar=".",fr={yyyy:pn("FullYear",4),yy:pn("FullYear",2,0,!0),y:pn("FullYear",1),MMMM:dn("Month"),MMM:dn("Month",!0),MM:pn("Month",2,1),M:pn("Month",1,1),dd:pn("Date",2),d:pn("Date",1),HH:pn("Hours",2),H:pn("Hours",1),hh:pn("Hours",2,-12),h:pn("Hours",1,-12),mm:pn("Minutes",2),m:pn("Minutes",1),ss:pn("Seconds",2),s:pn("Seconds",1),EEEE:dn("Day"),EEE:dn("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e){var e=-1*e.getTimezoneOffset(),t=e>=0?"+":"";return t+=hn(Math[e>0?"floor":"ceil"](e/60),2)+hn(Math.abs(e%60),2),t}},lr=/((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,cr=/^\d+$/;vn.$inject=["$locale"];var hr=p(Tn),pr=p(Nn);yn.$inject=["$parse"];var dr=p({restrict:"E",compile:function(e,n){return Cn<=8&&(!n.href&&!n.name&&n.$set("href",""),e.append(t.createComment("IE fix"))),function(e,t){t.bind("click",function(e){t.attr("href")||e.preventDefault()})}}}),vr={};r(Vn,function(e,t){var n=Et("ng-"+t);vr[n]=function(){return{priority:100,compile:function(){return function(e,r,i){e.$watch(i[n],function(e){i.$set(t,!!e)})}}}}}),r(["src","href"],function(e){var t=Et("ng-"+e);vr[t]=function(){return{priority:99,link:function(n,r,i){i.$observe(t,function(t){t&&(i.$set(e,t),Cn&&r.prop(e,i[e]))})}}}});var mr={$addControl:c,$removeControl:c,$setValidity:c,$setDirty:c};wn.$inject=["$element","$attrs","$scope"];var On=function(e){return["$timeout",function(t){var r={name:"form",restrict:"E",controller:wn,compile:function(){return{pre:function(e,r,i,s){if(!i.action){var o=function(e){e.preventDefault?e.preventDefault():e.returnValue=!1};Rn(r[0],"submit",o),r.bind("$destroy",function(){t(function(){Un(r[0],"submit",o)},0,!1)})}var u=r.parent().controller("form"),f=i.name||i.ngForm;f&&(e[f]=s),u&&r.bind("$destroy",function(){u.$removeControl(s),f&&(e[f]=n),a(s,mr)})}}}};return e?a(L(r),{restrict:"EAC"}):r}]},gr=On(),yr=On(!0),br=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,wr=/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/,Er=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Sr={text:Sn,number:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),i.$parsers.push(function(e){var t=En(e);return t||Er.test(e)?(i.$setValidity("number",!0),e===""?null:t?e:parseFloat(e)):(i.$setValidity("number",!1),n)}),i.$formatters.push(function(e){return En(e)?"":""+e});if(r.min){var u=parseFloat(r.min),e=function(e){return!En(e)&&e<u?(i.$setValidity("min",!1),n):(i.$setValidity("min",!0),e)};i.$parsers.push(e),i.$formatters.push(e)}if(r.max){var a=parseFloat(r.max),r=function(e){return!En(e)&&e>a?(i.$setValidity("max",!1),n):(i.$setValidity("max",!0),e)};i.$parsers.push(r),i.$formatters.push(r)}i.$formatters.push(function(e){return En(e)||y(e)?(i.$setValidity("number",!0),e):(i.$setValidity("number",!1),n)})},url:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||br.test(e)?(i.$setValidity("url",!0),e):(i.$setValidity("url",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},email:function(e,t,r,i,s,o){Sn(e,t,r,i,s,o),e=function(e){return En(e)||wr.test(e)?(i.$setValidity("email",!0),e):(i.$setValidity("email",!1),n)},i.$formatters.push(e),i.$parsers.push(e)},radio:function(e,t,n,r){d(n.name)&&t.attr("name",u()),t.bind("click",function(){t[0].checked&&e.$apply(function(){r.$setViewValue(n.value)})}),r.$render=function(){t[0].checked=n.value==r.$viewValue},n.$observe("value",r.$render)},checkbox:function(e,t,n,r){var i=n.ngTrueValue,s=n.ngFalseValue;g(i)||(i=!0),g(s)||(s=!1),t.bind("click",function(){e.$apply(function(){r.$setViewValue(t[0].checked)})}),r.$render=function(){t[0].checked=r.$viewValue},r.$formatters.push(function(e){return e===i}),r.$parsers.push(function(e){return e?i:s})},hidden:c,button:c,submit:c,reset:c},xr=["$browser","$sniffer",function(e,t){return{restrict:"E",require:"?ngModel",link:function(n,r,i,s){s&&(Sr[Tn(i.type)]||Sr.text)(n,r,i,s,t,e)}}}],Tr="ng-valid",Nr="ng-invalid",Cr="ng-pristine",kr="ng-dirty",Lr=["$scope","$exceptionHandler","$attrs","$element","$parse",function(e,t,n,i,s){function o(e,t){t=t?"-"+z(t,"-"):"",i.removeClass((e?Nr:Tr)+t).addClass((e?Tr:Nr)+t)}this.$modelValue=this.$viewValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=n.name;var u=s(n.ngModel),a=u.assign;if(!a)throw Error(Yn+n.ngModel+" ("+B(i)+")");this.$render=c;var f=i.inheritedData("$formController")||mr,l=0,h=this.$error={};i.addClass(Cr),o(!0),this.$setValidity=function(e,t){if(h[e]!==!t){if(t){if(h[e]&&l--,!l)o(!0),this.$valid=!0,this.$invalid=!1}else o(!1),this.$invalid=!0,this.$valid=!1,l++;h[e]=!t,o(t,e),f.$setValidity(e,t,this)}},this.$setViewValue=function(n){this.$viewValue=n,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,i.removeClass(Cr).addClass(kr),f.$setDirty()),r(this.$parsers,function(e){n=e(n)}),this.$modelValue!==n&&(this.$modelValue=n,a(e,n),r(this.$viewChangeListeners,function(e){try{e()}catch(n){t(n)}}))};var p=this;e.$watch(function(){var t=u(e);if(p.$modelValue!==t){var n=p.$formatters,r=n.length;for(p.$modelValue=t;r--;)t=n[r](t);p.$viewValue!==t&&(p.$viewValue=t,p.$render())}})}],Ar=function(){return{require:["ngModel","^?form"],controller:Lr,link:function(e,t,n,r){var i=r[0],s=r[1]||mr;s.$addControl(i),t.bind("$destroy",function(){s.$removeControl(i)})}}},Or=p({require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}}),Mr=function(){return{require:"?ngModel",link:function(e,t,n,r){if(r){n.required=!0;var i=function(e){if(!n.required||!En(e)&&e!==!1)return r.$setValidity("required",!0),e;r.$setValidity("required",!1)};r.$formatters.push(i),r.$parsers.unshift(i),n.$observe("required",function(){i(r.$viewValue)})}}}},_r=function(){return{require:"ngModel",link:function(e,t,i,s){var o=(e=/\/(.*)\//.exec(i.ngList))&&RegExp(e[1])||i.ngList||",";s.$parsers.push(function(e){var t=[];return e&&r(e.split(o),function(e){e&&t.push(x(e))}),t}),s.$formatters.push(function(e){return w(e)?e.join(", "):n})}}},Dr=/^(true|false|\d+)$/,Pr=function(){return{priority:100,compile:function(e,t){return Dr.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e,!1)})}}}},Hr=bn(function(e,t,r){t.addClass("ng-binding").data("$binding",r.ngBind),e.$watch(r.ngBind,function(e){t.text(e==n?"":e)})}),Br=["$interpolate",function(e){return function(t,n,r){t=e(n.attr(r.$attr.ngBindTemplate)),n.addClass("ng-binding").data("$binding",t),r.$observe("ngBindTemplate",function(e){n.text(e)})}}],jr=[function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.ngBindHtmlUnsafe),e.$watch(n.ngBindHtmlUnsafe,function(e){t.html(e||"")})}}],Fr=xn("",!0),Ir=xn("Odd",0),qr=xn("Even",1),Rr=bn({compile:function(e,t){t.$set("ngCloak",n),e.removeClass("ng-cloak")}}),Ur=[function(){return{scope:!0,controller:"@"}}],zr=["$sniffer",function(e){return{priority:1e3,compile:function(){e.csp=!0}}}],Wr={};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave".split(" "),function(e){var t=Et("ng-"+e);Wr[t]=["$parse",function(n){return function(r,i,s){var o=n(s[t]);i.bind(Tn(e),function(e){r.$apply(function(){o(r,{$event:e})})})}}]});var Xr=bn(function(e,t,n){t.bind("submit",function(){e.$apply(n.ngSubmit)})}),Vr=["$http","$templateCache","$anchorScroll","$compile",function(e,t,n,r){return{restrict:"ECA",terminal:!0,compile:function(i,s){var o=s.ngInclude||s.src,u=s.onload||"",a=s.autoscroll;return function(i,s){var f=0,l,c=function(){l&&(l.$destroy(),l=null),s.html("")};i.$watch(o,function(o){var h=++f;o?e.get(o,{cache:t}).success(function(e){h===f&&(l&&l.$destroy(),l=i.$new(),s.html(e),r(s.contents())(l),v(a)&&(!a||i.$eval(a))&&n(),l.$emit("$includeContentLoaded"),i.$eval(u))}).error(function(){h===f&&c()}):c()})}}}}],$r=bn({compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Jr=bn({terminal:!0,priority:1e3}),Kr=["$locale","$interpolate",function(e,t){var n=/{}/g;return{restrict:"EA",link:function(i,s,o){var u=o.count,a=s.attr(o.$attr.when),f=o.offset||0,l=i.$eval(a),c={},h=t.startSymbol(),p=t.endSymbol();r(l,function(e,r){c[r]=t(e.replace(n,h+u+"-"+f+p))}),i.$watch(function(){var t=parseFloat(i.$eval(u));return isNaN(t)?"":(l[t]||(t=e.pluralCat(t-f)),c[t](i,s,!0))},function(e){s.text(e)})}}}],Qr=bn({transclude:"element",priority:1e3,terminal:!0,compile:function(e,t,n){return function(e,t,r){var i=r.ngRepeat,r=i.match(/^\s*(.+)\s+in\s+(.*)\s*$/),s,o,u;if(!r)throw Error("Expected ngRepeat in form of '_item_ in _collection_' but got '"+i+"'.");i=r[1],s=r[2],r=i.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/);if(!r)throw Error("'item' in 'item in collection' should be identifier or (key, value) but got '"+i+"'.");o=r[3]||r[1],u=r[2];var a=new ht;e.$watch(function(e){var r,i,f=e.$eval(s),l=t,c=new ht,h,p,d,v,m,g;if(w(f))m=f||[];else{m=[];for(d in f)f.hasOwnProperty(d)&&d.charAt(0)!="$"&&m.push(d);m.sort()}h=m.length-1,r=0;for(i=m.length;r<i;r++)d=f===m?r:m[r],v=f[d],(g=a.shift(v))?(p=g.scope,c.push(v,g),r!==g.index&&(g.index=r,l.after(g.element)),l=g.element):p=e.$new(),p[o]=v,u&&(p[u]=d),p.$index=r,p.$first=r===0,p.$last=r===h,p.$middle=!p.$first&&!p.$last,g||n(p,function(e){l.after(e),g={scope:p,element:l=e,index:r},c.push(v,g)});for(d in a)if(a.hasOwnProperty(d))for(m=a[d];m.length;)v=m.pop(),v.element.remove(),v.scope.$destroy();a=c})}}}),Gr=bn(function(e,t,n){e.$watch(n.ngShow,function(e){t.css("display",H(e)?"":"none")})}),Yr=bn(function(e,t,n){e.$watch(n.ngHide,function(e){t.css("display",H(e)?"none":"")})}),Zr=bn(function(e,t,n){e.$watch(n.ngStyle,function(e,n){n&&e!==n&&r(n,function(e,n){t.css(n,"")}),e&&t.css(e)},!0)}),ei=p({restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,r){var i,s,o;e.$watch(n.ngSwitch||n.on,function(u){s&&(o.$destroy(),s.remove(),s=o=null);if(i=r.cases["!"+u]||r.cases["?"])e.$eval(n.change),o=e.$new(),i(o,function(e){s=e,t.append(e)})})}}),ti=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,r,i,s){s.cases["!"+t.ngSwitchWhen]=n}}}),ni=bn({transclude:"element",priority:500,require:"^ngSwitch",compile:function(e,t,n){return function(e,t,r,i){i.cases["?"]=n}}}),ri=bn({controller:["$transclude","$element",function(e,t){e(function(e){t.append(e)})}]}),ii=["$http","$templateCache","$route","$anchorScroll","$compile","$controller",function(e,t,n,r,i,s){return{restrict:"ECA",terminal:!0,link:function(e,t,o){function u(){var o=n.current&&n.current.locals,u=o&&o.$template;if(u){t.html(u),a&&(a.$destroy(),a=null);var u=i(t.contents()),l=n.current;a=l.scope=e.$new(),l.controller&&(o.$scope=a,o=s(l.controller,o),t.children().data("$ngControllerController",o)),u(a),a.$emit("$viewContentLoaded"),a.$eval(f),r()}else t.html(""),a&&(a.$destroy(),a=null)}var a,f=o.onload||"";e.$on("$routeChangeSuccess",u),u()}}}],si=["$templateCache",function(e){return{restrict:"E",terminal:!0,compile:function(t,n){n.type=="text/ng-template"&&e.put(n.id,t[0].text)}}}],oi=p({terminal:!0}),ui=["$compile","$parse",function(e,s){var o=/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/,u={$setViewValue:c};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(e,t,n){var r=this,i={},s=u,o;r.databound=n.ngModel,r.init=function(e,t,n){s=e,o=n},r.addOption=function(t){i[t]=!0,s.$viewValue==t&&(e.val(t),o.parent()&&o.remove())},r.removeOption=function(e){this.hasOption(e)&&(delete i[e],s.$viewValue==e&&this.renderUnknownOption(e))},r.renderUnknownOption=function(t){t="? "+lt(t)+" ?",o.val(t),e.prepend(o),e.val(t),o.prop("selected",!0)},r.hasOption=function(e){return i.hasOwnProperty(e)},t.$on("$destroy",function(){r.renderUnknownOption=c})}],link:function(u,a,f,l){function c(e,t,n,r){n.$render=function(){var e=n.$viewValue;r.hasOption(e)?(T.parent()&&T.remove(),t.val(e),e===""&&E.prop("selected",!0)):d(e)&&E?t.val(""):r.renderUnknownOption(e)},t.bind("change",function(){e.$apply(function(){T.parent()&&T.remove(),n.$setViewValue(t.val())})})}function h(e,t,n){var i;n.$render=function(){var e=new ct(n.$viewValue);r(t.find("option"),function(t){t.selected=v(e.get(t.value))})},e.$watch(function(){O(i,n.$viewValue)||(i=L(n.$viewValue),n.$render())}),t.bind("change",function(){e.$apply(function(){var e=[];r(t.find("option"),function(t){t.selected&&e.push(t.value)}),n.$setViewValue(e)})})}function p(t,r,u){function a(){var e={"":[]},s=[""],o,a,f,g,b;f=u.$modelValue,g=v(t)||[];var E=h?i(g):g,T,N,C;N={},b=!1;var k,L;if(y)b=new ct(f);else if(f===null||w)e[""].push({selected:f===null,id:"",label:""}),b=!0;for(C=0;T=E.length,C<T;C++)N[c]=g[h?N[h]=E[C]:C],o=p(t,N)||"",(a=e[o])||(a=e[o]=[],s.push(o)),y?o=b.remove(d(t,N))!=n:(o=f===d(t,N),b=b||o),k=l(t,N),k=k===n?"":k,a.push({id:h?E[C]:C,label:k,selected:o});!y&&!b&&e[""].unshift({id:"?",label:"",selected:!0}),N=0;for(E=s.length;N<E;N++){o=s[N],a=e[o],m.length<=N?(f={element:x.clone().attr("label",o),label:a.label},g=[f],m.push(g),r.append(f.element)):(g=m[N],f=g[0],f.label!=o)&&f.element.attr("label",f.label=o),k=null,C=0;for(T=a.length;C<T;C++)(o=a[C],b=g[C+1])?(k=b.element,b.label!==o.label&&k.text(b.label=o.label),b.id!==o.id&&k.val(b.id=o.id),b.element.selected!==o.selected&&k.prop("selected",b.selected=o.selected)):(o.id===""&&w?L=w:(L=S.clone()).val(o.id).attr("selected",o.selected).text(o.label),g.push({element:L,label:o.label,id:o.id,selected:o.selected}),k?k.after(L):f.element.append(L),k=L);for(C++;g.length>C;)g.pop().element.remove()}for(;m.length>N;)m.pop()[0].element.remove()}var f;if(!(f=b.match(o)))throw Error("Expected ngOptions in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '"+b+"'.");var l=s(f[2]||f[1]),c=f[4]||f[6],h=f[5],p=s(f[3]||""),d=s(f[2]?f[1]:c),v=s(f[7]),m=[[{element:r,label:""}]];w&&(e(w)(t),w.removeClass("ng-scope"),w.remove()),r.html(""),r.bind("change",function(){t.$apply(function(){var e,i=v(t)||[],s={},o,a,f,l,p,g;if(y){a=[],l=0;for(g=m.length;l<g;l++){e=m[l],f=1;for(p=e.length;f<p;f++)(o=e[f].element)[0].selected&&(o=o.val(),h&&(s[h]=o),s[c]=i[o],a.push(d(t,s)))}}else o=r.val(),o=="?"?a=n:o==""?a=null:(s[c]=i[o],h&&(s[h]=o),a=d(t,s));u.$setViewValue(a)})}),u.$render=a,t.$watch(a)}if(l[1]){for(var m=l[0],g=l[1],y=f.multiple,b=f.ngOptions,w=!1,E,S=kn(t.createElement("option")),x=kn(t.createElement("optgroup")),T=S.clone(),l=0,N=a.children(),C=N.length;l<C;l++)if(N[l].value==""){E=w=N.eq(l);break}m.init(g,w,T);if(y&&(f.required||f.ngRequired)){var k=function(e){return g.$setValidity("required",!f.required||e&&e.length),e};g.$parsers.push(k),g.$formatters.unshift(k),f.$observe("required",function(){k(g.$viewValue)})}b?p(u,a,g):y?h(u,a,g):c(u,a,g,m)}}}}],ai=["$interpolate",function(e){var t={addOption:c,removeOption:c};return{restrict:"E",priority:100,compile:function(n,r){if(d(r.value)){var i=e(n.text(),!0);i||r.$set("value",n.text())}return function(e,n,r){var s=n.parent(),o=s.data("$selectController")||s.parent().data("$selectController");o&&o.databound?n.prop("selected",!1):o=t,i?e.$watch(i,function(e,t){r.$set("value",e),e!==t&&o.removeOption(t),o.addOption(e)}):o.addOption(r.value),n.bind("$destroy",function(){o.removeOption(r.value)})}}}}],fi=p({restrict:"E",terminal:!0});(Ln=e.jQuery)?(kn=Ln,a(Ln.fn,{scope:Xn.scope,controller:Xn.controller,injector:Xn.injector,inheritedData:Xn.inheritedData}),J("remove",!0),J("empty"),J("html")):kn=K,_n.element=kn,function(t){a(t,{bootstrap:U,copy:L,extend:a,equals:O,element:kn,forEach:r,injector:dt,noop:c,bind:M,toJson:D,fromJson:P,identity:h,isUndefined:d,isDefined:v,isString:g,isFunction:E,isObject:m,isNumber:y,isElement:T,isArray:w,version:jn,isDate:b,lowercase:Tn,uppercase:Nn,callbacks:{counter:0}}),Dn=V(e);try{Dn("ngLocale")}catch(n){Dn("ngLocale",[]).provider("$locale",sn)}Dn("ng",["ngLocale"],["$provide",function(e){e.provider("$compile",wt).directive({a:dr,input:xr,textarea:xr,form:gr,script:si,select:ui,style:fi,option:ai,ngBind:Hr,ngBindHtmlUnsafe:jr,ngBindTemplate:Br,ngClass:Fr,ngClassEven:qr,ngClassOdd:Ir,ngCsp:zr,ngCloak:Rr,ngController:Ur,ngForm:yr,ngHide:Yr,ngInclude:Vr,ngInit:$r,ngNonBindable:Jr,ngPluralize:Kr,ngRepeat:Qr,ngShow:Gr,ngSubmit:Xr,ngStyle:Zr,ngSwitch:ei,ngSwitchWhen:ti,ngSwitchDefault:ni,ngOptions:oi,ngView:ii,ngTransclude:ri,ngModel:Ar,ngList:_r,ngChange:Or,required:Mr,ngRequired:Mr,ngValue:Pr}).directive(vr).directive(Wr),e.provider({$anchorScroll:vt,$browser:gt,$cacheFactory:yt,$controller:St,$document:xt,$exceptionHandler:Tt,$filter:un,$interpolate:Nt,$http:tn,$httpBackend:nn,$location:Bt,$log:jt,$parse:Wt,$route:$t,$routeParams:Jt,$rootScope:Kt,$q:Xt,$sniffer:Qt,$templateCache:bt,$timeout:on,$window:Gt})}])}(_n),kn(t).ready(function(){R(t,U)})}(window,document),angular.element(document).find("head").append('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak{display:none;}ng\\:form{display:block;}</style>'),n("angular",function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!csmain",["require","cs!jquery","angular"],function(e,t,n){t(window).load(function(){e(["cs!apps/pteApp","cs!controllers/PteCtrl","cs!controllers/TableCtrl","cs!controllers/CropCtrl","cs!controllers/ViewCtrl"],function(e){n.bootstrap(t(".wrap"),[e.name])})})})}.call(this),t({paths:{angular:"../apps/angular/angular.min","angular-resource":"../apps/angular/angular-resource.min",cs:"../apps/requirejs/cs","coffee-script":"../apps/coffee-script",jcrop:"../apps/jcrop/js/jquery.Jcrop.min"},shim:{angular:{exports:"angular"},"angular-resource":{exports:"angular",deps:["angular"]},jcrop:["cs!jquery"]}},["cs!csmain"]),n("main",function(){}),function(e,t,n){t.module("ngResource",["ng"]).factory("$resource",["$http","$parse",function(e,r){function i(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function s(e,t){this.template=e+="#",this.defaults=t||{};var n=this.urlParams={};f(e.split(/\W/),function(t){t&&RegExp("(^|[^\\\\]):"+t+"\\W").test(e)&&(n[t]=!0)}),this.template=e.replace(/\\:/g,":")}function o(i,m,g){function b(e,t){var n={},t=l({},m,t);return f(t,function(t,i){var s;t.charAt&&t.charAt(0)=="@"?(s=t.substr(1),s=r(s)(e)):s=t,n[i]=s}),n}function E(e){c(e||{},this)}var S=new s(i),g=l({},u,g);return f(g,function(r,i){r.method=t.uppercase(r.method);var s=r.method=="POST"||r.method=="PUT"||r.method=="PATCH";E[i]=function(t,n,i,o){var u={},d,m=a,g=null;switch(arguments.length){case 4:g=o,m=i;case 3:case 2:if(!h(n)){u=t,d=n,m=i;break}if(h(t)){m=t,g=n;break}m=n,g=i;case 1:h(t)?m=t:s?d=t:u=t;break;case 0:break;default:throw"Expected between 0-4 arguments [params, data, success, error], got "+arguments.length+" arguments."}var y=this instanceof E?this:r.isArray?[]:new E(d);return e({method:r.method,url:S.url(l({},b(d,r.params||{}),u)),data:d}).then(function(e){var t=e.data;t&&(r.isArray?(y.length=0,f(t,function(e){y.push(new E(e))})):c(t,y)),(m||a)(y,e.headers)},g),y},E.prototype["$"+i]=function(e,t,r){var o=b(this),u=a,f;switch(arguments.length){case 3:o=e,u=t,f=r;break;case 2:case 1:h(e)?(u=e,f=t):(o=e,u=t||a);case 0:break;default:throw"Expected between 1-3 arguments [params, success, error], got "+arguments.length+" arguments."}E[i].call(this,o,s?this:n,u,f)}}),E.bind=function(e){return o(i,l({},m,e),g)},E}var u={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},a=t.noop,f=t.forEach,l=t.extend,c=t.copy,h=t.isFunction;return s.prototype={url:function(e){var n=this,r=this.template,s,o,e=e||{};f(this.urlParams,function(u,a){s=e.hasOwnProperty(a)?e[a]:n.defaults[a],t.isDefined(s)&&s!==null?(o=i(s,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),r=r.replace(RegExp(":"+a+"(\\W)","g"),o+"$1")):r=r.replace(RegExp("(/?):"+a+"(\\W)","g"),function(e,t,n){return n.charAt(0)=="/"?n:t+n})});var r=r.replace(/\/?#$/,""),u=[];return f(e,function(e,t){n.urlParams[t]||u.push(i(t)+"="+i(e))}),u.sort(),r=r.replace(/\/*$/,""),r+(u.length?"?"+u.join("&"):"")}},o}])}(window,window.angular),n("angular-resource",["angular"],function(e){return function(){var t,n;return t||e.angular}}(this)),function(){n("cs!apps/urlCacheBreaker",["angular"],function(e){var t;return t=e.module("UrlCacheBreaker",[]),t.filter("randomizeUrl",function(){var t,n;return t=function(){return Math.floor(Math.random()*1000001).toString(16)},n={},function(r){var i,s,o,u,a,f,l;if(r==null)return r;if(e.isObject(r)&&r.reset){if(((f=r.urls)!=null?f.length:void 0)>0){l=r.urls;for(u=0,a=l.length;u<a;u++)s=l[u],n[s]=t()}else n={};return}return r in n||(n[r]=t()),i=n[r],o="?",(r!=null?r.indexOf("?"):void 0)>=0&&(o="&"),r+o+i}}),t})}.call(this),function(){n("cs!apps/pteApp",["angular","angular-resource","cs!apps/urlCacheBreaker"],function(e){var t;return t=e.module("pte",["ngResource","UrlCacheBreaker"]),t})}.call(this),function(){n("cs!settings",[],function(){var e,t;return e=function(e){if(!window[e])throw"PTE_EXCEPTION: Invalid window var: "+e;return window[e]},t={width:e("post_width"),height:e("post_height"),id:e("post_id"),ajaxurl:e("ajaxurl"),i18n:e("pteI18n")}})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/PteCtrl",["angular","cs!apps/pteApp","cs!settings","cs!jquery"],function(t,n,r,i){return n.controller("PteCtrl",["$scope","$resource","$log","$filter",function(n,s,o,u){var a,f,l,c,h;n.page={crop:!0,view:!1},n.changePage=function(e){var t,r,i,s;n.viewFilterValue=!1,i=n.page,s=[];for(t in i)r=i[t],t===e?s.push(n.page[t]=!0):s.push(n.page[t]=!1);return s},n.pageClass=function(e){if(n.page[e])return"nav-tab-active"},n.thumbnailResource=s(r.ajaxurl,{action:"pte_ajax","pte-action":"get-thumbnail-info"}),n.updateSelected=function(){return n.$broadcast("thumbnail_selected")},n.updateOptions=function(e){var t;e["pte-action"]="change-options",o.log("Updating Options",e),t=n.thumbnailResource.get(e,function(){return o.log("Updated options")})},n.viewFilterValue=!1,n.view=function(e){typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),n.changePage("view"),n.viewFilterValue=e},n.viewFilterFunc=function(r){var i;if(n.viewFilterValue===!1)return!0;if(t.isString(n.viewFilterValue))return r.name===n.viewFilterValue?!0:!1;if(t.isArray(n.viewFilterValue))if(i=r.name,e.call(n.viewFilterValue,i)>=0)return!0;return n.viewFilterValue?r.proposed!=null:!0},n.save=function(e){var r,i,s,u,a,f;i={"pte-action":"confirm-images","pte-nonce":h["pte-nonce"],id:c},u=[];if(!e){t.forEach(n.thumbnails,function(e){e.proposed&&u.push(e)});if(u.length<1)return}else u.push(e);for(a=0,f=u.length;a<f;a++)e=u[a],s="pte-confirm["+e.name+"]",i[s]=e.proposed.file;o.log(i),r=n.thumbnailResource.get(i,function(){return n.confirmResults(r)})},n.confirmResults=function(e){var t,r,i,s,o,a,l;if(!e.thumbnails){n.setErrorMessage(n.i18n.save_crop_problem);return}i=[],t=[],a=n.thumbnails;for(s=0,o=a.length;s<o;s++)r=a[s],e.thumbnails[r.name]&&(i.push(r.name),r.current=e.thumbnails[r.name].current,t.push(r.current.url),((l=r.proposed)!=null?l.url:void 0)&&t.push(r.proposed.url),n.trash(r));e.immediate?n.view(i):f(),u("randomizeUrl")({reset:!0,urls:t})},n.trash=function(e){return typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),delete e.proposed,e.showProposed=!1,f()},f=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed)return}return n.viewFilterValue=!1},n.trashAll=function(){return l(),t.forEach(n.thumbnails,function(e){return n.trash(e)})},l=function(){var e;if((typeof h!=="undefined"&&h!==null?h["pte-delete-nonce"]:void 0)==null)return;e=i.ajax(r.ajaxurl,{async:!1,data:{action:"pte_ajax",id:c,"pte-action":"delete-images","pte-nonce":h["pte-delete-nonce"]}})},i(window).unload(function(e){l()}),n.aspectRatios=[],a=function(e){var t,r,i,s,o;t=e.width/e.height;if(t==null||t===Infinity)return;if(!e.crop||+e.crop<1)return;o=n.aspectRatios;for(i=0,s=o.length;i<s;i++){r=o[i];if(r.size===t){r.thumbnails.push(e.name);return}}n.aspectRatios.push({size:t,thumbnails:[e.name]})},c=r.id,c||o.error("No ID Found"),n.i18n=r.i18n,n.infoMessage=null,n.setInfoMessage=function(e){return n.infoMessage=e},n.errorMessage=null,n.setErrorMessage=function(e){return n.errorMessage=e},h=null,n.setNonces=function(e){return h=e},n.thumbnails=[],n.thumbnailObject=n.thumbnailResource.get({id:c},function(){t.forEach(n.thumbnailObject,function(e,t){e.name=t,this.thumbnails.push(e),a(e)},n),n.updateSelected()}),n.anyProposed=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.proposed!=null)return!0}return!1},n.anySelected=function(){var e,t,r,i;i=n.thumbnails;for(t=0,r=i.length;t<r;t++){e=i[t];if(e.selected)return!0}return!1},n.$watch("currentThumbnailBarPosition",function(e,t){if(e===t)return;n.updateOptions({pte_thumbnail_bar:n.currentThumbnailBarPosition})}),n.toggleCurrentThumbnailBarPosition=function(){var e;e=["vertical","horizontal"],n.currentThumbnailBarPosition===e[0]?n.currentThumbnailBarPosition=e[1]:n.currentThumbnailBarPosition=e[0]}}]),n})}.call(this),function(){var e=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1};n("cs!controllers/TableCtrl",["angular","cs!apps/pteApp"],function(t,n){return n.controller("TableCtrl",["$scope",function(n){n.toggleSelected=function(e){e.selected=!e.selected,n.updateSelected()},n.toggleAll=function(){var e,t,r;r=n.thumbnails;for(e in r)t=r[e],t.selected=n.tableSelector;n.updateSelected()},n.selectAspectRatio=function(r){var i;typeof event!="undefined"&&event!==null&&typeof event.stopPropagation=="function"&&event.stopPropagation(),i=null,t.forEach(n.thumbnails,function(t){var n;if(n=t.name,e.call(r.thumbnails,n)>=0)i==null&&(i=t.selected!=null&&t.selected?!1:!0),t.selected=i}),n.updateSelected()}}]),n})}.call(this),function(e){e.Jcrop=function(t,n){function r(e){return Math.round(e)+"px"}function i(e){return H.baseClass+"-"+e}function s(){return e.fx.step.hasOwnProperty("backgroundColor")}function o(t){var n=e(t).offset();return[n.left,n.top]}function u(e){return[e.pageX-B[0],e.pageY-B[1]]}function f(t){typeof t!="object"&&(t={}),H=e.extend(H,t),e.each(["onChange","onSelect","onRelease","onDblClick"],function(e,t){typeof H[t]!="function"&&(H[t]=function(){})})}function l(e,t,n){B=o(W),mt.setCursor(e==="move"?e:e+"-resize");if(e==="move")return mt.activateHandlers(h(t),g,n);var r=pt.getFixed(),i=p(e),s=pt.getCorner(p(i));pt.setPressed(pt.getCorner(i)),pt.setCurrent(s),mt.activateHandlers(c(e,r),g,n)}function c(e,t){return function(n){if(!H.aspectRatio)switch(e){case"e":n[1]=t.y2;break;case"w":n[1]=t.y2;break;case"n":n[0]=t.x2;break;case"s":n[0]=t.x2}else switch(e){case"e":n[1]=t.y+1;break;case"w":n[1]=t.y+1;break;case"n":n[0]=t.x+1;break;case"s":n[0]=t.x+1}pt.setCurrent(n),vt.update()}}function h(e){var t=e;return gt.watchKeys(),function(e){pt.moveOffset([e[0]-t[0],e[1]-t[1]]),t=e,vt.update()}}function p(e){switch(e){case"n":return"sw";case"s":return"nw";case"e":return"nw";case"w":return"ne";case"ne":return"sw";case"nw":return"se";case"se":return"nw";case"sw":return"ne"}}function d(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(t)),t.stopPropagation(),t.preventDefault(),!1)}}function v(e,t,n){var r=e.width(),i=e.height();r>t&&t>0&&(r=t,i=t/e.width()*e.height()),i>n&&n>0&&(i=n,r=n/e.height()*e.width()),ot=e.width()/r,ut=e.height()/i,e.width(r).height(i)}function m(e){return{x:e.x*ot,y:e.y*ut,x2:e.x2*ot,y2:e.y2*ut,w:e.w*ot,h:e.h*ut}}function g(e){var t=pt.getFixed();t.w>H.minSelect[0]&&t.h>H.minSelect[1]?(vt.enableHandles(),vt.done()):vt.release(),mt.setCursor(H.allowSelect?"crosshair":"default")}function y(e){if(H.disabled)return!1;if(!H.allowSelect)return!1;ft=!0,B=o(W),vt.disableHandles(),mt.setCursor("crosshair");var t=u(e);return pt.setPressed(t),vt.update(),mt.activateHandlers(b,g,e.type.substring(0,5)==="touch"),gt.watchKeys(),e.stopPropagation(),e.preventDefault(),!1}function b(e){pt.setCurrent(e),vt.update()}function w(){var t=e("<div></div>").addClass(i("tracker"));return F&&t.css({opacity:0,backgroundColor:"white"}),t}function E(e){$.removeClass().addClass(i("holder")).addClass(e)}function S(e,t){function n(){window.setTimeout(b,c)}var r=e[0]/ot,i=e[1]/ut,s=e[2]/ot,o=e[3]/ut;if(lt)return;var u=pt.flipCoords(r,i,s,o),a=pt.getFixed(),f=[a.x,a.y,a.x2,a.y2],l=f,c=H.animationDelay,h=u[0]-f[0],p=u[1]-f[1],d=u[2]-f[2],v=u[3]-f[3],m=0,g=H.swingSpeed;r=l[0],i=l[1],s=l[2],o=l[3],vt.animMode(!0);var y,b=function(){return function(){m+=(100-m)/g,l[0]=Math.round(r+m/100*h),l[1]=Math.round(i+m/100*p),l[2]=Math.round(s+m/100*d),l[3]=Math.round(o+m/100*v),m>=99.8&&(m=100),m<100?(T(l),n()):(vt.done(),vt.animMode(!1),typeof t=="function"&&t.call(yt))}}();n()}function x(e){T([e[0]/ot,e[1]/ut,e[2]/ot,e[3]/ut]),H.onSelect.call(yt,m(pt.getFixed())),vt.enableHandles()}function T(e){pt.setPressed([e[0],e[1]]),pt.setCurrent([e[2],e[3]]),vt.update()}function N(){return m(pt.getFixed())}function C(){return pt.getFixed()}function k(e){f(e),P()}function L(){H.disabled=!0,vt.disableHandles(),vt.setCursor("default"),mt.setCursor("default")}function A(){H.disabled=!1,P()}function O(){vt.done(),mt.activateHandlers(null,null)}function M(){$.remove(),R.show(),R.css("visibility","visible"),e(t).removeData("Jcrop")}function _(e,t){vt.release(),L();var n=new Image;n.onload=function(){var r=n.width,i=n.height,s=H.boxWidth,o=H.boxHeight;W.width(r).height(i),W.attr("src",e),J.attr("src",e),v(W,s,o),X=W.width(),V=W.height(),J.width(X).height(V),Z.width(X+Y*2).height(V+Y*2),$.width(X).height(V),dt.resize(X,V),A(),typeof t=="function"&&t.call(yt)},n.src=e}function D(e,t,n){var r=t||H.bgColor;H.bgFade&&s()&&H.fadeTime&&!n?e.animate({backgroundColor:r},{queue:!1,duration:H.fadeTime}):e.css("backgroundColor",r)}function P(e){H.allowResize?e?vt.enableOnly():vt.enableHandles():vt.disableHandles(),mt.setCursor(H.allowSelect?"crosshair":"default"),vt.setCursor(H.allowMove?"move":"default"),H.hasOwnProperty("trueSize")&&(ot=H.trueSize[0]/X,ut=H.trueSize[1]/V),H.hasOwnProperty("setSelect")&&(x(H.setSelect),vt.done(),delete H.setSelect),dt.refresh(),H.bgColor!=et&&(D(H.shade?dt.getShades():$,H.shade?H.shadeColor||H.bgColor:H.bgColor),et=H.bgColor),tt!=H.bgOpacity&&(tt=H.bgOpacity,H.shade?dt.refresh():vt.setBgOpacity(tt)),nt=H.maxSize[0]||0,rt=H.maxSize[1]||0,it=H.minSize[0]||0,st=H.minSize[1]||0,H.hasOwnProperty("outerImage")&&(W.attr("src",H.outerImage),delete H.outerImage),vt.refresh()}var H=e.extend({},e.Jcrop.defaults),B,j=navigator.userAgent.toLowerCase(),F=/msie/.test(j),I=/msie [1-6]\./.test(j);typeof t!="object"&&(t=e(t)[0]),typeof n!="object"&&(n={}),f(n);var q={border:"none",visibility:"visible",margin:0,padding:0,position:"absolute",top:0,left:0},R=e(t),U=!0;if(t.tagName=="IMG"){if(R[0].width!=0&&R[0].height!=0)R.width(R[0].width),R.height(R[0].height);else{var z=new Image;z.src=R[0].src,R.width(z.width),R.height(z.height)}var W=R.clone().removeAttr("id").css(q).show();W.width(R.width()),W.height(R.height()),R.after(W).hide()}else W=R.css(q).show(),U=!1,H.shade===null&&(H.shade=!0);v(W,H.boxWidth,H.boxHeight);var X=W.width(),V=W.height(),$=e("<div />").width(X).height(V).addClass(i("holder")).css({position:"relative",backgroundColor:H.bgColor}).insertAfter(R).append(W);H.addClass&&$.addClass(H.addClass);var J=e("<div />"),K=e("<div />").width("100%").height("100%").css({zIndex:310,position:"absolute",overflow:"hidden"}),Q=e("<div />").width("100%").height("100%").css("zIndex",320),G=e("<div />").css({position:"absolute",zIndex:600}).dblclick(function(){var e=pt.getFixed();H.onDblClick.call(yt,e)}).insertBefore(W).append(K,Q);U&&(J=e("<img />").attr("src",W.attr("src")).css(q).width(X).height(V),K.append(J)),I&&G.css({overflowY:"hidden"});var Y=H.boundary,Z=w().width(X+Y*2).height(V+Y*2).css({position:"absolute",top:r(-Y),left:r(-Y),zIndex:290}).mousedown(y),et=H.bgColor,tt=H.bgOpacity,nt,rt,it,st,ot,ut,at=!0,ft,lt,ct;B=o(W);var ht=function(){function e(){var e={},t=["touchstart","touchmove","touchend"],n=document.createElement("div"),r;try{for(r=0;r<t.length;r++){var i=t[r];i="on"+i;var s=i in n;s||(n.setAttribute(i,"return;"),s=typeof n[i]=="function"),e[t[r]]=s}return e.touchstart&&e.touchend&&e.touchmove}catch(o){return!1}}function t(){return H.touchSupport===!0||H.touchSupport===!1?H.touchSupport:e()}return{createDragger:function(e){return function(t){return H.disabled?!1:e==="move"&&!H.allowMove?!1:(B=o(W),ft=!0,l(e,u(ht.cfilter(t)),!0),t.stopPropagation(),t.preventDefault(),!1)}},newSelection:function(e){return y(ht.cfilter(e))},cfilter:function(e){return e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e},isSupported:e,support:t()}}(),pt=function(){function e(e){e=o(e),h=l=e[0],p=c=e[1]}function t(e){e=o(e),d=e[0]-h,v=e[1]-p,h=e[0],p=e[1]}function n(){return[d,v]}function r(e){var t=e[0],n=e[1];0>l+t&&(t-=t+l),0>c+n&&(n-=n+c),V<p+n&&(n+=V-(p+n)),X<h+t&&(t+=X-(h+t)),l+=t,h+=t,c+=n,p+=n}function i(e){var t=s();switch(e){case"ne":return[t.x2,t.y];case"nw":return[t.x,t.y];case"se":return[t.x2,t.y2];case"sw":return[t.x,t.y2]}}function s(){if(!H.aspectRatio)return a();var e=H.aspectRatio,t=H.minSize[0]/ot,n=H.maxSize[0]/ot,r=H.maxSize[1]/ut,i=h-l,s=p-c,o=Math.abs(i),d=Math.abs(s),v=o/d,m,g,y,b;return n===0&&(n=X*10),r===0&&(r=V*10),v<e?(g=p,y=d*e,m=i<0?l-y:y+l,m<0?(m=0,b=Math.abs((m-l)/e),g=s<0?c-b:b+c):m>X&&(m=X,b=Math.abs((m-l)/e),g=s<0?c-b:b+c)):(m=h,b=o/e,g=s<0?c-b:c+b,g<0?(g=0,y=Math.abs((g-c)*e),m=i<0?l-y:y+l):g>V&&(g=V,y=Math.abs(g-c)*e,m=i<0?l-y:y+l)),m>l?(m-l<t?m=l+t:m-l>n&&(m=l+n),g>c?g=c+(m-l)/e:g=c-(m-l)/e):m<l&&(l-m<t?m=l-t:l-m>n&&(m=l-n),g>c?g=c+(l-m)/e:g=c-(l-m)/e),m<0?(l-=m,m=0):m>X&&(l-=m-X,m=X),g<0?(c-=g,g=0):g>V&&(c-=g-V,g=V),f(u(l,c,m,g))}function o(e){return e[0]<0&&(e[0]=0),e[1]<0&&(e[1]=0),e[0]>X&&(e[0]=X),e[1]>V&&(e[1]=V),[Math.round(e[0]),Math.round(e[1])]}function u(e,t,n,r){var i=e,s=n,o=t,u=r;return n<e&&(i=n,s=e),r<t&&(o=r,u=t),[i,o,s,u]}function a(){var e=h-l,t=p-c,n;return nt&&Math.abs(e)>nt&&(h=e>0?l+nt:l-nt),rt&&Math.abs(t)>rt&&(p=t>0?c+rt:c-rt),st/ut&&Math.abs(t)<st/ut&&(p=t>0?c+st/ut:c-st/ut),it/ot&&Math.abs(e)<it/ot&&(h=e>0?l+it/ot:l-it/ot),l<0&&(h-=l,l-=l),c<0&&(p-=c,c-=c),h<0&&(l-=h,h-=h),p<0&&(c-=p,p-=p),h>X&&(n=h-X,l-=n,h-=n),p>V&&(n=p-V,c-=n,p-=n),l>X&&(n=l-V,p-=n,c-=n),c>V&&(n=c-V,p-=n,c-=n),f(u(l,c,h,p))}function f(e){return{x:e[0],y:e[1],x2:e[2],y2:e[3],w:e[2]-e[0],h:e[3]-e[1]}}var l=0,c=0,h=0,p=0,d,v;return{flipCoords:u,setPressed:e,setCurrent:t,getOffset:n,moveOffset:r,getCorner:i,getFixed:s}}(),dt=function(){function t(e,t){v.left.css({height:r(t)}),v.right.css({height:r(t)})}function n(){return i(pt.getFixed())}function i(e){v.top.css({left:r(e.x),width:r(e.w),height:r(e.y)}),v.bottom.css({top:r(e.y2),left:r(e.x),width:r(e.w),height:r(V-e.y2)}),v.right.css({left:r(e.x2),width:r(X-e.x2)}),v.left.css({width:r(e.x)})}function s(){return e("<div />").css({position:"absolute",backgroundColor:H.shadeColor||H.bgColor}).appendTo(d)}function o(){p||(p=!0,d.insertBefore(W),n(),vt.setBgOpacity(1,0,1),J.hide(),u(H.shadeColor||H.bgColor,1),vt.isAwake()?l(H.bgOpacity,1):l(1,1))}function u(e,t){D(h(),e,t)}function f(){p&&(d.remove(),J.show(),p=!1,vt.isAwake()?vt.setBgOpacity(H.bgOpacity,1,1):(vt.setBgOpacity(1,1,1),vt.disableHandles()),D($,0,1))}function l(e,t){p&&(H.bgFade&&!t?d.animate({opacity:1-e},{queue:!1,duration:H.fadeTime}):d.css({opacity:1-e}))}function c(){H.shade?o():f(),vt.isAwake()&&l(H.bgOpacity)}function h(){return d.children()}var p=!1,d=e("<div />").css({position:"absolute",zIndex:240,opacity:0}),v={top:s(),left:s().height(V),right:s().height(V),bottom:s()};return{update:n,updateRaw:i,getShades:h,setBgColor:u,enable:o,disable:f,resize:t,refresh:c,opacity:l}}(),vt=function(){function t(t){var n=e("<div />").css({position:"absolute",opacity:H.borderOpacity}).addClass(i(t));return K.append(n),n}function n(t,n){var r=e("<div />").mousedown(d(t)).css({cursor:t+"-resize",position:"absolute",zIndex:n}).addClass("ord-"+t);return ht.support&&r.bind("touchstart.jcrop",ht.createDragger(t)),Q.append(r),r}function s(e){var t=H.handleSize,r=n(e,L++).css({opacity:H.handleOpacity}).addClass(i("handle"));return t&&r.width(t).height(t),r}function o(e){return n(e,L++).addClass("jcrop-dragbar")}function u(e){var t;for(t=0;t<e.length;t++)M[e[t]]=o(e[t])}function f(e){var n,r;for(r=0;r<e.length;r++){switch(e[r]){case"n":n="hline";break;case"s":n="hline bottom";break;case"e":n="vline right";break;case"w":n="vline"}A[e[r]]=t(n)}}function l(e){var t;for(t=0;t<e.length;t++)O[e[t]]=s(e[t])}function c(e,t){H.shade||J.css({top:r(-t),left:r(-e)}),G.css({top:r(t),left:r(e)})}function h(e,t){G.width(Math.round(e)).height(Math.round(t))}function p(){var e=pt.getFixed();pt.setPressed([e.x,e.y]),pt.setCurrent([e.x2,e.y2]),v()}function v(e){if(k)return g(e)}function g(e){var t=pt.getFixed();h(t.w,t.h),c(t.x,t.y),H.shade&&dt.updateRaw(t),k||b(),e?H.onSelect.call(yt,m(t)):H.onChange.call(yt,m(t))}function y(e,t,n){if(!k&&!t)return;H.bgFade&&!n?W.animate({opacity:e},{queue:!1,duration:H.fadeTime}):W.css("opacity",e)}function b(){G.show(),H.shade?dt.opacity(tt):y(tt,!0),k=!0}function E(){T(),G.hide(),H.shade?dt.opacity(1):y(1),k=!1,H.onRelease.call(yt)}function S(){_&&Q.show()}function x(){_=!0;if(H.allowResize)return Q.show(),!0}function T(){_=!1,Q.hide()}function N(e){e?(lt=!0,T()):(lt=!1,x())}function C(){N(!1),p()}var k,L=370,A={},O={},M={},_=!1;H.dragEdges&&e.isArray(H.createDragbars)&&u(H.createDragbars),e.isArray(H.createHandles)&&l(H.createHandles),H.drawBorders&&e.isArray(H.createBorders)&&f(H.createBorders),e(document).bind("touchstart.jcrop-ios",function(t){e(t.currentTarget).hasClass("jcrop-tracker")&&t.stopPropagation()});var D=w().mousedown(d("move")).css({cursor:"move",position:"absolute",zIndex:360});return ht.support&&D.bind("touchstart.jcrop",ht.createDragger("move")),K.append(D),T(),{updateVisible:v,update:g,release:E,refresh:p,isAwake:function(){return k},setCursor:function(e){D.css("cursor",e)},enableHandles:x,enableOnly:function(){_=!0},showHandles:S,disableHandles:T,animMode:N,setBgOpacity:y,done:C}}(),mt=function(){function t(t){Z.css({zIndex:450}),t?e(document).bind("touchmove.jcrop",o).bind("touchend.jcrop",f):p&&e(document).bind("mousemove.jcrop",r).bind("mouseup.jcrop",i)}function n(){Z.css({zIndex:290}),e(document).unbind(".jcrop")}function r(e){return c(u(e)),!1}function i(e){return e.preventDefault(),e.stopPropagation(),ft&&(ft=!1,h(u(e)),vt.isAwake()&&H.onSelect.call(yt,m(pt.getFixed())),n(),c=function(){},h=function(){}),!1}function s(e,n,r){return ft=!0,c=e,h=n,t(r),!1}function o(e){return c(u(ht.cfilter(e))),!1}function f(e){return i(ht.cfilter(e))}function l(e){Z.css("cursor",e)}var c=function(){},h=function(){},p=H.trackDocument;return p||Z.mousemove(r).mouseup(i).mouseout(i),W.before(Z),{activateHandlers:s,setCursor:l}}(),gt=function(){function t(){H.keySupport&&(s.show(),s.focus())}function n(e){s.hide()}function r(e,t,n){H.allowMove&&(pt.moveOffset([t,n]),vt.updateVisible(!0)),e.preventDefault(),e.stopPropagation()}function i(e){if(e.ctrlKey||e.metaKey)return!0;ct=e.shiftKey?!0:!1;var t=ct?10:1;switch(e.keyCode){case 37:r(e,-t,0);break;case 39:r(e,t,0);break;case 38:r(e,0,-t);break;case 40:r(e,0,t);break;case 27:H.allowSelect&&vt.release();break;case 9:return!0}return!1}var s=e('<input type="radio" />').css({position:"fixed",left:"-120px",width:"12px"}).addClass("jcrop-keymgr"),o=e("<div />").css({position:"absolute",overflow:"hidden"}).append(s);return H.keySupport&&(s.keydown(i).blur(n),I||!H.fixedSupport?(s.css({position:"absolute",left:"-20px"}),o.append(s).insertBefore(W)):s.insertBefore(W)),{watchKeys:t}}();ht.support&&Z.bind("touchstart.jcrop",ht.newSelection),Q.hide(),P(!0);var yt={setImage:_,animateTo:S,setSelect:x,setOptions:k,tellSelect:N,tellScaled:C,setClass:E,disable:L,enable:A,cancel:O,release:vt.release,destroy:M,focus:gt.watchKeys,getBounds:function(){return[X*ot,V*ut]},getWidgetSize:function(){return[X,V]},getScaleFactor:function(){return[ot,ut]},getOptions:function(){return H},ui:{holder:$,selection:G}};return F&&$.bind("selectstart",function(){return!1}),R.data("Jcrop",yt),yt},e.fn.Jcrop=function(t,n){var r;return this.each(function(){if(e(this).data("Jcrop")){if(t==="api")return e(this).data("Jcrop");e(this).data("Jcrop").setOptions(t)}else this.tagName=="IMG"?e.Jcrop.Loader(this,function(){e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r)}):(e(this).css({display:"block",visibility:"hidden"}),r=e.Jcrop(this,t),e.isFunction(n)&&n.call(r))}),this},e.Jcrop.Loader=function(t,n,r){function i(){o.complete?(s.unbind(".jcloader"),e.isFunction(n)&&n.call(o)):window.setTimeout(i,50)}var s=e(t),o=s[0];s.bind("load.jcloader",i).bind("error.jcloader",function(t){s.unbind(".jcloader"),e.isFunction(r)&&r.call(o)}),o.complete&&e.isFunction(n)&&(s.unbind(".jcloader"),n.call(o))},e.Jcrop.defaults={allowSelect:!0,allowMove:!0,allowResize:!0,trackDocument:!0,baseClass:"jcrop",addClass:null,bgColor:"black",bgOpacity:.6,bgFade:!1,borderOpacity:.4,handleOpacity:.5,handleSize:null,aspectRatio:0,keySupport:!0,createHandles:["n","s","e","w","nw","ne","se","sw"],createDragbars:["n","s","e","w"],createBorders:["n","s","e","w"],drawBorders:!0,dragEdges:!0,fixedSupport:!0,touchSupport:null,shade:null,boxWidth:0,boxHeight:0,boundary:2,fadeTime:400,animationDelay:20,swingSpeed:3,minSelect:[0,0],maxSize:[0,0],minSize:[0,0],onChange:function(){},onSelect:function(){},onDblClick:function(){},onRelease:function(){}}}(jQuery),n("jcrop",function(){}),function(){n("cs!jcrop-api",["cs!jquery","cs!settings","jcrop"],function(e,t){var n,r,i;return i=function(e,t){var n,r,i,s,o,u,a;return a=[],r=a[0],n=a[1],u=a[2],o=a[3],s=0,i=function(){return s=new Date,u=null,o=e.apply(r,n),null},function(){var a,f;return a=new Date,f=t-(a-s),r=this,n=arguments,f<=0?(clearTimeout(u),u=null,s=a,o=e.apply(r,n)):u||(u=setTimeout(i,f)),o}},r=null,n={onChange:i(function(){var e,t,n,i,s,o,u,a,f,l;t=function(t){t!==e&&r.setOptions({bgColor:t})},u=function(){var e;return e=function(e,t){return e==null?!0:e===0?!1:e<t},a&&e(s,f)&&e(i,o)?!1:!a&&e(s,f)||e(i,o)?!1:!0},n=this.getOptions().cropConstraints;if(!n){t("black");return}s=n[0],i=n[1],a=n[2],e=this.getOptions().bgColor,l=this.tellSelect(),f=l.w,o=l.h,u()?t("red"):t("green")},50),onRelease:function(){var e,t,n,r,i,s,o;o=this.tellSelect(),n=o.x,i=o.y,t=o.w,e=o.h,r=o.x2,s=o.y2;if(isNaN(n))return;if(n!==0||i!==0||t!==0||e!==0||r!==0||s!==0)this.setSelect([0,0,0,0,0,0]),this.release()},trueSize:[t.width,t.height]},r=e.Jcrop("#pte-preview",n),r.release(),r})}.call(this),function(){n("cs!controllers/CropCtrl",["cs!apps/pteApp","cs!jcrop-api","cs!jquery","cs!settings"],function(e,t,n,r){return e.controller("CropCtrl",["$scope","$log",function(e,i){e.$watch("pteCropSave",function(t,n){if(t===n)return;e.updateOptions({pte_crop_save:e.pteCropSave?"true":"false"})}),e.$watch("aspectRatio",function(){var n;n=e.aspectRatio||null,t.setOptions({aspectRatio:n})}),e.$watch("cropConstraints",function(){var n;n=e.cropConstraints||[null,null,!1],t.setOptions({cropConstraints:n})}),e.changeAR=function(){return e.userChanged=!0},e.toggleOptions=function(){e.cropOptions=!e.cropOptions,e.cropOptions||(e.aspectRatio=null,e.userChanged=!1,e.updateSelected())},e.updateSelected=function(){var t,n,i,s,o,u,a,f,l,c,h,p,d,v,m;e.setInfoMessage(null);if(e.userChanged)return;t=null,i=[null,null,!1];try{l=!1,m=e.thumbnails;for(d=0,v=m.length;d<v;d++){c=m[d],n=c.crop,p=c.width,a=c.height,n=+n,p=+p,a=+a,h=p/a;if(c.selected){o=i[0],s=i[1],f=i[2];if(!o||0<p&&o<p)o=p;if(!s||0<a&&s<a)s=a;f=f||n,i=[o,s,f],l=!0}if(c.selected&&n>0){if(t!==null&&t!==h)throw"PTE_EXCEPTION";t=h}}t===null&&l===!1&&(t=r.width/r.height)}catch(g){u=g,e.setInfoMessage(e.i18n.crop_problems),t=null}e.aspectRatio=t,e.cropConstraints=i},e.submitCrop=function(){var s,o,u,a,f,l,c,h,p,d;if(e.cropInProgress)return;e.cropInProgress=!0,a=n.map(e.thumbnails,function(e,t){return e.selected?e.name:null});if(a.length===0){e.setErrorMessage(e.i18n.no_t_selected),i.error(e.i18n.no_t_selected),e.cropInProgress=!1;return}d=t.tellSelect(),l=d.x,h=d.y,f=d.w,u=d.h,c=d.x2,p=d.y2;if(l===0&&h===0&&f===0&&u===0&&c===0&&p===0){e.setErrorMessage(e.i18n.no_c_selected),i.error(e.i18n.no_c_selected),e.cropInProgress=!1;return}s={"pte-action":"resize-images",id:r.id,"pte-sizes":a,w:f,h:u,x:l,y:h},e.pteCropSave&&(s.save="true"),o=e.thumbnailResource.get(s,function(){e.cropInProgress=!1;if(o!=null?o.immediate:void 0)return e.confirmResults(o);e.setNonces({"pte-nonce":o["pte-nonce"],"pte-delete-nonce":o["pte-delete-nonce"]}),n.each(e.thumbnails,function(e,t){var n;o.thumbnails[t.name]&&(n={url:o.thumbnails[t.name].url,file:o.thumbnails[t.name].file},t.proposed=n,t.showProposed=!0)}),e.view(!0)})},e.cropText=function(){return e.pteCropSave===!0?e.i18n.cropSave:e.i18n.crop},e.$on("thumbnail_selected",function(t){e.updateSelected()}),e.updateSelected()}]),e})}.call(this),function(){n("cs!controllers/ViewCtrl",["cs!apps/pteApp"],function(e){return e.controller("ViewCtrl",["$scope",function(e){e.orderBy=function(e){var t,n,r;return t=((n=e.current)!=null?n.width:void 0)*((r=e.current)!=null?r.height:void 0),t!=null&&t>0?t:e.width*e.height},e.selectThumb=function(t){t.selected=!0,e.changePage("crop"),e.updateSelected()},e.thumbnailClass=function(e){var t;return t=[],e.proposed!=null?t.push("modified"):t.push("original"),e.selected&&t.push("selected"),t}}]),e})}.call(this),t(["main"])})();
 
 
 
 
 
 
js-build/main.js.gz CHANGED
Binary file
js/controllers/CropCtrl.coffee CHANGED
@@ -9,13 +9,9 @@ define [
9
  if x is y
10
  return
11
 
12
- update_options =
13
- 'pte-action': 'change-options'
14
  'pte_crop_save': if $scope.pteCropSave then 'true' else 'false'
15
- $log.log update_options
16
 
17
- updated = $scope.thumbnailResource.get update_options, ->
18
- $log.log "Updated options"
19
  return
20
 
21
  $scope.$watch 'aspectRatio', ->
@@ -25,7 +21,7 @@ define [
25
  return
26
 
27
  $scope.$watch 'cropConstraints', ->
28
- cropConstraints = $scope.cropConstraints || [null, null]
29
  jcrop.setOptions
30
  cropConstraints: cropConstraints
31
  return
@@ -59,9 +55,7 @@ define [
59
  # 3. In order to set the AR, each selected thumbnail needs to have the
60
  # same AR.
61
  #
62
- # 4. For the default AR:
63
- # if all the thumbnails have the same crop use it.
64
- # else width/height
65
  #
66
  ###
67
  $scope.updateSelected = ->
@@ -71,10 +65,9 @@ define [
71
  return
72
 
73
  ar = null
74
- cropConstraints = [null, null]
75
  try
76
  selected = false
77
- allCrop = null
78
  for thumbnail in $scope.thumbnails
79
  # Get the crop/width/height and convert to numerals
80
  {crop, width, height} = thumbnail
@@ -84,21 +77,15 @@ define [
84
  tmp_ar = width/height
85
 
86
  if thumbnail.selected
87
- [cropW, cropH] = cropConstraints
88
  if !cropW or (0 < width and cropW < width)
89
  cropW = width
90
  if !cropH or (0 < height and cropH < height)
91
  cropH = height
92
- cropConstraints = [cropW, cropH]
 
93
  selected = true
94
 
95
- # Check if all the thumbnails have the same crop
96
- if crop > 0
97
- if allCrop is null
98
- allCrop = tmp_ar
99
- else if allCrop > 0 and allCrop != tmp_ar
100
- allCrop = -1
101
-
102
  # Check Wordpress Crop setting (#2)
103
  if thumbnail.selected and crop > 0
104
  # Every AR should be the same (#3)
@@ -108,10 +95,7 @@ define [
108
 
109
  # (#4) Set the default
110
  if ar is null and selected is false
111
- if allCrop isnt null and allCrop > 0
112
- ar = allCrop
113
- else
114
- ar = settings.width/settings.height
115
  catch error
116
  $scope.setInfoMessage $scope.i18n.crop_problems
117
  ar = null
9
  if x is y
10
  return
11
 
12
+ $scope.updateOptions
 
13
  'pte_crop_save': if $scope.pteCropSave then 'true' else 'false'
 
14
 
 
 
15
  return
16
 
17
  $scope.$watch 'aspectRatio', ->
21
  return
22
 
23
  $scope.$watch 'cropConstraints', ->
24
+ cropConstraints = $scope.cropConstraints || [null, null, false]
25
  jcrop.setOptions
26
  cropConstraints: cropConstraints
27
  return
55
  # 3. In order to set the AR, each selected thumbnail needs to have the
56
  # same AR.
57
  #
58
+ # 4. For the default AR: Use the original images width/height
 
 
59
  #
60
  ###
61
  $scope.updateSelected = ->
65
  return
66
 
67
  ar = null
68
+ cropConstraints = [null, null, false]
69
  try
70
  selected = false
 
71
  for thumbnail in $scope.thumbnails
72
  # Get the crop/width/height and convert to numerals
73
  {crop, width, height} = thumbnail
77
  tmp_ar = width/height
78
 
79
  if thumbnail.selected
80
+ [cropW, cropH, isAR] = cropConstraints
81
  if !cropW or (0 < width and cropW < width)
82
  cropW = width
83
  if !cropH or (0 < height and cropH < height)
84
  cropH = height
85
+ isAR = isAR or crop
86
+ cropConstraints = [cropW, cropH, isAR]
87
  selected = true
88
 
 
 
 
 
 
 
 
89
  # Check Wordpress Crop setting (#2)
90
  if thumbnail.selected and crop > 0
91
  # Every AR should be the same (#3)
95
 
96
  # (#4) Set the default
97
  if ar is null and selected is false
98
+ ar = settings.width/settings.height
 
 
 
99
  catch error
100
  $scope.setInfoMessage $scope.i18n.crop_problems
101
  ar = null
js/controllers/PteCtrl.coffee CHANGED
@@ -50,6 +50,20 @@ define [
50
  $scope.updateSelected = ->
51
  $scope.$broadcast 'thumbnail_selected'
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  ###
55
  # ViewFilter is a filter expression that checks if the viewFilter specifies
@@ -245,6 +259,38 @@ define [
245
  return true
246
  return false
247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  return
249
  ]
250
  return app
50
  $scope.updateSelected = ->
51
  $scope.$broadcast 'thumbnail_selected'
52
 
53
+
54
+ ###
55
+ # Update options
56
+ #
57
+ # Use this to update user/site options
58
+ ###
59
+ $scope.updateOptions = (update_options) ->
60
+ update_options['pte-action'] = 'change-options'
61
+ $log.log "Updating Options", update_options
62
+
63
+ updated = $scope.thumbnailResource.get update_options, ->
64
+ $log.log "Updated options"
65
+ return
66
+
67
 
68
  ###
69
  # ViewFilter is a filter expression that checks if the viewFilter specifies
259
  return true
260
  return false
261
 
262
+ ###
263
+ # Used to hide/show the existing thumbnails
264
+ #
265
+ # @since 2.2.0
266
+ ###
267
+ $scope.anySelected = ->
268
+ for thumb in $scope.thumbnails
269
+ if thumb.selected
270
+ return true
271
+ return false
272
+
273
+ ###
274
+ # Update wordpress option when the currentThumbnailBarPosition changes
275
+ ###
276
+ $scope.$watch 'currentThumbnailBarPosition', (x,y) ->
277
+ if x is y
278
+ return
279
+
280
+ $scope.updateOptions
281
+ 'pte_thumbnail_bar': $scope.currentThumbnailBarPosition
282
+
283
+ return
284
+
285
+ $scope.toggleCurrentThumbnailBarPosition = ->
286
+ positions = ["vertical", "horizontal"]
287
+ if $scope.currentThumbnailBarPosition is positions[0]
288
+ $scope.currentThumbnailBarPosition = positions[1]
289
+ else
290
+ $scope.currentThumbnailBarPosition = positions[0]
291
+ return
292
+
293
+ ### STOP THE MADNESS ###
294
  return
295
  ]
296
  return app
js/csmain.coffee CHANGED
@@ -1,11 +1,17 @@
1
  define [
 
2
  'cs!jquery'
3
  'angular'
4
- 'cs!apps/pteApp'
5
- 'cs!controllers/PteCtrl'
6
- 'cs!controllers/TableCtrl'
7
- 'cs!controllers/CropCtrl'
8
- 'cs!controllers/ViewCtrl'
9
- ], ($, angular, pteApp) ->
10
- angular.bootstrap $(".wrap"), [pteApp.name]
 
 
 
 
 
11
  return
1
  define [
2
+ 'require'
3
  'cs!jquery'
4
  'angular'
5
+ ], (require, $, angular) ->
6
+ $(window).load ->
7
+ require [
8
+ 'cs!apps/pteApp'
9
+ 'cs!controllers/PteCtrl'
10
+ 'cs!controllers/TableCtrl'
11
+ 'cs!controllers/CropCtrl'
12
+ 'cs!controllers/ViewCtrl'
13
+ ], (pteApp) ->
14
+ angular.bootstrap $(".wrap"), [pteApp.name]
15
+ return
16
+ return
17
  return
js/jcrop-api.coffee CHANGED
@@ -2,34 +2,88 @@ define [
2
  'cs!jquery'
3
  'cs!settings'
4
  'jcrop'
5
- 'domReady!'
6
  ], ($, settings) ->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  jcrop = null
8
  crop_options =
9
  # TODO
10
  # Make the bgColor an option (dropdown, black or transparent)
11
  #bgColor: 'green' # make it an option?
12
- onChange: ->
13
- [crop_w, crop_h] = this.getOptions().cropConstraints
14
- {bgColor} = this.getOptions()
15
- {w, h} = this.tellSelect()
16
- #console.log w, h, crop_w, crop_h
17
- jcrop = this
18
  changeBgColor = (color) ->
19
  if color != bgColor
20
  jcrop.setOptions
21
  bgColor: color
22
  return
23
 
24
- if (crop_w and crop_w > w) or (crop_h and crop_h > h)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  changeBgColor 'red'
26
  else
27
  changeBgColor 'green'
28
  return
 
29
 
30
 
31
  onRelease: ->
32
  {x, y, w, h, x2, y2} = this.tellSelect()
 
 
33
  if x isnt 0 or
34
  y isnt 0 or
35
  w isnt 0 or
@@ -48,4 +102,5 @@ define [
48
 
49
  jcrop = $.Jcrop "#pte-preview", crop_options
50
  jcrop.release()
 
51
  return jcrop
2
  'cs!jquery'
3
  'cs!settings'
4
  'jcrop'
 
5
  ], ($, settings) ->
6
+ # Adapted from underscore (underscorejs.org) source
7
+ throttle = (func, wait) ->
8
+ [context, args, timeout, result] = []
9
+ previous = 0
10
+ later = ->
11
+ previous = new Date
12
+ timeout = null
13
+ result = func.apply(context, args)
14
+ return null
15
+ ->
16
+ now = new Date
17
+ remaining = wait - (now - previous)
18
+ context = this
19
+ args = arguments
20
+ if (remaining <= 0)
21
+ clearTimeout(timeout)
22
+ timeout = null
23
+ previous = now
24
+ result = func.apply(context, args)
25
+ else if (!timeout)
26
+ timeout = setTimeout(later, remaining)
27
+ return result
28
+
29
+
30
  jcrop = null
31
  crop_options =
32
  # TODO
33
  # Make the bgColor an option (dropdown, black or transparent)
34
  #bgColor: 'green' # make it an option?
35
+ onChange: throttle( ->
36
+ #jcrop = this
 
 
 
 
37
  changeBgColor = (color) ->
38
  if color != bgColor
39
  jcrop.setOptions
40
  bgColor: color
41
  return
42
 
43
+ isBad = ->
44
+ compare = (constraint, dimension) ->
45
+ if ! constraint?
46
+ return true
47
+ if constraint is 0
48
+ return false
49
+ constraint < dimension
50
+ # If both dimensions are required
51
+ # and if the constraint_w is less than the actual cropped width then we are no longer constrained
52
+ # and if the constraint_h is less than the actual cropped height then we are no longer constrained
53
+ if is_ar_enforced and compare(crop_w, w) and compare(crop_h, h)
54
+ return false # GOOD
55
+ # If only one dimension is required
56
+ # if the constraint_w is less than the actual cropped width
57
+ # - or -
58
+ # if the constraint_h is less than the actual cropped height then we are no longer constrained
59
+ if !is_ar_enforced and compare(crop_w, w) or compare(crop_h, h)
60
+ return false # GOOD
61
+ return true
62
+
63
+
64
+
65
+ cropConstraints = this.getOptions().cropConstraints
66
+ if !cropConstraints
67
+ changeBgColor 'black'
68
+ return
69
+
70
+ [crop_w, crop_h, is_ar_enforced] = cropConstraints
71
+ {bgColor} = this.getOptions()
72
+ {w, h} = this.tellSelect()
73
+ #console.log w, h, crop_w, crop_h
74
+
75
+ if isBad()
76
  changeBgColor 'red'
77
  else
78
  changeBgColor 'green'
79
  return
80
+ , 50)
81
 
82
 
83
  onRelease: ->
84
  {x, y, w, h, x2, y2} = this.tellSelect()
85
+ if isNaN x
86
+ return
87
  if x isnt 0 or
88
  y isnt 0 or
89
  w isnt 0 or
102
 
103
  jcrop = $.Jcrop "#pte-preview", crop_options
104
  jcrop.release()
105
+
106
  return jcrop
js/main.js CHANGED
@@ -5,7 +5,6 @@ require({
5
  'cs': '../apps/requirejs/cs',
6
  'coffee-script': '../apps/coffee-script',
7
  'jcrop': '../apps/jcrop/js/jquery.Jcrop.min',
8
- 'domReady': '../apps/requirejs/domReady'
9
  },
10
  shim: {
11
  'angular': {
5
  'cs': '../apps/requirejs/cs',
6
  'coffee-script': '../apps/coffee-script',
7
  'jcrop': '../apps/jcrop/js/jquery.Jcrop.min',
 
8
  },
9
  shim: {
10
  'angular': {
js/snippets/{admin.coffee → editor.coffee} RENAMED
File without changes
php/functions.php CHANGED
@@ -204,22 +204,6 @@ function pte_get_all_alternate_size_information( $id ){
204
  return $sizes;
205
  }
206
 
207
- /*
208
- * pte_test
209
- *
210
- * Outputs the test HTML (and loads normal interface in an iframe)
211
- *
212
- * Requires post id as $_GET['id']
213
- */
214
- function pte_test(){
215
- $id = pte_check_id((int) $_GET['id']);
216
- if ( $id ){
217
- $testurl = admin_url('admin-ajax.php') . "?action=pte_ajax&pte-action=launch&id=${id}";
218
- require( PTE_PLUGINPATH . "html/test.php" );
219
- }
220
- return;
221
- }
222
-
223
  /*
224
  * pte_launch
225
  *
@@ -265,19 +249,6 @@ function pte_launch( $page, $id ){
265
  require( $page );
266
  }
267
 
268
- function pte_check_id( $id ){
269
- $logger = PteLogger::singleton();
270
- if ( !$post =& get_post( $id ) ){
271
- $logger->warn( "Invalid id: {$id}" );
272
- return false;
273
- }
274
- if ( !current_user_can( 'edit_post', $id ) ){
275
- $logger->warn( "User does not have permission to edit this item" );
276
- return false;
277
- }
278
- return $id;
279
- }
280
-
281
  function pte_check_int( $int ){
282
  $logger = PteLogger::singleton();
283
  if (! is_numeric( $int ) ){
@@ -377,19 +348,19 @@ function pte_resize_images(){
377
  // Require JSON output
378
  pte_require_json();
379
 
380
- $id = pte_check_id( $_GET['id'] );
381
  $w = pte_check_int( $_GET['w'] );
382
  $h = pte_check_int( $_GET['h'] );
383
  $x = pte_check_int( $_GET['x'] );
384
  $y = pte_check_int( $_GET['y'] );
385
  $save = isset( $_GET['save'] ) && ( strtolower( $_GET['save'] ) === "true" );
386
 
387
- if ( $id === false
388
  || $w === false
389
  || $h === false
390
  || $x === false
391
  || $y === false
392
- ){
393
  return pte_json_error( "ResizeImages initialization failed: '{$id}-{$w}-{$h}-{$x}-{$y}'" );
394
  }
395
 
@@ -508,8 +479,8 @@ function pte_confirm_images($immediate = false){
508
  // Require JSON output
509
  pte_require_json();
510
 
511
- $id = pte_check_id( (int) $_GET['id'] );
512
- if ( $id === false ){
513
  return pte_json_error( "ID invalid: {$id}" );
514
  }
515
 
@@ -611,8 +582,8 @@ function pte_delete_images()
611
  // Require JSON output
612
  pte_require_json();
613
 
614
- $id = pte_check_id( (int) $_GET['id'] );
615
- if ( $id === false ){
616
  return pte_json_error( "ID invalid: {$id}" );
617
  }
618
  // Check nonce
@@ -632,4 +603,3 @@ function pte_get_jpeg_quality($quality){
632
  $logger->debug( "COMPRESSION: " . $options['pte_jpeg_compression'] );
633
  return $options['pte_jpeg_compression'];
634
  }
635
- ?>
204
  return $sizes;
205
  }
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  /*
208
  * pte_launch
209
  *
249
  require( $page );
250
  }
251
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  function pte_check_int( $int ){
253
  $logger = PteLogger::singleton();
254
  if (! is_numeric( $int ) ){
348
  // Require JSON output
349
  pte_require_json();
350
 
351
+ $id = intval( $_GET['id'] );
352
  $w = pte_check_int( $_GET['w'] );
353
  $h = pte_check_int( $_GET['h'] );
354
  $x = pte_check_int( $_GET['x'] );
355
  $y = pte_check_int( $_GET['y'] );
356
  $save = isset( $_GET['save'] ) && ( strtolower( $_GET['save'] ) === "true" );
357
 
358
+ if ( pte_check_id( $id ) === false
359
  || $w === false
360
  || $h === false
361
  || $x === false
362
  || $y === false
363
+ ) {
364
  return pte_json_error( "ResizeImages initialization failed: '{$id}-{$w}-{$h}-{$x}-{$y}'" );
365
  }
366
 
479
  // Require JSON output
480
  pte_require_json();
481
 
482
+ $id = (int) $_GET['id'];
483
+ if ( pte_check_id( $id ) === false ){
484
  return pte_json_error( "ID invalid: {$id}" );
485
  }
486
 
582
  // Require JSON output
583
  pte_require_json();
584
 
585
+ $id = (int) $_GET['id'];
586
+ if ( pte_check_id( $id ) === false ){
587
  return pte_json_error( "ID invalid: {$id}" );
588
  }
589
  // Check nonce
603
  $logger->debug( "COMPRESSION: " . $options['pte_jpeg_compression'] );
604
  return $options['pte_jpeg_compression'];
605
  }
 
php/log.php CHANGED
@@ -146,5 +146,3 @@ class PteLogger {
146
  }
147
 
148
  }
149
-
150
- ?>
146
  }
147
 
148
  }
 
 
php/options.php CHANGED
@@ -282,5 +282,3 @@ function pte_edit_posts_cap( $capability ){ return 'edit_posts'; }
282
  function pte_site_options_html(){
283
  _e( "These site-wide settings can only be changed by an administrator", PTE_DOMAIN );
284
  }
285
-
286
- ?>
282
  function pte_site_options_html(){
283
  _e( "These site-wide settings can only be changed by an administrator", PTE_DOMAIN );
284
  }
 
 
php/overwrite_imgedit_preview.php CHANGED
@@ -12,7 +12,7 @@
12
  */
13
  function pte_wp_ajax_imgedit_preview() {
14
  $post_id = intval($_GET['postid']);
15
- if ( empty($post_id) || !current_user_can('edit_post', $post_id) )
16
  wp_die( -1 );
17
 
18
  check_ajax_referer( "image_editor-$post_id" );
@@ -60,5 +60,3 @@ function pte_image_get_preview_ratio($w, $h) {
60
  $max = max($w, $h);
61
  return $max > $img_max_size ? ($img_max_size / $max) : 1;
62
  }
63
-
64
- ?>
12
  */
13
  function pte_wp_ajax_imgedit_preview() {
14
  $post_id = intval($_GET['postid']);
15
+ if ( empty( $post_id ) || !pte_check_id( $post_id ) )
16
  wp_die( -1 );
17
 
18
  check_ajax_referer( "image_editor-$post_id" );
60
  $max = max($w, $h);
61
  return $max > $img_max_size ? ($img_max_size / $max) : 1;
62
  }
 
 
post-thumbnail-editor.php CHANGED
@@ -1,10 +1,10 @@
1
  <?php
2
  /*
3
  Plugin name: Post Thumbnail Editor
4
- Plugin URI: http://wordpress.org/extend/plugins/post-thumbnail-editor/
5
  Author: sewpafly
6
- Author URI: http://sewpafly.github.io/post-thumbnail-editor
7
- Version: 2.1.0
8
  Description: Individually manage your post thumbnails
9
 
10
  LICENSE
@@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
34
  define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
35
  define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
36
  define( 'PTE_DOMAIN', "post-thumbnail-editor");
37
- define( 'PTE_VERSION', "2.1.0");
38
 
39
  /*
40
  * Option Functionality
@@ -54,6 +54,7 @@ function pte_get_user_options(){
54
  }
55
  $defaults = array( 'pte_debug' => false
56
  , 'pte_crop_save' => false
 
57
  , 'pte_imgedit_max_size' => 600
58
  );
59
 
@@ -94,11 +95,19 @@ function pte_update_user_options(){
94
  require_once( PTE_PLUGINPATH . 'php/options.php' );
95
  $options = pte_get_user_options();
96
 
97
- if ( isset( $_REQUEST['pte_crop_save'] )
98
- && strtolower( $_REQUEST['pte_crop_save'] ) === "true" )
99
- $options['pte_crop_save'] = true;
100
- else
101
- $options['pte_crop_save'] = false;
 
 
 
 
 
 
 
 
102
 
103
  update_option( pte_get_option_name(), $options );
104
  }
@@ -131,6 +140,14 @@ add_action('dbx_post_advanced', 'pte_edit_form_hook_redirect');
131
  function pte_edit_form_hook_redirect(){
132
  add_action('add_meta_boxes', 'pte_admin_media_scripts');
133
  }
 
 
 
 
 
 
 
 
134
  function pte_admin_media_scripts($post_type){
135
  $options = pte_get_options();
136
  wp_enqueue_script( 'pte'
@@ -145,15 +162,15 @@ function pte_admin_media_scripts($post_type){
145
  )
146
  );
147
  if ($post_type == "attachment") {
148
- add_action( 'admin_print_footer_scripts', 'pte_enable_admin_js', 100);
149
  }
150
  else {
151
  add_action( 'admin_print_footer_scripts', 'pte_enable_media_js', 100);
152
  }
153
  }
154
 
155
- function pte_enable_admin_js(){
156
- injectCoffeeScript( PTE_PLUGINPATH . "js/snippets/admin.coffee" );
157
  }
158
 
159
  function pte_enable_media_js(){
@@ -199,9 +216,6 @@ function pte_ajax(){
199
 
200
  switch ($_GET['pte-action'])
201
  {
202
- case "test":
203
- pte_test();
204
- break;
205
  case "resize-images":
206
  pte_resize_images();
207
  break;
@@ -212,8 +226,9 @@ function pte_ajax(){
212
  pte_delete_images();
213
  break;
214
  case "get-thumbnail-info":
215
- $id = pte_check_id((int) $_GET['id']);
216
- print( json_encode( pte_get_all_alternate_size_information( $id ) ) );
 
217
  break;
218
  case "change-options":
219
  pte_update_user_options();
@@ -222,12 +237,30 @@ function pte_ajax(){
222
  die();
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  /* Adds the Thumbnail option to the media library list */
226
  add_filter('media_row_actions', 'pte_media_row_actions', 10, 3); // priority: 10, args: 3
227
 
228
  function pte_media_row_actions($actions, $post, $detached){
229
  // Add capability check
230
- if ( !current_user_can( 'edit_post', $post->ID ) ){
231
  return $actions;
232
  }
233
  $options = pte_get_options();
@@ -268,7 +301,7 @@ add_action( 'admin_menu', 'pte_admin_menu' );
268
  * code is in admin-header.php.
269
  */
270
  function pte_admin_menu(){
271
- add_options_page( __('Post Thumbnail Editor', PTE_DOMAIN) . "-title",
272
  __('Post Thumbnail Editor', PTE_DOMAIN),
273
  'edit_posts',
274
  'pte',
@@ -307,7 +340,10 @@ add_action( 'load-media_page_pte-edit', 'pte_edit_setup' );
307
  function pte_edit_setup() {
308
  global $post, $title;
309
  $post_id = (int) $_GET['pte-id'];
310
- if ( !isset( $post_id ) || !is_int( $post_id ) || !wp_attachment_is_image( $post_id ) ){
 
 
 
311
  //die("POST: $post_id IS_INT:" . is_int( $post_id ) . " ATTACHMENT: " . wp_attachment_is_image( $post_id ));
312
  wp_redirect( admin_url( "upload.php" ) );
313
  exit();
@@ -335,9 +371,3 @@ load_plugin_textdomain( PTE_DOMAIN
335
  , false
336
  , basename( PTE_PLUGINPATH ) . DIRECTORY_SEPARATOR . "i18n" );
337
 
338
-
339
- /** Test Settings **/
340
- //add_image_size( 'pte test 1', 100, 0 );
341
- //add_image_size( 'pte test 2', 100, 150, true );
342
-
343
- ?>
1
  <?php
2
  /*
3
  Plugin name: Post Thumbnail Editor
4
+ Plugin URI: http://sewpafly.github.io/post-thumbnail-editor/
5
  Author: sewpafly
6
+ Author URI: http://sewpafly.github.io/post-thumbnail-editor/
7
+ Version: 2.2.0
8
  Description: Individually manage your post thumbnails
9
 
10
  LICENSE
34
  define( 'PTE_PLUGINURL', plugins_url(basename( dirname(__FILE__))) . "/");
35
  define( 'PTE_PLUGINPATH', dirname(__FILE__) . "/");
36
  define( 'PTE_DOMAIN', "post-thumbnail-editor");
37
+ define( 'PTE_VERSION', "2.2.0");
38
 
39
  /*
40
  * Option Functionality
54
  }
55
  $defaults = array( 'pte_debug' => false
56
  , 'pte_crop_save' => false
57
+ , 'pte_thumbnail_bar' => 'vertical'
58
  , 'pte_imgedit_max_size' => 600
59
  );
60
 
95
  require_once( PTE_PLUGINPATH . 'php/options.php' );
96
  $options = pte_get_user_options();
97
 
98
+ if ( isset( $_REQUEST['pte_crop_save'] ) ) {
99
+ if ( strtolower( $_REQUEST['pte_crop_save'] ) === "true" )
100
+ $options['pte_crop_save'] = true;
101
+ else
102
+ $options['pte_crop_save'] = false;
103
+ }
104
+
105
+ if ( isset( $_REQUEST['pte_thumbnail_bar'] ) ) {
106
+ if ( strtolower( $_REQUEST['pte_thumbnail_bar'] ) == 'vertical' )
107
+ $options['pte_thumbnail_bar'] = 'vertical';
108
+ else
109
+ $options['pte_thumbnail_bar'] = 'horizontal';
110
+ }
111
 
112
  update_option( pte_get_option_name(), $options );
113
  }
140
  function pte_edit_form_hook_redirect(){
141
  add_action('add_meta_boxes', 'pte_admin_media_scripts');
142
  }
143
+
144
+ add_action( 'media_upload_library', 'pte_admin_media_scripts_editor' );
145
+ add_action( 'media_upload_gallery', 'pte_admin_media_scripts_editor' );
146
+ add_action( 'media_upload_image', 'pte_admin_media_scripts_editor' );
147
+ function pte_admin_media_scripts_editor(){
148
+ pte_admin_media_scripts('attachment');
149
+ }
150
+
151
  function pte_admin_media_scripts($post_type){
152
  $options = pte_get_options();
153
  wp_enqueue_script( 'pte'
162
  )
163
  );
164
  if ($post_type == "attachment") {
165
+ add_action( 'admin_print_footer_scripts', 'pte_enable_editor_js', 100);
166
  }
167
  else {
168
  add_action( 'admin_print_footer_scripts', 'pte_enable_media_js', 100);
169
  }
170
  }
171
 
172
+ function pte_enable_editor_js(){
173
+ injectCoffeeScript( PTE_PLUGINPATH . "js/snippets/editor.coffee" );
174
  }
175
 
176
  function pte_enable_media_js(){
216
 
217
  switch ($_GET['pte-action'])
218
  {
 
 
 
219
  case "resize-images":
220
  pte_resize_images();
221
  break;
226
  pte_delete_images();
227
  break;
228
  case "get-thumbnail-info":
229
+ $id = (int) $_GET['id'];
230
+ if ( pte_check_id( $id ) )
231
+ print( json_encode( pte_get_all_alternate_size_information( $id ) ) );
232
  break;
233
  case "change-options":
234
  pte_update_user_options();
237
  die();
238
  }
239
 
240
+ /**
241
+ * Perform the capability check
242
+ *
243
+ * @param $id References the post that the user needs to have permission to edit
244
+ * @returns boolean true if the current user has permission else false
245
+ */
246
+ function pte_check_id( $id ) {
247
+ if ( !$post =& get_post( $id ) ) {
248
+ return false;
249
+ }
250
+ if ( current_user_can( 'edit_post', $id )
251
+ || current_user_can( 'pte-edit', $id ) )
252
+ {
253
+ return apply_filters( 'pte-capability-check', true, $id );
254
+ }
255
+ return apply_filters( 'pte-capability-check', false, $id );
256
+ }
257
+
258
  /* Adds the Thumbnail option to the media library list */
259
  add_filter('media_row_actions', 'pte_media_row_actions', 10, 3); // priority: 10, args: 3
260
 
261
  function pte_media_row_actions($actions, $post, $detached){
262
  // Add capability check
263
+ if ( !pte_check_id( $post->ID ) ) {
264
  return $actions;
265
  }
266
  $options = pte_get_options();
301
  * code is in admin-header.php.
302
  */
303
  function pte_admin_menu(){
304
+ add_options_page( __('Post Thumbnail Editor', PTE_DOMAIN),
305
  __('Post Thumbnail Editor', PTE_DOMAIN),
306
  'edit_posts',
307
  'pte',
340
  function pte_edit_setup() {
341
  global $post, $title;
342
  $post_id = (int) $_GET['pte-id'];
343
+ if ( !isset( $post_id )
344
+ || !is_int( $post_id )
345
+ || !wp_attachment_is_image( $post_id )
346
+ || !pte_check_id( $post_id ) ) {
347
  //die("POST: $post_id IS_INT:" . is_int( $post_id ) . " ATTACHMENT: " . wp_attachment_is_image( $post_id ));
348
  wp_redirect( admin_url( "upload.php" ) );
349
  exit();
371
  , false
372
  , basename( PTE_PLUGINPATH ) . DIRECTORY_SEPARATOR . "i18n" );
373