!functiont(e,r,n){functiono(i,s){if(!r[i]){if(!e[i]){varc="function"==typeofrequire&&require;if(!s&&c)returnc(i,!0);if(a)returna(i,!0);varu=newError("Cannot find module '"+i+"'");throwu.code="MODULE_NOT_FOUND",u}varl=r[i]={exports:{}};e[i][0].call(l.exports,function(t){varr=e[i][1][t];returno(r?r:t)},l,l.exports,t,e,r,n)}returnr[i].exports}for(vara="function"==typeofrequire&&require,i=0;i<n.length;i++)o(n[i]);returno}({1:[function(t,e,r){"use strict";varn=$,o=n.extend,a={lastFileUsed:"",files:{}},i=function(t){if(!t)throw"Missing file name"};e.exports={getCachedFile:function(t){returni(t),a.files[t]},updateCachedFile:function(t,e){i(t),a.files[t]||(a.files[t]={}),o(a.files[t],e)},getLastFileUsed:function(){returna.lastFileUsed},setLastFileUsed:function(t){a.lastFileUsed=t}}},{}],2:[function(t,e,r){"use strict";varn=t("../editor"),o=t("../tracer_manager"),a=t("../dom/setup"),i=t("../dom/loading_slider"),s=i.showLoadingSlider,c=i.hideLoadingSlider,u=t("./cache"),l={isLoading:null,editor:null,tracerManager:null,categories:null,loadedScratch:null,wikiList:null},f=function(t){l.isLoading=!1,l.editor=newn(t),l.tracerManager=t,l.categories={},l.loadedScratch=null,l.wikiList=[]},p=function(){this.getIsLoading=function(){returnl.isLoading},this.setIsLoading=function(t){l.isLoading=t,t?s():c()},this.getEditor=function(){returnl.editor},this.getCategories=function(){returnl.categories},this.getCategory=function(t){returnl.categories[t]},this.setCategories=function(t){l.categories=t},this.updateCategory=function(t,e){$.extend(l.categories[t],e)},this.getTracerManager=function(){returnl.tracerManager},this.getLoadedScratch=function(){returnl.loadedScratch},this.setLoadedScratch=function(t){l.loadedScratch=t},this.getWikiList=function(){returnl.wikiList},this.setWikiList=function(t){l.wikiList=t},this.hasWiki=function(t){return~l.wikiList.indexOf(t)};vart=o.init();f(t),a.setup(t)};p.prototype=u,e.exports=p},{"../dom/loading_slider":7,"../dom/setup":9,"../editor":28,"../tracer_manager":64,"./cache":1}],3:[function(t,e,r){"use strict";e.exports={}},{}],4:[function(t,e,r){"use strict";varn=t("../app"),o=t("../server"),a=t("./show_algorithm"),i=$,s=i.each,c=function(t,e,r){return$('<button class="indent">').append(e[r]).attr("data-algorithm",r).attr("data-category",t).click(function(){o.loadAlgorithm(t,r).then(function(e){a(t,r,e)})})},u=function(t){vare=n.getCategory(t),r=e.name,o=e.list,a=$('<button class="category">').append('<i class="fa fa-fw fa-caret-right">').append(r).attr("data-category",t);a.click(function(){vart=$(this);t.toggleClass("open"),t.next().toggleClass("collapse"),t.find("i.fa").toggleClass("fa-caret-right fa-caret-down")});vari=$('<div class="algorithms collapse">');$("#list").append(a).append(i),s(o,function(e){varr=c(t,o,e);i.append(r)})};e.exports=function(){s(n.getCategories(),u)}},{"../app":3,"../server":56,"./show_algorithm":19}],5:[function(t,e,r){"use strict";varn=t("../server"),o=$,a=o.each,i=function(t,e,r,o){vara=$("<button>").append(r).attr("data-file",r).click(function(){n.loadFile(t,e,r,o),$(".files_bar > .wrapper > button").removeClass("active"),$(this).addClass("active")});return$(".files_bar > .wrapper").append(a),a};e.exports=function(t,e,r,n){$(".files_bar > .wrapper").empty(),a(r,function(r,o){vara=i(t,e,r,o);n&&n==r&&a.click()}),n||$(".files_bar > .wrapper > button").first().click(),$(".files_bar > .wrapper").scroll()}},{"../server":56}],6:[function(t,e,r){"use strict";varn=t("./show_algorithm"),o=t("./add_categories"),a=t("./show_description"),i=t("./add_files"),s=t("./show_first_algorithm"),c=t("./show_requested_algorithm"),u=t("./show_wiki");e.exports={showAlgorithm:n,addCategories:o,showDescription:a,addFiles:i,showFirstAlgorithm:s,showRequestedAlgorithm:c,showWiki:u}},{"./add_categories":4,"./add_files":5,"./show_algorithm":19,"./show_description":20,"./show_first_algorithm":21,"./show_requested_algorithm":22,"./show_wiki":23}],7:[function(t,e,r){"use strict";varn=function(){$("#loading-slider").removeClass("loaded")},o=function(){$("#loading-slider").addClass("loaded")};e.exports={showLoadingSlider:n,hideLoadingSlider:o}},{}],8:[function(t,e,r){"use strict";varn=function(){vart=$('<section class="module_wrapper">');return$(".module_container").append(t),t};e.exports={create:n}},{}],9:[function(t,e,r){"use strict";varn=t("./setup_dividers"),o=t("./setup_document"),a=t("./setup_files_bar"),i=t("./setup_interval"),s=t("./setup_module_container"),c=t("./setup_tab_container"),u=t("./setup_side_menu"),l=t("./setup_top_menu"),f=t("./setup_window"),p=function(){$(".btn input").click(function(t){t.stopPropagation()}),n(),o(),a(),i(),s(),c(),u(),l(),f()};e.exports={setup:p}},{"./setup_dividers":10,"./setup_document":11,"./setup_files_bar":12,"./setup_interval":13,"./setup_module_container":14,"./setup_side_menu":15,"./setup_tab_container":16,"./setup_top_menu":17,"./setup_window":18}],10:[function(t,e,r){"use strict";varn=function(){functiont(t,e){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(e,r){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=t("../../app"),a=function(t){vare=n(t,3),r=e[0],a=e[1],i=e[2],s=a.parent(),c=5,u=$('<div class="divider">'),l=!1;r?!function(){u.addClass("vertical");vart=-c/2;u.css({top:0,bottom:0,left:t,width:c});vare=void0;u.mousedown(function(t){varr=t.pageX;e=r,l=!0}),$(document).mousemove(function(t){varr=t.pageX;if(l){varn=i.position().left+r-e,c=n/s.width()*100;c=Math.min(90,Math.max(10,c)),a.css("right",100-c+"%"),i.css("left",c+"%"),e=r,o.getTracerManager().resize(),$(".files_bar > .wrapper").scroll()}}),$(document).mouseup(function(t){l=!1})}():!function(){u.addClass("horizontal");vart=-c/2;u.css({top:t,height:c,left:0,right:0});vare=void0;u.mousedown(function(t){varr=t.pageY;e=r,l=!0}),$(document).mousemove(function(t){varr=t.pageY;if(l){varn=i.position().top+r-e,c=n/s.height()*100;c=Math.min(90,Math.max(10,c)),a.css("bottom",100-c+"%"),i.css("top",c+"%"),e=r,o.getTracerManager().resize()}}),$(document).mouseup(function(t){l=!1})}(),i.append(u)};e.exports=function(){for(vart=[["v",$(".sidemenu"),$(".workspace")],["v",$(".viewer_container"),$(".editor_container")],["h",$(".data_container"),$(".code_container")]],e=0;e<t.length;e++)a(t[e])}},{"../../app":3}],11:[function(t,e,r){"use strict";varn=t("../../app");e.exports=function(){$(document).on("click","a",function(t){vare=$(this).attr("href");/^(https?:\/\/).+/.test(e)&&(t.preventDefault(),window.open(e,"_blank")||alert("Please allow popups for this site"))}),$(document).mouseup(function(t){n.getTracerManager().command("mouseup",t)})}},{"../../app":3}],12:[function(t,e,r){"use strict";varn=function(t,e){returnt>e+2};e.exports=function(){$(".files_bar > .btn-left").click(function(){vart=$(".files_bar > .wrapper"),e=t.width(),r=t.scrollLeft();$(t.children("button").get().reverse()).each(function(){varn=$(this).position().left,o=n+$(this).outerWidth();return0>n?(t.scrollLeft(r+o-e),!1):void0})}),$(".files_bar > .btn-right").click(function(){vart=$(".files_bar > .wrapper"),e=t.width(),r=t.scrollLeft();t.children("button").each(function(){varn=$(this).position().left,o=n+$(this).outerWidth();returno>e?(t.scrollLeft(r+n),!1):void0})}),$(".files_bar > .wrapper").scroll(function(){vart=$(".files_bar > .wrapper"),e=t.width(),r=t.children("button:first-child"),o=t.children("button:last-child"),a=r.position().left,i=o.position().left+o.outerWidth();if(n(0,a)&&n(e,i)){vars=t.scrollLeft();returnvoidt.scrollLeft(s+e-i)}varc=n(0,a),u=n(i,e);t.toggleClass("shadow-left",c),t.toggleClass("shadow-right",u),$(".files_bar > .btn-left").attr("disabled",!c),$(".files_bar > .btn-right").attr("disabled",!u)})}},{}],13:[function(t,e,r){"use strict";varn=function(){functiont(t,e){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(e,r){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=t("../../app"),a=t("../toast"),i=Number.parseFloat,s=.1,c=10,u=.5,l=.1,f=function(t){vare=void0,r=void0;returns>t?(e=s,r="Interval of "+t+" seconds is too low. Setting to min allowed interval of "+s+" second(s)."):t>c?(e=c,r="Interval of "+t+" seconds is too high. Setting to max allowed interval of "+c+" second(s)."):(e=t,r="Interval has been set to "+t+" second(s)."),[e,r]};e.exports=function(){vart=$("#interval");t.val(u),t.attr({max:c,min:s,step:l}),$("#interval").on("change",function(){vart=o.getTracerManager(),e=f(i($(this).val())),r=n(e,2),s=r[0],c=r[1];$(this).val(s),t.interval=1e3*s,a.showInfoToast(c)})}},{"../../app":3,"../toast":24}],14:[function(t,e,r){"use strict";varn=t("../../app");e.exports=function(){vart=$(".module_container");t.on("mousedown",".module_wrapper",function(t){n.getTracerManager().findOwner(this).mousedown(t)}),t.on("mousemove",".module_wrapper",function(t){n.getTracerManager().findOwner(this).mousemove(t)}),t.on("DOMMouseScroll mousewheel",".module_wrapper",function(t){n.getTracerManager().findOwner(this).mousewheel(t)})}},{"../../app":3}],15:[function(t,e,r){"use strict";varn=t("../../app"),o=t("../../server"),a=t("../show_algorithm"),i=void0;e.exports=function(){$("#navigation").click(function(){vart=$(".sidemenu"),e=$(".workspace");t.toggleClass("active"),$(".nav-dropdown").toggleClass("fa-caret-down fa-caret-up"),t.hasClass("active")?(t.css("right",100-i+"%"),e.css("left",i+"%")):(i=e.position().left/$("body").width()*100,t.css("right",0),e.css("left",0)),n.getTracerManager().resize()}),$("#documentation").click(function(){$("#btn_doc").click()}),$("#powered-by").click(function(){$("#powered-by-list button").toggleClass("collapse")}),$("#scratch-paper").click(function(){vart="scratch",e=n.getLoadedScratch();o.loadAlgorithm(t,e).then(function(r){a(t,e,r)})})}},{"../../app":3,"../../server":56,"../show_algorithm":19}],16:[function(t,e,r){"use strict";e.exports=function(){$(".tab_bar > button").click(function(){$(".tab_bar > button").removeClass("active"),$(".tab_container > .tab").removeClass("active"),$(this).addClass("active"),$($(this).attr("data-target")).addClass("active")})}},{}],17:[function(t,e,r){"use strict";varn=t("../../app"),o=t("../../server"),a=t("../toast"),i=t("../top_menu");e.exports=function(){$("#shared").mouseup(function(){$(this).select()}),$("#btn_share").click(function(){vart=$(this).find(".fa-share");t.addClass("fa-spin fa-spin-faster"),o.shareScratchPaper().then(function(e){t.removeClass("fa-spin fa-spin-faster"),$("#shared").removeClass("collapse"),$("#shared").val(e),a.showInfoToast("Shareable link is created.")})});vart=$("#btn_run"),e=$("#btn_trace"),r=$("#btn_pause"),s=$("#btn_prev"),c=$("#btn_next");i.disableFlowControl(),t.click(function(){e.click(),r.removeClass("active"),t.addClass("active"),i.enableFlowControl();varo=n.getEditor().execute();o&&(console.error(o),a.showErrorToast(o),i.resetTopMenuButtons())}),r.click(function(){t.toggleClass("active"),r.toggleClass("active"),n.getTracerManager().isPause()?n.getTracerManager().resumeStep():n.getTracerManager().pauseStep()}),s.click(function(){t.removeClass("active"),r.addClass("active"),n.getTracerManager().pauseStep(),n.getTracerManager().prevStep()}),c.click(function(){t.removeClass("active"),r.addClass("active"),n.getTracerManager().pauseStep(),n.getTracerManager().nextStep()})}},{"../../app":3,"../../server":56,"../toast":24,"../top_menu":25}],18:[function(t,e,r){"use strict";varn=t("../../app");e.exports=function(){$(window).resize(function(){n.getTracerManager().resize()})}},{"../../app":3}],19:[function(t,e,r){"use strict";varn=t("../app"),o=t("../utils"),a=o.isScratchPaper,i=t("./show_description"),s=t("./add_files");e.exports=function(t,e,r,o){varc=void0,u=void0,l=void0;if(a(t))c=$("#scratch-paper"),u="Scratch Paper",l=e?"Shared":"Temporary";else{c=$('[data-category="'+t+'"][data-algorithm="'+e+'"]');varf=n.getCategory(t);u=f.name,l=f.list[e]}$(".sidemenu button").removeClass("active"),c.addClass("active"),$("#category").html(u),$("#algorithm").html(l),$("#tab_desc > .wrapper").empty(),$(".files_bar > .wrapper").empty(),$("#explanation").html(""),n.setLastFileUsed(null),n.getEditor().clearContent();varp=r.files;deleter.files,i(r),s(t,e,p,o)}},{"../app":3,"../utils":70,"./add_files":5,"./show_description":20}],20:[function(t,e,r){"use strict";varn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol?"symbol":typeoft},o=Array.isArray,a=$,i=a.each;e.exports=function(t){vare=$("#tab_desc > .wrapper");e.empty(),i(t,function(t,r){t&&e.append($("<h3>").html(t)),"string"==typeofr?e.append($("<p>").html(r)):o(r)?!function(){vart=$('<ul class="applications">');e.append(t),r.forEach(function(e){t.append($("<li>").html(e))})}():"object"===("undefined"==typeofr?"undefined":n(r))&&!function(){vart=$('<ul class="complexities">');e.append(t),i(r,function(e){varn=$('<div class="complexity">'),o=$('<span class="complexity-type">').html(e+": "),a=$('<span class="complexity-value">').html(""+r[e]);n.append(o).append(a),t.append($("<li>").append(n))})}()})}},{}],21:[function(t,e,r){"use strict";e.exports=function(){$("#list .category").first().click(),$("#list .category + .algorithms > .indent").first().click()}},{}],22:[function(t,e,r){"use strict";varn=t("../server"),o=t("./show_algorithm");e.exports=function(t,e,r){$('.category[data-category="'+t+'"]').click(),n.loadAlgorithm(t,e).then(function(n){o(t,e,n,r)})}},{"../server":56,"./show_algorithm":19}],23:[function(t,e,r){"use strict";varn=t("../app"),o=t("../server"),a=newshowdown.Converter({tables:!0});e.exports=function(t){o.loadWiki(t).then(function(r){$("#tab_doc > .wrapper").html(a.makeHtml("#"+t+"\n"+r)),$("#tab_doc").scrollTop(0),$("#tab_doc > .wrapper a").click(function(t){varr=$(this).attr("href");n.hasWiki(r)&&(t.preventDefault(),e.exports(r))})})}},{"../app":3,"../server":56}],24:[function(t,e,r){"use strict";varn=function(t,e){varr=$('<div class="toast '+e+'">').append(t);$(".toast_container").append(r),setTimeout(function(){r.fadeOut(function(){r.remove()})},3e3)},o=function(t){n(t,"error")},a=function(t){n(t,"info")};e.exports={showErrorToast:o,showInfoToast:a}},{}],25:[function(t,e,r){"use strict";varn=t("../app"),o=[$("#btn_pause"),$("#btn_prev"),$("#btn_next")],a=function(t){o.forEach(function(e){returne.attr("disabled",t)})},i=function(){a(!1)},s=function(){a(!0)},c=function(){$(".top-menu-buttons button").removeClass("active"),s(),n.getEditor().unhighlightLine()},u=function(t){$("#interval").val(interval)},l=function(){$("#btn_pause").addClass("active")},f=function(){$("#btn_pause").removeClass("active")};e.exports={enableFlowControl:i,disableFlowControl:s,resetTopMenuButtons:c,setInterval:u,activateBtnPause:l,deactivateBtnPause:f}},{"../app":3}],26:[function(t,e,r){"use strict";e.exports=function(t){vare=ace.edit(t);returne.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0}),e.setTheme("ace/theme/tomorrow_night_eighties"),e.session.setMode("ace/mode/javascript"),e.$blockScrolling=1/0,e}},{}],27:[function(require,module,exports){"use strict";varexecute=functionexecute(tracerManager,code,dataLines){try{!function(){tracerManager.deallocateAll();varlines=code.split("\n"),newLines=[];lines.forEach(function(t,e){newLines.push(t.replace(/(.+\. *_wait *)(\( *\))/g,"$1("+(e-dataLines)+")"))}),eval(newLines.join("\n")),tracerManager.visualize()}()}catch(err){returnerr}finally{tracerManager.removeUnallocated()}},executeData=function(t,e){returnexecute(t,e)},executeDataAndCode=function(t,e,r){varn=e.split("\n").length;returnexecute(t,e+"\n"+r,n)};module.exports={executeData:executeData,executeDataAndCode:executeDataAndCode}},{}],28:[function(t,e,r){"use strict";functionn(t){vare=this;if(!t)throw"Cannot create Editor. Missing the tracerManager";ace.require("ace/ext/language_tools");varr=ace.require("ace/range").Range;this.dataEditor=a("data"),this.codeEditor=a("code"),this.setData=function(t){e.dataEditor.setValue(t,-1)},this.setCode=function(t){e.codeEditor.setValue(t,-1)},this.setContent=function(t){varr=t.data,n=t.code;e.setData(r),e.setCode(n)},this.clearData=function(){e.dataEditor.setValue("")},this.clearCode=function(){e.codeEditor.setValue("")},this.clearContent=function(){e.clearData(),e.clearCode()},this.execute=function(){varr=e.dataEditor.getValue(),n=e.codeEditor.getValue();returni.executeDataAndCode(t,r,n)},this.highlightLine=function(t){varn=e.codeEditor.getSession();e.marker&&n.removeMarker(e.marker),e.marker=n.addMarker(newr(t,0,t,1/0),"executing","line",!0)},this.unhighlightLine=function(){vart=e.codeEditor.getSession();e.marker&&t.removeMarker(e.marker)},this.dataEditor.on("change",function(){varr=e.dataEditor.getValue(),n=o.getLastFileUsed();n&&o.updateCachedFile(n,{data:r}),i.executeData(t,r),s.resetTopMenuButtons()}),this.codeEditor.on("change",function(){varr=e.codeEditor.getValue(),n=o.getLastFileUsed();n&&o.updateCachedFile(n,{code:r}),t.reset(),s.resetTopMenuButtons()})}varo=t("../app"),a=t("./create"),i=t("./executor"),s=t("../dom/top_menu");e.exports=n},{"../app":3,"../dom/top_menu":25,"./create":26,"./executor":27}],29:[function(t,e,r){"use strict";varn=t("rsvp"),o=t("./app"),a=t("./app/constructor"),i=t("./dom"),s=t("./server"),c=t("./module"),u=$,l=u.extend;$.ajaxSetup({cache:!1,dataType:"text"});varf=t("./utils"),p=f.isScratchPaper,h=t("./server/helpers"),d=h.getHashValue,v=h.getParameterByName,g=h.getPath;n.on("error",function(t){console.assert(!1,t)}),$(function(){vart=newa;l(!0,o,t),l(!0,window,c),s.loadCategories().then(function(t){o.setCategories(t),i.addCategories();vare=g(),r=e.category,n=e.algorithm,a=e.file;p(r)?n?s.loadScratchPaper(n).then(function(t){vare=t.category,r=t.algorithm,n=t.data;i.showAlgorithm(e,r,n)}):s.loadAlgorithm(r).then(function(t){i.showAlgorithm(r,null,t)}):r&&n?i.showRequestedAlgorithm(r,n,a):i.showFirstAlgorithm()}),s.loadWikiList().then(function(t){o.setWikiList(t.wikis),i.showWiki("Tracer")});vare=d("scratch-paper"),r=v("scratch-paper"),n=e||r;n&&(window.location.href=window.location.protocol+"//"+window.location.host+window.location.pathname+"#path=scratch/"+n)})},{"./app":3,"./app/constructor":2,"./dom":6,"./module":39,"./server":56,"./server/helpers":55,"./utils":70,rsvp:72}],30:[function(t,e,r){"use strict";varn=t("./array2d"),o=function(t,e,r){returnn.random(1,t,e,r)[0]},a=function(t,e,r){returnn.randomSorted(1,t,e,r)[0]};e.exports={random:o,randomSorted:a}},{"./array2d":31}],31:[function(t,e,r){"use strict";varn=t("./integer"),o=function(t,e,r,o){t||(t=10),e||(e=10),void0===r&&(r=1),void0===o&&(o=9);for(vara=[],i=0;t>i;i++){a.push([]);for(vars=0;e>s;s++)a[i].push(n.random(r,o))}returna},a=function(t,e,r,n){returno(t,e,r,n).map(function(t){returnt.sort(function(t,e){returnt-e})})};e.exports={random:o,randomSorted:a}},{"./integer":35}],32:[function(t,e,r){"use strict";varn=t("./integer"),o=function(t,e,r){t||(t=7),e||(e=1),r||(r=10);for(varo=newArray(t),a=0;t>a;a++)o[a]=newArray(2);for(vara=0;t>a;a++)for(vari=0;i<o[a].length;i++)o[a][i]=n.random(e,r);returno};e.exports={random:o}},{"./integer":35}],33:[function(t,e,r){"use strict";varn=function(t,e){t||(t=5),e||(e=.3);for(varr=newArray(t),n=0;t>n;n++){r[n]=newArray(t);for(varo=0;t>o;o++)n!=o&&(r[n][o]=0==(Math.random()*(1/e)|0)?1:0)}returnr};e.exports={random:n}},{}],34:[function(t,e,r){"use strict";varn=t("./integer"),o=t("./array1d"),a=t("./array2d"),i=t("./coordinate_system"),s=t("./directed_graph"),c=t("./undirected_graph"),u=t("./weighted_directed_graph"),l=t("./weighted_undirected_graph");e.exports={Integer:n,Array1D:o,Array2D:a,CoordinateSystem:i,DirectedGraph:s,UndirectedGraph:c,WeightedDirectedGraph:u,WeightedUndirectedGraph:l}},{"./array1d":30,"./array2d":31,"./coordinate_system":32,"./directed_graph":33,"./integer":35,"./undirected_graph":36,"./weighted_directed_graph":37,"./weighted_undirected_graph":38}],35:[function(t,e,r){"use strict";varn=function(t,e){return(Math.random()*(e-t+1)|0)+t};e.exports={random:n}},{}],36:[function(t,e,r){"use strict";varn=function(t,e){t||(t=5),e||(e=.3);for(varr=newArray(t),n=0;t>n;n++)r[n]=newArray(t);for(varn=0;t>n;n++)for(varo=0;t>o;o++)n>o&&(r[n][o]=r[o][n]=0==(Math.random()*(1/e)|0)?1:0);returnr};e.exports={random:n}},{}],37:[function(t,e,r){"use strict";varn=t("./integer"),o=function(t,e,r,o){t||(t=5),e||(e=.3),r||(r=1),o||(o=5);for(vara=newArray(t),i=0;t>i;i++){a[i]=newArray(t);for(vars=0;t>s;s++)i!=s&&0==(Math.random()*(1/e)|0)&&(a[i][s]=n.random(r,o))}returna};e.exports={random:o}},{"./integer":35}],38:[function(t,e,r){"use strict";varn=t("./integer"),o=function(t,e,r,o){t||(t=5),e||(e=.3),r||(r=1),o||(o=5);for(vara=newArray(t),i=0;t>i;i++)a[i]=newArray(t);for(vari=0;t>i;i++)for(vars=0;t>s;s++)i>s&&0==(Math.random()*(1/e)|0)&&(a[i][s]=a[s][i]=n.random(r,o));returna};e.exports={random:o}},{"./integer":35}],39:[function(t,e,r){"use strict";varn=t("./tracer"),o=t("./data"),a=$,i=a.extend;e.exports=i(!0,{},n,o)},{"./data":34,"./tracer":45}],40:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionl(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:l(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./array2d"),u=function(t){functione(t){returnn(this,e),o(this,Object.getPrototypeOf(e).call(this,t))}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"Array1DTracer"}}]),s(e,[{key:"_notify",value:function(t,r){returni(Object.getPrototypeOf(e.prototype),"_notify",this).call(this,0,t,r),this}},{key:"_denotify",value:function(t){returni(Object.getPrototypeOf(e.prototype),"_denotify",this).call(this,0,t),this}},{key:"_select",value:function(t,r){returnvoid0===r?i(Object.getPrototypeOf(e.prototype),"_select",this).call(this,0,t):i(Object.getPrototypeOf(e.prototype),"_selectRow",this).call(this,0,t,r),this}},{key:"_deselect",value:function(t,r){returnvoid0===r?i(Object.getPrototypeOf(e.prototype),"_deselect",this).call(this,0,t):i(Object.getPrototypeOf(e.prototype),"_deselectRow",this).call(this,0,t,r),this}},{key:"processStep",value:function(t,r){if(i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r),this.chartTracer){varn=$.extend(!0,{},t);n.capsule=this.chartTracer.capsule,n.s=n.sy,n.e=n.ey,void0===n.s&&(n.s=n.y),deleten.x,deleten.y,deleten.sx,deleten.sy,deleten.ex,deleten.ey,this.chartTracer.processStep(n,r)}}},{key:"setData",value:function(t){returni(Object.getPrototypeOf(e.prototype),"setData",this).call(this,[t])}}]),e}(c);e.exports=u},{"./array2d":41}],41:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionh(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:h(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./tracer"),u=t("../../tracer_manager/util/index"),l=u.refineByType,f=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.colorClass={selected:"selected",notified:"notified"},r.isNew&&p(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"Array2DTracer"}}]),s(e,[{key:"_notify",value:function(t,e,r){returnthis.manager.pushStep(this.capsule,{type:"notify",x:t,y:e,v:r}),this}},{key:"_denotify",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"denotify",x:t,y:e}),this}},{key:"_select",value:function(t,e,r,n){returnthis.pushSelectingStep("select",null,arguments),this}},{key:"_selectRow",value:function(t,e,r){returnthis.pushSelectingStep("select","row",arguments),this}},{key:"_selectCol",value:function(t,e,r){returnthis.pushSelectingStep("select","col",arguments),this}},{key:"_deselect",value:function(t,e,r,n){returnthis.pushSelectingStep("deselect",null,arguments),this}},{key:"_deselectRow",value:function(t,e,r){returnthis.pushSelectingStep("deselect","row",arguments),this}},{key:"_deselectCol",value:function(t,e,r){returnthis.pushSelectingStep("deselect","col",arguments),this}},{key:"_separate",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"separate",x:t,y:e}),this}},{key:"_separateRow",value:function(t){returnthis._separate(t,-1),this}},{key:"_separateCol",value:function(t){returnthis._separate(-1,t),this}},{key:"_deseparate",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"deseparate",x:t,y:e}),this}},{key:"_deseparateRow",value:function(t){returnthis._deseparate(t,-1),this}},{key:"_deseparateCol",value:function(t){returnthis._deseparate(-1,t),this}},{key:"pushSelectingStep",value:function(){vart=Array.prototype.slice.call(arguments),e=t.shift(),r=t.shift();t=Array.prototype.slice.call(t.shift());varn;switch(r){case"row":n={x:t[0],sy:t[1],ey:t[2]};break;case"col":n={y:t[0],sx:t[1],ex:t[2]};break;default:n=void0===t[2]&&void0===t[3]?{x:t[0],y:t[1]}:{sx:t[0],sy:t[1],ex:t[2],ey:t[3]}}varo={type:e};$.extend(o,n),this.manager.pushStep(this.capsule,o)}},{key:"processStep",value:function(t,r){switch(t.type){case"notify":if(void0!==t.v){varn=this.$table.find(".mtbl-row").eq(t.x),o=n.find(".mtbl-col").eq(t.y);o.text(l(t.v))}case"denotify":case"select":case"deselect":vara="select"==t.type||"deselect"==t.type?this.colorClass.selected:this.colorClass.notified,s="select"==t.type||"notify"==t.type,c=t.sx,u=t.sy,f=t.ex,p=t.ey;void0===c&&(c=t.x),void0===u&&(u=t.y),void0===f&&(f=t.x),void0===p&&(p=t.y),this.paintColor(c,u,f,p,a,s);break;case"separate":this.deseparate(t.x,t.y),this.separate(t.x,t.y);break;case"deseparate":this.deseparate(t.x,t.y);break;default:i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r)}}},{key:"setData",value:function(t){if(this.viewX=this.viewY=0,this.paddingH=6,this.paddingV=3,this.fontSize=16,i(Object.getPrototypeOf(e.prototype),"setData",this).apply(this,arguments))returnthis.$table.find(".mtbl-row").each(function(e){$(this).find(".mtbl-col").each(function(r){$(this).text(l(t[e][r]))})}),!0;this.$table.empty();for(varr=0;r<t.length;r++){varn=$('<div class="mtbl-row">');this.$table.append(n);for(varo=0;o<t[r].length;o++){vara=$('<div class="mtbl-col">').css(this.getCellCss()).text(l(t[r][o]));n.append(a)}}returnthis.resize(),!1}},{key:"resize",value:function(){i(Object.getPrototypeOf(e.prototype),"resize",this).call(this),this.refresh()}},{key:"clear",value:function(){i(Object.getPrototypeOf(e.prototype),"clear",this).call(this),this.clearColor(),this.deseparateAll()}},{key:"getCellCss",value:function(){return{padding:this.paddingV.toFixed(1)+"px "+this.paddingH.toFixed(1)+"px","font-size":this.fontSize.toFixed(1)+"px"}}},{key:"refresh",value:function(){i(Object.getPrototypeOf(e.prototype),"refresh",this).call(this);vart=this.$table.parent(),r=t.height()/2-this.$table.height()/2+this.viewY,n=t.width()/2-this.$table.width()/2+this.viewX;this.$table.css("margin-top",r),this.$table.css("margin-left",n)}},{key:"mousedown",value:function(t){i(Object.getPrototypeOf(e.prototype),"mousedown",this).call(this,t),this.dragX=t.pageX,this.dragY=t.pageY,this.dragging=!0}},{key:"mousemove",value:function(t){i(Object.getPrototypeOf(e.prototype),"mousemove",this).call(this,t),this.dragging&&(this.viewX+=t.pageX-this.dragX,this.viewY+=t.pageY-this.dragY,this.dragX=t.pageX,this.dragY=t.pageY,this.refresh())}},{key:"mouseup",value:function(t){i(Object.getPrototypeOf(e.prototype),"mouseup",this).call(this,t),this.dragging=!1}},{key:"mousewheel",value:function(t){i(Object.getPrototypeOf(e.prototype),"mousewheel",this).call(this,t),t.preventDefault(),t=t.originalEvent;varr=void0!==t.wheelDelta&&t.wheelDelta||void0!==t.detail&&-t.detail,n=1.01,o=r>0?1/n:n;this.fontSize<4&&1>o||this.fontSize>40&&o>1||(this.paddingV*=o,this.paddingH*=o,this.fontSize*=o,this.$table.find(".mtbl-col").css(this.getCellCss()),this.refresh())}},{key:"paintColor",value:function(t,e,r,n,o,a){for(vari=t;r>=i;i++)for(vars=this.$table.find(".mtbl-row").eq(i),c=e;n>=c;c++){varu=s.find(".mtbl-col").eq(c);a?u.addClass(o):u.removeClass(o)}}},{key:"clearColor",value:function(){this.$table.find(".mtbl-col").removeClass(Object.keys(this.colorClass).join(""))}},{key:"separate",value:function(t,e){this.$table.find(".mtbl-row").each(function(r){varn=$(this);r==t&&n.after($('<div class="mtbl-empty-row">').attr("data-row",r)),n.find(".mtbl-col").each(function(t){varr=$(this);t==e&&r.after($('<div class="mtbl-empty-col">').attr("data-col",t))})})}},{key:"deseparate",value:function(t,e){this.$table.find("[data-row="+t+"]").remove(),this.$table.find("[data-col="+e+"]").remove()}},{key:"deseparateAll",value:function(){this.$table.find(".mtbl-empty-row, .mtbl-empty-col").remove()}}]),e}(c),p=function(t){t.$table=t.capsule.$table=$('<div class="mtbl-table">'),t.$container.append(t.$table)};e.exports=f},{"../../tracer_manager/util/index":67,"./tracer":47}],42:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionf(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:f(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./tracer"),u=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.color={selected:"rgb(0, 0, 255)",notified:"rgb(255, 0, 0)","default":"rgb(136, 136, 136)"},r.isNew&&l(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"ChartTracer"}}]),s(e,[{key:"setData",value:function(t){if(i(Object.getPrototypeOf(e.prototype),"setData",this).apply(this,arguments))returnthis.chart.config.data.datasets[0].data=t,this.chart.update(),!0;for(varr=[],n=0;n<t.length;n++)r.push(this.color["default"]);this.chart.config.data={labels:t.map(String),datasets:[{backgroundColor:r,data:t}]},this.chart.update()}},{key:"_notify",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"notify",s:t,v:e}),this}},{key:"_denotify",value:function(t){returnthis.manager.pushStep(this.capsule,{type:"denotify",s:t}),this}},{key:"_select",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"select",s:t,e:e}),this}},{key:"_deselect",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"deselect",s:t,e:e}),this}},{key:"processStep",value:function(t,r){switch(t.type){case"notify":void0!==t.v&&(this.chart.config.data.datasets[0].data[t.s]=t.v,this.chart.config.data.labels[t.s]=t.v.toString());case"denotify":case"select":case"deselect":varn="notify"==t.type?this.color.notified:"select"==t.type?this.color.selected:this.color["default"];if(void0!==t.e)for(varo=t.s;o<=t.e;o++)this.chart.config.data.datasets[0].backgroundColor[o]=n;elsethis.chart.config.data.datasets[0].backgroundColor[t.s]=n;this.chart.update();break;default:i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r)}}},{key:"resize",value:function(){i(Object.getPrototypeOf(e.prototype),"resize",this).call(this),this.chart.resize()}},{key:"clear",value:function(){i(Object.getPrototypeOf(e.prototype),"clear",this).call(this);vart=this.chart.config.data;if(t.datasets.length){for(varr=t.datasets[0].backgroundColor,n=0;n<r.length;n++)r[n]=this.color["default"];this.chart.update()}}}]),e}(c),l=function(t){t.$wrapper=t.capsule.$wrapper=$('<canvas class="mchrt-chart">'),t.$container.append(t.$wrapper),t.chart=t.capsule.chart=newChart(t.$wrapper,{type:"bar",data:{labels:[],datasets:[]},options:{scales:{yAxes:[{ticks:{beginAtZero:!0}}]},animation:!1,legend:!1,responsive:!0,maintainAspectRatio:!1}})};e.exports=u},{"./tracer":47}],43:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionf(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:f(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./directed_graph"),u=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.isNew&&l(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"CoordinateSystemTracer"}}]),s(e,[{key:"setData",value:function(t){if(Tracer.prototype.setData.apply(this,arguments))return!0;this.graph.clear();for(vare=[],r=[],n=0;n<t.length;n++)e.push({id:this.n(n),x:t[n][0],y:t[n][1],label:""+n,size:1,color:this.color["default"]});returnthis.graph.read({nodes:e,edges:r}),this.s.camera.goTo({x:0,y:0,angle:0,ratio:1}),this.refresh(),!1}},{key:"processStep",value:function(t,r){switch(t.type){case"visit":case"leave":varn="visit"==t.type,o=this.graph.nodes(this.n(t.target)),a=n?this.color.visited:this.color.left;if(o.color=a,void0!==t.source){vars=this.e(t.source,t.target);if(this.graph.edges(s)){varc=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}elsethis.graph.addEdge({id:this.e(t.target,t.source),source:this.n(t.source),target:this.n(t.target),color:a,size:1})}if(this.logTracer){varu=t.source;void0===u&&(u=""),this.logTracer.print(n?u+" -> "+t.target:u+" <- "+t.target)}break;default:i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r)}}},{key:"e",value:function(t,e){if(t>e){varr=t;t=e,e=r}return"e"+t+"_"+e}},{key:"drawOnHover",value:function(t,e,r,n){varo=this;e.setLineDash([5,5]);vara=t.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=t,l=o.graph.nodes("n"+s[1]);o.drawEdge(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}elseif(s[1]==a){varc="#0ff",u=o.graph.nodes("n"+s[0]),l=t;o.drawEdge(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}})}},{key:"drawEdge",value:function(t,e,r,n,o,a){vari=a("prefix")||"",s=t[i+"size"]||1;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(e[i+"x"],e[i+"y"]),o.lineTo(r[i+"x"],r[i+"y"]),o.stroke()}}]),e}(c),l=function(t){t.s.settings({defaultEdgeType:"def",funcEdgesDef:function(e,r,n,o,a){vari=t.getColor(e,r,n,a);t.drawEdge(e,r,n,i,o,a)}})};e.exports=u},{"./directed_graph":44}],44:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionh(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:h(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./tracer"),u=t("../../tracer_manager/util/index"),l=u.refineByType,f=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.color={selected:"#0f0",visited:"#f00",left:"#000","default":"#888"},r.isNew&&p(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"DirectedGraphTracer"}}]),s(e,[{key:"_setTreeData",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"setTreeData",arguments:arguments}),this}},{key:"_visit",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"visit",target:t,source:e}),this}},{key:"_leave",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"leave",target:t,source:e}),this}},{key:"processStep",value:function(t,r){switch(t.type){case"setTreeData":this.setTreeData.apply(this,t.arguments);break;case"visit":case"leave":varn="visit"==t.type,o=this.graph.nodes(this.n(t.target)),a=n?this.color.visited:this.color.left;if(o.color=a,void0!==t.source){vars=this.e(t.source,t.target),c=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}if(this.logTracer){varu=t.source;void0===u&&(u=""),this.logTracer.print(n?u+" -> "+t.target:u+" <- "+t.target)}break;default:i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r)}}},{key:"setTreeData",value:function(t,e,r){varn=this;e=e||0;varo=-1,a=newArray(t.length),i=functionl(e,r){if(a[e])throw"the given graph is not a tree because it forms a circuit";a[e]=!0,r>o&&(o=r);for(varn=0;n<t[e].length;n++)t[e][n]&&l(n,r+1)};if(i(e,1),this.setData(t,r))return!0;vars=function(t,e,r){varo=n.graph.nodes(n.n(t));o.x=e,o.y=r},c=1/(o-1),u=functionf(e,r,n,o){s(e,n+o,r*c);for(vara=0,i=0;i<t[e].length;i++)t[e][i]&&a++;for(varu=(o-n)/a,l=0,i=0;i<t[e].length;i++)t[e][i]&&f(i,r+1,n+u*l,n+u*++l)};u(e,0,0,1),this.refresh()}},{key:"setData",value:function(t,r){if(i(Object.getPrototypeOf(e.prototype),"setData",this).apply(this,arguments))return!0;this.graph.clear();for(varn=[],o=[],a=2*Math.PI/t.length,s=0,c=0;c<t.length;c++)if(s+=a,n.push({id:this.n(c),label:""+c,x:.5+Math.sin(s)/2,y:.5+Math.cos(s)/2,size:1,color:this.color["default"],weight:0}),r)for(varu=0;c>=u;u++){varf=t[c][u]||t[u][c];f&&o.push({id:this.e(c,u),source:this.n(c),target:this.n(u),color:this.color["default"],size:1,weight:l(f)})}elsefor(varp=0;p<t[c].length;p++)t[c][p]&&o.push({id:this.e(c,p),source:this.n(c),target:this.n(p),color:this.color["default"],size:1,weight:l(t[c][p])});returnthis.graph.read({nodes:n,edges:o}),this.s.camera.goTo({x:0,y:0,angle:0,ratio:1}),this.refresh(),!1}},{key:"resize",value:function(){i(Object.getPrototypeOf(e.prototype),"resize",this).call(this),this.s.renderers[0].resize(),this.refresh()}},{key:"refresh",value:function(){i(Object.getPrototypeOf(e.prototype),"refresh",this).call(this),this.s.refresh()}},{key:"clear",value:function(){i(Object.getPrototypeOf(e.prototype),"clear",this).call(this),this.clearGraphColor(),this.refresh()}},{key:"clearGraphColor",value:function(){vart=this;this.graph.nodes().forEach(function(e){e.color=t.color["default"]}),this.graph.edges().forEach(function(e){e.color=t.color["default"]})}},{key:"n",value:function(t){return"n"+t}},{key:"e",value:function(t,e){return"e"+t+"_"+e}},{key:"getColor",value:function(t,e,r,n){varo=t.color,a=n("edgeColor"),i=n("defaultNodeColor"),s=n("defaultEdgeColor");if(!o)switch(a){case"source":o=e.color||i;break;case"target":o=r.color||i;break;default:o=s}returno}},{key:"drawLabel",value:function(t,e,r){varn,o=r("prefix")||"",a=t[o+"size"];a<r("labelThreshold")||t.label&&"string"==typeoft.label&&(n="fixed"===r("labelSize")?r("defaultLabelSize"):r("labelSizeRatio")*a,e.font=(r("fontStyle")?r("fontStyle")+"":"")+n+"px "+r("font"),e.fillStyle="node"===r("labelColor")?t.color||r("defaultNodeColor"):r("defaultLabelColor"),e.textAlign="center",e.fillText(t.label,Math.round(t[o+"x"]),Math.round(t[o+"y"]+n/3)))}},{key:"drawArrow",value:function(t,e,r,n,o,a){vari=a("prefix")||"",s=t[i+"size"]||1,c=r[i+"size"],u=e[i+"x"],l=e[i+"y"],f=r[i+"x"],p=r[i+"y"],h=Math.atan2(p-l,f-u),d=3;u+=Math.sin(h)*d,f+=Math.sin(h)*d,l+=-Math.cos(h)*d,p+=-Math.cos(h)*d;varv=Math.max(2.5*s,a("minArrowSize")),g=Math.sqrt(Math.pow(f-u,2)+Math.pow(p-l,2)),y=u+(f-u)*(g-v-c)/g,m=l+(p-l)*(g-v-c)/g,w=(f-u)*v/g,b=(p-l)*v/g;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(u,l),o.lineTo(y,m),o.stroke(),o.fillStyle=n,o.beginPath(),o.moveTo(y+w,m+b),o.lineTo(y+.6*b,m-.6*w),o.lineTo(y-.6*b,m+.6*w),o.lineTo(y+w,m+b),o.closePath(),o.fill()}},{key:"drawOnHover",value:function(t,e,r,n){varo=this;e.setLineDash([5,5]);vara=t.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=t,l=o.graph.nodes("n"+s[1]);o.drawArrow(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}elseif(s[1]==a){varc="#ff0",u=o.graph.nodes("n"+s[0]),l=t;o.drawArrow(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}})}}]),e}(c),p=function(t){t.s=t.capsule.s=newsigma({renderer:{container:t.$container[0],type:"canvas"},settings:{minArrowSize:8,defaultEdgeType:"arrow",maxEdgeSize:2.5,labelThreshold:4,font:"Roboto",defaultLabelColor:"#fff",zoomMin:.6,zoomMax:1.2,skipErrors:!0,minNodeSize:.5,maxNodeSize:12,labelSize:"proportional",labelSizeRatio:1.3,funcLabelsDef:function(e,r,n){t.drawLabel(e,r,n)},funcHoversDef:function(e,r,n,o){t.drawOnHover(e,r,n,o)},funcEdgesArrow:function(e,r,n,o,a){vari=t.getColor(e,r,n,a);t.drawArrow(e,r,n,i,o,a)}}}),sigma.plugins.dragNodes(t.s,t.s.renderers[0]),t.graph=t.capsule.graph=t.s.graph};sigma.canvas.labels.def=function(t,e,r){varn=r("funcLabelsDef");n&&n(t,e,r)},sigma.canvas.hovers.def=function(t,e,r){varn=r("funcHoversDef");n&&n(t,e,r)},sigma.canvas.edges.def=function(t,e,r,n,o){vara=o("funcEdgesDef");a&&a(t,e,r,n,o)},sigma.canvas.edges.arrow=function(t,e,r,n,o){vara=o("funcEdgesArrow");a&&a(t,e,r,n,o)},e.exports=f},{"../../tracer_manager/util/index":67,"./tracer":47}],45:[function(t,e,r){"use strict";varn=t("./tracer"),o=t("./log"),a=t("./array1d"),i=t("./array2d"),s=t("./chart"),c=t("./coordinate_system"),u=t("./directed_graph"),l=t("./undirected_graph"),f=t("./weighted_directed_graph"),p=t("./weighted_undirected_graph");e.exports={Tracer:n,LogTracer:o,Array1DTracer:a,Array2DTracer:i,ChartTracer:s,CoordinateSystemTracer:c,DirectedGraphTracer:u,UndirectedGraphTracer:l,WeightedDirectedGraphTracer:f,WeightedUndirectedGraphTracer:p}},{"./array1d":40,"./array2d":41,"./chart":42,"./coordinate_system":43,"./directed_graph":44,"./log":46,"./tracer":47,"./undirected_graph":48,"./weighted_directed_graph":49,"./weighted_undirected_graph":50}],46:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionf(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:f(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./tracer"),u=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.isNew&&l(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"LogTracer"}}]),s(e,[{key:"_print",value:function(t){returnthis.manager.pushStep(this.capsule,{type:"print",msg:t}),this}},{key:"processStep",value:function(t,e){switch(t.type){case"print":this.print(t.msg)}}},{key:"refresh",value:function(){this.scrollToEnd(Math.min(50,this.interval))}},{key:"clear",value:function(){i(Object.getPrototypeOf(e.prototype),"clear",this).call(this),this.$wrapper.empty()}},{key:"print",value:function(t){this.$wrapper.append($("<span>").append(t+"<br/>"))}},{key:"scrollToEnd",value:function(t){this.$container.animate({scrollTop:this.$container[0].scrollHeight},t)}}]),e}(c),l=function(t){t.$wrapper=t.capsule.$wrapper=$('<div class="wrapper">'),t.$container.append(t.$wrapper)};e.exports=u},{"./tracer":47}],47:[function(t,e,r){"use strict";functionn(t){if(Array.isArray(t)){for(vare=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];returnr}returnArray.from(t)}functiono(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}vara=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),i=t("../../app"),s=t("../../tracer_manager/util/index"),c=s.toJSON,u=s.fromJSON,l=function(){functiont(e){o(this,t),this.module=this.constructor,this.manager=i.getTracerManager(),this.capsule=this.manager.allocate(this),$.extend(this,this.capsule),this.setName(e)}returna(t,null,[{key:"getClassName",value:function(){return"Tracer"}}]),a(t,[{key:"_setData",value:function(){for(vart=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];returnthis.manager.pushStep(this.capsule,{type:"setData",args:c(e)}),this}},{key:"_clear",value:function(){returnthis.manager.pushStep(this.capsule,{type:"clear"}),this}},{key:"_wait",value:function(t){returnthis.manager.newStep(t),this}},{key:"processStep",value:function(t,e){varr=t.type,o=t.args;switch(r){case"setData":this.setData.apply(this,n(u(o)));break;case"clear":this.clear()}}},{key:"setName",value:function(t){vare=void0;this.isNew?(e=$('<span class="name">'),this.$container.append(e)):e=this.$container.find("span.name"),e.text(t||this.defaultName)}},{key:"setData",value:function(){vart=c(arguments);returnthis.isNew||this.lastData!==t?(this.lastData=this.capsule.lastData=t,!1):!0}},{key:"resize",value:function(){}},{key:"refresh",value:function(){}},{key:"clear",value:function(){}},{key:"attach",value:function(t){switch(t.module){caseLogTracer:this.logTracer=t;break;caseChartTracer:this.chartTracer=t}returnthis}},{key:"mousedown",value:function(t){}},{key:"mousemove",value:function(t){}},{key:"mouseup",value:function(t){}},{key:"mousewheel",value:function(t){}}]),t}();e.exports=l},{"../../app":3,"../../tracer_manager/util/index":67}],48:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionf(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:f(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./directed_graph"),u=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.isNew&&l(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"UndirectedGraphTracer"}}]),s(e,[{key:"setTreeData",value:function(t,r){returni(Object.getPrototypeOf(e.prototype),"setTreeData",this).call(this,t,r,!0)}},{key:"setData",value:function(t){returni(Object.getPrototypeOf(e.prototype),"setData",this).call(this,t,!0)}},{key:"e",value:function(t,e){if(t>e){varr=t;t=e,e=r}return"e"+t+"_"+e}},{key:"drawOnHover",value:function(t,e,r,n){varo=this;e.setLineDash([5,5]);vara=t.id.substring(1);this.graph.edges().forEach(function(i){vars=i.id.substring(1).split("_");if(s[0]==a){varc="#0ff",u=t,l=o.graph.nodes("n"+s[1]);o.drawEdge(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}elseif(s[1]==a){varc="#0ff",u=o.graph.nodes("n"+s[0]),l=t;o.drawEdge(i,u,l,c,e,r),n&&n(i,u,l,c,e,r)}})}},{key:"drawEdge",value:function(t,e,r,n,o,a){vari=a("prefix")||"",s=t[i+"size"]||1;o.strokeStyle=n,o.lineWidth=s,o.beginPath(),o.moveTo(e[i+"x"],e[i+"y"]),o.lineTo(r[i+"x"],r[i+"y"]),o.stroke()}}]),e}(c),l=function(t){t.s.settings({defaultEdgeType:"def",funcEdgesDef:function(e,r,n,o,a){vari=t.getColor(e,r,n,a);t.drawEdge(e,r,n,i,o,a)}})};e.exports=u},{"./directed_graph":44}],49:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionh(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:h(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./directed_graph"),u=t("../../tracer_manager/util/index"),l=u.refineByType,f=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.isNew&&p(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"WeightedDirectedGraphTracer"}}]),s(e,[{key:"_weight",value:function(t,e){returnthis.manager.pushStep(this.capsule,{type:"weight",target:t,weight:e}),this}},{key:"_visit",value:function(t,e,r){returnthis.manager.pushStep(this.capsule,{type:"visit",target:t,source:e,weight:r}),this}},{key:"_leave",value:function(t,e,r){returnthis.manager.pushStep(this.capsule,{type:"leave",target:t,source:e,weight:r}),this}},{key:"processStep",value:function(t,r){switch(t.type){case"weight":varn=this.graph.nodes(this.n(t.target));void0!==t.weight&&(n.weight=l(t.weight));break;case"visit":case"leave":varo="visit"==t.type,n=this.graph.nodes(this.n(t.target)),a=o?void0===t.weight?this.color.selected:this.color.visited:this.color.left;if(n.color=a,void0!==t.weight&&(n.weight=l(t.weight)),void0!==t.source){vars=this.e(t.source,t.target),c=this.graph.edges(s);c.color=a,this.graph.dropEdge(s).addEdge(c)}if(this.logTracer){varu=t.source;void0===u&&(u=""),this.logTracer.print(o?u+" -> "+t.target:u+" <- "+t.target)}break;default:i(Object.getPrototypeOf(e.prototype),"processStep",this).call(this,t,r)}}},{key:"clear",value:function(){i(Object.getPrototypeOf(e.prototype),"clear",this).call(this),this.clearWeights()}},{key:"clearWeights",value:function(){this.graph.nodes().forEach(function(t){t.weight=0})}},{key:"drawEdgeWeight",value:function(t,e,r,n,o,a){if(e!=r){vari=a("prefix")||"",s=t[i+"size"]||1;if(!(s<a("edgeLabelThreshold"))){if(0===a("edgeLabelSizePowRatio"))throw'"edgeLabelSizePowRatio" must not be 0.';varc,u=(e[i+"x"]+r[i+"x"])/2,l=(e[i+"y"]+r[i+"y"])/2,f=r[i+"x"]-e[i+"x"],p=r[i+"y"]-e[i+"y"],h=Math.atan2(p,f);c="fixed"===a("edgeLabelSize")?a("defaultEdgeLabelSize"):a("defaultEdgeLabelSize")*s*Math.pow(s,-1/a("edgeLabelSizePowRatio")),o.save(),t.active?(o.font=[a("activeFontStyle"),c+"px",a("activeFont")||a("font")].join(""),o.fillStyle=n):(o.font=[a("fontStyle"),c+"px",a("font")].join(""),o.fillStyle=n),o.textAlign="center",o.textBaseline="alphabetic",o.translate(u,l),o.rotate(h),o.fillText(t.weight,0,-s/2-3),o.restore()}}}},{key:"drawNodeWeight",value:function(t,e,r){varn,o=r("prefix")||"",a=t[o+"size"];a<r("labelThreshold")||(n="fixed"===r("labelSize")?r("defaultLabelSize"):r("labelSizeRatio")*a,e.font=(r("fontStyle")?r("fontStyle")+"":"")+n+"px "+r("font"),e.fillStyle="node"===r("labelColor")?t.color||r("defaultNodeColor"):r("defaultLabelColor"),e.textAlign="left",e.fillText(t.weight,Math.round(t[o+"x"]+1.5*a),Math.round(t[o+"y"]+n/3)))}}]),e}(c),p=function(t){t.s.settings({edgeLabelSize:"proportional",defaultEdgeLabelSize:20,edgeLabelSizePowRatio:.8,funcLabelsDef:function(e,r,n){t.drawNodeWeight(e,r,n),t.drawLabel(e,r,n)},funcHoversDef:function(e,r,n){t.drawOnHover(e,r,n,t.drawEdgeWeight)},funcEdgesArrow:function(e,r,n,o,a){vari=t.getColor(e,r,n,a);t.drawArrow(e,r,n,i,o,a),t.drawEdgeWeight(e,r,n,i,o,a)}})};e.exports=f},{"../../tracer_manager/util/index":67,"./directed_graph":44}],50:[function(t,e,r){"use strict";functionn(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiono(t,e){if(!t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeofe&&"function"!=typeofe?t:e}functiona(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function, not "+typeofe);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}vari=functionp(t,e,r){null===t&&(t=Function.prototype);varn=Object.getOwnPropertyDescriptor(t,e);if(void0===n){varo=Object.getPrototypeOf(t);returnnull===o?void0:p(o,e,r)}if("value"inn)returnn.value;vara=n.get;if(void0!==a)returna.call(r)},s=function(){functiont(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}returnfunction(e,r,n){returnr&&t(e.prototype,r),n&&t(e,n),e}}(),c=t("./weighted_directed_graph"),u=t("./undirected_graph"),l=function(t){functione(t){n(this,e);varr=o(this,Object.getPrototypeOf(e).call(this,t));returnr.e=u.prototype.e,r.drawOnHover=u.prototype.drawOnHover,r.drawEdge=u.prototype.drawEdge,r.isNew&&f(r),r}returna(e,t),s(e,null,[{key:"getClassName",value:function(){return"WeightedUndirectedGraphTracer"}}]),s(e,[{key:"setTreeData",value:function(t,r){returni(Object.getPrototypeOf(e.prototype),"setTreeData",this).call(this,t,r,!0)}},{key:"setData",value:function(t){returni(Object.getPrototypeOf(e.prototype),"setData",this).call(this,t,!0)}},{key:"drawEdgeWeight",value:function(t,e,r,n,o,a){vari=a("prefix")||"";if(e[i+"x"]>r[i+"x"]){vars=e;e=r,r=s}c.prototype.drawEdgeWeight.call(this,t,e,r,n,o,a)}}]),e}(c),f=function(t){t.s.settings({defaultEdgeType:"def",funcEdgesDef:function(e,r,n,o,a){vari=t.getColor(e,r,n,a);t.drawEdge(e,r,n,i,o,a),t.drawEdgeWeight(e,r,n,i,o,a)}})};e.exports=l},{"./undirected_graph":48,"./weighted_directed_graph":49}],51:[function(t,e,r){"use strict";varn=t("./request");e.exports=function(t){returnn(t,{type:"GET"})}},{"./request":54}],52:[function(t,e,r){"use strict";varn=t("./request");e.exports=function(t){returnn(t,{dataType:"json",type:"GET"})}},{"./request":54}],53:[function(t,e,r){"use strict";varn=t("./request");e.exports=function(t,e){returnn(t,{dataType:"json",type:"POST",data:JSON.stringify(e)})}},{"./request":54}],54:[function(t,e,r){"use strict";varn=t("rsvp"),o=t("../../app"),a=$,i=a.ajax,s=a.extend,c={};e.exports=function(t){vare=arguments.length<=1||void0===arguments[1]?{}:arguments[1];returno.setIsLoading(!0),newn.Promise(function(r,n){vara={success:function(t){o.setIsLoading(!1),r(t)},error:function(t){o.setIsLoading(!1),n(t)}},u=s({},c,e,a,{url:t});i(u)})}},{"../../app":3,rsvp:72}],55:[function(t,e,r){"use strict";varn=function(){functiont(t,e){varr=[],n=!0,o=!1,a=void0;try{for(vari,s=t[Symbol.iterator]();!(n=(i=s.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(c){o=!0,a=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(o)throwa}}returnr}returnfunction(e,r){if(Array.isArray(e))returne;if(Symbol.iteratorinObject(e))returnt(e,r);thrownewTypeError("Invalid attempt to destructure non-iterable instance")}}(),o=t("../app"),a=t("../dom/toast"),i=function(){returno.getIsLoading()?(a.showErrorToast("Wait until it completes loading of previous file."),!0):!1},s=function(t){vare=window.location.href,r=newRegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),o=r.exec(e);if(!o||3!==o.length)returnnull;vara=n(o,3),i=a[2];returni},c=function(t){if(!t)returnnull;for(vare=window.location.hash.substr(1),r=e?e.split("&"):[],n=0;n<r.length;n++){varo=r[n].split("=");if(o[0]===t)returno[1]}returnnull},u=function(t,e){if(t&&e){for(varr=window.location.hash.substr(1),n=r?r.split("&"):[],o=!1,a=0;a<n.length&&!o;a++){vari=n[a].split("=");i[0]===t&&(i[1]=e,n[a]=i.join("="),o=!0)}o||n.push([t,e].join("="));vars=n.join("&");window.location.hash="#"+s}},l=function(t){if(t){for(vare=window.location.hash.substr(1),r=e?e.split("&"):[],n=0;n<r.length;n++){varo=r[n].split("=");if(o[0]===t){r.splice(n,1);break}}vara=r.join("&");window.location.hash="#"+a}},f=function(t,e,r){varn=t?t+(e?"/"+e+(r?"/"+r:""):""):"";u("path",n)},p=function(){vart=c("path");if(t){vare=t.split("/"),r=n(e,3),o=r[0],a=r[1],i=r[2];return{category:o,algorithm:a,file:i}}return!1};e.exports={checkLoading:i,getParameterByName:s,getHashValue:c,setHashValue:u,removeHashValue:l,setPath:f,getPath:p}},{"../app":3,"../dom/toast":24}],56:[function(t,e,r){"use strict";varn=t("./load_algorithm"),o=t("./load_categories"),a=t("./load_file"),i=t("./load_scratch_paper"),s=t("./share_scratch_paper"),c=t("./load_wiki_list"),u=t("./load_wiki");e.exports={loadAlgorithm:n,loadCategories:o,loadFile:a,loadScratchPaper:i,shareScratchPaper:s,loadWikiList:c,loadWiki:u}},{"./load_algorithm":57,"./load_categories":58,"./load_file":59,"./load_scratch_paper":60,"./load_wiki":61,"./load_wiki_list":62,"./share_scratch_paper":63}],57:[function(t,e,r){"use strict";varn=t("./ajax/get_json"),o=t("../utils"),a=o.getAlgorithmDir;e.exports=function(t,e){varr=a(t,e);returnn(r+"desc.json")}},{"../utils":70,"./ajax/get_json":52}],58:[function(t,e,r){"use strict";varn=t("./ajax/get_json");e.exports=function(){returnn("./algorithm/category.json")}},{"./ajax/get_json":52}],59:[function(t,e,r){"use strict";varn=t("rsvp"),o=t("../app"),a=t("../utils"),i=a.getFileDir,s=a.isScratchPaper,c=t("./helpers"),u=c.checkLoading,l=c.setPath,f=t("./ajax/get"),p=function(t){returnn.hash({data:f(t+"data.js"),code:f(t+"code.js")})},h=function(t){returno.getEditor().clearContent(),p(t).then(function(e){o.updateCachedFile(t,e),o.getEditor().setContent(e)})},d=function(t){returnt&&void0!==t.data&&void0!==t.code};e.exports=function(t,e,r,a){returnnewn.Promise(function(n,c){if(u())c();else{s(t)?l(t,o.getLoadedScratch()):l(t,e,r),$("#explanation").html(a);varf=i(t,e,r);o.setLastFileUsed(f);varp=o.getCachedFile(f);d(p)?(o.getEditor().setContent(p),n()):h(f).then(n,c)}})}},{"../app":3,"../utils":70,"./ajax/get":51,"./helpers":55,rsvp:72}],60:[function(t,e,r){"use strict";varn=t("rsvp"),o=t("../app"),a=t("../utils"),i=a.getFileDir,s=t("./ajax/get_json"),c=t("./load_algorithm"),u=function(t,e){returnt[e+".js"].content};e.exports=function(t){returnnewn.Promise(function(e,r){o.setLoadedScratch(t),s("https://api.github.com/gists/"+t).then(function(r){varn=r.files,a="scratch",s=t;c(a,s).then(function(t){varr=u(n,"data"),c=u(n,"code"),l=i(a,s,"scratch_paper");o.updateCachedFile(l,{data:r,code:c,"CREDIT.md":"Shared by an anonymous user from http://parkjs814.github.io/AlgorithmVisualizer"}),e({category:a,algorithm:s,data:t})})})})}},{"../app":3,"../utils":70,"./ajax/get_json":52,"./load_algorithm":57,rsvp:72}],61:[function(t,e,r){"use strict";varn=t("./ajax/get");e.exports=function(t){returnn("./AlgorithmVisualizer.wiki/"+t+".md")}},{"./ajax/get":51}],62:[function(t,e,r){"use strict";varn=t("./ajax/get_json");e.exports=function(){returnn("./wiki.json")}},{"./ajax/get_json":52}],63:[function(t,e,r){"use strict";varn=t("rsvp"),o=t("../app"),a=t("./ajax/post_json"),i=t("./helpers"),s=i.setPath;e.exports=function(){returnnewn.Promise(function(t,e){varr=o.getEditor(),n=r.dataEditor,i=r.codeEditor,c={description:"temp","public":!0,files:{"data.js":{content:n.getValue()},"code.js":{content:i.getValue()}}};a("https://api.github.com/gists",c).then(function(e){varr=e.id;o.setLoadedScratch(r),s("scratch",r);varn=location,a=n.href;$("#algorithm").html("Shared"),t(a)})})}},{"../app":3,"./ajax/post_json":53,"./helpers":55,rsvp:72}],64:[function(t,e,r){"use strict";varn=t("./manager"),o=t("../module/tracer/tracer");e.exports={init:function(){vart=newn;returno.prototype.manager=t,t}}},{"../module/tracer/tracer":47,"./manager":65}],65:[function(t,e,r){"use strict";varn=t("../app"),o=t("../dom/module_container"),a=t("../dom/top_menu"),i=$,s=i.each,c=i.extend,u=i.grep,l=1e6,f=function(){this.timer=null,this.pause=!1,this.capsules=[],this.interval=500};f.prototype={add:function(t){vare=o.create(),r={module:t.module,tracer:t,allocated:!0,defaultName:null,$container:e,isNew:!0};returnthis.capsules.push(r),r},allocate:function(t){vare=null,r=0;s(this.capsules,function(n,o){returno.module!==t.module||(r++,o.allocated)?void0:(o.tracer=t,o.allocated=!0,o.isNew=!1,e=o,!1)}),null===e&&(r++,e=this.add(t));varn=t.module.getClassName();returne.defaultName=n+""+r,e.order=this.order++,e},deallocateAll:function(){this.order=0,this.reset(),s(this.capsules,function(t,e){e.allocated=!1})},removeUnallocated:function(){vart=!1;this.capsules=u(this.capsules,function(e){varr=!e.allocated;return(e.isNew||r)&&(t=!0),r&&e.$container.remove(),!r}),t&&this.place()},place:function(){vart=this.capsules;s(t,function(e,r){varn=100,o=100/t.length,a=o*r.order;r.$container.css({top:a+"%",width:n+"%",height:o+"%"}),r.tracer.resize()})},resize:function(){this.command("resize")},isPause:function(){returnthis.pause},setInterval:function(t){a.setInterval(t)},reset:function(){this.traces=[],this.traceIndex=-1,this.stepCnt=0,this.timer&&clearTimeout(this.timer),this.command("clear")},pushStep:function(t,e){if(this.stepCnt++>l)throw"Tracer's stack overflow";varr=this.traces.length;0==r&&(r+=this.newStep());varn=this.traces[r-1];n.push(c(e,{capsule:t}))},newStep:function(){vart=arguments.length<=0||void0===arguments[0]?-1:arguments[0],e=this.traces.length;returne>0&&~t&&this.traces[e-1].push(t),this.traces.push([])},pauseStep:function(){this.traceIndex<0||(this.pause=!0,this.timer&&clearTimeout(this.timer),a.activateBtnPause())},resumeStep:function(){this.pause=!1,this.step(this.traceIndex+1),a.deactivateBtnPause()},step:function(t){vare=arguments.length<=1||void0===arguments[1]?{}:arguments[1],r=this;if(!(isNaN(t)||t>=this.traces.length||0>t)){this.traceIndex=t;varo=this.traces[t];o.forEach(function(t){return"number"==typeoft?voidn.getEditor().highlightLine(t):voidt.capsule.tracer.processStep(t,e)}),e.virtual||this.command("refresh"),this.pause||(this.timer=setTimeout(function(){r.nextStep(e)||a.resetTopMenuButtons()},this.interval))}},prevStep:function(){vart=arguments.length<=0||void0===arguments[0]?{}:arguments[0];this.command("clear");vare=this.traceIndex-1;if(0>e)returnthis.traceIndex=-1,this.command("refresh"),!1;for(varr=0;e>r;r++)this.step(r,c(t,{virtual:!0}));returnthis.step(e),!0},nextStep:function(){vart=arguments.length<=0||void0===arguments[0]?{}:arguments[0],e=this.traceIndex+1;returne>=this.traces.length?(this.traceIndex=this.traces.length-1,!1):(this.step(e,t),!0)},visualize:function(){this.traceIndex=-1,this.resumeStep()},command:function(){for(vart=arguments.length,e=Array(t),r=0;t>r;r++)e[r]=arguments[r];varn=e.shift();s(this.capsules,function(t,r){r.allocated&&r.tracer.module.prototype[n].apply(r.tracer,e)})},findOwner:function(t){vare=null;returns(this.capsules,function(r,n){returnn.$container[0]===t?(e=n,!1):void0}),e.tracer}},e.exports=f},{"../app":3,"../dom/module_container":8,"../dom/top_menu":25}],66:[function(t,e,r){"use strict";varn=JSON.parse,o=function(t){returnn(t,function(t,e){return"Infinity"===e?1/0:e})};e.exports=o},{}],67:[function(t,e,r){"use strict";varn=t("./to_json"),o=t("./from_json"),a=t("./refine_by_type");e.exports={toJSON:n,fromJSON:o,refineByType:a}},{"./from_json":66,"./refine_by_type":68,"./to_json":69}],68:[function(t,e,r){"use strict";varn="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol?"symbol":typeoft},o=function(t){switch("undefined"==typeoft?"undefined":n(t)){case"number":returni(t);case"boolean":returns(t);default:returna(t)}},a=function(t){return""===t?"":t},i=function(t){returnt===1/0?"∞":t},s=function(t){returnt?"T":"F"};e.exports=o},{}],69:[function(t,e,r){"use strict";varn=JSON.stringify,o=function(t){returnn(t,function(t,e){returne===1/0?"Infinity":e})};e.exports=o},{}],70:[function(t,e,r){"use strict";varn=function(t,e){return"scratch"==t},o=function(t,e){returnn(t)?"./algorithm/scratch_paper/":"./algorithm/"+t+"/"+e+"/"},a=function(t,e,r){returnn(t)?"./algorithm/scratch_paper/":"./algorithm/"+t+"/"+e+"/"+r+"/"};e.exports={isScratchPaper:n,getAlgorithmDir:o,getFileDir:a}},{}],71:[function(t,e,r){functionn(){l&&s&&(l=!1,s.length?u=s.concat(u):f=-1,u.length&&o())}functiono(){if(!l){vart=setTimeout(n);l=!0;for(vare=u.length;e;){for(s=u,u=[];++f<e;)s&&s[f].run();f=-1,e=u.length}s=null,l=!1,clearTimeout(t)}}functiona(t,e){this.fun=t,this.array=e}functioni(){}vars,c=e.exports={},u=[],l=!1,f=-1;c.nextTick=function(t){vare=newArray(arguments.length-1);if(arguments.length>1)for(varr=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(newa(t,e)),1!==u.length||l||setTimeout(o,0)},a.prototype.run=function(){this.fun.apply(null,this.array)},c.title="browser",c.browser=!0,c.env={},c.argv=[],c.version="",c.versions={},c.on=i,c.addListener=i,c.once=i,c.off=i,c.removeListener=i,c.removeAllListeners=i,c.emit=i,c.binding=function(t){thrownewError("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(t){thrownewError("process.chdir is not supported")},c.umask=function(){return0}},{}],72:[function(t,e,r){(function(r,n){(function(){"use strict";functiono(t){return"function"==typeoft||"object"==typeoft&&null!==t}functiona(t){return"function"==typeoft}functioni(t){return"object"==typeoft&&null!==t}functions(){}functionc(t,e){for(varr=0,n=t.length;n>r;r++)if(t[r]===e)returnr;return-1}functionu(t){vare=t._promiseCallbacks;returne||(e=t._promiseCallbacks={}),e}functionl(t,e){return"onerror"===t?voidjt.on("error",e):2!==arguments.length?jt[t]:void(jt[t]=e)}functionf(){setTimeout(function(){for(vart,e=0;e<$t.length;e++){t=$t[e];varr=t.payload;r.guid=r.key+r.id,r.childGuid=r.key+r.childId,r.error&&(r.stack=r.error.stack),jt.trigger(t.name,t.payload)}$t.length=0},50)}functionp(t,e,r){1===$t.push({name:t,payload:{key:e._guidKey,id:e._id,eventName:t,detail:e._result,childId:r&&r._id,label:e._label,timeStamp:kt(),error:jt["instrument-with-stack"]?newError(e._label):null}})&&f()}functionh(t,e,r){varn=this,o=n._state;if(o===It&&!t||o===Rt&&!e)returnjt.instrument&&Tt("chained",n,n),n;n._onError=null;vara=newn.constructor(O,r),i=n._result;if(jt.instrument&&Tt("chained",n,a),o){vars=arguments[o-1];jt.async(function(){F(o,a,s,i)})}elseL(n,a,t,e);returna}functiond(t,e){varr=this;if(t&&"object"==typeoft&&t.constructor===r)returnt;varn=newr(O,e);returnE(n,t),n}functionv(t,e,r){returnt===It?{state:"fulfilled",value:r}:{state:"rejected",reason:r}}functiong(t,e,r,n){this._instanceConstructor=t,this.promise=newt(O,n),this._abortOnReject=r,this._validateInput(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._init(),0===this.length?A(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&A(this.promise,this._result))):D(this.promise,this._validationError())}functiony(t,e){returnnewPt(this,t,!0,e).promise}functionm(t,e){functionr(t){E(a,t)}functionn(t){D(a,t)}varo=this,a=newo(O,e);if(!xt(t))returnD(a,newTypeError("You must pass an array to race.")),a;for(vari=t.length,s=0;a._state===Ft&&i>s;s++)L(o.resolve(t[s]),void0,r,n);returna}functionw(t,e){varr=this,n=newr(O,e);returnD(n,t),n}functionb(){thrownewTypeError("You must pass a resolver function as the first argument to the promise constructor")}function_(){thrownewTypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}functionx(t,e){this._id=zt++,this._label=e,this._state=void0,this._result=void0,this._subscribers=[],jt.instrument&&Tt("created",this),O!==t&&("function"!=typeoft&&b(),thisinstanceofx?I(this,t):_())}functionk(){returnnewTypeError("A promises callback cannot return that same promise.")}functionO(){}functionS(t){try{returnt.then}catch(e){returnWt.error=e,Wt}}functionj(t,e,r,n){try{t.call(e,r,n)}catch(o){returno}}function$(t,e,r){jt.async(function(t){varn=!1,o=j(r,e,function(r){n||(n=!0,e!==r?E(t,r,void0):A(t,r))},function(e){n||(n=!0,D(t,e))},"Settle: "+(t._label||" unknown promise"));!n&&o&&(n=!0,D(t,o))},t)}functionT(t,e){e._state===It?A(t,e._result):e._state===Rt?(e._onError=null,D(t,e._result)):L(e,void0,function(r){e!==r?E(t,r,void0):A(t,r)},function(e){D(t,e)})}functionC(t,e,r){e.constructor===t.constructor&&r===Ct&&constructor.resolve===Et?T(t,e):r===Wt?D(t,Wt.error):void0===r?A(t,e):a(r)?$(t,e,r):A(t,e)}functionE(t,e){t===e?A(t,e):o(e)?C(t,e,S(e)):A(t,e)}functionP(t){t._onError&&t._onError(t._result),M(t)}functionA(t,e){t._state===Ft&&(t._result=e,t._state=It,0===t._subscribers.length?jt.instrument&&Tt("fulfilled",t):jt.async(M,t))}functionD(t,e){t._state===Ft&&(t._state=Rt,t._result=e,jt.async(P,t))}functionL(t,e,r,n){varo=t._subscribers,a=o.length;t._onError=null,o[a]=e,o[a+It]=r,o[a+Rt]=n,0===a&&t._state&&jt.async(M,t)}functionM(t){vare=t._subscribers,r=t._state;if(jt.instrument&&Tt(r===It?"fulfilled":"rejected",t),0!==e.length){for(varn,o,a=t._result,i=0;i<e.length;i+=3)n=e[i],o=e[i+r],n?F(r,n,o,a):o(a);t._subscribers.length=0}}functionz(){this.error=null}functionN(t,e){try{returnt(e)}catch(r){returnqt.error=r,qt}}functionF(t,e,r,n){varo,i,s,c,u=a(r);if(u){if(o=N(r,n),o===qt?(c=!0,i=o.error,o=null):s=!0,e===o)returnvoidD(e,k())}elseo=n,s=!0;e._state!==Ft||(u&&s?E(e,o):c?D(e,i):t===It?A(e,o):t===Rt&&D(e,o))}functionI(t,e){varr=!1;try{e(function(e){r||(r=!0,E(t,e))},function(e){r||(r=!0,D(t,e))})}catch(n){D(t,n)}}functionR(t,e,r){this._superConstructor(t,e,!1,r)}functionW(t,e){returnnewR(Nt,t,e).promise}functionq(t,e){returnNt.all(t,e)}functionU(t,e){te[Gt]=t,te[Gt+1]=e,Gt+=2,2===Gt&&Vt()}functionV(){vart=r.nextTick,e=r.versions.node.match(/^(?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+)$/);returnArray.isArray(e)&&"0"===e[1]&&"10"===e[2]&&(t=setImmediate),function(){t(X)}}functionH(){returnfunction(){Ut(X)}}functionB(){vart=0,e=newKt(X),r=document.createTextNode("");returne.observe(r,{characterData:!0}),function(){r.data=t=++t%2}}functionG(){vart=newMessageChannel;returnt.port1.onmessage=X,function(){t.port2.postMessage(0)}}functionY(){returnfunction(){setTimeout(X,1)}}functionX(){for(vart=0;Gt>t;t+=2){vare=te[t],r=te[t+1];e(r),te[t]=void0,te[t+1]=void0}Gt=0}functionJ(){try{vare=t,r=e("vertx");returnUt=r.runOnLoop||r.runOnContext,H()}catch(n){returnY()}}functionK(t){vare={};returne.promise=newNt(function(t,r){e.resolve=t,e.reject=r},t),e}functionZ(t,e,r){returnNt.all(t,r).then(function(t){if(!a(e))thrownewTypeError("You must pass a function as filter's second argument.");for(varn=t.length,o=newArray(n),i=0;n>i;i++)o[i]=e(t[i]);returnNt.all(o,r).then(function(e){for(varr=newArray(n),o=0,a=0;n>a;a++)e[a]&&(r[o]=t[a],o++);returnr.length=o,r})})}functionQ(t,e,r){this._superConstructor(t,e,!0,r)}functiontt(t,e,r){this._superConstructor(t,e,!1,r)}functionet(t,e){returnnewtt(Nt,t,e).promise}functionrt(t,e){returnnewne(Nt,t,e).promise}functionnt(t,e,r){returnNt.all(t,r).then(function(t){if(!a(e))thrownewTypeError("You must pass a function as map's second argument.");for(varn=t.length,o=newArray(n),i=0;n>i;i++)o[i]=e(t[i]);returnNt.all(o,r)})}functionot(){this.value=void0}functionat(t){try{returnt.then}catch(e){returnce.value=e,ce}}functionit(t,e,r){try{t.apply(e,r)}catch(n){returnce.value=n,ce}}functionst(t,e){for(varr,n,o={},a=t.length,i=newArray(a),s=0;a>s;s++)i[s]=t[s];for(n=0;n<e.length;n++)r=e[n],o[r]=i[n+1];returno}functionct(t){for(vare=t.length,r=newArray(e-1),n=1;e>n;n++)r[n-1]=t[n];returnr}functionut(t,e){return{then:function(r,n){returnt.call(e,r,n)}}}functionlt(t,e){varr=function(){for(varr,n=this,o=arguments.length,a=newArray(o+1),i=!1,s=0;o>s;++s){if(r=arguments[s],!i){if(i=ht(r),i===ue){varc=newNt(O);returnD(c,ue.value),c}i&&i!==!0&&(r=ut(i,r))}a[s]=r}varu=newNt(O);returna[o]=function(t,r){t?D(u,t):void0===e?E(u,r):e===!0?E(u,ct(arguments)):xt(e)?E(u,st(arguments,e)):E(u,r)},i?pt(u,a,t,n):ft(u,a,t,n)};returnr.__proto__=t,r}functionft(t,e,r,n){varo=it(r,n,e);returno===ce&&D(t,o.value),t}functionpt(t,e,r,n){returnNt.all(e).then(function(e){varo=it(r,n,e);returno===ce&&D(t,o.value),t})}functionht(t){returnt&&"object"==typeoft?t.constructor===Nt?!0:at(t):!1}functiondt(t,e){returnNt.race(t,e)}functionvt(t,e){returnNt.reject(t,e)}functiongt(t,e){returnNt.resolve(t,e)}functionyt(t){throwsetTimeout(function(){throwt}),t}functionmt(t,e){jt.async(t,e)}functionwt(){jt.on.apply(jt,arguments)}functionbt(){jt.off.apply(jt,arguments)}var_t;_t=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};varxt=_t,kt=Date.now||function(){return(newDate).getTime()},Ot=Object.create||function(t){if(arguments.length>1)thrownewError("Second argument not supported");if("object"!=typeoft)thrownewTypeError("Argument must be an object");returns.prototype=t,news},St={mixin:function(t){returnt.on=this.on,t.off=this.off,t.trigger=this.trigger,t._promiseCallbacks=void0,t},on:function(t,e){if("function"!=typeofe)thrownewTypeError("Callback must be a function");varr,n=u(this);r=n[t],r||(r=n[t]=[]),-1===c(r,e)&&r.push(e)},off:function(t,e){varr,n,o=u(this);returne?(r=o[t],n=c(r,e),void(-1!==n&&r.splice(n,1))):void(o[t]=[])},trigger:function(t,e,r){varn,o,a=u(this);if(n=a[t])for(vari=0;i<n.length;i++)(o=n[i])(e,r)}},jt={instrument:!1};St.mixin(jt);var$t=[],Tt=p,Ct=h,Et=d,Pt=g;g.prototype._validateInput=function(t){returnxt(t)},g.prototype._validationError=function(){returnnewError("Array Methods must be provided an Array")},g.prototype._init=function(){this._result=newArray(this.length)},g.prototype._enumerate=function(){for(vart=this.length,e=this.promise,r=this._input,n=0;e._state===Ft&&t>n;n++)this._eachEntry(r[n],n)},g.prototype._settleMaybeThenable=function(t,e){varr=this._instanceConstructor,n=r.resolve;if(n===Et){varo=S(t);if(o===Ct&&t._state!==Ft)t._onError=null,this._settledAt(t._state,e,t._result);elseif("function"!=typeofo)this._remaining--,this._result[e]=this._makeResult(It,e,t);elseif(r===Nt){vara=newr(O);C(a,t,o),this._willSettleAt(a,e)}elsethis._willSettleAt(newr(function(e){e(t)}),e)}elsethis._willSettleAt(n(t),e)},g.prototype._eachEntry=function(t,e){i(t)?this._settleMaybeThenable(t,e):(this._remaining--,this._result[e]=this._makeResult(It,e,t))},g.prototype._settledAt=function(t,e,r){varn=this.promise;n._state===Ft&&(this._remaining--,this._abortOnReject&&t===Rt?D(n,r):this._result[e]=this._makeResult(t,e,r)),0===this._remaining&&A(n,this._result)},g.prototype._makeResult=function(t,e,r){returnr},g.prototype._willSettleAt=function(t,e){varr=this;L(t,void0,function(t){r._settledAt(It,e,t)},function(t){r._settledAt(Rt,e,t)})};varAt=y,Dt=m,Lt=w,Mt="rsvp_"+kt()+"-",zt=0,Nt=x;x.cast=Et,x.all=At,x.race=Dt,x.resolve=Et,x.reject=Lt,x.prototype={constructor:x,_guidKey:Mt,_onError:function(t){vare=this;jt.after(function(){e._onError&&jt.trigger("error",t,e._label)})},then:Ct,"catch":function(t,e){returnthis.then(void0,t,e)},"finally":function(t,e){varr=this,n=r.constructor;returnr.then(function(e){returnn.resolve(t()).then(function(){returne})},function(e){returnn.resolve(t()).then(function(){returnn.reject(e)})},e)}};varFt=void0,It=1,Rt=2,Wt=newz,qt=newz;R.prototype=Ot(Pt.prototype),R.prototype._superConstructor=Pt,R.prototype._makeResult=v,R.prototype._validationError=function(){returnnewError("allSettled must be called with an array")};varUt,Vt,Ht=W,Bt=q,Gt=0,Yt=({}.toString,U),Xt="undefined"!=typeofwindow?window:void0,Jt=Xt||{},Kt=Jt.MutationObserver||Jt.WebKitMutationObserver,Zt="undefined"==typeofself&&"undefined"!=typeofr&&"[object process]"==={}.toString.call(r),Qt="undefined"!=typeofUint8ClampedArray&&"undefined"!=typeofimportScripts&&"undefined"!=typeofMessageChannel,te=newArray(1e3);Vt=Zt?V():Kt?B():Qt?G():void0===Xt&&"function"==typeoft?J():Y();varee=K,re=Z,ne=Q;Q.prototype=Ot(Pt.prototype),Q.prototype._superConstructor=Pt,Q.prototype._init=function(){this._result={}},Q.prototype._validateInput=function(t){returnt&&"object"==typeoft},Q.prototype._validationError=function(){returnnewError("Promise.hash must be called with an object")},Q.prototype._enumerate=function(){vart=this,e=t.promise,r=t._input,n=[];for(varoinr)e._state===Ft&&Object.prototype.hasOwnProperty.call(r,o)&&n.push({position:o,entry:r[o]});vara=n.length;t._remaining=a;for(vari,s=0;e._state===Ft&&a>s;s++)i=n[s],t._eachEntry(i.entry,i.position)},tt.prototype=Ot(ne.prototype),tt.prototype._superConstructor=Pt,tt.prototype._makeResult=v,tt.prototype._validationError=function(){returnnewError("hashSettled must be called with an object")};varoe,ae=et,ie=rt,se=nt,ce=newot,ue=newot,le=lt;if("object"==typeofself)oe=self;else{if("object"!=typeofn)thrownewError("no global: `self` or `global` found");oe=n}varfe=oe,pe=dt,he=vt,de=gt,ve=yt;jt.async=Yt,jt.after=function(t){setTimeout(t,0)};if("undefined"!=typeofwindow&&"object"==typeofwindow.__PROMISE_INSTRUMENTATION__){varge=window.__PROMISE_INSTRUMENTATION__;l("instrument",!0);for(varyeinge)ge.hasOwnProperty(ye)&&wt(ye,ge[ye])}varme={race:pe,Promise:Nt,allSettled:Ht,hash:ie,hashSettled:ae,denodeify:le,on:wt,off:bt,map:se,filter:re,resolve:de,reject:he,all:Bt,rethrow:ve,defer:ee,EventTarget:St,configure:l,async:mt};"function"==typeofdefine&&define.amd?define(function(){returnme}):"undefined"!=typeofe&&e.exports?e.exports=me:"undefined"!=typeoffe&&(fe.RSVP=me)}).call(this)}).call(this,t("_process"),"undefined"!=typeofglobal?global:"undefined"!=typeofself?self:"undefined"!=typeofwindow?window:{})},{_process:71}]},{},[29]);