diff --git a/asset-manifest.json b/asset-manifest.json index d81a94a..ba9d110 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,13 +1,13 @@ { "files": { "main.css": "/static/css/main.971da74e.css", - "main.js": "/static/js/main.dfae02d5.js", + "main.js": "/static/js/main.b82ad1b8.js", "index.html": "/index.html", "main.971da74e.css.map": "/static/css/main.971da74e.css.map", - "main.dfae02d5.js.map": "/static/js/main.dfae02d5.js.map" + "main.b82ad1b8.js.map": "/static/js/main.b82ad1b8.js.map" }, "entrypoints": [ "static/css/main.971da74e.css", - "static/js/main.dfae02d5.js" + "static/js/main.b82ad1b8.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 326f01d..f024173 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ /> SokoNumber - + diff --git a/static/js/main.b82ad1b8.js b/static/js/main.b82ad1b8.js new file mode 100644 index 0000000..0f76038 --- /dev/null +++ b/static/js/main.b82ad1b8.js @@ -0,0 +1,3 @@ +/*! For license information please see main.b82ad1b8.js.LICENSE.txt */ +!function(){var e={51:function(e,t,n){var r=n(907).Heap,a=n(964).MinHeap,o=n(393).MaxHeap;t.Heap=r,t.MinHeap=a,t.MaxHeap=o},907:function(e,t,n){var r=n(690).default,a=n(728).default,o=function(){"use strict";function e(t,n,a){if(r(this,e),"function"!==typeof t)throw new Error("Heap constructor expects a compare function");this._compare=t,this._nodes=Array.isArray(n)?n:[],this._leaf=a||null}return a(e,[{key:"_hasLeftChild",value:function(e){return 2*e+1=this.size())&&(!(t<0||t>=this.size())&&this._compareAt(e,t)>0)}},{key:"_compareChildrenOf",value:function(e){if(!this._hasLeftChild(e)&&!this._hasRightChild(e))return-1;var t=2*e+1,n=2*e+2;return this._hasLeftChild(e)?this._hasRightChild(e)&&this._compareAt(t,n)>0?n:t:n}},{key:"_compareChildrenBefore",value:function(e,t,n){return this._compareAt(n,t)<=0&&n0)&&(this._leaf=e),this}},{key:"push",value:function(e){return this.insert(e)}},{key:"extractRoot",value:function(){if(this.isEmpty())return null;var e=this.root();return this._nodes[0]=this._nodes[this.size()-1],this._nodes.pop(),this._heapifyDown(0),e===this._leaf&&(this._leaf=this.root()),e}},{key:"pop",value:function(){return this.extractRoot()}},{key:"sort",value:function(){for(var e=this.size()-1;e>0;e-=1)this._swap(0,e),this._heapifyDownUntil(e);return this._nodes}},{key:"fix",value:function(){for(var e=Math.floor(this.size()/2)-1;e>=0;e-=1)this._heapifyDown(e);return this}},{key:"isValid",value:function(){var e=this;return function t(n){var r=!0,a=!0;if(e._hasLeftChild(n)){var o=2*n+1;if(e._compareAt(n,o)>0)return!1;r=t(o)}if(e._hasRightChild(n)){var l=2*n+2;if(e._compareAt(n,l)>0)return!1;a=t(l)}return r&&a}(0)}},{key:"clone",value:function(){return new e(this._compare,this._nodes.slice(),this._leaf)}},{key:"root",value:function(){return this.isEmpty()?null:this._nodes[0]}},{key:"top",value:function(){return this.root()}},{key:"leaf",value:function(){return this._leaf}},{key:"size",value:function(){return this._nodes.length}},{key:"isEmpty",value:function(){return 0===this.size()}},{key:"clear",value:function(){this._nodes=[],this._leaf=null}}],[{key:"heapify",value:function(t,n){if(!Array.isArray(t))throw new Error("Heap.heapify expects an array of values");if("function"!==typeof n)throw new Error("Heap.heapify expects a compare function");return new e(n,t).fix()}},{key:"isHeapified",value:function(t,n){return new e(n,t).isValid()}}]),e}();t.Heap=o},393:function(e,t,n){var r=n(690).default,a=n(728).default,o=n(907).Heap,l=function(e){return function(t,n){return("function"===typeof e?e(t):t)<("function"===typeof e?e(n):n)?1:-1}},i=function(){"use strict";function e(t,n){r(this,e),this._getCompareValue=t,this._heap=n||new o(l(t))}return a(e,[{key:"insert",value:function(e){return this._heap.insert(e)}},{key:"push",value:function(e){return this.insert(e)}},{key:"extractRoot",value:function(){return this._heap.extractRoot()}},{key:"pop",value:function(){return this.extractRoot()}},{key:"sort",value:function(){return this._heap.sort()}},{key:"fix",value:function(){return this._heap.fix()}},{key:"isValid",value:function(){return this._heap.isValid()}},{key:"root",value:function(){return this._heap.root()}},{key:"top",value:function(){return this.root()}},{key:"leaf",value:function(){return this._heap.leaf()}},{key:"size",value:function(){return this._heap.size()}},{key:"isEmpty",value:function(){return this._heap.isEmpty()}},{key:"clear",value:function(){this._heap.clear()}},{key:"clone",value:function(){return new e(this._getCompareValue,this._heap.clone())}}],[{key:"heapify",value:function(t,n){if(!Array.isArray(t))throw new Error("MaxHeap.heapify expects an array");return new e(n,new o(l(n),t)).fix()}},{key:"isHeapified",value:function(t,n){return new e(n,new o(l(n),t)).isValid()}}]),e}();t.MaxHeap=i},964:function(e,t,n){var r=n(690).default,a=n(728).default,o=n(907).Heap,l=function(e){return function(t,n){return("function"===typeof e?e(t):t)<("function"===typeof e?e(n):n)?-1:1}},i=function(){"use strict";function e(t,n){r(this,e),this._getCompareValue=t,this._heap=n||new o(l(t))}return a(e,[{key:"insert",value:function(e){return this._heap.insert(e)}},{key:"push",value:function(e){return this.insert(e)}},{key:"extractRoot",value:function(){return this._heap.extractRoot()}},{key:"pop",value:function(){return this.extractRoot()}},{key:"sort",value:function(){return this._heap.sort()}},{key:"fix",value:function(){return this._heap.fix()}},{key:"isValid",value:function(){return this._heap.isValid()}},{key:"root",value:function(){return this._heap.root()}},{key:"top",value:function(){return this.root()}},{key:"leaf",value:function(){return this._heap.leaf()}},{key:"size",value:function(){return this._heap.size()}},{key:"isEmpty",value:function(){return this._heap.isEmpty()}},{key:"clear",value:function(){this._heap.clear()}},{key:"clone",value:function(){return new e(this._getCompareValue,this._heap.clone())}}],[{key:"heapify",value:function(t,n){if(!Array.isArray(t))throw new Error("MinHeap.heapify expects an array");return new e(n,new o(l(n),t)).fix()}},{key:"isHeapified",value:function(t,n){return new e(n,new o(l(n),t)).isValid()}}]),e}();t.MinHeap=i},58:function(e,t,n){var r=n(693).MinPriorityQueue,a=n(763).MaxPriorityQueue,o=n(259).PriorityQueue;e.exports={MinPriorityQueue:r,MaxPriorityQueue:a,PriorityQueue:o}},763:function(e,t,n){var r=n(690).default,a=n(728).default,o=n(51),l=o.Heap,i=o.MaxHeap,u=function(){"use strict";function e(t,n){if(r(this,e),t&&"function"!==typeof t)throw new Error("MaxPriorityQueue constructor requires a callback for object values");this._heap=n||new i(t)}return a(e,[{key:"front",value:function(){return this._heap.root()}},{key:"back",value:function(){return this._heap.leaf()}},{key:"enqueue",value:function(e){return this._heap.insert(e)}},{key:"push",value:function(e){return this.enqueue(e)}},{key:"dequeue",value:function(){return this._heap.extractRoot()}},{key:"pop",value:function(){return this.dequeue()}},{key:"size",value:function(){return this._heap.size()}},{key:"isEmpty",value:function(){return this._heap.isEmpty()}},{key:"clear",value:function(){this._heap.clear()}},{key:"toArray",value:function(){return this._heap.clone().sort().reverse()}}],[{key:"fromArray",value:function(t,n){var r=new l(function(e){return function(t,n){return("function"===typeof e?e(t):t)<("function"===typeof e?e(n):n)?1:-1}}(n),t);return new e(n,new i(n,r).fix())}}]),e}();t.MaxPriorityQueue=u},693:function(e,t,n){var r=n(690).default,a=n(728).default,o=n(51),l=o.Heap,i=o.MinHeap,u=function(){"use strict";function e(t,n){if(r(this,e),t&&"function"!==typeof t)throw new Error("MinPriorityQueue constructor requires a callback for object values");this._heap=n||new i(t)}return a(e,[{key:"front",value:function(){return this._heap.root()}},{key:"back",value:function(){return this._heap.leaf()}},{key:"enqueue",value:function(e){return this._heap.insert(e)}},{key:"push",value:function(e){return this.enqueue(e)}},{key:"dequeue",value:function(){return this._heap.extractRoot()}},{key:"pop",value:function(){return this.dequeue()}},{key:"size",value:function(){return this._heap.size()}},{key:"isEmpty",value:function(){return this._heap.isEmpty()}},{key:"clear",value:function(){this._heap.clear()}},{key:"toArray",value:function(){return this._heap.clone().sort().reverse()}}],[{key:"fromArray",value:function(t,n){var r=new l(function(e){return function(t,n){return("function"===typeof e?e(t):t)<("function"===typeof e?e(n):n)?-1:1}}(n),t);return new e(n,new i(n,r).fix())}}]),e}();t.MinPriorityQueue=u},259:function(e,t,n){var r=n(690).default,a=n(728).default,o=n(51).Heap,l=function(){"use strict";function e(t,n){if(r(this,e),"function"!==typeof t)throw new Error("PriorityQueue constructor expects a compare function");this._heap=new o(t,n),n&&this._heap.fix()}return a(e,[{key:"front",value:function(){return this._heap.root()}},{key:"back",value:function(){return this._heap.leaf()}},{key:"enqueue",value:function(e){return this._heap.insert(e)}},{key:"push",value:function(e){return this.enqueue(e)}},{key:"dequeue",value:function(){return this._heap.extractRoot()}},{key:"pop",value:function(){return this.dequeue()}},{key:"size",value:function(){return this._heap.size()}},{key:"isEmpty",value:function(){return this._heap.isEmpty()}},{key:"clear",value:function(){this._heap.clear()}},{key:"toArray",value:function(){return this._heap.clone().sort().reverse()}}],[{key:"fromArray",value:function(t,n){return new e(n,t)}}]),e}();t.PriorityQueue=l},463:function(e,t,n){"use strict";var r=n(791),a=n(296);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n