!function(){function e(e){return function(r){var n=r(e.route,{id:"@id"},{query:{method:"GET",isArray:!1},update:{method:"PUT"}});return{save:function(e){return n.save(e).$promise},update:function(e){return n.update(e).$promise},get:function(e){return n.get(e).$promise},query:function(e){return n.query(e).$promise},"delete":function(e){return n.delete({id:e}).$promise}}}}function r(e,r){function n(n,t,o){return!o&&u[n].cached&&t===u[n].params?u[n].deferred.promise:(u[n].deferred=r.defer(),e[n](t).then(function(e){u[n].deferred.resolve(e)}),u[n].cached=!0,u[n].params=t,u[n].deferred.promise)}function t(r,n){return get.cached=!1,query.cached=!1,e[r](n)}var u=this;return u.get={cached:!1,params:null,deferred:null},u.query={cached:!1,params:null,deferred:null},{save:function(e){return t("save",e)},update:function(e){return t("update",e)},get:function(e,r){return n("get",e,r)},query:function(e,r){return n("query",e,r)},"delete":function(e){return t("delete",e)}}}var n=angular.module("osdResource",[]);r.$inject=["$delegate","$q"],n.provider("ResourceConfig",function(){var e=[];return{config:function(r){e=r},$get:function(){return e}}}),n.config(["$provide",function(e){n.register={factory:e.factory,decorator:e.decorator}}]),n.run(["ResourceConfig",function(t){t.forEach(function(t){n.register.factory(t.name,["$resource",e(t)]),t.decorators.forEach(function(e){"cache"==e&&n.register.decorator(t.name,r)})})}])}();
!function(){function e(e){return function(r){var n=this;n.config=e;var t={query:{method:"GET",isArray:!1},update:{method:"PUT"}};return n.resource=r(e.route,{id:"@id"},t),n.save=function(e){return n.resource.save(e).$promise},n.update=function(e){return n.resource.update(e).$promise},n.get=function(e){return n.resource.get(e).$promise},n.query=function(e){return n.resource.query(e).$promise},n.delete=function(e){return n.resource.delete({id:e}).$promise},n}}function r(e,r){function n(e){return u.caches[e.config.name]={get:{cached:!1,params:null,data:null},query:{cached:!1,params:null,data:null}},u.caches[e.config.name]}function t(t,c,o){var a=u.caches[e.config.name];if(a||(a=n(e)),!o&&a[t].cached&&r.isEqual(c,a[t].params))return a[t].data;a[t].cached=!0,a[t].params=c;var i=e[t](c).then(function(e){return e});return a[t].data=i,i}function c(r,t){var c=u.caches[e.config.name];return c||n(e),c.get.cached=!1,c.query.cached=!1,e[r](t)}var u=this;return u.caches={},{save:function(e){return c("save",e)},update:function(e){return c("update",e)},get:function(e,r){return t("get",e,r)},query:function(e,r){return t("query",e,r)},"delete":function(e){return c("delete",e)}}}var n=angular.module("osdResource",["ngLodash"]);r.$inject=["$delegate","lodash"],n.provider("ResourceConfig",function(){var e=[];return{config:function(r){e=r},$get:function(){return e}}}),n.config(["$provide",function(e){n.register={factory:e.factory,decorator:e.decorator}}]),n.run(["ResourceConfig",function(t){t.forEach(function(t){n.register.factory(t.name,["$resource",e(t)]),t.decorators.forEach(function(e){"cache"==e&&n.register.decorator(t.name,r)})})}])}();
Add minified version