if(window.Transistor===undefined){window.Transistor={}}(function(f){var j=(function(){return function(k,l){var m,a,c,i;m=(function(){return{}}());a=new Backbone.Collection();c={add:a.add,remove:a.remove,reset:a.reset,set:a.set};(function(e){var h=true,g=function(d){e[d]=(function(b){return function(){if(h){throw"BackboneCollection is not mutable by user.";}else{return c[b].apply(a,arguments)}}}(d))};c.unfreeze=function(){h=false};c.freeze=function(){h=true};c.unfrozen=function(b){c.unfreeze();b();c.freeze()};g('add');g('remove');g('reset');g('set')}(a));i=f.Binder({set:function(e){c.unfrozen(function(){var d=_.map(e,function(b){return new Backbone.Model(b)});a.reset(d)})},insert:function(b){c.unfrozen(function(){a.add(new Backbone.Model(b))})},update:function(d,e){c.unfrozen(function(){var b=a.get(d);b.clear({silent:true});b.set(e)})},remove:function(d){c.unfrozen(function(){var b=a.get(d);a.remove(b)})}});k.tune(l,i);return a}}());if(f.Backbone===undefined){f.Backbone={}}f.Backbone.Collection=j}(window.Transistor));