function Updraft_Queue(){var t=[],n=0,i=!1;this.get_length=function(){return t.length-n},this.is_empty=function(){return 0==t.length},this.enqueue=function(n){t.push(n)},this.is_locked=function(){return i},this.get_lock=function(){return!i&&(this.lock(),!0)},this.dequeue=function(){if(0!=t.length){var i=t[n];return 2*++n>=t.length&&(t=t.slice(n),n=0),i}},this.lock=function(){i=!0},this.unlock=function(){i=!1},this.peek=function(){return t.length>0?t[n]:void 0},this.replace_front=function(i){return!(t.length<1)&&(t[n]=i,!0)},this.contains_id=function(n){return t.some(function(t){return t.optimization_id===n})}}