!functione(t,n,r){functioni(s,p){if(!n[s]){if(!t[s]){vara="function"==typeofrequire&&require;if(!p&&a)returna(s,!0);if(o)returno(s,!0);thrownewError("Cannot find module '"+s+"'")}varl=n[s]={exports:{}};t[s][0].call(l.exports,function(e){varn=t[s][1][e];returni(n?n:e)},l,l.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,a;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,a=n.length;a>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/TextTypes"),r=e("../HistoryBuffer"),n=e("../Engine"),i=function(){functione(e,t){vari,s,p,a,l,u,c,h;this.HB=newr(e),l=o(this.HB),this.types=l.types,this.engine=newn(this.HB,l.parser),this.connector=newt(this.engine,this.HB,l.execution_listener,this),s=this.HB.addOperation(newthis.types.Delimiter({creator:"_",op_number:"_beginning"},void0,void0)),p=this.HB.addOperation(newthis.types.Delimiter({creator:"_",op_number:"_end"},s,void0)),s.next_cl=p,s.execute(),p.execute(),a=newthis.types.WordType({creator:"_",op_number:"_"},s,p),this.HB.addOperation(a).execute(),h={creator:"_",op_number:"RM"},u={creator:"_",op_number:"_RM_beginning"},c={creator:"_",op_number:"_RM_end"},i=this.HB.addOperation(newthis.types.Delimiter(u,void0,c)).execute(),p=this.HB.addOperation(newthis.types.Delimiter(c,i,void0)).execute(),this.root_element=this.HB.addOperation(newthis.types.ReplaceManager(void0,h,i,p)).execute(),this.root_element.replace(a,{creator:"_",op_number:"Replaceable"})}returne.prototype.getSharedObject=function(){returnthis.root_element.val()},e.prototype.getConnector=function(){returnthis.connector},e.prototype.getHistoryBuffer=function(){returnthis.HB},e.prototype.getUserId=function(){returnthis.HB.getUserId()},e.prototype.val=function(){returnthis.getSharedObject().val()},e.prototype.insertText=function(e,t){returnthis.getSharedObject().insertText(e,t)},e.prototype.deleteText=function(e,t){returnthis.getSharedObject().deleteText(e,t)},e.prototype.bind=function(e){returnthis.getSharedObject().bind(e)},e.prototype.replaceText=function(e){returnthis.getSharedObject().replaceText(e)},e.prototype.on=function(){vare;return(e=this.root_element).on.apply(e,arguments)},e}(),t.exports=i,"undefined"!=typeofwindow&&null!==window&&(null==window.Y&&(window.Y={}),window.Y.TextFramework=i)},{"../Engine":1,"../HistoryBuffer":3,"../Types/TextTypes":6}],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.performGarbageCollection=!0,this.garbageCollectTimeout=1e3,this.reserved_identifier_counter=0