!functione(t,n,r){functioni(s,p){if(!n[s]){if(!t[s]){varu="function"==typeofrequire&&require;if(!p&&u)returnu(s,!0);if(o)returno(s,!0);thrownewError("Cannot find module '"+s+"'")}vara=n[s]={exports:{}};t[s][0].call(a.exports,function(e){varn=t[s][1][e];returni(n?n:e)},a,a.exports,e,t,n,r)}returnn[s].exports}for(varo="function"==typeofrequire&&require,s=0;s<r.length;s++)i(r[s]);returni}({1:[function(e,t){varn;n=function(){functione(e,t){this.HB=e,this.parser=t,this.unprocessed_ops=[]}returne.prototype.parseOperation=function(e){vart;if(t=this.parser[e.type],null!=t)returnt(e);thrownewError("You forgot to specify a parser for type "+e.type+". The message is "+JSON.stringify(e)+".")},e.prototype.applyOpsBundle=function(e){vart,n,r,i,o,s,p,u;for(n=[],r=0,s=e.length;s>r;r++)t=e[r],n.push(this.parseOperation(t));for(i=0,p=n.length;p>i;i++)t=n[i],this.HB.addOperation(t);for(o=0,u=n.length;u>o;o++)t=n[o],t.execute()||this.unprocessed_ops.push(t);returnthis.tryUnprocessed()},e.prototype.applyOpsCheckDouble=function(e){vart,n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],null==this.HB.getOperation(t.uid)?i.push(this.applyOp(t)):i.push(void0);returni},e.prototype.applyOps=function(e){vart,n,r,i;for(i=[],n=0,r=e.length;r>n;n++)t=e[n],i.push(this.applyOp(t));returni},e.prototype.applyOp=function(e){vart;returnt=this.parseOperation(e),this.HB.addToCounter(t),t.execute()?this.HB.addOperation(t):this.unprocessed_ops.push(t),this.tryUnprocessed()},e.prototype.tryUnprocessed=function(){vare,t,n,r,i,o,s;for(s=[];;){for(e=this.unprocessed_ops.length,n=[],o=this.unprocessed_ops,r=0,i=o.length;i>r;r++)t=o[r],t.execute()?this.HB.addOperation(t):n.push(t);if(this.unprocessed_ops=n,this.unprocessed_ops.length===e)break;s.push(void0)}returns},e}(),t.exports=n},{}],2:[function(e,t){varn,r,i,o;o=e("../Types/JsonTypes"),r=e("../HistoryBuffer"),n=e("../Engine"),i=function(){functione(e,t){vari,s,p,u,a,l;this.HB=newr(e),u=o(this.HB),this.types=u.types,this.engine=newn(this.HB,u.parser),this.HB.engine=this.engine,this.connector=newt(this.engine,this.HB,u.execution_listener,this),p=newthis.types.JsonType(this.HB.getReservedUniqueIdentifier()),this.HB.addOperation(p).execute(),a=this.HB.getReservedUniqueIdentifier(),l=this.HB.getReservedUniqueIdentifier(),i=this.HB.addOperation(newthis.types.Delimiter(a,void0,l)).execute(),s=this.HB.addOperation(newthis.types.Delimiter(l,i,void0)).execute(),this.root_element=newthis.types.ReplaceManager(void0,this.HB.getReservedUniqueIdentifier(),i,s),this.HB.addOperation(this.root_element).execute(),this.root_element.replace(p,this.HB.getReservedUniqueIdentifier())}returne.prototype.getSharedObject=function(){returnthis.root_element.val()},e.prototype.getConnector=function(){returnthis.connector},e.prototype.getHistoryBuffer=function(){returnthis.HB},e.prototype.setMutableDefault=function(e){returnthis.getSharedObject().setMutableDefault(e)},e.prototype.getUserId=function(){returnthis.HB.getUserId()},e.prototype.toJson=function(){returnthis.getSharedObject().toJson()},e.prototype.val=function(e,t,n){returnthis.getSharedObject().val(e,t,n)},e.prototype.on=function(){vare;return(e=this.getSharedObject()).on.apply(e,arguments)},e.prototype.deleteListener=function(){vare;return(e=this.getSharedObject()).deleteListener.apply(e,arguments)},Object.defineProperty(e.prototype,"value",{get:function(){returnthis.getSharedObject().value},set:function(e){vart,n,r;if(e.constructor==={}.constructor){r=[];for(tine)n=e[t],r.push(this.val(t,n,"immutable"));returnr}thrownewError("You must only set Object values!")}}),e}(),t.exports=i,"undefined"!=typeofwindow&&null!==window&&(null==window.Y&&(window.Y={}),window.Y.JsonFramework=i)},{"../Engine":1,"../HistoryBuffer":3,"../Types/JsonTypes":5}],3:[function(e,t){varn,r=function(e,t){returnfunction(){returne.apply(t,arguments)}};n=function(){functione(e){this.user_id=e,this.emptyGarbage=r(this.emptyGarbage,this),this.operation_counter={},this.buffer={},this.change_listeners=[],this.garbage=[],this.trash=[],this.performGarbageCo