🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

algorithm-visualizer

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algorithm-visualizer - npm Package Compare versions

Comparing version
2.3.1
to
2.3.2
+1
-1
dist/algorithm-visualizer.js

@@ -1,1 +0,1 @@

!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.AlgorithmVisualizer=r():t.AlgorithmVisualizer=r()}("undefined"!=typeof self?self:this,function(){return function(t){var r={};function __webpack_require__(e){if(r[e])return r[e].exports;var n=r[e]={i:e,l:!1,exports:{}};return t[e].call(n.exports,n,n.exports,__webpack_require__),n.l=!0,n.exports}return __webpack_require__.m=t,__webpack_require__.c=r,__webpack_require__.d=function(t,r,e){__webpack_require__.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,r){if(1&r&&(t=__webpack_require__(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(__webpack_require__.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var n in t)__webpack_require__.d(e,n,function(r){return t[r]}.bind(null,n));return e},__webpack_require__.n=function(t){var r=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e(1);r.Randomize=n.default;var o=e(2);r.Commander=o.default;var a=e(5);r.Layout=a.default;var i=e(6);r.VerticalLayout=i.default;var c=e(7);r.HorizontalLayout=c.default;var u=e(8);r.Tracer=u.default;var p=e(9);r.LogTracer=p.default;var s=e(10);r.Array2DTracer=s.default;var _=e(11);r.Array1DTracer=_.default;var f=e(12);r.ChartTracer=f.default;var d=e(13);r.GraphTracer=d.default},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(){function Randomizer(){}return Randomizer.prototype.create=function(){return null},Randomizer}(),a=function(t){function Integer(r,e){void 0===r&&(r=1),void 0===e&&(e=9);var n=t.call(this)||this;return n._min=r,n._max=e,n}return n(Integer,t),Integer.prototype.create=function(){return Math.random()*(this._max-this._min+1)+this._min|0},Integer}(o),i=(function(t){function Double(r,e){void 0===r&&(r=0),void 0===e&&(e=1);var n=t.call(this)||this;return n._min=r,n._max=e,n}n(Double,t),Double.prototype.create=function(){return Math.random()*(this._max-this._min)+this._min}}(o),function(t){function String(r,e){void 0===r&&(r=16),void 0===e&&(e="abcdefghijklmnopqrstuvwxyz");var n=t.call(this)||this;return n._length=r,n._letters=e,n}return n(String,t),String.prototype.create=function(){for(var t="",r=new a(0,this._letters.length-1),e=0;e<this._length;e++)t+=this._letters[r.create()];return t},String}(o)),c=function(t){function Array2D(r,e,n){void 0===r&&(r=10),void 0===e&&(e=10),void 0===n&&(n=new a);var o=t.call(this)||this;return o._N=r,o._M=e,o._randomizer=n,o._sorted=!1,o}return n(Array2D,t),Array2D.prototype.sorted=function(t){return void 0===t&&(t=!0),this._sorted=t,this},Array2D.prototype.create=function(){for(var t=[],r=0;r<this._N;r++){t.push([]);for(var e=0;e<this._M;e++)t[r].push(this._randomizer.create());this._sorted&&t[r].sort(function(t,r){return t-r})}return t},Array2D}(o),u=function(t){function Array1D(r,e){return t.call(this,1,r,e)||this}return n(Array1D,t),Array1D.prototype.create=function(){return t.prototype.create.call(this)[0]},Array1D}(c),p=function(t){function Graph(r,e,n){void 0===r&&(r=5),void 0===e&&(e=.3),void 0===n&&(n=new a);var o=t.call(this)||this;return o._N=r,o._ratio=e,o._randomizer=n,o._directed=!0,o._weighted=!1,o}return n(Graph,t),Graph.prototype.directed=function(t){return void 0===t&&(t=!0),this._directed=t,this},Graph.prototype.weighted=function(t){return void 0===t&&(t=!0),this._weighted=t,this},Graph.prototype.create=function(){for(var t=new Array(this._N),r=0;r<this._N;r++)t[r]=new Array(this._N);for(r=0;r<this._N;r++)for(var e=0;e<this._N;e++)r===e?t[r][e]=0:this._directed||r<e?t[r][e]=Math.random()<this._ratio?this._weighted?this._randomizer.create():1:0:t[r][e]=t[e][r];return t},Graph}(o);r.default={Integer:a,String:i,Array1D:u,Array2D:c,Graph:p}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e(0),o=function(){function Commander(t){var r=this.constructor.name;this.key=Commander.keyRandomizer.create(),this.command(r,t)}return Commander.command=function(t,r,e){var n=Array.from(e);if(this.commands.push({key:t,method:r,args:JSON.parse(JSON.stringify(n))}),this.commands.length>1e6)throw new Error("Too Many Commands");if(this.objectCount>100)throw new Error("Too Many Objects");return this},Commander.setRoot=function(t){return this.command(null,"setRoot",arguments)},Commander.delay=function(t){return this.command(null,"delay",arguments)},Commander.prototype.destroy=function(){return Commander.objectCount--,this.command("destroy",arguments)},Commander.prototype.command=function(t,r){return Commander.command(this.key,t,r),this},Commander.prototype.delay=function(t){return Commander.delay(t),this},Commander.prototype.toJSON=function(){return this.key},Commander.keyRandomizer=new n.Randomize.String(8,"abcdefghijklmnopqrstuvwxyz0123456789"),Commander.objectCount=0,Commander.commands=[],Commander}();if(!process.env.ALGORITHM_VISUALIZER){var a=e(3),i=e(4);process.on("beforeExit",function(){a.post("https://algorithm-visualizer.org/api/visualizations",{content:JSON.stringify(o.commands)}).then(function(t){return i(t.data,{wait:!1})}).catch(console.error).finally(function(){return process.exit()})})}r.default=o},function(t,r){t.exports=require("axios")},function(t,r){t.exports=require("opn")},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function Layout(r){return t.call(this,arguments)||this}return n(Layout,t),Layout.prototype.add=function(t,r){return this.command("add",arguments)},Layout.prototype.remove=function(t){return this.command("remove",arguments)},Layout.prototype.removeAll=function(){return this.command("removeAll",arguments)},Layout}(e(0).Commander);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function VerticalLayout(){return null!==t&&t.apply(this,arguments)||this}return n(VerticalLayout,t),VerticalLayout}(e(0).Layout);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function HorizontalLayout(){return null!==t&&t.apply(this,arguments)||this}return n(HorizontalLayout,t),HorizontalLayout}(e(0).Layout);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function Tracer(r){return t.call(this,arguments)||this}return n(Tracer,t),Tracer.prototype.set=function(){return this.command("set",arguments)},Tracer.prototype.reset=function(){return this.command("reset",arguments)},Tracer}(e(0).Commander);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function LogTracer(){return null!==t&&t.apply(this,arguments)||this}return n(LogTracer,t),LogTracer.prototype.set=function(t){return this.command("set",arguments)},LogTracer.prototype.print=function(t){return this.command("print",arguments)},LogTracer.prototype.println=function(t){return this.command("println",arguments)},LogTracer.prototype.printf=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];return this.command("printf",arguments)},LogTracer}(e(0).Tracer);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function Array2DTracer(){return null!==t&&t.apply(this,arguments)||this}return n(Array2DTracer,t),Array2DTracer.prototype.set=function(t){return this.command("set",arguments)},Array2DTracer.prototype.patch=function(t,r,e){return this.command("patch",arguments)},Array2DTracer.prototype.depatch=function(t,r){return this.command("depatch",arguments)},Array2DTracer.prototype.select=function(t,r,e,n){return this.command("select",arguments)},Array2DTracer.prototype.selectRow=function(t,r,e){return this.command("selectRow",arguments)},Array2DTracer.prototype.selectCol=function(t,r,e){return this.command("selectCol",arguments)},Array2DTracer.prototype.deselect=function(t,r,e,n){return this.command("deselect",arguments)},Array2DTracer.prototype.deselectRow=function(t,r,e){return this.command("deselectRow",arguments)},Array2DTracer.prototype.deselectCol=function(t,r,e){return this.command("deselectCol",arguments)},Array2DTracer}(e(0).Tracer);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function Array1DTracer(){return null!==t&&t.apply(this,arguments)||this}return n(Array1DTracer,t),Array1DTracer.prototype.set=function(t){return this.command("set",arguments)},Array1DTracer.prototype.patch=function(t,r){return this.command("patch",arguments)},Array1DTracer.prototype.depatch=function(t){return this.command("depatch",arguments)},Array1DTracer.prototype.select=function(t,r){return this.command("select",arguments)},Array1DTracer.prototype.deselect=function(t,r){return this.command("deselect",arguments)},Array1DTracer.prototype.chart=function(t){return this.command("chart",arguments)},Array1DTracer}(e(0).Array2DTracer);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function ChartTracer(){return null!==t&&t.apply(this,arguments)||this}return n(ChartTracer,t),ChartTracer}(e(0).Array1DTracer);r.default=o},function(t,r,e){"use strict";var n=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var o=function(t){function GraphTracer(){return null!==t&&t.apply(this,arguments)||this}return n(GraphTracer,t),GraphTracer.prototype.set=function(t){return this.command("set",arguments)},GraphTracer.prototype.directed=function(t){return this.command("directed",arguments)},GraphTracer.prototype.weighted=function(t){return this.command("weighted",arguments)},GraphTracer.prototype.addNode=function(t,r,e,n,o,a){return this.command("addNode",arguments)},GraphTracer.prototype.updateNode=function(t,r,e,n,o,a){return this.command("updateNode",arguments)},GraphTracer.prototype.removeNode=function(t){return this.command("removeNode",arguments)},GraphTracer.prototype.addEdge=function(t,r,e,n,o){return this.command("addEdge",arguments)},GraphTracer.prototype.updateEdge=function(t,r,e,n,o){return this.command("updateEdge",arguments)},GraphTracer.prototype.removeEdge=function(t,r){return this.command("removeEdge",arguments)},GraphTracer.prototype.layoutCircle=function(){return this.command("layoutCircle",arguments)},GraphTracer.prototype.layoutTree=function(t,r){return this.command("layoutTree",arguments)},GraphTracer.prototype.layoutRandom=function(){return this.command("layoutRandom",arguments)},GraphTracer.prototype.visit=function(t,r,e){return this.command("visit",arguments)},GraphTracer.prototype.leave=function(t,r,e){return this.command("leave",arguments)},GraphTracer.prototype.select=function(t,r){return this.command("select",arguments)},GraphTracer.prototype.deselect=function(t,r){return this.command("deselect",arguments)},GraphTracer.prototype.log=function(t){return this.command("log",arguments)},GraphTracer}(e(0).Tracer);r.default=o}])});
!function webpackUniversalModuleDefinition(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports.AlgorithmVisualizer=r():t.AlgorithmVisualizer=r()}("undefined"!=typeof self?self:this,function(){return function(t){var r={};function __webpack_require__(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=t,__webpack_require__.c=r,__webpack_require__.d=function(t,r,e){__webpack_require__.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},__webpack_require__.t=function(t,r){if(1&r&&(t=__webpack_require__(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(__webpack_require__.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)__webpack_require__.d(e,o,function(r){return t[r]}.bind(null,o));return e},__webpack_require__.n=function(t){var r=t&&t.__esModule?function getDefault(){return t.default}:function getModuleExports(){return t};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=0)}([function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e(1);r.Randomize=o.default;var n=e(2);r.Commander=n.default;var a=e(5);r.Layout=a.default;var i=e(6);r.VerticalLayout=i.default;var c=e(7);r.HorizontalLayout=c.default;var u=e(8);r.Tracer=u.default;var p=e(9);r.LogTracer=p.default;var s=e(10);r.Array2DTracer=s.default;var _=e(11);r.Array1DTracer=_.default;var f=e(12);r.ChartTracer=f.default;var d=e(13);r.GraphTracer=d.default},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function Randomizer(){}return Randomizer.prototype.create=function(){return null},Randomizer}(),a=function(t){function Integer(r,e){void 0===r&&(r=1),void 0===e&&(e=9);var o=t.call(this)||this;return o._min=r,o._max=e,o}return o(Integer,t),Integer.prototype.create=function(){return Math.random()*(this._max-this._min+1)+this._min|0},Integer}(n),i=(function(t){function Double(r,e){void 0===r&&(r=0),void 0===e&&(e=1);var o=t.call(this)||this;return o._min=r,o._max=e,o}o(Double,t),Double.prototype.create=function(){return Math.random()*(this._max-this._min)+this._min}}(n),function(t){function String(r,e){void 0===r&&(r=16),void 0===e&&(e="abcdefghijklmnopqrstuvwxyz");var o=t.call(this)||this;return o._length=r,o._letters=e,o}return o(String,t),String.prototype.create=function(){for(var t="",r=new a(0,this._letters.length-1),e=0;e<this._length;e++)t+=this._letters[r.create()];return t},String}(n)),c=function(t){function Array2D(r,e,o){void 0===r&&(r=10),void 0===e&&(e=10),void 0===o&&(o=new a);var n=t.call(this)||this;return n._N=r,n._M=e,n._randomizer=o,n._sorted=!1,n}return o(Array2D,t),Array2D.prototype.sorted=function(t){return void 0===t&&(t=!0),this._sorted=t,this},Array2D.prototype.create=function(){for(var t=[],r=0;r<this._N;r++){t.push([]);for(var e=0;e<this._M;e++)t[r].push(this._randomizer.create());this._sorted&&t[r].sort(function(t,r){return t-r})}return t},Array2D}(n),u=function(t){function Array1D(r,e){return t.call(this,1,r,e)||this}return o(Array1D,t),Array1D.prototype.create=function(){return t.prototype.create.call(this)[0]},Array1D}(c),p=function(t){function Graph(r,e,o){void 0===r&&(r=5),void 0===e&&(e=.3),void 0===o&&(o=new a);var n=t.call(this)||this;return n._N=r,n._ratio=e,n._randomizer=o,n._directed=!0,n._weighted=!1,n}return o(Graph,t),Graph.prototype.directed=function(t){return void 0===t&&(t=!0),this._directed=t,this},Graph.prototype.weighted=function(t){return void 0===t&&(t=!0),this._weighted=t,this},Graph.prototype.create=function(){for(var t=new Array(this._N),r=0;r<this._N;r++)t[r]=new Array(this._N);for(r=0;r<this._N;r++)for(var e=0;e<this._N;e++)r===e?t[r][e]=0:this._directed||r<e?t[r][e]=Math.random()<this._ratio?this._weighted?this._randomizer.create():1:0:t[r][e]=t[e][r];return t},Graph}(n);r.default={Integer:a,String:i,Array1D:u,Array2D:c,Graph:p}},function(t,r,e){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var o=e(0),n=function(){function Commander(t){Commander.objectCount++;var r=this.constructor.name;this.key=Commander.keyRandomizer.create(),this.command(r,t)}return Commander.command=function(t,r,e){var o=Array.from(e);if(this.commands.push({key:t,method:r,args:JSON.parse(JSON.stringify(o))}),this.commands.length>1e6)throw new Error("Too Many Commands");if(this.objectCount>100)throw new Error("Too Many Objects")},Commander.prototype.destroy=function(){Commander.objectCount--,this.command("destroy",arguments)},Commander.prototype.command=function(t,r){Commander.command(this.key,t,r)},Commander.prototype.toJSON=function(){return this.key},Commander.keyRandomizer=new o.Randomize.String(8,"abcdefghijklmnopqrstuvwxyz0123456789"),Commander.objectCount=0,Commander.commands=[],Commander}();if(!process.env.ALGORITHM_VISUALIZER){var a=e(3),i=e(4);process.on("beforeExit",function(){a.post("https://algorithm-visualizer.org/api/visualizations",{content:JSON.stringify(n.commands)}).then(function(t){return i(t.data,{wait:!1})}).catch(console.error).finally(function(){return process.exit()})})}r.default=n},function(t,r){t.exports=require("axios")},function(t,r){t.exports=require("opn")},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function Layout(r){return t.call(this,arguments)||this}return o(Layout,t),Layout.setRoot=function(t){this.command(null,"setRoot",arguments)},Layout.prototype.add=function(t,r){this.command("add",arguments)},Layout.prototype.remove=function(t){this.command("remove",arguments)},Layout.prototype.removeAll=function(){this.command("removeAll",arguments)},Layout}(e(0).Commander);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function VerticalLayout(){return null!==t&&t.apply(this,arguments)||this}return o(VerticalLayout,t),VerticalLayout}(e(0).Layout);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function HorizontalLayout(){return null!==t&&t.apply(this,arguments)||this}return o(HorizontalLayout,t),HorizontalLayout}(e(0).Layout);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function Tracer(r){return t.call(this,arguments)||this}return o(Tracer,t),Tracer.delay=function(t){this.command(null,"delay",arguments)},Tracer.prototype.set=function(){this.command("set",arguments)},Tracer.prototype.reset=function(){this.command("reset",arguments)},Tracer}(e(0).Commander);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function LogTracer(){return null!==t&&t.apply(this,arguments)||this}return o(LogTracer,t),LogTracer.prototype.set=function(t){this.command("set",arguments)},LogTracer.prototype.print=function(t){this.command("print",arguments)},LogTracer.prototype.println=function(t){this.command("println",arguments)},LogTracer.prototype.printf=function(t){for(var r=[],e=1;e<arguments.length;e++)r[e-1]=arguments[e];this.command("printf",arguments)},LogTracer}(e(0).Tracer);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function Array2DTracer(){return null!==t&&t.apply(this,arguments)||this}return o(Array2DTracer,t),Array2DTracer.prototype.set=function(t){this.command("set",arguments)},Array2DTracer.prototype.patch=function(t,r,e){this.command("patch",arguments)},Array2DTracer.prototype.depatch=function(t,r){this.command("depatch",arguments)},Array2DTracer.prototype.select=function(t,r,e,o){this.command("select",arguments)},Array2DTracer.prototype.selectRow=function(t,r,e){this.command("selectRow",arguments)},Array2DTracer.prototype.selectCol=function(t,r,e){this.command("selectCol",arguments)},Array2DTracer.prototype.deselect=function(t,r,e,o){this.command("deselect",arguments)},Array2DTracer.prototype.deselectRow=function(t,r,e){this.command("deselectRow",arguments)},Array2DTracer.prototype.deselectCol=function(t,r,e){this.command("deselectCol",arguments)},Array2DTracer}(e(0).Tracer);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function Array1DTracer(){return null!==t&&t.apply(this,arguments)||this}return o(Array1DTracer,t),Array1DTracer.prototype.set=function(t){this.command("set",arguments)},Array1DTracer.prototype.patch=function(t,r){this.command("patch",arguments)},Array1DTracer.prototype.depatch=function(t){this.command("depatch",arguments)},Array1DTracer.prototype.select=function(t,r){this.command("select",arguments)},Array1DTracer.prototype.deselect=function(t,r){this.command("deselect",arguments)},Array1DTracer.prototype.chart=function(t){this.command("chart",arguments)},Array1DTracer}(e(0).Array2DTracer);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function ChartTracer(){return null!==t&&t.apply(this,arguments)||this}return o(ChartTracer,t),ChartTracer}(e(0).Array1DTracer);r.default=n},function(t,r,e){"use strict";var o=this&&this.__extends||function(){var t=function(r,e){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(r,e)};return function(r,e){function __(){this.constructor=r}t(r,e),r.prototype=null===e?Object.create(e):(__.prototype=e.prototype,new __)}}();Object.defineProperty(r,"__esModule",{value:!0});var n=function(t){function GraphTracer(){return null!==t&&t.apply(this,arguments)||this}return o(GraphTracer,t),GraphTracer.prototype.set=function(t){this.command("set",arguments)},GraphTracer.prototype.directed=function(t){return this.command("directed",arguments),this},GraphTracer.prototype.weighted=function(t){return this.command("weighted",arguments),this},GraphTracer.prototype.layoutCircle=function(){return this.command("layoutCircle",arguments),this},GraphTracer.prototype.layoutTree=function(t,r){return this.command("layoutTree",arguments),this},GraphTracer.prototype.layoutRandom=function(){return this.command("layoutRandom",arguments),this},GraphTracer.prototype.addNode=function(t,r,e,o,n,a){this.command("addNode",arguments)},GraphTracer.prototype.updateNode=function(t,r,e,o,n,a){this.command("updateNode",arguments)},GraphTracer.prototype.removeNode=function(t){this.command("removeNode",arguments)},GraphTracer.prototype.addEdge=function(t,r,e,o,n){this.command("addEdge",arguments)},GraphTracer.prototype.updateEdge=function(t,r,e,o,n){this.command("updateEdge",arguments)},GraphTracer.prototype.removeEdge=function(t,r){this.command("removeEdge",arguments)},GraphTracer.prototype.visit=function(t,r,e){this.command("visit",arguments)},GraphTracer.prototype.leave=function(t,r,e){this.command("leave",arguments)},GraphTracer.prototype.select=function(t,r){this.command("select",arguments)},GraphTracer.prototype.deselect=function(t,r){this.command("deselect",arguments)},GraphTracer.prototype.log=function(t){this.command("log",arguments)},GraphTracer}(e(0).Tracer);r.default=n}])});
{
"name": "algorithm-visualizer",
"version": "2.3.1",
"version": "2.3.2",
"description": "Visualization Library for JavaScript",

@@ -5,0 +5,0 @@ "keywords": [

import { Array2DTracer, ChartTracer } from './';
class Array1DTracer extends Array2DTracer {
set(array1d?: any[]): this {
return this.command('set', arguments);
set(array1d?: any[]) {
this.command('set', arguments);
}
patch(x: number, v?: any): this {
return this.command('patch', arguments);
patch(x: number, v?: any) {
this.command('patch', arguments);
}
depatch(x: number): this {
return this.command('depatch', arguments);
depatch(x: number) {
this.command('depatch', arguments);
}
select(sx: number, ex?: number): this {
return this.command('select', arguments);
select(sx: number, ex?: number) {
this.command('select', arguments);
}
deselect(sx: number, ex?: number): this {
return this.command('deselect', arguments);
deselect(sx: number, ex?: number) {
this.command('deselect', arguments);
}
chart(chartTracer: ChartTracer): this {
return this.command('chart', arguments);
chart(chartTracer: ChartTracer) {
this.command('chart', arguments);
}

@@ -27,0 +27,0 @@ }

import { Tracer } from './';
class Array2DTracer extends Tracer {
set(array2d?: any[][]): this {
return this.command('set', arguments);
set(array2d?: any[][]) {
this.command('set', arguments);
}
patch(x: number, y: number, v?: any): this {
return this.command('patch', arguments);
patch(x: number, y: number, v?: any) {
this.command('patch', arguments);
}
depatch(x: number, y: number): this {
return this.command('depatch', arguments);
depatch(x: number, y: number) {
this.command('depatch', arguments);
}
select(sx: number, sy: number, ex?: number, ey?: number): this {
return this.command('select', arguments);
select(sx: number, sy: number, ex?: number, ey?: number) {
this.command('select', arguments);
}
selectRow(x: number, sy: number, ey: number): this {
return this.command('selectRow', arguments);
selectRow(x: number, sy: number, ey: number) {
this.command('selectRow', arguments);
}
selectCol(y: number, sx: number, ex: number): this {
return this.command('selectCol', arguments);
selectCol(y: number, sx: number, ex: number) {
this.command('selectCol', arguments);
}
deselect(sx: number, sy: number, ex?: number, ey?: number): this {
return this.command('deselect', arguments);
deselect(sx: number, sy: number, ex?: number, ey?: number) {
this.command('deselect', arguments);
}
deselectRow(x: number, sy: number, ey: number): this {
return this.command('deselectRow', arguments);
deselectRow(x: number, sy: number, ey: number) {
this.command('deselectRow', arguments);
}
deselectCol(y: number, sx: number, ex: number): this {
return this.command('deselectCol', arguments);
deselectCol(y: number, sx: number, ex: number) {
this.command('deselectCol', arguments);
}

@@ -39,0 +39,0 @@ }

@@ -17,3 +17,3 @@ import { Randomize } from './';

static command(key: string | null, method: string, iArguments: IArguments): Commander {
static command(key: string | null, method: string, iArguments: IArguments) {
const args = Array.from(iArguments);

@@ -27,16 +27,8 @@ this.commands.push({

if (this.objectCount > MAX_OBJECTS) throw new Error('Too Many Objects');
return (<any>this);
}
static setRoot(child: Commander): Commander {
return this.command(null, 'setRoot', arguments);
}
static delay(lineNumber?: Number): Commander {
return this.command(null, 'delay', arguments);
}
private readonly key: string;
constructor(iArguments: IArguments) {
Commander.objectCount++;
const className = (<any>this).constructor.name;

@@ -49,15 +41,9 @@ this.key = Commander.keyRandomizer.create();

Commander.objectCount--;
return this.command('destroy', arguments);
this.command('destroy', arguments);
}
command(method: string, iArguments: IArguments): this {
command(method: string, iArguments: IArguments) {
Commander.command(this.key, method, iArguments);
return this;
}
delay(lineNumber?: Number): this {
Commander.delay(lineNumber);
return this;
}
toJSON() {

@@ -64,0 +50,0 @@ return this.key;

import { LogTracer, Tracer } from './';
class GraphTracer extends Tracer {
set(array2d?: any[][]): this {
return this.command('set', arguments);
set(array2d?: any[][]) {
this.command('set', arguments);
}
directed(isDirected?: boolean): this {
return this.command('directed', arguments);
directed(isDirected?: boolean) {
this.command('directed', arguments);
return this;
}
weighted(isWeighted?: boolean): this {
return this.command('weighted', arguments);
weighted(isWeighted?: boolean) {
this.command('weighted', arguments);
return this;
}
addNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this {
return this.command('addNode', arguments);
layoutCircle() {
this.command('layoutCircle', arguments);
return this;
}
updateNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number): this {
return this.command('updateNode', arguments);
layoutTree(root?: any, sorted?: boolean) {
this.command('layoutTree', arguments);
return this;
}
removeNode(id: any): this {
return this.command('removeNode', arguments);
layoutRandom() {
this.command('layoutRandom', arguments);
return this;
}
addEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this {
return this.command('addEdge', arguments);
addNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number) {
this.command('addNode', arguments);
}
updateEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number): this {
return this.command('updateEdge', arguments);
updateNode(id: any, weight?: any, x?: number, y?: number, visitedCount?: number, selectedCount?: number) {
this.command('updateNode', arguments);
}
removeEdge(source: any, target: any): this {
return this.command('removeEdge', arguments);
removeNode(id: any) {
this.command('removeNode', arguments);
}
layoutCircle() {
return this.command('layoutCircle', arguments);
addEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number) {
this.command('addEdge', arguments);
}
layoutTree(root?: any, sorted?: boolean) {
return this.command('layoutTree', arguments);
updateEdge(source: any, target: any, weight?: any, visitedCount?: number, selectedCount?: number) {
this.command('updateEdge', arguments);
}
layoutRandom() {
return this.command('layoutRandom', arguments);
removeEdge(source: any, target: any) {
this.command('removeEdge', arguments);
}
visit(target: any, source?: any, weight?: any) {
return this.command('visit', arguments);
this.command('visit', arguments);
}
leave(target: any, source?: any, weight?: any) {
return this.command('leave', arguments);
this.command('leave', arguments);
}
select(target: any, source?: any) {
return this.command('select', arguments);
this.command('select', arguments);
}
deselect(target: any, source?: any) {
return this.command('deselect', arguments);
this.command('deselect', arguments);
}
log(logTracer: LogTracer) {
return this.command('log', arguments);
this.command('log', arguments);
}

@@ -71,0 +76,0 @@ }

import { Commander } from './';
class Layout extends Commander {
static setRoot(child: Commander) {
this.command(null, 'setRoot', arguments);
}
constructor(children: [Commander]) {

@@ -8,12 +12,12 @@ super(arguments);

add(child: Commander, index?: Number): this {
return this.command('add', arguments);
add(child: Commander, index?: Number) {
this.command('add', arguments);
}
remove(child: Commander): this {
return this.command('remove', arguments);
remove(child: Commander) {
this.command('remove', arguments);
}
removeAll(): this {
return this.command('removeAll', arguments);
removeAll() {
this.command('removeAll', arguments);
}

@@ -20,0 +24,0 @@ }

import { Tracer } from './';
class LogTracer extends Tracer {
set(log?: string): this {
return this.command('set', arguments);
set(log?: string) {
this.command('set', arguments);
}
print(message: any): this {
return this.command('print', arguments);
print(message: any) {
this.command('print', arguments);
}
println(message: any): this {
return this.command('println', arguments);
println(message: any) {
this.command('println', arguments);
}
printf(format: string, ...args: any[]): this {
return this.command('printf', arguments);
printf(format: string, ...args: any[]) {
this.command('printf', arguments);
}

@@ -19,0 +19,0 @@ }

import { Commander } from './';
class Tracer extends Commander {
static delay(lineNumber?: Number) {
this.command(null, 'delay', arguments);
}
constructor(title?: string) {

@@ -8,8 +12,8 @@ super(arguments);

set(): this {
return this.command('set', arguments);
set() {
this.command('set', arguments);
}
reset(): this {
return this.command('reset', arguments);
reset() {
this.command('reset', arguments);
}

@@ -16,0 +20,0 @@ }