angular-data
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-rc.1
@@ -0,1 +1,6 @@ | ||
##### 1.0.0-rc.1 - 03 September 2014 | ||
###### Backwards compatible API changes | ||
- #142 - Update references on eject (Added `DS.unlinkInverse`) | ||
##### 1.0.0-beta.3 - 30 August 2014 | ||
@@ -2,0 +7,0 @@ |
/** | ||
* @author Jason Dobry <jason.dobry@gmail.com> | ||
* @file angular-data.min.js | ||
* @version 1.0.0-beta.3 - Homepage <http://angular-data.pseudobry.com/> | ||
* @version 1.0.0-rc.1 - Homepage <http://angular-data.pseudobry.com/> | ||
* @copyright (c) 2014 Jason Dobry <https://github.com/jmdobry/> | ||
@@ -10,3 +10,3 @@ * @license MIT <https://github.com/jmdobry/angular-data/blob/master/LICENSE> | ||
*/ | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(require,module,exports){!function(global){"use strict";function detectObjectObserve(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={},d=[];return Object.observe(c,a),Array.observe(d,a),c.id=1,c.id=2,delete c.id,d.push(1,2),d.length=0,Object.deliverChangeRecords(a),5!==b.length?!1:"add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type||"splice"!=b[3].type||"splice"!=b[4].type?!1:(Object.unobserve(c,a),Array.unobserve(d,a),!0)}function detectEval(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;try{var a=new Function("","return true;");return a()}catch(b){return!1}}function dirtyCheck(a){for(var b=0;MAX_DIRTY_CHECK_CYCLES>b&&a.check_();)b++;return global.testingExposeCycleCount&&(global.dirtyCheckCycleCount=b),b>0}function objectIsEmpty(a){for(var b in a)return!1;return!0}function diffIsEmpty(a){return objectIsEmpty(a.added)&&objectIsEmpty(a.removed)&&objectIsEmpty(a.changed)}function diffObjectFromOldObject(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function runEOMTasks(){if(!eomTasks.length)return!1;for(var a=0;a<eomTasks.length;a++)eomTasks[a]();return eomTasks.length=0,!0}function newObservedObject(){function a(a){b&&b.state_===OPENED&&!d&&b.check_(a)}var b,c,d=!1,e=!0;return{open:function(c){if(b)throw Error("ObservedObject in use");e||Object.deliverChangeRecords(a),b=c,e=!1},observe:function(b,d){c=b,d?Array.observe(c,a):Object.observe(c,a)},deliver:function(b){d=b,Object.deliverChangeRecords(a),d=!1},close:function(){b=void 0,Object.unobserve(c,a),observedObjectCache.push(this)}}}function getObservedObject(a,b,c){var d=observedObjectCache.pop()||newObservedObject();return d.open(a),d.observe(b,c),d}function Observer(){this.state_=UNOPENED,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=nextObserverId++}function addToAll(a){Observer._allObserversCount++,collectObservers&&allObservers.push(a)}function removeFromAll(){Observer._allObserversCount--}function ObjectObserver(a){Observer.call(this),this.value_=a,this.oldObject_=void 0}function diffObjectFromChangeRecords(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];expectedRecordTypes[g.type]?(g.name in c||(c[g.name]=g.oldValue),"update"!=g.type&&("add"!=g.type?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}var hasObserve=detectObjectObserve(),hasEval=detectEval(),createObject="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},MAX_DIRTY_CHECK_CYCLES=1e3,eomTasks=[],runEOM=hasObserve?function(){var a={pingPong:!0},b=!1;return Object.observe(a,function(){runEOMTasks(),b=!1}),function(c){eomTasks.push(c),b||(b=!0,a.pingPong=!a.pingPong)}}():function(){return function(a){eomTasks.push(a)}}(),observedObjectCache=[],UNOPENED=0,OPENED=1,CLOSED=2,nextObserverId=1;Observer.prototype={open:function(a,b){if(this.state_!=UNOPENED)throw Error("Observer has already been opened.");return addToAll(this),this.callback_=a,this.target_=b,this.connect_(),this.state_=OPENED,this.value_},close:function(){this.state_==OPENED&&(removeFromAll(this),this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0,this.state_=CLOSED)},deliver:function(){this.state_==OPENED&&dirtyCheck(this)},report_:function(a){try{this.callback_.apply(this.target_,a)}catch(b){Observer._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var collectObservers=!hasObserve,allObservers;Observer._allObserversCount=0,collectObservers&&(allObservers=[]);var runningMicrotaskCheckpoint=!1,hasDebugForceFullDelivery=hasObserve&&hasEval&&function(){try{return eval("%RunMicrotasks()"),!0}catch(ex){return!1}}();global.Platform=global.Platform||{},global.Platform.performMicrotaskCheckpoint=function(){if(!runningMicrotaskCheckpoint){if(hasDebugForceFullDelivery)return void eval("%RunMicrotasks()");if(collectObservers){runningMicrotaskCheckpoint=!0;var cycles=0,anyChanged,toCheck;do{cycles++,toCheck=allObservers,allObservers=[],anyChanged=!1;for(var i=0;i<toCheck.length;i++){var observer=toCheck[i];observer.state_==OPENED&&(observer.check_()&&(anyChanged=!0),allObservers.push(observer))}runEOMTasks()&&(anyChanged=!0)}while(MAX_DIRTY_CHECK_CYCLES>cycles&&anyChanged);global.testingExposeCycleCount&&(global.dirtyCheckCycleCount=cycles),runningMicrotaskCheckpoint=!1}}},collectObservers&&(global.Platform.clearObservers=function(){allObservers=[]}),ObjectObserver.prototype=createObject({__proto__:Observer.prototype,arrayObserve:!1,connect_:function(){hasObserve?this.directObserver_=getObservedObject(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(a){var b=Array.isArray(a)?[]:{};for(var c in a)b[c]=a[c];return Array.isArray(a)&&(b.length=a.length),b},check_:function(a){var b,c;if(hasObserve){if(!a)return!1;c={},b=diffObjectFromChangeRecords(this.value_,a,c)}else c=this.oldObject_,b=diffObjectFromOldObject(this.value_,this.oldObject_);return diffIsEmpty(b)?!1:(hasObserve||(this.oldObject_=this.copyObject(this.value_)),this.report_([b.added||{},b.removed||{},b.changed||{},function(a){return c[a]}]),!0)},disconnect_:function(){hasObserve?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==OPENED&&(hasObserve?this.directObserver_.deliver(!1):dirtyCheck(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}});var observerSentinel={},expectedRecordTypes={add:!0,update:!0,"delete":!0};global.Observer=Observer,global.Observer.runEOM_=runEOM,global.Observer.observerSentinel_=observerSentinel,global.Observer.hasObjectObserve=hasObserve,global.ObjectObserver=ObjectObserver}((exports.Number={isNaN:window.isNaN})?exports:exports)},{}],2:[function(a,b){function c(a,b){return-1!==d(a,b)}var d=a("./indexOf");b.exports=c},{"./indexOf":5}],3:[function(a,b){function c(a,b,c){b=d(b,c);var e=[];if(null==a)return e;for(var f,g=-1,h=a.length;++g<h;)f=a[g],b(f,g,a)&&e.push(f);return e}var d=a("../function/makeIterator_");b.exports=c},{"../function/makeIterator_":11}],4:[function(a,b){function c(a,b,c){if(null!=a)for(var d=-1,e=a.length;++d<e&&b.call(c,a[d],d,a)!==!1;);}b.exports=c},{}],5:[function(a,b){function c(a,b,c){if(c=c||0,null==a)return-1;for(var d=a.length,e=0>c?d+c:c;d>e;){if(a[e]===b)return e;e++}return-1}b.exports=c},{}],6:[function(a,b){function c(a){return null!=a&&""!==a}function d(a,b){return b=b||"",e(a,c).join(b)}var e=a("./filter");b.exports=d},{"./filter":3}],7:[function(a,b){function c(a,b,c){var d=a.length;b=null==b?0:0>b?Math.max(d+b,0):Math.min(b,d),c=null==c?d:0>c?Math.max(d+c,0):Math.min(c,d);for(var e=[];c>b;)e.push(a[b++]);return e}b.exports=c},{}],8:[function(a,b){function c(a,b){if(null==a)return[];if(a.length<2)return a;null==b&&(b=d);var f,g,h;return f=~~(a.length/2),g=c(a.slice(0,f),b),h=c(a.slice(f,a.length),b),e(g,h,b)}function d(a,b){return b>a?-1:a>b?1:0}function e(a,b,c){for(var d=[];a.length&&b.length;)d.push(c(a[0],b[0])<=0?a.shift():b.shift());return a.length&&d.push.apply(d,a),b.length&&d.push.apply(d,b),d}b.exports=c},{}],9:[function(a,b){function c(a,b){var c={};if(null==a)return c;var e,f=-1,g=a.length;if(d(b))for(;++f<g;)e=a[f],c[b(e)]=e;else for(;++f<g;)e=a[f],c[e[b]]=e;return c}var d=a("../lang/isFunction");b.exports=c},{"../lang/isFunction":16}],10:[function(a,b){function c(a){return a}b.exports=c},{}],11:[function(a,b){function c(a,b){if(null==a)return d;switch(typeof a){case"function":return"undefined"!=typeof b?function(c,d,e){return a.call(b,c,d,e)}:a;case"object":return function(b){return f(b,a)};case"string":case"number":return e(a)}}var d=a("./identity"),e=a("./prop"),f=a("../object/deepMatches");b.exports=c},{"../object/deepMatches":21,"./identity":10,"./prop":12}],12:[function(a,b){function c(a){return function(b){return b[a]}}b.exports=c},{}],13:[function(a,b){var c=a("./isKind"),d=Array.isArray||function(a){return c(a,"Array")};b.exports=d},{"./isKind":17}],14:[function(a,b){function c(a){return d(a,"Boolean")}var d=a("./isKind");b.exports=c},{"./isKind":17}],15:[function(a,b){function c(a){if(null==a)return!1;if("string"==typeof a||e(a))return!a.length;if("object"==typeof a||"function"==typeof a){var b=!0;return d(a,function(){return b=!1,!1}),b}return!1}var d=a("../object/forOwn"),e=a("./isArray");b.exports=c},{"../object/forOwn":24,"./isArray":13}],16:[function(a,b){function c(a){return d(a,"Function")}var d=a("./isKind");b.exports=c},{"./isKind":17}],17:[function(a,b){function c(a,b){return d(a)===b}var d=a("./kindOf");b.exports=c},{"./kindOf":19}],18:[function(a,b){function c(a){return!!a&&"object"==typeof a&&a.constructor===Object}b.exports=c},{}],19:[function(a,b){function c(a){return null===a?"Null":a===d?"Undefined":e.exec(f.call(a))[1]}var d,e=/^\[object (.*)\]$/,f=Object.prototype.toString;b.exports=c},{}],20:[function(a,b){function c(a){return null==a?"":a.toString()}b.exports=c},{}],21:[function(a,b){function c(a,b){for(var c=-1,d=a.length;++c<d;)if(f(a[c],b))return!0;return!1}function d(a,b){for(var d=-1,e=b.length;++d<e;)if(!c(a,b[d]))return!1;return!0}function e(a,b){var c=!0;return g(b,function(b,d){return f(a[d],b)?void 0:c=!1}),c}function f(a,b){return a&&"object"==typeof a?h(a)&&h(b)?d(a,b):e(a,b):a===b}var g=a("./forOwn"),h=a("../lang/isArray");b.exports=f},{"../lang/isArray":13,"./forOwn":24}],22:[function(a,b){function c(a){for(var b,c=0,f=arguments.length;++c<f;)b=arguments[c],b&&e(b,d,a);return a}function d(a,b){var d=this[b];f(a)&&f(d)?c(d,a):this[b]=a}var e=a("./forOwn"),f=a("../lang/isPlainObject");b.exports=c},{"../lang/isPlainObject":18,"./forOwn":24}],23:[function(a,b){function c(){g=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=!0;for(var a in{toString:null})f=!1}function d(a,b,d){var i,j=0;null==f&&c();for(i in a)if(e(b,a,i,d)===!1)break;if(f)for(var k=a.constructor,l=!!k&&a===k.prototype;(i=g[j++])&&("constructor"===i&&(l||!h(a,i))||a[i]===Object.prototype[i]||e(b,a,i,d)!==!1););}function e(a,b,c,d){return a.call(d,b[c],c,b)}var f,g,h=a("./hasOwn");b.exports=d},{"./hasOwn":25}],24:[function(a,b){function c(a,b,c){e(a,function(e,f){return d(a,f)?b.call(c,a[f],f,a):void 0})}var d=a("./hasOwn"),e=a("./forIn");b.exports=c},{"./forIn":23,"./hasOwn":25}],25:[function(a,b){function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=c},{}],26:[function(a,b){function c(a,b){return b?(d(b.split("."),function(b){a[b]||(a[b]={}),a=a[b]}),a):a}var d=a("../array/forEach");b.exports=c},{"../array/forEach":4}],27:[function(a,b){function c(a){for(var b,c="string"!=typeof arguments[1]?arguments[1]:d(arguments,1),e={},f=0;b=c[f++];)e[b]=a[b];return e}var d=a("../array/slice");b.exports=c},{"../array/slice":7}],28:[function(a,b){function c(a,b,c){var e=/^(.+)\.(.+)$/.exec(b);e?d(a,e[1])[e[2]]=c:a[b]=c}var d=a("./namespace");b.exports=c},{"./namespace":26}],29:[function(a,b){function c(a){return a=d(a),a=e(a),a=f(a).replace(/[\-_]/g," ").replace(/\s[a-z]/g,g).replace(/\s+/g,"").replace(/^[A-Z]/g,h)}var d=a("../lang/toString"),e=a("./replaceAccents"),f=a("./removeNonWord"),g=a("./upperCase"),h=a("./lowerCase");b.exports=c},{"../lang/toString":20,"./lowerCase":30,"./removeNonWord":33,"./replaceAccents":34,"./upperCase":35}],30:[function(a,b){function c(a){return a=d(a),a.toLowerCase()}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],31:[function(a,b){function c(){var a=d(e(arguments),"/");return a.replace(/([^:\/]|^)\/{2,}/g,"$1/")}var d=a("../array/join"),e=a("../array/slice");b.exports=c},{"../array/join":6,"../array/slice":7}],32:[function(a,b){function c(a){return a=d(a),e(a).replace(/^[a-z]/,f)}var d=a("../lang/toString"),e=a("./camelCase"),f=a("./upperCase");b.exports=c},{"../lang/toString":20,"./camelCase":29,"./upperCase":35}],33:[function(a,b){function c(a){return a=d(a),a.replace(e,"")}var d=a("../lang/toString"),e=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;b.exports=c},{"../lang/toString":20}],34:[function(a,b){function c(a){return a=d(a),a.search(/[\xC0-\xFF]/g)>-1&&(a=a.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),a}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],35:[function(a,b){function c(a){return a=d(a),a.toUpperCase()}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],36:[function(a,b){function c(){var a=this.defaults={queryTransform:function(a,b){return b},$httpConfig:{}};this.$get=["$http","$log","DSUtils",function(b,c,d){return{defaults:a,HTTP:function(e){var f=(new Date).getTime();return e=d.deepMixIn(e,a.$httpConfig),b(e).then(function(a){return c.debug(a.config.method+" request:"+a.config.url+" Time taken: "+((new Date).getTime()-f)+"ms",arguments),a})},GET:function(a,b){return b=b||{},this.HTTP(d.deepMixIn(b,{url:a,method:"GET"}))},POST:function(a,b,c){return c=c||{},this.HTTP(d.deepMixIn(c,{url:a,data:b,method:"POST"}))},PUT:function(a,b,c){return c=c||{},this.HTTP(d.deepMixIn(c,{url:a,data:b||{},method:"PUT"}))},DEL:function(a,b){return b=b||{},this.HTTP(d.deepMixIn(b,{url:a,method:"DELETE"}))},find:function(a,b,c){return c=c||{},this.GET(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c),b),c)},findAll:function(b,c,e){return e=e||{},e.params=e.params||{},c&&(c=a.queryTransform(b.name,c),d.deepMixIn(e.params,c)),this.GET(d.makePath(e.baseUrl||b.baseUrl,b.getEndpoint(null,e)),e)},create:function(a,b,c){return c=c||{},this.POST(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c)),b,c)},update:function(a,b,c,e){return e=e||{},this.PUT(d.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(b,e),b),c,e)},updateAll:function(b,c,e,f){return f=f||{},f.params=f.params||{},e&&(e=a.queryTransform(b.name,e),d.deepMixIn(f.params,e)),this.PUT(d.makePath(f.baseUrl||b.baseUrl,b.getEndpoint(null,f)),c,f)},destroy:function(a,b,c){return c=c||{},this.DEL(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c),b),c)},destroyAll:function(b,c,e){return e=e||{},e.params=e.params||{},c&&(c=a.queryTransform(b.name,c),d.deepMixIn(e.params,c)),this.DEL(d.makePath(e.baseUrl||b.baseUrl,b.getEndpoint(null,e)),e)}}}]}b.exports=c},{}],37:[function(a,b){function c(){this.$get=["$q","DSUtils","DSErrors",function(a,b,c){return{GET:function(b){var c=a.defer();try{var d=localStorage.getItem(b);c.resolve(d?angular.fromJson(d):void 0)}catch(e){c.reject(e)}return c.promise},PUT:function(a,c){var d=this;return d.GET(a).then(function(e){return e&&b.deepMixIn(e,c),localStorage.setItem(a,angular.toJson(e||c)),d.GET(a)})},DEL:function(b){var c=a.defer();try{localStorage.removeItem(b),c.resolve()}catch(d){c.reject(d)}return c.promise},find:function(a,c,d){return d=d||{},this.GET(b.makePath(d.baseUrl||a.baseUrl,a.endpoint,c))},findAll:function(){throw new Error("DSLocalStorageAdapter.findAll is not supported!")},create:function(a,d,e){if(!(a.idAttribute in d))throw new c.IA("DSLocalStorageAdapter.create: You must provide a primary key in the attrs object!");return e=e||{},this.PUT(b.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(d,e),d[a.idAttribute]),d)},update:function(a,c,d,e){return e=e||{},this.PUT(b.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(c,e),c),d)},updateAll:function(){throw new Error("DSLocalStorageAdapter.updateAll is not supported!")},destroy:function(a,c,d){return d=d||{},this.DEL(b.makePath(d.baseUrl||a.baseUrl,a.getEndpoint(c,d),c))},destroyAll:function(){throw new Error("Not supported!")}}}]}b.exports=c},{}],38:[function(a,b){function c(a){return"DS.create("+a+", attrs[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new e.errors.IA(c(a)+"attrs: Must be an object!");return"cacheResponse"in d||(d.cacheResponse=!0),"upsert"in d||(d.upsert=!0),f.resolve(b),d.upsert&&b[g.idAttribute]?e.update(a,b[g.idAttribute],b,d):f.promise.then(function(b){var c=d.beforeValidate?e.$q.promisify(d.beforeValidate):g.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=d.validate?e.$q.promisify(d.validate):g.validate;return c.call(b,a,b)}).then(function(b){var c=d.afterValidate?e.$q.promisify(d.afterValidate):g.afterValidate;return c.call(b,a,b)}).then(function(b){var c=d.beforeCreate?e.$q.promisify(d.beforeCreate):g.beforeCreate;return c.call(b,a,b)}).then(function(b){return e.adapters[d.adapter||g.defaultAdapter].create(g,g.serialize(a,b),d)}).then(function(b){var c=d.afterCreate?e.$q.promisify(d.afterCreate):g.afterCreate,f=g.deserialize(a,b);return c.call(f,a,f)}).then(function(b){if(d.cacheResponse){var c=e.store[a],f=e.inject(g.name,b,d),h=f[g.idAttribute];return c.completedQueries[h]=(new Date).getTime(),c.previousAttributes[h]=e.utils.deepMixIn({},f),c.saved[h]=e.utils.updateTimestamp(c.saved[h]),e.get(g.name,h)}return b})}catch(h){return f.reject(h),f.promise}}b.exports=d},{}],39:[function(a,b){function c(a,b){return"DS.destroy("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");var h=e.get(a,b);if(!h)throw new e.errors.R(c(a,b)+'id: "'+b+'" not found!');return f.resolve(h),f.promise.then(function(b){var c=d.beforeDestroy?e.$q.promisify(d.beforeDestroy):g.beforeDestroy;return c.call(b,a,b)}).then(function(){return e.adapters[d.adapter||g.defaultAdapter].destroy(g,b,d)}).then(function(){var b=d.afterDestroy?e.$q.promisify(d.afterDestroy):g.afterDestroy;return b.call(h,a,h)}).then(function(){return e.eject(a,b),b})}catch(i){return f.reject(i),f.promise}}b.exports=d},{}],40:[function(a,b){function c(a){return"DS.destroyAll("+a+", params[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.errors.IA,h=e.definitions[a];if(d=d||{},!h)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new g(c(a)+"params: Must be an object!");if(!e.utils.isObject(d))throw new g(c(a)+"options: Must be an object!");return f.resolve(),f.promise.then(function(){return e.adapters[d.adapter||h.defaultAdapter].destroyAll(h,b,d)}).then(function(){return e.ejectAll(a,b)})}catch(i){return f.reject(i),f.promise}}b.exports=d},{}],41:[function(a,b){function c(a,b){return"DS.find("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer(),g=f.promise;try{var h=e.errors.IA,i=e.definitions[a];if(d=d||{},!i)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new h(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new h(c(a,b)+"options: Must be an object!");"cacheResponse"in d||(d.cacheResponse=!0);var j=e.store[a];if((d.bypassCache||!d.cacheResponse)&&delete j.completedQueries[b],!(b in j.completedQueries))return b in j.pendingQueries||(g=j.pendingQueries[b]=e.adapters[d.adapter||i.defaultAdapter].find(i,b,d).then(function(c){var f=i.deserialize(a,c);return d.cacheResponse?(delete j.pendingQueries[b],j.completedQueries[b]=(new Date).getTime(),e.inject(a,f,d)):f},function(a){return delete j.pendingQueries[b],e.$q.reject(a)})),j.pendingQueries[b];f.resolve(e.get(a,b))}catch(k){f.reject(k)}return g}b.exports=d},{}],42:[function(a,b){function c(a){return"DS.findAll("+a+", params[, options]): "}function d(a,b,d,e){var f=this,g=f.store[b],h=f.definitions[b].idAttribute,i=(new Date).getTime();a=a||[],delete g.pendingQueries[d],g.completedQueries[d]=i,g.collectionModified=f.utils.updateTimestamp(g.collectionModified);var j=f.inject(b,a,e);return f.utils.isArray(j)?angular.forEach(j,function(a){a&&a[h]&&(g.completedQueries[a[h]]=i)}):(f.$log.warn(c(b)+"response is expected to be an array!"),g.completedQueries[j[h]]=i),j}function e(a,b,c){var e=this,f=e.definitions[a],g=e.store[a],h=e.utils.toJson(b);return(c.bypassCache||!c.cacheResponse)&&delete g.completedQueries[h],h in g.completedQueries?e.filter(a,b,c):(h in g.pendingQueries||(g.pendingQueries[h]=e.adapters[c.adapter||f.defaultAdapter].findAll(f,b,c).then(function(b){var g=f.deserialize(a,b);if(!c.cacheResponse)return g;try{return d.call(e,g,a,h,c)}catch(i){return e.$q.reject(i)}},function(a){return delete g.pendingQueries[h],e.$q.reject(a)})),g.pendingQueries[h])}function f(a,b,d){var f=this,g=f.$q.defer();try{var h=f.errors.IA;if(d=d||{},b=b||{},!f.definitions[a])throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"params: Must be an object!");if(!f.utils.isObject(d))throw new h(c(a)+"options: Must be an object!");return"cacheResponse"in d||(d.cacheResponse=!0),g.resolve(),g.promise.then(function(){return e.call(f,a,b,d)})}catch(i){return g.reject(i),g.promise}}b.exports=f},{}],43:[function(a,b){b.exports={create:a("./create"),destroy:a("./destroy"),destroyAll:a("./destroyAll"),find:a("./find"),findAll:a("./findAll"),loadRelations:a("./loadRelations"),refresh:a("./refresh"),save:a("./save"),update:a("./update"),updateAll:a("./updateAll")}},{"./create":38,"./destroy":39,"./destroyAll":40,"./find":41,"./findAll":42,"./loadRelations":44,"./refresh":45,"./save":46,"./update":47,"./updateAll":48}],44:[function(a,b){function c(a){return"DS.loadRelations("+a+", instance(Id), relations[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},(angular.isString(b)||angular.isNumber(b))&&(b=f.get(a,b)),angular.isString(d)&&(d=[d]),!i)throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"instance(Id): Must be a string, number or object!");if(!f.utils.isArray(d))throw new h(c(a)+"relations: Must be a string or an array!");if(!f.utils.isObject(e))throw new h(c(a)+"options: Must be an object!");"findBelongsTo"in e||(e.findBelongsTo=!0),"findHasMany"in e||(e.findHasMany=!0);var j=[],k=[];return f.utils.forEach(i.relationList,function(a){var c=a.relation;if(f.utils.contains(d,c)){var g,h={};h[a.foreignKey]=b[i.idAttribute],"hasMany"===a.type?g=f.findAll(c,h,e):"hasOne"===a.type?a.localKey&&b[a.localKey]?g=f.find(c,b[a.localKey],e):a.foreignKey&&(g=f.findAll(c,h,e)):g=f.find(c,b[a.localKey],e),g&&(j.push(g),k.push(a.localField))}}),g.resolve(),g.promise.then(function(){return f.$q.all(j)}).then(function(a){return angular.forEach(k,function(c,d){b[c]=a[d]}),b})}catch(l){return g.reject(l),g.promise}}b.exports=d},{}],45:[function(a,b){function c(a,b){return"DS.refresh("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.errors.IA;if(d=d||{},e.definitions[a]){if(e.utils.isString(b)||e.utils.isNumber(b)){if(e.utils.isObject(d)){if(d.bypassCache=!0,e.get(a,b))return e.find(a,b,d);var g=e.$q.defer();return g.resolve(),g.promise}throw new f(c(a,b)+"options: Must be an object!")}throw new f(c(a,b)+"id: Must be a string or a number!")}throw new e.errors.NER(c(a,b)+a)}b.exports=d},{}],46:[function(a,b){function c(a,b){return"DS.save("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.errors.IA,h=e.definitions[a];if(d=d||{},!h)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new g(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new g(c(a,b)+"options: Must be an object!");var i=e.get(a,b);if(!i)throw new e.errors.R(c(a,b)+'id: "'+b+'" not found!');return"cacheResponse"in d||(d.cacheResponse=!0),f.resolve(i),f.promise.then(function(b){var c=d.beforeValidate?e.$q.promisify(d.beforeValidate):h.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=d.validate?e.$q.promisify(d.validate):h.validate;return c.call(b,a,b)}).then(function(b){var c=d.afterValidate?e.$q.promisify(d.afterValidate):h.afterValidate;return c.call(b,a,b)}).then(function(b){var c=d.beforeUpdate?e.$q.promisify(d.beforeUpdate):h.beforeUpdate;return c.call(b,a,b)}).then(function(c){if(d.changesOnly){var f=e.store[a];f.observers[b].deliver();var g=[],i=e.changes(a,b);for(var j in i.added)g.push(j);for(j in i.changed)g.push(j);if(i=e.utils.pick(c,g),e.utils.isEmpty(i))return c;c=i}return e.adapters[d.adapter||h.defaultAdapter].update(h,b,h.serialize(a,c),d)}).then(function(b){var c=d.afterUpdate?e.$q.promisify(d.afterUpdate):h.afterUpdate,f=h.deserialize(a,b);return c.call(f,a,f)}).then(function(c){if(d.cacheResponse){var f=e.store[a],g=e.inject(h.name,c,d);return f.previousAttributes[b]=e.utils.deepMixIn({},g),f.saved[b]=e.utils.updateTimestamp(f.saved[b]),f.observers[b].discardChanges(),e.get(a,b)}return c})}catch(j){return f.reject(j),f.promise}}b.exports=d},{}],47:[function(a,b){function c(a,b){return"DS.update("+a+", "+b+", attrs[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},!i)throw new f.errors.NER(c(a,b)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new h(c(a,b)+"id: Must be a string or a number!");if(!f.utils.isObject(d))throw new h(c(a,b)+"attrs: Must be an object!");if(!f.utils.isObject(e))throw new h(c(a,b)+"options: Must be an object!");return"cacheResponse"in e||(e.cacheResponse=!0),g.resolve(d),g.promise.then(function(b){var c=e.beforeValidate?f.$q.promisify(e.beforeValidate):i.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=e.validate?f.$q.promisify(e.validate):i.validate;return c.call(b,a,b)}).then(function(b){var c=e.afterValidate?f.$q.promisify(e.afterValidate):i.afterValidate;return c.call(b,a,b)}).then(function(b){var c=e.beforeUpdate?f.$q.promisify(e.beforeUpdate):i.beforeUpdate;return c.call(b,a,b)}).then(function(c){return f.adapters[e.adapter||i.defaultAdapter].update(i,b,i.serialize(a,c),e)}).then(function(b){var c=e.afterUpdate?f.$q.promisify(e.afterUpdate):i.afterUpdate,d=i.deserialize(a,b);return c.call(d,a,d)}).then(function(b){if(e.cacheResponse){var c=f.store[a],d=f.inject(i.name,b,e),g=d[i.idAttribute];return c.previousAttributes[g]=f.utils.deepMixIn({},d),c.saved[g]=f.utils.updateTimestamp(c.saved[g]),c.observers[g].discardChanges(),f.get(i.name,g)}return b})}catch(j){return g.reject(j),g.promise}}b.exports=d},{}],48:[function(a,b){function c(a){return"DS.updateAll("+a+", attrs, params[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},!i)throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"attrs: Must be an object!");if(!f.utils.isObject(d))throw new h(c(a)+"params: Must be an object!");if(!f.utils.isObject(e))throw new h(c(a)+"options: Must be an object!");return"cacheResponse"in e||(e.cacheResponse=!0),g.resolve(b),g.promise.then(function(b){var c=e.beforeValidate?f.$q.promisify(e.beforeValidate):i.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=e.validate?f.$q.promisify(e.validate):i.validate;return c.call(b,a,b)}).then(function(b){var c=e.afterValidate?f.$q.promisify(e.afterValidate):i.afterValidate;return c.call(b,a,b)}).then(function(b){var c=e.beforeUpdate?f.$q.promisify(e.beforeUpdate):i.beforeUpdate;return c.call(b,a,b)}).then(function(b){return f.adapters[e.adapter||i.defaultAdapter].updateAll(i,i.serialize(a,b),d,e)}).then(function(b){var c=e.afterUpdate?f.$q.promisify(e.afterUpdate):i.afterUpdate,d=i.deserialize(a,b);return c.call(d,a,d)}).then(function(a){return e.cacheResponse?f.inject(i.name,a,e):a})}catch(j){return g.reject(j),g.promise}}b.exports=d},{}],49:[function(a,b){function c(a,b,c){c(null,b)}function d(){}function e(){var b=this.defaults=new d;this.$get=["$rootScope","$log","$q","DSHttpAdapter","DSLocalStorageAdapter","DSUtils","DSErrors",function(c,d,e,f,g,h,i){var j,k=a("./sync_methods"),l=a("./async_methods");try{j=angular.injector(["angular-data.DSCacheFactory"]).get("DSCacheFactory")}catch(m){d.warn(m),d.warn("DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory."),j=angular.injector(["ng"]).get("$cacheFactory")}var n={notify:function(a,b){var d=Array.prototype.slice.call(arguments,2);d.unshift(a.name),d.unshift("DS."+b),"broadcast"===a.events?c.$broadcast.apply(c,d):"emit"===a.events&&c.$emit.apply(c,d)},$rootScope:c,$log:d,$q:e,cacheFactory:j,defaults:b,store:{},definitions:{},adapters:{DSHttpAdapter:f,DSLocalStorageAdapter:g},errors:i,utils:h};return h.deepFreeze(k),h.deepFreeze(l),h.deepMixIn(n,k),h.deepMixIn(n,l),h.deepFreeze(n.errors),h.deepFreeze(n.utils),("function"!=typeof Object.observe||"function"!=typeof Array.observe)&&c.$watch(function(){return(new Date).getTime()/100|0},function(){n.digest()}),n}]}a("../utils")[0]();d.prototype.idAttribute="id",d.prototype.defaultAdapter="DSHttpAdapter",d.prototype.defaultFilter=function(a,b,c,d){var e=this,f=a,g=null,h={skip:"",offset:"",where:"",limit:"",orderBy:"",sort:""};g=this.utils.isObject(c.where)?c.where:{},d.allowSimpleWhere&&this.utils.forOwn(c,function(a,b){b in h||b in g||(g[b]={"==":a})}),this.utils.isEmpty(g)&&(g=null),g&&(f=this.utils.filter(f,function(a){var b=!0,c=!0;return e.utils.forOwn(g,function(d,f){e.utils.isString(d)?d={"===":d}:(e.utils.isNumber(d)||e.utils.isBoolean(d))&&(d={"==":d}),e.utils.isObject(d)&&e.utils.forOwn(d,function(d,g){"=="===g?c=b?a[f]==d:c&&a[f]==d:"==="===g?c=b?a[f]===d:c&&a[f]===d:"!="===g?c=b?a[f]!=d:c&&a[f]!=d:"!=="===g?c=b?a[f]!==d:c&&a[f]!==d:">"===g?c=b?a[f]>d:c&&a[f]>d:">="===g?c=b?a[f]>=d:c&&a[f]>=d:"<"===g?c=b?a[f]<d:c&&a[f]<d:"<="===g?c=b?a[f]<=d:c&&a[f]<=d:"in"===g?c=b?e.utils.contains(d,a[f]):c&&e.utils.contains(d,a[f]):"|=="===g?c=b?a[f]==d:c||a[f]==d:"|==="===g?c=b?a[f]===d:c||a[f]===d:"|!="===g?c=b?a[f]!=d:c||a[f]!=d:"|!=="===g?c=b?a[f]!==d:c||a[f]!==d:"|>"===g?c=b?a[f]>d:c||a[f]>d:"|>="===g?c=b?a[f]>=d:c||a[f]>=d:"|<"===g?c=b?a[f]<d:c||a[f]<d:"|<="===g?c=b?a[f]<=d:c||a[f]<=d:"|in"===g&&(c=b?e.utils.contains(d,a[f]):c||e.utils.contains(d,a[f])),b=!1})}),c}));var i=null;this.utils.isString(c.orderBy)?i=[[c.orderBy,"ASC"]]:this.utils.isArray(c.orderBy)&&(i=c.orderBy),!i&&this.utils.isString(c.sort)?i=[[c.sort,"ASC"]]:!i&&this.utils.isArray(c.sort)&&(i=c.sort),i&&angular.forEach(i,function(a){if(e.utils.isString(a))a=[a,"ASC"];else if(!e.utils.isArray(a))throw new e.errors.IllegalArgumentError("DS.filter(resourceName[, params][, options]): "+angular.toJson(a)+": Must be a string or an array!",{params:{"orderBy[i]":{actual:typeof a,expected:"string|array"}}});f=e.utils.sort(f,function(b,c){var d=b[a[0]],f=c[a[0]];return e.utils.isString(d)&&(d=e.utils.upperCase(d)),e.utils.isString(f)&&(f=e.utils.upperCase(f)),"DESC"===a[1]?d>f?-1:f>d?1:0:f>d?-1:d>f?1:0 | ||
})});var j=angular.isNumber(c.limit)?c.limit:null,k=null;return angular.isNumber(c.skip)?k=c.skip:angular.isNumber(c.offset)&&(k=c.offset),j&&k?f=this.utils.slice(f,k,Math.min(f.length,k+j)):this.utils.isNumber(j)?f=this.utils.slice(f,0,Math.min(f.length,j)):this.utils.isNumber(k)&&(f=k<f.length?this.utils.slice(f,k):[]),f},d.prototype.baseUrl="",d.prototype.endpoint="",d.prototype.useClass=!1,d.prototype.beforeValidate=c,d.prototype.validate=c,d.prototype.afterValidate=c,d.prototype.beforeCreate=c,d.prototype.afterCreate=c,d.prototype.beforeUpdate=c,d.prototype.afterUpdate=c,d.prototype.beforeDestroy=c,d.prototype.afterDestroy=c,d.prototype.beforeInject=function(a,b){return b},d.prototype.afterInject=function(a,b){return b},d.prototype.serialize=function(a,b){return b},d.prototype.deserialize=function(a,b){return b.data},d.prototype.events="broadcast",b.exports=e},{"../utils":72,"./async_methods":43,"./sync_methods":62}],50:[function(a,b){function c(a){return"DS.bindAll(scope, expr, "+a+", params[, cb]): "}function d(a,b,d,e,f){var g=this,h=g.errors.IA;if(!g.utils.isObject(a))throw new h(c(d)+"scope: Must be an object!");if(!g.utils.isString(b))throw new h(c(d)+"expr: Must be a string!");if(!g.definitions[d])throw new g.errors.NER(c(d)+d);if(!g.utils.isObject(e))throw new h(c(d)+"params: Must be an object!");try{return a.$watch(function(){return g.lastModified(d)},function(){var c=g.filter(d,e);g.utils.set(a,b,c),f&&f(null,c)})}catch(i){if(!f)throw i;f(i)}}b.exports=d},{}],51:[function(a,b){function c(a){return"DS.bindOne(scope, expr, "+a+", id[, cb]): "}function d(a,b,d,e,f){var g=this,h=g.errors.IA;if(!g.utils.isObject(a))throw new h(c(d)+"scope: Must be an object!");if(!g.utils.isString(b))throw new h(c(d)+"expr: Must be a string!");if(!g.definitions[d])throw new g.errors.NER(c(d)+d);if(!g.utils.isString(e)&&!g.utils.isNumber(e))throw new h(c(d)+"id: Must be a string or a number!");try{return a.$watch(function(){return g.lastModified(d,e)},function(){var c=g.get(d,e);g.utils.set(a,b,c),f&&f(null,c)})}catch(i){if(!f)throw i;f(i)}}b.exports=d},{}],52:[function(a,b){function c(a){return"DS.changes("+a+", id): "}function d(a,b){var d=this;if(!d.definitions[a])throw new d.errors.NER(c(a)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a)+"id: Must be a string or a number!");var e=d.get(a,b);if(e){d.store[a].observers[b].deliver();var f=d.utils.diffObjectFromOldObject(e,d.store[a].previousAttributes[b]);return d.utils.forOwn(f,function(a,b){var c=[];d.utils.forOwn(a,function(a,b){angular.isFunction(a)||c.push(b)}),f[b]=d.utils.pick(f[b],c)}),f}}b.exports=d},{}],53:[function(a,b){function c(a){return"DS.compute("+a+", instance): "}function d(a,b){var c=this,d=[];angular.forEach(a.deps,function(a){d.push(c[a])}),this[b]=a[a.length-1].apply(this,d)}function e(a,b){var e=this,f=e.errors.IA,g=e.definitions[a];if(!g)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b)&&!e.utils.isString(b)&&!e.utils.isNumber(b))throw new f(c(a)+"instance: Must be an object, string or number!");return(e.utils.isString(b)||e.utils.isNumber(b))&&(b=e.get(a,b)),e.utils.forOwn(g.computed,function(a,c){d.call(b,a,c)}),b}b.exports={compute:e,_compute:d}},{}],54:[function(a,b){function c(a){return"DS.createInstance("+a+"[, attrs][, options]): "}function d(a,b,d){var e=this,f=e.errors.IA,g=e.definitions[a];if(b=b||{},d=d||{},!g)throw new e.errors.NER(c(a)+a);if(b&&!e.utils.isObject(b))throw new f(c(a)+"attrs: Must be an object!");if(!e.utils.isObject(d))throw new f(c(a)+"options: Must be an object!");"useClass"in d||(d.useClass=!0);var h;if(d.useClass){var i=g[g.class];h=new i}else h={};return e.utils.deepMixIn(h,b)}b.exports=d},{}],55:[function(require,module,exports){function Resource(a,b){a.deepMixIn(this,b),this.endpoint="endpoint"in b?b.endpoint:this.name}function defineResource(definition){var DS=this,definitions=DS.definitions,IA=DS.errors.IA;if(DS.utils.isString(definition)&&(definition=definition.replace(/\s/gi,""),definition={name:definition}),!DS.utils.isObject(definition))throw new IA(errorPrefix+"definition: Must be an object!");if(!DS.utils.isString(definition.name))throw new IA(errorPrefix+"definition.name: Must be a string!");if(definition.idAttribute&&!DS.utils.isString(definition.idAttribute))throw new IA(errorPrefix+"definition.idAttribute: Must be a string!");if(definition.endpoint&&!DS.utils.isString(definition.endpoint))throw new IA(errorPrefix+"definition.endpoint: Must be a string!");if(DS.store[definition.name])throw new DS.errors.R(errorPrefix+definition.name+" is already registered!");try{Resource.prototype=DS.defaults,definitions[definition.name]=new Resource(DS.utils,definition);var def=definitions[definition.name];def.relations&&(def.relationList=[],def.relationFields=[],DS.utils.forOwn(def.relations,function(a,b){DS.utils.forOwn(a,function(c,d){DS.utils.isArray(c)||(a[d]=[c]),DS.utils.forEach(a[d],function(a){a.type=b,a.relation=d,a.name=def.name,def.relationList.push(a),def.relationFields.push(a.localField)})})}),def.relations.belongsTo&&DS.utils.forOwn(def.relations.belongsTo,function(a,b){DS.utils.forEach(a,function(a){a.parent&&(def.parent=b,def.parentKey=a.localKey)})}),DS.utils.deepFreeze(def.relations),DS.utils.deepFreeze(def.relationList)),def.getEndpoint=function(a,b){var c,d,e=this.parent,f=this.parentKey,g=b.endpoint||this.endpoint;return delete b.endpoint,b=b||{},b.params=b.params||{},e&&f&&definitions[e]&&b.params[f]!==!1&&((DS.utils.isNumber(a)||DS.utils.isString(a))&&(c=DS.get(this.name,a)),DS.utils.isObject(a)&&f in a?(delete b.params[f],d=DS.utils.makePath(definitions[e].getEndpoint(a,b),a[f],g)):c&&f in c?(delete b.params[f],d=DS.utils.makePath(definitions[e].getEndpoint(a,b),c[f],g)):b&&b.params[f]&&(d=DS.utils.makePath(definitions[e].getEndpoint(a,b),b.params[f],g),delete b.params[f])),b.params[f]===!1&&delete b.params[f],d||g},def.filter&&(def.defaultFilter=def.filter,delete def.filter);var cache=DS.cacheFactory("DS."+def.name,{maxAge:def.maxAge||null,recycleFreq:def.recycleFreq||1e3,cacheFlushInterval:def.cacheFlushInterval||null,deleteOnExpire:def.deleteOnExpire||"none",onExpire:function(a){var b=DS.eject(def.name,a);DS.utils.isFunction(def.onExpire)&&def.onExpire(a,b)},capacity:Number.MAX_VALUE,storageMode:"memory",storageImpl:null,disabled:!1,storagePrefix:"DS."+def.name});return def.class=DS.utils.pascalCase(definition.name),eval("function "+def.class+"() {}"),def[def.class]=eval(def.class),def.methods&&DS.utils.deepMixIn(def[def.class].prototype,def.methods),def.computed&&(DS.utils.forOwn(def.computed,function(a,b){angular.isFunction(a)&&(def.computed[b]=[a],a=def.computed[b]),def.methods&&b in def.methods&&DS.$log.warn(errorPrefix+'Computed property "'+b+'" conflicts with previously defined prototype method!');var c;if(1===a.length){var d=a[0].toString().match(/function.*?\(([\s\S]*?)\)/);c=d[1].split(","),def.computed[b]=c.concat(a),a=def.computed[b],c.length&&DS.$log.warn(errorPrefix+"Use the computed property array syntax for compatibility with minified code!")}c=a.slice(0,a.length-1),angular.forEach(c,function(a,b){c[b]=a.trim()}),a.deps=DS.utils.filter(c,function(a){return!!a})}),def[def.class].prototype.DSCompute=function(){return DS.compute(def.name,this)}),DS.store[def.name]={collection:[],completedQueries:{},pendingQueries:{},index:cache,modified:{},saved:{},previousAttributes:{},observers:{},collectionModified:0},angular.forEach(methodsToProxy,function(a){def[a]="bindOne"===a||"bindAll"===a?function(){var b=Array.prototype.slice.call(arguments);return b.splice(2,0,def.name),DS[a].apply(DS,b)}:function(){var b=Array.prototype.slice.call(arguments);return b.unshift(def.name),DS[a].apply(DS,b)}}),def.beforeValidate=DS.$q.promisify(def.beforeValidate),def.validate=DS.$q.promisify(def.validate),def.afterValidate=DS.$q.promisify(def.afterValidate),def.beforeCreate=DS.$q.promisify(def.beforeCreate),def.afterCreate=DS.$q.promisify(def.afterCreate),def.beforeUpdate=DS.$q.promisify(def.beforeUpdate),def.afterUpdate=DS.$q.promisify(def.afterUpdate),def.beforeDestroy=DS.$q.promisify(def.beforeDestroy),def.afterDestroy=DS.$q.promisify(def.afterDestroy),def}catch(err){throw DS.$log.error(err),delete definitions[definition.name],delete DS.store[definition.name],err}}var errorPrefix="DS.defineResource(definition): ",methodsToProxy=["bindAll","bindOne","changes","create","createInstance","destroy","destroyAll","eject","ejectAll","filter","find","findAll","get","hasChanges","inject","lastModified","lastSaved","link","linkAll","linkInverse","loadRelations","previous","refresh","save","update","updateAll"];module.exports=defineResource},{}],56:[function(a,b){function c(){this.$rootScope.$$phase?d.Platform.performMicrotaskCheckpoint():this.$rootScope.$apply(function(){d.Platform.performMicrotaskCheckpoint()})}var d=a("../../../lib/observe-js/observe-js");b.exports=c},{"../../../lib/observe-js/observe-js":1}],57:[function(a,b){function c(a,b){return"DS.eject("+a+", "+b+"): "}function d(a,b,c){for(var d,e=!1,f=0;f<b.collection.length;f++)if(b.collection[f][a.idAttribute]==c){d=b.collection[f],e=!0;break}return e?(b.collection.splice(f,1),b.observers[c].close(),delete b.observers[c],b.index.remove(c),delete b.previousAttributes[c],delete b.completedQueries[c],delete b.modified[c],delete b.saved[c],b.collectionModified=this.utils.updateTimestamp(b.collectionModified),this.notify(a,"eject",d),d):void 0}function e(a,b){var e=this,f=e.definitions[a];if(!f)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");var g,h=e.store[a];return e.$rootScope.$$phase?g=d.call(e,f,h,b):e.$rootScope.$apply(function(){g=d.call(e,f,h,b)}),g}b.exports=e},{}],58:[function(a,b){function c(a){return"DS.ejectAll("+a+"[, params]): "}function d(a,b,c){var d=this,e=d.utils.toJson(c),f=d.filter(a.name,c),g=d.utils.toLookup(f,a.idAttribute);return angular.forEach(g,function(b,c){d.eject(a.name,c)}),delete b.completedQueries[e],b.collectionModified=d.utils.updateTimestamp(b.collectionModified),d.notify(a,"eject",f),f}function e(a,b){var e=this,f=e.definitions[a];if(b=b||{},!f)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new e.errors.IA(c(a)+"params: Must be an object!");var g,h=e.store[a];return e.utils.isEmpty(b)&&(h.completedQueries={}),e.$rootScope.$$phase?g=d.call(e,f,h,b):e.$rootScope.$apply(function(){g=d.call(e,f,h,b)}),g}b.exports=e},{}],59:[function(a,b){function c(a){return"DS.filter("+a+"[, params][, options]): "}function d(a,b,d){var e=this,f=e.errors.IA,g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a)+a);if(b&&!e.utils.isObject(b))throw new f(c(a)+"params: Must be an object!");if(!e.utils.isObject(d))throw new f(c(a)+"options: Must be an object!");var h=e.store[a];b=b||{},d.allowSimpleWhere="allowSimpleWhere"in d?!!d.allowSimpleWhere:!0;var i=e.utils.toJson(b);return i in h.completedQueries||!d.loadFromServer||h.pendingQueries[i]||e.findAll(a,b,d),g.defaultFilter.call(e,h.collection,a,b,d)}b.exports=d},{}],60:[function(a,b){function c(a,b){return"DS.get("+a+", "+b+"): "}function d(a,b,d){var e=this,f=e.errors.IA;if(d=d||{},!e.definitions[a])throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new f(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new f(c(a,b)+"options: Must be an object!");var g=e.store[a].index.get(b);return!g&&d.loadFromServer&&e.find(a,b,d).then(null,function(a){return e.$q.reject(a)}),g}b.exports=d},{}],61:[function(a,b){function c(a,b){return"DS.hasChanges("+a+", "+b+"): "}function d(a,b){return!(a.isEmpty(b.added)&&a.isEmpty(b.removed)&&a.isEmpty(b.changed))}function e(a,b){var e=this;if(!e.definitions[a])throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");return e.get(a,b)?d(e.utils,e.changes(a,b)):!1}b.exports=e},{}],62:[function(a,b){b.exports={bindOne:a("./bindOne"),bindAll:a("./bindAll"),compute:a("./compute").compute,createInstance:a("./createInstance"),defineResource:a("./defineResource"),eject:a("./eject"),ejectAll:a("./ejectAll"),filter:a("./filter"),get:a("./get"),inject:a("./inject"),lastModified:a("./lastModified"),lastSaved:a("./lastSaved"),link:a("./link"),linkAll:a("./linkAll"),linkInverse:a("./linkInverse"),digest:a("./digest"),changes:a("./changes"),previous:a("./previous"),hasChanges:a("./hasChanges")}},{"./bindAll":50,"./bindOne":51,"./changes":52,"./compute":53,"./createInstance":54,"./defineResource":55,"./digest":56,"./eject":57,"./ejectAll":58,"./filter":59,"./get":60,"./hasChanges":61,"./inject":63,"./lastModified":64,"./lastSaved":65,"./link":66,"./linkAll":67,"./linkInverse":68,"./previous":69}],63:[function(a,b){function c(a){return"DS.inject("+a+", attrs[, options]): "}function d(a,b,e){function f(c,d,e,f,g){var i,l=this,m=f&&f(a.idAttribute)?f(a.idAttribute):l[a.idAttribute];j.utils.forEach(a.relationFields,function(a){delete c[a],delete d[a],delete e[a]}),j.utils.isEmpty(c)&&j.utils.isEmpty(d)&&j.utils.isEmpty(e)&&!g||(b.modified[m]=j.utils.updateTimestamp(b.modified[m]),b.collectionModified=j.utils.updateTimestamp(b.collectionModified)),a.computed&&(i=j.get(a.name,m),j.utils.forOwn(a.computed,function(a,b){var f=!1;angular.forEach(a.deps,function(a){(a in c||a in d||a in e||!(b in i))&&(f=!0)}),f=f||!a.deps.length,f&&h.call(i,a,b)})),a.relations&&(i=j.get(a.name,m),j.utils.forEach(a.relationList,function(b){i[b.localField]&&(b.localKey in c||b.localKey in d||b.localKey in e)&&j.link(a.name,i[a.idAttribute],[b.relation])})),a.idAttribute in e&&k.error("Doh! You just changed the primary key of an object! I don't know how to handle this yet, so your data for the \""+a.name+'" resource is now in an undefined (probably broken) state.')}var i,j=this,k=j.$log;if(j.utils.isArray(e)){i=[];for(var l=0;l<e.length;l++)i.push(d.call(j,a,b,e[l]))}else{var m=a.computed,n=a.idAttribute;if(m&&m[n]){var o=[];angular.forEach(m[n].deps,function(a){o.push(e[a])}),e[n]=m[n][m[n].length-1].apply(e,o)}if(!(n in e)){var p=new j.errors.R(c(a.name)+"attrs: Must contain the property specified by `idAttribute`!");throw k.error(p),p}try{a.beforeInject(a.name,e);var q=e[n],r=j.get(a.name,q);r?(j.utils.deepMixIn(r,e),"function"==typeof b.index.touch?b.index.touch(q):b.index.put(q,b.index.get(q)),b.observers[q].deliver()):(r=a.methods||a.useClass?e instanceof a[a.class]?e:new a[a.class]:{},b.previousAttributes[q]={},j.utils.deepMixIn(r,e),j.utils.deepMixIn(b.previousAttributes[q],e),b.collection.push(r),b.observers[q]=new g.ObjectObserver(r),b.observers[q].open(f,r),b.index.put(q,r),f.call(r,{},{},{},null,!0)),b.saved[q]=j.utils.updateTimestamp(b.saved[q]),a.afterInject(a.name,r),i=r}catch(s){k.error(s),k.error("inject failed!",a.name,e)}}return i}function e(a,b,d){function e(b,e,g){var h=f.definitions[e];if(h&&g[b.localField]&&!j.injectedSoFar[e+g[b.localField][h.idAttribute]])try{j.injectedSoFar[e+g[b.localField][h.idAttribute]]=1,g[b.localField]=f.inject(e,g[b.localField],d)}catch(i){f.$log.error(c(a.name)+"Failed to inject "+b.type+' relation: "'+e+'"!',i)}else d.findBelongsTo&&"belongsTo"===b.type?f.utils.isArray(g)?f.utils.forEach(g,function(b){f.link(a.name,b[a.idAttribute],[e])}):f.link(a.name,g[a.idAttribute],[e]):(d.findHasMany&&"hasMany"===b.type||d.findHasOne&&"hasOne"===b.type)&&(f.utils.isArray(g)?f.utils.forEach(g,function(b){f.link(a.name,b[a.idAttribute],[e])}):f.link(a.name,g[a.idAttribute],[e]))}var f=this;f.utils.forEach(a.relationList,function(a){f.utils.isArray(b)?f.utils.forEach(b,function(b){e(a,a.relation,b)}):e(a,a.relation,b)})}function f(a,b,f){var g=this,h=g.errors.IA,k=g.definitions[a];if(f=f||{},!k)throw new g.errors.NER(c(a)+a);if(!g.utils.isObject(b)&&!g.utils.isArray(b))throw new h(c(a)+"attrs: Must be an object or an array!");if(!g.utils.isObject(f))throw new h(c(a)+"options: Must be an object!");var l,m=g.store[a];i++;try{g.$rootScope.$$phase?l=d.call(g,k,m,b):g.$rootScope.$apply(function(){l=d.call(g,k,m,b)}),k.relations&&e.call(g,k,l,f),f.linkInverse&&(g.utils.isArray(l)&&l.length?g.linkInverse(k.name,l[0][k.idAttribute]):g.linkInverse(k.name,l[k.idAttribute])),g.notify(k,"inject",l),i--}catch(n){throw i--,n}return i||(j.injectedSoFar={}),l}var g=a("../../../lib/observe-js/observe-js"),h=a("./compute")._compute,i=0,j={injectedSoFar:{}};b.exports=f},{"../../../lib/observe-js/observe-js":1,"./compute":53}],64:[function(a,b){function c(a,b){return"DS.lastModified("+a+"[, "+b+"]): "}function d(a,b){var d=this,e=d.store[a];if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(b&&!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return b?(b in e.modified||(e.modified[b]=0),e.modified[b]):e.collectionModified}b.exports=d},{}],65:[function(a,b){function c(a,b){return"DS.lastSaved("+a+"[, "+b+"]): "}function d(a,b){var d=this,e=d.store[a];if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return b in e.saved||(e.saved[b]=0),e.saved[b]}b.exports=d},{}],66:[function(a,b){function c(a){return"DS.link("+a+", id[, relations]): "}function d(a,b,c){var d=this;d.utils.forEach(a.relationList,function(e){var f=e.relation;if(!c.length||d.utils.contains(c,f)){var g={};if("belongsTo"===e.type){var h=b[e.localKey]?d.get(f,b[e.localKey]):null;h&&(b[e.localField]=h)}else if("hasMany"===e.type)g[e.foreignKey]=b[a.idAttribute],b[e.localField]=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,g,{allowSimpleWhere:!0});else if("hasOne"===e.type){g[e.foreignKey]=b[a.idAttribute];var i=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,g,{allowSimpleWhere:!0});i.length&&(b[e.localField]=i[0])}}})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new g(c(a)+"id: Must be a string or a number!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.get(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,i,e):f.$rootScope.$apply(function(){d.call(f,h,i,e)})),i}b.exports=e},{}],67:[function(a,b){function c(a){return"DS.linkAll("+a+"[, params][, relations]): "}function d(a,b,c){var d=this;d.utils.forEach(a.relationList,function(e){var f=e.relation;(!c.length||d.utils.contains(c,f))&&("belongsTo"===e.type?d.utils.forEach(b,function(a){var b=a[e.localKey]?d.get(f,a[e.localKey]):null;b&&(a[e.localField]=b)}):"hasMany"===e.type?d.utils.forEach(b,function(b){var c={};c[e.foreignKey]=b[a.idAttribute],b[e.localField]=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,c,{allowSimpleWhere:!0})}):"hasOne"===e.type&&d.utils.forEach(b,function(b){var c={};c[e.foreignKey]=b[a.idAttribute];var g=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,c,{allowSimpleWhere:!0});g.length&&(b[e.localField]=g[0])}))})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(b&&!f.utils.isObject(b))throw new g(c(a)+"params: Must be an object!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.filter(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,i,e):f.$rootScope.$apply(function(){d.call(f,h,i,e)})),i}b.exports=e},{}],68:[function(a,b){function c(a){return"DS.linkInverse("+a+", id[, relations]): "}function d(a,b){var c=this;c.utils.forOwn(c.definitions,function(d){c.utils.forOwn(d.relations,function(e){c.utils.forOwn(e,function(e,f){(!b.length||c.utils.contains(b,d.name))&&a.name===f&&c.linkAll(d.name,{},[a.name])})})})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new g(c(a)+"id: Must be a string or a number!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.get(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,e):f.$rootScope.$apply(function(){d.call(f,h,e)})),i}b.exports=e},{}],69:[function(a,b){function c(a,b){return"DS.previous("+a+"[, "+b+"]): "}function d(a,b){var d=this;if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return angular.copy(d.store[a].previousAttributes[b])}b.exports=d},{}],70:[function(a,b){function c(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=a||"Illegal Argument!"}function d(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=a||"RuntimeError Error!"}function e(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=(a||"")+" is not a registered resource!"}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,b.exports=[function(){return{IllegalArgumentError:c,IA:c,RuntimeError:d,R:d,NonexistentResourceError:e,NER:e}}]},{}],71:[function(a){!function(b,c){"use strict";c.module("angular-data.DS",["ng"]).factory("DSUtils",a("./utils")).factory("DSErrors",a("./errors")).provider("DSHttpAdapter",a("./adapters/http")).provider("DSLocalStorageAdapter",a("./adapters/localStorage")).provider("DS",a("./datastore")).config(["$provide",function(a){a.decorator("$q",["$delegate",function(a){return a.promisify=function(a,b){if(a){if("function"!=typeof a)throw new Error("Can only promisify functions!");var c=this;return function(){var d=c.defer(),e=Array.prototype.slice.apply(arguments);e.push(function(a,b){a?d.reject(a):d.resolve(b)});try{a.apply(b||this,e)}catch(f){d.reject(f)}return d.promise}}},a}])}])}(window,window.angular)},{"./adapters/http":36,"./adapters/localStorage":37,"./datastore":49,"./errors":70,"./utils":72}],72:[function(a,b){b.exports=[function(){return{isBoolean:a("mout/lang/isBoolean"),isString:angular.isString,isArray:angular.isArray,isObject:angular.isObject,isNumber:angular.isNumber,isFunction:angular.isFunction,isEmpty:a("mout/lang/isEmpty"),toJson:angular.toJson,makePath:a("mout/string/makePath"),upperCase:a("mout/string/upperCase"),pascalCase:a("mout/string/pascalCase"),deepMixIn:a("mout/object/deepMixIn"),forOwn:a("mout/object/forOwn"),forEach:angular.forEach,pick:a("mout/object/pick"),set:a("mout/object/set"),contains:a("mout/array/contains"),filter:a("mout/array/filter"),toLookup:a("mout/array/toLookup"),slice:a("mout/array/slice"),sort:a("mout/array/sort"),updateTimestamp:function(a){var b="function"==typeof Date.now?Date.now():(new Date).getTime();return a&&a>=b?a+1:b},deepFreeze:function b(a){if("function"==typeof Object.freeze){var c,d;Object.freeze(a);for(d in a)c=a[d],a.hasOwnProperty(d)&&"object"==typeof c&&!Object.isFrozen(c)&&b(c)}},diffObjectFromOldObject:function(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var h in a)h in b||(c[h]=a[h]);return{added:c,removed:d,changed:e}}}}]},{"mout/array/contains":2,"mout/array/filter":3,"mout/array/slice":7,"mout/array/sort":8,"mout/array/toLookup":9,"mout/lang/isBoolean":14,"mout/lang/isEmpty":15,"mout/object/deepMixIn":22,"mout/object/forOwn":24,"mout/object/pick":27,"mout/object/set":28,"mout/string/makePath":31,"mout/string/pascalCase":32,"mout/string/upperCase":35}]},{},[71]); | ||
!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(require,module,exports){!function(global){"use strict";function detectObjectObserve(){function a(a){b=a}if("function"!=typeof Object.observe||"function"!=typeof Array.observe)return!1;var b=[],c={},d=[];return Object.observe(c,a),Array.observe(d,a),c.id=1,c.id=2,delete c.id,d.push(1,2),d.length=0,Object.deliverChangeRecords(a),5!==b.length?!1:"add"!=b[0].type||"update"!=b[1].type||"delete"!=b[2].type||"splice"!=b[3].type||"splice"!=b[4].type?!1:(Object.unobserve(c,a),Array.unobserve(d,a),!0)}function detectEval(){if("undefined"!=typeof chrome&&chrome.app&&chrome.app.runtime)return!1;try{var a=new Function("","return true;");return a()}catch(b){return!1}}function dirtyCheck(a){for(var b=0;MAX_DIRTY_CHECK_CYCLES>b&&a.check_();)b++;return global.testingExposeCycleCount&&(global.dirtyCheckCycleCount=b),b>0}function objectIsEmpty(a){for(var b in a)return!1;return!0}function diffIsEmpty(a){return objectIsEmpty(a.added)&&objectIsEmpty(a.removed)&&objectIsEmpty(a.changed)}function diffObjectFromOldObject(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var f in a)f in b||(c[f]=a[f]);return Array.isArray(a)&&a.length!==b.length&&(e.length=a.length),{added:c,removed:d,changed:e}}function runEOMTasks(){if(!eomTasks.length)return!1;for(var a=0;a<eomTasks.length;a++)eomTasks[a]();return eomTasks.length=0,!0}function newObservedObject(){function a(a){b&&b.state_===OPENED&&!d&&b.check_(a)}var b,c,d=!1,e=!0;return{open:function(c){if(b)throw Error("ObservedObject in use");e||Object.deliverChangeRecords(a),b=c,e=!1},observe:function(b,d){c=b,d?Array.observe(c,a):Object.observe(c,a)},deliver:function(b){d=b,Object.deliverChangeRecords(a),d=!1},close:function(){b=void 0,Object.unobserve(c,a),observedObjectCache.push(this)}}}function getObservedObject(a,b,c){var d=observedObjectCache.pop()||newObservedObject();return d.open(a),d.observe(b,c),d}function Observer(){this.state_=UNOPENED,this.callback_=void 0,this.target_=void 0,this.directObserver_=void 0,this.value_=void 0,this.id_=nextObserverId++}function addToAll(a){Observer._allObserversCount++,collectObservers&&allObservers.push(a)}function removeFromAll(){Observer._allObserversCount--}function ObjectObserver(a){Observer.call(this),this.value_=a,this.oldObject_=void 0}function diffObjectFromChangeRecords(a,b,c){for(var d={},e={},f=0;f<b.length;f++){var g=b[f];expectedRecordTypes[g.type]?(g.name in c||(c[g.name]=g.oldValue),"update"!=g.type&&("add"!=g.type?g.name in d?(delete d[g.name],delete c[g.name]):e[g.name]=!0:g.name in e?delete e[g.name]:d[g.name]=!0)):(console.error("Unknown changeRecord type: "+g.type),console.error(g))}for(var h in d)d[h]=a[h];for(var h in e)e[h]=void 0;var i={};for(var h in c)if(!(h in d||h in e)){var j=a[h];c[h]!==j&&(i[h]=j)}return{added:d,removed:e,changed:i}}var hasObserve=detectObjectObserve(),hasEval=detectEval(),createObject="__proto__"in{}?function(a){return a}:function(a){var b=a.__proto__;if(!b)return a;var c=Object.create(b);return Object.getOwnPropertyNames(a).forEach(function(b){Object.defineProperty(c,b,Object.getOwnPropertyDescriptor(a,b))}),c},MAX_DIRTY_CHECK_CYCLES=1e3,eomTasks=[],runEOM=hasObserve?function(){var a={pingPong:!0},b=!1;return Object.observe(a,function(){runEOMTasks(),b=!1}),function(c){eomTasks.push(c),b||(b=!0,a.pingPong=!a.pingPong)}}():function(){return function(a){eomTasks.push(a)}}(),observedObjectCache=[],UNOPENED=0,OPENED=1,CLOSED=2,nextObserverId=1;Observer.prototype={open:function(a,b){if(this.state_!=UNOPENED)throw Error("Observer has already been opened.");return addToAll(this),this.callback_=a,this.target_=b,this.connect_(),this.state_=OPENED,this.value_},close:function(){this.state_==OPENED&&(removeFromAll(this),this.disconnect_(),this.value_=void 0,this.callback_=void 0,this.target_=void 0,this.state_=CLOSED)},deliver:function(){this.state_==OPENED&&dirtyCheck(this)},report_:function(a){try{this.callback_.apply(this.target_,a)}catch(b){Observer._errorThrownDuringCallback=!0,console.error("Exception caught during observer callback: "+(b.stack||b))}},discardChanges:function(){return this.check_(void 0,!0),this.value_}};var collectObservers=!hasObserve,allObservers;Observer._allObserversCount=0,collectObservers&&(allObservers=[]);var runningMicrotaskCheckpoint=!1,hasDebugForceFullDelivery=hasObserve&&hasEval&&function(){try{return eval("%RunMicrotasks()"),!0}catch(ex){return!1}}();global.Platform=global.Platform||{},global.Platform.performMicrotaskCheckpoint=function(){if(!runningMicrotaskCheckpoint){if(hasDebugForceFullDelivery)return void eval("%RunMicrotasks()");if(collectObservers){runningMicrotaskCheckpoint=!0;var cycles=0,anyChanged,toCheck;do{cycles++,toCheck=allObservers,allObservers=[],anyChanged=!1;for(var i=0;i<toCheck.length;i++){var observer=toCheck[i];observer.state_==OPENED&&(observer.check_()&&(anyChanged=!0),allObservers.push(observer))}runEOMTasks()&&(anyChanged=!0)}while(MAX_DIRTY_CHECK_CYCLES>cycles&&anyChanged);global.testingExposeCycleCount&&(global.dirtyCheckCycleCount=cycles),runningMicrotaskCheckpoint=!1}}},collectObservers&&(global.Platform.clearObservers=function(){allObservers=[]}),ObjectObserver.prototype=createObject({__proto__:Observer.prototype,arrayObserve:!1,connect_:function(){hasObserve?this.directObserver_=getObservedObject(this,this.value_,this.arrayObserve):this.oldObject_=this.copyObject(this.value_)},copyObject:function(a){var b=Array.isArray(a)?[]:{};for(var c in a)b[c]=a[c];return Array.isArray(a)&&(b.length=a.length),b},check_:function(a){var b,c;if(hasObserve){if(!a)return!1;c={},b=diffObjectFromChangeRecords(this.value_,a,c)}else c=this.oldObject_,b=diffObjectFromOldObject(this.value_,this.oldObject_);return diffIsEmpty(b)?!1:(hasObserve||(this.oldObject_=this.copyObject(this.value_)),this.report_([b.added||{},b.removed||{},b.changed||{},function(a){return c[a]}]),!0)},disconnect_:function(){hasObserve?(this.directObserver_.close(),this.directObserver_=void 0):this.oldObject_=void 0},deliver:function(){this.state_==OPENED&&(hasObserve?this.directObserver_.deliver(!1):dirtyCheck(this))},discardChanges:function(){return this.directObserver_?this.directObserver_.deliver(!0):this.oldObject_=this.copyObject(this.value_),this.value_}});var observerSentinel={},expectedRecordTypes={add:!0,update:!0,"delete":!0};global.Observer=Observer,global.Observer.runEOM_=runEOM,global.Observer.observerSentinel_=observerSentinel,global.Observer.hasObjectObserve=hasObserve,global.ObjectObserver=ObjectObserver}((exports.Number={isNaN:window.isNaN})?exports:exports)},{}],2:[function(a,b){function c(a,b){return-1!==d(a,b)}var d=a("./indexOf");b.exports=c},{"./indexOf":5}],3:[function(a,b){function c(a,b,c){b=d(b,c);var e=[];if(null==a)return e;for(var f,g=-1,h=a.length;++g<h;)f=a[g],b(f,g,a)&&e.push(f);return e}var d=a("../function/makeIterator_");b.exports=c},{"../function/makeIterator_":11}],4:[function(a,b){function c(a,b,c){if(null!=a)for(var d=-1,e=a.length;++d<e&&b.call(c,a[d],d,a)!==!1;);}b.exports=c},{}],5:[function(a,b){function c(a,b,c){if(c=c||0,null==a)return-1;for(var d=a.length,e=0>c?d+c:c;d>e;){if(a[e]===b)return e;e++}return-1}b.exports=c},{}],6:[function(a,b){function c(a){return null!=a&&""!==a}function d(a,b){return b=b||"",e(a,c).join(b)}var e=a("./filter");b.exports=d},{"./filter":3}],7:[function(a,b){function c(a,b,c){var d=a.length;b=null==b?0:0>b?Math.max(d+b,0):Math.min(b,d),c=null==c?d:0>c?Math.max(d+c,0):Math.min(c,d);for(var e=[];c>b;)e.push(a[b++]);return e}b.exports=c},{}],8:[function(a,b){function c(a,b){if(null==a)return[];if(a.length<2)return a;null==b&&(b=d);var f,g,h;return f=~~(a.length/2),g=c(a.slice(0,f),b),h=c(a.slice(f,a.length),b),e(g,h,b)}function d(a,b){return b>a?-1:a>b?1:0}function e(a,b,c){for(var d=[];a.length&&b.length;)d.push(c(a[0],b[0])<=0?a.shift():b.shift());return a.length&&d.push.apply(d,a),b.length&&d.push.apply(d,b),d}b.exports=c},{}],9:[function(a,b){function c(a,b){var c={};if(null==a)return c;var e,f=-1,g=a.length;if(d(b))for(;++f<g;)e=a[f],c[b(e)]=e;else for(;++f<g;)e=a[f],c[e[b]]=e;return c}var d=a("../lang/isFunction");b.exports=c},{"../lang/isFunction":16}],10:[function(a,b){function c(a){return a}b.exports=c},{}],11:[function(a,b){function c(a,b){if(null==a)return d;switch(typeof a){case"function":return"undefined"!=typeof b?function(c,d,e){return a.call(b,c,d,e)}:a;case"object":return function(b){return f(b,a)};case"string":case"number":return e(a)}}var d=a("./identity"),e=a("./prop"),f=a("../object/deepMatches");b.exports=c},{"../object/deepMatches":21,"./identity":10,"./prop":12}],12:[function(a,b){function c(a){return function(b){return b[a]}}b.exports=c},{}],13:[function(a,b){var c=a("./isKind"),d=Array.isArray||function(a){return c(a,"Array")};b.exports=d},{"./isKind":17}],14:[function(a,b){function c(a){return d(a,"Boolean")}var d=a("./isKind");b.exports=c},{"./isKind":17}],15:[function(a,b){function c(a){if(null==a)return!0;if("string"==typeof a||e(a))return!a.length;if("object"==typeof a){var b=!0;return d(a,function(){return b=!1,!1}),b}return!0}var d=a("../object/forOwn"),e=a("./isArray");b.exports=c},{"../object/forOwn":24,"./isArray":13}],16:[function(a,b){function c(a){return d(a,"Function")}var d=a("./isKind");b.exports=c},{"./isKind":17}],17:[function(a,b){function c(a,b){return d(a)===b}var d=a("./kindOf");b.exports=c},{"./kindOf":19}],18:[function(a,b){function c(a){return!!a&&"object"==typeof a&&a.constructor===Object}b.exports=c},{}],19:[function(a,b){function c(a){return null===a?"Null":a===d?"Undefined":e.exec(f.call(a))[1]}var d,e=/^\[object (.*)\]$/,f=Object.prototype.toString;b.exports=c},{}],20:[function(a,b){function c(a){return null==a?"":a.toString()}b.exports=c},{}],21:[function(a,b){function c(a,b){for(var c=-1,d=a.length;++c<d;)if(f(a[c],b))return!0;return!1}function d(a,b){for(var d=-1,e=b.length;++d<e;)if(!c(a,b[d]))return!1;return!0}function e(a,b){var c=!0;return g(b,function(b,d){return f(a[d],b)?void 0:c=!1}),c}function f(a,b){return a&&"object"==typeof a?h(a)&&h(b)?d(a,b):e(a,b):a===b}var g=a("./forOwn"),h=a("../lang/isArray");b.exports=f},{"../lang/isArray":13,"./forOwn":24}],22:[function(a,b){function c(a){for(var b,c=0,f=arguments.length;++c<f;)b=arguments[c],b&&e(b,d,a);return a}function d(a,b){var d=this[b];f(a)&&f(d)?c(d,a):this[b]=a}var e=a("./forOwn"),f=a("../lang/isPlainObject");b.exports=c},{"../lang/isPlainObject":18,"./forOwn":24}],23:[function(a,b){function c(){g=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=!0;for(var a in{toString:null})f=!1}function d(a,b,d){var i,j=0;null==f&&c();for(i in a)if(e(b,a,i,d)===!1)break;if(f)for(var k=a.constructor,l=!!k&&a===k.prototype;(i=g[j++])&&("constructor"===i&&(l||!h(a,i))||a[i]===Object.prototype[i]||e(b,a,i,d)!==!1););}function e(a,b,c,d){return a.call(d,b[c],c,b)}var f,g,h=a("./hasOwn");b.exports=d},{"./hasOwn":25}],24:[function(a,b){function c(a,b,c){e(a,function(e,f){return d(a,f)?b.call(c,a[f],f,a):void 0})}var d=a("./hasOwn"),e=a("./forIn");b.exports=c},{"./forIn":23,"./hasOwn":25}],25:[function(a,b){function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=c},{}],26:[function(a,b){function c(a,b){return b?(d(b.split("."),function(b){a[b]||(a[b]={}),a=a[b]}),a):a}var d=a("../array/forEach");b.exports=c},{"../array/forEach":4}],27:[function(a,b){function c(a){for(var b,c="string"!=typeof arguments[1]?arguments[1]:d(arguments,1),e={},f=0;b=c[f++];)e[b]=a[b];return e}var d=a("../array/slice");b.exports=c},{"../array/slice":7}],28:[function(a,b){function c(a,b,c){var e=/^(.+)\.(.+)$/.exec(b);e?d(a,e[1])[e[2]]=c:a[b]=c}var d=a("./namespace");b.exports=c},{"./namespace":26}],29:[function(a,b){function c(a){return a=d(a),a=e(a),a=f(a).replace(/[\-_]/g," ").replace(/\s[a-z]/g,g).replace(/\s+/g,"").replace(/^[A-Z]/g,h)}var d=a("../lang/toString"),e=a("./replaceAccents"),f=a("./removeNonWord"),g=a("./upperCase"),h=a("./lowerCase");b.exports=c},{"../lang/toString":20,"./lowerCase":30,"./removeNonWord":33,"./replaceAccents":34,"./upperCase":35}],30:[function(a,b){function c(a){return a=d(a),a.toLowerCase()}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],31:[function(a,b){function c(){var a=d(e(arguments),"/");return a.replace(/([^:\/]|^)\/{2,}/g,"$1/")}var d=a("../array/join"),e=a("../array/slice");b.exports=c},{"../array/join":6,"../array/slice":7}],32:[function(a,b){function c(a){return a=d(a),e(a).replace(/^[a-z]/,f)}var d=a("../lang/toString"),e=a("./camelCase"),f=a("./upperCase");b.exports=c},{"../lang/toString":20,"./camelCase":29,"./upperCase":35}],33:[function(a,b){function c(a){return a=d(a),a.replace(e,"")}var d=a("../lang/toString"),e=/[^\x20\x2D0-9A-Z\x5Fa-z\xC0-\xD6\xD8-\xF6\xF8-\xFF]/g;b.exports=c},{"../lang/toString":20}],34:[function(a,b){function c(a){return a=d(a),a.search(/[\xC0-\xFF]/g)>-1&&(a=a.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),a}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],35:[function(a,b){function c(a){return a=d(a),a.toUpperCase()}var d=a("../lang/toString");b.exports=c},{"../lang/toString":20}],36:[function(a,b){function c(){var a=this.defaults={queryTransform:function(a,b){return b},$httpConfig:{}};this.$get=["$http","$log","DSUtils",function(b,c,d){return{defaults:a,HTTP:function(e){var f=(new Date).getTime();return e=d.deepMixIn(e,a.$httpConfig),b(e).then(function(a){return c.debug(a.config.method+" request:"+a.config.url+" Time taken: "+((new Date).getTime()-f)+"ms",arguments),a})},GET:function(a,b){return b=b||{},this.HTTP(d.deepMixIn(b,{url:a,method:"GET"}))},POST:function(a,b,c){return c=c||{},this.HTTP(d.deepMixIn(c,{url:a,data:b,method:"POST"}))},PUT:function(a,b,c){return c=c||{},this.HTTP(d.deepMixIn(c,{url:a,data:b||{},method:"PUT"}))},DEL:function(a,b){return b=b||{},this.HTTP(d.deepMixIn(b,{url:a,method:"DELETE"}))},find:function(a,b,c){return c=c||{},this.GET(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c),b),c)},findAll:function(b,c,e){return e=e||{},e.params=e.params||{},c&&(c=a.queryTransform(b.name,c),d.deepMixIn(e.params,c)),this.GET(d.makePath(e.baseUrl||b.baseUrl,b.getEndpoint(null,e)),e)},create:function(a,b,c){return c=c||{},this.POST(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c)),b,c)},update:function(a,b,c,e){return e=e||{},this.PUT(d.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(b,e),b),c,e)},updateAll:function(b,c,e,f){return f=f||{},f.params=f.params||{},e&&(e=a.queryTransform(b.name,e),d.deepMixIn(f.params,e)),this.PUT(d.makePath(f.baseUrl||b.baseUrl,b.getEndpoint(null,f)),c,f)},destroy:function(a,b,c){return c=c||{},this.DEL(d.makePath(c.baseUrl||a.baseUrl,a.getEndpoint(b,c),b),c)},destroyAll:function(b,c,e){return e=e||{},e.params=e.params||{},c&&(c=a.queryTransform(b.name,c),d.deepMixIn(e.params,c)),this.DEL(d.makePath(e.baseUrl||b.baseUrl,b.getEndpoint(null,e)),e)}}}]}b.exports=c},{}],37:[function(a,b){function c(){this.$get=["$q","DSUtils","DSErrors",function(a,b,c){return{GET:function(b){var c=a.defer();try{var d=localStorage.getItem(b);c.resolve(d?angular.fromJson(d):void 0)}catch(e){c.reject(e)}return c.promise},PUT:function(a,c){var d=this;return d.GET(a).then(function(e){return e&&b.deepMixIn(e,c),localStorage.setItem(a,angular.toJson(e||c)),d.GET(a)})},DEL:function(b){var c=a.defer();try{localStorage.removeItem(b),c.resolve()}catch(d){c.reject(d)}return c.promise},find:function(a,c,d){return d=d||{},this.GET(b.makePath(d.baseUrl||a.baseUrl,a.endpoint,c))},findAll:function(){throw new Error("DSLocalStorageAdapter.findAll is not supported!")},create:function(a,d,e){if(!(a.idAttribute in d))throw new c.IA("DSLocalStorageAdapter.create: You must provide a primary key in the attrs object!");return e=e||{},this.PUT(b.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(d,e),d[a.idAttribute]),d)},update:function(a,c,d,e){return e=e||{},this.PUT(b.makePath(e.baseUrl||a.baseUrl,a.getEndpoint(c,e),c),d)},updateAll:function(){throw new Error("DSLocalStorageAdapter.updateAll is not supported!")},destroy:function(a,c,d){return d=d||{},this.DEL(b.makePath(d.baseUrl||a.baseUrl,a.getEndpoint(c,d),c))},destroyAll:function(){throw new Error("Not supported!")}}}]}b.exports=c},{}],38:[function(a,b){function c(a){return"DS.create("+a+", attrs[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new e.errors.IA(c(a)+"attrs: Must be an object!");return"cacheResponse"in d||(d.cacheResponse=!0),"upsert"in d||(d.upsert=!0),f.resolve(b),d.upsert&&b[g.idAttribute]?e.update(a,b[g.idAttribute],b,d):f.promise.then(function(b){var c=d.beforeValidate?e.$q.promisify(d.beforeValidate):g.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=d.validate?e.$q.promisify(d.validate):g.validate;return c.call(b,a,b)}).then(function(b){var c=d.afterValidate?e.$q.promisify(d.afterValidate):g.afterValidate;return c.call(b,a,b)}).then(function(b){var c=d.beforeCreate?e.$q.promisify(d.beforeCreate):g.beforeCreate;return c.call(b,a,b)}).then(function(b){return e.adapters[d.adapter||g.defaultAdapter].create(g,g.serialize(a,b),d)}).then(function(b){var c=d.afterCreate?e.$q.promisify(d.afterCreate):g.afterCreate,f=g.deserialize(a,b);return c.call(f,a,f)}).then(function(b){if(d.cacheResponse){var c=e.store[a],f=e.inject(g.name,b,d),h=f[g.idAttribute];return c.completedQueries[h]=(new Date).getTime(),c.previousAttributes[h]=e.utils.deepMixIn({},f),c.saved[h]=e.utils.updateTimestamp(c.saved[h]),e.get(g.name,h)}return b})}catch(h){return f.reject(h),f.promise}}b.exports=d},{}],39:[function(a,b){function c(a,b){return"DS.destroy("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");var h=e.get(a,b);if(!h)throw new e.errors.R(c(a,b)+'id: "'+b+'" not found!');return f.resolve(h),f.promise.then(function(b){var c=d.beforeDestroy?e.$q.promisify(d.beforeDestroy):g.beforeDestroy;return c.call(b,a,b)}).then(function(){return e.adapters[d.adapter||g.defaultAdapter].destroy(g,b,d)}).then(function(){var b=d.afterDestroy?e.$q.promisify(d.afterDestroy):g.afterDestroy;return b.call(h,a,h)}).then(function(){return e.eject(a,b),b})}catch(i){return f.reject(i),f.promise}}b.exports=d},{}],40:[function(a,b){function c(a){return"DS.destroyAll("+a+", params[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.errors.IA,h=e.definitions[a];if(d=d||{},!h)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new g(c(a)+"params: Must be an object!");if(!e.utils.isObject(d))throw new g(c(a)+"options: Must be an object!");return f.resolve(),f.promise.then(function(){return e.adapters[d.adapter||h.defaultAdapter].destroyAll(h,b,d)}).then(function(){return e.ejectAll(a,b)})}catch(i){return f.reject(i),f.promise}}b.exports=d},{}],41:[function(a,b){function c(a,b){return"DS.find("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer(),g=f.promise;try{var h=e.errors.IA,i=e.definitions[a];if(d=d||{},!i)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new h(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new h(c(a,b)+"options: Must be an object!");"cacheResponse"in d||(d.cacheResponse=!0);var j=e.store[a];if((d.bypassCache||!d.cacheResponse)&&delete j.completedQueries[b],!(b in j.completedQueries))return b in j.pendingQueries||(g=j.pendingQueries[b]=e.adapters[d.adapter||i.defaultAdapter].find(i,b,d).then(function(c){var f=i.deserialize(a,c);return d.cacheResponse?(delete j.pendingQueries[b],j.completedQueries[b]=(new Date).getTime(),e.inject(a,f,d)):f},function(a){return delete j.pendingQueries[b],e.$q.reject(a)})),j.pendingQueries[b];f.resolve(e.get(a,b))}catch(k){f.reject(k)}return g}b.exports=d},{}],42:[function(a,b){function c(a){return"DS.findAll("+a+", params[, options]): "}function d(a,b,d,e){var f=this,g=f.store[b],h=f.definitions[b].idAttribute,i=(new Date).getTime();a=a||[],delete g.pendingQueries[d],g.completedQueries[d]=i,g.collectionModified=f.utils.updateTimestamp(g.collectionModified);var j=f.inject(b,a,e);return f.utils.isArray(j)?angular.forEach(j,function(a){a&&a[h]&&(g.completedQueries[a[h]]=i)}):(f.$log.warn(c(b)+"response is expected to be an array!"),g.completedQueries[j[h]]=i),j}function e(a,b,c){var e=this,f=e.definitions[a],g=e.store[a],h=e.utils.toJson(b);return(c.bypassCache||!c.cacheResponse)&&delete g.completedQueries[h],h in g.completedQueries?e.filter(a,b,c):(h in g.pendingQueries||(g.pendingQueries[h]=e.adapters[c.adapter||f.defaultAdapter].findAll(f,b,c).then(function(b){var g=f.deserialize(a,b);if(!c.cacheResponse)return g;try{return d.call(e,g,a,h,c)}catch(i){return e.$q.reject(i)}},function(a){return delete g.pendingQueries[h],e.$q.reject(a)})),g.pendingQueries[h])}function f(a,b,d){var f=this,g=f.$q.defer();try{var h=f.errors.IA;if(d=d||{},b=b||{},!f.definitions[a])throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"params: Must be an object!");if(!f.utils.isObject(d))throw new h(c(a)+"options: Must be an object!");return"cacheResponse"in d||(d.cacheResponse=!0),g.resolve(),g.promise.then(function(){return e.call(f,a,b,d)})}catch(i){return g.reject(i),g.promise}}b.exports=f},{}],43:[function(a,b){b.exports={create:a("./create"),destroy:a("./destroy"),destroyAll:a("./destroyAll"),find:a("./find"),findAll:a("./findAll"),loadRelations:a("./loadRelations"),refresh:a("./refresh"),save:a("./save"),update:a("./update"),updateAll:a("./updateAll")}},{"./create":38,"./destroy":39,"./destroyAll":40,"./find":41,"./findAll":42,"./loadRelations":44,"./refresh":45,"./save":46,"./update":47,"./updateAll":48}],44:[function(a,b){function c(a){return"DS.loadRelations("+a+", instance(Id), relations[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},(angular.isString(b)||angular.isNumber(b))&&(b=f.get(a,b)),angular.isString(d)&&(d=[d]),!i)throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"instance(Id): Must be a string, number or object!");if(!f.utils.isArray(d))throw new h(c(a)+"relations: Must be a string or an array!");if(!f.utils.isObject(e))throw new h(c(a)+"options: Must be an object!");"findBelongsTo"in e||(e.findBelongsTo=!0),"findHasMany"in e||(e.findHasMany=!0);var j=[],k=[];return f.utils.forEach(i.relationList,function(a){var c=a.relation;if(f.utils.contains(d,c)){var g,h={};h[a.foreignKey]=b[i.idAttribute],"hasMany"===a.type?g=f.findAll(c,h,e):"hasOne"===a.type?a.localKey&&b[a.localKey]?g=f.find(c,b[a.localKey],e):a.foreignKey&&(g=f.findAll(c,h,e)):g=f.find(c,b[a.localKey],e),g&&(j.push(g),k.push(a.localField))}}),g.resolve(),g.promise.then(function(){return f.$q.all(j)}).then(function(a){return angular.forEach(k,function(c,d){b[c]=a[d]}),b})}catch(l){return g.reject(l),g.promise}}b.exports=d},{}],45:[function(a,b){function c(a,b){return"DS.refresh("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.errors.IA;if(d=d||{},e.definitions[a]){if(e.utils.isString(b)||e.utils.isNumber(b)){if(e.utils.isObject(d)){if(d.bypassCache=!0,e.get(a,b))return e.find(a,b,d);var g=e.$q.defer();return g.resolve(),g.promise}throw new f(c(a,b)+"options: Must be an object!")}throw new f(c(a,b)+"id: Must be a string or a number!")}throw new e.errors.NER(c(a,b)+a)}b.exports=d},{}],46:[function(a,b){function c(a,b){return"DS.save("+a+", "+b+"[, options]): "}function d(a,b,d){var e=this,f=e.$q.defer();try{var g=e.errors.IA,h=e.definitions[a];if(d=d||{},!h)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new g(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new g(c(a,b)+"options: Must be an object!");var i=e.get(a,b);if(!i)throw new e.errors.R(c(a,b)+'id: "'+b+'" not found!');return"cacheResponse"in d||(d.cacheResponse=!0),f.resolve(i),f.promise.then(function(b){var c=d.beforeValidate?e.$q.promisify(d.beforeValidate):h.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=d.validate?e.$q.promisify(d.validate):h.validate;return c.call(b,a,b)}).then(function(b){var c=d.afterValidate?e.$q.promisify(d.afterValidate):h.afterValidate;return c.call(b,a,b)}).then(function(b){var c=d.beforeUpdate?e.$q.promisify(d.beforeUpdate):h.beforeUpdate;return c.call(b,a,b)}).then(function(c){if(d.changesOnly){var f=e.store[a];f.observers[b].deliver();var g=[],i=e.changes(a,b);for(var j in i.added)g.push(j);for(j in i.changed)g.push(j);if(i=e.utils.pick(c,g),e.utils.isEmpty(i))return c;c=i}return e.adapters[d.adapter||h.defaultAdapter].update(h,b,h.serialize(a,c),d)}).then(function(b){var c=d.afterUpdate?e.$q.promisify(d.afterUpdate):h.afterUpdate,f=h.deserialize(a,b);return c.call(f,a,f)}).then(function(c){if(d.cacheResponse){var f=e.store[a],g=e.inject(h.name,c,d);return f.previousAttributes[b]=e.utils.deepMixIn({},g),f.saved[b]=e.utils.updateTimestamp(f.saved[b]),f.observers[b].discardChanges(),e.get(a,b)}return c})}catch(j){return f.reject(j),f.promise}}b.exports=d},{}],47:[function(a,b){function c(a,b){return"DS.update("+a+", "+b+", attrs[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},!i)throw new f.errors.NER(c(a,b)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new h(c(a,b)+"id: Must be a string or a number!");if(!f.utils.isObject(d))throw new h(c(a,b)+"attrs: Must be an object!");if(!f.utils.isObject(e))throw new h(c(a,b)+"options: Must be an object!");return"cacheResponse"in e||(e.cacheResponse=!0),g.resolve(d),g.promise.then(function(b){var c=e.beforeValidate?f.$q.promisify(e.beforeValidate):i.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=e.validate?f.$q.promisify(e.validate):i.validate;return c.call(b,a,b)}).then(function(b){var c=e.afterValidate?f.$q.promisify(e.afterValidate):i.afterValidate;return c.call(b,a,b)}).then(function(b){var c=e.beforeUpdate?f.$q.promisify(e.beforeUpdate):i.beforeUpdate;return c.call(b,a,b)}).then(function(c){return f.adapters[e.adapter||i.defaultAdapter].update(i,b,i.serialize(a,c),e)}).then(function(b){var c=e.afterUpdate?f.$q.promisify(e.afterUpdate):i.afterUpdate,d=i.deserialize(a,b);return c.call(d,a,d)}).then(function(b){if(e.cacheResponse){var c=f.store[a],d=f.inject(i.name,b,e),g=d[i.idAttribute];return c.previousAttributes[g]=f.utils.deepMixIn({},d),c.saved[g]=f.utils.updateTimestamp(c.saved[g]),c.observers[g].discardChanges(),f.get(i.name,g)}return b})}catch(j){return g.reject(j),g.promise}}b.exports=d},{}],48:[function(a,b){function c(a){return"DS.updateAll("+a+", attrs, params[, options]): "}function d(a,b,d,e){var f=this,g=f.$q.defer();try{var h=f.errors.IA,i=f.definitions[a];if(e=e||{},!i)throw new f.errors.NER(c(a)+a);if(!f.utils.isObject(b))throw new h(c(a)+"attrs: Must be an object!");if(!f.utils.isObject(d))throw new h(c(a)+"params: Must be an object!");if(!f.utils.isObject(e))throw new h(c(a)+"options: Must be an object!");return"cacheResponse"in e||(e.cacheResponse=!0),g.resolve(b),g.promise.then(function(b){var c=e.beforeValidate?f.$q.promisify(e.beforeValidate):i.beforeValidate;return c.call(b,a,b)}).then(function(b){var c=e.validate?f.$q.promisify(e.validate):i.validate;return c.call(b,a,b)}).then(function(b){var c=e.afterValidate?f.$q.promisify(e.afterValidate):i.afterValidate;return c.call(b,a,b)}).then(function(b){var c=e.beforeUpdate?f.$q.promisify(e.beforeUpdate):i.beforeUpdate;return c.call(b,a,b)}).then(function(b){return f.adapters[e.adapter||i.defaultAdapter].updateAll(i,i.serialize(a,b),d,e)}).then(function(b){var c=e.afterUpdate?f.$q.promisify(e.afterUpdate):i.afterUpdate,d=i.deserialize(a,b);return c.call(d,a,d)}).then(function(a){return e.cacheResponse?f.inject(i.name,a,e):a})}catch(j){return g.reject(j),g.promise}}b.exports=d},{}],49:[function(a,b){function c(a,b,c){c(null,b)}function d(){}function e(){var b=this.defaults=new d;this.$get=["$rootScope","$log","$q","DSHttpAdapter","DSLocalStorageAdapter","DSUtils","DSErrors",function(c,d,e,f,g,h,i){var j,k=a("./sync_methods"),l=a("./async_methods");try{j=angular.injector(["angular-data.DSCacheFactory"]).get("DSCacheFactory")}catch(m){d.warn(m),d.warn("DSCacheFactory is unavailable. Resorting to the lesser capabilities of $cacheFactory."),j=angular.injector(["ng"]).get("$cacheFactory")}var n={notify:function(a,b){var d=Array.prototype.slice.call(arguments,2);d.unshift(a.name),d.unshift("DS."+b),"broadcast"===a.events?c.$broadcast.apply(c,d):"emit"===a.events&&c.$emit.apply(c,d)},$rootScope:c,$log:d,$q:e,cacheFactory:j,defaults:b,store:{},definitions:{},adapters:{DSHttpAdapter:f,DSLocalStorageAdapter:g},errors:i,utils:h};return h.deepFreeze(k),h.deepFreeze(l),h.deepMixIn(n,k),h.deepMixIn(n,l),h.deepFreeze(n.errors),h.deepFreeze(n.utils),("function"!=typeof Object.observe||"function"!=typeof Array.observe)&&c.$watch(function(){return(new Date).getTime()/100|0},function(){n.digest()}),n}]}a("../utils")[0]();d.prototype.idAttribute="id",d.prototype.defaultAdapter="DSHttpAdapter",d.prototype.defaultFilter=function(a,b,c,d){var e=this,f=a,g=null,h={skip:"",offset:"",where:"",limit:"",orderBy:"",sort:""};g=this.utils.isObject(c.where)?c.where:{},d.allowSimpleWhere&&this.utils.forOwn(c,function(a,b){b in h||b in g||(g[b]={"==":a})}),this.utils.isEmpty(g)&&(g=null),g&&(f=this.utils.filter(f,function(a){var b=!0,c=!0;return e.utils.forOwn(g,function(d,f){e.utils.isString(d)?d={"===":d}:(e.utils.isNumber(d)||e.utils.isBoolean(d))&&(d={"==":d}),e.utils.isObject(d)&&e.utils.forOwn(d,function(d,g){"=="===g?c=b?a[f]==d:c&&a[f]==d:"==="===g?c=b?a[f]===d:c&&a[f]===d:"!="===g?c=b?a[f]!=d:c&&a[f]!=d:"!=="===g?c=b?a[f]!==d:c&&a[f]!==d:">"===g?c=b?a[f]>d:c&&a[f]>d:">="===g?c=b?a[f]>=d:c&&a[f]>=d:"<"===g?c=b?a[f]<d:c&&a[f]<d:"<="===g?c=b?a[f]<=d:c&&a[f]<=d:"in"===g?c=b?e.utils.contains(d,a[f]):c&&e.utils.contains(d,a[f]):"|=="===g?c=b?a[f]==d:c||a[f]==d:"|==="===g?c=b?a[f]===d:c||a[f]===d:"|!="===g?c=b?a[f]!=d:c||a[f]!=d:"|!=="===g?c=b?a[f]!==d:c||a[f]!==d:"|>"===g?c=b?a[f]>d:c||a[f]>d:"|>="===g?c=b?a[f]>=d:c||a[f]>=d:"|<"===g?c=b?a[f]<d:c||a[f]<d:"|<="===g?c=b?a[f]<=d:c||a[f]<=d:"|in"===g&&(c=b?e.utils.contains(d,a[f]):c||e.utils.contains(d,a[f])),b=!1})}),c}));var i=null;this.utils.isString(c.orderBy)?i=[[c.orderBy,"ASC"]]:this.utils.isArray(c.orderBy)&&(i=c.orderBy),!i&&this.utils.isString(c.sort)?i=[[c.sort,"ASC"]]:!i&&this.utils.isArray(c.sort)&&(i=c.sort),i&&angular.forEach(i,function(a){if(e.utils.isString(a))a=[a,"ASC"];else if(!e.utils.isArray(a))throw new e.errors.IllegalArgumentError("DS.filter(resourceName[, params][, options]): "+angular.toJson(a)+": Must be a string or an array!",{params:{"orderBy[i]":{actual:typeof a,expected:"string|array"}}});f=e.utils.sort(f,function(b,c){var d=b[a[0]],f=c[a[0]];return e.utils.isString(d)&&(d=e.utils.upperCase(d)),e.utils.isString(f)&&(f=e.utils.upperCase(f)),"DESC"===a[1]?d>f?-1:f>d?1:0:f>d?-1:d>f?1:0 | ||
})});var j=angular.isNumber(c.limit)?c.limit:null,k=null;return angular.isNumber(c.skip)?k=c.skip:angular.isNumber(c.offset)&&(k=c.offset),j&&k?f=this.utils.slice(f,k,Math.min(f.length,k+j)):this.utils.isNumber(j)?f=this.utils.slice(f,0,Math.min(f.length,j)):this.utils.isNumber(k)&&(f=k<f.length?this.utils.slice(f,k):[]),f},d.prototype.baseUrl="",d.prototype.endpoint="",d.prototype.useClass=!1,d.prototype.beforeValidate=c,d.prototype.validate=c,d.prototype.afterValidate=c,d.prototype.beforeCreate=c,d.prototype.afterCreate=c,d.prototype.beforeUpdate=c,d.prototype.afterUpdate=c,d.prototype.beforeDestroy=c,d.prototype.afterDestroy=c,d.prototype.beforeInject=function(a,b){return b},d.prototype.afterInject=function(a,b){return b},d.prototype.serialize=function(a,b){return b},d.prototype.deserialize=function(a,b){return b.data},d.prototype.events="broadcast",b.exports=e},{"../utils":73,"./async_methods":43,"./sync_methods":62}],50:[function(a,b){function c(a){return"DS.bindAll(scope, expr, "+a+", params[, cb]): "}function d(a,b,d,e,f){var g=this,h=g.errors.IA;if(!g.utils.isObject(a))throw new h(c(d)+"scope: Must be an object!");if(!g.utils.isString(b))throw new h(c(d)+"expr: Must be a string!");if(!g.definitions[d])throw new g.errors.NER(c(d)+d);if(!g.utils.isObject(e))throw new h(c(d)+"params: Must be an object!");try{return a.$watch(function(){return g.lastModified(d)},function(){var c=g.filter(d,e);g.utils.set(a,b,c),f&&f(null,c)})}catch(i){if(!f)throw i;f(i)}}b.exports=d},{}],51:[function(a,b){function c(a){return"DS.bindOne(scope, expr, "+a+", id[, cb]): "}function d(a,b,d,e,f){var g=this,h=g.errors.IA;if(!g.utils.isObject(a))throw new h(c(d)+"scope: Must be an object!");if(!g.utils.isString(b))throw new h(c(d)+"expr: Must be a string!");if(!g.definitions[d])throw new g.errors.NER(c(d)+d);if(!g.utils.isString(e)&&!g.utils.isNumber(e))throw new h(c(d)+"id: Must be a string or a number!");try{return a.$watch(function(){return g.lastModified(d,e)},function(){var c=g.get(d,e);g.utils.set(a,b,c),f&&f(null,c)})}catch(i){if(!f)throw i;f(i)}}b.exports=d},{}],52:[function(a,b){function c(a){return"DS.changes("+a+", id): "}function d(a,b){var d=this;if(!d.definitions[a])throw new d.errors.NER(c(a)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a)+"id: Must be a string or a number!");var e=d.get(a,b);if(e){d.store[a].observers[b].deliver();var f=d.utils.diffObjectFromOldObject(e,d.store[a].previousAttributes[b]);return d.utils.forOwn(f,function(a,b){var c=[];d.utils.forOwn(a,function(a,b){angular.isFunction(a)||c.push(b)}),f[b]=d.utils.pick(f[b],c)}),f}}b.exports=d},{}],53:[function(a,b){function c(a){return"DS.compute("+a+", instance): "}function d(a,b){var c=this,d=[];angular.forEach(a.deps,function(a){d.push(c[a])}),this[b]=a[a.length-1].apply(this,d)}function e(a,b){var e=this,f=e.errors.IA,g=e.definitions[a];if(!g)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b)&&!e.utils.isString(b)&&!e.utils.isNumber(b))throw new f(c(a)+"instance: Must be an object, string or number!");return(e.utils.isString(b)||e.utils.isNumber(b))&&(b=e.get(a,b)),e.utils.forOwn(g.computed,function(a,c){d.call(b,a,c)}),b}b.exports={compute:e,_compute:d}},{}],54:[function(a,b){function c(a){return"DS.createInstance("+a+"[, attrs][, options]): "}function d(a,b,d){var e=this,f=e.errors.IA,g=e.definitions[a];if(b=b||{},d=d||{},!g)throw new e.errors.NER(c(a)+a);if(b&&!e.utils.isObject(b))throw new f(c(a)+"attrs: Must be an object!");if(!e.utils.isObject(d))throw new f(c(a)+"options: Must be an object!");"useClass"in d||(d.useClass=!0);var h;if(d.useClass){var i=g[g.class];h=new i}else h={};return e.utils.deepMixIn(h,b)}b.exports=d},{}],55:[function(require,module,exports){function Resource(a,b){a.deepMixIn(this,b),this.endpoint="endpoint"in b?b.endpoint:this.name}function defineResource(definition){var DS=this,definitions=DS.definitions,IA=DS.errors.IA;if(DS.utils.isString(definition)&&(definition=definition.replace(/\s/gi,""),definition={name:definition}),!DS.utils.isObject(definition))throw new IA(errorPrefix+"definition: Must be an object!");if(!DS.utils.isString(definition.name))throw new IA(errorPrefix+"definition.name: Must be a string!");if(definition.idAttribute&&!DS.utils.isString(definition.idAttribute))throw new IA(errorPrefix+"definition.idAttribute: Must be a string!");if(definition.endpoint&&!DS.utils.isString(definition.endpoint))throw new IA(errorPrefix+"definition.endpoint: Must be a string!");if(DS.store[definition.name])throw new DS.errors.R(errorPrefix+definition.name+" is already registered!");try{Resource.prototype=DS.defaults,definitions[definition.name]=new Resource(DS.utils,definition);var def=definitions[definition.name];def.relations&&(def.relationList=[],def.relationFields=[],DS.utils.forOwn(def.relations,function(a,b){DS.utils.forOwn(a,function(c,d){DS.utils.isArray(c)||(a[d]=[c]),DS.utils.forEach(a[d],function(a){a.type=b,a.relation=d,a.name=def.name,def.relationList.push(a),def.relationFields.push(a.localField)})})}),def.relations.belongsTo&&DS.utils.forOwn(def.relations.belongsTo,function(a,b){DS.utils.forEach(a,function(a){a.parent&&(def.parent=b,def.parentKey=a.localKey)})}),DS.utils.deepFreeze(def.relations),DS.utils.deepFreeze(def.relationList)),def.getEndpoint=function(a,b){var c,d,e=this.parent,f=this.parentKey,g=b.endpoint||this.endpoint;return delete b.endpoint,b=b||{},b.params=b.params||{},e&&f&&definitions[e]&&b.params[f]!==!1&&((DS.utils.isNumber(a)||DS.utils.isString(a))&&(c=DS.get(this.name,a)),DS.utils.isObject(a)&&f in a?(delete b.params[f],d=DS.utils.makePath(definitions[e].getEndpoint(a,b),a[f],g)):c&&f in c?(delete b.params[f],d=DS.utils.makePath(definitions[e].getEndpoint(a,b),c[f],g)):b&&b.params[f]&&(d=DS.utils.makePath(definitions[e].getEndpoint(a,b),b.params[f],g),delete b.params[f])),b.params[f]===!1&&delete b.params[f],d||g},def.filter&&(def.defaultFilter=def.filter,delete def.filter);var cache=DS.cacheFactory("DS."+def.name,{maxAge:def.maxAge||null,recycleFreq:def.recycleFreq||1e3,cacheFlushInterval:def.cacheFlushInterval||null,deleteOnExpire:def.deleteOnExpire||"none",onExpire:function(a){var b=DS.eject(def.name,a);DS.utils.isFunction(def.onExpire)&&def.onExpire(a,b)},capacity:Number.MAX_VALUE,storageMode:"memory",storageImpl:null,disabled:!1,storagePrefix:"DS."+def.name});return def.class=DS.utils.pascalCase(definition.name),eval("function "+def.class+"() {}"),def[def.class]=eval(def.class),def.methods&&DS.utils.deepMixIn(def[def.class].prototype,def.methods),def.computed&&(DS.utils.forOwn(def.computed,function(a,b){angular.isFunction(a)&&(def.computed[b]=[a],a=def.computed[b]),def.methods&&b in def.methods&&DS.$log.warn(errorPrefix+'Computed property "'+b+'" conflicts with previously defined prototype method!');var c;if(1===a.length){var d=a[0].toString().match(/function.*?\(([\s\S]*?)\)/);c=d[1].split(","),def.computed[b]=c.concat(a),a=def.computed[b],c.length&&DS.$log.warn(errorPrefix+"Use the computed property array syntax for compatibility with minified code!")}c=a.slice(0,a.length-1),angular.forEach(c,function(a,b){c[b]=a.trim()}),a.deps=DS.utils.filter(c,function(a){return!!a})}),def[def.class].prototype.DSCompute=function(){return DS.compute(def.name,this)}),DS.store[def.name]={collection:[],completedQueries:{},pendingQueries:{},index:cache,modified:{},saved:{},previousAttributes:{},observers:{},collectionModified:0},angular.forEach(methodsToProxy,function(a){def[a]="bindOne"===a||"bindAll"===a?function(){var b=Array.prototype.slice.call(arguments);return b.splice(2,0,def.name),DS[a].apply(DS,b)}:function(){var b=Array.prototype.slice.call(arguments);return b.unshift(def.name),DS[a].apply(DS,b)}}),def.beforeValidate=DS.$q.promisify(def.beforeValidate),def.validate=DS.$q.promisify(def.validate),def.afterValidate=DS.$q.promisify(def.afterValidate),def.beforeCreate=DS.$q.promisify(def.beforeCreate),def.afterCreate=DS.$q.promisify(def.afterCreate),def.beforeUpdate=DS.$q.promisify(def.beforeUpdate),def.afterUpdate=DS.$q.promisify(def.afterUpdate),def.beforeDestroy=DS.$q.promisify(def.beforeDestroy),def.afterDestroy=DS.$q.promisify(def.afterDestroy),def}catch(err){throw DS.$log.error(err),delete definitions[definition.name],delete DS.store[definition.name],err}}var errorPrefix="DS.defineResource(definition): ",methodsToProxy=["bindAll","bindOne","changes","create","createInstance","destroy","destroyAll","eject","ejectAll","filter","find","findAll","get","hasChanges","inject","lastModified","lastSaved","link","linkAll","linkInverse","loadRelations","previous","refresh","save","update","updateAll"];module.exports=defineResource},{}],56:[function(a,b){function c(){this.$rootScope.$$phase?d.Platform.performMicrotaskCheckpoint():this.$rootScope.$apply(function(){d.Platform.performMicrotaskCheckpoint()})}var d=a("../../../lib/observe-js/observe-js");b.exports=c},{"../../../lib/observe-js/observe-js":1}],57:[function(a,b){function c(a,b){return"DS.eject("+a+", "+b+"): "}function d(a,b,c){for(var d,e=!1,f=0;f<b.collection.length;f++)if(b.collection[f][a.idAttribute]==c){d=b.collection[f],e=!0;break}return e?(this.unlinkInverse(a.name,c),b.collection.splice(f,1),b.observers[c].close(),delete b.observers[c],b.index.remove(c),delete b.previousAttributes[c],delete b.completedQueries[c],delete b.modified[c],delete b.saved[c],b.collectionModified=this.utils.updateTimestamp(b.collectionModified),this.notify(a,"eject",d),d):void 0}function e(a,b){var e=this,f=e.definitions[a];if(!f)throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");var g,h=e.store[a];return e.$rootScope.$$phase?g=d.call(e,f,h,b):e.$rootScope.$apply(function(){g=d.call(e,f,h,b)}),g}b.exports=e},{}],58:[function(a,b){function c(a){return"DS.ejectAll("+a+"[, params]): "}function d(a,b,c){var d=this,e=d.utils.toJson(c),f=d.filter(a.name,c),g=d.utils.toLookup(f,a.idAttribute);return angular.forEach(g,function(b,c){d.eject(a.name,c)}),delete b.completedQueries[e],b.collectionModified=d.utils.updateTimestamp(b.collectionModified),d.notify(a,"eject",f),f}function e(a,b){var e=this,f=e.definitions[a];if(b=b||{},!f)throw new e.errors.NER(c(a)+a);if(!e.utils.isObject(b))throw new e.errors.IA(c(a)+"params: Must be an object!");var g,h=e.store[a];return e.utils.isEmpty(b)&&(h.completedQueries={}),e.$rootScope.$$phase?g=d.call(e,f,h,b):e.$rootScope.$apply(function(){g=d.call(e,f,h,b)}),g}b.exports=e},{}],59:[function(a,b){function c(a){return"DS.filter("+a+"[, params][, options]): "}function d(a,b,d){var e=this,f=e.errors.IA,g=e.definitions[a];if(d=d||{},!g)throw new e.errors.NER(c(a)+a);if(b&&!e.utils.isObject(b))throw new f(c(a)+"params: Must be an object!");if(!e.utils.isObject(d))throw new f(c(a)+"options: Must be an object!");var h=e.store[a];b=b||{},d.allowSimpleWhere="allowSimpleWhere"in d?!!d.allowSimpleWhere:!0;var i=e.utils.toJson(b);return i in h.completedQueries||!d.loadFromServer||h.pendingQueries[i]||e.findAll(a,b,d),g.defaultFilter.call(e,h.collection,a,b,d)}b.exports=d},{}],60:[function(a,b){function c(a,b){return"DS.get("+a+", "+b+"): "}function d(a,b,d){var e=this,f=e.errors.IA;if(d=d||{},!e.definitions[a])throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new f(c(a,b)+"id: Must be a string or a number!");if(!e.utils.isObject(d))throw new f(c(a,b)+"options: Must be an object!");var g=e.store[a].index.get(b);return!g&&d.loadFromServer&&e.find(a,b,d).then(null,function(a){return e.$q.reject(a)}),g}b.exports=d},{}],61:[function(a,b){function c(a,b){return"DS.hasChanges("+a+", "+b+"): "}function d(a,b){return!(a.isEmpty(b.added)&&a.isEmpty(b.removed)&&a.isEmpty(b.changed))}function e(a,b){var e=this;if(!e.definitions[a])throw new e.errors.NER(c(a,b)+a);if(!e.utils.isString(b)&&!e.utils.isNumber(b))throw new e.errors.IA(c(a,b)+"id: Must be a string or a number!");return e.get(a,b)?d(e.utils,e.changes(a,b)):!1}b.exports=e},{}],62:[function(a,b){b.exports={bindOne:a("./bindOne"),bindAll:a("./bindAll"),changes:a("./changes"),compute:a("./compute").compute,createInstance:a("./createInstance"),defineResource:a("./defineResource"),digest:a("./digest"),eject:a("./eject"),ejectAll:a("./ejectAll"),filter:a("./filter"),get:a("./get"),hasChanges:a("./hasChanges"),inject:a("./inject"),lastModified:a("./lastModified"),lastSaved:a("./lastSaved"),link:a("./link"),linkAll:a("./linkAll"),linkInverse:a("./linkInverse"),previous:a("./previous"),unlinkInverse:a("./unlinkInverse")}},{"./bindAll":50,"./bindOne":51,"./changes":52,"./compute":53,"./createInstance":54,"./defineResource":55,"./digest":56,"./eject":57,"./ejectAll":58,"./filter":59,"./get":60,"./hasChanges":61,"./inject":63,"./lastModified":64,"./lastSaved":65,"./link":66,"./linkAll":67,"./linkInverse":68,"./previous":69,"./unlinkInverse":70}],63:[function(a,b){function c(a){return"DS.inject("+a+", attrs[, options]): "}function d(a,b,e){function f(c,d,e,f,g){var i,l=this,m=f&&f(a.idAttribute)?f(a.idAttribute):l[a.idAttribute];j.utils.forEach(a.relationFields,function(a){delete c[a],delete d[a],delete e[a]}),j.utils.isEmpty(c)&&j.utils.isEmpty(d)&&j.utils.isEmpty(e)&&!g||(b.modified[m]=j.utils.updateTimestamp(b.modified[m]),b.collectionModified=j.utils.updateTimestamp(b.collectionModified)),a.computed&&(i=j.get(a.name,m),j.utils.forOwn(a.computed,function(a,b){var f=!1;angular.forEach(a.deps,function(a){(a in c||a in d||a in e||!(b in i))&&(f=!0)}),f=f||!a.deps.length,f&&h.call(i,a,b)})),a.relations&&(i=j.get(a.name,m),j.utils.forEach(a.relationList,function(b){i[b.localField]&&(b.localKey in c||b.localKey in d||b.localKey in e)&&j.link(a.name,i[a.idAttribute],[b.relation])})),a.idAttribute in e&&k.error("Doh! You just changed the primary key of an object! I don't know how to handle this yet, so your data for the \""+a.name+'" resource is now in an undefined (probably broken) state.')}var i,j=this,k=j.$log;if(j.utils.isArray(e)){i=[];for(var l=0;l<e.length;l++)i.push(d.call(j,a,b,e[l]))}else{var m=a.computed,n=a.idAttribute;if(m&&m[n]){var o=[];angular.forEach(m[n].deps,function(a){o.push(e[a])}),e[n]=m[n][m[n].length-1].apply(e,o)}if(!(n in e)){var p=new j.errors.R(c(a.name)+"attrs: Must contain the property specified by `idAttribute`!");throw k.error(p),p}try{a.beforeInject(a.name,e);var q=e[n],r=j.get(a.name,q);r?(j.utils.deepMixIn(r,e),"function"==typeof b.index.touch?b.index.touch(q):b.index.put(q,b.index.get(q)),b.observers[q].deliver()):(r=a.methods||a.useClass?e instanceof a[a.class]?e:new a[a.class]:{},b.previousAttributes[q]={},j.utils.deepMixIn(r,e),j.utils.deepMixIn(b.previousAttributes[q],e),b.collection.push(r),b.observers[q]=new g.ObjectObserver(r),b.observers[q].open(f,r),b.index.put(q,r),f.call(r,{},{},{},null,!0)),b.saved[q]=j.utils.updateTimestamp(b.saved[q]),a.afterInject(a.name,r),i=r}catch(s){k.error(s),k.error("inject failed!",a.name,e)}}return i}function e(a,b,d){function e(b,e,g){var h=f.definitions[e];if(h&&g[b.localField]&&!j.injectedSoFar[e+g[b.localField][h.idAttribute]])try{j.injectedSoFar[e+g[b.localField][h.idAttribute]]=1,g[b.localField]=f.inject(e,g[b.localField],d)}catch(i){f.$log.error(c(a.name)+"Failed to inject "+b.type+' relation: "'+e+'"!',i)}else d.findBelongsTo&&"belongsTo"===b.type?f.utils.isArray(g)?f.utils.forEach(g,function(b){f.link(a.name,b[a.idAttribute],[e])}):f.link(a.name,g[a.idAttribute],[e]):(d.findHasMany&&"hasMany"===b.type||d.findHasOne&&"hasOne"===b.type)&&(f.utils.isArray(g)?f.utils.forEach(g,function(b){f.link(a.name,b[a.idAttribute],[e])}):f.link(a.name,g[a.idAttribute],[e]))}var f=this;f.utils.forEach(a.relationList,function(a){f.utils.isArray(b)?f.utils.forEach(b,function(b){e(a,a.relation,b)}):e(a,a.relation,b)})}function f(a,b,f){var g=this,h=g.errors.IA,k=g.definitions[a];if(f=f||{},!k)throw new g.errors.NER(c(a)+a);if(!g.utils.isObject(b)&&!g.utils.isArray(b))throw new h(c(a)+"attrs: Must be an object or an array!");if(!g.utils.isObject(f))throw new h(c(a)+"options: Must be an object!");var l,m=g.store[a];i++;try{g.$rootScope.$$phase?l=d.call(g,k,m,b):g.$rootScope.$apply(function(){l=d.call(g,k,m,b)}),k.relations&&e.call(g,k,l,f),f.linkInverse&&(g.utils.isArray(l)&&l.length?g.linkInverse(k.name,l[0][k.idAttribute]):g.linkInverse(k.name,l[k.idAttribute])),g.notify(k,"inject",l),i--}catch(n){throw i--,n}return i||(j.injectedSoFar={}),l}var g=a("../../../lib/observe-js/observe-js"),h=a("./compute")._compute,i=0,j={injectedSoFar:{}};b.exports=f},{"../../../lib/observe-js/observe-js":1,"./compute":53}],64:[function(a,b){function c(a,b){return"DS.lastModified("+a+"[, "+b+"]): "}function d(a,b){var d=this,e=d.store[a];if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(b&&!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return b?(b in e.modified||(e.modified[b]=0),e.modified[b]):e.collectionModified}b.exports=d},{}],65:[function(a,b){function c(a,b){return"DS.lastSaved("+a+"[, "+b+"]): "}function d(a,b){var d=this,e=d.store[a];if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return b in e.saved||(e.saved[b]=0),e.saved[b]}b.exports=d},{}],66:[function(a,b){function c(a){return"DS.link("+a+", id[, relations]): "}function d(a,b,c){var d=this;d.utils.forEach(a.relationList,function(e){var f=e.relation;if(!c.length||d.utils.contains(c,f)){var g={};if("belongsTo"===e.type){var h=b[e.localKey]?d.get(f,b[e.localKey]):null;h&&(b[e.localField]=h)}else if("hasMany"===e.type)g[e.foreignKey]=b[a.idAttribute],b[e.localField]=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,g,{allowSimpleWhere:!0});else if("hasOne"===e.type){g[e.foreignKey]=b[a.idAttribute];var i=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,g,{allowSimpleWhere:!0});i.length&&(b[e.localField]=i[0])}}})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new g(c(a)+"id: Must be a string or a number!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.get(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,i,e):f.$rootScope.$apply(function(){d.call(f,h,i,e)})),i}b.exports=e},{}],67:[function(a,b){function c(a){return"DS.linkAll("+a+"[, params][, relations]): "}function d(a,b,c){var d=this;d.utils.forEach(a.relationList,function(e){var f=e.relation;(!c.length||d.utils.contains(c,f))&&("belongsTo"===e.type?d.utils.forEach(b,function(a){var b=a[e.localKey]?d.get(f,a[e.localKey]):null;b&&(a[e.localField]=b)}):"hasMany"===e.type?d.utils.forEach(b,function(b){var c={};c[e.foreignKey]=b[a.idAttribute],b[e.localField]=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,c,{allowSimpleWhere:!0})}):"hasOne"===e.type&&d.utils.forEach(b,function(b){var c={};c[e.foreignKey]=b[a.idAttribute];var g=d.defaults.constructor.prototype.defaultFilter.call(d,d.store[f].collection,f,c,{allowSimpleWhere:!0});g.length&&(b[e.localField]=g[0])}))})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(b&&!f.utils.isObject(b))throw new g(c(a)+"params: Must be an object!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.filter(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,i,e):f.$rootScope.$apply(function(){d.call(f,h,i,e)})),i}b.exports=e},{}],68:[function(a,b){function c(a){return"DS.linkInverse("+a+", id[, relations]): "}function d(a,b){var c=this;c.utils.forOwn(c.definitions,function(d){c.utils.forOwn(d.relations,function(e){c.utils.forOwn(e,function(e,f){(!b.length||c.utils.contains(b,d.name))&&a.name===f&&c.linkAll(d.name,{},[a.name])})})})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new g(c(a)+"id: Must be a string or a number!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.get(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,e):f.$rootScope.$apply(function(){d.call(f,h,e)})),i}b.exports=e},{}],69:[function(a,b){function c(a,b){return"DS.previous("+a+"[, "+b+"]): "}function d(a,b){var d=this;if(!d.definitions[a])throw new d.errors.NER(c(a,b)+a);if(!d.utils.isString(b)&&!d.utils.isNumber(b))throw new d.errors.IA(c(a,b)+"id: Must be a string or a number!");return angular.copy(d.store[a].previousAttributes[b])}b.exports=d},{}],70:[function(a,b){function c(a){return"DS.unlinkInverse("+a+", id[, relations]): "}function d(a,b){var c=this;c.utils.forOwn(c.definitions,function(d){c.utils.forOwn(d.relations,function(d){c.utils.forOwn(d,function(d,e){a.name===e&&c.utils.forEach(d,function(a){c.utils.forEach(c.store[a.name].collection,function(d){if("hasMany"===a.type&&d[a.localField]){var e;c.utils.forEach(d[a.localField],function(a,c){a===b&&(e=c)}),d[a.localField].splice(e,1)}else d[a.localField]===b&&delete d[a.localField]})})})})})}function e(a,b,e){var f=this,g=f.errors.IA,h=f.definitions[a];if(e=e||[],!h)throw new f.errors.NER(c(a)+a);if(!f.utils.isString(b)&&!f.utils.isNumber(b))throw new g(c(a)+"id: Must be a string or a number!");if(!f.utils.isArray(e))throw new g(c(a)+"relations: Must be an array!");var i=f.get(a,b);return i&&(f.$rootScope.$$phase?d.call(f,h,i,e):f.$rootScope.$apply(function(){d.call(f,h,i,e)})),i}b.exports=e},{}],71:[function(a,b){function c(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=a||"Illegal Argument!"}function d(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=a||"RuntimeError Error!"}function e(a){Error.call(this),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.type=this.constructor.name,this.message=(a||"")+" is not a registered resource!"}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,d.prototype=Object.create(Error.prototype),d.prototype.constructor=d,e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,b.exports=[function(){return{IllegalArgumentError:c,IA:c,RuntimeError:d,R:d,NonexistentResourceError:e,NER:e}}]},{}],72:[function(a){!function(b,c){"use strict";c.module("angular-data.DS",["ng"]).factory("DSUtils",a("./utils")).factory("DSErrors",a("./errors")).provider("DSHttpAdapter",a("./adapters/http")).provider("DSLocalStorageAdapter",a("./adapters/localStorage")).provider("DS",a("./datastore")).config(["$provide",function(a){a.decorator("$q",["$delegate",function(a){return a.promisify=function(a,b){if(a){if("function"!=typeof a)throw new Error("Can only promisify functions!");var c=this;return function(){var d=c.defer(),e=Array.prototype.slice.apply(arguments);e.push(function(a,b){a?d.reject(a):d.resolve(b)});try{a.apply(b||this,e)}catch(f){d.reject(f)}return d.promise}}},a}])}])}(window,window.angular)},{"./adapters/http":36,"./adapters/localStorage":37,"./datastore":49,"./errors":71,"./utils":73}],73:[function(a,b){b.exports=[function(){return{isBoolean:a("mout/lang/isBoolean"),isString:angular.isString,isArray:angular.isArray,isObject:angular.isObject,isNumber:angular.isNumber,isFunction:angular.isFunction,isEmpty:a("mout/lang/isEmpty"),toJson:angular.toJson,makePath:a("mout/string/makePath"),upperCase:a("mout/string/upperCase"),pascalCase:a("mout/string/pascalCase"),deepMixIn:a("mout/object/deepMixIn"),forOwn:a("mout/object/forOwn"),forEach:angular.forEach,pick:a("mout/object/pick"),set:a("mout/object/set"),contains:a("mout/array/contains"),filter:a("mout/array/filter"),toLookup:a("mout/array/toLookup"),slice:a("mout/array/slice"),sort:a("mout/array/sort"),updateTimestamp:function(a){var b="function"==typeof Date.now?Date.now():(new Date).getTime();return a&&a>=b?a+1:b},deepFreeze:function b(a){if("function"==typeof Object.freeze){var c,d;Object.freeze(a);for(d in a)c=a[d],a.hasOwnProperty(d)&&"object"==typeof c&&!Object.isFrozen(c)&&b(c)}},diffObjectFromOldObject:function(a,b){var c={},d={},e={};for(var f in b){var g=a[f];(void 0===g||g!==b[f])&&(f in a?g!==b[f]&&(e[f]=g):d[f]=void 0)}for(var h in a)h in b||(c[h]=a[h]);return{added:c,removed:d,changed:e}}}}]},{"mout/array/contains":2,"mout/array/filter":3,"mout/array/slice":7,"mout/array/sort":8,"mout/array/toLookup":9,"mout/lang/isBoolean":14,"mout/lang/isEmpty":15,"mout/object/deepMixIn":22,"mout/object/forOwn":24,"mout/object/pick":27,"mout/object/set":28,"mout/string/makePath":31,"mout/string/pascalCase":32,"mout/string/upperCase":35}]},{},[72]); |
{ | ||
"name": "angular-data", | ||
"description": "Data store for Angular.js.", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-rc.1", | ||
"homepage": "http://angular-data.pseudobry.com", | ||
@@ -23,3 +23,3 @@ "repository": { | ||
"grunt": "^0.4.5", | ||
"grunt-browserify": "^2.1.4", | ||
"grunt-browserify": "^3.0.0", | ||
"grunt-contrib-clean": "^0.6.0", | ||
@@ -33,3 +33,3 @@ "grunt-contrib-concat": "^0.5.0", | ||
"grunt-karma-coveralls": "^2.5.1", | ||
"karma": "^0.12.22", | ||
"karma": "^0.12.23", | ||
"karma-chai": "^0.1.0", | ||
@@ -52,5 +52,4 @@ "karma-chrome-launcher": "^0.1.4", | ||
"dependencies": { | ||
"observe-js": "^0.1.0", | ||
"mout": "^0.9.1" | ||
"mout": "^0.10.0" | ||
} | ||
} |
@@ -11,4 +11,4 @@ ## angular-data | ||
__Latest Release:__ [1.0.0-beta.3](http://angular-data.pseudobry.com/) | ||
__master:__ [1.0.0-beta.3](http://angular-data-next.pseudobry.com/) | ||
__Latest Release:__ [1.0.0-rc.1](http://angular-data.pseudobry.com/) | ||
__master:__ [1.0.0-rc.1](http://angular-data-next.pseudobry.com/) | ||
@@ -15,0 +15,0 @@ Angular-data is in a 1.0.0 Beta. The API is rather stable and angular-data is well tested. |
@@ -16,2 +16,3 @@ function errorPrefix(resourceName, id) { | ||
if (found) { | ||
this.unlinkInverse(definition.name, id); | ||
resource.collection.splice(i, 1); | ||
@@ -18,0 +19,0 @@ resource.observers[id].close(); |
@@ -25,2 +25,12 @@ module.exports = { | ||
* @doc method | ||
* @id DS.sync methods:changes | ||
* @name changes | ||
* @methodOf DS | ||
* @description | ||
* See [DS.changes](/documentation/api/api/DS.sync methods:changes). | ||
*/ | ||
changes: require('./changes'), | ||
/** | ||
* @doc method | ||
* @id DS.sync methods:compute | ||
@@ -56,2 +66,12 @@ * @name compute | ||
* @doc method | ||
* @id DS.sync methods:digest | ||
* @name digest | ||
* @methodOf DS | ||
* @description | ||
* See [DS.digest](/documentation/api/api/DS.sync methods:digest). | ||
*/ | ||
digest: require('./digest'), | ||
/** | ||
* @doc method | ||
* @id DS.sync methods:eject | ||
@@ -97,2 +117,12 @@ * @name eject | ||
* @doc method | ||
* @id DS.sync methods:hasChanges | ||
* @name hasChanges | ||
* @methodOf DS | ||
* @description | ||
* See [DS.hasChanges](/documentation/api/api/DS.sync methods:hasChanges). | ||
*/ | ||
hasChanges: require('./hasChanges'), | ||
/** | ||
* @doc method | ||
* @id DS.sync methods:inject | ||
@@ -158,22 +188,2 @@ * @name inject | ||
* @doc method | ||
* @id DS.sync methods:digest | ||
* @name digest | ||
* @methodOf DS | ||
* @description | ||
* See [DS.digest](/documentation/api/api/DS.sync methods:digest). | ||
*/ | ||
digest: require('./digest'), | ||
/** | ||
* @doc method | ||
* @id DS.sync methods:changes | ||
* @name changes | ||
* @methodOf DS | ||
* @description | ||
* See [DS.changes](/documentation/api/api/DS.sync methods:changes). | ||
*/ | ||
changes: require('./changes'), | ||
/** | ||
* @doc method | ||
* @id DS.sync methods:previous | ||
@@ -189,9 +199,9 @@ * @name previous | ||
* @doc method | ||
* @id DS.sync methods:hasChanges | ||
* @name hasChanges | ||
* @id DS.sync methods:unlinkInverse | ||
* @name unlinkInverse | ||
* @methodOf DS | ||
* @description | ||
* See [DS.hasChanges](/documentation/api/api/DS.sync methods:hasChanges). | ||
* See [DS.unlinkInverse](/documentation/api/api/DS.sync methods:unlinkInverse). | ||
*/ | ||
hasChanges: require('./hasChanges') | ||
unlinkInverse: require('./unlinkInverse') | ||
}; |
@@ -9,3 +9,3 @@ (function (window, angular, undefined) { | ||
* @description | ||
* __Version:__ 1.0.0-beta.3 | ||
* __Version:__ 1.0.0-rc.1 | ||
* | ||
@@ -12,0 +12,0 @@ * ## Install |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
504470
1
52
12056
+ Addedmout@0.10.0(transitive)
- Removedobserve-js@^0.1.0
- Removedmout@0.9.1(transitive)
- Removedobserve-js@0.1.0(transitive)
Updatedmout@^0.10.0