/** * @license AngularJS v1.2.16 * (c) 2010-2014 Google, Inc. http://angularjs.org * License: MIT */ !function(r,e,t){"use strict";var a=e.$$minErr("$resource"),n=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;function o(r,t){for(var a in t=t||{},e.forEach(t,function(r,e){delete t[e]}),r)r.hasOwnProperty(a)&&!("$"===a.charAt(0)&&"$"===a.charAt(1))&&(t[a]=r[a]);return t}e.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(r,s){var i={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}},c=e.noop,u=e.forEach,p=e.extend,l=e.copy,f=e.isFunction;function h(r,e){this.template=r,this.defaults=e||{},this.urlParams={}}return h.prototype={setUrlParams:function(r,t,n){var o,s,i=this,c=n||i.template,p=i.urlParams={};u(c.split(/\W/),function(r){if("hasOwnProperty"===r)throw a("badname","hasOwnProperty is not a valid parameter name.");!RegExp("^\\d+$").test(r)&&r&&RegExp("(^|[^\\\\]):"+r+"(\\W|$)").test(c)&&(p[r]=!0)}),c=c.replace(/\\:/g,":"),t=t||{},u(i.urlParams,function(r,a){if(o=t.hasOwnProperty(a)?t[a]:i.defaults[a],e.isDefined(o)&&null!==o){var n,u,p;s=(u=n=o,p=!0,encodeURIComponent(u).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,p?"%20":"+")).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),c=c.replace(RegExp(":"+a+"(\\W|$)","g"),function(r,e){return s+e})}else c=c.replace(RegExp("(/?):"+a+"(\\W|$)","g"),function(r,e,t){return"/"==t.charAt(0)?t:e+t})}),c=(c=c.replace(/\/+$/,"")||"/").replace(/\/\.(?=\w+($|\?))/,"."),r.url=c.replace(/\/\\\./,"/."),u(t,function(e,t){i.urlParams[t]||(r.params=r.params||{},r.params[t]=e)})}},function m(d,g,v){var y=new h(d);function $(r){return r.resource}function A(r){o(r||{},this)}return v=p({},i,v),u(v,function(i,h){var m=/^(POST|PUT|PATCH)$/i.test(i.method);A[h]=function(h,d,v,b){var E,P,w,T={};switch(arguments.length){case 4:w=b,P=v;case 3:case 2:if(f(d)){if(f(h)){P=h,w=d;break}P=d,w=v}else{T=h,E=d,P=v;break}case 1:f(h)?P=h:m?E=h:T=h;break;case 0:break;default:throw a("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var O,D,_,k=this instanceof A,W=k?E:i.isArray?[]:new A(E),j={},x=i.interceptor&&i.interceptor.response||$,U=i.interceptor&&i.interceptor.responseError||t;u(i,function(r,e){"params"!=e&&"isArray"!=e&&"interceptor"!=e&&(j[e]=l(r))}),m&&(j.data=E),y.setUrlParams(j,p({},(O=E,D=i.params||{},_={},u(D=p({},g,D),function(r,e){f(r)&&(r=r()),_[e]=r&&r.charAt&&"@"==r.charAt(0)?function r(e,o){if(!(null!=(s=o)&&""!==s&&"hasOwnProperty"!==s&&n.test("."+s)))throw a("badmember",'Dotted member path "@{0}" is invalid.',o);for(var s,i=o.split("."),c=0,u=i.length;c