From e018b6a884947ae67638afe5eab2e26182718e26 Mon Sep 17 00:00:00 2001 From: steveoh Date: Wed, 16 Mar 2016 11:05:12 -0600 Subject: [PATCH 001/246] =?UTF-8?q?update=20natural=20sort=20to=200.8.1=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit closes #387 --- dist/list.js | 56 +++++++++++++++++++++------------------ dist/list.min.js | 2 +- src/utils/natural-sort.js | 56 +++++++++++++++++++++------------------ test/test.sort.js | 15 +++++++++++ 4 files changed, 76 insertions(+), 53 deletions(-) diff --git a/dist/list.js b/dist/list.js index 38ddeca4..650d8321 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1160,21 +1160,23 @@ module.exports = function(arr, obj){ },{}],15:[function(require,module,exports){ /* - * Natural Sort algorithm for Javascript - Version 0.8 - Released under MIT license + * Natural Sort algorithm for Javascript - Version 0.8.1 - Released under MIT license * Author: Jim Palmer (based on chunking idea from Dave Koelle) */ module.exports = function(a, b, opts) { - var re = /(^([+\-]?(?:\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[\da-fA-F]+$|\d+)/g, + var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g, sre = /^\s+|\s+$/g, // trim pre-post whitespace snre = /\s+/g, // normalize all whitespace to single ' ' character dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, hre = /^0x[0-9a-f]+$/i, ore = /^0/, options = opts || {}, - i = function(s) { return options.insensitive && (''+s).toLowerCase() || ''+s; }, + i = function(s) { + return (options.insensitive && ('' + s).toLowerCase() || '' + s).replace(sre, ''); + }, // convert all to strings strip whitespace - x = i(a) || '', - y = i(b) || '', + x = i(a), + y = i(b), // chunk/tokenize xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), @@ -1182,29 +1184,31 @@ module.exports = function(a, b, opts) { xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && Date.parse(x)), yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null, normChunk = function(s, l) { - // normalize spaces; find floats not starting with '0', string or 0 if not defined (Clint Priest) - return (!s.match(ore) || l == 1) && parseFloat(s) || s.replace(snre, ' ').replace(sre, '') || 0; + // normalize spaces; find floats not starting with '0', string or 0 if not defined (Clint Priest) + return (!s.match(ore) || l == 1) && parseFloat(s) || s.replace(snre, ' ').replace(sre, '') || 0; }, oFxNcL, oFyNcL; - // first try and sort Hex codes or Dates - if (yD) { - if ( xD < yD ) { return -1; } - else if ( xD > yD ) { return 1; } - } - // natural sorting through split numeric strings and default strings - for(var cLoc=0, xNl = xN.length, yNl = yN.length, numS=Math.max(xNl, yNl); cLoc < numS; cLoc++) { - oFxNcL = normChunk(xN[cLoc], xNl); - oFyNcL = normChunk(yN[cLoc], yNl); - // handle numeric vs string comparison - number < string - (Kyle Adams) - if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; } - // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' - else if (typeof oFxNcL !== typeof oFyNcL) { - oFxNcL += ''; - oFyNcL += ''; - } - if (oFxNcL < oFyNcL) { return -1; } - if (oFxNcL > oFyNcL) { return 1; } - } + // first try and sort Hex codes or Dates + if (yD) { + if (xD < yD) { return -1; } + else if (xD > yD) { return 1; } + } + // natural sorting through split numeric strings and default strings + for(var cLoc = 0, xNl = xN.length, yNl = yN.length, numS = Math.max(xNl, yNl); cLoc < numS; cLoc++) { + oFxNcL = normChunk(xN[cLoc] || '', xNl); + oFyNcL = normChunk(yN[cLoc] || '', yNl); + // handle numeric vs string comparison - number < string - (Kyle Adams) + if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { + return isNaN(oFxNcL) ? 1 : -1; + } + // if unicode use locale comparison + if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) { + var comp = oFxNcL.localeCompare(oFyNcL); + return comp / Math.abs(comp); + } + if (oFxNcL < oFyNcL) { return -1; } + else if (oFxNcL > oFyNcL) { return 1; } + } return 0; }; diff --git a/dist/list.min.js b/dist/list.min.js index ff939b4b..26d8f02b 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1 +1 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb;b++)a.push(r.items[b].values());return a},this.add=function(a,b){if(0!==a.length){if(b)return void t(a,b);var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;e=r.items.length>r.page?!0:!1,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;f>e;e++)r.items[e].values()[a]==b&&(r.templater.remove(r.items[e],c),r.items.splice(e,1),f--,e--,d++);return r.update(),d},this.get=function(a,b){for(var c=[],d=0,e=r.items.length;e>d;d++){var f=r.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return r.items.length},this.clear=function(){return r.templater.clear(),r.items=[],r},this.on=function(a,b){return r.handlers[a].push(b),r},this.off=function(a,b){var c=r.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&r.matchingItems.length+1>=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];b(f)?f.filtered=!0:f.filtered=!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}},{}],4:[function(a,b,c){b.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return e.elm&&e.elm.parentNode==a.list?!0:!1},f(b,c,d)}}},{}],5:[function(a,b,c){b.exports=function(b){var c=a("./item")(b),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(a,d){for(var e=0,f=a.length;f>e;e++)b.items.push(new c(d,a[e]))},f=function(a,c){var d=a.splice(0,50);e(d,c),a.length>0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?e=a[1]:3==a.length&&(c=a[1],e=a[2])},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;c>b;b++)g.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(g.values(a.values(),c[b]))return void(a.found=!0)},values:function(c,e){return c.hasOwnProperty(e)&&(b=a.utils.toString(c[e]).toLowerCase(),""!==d&&b.search(d)>-1)?!0:!1},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order?!0:!1,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;d>c;c++)a.utils.classes(b.els[c]).remove("asc"),a.utils.classes(b.els[c]).remove("desc")},getOrder:function(b){var c=a.utils.getAttribute(b,"data-order");return"asc"==c||"desc"==c?c:a.utils.classes(b).has("desc")?"asc":a.utils.classes(b).has("asc")?"desc":"asc"},getInSensitive:function(b,c){var d=a.utils.getAttribute(b,"data-insensitive");"false"===d?c.insensitive=!1:c.insensitive=!0},setOrder:function(c){for(var d=0,e=b.els.length;e>d;d++){var f=b.els[d];if(a.utils.getAttribute(f,"data-sort")===c.valueName){var g=a.utils.getAttribute(f,"data-order");"asc"==g||"desc"==g?g==c.order&&a.utils.classes(f).add(c.order):a.utils.classes(f).add(c.order)}}}},c=function(){a.trigger("sortStart");var c={},d=arguments[0].currentTarget||arguments[0].srcElement||void 0;d?(c.valueName=a.utils.getAttribute(d,"data-sort"),b.getInSensitive(d,c),c.order=b.getOrder(d)):(c=arguments[1]||c,c.valueName=arguments[0],c.order=c.order||"asc",c.insensitive="undefined"==typeof c.insensitive?!0:c.insensitive),b.clear(),b.setOrder(c),c.sortFunction=c.sortFunction||a.sortFunction,a.items.sort(function(a,b){var d="desc"===c.order?-1:1;return c.sortFunction(a,b,c)*d}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=a.utils.getByClass(a.listContainer,a.sortClass),a.utils.events.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),c}},{}],8:[function(a,b,c){var d=function(a){var b,c=this,d=function(){b=c.getItemSource(a.item),b=c.clearSourceItem(b,a.valueNames)};this.clearSourceItem=function(b,c){for(var d=0,e=c.length;e>d;d++){var f;if(c[d].data)for(var g=0,h=c[d].data.length;h>g;g++)b.setAttribute("data-"+c[d].data[g],"");else c[d].attr&&c[d].name?(f=a.utils.getByClass(b,c[d].name,!0),f&&f.setAttribute(c[d].attr,"")):(f=a.utils.getByClass(b,c[d],!0),f&&(f.innerHTML=""));f=void 0}return b},this.getItemSource=function(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d].cloneNode(!0)}else{if(/^tr[\s>]/.exec(b)){var f=document.createElement("table");return f.innerHTML=b,f.firstChild}if(-1!==b.indexOf("<")){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.")},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;g>f;f++){var h;if(d[f].data)for(var i=0,j=d[f].data.length;j>i;i++)e[d[f].data[i]]=a.utils.getAttribute(b.elm,"data-"+d[f].data[i]);else d[f].attr&&d[f].name?(h=a.utils.getByClass(b.elm,d[f].name,!0),e[d[f].name]=h?a.utils.getAttribute(h,d[f].attr):""):(h=a.utils.getByClass(b.elm,d[f],!0),e[d[f]]=h?h.innerHTML:"");h=void 0}return e},this.set=function(b,d){var e=function(b){for(var c=0,d=a.valueNames.length;d>c;c++)if(a.valueNames[c].data){for(var e=a.valueNames[c].data,f=0,g=e.length;g>f;f++)if(e[f]===b)return{data:b}}else{if(a.valueNames[c].attr&&a.valueNames[c].name&&a.valueNames[c].name==b)return a.valueNames[c];if(a.valueNames[c]===b)return b}},f=function(c,d){var f,g=e(c);g&&(g.data?b.elm.setAttribute("data-"+g.data,d):g.attr&&g.name?(f=a.utils.getByClass(b.elm,g.name,!0),f&&f.setAttribute(g.attr,d)):(f=a.utils.getByClass(b.elm,g,!0),f&&(f.innerHTML=d)),f=void 0)};if(!c.create(b))for(var g in d)d.hasOwnProperty(g)&&f(g,d[g])},this.create=function(a){if(void 0!==a.elm)return!1;var d=b.cloneNode(!0);return d.removeAttribute("id"),a.elm=d,c.set(a,a.values()),!0},this.remove=function(b){b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.show=function(b){c.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cf;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}},{}],13:[function(a,b,c){b.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null===a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()},{}],14:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;cr)return-1;if(r>s)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);x>u;u++){if(d=t(p[u],v),e=t(q[u],w),isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(typeof d!=typeof e&&(d+="",e+=""),e>d)return-1;if(d>e)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;cb;b++)a.push(r.items[b].values());return a},this.add=function(a,b){if(0!==a.length){if(b)return void t(a,b);var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;e=r.items.length>r.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;f>e;e++)r.items[e].values()[a]==b&&(r.templater.remove(r.items[e],c),r.items.splice(e,1),f--,e--,d++);return r.update(),d},this.get=function(a,b){for(var c=[],d=0,e=r.items.length;e>d;d++){var f=r.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return r.items.length},this.clear=function(){return r.templater.clear(),r.items=[],r},this.on=function(a,b){return r.handlers[a].push(b),r},this.off=function(a,b){var c=r.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&r.matchingItems.length+1>=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];b(f)?f.filtered=!0:f.filtered=!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}},{}],4:[function(a,b,c){b.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return!(!e.elm||e.elm.parentNode!=a.list)},f(b,c,d)}}},{}],5:[function(a,b,c){b.exports=function(b){var c=a("./item")(b),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(a,d){for(var e=0,f=a.length;f>e;e++)b.items.push(new c(d,a[e]))},f=function(a,c){var d=a.splice(0,50);e(d,c),a.length>0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?e=a[1]:3==a.length&&(c=a[1],e=a[2])},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;c>b;b++)g.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(g.values(a.values(),c[b]))return void(a.found=!0)},values:function(c,e){return!!(c.hasOwnProperty(e)&&(b=a.utils.toString(c[e]).toLowerCase(),""!==d&&b.search(d)>-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;d>c;c++)a.utils.classes(b.els[c]).remove("asc"),a.utils.classes(b.els[c]).remove("desc")},getOrder:function(b){var c=a.utils.getAttribute(b,"data-order");return"asc"==c||"desc"==c?c:a.utils.classes(b).has("desc")?"asc":a.utils.classes(b).has("asc")?"desc":"asc"},getInSensitive:function(b,c){var d=a.utils.getAttribute(b,"data-insensitive");"false"===d?c.insensitive=!1:c.insensitive=!0},setOrder:function(c){for(var d=0,e=b.els.length;e>d;d++){var f=b.els[d];if(a.utils.getAttribute(f,"data-sort")===c.valueName){var g=a.utils.getAttribute(f,"data-order");"asc"==g||"desc"==g?g==c.order&&a.utils.classes(f).add(c.order):a.utils.classes(f).add(c.order)}}}},c=function(){a.trigger("sortStart");var c={},d=arguments[0].currentTarget||arguments[0].srcElement||void 0;d?(c.valueName=a.utils.getAttribute(d,"data-sort"),b.getInSensitive(d,c),c.order=b.getOrder(d)):(c=arguments[1]||c,c.valueName=arguments[0],c.order=c.order||"asc",c.insensitive="undefined"==typeof c.insensitive?!0:c.insensitive),b.clear(),b.setOrder(c),c.sortFunction=c.sortFunction||a.sortFunction,a.items.sort(function(a,b){var d="desc"===c.order?-1:1;return c.sortFunction(a,b,c)*d}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=a.utils.getByClass(a.listContainer,a.sortClass),a.utils.events.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),c}},{}],8:[function(a,b,c){var d=function(a){var b,c=this,d=function(){b=c.getItemSource(a.item),b=c.clearSourceItem(b,a.valueNames)};this.clearSourceItem=function(b,c){for(var d=0,e=c.length;e>d;d++){var f;if(c[d].data)for(var g=0,h=c[d].data.length;h>g;g++)b.setAttribute("data-"+c[d].data[g],"");else c[d].attr&&c[d].name?(f=a.utils.getByClass(b,c[d].name,!0),f&&f.setAttribute(c[d].attr,"")):(f=a.utils.getByClass(b,c[d],!0),f&&(f.innerHTML=""));f=void 0}return b},this.getItemSource=function(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d].cloneNode(!0)}else{if(/^tr[\s>]/.exec(b)){var f=document.createElement("table");return f.innerHTML=b,f.firstChild}if(-1!==b.indexOf("<")){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.")},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;g>f;f++){var h;if(d[f].data)for(var i=0,j=d[f].data.length;j>i;i++)e[d[f].data[i]]=a.utils.getAttribute(b.elm,"data-"+d[f].data[i]);else d[f].attr&&d[f].name?(h=a.utils.getByClass(b.elm,d[f].name,!0),e[d[f].name]=h?a.utils.getAttribute(h,d[f].attr):""):(h=a.utils.getByClass(b.elm,d[f],!0),e[d[f]]=h?h.innerHTML:"");h=void 0}return e},this.set=function(b,d){var e=function(b){for(var c=0,d=a.valueNames.length;d>c;c++)if(a.valueNames[c].data){for(var e=a.valueNames[c].data,f=0,g=e.length;g>f;f++)if(e[f]===b)return{data:b}}else{if(a.valueNames[c].attr&&a.valueNames[c].name&&a.valueNames[c].name==b)return a.valueNames[c];if(a.valueNames[c]===b)return b}},f=function(c,d){var f,g=e(c);g&&(g.data?b.elm.setAttribute("data-"+g.data,d):g.attr&&g.name?(f=a.utils.getByClass(b.elm,g.name,!0),f&&f.setAttribute(g.attr,d)):(f=a.utils.getByClass(b.elm,g,!0),f&&(f.innerHTML=d)),f=void 0)};if(!c.create(b))for(var g in d)d.hasOwnProperty(g)&&f(g,d[g])},this.create=function(a){if(void 0!==a.elm)return!1;var d=b.cloneNode(!0);return d.removeAttribute("id"),a.elm=d,c.set(a,a.values()),!0},this.remove=function(b){b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.show=function(b){c.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cf;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}},{}],13:[function(a,b,c){b.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null===a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()},{}],14:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;cr)return-1;if(r>s)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);x>u;u++){if(d=t(p[u]||"",v),e=t(q[u]||"",w),isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(/[^\x00-\x80]/.test(d+e)&&d.localeCompare){var y=d.localeCompare(e);return y/Math.abs(y)}if(e>d)return-1;if(d>e)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;c yD ) { return 1; } - } - // natural sorting through split numeric strings and default strings - for(var cLoc=0, xNl = xN.length, yNl = yN.length, numS=Math.max(xNl, yNl); cLoc < numS; cLoc++) { - oFxNcL = normChunk(xN[cLoc], xNl); - oFyNcL = normChunk(yN[cLoc], yNl); - // handle numeric vs string comparison - number < string - (Kyle Adams) - if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { return (isNaN(oFxNcL)) ? 1 : -1; } - // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2' - else if (typeof oFxNcL !== typeof oFyNcL) { - oFxNcL += ''; - oFyNcL += ''; - } - if (oFxNcL < oFyNcL) { return -1; } - if (oFxNcL > oFyNcL) { return 1; } - } + // first try and sort Hex codes or Dates + if (yD) { + if (xD < yD) { return -1; } + else if (xD > yD) { return 1; } + } + // natural sorting through split numeric strings and default strings + for(var cLoc = 0, xNl = xN.length, yNl = yN.length, numS = Math.max(xNl, yNl); cLoc < numS; cLoc++) { + oFxNcL = normChunk(xN[cLoc] || '', xNl); + oFyNcL = normChunk(yN[cLoc] || '', yNl); + // handle numeric vs string comparison - number < string - (Kyle Adams) + if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { + return isNaN(oFxNcL) ? 1 : -1; + } + // if unicode use locale comparison + if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) { + var comp = oFxNcL.localeCompare(oFyNcL); + return comp / Math.abs(comp); + } + if (oFxNcL < oFyNcL) { return -1; } + else if (oFxNcL > oFyNcL) { return 1; } + } return 0; }; diff --git a/test/test.sort.js b/test/test.sort.js index 0e9ca9c6..5c811f9e 100644 --- a/test/test.sort.js +++ b/test/test.sort.js @@ -188,6 +188,21 @@ describe('Sort', function() { expect(list.sort).withArgs('val').to.not.throwException(); expect(list.sort).withArgs('val').to.not.throwException(); }); + it('should handle values from issue 387', function() { + i1.values({ val: 'Test' }); + i2.values({ val: 'Test1Test2' }); + i3.values({ val: 'Bill-To Phone1 Extension' }); + i4.values({ val: "z" }); + i5.values({ val: "s" }); + i6.values({ val: "y" }); + list.sort('val', { order: 'asc' }); + expect(list.items[0].values().val).to.be.equal('Bill-To Phone1 Extension'); + expect(list.items[1].values().val).to.be.equal('s'); + expect(list.items[2].values().val).to.be.equal('Test'); + expect(list.items[3].values().val).to.be.equal('Test1Test2'); + expect(list.items[4].values().val).to.be.equal('y'); + expect(list.items[5].values().val).to.be.equal('z'); + }) /* it('should show how random values are sorted', function() { list.add({ id: '7', val: "" }); From 8a9598cf0c30fb1d5666c0424fb252e404880037 Mon Sep 17 00:00:00 2001 From: steveoh Date: Wed, 16 Mar 2016 12:52:01 -0600 Subject: [PATCH 002/246] update gruntfile to use local browserify closes #391 --- Gruntfile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3a28545a..cad9c4b1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -17,7 +17,7 @@ module.exports = function(grunt) { command: 'mkdir -p dist' }, build: { - command: 'browserify index.js > dist/list.js', + command: 'node_modules/browserify/bin/cmd.js index.js > dist/list.js', options: { stderr: true } From 7fab46b6feccdc37f780fd2479d8552def955c0e Mon Sep 17 00:00:00 2001 From: simplydallas Date: Sat, 19 Mar 2016 05:29:44 -0500 Subject: [PATCH 003/246] Adjusted mkdir tast to be OS agnostic --- Gruntfile.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 3a28545a..bb27a78b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,9 +13,6 @@ module.exports = function(grunt) { }, }, shell: { - mkdir: { - command: 'mkdir -p dist' - }, build: { command: 'browserify index.js > dist/list.js', options: { @@ -79,8 +76,9 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha'); - grunt.registerTask('default', ['jshint:code', 'jshint:tests', 'shell:mkdir', 'shell:build']); - grunt.registerTask('dist', ['default', 'shell:mkdir', 'shell:build', 'uglify']); + grunt.registerTask('mkdir', function() { grunt.file.mkdir("dist"); }); + grunt.registerTask('default', ['jshint:code', 'jshint:tests', 'mkdir', 'shell:build']); + grunt.registerTask('dist', ['default', 'mkdir', 'shell:build', 'uglify']); grunt.registerTask('clean', ['shell:remove']); grunt.registerTask('test', ['dist', 'mocha']); From 38583e097cb75e369779b46c6129e1b8b8324f24 Mon Sep 17 00:00:00 2001 From: Luke Edwards Date: Tue, 26 Apr 2016 13:03:23 -0700 Subject: [PATCH 004/246] fix regex selector & return row Resolves #403 --- src/templater.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/templater.js b/src/templater.js index 782fd609..598e0304 100644 --- a/src/templater.js +++ b/src/templater.js @@ -41,10 +41,10 @@ var Templater = function(list) { return nodes[i].cloneNode(true); } } - } else if (/^tr[\s>]/.exec(item)) { - var table = document.createElement('table'); - table.innerHTML = item; - return table.firstChild; + } else if (/]/g.exec(item)) { + var tbody = document.createElement('tbody'); + tbody.innerHTML = item; + return tbody.firstChild; } else if (item.indexOf("<") !== -1) { var div = document.createElement('div'); div.innerHTML = item; From f5602802ff92260847c62eb2b5cbe5f61c724a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Neboj=C5=A1a=20Stri=C4=8Devi=C4=87?= Date: Tue, 14 Jun 2016 11:47:58 +0200 Subject: [PATCH 005/246] Update version in index.js Update version from 1.1.1 to 1.2 in index.js. --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 131e03c4..a2346631 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /* -List.js 1.1.1 +List.js 1.2 By Jonny Strömberg (www.jonnystromberg.com, www.listjs.com) */ (function( window, undefined ) { From 41df439c1bbac2545c43ae9b1f29738a4cde9c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 2 Oct 2016 17:58:09 +0200 Subject: [PATCH 006/246] Update history.md --- History.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 30688404..4fb2645f 100644 --- a/History.md +++ b/History.md @@ -11,10 +11,18 @@ - https://github.com/javve/list.js/issues/316 - https://github.com/javve/list.js/pull/301 - Improve testability by decoupling things and make it possible to use require('') in tests - +- Add .remove() method to remove all listeners etc. # Changelog +### v1.2.1 +- **[Bugfix]** Update NaturalSort to 0.8.1 + [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) +- **[Bugfix]** Make mkdir in build script OS agnostic + [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) +- **[Misc]** Use local Browserify + [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) + ### 2016-02-27: v1.2.0 It's been two years since the last update of List.js. That is absolutely not ok and I'm very sorry that it has taken so long. I promise I'll do better in the future! From 1af94012de89fd6bcf8446c31305ad517507c44b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 4 Oct 2016 00:31:49 +0200 Subject: [PATCH 007/246] Add List.js website to /docs for github hosting --- .gitignore | 3 + History.md | 1 + docs/CNAME | 1 + docs/Gemfile | 26 + docs/Gemfile.lock | 175 ++++ docs/Guardfile | 3 + docs/README.md | 1 + docs/_config.yml | 19 + docs/_examples/add-get-remove.html | 9 + .../data-attributes-custom-attributes.html | 9 + docs/_examples/existing-list-add.html | 9 + docs/_examples/existing-list.html | 9 + docs/_examples/fuzzy-search.html | 9 + docs/_examples/new-list.html | 9 + docs/_examples/pagination.html | 9 + docs/_examples/table.html | 9 + docs/_includes/carbon.html | 4 + docs/_includes/codepen.html | 7 + .../_includes/examples/annotated-example.html | 94 +++ .../javascripts/vendor/bootstrap/tab.js | 135 +++ .../javascripts/vendor/bootstrap/tooltip.js | 386 +++++++++ .../vendor/bootstrap/transition.js | 56 ++ .../javascripts/vendor/highlight.pack.js | 1 + .../javascripts/vendor/jquery-1.8.3.min.js | 2 + docs/_includes/menu.html | 33 + docs/_layouts/default.html | 107 +++ docs/_layouts/game.html | 37 + docs/_sass/_base.scss | 194 +++++ docs/_sass/_carbonads.scss | 71 ++ docs/_sass/_mixins.scss | 19 + docs/_sass/_normalize.scss | 406 +++++++++ docs/_sass/layouts/game.scss | 88 ++ docs/_sass/layouts/start.scss | 16 + docs/_sass/vendor/bootstrap/tooltip.scss | 103 +++ docs/_sass/vendor/highlight/xcode.scss | 156 ++++ docs/assets/css/style.scss | 772 ++++++++++++++++++ docs/assets/images/graphics/favicon.ico | Bin 0 -> 41787 bytes docs/assets/images/graphics/javve-coffee.jpg | Bin 0 -> 4436 bytes docs/assets/images/graphics/javve-coffee2.jpg | Bin 0 -> 6180 bytes docs/assets/images/graphics/javve.jpg | Bin 0 -> 7363 bytes docs/assets/images/graphics/listjs-logo.png | Bin 0 -> 9780 bytes docs/assets/images/tests/boba.jpeg | Bin 0 -> 3271 bytes docs/assets/images/tests/darth.jpeg | Bin 0 -> 2109 bytes docs/assets/images/tests/leia.jpeg | Bin 0 -> 1707 bytes docs/assets/images/tests/luke.jpeg | Bin 0 -> 2009 bytes docs/assets/images/tests/rey.jpeg | Bin 0 -> 2281 bytes docs/assets/javascripts/list-1.2.0.min.js | 1 + docs/assets/javascripts/main.js | 52 ++ docs/docs/index.html | 168 ++++ docs/docs/item-api.html | 77 ++ docs/docs/list-api.html | 221 +++++ docs/docs/options.html | 92 +++ docs/docs/plugins/build.html | 50 ++ docs/docs/plugins/fuzzysearch.html | 99 +++ docs/docs/plugins/index.html | 38 + docs/docs/plugins/pagination.html | 138 ++++ docs/feed.xml | 30 + docs/index.html | 67 ++ docs/overview/changelog.html | 7 + docs/overview/contribute.html | 35 + docs/overview/download.html | 23 + docs/overview/index.html | 36 + docs/overview/press.html | 18 + 63 files changed, 4140 insertions(+) create mode 100644 docs/CNAME create mode 100644 docs/Gemfile create mode 100644 docs/Gemfile.lock create mode 100644 docs/Guardfile create mode 100644 docs/README.md create mode 100644 docs/_config.yml create mode 100644 docs/_examples/add-get-remove.html create mode 100644 docs/_examples/data-attributes-custom-attributes.html create mode 100644 docs/_examples/existing-list-add.html create mode 100644 docs/_examples/existing-list.html create mode 100644 docs/_examples/fuzzy-search.html create mode 100644 docs/_examples/new-list.html create mode 100644 docs/_examples/pagination.html create mode 100644 docs/_examples/table.html create mode 100644 docs/_includes/carbon.html create mode 100644 docs/_includes/codepen.html create mode 100644 docs/_includes/examples/annotated-example.html create mode 100644 docs/_includes/javascripts/vendor/bootstrap/tab.js create mode 100644 docs/_includes/javascripts/vendor/bootstrap/tooltip.js create mode 100644 docs/_includes/javascripts/vendor/bootstrap/transition.js create mode 100644 docs/_includes/javascripts/vendor/highlight.pack.js create mode 100644 docs/_includes/javascripts/vendor/jquery-1.8.3.min.js create mode 100644 docs/_includes/menu.html create mode 100644 docs/_layouts/default.html create mode 100644 docs/_layouts/game.html create mode 100644 docs/_sass/_base.scss create mode 100644 docs/_sass/_carbonads.scss create mode 100644 docs/_sass/_mixins.scss create mode 100644 docs/_sass/_normalize.scss create mode 100644 docs/_sass/layouts/game.scss create mode 100644 docs/_sass/layouts/start.scss create mode 100644 docs/_sass/vendor/bootstrap/tooltip.scss create mode 100644 docs/_sass/vendor/highlight/xcode.scss create mode 100644 docs/assets/css/style.scss create mode 100644 docs/assets/images/graphics/favicon.ico create mode 100644 docs/assets/images/graphics/javve-coffee.jpg create mode 100644 docs/assets/images/graphics/javve-coffee2.jpg create mode 100644 docs/assets/images/graphics/javve.jpg create mode 100644 docs/assets/images/graphics/listjs-logo.png create mode 100644 docs/assets/images/tests/boba.jpeg create mode 100644 docs/assets/images/tests/darth.jpeg create mode 100644 docs/assets/images/tests/leia.jpeg create mode 100644 docs/assets/images/tests/luke.jpeg create mode 100644 docs/assets/images/tests/rey.jpeg create mode 100644 docs/assets/javascripts/list-1.2.0.min.js create mode 100644 docs/assets/javascripts/main.js create mode 100644 docs/docs/index.html create mode 100644 docs/docs/item-api.html create mode 100644 docs/docs/list-api.html create mode 100644 docs/docs/options.html create mode 100644 docs/docs/plugins/build.html create mode 100644 docs/docs/plugins/fuzzysearch.html create mode 100755 docs/docs/plugins/index.html create mode 100644 docs/docs/plugins/pagination.html create mode 100644 docs/feed.xml create mode 100755 docs/index.html create mode 100644 docs/overview/changelog.html create mode 100644 docs/overview/contribute.html create mode 100644 docs/overview/download.html create mode 100644 docs/overview/index.html create mode 100644 docs/overview/press.html diff --git a/.gitignore b/.gitignore index 3a2312ef..672d48f2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ lab/ components build node_modules +docs/_site +docs/.sass-cache +docs/.jekyll-metadata diff --git a/History.md b/History.md index 4fb2645f..dd7be168 100644 --- a/History.md +++ b/History.md @@ -12,6 +12,7 @@ - https://github.com/javve/list.js/pull/301 - Improve testability by decoupling things and make it possible to use require('') in tests - Add .remove() method to remove all listeners etc. +- Either include version in minified file or name file list-1.2.1.js # Changelog diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..98efbfe9 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +listjs.com diff --git a/docs/Gemfile b/docs/Gemfile new file mode 100644 index 00000000..4e21ff57 --- /dev/null +++ b/docs/Gemfile @@ -0,0 +1,26 @@ +source "https://rubygems.org" +ruby RUBY_VERSION + +# Hello! This is where you manage which Jekyll version is used to run. +# When you want to use a different version, change it below, save the +# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: +# +# bundle exec jekyll serve +# +# This will help ensure the proper Jekyll version is running. +# Happy Jekylling! + +# This is the default theme for new Jekyll sites. You may change this to anything you like. +gem "minima" + +# If you want to use GitHub Pages, remove the "gem "jekyll"" above and +# uncomment the line below. To upgrade, run `bundle update github-pages`. +gem "github-pages", group: :jekyll_plugins + +# If you have any plugins, put them here! +# group :jekyll_plugins do +# gem "jekyll-github-metadata", "~> 1.0" +# end + +gem 'guard' +gem 'guard-livereload' diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock new file mode 100644 index 00000000..26fca68e --- /dev/null +++ b/docs/Gemfile.lock @@ -0,0 +1,175 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.7) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + addressable (2.4.0) + coderay (1.1.1) + coffee-script (2.4.1) + coffee-script-source + execjs + coffee-script-source (1.10.0) + colorator (1.1.0) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) + ethon (0.9.1) + ffi (>= 1.3.0) + eventmachine (1.2.0.1) + execjs (2.7.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + ffi (1.9.14) + formatador (0.2.5) + forwardable-extended (2.6.0) + gemoji (2.1.0) + github-pages (96) + activesupport (= 4.2.7) + github-pages-health-check (= 1.2.0) + jekyll (= 3.2.1) + jekyll-coffeescript (= 1.0.1) + jekyll-feed (= 0.5.1) + jekyll-gist (= 1.4.0) + jekyll-github-metadata (= 2.0.2) + jekyll-mentions (= 1.2.0) + jekyll-paginate (= 1.1.0) + jekyll-redirect-from (= 0.11.0) + jekyll-sass-converter (= 1.3.0) + jekyll-seo-tag (= 2.0.0) + jekyll-sitemap (= 0.10.0) + jemoji (= 0.7.0) + kramdown (= 1.11.1) + liquid (= 3.0.6) + listen (= 3.0.6) + mercenary (~> 0.3) + minima (= 1.2.0) + rouge (= 1.11.1) + terminal-table (~> 1.4) + github-pages-health-check (1.2.0) + addressable (~> 2.3) + net-dns (~> 0.8) + octokit (~> 4.0) + public_suffix (~> 1.4) + typhoeus (~> 0.7) + guard (2.14.0) + formatador (>= 0.2.4) + listen (>= 2.7, < 4.0) + lumberjack (~> 1.0) + nenv (~> 0.1) + notiffany (~> 0.0) + pry (>= 0.9.12) + shellany (~> 0.0) + thor (>= 0.18.1) + guard-compat (1.2.1) + guard-livereload (2.5.2) + em-websocket (~> 0.5) + guard (~> 2.8) + guard-compat (~> 1.0) + multi_json (~> 1.8) + html-pipeline (2.4.2) + activesupport (>= 2) + nokogiri (>= 1.4) + http_parser.rb (0.6.0) + i18n (0.7.0) + jekyll (3.2.1) + colorator (~> 1.0) + jekyll-sass-converter (~> 1.0) + jekyll-watch (~> 1.1) + kramdown (~> 1.3) + liquid (~> 3.0) + mercenary (~> 0.3.3) + pathutil (~> 0.9) + rouge (~> 1.7) + safe_yaml (~> 1.0) + jekyll-coffeescript (1.0.1) + coffee-script (~> 2.2) + jekyll-feed (0.5.1) + jekyll-gist (1.4.0) + octokit (~> 4.2) + jekyll-github-metadata (2.0.2) + jekyll (~> 3.1) + octokit (~> 4.0) + jekyll-mentions (1.2.0) + activesupport (~> 4.0) + html-pipeline (~> 2.3) + jekyll (~> 3.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.11.0) + jekyll (>= 2.0) + jekyll-sass-converter (1.3.0) + sass (~> 3.2) + jekyll-seo-tag (2.0.0) + jekyll (~> 3.1) + jekyll-sitemap (0.10.0) + jekyll-watch (1.5.0) + listen (~> 3.0, < 3.1) + jemoji (0.7.0) + activesupport (~> 4.0) + gemoji (~> 2.0) + html-pipeline (~> 2.2) + jekyll (>= 3.0) + json (1.8.3) + kramdown (1.11.1) + liquid (3.0.6) + listen (3.0.6) + rb-fsevent (>= 0.9.3) + rb-inotify (>= 0.9.7) + lumberjack (1.0.10) + mercenary (0.3.6) + method_source (0.8.2) + mini_portile2 (2.1.0) + minima (1.2.0) + minitest (5.9.0) + multi_json (1.12.1) + multipart-post (2.0.0) + nenv (0.3.0) + net-dns (0.8.0) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + notiffany (0.1.1) + nenv (~> 0.1) + shellany (~> 0.0) + octokit (4.3.0) + sawyer (~> 0.7.0, >= 0.5.3) + pathutil (0.14.0) + forwardable-extended (~> 2.6) + pkg-config (1.1.7) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + public_suffix (1.5.3) + rb-fsevent (0.9.7) + rb-inotify (0.9.7) + ffi (>= 0.5.0) + rouge (1.11.1) + safe_yaml (1.0.4) + sass (3.4.22) + sawyer (0.7.0) + addressable (>= 2.3.5, < 2.5) + faraday (~> 0.8, < 0.10) + shellany (0.0.1) + slop (3.6.0) + terminal-table (1.7.3) + unicode-display_width (~> 1.1.1) + thor (0.19.1) + thread_safe (0.3.5) + typhoeus (0.8.0) + ethon (>= 0.8.0) + tzinfo (1.2.2) + thread_safe (~> 0.1) + unicode-display_width (1.1.1) + +PLATFORMS + ruby + +DEPENDENCIES + github-pages + guard + guard-livereload + minima diff --git a/docs/Guardfile b/docs/Guardfile new file mode 100644 index 00000000..84d14b05 --- /dev/null +++ b/docs/Guardfile @@ -0,0 +1,3 @@ +guard 'livereload' do + watch(/^_site/) +end diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 00000000..592839e5 --- /dev/null +++ b/docs/README.md @@ -0,0 +1 @@ +# listjs.com diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 00000000..ea1769a7 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,19 @@ +title: List.js +email: jonny.stromberg@gmail.com +description: > # this means to ignore newlines until "baseurl:" + Perfect library for adding search, sort, filters and flexibility to tables, + lists and various HTML elements. Built to be invisible and work on existing HTML. +baseurl: "" # the subpath of your site, e.g. /blog +url: "http://listjs.com" # the base hostname & protocol for your site +twitter_username: javve +github_username: javve + +permalink: pretty +markdown: kramdown +gems: + - jekyll-coffeescript + - jekyll-redirect-from + +collections: + examples: + output: true diff --git a/docs/_examples/add-get-remove.html b/docs/_examples/add-get-remove.html new file mode 100644 index 00000000..25ca93a5 --- /dev/null +++ b/docs/_examples/add-get-remove.html @@ -0,0 +1,9 @@ +--- +layout: default +name: Add, get, remove +title: Example to showcase the add, get and remove methods. +url: http://codepen.io/javve/pen/cLdfw +slug: cLdfw +--- + +{% include codepen.html %} diff --git a/docs/_examples/data-attributes-custom-attributes.html b/docs/_examples/data-attributes-custom-attributes.html new file mode 100644 index 00000000..1d90f38c --- /dev/null +++ b/docs/_examples/data-attributes-custom-attributes.html @@ -0,0 +1,9 @@ +--- +layout: default +url: http://codepen.io/javve/pen/GZREaN +slug: GZREaN +title: Use data attributes and other custom attributes as keys +name: Data attributes + custom +--- + +{% include codepen.html %} diff --git a/docs/_examples/existing-list-add.html b/docs/_examples/existing-list-add.html new file mode 100644 index 00000000..ac646d67 --- /dev/null +++ b/docs/_examples/existing-list-add.html @@ -0,0 +1,9 @@ +--- +layout: default +url: http://codepen.io/javve/pen/lAmCz +slug: lAmCz +title: Existing list and add items +name: Existing list and add +--- + +{% include codepen.html %} diff --git a/docs/_examples/existing-list.html b/docs/_examples/existing-list.html new file mode 100644 index 00000000..43204ad6 --- /dev/null +++ b/docs/_examples/existing-list.html @@ -0,0 +1,9 @@ +--- +layout: default +url: http://codepen.io/javve/pen/zpuKF +slug: zpuKF +title: Basic example with existing list +name: Existing list +--- + +{% include codepen.html %} diff --git a/docs/_examples/fuzzy-search.html b/docs/_examples/fuzzy-search.html new file mode 100644 index 00000000..f25871c9 --- /dev/null +++ b/docs/_examples/fuzzy-search.html @@ -0,0 +1,9 @@ +--- +layout: default +name: Fuzzy search +title: Example of how to use the fuzzy search plugin +url: http://codepen.io/javve/pen/isInl +slug: isInl +--- + +{% include codepen.html %} diff --git a/docs/_examples/new-list.html b/docs/_examples/new-list.html new file mode 100644 index 00000000..ee3f9bc0 --- /dev/null +++ b/docs/_examples/new-list.html @@ -0,0 +1,9 @@ +--- +layout: default +url: http://codepen.io/javve/pen/yroGq +slug: yroGq +title: Basic example with a new list +name: New list +--- + +{% include codepen.html %} diff --git a/docs/_examples/pagination.html b/docs/_examples/pagination.html new file mode 100644 index 00000000..9fbcbeb6 --- /dev/null +++ b/docs/_examples/pagination.html @@ -0,0 +1,9 @@ +--- +layout: default +name: Pagination +title: Example of how to use the pagination plugin +url: http://codepen.io/javve/pen/bBfgD +slug: bBfgD +--- + +{% include codepen.html %} diff --git a/docs/_examples/table.html b/docs/_examples/table.html new file mode 100644 index 00000000..e6ec1186 --- /dev/null +++ b/docs/_examples/table.html @@ -0,0 +1,9 @@ +--- +layout: default +url: http://codepen.io/javve/pen/oEezp +slug: oEezp +title: Example of how to use a table with List.js +name: Table +--- + +{% include codepen.html %} diff --git a/docs/_includes/carbon.html b/docs/_includes/carbon.html new file mode 100644 index 00000000..4b97b881 --- /dev/null +++ b/docs/_includes/carbon.html @@ -0,0 +1,4 @@ +
+ diff --git a/docs/_includes/codepen.html b/docs/_includes/codepen.html new file mode 100644 index 00000000..4fc9b1f3 --- /dev/null +++ b/docs/_includes/codepen.html @@ -0,0 +1,7 @@ +

{{ page.name }}

+

{{ page.title }}

+ +

+ See the Pen {{ page.url }} by Jonny Strömberg (@javve) on CodePen +

+ diff --git a/docs/_includes/examples/annotated-example.html b/docs/_includes/examples/annotated-example.html new file mode 100644 index 00000000..f4dcf7a0 --- /dev/null +++ b/docs/_includes/examples/annotated-example.html @@ -0,0 +1,94 @@ +

Basic example of List.js in action

+
+
+ +
+ +
+
+
{% include examples/basic/existing-html.ejs %}
+
+
+
{% include examples/basic/existing-js.ejs %}
+
+
+ +
+
+
{% include examples/basic/add-html.ejs %}
+
+
+
{% include examples/basic/add-js.ejs %}
+
+
+ +
+
+
{% include examples/basic/new-html.ejs %}
+
+
+
{% include examples/basic/new-js.ejs %}
+
+
+ +
+
+ +
+ + + +
+
+

Jonny Strömberg

+

1990

+
+
+

Jonas Arnklint

+

1985

+
+
+

Martina Elm

+

1986

+
+
+

Gustaf Lindqvist

+

1983

+
+
+
+
+ + diff --git a/docs/_includes/javascripts/vendor/bootstrap/tab.js b/docs/_includes/javascripts/vendor/bootstrap/tab.js new file mode 100644 index 00000000..bdf8bbe9 --- /dev/null +++ b/docs/_includes/javascripts/vendor/bootstrap/tab.js @@ -0,0 +1,135 @@ +/* ======================================================================== + * Bootstrap: tab.js v3.0.0 + * http://twbs.github.com/bootstrap/javascript.html#tabs + * ======================================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== */ + + ++function ($) { "use strict"; + + // TAB CLASS DEFINITION + // ==================== + + var Tab = function (element) { + this.element = $(element) + } + + Tab.prototype.show = function () { + var $this = this.element + var $ul = $this.closest('ul:not(.dropdown-menu)') + var selector = $this.data('target') + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + if ($this.parent('li').hasClass('active')) return + + var previous = $ul.find('.active:last a')[0] + var e = $.Event('show.bs.tab', { + relatedTarget: previous + }) + + $this.trigger(e) + + if (e.isDefaultPrevented()) return + + var $target = $(selector) + + this.activate($this.parent('li'), $ul) + this.activate($target, $target.parent(), function () { + $this.trigger({ + type: 'shown.bs.tab' + , relatedTarget: previous + }) + }) + } + + Tab.prototype.activate = function (element, container, callback) { + var $active = container.find('> .active') + var transition = callback + && $.support.transition + && $active.hasClass('fade') + + function next() { + $active + .removeClass('active') + .find('> .dropdown-menu > .active') + .removeClass('active') + + element.addClass('active') + + if (transition) { + element[0].offsetWidth // reflow for transition + element.addClass('in') + } else { + element.removeClass('fade') + } + + if (element.parent('.dropdown-menu')) { + element.closest('li.dropdown').addClass('active') + } + + callback && callback() + } + + transition ? + $active + .one($.support.transition.end, next) + .emulateTransitionEnd(150) : + next() + + $active.removeClass('in') + } + + + // TAB PLUGIN DEFINITION + // ===================== + + var old = $.fn.tab + + $.fn.tab = function ( option ) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tab') + + if (!data) $this.data('bs.tab', (data = new Tab(this))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tab.Constructor = Tab + + + // TAB NO CONFLICT + // =============== + + $.fn.tab.noConflict = function () { + $.fn.tab = old + return this + } + + + // TAB DATA-API + // ============ + + $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { + e.preventDefault() + $(this).tab('show') + }) + +}(window.jQuery); diff --git a/docs/_includes/javascripts/vendor/bootstrap/tooltip.js b/docs/_includes/javascripts/vendor/bootstrap/tooltip.js new file mode 100644 index 00000000..41375c6c --- /dev/null +++ b/docs/_includes/javascripts/vendor/bootstrap/tooltip.js @@ -0,0 +1,386 @@ +/* ======================================================================== + * Bootstrap: tooltip.js v3.0.0 + * http://getbootstrap.com/javascript/#tooltip + * Inspired by the original jQuery.tipsy by Jason Frame + * ======================================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== */ + + ++function ($) { "use strict"; + + // TOOLTIP PUBLIC CLASS DEFINITION + // =============================== + + var Tooltip = function (element, options) { + this.type = + this.options = + this.enabled = + this.timeout = + this.hoverState = + this.$element = null + + this.init('tooltip', element, options) + } + + Tooltip.DEFAULTS = { + animation: true + , placement: 'top' + , selector: false + , template: '
' + , trigger: 'hover focus' + , title: '' + , delay: 0 + , html: false + , container: false + } + + Tooltip.prototype.init = function (type, element, options) { + this.enabled = true + this.type = type + this.$element = $(element) + this.options = this.getOptions(options) + + var triggers = this.options.trigger.split(' ') + + for (var i = triggers.length; i--;) { + var trigger = triggers[i] + + if (trigger == 'click') { + this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this)) + } else if (trigger != 'manual') { + var eventIn = trigger == 'hover' ? 'mouseenter' : 'focus' + var eventOut = trigger == 'hover' ? 'mouseleave' : 'blur' + + this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this)) + this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this)) + } + } + + this.options.selector ? + (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) : + this.fixTitle() + } + + Tooltip.prototype.getDefaults = function () { + return Tooltip.DEFAULTS + } + + Tooltip.prototype.getOptions = function (options) { + options = $.extend({}, this.getDefaults(), this.$element.data(), options) + + if (options.delay && typeof options.delay == 'number') { + options.delay = { + show: options.delay + , hide: options.delay + } + } + + return options + } + + Tooltip.prototype.getDelegateOptions = function () { + var options = {} + var defaults = this.getDefaults() + + this._options && $.each(this._options, function (key, value) { + if (defaults[key] != value) options[key] = value + }) + + return options + } + + Tooltip.prototype.enter = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) + + clearTimeout(self.timeout) + + self.hoverState = 'in' + + if (!self.options.delay || !self.options.delay.show) return self.show() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'in') self.show() + }, self.options.delay.show) + } + + Tooltip.prototype.leave = function (obj) { + var self = obj instanceof this.constructor ? + obj : $(obj.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) + + clearTimeout(self.timeout) + + self.hoverState = 'out' + + if (!self.options.delay || !self.options.delay.hide) return self.hide() + + self.timeout = setTimeout(function () { + if (self.hoverState == 'out') self.hide() + }, self.options.delay.hide) + } + + Tooltip.prototype.show = function () { + var e = $.Event('show.bs.'+ this.type) + + if (this.hasContent() && this.enabled) { + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + var $tip = this.tip() + + this.setContent() + + if (this.options.animation) $tip.addClass('fade') + + var placement = typeof this.options.placement == 'function' ? + this.options.placement.call(this, $tip[0], this.$element[0]) : + this.options.placement + + var autoToken = /\s?auto?\s?/i + var autoPlace = autoToken.test(placement) + if (autoPlace) placement = placement.replace(autoToken, '') || 'top' + + $tip + .detach() + .css({ top: 0, left: 0, display: 'block' }) + .addClass(placement) + + this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element) + + var pos = this.getPosition() + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (autoPlace) { + var $parent = this.$element.parent() + + var orgPlacement = placement + var docScroll = document.documentElement.scrollTop || document.body.scrollTop + var parentWidth = this.options.container == 'body' ? window.innerWidth : $parent.outerWidth() + var parentHeight = this.options.container == 'body' ? window.innerHeight : $parent.outerHeight() + var parentLeft = this.options.container == 'body' ? 0 : $parent.offset().left + + placement = placement == 'bottom' && pos.top + pos.height + actualHeight - docScroll > parentHeight ? 'top' : + placement == 'top' && pos.top - docScroll - actualHeight < 0 ? 'bottom' : + placement == 'right' && pos.right + actualWidth > parentWidth ? 'left' : + placement == 'left' && pos.left - actualWidth < parentLeft ? 'right' : + placement + + $tip + .removeClass(orgPlacement) + .addClass(placement) + } + + var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight) + + this.applyPlacement(calculatedOffset, placement) + this.$element.trigger('shown.bs.' + this.type) + } + } + + Tooltip.prototype.applyPlacement = function(offset, placement) { + var replace + var $tip = this.tip() + var width = $tip[0].offsetWidth + var height = $tip[0].offsetHeight + + // manually read margins because getBoundingClientRect includes difference + var marginTop = parseInt($tip.css('margin-top'), 10) + var marginLeft = parseInt($tip.css('margin-left'), 10) + + // we must check for NaN for ie 8/9 + if (isNaN(marginTop)) marginTop = 0 + if (isNaN(marginLeft)) marginLeft = 0 + + offset.top = offset.top + marginTop + offset.left = offset.left + marginLeft + + $tip + .offset(offset) + .addClass('in') + + // check to see if placing tip in new offset caused the tip to resize itself + var actualWidth = $tip[0].offsetWidth + var actualHeight = $tip[0].offsetHeight + + if (placement == 'top' && actualHeight != height) { + replace = true + offset.top = offset.top + height - actualHeight + } + + if (/bottom|top/.test(placement)) { + var delta = 0 + + if (offset.left < 0) { + delta = offset.left * -2 + offset.left = 0 + + $tip.offset(offset) + + actualWidth = $tip[0].offsetWidth + actualHeight = $tip[0].offsetHeight + } + + this.replaceArrow(delta - width + actualWidth, actualWidth, 'left') + } else { + this.replaceArrow(actualHeight - height, actualHeight, 'top') + } + + if (replace) $tip.offset(offset) + } + + Tooltip.prototype.replaceArrow = function(delta, dimension, position) { + this.arrow().css(position, delta ? (50 * (1 - delta / dimension) + "%") : '') + } + + Tooltip.prototype.setContent = function () { + var $tip = this.tip() + var title = this.getTitle() + + $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title) + $tip.removeClass('fade in top bottom left right') + } + + Tooltip.prototype.hide = function () { + var that = this + var $tip = this.tip() + var e = $.Event('hide.bs.' + this.type) + + function complete() { + if (that.hoverState != 'in') $tip.detach() + } + + this.$element.trigger(e) + + if (e.isDefaultPrevented()) return + + $tip.removeClass('in') + + $.support.transition && this.$tip.hasClass('fade') ? + $tip + .one($.support.transition.end, complete) + .emulateTransitionEnd(150) : + complete() + + this.$element.trigger('hidden.bs.' + this.type) + + return this + } + + Tooltip.prototype.fixTitle = function () { + var $e = this.$element + if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') { + $e.attr('data-original-title', $e.attr('title') || '').attr('title', '') + } + } + + Tooltip.prototype.hasContent = function () { + return this.getTitle() + } + + Tooltip.prototype.getPosition = function () { + var el = this.$element[0] + return $.extend({}, (typeof el.getBoundingClientRect == 'function') ? el.getBoundingClientRect() : { + width: el.offsetWidth + , height: el.offsetHeight + }, this.$element.offset()) + } + + Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) { + return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } : + placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } : + /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width } + } + + Tooltip.prototype.getTitle = function () { + var title + var $e = this.$element + var o = this.options + + title = $e.attr('data-original-title') + || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title) + + return title + } + + Tooltip.prototype.tip = function () { + return this.$tip = this.$tip || $(this.options.template) + } + + Tooltip.prototype.arrow = function () { + return this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow') + } + + Tooltip.prototype.validate = function () { + if (!this.$element[0].parentNode) { + this.hide() + this.$element = null + this.options = null + } + } + + Tooltip.prototype.enable = function () { + this.enabled = true + } + + Tooltip.prototype.disable = function () { + this.enabled = false + } + + Tooltip.prototype.toggleEnabled = function () { + this.enabled = !this.enabled + } + + Tooltip.prototype.toggle = function (e) { + var self = e ? $(e.currentTarget)[this.type](this.getDelegateOptions()).data('bs.' + this.type) : this + self.tip().hasClass('in') ? self.leave(self) : self.enter(self) + } + + Tooltip.prototype.destroy = function () { + this.hide().$element.off('.' + this.type).removeData('bs.' + this.type) + } + + + // TOOLTIP PLUGIN DEFINITION + // ========================= + + var old = $.fn.tooltip + + $.fn.tooltip = function (option) { + return this.each(function () { + var $this = $(this) + var data = $this.data('bs.tooltip') + var options = typeof option == 'object' && option + + if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.tooltip.Constructor = Tooltip + + + // TOOLTIP NO CONFLICT + // =================== + + $.fn.tooltip.noConflict = function () { + $.fn.tooltip = old + return this + } + +}(window.jQuery); diff --git a/docs/_includes/javascripts/vendor/bootstrap/transition.js b/docs/_includes/javascripts/vendor/bootstrap/transition.js new file mode 100644 index 00000000..d3a7abff --- /dev/null +++ b/docs/_includes/javascripts/vendor/bootstrap/transition.js @@ -0,0 +1,56 @@ +/* ======================================================================== + * Bootstrap: transition.js v3.0.0 + * http://getbootstrap.com/javascript/#transitions + * ======================================================================== + * Copyright 2013 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ======================================================================== */ + + ++function ($) { "use strict"; + + // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) + // ============================================================ + + function transitionEnd() { + var el = document.createElement('bootstrap') + + var transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + + for (var name in transEndEventNames) { + if (el.style[name] !== undefined) { + return { end: transEndEventNames[name] } + } + } + } + + // http://blog.alexmaccaw.com/css-transitions + $.fn.emulateTransitionEnd = function (duration) { + var called = false, $el = this + $(this).one($.support.transition.end, function () { called = true }) + var callback = function () { if (!called) $($el).trigger($.support.transition.end) } + setTimeout(callback, duration) + return this + } + + $(function () { + $.support.transition = transitionEnd() + }) + +}(window.jQuery); diff --git a/docs/_includes/javascripts/vendor/highlight.pack.js b/docs/_includes/javascripts/vendor/highlight.pack.js new file mode 100644 index 00000000..7ec26642 --- /dev/null +++ b/docs/_includes/javascripts/vendor/highlight.pack.js @@ -0,0 +1 @@ +var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(//gm,">")}function b(p){for(var o=p.firstChild;o;o=o.nextSibling){if(o.nodeName=="CODE"){return o}if(!(o.nodeType==3&&o.nodeValue.match(/\s+/))){break}}}function h(p,o){return Array.prototype.map.call(p.childNodes,function(q){if(q.nodeType==3){return o?q.nodeValue.replace(/\n/g,""):q.nodeValue}if(q.nodeName=="BR"){return"\n"}return h(q,o)}).join("")}function a(q){var p=(q.className+" "+(q.parentNode?q.parentNode.className:"")).split(/\s+/);p=p.map(function(r){return r.replace(/^language-/,"")});for(var o=0;o"}while(x.length||v.length){var u=t().splice(0,1)[0];y+=l(w.substr(p,u.offset-p));p=u.offset;if(u.event=="start"){y+=s(u.node);r.push(u.node)}else{if(u.event=="stop"){var o,q=r.length;do{q--;o=r[q];y+=("")}while(o!=u.node);r.splice(q,1);while(q'+M[0]+""}else{r+=M[0]}O=A.lR.lastIndex;M=A.lR.exec(L)}return r+L.substr(O)}function z(){if(A.sL&&!e[A.sL]){return l(w)}var r=A.sL?d(A.sL,w):g(w);if(A.r>0){v+=r.keyword_count;B+=r.r}return''+r.value+""}function K(){return A.sL!==undefined?z():H()}function J(M,r){var L=M.cN?'':"";if(M.rB){x+=L;w=""}else{if(M.eB){x+=l(r)+L;w=""}else{x+=L;w=r}}A=Object.create(M,{parent:{value:A}})}function D(L,r){w+=L;if(r===undefined){x+=K();return 0}var N=o(r,A);if(N){x+=K();J(N,r);return N.rB?0:r.length}var O=s(A,r);if(O){var M=A;if(!(M.rE||M.eE)){w+=r}x+=K();do{if(A.cN){x+=""}B+=A.r;A=A.parent}while(A!=O.parent);if(M.eE){x+=l(r)}w="";if(O.starts){J(O.starts,"")}return M.rE?0:r.length}if(t(r,A)){throw new Error('Illegal lexem "'+r+'" for mode "'+(A.cN||"")+'"')}w+=r;return r.length||1}var G=e[E];f(G);var A=G;var w="";var B=0;var v=0;var x="";try{var u,q,p=0;while(true){A.t.lastIndex=p;u=A.t.exec(F);if(!u){break}q=D(F.substr(p,u.index-p),u[0]);p=u.index+q}D(F.substr(p));return{r:B,keyword_count:v,value:x,language:E}}catch(I){if(I.message.indexOf("Illegal")!=-1){return{r:0,keyword_count:0,value:l(F)}}else{throw I}}}function g(s){var o={keyword_count:0,r:0,value:l(s)};var q=o;for(var p in e){if(!e.hasOwnProperty(p)){continue}var r=d(p,s,false);r.language=p;if(r.keyword_count+r.r>q.keyword_count+q.r){q=r}if(r.keyword_count+r.r>o.keyword_count+o.r){q=o;o=r}}if(q.language){o.second_best=q}return o}function i(q,p,o){if(p){q=q.replace(/^((<[^>]+>|\t)+)/gm,function(r,v,u,t){return v.replace(/\t/g,p)})}if(o){q=q.replace(/\n/g,"
")}return q}function m(r,u,p){var v=h(r,p);var t=a(r);if(t=="no-highlight"){return}var w=t?d(t,v,true):g(v);t=w.language;var o=c(r);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=j(o,c(q),v)}w.value=i(w.value,u,p);var s=r.className;if(!s.match("(\\s|^)(language-)?"+t+"(\\s|$)")){s=s?(s+" "+t):t}r.innerHTML=w.value;r.className=s;r.result={language:t,kw:w.keyword_count,re:w.r};if(w.second_best){r.second_best={language:w.second_best.language,kw:w.second_best.keyword_count,re:w.second_best.r}}}function n(){if(n.called){return}n.called=true;Array.prototype.map.call(document.getElementsByTagName("pre"),b).filter(Boolean).forEach(function(o){m(o,hljs.tabReplace)})}function k(){window.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}var e={};this.LANGUAGES=e;this.highlight=d;this.highlightAuto=g;this.fixMarkup=i;this.highlightBlock=m;this.initHighlighting=n;this.initHighlightingOnLoad=k;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)";this.BNR="\\b(0b[01]+)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\[\\s\\S]",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.BNM={cN:"number",b:this.BNR,r:0};this.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gim]*/,i:/\n/,c:[this.BE,{b:/\[/,e:/\]/,r:0,c:[this.BE]}]};this.inherit=function(q,r){var o={};for(var p in q){o[p]=q[p]}if(r){for(var p in r){o[p]=r[p]}}return o}}();hljs.LANGUAGES.javascript=function(a){return{k:{keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const",literal:"true false null undefined NaN Infinity"},c:[a.ASM,a.QSM,a.CLCM,a.CBLCLM,a.CNM,{b:"("+a.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[a.CLCM,a.CBLCLM,a.REGEXP_MODE,{b:/;/,sL:"xml"}],r:0},{cN:"function",bWK:true,e:/{/,k:"function",c:[{cN:"title",b:/[A-Za-z$_][0-9A-Za-z$_]*/},{cN:"params",b:/\(/,e:/\)/,c:[a.CLCM,a.CBLCLM],i:/["'\(]/}],i:/\[|%/}]}}(hljs);hljs.LANGUAGES.css=function(a){var b="[a-zA-Z-][a-zA-Z0-9_-]*";var c={cN:"function",b:b+"\\(",e:"\\)",c:["self",a.NM,a.ASM,a.QSM]};return{cI:true,i:"[=/|']",c:[a.CBLCLM,{cN:"id",b:"\\#[A-Za-z0-9_-]+"},{cN:"class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"attr_selector",b:"\\[",e:"\\]",i:"$"},{cN:"pseudo",b:":(:)?[a-zA-Z0-9\\_\\-\\+\\(\\)\\\"\\']+"},{cN:"at_rule",b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{cN:"at_rule",b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:true,eE:true,r:0,c:[c,a.ASM,a.QSM,a.NM]}]},{cN:"tag",b:b,r:0},{cN:"rules",b:"{",e:"}",i:"[^\\s]",r:0,c:[a.CBLCLM,{cN:"rule",b:"[^\\s]",rB:true,e:";",eW:true,c:[{cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:true,i:"[^\\s]",starts:{cN:"value",eW:true,eE:true,c:[c,a.NM,a.QSM,a.ASM,a.CBLCLM,{cN:"hexcolor",b:"#[0-9A-Fa-f]+"},{cN:"important",b:"!important"}]}}]}]}]}}(hljs);hljs.LANGUAGES.xml=function(a){var c="[A-Za-z0-9\\._:-]+";var b={eW:true,r:0,c:[{cN:"attribute",b:c,r:0},{b:'="',rB:true,e:'"',c:[{cN:"value",b:'"',eW:true}]},{b:"='",rB:true,e:"'",c:[{cN:"value",b:"'",eW:true}]},{b:"=",c:[{cN:"value",b:"[^\\s/>]+"}]}]};return{cI:true,c:[{cN:"pi",b:"<\\?",e:"\\?>",r:10},{cN:"doctype",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},{cN:"comment",b:"",r:10},{cN:"cdata",b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"|$)",e:">",k:{title:"style"},c:[b],starts:{e:"",rE:true,sL:"css"}},{cN:"tag",b:"|$)",e:">",k:{title:"script"},c:[b],starts:{e:"<\/script>",rE:true,sL:"javascript"}},{b:"<%",e:"%}",sL:"vbscript"},{cN:"tag",b:"",r:0,c:[{cN:"title",b:"[^ /><]+"},b]}]}}(hljs);hljs.LANGUAGES.json=function(a){var e={literal:"true false null"};var d=[a.QSM,a.CNM];var c={cN:"value",e:",",eW:true,eE:true,c:d,k:e};var b={b:"{",e:"}",c:[{cN:"attribute",b:'\\s*"',e:'"\\s*:\\s*',eB:true,eE:true,c:[a.BE],i:"\\n",starts:c}],i:"\\S"};var f={b:"\\[",e:"\\]",c:[a.inherit(c,{cN:null})],i:"\\S"};d.splice(d.length,0,b,f);return{c:d,k:e,i:"\\S"}}(hljs); \ No newline at end of file diff --git a/docs/_includes/javascripts/vendor/jquery-1.8.3.min.js b/docs/_includes/javascripts/vendor/jquery-1.8.3.min.js new file mode 100644 index 00000000..83589daa --- /dev/null +++ b/docs/_includes/javascripts/vendor/jquery-1.8.3.min.js @@ -0,0 +1,2 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */ +(function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write(""),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t
a",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="
t
",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="
",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;ti.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="
",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="

",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t0)for(i=r;i=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*\s*$/g,Nt={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X
","
"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1>");try{for(;r1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]===""&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("
").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window); \ No newline at end of file diff --git a/docs/_includes/menu.html b/docs/_includes/menu.html new file mode 100644 index 00000000..856062d0 --- /dev/null +++ b/docs/_includes/menu.html @@ -0,0 +1,33 @@ +
+ +

Overview

+ + +

Documentation

+ + +

Plugins

+ + +

Examples

+ +
diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 00000000..3471bd8d --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,107 @@ + + + + + + + + + + + + {{ page.title }} - {{ site.title }} + + + + + + + + + + + + + + + + + + + + + + + + + {% if jekyll.environment !== 'production' %} + + {% endif %} + + + + + + +
+
+ {% include menu.html %} +
+ {{ content }} +
+
+
+ + + + {% include carbon.html %} + + + + +
+ + + + + + diff --git a/docs/_layouts/game.html b/docs/_layouts/game.html new file mode 100644 index 00000000..b364b8a8 --- /dev/null +++ b/docs/_layouts/game.html @@ -0,0 +1,37 @@ +{% assign collection = site[page.collection] %} + + + + + {% include head.html %} + + + +
+ {% include menus/main.html %} + +
+

{{page.title}}

+

{{page.description}}

+
+ +
+ {% if page.overlay %}
{% endif %} +
+ +
+
+ {% include menus/game.html collection=collection %} + +
+ {{ content }} + +
+
+ {% include newsletter.html %} +
+ + {% include footer.html %} + + + diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss new file mode 100644 index 00000000..3919b171 --- /dev/null +++ b/docs/_sass/_base.scss @@ -0,0 +1,194 @@ +/** + * Basic styling + */ +body { + font: $base-font-weight #{$base-font-size}/#{$base-line-height} $base-font-family; + color: $text-color; + background-color: $background-color; + -webkit-text-size-adjust: 100%; + -webkit-font-feature-settings: "kern" 1; + -moz-font-feature-settings: "kern" 1; + -o-font-feature-settings: "kern" 1; + font-feature-settings: "kern" 1; + font-kerning: normal; + @include transition(background-color .2s ease-in-out); +} + + + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +%vertical-rhythm { + margin-top:0; + margin-bottom: $spacing-unit / 2; +} + + + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; +} + + + +/** + * Figures + */ +figure > img { + display: block; +} + +figcaption { + font-size: $small-font-size; +} + + + +/** + * Lists + */ +ul, ol { + margin-left: $spacing-unit; +} + +li { + > ul, + > ol { + margin-bottom: 0; + } +} + + + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-family: $headline-font-family; + font-weight: $headline-font-weight; +} + + + +/** + * Links + */ +a { + color: $brand-color; + text-decoration: none; + + &:visited { + color: darken($brand-color, 15%); + } + + &:hover { + color: $text-color; + text-decoration: underline; + } +} + + + +/** + * Blockquotes + */ +blockquote { + color: $grey-color; + border-left: 4px solid $grey-color-light; + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + + + +/** + * Code formatting + */ +pre, +code { + font-size: 15px; + border: 1px solid $grey-color-light; + border-radius: 3px; + background-color: #eef; +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + overflow-x: auto; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + + + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit} * 2)); + max-width: calc(#{$content-width} - (#{$spacing-unit} * 2)); + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; + + @include media-query($on-laptop) { + max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit})); + max-width: calc(#{$content-width} - (#{$spacing-unit})); + padding-right: $spacing-unit / 2; + padding-left: $spacing-unit / 2; + } +} + +.content-container { + background-color: #fff; + box-sizing: border-box; + max-width: $content-width; + margin:- $spacing-unit auto $spacing-unit; +} +.content { + @include transition(all .2s ease-in-out); + padding: $spacing-unit; + @include media-query($on-laptop) { + padding:$spacing-unit * 2; + } + &:after { + content: ""; + display: table; + clear: both; + } +} + +.image-shadow-box { + border: solid $spacing-unit / 2 #fff; + box-shadow: 5px 10px 40px rgba(0,0,0,.3); +} +.image-right-50 { + float:right; + margin-left:$spacing-unit * 2; + margin-bottom:$spacing-unit; + max-width: 45%; +} diff --git a/docs/_sass/_carbonads.scss b/docs/_sass/_carbonads.scss new file mode 100644 index 00000000..359aa46d --- /dev/null +++ b/docs/_sass/_carbonads.scss @@ -0,0 +1,71 @@ +@keyframes fadein { + from { + transform: translateY(100%); + opacity: 0; + } + to { + opacity: 1; + transform: translateY(0); + } +} +@-moz-keyframes fadein { + from { + transform: translateY(100%); + opacity: 0; + } + to { + opacity: 1; + transform: translateY(0); + } +} +@-webkit-keyframes fadein { + from { + transform: translateY(100%); + opacity: 0; + } + to { + opacity: 1; + transform: translateY(0); + } +} +@-ms-keyframes fadein { + from { + transform: translateY(100%); + opacity: 0; + } + to { + opacity: 1; + transform: translateY(0); + } +} +@-o-keyframes fadein { + from { + transform: translateY(100%); + opacity: 0; + } + to { + opacity: 1; + transform: translateY(0); + } +} + +#carbonads-container { + position: fixed; + z-index: 10000; + right:0; + bottom:0; + opacity:0; + transform: translateY(100%); + -webkit-animation: fadein 1s 2s forwards; + -moz-animation: fadein 1s 2s forwards; + -ms-animation: fadein 1s 2s forwards; + -o-animation: fadein 1s 2s forwards; + animation: fadein 1s 2s forwards +} + +.carbonad { + background-image:none !important; + background-color:rgba(253, 253, 253, 0.88) !important; + border:none !important; + border-top-left-radius: 5px !important; +} diff --git a/docs/_sass/_mixins.scss b/docs/_sass/_mixins.scss new file mode 100644 index 00000000..eb4208ae --- /dev/null +++ b/docs/_sass/_mixins.scss @@ -0,0 +1,19 @@ +%clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} + +@mixin media-query($device) { + @media screen and (min-width: $device) { + @content; + } +} + + +@mixin transition($value){ + -webkit-transition: $value; + transition: $value; +} diff --git a/docs/_sass/_normalize.scss b/docs/_sass/_normalize.scss new file mode 100644 index 00000000..c2de8df9 --- /dev/null +++ b/docs/_sass/_normalize.scss @@ -0,0 +1,406 @@ +/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/** + * Correct `block` display not defined in IE 8/9. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} + +/** + * Correct `inline-block` display not defined in IE 8/9. + */ + +audio, +canvas, +video { + display: inline-block; +} + +/** + * Prevent modern browsers from displaying `audio` without controls. + * Remove excess height in iOS 5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/** + * Address `[hidden]` styling not present in IE 8/9. + * Hide the `template` element in IE, Safari, and Firefox < 22. + */ + +[hidden], +template { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/** + * 1. Set default font family to sans-serif. + * 2. Prevent iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-family: sans-serif; /* 1 */ + -ms-text-size-adjust: 100%; /* 2 */ + -webkit-text-size-adjust: 100%; /* 2 */ +} + +/** + * Remove default margin. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/** + * Remove the gray background color from active links in IE 10. + */ + +a { + background: transparent; +} + +/** + * Address `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/** + * Improve readability when focused and also mouse hovered in all browsers. + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/** + * Address variable `h1` font-size and margin within `section` and `article` + * contexts in Firefox 4+, Safari 5, and Chrome. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +/** + * Address styling not present in IE 8/9, Safari 5, and Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/** + * Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome. + */ + +b, +strong { + font-weight: bold; +} + +/** + * Address styling not present in Safari 5 and Chrome. + */ + +dfn { + font-style: italic; +} + +/** + * Address differences between Firefox and other browsers. + */ + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +/** + * Address styling not present in IE 8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/** + * Correct font family set oddly in Safari 5 and Chrome. + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + font-size: 1em; +} + +/** + * Improve readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre-wrap; +} + +/** + * Set consistent quote types. + */ + +q { + quotes: "\201C" "\201D" "\2018" "\2019"; +} + +/** + * Address inconsistent and variable font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` affecting `line-height` in all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/** + * Remove border when inside `a` element in IE 8/9. + */ + +img { + border: 0; +} + +/** + * Correct overflow displayed oddly in IE 9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/** + * Address margin not present in IE 8/9 and Safari 5. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/** + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/** + * 1. Correct `color` not being inherited in IE 8/9. + * 2. Remove padding so people aren't caught out if they zero out fieldsets. + */ + +legend { + border: 0; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Correct font family not being inherited in all browsers. + * 2. Correct font size not being inherited in all browsers. + * 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome. + */ + +button, +input, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 2 */ + margin: 0; /* 3 */ +} + +/** + * Address Firefox 4+ setting `line-height` on `input` using `!important` in + * the UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/** + * Address inconsistent `text-transform` inheritance for `button` and `select`. + * All other form control elements do not inherit `text-transform` values. + * Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+. + * Correct `select` style inheritance in Firefox 4+ and Opera. + */ + +button, +select { + text-transform: none; +} + +/** + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Correct inability to style clickable `input` types in iOS. + * 3. Improve usability and consistency of cursor style between image-type + * `input` and others. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ +} + +/** + * Re-set default cursor for disabled elements. + */ + +button[disabled], +html input[disabled] { + cursor: default; +} + +/** + * 1. Address box sizing set to `content-box` in IE 8/9/10. + * 2. Remove excess padding in IE 8/9/10. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. + * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome + * (include `-moz` to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/** + * Remove inner padding and search cancel button in Safari 5 and Chrome + * on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * Remove inner padding and border in Firefox 4+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/** + * 1. Remove default vertical scrollbar in IE 8/9. + * 2. Improve readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/** + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/docs/_sass/layouts/game.scss b/docs/_sass/layouts/game.scss new file mode 100644 index 00000000..efe86ddf --- /dev/null +++ b/docs/_sass/layouts/game.scss @@ -0,0 +1,88 @@ +.game-cover { + background-color:#111; + position: relative; + overflow:hidden; + .game-cover-overlay { + position: absolute; + top:0; + bottom:0; + right:0; + left:0; + margin:auto; + background-color: #000; + z-index: $z-game-cover-overlay; + } + .game-cover-image { + @include transition(all .4s ease-in-out); + background-position:center; + background-repeat: no-repeat; + background-size:cover; + transform:scale(1.4); + opacity:0; + position:absolute; + left:0; + top:0; + bottom:0; + right:0; + z-index: $z-game-cover-image; + &.image-ready { + opacity:1; + transform:scale(1.1); + } + } +} + +.game-info { + padding: $spacing-unit * 4 0 $spacing-unit * 6; + z-index: $z-game-info; + position: relative; +} +.game-title { + font-size: $larger-font-size * 2; + color:#fff; + font-weight: 700; + text-align: center; + line-height: 1; + margin: 0; +} +.game-description { + font-size: $larger-font-size; + color:#fff; + text-align: center; + margin: 0; +} + +.game-menu { + font-size: $large-font-size; + border-bottom:solid 1px rgba(0,0,0,.1); + margin:0 0 $spacing-unit * 2; + padding: 0; + .game-menu-item { + list-style-type: none; + display: inline-block; + margin-right: $spacing-unit; + } + .game-menu-link { + @include transition(all .2s ease-in-out); + display: inline-block; + padding: 0 0 $spacing-unit / 2; + color:$text-color; + &:hover, + &.game-menu-link-active { + box-shadow: 0 1px 0 rgba(0,0,0,.5); + text-decoration: none; + } + } +} + + + + +.game { + .content-container { + position: relative; + z-index: $z-game-content; + } + .content { + } +} diff --git a/docs/_sass/layouts/start.scss b/docs/_sass/layouts/start.scss new file mode 100644 index 00000000..29416932 --- /dev/null +++ b/docs/_sass/layouts/start.scss @@ -0,0 +1,16 @@ +.start-cover { + @extend .game-cover; + height:80vh; + .start-cover-image { + @extend .game-cover-image; + } +} + + +.start { + .content-container { + position: relative; + z-index: $z-game-content; + } + .content {} +} diff --git a/docs/_sass/vendor/bootstrap/tooltip.scss b/docs/_sass/vendor/bootstrap/tooltip.scss new file mode 100644 index 00000000..bc2172d1 --- /dev/null +++ b/docs/_sass/vendor/bootstrap/tooltip.scss @@ -0,0 +1,103 @@ +// +// Tooltips +// -------------------------------------------------- + +// Tooltips +// ------------------------- +$tooltip-max-width: 200px; +$tooltip-color: #fff; +$tooltip-bg: #000; + +$tooltip-arrow-width: 5px; +$tooltip-arrow-color: $tooltip-bg; + +// Base class +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + font-size: 12px; + line-height: 1.4; + opacity: 0; + + &.in { opacity: .9; } + &.top { margin-top: -3px; padding: $tooltip-arrow-width 0; } + &.right { margin-left: 3px; padding: 0 $tooltip-arrow-width; } + &.bottom { margin-top: 3px; padding: $tooltip-arrow-width 0; } + &.left { margin-left: -3px; padding: 0 $tooltip-arrow-width; } +} + +// Wrapper for the tooltip content +.tooltip-inner { + max-width: $tooltip-max-width; + padding: 3px 8px; + color: $tooltip-color; + text-align: center; + text-decoration: none; + background-color: $tooltip-bg; + border-radius: 4px; +} + +// Arrows +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip { + &.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -$tooltip-arrow-width; + border-width: $tooltip-arrow-width $tooltip-arrow-width 0; + border-top-color: $tooltip-arrow-color; + } + &.top-left .tooltip-arrow { + bottom: 0; + left: $tooltip-arrow-width; + border-width: $tooltip-arrow-width $tooltip-arrow-width 0; + border-top-color: $tooltip-arrow-color; + } + &.top-right .tooltip-arrow { + bottom: 0; + right: $tooltip-arrow-width; + border-width: $tooltip-arrow-width $tooltip-arrow-width 0; + border-top-color: $tooltip-arrow-color; + } + &.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -$tooltip-arrow-width; + border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0; + border-right-color: $tooltip-arrow-color; + } + &.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -$tooltip-arrow-width; + border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width; + border-left-color: $tooltip-arrow-color; + } + &.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -$tooltip-arrow-width; + border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; + border-bottom-color: $tooltip-arrow-color; + } + &.bottom-left .tooltip-arrow { + top: 0; + left: $tooltip-arrow-width; + border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; + border-bottom-color: $tooltip-arrow-color; + } + &.bottom-right .tooltip-arrow { + top: 0; + right: $tooltip-arrow-width; + border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; + border-bottom-color: $tooltip-arrow-color; + } +} diff --git a/docs/_sass/vendor/highlight/xcode.scss b/docs/_sass/vendor/highlight/xcode.scss new file mode 100644 index 00000000..881ce2f9 --- /dev/null +++ b/docs/_sass/vendor/highlight/xcode.scss @@ -0,0 +1,156 @@ +/* + +XCode style (c) Angel Garcia + +*/ + +pre code { + display: block; padding: 0.5em; + background: #fff; color: black; +} + +pre .comment, +pre .template_comment, +pre .javadoc, +pre .comment * { + color: rgb(0,106,0); +} + +pre .keyword, +pre .literal, +pre .nginx .title { + color: rgb(170,13,145); +} +pre .method, +pre .list .title, +pre .tag .title, +pre .setting .value, +pre .winutils, +pre .tex .command, +pre .http .title, +pre .request, +pre .status { + color: #008; +} + +pre .envvar, +pre .tex .special { + color: #660; +} + +pre .string { + color: rgb(196,26,22); +} +pre .tag .value, +pre .cdata, +pre .filter .argument, +pre .attr_selector, +pre .apache .cbracket, +pre .date, +pre .regexp { + color: #080; +} + +pre .sub .identifier, +pre .pi, +pre .tag, +pre .tag .keyword, +pre .decorator, +pre .ini .title, +pre .shebang, +pre .prompt, +pre .hexcolor, +pre .rules .value, +pre .css .value .number, +pre .symbol, +pre .symbol .string, +pre .number, +pre .css .function, +pre .clojure .title, +pre .clojure .built_in, +pre .function .title, +pre .coffeescript .attribute { + color: rgb(28,0,207); +} + +pre .class .title, +pre .haskell .type, +pre .smalltalk .class, +pre .javadoctag, +pre .yardoctag, +pre .phpdoc, +pre .typename, +pre .tag .attribute, +pre .doctype, +pre .class .id, +pre .built_in, +pre .setting, +pre .params, +pre .clojure .attribute { + color: rgb(92,38,153); +} + +pre .variable { + color: rgb(63,110,116); +} +pre .css .tag, +pre .rules .property, +pre .pseudo, +pre .subst { + color: #000; +} + +pre .css .class, pre .css .id { + color: #9B703F; +} + +pre .value .important { + color: #ff7700; + font-weight: bold; +} + +pre .rules .keyword { + color: #C5AF75; +} + +pre .annotation, +pre .apache .sqbracket, +pre .nginx .built_in { + color: #9B859D; +} + +pre .preprocessor, +pre .preprocessor * { + color: rgb(100,56,32); +} + +pre .tex .formula { + background-color: #EEE; + font-style: italic; +} + +pre .diff .header, +pre .chunk { + color: #808080; + font-weight: bold; +} + +pre .diff .change { + background-color: #BCCFF9; +} + +pre .addition { + background-color: #BAEEBA; +} + +pre .deletion { + background-color: #FFC8BD; +} + +pre .comment .yardoctag { + font-weight: bold; +} + +pre .method .id { + color: #000; +} diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss new file mode 100644 index 00000000..dc87cffd --- /dev/null +++ b/docs/assets/css/style.scss @@ -0,0 +1,772 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- + +@import "normalize"; +@import "mixins"; +@import "vendor/bootstrap/tooltip"; +@import "vendor/highlight/xcode"; +@import "carbonads"; + +$blue: #28a8e0; +$green: #6cd25e; +$grey: #555; +$orange: #f59621; +$lightGrey: #edf4f4; +$black: #2e2e2e; + +$menuWidth: 250px; + +/* * * * * * * * * * * * * * * * * * * * * +* General +* * * * * * * * * * * * * * * * * * * * */ +html { + font-size: 62.5%; +} + +body { + background-color:#fff; + font-size:16px; + font:400 1.6rem/1.4 'source sans pro', 'helvetica neue', helvetica, arial; + color:$grey; + padding:0; //80px 0 150px; +} + +a { + color:$blue; + &:hover { + color:darken($blue, 10%); + } +} +p { + font-size: 16px; + font-size:1.6rem; + line-height:1.3; + strong, b { + color:darken($grey, 20%); + font-weight: 500; + } +} +h1 { + font-size: 50px; + font-size: 5rem; + color:$orange; + font-weight:400; + margin:0 0 30px; +} +h2 { + font-size: 30px; + font-size:3rem; + color:$black; + font-weight:400; +} +h3 { + font-weight:600; + font-size:2rem; + margin-bottom:10px; + color:$black; +} +h4 { + font-weight:600; + font-size: 16px; + font-size:1.6rem; + margin-bottom:10px; + color:$black; +} + +.btn { + font-size: 18px; + font-size: 1.8rem; + padding:8px 30px; + border-radius: 6px; + border:solid 2px $blue; + display:inline-block; + color:$blue; + text-decoration: none; + + &.btn-primary { + border-color:$blue; + background-color: $blue; + color:#fff; + font-weight: 500; + &:hover { + background-color: darken($blue, 10%); + color:#eee; + } + } +} +.btn:hover { + text-decoration: none; + color:darken($blue, 10%); + border-color:darken($blue, 10%); +} +.donate-form { + display:inline-block; + margin-left:5px; +} +.donate { + border:none; + background:none; + padding:0; + margin:0 10px 0 0; + float:left; + span { + // #gradient > .vertical(#fafafa, #eaeaea); + border: 1px solid #b7b7b7; + border-bottom-color: #888; + display:block; + padding: 2px 5px 2px 4px; + color: #111; + text-decoration: none; + text-shadow: 0 1px 0 #fff; + white-space: nowrap; + cursor: pointer; + border-radius: 3px; + font: bold 11px/14px "Helvetica Neue",Helvetica,Arial,sans-serif; + padding-left:20px; + position:relative; + &:hover { + color:#fff; + text-decoration: none; + background-color:$blue; + text-shadow: 0 1px 0 darken($blue, 20%); + background-image:none; + border-color:darken($blue, 10%); + } + &:before { + content:" "; + display: block; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIChNYWNpbnRvc2gpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjMyOUYyMjMyNTAzNDExRTM4RjkxRjY4OERCMDI3N0ZEIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjMyOUYyMjMzNTAzNDExRTM4RjkxRjY4OERCMDI3N0ZEIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MzI5RjIyMzA1MDM0MTFFMzhGOTFGNjg4REIwMjc3RkQiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzI5RjIyMzE1MDM0MTFFMzhGOTFGNjg4REIwMjc3RkQiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6BnPLgAAAENklEQVR42tRVTUxjVRT+3usr7WtLy//wV0YIIFBLJwYNkChOnGCMCZMYEo2uTMRodKFxdi5cqUwMKxdG3ao4sxuTyWAwJIoybQBxhkmGQAoMM/xJSynQn9f29fndpyXMj8bNLDzJyXt9997vnvOd75xKhmHgYZiMh2TKvR80TauOx+PuWCxWmclkLJIk5elWukpbLS8vX3Y6nZLFYkn9J+Ctra1HQ6HQe0tLSy+n05rHZrfDoapQHQ5YrVbIkgRJlpDP5zN2m22+qanpemtr65jL5brM44l7gSXBcTAYfH109LuvVKcLrS0tKCku5kIOei6FXCYBxWKF010Kt6cMqsuNREpDOBzmehb9/f3nvF7vyH3Aa2trJz45f36rvs4Lh5zByo0gbi0vIBb5A6mshlwuL7bBYpGh2uyoqj2J9s4n0P3M89AMBalkQvf7/V8uLi4u2Gy2+q6uri9qamrWpWAo9NTFCxd/jqzewOK1n2Dk09AJlaNYstm7q0w2TLfSVacHz734GvxPnsby8rK5J5Vihrnc7aGhoReUvJ5HW2sTLvxyGdE4QY2/DjNI6Lr5+Du3Y+/cY0nGMRsK4sTJdtR7vR+fHRj4TNf1V4aHh0fm5uYSCjnOO1wefPr51/j+0iVM/HAFG2thxON7BDIgGyYODAEsW1BWVomGphY8ffoMfIEAZmd/g+8xf5gFztO/kWV5JJvNHiqVlRWYn78Om13Fu++fw1tvv4M7t29hZWUVWlrD4T4vkGS43B4U2YrAQsGuOnBwcIjV1RVmleNlvA2IRiKRwObmJnp7e8sV6lJUB3t7e6A+4XIVo8PnR+epxykx2cybEiPfWSQSScRiu9jd3eX7ockpQdHY2HiHmZeNj4+fKaaiOjs70woXbtI/2tnZ+aC0tJTRSWYUQrtsAgg5siBgsyCZTJouLiGf5tPn84kLuiYmJl6amZl5dnBwcKCqqmrT1PHCwoI0PT291tzcXF9SUgI7m6OoqOgIWACwI80IC+AHBwdgMGhrawtTFdsbGxuRnp6eN/v6+jaPGkTY2NiYO51OX6muru51sNsURTkCFtEJYOHcQxoSJh288GpFRcWHHo8nzaCm6+rqNGZs3NXSHR0d6cnJyeT6+rrJG8UOVvgIuECHiDoajWJ/fx/t7e3XyOePTF0EYSWMo9De0vGxydY+Rb/KaO2MxKSkAC6iFZFub2+bVLDbRgOBwKsClBnaeUbl3t0HTrfu7u7fOdW6WIRfOYw84psoolCFoEA4h44A/bahoeENqkgmIPHkDD113xASxjRlFsyU3tTUlEpgC+eIypQbSMUjXNNra2unOdWi1LLMSA23281BZ9MInnzgdCsYAWzkSiv8ZrUlMZO5Ryef5kY2gRjMQjViJnOampb9V+DjxkvMNbpdzH9RbboAEsM/W6j+P5n0v/vP+1OAAQAqLhyT7hjz3gAAAABJRU5ErkJggg==); + + background-repeat: no-repeat; + background-size: 14px; + width:14px; + height:14px; + z-index: 1; + position: absolute; + left:3px; + top:3px; + } + } +} +.donate-pixel { + position: absolute; +} + +table { + border-collapse:collapse; + width:100%; + margin-bottom:10px; +} +th { + background-color:rgba(0,0,0,.1); + border:solid 1px rgba(255,255,255,.1); + padding:10px 10px; + text-align:left; + font-weight: bold; + color:#ddd +} +td { + padding:10px 10px; + border:solid 1px rgba(255,255,255,.1); +} + + +/* * * * * * * * * * * * * * * * * * * * * +* Meny +* * * * * * * * * * * * * * * * * * * * */ +.menu { + padding:0 20px; + z-index: 100; + //margin-top:-80px; + //margin-bottom:40px; + margin:0; + background-color: $black; + + ul { + display:inline-block; + margin:0; + padding:0; + } + li { + display:inline-block; + margin:0 30px 0 0; + } + a { + line-height:60px; + display: inline-block; + text-decoration: none; + color:#fff; + &:hover, + &.active { + color:#eee; + } + &.active { + font-weight: 500; + color:$black; + } + } +} + +.menu-sub { + margin:-40px 0 20px; + color: #ccc; + background-color:$lightGrey; + font-size:14px; + font-size:1.4rem; + @extend %clearfix; + ul { + padding: 15px 0 13px; + margin:0; + } + li { + display: inline-block; + margin-right:20px; + &.active { + a { + color:#222; + } + } + } +} +.example-header { + margin-bottom:15px; + h1 { + margin-bottom:0; + } + p { + margin-top:10px; + } +} + +.continue { + margin-top: 30px; + border-top: solid 1px #eee; + padding-top: 15px; + text-align: right; + font-weight: bold; + color: #222; +} + +.footer { + //position: fixed; + //bottom:0; + clear:both; + width:100%; + height:20px; + padding:20px 0; + background-color:#111; + text-align: center; + a { + color:#fff; + &:hover { + color:$lightGrey; + } + } + .misc-share-button { + display: inline-block; + height: 20px; + overflow: hidden; + } + .tweet { + width:100px; + } + .facebook { + width:90px; + .fb_iframe_widget span { + vertical-align: top !important; + } + } +} + +/* * * * * * * * * * * * * * * * * * * * * +* Start page +* * * * * * * * * * * * * * * * * * * * */ + +.intro { + @extend %clearfix; + margin:50px auto; + max-width: 900px; + padding:30px; + box-sizing: border-box; + .intro-logo { + text-align: center; + img { + max-width: 80%; + } + float: left; + width:30%; + } + .intro-text { + float: left; + width:70%; + h1 { + font-size: 72px; + font-size: 7.2rem; + margin: 0 0 1px; + small { + font-size: 30px; + font-size: 3rem; + color:lighten($grey, 20%); + } + } + h2 { + font-size: 25px; + font-size: 2.5rem; + font-weight: 300; + margin: 0 0 25px; + color:lighten($grey, 20%); + a { + font-weight: 500; + } + em { + color:darken($grey, 20%); + } + } + .btn { + margin-right:10px; + } + } +} + +.misc { + @extend %clearfix; + clear:both; + background-color:$lightGrey; + padding:30px; + margin:0 -30px -30px; + color:#333; + h3 { + margin:0 0 5px; + } + .misc-share { + margin-bottom:5px; + } + .misc-author { + .misc-author-pic { + float:left; + margin-right:20px; + border-radius: 5px; + } + h4 { + margin-top:0; + margin-bottom: 4px; + } + p { + font-size: 14px; + font-size:1.4rem; + color:lighten($black, 10%); + margin-top:0; + margin-bottom: 10px; + } + } +} +// .loaded .misc-carbon:before & { +// content:"Everytime you hide an ad... An open source developer goes to go to bed instead of buying a coffee :'(\A <--- Cheat? Donate! :D"; +// white-space: pre-wrap; +// width:260px; +// display: block; +// text-align: center; +// left:20px; +// top:20px; +// position: relative; +// font-size: 12px; +// font-size:1.2rem; +// font-family: monaco, monospace; +// } + +.startpage-quotes { + @extend %clearfix; + padding:60px 0; + .startpage-quotes-quote { + width:33%; + float:left; + padding: 0 10px; + box-sizing: border-box; + } +} +.startpage-more-examples { + clear:both; + border-top:solid 1px #eee; + ul { + padding:0 !important; + margin:0; + } + li { + display:inline-block; + margin-right:15px; + } +} + +.startpage-examples { + .startpage-example { + @extend %clearfix; + display:none; + &.active { + display: block; + } + } +} +.docs-content .startpage-example pre { + margin:0; + padding:30px; +} +.annotated-examples { + @extend %clearfix; + background-color: $black; + margin:-30px -30px 0; + & > h2 { + max-width: none !important; + text-align: center; + } +} +.annotated-code { + float:left; + width:65%; + .startpage-example-html { + position: relative; + border-bottom:solid 1px #fff; + } + .nav-pills { + @extend %clearfix; + border-bottom: solid 1px #fff; + background-color: $lightGrey; + padding:0; + margin:0; + list-style-type: none; + & > li { + width:33%; + float:left; + text-align: center; + margin:0; + border-right: solid 1px #fff; + &:last-child { + border-right:none; + } + &.active { + background-color: rgba(0,0,0,.05); + & > a { + color:$black; + } + } + & > a { + display: block; + transition: all .2s ease-in-out; + padding:10px 0; + text-decoration: none; + &:hover { + background-color: rgba(0,0,0,.04); + } + } + } + } +} + +.annotated-list { + float:left; + width:35%; + padding: 15px 30px; + box-sizing: border-box; + @extend %clearfix; + .list { + padding-top:20px; + & > div { + padding:10px 0; + border-top:solid 1px rgba(255,255,255,.1); + } + } + .avatar { + max-width: 150px; + img { + max-width: 100%; + } + } + h3 { + font-size:16px; + font-size: 1.6rem; + margin:0 0 3px; + font-weight: bold; + color:#fff; + } + p { + margin:0; + color:#eee; + } + + input { + border-radius: 25px; + padding:7px 14px; + background-color: transparent; + border:solid 1px rgba(255,255,255,.2); + width:100%; + box-sizing: border-box; + color:#fff; + margin-bottom:5px; + } + input:focus { + outline:none; + border-color:#aaa; + } + .sort { + font-size:12px; + font-size: 1.2rem; + padding:5px 15px; + border-radius: 25px; + border:none; + display:inline-block; + color:#fff; + text-decoration: none; + background-color: rgba(255,255,255,.05); + margin:2px 0; + } + .sort:hover { + text-decoration: none; + background-color: rgba(255,255,255,.1); + } + .sort:focus { + outline:none; + } + .sort:after { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-bottom: 4px solid transparent; + content:""; + position: relative; + top:-10px; + right:-4px; + } + .sort.asc:after { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #fff; + content:""; + position: relative; + top:11px; + right:-4px; + } + .sort.desc:after { + width: 0; + height: 0; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-bottom: 4px solid #fff; + content:""; + position: relative; + top:-9px; + right:-4px; + } +} + +/* * * * * * * * * * * * * * * * * * * * * +* Examples +* * * * * * * * * * * * * * * * * * * * */ +.nav-tabs { + .active a { + background-color: $lightGrey !important; + } +} + + +/* * * * * * * * * * * * * * * * * * * * * +* Performance +* * * * * * * * * * * * * * * * * * * * */ + +#size { + margin-left:100px; + width:590px; +} +#time-table { + margin-bottom:40px; +} +#performance-list .scroll-container { + height:300px; + overflow:scroll; + margin-bottom:10px; +} +#performance-share { + padding:13px 20px 5px; + clear:both; + border-radius: 10px; + margin:0 0 50px 80px; + width:520px; + border-bottom:solid 1px #666; + background-color: rgba(255,255,255,0.1); +} + + +/* * * * * * * * * * * * * * * * * * * * * +* Paging +* * * * * * * * * * * * * * * * * * * * */ +.paging { + padding-bottom:10px; + clear:both; + float:left; +} +.paging li { + display:block; + float:left; + padding:10px 15px; + border-radius:50%; +} +.paging li a { + color:#999; + text-decoration:none; + display:inline-block; + line-height:14px; +} +.paging li.active a { + font-weight:bold; + color:#eee; + font-size:18px; + margin:-1px; +} +.paging li a:hover { + color:#eee; +} + +/* * * * * * * * * * * * * * * * * * * * * +* Documentation +* * * * * * * * * * * * * * * * * * * * */ +.docs { + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; +} +.docs-menu { + background-color:$blue; + max-width: $menuWidth; + position: relative; + padding: 0 20px; + box-sizing: border-box; + flex: 1; + + a { + color:#fff; + text-decoration: none; + } + ul { + padding-left:20px; + color:rgba(255,255,255,0.3); + } + li { + margin-bottom:4px; + &.active { + font-weight: 700; + color:#fff; + } + } +} + +.docs-content { + position: relative; + color:#555; + padding:30px; + box-sizing: border-box; + + flex: 1; + + h2:first-child { + margin-top: 0; + } + p, h1, h2, h3, h4, h5 { + max-width: 500px; + } + p { + line-height: 1.5; + } + ul { + padding-left:30px; + pre { + margin-left:-60px; + padding-left:60px; + } + ul pre { + margin-left:-90px; + padding-left:90px; + } + } + strong, b { + color:#222; + font-weight: bold; + } + pre { + background-color: $lightGrey; + padding:20px 30px; + margin:0 -30px 5px; + code { + background-color: transparent; + } + } + li { + margin-bottom:5px; + } +} +.docs-parameter-description { + color:#999; + font-size:80%; +} + +.docs-top { + display:none; + border-bottom:solid 1px $lightGrey; + padding:20px; + .docs-top-title { + font-size: 50px; + font-size: 5rem; + color:$orange; + font-weight:700; + margin:0; + } +} + + +/* * * * * * * * * * * * * * * * * * * * * +* Changelog +* * * * * * * * * * * * * * * * * * * * */ + + +/* * * * * * * * * * * * * * * * * * * * * +* Syntax coloring +* * * * * * * * * * * * * * * * * * * * */ +code { + background-color: $lightGrey; + border: solid 1px darken($lightGrey, 5%); + border-radius: 5px; + padding: 1px 4px; +} +pre { + padding:30px; + margin:0; + line-height:1.7; + color:#666; +} +pre code { + padding:0; + border:none; + background-color: transparent; + border-radius: 0; +} + +pre, code { + font-family: monospace, 'monaco', sans-serif; + font-size: 12px; + font-size: 1.2rem; +} +pre code .annotation { + background-color: $orange; + color: #fff; + padding: 2px 6px; + border-radius: 11px; + cursor:help; + &:hover { + background-color:darken($orange, 10%); + } +} diff --git a/docs/assets/images/graphics/favicon.ico b/docs/assets/images/graphics/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..60055ebb8bfedd0c891d0d511195c518b9a1e74f GIT binary patch literal 41787 zcmeFa2UJu`)+l_sp_?W*IYX1PBqfI?C`l9%5RoiVk)R}rP0kr5h$N9H0wz$&8375R zppv5~N=}0G<9IK#7$4p+_kJ_)`~T^+&Z??iJD)mLyQ(${01yBdKq7&?5(V(U0N?}w z04UV2ZAt)e*ndy~kpY!!LMy1pw^P{oaojiC}R* zPZ|C!iuLtyKF_zoJKP(U;iz601FB#~a)9Bt=shn`M~)TnV1MfYaSr1Ve32&kx9AS` zfw%{GfchTn|08vf2IK+SbP#{}eIE9=o`blcuRy;Xgn_j4ZP&4juT!w|?boprC1Tj= zN2=JRf%NZu58{G4R7Rj)9fX1OV0*k!;GgsWdF=P?L(NPC$6`?`Yo;4@uu@}KzZ(}QE|F#mzR0(pRV(@!+9UwR_; zp2&aLwoecG@2|c;a18vF@dMI>zrQkmf8p@Q^w=M_`!qk62fttN{p`P^Kl1(l$m{

{a^BbVk4*n zsLPM~|4cpzPrJrY`m1~xIG6nv?Re3VUu>Lsa;S~_wBP+vec_+<_`ht}lMUhz-R0S# zqy*?>1qoI5>3=K_(t`Dsk^9)sU4hu~d&0lSIN%Sk|FCy{kjIbwjgBKPyPl&A`4PU~ zK1d7JLAjuOu)fe2_g&upJO7S*$U8sCW1sJSne0qolIh0yc)$H)d64$U`iE+xe|qOX z_V4pL2;Yb8m-TUMLscz{-@>tr~Uu0j=y~$?tk+K{rt1~KFxj!j=w+i{e7p~`^G^22j}^P-Z<>a zaLGUBhCeDF{Qmyv{PT}F@F(;9{@k!STJ}$C&Ou%F?cOiJ`Dbqq{@wX^AOFX1ezH^= zJ6m-DJO9E9yY%K3c5R|^&kx1e&o6_&?=wNVpUK~!f5A1t&5$x|U&g`mAT4O$Oyz0p zr)H;L=DyK#?CRbF&VwKf?EA;O{OcV5Tk=z`(%=7e{Q-V!{RM3S_nM$>ppBrdpv|D| z2X*~f{h$r|IN}1mi!*>o3;vRgV(sfP3MR0Opp?6pjzz8RpPkuCL$s-ytj= zU|g>)OKf!5{^Bpn{xA7|J@8)-{D05`;5p&ml?!0D_x$6W@UNVj?eY294?GuCJ4STI z%ZMr}-Hq`f82fjpam<6~b>KN-&uz{xU`%|+lkqt?Z|fGq*e>Xk&JqU5)i~o)d5O9tBne5H^ z9_+vCIZTJfMD|e%03iOE4d5N&VRZX2Q1|`%-%(B!i(qG->Hcy~G?<0m_|Sq~ov8Tk zqwylaLuL6GQ^g#nKh@sS3huprORvAG|75uWcCOB9@6I9O`x(>5TpM;}r~v!9GXOga zo_m-4a@X-&a=>`%u>I#@_e?+9@>_g=#2qi<|DFf&sl^$)_$CdzK2x`MW>oV%PXvU4 zIT9ewk91)B_vFN1q0jr_9pL?*?|+Xk=sVDdpf5q6Zp^jr`S?EeOLrJ{uJ$5!vP||+ zUH=vR!FipD3Xgr?25_A^jL(m-AN>N3Q4qE|`SknPUD_MN;5i^TrpJqay$d>U=J-$i z_RfpJoRc4Uf;fl4{)u)E=hryty9u|hF_it-e^~o4z90-dOPshT`kVd*{r{oXZ0{^P z=-2nt_Whm-r2p|-JxtDz`he$od&)!h9=tz#mUI|j5cZ`v3cJu7{SW;o?)^Hiw0mF| z2X6f`_V>m=SfAg6fixfvsMF7Q{;2O^Z7v4b5lJ3|!eM=f!G0zSoCnt?tG??3-WC31 zUfJ_C=<^@P{y{zm>-#bfgYEYnEG^WLj<%;LJPyKst9}^YeHi%tg7xotRKMOg{*2c? z4cLFMzK?$xY`^bdndCrM0OqzFg#A|iFun(22kU>7&tWu&!4Bj1B%HP9&z!9v#`hrX zVEr(8`>=y}2kVFR@52r&!F;|S^YISD+lT$0ti$^EX%ChM@ebDaaSns+_x)J@nY@<6 z_#T8Etp6zIVEZ86!TLVVVX*zaAItyk`u}eqKZSnG4L`np$ZG!Vlsd ztnbqt2HWpDSc2d0zjgjRB<49x*TY~3_1>>P2}O1Pk+^vu|1iD>VF&9V&0#SQc;5@+ z%|6%r%ke|P6}tStBYpsN1>+e|FEGA2Eam}Y(*2lcrt%DSW2O;1^Hk@b#?o*3X}|Aa z3C0h9C4T!y{QL)Eo`Z71`ga>Sll-`}u*6x++cF#MitvochK-T3%oZ=X{1y$!;_zl+$n?f1&x(;wW! zAKX8JHvEx!=pbLvf1n?~pCybv{AK^R=jZtsp5Ofr`v3Rz{8|4&IfvmKvVRBu==lja zUe_j{eILJzdwDP4&l2{=^?qLIVes)+4%|h4*tmb70CPF@%+r@pPgTU`tSXI z^Zf8>;K7j0nQoD`V;|siv6wk*9Q#+^9S4wC`145{DELA znp9>QJl2D<{wM2T{)Vmssrg^c->}mrzy9yc-#E-CdwG3i;9TWlNF9;x%J=}xp8<3K z_VWP2{2B0Xz3zB1J_GXv^%O|W{?qw0huQI8*nd6nUl07(1ON5Fe?9PD5B%2y{~J6I zu6;_Cn1G&OPgi1fH5Hv-QVJjd0=@?^x>{fj0Jt1>%F5d6%E~D1tB%%o_ErEONfxX( z>iAxlQa;>KCzo0QWuO`w(Ojx`_QF#J`jQs7dg9&B8q{~^2KhLqq$R=&8SviEJt;cv zfuP^wkgCbD62mRL-mcd@Qa>BYSER1y^`VKBmFqK1Z~VEN1^3w|qqVOcQlnC{ zGP5S{Rpd?JD3yD~yY;#Brg;&}5%< za*y6tZn;ye3ivTSe4nUF5LIy5szGa^3UgB&+P1`TJqLzoY}WA)OA^elc8?3iI#-Bb zNsrueU7a@$G}unR`}ATZY4`~Lx^7Ll!ocHI#zoCC)6%Ev=6cQJ*$6xOv`o>gE>q7AGlGbA{ z!6jVUqokbh+wg%F-R7WT7wYrxGZXW4#M@d1SK0I3jMArXMtDePL~yHxFGQYhYMl^+ zR%BFdnrw2F<>9RDCQ=AXOOIUAh?V96m!$eoUTu=$cHpqO^ zx4lq6;qw`}R!jdbWbu^uj95-2-rBS3iP<}9Q}Fn+(q*IDOmmtO!!8xQ9+(ZiZf+GB z772RneF=IQQ#LGhuhojedBEAjo`HWaKN1b7t0?MvKt5OFdo!!1a+wT|7M_0K-LdTR z;gO}xsd)~r`~Zlj=d9@-d{*;(8!P*I_^Rejd*jhUzUOPk!^W>2UvKw&y}pp9&Dp_Y zb}2{E)-~shO(Q*ngW5zhJ9d z5;OBk5bGoMj9fR#qT?|ySDT)>-@CvxyB0`Ua(`Uv4J-Ze+x|9<4{ZbGyHNv0r8*}e zg3TM}Dr#wAbgM@p~hYAyo0S>&RM&@a6Y|i5=Ohz-p-e~t69g7LsSngR0 z=$0lWU978dWaA=YtdvMG`BcwDG9E#4mWFB5Av5o~VM4p5rhvZ7*qF^ssFmIq1!7{) z+m+`W@4dYg@%XYoCjoM3N`2O=c;MCf$)M7X)bU_>+D0KyOTQip{A9weYpD(?9a>t& zu*4&cxl)?1s(s~<37vLa6ajdWWK~)xZdRISDc5UPLSISVZRMj~V~Um0nIL{D@HST|5!> zBiEsF$-YuIJmlay{CxJkr=wCIl{I)!p~p48+;jMt1JF7~TGF$AJQlI)b9d)`N%OOT zO5CBx@O#%d4cw><%rdBX7B8jrc3B#wOmV)P8FT5pvHVqj=8eFcn~c7!EnkYA(??bz zurJ)>EpU9_{w#ffjz`4Sq&7*T(?d6<*9lr8hxjs*o%*$-F7e6@JP=ntv@Z`}+0T$y%$({N+{7j?UckpJvZ68!Uie{cp5>FTlFyVt}|Gs%4&O|8TD;fjAcAAAlP zF#159e*8$0kXD0mrik3TSM`?5ck`kj5Bo^OC-~#)nw0hj$u~spMnf^Zuf7c3AkI5g zEGMv@5WaI6w9;|k!_wfN`2ccx3pRHkQ0_{ zi1WBr$i)xoh6`L|^96FR6PRtP)ScWNA%-sscnFq4JF|xRb5PH@R`1T{caL6_XEyrRkZP< zopde^4hEm0;eFQoQnSb%tL;^Z%!RYXKur$Z=Zw%cS{=sDNV_LSO*mr4b>o=l&_kcM zI9I0AZWrY z)vEoKQG=10AzcmF#v4uuB>{pl$7o6qQg(o z0kzM=*Mh0hPrvL``$I92YoDda&KfQk*FLoIG@_|MM_?(3TsjIL()TiF)16R?*ti+H zW8tn>8ygK39jWhkEoJ6;G?W|u;Zy-0={C{QtLjV>PmPg`6Us1Ln%qZFOm>?XW{F>- z`YA`@)<8WPi*K-KgTFaz-t+0!4ci))kNO|CDbE0G5aKXhG8aEI4RfY2+i>fc?Phjs zlwAJ<^Je+;51|39GHBv={<(B@o71CqMZrB=6~gnwIl&QxWSs$RTa{^_@%jW;GVkgF z$VIj=jg;!!a_G=Zg4m4aSPl0(Gq6M5@&_-8arXxxOK)QtSg)@G~N% z+CGU}f_f?EkC3(Mxn_Gay7b97@)J!JeL!*4$V*B1RxEMXruFvMG-LY*(@NgHJ+3rw zH`NO56QO`wyeskSy|2@xk8k?-VrAyF+%ZelCsKMZanZ8udUDR>UloX1sAgJ2zpC=| z$AvZ-+bSTLyZ551Vp|(4as>U@F*Iqcldj@A;5qIszUNJTGH8S}`k4IB=j(Jy71cLFDCxm)b=Iz=)uw|F` z!58ywmpWtGwV7~YYq=E;ErJ`l$IpM}Sn<2^ApfI3)2Bz3PSN4s*Qds1TUBs?)bs}Y ziNeADW#6-6HFWzy>cryO~@lL>P7T%v)AYRWdcd#y}!L75Fp>p zO74g#BUqtXWb>`rI{SKin&QIb^bp@mSx)8M(0oxB8ba0iLFb3|XFL2fxgHIy1x(yR zn#QDypV^ELK6m`{^c;d^x%}kqZ!scqxGM~0+e1M+e2%*IBVMspxSEyImF=y1sYlYL zDsaa{zv#*jdgBMYs4c-GES)4bia*(xOxkkp_!;#5){}M0z++UCSq@EH^;pKu=fxv& zkDR0Lc;C^h(E!%(#U9(bT;cJ8W$+b-lk=T0~? zYP^kgXcq}UUu0Gxn~?{!ryR4`RmD0a7Oo4idHDg64!o{X)33UTTBnRl+~zU*!uZ+a z#;PLy4vrUUS1VGCr?`$hy+=MJ4piQINOfy{SLoi(*CLl$Zi^QUneIj@TX@ii9C2Z| z&Nv8eb*|kSSLHSA&62Cpjhz)&Ed|@o0|l3bSp)3CixxiLPKpX=sV~K{ey~U4nr*4x zFNlvrlF)oIjBS3$J=S#S-A?<*BQ~-mD@V>>Gdx8P5&Wj9ndF!M_)VBy zY1~%%?yXy=P&7dnyZ7jfw+4|hLQ!Hd5(Q~26Px_lfj5SyPCT_`>=eYuIMB}DX)UOU z2sIpujTXidFAW7--%HM}dQqAgOO)K)jmxNpa%zjLd%!$zwb=XSw2%*UTgl_9U2WqK z1hAV=EX+LK94P3nJTNNIdO|dN^_zfog12MZBSJHCvP_C?RtMV)rdOgh2Ryp0>8C;n z(7KNUh0Nx#^wdlCdG4g4Os$z+9Qs!}YzPdz9i3|D7$Ma)gtD<;)z6?NDeGDsodqS^ZB(A^ za!h1wm~XF8y!3eKF$q74;)m2N72Z@Bl0F^Do!LteQ509SClK@UEX%`WC^dp|D~sgl zE&T3G99$CVN$FdLw_SlTWTEFu#__nd%;uLunw_?>7Q6QJ$BG0Sb1=C6=B8NkhjLmju&Gn1}QZpUoIoI>eg$wvvlA(+hjJ1RP zF8Hltt*%dCL{`zbV;|HsnJ*cRiO6=d*IAHR`#Lm@PwTMgQNpe!K*xjy*iP9(;6!U~ z9BWf++izaie2&^Usc=?b4ImM@DgVgpNye&taf-sLMy1yZ4wQ9M!JB$Q++s18V;p0y zS?A4EvQ&7UxPGTo6L^y8()(>Y-vg(YraZb!;u&VbvF zUu1U}Q7gWsKGdv|V`nFl`7O&T+@iLg`c%Z$Ll2-hFFG3PV*VoAH>fOr{dEPuYp{PoSf!YkwRw zh~U6OK?mN9vK<2->=)wQ8(JIRihPTV&amfvFQ;`~hYM$X0} znOX4sy4lK=#T7p~sW<4zRRxcS|APt@l011&Fk)&b%;g+7Bm0-$f$ zJ@96Mcfl5Y*HJ$+j-1taR3s_QMnMjba6M0*bL>*==Q$K$8>{PZ>Dd#qo%mB5W?yN$ zN9@b5URyD0JX&#C-mfqj!t)?Dli*&2kZ2*RGWn>E{PQ$F80rY><=ODteGGgJ;Pp zKAM}Ww4KL`2i*5fP?wdc7$Uhd>N)@TrtamhXW!oaIPz2jvJBg5q(BTu`yBa#8dcj> zAIG`-25uHAb>zBj_f@&V>IkNr(4o|GRx9e}u|*eVC1FREU%4_#!S95$x^LCETFIQH zJCZI9l&vM}kzU!jt#!&1c0cBZ_0fBxn=_k>x?QK`V0B3bat33^a^eTLz4%H8%TGmi zptC7)@$bGw*usu+baN3ds18nQe0iiH$GtZ7$utnJf7Of%F34M`{CwB7==7E%A^P**9M$C+ar9)Y(pbZ<-ParLm9 ziV$zcGxMVTSvrbh$I26^qsVuWD%|y-xGDi~Bm7Vx$glbmmJnA&>@mPHt@=XZz zVOdKsr5sCHyt6P%vwd8IYm}`jpFTBSG3rT{oQXi<>5u+B?;^Ck9PEa(zPZTi`7e1L z3FA8HQMoyO`(bC0uR;@bsF$dy5~HuX_V(7d;lWedVQC3jDdejfT<$N`(KRv*S`q7K z&y;_5DjmGe$3@@WWES}tR>+e6n=5BQ`pjPuLgGeyG>ierwT>iLFE6sj+*A zwV#e_*30$zno~=!2VREp=WjRP6~nQh!eo)FZbfDB@UDjQ+k{RzcRVPZ(4{qVlIB~l z#X(E<^S=Y&rvXY_Ejn7{D->7f>IWSG4up26^L*6KJq-sP3|~&HvHkmZVlOv+EQ3Z! z_0XhL-2r@yuHHV+%eG1ulFro7u>fT_zAu=Ew&iKR$(ygboq@7sdc`i+!|Asp?Ajqs zne}`B+H{QrtKqYr_ss>1|~Mj#0Rf*N4m zp?;$p2pVN3i4=5%Acc#Q@#HLEM&akWk0AH_H?2)&t*m4qMTo&n;^-wFr~T09$;U== z8-`+>rxILfY7z&O_;v9yIXt+?Bq%bVAo4yULX}9=`~n=Rhka9YIs$rx!0EM_fRbKT z%TXDHSkv8#M!)+HPprDx17-}nFIX-KzDj5pG7lHBmZj~xW~nPfq!w}#6VCgU3~3#x zPP19PEYbi3x7;CH>cFWcM^fV;FL7-*5o?pZ$Rk4%G^MM{m*?c7nf=a)oPWmn{ly(i#~wP$;3R2X(|sV*R~W z*)ogc_z16;EzJw3)8lJT{Mc zNs^J3DrpSjqdn+0oB?zBk39Mql-=FkIH-a6{EAoE%Hp}j>{Ej~k~;6ANPzjbwcf8r z9*1c^8wqQ8cO0h~SD*>yaD3TES=(Q(O*K9tey3kw4KJS^Q?nH&05Eh=yXw2+ijQ_kc@z7n3LX8VS4ARq4LWEBvbc*08-3DJ_n)|BE=Poieayt*7!L-R^ zfNEkPWhGl5?jsoxbX_vRWk^Ufi35M3G5 z$YfI`UD zb#tVX@H1UHaTpvY2$k{}{sg*M9Cb!A5Yf2c<`TK^gw>D?QwGJ95%fl!L!GE*bPJ-d zWYiq@tb(rNGOs;8YZb)am|Q3>Io?sLDxk!T2?)OY-Uf-(4pkhu0}V3YIDa!UEE+~m zB)L6Q6xzumA?nqG$i~YU$0KVVtH- z25#wmcLCIvOkfuZP15)F1&I&ThL9(*%Xy%2r0-Y6Im^JmBTk zQM~n<(<@&GP{txHqfM*ZrcqgQyTcINH=ml=;?AdbUcJe0xMbD2etK}c12-swjkF<| zuH*v^|13@TbpV&!a7oUpx$kTlsT&TQyE;ZPNCMyy^-h&}CSpkDDiHKOzBhu;TWYvk zUd>1J2&!Q$>zLKptM%x{3rA#Sfx#=+V~{sJB@!qJ!Wc9VjJc!_ruh-T14&GsZL>dS zEJi>5tdoW=wWy&8M^V{w{CLL~+v6cZD>t{ttYyO%rzHS{BinhdJ5;7~(lqIhfGjb5 zOkJm@Ix0wqu1}5)Nek@ulb1g~vvRg!<~`x#i3z~WhPA}IY>QkV`5Q`HDA!8kT*O## zTbgn08LO=N7GlJA{uOnSgB}Fq9UclWawX1y#L7B5STzw4bo?wd$DW`e+1aSJhrm=G zG2=&=RYrj+`(|J;4@d39f1;xu3sOQmy%E#4%7!GCz6e2o%+10Gar&jr;I)?ux?grQ zvcEgl49RMFu&P{9Nx?w%A@$uDJ8UYgtb&mUDS2%`sWo43AYA`ZL$cNx1iGN!nYbZ2 znbrP!;pZz^@9F}3BLqUrpT*ntr;T43^9+&5ax=i7pU_ww0sMO-jK*>S#RN-lEE>R+ zwR%HL*oUrjJM308%#3F9Jrf3m`;qTG2Yf5+43BbsB=hP-2Bx21Q0P}KUf4csCX9Ac z#F-?xkLx!X+k;E(Co7@rZCVWj~P^dk^sJn~_QU^};-r0GhSl&mNW8a%1fpmNJ_yXTV zZr!Hpj?`g|r@LQY2`|W#Ateom#yb={1w{?XM#a3hC@1iC?^4A_7`-x6 zuhYb=%l4K}jC-l_QU(mc-EcFg$3=iGFfk1R@5Z4_hn>0xf$#Z%BS?gZS7pZHVsEaA zwl016>QIo3-2CE_nR_(~I4a(MUc1DuLb^i-?|JywFN`przlbUHwBS5d z03#B#jyT4p_RT?cZ?u!8M)j4Y4TvQ!QpFfzpx5|c3ZNTaO9fBFXy!*w8c;Sb zS``tM)+w`c;?kg;@E=*}KH|W&)9u9Z%(IfMJA3EWgns{;6AKHe&Qi}_l!SdD{`q{c ze9cXZ;G?_5S1HzBOA%=INE5OfAS?uZW*&vfL^|g}i1KHoc_hKFV4l$QNn**>hg9yH zR|R!L_-$ZQZ26ZkipS9YbAy^nCQC=u5EU2wU#Y7hh)%upkrglrHg_h~m#t}ooiczj zHKEdD5j;@)`>z&;Y}Mb&7%%g0-rRX#qxfDVNyNz(D2v8JZK;~;BKtON(v&kZAK0{) zFkIZF;4e3u{hU#08_=RsEKR6_NG`9#Pv=i8VSD_Ql$F&x zlN?HWovtDIoRXHufIWx0|2u718X59_nq!Ga72(lw@((0j>i#blp-P#iO~w8NssYhj z`U(0s{3)FnaJ*y`A~M~HtcVx`vdxdyrD2c9&XcCae+Z5Cz-1Gh73K6J&V9U+8hOdB z_2g0se_rJCBblt!xXGwkk(?xJT=7-aX2V!Blz+8=;;3C+KB&+T6J3o{{q6EPa`ppLvqn+@0S z_ZiXxP}&d;a;Fm`W2IB)+AGpFg*P`BWIjGdoS=M`Q!C=+1PnrtJu%^s>$PQK!@lUm zJ@Mr3I}(%kxY(P4@qy`n_fu%dS%n`{=((>2C@qy!#aS$^_&~rF2BTeU9x8ouc0$w>(yx0p-Yhu=jJhVTq%K<@|lKjm6)Wu{e zy8bDF@6Vm0STGS)@7oYg`45g^7;swNn?q>YKC!ry2(!A*0J&iSJXN#P?nn0ec}61p&3WyLhmwmHE4Lb zlG?7;pz@+fv>A8yk$D_s70K{M$tesJlXD}>j2j_X=c8$k9XT+%d5aIDiC6!TgNZ4xT4Wga^1?O?xi4 zOs>LZIqhrQBxbzxp7>z(M&HZu(orlZw~$S5yPvgBS-60t+j!bS5mqn9UsP9hckjRP zQqT{nOAV&&ztM9&-#k%=#L0g$4W^W4&yF#KzpBE~8^4lA*2cDD9B+j(p#K zbcNMU_=e=}o!GB<17)dC*#uW1P-bFl@^TzrE=OY>o-cl*MsY3dr=UbOb;V;4VEL&Y z9W%`GB(OG-*=R{t>?INT^7HZ6(q!HAmfG;b zRW`XzzRmU#|M4O!^M~CFIma39FxKjsJ>hT8sxg=E3u!#(%c~oz=M>uxFw(Xf+;4GS zxq7*UotCj)js$gfu~?1Mm%PKxy-{gbv>)*_QskU%4$}$-?sD5X&xLwU5+c6CcT3Tq z{N*X(?N%D92*;{ci`{|P^@z;*IZCXDa$yqggQwqe9rdXY=d9W4VM;4e22-AoKI0=G zjPx<7b5IMPzD*2s)@HY)FbrV-Y+!e{g{7&w{d~0Hy^}-)TsQQccb<@@`k4-eZ+Z!@ z81v_ag+hSVY!dIw@A1nKS;90+8%IOV_!xxgPRPFLq_DX1neuIVW92Ri7`JpZs)DO$ zra+NdJA17stYl$$4wrmS)){@vRmra|jtdkNvdG*c%u9R= zzqo5GoG`L>OL@ZJoKnz?`t=j?nP0_33Dg{c*B-1R%B3S{N3_(0DP`>lNN(%FIJ zx`?n|f)c`W#iG8HC@CiR9lvQxWJ6l9xkj za~~5aZgljutRNi6uTjzV=lJB1fg)Ik&Yet;eXn&)Xa7@=>6^=t*vt%VRdn z$By`_4|>03Si`|Q8y0(f!rP7`+TBYjQE!oyH_4wI=T&I^b@`^NN@{T-@IKm;A)-g$I5&z+N#8Rci0wjr3r69}$chH@-Quw%Ui=gvJNV{r=t zZ3%ap#Xh0i45^~@juP_(@9pd@??G?*KeMwJ2so>VT%EW%MsGALEXAT?g?b0u%;4__ z4G6Te%E_=ow)Tt>TMFyA*1iC7YNk#MOLxu-4{bnEF(I@0t`+H{F2_*=-#TZ!bqMC6 zWlv(1@trMYR$3sumH=o8+_kGzW#P#>qH4p%qn$b1!u~LxCGK|nXu~41Ey;}Ad@?%> zqHKBWR5}D0b5OZi-Yawof)q15>qPE{m_qI>>U7}L-|%+P%4p$_j@~;7TgO3W1W1p= zVJF02Fh$sFXEmYAGw#c`zB^rx6%YH?YTQ|B;KztZJnTQ%d~Sn=@?-diW0flxNoqGB z=!;rR+*GH?&&|o#_5grKDPYF9Z7x}na9cQ?BGfqshd}lQGlDt*s!Z9_I5;!(E}ADi zgNtWA_M-kMAv|w4*3O%(KS-yuC0Ws@!2gQ5xVW&@GU@%XTmFHi0w>vCG;r2m8GODd zV86G2Ko(J%Innkt@Gq(`-rOb~s~PNAeDi>9ZZ^L-w$qP41sf;0er@Jlr%=1peLwWs z792DFa+8o`*_p-XIKZ2bOkEstiBkXWICNHupV4!(6bYR1B?YUK!br-xFXWW8{JhI&0$;8AglJV!ZN>e$c8_!h^> z`a=nX7untqs=0G)2pi#EWDiWaIWE_6Y@HrabwK zx;0Vl(AS|eM~)e6EOw4kYM|#}X2R1noFvUVb97F~IXgsuqFi~0_GEYa201WBlPiz0 zFoDx#En_baCzUNE*dnZ7G$VS%mty(1KPWyDfH#(?-6p^>`!`0Wsyg~kgk2Pu6=xmbG6f+s9*6l$a|gxHFZ%l}>$o`YM2zKI4u=){B!pN(EJ- z97=f_rhV3&WR^vQ%he`RcyZn)dU!R-eCX+Usk3Hu20URztGxvYA_S7;Xcna9JzM z$QwsPrXSH-@8lcDr3N3*Rcdk`sn}48_Mp z?xL2u2QF6}6_KHQ1DHJyF-%P@A6aNLL1Cc&QLc?m1u6H@i!vPkZ#{E5DC)v)vARd~ zPQ9oLR}8ZEdLe&*!7K5Kpzh~(8UnMNWQrPL%~cf+d03|MsY|oo*IUxPNbdSf8zoP> z1U@ynV7my5sB;N|Z{8#3?dR##&6noGq+!Kg<4}~D93jGNni3h;bpMAaZPTb$xH zWxPcn!<8ZSlH3u;^58+VSvi2%;1W)d5Dl|s*_on`-uW03x-5eg4_i>^NV%mj0dxyb| z1a)jk^lhRKIi{E_&}a7R`D#5%S}_=E`;)vCE~6Mzt2YievdxDb*6whrV52Y#^O#YR z%3XhhkqXwf8nL8$T-vplhXMyZ*E0B**>b33`az80&pZ3nb`rFwwO|+@dO2d_%!uOm&_)5}JgFBMt;0 zsRXzWve~&#FjUHUsHC*PkEYOhTJ)fvXXrTlxvi;YRGb*7@-(o<(K%6f@8c!T7%M&Z zsVf(&)JR5nD{!)?G`i$d7i^oiQWpa8`=Lx1{9V#I5kwa;hGZ#EGu$^bEn}`Q#N}Z?zgew@V(!gFR5^w@Aihy@VJo>HXyWRVYnAK}%OYRB1>9V~!(_va z`z3m7;l?Kj7mE17bo>qArl6dN;yZJ#O_AZ}l61lJPC6)Vz>Pqg4IQ#=`W6r!f>308 zc5c!q0{EXRM|4dY8e1oq38(SeJT@r&sR(SU7?z(yqK+xEnGNp7w7te`dZ(BcJTjYG za97=MH+eM*)td~u11$SpVqSdSLt@b3e{4lq3`ZHzPCT7=B9IWGE9{gfZEn#YnK}vu zx*qNQsfwQ(?Uc^|Pde?RwrBaeh;&!ugnVLAG8|hRzzuIsc)~mdTBa4oN0*H;BuOWG zaJo&SefESvl%S$4lP<3C7PrhJ$(y*B22q$0^y4F_J2;K;%}Gb&dL7!jUzB`PI4Z^* z*y-q|#(-(PQyZNBnG4I$;9|XP{1hUliQOq>GWSd9e(bPZjf=U-9=aEt`Dylu76@q5 z(c$nRdDty8J#Hk_w$G+*y5 zb}KLzu~!e8Te%U^yO?vq!^iKP*H+90T1p=jekhw3u zp>t$+{3(g~*w}|xGm&e(H~=APD}Cps&70=xn=cnMx!$odn`r@Zff@*{ZA=*%#sq_0 z6=ty%6EcZ^l6onXF9JG=hP=dTuhh>@xsM=y{iNPs)?&E)Tx4^k-`m%_gjc3cGR{k~ zB2JqS&OQ0iXUzd?>!RWR*CIM;rB6myQm0G;l|2Z&{i&oI_H& z5_e05)G638+f%7Y>E3vxUDy3q&LJXeK(tjLZJuWId5y|WMUlnQm!~i`$eAqs+65@j ze7!St0sk#-Fa{d@X!T5uu0;tXEC2L1MP|77>FcIP-}Ij+D!t`r5r%@n?!x0l3k6|j zV*`!q&X=#pSFR-#K6p^57+bm0H@ECVBst_O&39^zL*;#8!RD*-Fv%V&8b5Dtu9)Mj zxvU@nR z;#eB&_=MXd&h(?4v{e+R!sNKwEC$*OB>S0YO4DP)^$UovW~!#2o9J!QWz?m!Rr`QP zfbrs-@IOLPh+a~Cr!X9)%5Ks%bcBV;+Yy2((RLd${-(b*Gc(-4V8CfX7DEODcxgFE zR{ZR@#|N5o*h)PH=Aq@b3Fibd$SA3Rz(OEmniGH}eWIpr zA3&h9zuhj7gwL7HmX{3@3QG>&Kw|OL$C(Dn7`0Py&^#^v*bnDn1PLA#)1>*=SS*`7 za_xjRjqX*nU|>Kx@=1ysB8#&*Pwu^oso4#(NMY1xqx3ozR^5oqSLVAH>UKuG7Z}ep zq_TAS4N%}6XK&i+$lFw*Bw~WExd-_BxkKeItmE24G;yA#T=+nB4nj!{Fcw);g)PrP zL^wZCJq8fW5=SyPGPAfH!o&+m^Svl6W|zVSBfTop!y|3ZB!`Xr4w2DYiT9X^l4ua5 zuqEZ93KRVNdaB`@hNoK^-sg^I?wFKvG66`}=M0Ze$V!~r!OmU~ANe_8Z&N4tjx$E+XhELV#k$X$Cn6}(kG{m** zcyLVa7)D9wQcxvbx$=nKw{}i~xXk*2gxa?bp`+VC*3!tcT-&NMKGhOhdPo8MGn0>Ql5K!o;hXmukTnIR4 zCNmGz%9EEL3Hn$Tm7o-V+DIWE9iXho%MsEpFGB2kKVY?P`HQHgjtBQ8|AzAWDIQcG z@uH(jY$hkJGeR+Yf3nbDjm$zej4LvfIT!_Ca0p(s@u;U&`{nMIvO|T3E~eDbywwI3 zMn}Ll%}1X-sMyO~_0d{^mA1fiQCDcp*X2#$Jc-%~Y?123N|^2XwR9>Fw#cc@&vq_Y z?`CHNpKS3euT+HW92xc(-d*RJ$FD;4)m_cxdXc}`{2YMa4c?T^ z*X|Tr59bAfI~H%(EzwXVUiWe)hqw5|QGW0l^vylz0ub?BuYx{@s*qhj4ej#=l(Gpa zD_f5WtLqn{6%#}?cYClbt0}#Ump?OfkhYyTzoan12#j6WgjE}{;#w`97oe?7^HsL# zv1(78G7<|g>pAC@7|@9=IU|bICiQXFUesVG84gdP%ut{wi)ER=!Dxu9T@aM34RIaU zprx8cM;C;=5T?lzrpj_^X1r{>bNqPuy^M^IKpaI>*e5N*BX!Hd2nWIhotm(&Kj7rWKQ}h0Jis}ShtvX8~yfjKWn2% zjhGR~0L>6RI;sED!g=^p{lEYJbruH)hiuAGWMm$D9F9FQj#Vn-5K=N*wsSZ}NH(Ri zXIUj=9wTH#B&+PbWoLcQ`}6z#0k7NZIj`$^yRQ4=0h3g&YLz`0-qFl?ccgoJISiWx zjZy6IAZoCf@9DQOS6-xz4qjb~SJGhufi7zcV5e>J%7sxv&od>tsdS53RIF63-1KQ9 z+;9rNIWGjO{Ja*6b;!)!x-BmNb6pW?>3l`EObVhKlYP@topjkkUkXNU60+Tr{wcqH z|JTBn;^YAYFm1Z=I^5sicpXkvus&RW_SG3|9#KjE_pxR8b(P|Bh|x`o z)mYIBOkHR<=%=WteG?YJ#mr~)&rJtU~k8lEE z=t5+w`V%X;UWo;)Sz#DGk$9ah>hv#ihjh3)ChYCj8q_Al142HYQLSlsa}=oha!IeH zU&xI%Ux>{3iK>thYFhnM^5>_*&4_$pEtu-iN}l<70b|fYarxte*3(66DFAp=cJx5i zzAa}pvspd;k>~hnou3*9jHlu$4abbGtog@;BWhRqCT?05Az_Q=>(lc|FEnrph?_Ir zZZ;`}jASb~R*0Be?so%cjs7FCU_>9uRmeDqT*Sp5sC;KNdKiM4OS9m^>k_!U!Qr~? zn0n(qqB+BvNqgW0oB*7wI3^Z6XSXHgbSOw&*LnotBVg&d8e=O7x zI_g2X0hL9w$mPCN!jqpbEXAZdtW$2`nk(E6tE*I!ayGLSLhpF(OL@ z$+486!Votao)#gw{JyJG7<-V>(Y-aPdD&|L<_k%0dYi6zx)_ijKqZThE+`2yx_6Yn zFu8OVQWrC!V5GE|;lEM*{Pg>@-!N8Shqn!T)>+07b+P=l2}Jsh&f`mvhmsZQGF75; zKfAvr@e1)7=kEOz$Hmuvu0LF^bPEjG-@PDNV4sV zNgyDlYJt&Cm=h{hqhBU`t-98Au+sNc7%(;t32ykNH6!nK@L`$XF0|>mEqKBno^N|? z(|u(@A`UYr{>5G|mVO{Q@g7ef;5OIt0O1opr4**Fd>&x)Jf`uOk_5J?z)#P}0JlHC z^i1rJAgh2O38?%qK=+rrWF!x{yJB+2y`_X+H%jq6HN)CRQDnX1;bnzMiJ zgQVCqahmC1O4P~fQ?a7upqVF>oamf>LBi&!P}`9x-aCu80@fRyJ%Pg1SyO%pQAdo~ zErPY8C+3l3`Vz>J%8W3gXGaq_#dyA4Y53dpMa{|RR!J(JbyAiNnsRJ>;Z5&;GpdUH z{b7}+$Ozq4A7gX~jO&pXX7+DQ_ zKF@&wLW?L=Laep8^SZsc6&!~rFy{%0`>Q_FUHrcCSq+9fncZ71KdTlDCF&fd_YQCD zP*DTp-2J9y+9Go6fz}5wwR@d!wUXq?Mk)vX#w(5!Iv+;Qzm_pP&nr)|gN2SH!y8IS zpX<3GzHAPAis?46hJ)|dOCsyo^k8)+q^}InWh9b|DTA>)wSF%EXyIo^DY%~4oXojv z7}xV6ShgY;AJQT?05M@{hA38y}h2#sn^=$46NjGIv#__rClr*_G| zem3@NJn>g>!9R+7l-gz$mhEgb<5k1kj8=IOq0X!^WEqtB3O{Cc@;yxXB{}u1;c3lx zRIPY~fAH=pjP zJ9#GdgJ9q{Fr)_xC2`!Sb&u?==IK8~4*I0oST z&r)ZrhXg=gin*jb&r~T;rzmu&=glgs>jGO8g^S?{wW>D(Yd{G|wqAI{DJJ9r4^49g zpMr>{svev{Sh01s3BlowZ9Xz;uuTGoUxM@PHyz|v(O+jeY3&WB>f2G20WxE2!*xvV zLfXraYJZpheP%DY@fIa4>A7X*2kVR0KAhFerGIiPzVuOzNZN`N0Eawe0rJ+!Q>DwVGo2rHXzV3Sx1Zt|S(+1447~ z(!3=DFXPh)IxwY%ExAN@dYNnEj5Z)DFQ2Gr{M8wu)6Lhk3W2_9##vJ%3;X=|7QIV? zIUJurTF@NLF06JCO6q@Hjv!-crVaF{RW{lhjK>J%03u~I>V45yZRf^w;t@h7tYDbfCfas zJ|T8=+%!xiN(YKS>Jef%_IFvS&2l12a?pEumjswJVB!cKf`#6vGS#WkCrzaI!tUML1>hl8}CEa`Q*NH;G6W3x3p`H+~?J=3Nw2YWq9Ic+2>ffV`5H;odc2BV1-3V)XVu3#w{TKON2Vb|_}1vmWfkbj`YS3{6fN08b6JGcr5C}tLW`j z9etgH^1HCuk(ru{e0=@g<>2ej%9_VcZ;yxLz!I&B+#$#wMm@>Qi_>cHiZ1fD8OiRt zbVwmS!_SsfFu3r_?;jIvQfF5Cs~|gfS3A4Yr1}@Gqno(ui&h6XnDNerE08GrfCHXPvIWYOVB4biV&my zdwTyk2^*8+GMheoDK{!Rr-!3u-A4eRVKS-EJ2VCRYs$kReR|VAQ`l|Gf#rM1WM3lk zVY2-tpqUzr$5RWC&Z#RVEBGwbH8Q(ADew#zrPa_9j`|b3CD~6of(npiB9*rD$q}T~ zt>yS0N1Ed}(pg<2EnHI{F3bzvI?dtz+$qn^T}hHXcKyY*5^aG20}2r$iF?JoZ(mde z+}NRZr8FyA}tnw~7xwQXXbn{fM(y;M~BH*vX2i6PuNfitz*M0VQk2Sz9)^Y#d*R@q9 zHY$K`qElw?Z?Bm0<6ykN0aKgN$96Vyr&6upezs-V$xwje^}y4xoSA6l38rq1OJ9CI zCNW~NOaw8CxRGYnfH)Bd1w94WtOv1`6k7HJsf)a8XZjSOIbO5(VzPBit z=YoZsaV`vm1Ia|?&L81hF*#^LVhY$Ll|ng#DbEE?gJ~zL7kT|EY1DC)J40vYL_tXz zru75ZZ~|5?nsImDBpzAtv>dgD2k1U#yLyO|)=@g%3C{t56^;=MTyL;SeVo>E%J&a% z?WOBsme%AWo21l9L>{^ajOzLHA_`#>^iT44tVeS=pySN7-JON5r%O+}F(wDq5h(?8 z{I^5VA`pI(Ge3BKCSOkU;Xm1I*5gs6r-YM5TX{mzIr#9@-A--G z31V^Z)rwu4!KRo>&AuGatsHPn5`5*P!Zec?g|(h~Gxt>4AQ@!V;xVOk!YR*FVHrN( z$s8d23oXgsVo-<>pj`P-F=9t=w;0xiNN=yUMr9cHkxnGEl5a%k>m!j?tt4dJvIOx@ zkZj*%_r#|ouUw3xAAnC{`WRF7>t-W?#P@Q!SzkVVS{xpdlPIDy=J_OO-;4qhVhf3B zFL;7~hv|XAItEt;GEe^!1o$lY?lS+0_4c|T00kgBdF!q?_n~Cur;$C8FPalXQDY7ltx>=g=~%RqU{$!I$Ha1oGU%FLzFI~G)Ord+?)s|HfyEyL3N z$m=1wD*jq6JHexJ5$8JN-=!dgTn;%FxA()@PK+C;qHI@Au5w!fgr>*N7fw%eXo5M! z!iJvQ%_htve?q}b^Fd&`^5S?U*eA$26Jd+a0KR0MZ(r7CtU27LS;f!6`lY6br90z~ zh$iD2gJIkNNR}u90Zj|*A-3Usok)b?-)XURR?!o=_q3L-OJ+#0>UfaJlU;|=pzy){ z3JBm@K_9ZdXC+==bYzN=S(eLX?kiOHMEU8CaD^9VCn`(%SbT%fW+oP7s(qR5e>agk zGB|YY%qAb#${2@qPg}VluVGn8I*upm??eU8Fn_o|wVk!{%}irTN6Z5PKO7O3HbY5ImZ%ayiBl`ZW?IkDp=28ngE0?@~4;<8A;zcveZz^v!CGPGi+i;;FzZ z0cJy?H=GBk7sjFt@1;5BzmI)$KszJ9p0m0AU6-v^L z&#c^n^$2vxUaCq;qTPErSyKG(AqpV+ax{_3oi?ygMa|g6H2|b_=-be_GyFt!c_&bP zf1Cpmyb;8!26!Suf~!xgD23XLA1aL*Y5InB4Aix*My>ve4CH0o9;9fD(PCCtTRw2$ zf=`(v#`ID$VLkb)k@2+et@xva-mODu)#CBmnTeR9+>O?Zoq&LgdejFVIsP7teAgyP zqAgkauDugIZB*oW(S0Cz(r^WT^5Vg$g?}+au&mM=}qnL_qP)Ps>;rv^%>ze zr?{r~df8}7IrKLj__VU440_HE)|IX`eyTQSf%J~TDe9umEtTJ4AtG)>YXT|j^3~bC zTZPClpT0?S^GP9FcGFA0bJM?xbq%w7L8y!E^NlHy-kRAD&3Ej4Plz2a(st``B?kUk z{DdHjo{Xnmi?(4Kpe`xRbyIY3`z7tx2Tc^6-;e@MV+!_cK7k3n#w$=CgXw~ zGi{=7Cn&L!|KLTr+4lCnQPjoq{+fxKaxM2}`%3~g%zyf86Q3J{Mv7hmcP_eqV#`%`qI_MxUi`hwFQA5 zlNqo@irRin>A#mjz%Mu}A*km+Npd;S6f?kS@0LiV9D$~-Rn}_AaA6@IQuE@?O+;V+ zSoy{~cj51KC879BtmHlZCw;Fbbk@Wzs_yp*su24b;|zbIX^TZQ#6^m#FNA=r)Om^; zK0C^I`yYoF^D3RhmoAzp1D({5LP&D5lM$yqO)-|nTFR`Y8Kt&2_Z;b934YD|FPS#Z z493HY{mog|9%V)JB7pvyX7EMo^ymOalxM-HKbwxan3L-TaV_XxdN#IJnDC7^I^gQv z=N<vJmw6V$ ztoS4`K<`T%`~O$4pJrBJ@IS6lZ82=76ZJ_7Dderlg zCmtSF+s0RSgXD#!1wjfWanmh*zRDX`0qu)4jnr-ThfnxE%*b9?6dQY5YFZWr{-Omk z{A9M+QL}Kkpdh$&XQQ#Fy~Xho&>#QXHLh*sllu>**2MZBF?&y4h#C^2Fj}bh{ml1O z?@U0HX-QE$1wK!2|LLSi^WE1ge9r`yPp)1A2#jk4a^sWF9;>!qIZUg8cj!m}*nnAY zk$`*h;tFN7tz$2}dbWGK8a!-9$46UE0tR}<0jmD=_ZcvJgCP}e#54zvXygk^e=FW8sLx7%>5g2XYsku-&<`o77kamoH%+?OmoJ( zOlhrton7WVIT34FJo;2+V#)KkeNS7$c$S9pimJ(Y#SDDqXQsb{vbn2Od!B1ea;Ggi z7&QcS40U*QZ@WsVJqZ$vcU%8%0HES|(y`+hRza}NUq2F^THogZ6SL-s6WgB z+66iatOs9icTv7eH&QysCOGBM_Ls#!eFLQGres(jr3qS8$_WoMq$zpRIRzgdV`Bcr zRkOs=`OCD1j+{A~EcT5%-w6CUhVCs=7c0#95bKG%a84pS0g>KAv}{|3>N( zO_FWBKO+l8Bq1-Au|E*5+K39uce~qrnm}8+{kqrU+eHAy`Xy>hHS)AG4U9aLI9!nW zkjKDB)+picSujm0aQl>VJT=RBFvH~0{>$c^Pq5g(=*>d-TM^e6gwR+{X4W1F43xiW z_)!=qoxJM^R{e6t&sM4iv%n%D$siW8!mQ71&FrDH?5qJ=twW&w-gikgnuI$P9)#{~ zkMR8D#0}8^b6#zSFh;&~k$3Qlp{oc9ij7BZ2zdXnr4$36U00i0sAEkzGrp&ipWS6K zA$<>oW!ApDK|fG^yW;-ld5HMFWtMuOep`|aDmlkFWa5s&E8C``+zGcvY@<#_6s@nNkr1jj zx?u}n8r%ZEde|q0V7fl)JK4XF7|Q+q5ro*+Gt7#)ybfMXJ(FABDU)gaWAgD++$IS~ zO<5}rl{E@XWv2u&b+mtsVC;L+tNNrKiM>G8cbGHpJ^e>^U{BL`Z)Zd+ME&u7i~VkP zvj(Elv=YPwD(fUO4+#U%yp`%=&VoB~HyT8~&2Z@+>Exdz0>3e&fKZn4$cf{P(us-M#uWqUu_Ir} z;A$uSw%g#(YFX(H7d9J)&ck^aoj;DRt^Wge(7dwy{x3##UZHC+VUn3pH)t(ndxmr6 z#7?cgmT<{)iq+;YKuD5KvB@+Vpk6|o2RyicEaocPS>Ez?P?npGb{#*#wSG=o{VD^{ zX`3t4zvQI?V`cnYKWWHyPN*R|!Iw#`NV@2xYE(u?UEX4AK_5(I3rVwdR0lxq9@sSP z(x@ujJ8chF;sObh-nxW<2$-s6VLY+f^M4NkhrR+nAb@EigxS%H7)Zup@rfcHwk}gw zW>;%(GP3=s4dz*yRD;F}Tyl9(_~IJ@?Qb~OE6q5oe)TG#K=OL->y$ojFm-wa{z=%2 zgKPB2lVjQpE_+5M=alsf+oLu6Syue`7L}NwO3!`+GnKS&K zEP$M4pc!f_SUP<17(2S~r~C2rktl!2%ln<$kssO&WIbJyd&|U4dByGQ_n)F8=1dUN zM}j?vbt8|z9nSc!8NGUSdie2q04+eZPqhw_h0|2nsLh{`-KLwJn$(D^hpjfzIU$J2 zVUbUv^RgUzO+A6(mXz+|cnx*?CUNcD+&pd4-Ola`r`<+tHMcrm@luo8JN_GhB#SIH zpgy0UB9Je+5w7RU9i#V23oRaFWl@`u^cF94IsedKwB!tsE2cSZ zPN7decBCtuz1GfKDa`^P4A_QKA%x6-%G3pd4Gq;O+^+d+`Eu)>e_>4POk5c16s^o$ zF#D0&?v3yJSH=DjH9l-bO7Tt_BNjFv)b0;mzDEdVN0;g*+o z-?3rVBq(FsZY4_}<{Sc%y8OpTq}-*3baBJ?#uP)I7}T>lpK)q^U1KZ!$kmABW#xCP ze@Qu2!luDBGEP<`imM%<8NI2@ZrB#xeaYq8aHS6>#)x<5@uW8f2kfC@=)Yg6iXsSU ze$eK+rM>d7e~_Tyfi#pYV|P$p;)2<{I5e*L8x-E-ac4|E<$APgk-!W8gUgYEy3F3r znvB-~jz9^QwEMe3wE}<1sc&z4VIsSbvyAxs+nJB@FLUtERyhK#S?xRnY26mfl-yk^ zOmnyM)x_)||KOd3p>c&Hn!;O6E*Z9a0h14djnQ`<(rB0(hBI959_La`k1XA@d7*A4 z$aQQTdGc|eIIC^Cvzx*9s)u@OyJ4gQ-zdPTh2m^;jAQDX#ioXgXhETh=68eck>2Ho zE#$eB9f$rh%!uSA4>z%fA8BFJ_a6?nGaovXIDGlLGS&47t)V#iemLF~3nF(eJ*oJ_ z$NG?1*mPsJ7gv+LPt4Db?07`qHhMr9J?Gi65X&COH6Y8vofCv<;|c)nF$S4Z!#+(K z_3vA4D$YYmgP(8i_=HjYcn3S$FIO^`nNGbo<>srDX4v?%vZCtca-O?HRY=v|gQ`>( z?qgmUaJOI@`HZYE*`fea#P^8_=524aZOm)PNBuAu`$F9fo6q`&w^5Jhi4l$#fsihl~j0NwWWu`CC`OGcex%X@B zaj4({sS;pS4O$J-?7tI;;iC2QEK2aERlpOXs6L2EoIiD~*pL+mrPkB^_J%1rvbGU? zdz|#VII18;=rnx?xW(+FnU4YjxZ808y;J=ibA>!L+O6FDJVl|i_nRv_JD0ZMs-aZp z^{*mnrMdFo?;?#SiFS7FtidwO|G0bJdtgFOQ#X`T{J!qWX`Ah511P85i!1H;msDB$ z>CLF=!vA?LX(h}fVK?sQH}WLfidhA4T0LZQHpz$;_<)xa7Qj8h2Kn`5 zBXNt_p>n7RZ}R(|5BA5)3Xps~dz7R5Vxw_A7~|1 zn>f(xxOA_A{s83!b(1?C7o)G77G7yB-yGuR{5DMfmpj+L$+E{M%Yp;qxM~^BOIeny z-G^46mJM-jhDjNs@#o!(DwP-(J+|J1G-m;YQn2Bze9nc-=EH2$Jzwx2kq*-VaKo0E zRfxZXG8DoLVFVy;59v?}>N}rgO=lbC+}@+Pukkxe%G0V{r&{#qsVN8#J&@2tUCjn>XTRHkL=2ZKY@X7+`?8@regFS?w!TXKHWYVOP;63^ zN0G|?9C*g^Oihq)%R$sQdreI!^n;&E-KLhebG+T=yAtk3#qg9g`tcUT8_b2&B*Lo# z;wVKZP=Gi4+Qk9dCPq*RSQ|h=^&K2>dI0C!7#HuS8?a8#QBj2F0_X2V#Kt48MF;u@ z1(3~YuDjn$4!;x69w8<4;G=B+j@ltFYk8|5_=?oafjOB&@A|Sif+RJZX6nv)t0^9a UYicSKKXCxi*EZHF)xd}RANBl^O8@`> literal 0 HcmV?d00001 diff --git a/docs/assets/images/graphics/javve-coffee.jpg b/docs/assets/images/graphics/javve-coffee.jpg new file mode 100644 index 0000000000000000000000000000000000000000..9c67cc5b28269f4f5101830dc8868075c1b07685 GIT binary patch literal 4436 zcma)5c{tST+y62QY3w6HXej$I!!R=;8oTUSO41l(8)L@IV1~4iRGLzlN))n`q7#ZJ zMzUvj?8?3#BBj-tSG}im&L6+)_rCXaeZSXz-_QNIx99Wl26+>JoE0-95CH7#v;bk? zAL0E0NLoe`NGyO45ZH2?003_SBp=LRP_cS?;dD4YfZ|Vt6DVXoCZ4K?fa~i4Ci|IG zJb^@HsQ43uLc&d9@2YEIDj@-;FfWv&z9SV!3=Xl4p%L9X`2@}gC zQ^`aIUWG{x3#Vh5rm&yMv0M5Nw;oL8X9$C23bXi8RmI!UMFmHp5miudlrBLZVW?t^ zfg?}|Lo`B11*wlP(9<{2Lm22HkXU^T7J*XvOJG~oXaRv(H%sfkYHeAju)l_ij*f;$ z8^9^FAUy;IgVEDR>LHQ3TM@c+RyYIC)D5Sr{>orUq!VZ%R7MCTT;)ebygwz9VG7&o z^nXVnQym@uPW&IYMJE54>t{5b;YR$YjsF-;Kg6OE_1uVbN+gXy+zMCy1>V}-e=qbS zaH|`vC4~@4CWbTYEKOls9(X`V0M;0ZHZ-=vpi%mU76^ou0oodaur@-YEf44;jg74> ze_`#y=?r{0f%pp>@(|c!%X(3U>0BahBtnza;*pPpfH?}m!7#dq6a42JaBTH*bgaumPP#@`L}a^&2t)$%QzRf_;u7Lw5NT;BR9ae5K|w)L z`ETJ95)u-Hh{{Pw$jQq{%Eysfb+2e( zU*$rDk4cpEf`-~o_}!~5-|i-MH_fh!-w~I$tysCpk$`&Hjfc7R9U%<%uxAoI-OuKB z7xI8~nzjEn;f;CJ?GsrZBksdPIrLV;z_=FQkDWV&@=B|ez6?81595vsNzkEDr&>v+ z9Vca8AIzf&XWwM=r6~;aU3n3{Qz$H)621K7CYQO;^Y&Iz^arWHCZl%njbTY!xo?Tb zR~(}@Zy5B5_D@+z*}_iN2-aR35;@hQ*=avl!2=FrYKB*iRm;1!!);VbG7W82*d(oo z!YLee9j$zADc^#LM~`n__;g@x4KI`RQK_})b$0M{{0ku@_rp_{ee1zOY_4#&*5yDp z511{e*6_8SWPITP2^mwX;Ag9u6BW~q(k^saT}K#4NW%q_r=iltinSdwC-Ol)+AjuI z2hJKH3N*){QYMv2#_sjsb4*%q^hNoJEZw19dw%Ks*tmAqP|B-yP{y+ClsvW zZ%g_JIr-Y4cx|JS{%NMAqRYDZW=>8qDZ@1f9O9wqWm z;6$c=aj(kvvwp8+13UR-fFsl%&jK%O3sJ=lJCvH&K$lk$Gtprc1G>QsS*gZd4Gzv7 zl^bT7y4UHH9m~C<9};fBfB%@@VvNf)%b~2*wyP3@g>k2wW^7>NSY`K;M(Lr(HEubl zu;UJb8)kOTn{&proEJtX zL_kupHdc~*wjVkD%)G_LGcLXG;JS-OF%Qt%cr%o9u&31UPbWTYb?XS()ad?lv-WR{ zWsZ&T-K4x__;GnBGtndSGba_zj?ya=D`KcZGi=P_^3FgHwh0%N<*nQLjUx3dP+V11 zlI^5M^(*(xAh|y6QjAUSI(ZBIRkLX&-NYWhB2%JXg$x~xa@hRDx%T=t-F%I)YMQ4doHOQl#Un@t%wK17-*SIP0W^iBuRK8v*N z^Yar`d+9FDbby!}p)Hg@51u|@m;ciBbnmCJ`3QZ?<%nkN-n3%W;_dnJ;@a4igTae9 zNMW*1iO#8+y>}-1Iic<&J{tqoV+}!(k$VSBULj>$>kQ$n&8p!e-p^4YO=SfwH>cnK zc6dM&NnAs)Q<9i%d?kfDi;*%#MM#U#g~`uUVo+&d!HCq+(7l7 z%Qbq7dQRe`)GV@Jc=0t1$F&syF_I(8=}GT%%_B4&fykaI-fwpM6NCrs+Hf%1??_RD zoP1~El8qBA%Tir438(XM#Ykq|=8*lrHGVTg7e)lQ|xo*W>_ zVd&7WvEkqRzwYSv!Brl{x&*NMOU%a*tVy{^wwj6fvcSMGEhLRN_AF#!j4QDV<~E;p zTh-cujr2GmYRit;)X#{L`!gps>W1qhmmN!I zu7^p#i;j?3VrKS|f|YuT8C4fD%zH0i&6C&DM$CINN_uH?%SKLj+6~4DGrIvevyb{| z;Eum0YdY|f{&+eX>@$h`4K1Hr&%d=FY0o@2S9dM9#@j{;Oz=_=wCCwzWs|TliG7}XxU6X<&%(X;@4Y2mjOm0w zVo~?xm1LU9a9=0q?WTI2q1G5nLJIsi44&Gz1o-3eRjZL(SbUAyiE37>m=Dz zoL!+C8xy)$$*XZzF@jrcYTRM4;uCUdYG~yxzVgjTQW^D{G1}IO~Kir)I?Vm*r+17X$n?iO>@UJ61P?txm@_ey|z-^eCNuZFe@- zIKYA_R|p{;yP1`13Z0!PZ_tpHaPF&&-997{n)DResC28*>X=Ev3$pPSI;D_Hp7dQC z<^fno7wjQj_A`eJ14p|Q`X(bXCw6Cd*?;Q~ZLE~aK&$y$`w z9r*OZ)1GaSoR64mAb92EZuZi?yaB9S8tP$`T9a~X+Q{MQmFhzyy;-%Cq~~Ei(rtML zHrclPN!Hz}uTD6RU6?q!Sv~T=329%mYab7IH2S2SgNA*1bFn;Nb%&jhiJ;B{0bh+j zi_voqsse28B6zWmKINdEXd&7>x0bv3VUIF}Y9D766uA@Y(<+Y75{w)9a9=?Oy1kSWLSi@e#?xE78 zD_4v@?U+R0?V9UYy5N*DdUOn(gS{eCKjdEU)P00Sz*lEs8PM;D0PsV889isEL)1Ut zpGy78ofs8mUh{e-+H#^JF~cIvKMD*@$vTR(ztZr*Z>H5@LDuu+pQRaI*K3R%v@_{y z*6DZt_}oRB(_ZWN{k+QU!(L$PZFY#A@j_ZieKD4|m=!u-r^uX+uGDt2QBB-Z8$N-p z6Wbu)G2Q9@cxNkGlC-a^XD@#B*!(N#y(+CRGt)8gjI!^cZPDRz&Z7xx9htp+$}7n) zsHHNl_np5Dcpa=)8u{Z~C+T8S(#D;hYSd6ug&#NCMx(u;#JiJCz&%q=6g(qg5uutu zz^l!?ELetp?En460-QTmGwU#vDLVRiK{2EEn@t6qRr`3Xbuz}rcX8s;x+kenw^P23 z19G4pxNq4W+|n%O)1Q(Tssz1`+O0bs9;%;0pWy-W_8AFL<11w*ISBdGc;!erKN)!2 zw5lg+ewEma)01ZwwiaIeB1;^a42i%zcJ5G7q}{#n-f+ds)XrKfy(AS9HTY%@z?YQ4!M`E+e%E6pAz?ePY2@N zlbsjbIf}NO@Iu%`=f~`6u`k0D=Rpu@5mL(b71iyts;32XQO%+Qszq;~9QabHUV5MD z_QDFaI8k@4IK92@5IsL3?P0XofkL*9^4_;;?jtsm&1&n~{Y91mDKQyLDb9tW1AW7l zQKf_<<92H$aZ80IYCGs=FvFZaNoGEMh|`~c%W*mepn{gX2RnmVvOpp!^{N?4vrfI^ zlgws)($m{uen)!Jhf2K1?s36}u3#;X(COAv$Xny0u7v$j9!EV|+$-ERwR>3kGNboI z)93Z;6IGgaqAwC{W!%c^`}4K#!J+ln*+FHFPCFWg;~`94Vj0I9qCo1NRg5N0YW{IP(trr1ww!XNFanRARQG#Q#vR;fOI4jQ9uQx zNH0L(AD1IYt4v_t${ zk=`hRup7z~jnx$S*!fgM811epVh1q+nfU3TywC<=c$8I`sWmdp8wqt6(bf{y2vH01 z_47p$T!lk?eXs#)A(|q8I#)Y8|5nS32>)q9@YWQ8{bm)mH!&C1!QoND5IKk}5(HKf zR)NZaAz&p{u#B(*2&^a%Qj`ZP%7PWtKu|R>MEEZeIb*}Sd#G8$_5R{IyJ?F2l~izW zuw1aB91ia(4~9aa@*o9y1qInN3)z5BEWtHI78@Y?w+A>X0EtKY5zsiS@NbWDEE4rM7X2^mmH!p1rh`Yh5^#8H9M0$O?wNbx2)F<*oS(3cjh`KA@D0IDli?zv$%CY z;43P6P?5hd?*EqV|A~=5BbWc($A9bV->S1=`F;FnO3yC;%sC2sHr)8LDL&l;F#kE5 z0Qc^*ZJ{__0K@@+)YQ~8)Ib^<;5p#g$3O=J(lId7(=*W1GqN)NDXfglEUYZdjO^?j z9PI1@{QUd^7yc0nT3T8rMkXFsRvtc1Hcq~O9{#_F({2D89Uur0L`A^{pk$+TzhP&3Hfq4d z^E6;~Ak4y5M1eM1l*2#0xbaGlB|avDbG$@RjJtP2CzI=pn395u`V3F|7a;{3CDlcX z^I#Y|wJV2+|CLYCXE+7Rrqg)FD%i(pk-7GL1S=8t zD#h`^R(0lrvuwa*C)57xFEDZ!&0hSVbfuXJ$YXf&h2hD~S(3+0mY?8OHw9a?V%06BQ$vKx2FOTOf<|p1>|$uZ#P}qMNNro zPR#2nE$zh-AvW5F$dIgo#pP9oy~1*h?C_*t)6f(m$aU^ zeBK{J?kwty4dJDP<&tPS)^<~HX3m!teQ24k|LJDm0hJQO% za<-np)D!@(p^hKrU8HYNY>m-(yxs6qy`eO*wl&qfxZFS_;l6+ft^A)=)?K2 zL=W;By76~x`JGj;qj$9H52KqC z7+u{j1th9eI}e2p2~<_;;|`m)2qW}JYfe&`*U}f@p$JGgv~8>6e4tF$eKFqFZSUNt z*Xg+|l6E3YIvBCpP8qBvx50&-tmY+1?P5^YE{?+|9bQ&KJB4tow5w=a z9IGQ5;1J?{>x!?6dA#(jAp$g#2HnP9JcO)X{#s?Y;%EICndIu0l0JsKj2mE$nV&=@hq+m3ZwBZGg9Y5U-*~7xQGIO zo89%5V}aH~1v1Ei+aOSrw4=Cq8$+HV3vXE$?d5jyK1#F6xUfT9(!1eZrvY1q{=@osjM|2#G0@v!e+n6H2{2 z=$8EQE%1-xre6;mjjlYt!C?I};6SFrhH_wY!zgHviN7HiEvW=n@ zo0jJsUL8Ci8~$X%YB!SnEX!eDcZT+EL6z}7NB;QFLUutdy3acwFLs2APf9;vyLjZ@ z(sY!_H_n}yz+eH)bBr@S^*GrZ;))C&t5{cB(izj4a_jQd1*E^1 zOwK3A{kqKTB_gead9V0F_Mx!gR-os~YCIn7-@0(E(lK_|CfBM?4DjVr1%+wiINmx={%??8?VMuGTUne>+4wh(0KSO};F=b>Wos;o=y(eR^Y>*(G}TiRS+oA{{b z;cdgFZwuzL-cm-@Qw_)VWL?0JyJVmlg)Tsi2h!YN$EO~gZ((cwOX3rXJ`>lw*0xn_ z$6t5TS7%&vaq!};+2B-7@E#m%mEKZq`;by{MQ6_GQMfVU`jCK@6E?V4VSxmei`)^V+SQy_9E3IolR|pOL=O^Bkhq{cfuf zb}RCJXQWN-j?Wo=EcQu$;a|5SDH)HT5+|MJx!&BwtU5Rg4en4~E9JZop{@aI&HlwO_eGNVf z0q=4StDF6XHN;AdyU(VUSKd#B;XetUAFy6p@=IwUec6u`<-fBy!OwLH7>m!5Fc}`M z;DkKx6hf!aefeZMdE~Mmo~I+aB^PrZtqFmePf)H{5pFa_)|+i<6<}p1u5w!uq*Cop z0heXrn0b?tl^;Z}#vkgcgXHZz6#-(FAQIYd`$;`x_ z&p?iMZCX@0VTKe^gGQ0GkpgnDh+dy}G&hg8@O858(#U*=XkKQ`T)V!z&wUb&Uwv#C zZO1WPkSOG=yBo(Tmt^pnoSjg;>Hj)*zhb1|b=2h>qMnlx5<*{(uPvdQdN@ZqRc6F= z3shwfmJvBX^O_~Irxf$yNi8$9cE@_7Ej_{H-LD=KE4aY;Ho2{P_b}++LL|7%UdK{IGp{j;>hL{D8a$ zewJ?}nBzQU?h~CJV93093XsuHM{d%|T?tD9d{w@tdD!nwx|MAb*({mNJz=20^Abvb zcWF_NltSXD{*s#?DzNW!nZa)z=okUh!U5 zrX;g4H@4f~zuY39sdq9V>haV=g3y^+e(k}+H!I~IYKdVWesGZfq!ZsGPB%J?uA-QS zzebmZk5p;duHPMRe(LK#&0!T?+k6ECfrmCKWI@5uHs|Y$uXE+<_OzOUH$gyO-D&`o zzKADEl>Ihy%h$~b@>qoVM2;R~7K6yAfCUNMXV>;dVUMC|0(GC)0#ciyf=nb0TV(qzEP*xh-6eHGLiVuC8-D>k4_$ATBew}NRN6%KfT6Tz$*Knq#SU@l2&4kMr zb;M^zyGY!X`xh2cVN)@UGnz%OeK&7^tdh5I_cj6hlDY-uy0dbKpA^iVvJO1DIX_Pq z_HMB=gp8>5eRg$(olWsF;Pz4tY1TrprC%2`DEcEsvvgar^H9U-hKK>Gji}p^lov~P z5>sgKCJ2L?m^$_sxMzd60wTr} zB-(6EdpoawN^d6E=+T?8kp%jQEO{m0d3uF9ng>n+K2Ltdp8^C}8m%J28CSQRAd|xl z9m)5{HmGjs;-5vtu~0EYk{5~t&+i65@}uvFmxk?fsA{>#+dIi#dpd9aj(l~p;eFq= zUX_?0&~Zxh2b$J9Yp|1x1|+DEsTA}?oKDMrlj@xZz9jfY{e*_VjtolI){7o!FRx2Dg6jAZ)nM! zKzC)?5!!J*HSgV^lGN`(4o#Rby;*iLI2kVRRDHhTi)XdF!>F4}&Ez z?K?rE=ni)D2YWf}dj4_3$G{8H@9<;D6p>364DL9Pt+02{$YUV%V{q`N__(yuYWX;I z)Kn5gX;PP3M`n-=eiha6AmTd_n`T8nHPHHI$LgeE+VQ?Zawpwrg6j94c`r3C?xks!bu3OaW=+-Nw3iJNK}1wiAo)<<03YcZk|njmMAu+xh#DDomgDW-&(# z^YC(67m^wbBGZ4UUaiByy}va4HMzypY5~kF{Fsy<#ih3302?K zL}@R_iyJbRlIsfL6XjKA0?OLojEhhZ*%h*8wG9Kcj}XKr!W&^dIkDalo5i{Aby@7r z*CZ&}(1GAoB_>NpBH>I7I9)(5uRv<$n1nJa9UC}C2OTJ?c1eB4th#}GFGl#H#kPxw zzE>3~BE>9JX5Lra^O}1bH%&{-KoobIFaZK|MJp1?IQd-5;(I0`374w97ySlTF0R>1 zbP9v*GT?)}_o}3eHg_h!Cd(8*I;V1c6z>M!aydc_ir8?}71>dG|JXK`v5ZPRxG-?E z0lSp=vA=2b5~byoqNvmajHE{D{uZOyi;uZo5i=CLq?+Hq}41<~STv}BHUM9Ujc%D`3wj~vo(x7Icx`4Ot50LYQb7i=!(+|N9izTcaiuH!sh zcR(ZEQha$E@EvLJfm1({GHuu>C~H($l7$FKvy@<3D2Z3o0awY;39|^8J}WaGtN`=m z*aV2gDTjW07hklxcH@}e?^37mI6#QnZvB?3 zWIm4*34P?OiZ@0FcF5$BoNU&&>e=7Hk+30y+!UQws7{|ltp+~oiO literal 0 HcmV?d00001 diff --git a/docs/assets/images/graphics/javve.jpg b/docs/assets/images/graphics/javve.jpg new file mode 100644 index 0000000000000000000000000000000000000000..67f440c7661477735acf2e9fe4422541fc340d73 GIT binary patch literal 7363 zcmaJ`cQ~Bew;o1s2|+@XQ3j)rZh}M!gCItYUS=@rV6=!tiQdN`(V~ssq7EWNZ%Onn zQ9{BYMG1$9E4k;K-@VUs&s~3f-(GvI_g!o4z4r5b<$UgZ6>#l#AleB4(AE|PPyzlU z=Q{vK4L?V>AOHz~>|**Z0C2tv6m`L3F)#@UPhW9+q?ZFq+|kQJBG4Wq0Tq{&04UuI z#MnE!p|Btalr!2>nfFV3Coc$%ROU64)sxi2sH0ra@cTX}qx<^Cj`!Uh6_LC*RX|FC zus{!t2MTKs3iNRI^o0c~^Zq7>U5tNCOYnkzyI|dvc~yT!1)1yJ1*v=apg^+XvSN;s zP#KWCqBv9*Dx&}u1xZOlr6nY#C7{w`P$`(CA`B`E`b&5(qWK`5UM>?Ra8`zkd%^;k`lY{5c3W4#M%dndHVAG&7gtub@V}FuxKw&&@V=N z2QNRYGVevE|6PIy<{#SsbFKb|qn_UX@9N?4YXN@K`eG5N|K$6B68jnlVNenXl&_bc zk0a{Bo$nVI15@`w*<-zYjJ>?v|6awrE?!tKUl%V7NL?Kyq-XDl_WY$oegpLMVA`I( zSbI-Ll(vR4?*)Z88jXZW-qw^;SJYILfy!z^p|_wX^?Yr~jV1XrEuhfBN=9`KR+yo)_)zbJ5r5p8*WNyA^=!x;Q^1=Zk>H0MdU1 zcrgN!U0i`=A8(&{Yd3jjLcMIMYmM!-$LMvhZ4H3MM(sn{(Ojs0zX&fqIy3rkba;0&!P zwWApN2u*f|uh$<;Zr2JMr*qUn3=rcMiI_zkL~AB($b$I5+sy9nDg7NoxN-TV%23@T z2r{_B+r}B3lBV~9+;n>)$T-WP2G!9pUCL?<2$*WPg)`_;v0E?P3!n%W6PqURD-=?V zNS__^!}-I%jaXDD8n2CKuqmia9%;i;wo__IY@ys7oC+OpUajoe+MZ3bcpFwj2Wa=N zV`pay?{6yzsgU-Ty{#$(yYc%@r*wq{+X*@-QNw0x-<9Vd`Srmu-JlZbwk2)9?rK0p z*~T`yxy+ij1Mo+i0Hi4RYxgTET&3h>Akhm=iN7_xy~3OLr0M=PJ=v7)ZHbyQ0VgElRYFSCVH#A2zc zE!7Qref7J*Y+XH}RJKl)mV09>TywMlZ6@S0)ampRZfesLUumfRdQgNAjO1!mc!t@D z$Zfu24d+juD&6Xvj+7)z_aMzLX6zNf15TeSz3J)@XGNk%IPvrYw`lA``~>yyKia0` zpo(UAuU$ew@wa9a^>WnZ6u;|9f?T4z=0B72p=DXW;9yZ3kx}z7MOvmS&-BA;{E_wM z-dk6)fokuEckfmsY-;&R+CqB1DZ~sI#;v?a@6GnB*oPP_ABl#h3&%D0k-Jf|P0!*( zRK}y$kt-b{hXN)uM~>h$^e&}oWD%y}l3Eu!vgK}l5DU3?pV-b~qM_@_VQK!i```N4 zmZ&KfJ9xE{=18&~%q{7+fFSEBOo#Hc<)PM3()ZKZXZ2%j6n!nC11BnHnJ2Q%I&OF_)iNPbcqFlULi7rmki0X$$Gq56Q@5M|Q&k;ev_@{ByzpMJ9*o|2nzCD@tSmKAvPo`h5RHhD5i9^g2k3(#)#NBg zFQYpyj1+jllkyOJF9F?K4ry}N9=YvgI(oPuyhN4fzB$7KD-0~k2K4XJp{9G zs@Op}hQHpF2MD;?Lu#kYS4Shx=JZ+;67*Q!{M;k+=L+yLPl-)>zSTCO%GvSYsm`&X zlChhc8UV+Zr^HIfWRKfuL4HzDzA zTp#q2M>9h=%EpD&$RSHy>7hb_IbWv)sjB<9ZGzA{yzdLXFQXgJ?wKBb2gAZN2pZ=A zG49686(yZ?%EpU7s1_+CEo_NBK{ba4F@J+mb0G&vD7@({d2jI_|P~J$q-m`TR>zflT}y;Us0|UUG|f? zuayI|Brau5d&m4lRdA}n=o~=DD32pvT^BGn=_+?MBGBWVduCD|(OnTri2Z5aq1j{+ z*-RVnw5xokd+NtboCM_RASw+jLxIv^yxB(2UZ+=UW5+-%wrzZZr^lUinbHIil~dkx zE#wO>Cy%jqe5=3K2qxn2E$MYb<9pW;Zk}S6e4!r<<|Bx-Aa~DqJ#Q`}oD+XM^7B-` zw0m4&z)$F_Pl>$bY5bNf-fgh6U0^sEb8O%&XBp{crcP{FnrD=Ql{3?E zJ7ckq!FBscnS+44BnT~rS)-X!dO_GZ02Al!ruJz**oiZXimvG8L9JD0EVXIHT^dAT z4kS$H%^e$$k0e2NfmMkXhah~a1yKDhaMNUf_r)J>JPZuO#%RM#8pqb$-dnkBt`f#k zV+&I$fUUf13H6tf$ea1(xSwQIRN4!++9VZS9b#wpO0SM_#0(N4v+pc-)8WX%METNi zwT_}>CFpD*Z(n$+>n3{=f7F<5N{YonD7!wIU5gj9U5#YQcAnC$82cL3mmamhn|?P7 z16bRuP`HsjRIGG^^kaK~C~YvbH`a$0cX#1Y#@rg^Et1h3`yWXn$x92LROic=I8!N4 zz){Pt9{CGv%}jT5(ky%i@HwqYc{s_qC^jbzzcqk2&D%nsQj3+bIh{cX%Bt5M`3jRB z#Gr(+D)VZzvmyK1IRJe`&<=uj^WkxS7Luw8s}zmY@HFTbP z7S?8$_Bj354&_Q_jWR_ZIPxgBLg2b#K%F*Hs*MDH&LO1KlceToTq*O4dK|R~fJTp;DQ2z|7ep9b>LEXp8JZLR zA|03=B#uO@@yC2Fr^Tw`A{*1?+{{Svr0@|2zhFZHI{Int9jCzd`|iCm?Cx#&mt_;i z@6a?ZuDnIU&Y4y>MAli;_9Fb+r0Y4>SM$=`C#pa5d|ZQ+FuM$FAHfG9psB4IlfD8U zoQM}Ya!p*k)VK)#`IV2CsFw zINflzWv`^a&pJG7PvA)^ZavH~qS6Jtx=VhGF)_P6$;)vB)6Km*b8st~LrRU)J=)S8 zCzO7IpZ|{Cii5adbaV&r;qYUI7DVT5mbc8$b0mnASYOJd8|snwc6bbg5XJeIA9bT+ zEO;$g>156Zxh79AcTRM&g7=?ohD5gclP90Z9O&Vvt`aiVUJNgd^FVaW!2}4rkQiyS z9C!HVy_*Z;lQv5}^KUvwA`AnH9^P9>v^4)&V%HG(yw8sh?%i7LBn|ZnrI=(X-fUA%^#5TY(s)&a^OM51(SB8Y%cL zLo!kKrIhSTJx{EbeaYgP9Ql(1p+x$}vaC;;w+u#c(%1U4X07#vK}GbmtQ!sM%O5S) zgpIbH#M;z%+lD){S~%2UtZX7fL`4m{FsiJwTYCG@IuYh^|{@gvt6TR@T6RSjb}Q3Cfh%gG|pqscTbh_E{pbC zR>M_grZKGsWFRU?T$TT2Nsdh$4OFxAZ|n5+MOs zY&T`-wG87%cSyJcbee!Rfn54s&ta}H8GGy1$t_|B}R=@8OS7Lc&4|sO(=J14hK?=7ZJTPZ+$<7QjR5NfV zWB0H~+4MuX4SX>kEk4xFdn2}*4WWZKRsiVHxD6L^a`4GXx^>xl5j%Rs!QUSQ7?MhL z?|LHzXPRaOm&(dW)8Riby^O5mF=u_9GV{5a!3&wkZwmQ_9d4Is3^1|2iypQ{Gw_Gg zFt1U)efsK(o4tkGM~bJpo~EqXod!*3FK!eySfUYG3EjcsFE)*Jks>KTdc@cIQT??; z;xTW#bCZQ&T?}30LV-*fvaV=BpOD`67%X_3v`?5)RM(5Q{W4N1pMciCmBoaCD}~#| zUJ`;kH1g~5-6 zl)WIO!JX8ItJW`4ofke2x%|;;HC9yeZfJr@dl0rdq_S$1Nc00c&%MsHH#=fPdY#Uu zrqiPJB3;A#`YoOKroF}Gnnd)NRt4HB^{=50O&C9JaGJdQF{QG34p^8uZigI?*^BZ> zWqYvW0f5F_2>b_hU94#_b6s#;m|)Zw68~9jOku=cn6pb5C%uu2Nm!3^pO}pCfA8Ja zg_@_f>nO}^On;moY)n8>1YYM|%*4$uUT2gKyh{6hGbA=3dd_y<(jj6#2Aj)YwMm#s zKXxpv@B6cJtn%p6Go|T|3N>;uI$cOYwz*lLGvgztdMdo9GAt!8m>qa8hI6}CDdF@*NjUGp8cpK29Qr6BfnhYc7?hwp__xs zti<%kz}BtlT10I3E;mm2Xqh7&b0q=6!SDE*8acJzd(6hE_(1jAo5DLlycE+uXzB_qvH- zQjN}|eibpui~KQt+jsQz>rHoJrB4=fcb6^S9cy)RDR6cKoCqdVfxV_=@{lEQH|Inm zzE1M*-B$k7r?Uaw@OiEx-*2SNTI6GClj;f7Ye#0ko;$+pBzK#6w5j$q1)jzfCrriv z?T1Lhn+}zntlXNBoK&9dIt+jMR37ks_^GqzD2OlM-gSrFBOb8nyh!C}618AlXy0*g z|BX-1m!%HW5(UQ>2rS57tRr8)S#Q=n9S{9n?o}I&uv&Z*e|KyqNw3@fa z$m-U>{?JN>1J@*jhoD)?bmDyaB?2mUWm3-M_6_(B;_HJ&D{V)!=p?SWV!yMNF2j?~ znElXYBL#iOK;Td-3rI+4EHrSff;{f$QS1BglZaiu6NI_=4M~Y@ut`bYdzrAO3a%_4 zN_5V4caisziZM@(=-s|Br5To!*J-U4MDb}%aXie=Sx>`$>HLZHe8ka7l)n^q1YA4^ zcvv$dMI4smJ#5zS>73BwM7le0iqOl8&(;+7I3MkP`z+M+oI%=F-Ew`Mt0?Q?ovYYX zpJuBPOYyM{i_gua>0Ik>S;OmtNox<0u*pyeS+J%uC-m|9o9oba(V!(%%MxiyG);w6 zS1HMG)tJ1TB~y`q&crR234@Bp5uhRZ6U&ft*NooB;Q0yN??J;JvM0~AVJx%aTI3D2 zv|PnnO|U%Eo}DkR`3Do^k3K^lH>)w@$uFMOILH-NFvn&}&tuO44mC}G%niRZ*&_@L z9X*-I^DwOTAFHiPDB4EM?!)S&%GpQ;9mfw~-2L~I3`TxbwND;wu{^h`U%hx$Fe&d3 z!-e1J&?q-~eJiwRk_DA=R^NiHt_+OFsK-G$No6N4{zh;jSy0pbuGh?-Yqekfe#s<< ztv0)zXReAkS>RFT>fsokQZ@02F@ZtJhH|M@G#qTjT&!$lQJi2&S62Le)q;Ij?53`s z)cO;GTdc`y4(JA|zWrLGlXlSUCb?2>Y`L)^KV8hnC`Uy>9Q!bfQA1I54zKMPBE(U6 zqWlMDcF%?cbHj4&=4-v0Pu(UkSJm2?r0vkv-r4!&*Z>uQca1+*P9=O#&H=U`@(H?z zPFm-HPjWkR+3(H)>t`EHh=~@eWZ_BT$L1?Fy7Z6Rue~(d&lo}=O!Ct7fn0A-f;(FK zcfR#UC;w^txMBVNwy&GG`I$;TOQZF$IkiZ>c0OgEvUU2#Q(4Q$*ZjYa182A4Z)*pb zzpMAJ+I;jk3MKIKJNX3@KSqgEN&qA}^@hX0`A8ECDH60QELr}H{SzN@yioFzYM-+` zHw`3rvqkBean_v7y;8Dqg>XY25rkSG&WB~y)>8pz!DV{!p{)$F22j%8ifbxIx_EJT zvW(QhTZo^$O#>#Pm589CQ7n*6t72Z~AGZ2jIr7 z0ksx%j{c95&jAgT6K%=O1wZ-c`mi2-yG#;aG6ZPD>6lh9IIO6Gl=em*`Skjib3nX1 z@J|EpL$f`fJnWG9i-idspHe2H;cY?lGf4l!K-$23=`LTGbQolOD*X|ISWMbgQP-HO za_^u^6l&_Ku;R;C5tPHJTOX%3!cCIkHk-%K$>eY*_vp!e0TRdFC3Z?5G8W+@=K!9U zY{<^l-V|+hbOAReNf35n9pKt+*#^LG8w|TtBsCs<>t)sY&^%j4JiRZXMrF%Yaj>2w zYRes4MtsevV;w`B!WH94LrmN^$$iU4*v>{Bt@|Nwuyb|D*mT8`r@l9rALG=y3IrUG zuD&zRa(>Q!UHSUz){U4)I@@cIpPrqouQF&-FK51NsqRcW>h!qT9&gW>@#uX1zW`?X B3|0UD literal 0 HcmV?d00001 diff --git a/docs/assets/images/graphics/listjs-logo.png b/docs/assets/images/graphics/listjs-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..d946d8bd2b0c61a8aa706f456c52c6e6d74b234d GIT binary patch literal 9780 zcmaKSby!=^)@~>Tinl;ZDOxB{Jh)2>#e)VbF2M;9oFc_(aVQk0f(D9PaEBnl3GPzd zOMwD6{e9=0@BVSm&GY2hvuCgM&bwr1*39IChMEE~!7~B?06?syD5nJgV2S?yKETEF z?5^k?V=h$gZ}i=@ovq!y%wZ6~D=TLU2!oQ7xeY`MVs7Q*iiAi20N6}+V10LekgAxa zvlF-ZUm0$1Cl`!103adl?P6}}0C8uqfY{hUB^eJJTNxSbtRxxr1VKQMi!8*}PSF5aH!y-~;mV^8opIc=@?_`NV*tV!VP3|N1au zMuS;di)qQp|7$GFog|~JySs}R5096Z7q=Hbw=>L!hgVcoln2Pi!^g*kk>GOkfx4S} zb3xsh{*539akGTkxwzXoLmB=enp-$~xJxo(nEsCmPA>m}g}VLAO&Evqc$>TM@NxtH zn)Gi$5a|Ce>g4nvX*YK*$p7;Fe*(LKeOw?sS`as9511t;aMnzJhjI~EQ%{y8m0(>VI`#|5x3= zx!~l28Cebjv-5;l$-|tT82+(Y%fs))Su=ng<7G7pHB)Lv~aho}bFGz+VRSI88 zQPH;8Y)$)-UM`!~CwA^)3S-KJNn^W!oYDq%ea{&j*Uz?8(_gI(mr)Z@xs%I z60Vh8d{z8$0Zk&-cQLnPG6xn1gW&R$o7~k(HJUY3&BQMHAMvrQG`>Ci4%d!Bjkruc z(0P+`*Q~lG{w>0^(Xd9j=539HY?RIb_=kjA+j`=VE4)Z82~4hInKjyt#XozViw{t^~k>C)tLIGln;)c4TQp3e{R(AEJ(GAI91y zFy0@%4EgTcy32V8Kj>Jt=wv(aF<|K_W1es3V&oisFNo-{WYhXwT$&g{?-=%5gJlIF zkwh!eV(3xk!Woue6nu9zmyQyL2evIYb@C}6!~@Uwq~}j@RkODPD-p2I^k@M*@* zso%BaxDLMye|LK(u8I;bVeGAeejCYXk%J+^7m?jTbD z_(KXE)Tc^OOf;!RU&|%N3Yh1)sAWYM@bnvf=WF;+Qg{(f=3$h9`M$CpdCMS9^ zfF(fBy=R^AVR0*%3s#of^-7A(b07NQUEZMu%%Gcnzh(V4af*!OB}0gjxSv5GAO;D+ zQmLE-&rIuTjOsbjNRWpou4QF6MW7~sUHEuK& zJA=J7wq|#EjIME158}TIUl;$TBzsbEKa%jqsIg|I_ZlCM1x;o6?mBzNXHu~Pi`P1I zhm>sUB`3z3OkTB)tnrKwc-|9bce6FSuJ@T{{7gD%;dW<)NAY&0{-&`=<~Zd^9-US) zcB%JE`qwSPH5baN+*Hvz&EFb=f05#M%w89l-dMuuEFaVEneni8KmVW#+n3f%1|?d+ zYMTR!cX(H59=*tTh9-rAl<(9#cxFsHV2Xh}nf};{ccXQ;N7QI(AmXW8$&NZ)eXJCV zr0uGkur$XE#%l!+r6$t09RL`^f_GW9c@f^nuJ}ABlHo!`F8Z;qHydlIMiS+Jnpv5# z9Ebr1T~`CzrFUkqN8L}fx$Y*|c{OS%zid$;ZcinTZIie+MmsNA@lVyUzBteCU1>jJ zp(J*ku--O6j|pK__SBS`b_eKEcqLVRY;M&xR?fKJCpJ|^myoL06I+EesH~tp**GzN zKkr%^O6^ktI*2Pq&Zxy3*AFxo01#W2rLEm3U9V|CsM~LU)LtGF#j7tKUK#JnySws> z5*`H-2$N$`1oN-jy1Vj;8vgNneg1s*nN0idFS`*HGtrSz$Qhrk2rzwK3>F2=ZUm`{ zDr&U5eSL5JytNQj;DjX?ernVj?Po1Vqk3=$FUE|YhdZE8SEF~Iq)4!&geQ0YstWU4gep% z&YoX4QOLp~z!*R|ID z7@X16o8#*(WzUfOxQY@?ne^Tem<_yiW9HubwYOV@CaIbG@UGPkLO>t&HX$4q(9cNE z;)OR328cXhVkT|;fe;cEXFq{tGXva%E<4YRZn3*X|18!9)6L(M|X_=G07w`w0UYm|dpM`}6D4bMT={4C|r&5pzCiXnAv9p_78D+y|8&a2n%Dh>}qQJW*bp9q=x0wUV~tTw`n*UVt7MWxCe+IEXo!a)A)c4TB1tC&a?4a2v5Jj%boRSGkKdLXsSiWoB2ya!@S36?4QxeR#!HY4w}LUdL?(B zA1JmRpOej$6qyU|6tf%X{ChG{yGSb2G$X0nx6sT_1cS#hTwg^|C8W|zi+J%adwcWJ z%BgGFH6#g6NsTfdV#DlRxDHY7aQlWp1IwfP3TTSmmt~w!_x-KG$wtCoTdTKOQRAb= zK=z5zY>=DN8D6~1Vu6@xN9A?`KSE2mAem$^Bvpl-dPJteDMb=K4Ne-(H4>~*W=i@E%&0Zqazgxj{;LgX6SEyOzcUJp53nw}3 zmWn>?z$QDfG4VI1Jaop7n*ujtYyA~;RjEaa@dC^PPE>R(!Kw!=lN#A7zh)*TxQ9z- zX#1Y(rxVEgvKFso74~?w_rc9VEJ2nT;>9-kXwE|c3*Uzh;bNwjY80v{RGnXpO(H$# z-0Fox#yzS@=AyQ}d{TT;w!qc;{^gfZ5c5Isc*Z^nTiHkgz04rcv|^Wtn!pJr92tQZ zxYmK1^1K|s%9oKxh|Pm-d_5H}H`xSV>4yJU8G?n|G}hJj^lC~*ifnQSE2k1`0+Xnh z!#_QIl>Un*HQDvg7cx-;VrSoi5+eS_>f;$+%GjM(_jv;^E9?!ws-omwL%c~wyGf|# z-exKBRq}Pv&c~JzsTlB&XV_&>U5Nz}8c;n<8_m2N+z$gHlrQ3Bqx%N?>z$Fe22>ax zrilS~}gSA)ct ze2DQ(z&%cmwHYr@JU-k{`SYU9M=j`YzQRR&Dp8ThDo}X?+f*Z$0o0_RB>GIgXR8N{JSV@# zGoU)HbIoPEdcGl>njV}{X>9hy}F%{Ir~eOjj=zAC=4UfsW$P$iYQIm`0EyImCZS;%H! zo%@jx4MRt66<@YKl{JLu$4i2bk+Zgkot+&eM5@Ca%2_-M$y`Z|(W$R9r$^X0u*Xjm z2Pz>jPi!<>7dcQe@@auc;M*y^q{dMFd-)ODZzxU+=C15vl#dkJ&VbF4FjrF$GZz5PWQv^-VVH z;JTs3DcfEGRIC%>a2yxZHtC8*nQCM1jGI=QmV%~Swy$o`odxl7%oafI^$!~pdHkuaGGxO9` znFBN}%1X4x`SKjSVo>J=S zu3vMQ*==p|$T90swv#=#A=mWicoLfB{FPtw-9m>XafEu%sif;L*Kc)`S z=eOa{RyU>Je)!u`X$|nU-)8NLhDtQi^u+ukm9WZC~Qz z;Zpisi7#ErdVylk>q9M>>aWhXSg-RdQ{6 z0^RWpOK)PTlZ%;4MTg%m^#bOVdtt$M9DIP$6t1hjKZ`D$Se8HMSrlHa8eLL|`|-fj zZyYa;@;+W_=c61uhx@`J!1`(P7D3gTUoI>c0Twv^?d)f>6O(6iYSc93^QEORe;ncB zeNHaZ=b_ui3uhH69ys&MZOax>m*~z2egx@5);^&$YML~>w78O&v%|kp6~wXlE4UF0 zOX)tD-6nb)<{{W2r%UTkk*^lZA7yUG?TQJB;7;Qzgdh7a|GW_vdE$}2!@aQhB$|#_ zL}Z%bM-`Iz2|QLNsN&IlF*U~aA{QzeyR{6h#yi~JF{kUe-;Uoc^+++iMR-z|{Tx;F zSiIndQdp4`o?CEZ(ce9r7|foD&|N$>vf_yEm}H3=enfGZLTW^Yo}XU!XH} zds_DJ^fG2jPRw9I_gylvZ`?v+1V{o?Q!b^8qU+*xh@VRZR5_4td>Rv|t{#Xc8pn19 z(o+WjlQPsC0c~}oM)^ohoTmUk^PP58D48o3Kt0tRn6&l~2>9L6g<`RJEZ9p%2{;O^ zK%sx7&DWoaV>S!hVtXec>GQT0_W;?v`KO8`7$7zdCQ-mqie@Se;P>E9)gQS^#kQkB(|@+uY}Thsj3n#GH=0sv4Kol-qeTm=BKVYzAZqg~IbD9+ce zNEB%l3ef8eSl|>hSo~nZyk-{`Kmt;jHZSv6ly5{8`p^{s$N|MB&;ZO}0D!9?LhJ7n zEo&BqH)epND0B>nyr@!EA#2CZ>;Ua|ifuZXsgdqNhbx4|#B!;Ydk#Lfs!e9KUbfnV@jK-FM+va11XcR-*?5VPZ8n>U@_cIh)avNtw$Sl;Q=gAnS*!R zjvS^AvKkUbkgKvP`lMqWhOhy2t)NY2#8wZ zx}GGh;U)JKrdwS0j^hq&_2>?KsL2DfU@iS#!wQ^k1R{1LlTD3`Dbr{7KwMhdv+AW8 zBc^bbE2Tz~1HC=lBpl)&e9kISoYS-HQFS%Sr*yhp3@L*@OOZh~xL#|y&n}UF_F==T zS?$-3e}tME^jS!`6V~uj`nq1_!8XgE6>*ZpIA3}SN(wgN1iiIF)(Y9#_5N-nO)}(I zv0FiQ4XB6k50>g4Iuf2WPBwPd5PGy==5~*_hVXpK^re|jj@+igoar{`huEXdIoq=5 z0Nk%n$~0v6qsx8tlb>u}H3?T4(WPuNHomo`UI&rNY?=zy z2@4iB-qwE3+q-8ou=gTK`Z zxsnMLba29_b4|+&zjmH2jwLK9({fq(#p7jfe?T^WnJtAshaRu3j_Md-0Ls~RUJLS$ zTORo5+54^Gx~qDq(`m8i=&V(-9hKIO{9c@$C40K$H~CCZ%8#_Nk7UbmK?tEcd8o5R z*64jqC79BhCMI*B<2Df1?hytu-V(=F(ax7`Y`|IpdyOq?`5cbG5ExK1KXJp09b2CH zp{zq8;YGXoPVCUdlg!f}(2UGu(^R8BLbx6@Niq4A%?y2NR6FxS z8!eh)crUL=Ypsfjv;A4l&iCGw0l~H6kT^ksIy|Q4Gca1!WepllO0t}`m^yEdU+kd9 z9PreL+YY?;?njHLMtb_#Csp@GM80}UfmVyi*O$Mi^Yed^jL$ubz1s7S*I#rAn6ymd zr|Vq@*1tB>Mq`$;c*^{RoExzfp&8UUbUJJbpCWqdOccDFAv7knb<}TxEulxhze;(F zBvlPn%|$-PrNpV-nKM^D^{4KFQ z+LD^7^P-~U7QgFJNED+GD667{O(UI&<74onoV4s8=f;?YCvHku%}dTsrmPBcL_-bq z#e)h+0!=4q*$FrNz>G^t>1f$;_NRelO}wG={HFvh8Jb6?13 zeZS{s(K&;Pd>#eOY6-BH>qV8)+8GpD*Nvp*fc%U4^nfOAw-Yu={0F`31Oq@?4}IMB z*XRnz_AEJD9ZL9%!2HY)H_T=N?*VaN&RQ!#t!{*9G zq+T+gH(tz0rEBnFN!mkW1mXBm&`mpPaB+gO3|-fUOM={tcES@KvxrC?I&++;vu3Rr z=I5FbLJYxKbtuW^I?BNXis;sA$Wo!jRlHVOzL=e2T4vce+W=k-6M0qUiUE#UM(nGD za@oNu;joJErqkThypps`S9%u8EY0piv=9y-Tt$ly;_@NWPc98E@Y3CGBi=D$lxSG1 z(4@?nq(2keyTgCsrYk!&b0gefr^~fV`0X?ndQi4f7wKjHBlcwCD1R~qIizhLtfiQd zF$Y2Aj~qFsH)h`Z{7_wY;5kg^8nfm2^N0sN_rbNgq9eJ?(UHUoQtQ}hG4_QlYc-sy zxlFYbKYB!~z`AHA%$`I@5VHip@)DQsZ$MIA6yBQXyv|$;NtRH~m|2MGNZd@pHw(Af z^$mP9Kd(bR;r-51C2FvQ6n*YU`B|KX!9sti{@uG198BHo!CoAELuEm0T9WJ2fSQwx z>Lhe@j2J29toCT;=r!0r1DnOVg`79J7!OP36cc=HlUVV4X~Sak=RwjbA$3Xf2HEtX z>C{sibt+?Rny1y@WwP22iq(M|x+Q@~mgw#8oWD`})Jo zROP-?5FPBX|33URzl0(Bdg2}X2I1PZxEqmzuh8S#Q92zdhKSr|)-4vB`432DLh%3# zU-!S89dSkM1gM`g4T}n~T%U_~;Mn6;;DVWqP7g``7N-gKkiFy6ML$hv(7~fguduZj zAG%5CTIcFj0vg!`n!i4NbI_+;lqprM%013j8uMUjYSiqi?<2@f=}m}zSNu61Cmgbmd^qm^H&|MYuT82H{ zYyP?awB}G4l1g_CIkhQ&>c>D3|M7`oinuhAU`9Zc!~M=<^1B36BxCNk?r>)j=?|Gm zs<on?}6UfMYf{dsLqAVDCbO$q~gy<9U0<2p35A$ z-yq4(#X>#Eb)w=`pD_Dp!=#CAU$sWnUOe8{7}UMt)LWAH%wl7xfo>4>d}Itrl(%M2 zuLoBjW2*!+abPA|oFZGhoZsKhmgy#6re*RDh@KG(_$Z1A=^K{U2x@GBtL>1WH~fLA zX#;^@L`Yk^gmrSjF}Z2j?jt(vZ?F24?`e(diUjttT>=qVaGt_jg~_;lVwXshL#3Jye~!Y|%#J;E zHMW#3A&ySFh3B!8q1&Fk=iQFq^DT<4|YBnqBz{*aH^HW@ojb zX~aIyb6DzRJ<{yuv+ow9+&U~Bwv_-g=5eP%w3k=My^pp=@}quOxZ3PmR<806G;6F9QaT*rv9DYySgZSk&#*N z)8HhhAwu6qKSmwRL2wfyw~=~Q1vj*%1T4Bl?V@p5l@Sb{0h>y*xH5Y_S_Ce1+$1bE zK0P^lL*HWnT`4}L^a}X^lZi^-x*}A;=1ig2zcf%jT_n}Wx8?4>69EI?pPuu9zOszoJYZ8^ zq@QjFbt~XYxxRFhqDA6Is)9M5y~P?go#F8w071`bDSgi-T^D%po}%DI}Qa~?R`0%K(_XIh+2O3OA z1NvyET2ZlU4^VhXD(c2urU$~+Z{C-jQXezKNo=%-*yOR58!5$~{A`~_?v@onwQ9!IuzXb;cco3qpqly%PbQ zCziFE^`GMXuH|niz#LQIncb{5!#AYv5{vFj^wE;BP%J(Fq>c9wO?u#RW6^ln>d5|_ zbkZ~CR?XuT86A7u^YUMTUw27Ah=j!}Ph;11WE2!`j!!)g(r=X3IrmNs*aqLDKeM>_ z68I(~;{LI7=>m`PEKj!bPwYCQCXP(cvD^03TIh_-XO-87d}_>1Skt!9274iYED5X9 zofnflNi?Ap`!Xqt^)a`kuf?AJ4ysu@RPnxbG9L>GLWb$*g_RXc6~28X!q8I!_E+qP zn#uTkQkW)Pln=jE64AyxwkUI`(+2ZDz+>@xxkoeV0Vh?gCntR9@ucyWZzn#cZQAcD?v!)DK_e!s0nUWDPb{yPa|je7q_bC|z%cIby&bn&wX zcoYvE0)-X58J9sFK}ZPsT*_UMeaX%iTGINPu|ANioE7ECKzC$*-HBW)}ZD<$z%(t~XiB9w?CeWK%Gg8Ph zYsFtzFxy2Amjiqm&tI1pik%d)2UO}Xk{_q&NboAD92s^e&r6R<7G4Wq-rXYt@F@lC^!xUX|NS4A N(i=6o(${9e{|B2mkaYk6 literal 0 HcmV?d00001 diff --git a/docs/assets/images/tests/boba.jpeg b/docs/assets/images/tests/boba.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3003f7bfda3d0090578da1904e62d5c54dba057b GIT binary patch literal 3271 zcmb7CX*|>o*Z$9pb+V7GEMuLqmtAxVg_*I9v5Y+vvW^UckSvicvTtS0zK1cUrb5(R z=q@A~6h&FbQr5dXo-gn7`Mu7!bDis4*ZKX<@zn7bfDdDaHUmH)005m7aLfRb08Tb` z4t6$94t5SGl=Bp~FfTV37q^(85TCG=gp7=o1RO4>prs;*P)EYys(-1fYwPOk>&q%% zynIpblGb^BT@Vxs<>ul(!^?X{R~{~}`~SvqAHdH6gaK|4kPHCk2SNBj$Af?v0D!@e zlaT)d8!I~q%mO(fb@%`f1k4I%VFj~+A^)8Kfg$_=3oDy|v^vaK#+E>07u3k9l1&gY z!9D8V3eDBLboE4c8U#Q<|2_ZzaH2broltW8Cw^csh~8v~9!2GXBXT!7umvUmimcQ)Iv)Y89ExI~9nalt=L{KiKw#P_&i#^Oqp za$F~T?ywS4vYXBF$6}BTD0u8KFoaHj300O@>bl%-T%A7BkEPWeGP%1cv`#1V!6e@g z1t=@j9v*BySJ%XAAnSpDjt#4EF(RLbJ;Wr|-yXE$BomP5R0|(1-1h~S60CG-Gk%v0 z_`g#RnlERrl)thXAmQ<3tr@pmsx37kR!{c2Ofr;Og14 zo|B~J*8MEoQxrFehe%Zu)}rlc=&@ z6C5(TAd9j5=1wz=)Dok4KD9yInBko#U1(%vUSIP2bz=*=z^HO~jm|dHzWsM_6(TP7 z-cpe!!tniw^s2$AH(O znf4W5O=q1$(T=;OdIgna9ak6YA~9@YGS7!uizqu3X*&h;A{9g3@Mf-#YS z1ODkA-){M#QC{kKXzF-TK*GI{K#i5AjMA)&B5jZ#CnlCmN3GoEUw1!Kled&Cp*cyY zfq-Ve3xm7j>vkEaQ;$A`hNT`%W{&C?-GqSyrWAV z_!{~gxdz@TilDSXabo@!&~*)+tSGJL#7xhRg_A1ty=k<^{`oyC?m;?K;hbOcl4g2K z^*Id9$6ws`%a0mJM?Q2)Bje5hmMc*pv6?-*$PQc@#wHcixeG6xdr^?8+I-FK-8(Kn z>++WVFIC{N1 zI?O6dcS^&1OecrAxiHF5HaA(n-@|K>&@F4p%N4osc+=@1P)aAbm0-$uSr73<^L?&LZJ7ARWmMC(W3FbWvztXtf8S|L-fy9ab2gUU1kSH!al}|Vyfl^a9O^K0jqZ- z%;lDhA=EYnZ8?I!)ptykO!F+4Q5Skh?Ww{=3;Rj~2OKt5!xp}M zK{c?Sl}XF8v3tnf^sK(qw1fPNn99-js@IhLwWX2!&!S? zr$`Wa6h!B=RXsvvCvRs$VjP{Ff@Lx$@>^5Zub{RVGf2$%`qVwFRishVs?3Z>J1;#v zQceHsDYK*t)t&L-*X1@Zr|t-OcK#rBw_d~~rK^`RuH?SfmB{=Wtsr#UvM(qQjsag@ z@mSeiQ%0uG4{bCHLFUE-0APKI&Xkyy(uphbyJ0%ct;cTZK|!%~DOrOfb30Gc5sO(67Ci z?&`)qP)tfbe`8Gv5$(x0#fdF8$eS7PElnL!Rcskp&#D`nlN=5zQ(p*?3eY$&?{e=e z#YF98X{|S9=!s5mK>JuUH40R; z7pt)Sjun2}JzI+Z$a!ns>f9UX&t)5&0~?o3%DP=o;llfzK-F+J{Ayz*27B)ZOMmXw zh(m7};&C*YL>c#fS_r>7`yy+0ZaM=m;3_Qw@=(oZt4V}0p2s~$oSToDoH$ZFCuS30 zCny*Xwxh|Z_@iKQXSN5|Yb(Ybzps>Ej_blkVrW-~7_M;w51epfnGT(BeI;c_RZaet?3&k8AT-gxEBO^R%ne zQxdVwom4iFral-UHs-ShmFdE$g#I2bek(J)_^nZyLZMo3d$h55gc2jfIc+;w}-Q&)Q%07;#$;wMN7RsgPWAO*+(d zM9=Qv);!&qs_N`8M2o4*j4qwI!C4`wP^&q^1nVS{Pb1ZMg0y=`$|KqtMHUgQtwXJS zB^**F4(rV~n1aVZiVvex@*r?nxmwKD#_IQ*%4HTa#w%?X!i}<*S6;N1cf8*@1r7f| zpQ%N=)hfWI`5wyB(x%HdM?QxI22F3xJl~11tQq>%#FjspD2T_ z9pXz)X_?Khtl-VEBz152>u+x}d1z1v3PU##$J!)LKu;`nXG>#a%$b&Z6#|2bHF;(U@1vXB_+`vUy_U2-e5=KZuOZ3{bDZ+kL=%QuO8Gk?AsbqK~=LeX+-ZrB84|iXTFcEp}5OpNSyM>BE46KTV zGa|&7YvT)YVRD(S$3WhZLw#O{{37Gyq0b^>t6Kz;X;zTfFcw$G`@D_OM11qeckU??y{%5UZfxLqvp7+w;Sb9Lb;dP@ALYHBHMp{7kbi{vY{y|T zcHohl^?c$B6~i;$9XMzLK2^!{Fl}nD87A5rzmQ%98OWo_l}mBIE`L$#`cy<$WMlvU>=I-mDl-hPA0vwj#0krF?mpE_peng`LUHIv1&FqKlz4{MwG2O z)sP~cy5JPOozvmfqEgMpY4Hk%-GgZvdk=xPO{?U+<`fhAMjRPb(_+CM7m!S6;3lVqU80keOBg+6$I-`|`Nv5*8BF>Jp&y>$D` REz>k->m4myyy)?#{{ZJ5(wYDO literal 0 HcmV?d00001 diff --git a/docs/assets/images/tests/darth.jpeg b/docs/assets/images/tests/darth.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..f4ff609a0648f7a22ee13e936738f9137da5771b GIT binary patch literal 2109 zcmb7=c{tPy7sr1ygOTNqv5&!I>{-eX8HP|}q)F6B_AJ?zMwCdj-fNlcH)U&zLH0qG zD@B$t^NyJ*dv+Pw%2KZ7>V2N~dG5dO_xyLh=X}ohIePa& zq_*Mt$Z8uzD#XCQw@9}EioEgtdnvu&atGr=D7)KbPUIC0<{Wav_HPY!n9;vhexfT4eXf%L!%Zdb=b>1VUNpfT9_qa9Y-bZpKXl zpR8erV#_B%xySQM(pnL+Q>C$s>xEv6b+ti*!$hy8@5IIjzHQFk@ITxMKL{!kbvL#g zy^DL)iW7RC4kUiUG||1soqp`}#Z9#`Om9AStG{IzMNc@>fEnrpZ~BYzpS6x-Y?C|7 z$n|y8^ECm^`{0l(WPhg)o{i&-lfv7dA-2Lvz6|{x_%;_h7|v8k>NeIWzdLPb{@!E4 zbLd5)DH?FxX7OBFV0cr3b#Y&4tg?gQ?Yi|=TA#3q8B%y=&dHxO3~j$+SG63LtSNpt z@}5ba`Kc_y!H8igH0eB`=T58f;LAwYJg6ANRq2tfQ9QrQ+B#mqYa4rHl1p95K1@A! zQ$RAKlea>PdUfj40RvPSivL1zd}P^z#5`@<>zbrjnr`e($F*;Tq?ddpRIRDfmyF?? zF+87$bFL%d7Y<}elcSX&y)<@Cm(-(;mRXZA&Sz=$CW%OY$t#te-?O*C zI884ec-B~ed`Anh2=hGpR5;;DKf{HSNk+Rl*LzsXr^;zxzwVRNf#*Iwf8l5l(nYxY zc|9j&S)9ePpBz==^LZQ{S>X0lTShifU(B>7sm0~CT@KNO@O8Q|el^t5_e{!f;E8X7 zJjRcXh=JAjR{j~Jp7^q)x>s}-F3Uq{vk%8WaBNYVQUjDKW`9M*CtHQJqPBwLe>)=b z1K9!DIkmk)r&F+NG{oTvitFlnS=~AL>QOs6Q%`H;p(Aa&_;Ct$p<_Mq;=l~O>&p@R zTC-r@F*z=`7%Poy1B&K#&BH?HB;x^OZb^!(UKNsVt5v8F3C^gjh9T z#Iff7CaHm?VMF1bELnF=Z`VD*Ua*@QeK~CG{nDgZ<3z%=)W}bY&_;1o@LG6AkH}Y& zwSDW_Tt}9+gQ+x`@FPMgSwO?%%DPqzl4yiE?9wT7TDZd}RDYv;O(0F~; zDK8h~r`p}q9lkEn*^^xq)WTUGwKP_$UJC!>B-LvipttKs`4dd*@A}roRF;WQeL_*m zCEE4V*K_^nUc1vE$@vj{qFv0%8nsd)e{)@~@l0Ii)r4dEiR*4%%W`p(Kq)NICf?|Gl|i8BsB7X>6sy2M+g2(LD}Ph?3~GUXa=H54wIMU(0snr+Ll zPMIfF9}E~kPScmNHC0ucx~+7FHO*=hbjuBWonB`45PtXl3xj)Qh5W5qo*dWmt{N4* zwVPAIlZ%$aePHs1(W|k33O;MJ&xt_nP(@5J7hO+=RF||06K(+BCLcj$^X5_F5q{Fh z;})ydm}0ukJfb5eFj(JJ0e8uTMuN9U-n2ZjdW^X{`%t=@`4CLm@SUc{JOJ7RP@{B(_+h_NB2zDG4=##uCpKOZq~Dnc8Y*8YL8=C~Z|s6r~-}YM)X? z>@<}SE!w8avrMHkZH%HZXf;z?Ybh0Fy!8DsXa1dg&pr2#&;8!-J?HL?@67URU(b3Vw($&-Tum=|B=m1hsP*8#^>8hycI+!9&9sY6bJpmAMz$w5T0x|}` z2oMAT+Up1O0RRk!d_DEAfXKi=P+72?lsc#aAP5931A)R|kpB;W05C)bp$0XA*|?GS z{czFvo22SqS@%FDXIA~kQ~fZ3`!GGAIvsgvRXy|%#YOhr1~#)}?J&25eK}gY9{t(Pq|q$x4!-dHuEk>) zZ(=PwcVdtNF^%I4%nD$e^8$q90UP|HgFMazHMGb;%`w2-0K4tO8!jpVRX4VRD84#v zU0O6zMib6j?YU9GTF=yR;!jV^P;c)i*oc zpKEm{KkfcbdCaK*+Xrz)C{j8oxs6CJpk{Zb{|FMP!Jb4#loRF>RnkXqoTM-m*ATUkMeRZ_OsS+MbkgXafrVNbR^CFjp&)} zZcX||BAgzbL1W4^O{TDJS$=T?X&G!R>T2jQ4prL2lpXqBMDX8 z&ELxST@uq=rq_3&?CwZ7D8BsEbWPE7>(u-CqR7XK!d#K?y!U#5;TU$94rezgqpjd6 z7umpRn)Ih#yd~whOJ+=ipfbB7t1C(~+?eem`!k-BuDAb~2);n>o zueX5e93FWy%v^$|w#f4u*zgs@tIIlC_+2jvrcTMX#Jh7RA8FZKeYQNrC+t-}^1$7( z8#@+p75?o81jq|UUCf)BFvqv0`1s2>#oR}oQAv}}Ms%;Ml(s#Z@%fk%`f6=Ua_|s` z%^zV)d z;G2uoj*0YGcf?7%nkn{W*z|3&MZ~A=CjOOJ9@)pV&}gXqr(j~K#BY6SaN}E&_J0KR zh3i+wk^YlE^P1Y9j9Qqyqsb#75BxY2mJh{6FTWwU9kX@CnoFS9zc<64s49q4w;C9|};;=)W!LtAAc4^xib13P`!7sn=0h80D zEX$_*7}hu?nGlQ1>~7Vu>NvrCqx_zn><%JDb*b0QVb)e#Ou1h+oH9;W8P1aHERkzE@la_sLPMg1r{j`apwwKS zKr)~pCl8gEQ-I1tVK9Yl2<06JI2@s-ghncBYv}4~YiMaJ_WoefNH(*2JTWC&J7$YmR)od`@9K zo3!xd_^PwF(s5~r>W(|@>Y;JBt>PUdBWA^wd#jJoY;Yepfj#_ngZ1nb8R&O!3cI@h_3Fn|9 zy0CWY#&c7eso!P5B0u1<(9m zqz%`NYrX!x_+&xKpd06#pY>ctH{#$-aQJs)jNaNI$HphO?p5gNs z-jHoB)dcyA$5O)L>i(<`##=kh9y-71LFA>U_e67j>VwJ9n5ZgTw>!Her98co5~^XZ z9hqY~<~8ItlNKJd?TAG}3q;0JX&`{7?3@x`IZW2ER(=6q%ba_Z+@x|QlC`L^emLAr z$kZ6$kpr72-k#Y6L`n-6^o4;5Yel@pkY(r5mgd=W4H@(Wscf!!B1f%K0t-?|&qXf^-)aJ-5MzH|LYCU%^ls!P!*SaA$w=`2<-xAk>ELxy^WE04!lOwy zeRqBD(F*WBNucZ-yMM56v{6G+(1>b_j96;=Y$gflvcyF@dOuTj)g&acSrJ9}mESrj zX~Ev@P1N>T`4LT`mvD$i@dKux^f)UTus#@f`VfCGCo_?bj~EI!6Bcl^ZYL4!=Av#s zy}M?ntT9_ z49y>HI)CJ-u4x4sYxAUfq+e4KhL0c}<>OZ8P9HLRDEC4%^9l35a-Q-$YtarJ)xgbH z5?`-&)cO@XUd7C9^CkZ2Kc_3USk#*o4;`A_Z&v5@_GC7*!&;}`g!&XpcHX0>14+aq zfj!15(48qBnrWk}gNxxlpXL8a8vRI$92O7XOQ1Bk7!eSWPR7(3M^gE#S5MFIh{BZP6cKH1m(^&Y z;xaj~)(@r|;pU{`$$lP&a=Vle8gJKvVKyO7)4*)8+S+6AlABi@KUN(cW<+}jC1@8R z1czO{jIRk|Ap*QO*0;CO1^Xn`H`N+Fh+lo?=x~fQmq+!xX(%57+c#=nL*(`pv}!fD zIVKgx<(Rr-8A>O*AZ`45Zi_6Oo0t6DswvARqLeMy^%rCT_s_c>Gz@ck$ZQ0EYb}HA zYqV@`=jou5MfZHSO0P}w%28-}seW-*9?i(f4MHd!Q1s|ZSM9i`Cf6F9 zwLOT2jgoDOt8XpGynZpWQW$t;Tu`>0u{WxY%r)>lyS-}Uy!!R9_D^}qsJfFSAnimf zh-ZZ^7QPk8aYlYAJIhj-O8*!a8u?`L6h|a-y_z8gA%xh Fe*vF=e|Z1^ literal 0 HcmV?d00001 diff --git a/docs/assets/images/tests/rey.jpeg b/docs/assets/images/tests/rey.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..a399b78b9782c83e931785b36b4164e079074c6e GIT binary patch literal 2281 zcmb7;dpy$%AIE>&%$T`MqjH%rVY9T@%#d4d8)i5wOi{Vta?7O)Ix40dg^4D)ESDkV zGDT79h>%-|yJGrThaNKq|qECCP*06@D3?2H15 zfT%D`1STvh0uzD5Ma9HrCB+d4ae0)CluN=g_FT`kN(g1V9t-Uv@1>QN{Z zRh;oLW3sufK1B}%hr`7Y;&PIba(Ze?YI^@SJ1qcG1PBLgAs`h1j08cDpq(~A9snSq ze*peP7zPyrL;jI^QUC}70Yjj|PzdzD9t4I60Z^p0vM|AP55qI`7EDF;NJ2i!%(1#v z=Jah@bEmMcyTQHxQ@NW3gCM&Cjoe+@Ee9a~&Vj&4WrC?Rgpt4V9zg6WFcN|Ui~&Kf z1qzCCzWayI$(4)dB!of1ebcM?&7wUoT})im<$rk`%?RYIm-pJ7>^^9(kr^Ve)e*Bc zuXr4ui^cByc-gPmRmT;Td?8ykd9$Jt-C$U25?|XK7Q^#nT2dL@jp?Plepkcrw#t!0 zqQtudl~uf-xt4k)Mqz97r$_V;xs{162+PRJU!!B@;Z#QiH%rl&puTJf6`n;gOc=Yb zQKNtLB}Ekx9{g7NgbIc*{#G|r-{XNHWR zE&|M}Ry?oWa^u@`sl$c*dz83Y|5wS{Y)nhydZO{!)XB>MUMD`IU@uHsD7Q*xuEc5U z*v9I7TA@Uv+m@G7{&tVGVKpX}?Fqg)U31wfHL)1d5;xrc0pgEM(;EQv0Hx?39?kndu)BGMqD|;4FK`s`S|g_eY(X!6OxemTV1vIO=%rsXf;6XE1YFQEMkl;N4SV ze3F|}|Ebp+`+{m$idhC~qKY=;eHCC6q4ao4Ut~3QYW%>j%5ReE7XsK8jq0;$^CR@= zgx5!F;h~;gSNcO&62K>z#f~E#j`SwjTaPG2lp|k?+w4AlH zG3;K=|Foo8#9p)>-7NBE3Ouj(c0?D6Ij$%r_Wy4H4~kerlrQ^6cq<(@-2SNr6K z5_K~Ja13T7Uljrgs$b{JG{5~@7OjL!g41u!y1Br)v~c%tU&xm4rrz@6`5BznO|3Nz z*ms=gB)>;YjAxZb44Vjn{zmuC3y7>o|QB-=kH{G{)2HPK)1~}b(_$X3+&EMXBThC72<=whX zNr;%%V;jx6k$c6#dEJKood50$9LgxQBDYgbz6n{veFm7CsAX%D?QfeV+JWCX_Pvz_}cH zGc^V&I9kVP>^!X_ReZSiXvgi;0fmc4i=wzri)Va>sCQ;LB+v03AeA5aSSwsMmK%BL z_7z31?~6Fd+8~ktyQqB@OVnXBmSg72!W`+;bR02z&P^*yXmBoC8;j6=lN5F+q&=pn z)Y?1;1Zz|^4h!&ReTeA1F6}k4@=OxX|BF38;Xa8|Zm2Ci^7hzZ=7H5J`|^pHTik(X z@vBk$kM=RpHhzB2*~(oavnzu0U)q(ZwPVFr^(L1CU(S0b%9KwVNUW?ejD196t!hcZ zN{OydyxK!ws*=y*vHHiaUHY)Kr2DY!@jysYG@F=y^VGExuUO2LDkhkU0yqA^EikD` zTmI~8f*P?&P5P9I_}OpU$SKl=esTLbf7&47Tki>H66anbooAV3#`DWIFkxV zbpa;=FaF7~DPW7kyPmmx9=aoTdJfqr9#4%#pzf`g1WVp3U<;k{Nb;b++)a.push(r.items[b].values());return a},this.add=function(a,b){if(0!==a.length){if(b)return void t(a,b);var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;e=r.items.length>r.page?!0:!1,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;f>e;e++)r.items[e].values()[a]==b&&(r.templater.remove(r.items[e],c),r.items.splice(e,1),f--,e--,d++);return r.update(),d},this.get=function(a,b){for(var c=[],d=0,e=r.items.length;e>d;d++){var f=r.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return r.items.length},this.clear=function(){return r.templater.clear(),r.items=[],r},this.on=function(a,b){return r.handlers[a].push(b),r},this.off=function(a,b){var c=r.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&r.matchingItems.length+1>=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];b(f)?f.filtered=!0:f.filtered=!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}},{}],4:[function(a,b,c){b.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return e.elm&&e.elm.parentNode==a.list?!0:!1},f(b,c,d)}}},{}],5:[function(a,b,c){b.exports=function(b){var c=a("./item")(b),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(a,d){for(var e=0,f=a.length;f>e;e++)b.items.push(new c(d,a[e]))},f=function(a,c){var d=a.splice(0,50);e(d,c),a.length>0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?e=a[1]:3==a.length&&(c=a[1],e=a[2])},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;c>b;b++)g.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(g.values(a.values(),c[b]))return void(a.found=!0)},values:function(c,e){return c.hasOwnProperty(e)&&(b=a.utils.toString(c[e]).toLowerCase(),""!==d&&b.search(d)>-1)?!0:!1},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order?!0:!1,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;d>c;c++)a.utils.classes(b.els[c]).remove("asc"),a.utils.classes(b.els[c]).remove("desc")},getOrder:function(b){var c=a.utils.getAttribute(b,"data-order");return"asc"==c||"desc"==c?c:a.utils.classes(b).has("desc")?"asc":a.utils.classes(b).has("asc")?"desc":"asc"},getInSensitive:function(b,c){var d=a.utils.getAttribute(b,"data-insensitive");"false"===d?c.insensitive=!1:c.insensitive=!0},setOrder:function(c){for(var d=0,e=b.els.length;e>d;d++){var f=b.els[d];if(a.utils.getAttribute(f,"data-sort")===c.valueName){var g=a.utils.getAttribute(f,"data-order");"asc"==g||"desc"==g?g==c.order&&a.utils.classes(f).add(c.order):a.utils.classes(f).add(c.order)}}}},c=function(){a.trigger("sortStart");var c={},d=arguments[0].currentTarget||arguments[0].srcElement||void 0;d?(c.valueName=a.utils.getAttribute(d,"data-sort"),b.getInSensitive(d,c),c.order=b.getOrder(d)):(c=arguments[1]||c,c.valueName=arguments[0],c.order=c.order||"asc",c.insensitive="undefined"==typeof c.insensitive?!0:c.insensitive),b.clear(),b.setOrder(c),c.sortFunction=c.sortFunction||a.sortFunction,a.items.sort(function(a,b){var d="desc"===c.order?-1:1;return c.sortFunction(a,b,c)*d}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=a.utils.getByClass(a.listContainer,a.sortClass),a.utils.events.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),c}},{}],8:[function(a,b,c){var d=function(a){var b,c=this,d=function(){b=c.getItemSource(a.item),b=c.clearSourceItem(b,a.valueNames)};this.clearSourceItem=function(b,c){for(var d=0,e=c.length;e>d;d++){var f;if(c[d].data)for(var g=0,h=c[d].data.length;h>g;g++)b.setAttribute("data-"+c[d].data[g],"");else c[d].attr&&c[d].name?(f=a.utils.getByClass(b,c[d].name,!0),f&&f.setAttribute(c[d].attr,"")):(f=a.utils.getByClass(b,c[d],!0),f&&(f.innerHTML=""));f=void 0}return b},this.getItemSource=function(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d].cloneNode(!0)}else{if(/^tr[\s>]/.exec(b)){var f=document.createElement("table");return f.innerHTML=b,f.firstChild}if(-1!==b.indexOf("<")){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.")},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;g>f;f++){var h;if(d[f].data)for(var i=0,j=d[f].data.length;j>i;i++)e[d[f].data[i]]=a.utils.getAttribute(b.elm,"data-"+d[f].data[i]);else d[f].attr&&d[f].name?(h=a.utils.getByClass(b.elm,d[f].name,!0),e[d[f].name]=h?a.utils.getAttribute(h,d[f].attr):""):(h=a.utils.getByClass(b.elm,d[f],!0),e[d[f]]=h?h.innerHTML:"");h=void 0}return e},this.set=function(b,d){var e=function(b){for(var c=0,d=a.valueNames.length;d>c;c++)if(a.valueNames[c].data){for(var e=a.valueNames[c].data,f=0,g=e.length;g>f;f++)if(e[f]===b)return{data:b}}else{if(a.valueNames[c].attr&&a.valueNames[c].name&&a.valueNames[c].name==b)return a.valueNames[c];if(a.valueNames[c]===b)return b}},f=function(c,d){var f,g=e(c);g&&(g.data?b.elm.setAttribute("data-"+g.data,d):g.attr&&g.name?(f=a.utils.getByClass(b.elm,g.name,!0),f&&f.setAttribute(g.attr,d)):(f=a.utils.getByClass(b.elm,g,!0),f&&(f.innerHTML=d)),f=void 0)};if(!c.create(b))for(var g in d)d.hasOwnProperty(g)&&f(g,d[g])},this.create=function(a){if(void 0!==a.elm)return!1;var d=b.cloneNode(!0);return d.removeAttribute("id"),a.elm=d,c.set(a,a.values()),!0},this.remove=function(b){b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.show=function(b){c.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cf;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}},{}],13:[function(a,b,c){b.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null===a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()},{}],14:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;cr)return-1;if(r>s)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);x>u;u++){if(d=t(p[u],v),e=t(q[u],w),isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(typeof d!=typeof e&&(d+="",e+=""),e>d)return-1;if(d>e)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;c'+p1+'') + }); + } + return html; + }); + $('.annotation').tooltip(); +} + +$(window).load(function() { $('body').addClass('loaded'); }); + + +$(window).load(function() { + setTimeout(function() { + if (window.annotations !== 'undefined') { + annotate(window.annotations); + $('code').tooltip(); + } + }, 1000); +}) + + +$('#basic-tabs a').click(function (e) { + e.preventDefault() + $(this).tab('show') +}); + + +var options = { + valueNames: [ 'name', 'born' ] +}; + +var userList = new List('users', options); diff --git a/docs/docs/index.html b/docs/docs/index.html new file mode 100644 index 00000000..33fb776c --- /dev/null +++ b/docs/docs/index.html @@ -0,0 +1,168 @@ +--- +layout: default +title: Really simple example +--- + +

Really simple examples

+

You can use List.js on either exising HTML or create new with super simple templating.

+ + +

Example 1: Using existing list

+
HTML
+ +
<div id="hacker-list">
+  <ul class="list">
+    <li>
+       <h3 class="name">Jonny</h3>
+       <p class="city">Stockholm</p>
+    </li>
+    <li>
+      <h3 class="name">Jonas</h3>
+      <p class="city">Berlin</p>
+    </li>
+  </ul>
+</div>
+ +
JavaScript
+
var options = {
+    valueNames: [ 'name', 'city' ]
+};
+
+var hackerList = new List('hacker-list', options);
+ + +

Example 2: Create list on initialization: Version 1

+ +
HTML
+
<div id="hacker-list">
+    <ul class="list"></ul>
+</div>
+ +
JavaScript
+
var options = {
+  item: '<li><h3 class="name"></h3><p class="city"></p></li>'
+};
+
+var values = [
+  { name: 'Jonny', city:'Stockholm' }
+  , { name: 'Jonas', city:'Berlin' }
+];
+
+var hackerList = new List('hacker-list', options, values);
+ +

Example 3: Create list on initialization: Version 2

+ +
HTML
+
<div id="hacker-list">
+  <ul class="list"></ul>
+</div>
+
+<div style="display:none;">
+  <!-- A template element is needed when list is empty, TODO: needs a better solution -->
+  <li id="hacker-item">
+   <h3 class="name"></h3>
+   <p class="city"></p>
+  </li>
+</div>
+ +
JavaScript
+
var options = {
+    item: 'hacker-item'
+};
+
+var values = [
+    { name: 'Jonny', city:'Stockholm' }
+    , { name: 'Jonas', city:'Berlin' }
+];
+
+var hackerList = new List('hacker-list', options, values);
+ +

Example 4: Index existing list and then add

+ +
HTML
+
<div id="hacker-list">
+  <ul class="list">
+   <li>
+     <h3 class="name">Jonny</h3>
+     <p class="city">Stockholm</p>
+   </li>
+  </ul>
+</div>
+ +
JavaScript
+
var options = {
+  valueNames: ['name', 'city']
+};
+
+var hackerList = new List('hacker-list', options);
+
+hackerList.add( { name: 'Jonas', city:'Berlin' } );
+ +

Example 5: Add automagic search and sort inputs and buttons

+ +
HTML
+
<div id="hacker-list">
+
+  <input class="search" />
+  <span class="sort" data-sort="name">Sort by name</span>
+  <span class="sort" data-sort="city">Sort by city</span>
+
+  <ul class="list">
+   <li>
+     <h3 class="name">Jonny</h3>
+     <p class="city">Stockholm</p>
+   </li>
+   <li>
+     <h3 class="name">Jonas</h3>
+     <p class="city">Berlin</p>
+   </li>
+  </ul>
+</div>
+ +
JavaScript (nothing special)
+
var options = {
+  valueNames: [ 'name', 'city' ]
+};
+
+var hackerList = new List('hacker-list', options);
+ + + + +

Example 6: Using data attributes and other custom attributes (introduced in v1.2.0)

+ +
HTML
+
<div id="hacker-list">
+  <ul class="list">
+   <li data-id="1">
+     <a href="http://javve.com" class="link name">Jonny</a>
+     <p class="born timestamp" data-timestamp="1234">1986</p>
+     <img class="image" src="javve.jpg" />
+   </li>
+  </ul>
+</div>
+ +
JavaScript
+
var options = {
+  valueNames: [
+    'name',
+    'born',
+    { data: ['id'] },
+    { name: 'timestamp', attr: 'data-timestamp' },
+    { name: 'link', attr: 'href' },
+    { name: 'image', attr: 'src' }
+  ]
+};
+
+var hackerList = new List('hacker-list', options);
+
+hackerList.add({
+  name: 'Jonas',
+  born: '1985',
+  id: 2,
+  timestamp: '1337',
+  link: 'http://arnklint.com'
+  image: 'jonas.gif'
+});
+ +
Next topic: Options ›
diff --git a/docs/docs/item-api.html b/docs/docs/item-api.html new file mode 100644 index 00000000..7a7a64ff --- /dev/null +++ b/docs/docs/item-api.html @@ -0,0 +1,77 @@ +--- +layout: default +title: Item API +--- + +

+Item API

+ +

These methods are available for all Items that are returned by +the list.

+ +

+Properties

+ +
    +
  • + elm Element
    + The actual item DOM element +
  • +
  • + _values Array
    + Direct access to the item's values. Simplifies debugging. Note: Always use item.values() when interacting with the values. +
  • +
+ +

Methods

+ +
    +
  • +

    values(newValues)

    +
      +
    • +

      + newValues optional
      + If variable newValues are present the new values replaces the current item values + and updates the list. + If newValues are not present, the function returns the current values. +

      +
      item.values() // { name: "Jonny", age: 24, city: "Umeå" }
      +  item.values({
      +      age: 25,
      +      city: "Stockholm"
      +  });
      +  item.values() // { name: "Jonny", age: 25, city: "Stockholm" }
      +  
      +
    • +
    +
  • +
  • +

    + show()
    + Shows the item +

    +
  • +
  • +

    + hide()
    + Hides the item (removes the element from the list, and then when its shown it's appended again. The element will thereby change position in the list. A bug, but a good solution is yet to be found.) +

    +
  • +
  • +

    + matching() Boolean
    + Returns boolean. True if the item matches the current filter and search. Visible items + always matches, but matching items are not always visible. +

    +
  • +
  • +

    + visible() Boolean
    + Returns boolean. True if the item is visible. Visible items + always matches, but matching items are not always visible. +

    +
  • +
+ + diff --git a/docs/docs/list-api.html b/docs/docs/list-api.html new file mode 100644 index 00000000..c2188727 --- /dev/null +++ b/docs/docs/list-api.html @@ -0,0 +1,221 @@ +--- +layout: default +title: List API +--- +

List API

+

These properties and methods are available for the List-object.

+ +

Properties

+ +
    +
  • +

    + listContainer + Element
    + The element node that contains the entire list area. +

    +
  • +
  • +

    + list + Element
    + The element containing all items. +

    +
  • +
  • +

    + items + Array
    + An Array of all Item-objects in the list. +

    +
  • +
  • +

    + visibleItems + Array
    + The currently visible items in the list +

    +
  • +
  • +

    + matchingItems + Array
    + The items matching the currently active filter and search. +

    +
  • +
  • +

    + searched + Boolean
    + Returns true if the list is searched. +

    +
  • +
  • +

    + filtered + Boolean
    + Returns true if there is an active filter. +

    +
  • +
  • +

    + list + Element
    + The element containing all items. +

    +
  • +
  • +

    + plugins + Object
    + The currently avaliable plugins. +

    +
  • +
+ +

Methods

+ +
    +
  • +

    add(values, callback)
    + Adds one or more items to the list.

    + +
    listObj.add({ name: "Jonny", city: "Stockholm" });
    +
    +listObj.add([
    +    { name: "Gustaf", city: "Sundsvall" }
    +    , { name: "Jonas", city: "Berlin" }
    +]);
    + +

    If callback is set then items are added to the list in a asynchronous way, and the + callback is called when all items are added. This is especially useful + when adding very many items (200+ or something), or if you just like the + asynchronous coding style.

    + +
    listObj.add(arrayWithManyManyItems, function(items) {
    +    console.log('All ' + items.length + ' were added!');
    +});
    +
  • +
  • +

    remove(valueName, value)
    + Removes items from the list where the value named valueName has value value. + Returns the number of items that where removed.

    + +
    itemsInList = [
    +    { id: 1, name: "Jonny" }
    +    , { id: 2, name "Gustaf" }
    +];
    +listObj.remove("id", 1); // return 1
    +
  • +
  • +

    get(valueName, value)
    + Returns values from the list where the value named valueName has value value.

    + +
    itemsInList = [
    +    { id: 1, name: "Jonny" }
    +    , { id: 2, name "Gustaf" }
    +];
    +listObj.get("id", 2); // return { id: 2, name "Gustaf" }
    +
  • +
  • +

    sort(valueName, options)
    + Sorts the list based on values the in the column named valueName. The options + parameter can contain two properties options.sortFunction and options.order. + options.sortFunction is used if you want to make your own sort function. + The default sort function is found here https://github.com/javve/natural-sort + options.order = "asc" means that you want to sort the list in ascending order. Set + false for descending.

    + +
    listObj.sort('name', { order: "asc" }); // Sorts the list in abc-order based on names
    +listObj.sort('name', { order: "desc" }); // Sorts the list in zxy-order based on names
    + +
  • +
  • +

    search(searchString, columns)
    + Searches the list

    + +
    itemsInList = [
    +    { id: 1, name: "Jonny" }
    +    , { id: 2, name "Gustaf" }
    +    , { id: 3, name "Jonas" }
    +];
    +
    +listObj.search('Jonny'); // Only item with name Jonny is shown (also returns this item)
    +
    +listObj.search(); // Show all items in list
    +
    +listObj.search('Jonny', ['name']); // Only search in the 'name' column
    + +
  • +
  • +

    clear()
    + Removes all items from the list

    +
  • +
  • +

    filter(filterFunction)

    + +
    itemsInList = [
    +    { id: 1, name: "Jonny" }
    +    , { id: 2, name "Gustaf" }
    +    , { id: 3, name "Jonas" }
    +];
    +
    +listObj.filter(function(item) {
    +   if (item.values().id > 1) {
    +       return true;
    +   } else {
    +       return false;
    +   }
    +}); // Only items with id > 1 are shown in list
    +
    +listObj.filter(); // Remove all filters
    + +
  • +
  • +

    size()
    + Returns the size of the list.

    +
  • +
  • +

    show(i, page)
    + Shows page number of items from i. Use for paging etc.

    + +
    itemsInList = [
    +    { id: 1, name: "Jonny" }
    +    , { id: 2, name "Gustaf" }
    +    , { id: 3, name "Jonas" }
    +    , { id: 4, name "Egon" }
    +    , { id: 5, name "Frank" }
    +    , { id: 6, name "Ester" }
    +];
    +
    +listObj.show(4, 3); // Display item 4,5,6 
    + +
  • +
  • +

    update()
    + Updates the current state of the list. Meaning that if you for instance + hides some items with the itemObj.hide() method then you have to call listObj.update() + if you want the paging to update.

    +
  • +
  • +

    reIndex()
    + Re-index list from HTML. Good to use if the HTML has been changed by something + else than List.js.

    +
  • +
  • +

    on(event, callback)
    + Execute callback when list have been updated (triggered by update(), which is used by a lot of methods). Use updated as the event.

    +

    Avaliable events

    +
      +
    • updated
    • +
    • searchStart
    • +
    • searchComplete
    • +
    • filterStart
    • +
    • filterComplete
    • +
    • sortStart
    • +
    • sortComplete
    • +
    +
  • +
+ +
Next topic: Item API ›
diff --git a/docs/docs/options.html b/docs/docs/options.html new file mode 100644 index 00000000..dd24c91b --- /dev/null +++ b/docs/docs/options.html @@ -0,0 +1,92 @@ +--- +layout: default +title: Options +--- + +

+ + Options +

+

Using List.js is pretty much plug and play, but you can change some options if you feel like it.

+
new List(id/element, options, values);
+ +
    +
  • + id or element *required + Id the element in which the list area should be initialized. OR the actual element itself. +
  • +
  • +

    options +Some of the option parameters are required at some times

    + +
      +
    • +

      valueNames Array, default: null. *required
      +If the list contains items on initialization, then this array +has to contain the value names (class names) for the different values of +each list item.

      + +
      <ul class="list">
      +    <li>
      +        <span class="name">Jonny</span>
      +        <span class="city">Sundsvall</span>
      +    </li>
      +</ul>
      +
      +var valueNames = ['name', 'city'];
      +
      + +
      <ul class="list">
      + <li data-id="1">
      +   <a href="http://javve.com" class="link name">Jonny</a>
      +   <p class="born timestamp" data-timestamp="1234">1986</p>
      +   <img class="image" src="javve.jpg" />
      + </li>
      +</ul>
      +
      +var valueNames =  [
      +  'name',
      +  'born',
      +  { data: ['id'] },
      +  { name: 'timestamp', attr: 'data-timestamp' },
      +  { name: 'link', attr: 'href' },
      +  { name: 'image', attr: 'src' }
      +];
      + +
    • +
    • +

      item String, default: undefined
      +ID to item template element or a string of HTML.

      + +
      var options = {
      +    item: "<li><span class='name'></span><span class='city'></span></li>"
      +}
      +// or
      +var options = {
      +    item: 'cool-item-id'
      +};
      +
      +
    • +
    • listClass String, default: "list"
      +What is the class of the list-container?

    • +
    • searchClass String, default: "search"
      +What is the class of the search field?

    • +
    • sortClass String, default: "sort"
      +What is the class of the sort buttons?

    • +
    • indexAsync Boolean, default: false
      +If there are already items in the list to which the +List.js-script is added, then should the indexing be done +in a asynchronous way? Good for large lists (> 500 items).

    • +
    • page Int, default: 200
      +Defines how many items that should be visible at the same time. This affects +performance.

    • +
    • i Int, default: 1
      +Which item should be shown as the first one.

    • +
    • plugins Array, default: undefined
      Read more about plugins here

    • +
    +
  • +
  • values Array of objects) (*optional +Values to add to the list on initialization.

  • +
+ +
Next topic: List API ›
diff --git a/docs/docs/plugins/build.html b/docs/docs/plugins/build.html new file mode 100644 index 00000000..899b903e --- /dev/null +++ b/docs/docs/plugins/build.html @@ -0,0 +1,50 @@ +--- +layout: default +title: Build your own plugin +--- + +

Build your own plugin

+ +

A List.js plugin is basically a function/class which returns a object on initialization.

+ +

A basic example plugin

+

The plugin code list.awesomething.js

+
function ListAwesomething() {
+  options = options || {};
+  return {
+    init: function(list) {
+      // This method is called on initialization
+    },
+    name: options.name || "awesomething",
+    customMethod: function() {
+      return "cowabunga";
+    }
+  };
+};
+
+ +

Using the plugin

+
<script src="list.js"></script>
+<script src="list.awesomething.js"></script>
+<script>
+  var myList = new List('my-list', {
+    plugins: ListAwesomething()
+  });
+
+  myList.awesomething.customMethod(); // cowabunga
+</script>
+
+

Requirements / Specifications

+
    +
  • + A plugin namned Awesome Thing have to be in a JavaScript file namned list.awesomething.js (no dash, camelcase or anything) + and the function/class have to be namned ListAwesomeThing (camelcase but no dash anything else). +
  • +
  • The plugin object must contain an init method.
  • +
  • The plugin object must contain an name attribute that defaults to the plugin name.
  • +
+ +

Live example

+

Check this out!

+ + <% locals.mediaTempleTerm = "plugin" %> diff --git a/docs/docs/plugins/fuzzysearch.html b/docs/docs/plugins/fuzzysearch.html new file mode 100644 index 00000000..37085f10 --- /dev/null +++ b/docs/docs/plugins/fuzzysearch.html @@ -0,0 +1,99 @@ +--- +layout: default +title: Fuzzy search plugin +--- + +

Fuzzy search plugin

+ +

To use the plugin you first need to download it:

+ +

Via GitHub

+ Download list.fuzzysearch.js + +

Via Bower

+
bower install list.fuzzysearch.js
+ +

Via Component

+
component install javve/list.fuzzysearch.js
+ + <% /* +

Via CDNJS

+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/List.fuzzysearch.js/1.0.0/list.fuzzysearch.min.js" />
+ */ %> +

The difference between Fuzzy Search and List.js default search

+ +

The default search will conduct a time efficient search for an exact match in the content searched, while the fuzzy search will render results depending on if they are included anywhere in the content.

+ +

Basic example

+
var items = [
+    { character: "Guybrush Threepwood", game: "The Secret of Monkey Island" },
+    { character: "Manny Calavera", game: "Grim Fandango" },
+    { character: "Bernard Bernoulli", game: "Maniac Mansion" }
+];
+
+list.search('gu thre'); // return none
+list.fuzzySearch.search('gu thre') // return 1 item
+
+ +

Implementation

+
<div id="list-id">
+  <input class="fuzzy-search" />
+  <ul class="list">
+    / A bunch of items /
+  </ul>
+</div>
+
+<script>
+
+var fuzzyOptions = {
+  searchClass: "fuzzy-search",
+  location: 0,
+  distance: 100,
+  threshold: 0.4,
+    multiSearch: true
+};
+var options = {
+  valueNames: [ 'name', 'category' ],
+  plugins: [
+    ListFuzzySearch()
+  ]
+};
+
+var listObj = new List('list-id', options);
+
+// Search manually
+listObj.fuzzySearch.search('my search');
+
+// Search manually on specific columns
+listObj.fuzzySearch.search('my search', { name: true });
+
+</script>
+
+ + + +

Options

+

All options are optional. Simplest implementation is:

+
plugins: [ ListFuzzySearch() ]
+
    +
  • + location Int, default: 0
    + Approximately where in the text is the pattern expected to be found? +
  • +
  • + distance Int, default: 100
    + Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is ‘distance’ characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a threshold of 1000 would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. +
  • +
  • + threshold Int, default: 0.4
    + At what point does the match algorithm give up. A threshold of 0.0 requires a perfect match (of both letters and location), a threshold of 1.0 would match anything. +
  • +
  • + multiSearch Boolean, default: true
    + Subtract arguments from the searchString or put searchString as only argument +
  • +
+ +

A big thanks to LuukvE who made a commit from which I could create this Fuzzy Search plugin.

+ + diff --git a/docs/docs/plugins/index.html b/docs/docs/plugins/index.html new file mode 100755 index 00000000..ecdc0565 --- /dev/null +++ b/docs/docs/plugins/index.html @@ -0,0 +1,38 @@ +--- +layout: default +title: Using Plugins +--- + +

Using plugins

+ +

Getting started

+

To use a plugin you need two things:

+
    +
  1. Include the plugins .js-file at the page.
  2. +
  3. +

    Include it when you instantiate List.js

    +
    new List('list-id', {
    +  plugins: [ ListPagination(), NameOfOtherPlugin(options) ]
    +});
    +
+ + +

Naming and accessing plugins

+

It is also possible to add options and load multiple instances of the same plugins (if the plugin itself allows it).

+

+ If the property name is added in the plugin option parameter does the plugin become + accessible through listObj.namePropertyValue.This is useful when having multiple instances of the same plugin. +

+
var myList = new List('list-id', {
+  plugins: [
+    ListPagination({ name: "topPagination", paginationClass: "top-pagination" }),
+    ListPagination({ name: "bottomPagination", paginationClass: "bottom-pagination" })
+  ]
+});
+console.log(myList.topPagination);
+console.log(myList.bottomPagination);
+ +

Build your own plugin

+

Go to: /docs/plugins/build

+ + diff --git a/docs/docs/plugins/pagination.html b/docs/docs/plugins/pagination.html new file mode 100644 index 00000000..a91bf607 --- /dev/null +++ b/docs/docs/plugins/pagination.html @@ -0,0 +1,138 @@ +--- +layout: default +title: Pagination plugin +--- + +

Pagination plugin

+ +

To use the plugin you first need to download it:

+ +

Via GitHub

+ Download List.pagination.js + +

Via Bower

+
bower install list.pagination.js
+ +

Via Component

+
component install javve/list.pagination.js
+ + <% /* +

Via CDNJS

+
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/List.pagination.js/1.0.0/list.pagination.min.js" />
+ */ %> + +

Basic example

+
<div id="listId">
+  <ul class="list">
+      // A bunch of items
+  </ul>
+  <ul class="pagination"></ul>
+</div>
+
+<script>
+  var options = {
+    valueNames: [ 'name', 'category' ],
+    page: 3,
+    plugins: [
+      ListPagination({})
+    ]
+  };
+
+  var listObj = new List('listId', options);
+</script>
+
+ + + +

Options

+
    +
  • + name String, default: “pagination”
    + Default option for all plugins. Defines how to access the plugin from the list object listObj.pluginName. +
  • +
  • + paginationClass String, default: “pagination”
    + The class that defines which ul that should contain the pagination (must be inside the list container) +
  • +
  • + innerWindow Int, default: 2
    + How many pages should be visible on each side of the current page.
    + innerWindow: 2 … 3 4 5 6 7 …
    + innerWindow: 1 … 4 5 6 … +
  • +
  • + outerWindow Int, default: 0
    + How many pages should be visible on from the beginning and from the end of the pagination.
    + outerWindow: 0 … 3 4 5 6 7…
    + outerWindow: 2 1 2 … 4 5 6 7 8 … 11 12 +
  • +
  • + left Int, default: 0
    + Same as outerWindow but only from left. + outerWindow: 2 and left: 1 1 … 4 5 6 7 8 … 11 12 +
  • +
  • + right Int, default: 0
    + Same as left but from right. +
  • +
+ +

Notice

+

The number of items at each page are decided by the List.js own property page. To set this just add page: Number to the option object sent into the List.js constructor (as been done in both of the examples at this page).

+ +

Generated output

+ +
<div id="listId">
+  <ul class="list">
+      / A bunch of items /
+  </ul>
+  <ul class="pagination">
+    <li>
+      <a class="page active" href="javascript:function Z(){Z=""}Z()">1</a>
+    </li>
+    <li>
+      <a class="page" href="javascript:function Z(){Z=""}Z()">2</a>
+    </li>
+    <li>
+      …
+    </li>
+  </ul>
+</div>
+
+ +

Double pagination

+ +
<div id="listId">
+  <ul class="paginationTop"></ul>
+  <ul class="list">
+    // A bunch of items
+  </ul>
+  <ul class="paginationBottom"></ul>
+</div>
+
+<script>
+  var paginationTopOptions = {
+    name: "paginationTop",
+    paginationClass: "paginationTop",
+    outerWindow: 2
+  };
+  var paginationBottomOptions = {
+    name: "paginationBottom",
+    paginationClass: "paginationBottom",
+    innerWindow: 3,
+    left: 2,
+    right: 4
+  };
+  var listOptions = {
+    valueNames: [ 'name', 'category' ],
+    page: 3,
+    plugins: [
+        ListPagination(paginationTopOptions),
+        ListPagination(paginationBottomOptions)
+    ]
+  };
+
+  var listObj = new List('listId', listOptions);
+</script>
+ + diff --git a/docs/feed.xml b/docs/feed.xml new file mode 100644 index 00000000..a6628bd8 --- /dev/null +++ b/docs/feed.xml @@ -0,0 +1,30 @@ +--- +layout: null +--- + + + + {{ site.title | xml_escape }} + {{ site.description | xml_escape }} + {{ site.url }}{{ site.baseurl }}/ + + {{ site.time | date_to_rfc822 }} + {{ site.time | date_to_rfc822 }} + Jekyll v{{ jekyll.version }} + {% for post in site.posts limit:10 %} + + {{ post.title | xml_escape }} + {{ post.content | xml_escape }} + {{ post.date | date_to_rfc822 }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {{ post.url | prepend: site.baseurl | prepend: site.url }} + {% for tag in post.tags %} + {{ tag | xml_escape }} + {% endfor %} + {% for cat in post.categories %} + {{ cat | xml_escape }} + {% endfor %} + + {% endfor %} + + diff --git a/docs/index.html b/docs/index.html new file mode 100755 index 00000000..5923926d --- /dev/null +++ b/docs/index.html @@ -0,0 +1,67 @@ +--- +layout: default +title: Search, sort, filters, flexibility to tables, list and more! +--- + +
+ +
+

List.js v1.2.0

+

+ Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript + that adds search, sort, filters and flexibility + to plain HTML lists, tables, or anything. +

+
+
+ + +{% include examples/annotated-example.html %} + +
+

More examples

+ +
+ + +
+
+ +
+
+ +
+
+ +
+
+ + +
+ +
+ +

Hi! I'm Jonny and the author of List.js.

+

+ I hope you like the lib. I’ve put a lot of hours into it! + Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;) +

+ + + + + + + + + +
+
diff --git a/docs/overview/changelog.html b/docs/overview/changelog.html new file mode 100644 index 00000000..b6183676 --- /dev/null +++ b/docs/overview/changelog.html @@ -0,0 +1,7 @@ +--- +layout: default +title: Read the changelog at Github +--- + +

Changelog

+

Go to the changelog at GitHub

diff --git a/docs/overview/contribute.html b/docs/overview/contribute.html new file mode 100644 index 00000000..32af7177 --- /dev/null +++ b/docs/overview/contribute.html @@ -0,0 +1,35 @@ +--- +layout: default +title: Contribute +--- + +

Setup environment

+

1. Install Node.js

+

Go to Nodejs.org

+ +

2. Install dependencies

+
npm install
+ +

Compile and test

+

Compile the script (build/build.js)

+
grunt
+ +

Watch and recompile when files change

+
grunt watch
+ +

Create standalone List.js (dist/list.js)

+
grunt dist
+ +

Run the test suite

+
grunt test
+

Or open this file your browser

+
/test/index.html
+ +

Guidelines for making pull requests

+
    +
  • Add tests if applicable.
  • +
  • Make sure all tests run. Preferably in IE7+
  • +
  • Do not include dist/list.js or dist/list.min.js. That file is only update for each release.
  • +
  • ONE feature per pull request
  • +
  • List.js is used in a lot of different ways on a lot of places, so please have understanding if your new special feature is not accepted :)
  • +
diff --git a/docs/overview/download.html b/docs/overview/download.html new file mode 100644 index 00000000..bff22c38 --- /dev/null +++ b/docs/overview/download.html @@ -0,0 +1,23 @@ +--- +layout: default +title: Download +--- + +

Download

+ +

The core thing in List.js have always been simplicity. It should require as little effort as possible to use the script and it's features.

+ +

Via GitHub

+Download compressed List.js   5KB with gzip
+Download uncompressed List.js + +

Via NPM

+
npm install list.js
+ +

Via Bower

+
bower install list.js
+ +

Via CDNJS

+
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
+ + diff --git a/docs/overview/index.html b/docs/overview/index.html new file mode 100644 index 00000000..dc42442f --- /dev/null +++ b/docs/overview/index.html @@ -0,0 +1,36 @@ +--- +layout: default +title: TL;DR / Features +--- + +

TL;DR

+ +

Perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML.

+ +

Core idea

+
    +
  • Simple and invisible
  • +
  • Easy to apply to existing HTML
  • +
  • No dependencies
  • +
  • Fast
  • +
  • Tiny (5KB minified&gzip)
  • +
  • Handle thousands of items
  • +
+ +

Features

+ + +

Used by

+ diff --git a/docs/overview/press.html b/docs/overview/press.html new file mode 100644 index 00000000..1dc10f59 --- /dev/null +++ b/docs/overview/press.html @@ -0,0 +1,18 @@ +

Press

+ +
+ + + + + + +
+
+ + + + + +
+ From 1c91d2dd2e13d0707667f24454ad13c87c728fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 4 Oct 2016 00:35:23 +0200 Subject: [PATCH 008/246] Fix some site stuff --- .../_includes/examples/annotated-example.html | 12 ++++----- docs/_includes/examples/basic/add-html.html | 15 +++++++++++ docs/_includes/examples/basic/add-js.html | 23 ++++++++++++++++ .../examples/basic/existing-html.html | 27 +++++++++++++++++++ .../_includes/examples/basic/existing-js.html | 5 ++++ docs/_includes/examples/basic/new-html.html | 10 +++++++ docs/_includes/examples/basic/new-js.html | 26 ++++++++++++++++++ docs/_includes/examples/basic/table.html | 0 docs/_layouts/default.html | 2 +- 9 files changed, 113 insertions(+), 7 deletions(-) create mode 100644 docs/_includes/examples/basic/add-html.html create mode 100644 docs/_includes/examples/basic/add-js.html create mode 100644 docs/_includes/examples/basic/existing-html.html create mode 100644 docs/_includes/examples/basic/existing-js.html create mode 100644 docs/_includes/examples/basic/new-html.html create mode 100644 docs/_includes/examples/basic/new-js.html create mode 100644 docs/_includes/examples/basic/table.html diff --git a/docs/_includes/examples/annotated-example.html b/docs/_includes/examples/annotated-example.html index f4dcf7a0..166cd41d 100644 --- a/docs/_includes/examples/annotated-example.html +++ b/docs/_includes/examples/annotated-example.html @@ -10,28 +10,28 @@

Basic example of Li
-
{% include examples/basic/existing-html.ejs %}
+
{% include examples/basic/existing-html.html %}
-
{% include examples/basic/existing-js.ejs %}
+
{% include examples/basic/existing-js.html %}
-
{% include examples/basic/add-html.ejs %}
+
{% include examples/basic/add-html.html %}
-
{% include examples/basic/add-js.ejs %}
+
{% include examples/basic/add-js.html %}
-
{% include examples/basic/new-html.ejs %}
+
{% include examples/basic/new-html.html %}
-
{% include examples/basic/new-js.ejs %}
+
{% include examples/basic/new-js.html %}
diff --git a/docs/_includes/examples/basic/add-html.html b/docs/_includes/examples/basic/add-html.html new file mode 100644 index 00000000..677c62f7 --- /dev/null +++ b/docs/_includes/examples/basic/add-html.html @@ -0,0 +1,15 @@ +<div id="users"> + + <input class="search" placeholder="Search" /> + <button class="sort" data-sort="name"> + Sort + </button> + + <ul class="list"> + <li> + <h3 class="name">Jonny Stromberg</h3> + <p class="born">1986</p> + </li> + </ul> + +</div> diff --git a/docs/_includes/examples/basic/add-js.html b/docs/_includes/examples/basic/add-js.html new file mode 100644 index 00000000..d0fb2cd2 --- /dev/null +++ b/docs/_includes/examples/basic/add-js.html @@ -0,0 +1,23 @@ +var options = { + valueNames: [ 'name', 'born' ] +}; + +var values = [ + { + name: 'Jonas Arnklint', + born: 1985 + }, + { + name: 'Martina Elm', + born: 1986 + } +]; + +var userList = new List('example-list', options, values); + +userList.add({ + name: 'Gustaf Lindqvist', + born: 1983 +}); + + diff --git a/docs/_includes/examples/basic/existing-html.html b/docs/_includes/examples/basic/existing-html.html new file mode 100644 index 00000000..a9df60f1 --- /dev/null +++ b/docs/_includes/examples/basic/existing-html.html @@ -0,0 +1,27 @@ +<div id="users"> + + <input class="search" placeholder="Search" /> + <button class="sort" data-sort="name"> + Sort + </button> + + <ul class="list"> + <li> + <h3 class="name">Jonny Stromberg</h3> + <p class="born">1986</p> + </li> + <li> + <h3 class="name">Jonas Arnklint</h3> + <p class="born">1985</p> + </li> + <li> + <h3 class="name">Martina Elm</h3> + <p class="born">1986</p> + </li> + <li> + <h3 class="name">Gustaf Lindqvist</h3> + <p class="born">1983</p> + </li> + </ul> + +</div> \ No newline at end of file diff --git a/docs/_includes/examples/basic/existing-js.html b/docs/_includes/examples/basic/existing-js.html new file mode 100644 index 00000000..d3956102 --- /dev/null +++ b/docs/_includes/examples/basic/existing-js.html @@ -0,0 +1,5 @@ +var options = { + valueNames: [ 'name', 'born' ] +}; + +var userList = new List('users', options); \ No newline at end of file diff --git a/docs/_includes/examples/basic/new-html.html b/docs/_includes/examples/basic/new-html.html new file mode 100644 index 00000000..0cd0247f --- /dev/null +++ b/docs/_includes/examples/basic/new-html.html @@ -0,0 +1,10 @@ +<div id="users"> + + <input class="search" placeholder="Search" /> + <button class="sort" data-sort="name"> + Sort + </button> + + <ul class="list"></ul> + +</div> diff --git a/docs/_includes/examples/basic/new-js.html b/docs/_includes/examples/basic/new-js.html new file mode 100644 index 00000000..4c60d54b --- /dev/null +++ b/docs/_includes/examples/basic/new-js.html @@ -0,0 +1,26 @@ +var options = { + valueNames: [ 'name', 'born' ], + item: '<li><h3 class="name"></h3><p class="born"></p></li>' +}; + +var values = [ + { + name: 'Jonny Strömberg', + born: 1986 + }, + { + name: 'Jonas Arnklint', + born: 1985 + }, + { + name: 'Martina Elm', + born: 1986 + } +]; + +var userList = new List('example-list', options, values); + +userList.add({ + name: 'Gustaf Lindqvist', + born: 1983 +}); diff --git a/docs/_includes/examples/basic/table.html b/docs/_includes/examples/basic/table.html new file mode 100644 index 00000000..e69de29b diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 3471bd8d..8c2e8bb0 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -46,7 +46,7 @@ - {% if jekyll.environment !== 'production' %} + {% if jekyll.environment != 'production' %} {% endif %} From 4b740b2baba9d5d27af4ec417bdc52e2903d171b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 4 Oct 2016 00:38:41 +0200 Subject: [PATCH 009/246] Delete CNAME --- docs/CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/CNAME diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index 98efbfe9..00000000 --- a/docs/CNAME +++ /dev/null @@ -1 +0,0 @@ -listjs.com From 3673ad729521572794e4d0abb31ab8d2141d026d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 4 Oct 2016 00:39:12 +0200 Subject: [PATCH 010/246] Create CNAME --- docs/CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/CNAME diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 00000000..d256ef9d --- /dev/null +++ b/docs/CNAME @@ -0,0 +1 @@ +listjs.com \ No newline at end of file From 37edc1b98bf63a684d633f29e2f52106c21eaf7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sat, 15 Oct 2016 11:04:48 +0200 Subject: [PATCH 011/246] Make it possible to reset search columns. Fix #450 --- History.md | 2 ++ src/search.js | 3 +++ test/test.search.js | 6 ++++++ 3 files changed, 11 insertions(+) diff --git a/History.md b/History.md index dd7be168..05893279 100644 --- a/History.md +++ b/History.md @@ -21,6 +21,8 @@ [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) +- **[Bugfix]** Make it possible to reset search columns + [See commit →](https://github.com/javve/list.js/commit/293b185e7b6277fba98bfd0a7b3bc7da04c708e7) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) diff --git a/src/search.js b/src/search.js index 2aeeb00f..f7b0b6db 100644 --- a/src/search.js +++ b/src/search.js @@ -15,10 +15,13 @@ module.exports = function(list) { if (args.length == 2 && args[1] instanceof Array) { columns = args[1]; } else if (args.length == 2 && typeof(args[1]) == "function") { + columns = undefined; customSearch = args[1]; } else if (args.length == 3) { columns = args[1]; customSearch = args[2]; + } else { + columns = undefined; } }, setColumns: function() { diff --git a/test/test.search.js b/test/test.search.js index c98fc530..90edcaac 100644 --- a/test/test.search.js +++ b/test/test.search.js @@ -108,6 +108,12 @@ describe('Search', function() { var result = list.search('jonny', [ 'pet' ]); expect(result.length).to.equal(0); }); + it('should remove columnm option', function() { + var result = list.search('jonny', [ 'born' ]); + expect(result.length).to.equal(0); + var result = list.search('jonny'); + expect(result.length).to.equal(1); + }); }); describe('Custom search function', function() { From 5cdc42efcc97cb0609a65035c8791653cb04fc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Oct 2016 11:13:43 +0200 Subject: [PATCH 012/246] Fix #444 --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 8794778d..648df2cc 100644 --- a/bower.json +++ b/bower.json @@ -5,7 +5,7 @@ "authors": [ "Jonny Strömberg " ], - "description": "The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML", + "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", "search", diff --git a/package.json b/package.json index 460cef2c..fea92704 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "list.js", "version": "1.2.0", - "description": "The perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML", + "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", "search", From 9fbb42ed63058b71e9271965480b5838ffeabc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Oct 2016 13:03:22 +0200 Subject: [PATCH 013/246] Update mocha --- Gruntfile.js | 20 +++++++++----------- package.json | 2 +- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index d86a4ca9..96a93062 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -54,17 +54,15 @@ module.exports = function(grunt) { } }, mocha: { - cool: { - src: [ 'test/index.html' ], - options: { - run: true, - timeout: 10000, - bail: false, - log: true, - reporter: 'Nyan', - mocha: { - ignoreLeaks: false - } + test: { + src: [ 'test/index.html' ], + options: { + run: true, + timeout: 10000, + bail: false, + log: true, + logErrors: true, + reporter: 'Nyan' } } } diff --git a/package.json b/package.json index fea92704..8f0b2029 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "grunt-contrib-jshint": "^0.12.0", "grunt-contrib-uglify": "^0.11.0", "grunt-contrib-watch": "^0.6.1", - "grunt-mocha": "^0.4.15", + "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", "jquery": "^1.12.0" }, From 7e9fe48210f418323fdb2ec0532683c73155cb48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Oct 2016 13:03:34 +0200 Subject: [PATCH 014/246] Add license --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 8f0b2029..26ac6d46 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ ], "author": "Jonny Strömberg ", "repository": "git://github.com/javve/list.js.git", + "license": "MIT", "dependencies": {}, "devDependencies": { "browserify": "^13.0.0", From 5b47e81093eaee53110beb959bb05dc74f7ee56e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Oct 2016 13:06:43 +0200 Subject: [PATCH 015/246] Fix test image paths --- test/test.parse.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/test.parse.js b/test/test.parse.js index 117107d9..eef6f577 100644 --- a/test/test.parse.js +++ b/test/test.parse.js @@ -56,13 +56,13 @@ describe('Parse', function() {
\ Jonny\ 1986\ - \ + \ \
\
\ Jocke\ 1985\ - \ + \ \
\

\ @@ -91,18 +91,18 @@ describe('Parse', function() { expect(jonny.name).to.equal("Jonny"); expect(jonny.born).to.equal("1986"); expect(jonny.id).to.equal("1"); - expect(jonny.image).to.equal("jonny.jpg"); + expect(jonny.image).to.equal("usage/boba.jpeg"); expect(jonny.timestamp).to.equal("54321"); expect(jonny.foo).to.equal("Bar"); }); it('should add item to list with class, data and src', function() { - list.add({ name: "Sven", born: 1950, id: 4, image: 'sven.gif', link: 'localhost', timestamp: '1337', foo: 'hej' }); + list.add({ name: "Sven", born: 1950, id: 4, image: 'usage/rey.jpeg', link: 'localhost', timestamp: '1337', foo: 'hej' }); expect(list.items.length).to.equal(3); var sven = list.items[2].values(); expect(sven.name).to.equal("Sven"); expect(sven.born).to.equal(1950); expect(sven.id).to.equal(4); - expect(sven.image).to.equal("sven.gif"); + expect(sven.image).to.equal("usage/rey.jpeg"); expect(sven.link).to.equal("localhost"); expect(sven.timestamp).to.equal("1337"); expect(sven.foo).to.equal("hej"); @@ -110,7 +110,7 @@ describe('Parse', function() { expect(el.data('id')).to.equal(4); expect(el.find('.name').text()).to.equal('Sven'); expect(el.find('.born').text()).to.equal('1950'); - expect(el.find('.image').attr('src')).to.equal('sven.gif'); + expect(el.find('.image').attr('src')).to.equal('usage/rey.jpeg'); expect(el.find('.link').attr('href')).to.equal('localhost'); expect(el.find('.timestamp').data('timestamp')).to.equal(1337); expect(el.find('.foo').val()).to.equal('hej'); From 519b930e2105183e500d6f5ea689cf7230e64c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Oct 2016 13:14:31 +0200 Subject: [PATCH 016/246] Add correct wrong sorting order (heh) --- test/test.sort.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/test.sort.js b/test/test.sort.js index 5c811f9e..49382e04 100644 --- a/test/test.sort.js +++ b/test/test.sort.js @@ -63,11 +63,11 @@ describe('Sort', function() { i6.values({ val: "s" }); list.sort('val'); expect(list.items[0].values().val).to.be.equal("a"); - expect(list.items[1].values().val).to.be.equal("o"); - expect(list.items[2].values().val).to.be.equal("s"); - expect(list.items[3].values().val).to.be.equal("ä"); - expect(list.items[4].values().val).to.be.equal("å"); - expect(list.items[5].values().val).to.be.equal("ö"); + expect(list.items[1].values().val).to.be.equal("å"); + expect(list.items[2].values().val).to.be.equal("ä"); + expect(list.items[3].values().val).to.be.equal("o"); + expect(list.items[4].values().val).to.be.equal("ö"); + expect(list.items[5].values().val).to.be.equal("s"); }); it('should fail to sort åäö asc (becomes öåä)', function() { i1.values({ val: "a" }); @@ -77,11 +77,11 @@ describe('Sort', function() { i5.values({ val: "o" }); i6.values({ val: "s" }); list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).to.be.equal("ö"); - expect(list.items[1].values().val).to.be.equal("å"); - expect(list.items[2].values().val).to.be.equal("ä"); - expect(list.items[3].values().val).to.be.equal("s"); - expect(list.items[4].values().val).to.be.equal("o"); + expect(list.items[0].values().val).to.be.equal("s"); + expect(list.items[1].values().val).to.be.equal("ö"); + expect(list.items[2].values().val).to.be.equal("o"); + expect(list.items[3].values().val).to.be.equal("ä"); + expect(list.items[4].values().val).to.be.equal("å"); expect(list.items[5].values().val).to.be.equal("a"); }); it('should handle case-insensitive by default', function() { From 95329b945c64c0ad0693df120ef00547eac9b029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sat, 15 Oct 2016 13:48:17 +0200 Subject: [PATCH 017/246] Allow empty list without template. Fix #438 --- History.md | 2 ++ src/templater.js | 9 +++++++-- test/test.create.js | 29 +++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index 05893279..d96c625e 100644 --- a/History.md +++ b/History.md @@ -23,6 +23,8 @@ [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) - **[Bugfix]** Make it possible to reset search columns [See commit →](https://github.com/javve/list.js/commit/293b185e7b6277fba98bfd0a7b3bc7da04c708e7) +- **[Bugfix]** Allow empty list without template. + [See commit →](https://github.com/javve/list.js/commit/f84f0dd1fc5bb12e0f8abad49139a40cbf69a5c2) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) diff --git a/src/templater.js b/src/templater.js index 782fd609..fe852aaa 100644 --- a/src/templater.js +++ b/src/templater.js @@ -4,7 +4,9 @@ var Templater = function(list) { var init = function() { itemSource = templater.getItemSource(list.item); - itemSource = templater.clearSourceItem(itemSource, list.valueNames); + if (itemSource) { + itemSource = templater.clearSourceItem(itemSource, list.valueNames); + } }; this.clearSourceItem = function(el, valueNames) { @@ -55,7 +57,7 @@ var Templater = function(list) { return source; } } - throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + return undefined; }; this.get = function(item, valueNames) { @@ -129,6 +131,9 @@ var Templater = function(list) { if (item.elm !== undefined) { return false; } + if (itemSource === undefined) { + throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + } /* If item source does not exists, use the first item in list as source for new items */ var newItem = itemSource.cloneNode(true); diff --git a/test/test.create.js b/test/test.create.js index 96e2cc71..df13b2b1 100644 --- a/test/test.create.js +++ b/test/test.create.js @@ -53,6 +53,35 @@ describe('Create', function() { listEl.remove(); }); + describe('without items and or template', function() { + + it('should not throw error on init', function() { + var listEl = $('
\ +
    \ +
    '); + $(document.body).append(listEl); + + var list = new List('list', { + valueNames: ['name'] + }); + + listEl.remove(); + }); + + it('should throw error when created items', function() { + var listEl = $('
    \ +
      \ +
      '); + $(document.body).append(listEl); + + var list = new List('list', { + valueNames: ['name'] + }); + expect(list.add).withArgs(({ name: 'Jonas' })).to.throwException(); + listEl.remove(); + }); + }); + describe('Without items and with HTML template', function() { var listEl = $('
      \
        \ From 9473d0d384ce9524596d2666c277c5ea8d4f2c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 10:58:42 +0200 Subject: [PATCH 018/246] Add test and histort about tr template fix --- History.md | 6 ++++-- test/test.create.js | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index d96c625e..6ecc75a3 100644 --- a/History.md +++ b/History.md @@ -17,14 +17,16 @@ # Changelog ### v1.2.1 -- **[Bugfix]** Update NaturalSort to 0.8.1 - [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) - **[Bugfix]** Make it possible to reset search columns [See commit →](https://github.com/javve/list.js/commit/293b185e7b6277fba98bfd0a7b3bc7da04c708e7) - **[Bugfix]** Allow empty list without template. [See commit →](https://github.com/javve/list.js/commit/f84f0dd1fc5bb12e0f8abad49139a40cbf69a5c2) + - **[Bugfix]** Make it possible to use
        as string template + [See commit →](https://github.com/javve/list.js/commit/38583e097cb75e369779b46c6129e1b8b8324f24) +- **[Misc]** Update NaturalSort to 0.8.1 + [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) diff --git a/test/test.create.js b/test/test.create.js index df13b2b1..8eaf8459 100644 --- a/test/test.create.js +++ b/test/test.create.js @@ -53,6 +53,34 @@ describe('Create', function() { listEl.remove(); }); + describe('Without items and with string template for table', function() { + var listEl = $('
        \ +
        \ + '); + + $(document.body).append(listEl); + + var list = new List('list', { + valueNames: ['name'], + item: '' + }, [ + { name: 'Jonny' } + ]); + + it('should contain one item', function() { + expect(list.items.length).to.equal(1); + expect(listEl.find('tr').size()).to.equal(1); + }); + + it('should contain two items', function() { + list.add({ name: 'Jonas' }); + expect(list.items.length).to.equal(2); + expect(listEl.find('tr').size()).to.equal(2); + }); + + listEl.remove(); + }); + describe('without items and or template', function() { it('should not throw error on init', function() { From 79daff8da51aa047aae5d31e0af12cb30b395048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sun, 23 Oct 2016 12:08:08 +0200 Subject: [PATCH 019/246] Rename dist files to list-.js and add version to start of minified file --- Gruntfile.js | 17 ++++++++++++++--- History.md | 2 ++ package.json | 1 + 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 96a93062..2b9d37bc 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ module.exports = function(grunt) { }, shell: { build: { - command: 'node_modules/browserify/bin/cmd.js index.js > dist/list.js', + command: 'node_modules/browserify/bin/cmd.js index.js > dist/list-<%= pkg.version %>.js', options: { stderr: true } @@ -49,10 +49,20 @@ module.exports = function(grunt) { uglify: { target: { files: { - 'dist/list.min.js': ['dist/list.js'] + 'dist/list-<%= pkg.version %>.min.js': ['dist/list-<%= pkg.version %>.js'] } } }, + file_append: { + default_options: { + files: [ + { + prepend: "// List.js v<%= pkg.version %> \n", + input: 'dist/list-<%= pkg.version %>.min.js' + } + ] + } + }, mocha: { test: { src: [ 'test/index.html' ], @@ -73,10 +83,11 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-mocha'); + grunt.loadNpmTasks('grunt-file-append'); grunt.registerTask('mkdir', function() { grunt.file.mkdir("dist"); }); grunt.registerTask('default', ['jshint:code', 'jshint:tests', 'mkdir', 'shell:build']); - grunt.registerTask('dist', ['default', 'mkdir', 'shell:build', 'uglify']); + grunt.registerTask('dist', ['default', 'mkdir', 'shell:build', 'uglify', 'file_append']); grunt.registerTask('clean', ['shell:remove']); grunt.registerTask('test', ['dist', 'mocha']); diff --git a/History.md b/History.md index 6ecc75a3..c5fd1e28 100644 --- a/History.md +++ b/History.md @@ -29,6 +29,8 @@ [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) +- **[Misc]** Rename dist files to list-.js and add version to start of minified file + [See commit →](https://github.com/javve/list.js/commit/9cc48f6b2f429b591ee5eb82e2b2b48a00444638) ### 2016-02-27: v1.2.0 It's been two years since the last update of List.js. That is absolutely not ok diff --git a/package.json b/package.json index 26ac6d46..f478fe51 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "grunt-contrib-jshint": "^0.12.0", "grunt-contrib-uglify": "^0.11.0", "grunt-contrib-watch": "^0.6.1", + "grunt-file-append": "0.0.6", "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", "jquery": "^1.12.0" From 6f5776e3ebc84044164c517fba79db4b35040e56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 12:12:14 +0200 Subject: [PATCH 020/246] Update image path for readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4c940d21..2772d22b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ bower install list.js ### Creator | | Jonny Strömberg [@javve](http://twitter.com/javve) | | ------------- | ------------- | -| ![Image of Jonny](http://listjs.com/images/graphics/javve.jpg) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) +| ![Image of Jonny](http://listjs.com/assets/images/graphics/javve.jpg) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) ## License (MIT) From 99520e6dce4c81df8a3968c7574a0bd95d173a32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sun, 23 Oct 2016 12:20:30 +0200 Subject: [PATCH 021/246] =?UTF-8?q?Don=E2=80=99t=20rename=20files?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gruntfile.js | 6 +++--- History.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 2b9d37bc..6379b5e8 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ module.exports = function(grunt) { }, shell: { build: { - command: 'node_modules/browserify/bin/cmd.js index.js > dist/list-<%= pkg.version %>.js', + command: 'node_modules/browserify/bin/cmd.js index.js > dist/list.js', options: { stderr: true } @@ -49,7 +49,7 @@ module.exports = function(grunt) { uglify: { target: { files: { - 'dist/list-<%= pkg.version %>.min.js': ['dist/list-<%= pkg.version %>.js'] + 'dist/list.min.js': ['dist/list.js'] } } }, @@ -58,7 +58,7 @@ module.exports = function(grunt) { files: [ { prepend: "// List.js v<%= pkg.version %> \n", - input: 'dist/list-<%= pkg.version %>.min.js' + input: 'dist/list.min.js' } ] } diff --git a/History.md b/History.md index c5fd1e28..fbf6030e 100644 --- a/History.md +++ b/History.md @@ -29,7 +29,7 @@ [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) -- **[Misc]** Rename dist files to list-.js and add version to start of minified file +- **[Misc]** Add version to start of minified file [See commit →](https://github.com/javve/list.js/commit/9cc48f6b2f429b591ee5eb82e2b2b48a00444638) ### 2016-02-27: v1.2.0 From 917b96840df0215cbadcf239c2bb6e52eeb2fbcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 12:26:16 +0200 Subject: [PATCH 022/246] Update history.md --- History.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/History.md b/History.md index fbf6030e..f5f4103b 100644 --- a/History.md +++ b/History.md @@ -12,11 +12,14 @@ - https://github.com/javve/list.js/pull/301 - Improve testability by decoupling things and make it possible to use require('') in tests - Add .remove() method to remove all listeners etc. -- Either include version in minified file or name file list-1.2.1.js +- Example of more advanced filtering +- Fix test suite +- Example with multiple lists +- Test simple natural sort: https://github.com/litejs/natural-compare-lite # Changelog -### v1.2.1 +### 2016-10-23 v1.3.0 - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) - **[Bugfix]** Make it possible to reset search columns From 03ed4a5f3b77d747f57b7ad83ea45f1fba68cf4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 12:27:14 +0200 Subject: [PATCH 023/246] Bump package version to 1.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f478fe51..9f54a437 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "1.2.0", + "version": "1.3.0", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", From 1269a2806234a86f1bd15bad6c616fe74d9c96d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 12:44:00 +0200 Subject: [PATCH 024/246] Update package.json and misc --- .npmignore | 1 + Gruntfile.js | 6 +++++- index.js | 4 ---- package.json | 10 +++++++++- 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 00000000..77f12ae2 --- /dev/null +++ b/.npmignore @@ -0,0 +1 @@ +docs/ diff --git a/Gruntfile.js b/Gruntfile.js index 6379b5e8..0331113c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -57,8 +57,12 @@ module.exports = function(grunt) { default_options: { files: [ { - prepend: "// List.js v<%= pkg.version %> \n", + prepend: "// List.js v<%= pkg.version %> (<%= pkg.homepage %>) by <%= pkg.author.name %> (<%= pkg.author.url %>)\n", input: 'dist/list.min.js' + }, + { + prepend: "// List.js v<%= pkg.version %> (<%= pkg.homepage %>) by <%= pkg.author.name %> (<%= pkg.author.url %>)\n", + input: 'dist/list.js' } ] } diff --git a/index.js b/index.js index a2346631..71c06a9b 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,3 @@ -/* -List.js 1.2 -By Jonny Strömberg (www.jonnystromberg.com, www.listjs.com) -*/ (function( window, undefined ) { "use strict"; diff --git a/package.json b/package.json index 9f54a437..0fd1f467 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,17 @@ "html", "ui" ], - "author": "Jonny Strömberg ", + "author": { + "name": "Jonny Strömberg", + "email": "jonny.stromberg@gmail.com>", + "url": "http://javve.com" + }, + "homepage": "http://www.listjs.com", "repository": "git://github.com/javve/list.js.git", "license": "MIT", + "bugs": { + "url": "https://github.com/javve/list.js/issues" + }, "dependencies": {}, "devDependencies": { "browserify": "^13.0.0", From 053a200f679c5d64879f5ce59cf9026942092dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 12:44:17 +0200 Subject: [PATCH 025/246] Update dist --- dist/list.js | 25 +++++++++++++++---------- dist/list.min.js | 3 ++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/dist/list.js b/dist/list.js index 650d8321..15078610 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,8 +1,5 @@ +// List.js v1.3.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o]/.exec(item)) { - var table = document.createElement('table'); - table.innerHTML = item; - return table.firstChild; + } else if (/]/g.exec(item)) { + var tbody = document.createElement('tbody'); + tbody.innerHTML = item; + return tbody.firstChild; } else if (item.indexOf("<") !== -1) { var div = document.createElement('div'); div.innerHTML = item; @@ -701,7 +703,7 @@ var Templater = function(list) { return source; } } - throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + return undefined; }; this.get = function(item, valueNames) { @@ -775,6 +777,9 @@ var Templater = function(list) { if (item.elm !== undefined) { return false; } + if (itemSource === undefined) { + throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + } /* If item source does not exists, use the first item in list as source for new items */ var newItem = itemSource.cloneNode(true); diff --git a/dist/list.min.js b/dist/list.min.js index 26d8f02b..06c4721a 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1 +1,2 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb;b++)a.push(r.items[b].values());return a},this.add=function(a,b){if(0!==a.length){if(b)return void t(a,b);var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;e=r.items.length>r.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;f>e;e++)r.items[e].values()[a]==b&&(r.templater.remove(r.items[e],c),r.items.splice(e,1),f--,e--,d++);return r.update(),d},this.get=function(a,b){for(var c=[],d=0,e=r.items.length;e>d;d++){var f=r.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return r.items.length},this.clear=function(){return r.templater.clear(),r.items=[],r},this.on=function(a,b){return r.handlers[a].push(b),r},this.off=function(a,b){var c=r.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&r.matchingItems.length+1>=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];b(f)?f.filtered=!0:f.filtered=!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}},{}],4:[function(a,b,c){b.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return!(!e.elm||e.elm.parentNode!=a.list)},f(b,c,d)}}},{}],5:[function(a,b,c){b.exports=function(b){var c=a("./item")(b),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(a,d){for(var e=0,f=a.length;f>e;e++)b.items.push(new c(d,a[e]))},f=function(a,c){var d=a.splice(0,50);e(d,c),a.length>0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?e=a[1]:3==a.length&&(c=a[1],e=a[2])},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;c>b;b++)g.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(g.values(a.values(),c[b]))return void(a.found=!0)},values:function(c,e){return!!(c.hasOwnProperty(e)&&(b=a.utils.toString(c[e]).toLowerCase(),""!==d&&b.search(d)>-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;d>c;c++)a.utils.classes(b.els[c]).remove("asc"),a.utils.classes(b.els[c]).remove("desc")},getOrder:function(b){var c=a.utils.getAttribute(b,"data-order");return"asc"==c||"desc"==c?c:a.utils.classes(b).has("desc")?"asc":a.utils.classes(b).has("asc")?"desc":"asc"},getInSensitive:function(b,c){var d=a.utils.getAttribute(b,"data-insensitive");"false"===d?c.insensitive=!1:c.insensitive=!0},setOrder:function(c){for(var d=0,e=b.els.length;e>d;d++){var f=b.els[d];if(a.utils.getAttribute(f,"data-sort")===c.valueName){var g=a.utils.getAttribute(f,"data-order");"asc"==g||"desc"==g?g==c.order&&a.utils.classes(f).add(c.order):a.utils.classes(f).add(c.order)}}}},c=function(){a.trigger("sortStart");var c={},d=arguments[0].currentTarget||arguments[0].srcElement||void 0;d?(c.valueName=a.utils.getAttribute(d,"data-sort"),b.getInSensitive(d,c),c.order=b.getOrder(d)):(c=arguments[1]||c,c.valueName=arguments[0],c.order=c.order||"asc",c.insensitive="undefined"==typeof c.insensitive?!0:c.insensitive),b.clear(),b.setOrder(c),c.sortFunction=c.sortFunction||a.sortFunction,a.items.sort(function(a,b){var d="desc"===c.order?-1:1;return c.sortFunction(a,b,c)*d}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=a.utils.getByClass(a.listContainer,a.sortClass),a.utils.events.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),c}},{}],8:[function(a,b,c){var d=function(a){var b,c=this,d=function(){b=c.getItemSource(a.item),b=c.clearSourceItem(b,a.valueNames)};this.clearSourceItem=function(b,c){for(var d=0,e=c.length;e>d;d++){var f;if(c[d].data)for(var g=0,h=c[d].data.length;h>g;g++)b.setAttribute("data-"+c[d].data[g],"");else c[d].attr&&c[d].name?(f=a.utils.getByClass(b,c[d].name,!0),f&&f.setAttribute(c[d].attr,"")):(f=a.utils.getByClass(b,c[d],!0),f&&(f.innerHTML=""));f=void 0}return b},this.getItemSource=function(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d].cloneNode(!0)}else{if(/^tr[\s>]/.exec(b)){var f=document.createElement("table");return f.innerHTML=b,f.firstChild}if(-1!==b.indexOf("<")){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.")},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;g>f;f++){var h;if(d[f].data)for(var i=0,j=d[f].data.length;j>i;i++)e[d[f].data[i]]=a.utils.getAttribute(b.elm,"data-"+d[f].data[i]);else d[f].attr&&d[f].name?(h=a.utils.getByClass(b.elm,d[f].name,!0),e[d[f].name]=h?a.utils.getAttribute(h,d[f].attr):""):(h=a.utils.getByClass(b.elm,d[f],!0),e[d[f]]=h?h.innerHTML:"");h=void 0}return e},this.set=function(b,d){var e=function(b){for(var c=0,d=a.valueNames.length;d>c;c++)if(a.valueNames[c].data){for(var e=a.valueNames[c].data,f=0,g=e.length;g>f;f++)if(e[f]===b)return{data:b}}else{if(a.valueNames[c].attr&&a.valueNames[c].name&&a.valueNames[c].name==b)return a.valueNames[c];if(a.valueNames[c]===b)return b}},f=function(c,d){var f,g=e(c);g&&(g.data?b.elm.setAttribute("data-"+g.data,d):g.attr&&g.name?(f=a.utils.getByClass(b.elm,g.name,!0),f&&f.setAttribute(g.attr,d)):(f=a.utils.getByClass(b.elm,g,!0),f&&(f.innerHTML=d)),f=void 0)};if(!c.create(b))for(var g in d)d.hasOwnProperty(g)&&f(g,d[g])},this.create=function(a){if(void 0!==a.elm)return!1;var d=b.cloneNode(!0);return d.removeAttribute("id"),a.elm=d,c.set(a,a.values()),!0},this.remove=function(b){b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.show=function(b){c.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cf;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}},{}],13:[function(a,b,c){b.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null===a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()},{}],14:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;cr)return-1;if(r>s)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);x>u;u++){if(d=t(p[u]||"",v),e=t(q[u]||"",w),isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(/[^\x00-\x80]/.test(d+e)&&d.localeCompare){var y=d.localeCompare(e);return y/Math.abs(y)}if(e>d)return-1;if(d>e)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;cr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cs)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);ue)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;c Date: Sun, 23 Oct 2016 13:30:40 +0200 Subject: [PATCH 026/246] Set list.js version automatically at site --- Gruntfile.js | 8 +++++- docs/_data/package.json | 52 +++++++++++++++++++++++++++++++++++++ docs/index.html | 2 +- docs/overview/download.html | 6 ++--- 4 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 docs/_data/package.json diff --git a/Gruntfile.js b/Gruntfile.js index 0331113c..6afbd5d7 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -19,6 +19,12 @@ module.exports = function(grunt) { stderr: true } }, + duplicate_package: { + command: 'cp package.json docs/_data/package.json' + }, + duplicate_list_min: { + command: 'cp dist/list.min.js docs/assets/javascripts/list.min.js' + }, remove: { command: 'rm -fr node_modules dist' } @@ -91,7 +97,7 @@ module.exports = function(grunt) { grunt.registerTask('mkdir', function() { grunt.file.mkdir("dist"); }); grunt.registerTask('default', ['jshint:code', 'jshint:tests', 'mkdir', 'shell:build']); - grunt.registerTask('dist', ['default', 'mkdir', 'shell:build', 'uglify', 'file_append']); + grunt.registerTask('dist', ['default', 'mkdir', 'shell:build', 'uglify', 'file_append', 'shell:duplicate_package', 'shell:duplicate_list_min']); grunt.registerTask('clean', ['shell:remove']); grunt.registerTask('test', ['dist', 'mocha']); diff --git a/docs/_data/package.json b/docs/_data/package.json new file mode 100644 index 00000000..0fd1f467 --- /dev/null +++ b/docs/_data/package.json @@ -0,0 +1,52 @@ +{ + "name": "list.js", + "version": "1.3.0", + "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", + "keywords": [ + "list", + "search", + "sort", + "table", + "dom", + "html", + "ui" + ], + "author": { + "name": "Jonny Strömberg", + "email": "jonny.stromberg@gmail.com>", + "url": "http://javve.com" + }, + "homepage": "http://www.listjs.com", + "repository": "git://github.com/javve/list.js.git", + "license": "MIT", + "bugs": { + "url": "https://github.com/javve/list.js/issues" + }, + "dependencies": {}, + "devDependencies": { + "browserify": "^13.0.0", + "expect.js": "^0.3.1", + "grunt": "^0.4.5", + "grunt-cli": "^0.1.13", + "grunt-contrib-jshint": "^0.12.0", + "grunt-contrib-uglify": "^0.11.0", + "grunt-contrib-watch": "^0.6.1", + "grunt-file-append": "0.0.6", + "grunt-mocha": "1.0.1", + "grunt-shell": "^1.1.2", + "jquery": "^1.12.0" + }, + "main": "index", + "engines": { + "node": ">= 0.10.21" + }, + "npmName": "list.js", + "npmFileMap": [ + { + "basePath": "/dist/", + "files": [ + "*.js" + ] + } + ] +} diff --git a/docs/index.html b/docs/index.html index 5923926d..30cca82d 100755 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@
        -

        List.js v1.2.0

        +

        List.js v{{site.data.package.version}}

        Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript that adds search, sort, filters and flexibility diff --git a/docs/overview/download.html b/docs/overview/download.html index bff22c38..774f54c5 100644 --- a/docs/overview/download.html +++ b/docs/overview/download.html @@ -8,8 +8,8 @@

        Download

        The core thing in List.js have always been simplicity. It should require as little effort as possible to use the script and it's features.

        Via GitHub

        -Download compressed List.js   5KB with gzip
        -Download uncompressed List.js +Download compressed List.js   5KB with gzip
        +Download uncompressed List.js

        Via NPM

        npm install list.js
        @@ -18,6 +18,6 @@

        Via Bower

        bower install list.js

        Via CDNJS

        -
        <script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script>
        +
        <script src="//cdnjs.cloudflare.com/ajax/libs/list.js/{{site.data.package.version}}/list.min.js"></script>
        From 51e2324d74175c3800808c336d272e142e21b14c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 13:30:55 +0200 Subject: [PATCH 027/246] Fix some paths --- README.md | 6 +++--- docs/_layouts/default.html | 2 +- docs/assets/javascripts/list-1.2.0.min.js | 1 - docs/assets/javascripts/list.min.js | 2 ++ 4 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 docs/assets/javascripts/list-1.2.0.min.js create mode 100644 docs/assets/javascripts/list.min.js diff --git a/README.md b/README.md index 2772d22b..86a9e223 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ bower install list.js ``` ##### Via CDNJS ```html - + ``` ##### Via Direct Download -- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.2.0/dist/list.min.js) -- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.2.0/dist/list.js) +- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.3.0/dist/list.min.js) +- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.3.0/dist/list.js) ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 8c2e8bb0..899cea53 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -83,7 +83,7 @@ {% include carbon.html %} - +
        diff --git a/docs/assets/javascripts/list-1.2.0.min.js b/docs/assets/javascripts/list-1.2.0.min.js deleted file mode 100644 index ff939b4b..00000000 --- a/docs/assets/javascripts/list-1.2.0.min.js +++ /dev/null @@ -1 +0,0 @@ -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb;b++)a.push(r.items[b].values());return a},this.add=function(a,b){if(0!==a.length){if(b)return void t(a,b);var c=[],e=!1;a[0]===d&&(a=[a]);for(var f=0,g=a.length;g>f;f++){var h=null;e=r.items.length>r.page?!0:!1,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;f>e;e++)r.items[e].values()[a]==b&&(r.templater.remove(r.items[e],c),r.items.splice(e,1),f--,e--,d++);return r.update(),d},this.get=function(a,b){for(var c=[],d=0,e=r.items.length;e>d;d++){var f=r.items[d];f.values()[a]==b&&c.push(f)}return c},this.size=function(){return r.items.length},this.clear=function(){return r.templater.clear(),r.items=[],r},this.on=function(a,b){return r.handlers[a].push(b),r},this.off=function(a,b){var c=r.handlers[a],d=h(c,b);return d>-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;b>c;c++)a[c].matching()&&r.matchingItems.length+1>=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;e>d;d++){var f=c[d];b(f)?f.filtered=!0:f.filtered=!1}}return a.update(),a.trigger("filterComplete"),a.visibleItems}}},{}],4:[function(a,b,c){b.exports=function(a){return function(b,c,d){var e=this;this._values={},this.found=!1,this.filtered=!1;var f=function(b,c,d){if(void 0===c)d?e.values(b,d):e.values(b);else{e.elm=c;var f=a.templater.get(e,b);e.values(f)}};this.values=function(b,c){if(void 0===b)return e._values;for(var d in b)e._values[d]=b[d];c!==!0&&a.templater.set(e,e.values())},this.show=function(){a.templater.show(e)},this.hide=function(){a.templater.hide(e)},this.matching=function(){return a.filtered&&a.searched&&e.found&&e.filtered||a.filtered&&!a.searched&&e.filtered||!a.filtered&&a.searched&&e.found||!a.filtered&&!a.searched},this.visible=function(){return e.elm&&e.elm.parentNode==a.list?!0:!1},f(b,c,d)}}},{}],5:[function(a,b,c){b.exports=function(b){var c=a("./item")(b),d=function(a){for(var b=a.childNodes,c=[],d=0,e=b.length;e>d;d++)void 0===b[d].data&&c.push(b[d]);return c},e=function(a,d){for(var e=0,f=a.length;f>e;e++)b.items.push(new c(d,a[e]))},f=function(a,c){var d=a.splice(0,50);e(d,c),a.length>0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?e=a[1]:3==a.length&&(c=a[1],e=a[2])},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;c>b;b++)g.item(a.items[b])},item:function(a){a.found=!1;for(var b=0,d=c.length;d>b;b++)if(g.values(a.values(),c[b]))return void(a.found=!0)},values:function(c,e){return c.hasOwnProperty(e)&&(b=a.utils.toString(c[e]).toLowerCase(),""!==d&&b.search(d)>-1)?!0:!1},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order?!0:!1,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;d>c;c++)a.utils.classes(b.els[c]).remove("asc"),a.utils.classes(b.els[c]).remove("desc")},getOrder:function(b){var c=a.utils.getAttribute(b,"data-order");return"asc"==c||"desc"==c?c:a.utils.classes(b).has("desc")?"asc":a.utils.classes(b).has("asc")?"desc":"asc"},getInSensitive:function(b,c){var d=a.utils.getAttribute(b,"data-insensitive");"false"===d?c.insensitive=!1:c.insensitive=!0},setOrder:function(c){for(var d=0,e=b.els.length;e>d;d++){var f=b.els[d];if(a.utils.getAttribute(f,"data-sort")===c.valueName){var g=a.utils.getAttribute(f,"data-order");"asc"==g||"desc"==g?g==c.order&&a.utils.classes(f).add(c.order):a.utils.classes(f).add(c.order)}}}},c=function(){a.trigger("sortStart");var c={},d=arguments[0].currentTarget||arguments[0].srcElement||void 0;d?(c.valueName=a.utils.getAttribute(d,"data-sort"),b.getInSensitive(d,c),c.order=b.getOrder(d)):(c=arguments[1]||c,c.valueName=arguments[0],c.order=c.order||"asc",c.insensitive="undefined"==typeof c.insensitive?!0:c.insensitive),b.clear(),b.setOrder(c),c.sortFunction=c.sortFunction||a.sortFunction,a.items.sort(function(a,b){var d="desc"===c.order?-1:1;return c.sortFunction(a,b,c)*d}),a.update(),a.trigger("sortComplete")};return a.handlers.sortStart=a.handlers.sortStart||[],a.handlers.sortComplete=a.handlers.sortComplete||[],b.els=a.utils.getByClass(a.listContainer,a.sortClass),a.utils.events.bind(b.els,"click",c),a.on("searchStart",b.clear),a.on("filterStart",b.clear),c}},{}],8:[function(a,b,c){var d=function(a){var b,c=this,d=function(){b=c.getItemSource(a.item),b=c.clearSourceItem(b,a.valueNames)};this.clearSourceItem=function(b,c){for(var d=0,e=c.length;e>d;d++){var f;if(c[d].data)for(var g=0,h=c[d].data.length;h>g;g++)b.setAttribute("data-"+c[d].data[g],"");else c[d].attr&&c[d].name?(f=a.utils.getByClass(b,c[d].name,!0),f&&f.setAttribute(c[d].attr,"")):(f=a.utils.getByClass(b,c[d],!0),f&&(f.innerHTML=""));f=void 0}return b},this.getItemSource=function(b){if(void 0===b){for(var c=a.list.childNodes,d=0,e=c.length;e>d;d++)if(void 0===c[d].data)return c[d].cloneNode(!0)}else{if(/^tr[\s>]/.exec(b)){var f=document.createElement("table");return f.innerHTML=b,f.firstChild}if(-1!==b.indexOf("<")){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}throw new Error("The list need to have at list one item on init otherwise you'll have to add a template.")},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;g>f;f++){var h;if(d[f].data)for(var i=0,j=d[f].data.length;j>i;i++)e[d[f].data[i]]=a.utils.getAttribute(b.elm,"data-"+d[f].data[i]);else d[f].attr&&d[f].name?(h=a.utils.getByClass(b.elm,d[f].name,!0),e[d[f].name]=h?a.utils.getAttribute(h,d[f].attr):""):(h=a.utils.getByClass(b.elm,d[f],!0),e[d[f]]=h?h.innerHTML:"");h=void 0}return e},this.set=function(b,d){var e=function(b){for(var c=0,d=a.valueNames.length;d>c;c++)if(a.valueNames[c].data){for(var e=a.valueNames[c].data,f=0,g=e.length;g>f;f++)if(e[f]===b)return{data:b}}else{if(a.valueNames[c].attr&&a.valueNames[c].name&&a.valueNames[c].name==b)return a.valueNames[c];if(a.valueNames[c]===b)return b}},f=function(c,d){var f,g=e(c);g&&(g.data?b.elm.setAttribute("data-"+g.data,d):g.attr&&g.name?(f=a.utils.getByClass(b.elm,g.name,!0),f&&f.setAttribute(g.attr,d)):(f=a.utils.getByClass(b.elm,g,!0),f&&(f.innerHTML=d)),f=void 0)};if(!c.create(b))for(var g in d)d.hasOwnProperty(g)&&f(g,d[g])},this.create=function(a){if(void 0!==a.elm)return!1;var d=b.cloneNode(!0);return d.removeAttribute("id"),a.elm=d,c.set(a,a.values()),!0},this.remove=function(b){b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.show=function(b){c.create(b),a.list.appendChild(b.elm)},this.hide=function(b){void 0!==b.elm&&b.elm.parentNode===a.list&&a.list.removeChild(b.elm)},this.clear=function(){if(a.list.hasChildNodes())for(;a.list.childNodes.length>=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cf;f++)void 0!==b[f]&&b[f].nodeName===b&&(c=b[f].nodeValue);return c}},{}],13:[function(a,b,c){b.exports=function(){return document.getElementsByClassName?function(a,b,c){return c?a.getElementsByClassName(b)[0]:a.getElementsByClassName(b)}:document.querySelector?function(a,b,c){return b="."+b,c?a.querySelector(b):a.querySelectorAll(b)}:function(a,b,c){var d=[],e="*";null===a&&(a=document);for(var f=a.getElementsByTagName(e),g=f.length,h=new RegExp("(^|\\s)"+b+"(\\s|$)"),i=0,j=0;g>i;i++)if(h.test(f[i].className)){if(c)return f[i];d[j]=f[i],j++}return d}}()},{}],14:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;cr)return-1;if(r>s)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);x>u;u++){if(d=t(p[u],v),e=t(q[u],w),isNaN(d)!==isNaN(e))return isNaN(d)?1:-1;if(typeof d!=typeof e&&(d+="",e+=""),e>d)return-1;if(d>e)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;cr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cs)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);ue)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;c Date: Sun, 23 Oct 2016 13:31:04 +0200 Subject: [PATCH 028/246] Release info --- Release.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Release.md diff --git a/Release.md b/Release.md new file mode 100644 index 00000000..c446dde0 --- /dev/null +++ b/Release.md @@ -0,0 +1,9 @@ +# RELEASE + +1. Update version in package.json +2. Update version in bower.json +3. Commit "Version x.y.z" +4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` +5. Push with `git push` +6. Push tags with `git push --tags` +7. Update links in README.md From 2c68b0451b4ee590de29c53b79a9a973f82f8d54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 13:58:13 +0200 Subject: [PATCH 029/246] Remove unused layout --- docs/_layouts/game.html | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 docs/_layouts/game.html diff --git a/docs/_layouts/game.html b/docs/_layouts/game.html deleted file mode 100644 index b364b8a8..00000000 --- a/docs/_layouts/game.html +++ /dev/null @@ -1,37 +0,0 @@ -{% assign collection = site[page.collection] %} - - - - - {% include head.html %} - - - -
        - {% include menus/main.html %} - -
        -

        {{page.title}}

        -

        {{page.description}}

        -
        - -
        - {% if page.overlay %}
        {% endif %} -
        - -
        -
        - {% include menus/game.html collection=collection %} - -
        - {{ content }} - -
        -
        - {% include newsletter.html %} -
        - - {% include footer.html %} - - - From 9c0d86b483af3761531ac31a5fea87592dba98b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 23 Oct 2016 20:50:57 +0200 Subject: [PATCH 030/246] Update history.md --- History.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/History.md b/History.md index f5f4103b..d18f3a20 100644 --- a/History.md +++ b/History.md @@ -23,17 +23,19 @@ - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) - **[Bugfix]** Make it possible to reset search columns - [See commit →](https://github.com/javve/list.js/commit/293b185e7b6277fba98bfd0a7b3bc7da04c708e7) + [See commit →](https://github.com/javve/list.js/commit/37edc1b98bf63a684d633f29e2f52106c21eaf7d) - **[Bugfix]** Allow empty list without template. - [See commit →](https://github.com/javve/list.js/commit/f84f0dd1fc5bb12e0f8abad49139a40cbf69a5c2) - - **[Bugfix]** Make it possible to use as string template + [See commit →](https://github.com/javve/list.js/commit/95329b945c64c0ad0693df120ef00547eac9b029) +- **[Bugfix]** Make it possible to use as string template [See commit →](https://github.com/javve/list.js/commit/38583e097cb75e369779b46c6129e1b8b8324f24) - **[Misc]** Update NaturalSort to 0.8.1 [See commit →](https://github.com/javve/list.js/commit/42d3db491801677c63238d5db3e0e9257087999a) - **[Misc]** Use local Browserify [See commit →](https://github.com/javve/list.js/commit/83f6502dcea428fa2de2513d19ac71f82905ecb8) - **[Misc]** Add version to start of minified file - [See commit →](https://github.com/javve/list.js/commit/9cc48f6b2f429b591ee5eb82e2b2b48a00444638) + [See commit →](https://github.com/javve/list.js/commit/79daff8da51aa047aae5d31e0af12cb30b395048) +- **[Misc]** Switch to GitHub pages for listjs.com + [See commit →](https://github.com/javve/list.js/commit/1af94012de89fd6bcf8446c31305ad517507c44b) ### 2016-02-27: v1.2.0 It's been two years since the last update of List.js. That is absolutely not ok From e114f513ea4bf647af28515a89bb5fe2e146301d Mon Sep 17 00:00:00 2001 From: Ammar Hadzic Date: Mon, 24 Oct 2016 00:29:33 +0200 Subject: [PATCH 031/246] Fix documentation for initializing list --- docs/docs/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/index.html b/docs/docs/index.html index 33fb776c..c0aaad4c 100644 --- a/docs/docs/index.html +++ b/docs/docs/index.html @@ -40,6 +40,7 @@
        HTML
        JavaScript
        var options = {
        +  valueNames: [ 'name', 'city' ],
           item: '<li><h3 class="name"></h3><p class="city"></p></li>'
         };
         
        
        From 60ee8e100594ff9bbb30fb87be3d544774173dbe Mon Sep 17 00:00:00 2001
        From: Hans Lemuet 
        Date: Sat, 5 Nov 2016 01:01:55 +0100
        Subject: [PATCH 032/246] Fixed documentation on fuzzyOptions
        
        The fuzzyOptions variable was not passed to the plugin.
        ---
         docs/docs/plugins/fuzzysearch.html | 2 +-
         1 file changed, 1 insertion(+), 1 deletion(-)
        
        diff --git a/docs/docs/plugins/fuzzysearch.html b/docs/docs/plugins/fuzzysearch.html
        index 37085f10..a6a2d18a 100644
        --- a/docs/docs/plugins/fuzzysearch.html
        +++ b/docs/docs/plugins/fuzzysearch.html
        @@ -55,7 +55,7 @@ 

        Implementation

        var options = { valueNames: [ 'name', 'category' ], plugins: [ - ListFuzzySearch() + ListFuzzySearch(fuzzyOptions) ] }; From 5ac1af5ad795e69588a2e206c91e91ad6594b260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 12 Nov 2016 12:48:47 +0100 Subject: [PATCH 033/246] Update start page examples --- .../_includes/examples/annotated-example.html | 251 ++++++++++++------ docs/_includes/examples/basic/add-html.html | 15 -- docs/_includes/examples/basic/add-js.html | 23 -- .../examples/basic/existing-html.html | 27 -- .../_includes/examples/basic/existing-js.html | 5 - docs/_includes/examples/basic/new-html.html | 10 - docs/_includes/examples/basic/new-js.html | 26 -- docs/_includes/examples/basic/table.html | 0 docs/_sass/vendor/bootstrap/tooltip.scss | 103 ------- docs/_sass/vendor/highlight/xcode.scss | 2 +- docs/assets/css/style.scss | 97 +++---- docs/assets/javascripts/main.js | 36 --- 12 files changed, 199 insertions(+), 396 deletions(-) delete mode 100644 docs/_includes/examples/basic/add-html.html delete mode 100644 docs/_includes/examples/basic/add-js.html delete mode 100644 docs/_includes/examples/basic/existing-html.html delete mode 100644 docs/_includes/examples/basic/existing-js.html delete mode 100644 docs/_includes/examples/basic/new-html.html delete mode 100644 docs/_includes/examples/basic/new-js.html delete mode 100644 docs/_includes/examples/basic/table.html delete mode 100644 docs/_sass/vendor/bootstrap/tooltip.scss diff --git a/docs/_includes/examples/annotated-example.html b/docs/_includes/examples/annotated-example.html index 166cd41d..ff1c687e 100644 --- a/docs/_includes/examples/annotated-example.html +++ b/docs/_includes/examples/annotated-example.html @@ -1,94 +1,171 @@ -

        Basic example of List.js in action

        -
        - -
        - -
        -
        -
        {% include examples/basic/existing-html.html %}
        -
        -
        -
        {% include examples/basic/existing-js.html %}
        -
        -
        - -
        -
        -
        {% include examples/basic/add-html.html %}
        -
        -
        -
        {% include examples/basic/add-js.html %}
        -
        -
        - -
        -
        -
        {% include examples/basic/new-html.html %}
        -
        -
        -
        {% include examples/basic/new-js.html %}
        -
        -
        - +

        Basic examples

        +

        + Here is an example of a list with List.js applied. List.js can be used in + three different ways. It can be on existing HTML, it can create it's own + HTML or a combination of both methods. +

        +
        + + + +
        +
        +

        Jonny Strömberg

        +

        1990

        +
        +
        +

        Jonas Arnklint

        +

        1985

        +
        +
        +

        Martina Elm

        +

        1986

        +
        +
        +

        Gustaf Lindqvist

        +

        1983

        +
        -
        - - - -
        -
        -

        Jonny Strömberg

        -

        1990

        -
        -
        -

        Jonas Arnklint

        -

        1985

        -
        -
        -

        Martina Elm

        -

        1986

        -
        -
        -

        Gustaf Lindqvist

        -

        1983

        -
        -
        +

        Apply List.js on existing HTML

        +
        +
        +
        <div id="users">
        +
        +<!-- class="search" automagically makes an input a search field. -->
        +  <input class="search" placeholder="Search" />
        +<!-- class="sort" automagically makes an element a sort buttons. The date-sort value decides what to sort by. -->
        +  <button class="sort" data-sort="name">
        +    Sort
        +  </button>
        +
        +<!-- Child elements of container with class="list" becomes list items -->
        +  <ul class="list">
        +    <li>
        +<!-- The innerHTML of children with class="name" becomes this items "name" value -->
        +      <h3 class="name">Jonny Stromberg</h3>
        +      <p class="born">1986</p>
        +    </li>
        +    <li>
        +      <h3 class="name">Jonas Arnklint</h3>
        +      <p class="born">1985</p>
        +    </li>
        +    <li>
        +      <h3 class="name">Martina Elm</h3>
        +      <p class="born">1986</p>
        +    </li>
        +    <li>
        +      <h3 class="name">Gustaf Lindqvist</h3>
        +      <p class="born">1983</p>
        +    </li>
        +  </ul>
        +
        +</div>
        +
        +
        +
        var options = {
        +  valueNames: [ 'name', 'born' ]
        +};
        +
        +var userList = new List('users', options);
        - +

        Apply List.js on existing HTML and then add items

        +
        +
        +
        <div id="users">
        +
        +  <input class="search" placeholder="Search" />
        +  <button class="sort" data-sort="name">
        +    Sort
        +  </button>
        +
        +  <ul class="list">
        +<!-- This, the first element in the list, will be used as template for new items. -->
        +    <li>
        +      <h3 class="name">Jonny Stromberg</h3>
        +      <p class="born">1986</p>
        +    </li>
        +  </ul>
        +
        +</div>
        +
        +
        +
        +
        var options = {
        +  valueNames: [ 'name', 'born' ]
        +};
        +
        +// These items will be added to the list on initialization.
        +var values = [
        +  {
        +    name: 'Jonas Arnklint',
        +    born: 1985
        +  },
        +  {
        +    name: 'Martina Elm',
        +    born: 1986
        +  }
        +];
        +
        +var userList = new List('example-list', options, values);
        +
        +// It's possible to add items after list been initiated
        +userList.add({
        +  name: 'Gustaf Lindqvist',
        +  born: 1983
        +});
        +
        +
        + + + +

        Make List.js create a list from scratch

        +
        +
        +
        <div id="users">
        +
        +  <input class="search" placeholder="Search" />
        +  <button class="sort" data-sort="name">
        +    Sort
        +  </button>
        +
        +  <ul class="list"></ul>
        +
        +</div>
        +
        +
        +
        var options = {
        +  valueNames: [ 'name', 'born' ],
        +  // Since there are no elements in the list, this will be used as template.
        +  item: '<li><h3 class="name"></h3><p class="born"></p></li>'
        +};
        +
        +var values = [
        +  {
        +    name: 'Jonny Strömberg',
        +    born: 1986
        +  },
        +  {
        +    name: 'Jonas Arnklint',
        +    born: 1985
        +  },
        +  {
        +    name: 'Martina Elm',
        +    born: 1986
        +  }
        +];
        +
        +var userList = new List('example-list', options, values);
        +
        +userList.add({
        +  name: 'Gustaf Lindqvist',
        +  born: 1983
        +});
        +
        +
        +
        +
        diff --git a/docs/_includes/examples/basic/add-html.html b/docs/_includes/examples/basic/add-html.html deleted file mode 100644 index 677c62f7..00000000 --- a/docs/_includes/examples/basic/add-html.html +++ /dev/null @@ -1,15 +0,0 @@ -<div id="users"> - - <input class="search" placeholder="Search" /> - <button class="sort" data-sort="name"> - Sort - </button> - - <ul class="list"> - <li> - <h3 class="name">Jonny Stromberg</h3> - <p class="born">1986</p> - </li> - </ul> - -</div> diff --git a/docs/_includes/examples/basic/add-js.html b/docs/_includes/examples/basic/add-js.html deleted file mode 100644 index d0fb2cd2..00000000 --- a/docs/_includes/examples/basic/add-js.html +++ /dev/null @@ -1,23 +0,0 @@ -var options = { - valueNames: [ 'name', 'born' ] -}; - -var values = [ - { - name: 'Jonas Arnklint', - born: 1985 - }, - { - name: 'Martina Elm', - born: 1986 - } -]; - -var userList = new List('example-list', options, values); - -userList.add({ - name: 'Gustaf Lindqvist', - born: 1983 -}); - - diff --git a/docs/_includes/examples/basic/existing-html.html b/docs/_includes/examples/basic/existing-html.html deleted file mode 100644 index a9df60f1..00000000 --- a/docs/_includes/examples/basic/existing-html.html +++ /dev/null @@ -1,27 +0,0 @@ -<div id="users"> - - <input class="search" placeholder="Search" /> - <button class="sort" data-sort="name"> - Sort - </button> - - <ul class="list"> - <li> - <h3 class="name">Jonny Stromberg</h3> - <p class="born">1986</p> - </li> - <li> - <h3 class="name">Jonas Arnklint</h3> - <p class="born">1985</p> - </li> - <li> - <h3 class="name">Martina Elm</h3> - <p class="born">1986</p> - </li> - <li> - <h3 class="name">Gustaf Lindqvist</h3> - <p class="born">1983</p> - </li> - </ul> - -</div> \ No newline at end of file diff --git a/docs/_includes/examples/basic/existing-js.html b/docs/_includes/examples/basic/existing-js.html deleted file mode 100644 index d3956102..00000000 --- a/docs/_includes/examples/basic/existing-js.html +++ /dev/null @@ -1,5 +0,0 @@ -var options = { - valueNames: [ 'name', 'born' ] -}; - -var userList = new List('users', options); \ No newline at end of file diff --git a/docs/_includes/examples/basic/new-html.html b/docs/_includes/examples/basic/new-html.html deleted file mode 100644 index 0cd0247f..00000000 --- a/docs/_includes/examples/basic/new-html.html +++ /dev/null @@ -1,10 +0,0 @@ -<div id="users"> - - <input class="search" placeholder="Search" /> - <button class="sort" data-sort="name"> - Sort - </button> - - <ul class="list"></ul> - -</div> diff --git a/docs/_includes/examples/basic/new-js.html b/docs/_includes/examples/basic/new-js.html deleted file mode 100644 index 4c60d54b..00000000 --- a/docs/_includes/examples/basic/new-js.html +++ /dev/null @@ -1,26 +0,0 @@ -var options = { - valueNames: [ 'name', 'born' ], - item: '<li><h3 class="name"></h3><p class="born"></p></li>' -}; - -var values = [ - { - name: 'Jonny Strömberg', - born: 1986 - }, - { - name: 'Jonas Arnklint', - born: 1985 - }, - { - name: 'Martina Elm', - born: 1986 - } -]; - -var userList = new List('example-list', options, values); - -userList.add({ - name: 'Gustaf Lindqvist', - born: 1983 -}); diff --git a/docs/_includes/examples/basic/table.html b/docs/_includes/examples/basic/table.html deleted file mode 100644 index e69de29b..00000000 diff --git a/docs/_sass/vendor/bootstrap/tooltip.scss b/docs/_sass/vendor/bootstrap/tooltip.scss deleted file mode 100644 index bc2172d1..00000000 --- a/docs/_sass/vendor/bootstrap/tooltip.scss +++ /dev/null @@ -1,103 +0,0 @@ -// -// Tooltips -// -------------------------------------------------- - -// Tooltips -// ------------------------- -$tooltip-max-width: 200px; -$tooltip-color: #fff; -$tooltip-bg: #000; - -$tooltip-arrow-width: 5px; -$tooltip-arrow-color: $tooltip-bg; - -// Base class -.tooltip { - position: absolute; - z-index: 1030; - display: block; - visibility: visible; - font-size: 12px; - line-height: 1.4; - opacity: 0; - - &.in { opacity: .9; } - &.top { margin-top: -3px; padding: $tooltip-arrow-width 0; } - &.right { margin-left: 3px; padding: 0 $tooltip-arrow-width; } - &.bottom { margin-top: 3px; padding: $tooltip-arrow-width 0; } - &.left { margin-left: -3px; padding: 0 $tooltip-arrow-width; } -} - -// Wrapper for the tooltip content -.tooltip-inner { - max-width: $tooltip-max-width; - padding: 3px 8px; - color: $tooltip-color; - text-align: center; - text-decoration: none; - background-color: $tooltip-bg; - border-radius: 4px; -} - -// Arrows -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip { - &.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -$tooltip-arrow-width; - border-width: $tooltip-arrow-width $tooltip-arrow-width 0; - border-top-color: $tooltip-arrow-color; - } - &.top-left .tooltip-arrow { - bottom: 0; - left: $tooltip-arrow-width; - border-width: $tooltip-arrow-width $tooltip-arrow-width 0; - border-top-color: $tooltip-arrow-color; - } - &.top-right .tooltip-arrow { - bottom: 0; - right: $tooltip-arrow-width; - border-width: $tooltip-arrow-width $tooltip-arrow-width 0; - border-top-color: $tooltip-arrow-color; - } - &.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -$tooltip-arrow-width; - border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0; - border-right-color: $tooltip-arrow-color; - } - &.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -$tooltip-arrow-width; - border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width; - border-left-color: $tooltip-arrow-color; - } - &.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -$tooltip-arrow-width; - border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; - border-bottom-color: $tooltip-arrow-color; - } - &.bottom-left .tooltip-arrow { - top: 0; - left: $tooltip-arrow-width; - border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; - border-bottom-color: $tooltip-arrow-color; - } - &.bottom-right .tooltip-arrow { - top: 0; - right: $tooltip-arrow-width; - border-width: 0 $tooltip-arrow-width $tooltip-arrow-width; - border-bottom-color: $tooltip-arrow-color; - } -} diff --git a/docs/_sass/vendor/highlight/xcode.scss b/docs/_sass/vendor/highlight/xcode.scss index 881ce2f9..0f4e851d 100644 --- a/docs/_sass/vendor/highlight/xcode.scss +++ b/docs/_sass/vendor/highlight/xcode.scss @@ -13,7 +13,7 @@ pre .comment, pre .template_comment, pre .javadoc, pre .comment * { - color: rgb(0,106,0); + color: rgba(0, 0, 0, 0.27); } pre .keyword, diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss index dc87cffd..7c9573c3 100644 --- a/docs/assets/css/style.scss +++ b/docs/assets/css/style.scss @@ -4,7 +4,6 @@ @import "normalize"; @import "mixins"; -@import "vendor/bootstrap/tooltip"; @import "vendor/highlight/xcode"; @import "carbonads"; @@ -285,9 +284,10 @@ td { .intro { @extend %clearfix; - margin:50px auto; + margin:0 auto 50px; max-width: 900px; - padding:30px; + padding:80px; + border-bottom:solid 1px $lightGrey; box-sizing: border-box; .intro-logo { text-align: center; @@ -387,7 +387,6 @@ td { } .startpage-more-examples { clear:both; - border-top:solid 1px #eee; ul { padding:0 !important; margin:0; @@ -407,65 +406,37 @@ td { } } } -.docs-content .startpage-example pre { - margin:0; - padding:30px; -} + .annotated-examples { - @extend %clearfix; - background-color: $black; - margin:-30px -30px 0; - & > h2 { - max-width: none !important; - text-align: center; + h3 { + margin-top:50px; } } -.annotated-code { - float:left; - width:65%; - .startpage-example-html { - position: relative; - border-bottom:solid 1px #fff; - } - .nav-pills { - @extend %clearfix; - border-bottom: solid 1px #fff; +.columns { + overflow: hidden; + padding:0; + margin:0 -30px 5px; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + overflow: hidden; + + .column { + padding:20px 30px; + flex: 1; background-color: $lightGrey; - padding:0; - margin:0; - list-style-type: none; - & > li { - width:33%; - float:left; - text-align: center; + &:last-child { + background-color: darken($lightGrey, 2%); + } + pre { + background-color: transparent; margin:0; - border-right: solid 1px #fff; - &:last-child { - border-right:none; - } - &.active { - background-color: rgba(0,0,0,.05); - & > a { - color:$black; - } - } - & > a { - display: block; - transition: all .2s ease-in-out; - padding:10px 0; - text-decoration: none; - &:hover { - background-color: rgba(0,0,0,.04); - } - } + padding:0; } } } .annotated-list { - float:left; - width:35%; - padding: 15px 30px; box-sizing: border-box; @extend %clearfix; .list { @@ -486,21 +457,21 @@ td { font-size: 1.6rem; margin:0 0 3px; font-weight: bold; - color:#fff; + //color:#fff; } p { margin:0; - color:#eee; + //color:#eee; } input { border-radius: 25px; padding:7px 14px; background-color: transparent; - border:solid 1px rgba(255,255,255,.2); - width:100%; + border:solid 1px rgba(0,0,0,.2); + width:200px; box-sizing: border-box; - color:#fff; + color:$black; margin-bottom:5px; } input:focus { @@ -514,14 +485,14 @@ td { border-radius: 25px; border:none; display:inline-block; - color:#fff; + color:$black; text-decoration: none; - background-color: rgba(255,255,255,.05); + background-color: rgba(0,0,0,.05); margin:2px 0; } .sort:hover { text-decoration: none; - background-color: rgba(255,255,255,.1); + background-color: rgba(0,0,0,.1); } .sort:focus { outline:none; @@ -542,7 +513,7 @@ td { height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; - border-top: 4px solid #fff; + border-top: 4px solid $black; content:""; position: relative; top:11px; @@ -553,7 +524,7 @@ td { height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; - border-bottom: 4px solid #fff; + border-bottom: 4px solid $black; content:""; position: relative; top:-9px; diff --git a/docs/assets/javascripts/main.js b/docs/assets/javascripts/main.js index edfc6540..3a13bd17 100644 --- a/docs/assets/javascripts/main.js +++ b/docs/assets/javascripts/main.js @@ -2,51 +2,15 @@ --- {% include javascripts/vendor/jquery-1.8.3.min.js %} -{% include javascripts/vendor/bootstrap/transition.js %} -{% include javascripts/vendor/bootstrap/tab.js %} -{% include javascripts/vendor/bootstrap/tooltip.js %} {% include javascripts/vendor/highlight.pack.js %} hljs.initHighlightingOnLoad(); -function annotate(annotations) { - for (var id in annotations) { - annotateBlock(id, annotations[id]); - } -} -function annotateBlock(id, annotations) { - $('#'+id).html(function(i, html) { - for (var i = 0; i < annotations.length; i++) { - html = html.replace(new RegExp(annotations[i][0], 'g'), function(match, p1) { - return match.replace(new RegExp(p1), ''+p1+'') - }); - } - return html; - }); - $('.annotation').tooltip(); -} $(window).load(function() { $('body').addClass('loaded'); }); -$(window).load(function() { - setTimeout(function() { - if (window.annotations !== 'undefined') { - annotate(window.annotations); - $('code').tooltip(); - } - }, 1000); -}) - - -$('#basic-tabs a').click(function (e) { - e.preventDefault() - $(this).tab('show') -}); - - var options = { valueNames: [ 'name', 'born' ] }; - var userList = new List('users', options); From 8d4c2acb6197eb925d5948ed597b81024112ea1c Mon Sep 17 00:00:00 2001 From: David Dias Date: Tue, 15 Nov 2016 13:44:14 +0400 Subject: [PATCH 034/246] Add installation via NPM Adding information about how to install list.js with NPM. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 86a9e223..5cde4179 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ Really simple and easy to use! ``` bower install list.js ``` +##### Via NPM +``` +npm install list.js +``` ##### Via CDNJS ```html From 1c3ba8f12bafc5c9091fbdf2e61089ec49c69781 Mon Sep 17 00:00:00 2001 From: Felix Sanz Date: Fri, 16 Dec 2016 16:07:05 +0100 Subject: [PATCH 035/246] Fixed cdnjs URLs --- docs/docs/plugins/fuzzysearch.html | 2 +- docs/docs/plugins/pagination.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/plugins/fuzzysearch.html b/docs/docs/plugins/fuzzysearch.html index 37085f10..6174a62a 100644 --- a/docs/docs/plugins/fuzzysearch.html +++ b/docs/docs/plugins/fuzzysearch.html @@ -18,7 +18,7 @@

        Via Component

        <% /*

        Via CDNJS

        -
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/List.fuzzysearch.js/1.0.0/list.fuzzysearch.min.js" />
        +
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/list.fuzzysearch.js/0.1.0/list.fuzzysearch.min.js" />
        */ %>

        The difference between Fuzzy Search and List.js default search

        diff --git a/docs/docs/plugins/pagination.html b/docs/docs/plugins/pagination.html index a91bf607..9a985462 100644 --- a/docs/docs/plugins/pagination.html +++ b/docs/docs/plugins/pagination.html @@ -18,7 +18,7 @@

        Via Component

        <% /*

        Via CDNJS

        -
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/List.pagination.js/1.0.0/list.pagination.min.js" />
        +
        <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" />
        */ %>

        Basic example

        From 1ac8dc91ac9118eb48423697b0e8a872010a082d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:00:38 +0100 Subject: [PATCH 036/246] New natural sort lib to support custom alphabets --- index.js | 2 +- package.json | 3 +- src/sort.js | 34 +++++++++++++----- test/test.sort.js | 88 ++++++++++++++++++++++++++++++++--------------- 4 files changed, 88 insertions(+), 39 deletions(-) diff --git a/index.js b/index.js index 71c06a9b..a9e9c99e 100644 --- a/index.js +++ b/index.js @@ -2,12 +2,12 @@ "use strict"; var document = window.document, + naturalSort = require('string-natural-compare'), getByClass = require('./src/utils/get-by-class'), extend = require('./src/utils/extend'), indexOf = require('./src/utils/index-of'), events = require('./src/utils/events'), toString = require('./src/utils/to-string'), - naturalSort = require('./src/utils/natural-sort'), classes = require('./src/utils/classes'), getAttribute = require('./src/utils/get-attribute'), toArray = require('./src/utils/to-array'); diff --git a/package.json b/package.json index 0fd1f467..d171fdf2 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,8 @@ "grunt-file-append": "0.0.6", "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", - "jquery": "^1.12.0" + "jquery": "^1.12.0", + "string-natural-compare": "^2.0.2" }, "main": "index", "engines": { diff --git a/src/sort.js b/src/sort.js index 18030f6a..8a59b0a3 100644 --- a/src/sort.js +++ b/src/sort.js @@ -1,8 +1,4 @@ module.exports = function(list) { - list.sortFunction = list.sortFunction || function(itemA, itemB, options) { - options.desc = options.order == "desc" ? true : false; // Natural sort uses this format - return list.utils.naturalSort(itemA.values()[options.valueName], itemB.values()[options.valueName], options); - }; var buttons = { els: undefined, @@ -49,6 +45,7 @@ module.exports = function(list) { } } }; + var sort = function() { list.trigger('sortStart'); var options = {}; @@ -65,14 +62,33 @@ module.exports = function(list) { options.order = options.order || "asc"; options.insensitive = (typeof options.insensitive == "undefined") ? true : options.insensitive; } + buttons.clear(); buttons.setOrder(options); - options.sortFunction = options.sortFunction || list.sortFunction; - list.items.sort(function(a, b) { - var mult = (options.order === 'desc') ? -1 : 1; - return (options.sortFunction(a, b, options) * mult); - }); + + // caseInsensitive + // alphabet + var customSortFunction = (options.sortFunction || list.sortFunction || null), + multi = ((options.order === 'desc') ? -1 : 1), + sortFunction; + + if (customSortFunction) { + sortFunction = function(itemA, itemB) { + return customSortFunction(itemA, itemB, options) * multi; + }; + } else { + sortFunction = function(itemA, itemB) { + var sort = list.utils.naturalSort; + sort.alphabet = list.alphabet || options.alphabet || undefined; + if (!sort.alphabet && options.insensitive) { + sort = list.utils.naturalSort.caseInsensitive; + } + return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi; + }; + } + + list.items.sort(sortFunction); list.update(); list.trigger('sortComplete'); }; diff --git a/test/test.sort.js b/test/test.sort.js index 49382e04..335dc9d8 100644 --- a/test/test.sort.js +++ b/test/test.sort.js @@ -54,36 +54,70 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal("b"); expect(list.items[5].values().val).to.be.equal("a"); }); - it('should fail to sort åäö desc (becomes äåö)', function() { + it('should sort åäö desc', function() { + list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö' i1.values({ val: "a" }); i2.values({ val: "å" }); i3.values({ val: "ä" }); i4.values({ val: "ö" }); i5.values({ val: "o" }); i6.values({ val: "s" }); - list.sort('val'); - expect(list.items[0].values().val).to.be.equal("a"); - expect(list.items[1].values().val).to.be.equal("å"); - expect(list.items[2].values().val).to.be.equal("ä"); - expect(list.items[3].values().val).to.be.equal("o"); - expect(list.items[4].values().val).to.be.equal("ö"); - expect(list.items[5].values().val).to.be.equal("s"); + list.sort('val', { order: "desc" }); + expect(list.items[0].values().val).to.be.equal("ö"); + expect(list.items[1].values().val).to.be.equal("ä"); + expect(list.items[2].values().val).to.be.equal("å"); + expect(list.items[3].values().val).to.be.equal("s"); + expect(list.items[4].values().val).to.be.equal("o"); + expect(list.items[5].values().val).to.be.equal("a"); }); - it('should fail to sort åäö asc (becomes öåä)', function() { + it('should sort åäö asc', function() { + list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö' i1.values({ val: "a" }); i2.values({ val: "å" }); i3.values({ val: "ä" }); i4.values({ val: "ö" }); i5.values({ val: "o" }); i6.values({ val: "s" }); + list.sort('val', { order: "asc" }); + expect(list.items[0].values().val).to.be.equal("a"); + expect(list.items[1].values().val).to.be.equal("o"); + expect(list.items[2].values().val).to.be.equal("s"); + expect(list.items[3].values().val).to.be.equal("å"); + expect(list.items[4].values().val).to.be.equal("ä"); + expect(list.items[5].values().val).to.be.equal("ö"); + }); + it('should sort åäö desc case insensitive', function() { + list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö' + i1.values({ val: "a" }); + i2.values({ val: "Å" }); + i3.values({ val: "ä" }); + i4.values({ val: "Ö" }); + i5.values({ val: "o" }); + i6.values({ val: "S" }); list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).to.be.equal("s"); - expect(list.items[1].values().val).to.be.equal("ö"); - expect(list.items[2].values().val).to.be.equal("o"); - expect(list.items[3].values().val).to.be.equal("ä"); - expect(list.items[4].values().val).to.be.equal("å"); + expect(list.items[0].values().val).to.be.equal("Ö"); + expect(list.items[1].values().val).to.be.equal("ä"); + expect(list.items[2].values().val).to.be.equal("Å"); + expect(list.items[3].values().val).to.be.equal("S"); + expect(list.items[4].values().val).to.be.equal("o"); expect(list.items[5].values().val).to.be.equal("a"); }); + it('should sort åäö asc case insensitive', function() { + list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö' + i1.values({ val: "A" }); + i2.values({ val: "å" }); + i3.values({ val: "Ä" }); + i4.values({ val: "ö" }); + i5.values({ val: "O" }); + i6.values({ val: "s" }); + list.sort('val', { order: "asc" }); + expect(list.items[0].values().val).to.be.equal("A"); + expect(list.items[1].values().val).to.be.equal("O"); + expect(list.items[2].values().val).to.be.equal("s"); + expect(list.items[3].values().val).to.be.equal("å"); + expect(list.items[4].values().val).to.be.equal("Ä"); + expect(list.items[5].values().val).to.be.equal("ö"); + }); it('should handle case-insensitive by default', function() { i1.values({ val: "e" }); i2.values({ val: "b" }); @@ -114,7 +148,7 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal("b"); expect(list.items[5].values().val).to.be.equal("e"); }); - it('should sort dates', function() { + xit('should sort dates', function() { i1.values({ val: "10/12/2008" }); i2.values({ val: "10/11/2008" }); i3.values({ val: "10/11/2007" }); @@ -129,7 +163,7 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal("10/12/2008"); expect(list.items[5].values().val).to.be.equal("10/12/2009"); }); - it('should sort file names', function() { + xit('should sort file names', function() { i1.values({ val: "car.mov" }); i2.values({ val: "01alpha.sgi" }); i3.values({ val: "001alpha.sgi" }); @@ -144,7 +178,7 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal("car.mov"); expect(list.items[5].values().val).to.be.equal("my.string_41299.tif"); }); - it('should sort floates', function() { + xit('should sort floates', function() { i1.values({ val: "10.0401" }); i2.values({ val: "10.022" }); i3.values({ val: "10.021999" }); @@ -203,8 +237,8 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal('y'); expect(list.items[5].values().val).to.be.equal('z'); }) - /* - it('should show how random values are sorted', function() { + + xit('should show how random values are sorted', function() { list.add({ id: '7', val: "" }); list.add({ id: '8', val: "" }); list.add({ id: '9', val: "" }); @@ -250,7 +284,7 @@ describe('Sort', function() { expect(list.items[11].values().val).to.be.equal("z"); }); - it('should handle space and zero the same for desc and asc (random)', function() { + xit('should handle space and zero the same for desc and asc (random)', function() { list.clear(); list.add({ val: "" }); list.add({ val: "0" }); @@ -269,7 +303,7 @@ describe('Sort', function() { expect(list.items[1].values().val).to.be.equal("0"); expect(list.items[2].values().val).to.be.equal(0); }); - */ + }); describe('Custom sort function', function() { @@ -282,8 +316,7 @@ describe('Sort', function() { i6.values({ val: "" }); list.sort('val', { sortFunction: function(itemA, itemB, options) { - options.desc = false; - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val(), options); + return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); } }); expect(list.items[0].values().val).to.be.equal(""); @@ -295,8 +328,7 @@ describe('Sort', function() { }); it('should use default custom sort function', function() { list.sortFunction = function(itemA, itemB, options) { - options.desc = false; - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val(), options); + return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); }; i1.values({ val: "" }); i2.values({ val: "" }); @@ -312,10 +344,9 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal(""); expect(list.items[5].values().val).to.be.equal(""); }); - it('should use default custom sort function with options', function() { + it('should use default custom sort function with order desc', function() { list.sortFunction = function(itemA, itemB, options) { - options.desc = true; - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val(), options); + return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); }; i1.values({ val: "" }); i2.values({ val: "" }); @@ -332,4 +363,5 @@ describe('Sort', function() { expect(list.items[5].values().val).to.be.equal(""); }); }); + }); From eb87b9c677c725876e6458f222f4df8efedcc07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:14:45 +0100 Subject: [PATCH 037/246] Improve api docs for sort --- docs/docs/list-api.html | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/docs/docs/list-api.html b/docs/docs/list-api.html index c2188727..5350b2c2 100644 --- a/docs/docs/list-api.html +++ b/docs/docs/list-api.html @@ -118,16 +118,32 @@

        Methods

        listObj.get("id", 2); // return { id: 2, name "Gustaf" }
      • -

        sort(valueName, options)
        - Sorts the list based on values the in the column named valueName. The options - parameter can contain two properties options.sortFunction and options.order. - options.sortFunction is used if you want to make your own sort function. - The default sort function is found here https://github.com/javve/natural-sort - options.order = "asc" means that you want to sort the list in ascending order. Set - false for descending.

        +

        sort(valueName, {
        +   order: 'desc',
        +   alphabet: undefined,
        +   insensitive: true,
        +   sortFunction: undefined
        + })

        + Sorts the list based on values the in the column named valueName. + The alphabet option is used when you have non-english alphabet + where which JavaScript don't know how to sort some characters by default.

        +

        The default sort function is found here + https://github.com/nwoltman/string-natural-compare, + if you want to use your own, read the code and + check out the tests.

        listObj.sort('name', { order: "asc" }); // Sorts the list in abc-order based on names
        -listObj.sort('name', { order: "desc" }); // Sorts the list in zxy-order based on names
        +listObj.sort('name', { order: "desc" }); // Sorts the list in zxy-order based on names + +// Sort swedish characters correcly, case-insensitive. +listObj.sort('name', { alphabet: "ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö" }); + +// Sort swedish characters correcly, case-sensitive. +listObj.sort('name', { alphabet: "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö" }); + +// Alphabet could also be on the actual listObj via +listObj.alphabet = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö"; +
      • From 81e1386bed88d1f932e729feca2b3649e489bdfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:21:34 +0100 Subject: [PATCH 038/246] Fix broken sort tests --- test/test.sort.js | 60 +++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/test/test.sort.js b/test/test.sort.js index 335dc9d8..ddec3c0a 100644 --- a/test/test.sort.js +++ b/test/test.sort.js @@ -148,22 +148,22 @@ describe('Sort', function() { expect(list.items[4].values().val).to.be.equal("b"); expect(list.items[5].values().val).to.be.equal("e"); }); - xit('should sort dates', function() { - i1.values({ val: "10/12/2008" }); - i2.values({ val: "10/11/2008" }); - i3.values({ val: "10/11/2007" }); - i4.values({ val: "10/12/2009" }); - i5.values({ val: "4/01/2007" }); - i6.values({ val: "10/12/2006" }); + it('should sort dates', function() { + i1.values({ val: "2008-12-10" }); + i2.values({ val: "2008-11-10" }); + i3.values({ val: "2007-11-10" }); + i4.values({ val: "2009-12-10" }); + i5.values({ val: "2007-01-4" }); + i6.values({ val: "2006-12-10" }); list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).to.be.equal("10/12/2006"); - expect(list.items[1].values().val).to.be.equal("4/01/2007"); - expect(list.items[2].values().val).to.be.equal("10/11/2007"); - expect(list.items[3].values().val).to.be.equal("10/11/2008"); - expect(list.items[4].values().val).to.be.equal("10/12/2008"); - expect(list.items[5].values().val).to.be.equal("10/12/2009"); + expect(list.items[0].values().val).to.be.equal("2006-12-10"); + expect(list.items[1].values().val).to.be.equal("2007-01-4"); + expect(list.items[2].values().val).to.be.equal("2007-11-10"); + expect(list.items[3].values().val).to.be.equal("2008-11-10"); + expect(list.items[4].values().val).to.be.equal("2008-12-10"); + expect(list.items[5].values().val).to.be.equal("2009-12-10"); }); - xit('should sort file names', function() { + it('should sort file names (a bit wrong)', function() { i1.values({ val: "car.mov" }); i2.values({ val: "01alpha.sgi" }); i3.values({ val: "001alpha.sgi" }); @@ -171,14 +171,14 @@ describe('Sort', function() { i5.values({ val: "0003.zip" }); i6.values({ val: "0002.asp" }); list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).to.be.equal("0002.asp"); - expect(list.items[1].values().val).to.be.equal("0003.zip"); - expect(list.items[2].values().val).to.be.equal("001alpha.sgi"); - expect(list.items[3].values().val).to.be.equal("01alpha.sgi"); + expect(list.items[0].values().val).to.be.equal("01alpha.sgi"); + expect(list.items[1].values().val).to.be.equal("001alpha.sgi"); + expect(list.items[2].values().val).to.be.equal("0002.asp"); + expect(list.items[3].values().val).to.be.equal("0003.zip"); expect(list.items[4].values().val).to.be.equal("car.mov"); expect(list.items[5].values().val).to.be.equal("my.string_41299.tif"); }); - xit('should sort floates', function() { + it('should show order of sorted floates (a bit wrong)', function() { i1.values({ val: "10.0401" }); i2.values({ val: "10.022" }); i3.values({ val: "10.021999" }); @@ -188,9 +188,9 @@ describe('Sort', function() { list.sort('val', { order: "asc" }); expect(list.items[0].values().val).to.be.equal("0003.123"); expect(list.items[1].values().val).to.be.equal("09.2123"); - expect(list.items[2].values().val).to.be.equal("10.021999"); - expect(list.items[3].values().val).to.be.equal("10.022"); - expect(list.items[4].values().val).to.be.equal("10.0401"); + expect(list.items[2].values().val).to.be.equal("10.022"); + expect(list.items[3].values().val).to.be.equal("10.0401"); + expect(list.items[4].values().val).to.be.equal("10.021999"); expect(list.items[5].values().val).to.be.equal("11.231"); }); it('should sort IP addresses', function() { @@ -238,7 +238,7 @@ describe('Sort', function() { expect(list.items[5].values().val).to.be.equal('z'); }) - xit('should show how random values are sorted', function() { + it('should show how random values are sorted', function() { list.add({ id: '7', val: "" }); list.add({ id: '8', val: "" }); list.add({ id: '9', val: "" }); @@ -271,10 +271,10 @@ describe('Sort', function() { list.sort('val', { order: "asc" }); expect(list.items[0].values().val).to.be.equal(""); - expect(list.items[1].values().val).to.be.equal("0"); + expect(list.items[1].values().val).to.be.equal("!"); expect(list.items[2].values().val).to.be.equal(0); - expect(list.items[3].values().val).to.be.equal(100); - expect(list.items[4].values().val).to.be.equal("!"); + expect(list.items[3].values().val).to.be.equal("0"); + expect(list.items[4].values().val).to.be.equal(100); expect(list.items[5].values().val).to.be.equal("?"); expect(list.items[6].values().val).to.be.equal("a"); expect(list.items[7].values().val).to.be.equal(false); @@ -284,7 +284,7 @@ describe('Sort', function() { expect(list.items[11].values().val).to.be.equal("z"); }); - xit('should handle space and zero the same for desc and asc (random)', function() { + it('should handle not longer (since 1.4.0) space and zero the same for desc and asc', function() { list.clear(); list.add({ val: "" }); list.add({ val: "0" }); @@ -295,9 +295,9 @@ describe('Sort', function() { expect(list.items[1].values().val).to.be.equal("0"); expect(list.items[2].values().val).to.be.equal(0); list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).to.be.equal(""); - expect(list.items[1].values().val).to.be.equal("0"); - expect(list.items[2].values().val).to.be.equal(0); + expect(list.items[0].values().val).to.be.equal("0"); + expect(list.items[1].values().val).to.be.equal(0); + expect(list.items[2].values().val).to.be.equal(""); list.sort('val', { order: "asc" }); expect(list.items[0].values().val).to.be.equal(""); expect(list.items[1].values().val).to.be.equal("0"); From 67e700bed42b3329e206f5af2acf5baacc78b0dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:30:03 +0100 Subject: [PATCH 039/246] Change how to handle livereload on site --- docs/Gemfile | 31 +++----------- docs/Gemfile.lock | 104 ++++++++++++++++++---------------------------- docs/Guardfile | 3 -- docs/_config.yml | 2 + 4 files changed, 47 insertions(+), 93 deletions(-) delete mode 100644 docs/Guardfile diff --git a/docs/Gemfile b/docs/Gemfile index 4e21ff57..f5d0483d 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,26 +1,5 @@ -source "https://rubygems.org" -ruby RUBY_VERSION - -# Hello! This is where you manage which Jekyll version is used to run. -# When you want to use a different version, change it below, save the -# file and run `bundle install`. Run Jekyll with `bundle exec`, like so: -# -# bundle exec jekyll serve -# -# This will help ensure the proper Jekyll version is running. -# Happy Jekylling! - -# This is the default theme for new Jekyll sites. You may change this to anything you like. -gem "minima" - -# If you want to use GitHub Pages, remove the "gem "jekyll"" above and -# uncomment the line below. To upgrade, run `bundle update github-pages`. -gem "github-pages", group: :jekyll_plugins - -# If you have any plugins, put them here! -# group :jekyll_plugins do -# gem "jekyll-github-metadata", "~> 1.0" -# end - -gem 'guard' -gem 'guard-livereload' +source 'https://rubygems.org' +group :jekyll_plugins do + gem 'github-pages', '104' + gem 'jekyll-livereload' +end diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 26fca68e..db17cdc0 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -8,45 +8,45 @@ GEM thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.4.0) - coderay (1.1.1) coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) + coffee-script-source (1.11.1) colorator (1.1.0) em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.9.1) + ethon (0.10.1) ffi (>= 1.3.0) - eventmachine (1.2.0.1) + eventmachine (1.2.1) execjs (2.7.0) - faraday (0.9.2) + faraday (0.10.0) multipart-post (>= 1.2, < 3) ffi (1.9.14) - formatador (0.2.5) forwardable-extended (2.6.0) gemoji (2.1.0) - github-pages (96) + github-pages (104) activesupport (= 4.2.7) github-pages-health-check (= 1.2.0) - jekyll (= 3.2.1) + jekyll (= 3.3.0) + jekyll-avatar (= 0.4.2) jekyll-coffeescript (= 1.0.1) - jekyll-feed (= 0.5.1) + jekyll-feed (= 0.8.0) jekyll-gist (= 1.4.0) - jekyll-github-metadata (= 2.0.2) + jekyll-github-metadata (= 2.2.0) jekyll-mentions (= 1.2.0) jekyll-paginate (= 1.1.0) jekyll-redirect-from (= 0.11.0) jekyll-sass-converter (= 1.3.0) - jekyll-seo-tag (= 2.0.0) - jekyll-sitemap (= 0.10.0) + jekyll-seo-tag (= 2.1.0) + jekyll-sitemap (= 0.12.0) + jekyll-swiss (= 0.4.0) jemoji (= 0.7.0) kramdown (= 1.11.1) liquid (= 3.0.6) listen (= 3.0.6) mercenary (~> 0.3) - minima (= 1.2.0) + minima (= 2.0.0) rouge (= 1.11.1) terminal-table (~> 1.4) github-pages-health-check (1.2.0) @@ -55,27 +55,13 @@ GEM octokit (~> 4.0) public_suffix (~> 1.4) typhoeus (~> 0.7) - guard (2.14.0) - formatador (>= 0.2.4) - listen (>= 2.7, < 4.0) - lumberjack (~> 1.0) - nenv (~> 0.1) - notiffany (~> 0.0) - pry (>= 0.9.12) - shellany (~> 0.0) - thor (>= 0.18.1) - guard-compat (1.2.1) - guard-livereload (2.5.2) - em-websocket (~> 0.5) - guard (~> 2.8) - guard-compat (~> 1.0) - multi_json (~> 1.8) html-pipeline (2.4.2) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) i18n (0.7.0) - jekyll (3.2.1) + jekyll (3.3.0) + addressable (~> 2.4) colorator (~> 1.0) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 1.1) @@ -85,14 +71,20 @@ GEM pathutil (~> 0.9) rouge (~> 1.7) safe_yaml (~> 1.0) + jekyll-avatar (0.4.2) + jekyll (~> 3.0) jekyll-coffeescript (1.0.1) coffee-script (~> 2.2) - jekyll-feed (0.5.1) + jekyll-feed (0.8.0) + jekyll (~> 3.3) jekyll-gist (1.4.0) octokit (~> 4.2) - jekyll-github-metadata (2.0.2) + jekyll-github-metadata (2.2.0) jekyll (~> 3.1) - octokit (~> 4.0) + octokit (~> 4.0, != 4.4.0) + jekyll-livereload (0.2.2) + em-websocket (~> 0.5) + jekyll (~> 3.0) jekyll-mentions (1.2.0) activesupport (~> 4.0) html-pipeline (~> 2.3) @@ -102,9 +94,11 @@ GEM jekyll (>= 2.0) jekyll-sass-converter (1.3.0) sass (~> 3.2) - jekyll-seo-tag (2.0.0) - jekyll (~> 3.1) - jekyll-sitemap (0.10.0) + jekyll-seo-tag (2.1.0) + jekyll (~> 3.3) + jekyll-sitemap (0.12.0) + jekyll (~> 3.3) + jekyll-swiss (0.4.0) jekyll-watch (1.5.0) listen (~> 3.0, < 3.1) jemoji (0.7.0) @@ -118,46 +112,30 @@ GEM listen (3.0.6) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9.7) - lumberjack (1.0.10) mercenary (0.3.6) - method_source (0.8.2) mini_portile2 (2.1.0) - minima (1.2.0) - minitest (5.9.0) - multi_json (1.12.1) + minima (2.0.0) + minitest (5.10.1) multipart-post (2.0.0) - nenv (0.3.0) net-dns (0.8.0) - nokogiri (1.6.8) + nokogiri (1.6.8.1) mini_portile2 (~> 2.1.0) - pkg-config (~> 1.1.7) - notiffany (0.1.1) - nenv (~> 0.1) - shellany (~> 0.0) - octokit (4.3.0) - sawyer (~> 0.7.0, >= 0.5.3) + octokit (4.6.2) + sawyer (~> 0.8.0, >= 0.5.3) pathutil (0.14.0) forwardable-extended (~> 2.6) - pkg-config (1.1.7) - pry (0.10.4) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) public_suffix (1.5.3) - rb-fsevent (0.9.7) + rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) rouge (1.11.1) safe_yaml (1.0.4) sass (3.4.22) - sawyer (0.7.0) - addressable (>= 2.3.5, < 2.5) - faraday (~> 0.8, < 0.10) - shellany (0.0.1) - slop (3.6.0) + sawyer (0.8.1) + addressable (>= 2.3.5, < 2.6) + faraday (~> 0.8, < 1.0) terminal-table (1.7.3) unicode-display_width (~> 1.1.1) - thor (0.19.1) thread_safe (0.3.5) typhoeus (0.8.0) ethon (>= 0.8.0) @@ -169,7 +147,5 @@ PLATFORMS ruby DEPENDENCIES - github-pages - guard - guard-livereload - minima + github-pages (= 104) + jekyll-livereload diff --git a/docs/Guardfile b/docs/Guardfile deleted file mode 100644 index 84d14b05..00000000 --- a/docs/Guardfile +++ /dev/null @@ -1,3 +0,0 @@ -guard 'livereload' do - watch(/^_site/) -end diff --git a/docs/_config.yml b/docs/_config.yml index ea1769a7..cc3a8479 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -10,6 +10,8 @@ github_username: javve permalink: pretty markdown: kramdown +livereload: true + gems: - jekyll-coffeescript - jekyll-redirect-from From 27a8526fe35dc2b6cbd2d236d84e641dbecaa59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:30:43 +0100 Subject: [PATCH 040/246] Update changelog for 1.4.0 --- History.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index d18f3a20..88e1fc7f 100644 --- a/History.md +++ b/History.md @@ -15,10 +15,14 @@ - Example of more advanced filtering - Fix test suite - Example with multiple lists -- Test simple natural sort: https://github.com/litejs/natural-compare-lite # Changelog +### 2017-01-15 v1.4.0 +- **[Bugfix/Feature]** Change natural-sort library to support custom alphabets +and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong. + [See commit →](https://github.com/javve/list.js/commit/81e1386bed88d1f932e729feca2b3649e489bdfe) + ### 2016-10-23 v1.3.0 - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) From ca37e035132d0db7090a5553a282cd3f7875826d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:33:06 +0100 Subject: [PATCH 041/246] Update version to 1.4.0 and update dist --- README.md | 10 +- dist/list.js | 231 ++++++++++++++++++---------- dist/list.min.js | 4 +- docs/_data/package.json | 5 +- docs/assets/javascripts/list.min.js | 4 +- package.json | 2 +- 6 files changed, 166 insertions(+), 90 deletions(-) diff --git a/README.md b/README.md index 5cde4179..cf425653 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ npm install list.js ``` ##### Via CDNJS ```html - + ``` ##### Via Direct Download -- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.3.0/dist/list.min.js) -- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.3.0/dist/list.js) +- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.0/dist/list.min.js) +- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.0/dist/list.js) ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) @@ -100,5 +100,5 @@ npm install list.js ## License (MIT) -Copyright (c) 2012-2016 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> -[http://jonnystromberg.com](http://jonnystromberg.com) +Copyright (c) 2012-2017 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> +[http://javve.com](http://javve.com) diff --git a/dist/list.js b/dist/list.js index 15078610..d25a070e 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,15 +1,15 @@ -// List.js v1.3.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) +// List.js v1.4.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 48 && code <= 57; +} + +function naturalCompare(a, b) { + var lengthA = (a += '').length; + var lengthB = (b += '').length; + var aIndex = 0; + var bIndex = 0; + + while (aIndex < lengthA && bIndex < lengthB) { + var charCodeA = a.charCodeAt(aIndex); + var charCodeB = b.charCodeAt(bIndex); + + if (isNumberCode(charCodeA)) { + if (!isNumberCode(charCodeB)) { + return charCodeA - charCodeB; + } + + var numStartA = aIndex; + var numStartB = bIndex; + + while (charCodeA === 48 && ++numStartA < lengthA) { + charCodeA = a.charCodeAt(numStartA); + } + while (charCodeB === 48 && ++numStartB < lengthB) { + charCodeB = b.charCodeAt(numStartB); + } + + var numEndA = numStartA; + var numEndB = numStartB; + + while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) { + ++numEndA; + } + while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) { + ++numEndB; + } + + var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length + if (difference) { + return difference; + } + + while (numStartA < numEndA) { + difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++); + if (difference) { + return difference; + } + } + + aIndex = numEndA; + bIndex = numEndB; + continue; + } + + if (charCodeA !== charCodeB) { + if ( + charCodeA < alphabetIndexMapLength && + charCodeB < alphabetIndexMapLength && + alphabetIndexMap[charCodeA] !== -1 && + alphabetIndexMap[charCodeB] !== -1 + ) { + return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB]; + } + + return charCodeA - charCodeB; + } + + ++aIndex; + ++bIndex; + } + + return lengthA - lengthB; +} + +naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) { + return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase()); +}; + +Object.defineProperties(naturalCompare, { + alphabet: { + get: function() { + return alphabet; + }, + set: function(value) { + alphabet = value; + alphabetIndexMap = []; + var i = 0; + if (alphabet) { + for (; i < alphabet.length; i++) { + alphabetIndexMap[alphabet.charCodeAt(i)] = i; + } + } + alphabetIndexMapLength = alphabetIndexMap.length; + for (i = 0; i < alphabetIndexMapLength; i++) { + if (alphabetIndexMap[i] === undefined) { + alphabetIndexMap[i] = -1; + } + } + }, + }, +}); + +module.exports = naturalCompare; + +},{}],3:[function(require,module,exports){ module.exports = function(list) { var addAsync = function(values, callback, items) { var valuesToAdd = values.splice(0, 50); @@ -287,7 +400,7 @@ module.exports = function(list) { return addAsync; }; -},{}],3:[function(require,module,exports){ +},{}],4:[function(require,module,exports){ module.exports = function(list) { // Add handlers @@ -318,7 +431,7 @@ module.exports = function(list) { }; }; -},{}],4:[function(require,module,exports){ +},{}],5:[function(require,module,exports){ module.exports = function(list) { return function(initValues, element, notCreate) { var item = this; @@ -380,7 +493,7 @@ module.exports = function(list) { }; }; -},{}],5:[function(require,module,exports){ +},{}],6:[function(require,module,exports){ module.exports = function(list) { var Item = require('./item')(list); @@ -429,7 +542,7 @@ module.exports = function(list) { }; }; -},{"./item":4}],6:[function(require,module,exports){ +},{"./item":5}],7:[function(require,module,exports){ module.exports = function(list) { var item, text, @@ -551,12 +664,8 @@ module.exports = function(list) { return searchMethod; }; -},{}],7:[function(require,module,exports){ +},{}],8:[function(require,module,exports){ module.exports = function(list) { - list.sortFunction = list.sortFunction || function(itemA, itemB, options) { - options.desc = options.order == "desc" ? true : false; // Natural sort uses this format - return list.utils.naturalSort(itemA.values()[options.valueName], itemB.values()[options.valueName], options); - }; var buttons = { els: undefined, @@ -603,6 +712,7 @@ module.exports = function(list) { } } }; + var sort = function() { list.trigger('sortStart'); var options = {}; @@ -619,14 +729,33 @@ module.exports = function(list) { options.order = options.order || "asc"; options.insensitive = (typeof options.insensitive == "undefined") ? true : options.insensitive; } + buttons.clear(); buttons.setOrder(options); - options.sortFunction = options.sortFunction || list.sortFunction; - list.items.sort(function(a, b) { - var mult = (options.order === 'desc') ? -1 : 1; - return (options.sortFunction(a, b, options) * mult); - }); + + // caseInsensitive + // alphabet + var customSortFunction = (options.sortFunction || list.sortFunction || null), + multi = ((options.order === 'desc') ? -1 : 1), + sortFunction; + + if (customSortFunction) { + sortFunction = function(itemA, itemB) { + return customSortFunction(itemA, itemB, options) * multi; + }; + } else { + sortFunction = function(itemA, itemB) { + var sort = list.utils.naturalSort; + sort.alphabet = list.alphabet || options.alphabet || undefined; + if (!sort.alphabet && options.insensitive) { + sort = list.utils.naturalSort.caseInsensitive; + } + return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi; + }; + } + + list.items.sort(sortFunction); list.update(); list.trigger('sortComplete'); }; @@ -643,7 +772,7 @@ module.exports = function(list) { return sort; }; -},{}],8:[function(require,module,exports){ +},{}],9:[function(require,module,exports){ var Templater = function(list) { var itemSource, templater = this; @@ -819,7 +948,7 @@ module.exports = function(list) { return new Templater(list); }; -},{}],9:[function(require,module,exports){ +},{}],10:[function(require,module,exports){ /** * Module dependencies. */ @@ -1006,7 +1135,7 @@ ClassList.prototype.contains = function(name){ return this.list ? this.list.contains(name) : !! ~index(this.array(), name); }; -},{"./index-of":14}],10:[function(require,module,exports){ +},{"./index-of":15}],11:[function(require,module,exports){ var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', prefix = bind !== 'addEventListener' ? 'on' : '', @@ -1046,7 +1175,7 @@ exports.unbind = function(el, type, fn, capture){ } }; -},{"./to-array":16}],11:[function(require,module,exports){ +},{"./to-array":16}],12:[function(require,module,exports){ /* * Source: https://github.com/segmentio/extend */ @@ -1066,7 +1195,7 @@ module.exports = function extend (object) { return object; }; -},{}],12:[function(require,module,exports){ +},{}],13:[function(require,module,exports){ /** * A cross-browser implementation of getAttribute. * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath @@ -1094,7 +1223,7 @@ module.exports = function(el, attr) { return result; }; -},{}],13:[function(require,module,exports){ +},{}],14:[function(require,module,exports){ /** * A cross-browser implementation of getElementsByClass. * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass. @@ -1152,7 +1281,7 @@ module.exports = (function() { } })(); -},{}],14:[function(require,module,exports){ +},{}],15:[function(require,module,exports){ var indexOf = [].indexOf; module.exports = function(arr, obj){ @@ -1163,60 +1292,6 @@ module.exports = function(arr, obj){ return -1; }; -},{}],15:[function(require,module,exports){ -/* - * Natural Sort algorithm for Javascript - Version 0.8.1 - Released under MIT license - * Author: Jim Palmer (based on chunking idea from Dave Koelle) - */ -module.exports = function(a, b, opts) { - var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g, - sre = /^\s+|\s+$/g, // trim pre-post whitespace - snre = /\s+/g, // normalize all whitespace to single ' ' character - dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, - hre = /^0x[0-9a-f]+$/i, - ore = /^0/, - options = opts || {}, - i = function(s) { - return (options.insensitive && ('' + s).toLowerCase() || '' + s).replace(sre, ''); - }, - // convert all to strings strip whitespace - x = i(a), - y = i(b), - // chunk/tokenize - xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), - yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), - // numeric, hex or date detection - xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && Date.parse(x)), - yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null, - normChunk = function(s, l) { - // normalize spaces; find floats not starting with '0', string or 0 if not defined (Clint Priest) - return (!s.match(ore) || l == 1) && parseFloat(s) || s.replace(snre, ' ').replace(sre, '') || 0; - }, - oFxNcL, oFyNcL; - // first try and sort Hex codes or Dates - if (yD) { - if (xD < yD) { return -1; } - else if (xD > yD) { return 1; } - } - // natural sorting through split numeric strings and default strings - for(var cLoc = 0, xNl = xN.length, yNl = yN.length, numS = Math.max(xNl, yNl); cLoc < numS; cLoc++) { - oFxNcL = normChunk(xN[cLoc] || '', xNl); - oFyNcL = normChunk(yN[cLoc] || '', yNl); - // handle numeric vs string comparison - number < string - (Kyle Adams) - if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { - return isNaN(oFxNcL) ? 1 : -1; - } - // if unicode use locale comparison - if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) { - var comp = oFxNcL.localeCompare(oFyNcL); - return comp / Math.abs(comp); - } - if (oFxNcL < oFyNcL) { return -1; } - else if (oFxNcL > oFyNcL) { return 1; } - } - return 0; -}; - },{}],16:[function(require,module,exports){ /** * Source: https://github.com/timoxley/to-array diff --git a/dist/list.min.js b/dist/list.min.js index 06c4721a..6340fb63 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,2 +1,2 @@ -// List.js v1.3.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cs)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);ue)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;cr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],4:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":4}],6:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],7:[function(a,b,c){b.exports=function(a){a.sortFunction=a.sortFunction||function(b,c,d){return d.desc="desc"==d.order,a.utils.naturalSort(b.values()[d.valueName],c.values()[d.valueName],d)};var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],9:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;cs)return 1}for(var u=0,v=p.length,w=q.length,x=Math.max(v,w);ue)return 1}return 0}},{}],16:[function(a,b,c){function d(a){return"[object Array]"===Object.prototype.toString.call(a)}b.exports=function(a){if("undefined"==typeof a)return[];if(null===a)return[null];if(a===window)return[window];if("string"==typeof a)return[a];if(d(a))return a;if("number"!=typeof a.length)return[a];if("function"==typeof a&&a instanceof Function)return[a];for(var b=[],c=0;cr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],4:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c Date: Sun, 15 Jan 2017 22:36:46 +0100 Subject: [PATCH 042/246] =?UTF-8?q?Remove=20known=20issue=20since=20it?= =?UTF-8?q?=E2=80=99s=20fixed!=20:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index cf425653..ef5a5b38 100644 --- a/README.md +++ b/README.md @@ -64,8 +64,6 @@ npm install list.js - [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch) - [Build your own](http://listjs.com/docs/plugins/build) -### Known issues -- Sorting fails with some UTF8 characters. Example: `åä`, thinking that `ä` is before `å`. ## Contributors * [javve](https://github.com/javve) / [Jonny Strömberg](http://jonnystromberg.com) From b428057c1fc91b9ea5e346f1ec1a834538df2e9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:37:08 +0100 Subject: [PATCH 043/246] Link to contributors instead of keeping deprecated list --- README.md | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/README.md b/README.md index ef5a5b38..eb3077f2 100644 --- a/README.md +++ b/README.md @@ -64,30 +64,7 @@ npm install list.js - [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch) - [Build your own](http://listjs.com/docs/plugins/build) - -## Contributors -* [javve](https://github.com/javve) / [Jonny Strömberg](http://jonnystromberg.com) -* [lusentis](https://github.com/lusentis) / [Simone Lusenti](http://www.plasticpanda.com) -* [dancrew32](https://github.com/dancrew32) / [Dan Masquelier](http://danmasq.com) -* [himynameisjonas](https://github.com/himynameisjonas) / [Jonas Forsberg](http://jonasforsberg.se) -* [LuukvE](https://github.com/LuukvE) [Luuk van Egeraat](http://luukvanegeraat.com/) -* [endorama](https://github.com/endorama) / Edoardo Tenani -* [sprynmr](https://github.com/sprynmr) / Bob Spryn -* [francescolaffi](https://github.com/francescolaffi) -* [ryantanner](https://github.com/ryantanner) -* [idlefella](https://github.com/idlefella) -* [julienbechade](https://github.com/julienbechade) / [Julien Béchade/](http://julienbechade.com/) -* [matthewheston](https://github.com/matthewheston) -* [gvido](https://github.com/gvido) / Gvido Glazers -* [karlwestin](https://github.com/karlwestin) / [Karl Westin](http://karlwestin.com) -* [joakin](https://github.com/joakin) / [Joaquin](http://chimeces.com/) -* [dancrew32](https://github.com/dancrew32) / [Dan Masquelier](http://danmasq.com/) -* [jkeyes](https://github.com/jkeyes) / [John Keyes](http://keyes.ie/) -* [samosad](https://github.com/samosad) / Alexey Tabakman -* [Page-](https://github.com/Page-) -* [urkle](https://github.com/urkle) / Edward Rudd - -### Want to contribute? +### Thanks to [https://github.com/javve/list.js/graphs/contributors](all lovely contributors)! Want to join them? - Read more at [listjs.com/overview/contribute](http://listjs.com/overview/contribute) ### Creator From f27dc25029310a70adf3c37a0e5cce001172f11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 15 Jan 2017 22:42:03 +0100 Subject: [PATCH 044/246] Move index.js into src --- Gruntfile.js | 2 +- package.json | 2 +- index.js => src/index.js | 30 +++++++++++++++--------------- 3 files changed, 17 insertions(+), 17 deletions(-) rename index.js => src/index.js (88%) diff --git a/Gruntfile.js b/Gruntfile.js index 6afbd5d7..9dbbdd45 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -14,7 +14,7 @@ module.exports = function(grunt) { }, shell: { build: { - command: 'node_modules/browserify/bin/cmd.js index.js > dist/list.js', + command: 'node_modules/browserify/bin/cmd.js src/index.js > dist/list.js', options: { stderr: true } diff --git a/package.json b/package.json index 2c131b5e..3759e19e 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "jquery": "^1.12.0", "string-natural-compare": "^2.0.2" }, - "main": "index", + "main": "src/index", "engines": { "node": ">= 0.10.21" }, diff --git a/index.js b/src/index.js similarity index 88% rename from index.js rename to src/index.js index a9e9c99e..e1c13ea0 100644 --- a/index.js +++ b/src/index.js @@ -3,21 +3,21 @@ var document = window.document, naturalSort = require('string-natural-compare'), - getByClass = require('./src/utils/get-by-class'), - extend = require('./src/utils/extend'), - indexOf = require('./src/utils/index-of'), - events = require('./src/utils/events'), - toString = require('./src/utils/to-string'), - classes = require('./src/utils/classes'), - getAttribute = require('./src/utils/get-attribute'), - toArray = require('./src/utils/to-array'); + getByClass = require('./utils/get-by-class'), + extend = require('./utils/extend'), + indexOf = require('./utils/index-of'), + events = require('./utils/events'), + toString = require('./utils/to-string'), + classes = require('./utils/classes'), + getAttribute = require('./utils/get-attribute'), + toArray = require('./utils/to-array'); var List = function(id, options, values) { var self = this, init, - Item = require('./src/item')(self), - addAsync = require('./src/add-async')(self); + Item = require('./item')(self), + addAsync = require('./add-async')(self); init = { start: function() { @@ -53,11 +53,11 @@ var List = function(id, options, values) { if (!self.listContainer) { return; } self.list = getByClass(self.listContainer, self.listClass, true); - self.parse = require('./src/parse')(self); - self.templater = require('./src/templater')(self); - self.search = require('./src/search')(self); - self.filter = require('./src/filter')(self); - self.sort = require('./src/sort')(self); + self.parse = require('./parse')(self); + self.templater = require('./templater')(self); + self.search = require('./search')(self); + self.filter = require('./filter')(self); + self.sort = require('./sort')(self); this.handlers(); this.items(); From 1ef7d405879f69e252b28e4ad06be98a15e4ca74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 16 Jan 2017 20:45:16 +0100 Subject: [PATCH 045/246] Fix typo and update author image --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index eb3077f2..7a194b51 100644 --- a/README.md +++ b/README.md @@ -64,13 +64,13 @@ npm install list.js - [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch) - [Build your own](http://listjs.com/docs/plugins/build) -### Thanks to [https://github.com/javve/list.js/graphs/contributors](all lovely contributors)! Want to join them? +### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them? - Read more at [listjs.com/overview/contribute](http://listjs.com/overview/contribute) ### Creator | | Jonny Strömberg [@javve](http://twitter.com/javve) | | ------------- | ------------- | -| ![Image of Jonny](http://listjs.com/assets/images/graphics/javve.jpg) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) +| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) ## License (MIT) From e7fb4cf3937c4409482dc168a6b13023aad75207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 16 Jan 2017 20:45:24 +0100 Subject: [PATCH 046/246] Update release information --- Release.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Release.md b/Release.md index c446dde0..d1fb3c11 100644 --- a/Release.md +++ b/Release.md @@ -1,9 +1,9 @@ # RELEASE 1. Update version in package.json -2. Update version in bower.json -3. Commit "Version x.y.z" -4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` -5. Push with `git push` -6. Push tags with `git push --tags` -7. Update links in README.md +2. Commit "Version x.y.z" +3. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` +4. Push with `git push` +5. Push tags with `git push --tags` +6. Update links in README.md +7. `npm publish` From 2f5322fd139ee6f30cef3bb5e15d382ff29f9489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 16 Jan 2017 20:46:57 +0100 Subject: [PATCH 047/246] Kill plugins and bundle pagination & fuzzySearch --- src/fuzzy-search.js | 67 +++++++++ src/index.js | 34 +++-- src/pagination.js | 93 +++++++++++++ src/utils/fuzzy.js | 123 +++++++++++++++++ test/fixtures-fuzzysearch.js | 41 ++++++ test/fixtures-pagination.js | 111 +++++++++++++++ test/index.html | 6 + test/test.fuzzysearch.js | 56 ++++++++ test/test.pagination.js | 257 +++++++++++++++++++++++++++++++++++ 9 files changed, 775 insertions(+), 13 deletions(-) create mode 100644 src/fuzzy-search.js create mode 100644 src/pagination.js create mode 100644 src/utils/fuzzy.js create mode 100644 test/fixtures-fuzzysearch.js create mode 100644 test/fixtures-pagination.js create mode 100644 test/test.fuzzysearch.js create mode 100644 test/test.pagination.js diff --git a/src/fuzzy-search.js b/src/fuzzy-search.js new file mode 100644 index 00000000..ac49dfa1 --- /dev/null +++ b/src/fuzzy-search.js @@ -0,0 +1,67 @@ + +var classes = require('./utils/classes'), + events = require('./utils/events'), + extend = require('./utils/extend'), + toString = require('./utils/to-string'), + getByClass = require('./utils/get-by-class'), + fuzzy = require('./utils/fuzzy'); + +module.exports = function(list, options) { + options = options || {}; + + options = extend({ + location: 0, + distance: 100, + threshold: 0.4, + multiSearch: true, + searchClass: 'fuzzy-search' + }, options); + + + + var fuzzySearch = { + search: function(searchString, columns) { + // Substract arguments from the searchString or put searchString as only argument + var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]; + + for (var k = 0, kl = list.items.length; k < kl; k++) { + fuzzySearch.item(list.items[k], columns, searchArguments); + } + }, + item: function(item, columns, searchArguments) { + var found = true; + for(var i = 0; i < searchArguments.length; i++) { + var foundArgument = false; + for (var j = 0, jl = columns.length; j < jl; j++) { + if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) { + foundArgument = true; + } + } + if(!foundArgument) { + found = false; + } + } + item.found = found; + }, + values: function(values, value, searchArgument) { + if (values.hasOwnProperty(value)) { + var text = toString(values[value]).toLowerCase(); + + if (fuzzy(text, searchArgument, options)) { + return true; + } + } + return false; + } + }; + + + events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) { + var target = e.target || e.srcElement; // IE have srcElement + list.search(target.value, fuzzySearch.search); + }); + + return function(str, columns) { + list.search(str, columns, fuzzySearch.search); + }; +}; diff --git a/src/index.js b/src/index.js index e1c13ea0..5ec2fc97 100644 --- a/src/index.js +++ b/src/index.js @@ -17,7 +17,8 @@ var List = function(id, options, values) { var self = this, init, Item = require('./item')(self), - addAsync = require('./add-async')(self); + addAsync = require('./add-async')(self), + initPagination = require('./pagination')(self); init = { start: function() { @@ -33,7 +34,6 @@ var List = function(id, options, values) { self.filtered = false; self.searchColumns = undefined; self.handlers = { 'updated': [] }; - self.plugins = {}; self.valueNames = []; self.utils = { getByClass: getByClass, @@ -53,16 +53,18 @@ var List = function(id, options, values) { if (!self.listContainer) { return; } self.list = getByClass(self.listContainer, self.listClass, true); - self.parse = require('./parse')(self); - self.templater = require('./templater')(self); - self.search = require('./search')(self); - self.filter = require('./filter')(self); - self.sort = require('./sort')(self); + self.parse = require('./parse')(self); + self.templater = require('./templater')(self); + self.search = require('./search')(self); + self.filter = require('./filter')(self); + self.sort = require('./sort')(self); + self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch); this.handlers(); this.items(); + this.pagination(); + self.update(); - this.plugins(); }, handlers: function() { for (var handler in self.handlers) { @@ -77,11 +79,17 @@ var List = function(id, options, values) { self.add(values); } }, - plugins: function() { - for (var i = 0; i < self.plugins.length; i++) { - var plugin = self.plugins[i]; - self[plugin.name] = plugin; - plugin.init(self, List); + pagination: function() { + if (options.pagination !== undefined) { + if (options.pagination === true) { + options.pagination = [{}]; + } + if (options.pagination[0] === undefined){ + options.pagination = [options.pagination]; + } + for (var i = 0, il = options.pagination.length; i < il; i++) { + initPagination(options.pagination[i]); + } } } }; diff --git a/src/pagination.js b/src/pagination.js new file mode 100644 index 00000000..9f371f33 --- /dev/null +++ b/src/pagination.js @@ -0,0 +1,93 @@ +var classes = require('./utils/classes'), + events = require('./utils/events'); + +module.exports = function(list) { + + var pagingList; + + var refresh = function(options) { + var item, + l = list.matchingItems.length, + index = list.i, + page = list.page, + pages = Math.ceil(l / page), + currentPage = Math.ceil((index / page)), + innerWindow = options.innerWindow || 2, + left = options.left || options.outerWindow || 0, + right = options.right || options.outerWindow || 0; + + right = pages - right; + + pagingList.clear(); + for (var i = 1; i <= pages; i++) { + var className = (currentPage === i) ? "active" : ""; + + //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className); + + if (is.number(i, left, right, currentPage, innerWindow)) { + item = pagingList.add({ + page: i, + dotted: false + })[0]; + if (className) { + classes(item.elm).add(className); + } + addEvent(item.elm, i, page); + } else if (is.dotted(i, left, right, currentPage, innerWindow, pagingList.size())) { + item = pagingList.add({ + page: "...", + dotted: true + })[0]; + classes(item.elm).add("disabled"); + } + } + }; + + var is = { + number: function(i, left, right, currentPage, innerWindow) { + return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow); + }, + left: function(i, left) { + return (i <= left); + }, + right: function(i, right) { + return (i > right); + }, + innerWindow: function(i, currentPage, innerWindow) { + return ( i >= (currentPage - innerWindow) && i <= (currentPage + innerWindow)); + }, + dotted: function(i, left, right, currentPage, innerWindow, currentPageItem) { + return this.dottedLeft(i, left, right, currentPage, innerWindow) || (this.dottedRight(i, left, right, currentPage, innerWindow, currentPageItem)); + }, + dottedLeft: function(i, left, right, currentPage, innerWindow) { + return ((i == (left + 1)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + }, + dottedRight: function(i, left, right, currentPage, innerWindow, currentPageItem) { + if (pagingList.items[currentPageItem-1].values().dotted) { + return false; + } else { + return ((i == (right)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + } + } + }; + + var addEvent = function(elm, i, page) { + events.bind(elm, 'click', function() { + list.show((i-1)*page + 1, page); + }); + }; + + return function(options) { + pagingList = new List(list.listContainer.id, { + listClass: options.paginationClass || 'pagination', + item: "
      • ", + valueNames: ['page', 'dotted'], + searchClass: 'pagination-search-that-is-not-supposed-to-exist', + sortClass: 'pagination-sort-that-is-not-supposed-to-exist' + }); + list.on('updated', function() { + refresh(options); + }); + refresh(options); + }; +}; diff --git a/src/utils/fuzzy.js b/src/utils/fuzzy.js new file mode 100644 index 00000000..b63787f3 --- /dev/null +++ b/src/utils/fuzzy.js @@ -0,0 +1,123 @@ +module.exports = function(text, pattern, options) { + // Aproximately where in the text is the pattern expected to be found? + var Match_Location = options.location || 0; + + //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. + var Match_Distance = options.distance || 100; + + // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. + var Match_Threshold = options.threshold || 0.4; + + if (pattern === text) return true; // Exact match + if (pattern.length > 32) return false; // This algorithm cannot be used + + // Set starting location at beginning text and initialise the alphabet. + var loc = Match_Location, + s = (function() { + var q = {}, + i; + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] = 0; + } + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1); + } + + return q; + }()); + + // Compute and return the score for a match with e errors and x location. + // Accesses loc and pattern through being a closure. + + function match_bitapScore_(e, x) { + var accuracy = e / pattern.length, + proximity = Math.abs(loc - x); + + if (!Match_Distance) { + // Dodge divide by zero error. + return proximity ? 1.0 : accuracy; + } + return accuracy + (proximity / Match_Distance); + } + + var score_threshold = Match_Threshold, // Highest score beyond which we give up. + best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup) + + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); + // What about in the other direction? (speedup) + best_loc = text.lastIndexOf(pattern, loc + pattern.length); + + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); + } + } + + // Initialise the bit arrays. + var matchmask = 1 << (pattern.length - 1); + best_loc = -1; + + var bin_min, bin_mid; + var bin_max = pattern.length + text.length; + var last_rd; + for (var d = 0; d < pattern.length; d++) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from 'loc' we can stray at this + // error level. + bin_min = 0; + bin_mid = bin_max; + while (bin_min < bin_mid) { + if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { + bin_min = bin_mid; + } else { + bin_max = bin_mid; + } + bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); + } + // Use the result from this iteration as the maximum for the next. + bin_max = bin_mid; + var start = Math.max(1, loc - bin_mid + 1); + var finish = Math.min(loc + bin_mid, text.length) + pattern.length; + + var rd = Array(finish + 2); + rd[finish + 1] = (1 << d) - 1; + for (var j = finish; j >= start; j--) { + // The alphabet (s) is a sparse hash, so the following line generates + // warnings. + var charMatch = s[text.charAt(j - 1)]; + if (d === 0) { // First pass: exact match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; + } else { // Subsequent passes: fuzzy match. + rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | + (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | + last_rd[j + 1]; + } + if (rd[j] & matchmask) { + var score = match_bitapScore_(d, j - 1); + // This match will almost certainly be better than any existing match. + // But check anyway. + if (score <= score_threshold) { + // Told you so. + score_threshold = score; + best_loc = j - 1; + if (best_loc > loc) { + // When passing loc, don't exceed our current distance from loc. + start = Math.max(1, 2 * loc - best_loc); + } else { + // Already passed loc, downhill from here on in. + break; + } + } + } + } + // No hope for a (better) match at greater error levels. + if (match_bitapScore_(d + 1, loc) > score_threshold) { + break; + } + last_rd = rd; + } + + return (best_loc < 0) ? false : true; +}; diff --git a/test/fixtures-fuzzysearch.js b/test/fixtures-fuzzysearch.js new file mode 100644 index 00000000..563249c9 --- /dev/null +++ b/test/fixtures-fuzzysearch.js @@ -0,0 +1,41 @@ +var fixtureFuzzysearch = { + list: function(valueNames) { + var listHtml = $(''), + item = ""; + + item = "
      • "; + for (var i = 0; i < valueNames.length; i++) { + item += ''; + } + item += "
      • "; + + $(document.body).append(listHtml); + + return item; + }, + removeList: function() { + $('#list-fuzzy-search').remove(); + }, + i1: { name: "Guybrush Threepwood" }, + i2: { name: "Manny Calavera" }, + i3: { name: "Bernard Bernoulli" }, + i4: { name: "LeChuck" }, + i5: { name: "Elaine Marley-Threepwood" }, + i6: { name: "Purple Tentacle" }, + i7: { name: "Adrian Ripburger" }, + i8: { name: "Bobbin Threadbare" }, + i9: { name: "Murray the Demonic Skull" }, + i10: { name: "Zak McKracken" } +}; +fixtureFuzzysearch.all = [ + fixtureFuzzysearch.i1, + fixtureFuzzysearch.i2, + fixtureFuzzysearch.i3, + fixtureFuzzysearch.i4, + fixtureFuzzysearch.i5, + fixtureFuzzysearch.i6, + fixtureFuzzysearch.i7, + fixtureFuzzysearch.i8, + fixtureFuzzysearch.i9, + fixtureFuzzysearch.i10 +]; diff --git a/test/fixtures-pagination.js b/test/fixtures-pagination.js new file mode 100644 index 00000000..3d7f0fea --- /dev/null +++ b/test/fixtures-pagination.js @@ -0,0 +1,111 @@ +var fixturePagination = { + list: function(valueNames) { + var listHtml = $('
            '), + item = ""; + + item = "
          • "; + for (var i = 0; i < valueNames.length; i++) { + item += ''; + } + item += "
          • "; + + $(document.body).append(listHtml); + + return item; + }, + removeList: function() { + $('#list-pagination').remove(); + }, + jonny: { + name: "Jonny Strömberg", + born: '1986' + }, + martina: { + name: "Martina Elm", + born: '1986' + }, + angelica: { + name: "Angelica Abraham", + born: '1986' + }, + sebastian: { + name: "Sebastian Höglund", + born: '1989' + }, + imma: { + name: "Imma Grafström", + born: '1953' + }, + hasse: { + name: "Hasse Strömberg", + born: '1955' + }, + fredrik: { + name: "Fredrik Martinsson", + born: '1987' + }, + jonas: { + name: "Jonas Arnklint", + born: '1987' + }, + egon: { + name: "Egon Östgren", + born: '1983' + }, + lars: { + name: "Lars Larsson", + born: '1992' + }, + bertil: { + name: "Bertil Cool", + born: '1943' + }, + ture: { + name: "Ture Tur", + born: '1965' + }, + anders: { + name: "Anders", + born: '1987' + }, + anna: { + name: "Anna", + born: '1987' + }, + matilda: { + name: "Matilda", + born: '1983' + }, + li: { + name: "Li", + born: '1992' + }, + asa: { + name: "Åsa", + born: '1943' + }, + gun: { + name: "Gun", + born: '1965' + } +}; +fixturePagination.all = [ + fixturePagination.jonny, + fixturePagination.martina, + fixturePagination.angelica, + fixturePagination.sebastian, + fixturePagination.imma, + fixturePagination.hasse, + fixturePagination.fredrik, + fixturePagination.jonas, + fixturePagination.egon, + fixturePagination.lars, + fixturePagination.bertil, + fixturePagination.ture, + fixturePagination.anders, + fixturePagination.anna, + fixturePagination.matilda, + fixturePagination.li, + fixturePagination.asa, + fixturePagination.gun +]; diff --git a/test/index.html b/test/index.html index 89dcf54e..4ba876fc 100755 --- a/test/index.html +++ b/test/index.html @@ -24,6 +24,9 @@ + + + @@ -41,6 +44,9 @@ + + + + + + From 91abf9c44e65d363fd02ae86cd188904ad89e7e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 16 Jan 2017 21:29:45 +0100 Subject: [PATCH 051/246] Update the docs for pagination and fuzzy search --- docs/_includes/menu.html | 9 +-- docs/docs/fuzzysearch.html | 90 ++++++++++++++++++++++ docs/docs/pagination.html | 116 +++++++++++++++++++++++++++++ docs/docs/plugins/fuzzysearch.html | 2 + docs/docs/plugins/pagination.html | 2 + 5 files changed, 212 insertions(+), 7 deletions(-) create mode 100644 docs/docs/fuzzysearch.html create mode 100644 docs/docs/pagination.html diff --git a/docs/_includes/menu.html b/docs/_includes/menu.html index 856062d0..b0d2aaf7 100644 --- a/docs/_includes/menu.html +++ b/docs/_includes/menu.html @@ -15,13 +15,8 @@

            Documentation

          • Options
          • List API
          • Item API
          • - - -

            Plugins

            -

            Examples

            diff --git a/docs/docs/fuzzysearch.html b/docs/docs/fuzzysearch.html new file mode 100644 index 00000000..31829c64 --- /dev/null +++ b/docs/docs/fuzzysearch.html @@ -0,0 +1,90 @@ +--- +layout: default +title: Fuzzy search plugin +--- + +

            Fuzzy search

            + +

            + Note: The fuzzy search plugin is + deprecated since v1.5.0, it's now bundled into List.js. Read the + old docs here. +

            + +

            The difference between Fuzzy Search and List.js default search

            + +

            The default search will conduct a time efficient search for an exact match in the content searched, while the fuzzy search will render results depending on if they are included anywhere in the content.

            + +

            Basic example

            +
            var items = [
            +    { character: "Guybrush Threepwood", game: "The Secret of Monkey Island" },
            +    { character: "Manny Calavera", game: "Grim Fandango" },
            +    { character: "Bernard Bernoulli", game: "Maniac Mansion" }
            +];
            +
            +list.search('gu thre'); // return none
            +list.fuzzySearch('gu thre') // return 1 item
            +
            + + +

            Options

            +

            All options are optional. Simplest implementation is:

            +
            new List(id, { fuzzySearch: options });
            +
              +
            • + searchClass String, default: fuzzy-search
              + What is the class of the search field? +
            • +
            • + location Int, default: 0
              + Approximately where in the text is the pattern expected to be found? +
            • +
            • + distance Int, default: 100
              + Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is ‘distance’ characters away from the fuzzy location would score as a complete mismatch. A distance of 0 requires the match be at the exact location specified, a threshold of 1000 would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. +
            • +
            • + threshold Int, default: 0.4
              + At what point does the match algorithm give up. A threshold of 0.0 requires a perfect match (of both letters and location), a threshold of 1.0 would match anything. +
            • +
            • + multiSearch Boolean, default: true
              + Subtract arguments from the searchString or put searchString as only argument +
            • +
            + +

            Implementation

            +
            <div id="list-id">
            +  <input class="fuzzy-search" />
            +  <ul class="list">
            +    / A bunch of items /
            +  </ul>
            +</div>
            +
            +<script>
            +
            +var options = {
            +  valueNames: [ 'name', 'category' ],
            +  fuzzySearch: {
            +    searchClass: "fuzzy-search",
            +    location: 0,
            +    distance: 100,
            +    threshold: 0.4,
            +    multiSearch: true
            +  }
            +};
            +
            +var listObj = new List('list-id', options);
            +
            +// Search manually
            +listObj.fuzzySearch.search('my search');
            +
            +// Search manually on specific columns
            +listObj.fuzzySearch.search('my search', [ 'name' ]);
            +
            +</script>
            +
            + +

            A big thanks to LuukvE who made a commit from which I could create this Fuzzy Search plugin.

            + + diff --git a/docs/docs/pagination.html b/docs/docs/pagination.html new file mode 100644 index 00000000..8e867c80 --- /dev/null +++ b/docs/docs/pagination.html @@ -0,0 +1,116 @@ +--- +layout: default +title: Pagination +--- + +

            Pagination

            + +

            + Note: The pagination plugin is + deprecated since v1.5.0, it's now bundled into List.js. Read the + old docs here. +

            + +

            Basic example

            +
            <div id="listId">
            +  <ul class="list">
            +      // A bunch of items
            +  </ul>
            +  <ul class="pagination"></ul>
            +</div>
            +
            +<script>
            +  var options = {
            +    valueNames: [ 'name', 'category' ],
            +    page: 3,
            +    pagination: true
            +  };
            +
            +  var listObj = new List('listId', options);
            +</script>
            +
            + + + +

            Options

            +
              +
            • + paginationClass String, default: “pagination”
              + The class that defines which ul that should contain the pagination (must be inside the list container) +
            • +
            • + innerWindow Int, default: 2
              + How many pages should be visible on each side of the current page.
              + innerWindow: 2 … 3 4 5 6 7 …
              + innerWindow: 1 … 4 5 6 … +
            • +
            • + outerWindow Int, default: 0
              + How many pages should be visible on from the beginning and from the end of the pagination.
              + outerWindow: 0 … 3 4 5 6 7…
              + outerWindow: 2 1 2 … 4 5 6 7 8 … 11 12 +
            • +
            • + left Int, default: 0
              + Same as outerWindow but only from left. + outerWindow: 2 and left: 1 1 … 4 5 6 7 8 … 11 12 +
            • +
            • + right Int, default: 0
              + Same as left but from right. +
            • +
            + +

            Notice

            +

            The number of items at each page are decided by the List.js own property page. To set this just add page: Number to the option object sent into the List.js constructor (as been done in both of the examples at this page).

            + +

            Generated output

            + +
            <div id="listId">
            +  <ul class="list">
            +      / A bunch of items /
            +  </ul>
            +  <ul class="pagination">
            +    <li>
            +      <a class="page active" href="javascript:function Z(){Z=""}Z()">1</a>
            +    </li>
            +    <li>
            +      <a class="page" href="javascript:function Z(){Z=""}Z()">2</a>
            +    </li>
            +    <li>
            +      …
            +    </li>
            +  </ul>
            +</div>
            +
            + +

            Double pagination

            + +
            <div id="listId">
            +  <ul class="paginationTop"></ul>
            +  <ul class="list">
            +    // A bunch of items
            +  </ul>
            +  <ul class="paginationBottom"></ul>
            +</div>
            +
            +<script>
            +  var listOptions = {
            +    valueNames: [ 'name', 'category' ],
            +    page: 3,
            +    pagination: [{
            +      name: "paginationTop",
            +      paginationClass: "paginationTop",
            +      outerWindow: 2
            +    }, {
            +      paginationClass: "paginationBottom",
            +      innerWindow: 3,
            +      left: 2,
            +      right: 4
            +    }]
            +  };
            +
            +  var listObj = new List('listId', listOptions);
            +</script>
            + + diff --git a/docs/docs/plugins/fuzzysearch.html b/docs/docs/plugins/fuzzysearch.html index 6174a62a..6c04fdc7 100644 --- a/docs/docs/plugins/fuzzysearch.html +++ b/docs/docs/plugins/fuzzysearch.html @@ -5,6 +5,8 @@

            Fuzzy search plugin

            +

            Note: The fuzzy search plugin is deprecated since v1.5.0, it's now bundled into List.js.

            +

            To use the plugin you first need to download it:

            Via GitHub

            diff --git a/docs/docs/plugins/pagination.html b/docs/docs/plugins/pagination.html index 9a985462..9dfab5de 100644 --- a/docs/docs/plugins/pagination.html +++ b/docs/docs/plugins/pagination.html @@ -5,6 +5,8 @@

            Pagination plugin

            +

            Note: The pagination plugin is deprecated since v1.5.0, it's now bundled into List.js.

            +

            To use the plugin you first need to download it:

            Via GitHub

            From c17162b26fd5093d3ddde01e11a3f748310d993c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Thu, 19 Jan 2017 14:52:01 +0100 Subject: [PATCH 052/246] Move string-natural-compare to dependencies from dev --- package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3759e19e..65b08008 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "1.4.0", + "version": "1.4.1", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", @@ -22,7 +22,9 @@ "bugs": { "url": "https://github.com/javve/list.js/issues" }, - "dependencies": {}, + "dependencies": { + "string-natural-compare": "^2.0.2" + }, "devDependencies": { "browserify": "^13.0.0", "expect.js": "^0.3.1", @@ -34,8 +36,7 @@ "grunt-file-append": "0.0.6", "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", - "jquery": "^1.12.0", - "string-natural-compare": "^2.0.2" + "jquery": "^1.12.0" }, "main": "src/index", "engines": { From 926969dbca70e1917090bfa8c84f66d95529a600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Thu, 19 Jan 2017 14:52:12 +0100 Subject: [PATCH 053/246] Version 1.4.1 --- dist/list.js | 360 ++++++++++++++-------------- dist/list.min.js | 4 +- docs/_data/package.json | 11 +- docs/assets/javascripts/list.min.js | 4 +- 4 files changed, 190 insertions(+), 189 deletions(-) diff --git a/dist/list.js b/dist/list.js index d25a070e..fbb20d6d 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,25 +1,187 @@ -// List.js v1.4.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) +// List.js v1.4.1 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 48 && code <= 57; +} + +function naturalCompare(a, b) { + var lengthA = (a += '').length; + var lengthB = (b += '').length; + var aIndex = 0; + var bIndex = 0; + + while (aIndex < lengthA && bIndex < lengthB) { + var charCodeA = a.charCodeAt(aIndex); + var charCodeB = b.charCodeAt(bIndex); + + if (isNumberCode(charCodeA)) { + if (!isNumberCode(charCodeB)) { + return charCodeA - charCodeB; + } + + var numStartA = aIndex; + var numStartB = bIndex; + + while (charCodeA === 48 && ++numStartA < lengthA) { + charCodeA = a.charCodeAt(numStartA); + } + while (charCodeB === 48 && ++numStartB < lengthB) { + charCodeB = b.charCodeAt(numStartB); + } + + var numEndA = numStartA; + var numEndB = numStartB; + + while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) { + ++numEndA; + } + while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) { + ++numEndB; + } + + var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length + if (difference) { + return difference; + } + + while (numStartA < numEndA) { + difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++); + if (difference) { + return difference; + } + } + + aIndex = numEndA; + bIndex = numEndB; + continue; + } + + if (charCodeA !== charCodeB) { + if ( + charCodeA < alphabetIndexMapLength && + charCodeB < alphabetIndexMapLength && + alphabetIndexMap[charCodeA] !== -1 && + alphabetIndexMap[charCodeB] !== -1 + ) { + return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB]; + } + + return charCodeA - charCodeB; + } + + ++aIndex; + ++bIndex; + } + + return lengthA - lengthB; +} + +naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) { + return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase()); +}; + +Object.defineProperties(naturalCompare, { + alphabet: { + get: function() { + return alphabet; + }, + set: function(value) { + alphabet = value; + alphabetIndexMap = []; + var i = 0; + if (alphabet) { + for (; i < alphabet.length; i++) { + alphabetIndexMap[alphabet.charCodeAt(i)] = i; + } + } + alphabetIndexMapLength = alphabetIndexMap.length; + for (i = 0; i < alphabetIndexMapLength; i++) { + if (alphabetIndexMap[i] === undefined) { + alphabetIndexMap[i] = -1; + } + } + }, + }, +}); + +module.exports = naturalCompare; + +},{}],2:[function(require,module,exports){ +module.exports = function(list) { + var addAsync = function(values, callback, items) { + var valuesToAdd = values.splice(0, 50); + items = items || []; + items = items.concat(list.add(valuesToAdd)); + if (values.length > 0) { + setTimeout(function() { + addAsync(values, callback, items); + }, 1); + } else { + list.update(); + callback(items); + } + }; + return addAsync; +}; + +},{}],3:[function(require,module,exports){ +module.exports = function(list) { + + // Add handlers + list.handlers.filterStart = list.handlers.filterStart || []; + list.handlers.filterComplete = list.handlers.filterComplete || []; + + return function(filterFunction) { + list.trigger('filterStart'); + list.i = 1; // Reset paging + list.reset.filter(); + if (filterFunction === undefined) { + list.filtered = false; + } else { + list.filtered = true; + var is = list.items; + for (var i = 0, il = is.length; i < il; i++) { + var item = is[i]; + if (filterFunction(item)) { + item.filtered = true; + } else { + item.filtered = false; + } + } + } + list.update(); + list.trigger('filterComplete'); + return list.visibleItems; + }; +}; + +},{}],4:[function(require,module,exports){ (function( window, undefined ) { "use strict"; var document = window.document, naturalSort = require('string-natural-compare'), - getByClass = require('./src/utils/get-by-class'), - extend = require('./src/utils/extend'), - indexOf = require('./src/utils/index-of'), - events = require('./src/utils/events'), - toString = require('./src/utils/to-string'), - classes = require('./src/utils/classes'), - getAttribute = require('./src/utils/get-attribute'), - toArray = require('./src/utils/to-array'); + getByClass = require('./utils/get-by-class'), + extend = require('./utils/extend'), + indexOf = require('./utils/index-of'), + events = require('./utils/events'), + toString = require('./utils/to-string'), + classes = require('./utils/classes'), + getAttribute = require('./utils/get-attribute'), + toArray = require('./utils/to-array'); var List = function(id, options, values) { var self = this, init, - Item = require('./src/item')(self), - addAsync = require('./src/add-async')(self); + Item = require('./item')(self), + addAsync = require('./add-async')(self); init = { start: function() { @@ -55,11 +217,11 @@ var List = function(id, options, values) { if (!self.listContainer) { return; } self.list = getByClass(self.listContainer, self.listClass, true); - self.parse = require('./src/parse')(self); - self.templater = require('./src/templater')(self); - self.search = require('./src/search')(self); - self.filter = require('./src/filter')(self); - self.sort = require('./src/sort')(self); + self.parse = require('./parse')(self); + self.templater = require('./templater')(self); + self.search = require('./search')(self); + self.filter = require('./filter')(self); + self.sort = require('./sort')(self); this.handlers(); this.items(); @@ -269,169 +431,7 @@ window.List = List; })(window); -},{"./src/add-async":3,"./src/filter":4,"./src/item":5,"./src/parse":6,"./src/search":7,"./src/sort":8,"./src/templater":9,"./src/utils/classes":10,"./src/utils/events":11,"./src/utils/extend":12,"./src/utils/get-attribute":13,"./src/utils/get-by-class":14,"./src/utils/index-of":15,"./src/utils/to-array":16,"./src/utils/to-string":17,"string-natural-compare":2}],2:[function(require,module,exports){ -'use strict'; - -var alphabet; -var alphabetIndexMap; -var alphabetIndexMapLength = 0; - -function isNumberCode(code) { - return code >= 48 && code <= 57; -} - -function naturalCompare(a, b) { - var lengthA = (a += '').length; - var lengthB = (b += '').length; - var aIndex = 0; - var bIndex = 0; - - while (aIndex < lengthA && bIndex < lengthB) { - var charCodeA = a.charCodeAt(aIndex); - var charCodeB = b.charCodeAt(bIndex); - - if (isNumberCode(charCodeA)) { - if (!isNumberCode(charCodeB)) { - return charCodeA - charCodeB; - } - - var numStartA = aIndex; - var numStartB = bIndex; - - while (charCodeA === 48 && ++numStartA < lengthA) { - charCodeA = a.charCodeAt(numStartA); - } - while (charCodeB === 48 && ++numStartB < lengthB) { - charCodeB = b.charCodeAt(numStartB); - } - - var numEndA = numStartA; - var numEndB = numStartB; - - while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) { - ++numEndA; - } - while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) { - ++numEndB; - } - - var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length - if (difference) { - return difference; - } - - while (numStartA < numEndA) { - difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++); - if (difference) { - return difference; - } - } - - aIndex = numEndA; - bIndex = numEndB; - continue; - } - - if (charCodeA !== charCodeB) { - if ( - charCodeA < alphabetIndexMapLength && - charCodeB < alphabetIndexMapLength && - alphabetIndexMap[charCodeA] !== -1 && - alphabetIndexMap[charCodeB] !== -1 - ) { - return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB]; - } - - return charCodeA - charCodeB; - } - - ++aIndex; - ++bIndex; - } - - return lengthA - lengthB; -} - -naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) { - return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase()); -}; - -Object.defineProperties(naturalCompare, { - alphabet: { - get: function() { - return alphabet; - }, - set: function(value) { - alphabet = value; - alphabetIndexMap = []; - var i = 0; - if (alphabet) { - for (; i < alphabet.length; i++) { - alphabetIndexMap[alphabet.charCodeAt(i)] = i; - } - } - alphabetIndexMapLength = alphabetIndexMap.length; - for (i = 0; i < alphabetIndexMapLength; i++) { - if (alphabetIndexMap[i] === undefined) { - alphabetIndexMap[i] = -1; - } - } - }, - }, -}); - -module.exports = naturalCompare; - -},{}],3:[function(require,module,exports){ -module.exports = function(list) { - var addAsync = function(values, callback, items) { - var valuesToAdd = values.splice(0, 50); - items = items || []; - items = items.concat(list.add(valuesToAdd)); - if (values.length > 0) { - setTimeout(function() { - addAsync(values, callback, items); - }, 1); - } else { - list.update(); - callback(items); - } - }; - return addAsync; -}; - -},{}],4:[function(require,module,exports){ -module.exports = function(list) { - - // Add handlers - list.handlers.filterStart = list.handlers.filterStart || []; - list.handlers.filterComplete = list.handlers.filterComplete || []; - - return function(filterFunction) { - list.trigger('filterStart'); - list.i = 1; // Reset paging - list.reset.filter(); - if (filterFunction === undefined) { - list.filtered = false; - } else { - list.filtered = true; - var is = list.items; - for (var i = 0, il = is.length; i < il; i++) { - var item = is[i]; - if (filterFunction(item)) { - item.filtered = true; - } else { - item.filtered = false; - } - } - } - list.update(); - list.trigger('filterComplete'); - return list.visibleItems; - }; -}; - -},{}],5:[function(require,module,exports){ +},{"./add-async":2,"./filter":3,"./item":5,"./parse":6,"./search":7,"./sort":8,"./templater":9,"./utils/classes":10,"./utils/events":11,"./utils/extend":12,"./utils/get-attribute":13,"./utils/get-by-class":14,"./utils/index-of":15,"./utils/to-array":16,"./utils/to-string":17,"string-natural-compare":1}],5:[function(require,module,exports){ module.exports = function(list) { return function(initValues, element, notCreate) { var item = this; @@ -1335,4 +1335,4 @@ module.exports = function(s) { return s; }; -},{}]},{},[1]); +},{}]},{},[4]); diff --git a/dist/list.min.js b/dist/list.min.js index 6340fb63..146b4f74 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,2 +1,2 @@ -// List.js v1.4.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],4:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;dr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c= 0.10.21" }, diff --git a/docs/assets/javascripts/list.min.js b/docs/assets/javascripts/list.min.js index 6340fb63..146b4f74 100644 --- a/docs/assets/javascripts/list.min.js +++ b/docs/assets/javascripts/list.min.js @@ -1,2 +1,2 @@ -// List.js v1.4.0 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],4:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;d0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;dr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c Date: Thu, 19 Jan 2017 14:54:31 +0100 Subject: [PATCH 054/246] Update release info --- Release.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Release.md b/Release.md index c446dde0..542e3420 100644 --- a/Release.md +++ b/Release.md @@ -1,9 +1,8 @@ # RELEASE 1. Update version in package.json -2. Update version in bower.json +2. Update links in README.md 3. Commit "Version x.y.z" 4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` 5. Push with `git push` 6. Push tags with `git push --tags` -7. Update links in README.md From b5f5937c14a03d9fd0dc3b57520c6b6581a48b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Thu, 19 Jan 2017 14:54:41 +0100 Subject: [PATCH 055/246] Update readme version to 1.4.1 --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb3077f2..4f6fa8d3 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ npm install list.js ``` ##### Via CDNJS ```html - + ``` ##### Via Direct Download -- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.0/dist/list.min.js) -- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.0/dist/list.js) +- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.min.js) +- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.js) ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) From e2d35da9c427f0adcdbb92a7932aa72059f03f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Thu, 19 Jan 2017 14:56:13 +0100 Subject: [PATCH 056/246] Update history file --- History.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/History.md b/History.md index 88e1fc7f..0eac260a 100644 --- a/History.md +++ b/History.md @@ -18,6 +18,11 @@ # Changelog +### 2017-01-19 v1.4.1 +- **[Bugfix]** Move string-natural-compare to dependencies instead of devDependencies + [See commit →](https://github.com/javve/list.js/commit/c17162b26fd5093d3ddde01e11a3f748310d993c) + + ### 2017-01-15 v1.4.0 - **[Bugfix/Feature]** Change natural-sort library to support custom alphabets and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong. From 488a955374b6a512c34c8ce320f4abd4d135a4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Fri, 20 Jan 2017 21:49:27 +0100 Subject: [PATCH 057/246] Add circleci --- circle.yml | 7 +++++++ package.json | 3 +++ 2 files changed, 10 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 00000000..25bee747 --- /dev/null +++ b/circle.yml @@ -0,0 +1,7 @@ +machine: + node: + version: 4 + +test: + override: + - npm test diff --git a/package.json b/package.json index 65b08008..b995a085 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,9 @@ "engines": { "node": ">= 0.10.21" }, + "scripts": { + "test": "grunt test" + }, "npmName": "list.js", "npmFileMap": [ { From 87e2687893e135d86c9ad9abe08a7039962acaa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Fri, 20 Jan 2017 21:55:44 +0100 Subject: [PATCH 058/246] Remove test that behaves differently in browser and node --- test/test.sort.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test.sort.js b/test/test.sort.js index ddec3c0a..4735f944 100644 --- a/test/test.sort.js +++ b/test/test.sort.js @@ -238,7 +238,7 @@ describe('Sort', function() { expect(list.items[5].values().val).to.be.equal('z'); }) - it('should show how random values are sorted', function() { + xit('should show how random values are sorted', function() { list.add({ id: '7', val: "" }); list.add({ id: '8', val: "" }); list.add({ id: '9', val: "" }); From ccafd09ff59feb78a5a15ea8d5f16b180e16a0a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Fri, 20 Jan 2017 22:07:45 +0100 Subject: [PATCH 059/246] Push circleci to codecov --- circle.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/circle.yml b/circle.yml index 25bee747..3f3bac9a 100644 --- a/circle.yml +++ b/circle.yml @@ -5,3 +5,5 @@ machine: test: override: - npm test + post: + - bash <(curl -s https://codecov.io/bash) From bbb1d841fc87ba1e60830393f8cab8e65d2ee226 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 13:34:40 +0100 Subject: [PATCH 060/246] Add poncho for blanket test coverage --- docs/_data/package.json | 6 +++++- package.json | 4 +++- test/index.html | 7 ++++--- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/_data/package.json b/docs/_data/package.json index 65b08008..81c4d6fd 100644 --- a/docs/_data/package.json +++ b/docs/_data/package.json @@ -36,12 +36,16 @@ "grunt-file-append": "0.0.6", "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", - "jquery": "^1.12.0" + "jquery": "^1.12.0", + "poncho": "^0.1.1" }, "main": "src/index", "engines": { "node": ">= 0.10.21" }, + "scripts": { + "test": "grunt test" + }, "npmName": "list.js", "npmFileMap": [ { diff --git a/package.json b/package.json index b995a085..a1a630c2 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ }, "devDependencies": { "browserify": "^13.0.0", + "codecov": "^1.0.1", "expect.js": "^0.3.1", "grunt": "^0.4.5", "grunt-cli": "^0.1.13", @@ -36,7 +37,8 @@ "grunt-file-append": "0.0.6", "grunt-mocha": "1.0.1", "grunt-shell": "^1.1.2", - "jquery": "^1.12.0" + "jquery": "^1.12.0", + "poncho": "^0.1.1" }, "main": "src/index", "engines": { diff --git a/test/index.html b/test/index.html index 89dcf54e..b55b0d04 100755 --- a/test/index.html +++ b/test/index.html @@ -2,7 +2,7 @@ List.js Mocha Tests - + -
            + + From 0b79a105305a627cd013f1627bc21858ac32dc2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 14:44:22 +0100 Subject: [PATCH 068/246] ci test --- test/index.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/index.html b/test/index.html index 19543468..6416ef8a 100755 --- a/test/index.html +++ b/test/index.html @@ -12,6 +12,11 @@ +
            - - - - - + - - + + + + From 3ea565e42ae7186e0e642e2029958984139a32ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 15:18:04 +0100 Subject: [PATCH 072/246] ci test --- test/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/index.html b/test/index.html index 6baa203a..0453b780 100755 --- a/test/index.html +++ b/test/index.html @@ -20,8 +20,9 @@ - + From fd0ad096de6028aa8da40369824fbeb78c676f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 15:45:39 +0100 Subject: [PATCH 073/246] ci test --- test/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/index.html b/test/index.html index 0453b780..3fe1f066 100755 --- a/test/index.html +++ b/test/index.html @@ -16,11 +16,10 @@ - + From ce16c9e0ccaf248f0ca0c238b62be8b73b752d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 18:10:57 +0100 Subject: [PATCH 074/246] add codecov.yml --- .codecov.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..7966f407 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,2 @@ +codecov: + branch: master From b35404a322de99259a6404363af941ad8f5297c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Jan 2017 18:11:05 +0100 Subject: [PATCH 075/246] Switch mocha --- test/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/index.html b/test/index.html index 3fe1f066..b4a2c0d0 100755 --- a/test/index.html +++ b/test/index.html @@ -15,8 +15,8 @@
            + - - + - + + diff --git a/test/usage/darth.jpeg b/__test__/usage/darth.jpeg similarity index 100% rename from test/usage/darth.jpeg rename to __test__/usage/darth.jpeg diff --git a/test/usage/leia.jpeg b/__test__/usage/leia.jpeg similarity index 100% rename from test/usage/leia.jpeg rename to __test__/usage/leia.jpeg diff --git a/test/usage/luke.jpeg b/__test__/usage/luke.jpeg similarity index 100% rename from test/usage/luke.jpeg rename to __test__/usage/luke.jpeg diff --git a/test/usage/main.js b/__test__/usage/main.js similarity index 100% rename from test/usage/main.js rename to __test__/usage/main.js diff --git a/test/usage/require.js b/__test__/usage/require.js similarity index 99% rename from test/usage/require.js rename to __test__/usage/require.js index babfa9ad..d50f25fe 100644 --- a/test/usage/require.js +++ b/__test__/usage/require.js @@ -1905,7 +1905,7 @@ var requirejs, require, define; //to a reference to this node, but clear after the DOM insertion. currentlyAddingScript = node; if (baseElement) { - head.insertBefore(node, baseElement); + head.insertbeforeAll(node, baseElement); } else { head.appendChild(node); } diff --git a/test/usage/rey.jpeg b/__test__/usage/rey.jpeg similarity index 100% rename from test/usage/rey.jpeg rename to __test__/usage/rey.jpeg diff --git a/test/usage/style.css b/__test__/usage/style.css similarity index 100% rename from test/usage/style.css rename to __test__/usage/style.css diff --git a/package.json b/package.json index a1a630c2..093fa2f1 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "email": "jonny.stromberg@gmail.com>", "url": "http://javve.com" }, - "homepage": "http://www.listjs.com", + "homepage": "http://listjs.com", "repository": "git://github.com/javve/list.js.git", "license": "MIT", "bugs": { @@ -26,26 +26,18 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "browserify": "^13.0.0", - "codecov": "^1.0.1", - "expect.js": "^0.3.1", - "grunt": "^0.4.5", - "grunt-cli": "^0.1.13", - "grunt-contrib-jshint": "^0.12.0", - "grunt-contrib-uglify": "^0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-file-append": "0.0.6", - "grunt-mocha": "1.0.1", - "grunt-shell": "^1.1.2", + "jest": "^18.1.0", "jquery": "^1.12.0", - "poncho": "^0.1.1" + "jshint": "^2.9.4", + "jshint-loader": "^0.8.3", + "webpack": "^2.2.0" }, "main": "src/index", "engines": { "node": ">= 0.10.21" }, "scripts": { - "test": "grunt test" + "test": "jest" }, "npmName": "list.js", "npmFileMap": [ @@ -55,5 +47,9 @@ "*.js" ] } - ] + ], + "jest": { + "coverageDirectory": "./coverage/", + "collectCoverage": true + } } diff --git a/src/index.js b/src/index.js index e1c13ea0..48ad4716 100644 --- a/src/index.js +++ b/src/index.js @@ -1,8 +1,4 @@ -(function( window, undefined ) { -"use strict"; - -var document = window.document, - naturalSort = require('string-natural-compare'), +var naturalSort = require('string-natural-compare'), getByClass = require('./utils/get-by-class'), extend = require('./utils/extend'), indexOf = require('./utils/index-of'), @@ -12,7 +8,7 @@ var document = window.document, getAttribute = require('./utils/get-attribute'), toArray = require('./utils/to-array'); -var List = function(id, options, values) { +module.exports = function(id, options, values) { var self = this, init, @@ -256,13 +252,3 @@ var List = function(id, options, values) { init.start(); }; - - -// AMD support -if (typeof define === 'function' && define.amd) { - define(function () { return List; }); -} -module.exports = List; -window.List = List; - -})(window); diff --git a/test/test.defaults.js b/test/test.defaults.js deleted file mode 100644 index 0f3940cf..00000000 --- a/test/test.defaults.js +++ /dev/null @@ -1,64 +0,0 @@ -describe('Defaults', function() { - var list; - - before(function() { - list = fixture.list(['name'], [ { name: 'Jonny' }]); - }); - - after(function() { - fixture.removeList(); - }); - - it('should have all default attributes', function() { - expect(list.items).to.be.an('array'); - expect(list.visibleItems).to.be.an('array'); - expect(list.matchingItems).to.be.an('array'); - - expect(list.handlers.updated).to.be.an('array'); - expect(list.handlers.searchStart).to.be.an('array'); - expect(list.handlers.searchComplete).to.be.an('array'); - expect(list.handlers.sortStart).to.be.an('array'); - expect(list.handlers.sortComplete).to.be.an('array'); - expect(list.handlers.filterStart).to.be.an('array'); - expect(list.handlers.filterComplete).to.be.an('array'); - - expect(list.searched).to.be(false); - expect(list.filtered).to.be(false); - expect(list.i).to.equal(1); - expect(list.page).to.equal(10000); - expect(list.listClass).to.equal('list'); - expect(list.sortClass).to.equal('sort'); - expect(list.searchClass).to.equal('search'); - }); - - it('should have the right elements', function() { - expect(list.list).to.equal($('.list')[0]); - expect(list.listContainer).to.equal($('#list')[0]); - }); - - it('should have all default methods', function() { - expect(list.add).to.be.a('function'); - expect(list.remove).to.be.a('function'); - expect(list.get).to.be.a('function'); - expect(list.sort).to.be.a('function'); - expect(list.search).to.be.a('function'); - expect(list.clear).to.be.a('function'); - expect(list.filter).to.be.a('function'); - expect(list.size).to.be.a('function'); - expect(list.show).to.be.a('function'); - expect(list.update).to.be.a('function'); - expect(list.on).to.be.a('function'); - }); - - it('should have all helper methods', function() { - expect(list.utils.classes).to.be.a('function'); - expect(list.utils.getAttribute).to.be.a('function'); - expect(list.utils.getByClass).to.be.a('function'); - expect(list.utils.naturalSort).to.be.a('function'); - expect(list.utils.events.bind).to.be.a('function'); - expect(list.utils.events.unbind).to.be.a('function'); - expect(list.utils.extend).to.be.a('function'); - expect(list.utils.indexOf).to.be.a('function'); - expect(list.utils.toString).to.be.a('function'); - }); -}); diff --git a/test/test.show.js b/test/test.show.js deleted file mode 100644 index eb42ddb0..00000000 --- a/test/test.show.js +++ /dev/null @@ -1,208 +0,0 @@ -describe('Show', function() { - - var list, a, b, c, d, e, f; - - before(function() { - list = fixture.list(['id', 'id2'], [ - { id: "1", id2: "a" }, - { id: "2", id2: "a" }, - { id: "3", id2: "b" }, - { id: "4", id2: "b" }, - { id: "5", id2: "bc" }, - { id: "6", id2: "bc" } - ]); - a = list.get('id', '1')[0]; - b = list.get('id', '2')[0]; - c = list.get('id', '3')[0]; - d = list.get('id', '4')[0]; - e = list.get('id', '5')[0]; - f = list.get('id', '6')[0]; - }); - - after(function() { - fixture.removeList(); - }); - - afterEach(function() { - list.filter(); - list.show(1, 200); - }); - - describe('Basics', function() { - it('should be 1, 2', function() { - list.show(1,2); - expect(list.visibleItems.length).to.equal(2); - expect(a.visible()).to.be(true); - expect(b.visible()).to.be(true); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(false); - }); - it('should show item 6', function() { - list.show(6,2); - expect(list.visibleItems.length).to.equal(1); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(true); - }); - it('should show item 1, 2, 3, 4, 5, 6', function() { - list.show(1,200); - expect(list.visibleItems.length).to.equal(6); - expect(a.visible()).to.be(true); - expect(b.visible()).to.be(true); - expect(c.visible()).to.be(true); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(true); - }); - it('should show item 3, 4, 5', function() { - list.show(3,3); - expect(list.visibleItems.length).to.equal(3); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(true); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(false); - }); - it('should show item 5, 6', function() { - list.show(5,3); - expect(list.visibleItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(true); - }); - }); - - describe('Search', function() { - afterEach(function() { - list.search(); - }); - it('should show 3, 4', function() { - list.search('b'); - list.show(1,2); - expect(list.visibleItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(true); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(false); - }); - it('should show item 3,4,5,6', function() { - list.search('b'); - list.show(1,4); - expect(list.visibleItems.length).to.equal(4); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(true); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(true); - }); - it('should not show any items but match two', function() { - list.search('a'); - list.show(3,2); - expect(list.visibleItems.length).to.equal(0); - expect(list.matchingItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(false); - }); - }); - - describe('Filter', function() { - afterEach(function() { - list.filter(); - }); - it('should show 3, 4', function() { - list.filter(function(item) { - return (item.values().id2 == 'b'); - }); - list.show(1,2); - expect(list.visibleItems.length).to.equal(2); - expect(list.matchingItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(true); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(false); - }); - it('should show item 3,4,5,6', function() { - list.filter(function(item) { - return (item.values().id2 == 'bc'); - }); - list.show(1,4); - expect(list.visibleItems.length).to.equal(2); - expect(list.matchingItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(true); - }); - it('should not show any items but match two', function() { - list.filter(function(item) { - return (item.values().id2 == 'b'); - }); - list.show(3,2); - expect(list.visibleItems.length).to.equal(0); - expect(list.matchingItems.length).to.equal(2); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(false); - expect(f.visible()).to.be(false); - }); - }); - - describe('Filter and search', function() { - afterEach(function() { - list.filter(); - }); - it('should show 4, 5', function() { - list.show(1,2); - list.filter(function(item) { - return (item.values().id > '3'); - }); - list.search('b'); - expect(list.visibleItems.length).to.equal(2); - expect(list.matchingItems.length).to.equal(3); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(true); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(false); - }); - it('should show 5, 6', function() { - list.show(1,2); - list.filter(function(item) { - return (item.values().id > '3'); - }); - list.search('b'); - list.show(2,2); - expect(list.visibleItems.length).to.equal(2); - expect(list.matchingItems.length).to.equal(3); - expect(a.visible()).to.be(false); - expect(b.visible()).to.be(false); - expect(c.visible()).to.be(false); - expect(d.visible()).to.be(false); - expect(e.visible()).to.be(true); - expect(f.visible()).to.be(true); - }); - }); -}); diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 00000000..579ba406 --- /dev/null +++ b/webpack.config.js @@ -0,0 +1,34 @@ +const webpack = require('webpack'), + PACKAGE = require('./package.json'); + +module.exports = { + entry: { + list: './src/index.js', + "list.min": './src/index.js' + }, + output: { + path: __dirname + '/dist', + filename: "[name].js", + library: 'List' + }, + module: { + rules: [{ + enforce: 'pre', + test: /\.js$/, + exclude: /(node_modules|src\/utils\/extend\.js)/, + loader: "jshint-loader" + }] + }, + devServer: { + inline: true + }, + plugins: [ + new webpack.optimize.UglifyJsPlugin({ + include: /\.min\.js$/, + minimize: true + }), + new webpack.BannerPlugin({ + banner: 'List.js v' + PACKAGE.version + ' (' + PACKAGE.homepage + ') by ' + PACKAGE.author.name + ' (' + PACKAGE.author.url + ')' + }) + ] +}; From 2683370e9184597cdc5f1c2047861b0fef2c56f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 22 Jan 2017 21:02:56 +0100 Subject: [PATCH 078/246] Update node version for circleci --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index e4558ac1..8eaa6240 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: node: - version: 0.10.48 + version: 6.9.1 test: override: From 486fcfdfa9b72320430f956ece9e4fe8e9e15e82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 22 Jan 2017 21:14:29 +0100 Subject: [PATCH 079/246] Add circleci and codecov shields to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 4f6fa8d3..be7c1b27 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Perfect library for adding **search**, **sort**, **filters** and **flexibility** Really simple and easy to use! [![Donate](https://s3.amazonaws.com/listjs/donate-coffee.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) +[![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master) +[![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js) ### Core idea - Simple and invisible From 371a5c5e2de4c44953247ecec3db7dba0bd3aa55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 16:59:26 +0100 Subject: [PATCH 080/246] Jest update tests for pagination and fuzzy search --- {test => __test__}/fixtures-fuzzysearch.js | 4 + {test => __test__}/fixtures-pagination.js | 4 + .../fuzzysearch.test.js | 30 +- __test__/pagination.test.js | 261 ++++++++++++++++++ .../usage/fuzzy-search-pagination.html | 0 test/test.pagination.js | 257 ----------------- 6 files changed, 295 insertions(+), 261 deletions(-) rename {test => __test__}/fixtures-fuzzysearch.js (94%) rename {test => __test__}/fixtures-pagination.js (97%) rename test/test.fuzzysearch.js => __test__/fuzzysearch.test.js (59%) create mode 100644 __test__/pagination.test.js rename {test => __test__}/usage/fuzzy-search-pagination.html (100%) delete mode 100644 test/test.pagination.js diff --git a/test/fixtures-fuzzysearch.js b/__test__/fixtures-fuzzysearch.js similarity index 94% rename from test/fixtures-fuzzysearch.js rename to __test__/fixtures-fuzzysearch.js index 563249c9..3d2754c9 100644 --- a/test/fixtures-fuzzysearch.js +++ b/__test__/fixtures-fuzzysearch.js @@ -1,3 +1,5 @@ +const $ = require('jquery'); + var fixtureFuzzysearch = { list: function(valueNames) { var listHtml = $(''), @@ -39,3 +41,5 @@ fixtureFuzzysearch.all = [ fixtureFuzzysearch.i9, fixtureFuzzysearch.i10 ]; + +module.exports = fixtureFuzzysearch; diff --git a/test/fixtures-pagination.js b/__test__/fixtures-pagination.js similarity index 97% rename from test/fixtures-pagination.js rename to __test__/fixtures-pagination.js index 3d7f0fea..46e6f418 100644 --- a/test/fixtures-pagination.js +++ b/__test__/fixtures-pagination.js @@ -1,3 +1,5 @@ +const $ = require('jquery'); + var fixturePagination = { list: function(valueNames) { var listHtml = $('
                '), @@ -109,3 +111,5 @@ fixturePagination.all = [ fixturePagination.asa, fixturePagination.gun ]; + +module.exports = fixturePagination; diff --git a/test/test.fuzzysearch.js b/__test__/fuzzysearch.test.js similarity index 59% rename from test/test.fuzzysearch.js rename to __test__/fuzzysearch.test.js index 15458c9c..3cec165f 100644 --- a/test/test.fuzzysearch.js +++ b/__test__/fuzzysearch.test.js @@ -1,3 +1,25 @@ +const $ = require('jquery'), + fixtureFuzzysearch = require('./fixtures-fuzzysearch'), + List = require('../src/index'); + +function fireKeyup(el) { + if (document.createEvent) { + var evObj; + if (window.KeyEvent) { + evObj = document.createEvent('KeyEvents'); + evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0); + } else { + evObj = document.createEvent('UIEvents'); + evObj.initUIEvent('keyup', true, true, window, 1); + } + el.dispatchEvent(evObj); + } else if( document.createEventObject ) { + el.fireEvent('onkeyup'); + } else { + // IE 5.0, seriously? :) + } +} + describe('Fuzzy Search', function() { var list, itemHTML, @@ -16,22 +38,22 @@ describe('Fuzzy Search', function() { }); it('should have default attribute', function() { - expect(list.fuzzySearch).to.be.a('function'); + expect(list.fuzzySearch).toBeInstanceOf(Function); }); it('should find result', function() { list.fuzzySearch('guybrush'); - expect(list.matchingItems.length).to.be(1); + expect(list.matchingItems.length).toBe(1); }); it('should find result', function() { list.fuzzySearch('g thre'); - expect(list.matchingItems.length).to.be(1); + expect(list.matchingItems.length).toBe(1); }); it('should find result', function() { list.fuzzySearch('thre'); - expect(list.matchingItems.length).to.be(4); + expect(list.matchingItems.length).toBe(4); }); describe('Search field', function() { diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js new file mode 100644 index 00000000..d06a038a --- /dev/null +++ b/__test__/pagination.test.js @@ -0,0 +1,261 @@ +const $ = require('jquery'), + fixturePagination = require('./fixtures-pagination'), + List = require('../src/index'); + +describe('Pagination', function() { + describe('Default settings, innerWindow: 2, outerWindow: 0, left: 0, right: 0', function() { + var list, + itemHTML, + pagination; + + beforeAll(function() { + itemHTML = fixturePagination.list(['name']) + list = new List('list-pagination', { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: true + }, fixturePagination.all); + + pagination = $('.pagination'); + }); + + afterAll(function() { + fixturePagination.removeList(); + }); + + it('should have default settings', function() { + expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("3"); + expect(pagination.find('a').get(3).innerHTML).toEqual("..."); + expect(pagination.find('a').get(4)).toEqual(undefined); + }); + + it('should show same pages for show(7,2) and show(8,2)', function() { + list.show(7, 2); + expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').get(0).innerHTML).toEqual("..."); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("3"); + expect(pagination.find('a').get(3).innerHTML).toEqual("4"); + expect(pagination.find('a').get(4).innerHTML).toEqual("5"); + expect(pagination.find('a').get(5).innerHTML).toEqual("6"); + expect(pagination.find('a').get(6).innerHTML).toEqual("..."); + expect(pagination.find('a').get(7)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should show same pages for show(7,2) and show(8,2)', function() { + list.show(8, 2); + expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').get(0).innerHTML).toEqual("..."); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("3"); + expect(pagination.find('a').get(3).innerHTML).toEqual("4"); + expect(pagination.find('a').get(4).innerHTML).toEqual("5"); + expect(pagination.find('a').get(5).innerHTML).toEqual("6"); + expect(pagination.find('a').get(6).innerHTML).toEqual("..."); + expect(pagination.find('a').get(7)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should test show(14,2)', function() { + list.show(14, 2); + expect(pagination.find('a').size()).toEqual(6); + expect(pagination.find('a').get(0).innerHTML).toEqual("..."); + expect(pagination.find('a').get(1).innerHTML).toEqual("5"); + expect(pagination.find('a').get(2).innerHTML).toEqual("6"); + expect(pagination.find('a').get(3).innerHTML).toEqual("7"); + expect(pagination.find('a').get(4).innerHTML).toEqual("8"); + expect(pagination.find('a').get(5).innerHTML).toEqual("9"); + expect(pagination.find('a').get(6)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should show last page with show(17,2)', function() { + list.show(17, 2); + expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').get(0).innerHTML).toEqual("..."); + expect(pagination.find('a').get(1).innerHTML).toEqual("7"); + expect(pagination.find('a').get(2).innerHTML).toEqual("8"); + expect(pagination.find('a').get(3).innerHTML).toEqual("9"); + expect(pagination.find('a').get(4)).toEqual(undefined); + expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + }); + }); + + + describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 0, right: 0', function() { + var list, + itemHTML, + pagination; + + beforeAll(function() { + itemHTML = fixturePagination.list(['name']) + list = new List('list-pagination', { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: { + innerWindow: 1, + outerWindow: 1 + } + }, fixturePagination.all); + + pagination = $('.pagination'); + }); + + afterAll(function() { + fixturePagination.removeList(); + }); + + it('should have default settings', function() { + expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("..."); + expect(pagination.find('a').get(3).innerHTML).toEqual("9"); + expect(pagination.find('a').get(4)).toEqual(undefined); + }); + + it('should test show(7,2)', function() { + list.show(7, 2); + expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("..."); + expect(pagination.find('a').get(2).innerHTML).toEqual("3"); + expect(pagination.find('a').get(3).innerHTML).toEqual("4"); + expect(pagination.find('a').get(4).innerHTML).toEqual("5"); + expect(pagination.find('a').get(5).innerHTML).toEqual("..."); + expect(pagination.find('a').get(6).innerHTML).toEqual("9"); + expect(pagination.find('a').get(7)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should test show(14,2)', function() { + list.show(14, 2); + expect(pagination.find('a').size()).toEqual(6); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("..."); + expect(pagination.find('a').get(2).innerHTML).toEqual("6"); + expect(pagination.find('a').get(3).innerHTML).toEqual("7"); + expect(pagination.find('a').get(4).innerHTML).toEqual("8"); + expect(pagination.find('a').get(5).innerHTML).toEqual("9"); + expect(pagination.find('a').get(6)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should show last page with show(17,2)', function() { + list.show(17, 2); + expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("..."); + expect(pagination.find('a').get(2).innerHTML).toEqual("8"); + expect(pagination.find('a').get(3).innerHTML).toEqual("9"); + expect(pagination.find('a').get(4)).toEqual(undefined); + expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + }); + + }); + + + describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 2, right: 1', function() { + var list, + itemHTML, + pagination; + + beforeAll(function() { + itemHTML = fixturePagination.list(['name']) + list = new List('list-pagination', { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: { + innerWindow: 1, + outerWindow: 1, + left: 2, + right: 1 + } + }, fixturePagination.all); + + pagination = $('.pagination'); + }); + + afterAll(function() { + fixturePagination.removeList(); + }); + + it('should have default settings', function() { + expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("..."); + expect(pagination.find('a').get(3).innerHTML).toEqual("9"); + expect(pagination.find('a').get(4)).toEqual(undefined); + }); + + it('should test show(7,2)', function() { + list.show(7, 2); + expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("3"); + expect(pagination.find('a').get(3).innerHTML).toEqual("4"); + expect(pagination.find('a').get(4).innerHTML).toEqual("5"); + expect(pagination.find('a').get(5).innerHTML).toEqual("..."); + expect(pagination.find('a').get(6).innerHTML).toEqual("9"); + expect(pagination.find('a').get(7)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); + }); + + it('should test show(12,2)', function() { + list.show(12, 2); + expect(pagination.find('a').size()).toEqual(8); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("..."); + expect(pagination.find('a').get(3).innerHTML).toEqual("5"); + expect(pagination.find('a').get(4).innerHTML).toEqual("6"); + expect(pagination.find('a').get(5).innerHTML).toEqual("7"); + expect(pagination.find('a').get(6).innerHTML).toEqual("..."); + expect(pagination.find('a').get(7).innerHTML).toEqual("9"); + expect(pagination.find('a').get(8)).toEqual(undefined); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true); + expect($(pagination.find('li').get(5)).hasClass('active')).toEqual(false); + }); + + it('should show last page with show(17,2)', function() { + list.show(17, 2); + expect(pagination.find('a').size()).toEqual(5); + expect(pagination.find('a').get(0).innerHTML).toEqual("1"); + expect(pagination.find('a').get(1).innerHTML).toEqual("2"); + expect(pagination.find('a').get(2).innerHTML).toEqual("..."); + expect(pagination.find('a').get(3).innerHTML).toEqual("8"); + expect(pagination.find('a').get(4).innerHTML).toEqual("9"); + expect(pagination.find('a').get(5)).toEqual(undefined); + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false); + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true); + }); + + }); +}); diff --git a/test/usage/fuzzy-search-pagination.html b/__test__/usage/fuzzy-search-pagination.html similarity index 100% rename from test/usage/fuzzy-search-pagination.html rename to __test__/usage/fuzzy-search-pagination.html diff --git a/test/test.pagination.js b/test/test.pagination.js deleted file mode 100644 index 9e384b8a..00000000 --- a/test/test.pagination.js +++ /dev/null @@ -1,257 +0,0 @@ -describe('Pagination', function() { - describe('Default settings, innerWindow: 2, outerWindow: 0, left: 0, right: 0', function() { - var list, - itemHTML, - pagination; - - before(function() { - itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: true - }, fixturePagination.all); - - pagination = $('.pagination'); - }); - - after(function() { - fixturePagination.removeList(); - }); - - it('should have default settings', function() { - expect(pagination.find('a').size()).to.equal(4); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("3"); - expect(pagination.find('a').get(3).innerHTML).to.equal("..."); - expect(pagination.find('a').get(4)).to.equal(undefined); - }); - - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(7, 2); - expect(pagination.find('a').size()).to.equal(7); - expect(pagination.find('a').get(0).innerHTML).to.equal("..."); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("3"); - expect(pagination.find('a').get(3).innerHTML).to.equal("4"); - expect(pagination.find('a').get(4).innerHTML).to.equal("5"); - expect(pagination.find('a').get(5).innerHTML).to.equal("6"); - expect(pagination.find('a').get(6).innerHTML).to.equal("..."); - expect(pagination.find('a').get(7)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(8, 2); - expect(pagination.find('a').size()).to.equal(7); - expect(pagination.find('a').get(0).innerHTML).to.equal("..."); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("3"); - expect(pagination.find('a').get(3).innerHTML).to.equal("4"); - expect(pagination.find('a').get(4).innerHTML).to.equal("5"); - expect(pagination.find('a').get(5).innerHTML).to.equal("6"); - expect(pagination.find('a').get(6).innerHTML).to.equal("..."); - expect(pagination.find('a').get(7)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should test show(14,2)', function() { - list.show(14, 2); - expect(pagination.find('a').size()).to.equal(6); - expect(pagination.find('a').get(0).innerHTML).to.equal("..."); - expect(pagination.find('a').get(1).innerHTML).to.equal("5"); - expect(pagination.find('a').get(2).innerHTML).to.equal("6"); - expect(pagination.find('a').get(3).innerHTML).to.equal("7"); - expect(pagination.find('a').get(4).innerHTML).to.equal("8"); - expect(pagination.find('a').get(5).innerHTML).to.equal("9"); - expect(pagination.find('a').get(6)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').size()).to.equal(4); - expect(pagination.find('a').get(0).innerHTML).to.equal("..."); - expect(pagination.find('a').get(1).innerHTML).to.equal("7"); - expect(pagination.find('a').get(2).innerHTML).to.equal("8"); - expect(pagination.find('a').get(3).innerHTML).to.equal("9"); - expect(pagination.find('a').get(4)).to.equal(undefined); - expect($(pagination.find('li').get(1)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - }); - }); - - - describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 0, right: 0', function() { - var list, - itemHTML, - pagination; - - before(function() { - itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: { - innerWindow: 1, - outerWindow: 1 - } - }, fixturePagination.all); - - pagination = $('.pagination'); - }); - - after(function() { - fixturePagination.removeList(); - }); - - it('should have default settings', function() { - expect(pagination.find('a').size()).to.equal(4); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("..."); - expect(pagination.find('a').get(3).innerHTML).to.equal("9"); - expect(pagination.find('a').get(4)).to.equal(undefined); - }); - - it('should test show(7,2)', function() { - list.show(7, 2); - expect(pagination.find('a').size()).to.equal(7); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("..."); - expect(pagination.find('a').get(2).innerHTML).to.equal("3"); - expect(pagination.find('a').get(3).innerHTML).to.equal("4"); - expect(pagination.find('a').get(4).innerHTML).to.equal("5"); - expect(pagination.find('a').get(5).innerHTML).to.equal("..."); - expect(pagination.find('a').get(6).innerHTML).to.equal("9"); - expect(pagination.find('a').get(7)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should test show(14,2)', function() { - list.show(14, 2); - expect(pagination.find('a').size()).to.equal(6); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("..."); - expect(pagination.find('a').get(2).innerHTML).to.equal("6"); - expect(pagination.find('a').get(3).innerHTML).to.equal("7"); - expect(pagination.find('a').get(4).innerHTML).to.equal("8"); - expect(pagination.find('a').get(5).innerHTML).to.equal("9"); - expect(pagination.find('a').get(6)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').size()).to.equal(4); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("..."); - expect(pagination.find('a').get(2).innerHTML).to.equal("8"); - expect(pagination.find('a').get(3).innerHTML).to.equal("9"); - expect(pagination.find('a').get(4)).to.equal(undefined); - expect($(pagination.find('li').get(1)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - }); - - }); - - - describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 2, right: 1', function() { - var list, - itemHTML, - pagination; - - before(function() { - itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: { - innerWindow: 1, - outerWindow: 1, - left: 2, - right: 1 - } - }, fixturePagination.all); - - pagination = $('.pagination'); - }); - - after(function() { - fixturePagination.removeList(); - }); - - it('should have default settings', function() { - expect(pagination.find('a').size()).to.equal(4); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("..."); - expect(pagination.find('a').get(3).innerHTML).to.equal("9"); - expect(pagination.find('a').get(4)).to.equal(undefined); - }); - - it('should test show(7,2)', function() { - list.show(7, 2); - expect(pagination.find('a').size()).to.equal(7); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("3"); - expect(pagination.find('a').get(3).innerHTML).to.equal("4"); - expect(pagination.find('a').get(4).innerHTML).to.equal("5"); - expect(pagination.find('a').get(5).innerHTML).to.equal("..."); - expect(pagination.find('a').get(6).innerHTML).to.equal("9"); - expect(pagination.find('a').get(7)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(false); - }); - - it('should test show(12,2)', function() { - list.show(12, 2); - expect(pagination.find('a').size()).to.equal(8); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("..."); - expect(pagination.find('a').get(3).innerHTML).to.equal("5"); - expect(pagination.find('a').get(4).innerHTML).to.equal("6"); - expect(pagination.find('a').get(5).innerHTML).to.equal("7"); - expect(pagination.find('a').get(6).innerHTML).to.equal("..."); - expect(pagination.find('a').get(7).innerHTML).to.equal("9"); - expect(pagination.find('a').get(8)).to.equal(undefined); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(true); - expect($(pagination.find('li').get(5)).hasClass('active')).to.equal(false); - }); - - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').size()).to.equal(5); - expect(pagination.find('a').get(0).innerHTML).to.equal("1"); - expect(pagination.find('a').get(1).innerHTML).to.equal("2"); - expect(pagination.find('a').get(2).innerHTML).to.equal("..."); - expect(pagination.find('a').get(3).innerHTML).to.equal("8"); - expect(pagination.find('a').get(4).innerHTML).to.equal("9"); - expect(pagination.find('a').get(5)).to.equal(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(3)).hasClass('active')).to.equal(false); - expect($(pagination.find('li').get(4)).hasClass('active')).to.equal(true); - }); - - }); -}); From 432695580da3b779e6b591f150a81a21d8be215a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 16:59:45 +0100 Subject: [PATCH 081/246] Rename docs/ package --- docs/_data/{package.json => pkg.json} | 0 docs/index.html | 2 +- docs/overview/download.html | 6 +++--- 3 files changed, 4 insertions(+), 4 deletions(-) rename docs/_data/{package.json => pkg.json} (100%) diff --git a/docs/_data/package.json b/docs/_data/pkg.json similarity index 100% rename from docs/_data/package.json rename to docs/_data/pkg.json diff --git a/docs/index.html b/docs/index.html index 30cca82d..f95d7bef 100755 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@
                -

                List.js v{{site.data.package.version}}

                +

                List.js v{{site.data.pkg.version}}

                Tiny, invisible and simple, yet powerful and incredibly fast vanilla JavaScript that adds search, sort, filters and flexibility diff --git a/docs/overview/download.html b/docs/overview/download.html index 774f54c5..5c5170f7 100644 --- a/docs/overview/download.html +++ b/docs/overview/download.html @@ -8,8 +8,8 @@

                Download

                The core thing in List.js have always been simplicity. It should require as little effort as possible to use the script and it's features.

                Via GitHub

                -Download compressed List.js   5KB with gzip
                -Download uncompressed List.js +Download compressed List.js   5KB with gzip
                +Download uncompressed List.js

                Via NPM

                npm install list.js
                @@ -18,6 +18,6 @@

                Via Bower

                bower install list.js

                Via CDNJS

                -
                <script src="//cdnjs.cloudflare.com/ajax/libs/list.js/{{site.data.package.version}}/list.min.js"></script>
                +
                <script src="//cdnjs.cloudflare.com/ajax/libs/list.js/{{site.data.pkg.version}}/list.min.js"></script>
                From 7b85f10503dfedbfc9301cbcf4da266ed7f3f2f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 17:00:43 +0100 Subject: [PATCH 082/246] Pagination fix --- src/pagination.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pagination.js b/src/pagination.js index f49fa016..ec3baaaa 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -1,5 +1,6 @@ var classes = require('./utils/classes'), - events = require('./utils/events'); + events = require('./utils/events'), + List = require('./index'); module.exports = function(list) { From 151635b70af720641b7ecc4073140d70ca81908b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 17:00:54 +0100 Subject: [PATCH 083/246] Add tests for classes utils --- __test__/utils.classes.test.js | 45 ++++++++++++++++++++++++++++++++++ src/utils/classes.js | 21 ---------------- 2 files changed, 45 insertions(+), 21 deletions(-) create mode 100644 __test__/utils.classes.test.js diff --git a/__test__/utils.classes.test.js b/__test__/utils.classes.test.js new file mode 100644 index 00000000..7ed7d0fb --- /dev/null +++ b/__test__/utils.classes.test.js @@ -0,0 +1,45 @@ +const classes = require('../src/utils/classes'); + +describe('Classes', function() { + + beforeEach(function() { + this.el = document.createElement('div') + document.body.appendChild(this.el); + }); + + afterEach(function() { + document.body.removeChild(this.el); + }); + + it('should add', function() { + classes(this.el).add('show') + expect(this.el.getAttribute('class')).toBe('show'); + }); + it('should remove', function() { + this.el.setAttribute('class', 'show'); + expect(this.el.getAttribute('class')).toBe('show'); + classes(this.el).remove('show') + expect(this.el.getAttribute('class')).toBe(''); + }); + it('should toggle', function() { + classes(this.el).toggle('show') + expect(this.el.getAttribute('class')).toBe('show'); + classes(this.el).toggle('show') + expect(this.el.getAttribute('class')).toBe(''); + }); + it('should array', function() { + this.el.setAttribute('class', 'foo bar'); + expect(classes(this.el).array()).toEqual(['foo','bar']); + }); + it('should has', function() { + expect(classes(this.el).has('show')).toBe(false); + this.el.setAttribute('class', 'show'); + expect(classes(this.el).has('show')).toBe(true); + }); + it('should contains', function() { + expect(classes(this.el).contains('show')).toBe(false); + this.el.setAttribute('class', 'show'); + expect(classes(this.el).contains('show')).toBe(true); + }); + +}); diff --git a/src/utils/classes.js b/src/utils/classes.js index d7b5430e..a48abba9 100644 --- a/src/utils/classes.js +++ b/src/utils/classes.js @@ -77,10 +77,6 @@ ClassList.prototype.add = function(name){ */ ClassList.prototype.remove = function(name){ - if ('[object RegExp]' == toString.call(name)) { - return this.removeMatching(name); - } - // classList if (this.list) { this.list.remove(name); @@ -95,23 +91,6 @@ ClassList.prototype.remove = function(name){ return this; }; -/** - * Remove all classes matching `re`. - * - * @param {RegExp} re - * @return {ClassList} - * @api private - */ - -ClassList.prototype.removeMatching = function(re){ - var arr = this.array(); - for (var i = 0; i < arr.length; i++) { - if (re.test(arr[i])) { - this.remove(arr[i]); - } - } - return this; -}; /** * Toggle class `name`, can force state via `force`. From b57c1989fa68f7d750dc396883fe7946ba5111d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 17:01:12 +0100 Subject: [PATCH 084/246] Specify what to cover in test coverage report --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 093fa2f1..2822d64d 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ ], "jest": { "coverageDirectory": "./coverage/", - "collectCoverage": true + "collectCoverage": true, + "collectCoverageFrom": ["src/*.js", "src/utils/*.js"] } } From 4651bb336f8946403e594bd0d1b80c54224ccc44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 19:37:07 +0100 Subject: [PATCH 085/246] Remove old natural sort file --- src/utils/natural-sort.js | 52 --------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 src/utils/natural-sort.js diff --git a/src/utils/natural-sort.js b/src/utils/natural-sort.js deleted file mode 100644 index 3578e12f..00000000 --- a/src/utils/natural-sort.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Natural Sort algorithm for Javascript - Version 0.8.1 - Released under MIT license - * Author: Jim Palmer (based on chunking idea from Dave Koelle) - */ -module.exports = function(a, b, opts) { - var re = /(^([+\-]?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?(?=\D|\s|$))|^0x[\da-fA-F]+$|\d+)/g, - sre = /^\s+|\s+$/g, // trim pre-post whitespace - snre = /\s+/g, // normalize all whitespace to single ' ' character - dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/, - hre = /^0x[0-9a-f]+$/i, - ore = /^0/, - options = opts || {}, - i = function(s) { - return (options.insensitive && ('' + s).toLowerCase() || '' + s).replace(sre, ''); - }, - // convert all to strings strip whitespace - x = i(a), - y = i(b), - // chunk/tokenize - xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), - yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'), - // numeric, hex or date detection - xD = parseInt(x.match(hre), 16) || (xN.length !== 1 && Date.parse(x)), - yD = parseInt(y.match(hre), 16) || xD && y.match(dre) && Date.parse(y) || null, - normChunk = function(s, l) { - // normalize spaces; find floats not starting with '0', string or 0 if not defined (Clint Priest) - return (!s.match(ore) || l == 1) && parseFloat(s) || s.replace(snre, ' ').replace(sre, '') || 0; - }, - oFxNcL, oFyNcL; - // first try and sort Hex codes or Dates - if (yD) { - if (xD < yD) { return -1; } - else if (xD > yD) { return 1; } - } - // natural sorting through split numeric strings and default strings - for(var cLoc = 0, xNl = xN.length, yNl = yN.length, numS = Math.max(xNl, yNl); cLoc < numS; cLoc++) { - oFxNcL = normChunk(xN[cLoc] || '', xNl); - oFyNcL = normChunk(yN[cLoc] || '', yNl); - // handle numeric vs string comparison - number < string - (Kyle Adams) - if (isNaN(oFxNcL) !== isNaN(oFyNcL)) { - return isNaN(oFxNcL) ? 1 : -1; - } - // if unicode use locale comparison - if (/[^\x00-\x80]/.test(oFxNcL + oFyNcL) && oFxNcL.localeCompare) { - var comp = oFxNcL.localeCompare(oFyNcL); - return comp / Math.abs(comp); - } - if (oFxNcL < oFyNcL) { return -1; } - else if (oFxNcL > oFyNcL) { return 1; } - } - return 0; -}; From 34e2ec392d2dc0edc7340cf2bb76a4861795db83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 19:37:18 +0100 Subject: [PATCH 086/246] Add tests for getByClass --- __test__/utils.get-by-class.test.js | 24 +++++++++ src/utils/get-by-class.js | 81 ++++++++++++++++------------- 2 files changed, 68 insertions(+), 37 deletions(-) create mode 100644 __test__/utils.get-by-class.test.js diff --git a/__test__/utils.get-by-class.test.js b/__test__/utils.get-by-class.test.js new file mode 100644 index 00000000..8c9f2b79 --- /dev/null +++ b/__test__/utils.get-by-class.test.js @@ -0,0 +1,24 @@ +const getByClass = require('../src/utils/get-by-class'); + +describe('GetByClass', function() { + + beforeEach(function() { + this.el = document.createElement('div') + this.el.setAttribute('class', 'foo') + document.body.appendChild(this.el); + }); + + afterEach(function() { + document.body.removeChild(this.el); + }); + + it('should use getElementsByClassName', function() { + expect(getByClass(document.body, 'foo', false, { test: true, getElementsByClassName: true}).length).toBe(1); + }); + it('should use getElementsByClassName', function() { + expect(getByClass(document.body, 'foo', false, { test: true, querySelector: true}).length).toBe(1); + }); + it('should toggle', function() { + expect(getByClass(document.body, 'foo', false, { test: true, polyfill: true}).length).toBe(1); + }); +}); diff --git a/src/utils/get-by-class.js b/src/utils/get-by-class.js index f475fd82..fd5af0ea 100644 --- a/src/utils/get-by-class.js +++ b/src/utils/get-by-class.js @@ -12,45 +12,52 @@ * @api public */ -module.exports = (function() { - if (document.getElementsByClassName) { - return function(container, className, single) { - if (single) { - return container.getElementsByClassName(className)[0]; - } else { - return container.getElementsByClassName(className); - } - }; - } else if (document.querySelector) { - return function(container, className, single) { - className = '.' + className; +var getElementsByClassName = function(container, className, single) { + if (single) { + return container.getElementsByClassName(className)[0]; + } else { + return container.getElementsByClassName(className); + } +}; + +var querySelector = function(container, className, single) { + className = '.' + className; + if (single) { + return container.querySelector(className); + } else { + return container.querySelectorAll(className); + } +}; + +var polyfill = function(container, className, single) { + var classElements = [], + tag = '*'; + + var els = container.getElementsByTagName(tag); + var elsLen = els.length; + var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); + for (var i = 0, j = 0; i < elsLen; i++) { + if ( pattern.test(els[i].className) ) { if (single) { - return container.querySelector(className); + return els[i]; } else { - return container.querySelectorAll(className); - } - }; - } else { - return function(container, className, single) { - var classElements = [], - tag = '*'; - if (container === null) { - container = document; + classElements[j] = els[i]; + j++; } - var els = container.getElementsByTagName(tag); - var elsLen = els.length; - var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); - for (var i = 0, j = 0; i < elsLen; i++) { - if ( pattern.test(els[i].className) ) { - if (single) { - return els[i]; - } else { - classElements[j] = els[i]; - j++; - } - } - } - return classElements; - }; + } + } + return classElements; +}; + +module.exports = (function() { + return function(container, className, single, options) { + options = options || {}; + if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) { + return getElementsByClassName(container, className, single); + } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) { + return querySelector(container, className, single); + } else { + return polyfill(container, className, single); + } } })(); From 72ba5ef1aacfbb29b0359127bc78829b0f9d9959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:16:26 +0100 Subject: [PATCH 087/246] Restructure and improve docs --- docs/_data/pkg.json | 26 ++- docs/_includes/author.html | 22 ++ docs/_includes/menu.html | 5 +- docs/_layouts/default.html | 5 +- docs/_sass/_docs.scss | 111 ++++++++++ docs/_sass/_menu.scss | 87 ++++++++ docs/_sass/layouts/game.scss | 88 -------- docs/_sass/layouts/start.scss | 16 -- docs/api.html | 368 ++++++++++++++++++++++++++++++++++ docs/assets/css/style.scss | 209 +------------------ docs/docs/list-api.html | 237 ---------------------- docs/docs/options.html | 92 --------- docs/index.html | 25 +-- 13 files changed, 615 insertions(+), 676 deletions(-) create mode 100644 docs/_includes/author.html create mode 100644 docs/_sass/_docs.scss create mode 100644 docs/_sass/_menu.scss delete mode 100644 docs/_sass/layouts/game.scss delete mode 100644 docs/_sass/layouts/start.scss create mode 100644 docs/api.html delete mode 100644 docs/docs/list-api.html delete mode 100644 docs/docs/options.html diff --git a/docs/_data/pkg.json b/docs/_data/pkg.json index 81c4d6fd..2822d64d 100644 --- a/docs/_data/pkg.json +++ b/docs/_data/pkg.json @@ -16,7 +16,7 @@ "email": "jonny.stromberg@gmail.com>", "url": "http://javve.com" }, - "homepage": "http://www.listjs.com", + "homepage": "http://listjs.com", "repository": "git://github.com/javve/list.js.git", "license": "MIT", "bugs": { @@ -26,25 +26,18 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "browserify": "^13.0.0", - "expect.js": "^0.3.1", - "grunt": "^0.4.5", - "grunt-cli": "^0.1.13", - "grunt-contrib-jshint": "^0.12.0", - "grunt-contrib-uglify": "^0.11.0", - "grunt-contrib-watch": "^0.6.1", - "grunt-file-append": "0.0.6", - "grunt-mocha": "1.0.1", - "grunt-shell": "^1.1.2", + "jest": "^18.1.0", "jquery": "^1.12.0", - "poncho": "^0.1.1" + "jshint": "^2.9.4", + "jshint-loader": "^0.8.3", + "webpack": "^2.2.0" }, "main": "src/index", "engines": { "node": ">= 0.10.21" }, "scripts": { - "test": "grunt test" + "test": "jest" }, "npmName": "list.js", "npmFileMap": [ @@ -54,5 +47,10 @@ "*.js" ] } - ] + ], + "jest": { + "coverageDirectory": "./coverage/", + "collectCoverage": true, + "collectCoverageFrom": ["src/*.js", "src/utils/*.js"] + } } diff --git a/docs/_includes/author.html b/docs/_includes/author.html new file mode 100644 index 00000000..77f3d928 --- /dev/null +++ b/docs/_includes/author.html @@ -0,0 +1,22 @@ +
                + +
                + +

                Hi! I'm Jonny and the author of List.js.

                +

                + I hope you like the lib. I’ve put a lot of hours into it! + Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;) +

                + + + + +
                +
                diff --git a/docs/_includes/menu.html b/docs/_includes/menu.html index b0d2aaf7..e23abaa7 100644 --- a/docs/_includes/menu.html +++ b/docs/_includes/menu.html @@ -12,11 +12,8 @@

                Overview

                Documentation

                Examples

                diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 899cea53..d64bd80e 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -57,7 +57,9 @@
                @@ -73,7 +75,6 @@ +{% include author.html %} {% include examples/annotated-example.html %} @@ -41,27 +42,3 @@

                More examples

                - - -
                - -
                - -

                Hi! I'm Jonny and the author of List.js.

                -

                - I hope you like the lib. I’ve put a lot of hours into it! - Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;) -

                - - - - -
                -
                From 42a44f9041fbcd23733d7d64509bc4b4cb4fa9ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:24:40 +0100 Subject: [PATCH 088/246] Update history.md --- History.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/History.md b/History.md index 0eac260a..855fab36 100644 --- a/History.md +++ b/History.md @@ -18,6 +18,12 @@ # Changelog +### 2017-01-29 v1.5.0 +- **[Feature]** Bundle fuzzySearch and pagination plugins into List.js + [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) +- **[Misc]** Switch from Grunt to Webpack and from Mocha to Jest + [See commit →](https://github.com/javve/list.js/commit/8376ef01b1da4b6e60a7457d628d97a803a82e14) + ### 2017-01-19 v1.4.1 - **[Bugfix]** Move string-natural-compare to dependencies instead of devDependencies [See commit →](https://github.com/javve/list.js/commit/c17162b26fd5093d3ddde01e11a3f748310d993c) From f8b7c32f231088366bbcc9037a27b5ee0adcf21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:24:46 +0100 Subject: [PATCH 089/246] Update release info --- Release.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Release.md b/Release.md index d1fb3c11..d032027f 100644 --- a/Release.md +++ b/Release.md @@ -1,9 +1,10 @@ # RELEASE 1. Update version in package.json -2. Commit "Version x.y.z" -3. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` -4. Push with `git push` -5. Push tags with `git push --tags` -6. Update links in README.md -7. `npm publish` +2. `cp package.json docs/_data/pkg.json` +3. Commit "Version x.y.z" +4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` +5. Push with `git push` +6. Push tags with `git push --tags` +7. Update links in README.md +8. `npm publish` From f3d461eb718f5cdd0e3a4873fcf46743e66c455e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:27:59 +0100 Subject: [PATCH 090/246] Fix donate link --- docs/_layouts/default.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index d64bd80e..6f849312 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -59,7 +59,7 @@
              • Javve.com
              • List.js
              • -
              • Support List.js ❤️
              • +
              • Support List.js ❤️
              • From 01ce8ea724388bc13d41c65d2383a6ef1df4a08f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:31:53 +0100 Subject: [PATCH 091/246] Update package version --- docs/_data/pkg.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_data/pkg.json b/docs/_data/pkg.json index 2822d64d..26341bbb 100644 --- a/docs/_data/pkg.json +++ b/docs/_data/pkg.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "1.4.1", + "version": "1.5.0", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", diff --git a/package.json b/package.json index 2822d64d..26341bbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "1.4.1", + "version": "1.5.0", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", From ec08234aa41299845b810f7c7640d83bbc1a0b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:32:10 +0100 Subject: [PATCH 092/246] Fix minor jshint warning --- src/utils/get-by-class.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/get-by-class.js b/src/utils/get-by-class.js index fd5af0ea..28fcb855 100644 --- a/src/utils/get-by-class.js +++ b/src/utils/get-by-class.js @@ -32,7 +32,7 @@ var querySelector = function(container, className, single) { var polyfill = function(container, className, single) { var classElements = [], tag = '*'; - + var els = container.getElementsByTagName(tag); var elsLen = els.length; var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); @@ -59,5 +59,5 @@ module.exports = (function() { } else { return polyfill(container, className, single); } - } + }; })(); From f4becdb610e68bd9fb414c0ffb566fa245a55567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:32:30 +0100 Subject: [PATCH 093/246] Update dists --- dist/list.js | 1500 +++++++++++++++++++++++++++++----------------- dist/list.min.js | 4 +- 2 files changed, 962 insertions(+), 542 deletions(-) diff --git a/dist/list.js b/dist/list.js index fbb20d6d..d40457fb 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,118 +1,516 @@ -// List.js v1.4.1 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o= 48 && code <= 57; +var index = __webpack_require__(4); + +/** + * Whitespace regexp. + */ + +var re = /\s+/; + +/** + * toString reference. + */ + +var toString = Object.prototype.toString; + +/** + * Wrap `el` in a `ClassList`. + * + * @param {Element} el + * @return {ClassList} + * @api public + */ + +module.exports = function(el){ + return new ClassList(el); +}; + +/** + * Initialize a new ClassList for `el`. + * + * @param {Element} el + * @api private + */ + +function ClassList(el) { + if (!el || !el.nodeType) { + throw new Error('A DOM element reference is required'); + } + this.el = el; + this.list = el.classList; } -function naturalCompare(a, b) { - var lengthA = (a += '').length; - var lengthB = (b += '').length; - var aIndex = 0; - var bIndex = 0; +/** + * Add class `name` if not already present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ - while (aIndex < lengthA && bIndex < lengthB) { - var charCodeA = a.charCodeAt(aIndex); - var charCodeB = b.charCodeAt(bIndex); +ClassList.prototype.add = function(name){ + // classList + if (this.list) { + this.list.add(name); + return this; + } - if (isNumberCode(charCodeA)) { - if (!isNumberCode(charCodeB)) { - return charCodeA - charCodeB; - } + // fallback + var arr = this.array(); + var i = index(arr, name); + if (!~i) arr.push(name); + this.el.className = arr.join(' '); + return this; +}; - var numStartA = aIndex; - var numStartB = bIndex; +/** + * Remove class `name` when present, or + * pass a regular expression to remove + * any which match. + * + * @param {String|RegExp} name + * @return {ClassList} + * @api public + */ - while (charCodeA === 48 && ++numStartA < lengthA) { - charCodeA = a.charCodeAt(numStartA); - } - while (charCodeB === 48 && ++numStartB < lengthB) { - charCodeB = b.charCodeAt(numStartB); - } +ClassList.prototype.remove = function(name){ + // classList + if (this.list) { + this.list.remove(name); + return this; + } - var numEndA = numStartA; - var numEndB = numStartB; + // fallback + var arr = this.array(); + var i = index(arr, name); + if (~i) arr.splice(i, 1); + this.el.className = arr.join(' '); + return this; +}; - while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) { - ++numEndA; - } - while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) { - ++numEndB; + +/** + * Toggle class `name`, can force state via `force`. + * + * For browsers that support classList, but do not support `force` yet, + * the mistake will be detected and corrected. + * + * @param {String} name + * @param {Boolean} force + * @return {ClassList} + * @api public + */ + +ClassList.prototype.toggle = function(name, force){ + // classList + if (this.list) { + if ("undefined" !== typeof force) { + if (force !== this.list.toggle(name, force)) { + this.list.toggle(name); // toggle again to correct } + } else { + this.list.toggle(name); + } + return this; + } - var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length - if (difference) { - return difference; + // fallback + if ("undefined" !== typeof force) { + if (!force) { + this.remove(name); + } else { + this.add(name); + } + } else { + if (this.has(name)) { + this.remove(name); + } else { + this.add(name); + } + } + + return this; +}; + +/** + * Return an array of classes. + * + * @return {Array} + * @api public + */ + +ClassList.prototype.array = function(){ + var className = this.el.getAttribute('class') || ''; + var str = className.replace(/^\s+|\s+$/g, ''); + var arr = str.split(re); + if ('' === arr[0]) arr.shift(); + return arr; +}; + +/** + * Check if class `name` is present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + +ClassList.prototype.has = +ClassList.prototype.contains = function(name){ + return this.list ? this.list.contains(name) : !! ~index(this.array(), name); +}; + + +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', + unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', + prefix = bind !== 'addEventListener' ? 'on' : '', + toArray = __webpack_require__(5); + +/** + * Bind `el` event `type` to `fn`. + * + * @param {Element} el, NodeList, HTMLCollection or Array + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @api public + */ + +exports.bind = function(el, type, fn, capture){ + el = toArray(el); + for ( var i = 0; i < el.length; i++ ) { + el[i][bind](prefix + type, fn, capture || false); + } +}; + +/** + * Unbind `el` event `type`'s callback `fn`. + * + * @param {Element} el, NodeList, HTMLCollection or Array + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @api public + */ + +exports.unbind = function(el, type, fn, capture){ + el = toArray(el); + for ( var i = 0; i < el.length; i++ ) { + el[i][unbind](prefix + type, fn, capture || false); + } +}; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + +module.exports = function(list) { + return function(initValues, element, notCreate) { + var item = this; + + this._values = {}; + + this.found = false; // Show if list.searched == true and this.found == true + this.filtered = false;// Show if list.filtered == true and this.filtered == true + + var init = function(initValues, element, notCreate) { + if (element === undefined) { + if (notCreate) { + item.values(initValues, notCreate); + } else { + item.values(initValues); + } + } else { + item.elm = element; + var values = list.templater.get(item, initValues); + item.values(values); } + }; - while (numStartA < numEndA) { - difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++); - if (difference) { - return difference; + this.values = function(newValues, notCreate) { + if (newValues !== undefined) { + for(var name in newValues) { + item._values[name] = newValues[name]; + } + if (notCreate !== true) { + list.templater.set(item, item.values()); } + } else { + return item._values; } + }; - aIndex = numEndA; - bIndex = numEndB; - continue; - } + this.show = function() { + list.templater.show(item); + }; - if (charCodeA !== charCodeB) { - if ( - charCodeA < alphabetIndexMapLength && - charCodeB < alphabetIndexMapLength && - alphabetIndexMap[charCodeA] !== -1 && - alphabetIndexMap[charCodeB] !== -1 - ) { - return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB]; + this.hide = function() { + list.templater.hide(item); + }; + + this.matching = function() { + return ( + (list.filtered && list.searched && item.found && item.filtered) || + (list.filtered && !list.searched && item.filtered) || + (!list.filtered && list.searched && item.found) || + (!list.filtered && !list.searched) + ); + }; + + this.visible = function() { + return (item.elm && (item.elm.parentNode == list.list)) ? true : false; + }; + + init(initValues, element, notCreate); + }; +}; + + +/***/ }), +/* 3 */ +/***/ (function(module, exports) { + +/** + * A cross-browser implementation of getElementsByClass. + * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass. + * + * Find all elements with class `className` inside `container`. + * Use `single = true` to increase performance in older browsers + * when only one element is needed. + * + * @param {String} className + * @param {Element} container + * @param {Boolean} single + * @api public + */ + +var getElementsByClassName = function(container, className, single) { + if (single) { + return container.getElementsByClassName(className)[0]; + } else { + return container.getElementsByClassName(className); + } +}; + +var querySelector = function(container, className, single) { + className = '.' + className; + if (single) { + return container.querySelector(className); + } else { + return container.querySelectorAll(className); + } +}; + +var polyfill = function(container, className, single) { + var classElements = [], + tag = '*'; + + var els = container.getElementsByTagName(tag); + var elsLen = els.length; + var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); + for (var i = 0, j = 0; i < elsLen; i++) { + if ( pattern.test(els[i].className) ) { + if (single) { + return els[i]; + } else { + classElements[j] = els[i]; + j++; } + } + } + return classElements; +}; - return charCodeA - charCodeB; +module.exports = (function() { + return function(container, className, single, options) { + options = options || {}; + if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) { + return getElementsByClassName(container, className, single); + } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) { + return querySelector(container, className, single); + } else { + return polyfill(container, className, single); } + }; +})(); - ++aIndex; - ++bIndex; + +/***/ }), +/* 4 */ +/***/ (function(module, exports) { + +var indexOf = [].indexOf; + +module.exports = function(arr, obj){ + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; } + return -1; +}; - return lengthA - lengthB; + +/***/ }), +/* 5 */ +/***/ (function(module, exports) { + +/** + * Source: https://github.com/timoxley/to-array + * + * Convert an array-like object into an `Array`. + * If `collection` is already an `Array`, then will return a clone of `collection`. + * + * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList` + * @return {Array} Naive conversion of `collection` to a new `Array`. + * @api public + */ + +module.exports = function toArray(collection) { + if (typeof collection === 'undefined') return []; + if (collection === null) return [null]; + if (collection === window) return [window]; + if (typeof collection === 'string') return [collection]; + if (isArray(collection)) return collection; + if (typeof collection.length != 'number') return [collection]; + if (typeof collection === 'function' && collection instanceof Function) return [collection]; + + var arr = []; + for (var i = 0; i < collection.length; i++) { + if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { + arr.push(collection[i]); + } + } + if (!arr.length) return []; + return arr; +}; + +function isArray(arr) { + return Object.prototype.toString.call(arr) === "[object Array]"; } -naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) { - return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase()); + +/***/ }), +/* 6 */ +/***/ (function(module, exports) { + +module.exports = function(s) { + s = (s === undefined) ? "" : s; + s = (s === null) ? "" : s; + s = s.toString(); + return s; }; -Object.defineProperties(naturalCompare, { - alphabet: { - get: function() { - return alphabet; - }, - set: function(value) { - alphabet = value; - alphabetIndexMap = []; - var i = 0; - if (alphabet) { - for (; i < alphabet.length; i++) { - alphabetIndexMap[alphabet.charCodeAt(i)] = i; - } - } - alphabetIndexMapLength = alphabetIndexMap.length; - for (i = 0; i < alphabetIndexMapLength; i++) { - if (alphabetIndexMap[i] === undefined) { - alphabetIndexMap[i] = -1; + +/***/ }), +/* 7 */ +/***/ (function(module, exports) { + +/* + * Source: https://github.com/segmentio/extend + */ + +module.exports = function extend (object) { + // Takes an unlimited number of extenders. + var args = Array.prototype.slice.call(arguments, 1); + + // For each extender, copy their properties on our object. + for (var i = 0, source; source = args[i]; i++) { + if (!source) continue; + for (var property in source) { + object[property] = source[property]; } - } - }, - }, -}); + } + + return object; +}; -module.exports = naturalCompare; -},{}],2:[function(require,module,exports){ +/***/ }), +/* 8 */ +/***/ (function(module, exports) { + module.exports = function(list) { var addAsync = function(values, callback, items) { var valuesToAdd = values.splice(0, 50); @@ -130,7 +528,11 @@ module.exports = function(list) { return addAsync; }; -},{}],3:[function(require,module,exports){ + +/***/ }), +/* 9 */ +/***/ (function(module, exports) { + module.exports = function(list) { // Add handlers @@ -161,27 +563,101 @@ module.exports = function(list) { }; }; -},{}],4:[function(require,module,exports){ -(function( window, undefined ) { -"use strict"; -var document = window.document, - naturalSort = require('string-natural-compare'), - getByClass = require('./utils/get-by-class'), - extend = require('./utils/extend'), - indexOf = require('./utils/index-of'), - events = require('./utils/events'), - toString = require('./utils/to-string'), - classes = require('./utils/classes'), - getAttribute = require('./utils/get-attribute'), - toArray = require('./utils/to-array'); +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { + + +var classes = __webpack_require__(0), + events = __webpack_require__(1), + extend = __webpack_require__(7), + toString = __webpack_require__(6), + getByClass = __webpack_require__(3), + fuzzy = __webpack_require__(19); + +module.exports = function(list, options) { + options = options || {}; + + options = extend({ + location: 0, + distance: 100, + threshold: 0.4, + multiSearch: true, + searchClass: 'fuzzy-search' + }, options); + -var List = function(id, options, values) { + + var fuzzySearch = { + search: function(searchString, columns) { + // Substract arguments from the searchString or put searchString as only argument + var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]; + + for (var k = 0, kl = list.items.length; k < kl; k++) { + fuzzySearch.item(list.items[k], columns, searchArguments); + } + }, + item: function(item, columns, searchArguments) { + var found = true; + for(var i = 0; i < searchArguments.length; i++) { + var foundArgument = false; + for (var j = 0, jl = columns.length; j < jl; j++) { + if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) { + foundArgument = true; + } + } + if(!foundArgument) { + found = false; + } + } + item.found = found; + }, + values: function(values, value, searchArgument) { + if (values.hasOwnProperty(value)) { + var text = toString(values[value]).toLowerCase(); + + if (fuzzy(text, searchArgument, options)) { + return true; + } + } + return false; + } + }; + + + events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) { + var target = e.target || e.srcElement; // IE have srcElement + list.search(target.value, fuzzySearch.search); + }); + + return function(str, columns) { + list.search(str, columns, fuzzySearch.search); + }; +}; + + +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { + +var naturalSort = __webpack_require__(18), + getByClass = __webpack_require__(3), + extend = __webpack_require__(7), + indexOf = __webpack_require__(4), + events = __webpack_require__(1), + toString = __webpack_require__(6), + classes = __webpack_require__(0), + getAttribute = __webpack_require__(17), + toArray = __webpack_require__(5); + +module.exports = function(id, options, values) { var self = this, init, - Item = require('./item')(self), - addAsync = require('./add-async')(self); + Item = __webpack_require__(2)(self), + addAsync = __webpack_require__(8)(self), + initPagination = __webpack_require__(12)(self); init = { start: function() { @@ -197,7 +673,6 @@ var List = function(id, options, values) { self.filtered = false; self.searchColumns = undefined; self.handlers = { 'updated': [] }; - self.plugins = {}; self.valueNames = []; self.utils = { getByClass: getByClass, @@ -217,16 +692,18 @@ var List = function(id, options, values) { if (!self.listContainer) { return; } self.list = getByClass(self.listContainer, self.listClass, true); - self.parse = require('./parse')(self); - self.templater = require('./templater')(self); - self.search = require('./search')(self); - self.filter = require('./filter')(self); - self.sort = require('./sort')(self); + self.parse = __webpack_require__(13)(self); + self.templater = __webpack_require__(16)(self); + self.search = __webpack_require__(14)(self); + self.filter = __webpack_require__(9)(self); + self.sort = __webpack_require__(15)(self); + self.fuzzySearch = __webpack_require__(10)(self, options.fuzzySearch); this.handlers(); this.items(); + this.pagination(); + self.update(); - this.plugins(); }, handlers: function() { for (var handler in self.handlers) { @@ -241,11 +718,17 @@ var List = function(id, options, values) { self.add(values); } }, - plugins: function() { - for (var i = 0; i < self.plugins.length; i++) { - var plugin = self.plugins[i]; - self[plugin.name] = plugin; - plugin.init(self, List); + pagination: function() { + if (options.pagination !== undefined) { + if (options.pagination === true) { + options.pagination = [{}]; + } + if (options.pagination[0] === undefined){ + options.pagination = [options.pagination]; + } + for (var i = 0, il = options.pagination.length; i < il; i++) { + initPagination(options.pagination[i]); + } } } }; @@ -422,81 +905,112 @@ var List = function(id, options, values) { }; -// AMD support -if (typeof define === 'function' && define.amd) { - define(function () { return List; }); -} -module.exports = List; -window.List = List; +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { -})(window); +var classes = __webpack_require__(0), + events = __webpack_require__(1), + List = __webpack_require__(11); -},{"./add-async":2,"./filter":3,"./item":5,"./parse":6,"./search":7,"./sort":8,"./templater":9,"./utils/classes":10,"./utils/events":11,"./utils/extend":12,"./utils/get-attribute":13,"./utils/get-by-class":14,"./utils/index-of":15,"./utils/to-array":16,"./utils/to-string":17,"string-natural-compare":1}],5:[function(require,module,exports){ module.exports = function(list) { - return function(initValues, element, notCreate) { - var item = this; - - this._values = {}; - this.found = false; // Show if list.searched == true and this.found == true - this.filtered = false;// Show if list.filtered == true and this.filtered == true - - var init = function(initValues, element, notCreate) { - if (element === undefined) { - if (notCreate) { - item.values(initValues, notCreate); - } else { - item.values(initValues); + var refresh = function(pagingList, options) { + var item, + l = list.matchingItems.length, + index = list.i, + page = list.page, + pages = Math.ceil(l / page), + currentPage = Math.ceil((index / page)), + innerWindow = options.innerWindow || 2, + left = options.left || options.outerWindow || 0, + right = options.right || options.outerWindow || 0; + + right = pages - right; + + pagingList.clear(); + for (var i = 1; i <= pages; i++) { + var className = (currentPage === i) ? "active" : ""; + + //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className); + + if (is.number(i, left, right, currentPage, innerWindow)) { + item = pagingList.add({ + page: i, + dotted: false + })[0]; + if (className) { + classes(item.elm).add(className); } - } else { - item.elm = element; - var values = list.templater.get(item, initValues); - item.values(values); + addEvent(item.elm, i, page); + } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) { + item = pagingList.add({ + page: "...", + dotted: true + })[0]; + classes(item.elm).add("disabled"); } - }; + } + }; - this.values = function(newValues, notCreate) { - if (newValues !== undefined) { - for(var name in newValues) { - item._values[name] = newValues[name]; - } - if (notCreate !== true) { - list.templater.set(item, item.values()); - } + var is = { + number: function(i, left, right, currentPage, innerWindow) { + return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow); + }, + left: function(i, left) { + return (i <= left); + }, + right: function(i, right) { + return (i > right); + }, + innerWindow: function(i, currentPage, innerWindow) { + return ( i >= (currentPage - innerWindow) && i <= (currentPage + innerWindow)); + }, + dotted: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || (this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)); + }, + dottedLeft: function(pagingList, i, left, right, currentPage, innerWindow) { + return ((i == (left + 1)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + }, + dottedRight: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + if (pagingList.items[currentPageItem-1].values().dotted) { + return false; } else { - return item._values; + return ((i == (right)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); } - }; - - this.show = function() { - list.templater.show(item); - }; - - this.hide = function() { - list.templater.hide(item); - }; - - this.matching = function() { - return ( - (list.filtered && list.searched && item.found && item.filtered) || - (list.filtered && !list.searched && item.filtered) || - (!list.filtered && list.searched && item.found) || - (!list.filtered && !list.searched) - ); - }; + } + }; - this.visible = function() { - return (item.elm && (item.elm.parentNode == list.list)) ? true : false; - }; + var addEvent = function(elm, i, page) { + events.bind(elm, 'click', function() { + list.show((i-1)*page + 1, page); + }); + }; - init(initValues, element, notCreate); + return function(options) { + var pagingList = new List(list.listContainer.id, { + listClass: options.paginationClass || 'pagination', + item: "
              • ", + valueNames: ['page', 'dotted'], + searchClass: 'pagination-search-that-is-not-supposed-to-exist', + sortClass: 'pagination-sort-that-is-not-supposed-to-exist' + }); + + list.on('updated', function() { + refresh(pagingList, options); + }); + refresh(pagingList, options); }; }; -},{}],6:[function(require,module,exports){ + +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { + module.exports = function(list) { - var Item = require('./item')(list); + var Item = __webpack_require__(2)(list); var getChildren = function(parent) { var nodes = parent.childNodes, @@ -542,7 +1056,11 @@ module.exports = function(list) { }; }; -},{"./item":5}],7:[function(require,module,exports){ + +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + module.exports = function(list) { var item, text, @@ -664,7 +1182,11 @@ module.exports = function(list) { return searchMethod; }; -},{}],8:[function(require,module,exports){ + +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + module.exports = function(list) { var buttons = { @@ -772,7 +1294,11 @@ module.exports = function(list) { return sort; }; -},{}],9:[function(require,module,exports){ + +/***/ }), +/* 16 */ +/***/ (function(module, exports) { + var Templater = function(list) { var itemSource, templater = this; @@ -919,283 +1445,40 @@ var Templater = function(list) { }; this.remove = function(item) { if (item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); - } - }; - this.show = function(item) { - templater.create(item); - list.list.appendChild(item.elm); - }; - this.hide = function(item) { - if (item.elm !== undefined && item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); - } - }; - this.clear = function() { - /* .innerHTML = ''; fucks up IE */ - if (list.list.hasChildNodes()) { - while (list.list.childNodes.length >= 1) - { - list.list.removeChild(list.list.firstChild); - } - } - }; - - init(); -}; - -module.exports = function(list) { - return new Templater(list); -}; - -},{}],10:[function(require,module,exports){ -/** - * Module dependencies. - */ - -var index = require('./index-of'); - -/** - * Whitespace regexp. - */ - -var re = /\s+/; - -/** - * toString reference. - */ - -var toString = Object.prototype.toString; - -/** - * Wrap `el` in a `ClassList`. - * - * @param {Element} el - * @return {ClassList} - * @api public - */ - -module.exports = function(el){ - return new ClassList(el); -}; - -/** - * Initialize a new ClassList for `el`. - * - * @param {Element} el - * @api private - */ - -function ClassList(el) { - if (!el || !el.nodeType) { - throw new Error('A DOM element reference is required'); - } - this.el = el; - this.list = el.classList; -} - -/** - * Add class `name` if not already present. - * - * @param {String} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.add = function(name){ - // classList - if (this.list) { - this.list.add(name); - return this; - } - - // fallback - var arr = this.array(); - var i = index(arr, name); - if (!~i) arr.push(name); - this.el.className = arr.join(' '); - return this; -}; - -/** - * Remove class `name` when present, or - * pass a regular expression to remove - * any which match. - * - * @param {String|RegExp} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.remove = function(name){ - if ('[object RegExp]' == toString.call(name)) { - return this.removeMatching(name); - } - - // classList - if (this.list) { - this.list.remove(name); - return this; - } - - // fallback - var arr = this.array(); - var i = index(arr, name); - if (~i) arr.splice(i, 1); - this.el.className = arr.join(' '); - return this; -}; - -/** - * Remove all classes matching `re`. - * - * @param {RegExp} re - * @return {ClassList} - * @api private - */ - -ClassList.prototype.removeMatching = function(re){ - var arr = this.array(); - for (var i = 0; i < arr.length; i++) { - if (re.test(arr[i])) { - this.remove(arr[i]); - } - } - return this; -}; - -/** - * Toggle class `name`, can force state via `force`. - * - * For browsers that support classList, but do not support `force` yet, - * the mistake will be detected and corrected. - * - * @param {String} name - * @param {Boolean} force - * @return {ClassList} - * @api public - */ - -ClassList.prototype.toggle = function(name, force){ - // classList - if (this.list) { - if ("undefined" !== typeof force) { - if (force !== this.list.toggle(name, force)) { - this.list.toggle(name); // toggle again to correct - } - } else { - this.list.toggle(name); - } - return this; - } - - // fallback - if ("undefined" !== typeof force) { - if (!force) { - this.remove(name); - } else { - this.add(name); - } - } else { - if (this.has(name)) { - this.remove(name); - } else { - this.add(name); - } - } - - return this; -}; - -/** - * Return an array of classes. - * - * @return {Array} - * @api public - */ - -ClassList.prototype.array = function(){ - var className = this.el.getAttribute('class') || ''; - var str = className.replace(/^\s+|\s+$/g, ''); - var arr = str.split(re); - if ('' === arr[0]) arr.shift(); - return arr; -}; - -/** - * Check if class `name` is present. - * - * @param {String} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.has = -ClassList.prototype.contains = function(name){ - return this.list ? this.list.contains(name) : !! ~index(this.array(), name); -}; - -},{"./index-of":15}],11:[function(require,module,exports){ -var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', - unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', - prefix = bind !== 'addEventListener' ? 'on' : '', - toArray = require('./to-array'); - -/** - * Bind `el` event `type` to `fn`. - * - * @param {Element} el, NodeList, HTMLCollection or Array - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @api public - */ + list.list.removeChild(item.elm); + } + }; + this.show = function(item) { + templater.create(item); + list.list.appendChild(item.elm); + }; + this.hide = function(item) { + if (item.elm !== undefined && item.elm.parentNode === list.list) { + list.list.removeChild(item.elm); + } + }; + this.clear = function() { + /* .innerHTML = ''; fucks up IE */ + if (list.list.hasChildNodes()) { + while (list.list.childNodes.length >= 1) + { + list.list.removeChild(list.list.firstChild); + } + } + }; -exports.bind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][bind](prefix + type, fn, capture || false); - } + init(); }; -/** - * Unbind `el` event `type`'s callback `fn`. - * - * @param {Element} el, NodeList, HTMLCollection or Array - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @api public - */ - -exports.unbind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][unbind](prefix + type, fn, capture || false); - } +module.exports = function(list) { + return new Templater(list); }; -},{"./to-array":16}],12:[function(require,module,exports){ -/* - * Source: https://github.com/segmentio/extend - */ - -module.exports = function extend (object) { - // Takes an unlimited number of extenders. - var args = Array.prototype.slice.call(arguments, 1); - - // For each extender, copy their properties on our object. - for (var i = 0, source; source = args[i]; i++) { - if (!source) continue; - for (var property in source) { - object[property] = source[property]; - } - } - return object; -}; +/***/ }), +/* 17 */ +/***/ (function(module, exports) { -},{}],13:[function(require,module,exports){ /** * A cross-browser implementation of getAttribute. * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath @@ -1223,116 +1506,253 @@ module.exports = function(el, attr) { return result; }; -},{}],14:[function(require,module,exports){ -/** - * A cross-browser implementation of getElementsByClass. - * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass. - * - * Find all elements with class `className` inside `container`. - * Use `single = true` to increase performance in older browsers - * when only one element is needed. - * - * @param {String} className - * @param {Element} container - * @param {Boolean} single - * @api public - */ -module.exports = (function() { - if (document.getElementsByClassName) { - return function(container, className, single) { - if (single) { - return container.getElementsByClassName(className)[0]; - } else { - return container.getElementsByClassName(className); +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var alphabet; +var alphabetIndexMap; +var alphabetIndexMapLength = 0; + +function isNumberCode(code) { + return code >= 48 && code <= 57; +} + +function naturalCompare(a, b) { + var lengthA = (a += '').length; + var lengthB = (b += '').length; + var aIndex = 0; + var bIndex = 0; + + while (aIndex < lengthA && bIndex < lengthB) { + var charCodeA = a.charCodeAt(aIndex); + var charCodeB = b.charCodeAt(bIndex); + + if (isNumberCode(charCodeA)) { + if (!isNumberCode(charCodeB)) { + return charCodeA - charCodeB; } - }; - } else if (document.querySelector) { - return function(container, className, single) { - className = '.' + className; - if (single) { - return container.querySelector(className); - } else { - return container.querySelectorAll(className); + + var numStartA = aIndex; + var numStartB = bIndex; + + while (charCodeA === 48 && ++numStartA < lengthA) { + charCodeA = a.charCodeAt(numStartA); } - }; - } else { - return function(container, className, single) { - var classElements = [], - tag = '*'; - if (container === null) { - container = document; + while (charCodeB === 48 && ++numStartB < lengthB) { + charCodeB = b.charCodeAt(numStartB); } - var els = container.getElementsByTagName(tag); - var elsLen = els.length; - var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); - for (var i = 0, j = 0; i < elsLen; i++) { - if ( pattern.test(els[i].className) ) { - if (single) { - return els[i]; - } else { - classElements[j] = els[i]; - j++; - } + + var numEndA = numStartA; + var numEndB = numStartB; + + while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) { + ++numEndA; + } + while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) { + ++numEndB; + } + + var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length + if (difference) { + return difference; + } + + while (numStartA < numEndA) { + difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++); + if (difference) { + return difference; } } - return classElements; - }; - } -})(); -},{}],15:[function(require,module,exports){ -var indexOf = [].indexOf; + aIndex = numEndA; + bIndex = numEndB; + continue; + } -module.exports = function(arr, obj){ - if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { - if (arr[i] === obj) return i; + if (charCodeA !== charCodeB) { + if ( + charCodeA < alphabetIndexMapLength && + charCodeB < alphabetIndexMapLength && + alphabetIndexMap[charCodeA] !== -1 && + alphabetIndexMap[charCodeB] !== -1 + ) { + return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB]; + } + + return charCodeA - charCodeB; + } + + ++aIndex; + ++bIndex; } - return -1; + + return lengthA - lengthB; +} + +naturalCompare.caseInsensitive = naturalCompare.i = function(a, b) { + return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase()); }; -},{}],16:[function(require,module,exports){ -/** - * Source: https://github.com/timoxley/to-array - * - * Convert an array-like object into an `Array`. - * If `collection` is already an `Array`, then will return a clone of `collection`. - * - * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList` - * @return {Array} Naive conversion of `collection` to a new `Array`. - * @api public - */ +Object.defineProperties(naturalCompare, { + alphabet: { + get: function() { + return alphabet; + }, + set: function(value) { + alphabet = value; + alphabetIndexMap = []; + var i = 0; + if (alphabet) { + for (; i < alphabet.length; i++) { + alphabetIndexMap[alphabet.charCodeAt(i)] = i; + } + } + alphabetIndexMapLength = alphabetIndexMap.length; + for (i = 0; i < alphabetIndexMapLength; i++) { + if (alphabetIndexMap[i] === undefined) { + alphabetIndexMap[i] = -1; + } + } + }, + }, +}); -module.exports = function toArray(collection) { - if (typeof collection === 'undefined') return []; - if (collection === null) return [null]; - if (collection === window) return [window]; - if (typeof collection === 'string') return [collection]; - if (isArray(collection)) return collection; - if (typeof collection.length != 'number') return [collection]; - if (typeof collection === 'function' && collection instanceof Function) return [collection]; +module.exports = naturalCompare; - var arr = []; - for (var i = 0; i < collection.length; i++) { - if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { - arr.push(collection[i]); + +/***/ }), +/* 19 */ +/***/ (function(module, exports) { + +module.exports = function(text, pattern, options) { + // Aproximately where in the text is the pattern expected to be found? + var Match_Location = options.location || 0; + + //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. + var Match_Distance = options.distance || 100; + + // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. + var Match_Threshold = options.threshold || 0.4; + + if (pattern === text) return true; // Exact match + if (pattern.length > 32) return false; // This algorithm cannot be used + + // Set starting location at beginning text and initialise the alphabet. + var loc = Match_Location, + s = (function() { + var q = {}, + i; + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] = 0; + } + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1); + } + + return q; + }()); + + // Compute and return the score for a match with e errors and x location. + // Accesses loc and pattern through being a closure. + + function match_bitapScore_(e, x) { + var accuracy = e / pattern.length, + proximity = Math.abs(loc - x); + + if (!Match_Distance) { + // Dodge divide by zero error. + return proximity ? 1.0 : accuracy; + } + return accuracy + (proximity / Match_Distance); } - } - if (!arr.length) return []; - return arr; -}; -function isArray(arr) { - return Object.prototype.toString.call(arr) === "[object Array]"; -} + var score_threshold = Match_Threshold, // Highest score beyond which we give up. + best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup) -},{}],17:[function(require,module,exports){ -module.exports = function(s) { - s = (s === undefined) ? "" : s; - s = (s === null) ? "" : s; - s = s.toString(); - return s; + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); + // What about in the other direction? (speedup) + best_loc = text.lastIndexOf(pattern, loc + pattern.length); + + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); + } + } + + // Initialise the bit arrays. + var matchmask = 1 << (pattern.length - 1); + best_loc = -1; + + var bin_min, bin_mid; + var bin_max = pattern.length + text.length; + var last_rd; + for (var d = 0; d < pattern.length; d++) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from 'loc' we can stray at this + // error level. + bin_min = 0; + bin_mid = bin_max; + while (bin_min < bin_mid) { + if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { + bin_min = bin_mid; + } else { + bin_max = bin_mid; + } + bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); + } + // Use the result from this iteration as the maximum for the next. + bin_max = bin_mid; + var start = Math.max(1, loc - bin_mid + 1); + var finish = Math.min(loc + bin_mid, text.length) + pattern.length; + + var rd = Array(finish + 2); + rd[finish + 1] = (1 << d) - 1; + for (var j = finish; j >= start; j--) { + // The alphabet (s) is a sparse hash, so the following line generates + // warnings. + var charMatch = s[text.charAt(j - 1)]; + if (d === 0) { // First pass: exact match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; + } else { // Subsequent passes: fuzzy match. + rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | + (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | + last_rd[j + 1]; + } + if (rd[j] & matchmask) { + var score = match_bitapScore_(d, j - 1); + // This match will almost certainly be better than any existing match. + // But check anyway. + if (score <= score_threshold) { + // Told you so. + score_threshold = score; + best_loc = j - 1; + if (best_loc > loc) { + // When passing loc, don't exceed our current distance from loc. + start = Math.max(1, 2 * loc - best_loc); + } else { + // Already passed loc, downhill from here on in. + break; + } + } + } + } + // No hope for a (better) match at greater error levels. + if (match_bitapScore_(d + 1, loc) > score_threshold) { + break; + } + last_rd = rd; + } + + return (best_loc < 0) ? false : true; }; -},{}]},{},[4]); + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/dist/list.min.js b/dist/list.min.js index 146b4f74..3cb27373 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,2 +1,2 @@ -// List.js v1.4.1 (http://www.listjs.com) by Jonny Strömberg (http://javve.com) -!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;dr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;nv.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,"click",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||"pagination",item:"
              • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&"function"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),""===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&o("")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r]/g.exec(e)){var s=document.createElement("tbody");return s.innerHTML=e,s.firstChild}if(e.indexOf("<")!==-1){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s=48&&t<=57}function i(t,e){for(var r=(t+="").length,i=(e+="").length,s=0,l=0;s32)return!1;var o=i,l=function(){var t,r={};for(t=0;t=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]); \ No newline at end of file From 222a0fb5c97134a0de56df387ec3d927e615a361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 29 Jan 2017 21:33:59 +0100 Subject: [PATCH 094/246] Update links --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a0c9944b..8d4ab3f7 100644 --- a/README.md +++ b/README.md @@ -35,11 +35,11 @@ npm install list.js ``` ##### Via CDNJS ```html - + ``` ##### Via Direct Download -- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.min.js) -- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.4.1/dist/list.js) +- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js) +- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js) ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) From 8b406b4ec4bced8cccde14c2cb26040fbde1d160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Wed, 1 Feb 2017 21:10:19 +0100 Subject: [PATCH 095/246] fix typo --- docs/docs/plugins/fuzzysearch.html | 8 ++------ docs/docs/plugins/pagination.html | 7 +------ 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/docs/docs/plugins/fuzzysearch.html b/docs/docs/plugins/fuzzysearch.html index 6c04fdc7..0d5fb35f 100644 --- a/docs/docs/plugins/fuzzysearch.html +++ b/docs/docs/plugins/fuzzysearch.html @@ -15,13 +15,9 @@

                Via GitHub

                Via Bower

                bower install list.fuzzysearch.js
                -

                Via Component

                -
                component install javve/list.fuzzysearch.js
                - - <% /*

                Via CDNJS

                -
                <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/list.fuzzysearch.js/0.1.0/list.fuzzysearch.min.js" />
                - */ %> +
                <script src="//cdnjs.cloudflare.com/ajax/libs/list.fuzzysearch.js/0.1.0/list.fuzzysearch.min.js"></script>
                +

                The difference between Fuzzy Search and List.js default search

                The default search will conduct a time efficient search for an exact match in the content searched, while the fuzzy search will render results depending on if they are included anywhere in the content.

                diff --git a/docs/docs/plugins/pagination.html b/docs/docs/plugins/pagination.html index 9dfab5de..4d1a3293 100644 --- a/docs/docs/plugins/pagination.html +++ b/docs/docs/plugins/pagination.html @@ -15,13 +15,8 @@

                Via GitHub

                Via Bower

                bower install list.pagination.js
                -

                Via Component

                -
                component install javve/list.pagination.js
                - - <% /*

                Via CDNJS

                -
                <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" />
                - */ %> +
                <script src="//cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js"></script>

                Basic example

                <div id="listId">
                
                From b3db0de731d436422e016b5e17f7ceab5941cd5d Mon Sep 17 00:00:00 2001
                From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= 
                Date: Sat, 4 Feb 2017 14:52:27 +0100
                Subject: [PATCH 096/246] Fix #469
                
                ---
                 __test__/pagination.test.js |  8 ++++++++
                 src/pagination.js           | 10 +++++++++-
                 2 files changed, 17 insertions(+), 1 deletion(-)
                
                diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js
                index d06a038a..ca988382 100644
                --- a/__test__/pagination.test.js
                +++ b/__test__/pagination.test.js
                @@ -92,6 +92,14 @@ describe('Pagination', function() {
                       expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false);
                       expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true);
                     });
                +
                +    it('should handle page = 0', function() {
                +      expect(pagination.is(':visible')).toBe(true);
                +      list.show(0, 0);
                +      expect(pagination.is(':visible')).toBe(false);
                +      list.show(1, 1);
                +      expect(pagination.is(':visible')).toBe(true);
                +    });
                   });
                 
                 
                diff --git a/src/pagination.js b/src/pagination.js
                index ec3baaaa..1ef314a1 100644
                --- a/src/pagination.js
                +++ b/src/pagination.js
                @@ -3,8 +3,17 @@ var classes = require('./utils/classes'),
                   List = require('./index');
                 
                 module.exports = function(list) {
                +  var isHidden = false;
                 
                   var refresh = function(pagingList, options) {
                +    if (list.page < 1) {
                +      list.listContainer.style.display = 'none';
                +      isHidden = true
                +      return;
                +    } else if (isHidden){
                +      list.listContainer.style.display = 'block';
                +    }
                +
                     var item,
                       l = list.matchingItems.length,
                       index = list.i,
                @@ -16,7 +25,6 @@ module.exports = function(list) {
                       right = options.right || options.outerWindow || 0;
                 
                     right = pages - right;
                -
                     pagingList.clear();
                     for (var i = 1; i <= pages; i++) {
                       var className = (currentPage === i) ? "active" : "";
                
                From 7610c59039f3b39f52175cd1a200e935664869e8 Mon Sep 17 00:00:00 2001
                From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= 
                Date: Sat, 4 Feb 2017 15:17:13 +0100
                Subject: [PATCH 097/246] One listener per pagination look for data attributes
                 instead
                
                Useful for #452
                ---
                 src/pagination.js | 18 ++++++++++--------
                 1 file changed, 10 insertions(+), 8 deletions(-)
                
                diff --git a/src/pagination.js b/src/pagination.js
                index 1ef314a1..a58b2ffa 100644
                --- a/src/pagination.js
                +++ b/src/pagination.js
                @@ -8,7 +8,7 @@ module.exports = function(list) {
                   var refresh = function(pagingList, options) {
                     if (list.page < 1) {
                       list.listContainer.style.display = 'none';
                -      isHidden = true
                +      isHidden = true;
                       return;
                     } else if (isHidden){
                       list.listContainer.style.display = 'block';
                @@ -39,7 +39,8 @@ module.exports = function(list) {
                         if (className) {
                           classes(item.elm).add(className);
                         }
                -        addEvent(item.elm, i, page);
                +        item.elm.firstChild.setAttribute('data-i', i);
                +        item.elm.firstChild.setAttribute('data-page', page);
                       } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {
                         item = pagingList.add({
                           page: "...",
                @@ -78,12 +79,6 @@ module.exports = function(list) {
                     }
                   };
                 
                -  var addEvent = function(elm, i, page) {
                -     events.bind(elm, 'click', function() {
                -       list.show((i-1)*page + 1, page);
                -     });
                -  };
                -
                   return function(options) {
                     var pagingList = new List(list.listContainer.id, {
                       listClass: options.paginationClass || 'pagination',
                @@ -93,6 +88,13 @@ module.exports = function(list) {
                       sortClass: 'pagination-sort-that-is-not-supposed-to-exist'
                     });
                 
                +    events.bind(pagingList.listContainer, 'click', function(e) {
                +      var target = e.target || e.srcElement
                +        , page = list.utils.getAttribute(target, 'data-page')
                +        , i = list.utils.getAttribute(target, 'data-i');
                +      list.show((i-1)*page + 1, page);
                +    });
                +
                     list.on('updated', function() {
                       refresh(pagingList, options);
                     });
                
                From 6c3714ddbebf1385be874395ee07da26384993e6 Mon Sep 17 00:00:00 2001
                From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= 
                Date: Sat, 4 Feb 2017 15:52:30 +0100
                Subject: [PATCH 098/246] Add faq
                
                ---
                 docs/_includes/menu.html |  1 +
                 docs/_sass/_docs.scss    |  2 +-
                 docs/faq.html            | 25 +++++++++++++++++++++++++
                 3 files changed, 27 insertions(+), 1 deletion(-)
                 create mode 100644 docs/faq.html
                
                diff --git a/docs/_includes/menu.html b/docs/_includes/menu.html
                index e23abaa7..76c1b441 100644
                --- a/docs/_includes/menu.html
                +++ b/docs/_includes/menu.html
                @@ -14,6 +14,7 @@ 

                Documentation

              • Getting started
              • List API
              • Item API
              • +
              • FAQ
              • Examples

                diff --git a/docs/_sass/_docs.scss b/docs/_sass/_docs.scss index 3cd8a95d..04a99b25 100644 --- a/docs/_sass/_docs.scss +++ b/docs/_sass/_docs.scss @@ -72,7 +72,7 @@ pre { background-color: $lightGrey; padding:20px 30px; - margin:0 -30px 5px; + margin:0 -30px 1px; code { background-color: transparent; } diff --git a/docs/faq.html b/docs/faq.html new file mode 100644 index 00000000..e26192ea --- /dev/null +++ b/docs/faq.html @@ -0,0 +1,25 @@ +--- +layout: default +title: List FAQ +--- + +

                List FAQ

                + +

                Questions

                + +

                + +

                + + I want to have a search field outside the list container. +

                +
                <input id="search-field" />
                +<div id="container"> ... </div>
                +
                var listObj = new List('container', options);
                +
                +$('#search-field').on('keyup', function() {
                +  var searchString = $(this).val();
                +  listObj.search(searchString);
                +});
                From 92027a304ae5071ef83f206a407d0dbcdfedd85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 4 Feb 2017 17:28:31 +0100 Subject: [PATCH 099/246] Add version badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 8d4ab3f7..72a3ab12 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Perfect library for adding **search**, **sort**, **filters** and **flexibility** Really simple and easy to use! [![Donate](https://s3.amazonaws.com/listjs/donate-coffee.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) +[![npm version](https://badge.fury.io/js/list.js.svg)](https://badge.fury.io/js/list.js) [![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master) [![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js) From 995a09d253aa0b571d68998cda9e0006f02e1364 Mon Sep 17 00:00:00 2001 From: Victor Gaspar Date: Wed, 8 Mar 2017 10:00:03 -0500 Subject: [PATCH 100/246] Avoid CSP violation when using pagination due to inline javascript --- src/pagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pagination.js b/src/pagination.js index a58b2ffa..a1e2ad0a 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -82,7 +82,7 @@ module.exports = function(list) { return function(options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: "
              • ", + item: "
              • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist' From 5a2cb2a550a8c1a55f555ba39e21be6134958b9d Mon Sep 17 00:00:00 2001 From: Victor Gaspar Date: Wed, 8 Mar 2017 11:08:46 -0500 Subject: [PATCH 101/246] Click on pagination dots, null attribute --- src/pagination.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pagination.js b/src/pagination.js index a1e2ad0a..69e9f5e7 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -92,7 +92,9 @@ module.exports = function(list) { var target = e.target || e.srcElement , page = list.utils.getAttribute(target, 'data-page') , i = list.utils.getAttribute(target, 'data-i'); - list.show((i-1)*page + 1, page); + if(i){ + list.show((i-1)*page + 1, page); + } }); list.on('updated', function() { From 4bf6e9c3dfb79230842a0cda20388cb540f52132 Mon Sep 17 00:00:00 2001 From: Jack Evans Date: Wed, 29 Mar 2017 14:07:57 +0100 Subject: [PATCH 102/246] Remove duplicate list property The list property was duplicates in the docs --- docs/api.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/api.html b/docs/api.html index e4bbd1d2..bce6f5ce 100644 --- a/docs/api.html +++ b/docs/api.html @@ -193,13 +193,6 @@

                Properties

                Returns true if there is an active filter.

                -
              • -

                - list - Element
                - The element containing all items. -

                -
              • Methods

                From 274f229013569356252870789aadb1fc44109649 Mon Sep 17 00:00:00 2001 From: Sayz Lim Date: Fri, 16 Jun 2017 16:03:13 +0700 Subject: [PATCH 103/246] Update Carbon Ad Code Replace legacy Carbon ad code with the new version that is whitelisted from https://adblockplus.org/ --- docs/_includes/carbon.html | 5 +-- docs/_sass/_carbonads.scss | 79 +++++++++++++++++++++++++++++--------- 2 files changed, 62 insertions(+), 22 deletions(-) diff --git a/docs/_includes/carbon.html b/docs/_includes/carbon.html index 4b97b881..aa09f87f 100644 --- a/docs/_includes/carbon.html +++ b/docs/_includes/carbon.html @@ -1,4 +1 @@ -
                - + diff --git a/docs/_sass/_carbonads.scss b/docs/_sass/_carbonads.scss index 359aa46d..8c98d2cf 100644 --- a/docs/_sass/_carbonads.scss +++ b/docs/_sass/_carbonads.scss @@ -1,5 +1,5 @@ @keyframes fadein { - from { + from { transform: translateY(100%); opacity: 0; } @@ -9,7 +9,7 @@ } } @-moz-keyframes fadein { - from { + from { transform: translateY(100%); opacity: 0; } @@ -19,7 +19,7 @@ } } @-webkit-keyframes fadein { - from { + from { transform: translateY(100%); opacity: 0; } @@ -29,7 +29,7 @@ } } @-ms-keyframes fadein { - from { + from { transform: translateY(100%); opacity: 0; } @@ -39,7 +39,7 @@ } } @-o-keyframes fadein { - from { + from { transform: translateY(100%); opacity: 0; } @@ -49,23 +49,66 @@ } } -#carbonads-container { +#carbonads { position: fixed; z-index: 10000; - right:0; - bottom:0; - opacity:0; + right: 0; + bottom: 0; + opacity: 0; transform: translateY(100%); -webkit-animation: fadein 1s 2s forwards; - -moz-animation: fadein 1s 2s forwards; - -ms-animation: fadein 1s 2s forwards; - -o-animation: fadein 1s 2s forwards; - animation: fadein 1s 2s forwards + -moz-animation: fadein 1s 2s forwards; + -ms-animation: fadein 1s 2s forwards; + -o-animation: fadein 1s 2s forwards; + animation: fadein 1s 2s forwards } -.carbonad { - background-image:none !important; - background-color:rgba(253, 253, 253, 0.88) !important; - border:none !important; - border-top-left-radius: 5px !important; +#carbonads { + display: block; + overflow: hidden; + padding: 1em; + background-color: hsla(0, 0%, 100%, .88); + max-width: 330px; + box-shadow: 0 0 1px 0 hsla(0, 0%, 0%, .6); + font-size: 14px; + border-top-left-radius: 4px; + line-height: 1.5; +} + +#carbonads a { + text-decoration: none; +} + +#carbonads span { + position: relative; + display: block; + overflow: hidden; +} + +.carbon-img { + float: left; + margin-right: 1em; +} + +.carbon-img img { + display: block; +} + +.carbon-text { + display: block; + float: left; + max-width: calc(100% - 130px - 1em); + text-align: left; +} + +.carbon-poweredby { + position: absolute; + right: 0; + bottom: 0; + display: block; + font-size: 10px; + color: hsl(0, 0%, 60%); + text-transform: uppercase; + line-height: 1; + letter-spacing: 1px; } From dfc930e2f1b93bef1aec275caaaecf84a66189c6 Mon Sep 17 00:00:00 2001 From: Lukas Drgon Date: Tue, 10 Oct 2017 19:04:35 +0200 Subject: [PATCH 104/246] Add jsDelivr hits badge --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 72a3ab12..16573c40 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Really simple and easy to use! [![npm version](https://badge.fury.io/js/list.js.svg)](https://badge.fury.io/js/list.js) [![CircleCI](https://circleci.com/gh/javve/list.js/tree/master.svg?style=shield)](https://circleci.com/gh/javve/list.js/tree/master) [![codecov](https://codecov.io/gh/javve/list.js/branch/master/graph/badge.svg)](https://codecov.io/gh/javve/list.js) +[![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/list.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/list.js) ### Core idea - Simple and invisible From 4e66c9d2a292720ce9b37405d8624b39869e58da Mon Sep 17 00:00:00 2001 From: Alex Olshansky Date: Fri, 17 Nov 2017 16:02:23 +0100 Subject: [PATCH 105/246] Fix typos in error message --- src/templater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templater.js b/src/templater.js index fb70ad33..ba37138f 100644 --- a/src/templater.js +++ b/src/templater.js @@ -132,7 +132,7 @@ var Templater = function(list) { return false; } if (itemSource === undefined) { - throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); } /* If item source does not exists, use the first item in list as source for new items */ From 6053bbce89f200ae58dbb66e764e5ad7f24d4ac8 Mon Sep 17 00:00:00 2001 From: Alex Olshansky Date: Fri, 17 Nov 2017 16:02:23 +0100 Subject: [PATCH 106/246] Fix typos in error message --- src/templater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templater.js b/src/templater.js index fb70ad33..ba37138f 100644 --- a/src/templater.js +++ b/src/templater.js @@ -132,7 +132,7 @@ var Templater = function(list) { return false; } if (itemSource === undefined) { - throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); } /* If item source does not exists, use the first item in list as source for new items */ From b6a826de95a1c590956dce57c8ae17505c6ec6c5 Mon Sep 17 00:00:00 2001 From: Eoghan Hynes Date: Thu, 4 Jan 2018 12:19:20 +0000 Subject: [PATCH 107/246] Fix adding to list asynchronously --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 887019ff..a97f1018 100644 --- a/src/index.js +++ b/src/index.js @@ -119,7 +119,7 @@ module.exports = function(id, options, values) { return; } if (callback) { - addAsync(values, callback); + addAsync(values.slice(0), callback); return; } var added = [], From dd5778092e4fe6decc14d7b67179b7e79a113150 Mon Sep 17 00:00:00 2001 From: Berkhan Berkdemir <24360355+BerkhanBerkdemir@users.noreply.github.com> Date: Fri, 5 Jan 2018 19:07:34 -0800 Subject: [PATCH 108/246] Update README.md Changed license date --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72a3ab12..0abed50a 100644 --- a/README.md +++ b/README.md @@ -78,5 +78,5 @@ npm install list.js ## License (MIT) -Copyright (c) 2012-2017 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> +Copyright (c) 2011-2018 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> [http://javve.com](http://javve.com) From 43401725d91d59f5bded368f921f4e9cc7c88dfa Mon Sep 17 00:00:00 2001 From: Berkhan Berkdemir <24360355+BerkhanBerkdemir@users.noreply.github.com> Date: Fri, 5 Jan 2018 19:07:34 -0800 Subject: [PATCH 109/246] Update README.md Changed license date --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 72a3ab12..0abed50a 100644 --- a/README.md +++ b/README.md @@ -78,5 +78,5 @@ npm install list.js ## License (MIT) -Copyright (c) 2012-2017 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> +Copyright (c) 2011-2018 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> [http://javve.com](http://javve.com) From d17b28000eca1942c1fc5425b40f535b6806169d Mon Sep 17 00:00:00 2001 From: Berkhan Berkdemir <24360355+BerkhanBerkdemir@users.noreply.github.com> Date: Fri, 5 Jan 2018 19:08:39 -0800 Subject: [PATCH 110/246] Update LICENSE Now LICENSE is up to date. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 20b618d1..42c01042 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2011-2014 Jonny Strömberg, jonnystromberg.com +Copyright (c) 2011-2018 Jonny Strömberg, jonnystromberg.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 8f5dfef9819b959f8c5d2d4332af3a9f267501af Mon Sep 17 00:00:00 2001 From: Berkhan Berkdemir <24360355+BerkhanBerkdemir@users.noreply.github.com> Date: Fri, 5 Jan 2018 19:08:39 -0800 Subject: [PATCH 111/246] Update LICENSE Now LICENSE is up to date. --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 20b618d1..42c01042 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2011-2014 Jonny Strömberg, jonnystromberg.com +Copyright (c) 2011-2018 Jonny Strömberg, jonnystromberg.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 42d517d77ff1dab8049e6bd6676f9f7e2ebb3e7a Mon Sep 17 00:00:00 2001 From: dbrw Date: Thu, 12 Apr 2018 14:27:49 +0700 Subject: [PATCH 112/246] Custom pagination item capability You can add pagination custom item with this PR. --- src/pagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pagination.js b/src/pagination.js index 69e9f5e7..fc55c4f2 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -82,7 +82,7 @@ module.exports = function(list) { return function(options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: "
              • ", + item: options.item || "
              • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist' From ae1d45fa479e3d643836529067499bdcb9f1ab69 Mon Sep 17 00:00:00 2001 From: Jeremy Peters Date: Mon, 14 May 2018 13:58:21 +0200 Subject: [PATCH 113/246] Documentation correction --- docs/docs/fuzzysearch.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/fuzzysearch.html b/docs/docs/fuzzysearch.html index 31829c64..394305ec 100644 --- a/docs/docs/fuzzysearch.html +++ b/docs/docs/fuzzysearch.html @@ -77,10 +77,10 @@

                Implementation

                var listObj = new List('list-id', options); // Search manually -listObj.fuzzySearch.search('my search'); +listObj.fuzzySearch('my search'); // Search manually on specific columns -listObj.fuzzySearch.search('my search', [ 'name' ]); +listObj.fuzzySearch('my search', [ 'name' ]); </script>
                From fcc34e898c8ca0ce6d981102911df48c908284e3 Mon Sep 17 00:00:00 2001 From: Jeremy Peters Date: Mon, 14 May 2018 13:58:21 +0200 Subject: [PATCH 114/246] Documentation correction --- docs/docs/fuzzysearch.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/fuzzysearch.html b/docs/docs/fuzzysearch.html index 31829c64..394305ec 100644 --- a/docs/docs/fuzzysearch.html +++ b/docs/docs/fuzzysearch.html @@ -77,10 +77,10 @@

                Implementation

                var listObj = new List('list-id', options); // Search manually -listObj.fuzzySearch.search('my search'); +listObj.fuzzySearch('my search'); // Search manually on specific columns -listObj.fuzzySearch.search('my search', [ 'name' ]); +listObj.fuzzySearch('my search', [ 'name' ]); </script> From d565b6667eb8cc854b4a7643cb13c7fa200099a8 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 17 Jun 2018 22:09:15 +0200 Subject: [PATCH 115/246] Update devDependencies --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 26341bbb..b3145d19 100644 --- a/package.json +++ b/package.json @@ -26,11 +26,11 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "jest": "^18.1.0", - "jquery": "^1.12.0", + "jest": "^19.0.2", + "jquery": "^2.2.4", "jshint": "^2.9.4", - "jshint-loader": "^0.8.3", - "webpack": "^2.2.0" + "jshint-loader": "^0.8.4", + "webpack": "^3.12.0" }, "main": "src/index", "engines": { From c5171783d050cfaa25acc51c766f638ab0aa745e Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sat, 4 Aug 2018 23:31:38 +0200 Subject: [PATCH 116/246] Update `jquery` devDependency --- __test__/create.test.js | 18 +++++++++--------- __test__/item.test.js | 8 ++++---- __test__/pagination.test.js | 26 +++++++++++++------------- __test__/parse.test.js | 2 +- package.json | 2 +- 5 files changed, 28 insertions(+), 28 deletions(-) diff --git a/__test__/create.test.js b/__test__/create.test.js index c30d607a..6593b9d6 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -16,13 +16,13 @@ describe('Create', function() { it('should contain one item', function() { expect(list.items.length).toEqual(1); - expect(listEl.find('li').size()).toEqual(1); + expect(listEl.find('li').length).toEqual(1); }); it('should contain two items', function() { list.add({ name: 'Jonas' }); expect(list.items.length).toEqual(2); - expect(listEl.find('li').size()).toEqual(2); + expect(listEl.find('li').length).toEqual(2); }); listEl.remove(); @@ -44,13 +44,13 @@ describe('Create', function() { it('should contain one item', function() { expect(list.items.length).toEqual(1); - expect(listEl.find('li').size()).toEqual(1); + expect(listEl.find('li').length).toEqual(1); }); it('should contain two items', function() { list.add({ name: 'Jonas' }); expect(list.items.length).toEqual(2); - expect(listEl.find('li').size()).toEqual(2); + expect(listEl.find('li').length).toEqual(2); }); listEl.remove(); @@ -72,13 +72,13 @@ describe('Create', function() { it('should contain one item', function() { expect(list.items.length).toEqual(1); - expect(listEl.find('tr').size()).toEqual(1); + expect(listEl.find('tr').length).toEqual(1); }); it('should contain two items', function() { list.add({ name: 'Jonas' }); expect(list.items.length).toEqual(2); - expect(listEl.find('tr').size()).toEqual(2); + expect(listEl.find('tr').length).toEqual(2); }); listEl.remove(); @@ -134,13 +134,13 @@ describe('Create', function() { it('should contain one item', function() { expect(list.items.length).toEqual(1); - expect(listEl.find('li').size()).toEqual(1); + expect(listEl.find('li').length).toEqual(1); }); it('should contain two items', function() { list.add({ name: 'Jonas' }); expect(list.items.length).toEqual(2); - expect(listEl.find('li').size()).toEqual(2); + expect(listEl.find('li').length).toEqual(2); }); listEl.remove(); @@ -240,7 +240,7 @@ describe('Create', function() { valueNames: ['name'], indexAsync: true, parseComplete: function(list) { - expect(listEl.find('li').size()).toEqual(162); + expect(listEl.find('li').length).toEqual(162); listEl.remove(); done(); } diff --git a/__test__/item.test.js b/__test__/item.test.js index f7fd4c17..665f1cbf 100644 --- a/__test__/item.test.js +++ b/__test__/item.test.js @@ -78,17 +78,17 @@ describe('Item', function() { describe('Hide, show, visible', function() { it('should be hidden', function() { - expect($('#list li').size()).toEqual(1); + expect($('#list li').length).toEqual(1); item.hide(); expect(item.visible()).toBe(false); - expect($('#list li').size()).toEqual(0); + expect($('#list li').length).toEqual(0); }); it('should be visible', function() { item.hide(); - expect($('#list li').size()).toEqual(0); + expect($('#list li').length).toEqual(0); item.show(); expect(item.visible()).toBe(true); - expect($('#list li').size()).toEqual(1); + expect($('#list li').length).toEqual(1); }); }); diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index ca988382..325deaf8 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -25,7 +25,7 @@ describe('Pagination', function() { }); it('should have default settings', function() { - expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').length).toEqual(4); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("3"); @@ -35,7 +35,7 @@ describe('Pagination', function() { it('should show same pages for show(7,2) and show(8,2)', function() { list.show(7, 2); - expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').length).toEqual(7); expect(pagination.find('a').get(0).innerHTML).toEqual("..."); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("3"); @@ -51,7 +51,7 @@ describe('Pagination', function() { it('should show same pages for show(7,2) and show(8,2)', function() { list.show(8, 2); - expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').length).toEqual(7); expect(pagination.find('a').get(0).innerHTML).toEqual("..."); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("3"); @@ -67,7 +67,7 @@ describe('Pagination', function() { it('should test show(14,2)', function() { list.show(14, 2); - expect(pagination.find('a').size()).toEqual(6); + expect(pagination.find('a').length).toEqual(6); expect(pagination.find('a').get(0).innerHTML).toEqual("..."); expect(pagination.find('a').get(1).innerHTML).toEqual("5"); expect(pagination.find('a').get(2).innerHTML).toEqual("6"); @@ -82,7 +82,7 @@ describe('Pagination', function() { it('should show last page with show(17,2)', function() { list.show(17, 2); - expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').length).toEqual(4); expect(pagination.find('a').get(0).innerHTML).toEqual("..."); expect(pagination.find('a').get(1).innerHTML).toEqual("7"); expect(pagination.find('a').get(2).innerHTML).toEqual("8"); @@ -128,7 +128,7 @@ describe('Pagination', function() { }); it('should have default settings', function() { - expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').length).toEqual(4); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("..."); @@ -138,7 +138,7 @@ describe('Pagination', function() { it('should test show(7,2)', function() { list.show(7, 2); - expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').length).toEqual(7); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("..."); expect(pagination.find('a').get(2).innerHTML).toEqual("3"); @@ -154,7 +154,7 @@ describe('Pagination', function() { it('should test show(14,2)', function() { list.show(14, 2); - expect(pagination.find('a').size()).toEqual(6); + expect(pagination.find('a').length).toEqual(6); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("..."); expect(pagination.find('a').get(2).innerHTML).toEqual("6"); @@ -169,7 +169,7 @@ describe('Pagination', function() { it('should show last page with show(17,2)', function() { list.show(17, 2); - expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').length).toEqual(4); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("..."); expect(pagination.find('a').get(2).innerHTML).toEqual("8"); @@ -210,7 +210,7 @@ describe('Pagination', function() { }); it('should have default settings', function() { - expect(pagination.find('a').size()).toEqual(4); + expect(pagination.find('a').length).toEqual(4); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("..."); @@ -220,7 +220,7 @@ describe('Pagination', function() { it('should test show(7,2)', function() { list.show(7, 2); - expect(pagination.find('a').size()).toEqual(7); + expect(pagination.find('a').length).toEqual(7); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("3"); @@ -236,7 +236,7 @@ describe('Pagination', function() { it('should test show(12,2)', function() { list.show(12, 2); - expect(pagination.find('a').size()).toEqual(8); + expect(pagination.find('a').length).toEqual(8); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("..."); @@ -253,7 +253,7 @@ describe('Pagination', function() { it('should show last page with show(17,2)', function() { list.show(17, 2); - expect(pagination.find('a').size()).toEqual(5); + expect(pagination.find('a').length).toEqual(5); expect(pagination.find('a').get(0).innerHTML).toEqual("1"); expect(pagination.find('a').get(1).innerHTML).toEqual("2"); expect(pagination.find('a').get(2).innerHTML).toEqual("..."); diff --git a/__test__/parse.test.js b/__test__/parse.test.js index 769ec41e..60485542 100644 --- a/__test__/parse.test.js +++ b/__test__/parse.test.js @@ -36,7 +36,7 @@ describe('Parse', function() { expect(list.items[0].values().born).toEqual("1986"); expect(list.items[2].values().born).toEqual(1950); var el = $($('#parse-list').find('.list div')[2]); - expect(el.find('span').size()).toEqual(2); + expect(el.find('span').length).toEqual(2); expect(el.find('span.name').text()).toEqual('Sven'); expect(el.find('span.born').text()).toEqual('1950'); }); diff --git a/package.json b/package.json index b3145d19..13c82d8f 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "jest": "^19.0.2", - "jquery": "^2.2.4", + "jquery": "^3.3.1", "jshint": "^2.9.4", "jshint-loader": "^0.8.4", "webpack": "^3.12.0" From 739b40b997d4cce343f73cdff95107af9ae7cca6 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 5 Aug 2018 15:21:24 +0200 Subject: [PATCH 117/246] Update `jest` devDependency --- __test__/utils.classes.test.js | 43 +++++++++++++++-------------- __test__/utils.get-by-class.test.js | 9 +++--- package.json | 5 ++-- 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/__test__/utils.classes.test.js b/__test__/utils.classes.test.js index 7ed7d0fb..9ea0f3c7 100644 --- a/__test__/utils.classes.test.js +++ b/__test__/utils.classes.test.js @@ -1,45 +1,46 @@ const classes = require('../src/utils/classes'); describe('Classes', function() { + var el; beforeEach(function() { - this.el = document.createElement('div') - document.body.appendChild(this.el); + el = document.createElement('div') + document.body.appendChild(el); }); afterEach(function() { - document.body.removeChild(this.el); + document.body.removeChild(el); }); it('should add', function() { - classes(this.el).add('show') - expect(this.el.getAttribute('class')).toBe('show'); + classes(el).add('show') + expect(el.getAttribute('class')).toBe('show'); }); it('should remove', function() { - this.el.setAttribute('class', 'show'); - expect(this.el.getAttribute('class')).toBe('show'); - classes(this.el).remove('show') - expect(this.el.getAttribute('class')).toBe(''); + el.setAttribute('class', 'show'); + expect(el.getAttribute('class')).toBe('show'); + classes(el).remove('show') + expect(el.getAttribute('class')).toBe(''); }); it('should toggle', function() { - classes(this.el).toggle('show') - expect(this.el.getAttribute('class')).toBe('show'); - classes(this.el).toggle('show') - expect(this.el.getAttribute('class')).toBe(''); + classes(el).toggle('show') + expect(el.getAttribute('class')).toBe('show'); + classes(el).toggle('show') + expect(el.getAttribute('class')).toBe(''); }); it('should array', function() { - this.el.setAttribute('class', 'foo bar'); - expect(classes(this.el).array()).toEqual(['foo','bar']); + el.setAttribute('class', 'foo bar'); + expect(classes(el).array()).toEqual(['foo','bar']); }); it('should has', function() { - expect(classes(this.el).has('show')).toBe(false); - this.el.setAttribute('class', 'show'); - expect(classes(this.el).has('show')).toBe(true); + expect(classes(el).has('show')).toBe(false); + el.setAttribute('class', 'show'); + expect(classes(el).has('show')).toBe(true); }); it('should contains', function() { - expect(classes(this.el).contains('show')).toBe(false); - this.el.setAttribute('class', 'show'); - expect(classes(this.el).contains('show')).toBe(true); + expect(classes(el).contains('show')).toBe(false); + el.setAttribute('class', 'show'); + expect(classes(el).contains('show')).toBe(true); }); }); diff --git a/__test__/utils.get-by-class.test.js b/__test__/utils.get-by-class.test.js index 8c9f2b79..e1ececcf 100644 --- a/__test__/utils.get-by-class.test.js +++ b/__test__/utils.get-by-class.test.js @@ -1,15 +1,16 @@ const getByClass = require('../src/utils/get-by-class'); describe('GetByClass', function() { + var el; beforeEach(function() { - this.el = document.createElement('div') - this.el.setAttribute('class', 'foo') - document.body.appendChild(this.el); + el = document.createElement('div') + el.setAttribute('class', 'foo') + document.body.appendChild(el); }); afterEach(function() { - document.body.removeChild(this.el); + document.body.removeChild(el); }); it('should use getElementsByClassName', function() { diff --git a/package.json b/package.json index 13c82d8f..20f89db2 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "jest": "^19.0.2", + "jest": "^23.3", "jquery": "^3.3.1", "jshint": "^2.9.4", "jshint-loader": "^0.8.4", @@ -51,6 +51,7 @@ "jest": { "coverageDirectory": "./coverage/", "collectCoverage": true, - "collectCoverageFrom": ["src/*.js", "src/utils/*.js"] + "collectCoverageFrom": ["src/*.js", "src/utils/*.js"], + "testURL": "http://localhost/" } } From 908b0b5ed73901f660ea83d075fd7bc304832067 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sat, 20 Oct 2018 17:30:19 +0200 Subject: [PATCH 118/246] Update contribution guidelines Tests were switched to `jest` from `Mocha`, built was switched to `webpack` from `grunt`. --- __test__/index.html | 58 ----------------------------------- docs/overview/contribute.html | 16 +++++----- 2 files changed, 8 insertions(+), 66 deletions(-) delete mode 100755 __test__/index.html diff --git a/__test__/index.html b/__test__/index.html deleted file mode 100755 index 9edfe9ae..00000000 --- a/__test__/index.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - List.js Mocha Tests - - - - -
                - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/overview/contribute.html b/docs/overview/contribute.html index 32af7177..a11d1b45 100644 --- a/docs/overview/contribute.html +++ b/docs/overview/contribute.html @@ -5,25 +5,25 @@

                Setup environment

                1. Install Node.js

                -

                Go to Nodejs.org

                +

                Go to Nodejs.org

                2. Install dependencies

                npm install

                Compile and test

                -

                Compile the script (build/build.js)

                -
                grunt
                +

                Compile the script (webpack.config.js)

                +
                npx webpack

                Watch and recompile when files change

                -
                grunt watch
                +
                npx webpack --watch

                Create standalone List.js (dist/list.js)

                -
                grunt dist
                +
                npx webpack --production

                Run the test suite

                -
                grunt test
                -

                Or open this file your browser

                -
                /test/index.html
                +
                npx jest
                +

                Run tests continuously when files change

                +
                npx jest --watch

                Guidelines for making pull requests

                  From 08a20e05192587043e79100791331d10502ef8d5 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 12 Aug 2018 22:00:59 +0200 Subject: [PATCH 119/246] Update gems --- docs/Gemfile.lock | 59 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index db17cdc0..a539e9a4 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -11,18 +11,19 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.11.1) + coffee-script-source (1.12.2) colorator (1.1.0) + concurrent-ruby (1.0.5) em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.10.1) + ethon (0.11.0) ffi (>= 1.3.0) - eventmachine (1.2.1) + eventmachine (1.2.7) execjs (2.7.0) - faraday (0.10.0) + faraday (0.15.2) multipart-post (>= 1.2, < 3) - ffi (1.9.14) + ffi (1.9.25) forwardable-extended (2.6.0) gemoji (2.1.0) github-pages (104) @@ -55,11 +56,12 @@ GEM octokit (~> 4.0) public_suffix (~> 1.4) typhoeus (~> 0.7) - html-pipeline (2.4.2) + html-pipeline (2.8.4) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) - i18n (0.7.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) jekyll (3.3.0) addressable (~> 2.4) colorator (~> 1.0) @@ -99,49 +101,53 @@ GEM jekyll-sitemap (0.12.0) jekyll (~> 3.3) jekyll-swiss (0.4.0) - jekyll-watch (1.5.0) - listen (~> 3.0, < 3.1) + jekyll-watch (1.5.1) + listen (~> 3.0) jemoji (0.7.0) activesupport (~> 4.0) gemoji (~> 2.0) html-pipeline (~> 2.2) jekyll (>= 3.0) - json (1.8.3) + json (1.8.6) kramdown (1.11.1) liquid (3.0.6) listen (3.0.6) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9.7) mercenary (0.3.6) - mini_portile2 (2.1.0) + mini_portile2 (2.3.0) minima (2.0.0) - minitest (5.10.1) + minitest (5.11.3) multipart-post (2.0.0) net-dns (0.8.0) - nokogiri (1.6.8.1) - mini_portile2 (~> 2.1.0) - octokit (4.6.2) + nokogiri (1.8.4) + mini_portile2 (~> 2.3.0) + octokit (4.10.0) sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.14.0) + pathutil (0.16.1) forwardable-extended (~> 2.6) public_suffix (1.5.3) - rb-fsevent (0.9.8) - rb-inotify (0.9.7) - ffi (>= 0.5.0) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) rouge (1.11.1) safe_yaml (1.0.4) - sass (3.4.22) + sass (3.5.7) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) - terminal-table (1.7.3) - unicode-display_width (~> 1.1.1) - thread_safe (0.3.5) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) typhoeus (0.8.0) ethon (>= 0.8.0) - tzinfo (1.2.2) + tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.1.1) + unicode-display_width (1.4.0) PLATFORMS ruby @@ -149,3 +155,6 @@ PLATFORMS DEPENDENCIES github-pages (= 104) jekyll-livereload + +BUNDLED WITH + 1.16.1 From bfd4002d20d88349457aca9f43f99c9a0fc1c0ea Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Tue, 14 Aug 2018 21:46:03 +0200 Subject: [PATCH 120/246] Update _config.yml * ensure link rewriting is handled by jekyll * update gh-pages config --- docs/_layouts/default.html | 14 +++++++------- docs/index.html | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 6f849312..f2c7d2c6 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -14,22 +14,22 @@ - - + + - - + + - + - + +
                  - - {% if jekyll.environment != 'production' %} - - {% endif %} From ee89fa426f1712810acfc6737afb31ba654d2e06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 15 Dec 2018 23:10:04 +0100 Subject: [PATCH 125/246] Update gems --- docs/Gemfile.lock | 59 +++++++++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 25 deletions(-) diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index db17cdc0..9de59124 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -11,18 +11,19 @@ GEM coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.11.1) + coffee-script-source (1.12.2) colorator (1.1.0) + concurrent-ruby (1.1.4) em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.10.1) + ethon (0.11.0) ffi (>= 1.3.0) eventmachine (1.2.1) execjs (2.7.0) - faraday (0.10.0) + faraday (0.15.4) multipart-post (>= 1.2, < 3) - ffi (1.9.14) + ffi (1.9.25) forwardable-extended (2.6.0) gemoji (2.1.0) github-pages (104) @@ -55,11 +56,12 @@ GEM octokit (~> 4.0) public_suffix (~> 1.4) typhoeus (~> 0.7) - html-pipeline (2.4.2) + html-pipeline (2.9.1) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) - i18n (0.7.0) + i18n (0.9.5) + concurrent-ruby (~> 1.0) jekyll (3.3.0) addressable (~> 2.4) colorator (~> 1.0) @@ -99,49 +101,53 @@ GEM jekyll-sitemap (0.12.0) jekyll (~> 3.3) jekyll-swiss (0.4.0) - jekyll-watch (1.5.0) - listen (~> 3.0, < 3.1) + jekyll-watch (1.5.1) + listen (~> 3.0) jemoji (0.7.0) activesupport (~> 4.0) gemoji (~> 2.0) html-pipeline (~> 2.2) jekyll (>= 3.0) - json (1.8.3) + json (1.8.6) kramdown (1.11.1) liquid (3.0.6) listen (3.0.6) rb-fsevent (>= 0.9.3) rb-inotify (>= 0.9.7) mercenary (0.3.6) - mini_portile2 (2.1.0) + mini_portile2 (2.3.0) minima (2.0.0) - minitest (5.10.1) + minitest (5.11.3) multipart-post (2.0.0) - net-dns (0.8.0) - nokogiri (1.6.8.1) - mini_portile2 (~> 2.1.0) - octokit (4.6.2) + net-dns (0.9.0) + nokogiri (1.8.5) + mini_portile2 (~> 2.3.0) + octokit (4.13.0) sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.14.0) + pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (1.5.3) - rb-fsevent (0.9.8) - rb-inotify (0.9.7) - ffi (>= 0.5.0) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) rouge (1.11.1) safe_yaml (1.0.4) - sass (3.4.22) + sass (3.7.2) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) sawyer (0.8.1) addressable (>= 2.3.5, < 2.6) faraday (~> 0.8, < 1.0) - terminal-table (1.7.3) - unicode-display_width (~> 1.1.1) - thread_safe (0.3.5) + terminal-table (1.8.0) + unicode-display_width (~> 1.1, >= 1.1.1) + thread_safe (0.3.6) typhoeus (0.8.0) ethon (>= 0.8.0) - tzinfo (1.2.2) + tzinfo (1.2.5) thread_safe (~> 0.1) - unicode-display_width (1.1.1) + unicode-display_width (1.4.0) PLATFORMS ruby @@ -149,3 +155,6 @@ PLATFORMS DEPENDENCIES github-pages (= 104) jekyll-livereload + +BUNDLED WITH + 1.14.6 From 85066db9b1f160ca01ca5d22e3867912d5e23480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 20:50:16 +0100 Subject: [PATCH 126/246] Update jQuery --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26341bbb..96ab6d12 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "jest": "^18.1.0", - "jquery": "^1.12.0", + "jquery": "^1.12.4", "jshint": "^2.9.4", "jshint-loader": "^0.8.3", "webpack": "^2.2.0" From 8cdcf98f1865c78dbaae7ddee292f32aa6076389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 20:50:16 +0100 Subject: [PATCH 127/246] Update jQuery --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 26341bbb..96ab6d12 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "jest": "^18.1.0", - "jquery": "^1.12.0", + "jquery": "^1.12.4", "jshint": "^2.9.4", "jshint-loader": "^0.8.3", "webpack": "^2.2.0" From 60579c4d2b0e9c0eee375c25f8b46045245a6664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 22:17:37 +0100 Subject: [PATCH 128/246] Update Release instructions --- Release.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Release.md b/Release.md index d032027f..97e6bbfa 100644 --- a/Release.md +++ b/Release.md @@ -1,10 +1,10 @@ # RELEASE 1. Update version in package.json -2. `cp package.json docs/_data/pkg.json` -3. Commit "Version x.y.z" -4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` -5. Push with `git push` -6. Push tags with `git push --tags` -7. Update links in README.md +2. Update links in README.md +3. `cp package.json docs/_data/pkg.json` +4. Commit "Version x.y.z" +5. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` +6. Push with `git push` +7. Push tags with `git push --tags` 8. `npm publish` From 3fe223a9efd4b536ba476eb83229d3b5f8200a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 22:17:37 +0100 Subject: [PATCH 129/246] Update Release instructions --- Release.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Release.md b/Release.md index d032027f..97e6bbfa 100644 --- a/Release.md +++ b/Release.md @@ -1,10 +1,10 @@ # RELEASE 1. Update version in package.json -2. `cp package.json docs/_data/pkg.json` -3. Commit "Version x.y.z" -4. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` -5. Push with `git push` -6. Push tags with `git push --tags` -7. Update links in README.md +2. Update links in README.md +3. `cp package.json docs/_data/pkg.json` +4. Commit "Version x.y.z" +5. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` +6. Push with `git push` +7. Push tags with `git push --tags` 8. `npm publish` From a12a7040c1fd6d8d15329c7d4ba1fe99930347a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 22:19:03 +0100 Subject: [PATCH 130/246] Update History.md with 1.5.1 updates --- History.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/History.md b/History.md index 855fab36..465eff8f 100644 --- a/History.md +++ b/History.md @@ -18,6 +18,14 @@ # Changelog +### 1.5.1 +- **[Website]** Use https instead of http for listjs.com +- **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7) +- **[Website]** Update Jekyll & jQuery versions to remove security warnings. +- **[Misc]** Use one event listener per pagination and select page via data attributes + [See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8) +- **[Bugfix]** Don't break pagination if page=0 + [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d) ### 2017-01-29 v1.5.0 - **[Feature]** Bundle fuzzySearch and pagination plugins into List.js [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) From f4a5d6dbdbcf492f0abb9c4fb6e297053670c746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 22:19:03 +0100 Subject: [PATCH 131/246] Update History.md with 1.5.1 updates --- History.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/History.md b/History.md index 855fab36..465eff8f 100644 --- a/History.md +++ b/History.md @@ -18,6 +18,14 @@ # Changelog +### 1.5.1 +- **[Website]** Use https instead of http for listjs.com +- **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7) +- **[Website]** Update Jekyll & jQuery versions to remove security warnings. +- **[Misc]** Use one event listener per pagination and select page via data attributes + [See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8) +- **[Bugfix]** Don't break pagination if page=0 + [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d) ### 2017-01-29 v1.5.0 - **[Feature]** Bundle fuzzySearch and pagination plugins into List.js [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) From 56d4d99536d2ff031cea40259fcb0e01c8d07f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:02:31 +0100 Subject: [PATCH 132/246] Fix pagination test --- __test__/pagination.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index 325deaf8..0c88831b 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -94,11 +94,11 @@ describe('Pagination', function() { }); it('should handle page = 0', function() { - expect(pagination.is(':visible')).toBe(true); + expect(list.listContainer.style.display).toBe(''); list.show(0, 0); - expect(pagination.is(':visible')).toBe(false); + expect(list.listContainer.style.display).toBe('none'); list.show(1, 1); - expect(pagination.is(':visible')).toBe(true); + expect(list.listContainer.style.display).toBe('block'); }); }); From 725bc188d7ba72c7d234bda1e09fc50b40661310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:02:31 +0100 Subject: [PATCH 133/246] Fix pagination test --- __test__/pagination.test.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index 325deaf8..0c88831b 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -94,11 +94,11 @@ describe('Pagination', function() { }); it('should handle page = 0', function() { - expect(pagination.is(':visible')).toBe(true); + expect(list.listContainer.style.display).toBe(''); list.show(0, 0); - expect(pagination.is(':visible')).toBe(false); + expect(list.listContainer.style.display).toBe('none'); list.show(1, 1); - expect(pagination.is(':visible')).toBe(true); + expect(list.listContainer.style.display).toBe('block'); }); }); From 9c465e73f53de545f9a79ee520b3fe4608823a74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:03:20 +0100 Subject: [PATCH 134/246] Add link to Stack overflow in readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 72a3ab12..19b6f16e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ npm install list.js - [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js) - [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js) +### Questions / How to? +https://stackoverflow.com/questions/tagged/list.js + ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) - [Existing list + add](http://listjs.com/examples/existing-list-add) From b32123e4bfefc43a85c87f42dac4689690f645ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:03:20 +0100 Subject: [PATCH 135/246] Add link to Stack overflow in readme --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 72a3ab12..19b6f16e 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,9 @@ npm install list.js - [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js) - [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js) +### Questions / How to? +https://stackoverflow.com/questions/tagged/list.js + ### Demo / Examples - [Existing list](http://listjs.com/examples/existing-list) - [Existing list + add](http://listjs.com/examples/existing-list-add) From ae3024caabe718d319b8fd35bb0e6a13858cfa50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:18:38 +0100 Subject: [PATCH 136/246] Update to circle ci 2 --- .circle/config.yml | 20 ++++++++++++++++++++ circle.yml | 9 --------- 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 .circle/config.yml delete mode 100644 circle.yml diff --git a/.circle/config.yml b/.circle/config.yml new file mode 100644 index 00000000..3b762417 --- /dev/null +++ b/.circle/config.yml @@ -0,0 +1,20 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:6.11 +steps: + - checkout + - restore_cache: + keys: v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: + name: test + command: npm test + - run: + name: code-coverage + command: '<(curl -s https://codecov.io/bash)' diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 8eaa6240..00000000 --- a/circle.yml +++ /dev/null @@ -1,9 +0,0 @@ -machine: - node: - version: 6.9.1 - -test: - override: - - npm test - post: - - bash <(curl -s https://codecov.io/bash) From 767409c916c26c56ca4107bdf1e491c52f21fc27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:18:38 +0100 Subject: [PATCH 137/246] Update to circle ci 2 --- .circle/config.yml | 20 ++++++++++++++++++++ circle.yml | 9 --------- 2 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 .circle/config.yml delete mode 100644 circle.yml diff --git a/.circle/config.yml b/.circle/config.yml new file mode 100644 index 00000000..3b762417 --- /dev/null +++ b/.circle/config.yml @@ -0,0 +1,20 @@ +version: 2 +jobs: + build: + docker: + - image: circleci/node:6.11 +steps: + - checkout + - restore_cache: + keys: v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: + name: test + command: npm test + - run: + name: code-coverage + command: '<(curl -s https://codecov.io/bash)' diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 8eaa6240..00000000 --- a/circle.yml +++ /dev/null @@ -1,9 +0,0 @@ -machine: - node: - version: 6.9.1 - -test: - override: - - npm test - post: - - bash <(curl -s https://codecov.io/bash) From 8e3604c45fd72c9473435929ac702569ac1d1437 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 29 Jul 2018 23:15:20 +0200 Subject: [PATCH 138/246] Templater: hide non API functions --- src/templater.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/templater.js b/src/templater.js index ba37138f..c1ab7389 100644 --- a/src/templater.js +++ b/src/templater.js @@ -3,14 +3,14 @@ var Templater = function(list) { templater = this; var init = function() { - itemSource = templater.getItemSource(list.item); + itemSource = getItemSource(list.item); if (itemSource) { - itemSource = templater.clearSourceItem(itemSource, list.valueNames); + itemSource = clearSourceItem(itemSource, list.valueNames); } }; - this.clearSourceItem = function(el, valueNames) { - for(var i = 0, il = valueNames.length; i < il; i++) { + var clearSourceItem = function(el, valueNames) { + for (var i = 0, il = valueNames.length; i < il; i++) { var elm; if (valueNames[i].data) { for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { @@ -32,7 +32,7 @@ var Templater = function(list) { return el; }; - this.getItemSource = function(item) { + var getItemSource = function(item) { if (item === undefined) { var nodes = list.list.childNodes, items = []; @@ -98,7 +98,7 @@ var Templater = function(list) { } } }; - var setValue = function(name, value) { + var setValue = function(item, name, value) { var elm; var valueName = getValueName(name); if (!valueName) @@ -121,7 +121,7 @@ var Templater = function(list) { if (!templater.create(item)) { for(var v in values) { if (values.hasOwnProperty(v)) { - setValue(v, values[v]); + setValue(item, v, values[v]); } } } From f9ac23679cd6f79be627fd69557a424e0abaf1ea Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 29 Jul 2018 23:17:06 +0200 Subject: [PATCH 139/246] Templater: move internal functions --- src/templater.js | 77 ++++++++++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/src/templater.js b/src/templater.js index c1ab7389..31739189 100644 --- a/src/templater.js +++ b/src/templater.js @@ -60,6 +60,47 @@ var Templater = function(list) { return undefined; }; + var getValueName = function(name) { + for (var i = 0, il = list.valueNames.length; i < il; i++) { + if (list.valueNames[i].data) { + var data = list.valueNames[i].data; + for (var j = 0, jl = data.length; j < jl; j++) { + if (data[j] === name) { + return { data: name }; + } + } + } else if ( + list.valueNames[i].attr && + list.valueNames[i].name && + list.valueNames[i].name == name + ) { + return list.valueNames[i]; + } else if (list.valueNames[i] === name) { + return name; + } + } + }; + + var setValue = function(item, name, value) { + var elm; + var valueName = getValueName(name); + if (!valueName) return; + if (valueName.data) { + item.elm.setAttribute("data-" + valueName.data, value); + } else if (valueName.attr && valueName.name) { + elm = list.utils.getByClass(item.elm, valueName.name, true); + if (elm) { + elm.setAttribute(valueName.attr, value); + } + } else { + elm = list.utils.getByClass(item.elm, valueName, true); + if (elm) { + elm.innerHTML = value; + } + } + elm = undefined; + }; + this.get = function(item, valueNames) { templater.create(item); var values = {}; @@ -82,42 +123,6 @@ var Templater = function(list) { }; this.set = function(item, values) { - var getValueName = function(name) { - for (var i = 0, il = list.valueNames.length; i < il; i++) { - if (list.valueNames[i].data) { - var data = list.valueNames[i].data; - for (var j = 0, jl = data.length; j < jl; j++) { - if (data[j] === name) { - return { data: name }; - } - } - } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) { - return list.valueNames[i]; - } else if (list.valueNames[i] === name) { - return name; - } - } - }; - var setValue = function(item, name, value) { - var elm; - var valueName = getValueName(name); - if (!valueName) - return; - if (valueName.data) { - item.elm.setAttribute('data-'+valueName.data, value); - } else if (valueName.attr && valueName.name) { - elm = list.utils.getByClass(item.elm, valueName.name, true); - if (elm) { - elm.setAttribute(valueName.attr, value); - } - } else { - elm = list.utils.getByClass(item.elm, valueName, true); - if (elm) { - elm.innerHTML = value; - } - } - elm = undefined; - }; if (!templater.create(item)) { for(var v in values) { if (values.hasOwnProperty(v)) { From 9cf5dd2fa339e4a49cb1413fb983c1d3c78ae47d Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 29 Jul 2018 23:40:49 +0200 Subject: [PATCH 140/246] Templater: change source function to consistently use parameter --- src/templater.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templater.js b/src/templater.js index 31739189..4e132ecc 100644 --- a/src/templater.js +++ b/src/templater.js @@ -52,7 +52,7 @@ var Templater = function(list) { div.innerHTML = item; return div.firstChild; } else { - var source = document.getElementById(list.item); + var source = document.getElementById(item); if (source) { return source; } From 3c05b8f94193bce884a58c7cbb45555993c0cf40 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 29 Jul 2018 23:42:33 +0200 Subject: [PATCH 141/246] Templater: extract variables --- src/templater.js | 65 ++++++++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/src/templater.js b/src/templater.js index 4e132ecc..23bd8db2 100644 --- a/src/templater.js +++ b/src/templater.js @@ -11,23 +11,23 @@ var Templater = function(list) { var clearSourceItem = function(el, valueNames) { for (var i = 0, il = valueNames.length; i < il; i++) { - var elm; - if (valueNames[i].data) { - for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - el.setAttribute('data-'+valueNames[i].data[j], ''); + var elm = undefined, + valueName = valueNames[i]; + if (valueName.data) { + for (var j = 0, jl = valueName.data.length; j < jl; j++) { + el.setAttribute("data-" + valueName.data[j], ""); } - } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(el, valueNames[i].name, true); + } else if (valueName.attr && valueName.name) { + elm = list.utils.getByClass(el, valueName.name, true); if (elm) { - elm.setAttribute(valueNames[i].attr, ""); + elm.setAttribute(valueName.attr, ""); } } else { - elm = list.utils.getByClass(el, valueNames[i], true); + elm = list.utils.getByClass(el, valueName, true); if (elm) { elm.innerHTML = ""; } } - elm = undefined; } return el; }; @@ -62,28 +62,29 @@ var Templater = function(list) { var getValueName = function(name) { for (var i = 0, il = list.valueNames.length; i < il; i++) { - if (list.valueNames[i].data) { - var data = list.valueNames[i].data; + var valueName = list.valueNames[i]; + if (valueName.data) { + var data = valueName.data; for (var j = 0, jl = data.length; j < jl; j++) { if (data[j] === name) { return { data: name }; } } } else if ( - list.valueNames[i].attr && - list.valueNames[i].name && - list.valueNames[i].name == name + valueName.attr && + valueName.name && + valueName.name == name ) { - return list.valueNames[i]; - } else if (list.valueNames[i] === name) { + return valueName; + } else if (valueName === name) { return name; } } }; var setValue = function(item, name, value) { - var elm; - var valueName = getValueName(name); + var elm = undefined, + valueName = getValueName(name); if (!valueName) return; if (valueName.data) { item.elm.setAttribute("data-" + valueName.data, value); @@ -98,26 +99,30 @@ var Templater = function(list) { elm.innerHTML = value; } } - elm = undefined; }; this.get = function(item, valueNames) { templater.create(item); var values = {}; - for(var i = 0, il = valueNames.length; i < il; i++) { - var elm; - if (valueNames[i].data) { - for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-'+valueNames[i].data[j]); + for (var i = 0, il = valueNames.length; i < il; i++) { + var elm = undefined, + valueName = valueNames[i]; + if (valueName.data) { + for (var j = 0, jl = valueName.data.length; j < jl; j++) { + values[valueName.data[j]] = list.utils.getAttribute( + item.elm, + "data-" + valueName.data[j] + ); } - } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(item.elm, valueNames[i].name, true); - values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ""; + } else if (valueName.attr && valueName.name) { + elm = list.utils.getByClass(item.elm, valueName.name, true); + values[valueName.name] = elm + ? list.utils.getAttribute(elm, valueName.attr) + : ""; } else { - elm = list.utils.getByClass(item.elm, valueNames[i], true); - values[valueNames[i]] = elm ? elm.innerHTML : ""; + elm = list.utils.getByClass(item.elm, valueName, true); + values[valueName] = elm ? elm.innerHTML : ""; } - elm = undefined; } return values; }; From d9a9ac580a932ca8914c6537a79fdef5946cf39b Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 29 Jul 2018 23:22:03 +0200 Subject: [PATCH 142/246] Templater: move check to initialization --- __test__/create.test.js | 22 ++++------------------ src/templater.js | 9 ++++++--- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/__test__/create.test.js b/__test__/create.test.js index 6593b9d6..c7507e11 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -86,30 +86,16 @@ describe('Create', function() { describe('without items and or template', function() { - it('should not throw error on init', function() { + it('should throw error on init', function() { var listEl = $('
                  \
                    \
                    '); $(document.body).append(listEl); - var list = new List('list', { - valueNames: ['name'] - }); - - listEl.remove(); - }); - - it('should throw error when created items', function() { - var listEl = $('
                    \ -
                      \ -
                      '); - $(document.body).append(listEl); - - var list = new List('list', { - valueNames: ['name'] - }); expect(function() { - list.add({ name: 'Jonas' }); + var list = new List('list', { + valueNames: ['name'] + }); }).toThrow(); listEl.remove(); }); diff --git a/src/templater.js b/src/templater.js index 23bd8db2..1989b51b 100644 --- a/src/templater.js +++ b/src/templater.js @@ -7,6 +7,12 @@ var Templater = function(list) { if (itemSource) { itemSource = clearSourceItem(itemSource, list.valueNames); } + + if (itemSource === undefined) { + throw new Error( + "The list needs to have at least one item on init otherwise you'll have to add a template." + ); + } }; var clearSourceItem = function(el, valueNames) { @@ -141,9 +147,6 @@ var Templater = function(list) { if (item.elm !== undefined) { return false; } - if (itemSource === undefined) { - throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); - } /* If item source does not exists, use the first item in list as source for new items */ var newItem = itemSource.cloneNode(true); From ee2b4663cb795057a464e55c92bf793114adfd3e Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sat, 4 Aug 2018 21:13:35 +0200 Subject: [PATCH 143/246] Templater: move template node creation to `init` --- src/templater.js | 67 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/src/templater.js b/src/templater.js index 1989b51b..cfaac89c 100644 --- a/src/templater.js +++ b/src/templater.js @@ -3,9 +3,20 @@ var Templater = function(list) { templater = this; var init = function() { - itemSource = getItemSource(list.item); + if (list.item) { + if (list.item.indexOf("<") === -1) { + itemSource = document.getElementById(list.item); + } else { + itemSource = getItemSource(list.item); + } + } else { + /* If item source does not exists, use the first item in list as + source for new items */ + itemSource = getFirstListItem(); + } + if (itemSource) { - itemSource = clearSourceItem(itemSource, list.valueNames); + itemSource = createCleanTemplateItem(itemSource, list.valueNames); } if (itemSource === undefined) { @@ -15,7 +26,10 @@ var Templater = function(list) { } }; - var clearSourceItem = function(el, valueNames) { + var createCleanTemplateItem = function(templateNode, valueNames) { + var el = templateNode.cloneNode(true); + el.removeAttribute("id"); + for (var i = 0, il = valueNames.length; i < il; i++) { var elm = undefined, valueName = valueNames[i]; @@ -38,32 +52,29 @@ var Templater = function(list) { return el; }; - var getItemSource = function(item) { - if (item === undefined) { - var nodes = list.list.childNodes, - items = []; + var getFirstListItem = function() { + var nodes = list.list.childNodes; - for (var i = 0, il = nodes.length; i < il; i++) { - // Only textnodes have a data attribute - if (nodes[i].data === undefined) { - return nodes[i].cloneNode(true); - } - } - } else if (/]/g.exec(item)) { - var tbody = document.createElement('tbody'); - tbody.innerHTML = item; - return tbody.firstChild; - } else if (item.indexOf("<") !== -1) { - var div = document.createElement('div'); - div.innerHTML = item; - return div.firstChild; - } else { - var source = document.getElementById(item); - if (source) { - return source; + for (var i = 0, il = nodes.length; i < il; i++) { + // Only textnodes have a data attribute + if (nodes[i].data === undefined) { + return nodes[i].cloneNode(true); } } return undefined; + } + + var getItemSource = function(itemHTML) { + if (/]/g.exec(itemHTML)) { + var tbody = document.createElement("tbody"); + tbody.innerHTML = itemHTML; + return tbody.firstElementChild; + } else if (itemHTML.indexOf("<") !== -1) { + var div = document.createElement("div"); + div.innerHTML = itemHTML; + return div.firstElementChild; + } + return undefined; }; var getValueName = function(name) { @@ -147,11 +158,7 @@ var Templater = function(list) { if (item.elm !== undefined) { return false; } - /* If item source does not exists, use the first item in list as - source for new items */ - var newItem = itemSource.cloneNode(true); - newItem.removeAttribute('id'); - item.elm = newItem; + item.elm = itemSource.cloneNode(true); templater.set(item, item.values()); return true; }; From ea673dbf68a29cfdfa68ab4d68436b691463806e Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sat, 4 Aug 2018 22:13:54 +0200 Subject: [PATCH 144/246] Templater: introduce item template function --- src/templater.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/templater.js b/src/templater.js index cfaac89c..611df0fd 100644 --- a/src/templater.js +++ b/src/templater.js @@ -1,8 +1,10 @@ var Templater = function(list) { - var itemSource, + var createItem, templater = this; var init = function() { + var itemSource; + if (list.item) { if (list.item.indexOf("<") === -1) { itemSource = document.getElementById(list.item); @@ -24,6 +26,9 @@ var Templater = function(list) { "The list needs to have at least one item on init otherwise you'll have to add a template." ); } + createItem = function() { + return itemSource.cloneNode(true); + } }; var createCleanTemplateItem = function(templateNode, valueNames) { @@ -158,7 +163,7 @@ var Templater = function(list) { if (item.elm !== undefined) { return false; } - item.elm = itemSource.cloneNode(true); + item.elm = createItem(item.values()); templater.set(item, item.values()); return true; }; From 05620a38db502025f47c2db1715d0e7298db8e0f Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sat, 4 Aug 2018 22:39:48 +0200 Subject: [PATCH 145/246] Templater: expose item template function via API --- __test__/create.test.js | 35 +++++++++++++++++++++++++++++++++++ docs/api.html | 8 +++++++- src/templater.js | 19 +++++++++++++------ 3 files changed, 55 insertions(+), 7 deletions(-) diff --git a/__test__/create.test.js b/__test__/create.test.js index c7507e11..0b662a72 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -56,6 +56,41 @@ describe('Create', function() { listEl.remove(); }); + describe('Without items and with template function', function() { + var listEl = $('
                      \ +
                        \ +
                        '); + + $(document.body).append(listEl); + + var list = new List('list', { + valueNames: ['name'], + item: function(values) { + return `
                      • `; + } + }, [ + { name: 'Jonny' } + ]); + + it('should contain one item', function() { + expect(list.items.length).toEqual(1); + expect(listEl.find('li').size()).toEqual(1); + }); + + it('should contain two items', function() { + list.add({ name: 'Jonas' }); + expect(list.items.length).toEqual(2); + expect(listEl.find('li').size()).toEqual(2); + }); + + it('should get values from items', function() { + list.add({ name: 'Egon' }); + expect(listEl.find('li[data-template-fn-egon]').size()).toEqual(1); + }); + + listEl.remove(); + }); + describe('Without items and with string template for table', function() { var listEl = $('
                        \
                        \ diff --git a/docs/api.html b/docs/api.html index 7b876afb..3c14bea3 100644 --- a/docs/api.html +++ b/docs/api.html @@ -106,7 +106,7 @@

                      • item String, default: undefined
                        -ID to item template element or a string of HTML.

                        +ID to item template element or a string of HTML. Can also be a function which receives a values object and which must return the complete item's HTML as a string.

                        var options = {
                             item: "<li><span class='name'></span><span class='city'></span></li>"
                        @@ -115,6 +115,12 @@ 

                        var options = { item: 'cool-item-id' }; +// or +var options = { + item: function(values) { + return `<li><span class='name'>${values.name}</span><span class='city'>${values.city}</span></li>`; + } +};

                      • listClass String, default: "list"
                        diff --git a/src/templater.js b/src/templater.js index 611df0fd..10167eba 100644 --- a/src/templater.js +++ b/src/templater.js @@ -5,7 +5,15 @@ var Templater = function(list) { var init = function() { var itemSource; - if (list.item) { + if (typeof list.item === "function") { + createItem = function(values) { + var item = list.item(values); + return getItemSource(item); + } + return; + } + + if (typeof list.item === "string") { if (list.item.indexOf("<") === -1) { itemSource = document.getElementById(list.item); } else { @@ -17,15 +25,14 @@ var Templater = function(list) { itemSource = getFirstListItem(); } - if (itemSource) { - itemSource = createCleanTemplateItem(itemSource, list.valueNames); - } - - if (itemSource === undefined) { + if (!itemSource) { throw new Error( "The list needs to have at least one item on init otherwise you'll have to add a template." ); } + + itemSource = createCleanTemplateItem(itemSource, list.valueNames); + createItem = function() { return itemSource.cloneNode(true); } From 4420c58564ae7ca1134a9338b82de9c9f34b5594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:34:46 +0100 Subject: [PATCH 146/246] Use node version 10 for circle ci --- .circle/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circle/config.yml b/.circle/config.yml index 3b762417..86a48c2b 100644 --- a/.circle/config.yml +++ b/.circle/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/node:6.11 + - image: circleci/node:10 steps: - checkout - restore_cache: From 6dd73c0194c82860158bf2bb5581a681a903ae31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:34:46 +0100 Subject: [PATCH 147/246] Use node version 10 for circle ci --- .circle/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circle/config.yml b/.circle/config.yml index 3b762417..86a48c2b 100644 --- a/.circle/config.yml +++ b/.circle/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/node:6.11 + - image: circleci/node:10 steps: - checkout - restore_cache: From 785dc97130ddb6d095f36382039d00b7c8d1731c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sun, 16 Dec 2018 23:40:47 +0100 Subject: [PATCH 148/246] Update node version in package.json and sync with circleci --- .circle/config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circle/config.yml b/.circle/config.yml index 86a48c2b..da0e12e2 100644 --- a/.circle/config.yml +++ b/.circle/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/node:10 + - image: circleci/node:6.15 steps: - checkout - restore_cache: diff --git a/package.json b/package.json index 20f89db2..bcb37f8f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "main": "src/index", "engines": { - "node": ">= 0.10.21" + "node": "^6.15" }, "scripts": { "test": "jest" From 4ff8c467786a6b5c62716b8b83fdb3dde93072ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Stro=CC=88mberg?= Date: Sun, 16 Dec 2018 23:40:47 +0100 Subject: [PATCH 149/246] Update node version in package.json and sync with circleci --- .circle/config.yml | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circle/config.yml b/.circle/config.yml index 86a48c2b..da0e12e2 100644 --- a/.circle/config.yml +++ b/.circle/config.yml @@ -2,7 +2,7 @@ version: 2 jobs: build: docker: - - image: circleci/node:10 + - image: circleci/node:6.15 steps: - checkout - restore_cache: diff --git a/package.json b/package.json index 20f89db2..bcb37f8f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "main": "src/index", "engines": { - "node": ">= 0.10.21" + "node": "^6.15" }, "scripts": { "test": "jest" From 695494711652be7a153aeb8449e2283f151920b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:45:09 +0100 Subject: [PATCH 150/246] Correctly name circleconfig (lolz) --- {.circle => .circleci}/config.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.circle => .circleci}/config.yml (100%) diff --git a/.circle/config.yml b/.circleci/config.yml similarity index 100% rename from .circle/config.yml rename to .circleci/config.yml From b19c1a2bc014e91d8cf1d3c54dabe1562d5f6bc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:45:09 +0100 Subject: [PATCH 151/246] Correctly name circleconfig (lolz) --- {.circle => .circleci}/config.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {.circle => .circleci}/config.yml (100%) diff --git a/.circle/config.yml b/.circleci/config.yml similarity index 100% rename from .circle/config.yml rename to .circleci/config.yml From 8b8d2d92e7a08d132b960b2f519c8bd21141f075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:48:13 +0100 Subject: [PATCH 152/246] Validate and fix circleci config --- .circleci/config.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da0e12e2..3fd24fa9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,18 +3,18 @@ jobs: build: docker: - image: circleci/node:6.15 -steps: - - checkout - - restore_cache: - keys: v1-dependencies-{{ checksum "package.json" }} - - run: npm install - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - run: - name: test - command: npm test - - run: - name: code-coverage - command: '<(curl -s https://codecov.io/bash)' + steps: + - checkout + - restore_cache: + keys: v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: + name: test + command: npm test + - run: + name: code-coverage + command: '<(curl -s https://codecov.io/bash)' From e6af108df618f5a3d85b70103eb6add2a857059c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:48:13 +0100 Subject: [PATCH 153/246] Validate and fix circleci config --- .circleci/config.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index da0e12e2..3fd24fa9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,18 +3,18 @@ jobs: build: docker: - image: circleci/node:6.15 -steps: - - checkout - - restore_cache: - keys: v1-dependencies-{{ checksum "package.json" }} - - run: npm install - - save_cache: - paths: - - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - - run: - name: test - command: npm test - - run: - name: code-coverage - command: '<(curl -s https://codecov.io/bash)' + steps: + - checkout + - restore_cache: + keys: v1-dependencies-{{ checksum "package.json" }} + - run: npm install + - save_cache: + paths: + - node_modules + key: v1-dependencies-{{ checksum "package.json" }} + - run: + name: test + command: npm test + - run: + name: code-coverage + command: '<(curl -s https://codecov.io/bash)' From 5afc258fe4907400fbc7df4e1ee3270457b22e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:50:10 +0100 Subject: [PATCH 154/246] Update codecov command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fd24fa9..79f633e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,4 +17,4 @@ jobs: command: npm test - run: name: code-coverage - command: '<(curl -s https://codecov.io/bash)' + command: 'bash <(curl -s https://codecov.io/bash)' From 258087cfe39b2a82d81d2339eae08e5ed796a6d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:50:10 +0100 Subject: [PATCH 155/246] Update codecov command --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fd24fa9..79f633e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,4 +17,4 @@ jobs: command: npm test - run: name: code-coverage - command: '<(curl -s https://codecov.io/bash)' + command: 'bash <(curl -s https://codecov.io/bash)' From b58b9fbc29c40c5e4ab69dc410f9afcfcec58ab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:53:58 +0100 Subject: [PATCH 156/246] More circleci fixes --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79f633e0..bdb870b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,12 +6,12 @@ jobs: steps: - checkout - restore_cache: - keys: v1-dependencies-{{ checksum "package.json" }} + key: dependency-cache-{{ checksum "package.json" }} - run: npm install - save_cache: + key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - run: name: test command: npm test From 1d4ac1d66f2c6d89dad244547d6bd97211f4e133 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sun, 16 Dec 2018 23:53:58 +0100 Subject: [PATCH 157/246] More circleci fixes --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 79f633e0..bdb870b7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,12 +6,12 @@ jobs: steps: - checkout - restore_cache: - keys: v1-dependencies-{{ checksum "package.json" }} + key: dependency-cache-{{ checksum "package.json" }} - run: npm install - save_cache: + key: dependency-cache-{{ checksum "package.json" }} paths: - node_modules - key: v1-dependencies-{{ checksum "package.json" }} - run: name: test command: npm test From fcd9e195918c6f01be5b9f3fe0830329e6d2f29d Mon Sep 17 00:00:00 2001 From: dbrw Date: Thu, 12 Apr 2018 14:27:49 +0700 Subject: [PATCH 158/246] Custom pagination item capability You can add pagination custom item with this PR. --- src/pagination.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pagination.js b/src/pagination.js index 69e9f5e7..fc55c4f2 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -82,7 +82,7 @@ module.exports = function(list) { return function(options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: "

                      • ", + item: options.item || "
                      • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist' From bcd29ac5c468d9abb3911c13533c7e79a06e5f9f Mon Sep 17 00:00:00 2001 From: dbrw Date: Tue, 18 Dec 2018 14:55:24 +0700 Subject: [PATCH 159/246] adding tests for custom pagination item --- __test__/pagination.test.js | 101 ++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index 0c88831b..2841470d 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -266,4 +266,105 @@ describe('Pagination', function() { }); }); + + describe('Custom settings, pagination: { item: "" }', function() { + var list, + itemHTML, + pagination; + + beforeAll(function() { + itemHTML = fixturePagination.list(['name']) + list = new List('list-pagination', { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: { + item: "", + }, + }, fixturePagination.all); + + pagination = $('.pagination'); + }); + + afterAll(function() { + fixturePagination.removeList(); + }); + + it('should have default settings', function() { + expect(pagination.find('span').length).toEqual(4); + expect(pagination.find('span').get(0).innerHTML).toEqual("1"); + expect(pagination.find('span').get(1).innerHTML).toEqual("2"); + expect(pagination.find('span').get(2).innerHTML).toEqual("3"); + expect(pagination.find('span').get(3).innerHTML).toEqual("..."); + expect(pagination.find('span').get(4)).toEqual(undefined); + }); + + it('should show same pages for show(7,2) and show(8,2)', function() { + list.show(7, 2); + expect(pagination.find('span').length).toEqual(7); + expect(pagination.find('span').get(0).innerHTML).toEqual("..."); + expect(pagination.find('span').get(1).innerHTML).toEqual("2"); + expect(pagination.find('span').get(2).innerHTML).toEqual("3"); + expect(pagination.find('span').get(3).innerHTML).toEqual("4"); + expect(pagination.find('span').get(4).innerHTML).toEqual("5"); + expect(pagination.find('span').get(5).innerHTML).toEqual("6"); + expect(pagination.find('span').get(6).innerHTML).toEqual("..."); + expect(pagination.find('span').get(7)).toEqual(undefined); + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); + }); + + it('should show same pages for show(7,2) and show(8,2)', function() { + list.show(8, 2); + expect(pagination.find('span').length).toEqual(7); + expect(pagination.find('span').get(0).innerHTML).toEqual("..."); + expect(pagination.find('span').get(1).innerHTML).toEqual("2"); + expect(pagination.find('span').get(2).innerHTML).toEqual("3"); + expect(pagination.find('span').get(3).innerHTML).toEqual("4"); + expect(pagination.find('span').get(4).innerHTML).toEqual("5"); + expect(pagination.find('span').get(5).innerHTML).toEqual("6"); + expect(pagination.find('span').get(6).innerHTML).toEqual("..."); + expect(pagination.find('span').get(7)).toEqual(undefined); + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); + }); + + it('should test show(14,2)', function() { + list.show(14, 2); + expect(pagination.find('span').length).toEqual(6); + expect(pagination.find('span').get(0).innerHTML).toEqual("..."); + expect(pagination.find('span').get(1).innerHTML).toEqual("5"); + expect(pagination.find('span').get(2).innerHTML).toEqual("6"); + expect(pagination.find('span').get(3).innerHTML).toEqual("7"); + expect(pagination.find('span').get(4).innerHTML).toEqual("8"); + expect(pagination.find('span').get(5).innerHTML).toEqual("9"); + expect(pagination.find('span').get(6)).toEqual(undefined); + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); + }); + + it('should show last page with show(17,2)', function() { + list.show(17, 2); + expect(pagination.find('span').length).toEqual(4); + expect(pagination.find('span').get(0).innerHTML).toEqual("..."); + expect(pagination.find('span').get(1).innerHTML).toEqual("7"); + expect(pagination.find('span').get(2).innerHTML).toEqual("8"); + expect(pagination.find('span').get(3).innerHTML).toEqual("9"); + expect(pagination.find('span').get(4)).toEqual(undefined); + expect($(pagination.find('button').get(1)).hasClass('active')).toEqual(false); + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); + }); + + it('should handle page = 0', function() { + expect(list.listContainer.style.display).toBe(''); + list.show(0, 0); + expect(list.listContainer.style.display).toBe('none'); + list.show(1, 1); + expect(list.listContainer.style.display).toBe('block'); + }); + }); }); From 330c8e85dcc46e4a96252ce8c0dd047cbba6a66f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 22:16:52 +0100 Subject: [PATCH 160/246] Fix typo --- docs/_includes/examples/annotated-example.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/examples/annotated-example.html b/docs/_includes/examples/annotated-example.html index ff1c687e..3c0b72e8 100644 --- a/docs/_includes/examples/annotated-example.html +++ b/docs/_includes/examples/annotated-example.html @@ -111,7 +111,7 @@

                        Apply List.js on existing HTML and then add items

                        } ]; -var userList = new List('example-list', options, values); +var userList = new List('users', options, values); // It's possible to add items after list been initiated userList.add({ @@ -159,7 +159,7 @@

                        Make List.js create a list from scratch

                        } ]; -var userList = new List('example-list', options, values); +var userList = new List('users', options, values); userList.add({ name: 'Gustaf Lindqvist', From b264d288760637381c9d70282059ebc8c2074fbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 22:16:52 +0100 Subject: [PATCH 161/246] Fix typo --- docs/_includes/examples/annotated-example.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/_includes/examples/annotated-example.html b/docs/_includes/examples/annotated-example.html index ff1c687e..3c0b72e8 100644 --- a/docs/_includes/examples/annotated-example.html +++ b/docs/_includes/examples/annotated-example.html @@ -111,7 +111,7 @@

                        Apply List.js on existing HTML and then add items

                        } ]; -var userList = new List('example-list', options, values); +var userList = new List('users', options, values); // It's possible to add items after list been initiated userList.add({ @@ -159,7 +159,7 @@

                        Make List.js create a list from scratch

                        } ]; -var userList = new List('example-list', options, values); +var userList = new List('users', options, values); userList.add({ name: 'Gustaf Lindqvist', From 166b73c2d20d0b0941fe007c3f0545cb883f72cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 22:49:30 +0100 Subject: [PATCH 162/246] Added a WISHLIST.md to be able to clean up in issues. --- History.md | 23 ++++------------------- WISHLIST.md | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 WISHLIST.md diff --git a/History.md b/History.md index 465eff8f..ce3e3bce 100644 --- a/History.md +++ b/History.md @@ -1,31 +1,16 @@ -# TODO - -- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96 -- Regex in search https://github.com/javve/list.js/issues/371 -- Keep original order? -- Automatically add item in the right place if sort is active -- How to handle arrays? -- Implement debouncing in search? -- Better search https://github.com/javve/list.js/pull/312/files ? -- Investigate sort button defaults: - - https://github.com/javve/list.js/issues/316 - - https://github.com/javve/list.js/pull/301 -- Improve testability by decoupling things and make it possible to use require('') in tests -- Add .remove() method to remove all listeners etc. -- Example of more advanced filtering -- Fix test suite -- Example with multiple lists - # Changelog ### 1.5.1 +- **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list. +- **[Misc]** Update CircleCI from 1.0 to 2.0 - **[Website]** Use https instead of http for listjs.com - **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7) - **[Website]** Update Jekyll & jQuery versions to remove security warnings. -- **[Misc]** Use one event listener per pagination and select page via data attributes +- **[Bugfix]** Use one event listener per pagination and select page via data attributes [See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8) - **[Bugfix]** Don't break pagination if page=0 [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d) + [See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310) ### 2017-01-29 v1.5.0 - **[Feature]** Bundle fuzzySearch and pagination plugins into List.js [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) diff --git a/WISHLIST.md b/WISHLIST.md new file mode 100644 index 00000000..95ddbfd3 --- /dev/null +++ b/WISHLIST.md @@ -0,0 +1,21 @@ +# Wishlist +- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96 +- Regex in search https://github.com/javve/list.js/issues/371 +- Keep original order? + know +- Automatically add item in the right place if sort is active +- How to handle arrays? +- Implement debouncing in search? +- Better search https://github.com/javve/list.js/pull/312/files ? +- Investigate sort button defaults: + - https://github.com/javve/list.js/issues/316 + - https://github.com/javve/list.js/pull/301 +- Improve testability by decoupling things and make it possible to use require('') in tests +- Add .remove() method to remove all listeners etc. +- Example of more advanced filtering +- Example with multiple lists +- Multiple filter functionality +- Activ search term, sort order, filter, etc +- [Updated ] https://github.com/javve/list.js/issues/599 + +# Known bugs +Pagination does not respect .show(i, page) From 3f9c8e92858333e1fe517c76f123edfa1295327c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 22:49:30 +0100 Subject: [PATCH 163/246] Added a WISHLIST.md to be able to clean up in issues. --- History.md | 23 ++++------------------- WISHLIST.md | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 WISHLIST.md diff --git a/History.md b/History.md index 465eff8f..ce3e3bce 100644 --- a/History.md +++ b/History.md @@ -1,31 +1,16 @@ -# TODO - -- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96 -- Regex in search https://github.com/javve/list.js/issues/371 -- Keep original order? -- Automatically add item in the right place if sort is active -- How to handle arrays? -- Implement debouncing in search? -- Better search https://github.com/javve/list.js/pull/312/files ? -- Investigate sort button defaults: - - https://github.com/javve/list.js/issues/316 - - https://github.com/javve/list.js/pull/301 -- Improve testability by decoupling things and make it possible to use require('') in tests -- Add .remove() method to remove all listeners etc. -- Example of more advanced filtering -- Fix test suite -- Example with multiple lists - # Changelog ### 1.5.1 +- **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list. +- **[Misc]** Update CircleCI from 1.0 to 2.0 - **[Website]** Use https instead of http for listjs.com - **[Website]** Update Contribute guidelines [See commit →](https://github.com/javve/list.js/commit/6242496de2ac5c07903fb1590a5cb5129f0887a7) - **[Website]** Update Jekyll & jQuery versions to remove security warnings. -- **[Misc]** Use one event listener per pagination and select page via data attributes +- **[Bugfix]** Use one event listener per pagination and select page via data attributes [See commit →](https://github.com/javve/list.js/commit/7610c59039f3b39f52175cd1a200e935664869e8) - **[Bugfix]** Don't break pagination if page=0 [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d) + [See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310) ### 2017-01-29 v1.5.0 - **[Feature]** Bundle fuzzySearch and pagination plugins into List.js [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) diff --git a/WISHLIST.md b/WISHLIST.md new file mode 100644 index 00000000..95ddbfd3 --- /dev/null +++ b/WISHLIST.md @@ -0,0 +1,21 @@ +# Wishlist +- Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96 +- Regex in search https://github.com/javve/list.js/issues/371 +- Keep original order? + know +- Automatically add item in the right place if sort is active +- How to handle arrays? +- Implement debouncing in search? +- Better search https://github.com/javve/list.js/pull/312/files ? +- Investigate sort button defaults: + - https://github.com/javve/list.js/issues/316 + - https://github.com/javve/list.js/pull/301 +- Improve testability by decoupling things and make it possible to use require('') in tests +- Add .remove() method to remove all listeners etc. +- Example of more advanced filtering +- Example with multiple lists +- Multiple filter functionality +- Activ search term, sort order, filter, etc +- [Updated ] https://github.com/javve/list.js/issues/599 + +# Known bugs +Pagination does not respect .show(i, page) From dc6ab59c6fb21242c4bb53fa928c6901936a489c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 23:21:35 +0100 Subject: [PATCH 164/246] Update wishlist --- WISHLIST.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WISHLIST.md b/WISHLIST.md index 95ddbfd3..afb04475 100644 --- a/WISHLIST.md +++ b/WISHLIST.md @@ -4,7 +4,7 @@ - Keep original order? + know - Automatically add item in the right place if sort is active - How to handle arrays? -- Implement debouncing in search? +- [Implement debouncing in search?](https://github.com/javve/list.js/issues/621) - Better search https://github.com/javve/list.js/pull/312/files ? - Investigate sort button defaults: - https://github.com/javve/list.js/issues/316 @@ -15,7 +15,7 @@ - Example with multiple lists - Multiple filter functionality - Activ search term, sort order, filter, etc -- [Updated ] https://github.com/javve/list.js/issues/599 +- [Smarter pagination window](https://github.com/javve/list.js/issues/599) # Known bugs Pagination does not respect .show(i, page) From 52afe2db0d018df3009acf49b6cbb56943b28024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Tue, 18 Dec 2018 23:21:35 +0100 Subject: [PATCH 165/246] Update wishlist --- WISHLIST.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WISHLIST.md b/WISHLIST.md index 95ddbfd3..afb04475 100644 --- a/WISHLIST.md +++ b/WISHLIST.md @@ -4,7 +4,7 @@ - Keep original order? + know - Automatically add item in the right place if sort is active - How to handle arrays? -- Implement debouncing in search? +- [Implement debouncing in search?](https://github.com/javve/list.js/issues/621) - Better search https://github.com/javve/list.js/pull/312/files ? - Investigate sort button defaults: - https://github.com/javve/list.js/issues/316 @@ -15,7 +15,7 @@ - Example with multiple lists - Multiple filter functionality - Activ search term, sort order, filter, etc -- [Updated ] https://github.com/javve/list.js/issues/599 +- [Smarter pagination window](https://github.com/javve/list.js/issues/599) # Known bugs Pagination does not respect .show(i, page) From 34f17016d9a0d05d19167201e03f123fa226225f Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 17 Jun 2018 17:41:24 +0200 Subject: [PATCH 166/246] Micro optimization: Reuse iteration indices --- src/utils/events.js | 4 ++-- src/utils/fuzzy.js | 13 +++++++------ src/utils/index-of.js | 2 +- src/utils/to-array.js | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/utils/events.js b/src/utils/events.js index 21695985..407acc58 100644 --- a/src/utils/events.js +++ b/src/utils/events.js @@ -15,7 +15,7 @@ var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', exports.bind = function(el, type, fn, capture){ el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { + for ( var i = 0, il = el.length; i < il; i++ ) { el[i][bind](prefix + type, fn, capture || false); } }; @@ -32,7 +32,7 @@ exports.bind = function(el, type, fn, capture){ exports.unbind = function(el, type, fn, capture){ el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { + for ( var i = 0, il = el.length; i < il; i++ ) { el[i][unbind](prefix + type, fn, capture || false); } }; diff --git a/src/utils/fuzzy.js b/src/utils/fuzzy.js index b63787f3..fcc3fbab 100644 --- a/src/utils/fuzzy.js +++ b/src/utils/fuzzy.js @@ -15,14 +15,15 @@ module.exports = function(text, pattern, options) { var loc = Match_Location, s = (function() { var q = {}, - i; + i, + il; - for (i = 0; i < pattern.length; i++) { + for (i = 0, il = pattern.length; i < il; i++) { q[pattern.charAt(i)] = 0; } - for (i = 0; i < pattern.length; i++) { - q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1); + for (i = 0, il = pattern.length; i < il; i++) { + q[pattern.charAt(i)] |= 1 << (il - i - 1); } return q; @@ -62,7 +63,7 @@ module.exports = function(text, pattern, options) { var bin_min, bin_mid; var bin_max = pattern.length + text.length; var last_rd; - for (var d = 0; d < pattern.length; d++) { + for (var d = 0, dl = pattern.length; d < dl; d++) { // Scan for the best match; each iteration allows for one more error. // Run a binary search to determine how far from 'loc' we can stray at this // error level. @@ -79,7 +80,7 @@ module.exports = function(text, pattern, options) { // Use the result from this iteration as the maximum for the next. bin_max = bin_mid; var start = Math.max(1, loc - bin_mid + 1); - var finish = Math.min(loc + bin_mid, text.length) + pattern.length; + var finish = Math.min(loc + bin_mid, text.length) + dl; var rd = Array(finish + 2); rd[finish + 1] = (1 << d) - 1; diff --git a/src/utils/index-of.js b/src/utils/index-of.js index 4c261619..a7f5b06d 100644 --- a/src/utils/index-of.js +++ b/src/utils/index-of.js @@ -2,7 +2,7 @@ var indexOf = [].indexOf; module.exports = function(arr, obj){ if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { + for (var i = 0, il = arr.length; i < il; ++i) { if (arr[i] === obj) return i; } return -1; diff --git a/src/utils/to-array.js b/src/utils/to-array.js index 9fac2610..8e91992a 100644 --- a/src/utils/to-array.js +++ b/src/utils/to-array.js @@ -19,7 +19,7 @@ module.exports = function toArray(collection) { if (typeof collection === 'function' && collection instanceof Function) return [collection]; var arr = []; - for (var i = 0; i < collection.length; i++) { + for (var i = 0, il = collection.length; i < il; i++) { if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { arr.push(collection[i]); } From 41764c772ac188167deac26483b70def51795a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 23 Dec 2019 10:00:15 +0100 Subject: [PATCH 167/246] Added OkayAnalytics.com to the web site --- docs/_layouts/default.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index f8b37593..d3b7eb0a 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -49,6 +49,7 @@ })(); + From 038cdfd8a94f91dad0225a2209c80c177cb76796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Mon, 23 Dec 2019 10:00:15 +0100 Subject: [PATCH 168/246] Added OkayAnalytics.com to the web site --- docs/_layouts/default.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index f8b37593..d3b7eb0a 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -49,6 +49,7 @@ })(); + From d4d2675d5bdc8f63992f765cd3c1a27bf07ffec6 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Wed, 8 Jan 2020 19:55:29 +0100 Subject: [PATCH 169/246] Fix `getAttribute` fallback method --- src/utils/get-attribute.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/get-attribute.js b/src/utils/get-attribute.js index 729e6514..3e9f161a 100644 --- a/src/utils/get-attribute.js +++ b/src/utils/get-attribute.js @@ -15,9 +15,9 @@ module.exports = function(el, attr) { var attrs = el.attributes; var length = attrs.length; for(var i = 0; i < length; i++) { - if (attr[i] !== undefined) { - if(attr[i].nodeName === attr) { - result = attr[i].nodeValue; + if (attrs[i] !== undefined) { + if(attrs[i].nodeName === attr) { + result = attrs[i].nodeValue; } } } From 88ac583a627cad1ea3f3489903ddbdab44db1262 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 08:34:55 +0000 Subject: [PATCH 170/246] Add options.searchColumns to List API docs #648 --- docs/api.html | 2 ++ 1 file changed, 2 insertions(+) mode change 100644 => 100755 docs/api.html diff --git a/docs/api.html b/docs/api.html old mode 100644 new mode 100755 index 7b876afb..c3dc1d7e --- a/docs/api.html +++ b/docs/api.html @@ -121,6 +121,8 @@

                        What is the class of the list-container?

                      • searchClass String, default: "search"
                        What is the class of the search field?

                      • +
                      • searchColumns Array of strings, default: null
                        +Restrict searching to just these column names? Default is to search all columns.

                      • sortClass String, default: "sort"
                        What is the class of the sort buttons?

                      • indexAsync Boolean, default: false
                        From 85f18b1a1dd182b1bfd1147fd7d3df7de779bb21 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 08:50:08 +0000 Subject: [PATCH 171/246] Fixed searchColumns default --- docs/api.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.html b/docs/api.html index c3dc1d7e..3784794d 100755 --- a/docs/api.html +++ b/docs/api.html @@ -121,7 +121,7 @@

                        What is the class of the list-container?

                      • searchClass String, default: "search"
                        What is the class of the search field?

                      • -
                      • searchColumns Array of strings, default: null
                        +

                      • searchColumns Array of strings, default: undefined
                        Restrict searching to just these column names? Default is to search all columns.

                      • sortClass String, default: "sort"
                        What is the class of the sort buttons?

                      • From 109adc11a95e22f54994e6ee91cd9850ffc78d3e Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 09:06:14 +0000 Subject: [PATCH 172/246] Minor fixes to doc --- docs/api.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api.html b/docs/api.html index 3784794d..2171d75a 100755 --- a/docs/api.html +++ b/docs/api.html @@ -62,11 +62,11 @@

                        • - id or element *required + id or element *required
                          Id the element in which the list area should be initialized. OR the actual element itself.
                        • -

                          options +

                          options Object, default: undefined
                          Some of the option parameters are required at some times

                            @@ -138,7 +138,7 @@

                            Read more here.

                        • -
                        • values Array of objects) (*optional +

                        • values Array of objects, default: undefined
                          Values to add to the list on initialization.

                        From a22771ae4d09b037e01b6b7a4da0f15a8831a885 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 09:52:19 +0000 Subject: [PATCH 173/246] More minor fixes to API docs --- docs/api.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/api.html b/docs/api.html index 2171d75a..bf3fd5bf 100755 --- a/docs/api.html +++ b/docs/api.html @@ -20,6 +20,7 @@

                        Options

                      • page
                      • pagination
                      • searchClass
                      • +
                      • searchColumns
                      • sortClass
                      • valueNames
                      @@ -44,7 +45,7 @@

                      Methods

                    • fuzzySearch
                    • get
                    • on
                    • -
                    • reindex
                    • +
                    • reIndex
                    • remove
                    • search
                    • size
                    • @@ -134,7 +135,7 @@

                      performance.

                    • i Int, default: 1
                      Which item should be shown as the first one.

                    • -
                    • pagination Boolean, default: false
                      +

                    • pagination Boolean, default: undefined
                      Read more here.

                    • @@ -347,7 +348,7 @@

                      Methods

                      Read more here

                    • -

                      on(event, callback)
                      +

                      on(event, callback)
                      Execute callback when list have been updated (triggered by update(), which is used by a lot of methods). Use updated as the event.

                      Avaliable events

                        From e12d13744745beea1564b52202d9d890b17c10bf Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 10:18:15 +0000 Subject: [PATCH 174/246] Added custom search function to List API doc - closes #678 --- docs/api.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/api.html b/docs/api.html index bf3fd5bf..cae012cf 100755 --- a/docs/api.html +++ b/docs/api.html @@ -272,7 +272,7 @@

                        Methods

                      • -

                        search(searchString, columns)
                        +

                        search(searchString, columns, searchFunction)
                        Searches the list

                        itemsInList = [
                        @@ -285,7 +285,20 @@ 

                        Methods

                        listObj.search(); // Show all items in list -listObj.search('Jonny', ['name']); // Only search in the 'name' column
                        +listObj.search('Jonny', ['name']); // Only search in the 'name' column + +listObj.search('Jonny', searchFunction); // Custom search for Jonny + +listObj.search('Jonny', ['name'], searchFunction); // Custom search in the 'name' column +

                        The optional searchFunction should be of the form:

                        + +
                        function searchFunction(searchString, columns) {
                        +  for (var k = 0, kl = listObj.items.length; k < kl; k++) {
                        +     listObj.items[k].found = false;
                        +     // Insert your custom search logic here, set found = true
                        +
                        +  }
                        +};
                      • From 389b9dcb944836152f2d8827f661c99d37c9f347 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 13:39:08 +0000 Subject: [PATCH 175/246] Multiple word searching with List.search - closes #680 --- src/search.js | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) mode change 100644 => 100755 src/search.js diff --git a/src/search.js b/src/search.js old mode 100644 new mode 100755 index f7b0b6db..52e585d8 --- a/src/search.js +++ b/src/search.js @@ -45,28 +45,40 @@ module.exports = function(list) { }; var search = { list: function() { + // Extract quoted phrases "word1 word2" from original searchString + // searchString is converted to lowercase by List.js + var words = [], phrase, ss = searchString; + while ((phrase = ss.match(/"([^"]+)"/)) !== null) { + words.push(phrase[1]); + ss = ss.substring(0,phrase.index) + ss.substring(phrase.index+phrase[0].length); + }; + // Get remaining space-separated words (if any) + ss = ss.trim(); + if (ss.length) words = words.concat(ss.split(/\s+/)); for (var k = 0, kl = list.items.length; k < kl; k++) { - search.item(list.items[k]); - } - }, - item: function(item) { - item.found = false; - for (var j = 0, jl = columns.length; j < jl; j++) { - if (search.values(item.values(), columns[j])) { - item.found = true; - return; - } - } - }, - values: function(values, column) { - if (values.hasOwnProperty(column)) { - text = list.utils.toString(values[column]).toLowerCase(); - if ((searchString !== "") && (text.search(searchString) > -1)) { - return true; + var item = list.items[k]; + item.found = false; + if (!words.length) continue; + for (var i = 0, il = words.length; i < il; i++) { + var word_found = false; + for (var j = 0, jl = columns.length; j < jl; j++) { + var values = item.values(), column = columns[j]; + if (values.hasOwnProperty(column) && values[column] !== undefined && values[column] !== null) { + var text = (typeof values[column] !== 'string') ? values[column].toString() : values[column]; + if (text.toLowerCase().indexOf(words[i]) !== -1) { + // word found, so no need to check it against any other columns + word_found = true; + break; + } + } + } + // this word not found? no need to check any other words, the item cannot match + if (!word_found) break; } + item.found = word_found; } - return false; }, + // Removed search.item() and search.values() reset: function() { list.reset.search(); list.searched = false; From 5a8c19beb5ea6f80bd5cc959128c53c90ee80130 Mon Sep 17 00:00:00 2001 From: sheffieldnick Date: Thu, 2 Apr 2020 14:29:54 +0000 Subject: [PATCH 176/246] Multiple word searching documented in List API --- docs/api.html | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/docs/api.html b/docs/api.html index cae012cf..b7210ceb 100755 --- a/docs/api.html +++ b/docs/api.html @@ -276,23 +276,32 @@

                        Methods

                        Searches the list

                        itemsInList = [
                        -{ id: 1, name: "Jonny" }
                        -, { id: 2, name "Gustaf" }
                        -, { id: 3, name "Jonas" }
                        +{ id: 1, name: "Jonny Stromberg", born: 1986 }
                        +, { id: 2, name "Jonas Arnklint", born: 1985 }
                        +, { id: 3, name "Martina Elm", born: 1986 }
                        +, { id: 4, name "Gustaf Lindqvist", born: 1983 }
                        +, { id: 5, name "Jonny Strandberg", born: 1990 }
                         ];
                         
                        -listObj.search('Jonny'); // Only item with name Jonny is shown (also returns this item)
                        +listObj.search('Jonny'); // Only items with name Jonny are shown (also returns these items)
                         
                         listObj.search(); // Show all items in list
                         
                        -listObj.search('Jonny', ['name']); // Only search in the 'name' column
                        +listObj.search('Jonny', ['name']); // Only search in the 'name' column
                        + +

                        Space-separated words match in any order using logical AND. Surround a phrase in quotes for exact matches:

                        + +
                        listObj.search('Jon 198'); // Items that match Jon AND 198
                        +
                        +listObj.search('"Jonny S" 1990'); // Items that match "Jonny S" AND 1990
                        + +

                        Optionally your own search function can be used:

                        -listObj.search('Jonny', searchFunction); // Custom search for Jonny +
                        listObj.search('Jonny', searchFunction); // Custom search for Jonny
                         
                        -listObj.search('Jonny', ['name'], searchFunction); // Custom search in the 'name' column
                        -

                        The optional searchFunction should be of the form:

                        +listObj.search('Jonny', ['name'], searchFunction); // Custom search in the 'name' column -
                        function searchFunction(searchString, columns) {
                        +function searchFunction(searchString, columns) {
                           for (var k = 0, kl = listObj.items.length; k < kl; k++) {
                              listObj.items[k].found = false;
                              // Insert your custom search logic here, set found = true
                        
                        From ec685e7b4f55928592573a859be57faeede960ca Mon Sep 17 00:00:00 2001
                        From: sheffieldnick 
                        Date: Thu, 2 Apr 2020 15:22:37 +0000
                        Subject: [PATCH 177/246] Added test units for multi-word and quoted phrase
                         searches
                        
                        ---
                         __test__/search.test.js | 48 ++++++++++++++++++++++++++++++++++++++---
                         1 file changed, 45 insertions(+), 3 deletions(-)
                         mode change 100644 => 100755 __test__/search.test.js
                        
                        diff --git a/__test__/search.test.js b/__test__/search.test.js
                        old mode 100644
                        new mode 100755
                        index 6139b49a..8c62684e
                        --- a/__test__/search.test.js
                        +++ b/__test__/search.test.js
                        @@ -109,7 +109,7 @@ describe('Search', function() {
                           });
                         
                         
                        -  describe('Specfic columns', function() {
                        +  describe('Specific columns', function() {
                             it('should find match in column', function() {
                               var result = list.search('jonny', [ 'name' ]);
                               expect(result.length).toEqual(1);
                        @@ -128,11 +128,11 @@ describe('Search', function() {
                               var result = list.search('jonny', [ 'born' ]);
                               expect(result.length).toEqual(0);
                             });
                        -    it('should work with columns that does not exist', function() {
                        +    it('should work with columns that do not exist', function() {
                               var result = list.search('jonny', [ 'pet' ]);
                               expect(result.length).toEqual(0);
                             });
                        -    it('should remove columnm option', function() {
                        +    it('should remove column option', function() {
                               var result = list.search('jonny', [ 'born' ]);
                               expect(result.length).toEqual(0);
                               result = list.search('jonny');
                        @@ -157,6 +157,48 @@ describe('Search', function() {
                               expect(result.length).toEqual(4);
                             });
                           });
                        +
                        +  describe('Multiple word search', function() {
                        +    it('should find jonny, hasse', function() {
                        +      var result = list.search('berg str');
                        +      expect(result.length).toEqual(2);
                        +      expect(jonny.matching()).toBe(true);
                        +      expect(martina.matching()).toBe(false);
                        +      expect(angelica.matching()).toBe(false);
                        +      expect(sebastian.matching()).toBe(false);
                        +      expect(imma.matching()).toBe(false);
                        +      expect(hasse.matching()).toBe(true);
                        +    });
                        +    it('should find martina, angelica, sebastian, hasse', function() {
                        +      var result = list.search('a e');
                        +      expect(result.length).toEqual(4);
                        +      expect(jonny.matching()).toBe(false);
                        +      expect(martina.matching()).toBe(true);
                        +      expect(angelica.matching()).toBe(true);
                        +      expect(sebastian.matching()).toBe(true);
                        +      expect(imma.matching()).toBe(false);
                        +      expect(hasse.matching()).toBe(true);
                        +    });
                        +    it('stripping whitespace should find martina', function() {
                        +      var result = list.search('martina  elm ');
                        +      expect(result.length).toEqual(1);
                        +      expect(result[0]).toEqual(martina);
                        +    });
                        +  });
                        +
                        +  describe('Quoted phrase searches', function() {
                        +    it('should find martina', function() {
                        +      var result = list.search('"a e"');
                        +      expect(result.length).toEqual(1);
                        +      expect(result[0]).toEqual(martina);
                        +    });
                        +    it('quoted phrase and multiple words should find jonny', function() {
                        +      var result = list.search('" str" 1986');
                        +      expect(result.length).toEqual(1);
                        +      expect(result[0]).toEqual(jonny);
                        +    });
                        +  });
                        +
                           //
                           // describe('Special characters', function() {
                           //   it('should escape and handle special characters', function() {
                        
                        From 4a8c40f050ecd087189dd7a39556ba891c32f302 Mon Sep 17 00:00:00 2001
                        From: sheffieldnick 
                        Date: Thu, 2 Apr 2020 18:02:10 +0000
                        Subject: [PATCH 178/246] Generic debounce wrapper added to utils/events.js
                        
                        ---
                         src/utils/events.js | 27 +++++++++++++++++++++++++++
                         1 file changed, 27 insertions(+)
                         mode change 100644 => 100755 src/utils/events.js
                        
                        diff --git a/src/utils/events.js b/src/utils/events.js
                        old mode 100644
                        new mode 100755
                        index 21695985..63a14e92
                        --- a/src/utils/events.js
                        +++ b/src/utils/events.js
                        @@ -36,3 +36,30 @@ exports.unbind = function(el, type, fn, capture){
                             el[i][unbind](prefix + type, fn, capture || false);
                           }
                         };
                        +
                        +/**
                        + * Returns a function, that, as long as it continues to be invoked, will not
                        + * be triggered. The function will be called after it stops being called for
                        + * `wait` milliseconds. If `immediate` is true, trigger the function on the
                        + * leading edge, instead of the trailing.
                        + *
                        + * @param {Function} fn
                        + * @param {Integer} wait
                        + * @param {Boolean} immediate
                        + * @api public
                        + */
                        +
                        +exports.debounce = function(fn, wait, immediate){
                        +  var timeout;
                        +	return function() {
                        +		var context = this, args = arguments;
                        +		var later = function() {
                        +			timeout = null;
                        +			if (!immediate) fn.apply(context, args);
                        +		};
                        +		var callNow = immediate && !timeout;
                        +		clearTimeout(timeout);
                        +		timeout = setTimeout(later, wait);
                        +		if (callNow) fn.apply(context, args);
                        +	};  
                        +};
                        
                        From bc88b0bcbc0d5501aecaac5c423de2f317487954 Mon Sep 17 00:00:00 2001
                        From: sheffieldnick 
                        Date: Thu, 2 Apr 2020 20:43:39 +0000
                        Subject: [PATCH 179/246] Debounce keyup handler for search and fuzzySearch.
                         Wait for 750ms inactivity makes searching far more usable with very large
                         lists and/or slow devices
                        
                        ---
                         src/fuzzy-search.js | 4 ++--
                         src/search.js       | 4 ++--
                         2 files changed, 4 insertions(+), 4 deletions(-)
                         mode change 100644 => 100755 src/fuzzy-search.js
                        
                        diff --git a/src/fuzzy-search.js b/src/fuzzy-search.js
                        old mode 100644
                        new mode 100755
                        index ac49dfa1..1852526a
                        --- a/src/fuzzy-search.js
                        +++ b/src/fuzzy-search.js
                        @@ -56,10 +56,10 @@ module.exports = function(list, options) {
                           };
                         
                         
                        -  events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) {
                        +  events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', list.utils.events.debounce(function(e) {
                             var target = e.target || e.srcElement; // IE have srcElement
                             list.search(target.value, fuzzySearch.search);
                        -  });
                        +  }, 750));
                         
                           return function(str, columns) {
                             list.search(str, columns, fuzzySearch.search);
                        diff --git a/src/search.js b/src/search.js
                        index 52e585d8..f4c355da 100755
                        --- a/src/search.js
                        +++ b/src/search.js
                        @@ -112,13 +112,13 @@ module.exports = function(list) {
                           list.handlers.searchStart = list.handlers.searchStart || [];
                           list.handlers.searchComplete = list.handlers.searchComplete || [];
                         
                        -  list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function(e) {
                        +  list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', list.utils.events.debounce(function(e) {
                             var target = e.target || e.srcElement, // IE have srcElement
                               alreadyCleared = (target.value === "" && !list.searched);
                             if (!alreadyCleared) { // If oninput already have resetted the list, do nothing
                               searchMethod(target.value);
                             }
                        -  });
                        +  }, 750));
                         
                           // Used to detect click on HTML5 clear button
                           list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function(e) {
                        
                        From 071b1a72582fbeaeb1037a9d0e63a11c96851417 Mon Sep 17 00:00:00 2001
                        From: sheffieldnick 
                        Date: Fri, 3 Apr 2020 09:17:30 +0000
                        Subject: [PATCH 180/246] New List option searchDelay to control debounce in
                         search keypress, default 0. Updated API doc
                        
                        ---
                         docs/api.html       | 3 +++
                         src/fuzzy-search.js | 2 +-
                         src/index.js        | 1 +
                         src/search.js       | 2 +-
                         src/utils/events.js | 4 ++--
                         5 files changed, 8 insertions(+), 4 deletions(-)
                         mode change 100644 => 100755 src/index.js
                        
                        diff --git a/docs/api.html b/docs/api.html
                        index b7210ceb..9c71aec3 100755
                        --- a/docs/api.html
                        +++ b/docs/api.html
                        @@ -21,6 +21,7 @@ 

                        Options

                      • pagination
                      • searchClass
                      • searchColumns
                      • +
                      • searchDelay
                      • sortClass
                      • valueNames
                      @@ -124,6 +125,8 @@

                      What is the class of the search field?

                    • searchColumns Array of strings, default: undefined
                      Restrict searching to just these column names? Default is to search all columns.

                    • +
                    • searchDelay Int default: 0
                      +Delay in milliseconds after last keypress in search field before search starts. 250→750 is good for very large lists.

                    • sortClass String, default: "sort"
                      What is the class of the sort buttons?

                    • indexAsync Boolean, default: false
                      diff --git a/src/fuzzy-search.js b/src/fuzzy-search.js index 1852526a..77f9f4f4 100755 --- a/src/fuzzy-search.js +++ b/src/fuzzy-search.js @@ -59,7 +59,7 @@ module.exports = function(list, options) { events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', list.utils.events.debounce(function(e) { var target = e.target || e.srcElement; // IE have srcElement list.search(target.value, fuzzySearch.search); - }, 750)); + }, list.searchDelay)); return function(str, columns) { list.search(str, columns, fuzzySearch.search); diff --git a/src/index.js b/src/index.js old mode 100644 new mode 100755 index 887019ff..5004e912 --- a/src/index.js +++ b/src/index.js @@ -29,6 +29,7 @@ module.exports = function(id, options, values) { self.searched = false; self.filtered = false; self.searchColumns = undefined; + self.searchDelay = 0; self.handlers = { 'updated': [] }; self.valueNames = []; self.utils = { diff --git a/src/search.js b/src/search.js index f4c355da..f3d98250 100755 --- a/src/search.js +++ b/src/search.js @@ -118,7 +118,7 @@ module.exports = function(list) { if (!alreadyCleared) { // If oninput already have resetted the list, do nothing searchMethod(target.value); } - }, 750)); + }, list.searchDelay)); // Used to detect click on HTML5 clear button list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function(e) { diff --git a/src/utils/events.js b/src/utils/events.js index 63a14e92..85903198 100755 --- a/src/utils/events.js +++ b/src/utils/events.js @@ -51,7 +51,7 @@ exports.unbind = function(el, type, fn, capture){ exports.debounce = function(fn, wait, immediate){ var timeout; - return function() { + return wait ? function() { var context = this, args = arguments; var later = function() { timeout = null; @@ -61,5 +61,5 @@ exports.debounce = function(fn, wait, immediate){ clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) fn.apply(context, args); - }; + } : fn; }; From 2882d8c97f2df7e2665abea15e41627d2a0efe83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 11:55:50 +0100 Subject: [PATCH 181/246] Site: Update Github Pages gem and ruby version --- .gitignore | 1 + docs/.bundle/config | 2 + docs/.ruby-version | 1 + docs/Gemfile.lock | 245 +++++++++++++++++++++++--------------------- 4 files changed, 133 insertions(+), 116 deletions(-) create mode 100644 docs/.bundle/config create mode 100644 docs/.ruby-version diff --git a/.gitignore b/.gitignore index 82489b93..4269a0a5 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ docs/_site docs/.sass-cache docs/.jekyll-metadata coverage +docs/vendor \ No newline at end of file diff --git a/docs/.bundle/config b/docs/.bundle/config new file mode 100644 index 00000000..23692288 --- /dev/null +++ b/docs/.bundle/config @@ -0,0 +1,2 @@ +--- +BUNDLE_PATH: "vendor/bundle" diff --git a/docs/.ruby-version b/docs/.ruby-version new file mode 100644 index 00000000..5588ae82 --- /dev/null +++ b/docs/.ruby-version @@ -0,0 +1 @@ +2.7.1 \ No newline at end of file diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock index 4a9ef570..670f234c 100644 --- a/docs/Gemfile.lock +++ b/docs/Gemfile.lock @@ -1,148 +1,151 @@ GEM remote: https://rubygems.org/ specs: - activesupport (4.2.10) - i18n (~> 0.7) + activesupport (6.0.3.4) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + zeitwerk (~> 2.2, >= 2.2.2) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.12.2) + coffee-script-source (1.11.1) colorator (1.1.0) commonmarker (0.17.13) ruby-enum (~> 0.5) - concurrent-ruby (1.0.5) - dnsruby (1.61.2) - addressable (~> 2.5) - em-websocket (0.5.1) + concurrent-ruby (1.1.7) + dnsruby (1.61.5) + simpleidn (~> 0.1) + em-websocket (0.5.2) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) - ethon (0.11.0) + ethon (0.12.0) ffi (>= 1.3.0) eventmachine (1.2.7) execjs (2.7.0) - faraday (0.15.4) + faraday (1.1.0) multipart-post (>= 1.2, < 3) - ffi (1.9.25) + ruby2_keywords + ffi (1.13.1) forwardable-extended (2.6.0) - gemoji (3.0.0) - github-pages (192) - activesupport (= 4.2.10) - github-pages-health-check (= 1.8.1) - jekyll (= 3.7.4) - jekyll-avatar (= 0.6.0) + gemoji (3.0.1) + github-pages (209) + github-pages-health-check (= 1.16.1) + jekyll (= 3.9.0) + jekyll-avatar (= 0.7.0) jekyll-coffeescript (= 1.1.1) - jekyll-commonmark-ghpages (= 0.1.5) + jekyll-commonmark-ghpages (= 0.1.6) jekyll-default-layout (= 0.1.4) - jekyll-feed (= 0.10.0) + jekyll-feed (= 0.15.1) jekyll-gist (= 1.5.0) - jekyll-github-metadata (= 2.9.4) - jekyll-mentions (= 1.4.1) - jekyll-optional-front-matter (= 0.3.0) + jekyll-github-metadata (= 2.13.0) + jekyll-mentions (= 1.6.0) + jekyll-optional-front-matter (= 0.3.2) jekyll-paginate (= 1.1.0) - jekyll-readme-index (= 0.2.0) - jekyll-redirect-from (= 0.14.0) - jekyll-relative-links (= 0.5.3) - jekyll-remote-theme (= 0.3.1) + jekyll-readme-index (= 0.3.0) + jekyll-redirect-from (= 0.16.0) + jekyll-relative-links (= 0.6.1) + jekyll-remote-theme (= 0.4.2) jekyll-sass-converter (= 1.5.2) - jekyll-seo-tag (= 2.5.0) - jekyll-sitemap (= 1.2.0) - jekyll-swiss (= 0.4.0) + jekyll-seo-tag (= 2.6.1) + jekyll-sitemap (= 1.4.0) + jekyll-swiss (= 1.0.0) jekyll-theme-architect (= 0.1.1) jekyll-theme-cayman (= 0.1.1) jekyll-theme-dinky (= 0.1.1) - jekyll-theme-hacker (= 0.1.1) + jekyll-theme-hacker (= 0.1.2) jekyll-theme-leap-day (= 0.1.1) jekyll-theme-merlot (= 0.1.1) jekyll-theme-midnight (= 0.1.1) jekyll-theme-minimal (= 0.1.1) jekyll-theme-modernist (= 0.1.1) - jekyll-theme-primer (= 0.5.3) + jekyll-theme-primer (= 0.5.4) jekyll-theme-slate (= 0.1.1) jekyll-theme-tactile (= 0.1.1) jekyll-theme-time-machine (= 0.1.1) - jekyll-titles-from-headings (= 0.5.1) - jemoji (= 0.10.1) - kramdown (= 1.17.0) - liquid (= 4.0.0) - listen (= 3.1.5) + jekyll-titles-from-headings (= 0.5.3) + jemoji (= 0.12.0) + kramdown (= 2.3.0) + kramdown-parser-gfm (= 1.1.0) + liquid (= 4.0.3) mercenary (~> 0.3) - minima (= 2.5.0) - nokogiri (>= 1.8.2, < 2.0) - rouge (= 2.2.1) + minima (= 2.5.1) + nokogiri (>= 1.10.4, < 2.0) + rouge (= 3.23.0) terminal-table (~> 1.4) - github-pages-health-check (1.8.1) + github-pages-health-check (1.16.1) addressable (~> 2.3) dnsruby (~> 1.60) octokit (~> 4.0) - public_suffix (~> 2.0) + public_suffix (~> 3.0) typhoeus (~> 1.3) - html-pipeline (2.8.4) + html-pipeline (2.14.0) activesupport (>= 2) nokogiri (>= 1.4) http_parser.rb (0.6.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - jekyll (3.7.4) + jekyll (3.9.0) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) i18n (~> 0.7) jekyll-sass-converter (~> 1.0) jekyll-watch (~> 2.0) - kramdown (~> 1.14) + kramdown (>= 1.17, < 3) liquid (~> 4.0) mercenary (~> 0.3.3) pathutil (~> 0.9) rouge (>= 1.7, < 4) safe_yaml (~> 1.0) - jekyll-avatar (0.6.0) - jekyll (~> 3.0) + jekyll-avatar (0.7.0) + jekyll (>= 3.0, < 5.0) jekyll-coffeescript (1.1.1) coffee-script (~> 2.2) coffee-script-source (~> 1.11.1) - jekyll-commonmark (1.2.0) + jekyll-commonmark (1.3.1) commonmarker (~> 0.14) - jekyll (>= 3.0, < 4.0) - jekyll-commonmark-ghpages (0.1.5) + jekyll (>= 3.7, < 5.0) + jekyll-commonmark-ghpages (0.1.6) commonmarker (~> 0.17.6) - jekyll-commonmark (~> 1) - rouge (~> 2) + jekyll-commonmark (~> 1.2) + rouge (>= 2.0, < 4.0) jekyll-default-layout (0.1.4) jekyll (~> 3.0) - jekyll-feed (0.10.0) - jekyll (~> 3.3) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) jekyll-gist (1.5.0) octokit (~> 4.2) - jekyll-github-metadata (2.9.4) - jekyll (~> 3.1) + jekyll-github-metadata (2.13.0) + jekyll (>= 3.4, < 5.0) octokit (~> 4.0, != 4.4.0) - jekyll-mentions (1.4.1) + jekyll-mentions (1.6.0) html-pipeline (~> 2.3) - jekyll (~> 3.0) - jekyll-optional-front-matter (0.3.0) - jekyll (~> 3.0) + jekyll (>= 3.7, < 5.0) + jekyll-optional-front-matter (0.3.2) + jekyll (>= 3.0, < 5.0) jekyll-paginate (1.1.0) - jekyll-readme-index (0.2.0) - jekyll (~> 3.0) - jekyll-redirect-from (0.14.0) - jekyll (~> 3.3) - jekyll-relative-links (0.5.3) - jekyll (~> 3.3) - jekyll-remote-theme (0.3.1) - jekyll (~> 3.5) - rubyzip (>= 1.2.1, < 3.0) + jekyll-readme-index (0.3.0) + jekyll (>= 3.0, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-relative-links (0.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.2) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) jekyll-sass-converter (1.5.2) sass (~> 3.4) - jekyll-seo-tag (2.5.0) - jekyll (~> 3.3) - jekyll-sitemap (1.2.0) - jekyll (~> 3.3) - jekyll-swiss (0.4.0) + jekyll-seo-tag (2.6.1) + jekyll (>= 3.3, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-swiss (1.0.0) jekyll-theme-architect (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) @@ -152,8 +155,8 @@ GEM jekyll-theme-dinky (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-hacker (0.1.1) - jekyll (~> 3.5) + jekyll-theme-hacker (0.1.2) + jekyll (> 3.5, < 5.0) jekyll-seo-tag (~> 2.0) jekyll-theme-leap-day (0.1.1) jekyll (~> 3.5) @@ -170,8 +173,8 @@ GEM jekyll-theme-modernist (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-theme-primer (0.5.3) - jekyll (~> 3.5) + jekyll-theme-primer (0.5.4) + jekyll (> 3.5, < 5.0) jekyll-github-metadata (~> 2.9) jekyll-seo-tag (~> 2.0) jekyll-theme-slate (0.1.1) @@ -183,60 +186,70 @@ GEM jekyll-theme-time-machine (0.1.1) jekyll (~> 3.5) jekyll-seo-tag (~> 2.0) - jekyll-titles-from-headings (0.5.1) - jekyll (~> 3.3) - jekyll-watch (2.1.2) + jekyll-titles-from-headings (0.5.3) + jekyll (>= 3.3, < 5.0) + jekyll-watch (2.2.1) listen (~> 3.0) - jemoji (0.10.1) + jemoji (0.12.0) gemoji (~> 3.0) html-pipeline (~> 2.2) - jekyll (~> 3.0) - kramdown (1.17.0) - liquid (4.0.0) - listen (3.1.5) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - ruby_dep (~> 1.2) + jekyll (>= 3.0, < 5.0) + kramdown (2.3.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.3.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.3.0) - minima (2.5.0) - jekyll (~> 3.5) + mini_portile2 (2.4.0) + minima (2.5.1) + jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) - minitest (5.11.3) - multipart-post (2.0.0) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) - octokit (4.13.0) + minitest (5.14.2) + multipart-post (2.1.1) + nokogiri (1.10.10) + mini_portile2 (~> 2.4.0) + octokit (4.19.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.16.1) + pathutil (0.16.2) forwardable-extended (~> 2.6) - public_suffix (2.0.5) - rb-fsevent (0.10.3) - rb-inotify (0.9.10) - ffi (>= 0.5.0, < 2) - rouge (2.2.1) - ruby-enum (0.7.2) + public_suffix (3.1.1) + rb-fsevent (0.10.4) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.4) + rouge (3.23.0) + ruby-enum (0.8.0) i18n - ruby_dep (1.5.0) - rubyzip (1.2.2) - safe_yaml (1.0.4) - sass (3.6.0) + ruby2_keywords (0.0.2) + rubyzip (2.3.0) + safe_yaml (1.0.5) + sass (3.7.4) sass-listen (~> 4.0.0) sass-listen (4.0.0) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) + simpleidn (0.1.1) + unf (~> 0.1.4) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) - typhoeus (1.3.0) + typhoeus (1.4.0) ethon (>= 0.9.0) - tzinfo (1.2.5) + tzinfo (1.2.8) thread_safe (~> 0.1) - unicode-display_width (1.4.0) + unf (0.1.4) + unf_ext + unf_ext (0.0.7.7) + unicode-display_width (1.7.0) + zeitwerk (2.4.1) PLATFORMS ruby @@ -245,4 +258,4 @@ DEPENDENCIES github-pages BUNDLED WITH - 1.16.2 + 2.1.4 From f7ce7b557d043d0fc7e3e7ffc2fe8025631c91f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:07:19 +0100 Subject: [PATCH 182/246] Update bower.json --- bower.json | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/bower.json b/bower.json index 648df2cc..aea09c3c 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "list.js", "main": "dist/list.js", - "homepage": "http://listjs.com", + "homepage": "https://listjs.com", "authors": [ "Jonny Strömberg " ], @@ -19,9 +19,7 @@ "ignore": [ "**/.*", "node_modules", - "bower_components", - "components", - "test", - "tests" + "__test__", + "docs" ] } From 7b94a78a82131c9ab4127172c8ee452538d982bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:07:53 +0100 Subject: [PATCH 183/246] Update node version --- .nvmrc | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..7c6b4259 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +14.15.1 \ No newline at end of file diff --git a/package.json b/package.json index bcb37f8f..c0ddd98c 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ }, "main": "src/index", "engines": { - "node": "^6.15" + "node": "^14.15.1" }, "scripts": { "test": "jest" From 7036d310e856e1a451947ea9be48758c230f8e29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:08:08 +0100 Subject: [PATCH 184/246] Misc package.json --- package.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index c0ddd98c..6fd3c36f 100644 --- a/package.json +++ b/package.json @@ -14,9 +14,9 @@ "author": { "name": "Jonny Strömberg", "email": "jonny.stromberg@gmail.com>", - "url": "http://javve.com" + "url": "https://javve.com" }, - "homepage": "http://listjs.com", + "homepage": "https://listjs.com", "repository": "git://github.com/javve/list.js.git", "license": "MIT", "bugs": { @@ -51,7 +51,10 @@ "jest": { "coverageDirectory": "./coverage/", "collectCoverage": true, - "collectCoverageFrom": ["src/*.js", "src/utils/*.js"], + "collectCoverageFrom": [ + "src/*.js", + "src/utils/*.js" + ], "testURL": "http://localhost/" } } From 7e238238203b1a4e82a2c136443a9ee2a27f6179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:16:00 +0100 Subject: [PATCH 185/246] Update jest 26.6.3, jquery 3.5.1, jshint 2.12 --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6fd3c36f..063efacc 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "jest": "^23.3", - "jquery": "^3.3.1", - "jshint": "^2.9.4", + "jest": "^26.6.3", + "jquery": "^3.5.1", + "jshint": "^2.12.0", "jshint-loader": "^0.8.4", "webpack": "^3.12.0" }, From f132fbf2823704df170fa823dd49d66a6e4aa4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:16:14 +0100 Subject: [PATCH 186/246] Add package-lock.json --- package-lock.json | 8339 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 8339 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..e2c52dd3 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8339 @@ +{ + "name": "list.js", + "version": "1.5.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/core": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz", + "integrity": "sha512-tRKx9B53kJe8NCGGIxEQb2Bkr0riUIEuN7Sc1fxhs5H8lKlCWUvQCSNMVIB0Meva7hcbCRJ76de15KoLltdoqw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helpers": "^7.12.5", + "@babel/parser": "^7.12.7", + "@babel/template": "^7.12.7", + "@babel/traverse": "^7.12.7", + "@babel/types": "^7.12.7", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.19", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.5.tgz", + "integrity": "sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", + "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", + "dev": true, + "requires": { + "@babel/types": "^7.12.7" + } + }, + "@babel/helper-module-imports": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", + "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.5" + } + }, + "@babel/helper-module-transforms": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", + "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/helper-validator-identifier": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.1", + "@babel/types": "^7.12.1", + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.7.tgz", + "integrity": "sha512-I5xc9oSJ2h59OwyUqjv95HRyzxj53DAubUERgQMrpcCEYQyToeHA+NEcUEsVWB4j53RDeskeBJ0SgRAYHDBckw==", + "dev": true, + "requires": { + "@babel/types": "^7.12.7" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", + "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", + "dev": true + }, + "@babel/helper-replace-supers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", + "integrity": "sha512-5YILoed0ZyIpF4gKcpZitEnXEJ9UoDRki1Ey6xz46rxOzfNMAhVIJMoune1hmPVxh40LRv1+oafz7UsWX+vyWA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + } + }, + "@babel/helper-simple-access": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", + "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.11.0", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", + "integrity": "sha512-74Vejvp6mHkGE+m+k5vHY93FX2cAtrw1zXrZXRlG4l410Nm9PxfEiVTn1PjDPV5SnmieiueY4AFg2xqhNFuuZg==", + "dev": true, + "requires": { + "@babel/types": "^7.11.0" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/helpers": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", + "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", + "dev": true, + "requires": { + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.12.5", + "@babel/types": "^7.12.5" + } + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/parser": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.7.tgz", + "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", + "dev": true + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/template": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", + "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7" + } + }, + "@babel/traverse": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.7.tgz", + "integrity": "sha512-nMWaqsQEeSvMNypswUDzjqQ+0rR6pqCtoQpsqGJC4/Khm9cISwPTSpai57F6/jDaOoEGz8yE/WxcO3PV6tKSmQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.12.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.11.0", + "@babel/parser": "^7.12.7", + "@babel/types": "^7.12.7", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.19" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@babel/types": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.7.tgz", + "integrity": "sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", + "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, + "requires": { + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true + }, + "@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" + } + }, + "@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + } + }, + "@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "node-notifier": "^8.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/source-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/test-result": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "@jest/transform": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + } + }, + "@sinonjs/commons": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", + "integrity": "sha512-892K+kWUUi3cl+LlqEWIDrhvLgdL79tECi8JZUyq6IviKy/DNhuzCRlbHUjxK89f4ypPMMaFnFuR9Ie6DoIMsw==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@types/babel__core": { + "version": "7.1.12", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", + "integrity": "sha512-wMTHiiTiBAAPebqaPiPDLFA4LYPKr6Ph0Xq/6rq1Ur3v66HXyG+clfR9CNETkD7MQS8ZHvpQOtA53DLws5WAEQ==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.0.15.tgz", + "integrity": "sha512-Pzh9O3sTK8V6I1olsXpCfj2k/ygO2q1X0vhhnDrEQyYLHZesWz+zMZMVcwXLCYf0U36EtmyYaFGPfXlTtDHe3A==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/graceful-fs": { + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.4.tgz", + "integrity": "sha512-mWA/4zFQhfvOA8zWkXobwJvBD7vzcxgrOQ0J5CH1votGqdq9m7+FwtGaqyCZqC3NyyBkc9z4m+iry4LlqcMWJg==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/node": { + "version": "14.14.9", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", + "integrity": "sha512-JsoLXFppG62tWTklIoO4knA+oDTYsmqWxHRvd4lpmfQRNhX6osheUOWETP2jMoV/2bEHuMra8Pp3Dmo/stBFcw==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/prettier": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.1.5.tgz", + "integrity": "sha512-UEyp8LwZ4Dg30kVU2Q3amHHyTn1jEdhCIE59ANed76GaT1Vp76DD3ZWSAxgCrw6wJ0TqeoBpqmfUHiUDPs//HQ==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "dev": true + }, + "@types/yargs": { + "version": "15.0.10", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.10.tgz", + "integrity": "sha512-z8PNtlhrj7eJNLmrAivM7rjBESG6JwC5xP3RVk12i/8HVP7Xnx/sEmERnRImyEuUaJfO942X0qMOYsoupaJbZQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-15.0.0.tgz", + "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", + "dev": true + }, + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, + "acorn": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", + "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "dev": true + }, + "acorn-dynamic-import": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", + "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", + "dev": true, + "requires": { + "acorn": "^4.0.3" + }, + "dependencies": { + "acorn": { + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", + "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", + "dev": true + } + } + }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true + }, + "ajv": { + "version": "6.10.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", + "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "dev": true + }, + "align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", + "dev": true, + "requires": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "async": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", + "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "babel-jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.0.tgz", + "integrity": "sha512-mGkvkpocWJes1CmMKtgGUwCeeq0pOhALyymozzDWYomHTbDLwueDYG6p4TK1YOeYHCzBzYPsWkgTto10JubI1Q==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + } + }, + "browserify-sign": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", + "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", + "dev": true, + "requires": { + "bn.js": "^4.1.1", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.2", + "elliptic": "^6.0.0", + "inherits": "^2.0.1", + "parse-asn1": "^5.0.0" + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer": { + "version": "4.9.2", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", + "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4", + "isarray": "^1.0.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, + "requires": { + "rsvp": "^4.8.4" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", + "dev": true, + "requires": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + }, + "dependencies": { + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "cli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", + "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", + "dev": true, + "requires": { + "exit": "0.1.2", + "glob": "^7.1.1" + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "console-browserify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", + "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", + "dev": true, + "requires": { + "date-now": "^0.1.4" + } + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", + "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.0.0" + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "requires": { + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "requires": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + } + }, + "date-now": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", + "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decimal.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", + "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==", + "dev": true + }, + "entities": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", + "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", + "dev": true + } + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } + } + }, + "domhandler": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", + "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", + "dev": true, + "requires": { + "domelementtype": "1" + } + }, + "domutils": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", + "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "elliptic": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", + "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "emojis-list": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", + "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "enhanced-resolve": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", + "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "object-assign": "^4.0.1", + "tapable": "^0.2.7" + } + }, + "entities": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", + "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", + "dev": true + }, + "errno": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", + "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "dev": true, + "requires": { + "prr": "~1.0.1" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-map": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", + "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-set": "~0.1.5", + "es6-symbol": "~3.1.1", + "event-emitter": "~0.3.5" + } + }, + "es6-set": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", + "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14", + "es6-iterator": "~2.0.1", + "es6-symbol": "3.1.1", + "event-emitter": "~0.3.5" + }, + "dependencies": { + "es6-symbol": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", + "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + } + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.14.3", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz", + "integrity": "sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^4.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "escope": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", + "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "dev": true, + "requires": { + "es6-map": "^0.1.3", + "es6-weak-map": "^2.0.1", + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", + "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "exec-sh": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", + "integrity": "sha512-sEFIkc61v75sWeOe72qyrqg2Qg0OuLESziUDk/O/z2qgS15y2gWVFrI6f2Qn/qw/0/NCfCEsmNA4zOjkwEZT1A==", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expect": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + }, + "dependencies": { + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", + "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "dev": true, + "optional": true, + "requires": { + "nan": "^2.12.1", + "node-pre-gyp": "^0.12.0" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true, + "dev": true, + "optional": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "debug": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true, + "dev": true, + "optional": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true, + "dev": true, + "optional": true + }, + "ini": { + "version": "1.3.5", + "bundled": true, + "dev": true, + "optional": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "bundled": true, + "dev": true, + "optional": true + }, + "minipass": { + "version": "2.3.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.2.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "needle": { + "version": "2.3.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "debug": "^4.1.0", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.12.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.6", + "bundled": true, + "dev": true, + "optional": true + }, + "npm-packlist": { + "version": "1.4.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true, + "dev": true, + "optional": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true, + "dev": true, + "optional": true + }, + "sax": { + "version": "1.2.4", + "bundled": true, + "dev": true, + "optional": true + }, + "semver": { + "version": "5.7.0", + "bundled": true, + "dev": true, + "optional": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true, + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true, + "dev": true, + "optional": true + }, + "tar": { + "version": "4.4.8", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.4", + "minizlib": "^1.1.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true, + "dev": true, + "optional": true + }, + "yallist": { + "version": "3.0.3", + "bundled": true, + "dev": true, + "optional": true + } + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hosted-git-info": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.5" + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "htmlparser2": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", + "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", + "dev": true, + "requires": { + "domelementtype": "1", + "domhandler": "2.3", + "domutils": "1.5", + "entities": "1.0", + "readable-stream": "1.1" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "ip-regex": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", + "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", + "dev": true + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz", + "integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-docker": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.1.1.tgz", + "integrity": "sha512-ZOoqiXfEwtGknTiuDEy8pN2CfE3TxMHprvNer1mXiqwkOT77Rw3YVrUQ52EqAOU3QAWDQ+bQdx7HJzrv7LS2Hw==", + "dev": true, + "optional": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "is-potential-custom-element-name": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.0.tgz", + "integrity": "sha1-DFLlS8yjkbssSUsh6GJtczbG45c=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "jest-cli": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "prompts": "^2.0.1", + "yargs": "^15.4.1" + } + } + } + }, + "jest-changed-files": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } + }, + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "jest-config": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-docblock": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" + } + }, + "jest-environment-jsdom": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" + } + }, + "jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "dependencies": { + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "fsevents": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.2.1.tgz", + "integrity": "sha512-bTLYHSeC0UH/EFXS9KqWnXuOl/wHK5Z/d+ghd5AsFMYN7wIGkUCOJyzy88+wJKkZPGON8u4Z9f6U4FdgURE9qA==", + "dev": true, + "optional": true + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, + "jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" + } + }, + "jest-leak-detector": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "dev": true, + "requires": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true + }, + "jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true + }, + "jest-resolve": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" + } + }, + "jest-runner": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-serializer": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-snapshot": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.2", + "semver": "^7.3.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + } + } + }, + "jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "jest-validate": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" + } + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + } + }, + "jquery": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", + "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==", + "dev": true + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsdom": { + "version": "16.4.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.4.0.tgz", + "integrity": "sha512-lYMm3wYdgPhrl7pDcRmvzPhhrGVBeVhPIqeHjzeiHN3DFmD1RBpbExbi8vU7BJdH8VAZYovR8DMt0PNNDM7k8w==", + "dev": true, + "requires": { + "abab": "^2.0.3", + "acorn": "^7.1.1", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.2.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.0", + "domexception": "^2.0.1", + "escodegen": "^1.14.1", + "html-encoding-sniffer": "^2.0.1", + "is-potential-custom-element-name": "^1.0.0", + "nwsapi": "^2.2.0", + "parse5": "5.1.1", + "request": "^2.88.2", + "request-promise-native": "^1.0.8", + "saxes": "^5.0.0", + "symbol-tree": "^3.2.4", + "tough-cookie": "^3.0.1", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0", + "ws": "^7.2.3", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, + "jshint": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.12.0.tgz", + "integrity": "sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==", + "dev": true, + "requires": { + "cli": "~1.0.0", + "console-browserify": "1.1.x", + "exit": "0.1.x", + "htmlparser2": "3.8.x", + "lodash": "~4.17.19", + "minimatch": "~3.0.2", + "shelljs": "0.3.x", + "strip-json-comments": "1.0.x" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "jshint-loader": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/jshint-loader/-/jshint-loader-0.8.4.tgz", + "integrity": "sha1-tD7kXRN3adVliUChH479mg7c1Hs=", + "dev": true, + "requires": { + "loader-utils": "^1.0.2", + "rcloader": "=0.1.2", + "strip-json-comments": "0.1.x" + }, + "dependencies": { + "strip-json-comments": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz", + "integrity": "sha1-Fkxk43Coo8wAyeAbU55WmCPw7lQ=", + "dev": true + } + } + }, + "json-loader": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", + "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "loader-runner": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", + "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "dev": true + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + } + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.sortby": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", + "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", + "dev": true + }, + "longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", + "dev": true + }, + "lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "memory-fs": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", + "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", + "dev": true, + "requires": { + "errno": "^0.1.3", + "readable-stream": "^2.0.1" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "nan": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", + "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-libs-browser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", + "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", + "dev": true, + "requires": { + "assert": "^1.1.1", + "browserify-zlib": "^0.2.0", + "buffer": "^4.3.0", + "console-browserify": "^1.1.0", + "constants-browserify": "^1.0.0", + "crypto-browserify": "^3.11.0", + "domain-browser": "^1.1.1", + "events": "^3.0.0", + "https-browserify": "^1.0.0", + "os-browserify": "^0.3.0", + "path-browserify": "0.0.1", + "process": "^0.11.10", + "punycode": "^1.2.4", + "querystring-es3": "^0.2.0", + "readable-stream": "^2.3.3", + "stream-browserify": "^2.0.1", + "stream-http": "^2.7.2", + "string_decoder": "^1.0.0", + "timers-browserify": "^2.0.4", + "tty-browserify": "0.0.0", + "url": "^0.11.0", + "util": "^0.11.0", + "vm-browserify": "^1.0.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + } + } + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.0.tgz", + "integrity": "sha512-46z7DUmcjoYdaWyXouuFNNfUo6eFa94t23c53c+lG/9Cvauk4a98rAUp9672X5dxGdQmLpPzTxzu8f/OeEPaFA==", + "dev": true, + "optional": true, + "requires": { + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" + }, + "dependencies": { + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true, + "optional": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "optional": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", + "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "dev": true + }, + "parse-asn1": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", + "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "dev": true, + "requires": { + "asn1.js": "^4.0.0", + "browserify-aes": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "pbkdf2": { + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + } + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "prompts": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", + "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "dev": true + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "rcfinder": { + "version": "0.1.9", + "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz", + "integrity": "sha1-8+gPOH3fmugK4wpBADKWQuroERU=", + "dev": true, + "requires": { + "lodash.clonedeep": "^4.3.2" + } + }, + "rcloader": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.2.tgz", + "integrity": "sha1-oJY6ZDfQnvjLktky0trUl7DRc2w=", + "dev": true, + "requires": { + "lodash": "~2.4.1", + "rcfinder": "~0.1.6" + }, + "dependencies": { + "lodash": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", + "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", + "dev": true + } + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "parse-json": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + }, + "dependencies": { + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + } + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + } + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", + "integrity": "sha512-CxqObCX8K8YtAhOBRg+lrcdn+LK+WYOS8tSjqSFbjtrI5PnS63QPhZl4+yKfrU9tdsbMu9Anr/amegT87M9Z6w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", + "dev": true, + "requires": { + "align-text": "^0.1.1" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "dev": true, + "requires": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "setimmediate": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", + "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", + "dev": true + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", + "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", + "dev": true + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true, + "optional": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "kind-of": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "dev": true + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + } + }, + "source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", + "dev": true + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", + "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "dev": true, + "requires": { + "atob": "^2.1.1", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-http": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", + "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.3.6", + "to-arraybuffer": "^1.0.0", + "xtend": "^4.0.0" + } + }, + "string-length": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.1.tgz", + "integrity": "sha512-PKyXUd0LK0ePjSOnWn34V2uD6acUWev9uy0Ft05k0E8xRW+SKcA0F7eMr7h5xlzfn+4O3N+55rduYyet3Jk+jw==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string-natural-compare": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-2.0.3.tgz", + "integrity": "sha512-4Kcl12rNjc+6EKhY8QyDVuQTAlMWwRiNbsxnVwBUKFr7dYPQuXVrtNU4sEkjF9LHY0AY6uVbB3ktbkIH4LC+BQ==" + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + } + } + }, + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "strip-json-comments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", + "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.1.0.tgz", + "integrity": "sha512-zoE5/e+dnEijk6ASB6/qrK+oYdm2do1hjoLWrqUC/8WEIW1gbxFcKuBof7sW8ArN6e+AYvsE8HBGiVRWL/F5CA==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + } + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "tapable": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz", + "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==", + "dev": true + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, + "throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "dev": true + }, + "timers-browserify": { + "version": "2.0.11", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", + "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", + "dev": true, + "requires": { + "setimmediate": "^1.0.4" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-arraybuffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", + "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + } + } + } + }, + "tough-cookie": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-3.0.1.tgz", + "integrity": "sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg==", + "dev": true, + "requires": { + "ip-regex": "^2.1.0", + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tr46": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz", + "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, + "tty-browserify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", + "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "dev": true + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", + "dev": true, + "optional": true + }, + "uglifyjs-webpack-plugin": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", + "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", + "dev": true, + "requires": { + "source-map": "^0.5.6", + "uglify-js": "^2.8.29", + "webpack-sources": "^1.0.1" + }, + "dependencies": { + "camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "dev": true + }, + "cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", + "dev": true, + "requires": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "dev": true, + "requires": { + "source-map": "~0.5.1", + "uglify-to-browserify": "~1.0.0", + "yargs": "~3.10.0" + } + }, + "wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", + "dev": true + }, + "yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", + "dev": true, + "requires": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + } + } + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", + "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "uuid": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", + "integrity": "sha512-FOmRr+FmWEIG8uhZv6C2bTgEVXsHk08kE7mPlrBbEe+c3r9pjceVPgupIfNIhc4yx55H69OXANrUaSuu9eInKg==", + "dev": true, + "optional": true + }, + "v8-to-istanbul": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", + "integrity": "sha512-fLL2rFuQpMtm9r8hrAV2apXX/WqHJ6+IC4/eQVdMDGBUgH/YMV4Gv3duk3kjmyg6uiQWBAA9nJwue4iJUOkHeA==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, + "watchpack": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", + "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "dev": true, + "requires": { + "chokidar": "^2.0.2", + "graceful-fs": "^4.1.2", + "neo-async": "^2.5.0" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, + "webpack": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", + "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==", + "dev": true, + "requires": { + "acorn": "^5.0.0", + "acorn-dynamic-import": "^2.0.0", + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0", + "async": "^2.1.2", + "enhanced-resolve": "^3.4.0", + "escope": "^3.6.0", + "interpret": "^1.0.0", + "json-loader": "^0.5.4", + "json5": "^0.5.1", + "loader-runner": "^2.3.0", + "loader-utils": "^1.1.0", + "memory-fs": "~0.4.1", + "mkdirp": "~0.5.0", + "node-libs-browser": "^2.0.0", + "source-map": "^0.5.3", + "supports-color": "^4.2.1", + "tapable": "^0.2.7", + "uglifyjs-webpack-plugin": "^0.4.6", + "watchpack": "^1.4.0", + "webpack-sources": "^1.0.1", + "yargs": "^8.0.2" + }, + "dependencies": { + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + } + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", + "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "dev": true, + "requires": { + "cross-spawn": "^5.0.1", + "get-stream": "^3.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "mem": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", + "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, + "os-locale": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", + "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "dev": true, + "requires": { + "execa": "^0.7.0", + "lcid": "^1.0.0", + "mem": "^1.1.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "supports-color": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", + "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", + "dev": true, + "requires": { + "has-flag": "^2.0.0" + } + }, + "yargs": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", + "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "dev": true, + "requires": { + "camelcase": "^4.1.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^2.0.0", + "read-pkg-up": "^2.0.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^7.0.0" + } + }, + "yargs-parser": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", + "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dev": true, + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "whatwg-url": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.4.0.tgz", + "integrity": "sha512-vwTUFf6V4zhcPkWp/4CQPr1TW9Ml6SF4lVyaIMBdJw5i6qUUJ1QWM4Z6YYVkfka0OUIzVo/0aNtGVGk256IKWw==", + "dev": true, + "requires": { + "lodash.sortby": "^4.7.0", + "tr46": "^2.0.2", + "webidl-conversions": "^6.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", + "dev": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.0.tgz", + "integrity": "sha512-kyFwXuV/5ymf+IXhS6f0+eAFvydbaBW3zjpT6hUdAh/hbVjTIB5EHBGi0bPoCLSK2wcuz3BrEkB9LrYv1Nm4NQ==", + "dev": true + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + } + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + } + } +} From 1d9cd8e5027c6dd9df477201d0f42f340795692b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 12:32:45 +0100 Subject: [PATCH 187/246] Prettier on everything --- __test__/add-get-remove.test.js | 296 +- __test__/buttons.test.js | 296 +- __test__/create.test.js | 267 +- __test__/defaults.test.js | 114 +- __test__/filter.test.js | 185 +- __test__/fixtures-fuzzysearch.js | 76 +- __test__/fixtures-pagination.js | 216 +- __test__/fixtures.js | 71 +- __test__/fuzzysearch.test.js | 114 +- __test__/item.test.js | 253 +- __test__/off.test.js | 71 +- __test__/on.test.js | 209 +- __test__/pagination.test.js | 480 ++-- __test__/parse.test.js | 192 +- __test__/re-index.test.js | 59 +- __test__/search-filter.test.js | 123 +- __test__/search.test.js | 289 +- __test__/show.test.js | 406 +-- __test__/sort.test.js | 703 ++--- __test__/trigger.test.js | 37 +- __test__/usage/main.js | 10 +- __test__/usage/require.js | 3871 ++++++++++++++------------- __test__/utils.classes.test.js | 73 +- __test__/utils.get-by-class.test.js | 38 +- package.json | 1 + prettier.config.js | 5 + src/add-async.js | 26 +- src/filter.js | 37 +- src/fuzzy-search.js | 77 +- src/index.js | 324 +-- src/item.js | 68 +- src/pagination.js | 119 +- src/parse.js | 53 +- src/search.js | 149 +- src/sort.js | 126 +- src/templater.js | 188 +- src/utils/classes.js | 100 +- src/utils/events.js | 26 +- src/utils/extend.js | 22 +- src/utils/fuzzy.js | 210 +- src/utils/get-attribute.js | 20 +- src/utils/get-by-class.js | 56 +- src/utils/index-of.js | 12 +- src/utils/to-array.js | 26 +- src/utils/to-string.js | 12 +- 45 files changed, 5130 insertions(+), 4976 deletions(-) create mode 100644 prettier.config.js diff --git a/__test__/add-get-remove.test.js b/__test__/add-get-remove.test.js index 09baa65f..3fdd2535 100644 --- a/__test__/add-get-remove.test.js +++ b/__test__/add-get-remove.test.js @@ -1,121 +1,193 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Add, get, remove', function() { +describe('Add, get, remove', function () { + var list - var list; + beforeAll(function () { + list = fixture.list(['name'], [{ name: 'Jonny' }]) + }) - beforeAll(function() { - list = fixture.list(['name'], [ { name: "Jonny" } ]); - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); + afterEach(function () { + list.clear() + list.add({ name: 'Jonny' }) + }) - afterEach(function() { - list.clear(); - list.add({ name: "Jonny" }); - }); + describe('Add', function () { + it('should add one item', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + }) + it('should add two items', function () { + list.add([{ name: 'Martina' }, { name: 'Angelica' }]) + expect(list.items.length).toEqual(3) + }) + it('should add async items', function (done) { + list.add( + [ + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + ], + function () { + expect(list.items.length).toEqual(91) + done() + } + ) + }) + it('should add async items to empty list', function (done) { + list.clear() + list.add([{ name: 'Sven' }], function () { + expect(list.items.length).toEqual(1) + done() + }) + }) + }) - describe('Add', function() { - it('should add one item', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - }); - it('should add two items', function() { - list.add([ - { name: 'Martina' }, - { name: 'Angelica' } - ]); - expect(list.items.length).toEqual(3); - }); - it('should add async items', function(done) { - list.add([ -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'}, -{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'},{name:'Sven'} - ], function() { - expect(list.items.length).toEqual(91); - done(); - }); - }); - it('should add async items to empty list', function(done) { - list.clear(); - list.add([ - { name: 'Sven' } - ], function() { - expect(list.items.length).toEqual(1); - done(); - }); - }); - }); + describe('Get', function () { + it('should return array with one item', function () { + var items = list.get('name', 'Jonny') + expect(items[0].values().name).toEqual('Jonny') + }) + it('should return empty array', function () { + var items = list.get('name', 'jonny') + expect(items.length).toBe(0) + }) + it('should return two items', function () { + list.add({ name: 'Jonny' }) + var items = list.get('name', 'Jonny') + expect(items.length).toEqual(2) + expect(items[0].values().name).toEqual('Jonny') + expect(items[1].values().name).toEqual('Jonny') + }) + }) - describe('Get', function() { - it('should return array with one item', function() { - var items = list.get('name', 'Jonny'); - expect(items[0].values().name).toEqual('Jonny'); - }); - it('should return empty array', function() { - var items = list.get('name', 'jonny'); - expect(items.length).toBe(0); - }); - it('should return two items', function() { - list.add({ name: 'Jonny' }); - var items = list.get('name', 'Jonny'); - expect(items.length).toEqual(2); - expect(items[0].values().name).toEqual('Jonny'); - expect(items[1].values().name).toEqual('Jonny'); - }); - }); + describe('Remove', function () { + it('should remove one item', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + var count = list.remove('name', 'Jonas') + expect(count).toEqual(1) + expect(list.items.length).toEqual(1) + }) + it('should not remove anything due to case sensitivity', function () { + var count = list.remove('name', 'jonny') + expect(count).toBe(0) + expect(list.items.length).toEqual(1) + }) - describe('Remove', function() { - it('should remove one item', function() { - list.add({ name: "Jonas" }); - expect(list.items.length).toEqual(2); - var count = list.remove('name', 'Jonas'); - expect(count).toEqual(1); - expect(list.items.length).toEqual(1); - }); - it('should not remove anything due to case sensitivity', function() { - var count = list.remove('name', 'jonny'); - expect(count).toBe(0); - expect(list.items.length).toEqual(1); - }); + it('should avoid node not found error', function () { + var item = list.get('name', 'Jonny')[0] + list.list.removeChild(item.elm) + var count = list.remove('name', 'Jonny') + expect(count).toBe(1) + expect(list.items.length).toEqual(0) + }) - it('should avoid node not found error', function() { - var item = list.get('name', 'Jonny')[0]; - list.list.removeChild(item.elm); - var count = list.remove('name', 'Jonny'); - expect(count).toBe(1); - expect(list.items.length).toEqual(0); - }); - - it('should remove eight items', function() { - list.add({ name: 'Jonny' }); - list.add({ name: 'Jonny' }); - list.add({ name: 'Sven' }); - list.add({ name: 'Jonny' }); - list.add({ name: 'Jonny' }); - list.add({ name: 'Jonny' }); - list.add({ name: 'Jonas' }); - list.add({ name: 'Jonny' }); - list.add({ name: 'Jonny' }); - expect(list.items.length).toEqual(10); - var count = list.remove('name', 'Jonny'); - expect(count).toEqual(8); - expect(list.items.length).toEqual(2); - }); - }); -}); + it('should remove eight items', function () { + list.add({ name: 'Jonny' }) + list.add({ name: 'Jonny' }) + list.add({ name: 'Sven' }) + list.add({ name: 'Jonny' }) + list.add({ name: 'Jonny' }) + list.add({ name: 'Jonny' }) + list.add({ name: 'Jonas' }) + list.add({ name: 'Jonny' }) + list.add({ name: 'Jonny' }) + expect(list.items.length).toEqual(10) + var count = list.remove('name', 'Jonny') + expect(count).toEqual(8) + expect(list.items.length).toEqual(2) + }) + }) +}) diff --git a/__test__/buttons.test.js b/__test__/buttons.test.js index 680afd44..2165579e 100644 --- a/__test__/buttons.test.js +++ b/__test__/buttons.test.js @@ -1,19 +1,19 @@ const $ = require('jquery'), - List = require('../src/index'); + List = require('../src/index') function fireKeyup(el) { if (document.createEvent) { - var evObj; + var evObj if (window.KeyEvent) { - evObj = document.createEvent('KeyEvents'); - evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0); + evObj = document.createEvent('KeyEvents') + evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0) } else { - evObj = document.createEvent('UIEvents'); - evObj.initUIEvent('keyup', true, true, window, 1); + evObj = document.createEvent('UIEvents') + evObj.initUIEvent('keyup', true, true, window, 1) } - el.dispatchEvent(evObj); - } else if( document.createEventObject ) { - el.fireEvent('onkeyup'); + el.dispatchEvent(evObj) + } else if (document.createEventObject) { + el.fireEvent('onkeyup') } else { // IE 5.0, seriously? :) } @@ -21,20 +21,21 @@ function fireKeyup(el) { // http://stackoverflow.com/questions/5658849/whats-the-equivalent-of-jquerys-trigger-method-without-jquery function fireClick(el) { - var evt; + var evt if (document.createEvent) { - evt = document.createEvent("MouseEvents"); - evt.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + evt = document.createEvent('MouseEvents') + evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null) } - (evt) ? el.dispatchEvent(evt) : (el.click && el.click()); + evt ? el.dispatchEvent(evt) : el.click && el.click() } -describe('Button', function() { +describe('Button', function () { + var list - var list; - - beforeEach(function() { - $('body').append($('

                      \ + beforeEach(function () { + $('body').append( + $( + '
                      \ \ Sort name\ Sort name asc\ @@ -43,150 +44,151 @@ describe('Button', function() {
                      Jonny1986
                      \
                      Jocke1985
                      \
                      \ -
                      ')); + ' + ) + ) list = new List('parse-list', { - valueNames: ['name', 'born'] - }); - }); + valueNames: ['name', 'born'], + }) + }) - afterEach(function() { - $('#parse-list').remove(); - }); + afterEach(function () { + $('#parse-list').remove() + }) - describe('Sort', function() { - it('should trigger sortStart', function(done) { - list.on('sortComplete', function() { - done(); - }); - fireClick($('#sort-name')[0]); - }); - it('should trigger sortComplete', function(done) { - list.on('sortComplete', function() { - done(); - }); - fireClick($('#sort-name')[0]); - }); + describe('Sort', function () { + it('should trigger sortStart', function (done) { + list.on('sortComplete', function () { + done() + }) + fireClick($('#sort-name')[0]) + }) + it('should trigger sortComplete', function (done) { + list.on('sortComplete', function () { + done() + }) + fireClick($('#sort-name')[0]) + }) - it('should switch sorting order when clicking multiple times', function(done) { - var sortRun = 0; - list.on('sortComplete', function() { - sortRun++; + it('should switch sorting order when clicking multiple times', function (done) { + var sortRun = 0 + list.on('sortComplete', function () { + sortRun++ if (sortRun == 1) { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - setTimeout(function() { - fireClick($('#sort-name')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + setTimeout(function () { + fireClick($('#sort-name')[0]) + }, 50) } else if (sortRun == 2) { - expect($('#sort-name').hasClass('asc')).toBe(false); - expect($('#sort-name').hasClass('desc')).toBe(true); - setTimeout(function() { - fireClick($('#sort-name')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(false) + expect($('#sort-name').hasClass('desc')).toBe(true) + setTimeout(function () { + fireClick($('#sort-name')[0]) + }, 50) } else if (sortRun == 3) { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - done(); + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + done() } - }); - expect($('#sort-name').hasClass('asc')).toBe(false); - expect($('#sort-name').hasClass('desc')).toBe(false); - fireClick($('#sort-name')[0]); - }); + }) + expect($('#sort-name').hasClass('asc')).toBe(false) + expect($('#sort-name').hasClass('desc')).toBe(false) + fireClick($('#sort-name')[0]) + }) - it('should sort with predefined order', function(done) { - var sortRun = 0; - list.on('sortComplete', function() { - sortRun++; + it('should sort with predefined order', function (done) { + var sortRun = 0 + list.on('sortComplete', function () { + sortRun++ if (sortRun == 1) { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - expect($('#sort-name-asc').hasClass('asc')).toBe(true); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(false); - setTimeout(function() { - fireClick($('#sort-name-asc')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + expect($('#sort-name-asc').hasClass('asc')).toBe(true) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(false) + setTimeout(function () { + fireClick($('#sort-name-asc')[0]) + }, 50) } else if (sortRun == 2) { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - expect($('#sort-name-asc').hasClass('asc')).toBe(true); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(false); - setTimeout(function() { - fireClick($('#sort-name-asc')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + expect($('#sort-name-asc').hasClass('asc')).toBe(true) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(false) + setTimeout(function () { + fireClick($('#sort-name-asc')[0]) + }, 50) } else if (sortRun == 3) { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - expect($('#sort-name-asc').hasClass('asc')).toBe(true); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(false); - setTimeout(function() { - fireClick($('#sort-name-desc')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + expect($('#sort-name-asc').hasClass('asc')).toBe(true) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(false) + setTimeout(function () { + fireClick($('#sort-name-desc')[0]) + }, 50) } else if (sortRun == 4) { - expect($('#sort-name').hasClass('asc')).toBe(false); - expect($('#sort-name').hasClass('desc')).toBe(true); - expect($('#sort-name-asc').hasClass('asc')).toBe(false); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(true); - setTimeout(function() { - fireClick($('#sort-name-desc')[0]); - }, 50); + expect($('#sort-name').hasClass('asc')).toBe(false) + expect($('#sort-name').hasClass('desc')).toBe(true) + expect($('#sort-name-asc').hasClass('asc')).toBe(false) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(true) + setTimeout(function () { + fireClick($('#sort-name-desc')[0]) + }, 50) } else if (sortRun == 5) { - expect($('#sort-name').hasClass('asc')).toBe(false); - expect($('#sort-name').hasClass('desc')).toBe(true); - expect($('#sort-name-asc').hasClass('asc')).toBe(false); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(true); - done(); + expect($('#sort-name').hasClass('asc')).toBe(false) + expect($('#sort-name').hasClass('desc')).toBe(true) + expect($('#sort-name-asc').hasClass('asc')).toBe(false) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(true) + done() } - }); - expect($('#sort-name').hasClass('asc')).toBe(false); - expect($('#sort-name').hasClass('desc')).toBe(false); - expect($('#sort-name-asc').hasClass('asc')).toBe(false); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(false); - fireClick($('#sort-name-asc')[0]); - }); - - it('buttons should change class when sorting programmatically', function(done) { - list.on('sortComplete', function() { - expect($('#sort-name').hasClass('asc')).toBe(true); - expect($('#sort-name').hasClass('desc')).toBe(false); - expect($('#sort-name-asc').hasClass('asc')).toBe(true); - expect($('#sort-name-asc').hasClass('desc')).toBe(false); - expect($('#sort-name-desc').hasClass('asc')).toBe(false); - expect($('#sort-name-desc').hasClass('desc')).toBe(false); - done(); - }); - list.sort('name', { order: "asc" }); - }); - }); + }) + expect($('#sort-name').hasClass('asc')).toBe(false) + expect($('#sort-name').hasClass('desc')).toBe(false) + expect($('#sort-name-asc').hasClass('asc')).toBe(false) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(false) + fireClick($('#sort-name-asc')[0]) + }) + it('buttons should change class when sorting programmatically', function (done) { + list.on('sortComplete', function () { + expect($('#sort-name').hasClass('asc')).toBe(true) + expect($('#sort-name').hasClass('desc')).toBe(false) + expect($('#sort-name-asc').hasClass('asc')).toBe(true) + expect($('#sort-name-asc').hasClass('desc')).toBe(false) + expect($('#sort-name-desc').hasClass('asc')).toBe(false) + expect($('#sort-name-desc').hasClass('desc')).toBe(false) + done() + }) + list.sort('name', { order: 'asc' }) + }) + }) - describe('Search', function() { - it('should trigger searchStart', function(done) { - list.on('searchStart', function() { - done(); - }); - $('#parse-list .search').val('jon'); - fireKeyup($('#parse-list .search')[0]); - }); - it('should trigger searchComplete', function(done) { - list.on('searchComplete', function() { - done(); - }); - $('#parse-list .search').val('jon'); - fireKeyup($('#parse-list .search')[0]); - }); - }); -}); + describe('Search', function () { + it('should trigger searchStart', function (done) { + list.on('searchStart', function () { + done() + }) + $('#parse-list .search').val('jon') + fireKeyup($('#parse-list .search')[0]) + }) + it('should trigger searchComplete', function (done) { + list.on('searchComplete', function () { + done() + }) + $('#parse-list .search').val('jon') + fireKeyup($('#parse-list .search')[0]) + }) + }) +}) diff --git a/__test__/create.test.js b/__test__/create.test.js index 6593b9d6..f25b6de2 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -1,154 +1,161 @@ const $ = require('jquery'), - List = require('../src/index'); + List = require('../src/index') -describe('Create', function() { - - describe('With HTML items', function() { - var listEl = $('
                      \ +describe('Create', function () { + describe('With HTML items', function () { + var listEl = $( + '
                      \
                        \
                      • Jonny
                      • \
                      \ -
                      '); +
                      ' + ) - $(document.body).append(listEl); + $(document.body).append(listEl) - var list = new List('list', { valueNames: ['name'] }); + var list = new List('list', { valueNames: ['name'] }) - it('should contain one item', function() { - expect(list.items.length).toEqual(1); - expect(listEl.find('li').length).toEqual(1); - }); + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) - it('should contain two items', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - expect(listEl.find('li').length).toEqual(2); - }); + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('li').length).toEqual(2) + }) - listEl.remove(); - }); + listEl.remove() + }) - describe('Without items and with string template', function() { + describe('Without items and with string template', function () { var listEl = $('
                      \
                        \ -
                        '); - - $(document.body).append(listEl); - - var list = new List('list', { - valueNames: ['name'], - item: '
                      • ' - }, [ - { name: 'Jonny' } - ]); - - it('should contain one item', function() { - expect(list.items.length).toEqual(1); - expect(listEl.find('li').length).toEqual(1); - }); - - it('should contain two items', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - expect(listEl.find('li').length).toEqual(2); - }); + ') - listEl.remove(); - }); + $(document.body).append(listEl) - describe('Without items and with string template for table', function() { + var list = new List( + 'list', + { + valueNames: ['name'], + item: '
                      • ', + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) + + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('li').length).toEqual(2) + }) + + listEl.remove() + }) + + describe('Without items and with string template for table', function () { var listEl = $('
                        \
                        \ -
                        '); - - $(document.body).append(listEl); - - var list = new List('list', { - valueNames: ['name'], - item: '' - }, [ - { name: 'Jonny' } - ]); - - it('should contain one item', function() { - expect(list.items.length).toEqual(1); - expect(listEl.find('tr').length).toEqual(1); - }); - - it('should contain two items', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - expect(listEl.find('tr').length).toEqual(2); - }); + ') - listEl.remove(); - }); + $(document.body).append(listEl) - describe('without items and or template', function() { - - it('should not throw error on init', function() { + var list = new List( + 'list', + { + valueNames: ['name'], + item: '', + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('tr').length).toEqual(1) + }) + + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('tr').length).toEqual(2) + }) + + listEl.remove() + }) + + describe('without items and or template', function () { + it('should not throw error on init', function () { var listEl = $('
                        \
                          \ -
                          '); - $(document.body).append(listEl); + ') + $(document.body).append(listEl) var list = new List('list', { - valueNames: ['name'] - }); + valueNames: ['name'], + }) - listEl.remove(); - }); + listEl.remove() + }) - it('should throw error when created items', function() { + it('should throw error when created items', function () { var listEl = $('
                          \
                            \ -
                            '); - $(document.body).append(listEl); + ') + $(document.body).append(listEl) var list = new List('list', { - valueNames: ['name'] - }); - expect(function() { - list.add({ name: 'Jonas' }); - }).toThrow(); - listEl.remove(); - }); - }); - - describe('Without items and with HTML template', function() { + valueNames: ['name'], + }) + expect(function () { + list.add({ name: 'Jonas' }) + }).toThrow() + listEl.remove() + }) + }) + + describe('Without items and with HTML template', function () { var listEl = $('
                            \
                              \ -
                              '); - - var templateEl = $('
                            • '); + ') - $(document.body).append(listEl); - $(document.body).append(templateEl); + var templateEl = $('
                            • ') - var list = new List('list', { - valueNames: ['name'], - item: 'template-item' - }, [ - { name: 'Jonny' } - ]); + $(document.body).append(listEl) + $(document.body).append(templateEl) - it('should contain one item', function() { - expect(list.items.length).toEqual(1); - expect(listEl.find('li').length).toEqual(1); - }); - - it('should contain two items', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - expect(listEl.find('li').length).toEqual(2); - }); - - listEl.remove(); - templateEl.remove(); - }); - - describe('Asyn index with existing list', function() { - var listEl = $('
                              \ + var list = new List( + 'list', + { + valueNames: ['name'], + item: 'template-item', + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) + + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('li').length).toEqual(2) + }) + + listEl.remove() + templateEl.remove() + }) + + describe('Asyn index with existing list', function () { + var listEl = $( + '
                              \
                                \
                              • Jonny
                              • Sven
                              • \
                              • Anna
                              • Lisa
                              • \ @@ -232,20 +239,20 @@ describe('Create', function() {
                              • Imma
                              • Hasse
                              • \
                              • Robert
                              • Mona
                              • \
                              \ -
                              '); +
                              ' + ) - it('should contain one item', function(done) { - $(document.body).append(listEl); + it('should contain one item', function (done) { + $(document.body).append(listEl) var list = new List('list', { valueNames: ['name'], indexAsync: true, - parseComplete: function(list) { - expect(listEl.find('li').length).toEqual(162); - listEl.remove(); - done(); - } - }); - }); - }); - -}); + parseComplete: function (list) { + expect(listEl.find('li').length).toEqual(162) + listEl.remove() + done() + }, + }) + }) + }) +}) diff --git a/__test__/defaults.test.js b/__test__/defaults.test.js index 96e895c8..9633f64c 100644 --- a/__test__/defaults.test.js +++ b/__test__/defaults.test.js @@ -1,67 +1,67 @@ const $ = require('jquery'), - fixture = require('./fixtures'); + fixture = require('./fixtures') -describe('Defaults', function() { - var list; +describe('Defaults', function () { + var list - beforeAll(function() { - list = fixture.list(['name'], [ { name: 'Jonny' }]); - }); + beforeAll(function () { + list = fixture.list(['name'], [{ name: 'Jonny' }]) + }) - afterAll(function() { - fixture.removeList(); - }); + afterAll(function () { + fixture.removeList() + }) - it('should have all default attributes', function() { - expect(list.items).toBeInstanceOf(Array); - expect(list.visibleItems).toBeInstanceOf(Array); - expect(list.matchingItems).toBeInstanceOf(Array); + it('should have all default attributes', function () { + expect(list.items).toBeInstanceOf(Array) + expect(list.visibleItems).toBeInstanceOf(Array) + expect(list.matchingItems).toBeInstanceOf(Array) - expect(list.handlers.updated).toBeInstanceOf(Array); - expect(list.handlers.searchStart).toBeInstanceOf(Array); - expect(list.handlers.searchComplete).toBeInstanceOf(Array); - expect(list.handlers.sortStart).toBeInstanceOf(Array); - expect(list.handlers.sortComplete).toBeInstanceOf(Array); - expect(list.handlers.filterStart).toBeInstanceOf(Array); - expect(list.handlers.filterComplete).toBeInstanceOf(Array); + expect(list.handlers.updated).toBeInstanceOf(Array) + expect(list.handlers.searchStart).toBeInstanceOf(Array) + expect(list.handlers.searchComplete).toBeInstanceOf(Array) + expect(list.handlers.sortStart).toBeInstanceOf(Array) + expect(list.handlers.sortComplete).toBeInstanceOf(Array) + expect(list.handlers.filterStart).toBeInstanceOf(Array) + expect(list.handlers.filterComplete).toBeInstanceOf(Array) - expect(list.searched).toBe(false); - expect(list.filtered).toBe(false); - expect(list.i).toEqual(1); - expect(list.page).toEqual(10000); - expect(list.listClass).toEqual('list'); - expect(list.sortClass).toEqual('sort'); - expect(list.searchClass).toEqual('search'); - }); + expect(list.searched).toBe(false) + expect(list.filtered).toBe(false) + expect(list.i).toEqual(1) + expect(list.page).toEqual(10000) + expect(list.listClass).toEqual('list') + expect(list.sortClass).toEqual('sort') + expect(list.searchClass).toEqual('search') + }) - it('should have the right elements', function() { - expect(list.list).toEqual($('.list')[0]); - expect(list.listContainer).toEqual($('#list')[0]); - }); + it('should have the right elements', function () { + expect(list.list).toEqual($('.list')[0]) + expect(list.listContainer).toEqual($('#list')[0]) + }) - it('should have all default methods', function() { - expect(list.add).toBeInstanceOf(Function); - expect(list.remove).toBeInstanceOf(Function); - expect(list.get).toBeInstanceOf(Function); - expect(list.sort).toBeInstanceOf(Function); - expect(list.search).toBeInstanceOf(Function); - expect(list.clear).toBeInstanceOf(Function); - expect(list.filter).toBeInstanceOf(Function); - expect(list.size).toBeInstanceOf(Function); - expect(list.show).toBeInstanceOf(Function); - expect(list.update).toBeInstanceOf(Function); - expect(list.on).toBeInstanceOf(Function); - }); + it('should have all default methods', function () { + expect(list.add).toBeInstanceOf(Function) + expect(list.remove).toBeInstanceOf(Function) + expect(list.get).toBeInstanceOf(Function) + expect(list.sort).toBeInstanceOf(Function) + expect(list.search).toBeInstanceOf(Function) + expect(list.clear).toBeInstanceOf(Function) + expect(list.filter).toBeInstanceOf(Function) + expect(list.size).toBeInstanceOf(Function) + expect(list.show).toBeInstanceOf(Function) + expect(list.update).toBeInstanceOf(Function) + expect(list.on).toBeInstanceOf(Function) + }) - it('should have all helper methods', function() { - expect(list.utils.classes).toBeInstanceOf(Function); - expect(list.utils.getAttribute).toBeInstanceOf(Function); - expect(list.utils.getByClass).toBeInstanceOf(Function); - expect(list.utils.naturalSort).toBeInstanceOf(Function); - expect(list.utils.events.bind).toBeInstanceOf(Function); - expect(list.utils.events.unbind).toBeInstanceOf(Function); - expect(list.utils.extend).toBeInstanceOf(Function); - expect(list.utils.indexOf).toBeInstanceOf(Function); - expect(list.utils.toString).toBeInstanceOf(Function); - }); -}); + it('should have all helper methods', function () { + expect(list.utils.classes).toBeInstanceOf(Function) + expect(list.utils.getAttribute).toBeInstanceOf(Function) + expect(list.utils.getByClass).toBeInstanceOf(Function) + expect(list.utils.naturalSort).toBeInstanceOf(Function) + expect(list.utils.events.bind).toBeInstanceOf(Function) + expect(list.utils.events.unbind).toBeInstanceOf(Function) + expect(list.utils.extend).toBeInstanceOf(Function) + expect(list.utils.indexOf).toBeInstanceOf(Function) + expect(list.utils.toString).toBeInstanceOf(Function) + }) +}) diff --git a/__test__/filter.test.js b/__test__/filter.test.js index 2a4a3bef..37760e20 100644 --- a/__test__/filter.test.js +++ b/__test__/filter.test.js @@ -1,103 +1,102 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Filter', function() { +describe('Filter', function () { + var list, jonny, martina, angelica, sebastian, imma, hasse - var list, jonny, martina, angelica, sebastian, imma, hasse; + beforeAll(function () { + list = fixture.list(['name', 'born'], fixture.all) + jonny = list.get('name', 'Jonny Strömberg')[0] + martina = list.get('name', 'Martina Elm')[0] + angelica = list.get('name', 'Angelica Abraham')[0] + sebastian = list.get('name', 'Sebastian Höglund')[0] + imma = list.get('name', 'Imma Grafström')[0] + hasse = list.get('name', 'Hasse Strömberg')[0] + }) - beforeAll(function() { - list = fixture.list(['name', 'born'], fixture.all); - jonny = list.get('name', 'Jonny Strömberg')[0]; - martina = list.get('name', 'Martina Elm')[0]; - angelica = list.get('name', 'Angelica Abraham')[0]; - sebastian = list.get('name', 'Sebastian Höglund')[0]; - imma = list.get('name', 'Imma Grafström')[0]; - hasse = list.get('name', 'Hasse Strömberg')[0]; - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); + afterEach(function () { + list.filter() + list.show(1, 200) + }) - afterEach(function() { - list.filter(); - list.show(1, 200); - }); - - describe('Basics', function() { - it('should return everyone born after 1988', function() { - var result = list.filter(function(item) { - return (item.values().born > 1988); - }); - expect(result.length).toEqual(1); - expect(result[0]).toEqual(sebastian); - }); - it('should return everyone born 1986', function() { - var result = list.filter(function(item) { - return (item.values().born == 1986); - }); - expect(result.length).toEqual(3); + describe('Basics', function () { + it('should return everyone born after 1988', function () { + var result = list.filter(function (item) { + return item.values().born > 1988 + }) + expect(result.length).toEqual(1) + expect(result[0]).toEqual(sebastian) + }) + it('should return everyone born 1986', function () { + var result = list.filter(function (item) { + return item.values().born == 1986 + }) + expect(result.length).toEqual(3) for (var i = 0; i < result.length; i++) { - expect(result[i].values().born).toEqual('1986'); + expect(result[i].values().born).toEqual('1986') } - }); - }); + }) + }) - describe('Show and pages', function() { - it('should return the visible items', function() { - list.show(1,2); - var result = list.filter(function(item) { - return (item.values().born > 1985); - }); - expect(result).toEqual(list.visibleItems); - }); + describe('Show and pages', function () { + it('should return the visible items', function () { + list.show(1, 2) + var result = list.filter(function (item) { + return item.values().born > 1985 + }) + expect(result).toEqual(list.visibleItems) + }) - it('should return be 2 visible items and 3 matching', function() { - list.show(1,2); - var result = list.filter(function(item) { - return (item.values().born > 1985); - }); - expect(result.length).toEqual(2); - expect(list.visibleItems.length).toEqual(2); - expect(list.matchingItems.length).toEqual(4); - }); + it('should return be 2 visible items and 3 matching', function () { + list.show(1, 2) + var result = list.filter(function (item) { + return item.values().born > 1985 + }) + expect(result.length).toEqual(2) + expect(list.visibleItems.length).toEqual(2) + expect(list.matchingItems.length).toEqual(4) + }) - describe('Specific items', function() { - beforeEach(function() { - list.show(1,2); - var result = list.filter(function(item) { - return (item.values().born > 1985); - }); - }); - it('should match jonny', function() { - expect(jonny.matching()).toBe(true); - expect(jonny.filtered).toBe(true); - expect(jonny.visible()).toBe(true); - }); - it('should match martina', function() { - expect(martina.matching()).toBe(true); - expect(martina.filtered).toBe(true); - expect(martina.visible()).toBe(true); - }); - it('should match but not show angelica', function() { - expect(angelica.matching()).toBe(true); - expect(angelica.filtered).toBe(true); - expect(angelica.visible()).toBe(false); - }); - it('should match but not show sebastian', function() { - expect(sebastian.matching()).toBe(true); - expect(sebastian.filtered).toBe(true); - expect(sebastian.visible()).toBe(false); - }); - it('should not match imma', function() { - expect(imma.matching()).toBe(false); - expect(imma.filtered).toBe(false); - expect(imma.visible()).toBe(false); - }); - it('should not match hasse', function() { - expect(hasse.matching()).toBe(false); - expect(hasse.filtered).toBe(false); - expect(hasse.visible()).toBe(false); - }); - }); - }); -}); + describe('Specific items', function () { + beforeEach(function () { + list.show(1, 2) + var result = list.filter(function (item) { + return item.values().born > 1985 + }) + }) + it('should match jonny', function () { + expect(jonny.matching()).toBe(true) + expect(jonny.filtered).toBe(true) + expect(jonny.visible()).toBe(true) + }) + it('should match martina', function () { + expect(martina.matching()).toBe(true) + expect(martina.filtered).toBe(true) + expect(martina.visible()).toBe(true) + }) + it('should match but not show angelica', function () { + expect(angelica.matching()).toBe(true) + expect(angelica.filtered).toBe(true) + expect(angelica.visible()).toBe(false) + }) + it('should match but not show sebastian', function () { + expect(sebastian.matching()).toBe(true) + expect(sebastian.filtered).toBe(true) + expect(sebastian.visible()).toBe(false) + }) + it('should not match imma', function () { + expect(imma.matching()).toBe(false) + expect(imma.filtered).toBe(false) + expect(imma.visible()).toBe(false) + }) + it('should not match hasse', function () { + expect(hasse.matching()).toBe(false) + expect(hasse.filtered).toBe(false) + expect(hasse.visible()).toBe(false) + }) + }) + }) +}) diff --git a/__test__/fixtures-fuzzysearch.js b/__test__/fixtures-fuzzysearch.js index 3d2754c9..9cb95840 100644 --- a/__test__/fixtures-fuzzysearch.js +++ b/__test__/fixtures-fuzzysearch.js @@ -1,45 +1,45 @@ -const $ = require('jquery'); +const $ = require('jquery') var fixtureFuzzysearch = { - list: function(valueNames) { - var listHtml = $(''), - item = ""; + list: function (valueNames) { + var listHtml = $(''), + item = '' - item = "
                            • "; - for (var i = 0; i < valueNames.length; i++) { - item += ''; - } - item += "
                            • "; + item = '
                            • ' + for (var i = 0; i < valueNames.length; i++) { + item += '' + } + item += '
                            • ' - $(document.body).append(listHtml); + $(document.body).append(listHtml) - return item; - }, - removeList: function() { - $('#list-fuzzy-search').remove(); - }, - i1: { name: "Guybrush Threepwood" }, - i2: { name: "Manny Calavera" }, - i3: { name: "Bernard Bernoulli" }, - i4: { name: "LeChuck" }, - i5: { name: "Elaine Marley-Threepwood" }, - i6: { name: "Purple Tentacle" }, - i7: { name: "Adrian Ripburger" }, - i8: { name: "Bobbin Threadbare" }, - i9: { name: "Murray the Demonic Skull" }, - i10: { name: "Zak McKracken" } -}; + return item + }, + removeList: function () { + $('#list-fuzzy-search').remove() + }, + i1: { name: 'Guybrush Threepwood' }, + i2: { name: 'Manny Calavera' }, + i3: { name: 'Bernard Bernoulli' }, + i4: { name: 'LeChuck' }, + i5: { name: 'Elaine Marley-Threepwood' }, + i6: { name: 'Purple Tentacle' }, + i7: { name: 'Adrian Ripburger' }, + i8: { name: 'Bobbin Threadbare' }, + i9: { name: 'Murray the Demonic Skull' }, + i10: { name: 'Zak McKracken' }, +} fixtureFuzzysearch.all = [ - fixtureFuzzysearch.i1, - fixtureFuzzysearch.i2, - fixtureFuzzysearch.i3, - fixtureFuzzysearch.i4, - fixtureFuzzysearch.i5, - fixtureFuzzysearch.i6, - fixtureFuzzysearch.i7, - fixtureFuzzysearch.i8, - fixtureFuzzysearch.i9, - fixtureFuzzysearch.i10 -]; + fixtureFuzzysearch.i1, + fixtureFuzzysearch.i2, + fixtureFuzzysearch.i3, + fixtureFuzzysearch.i4, + fixtureFuzzysearch.i5, + fixtureFuzzysearch.i6, + fixtureFuzzysearch.i7, + fixtureFuzzysearch.i8, + fixtureFuzzysearch.i9, + fixtureFuzzysearch.i10, +] -module.exports = fixtureFuzzysearch; +module.exports = fixtureFuzzysearch diff --git a/__test__/fixtures-pagination.js b/__test__/fixtures-pagination.js index 46e6f418..dea045ea 100644 --- a/__test__/fixtures-pagination.js +++ b/__test__/fixtures-pagination.js @@ -1,115 +1,115 @@ -const $ = require('jquery'); +const $ = require('jquery') var fixturePagination = { - list: function(valueNames) { - var listHtml = $('
                                  '), - item = ""; + list: function (valueNames) { + var listHtml = $('
                                      '), + item = '' - item = "
                                    • "; - for (var i = 0; i < valueNames.length; i++) { - item += ''; - } - item += "
                                    • "; + item = '
                                    • ' + for (var i = 0; i < valueNames.length; i++) { + item += '' + } + item += '
                                    • ' - $(document.body).append(listHtml); + $(document.body).append(listHtml) - return item; - }, - removeList: function() { - $('#list-pagination').remove(); - }, - jonny: { - name: "Jonny Strömberg", - born: '1986' - }, - martina: { - name: "Martina Elm", - born: '1986' - }, - angelica: { - name: "Angelica Abraham", - born: '1986' - }, - sebastian: { - name: "Sebastian Höglund", - born: '1989' - }, - imma: { - name: "Imma Grafström", - born: '1953' - }, - hasse: { - name: "Hasse Strömberg", - born: '1955' - }, - fredrik: { - name: "Fredrik Martinsson", - born: '1987' - }, - jonas: { - name: "Jonas Arnklint", - born: '1987' - }, - egon: { - name: "Egon Östgren", - born: '1983' - }, - lars: { - name: "Lars Larsson", - born: '1992' - }, - bertil: { - name: "Bertil Cool", - born: '1943' - }, - ture: { - name: "Ture Tur", - born: '1965' - }, - anders: { - name: "Anders", - born: '1987' - }, - anna: { - name: "Anna", - born: '1987' - }, - matilda: { - name: "Matilda", - born: '1983' - }, - li: { - name: "Li", - born: '1992' - }, - asa: { - name: "Åsa", - born: '1943' - }, - gun: { - name: "Gun", - born: '1965' - } -}; + return item + }, + removeList: function () { + $('#list-pagination').remove() + }, + jonny: { + name: 'Jonny Strömberg', + born: '1986', + }, + martina: { + name: 'Martina Elm', + born: '1986', + }, + angelica: { + name: 'Angelica Abraham', + born: '1986', + }, + sebastian: { + name: 'Sebastian Höglund', + born: '1989', + }, + imma: { + name: 'Imma Grafström', + born: '1953', + }, + hasse: { + name: 'Hasse Strömberg', + born: '1955', + }, + fredrik: { + name: 'Fredrik Martinsson', + born: '1987', + }, + jonas: { + name: 'Jonas Arnklint', + born: '1987', + }, + egon: { + name: 'Egon Östgren', + born: '1983', + }, + lars: { + name: 'Lars Larsson', + born: '1992', + }, + bertil: { + name: 'Bertil Cool', + born: '1943', + }, + ture: { + name: 'Ture Tur', + born: '1965', + }, + anders: { + name: 'Anders', + born: '1987', + }, + anna: { + name: 'Anna', + born: '1987', + }, + matilda: { + name: 'Matilda', + born: '1983', + }, + li: { + name: 'Li', + born: '1992', + }, + asa: { + name: 'Åsa', + born: '1943', + }, + gun: { + name: 'Gun', + born: '1965', + }, +} fixturePagination.all = [ - fixturePagination.jonny, - fixturePagination.martina, - fixturePagination.angelica, - fixturePagination.sebastian, - fixturePagination.imma, - fixturePagination.hasse, - fixturePagination.fredrik, - fixturePagination.jonas, - fixturePagination.egon, - fixturePagination.lars, - fixturePagination.bertil, - fixturePagination.ture, - fixturePagination.anders, - fixturePagination.anna, - fixturePagination.matilda, - fixturePagination.li, - fixturePagination.asa, - fixturePagination.gun -]; + fixturePagination.jonny, + fixturePagination.martina, + fixturePagination.angelica, + fixturePagination.sebastian, + fixturePagination.imma, + fixturePagination.hasse, + fixturePagination.fredrik, + fixturePagination.jonas, + fixturePagination.egon, + fixturePagination.lars, + fixturePagination.bertil, + fixturePagination.ture, + fixturePagination.anders, + fixturePagination.anna, + fixturePagination.matilda, + fixturePagination.li, + fixturePagination.asa, + fixturePagination.gun, +] -module.exports = fixturePagination; +module.exports = fixturePagination diff --git a/__test__/fixtures.js b/__test__/fixtures.js index 716d4a22..083dae56 100644 --- a/__test__/fixtures.js +++ b/__test__/fixtures.js @@ -1,61 +1,58 @@ const $ = require('jquery'), - List = require('../src/index'); + List = require('../src/index') var fixture = { - list: function(valueNames, items) { + list: function (valueNames, items) { var listHtml = $('
                                        '), - item = ""; + item = '' - item = "
                                      • "; + item = '
                                      • ' for (var i = 0; i < valueNames.length; i++) { - item += ''; + item += '' } - item += "
                                      • "; + item += '' - $(document.body).append(listHtml); + $(document.body).append(listHtml) - items = items || []; + items = items || [] - return new List('list', { - valueNames: valueNames, - item: item - }, items); + return new List( + 'list', + { + valueNames: valueNames, + item: item, + }, + items + ) }, - removeList: function() { - $('#list').remove(); + removeList: function () { + $('#list').remove() }, jonny: { - name: "Jonny Strömberg", - born: '1986' + name: 'Jonny Strömberg', + born: '1986', }, martina: { - name: "Martina Elm", - born: '1986' + name: 'Martina Elm', + born: '1986', }, angelica: { - name: "Angelica Abraham", - born: '1986' + name: 'Angelica Abraham', + born: '1986', }, sebastian: { - name: "Sebastian Höglund", - born: '1989' + name: 'Sebastian Höglund', + born: '1989', }, imma: { - name: "Imma Grafström", - born: '1953' + name: 'Imma Grafström', + born: '1953', }, hasse: { - name: "Hasse Strömberg", - born: '1955' - } -}; -fixture.all = [ - fixture.jonny, - fixture.martina, - fixture.angelica, - fixture.sebastian, - fixture.imma, - fixture.hasse -]; + name: 'Hasse Strömberg', + born: '1955', + }, +} +fixture.all = [fixture.jonny, fixture.martina, fixture.angelica, fixture.sebastian, fixture.imma, fixture.hasse] -module.exports = fixture; +module.exports = fixture diff --git a/__test__/fuzzysearch.test.js b/__test__/fuzzysearch.test.js index 3cec165f..eea89f5d 100644 --- a/__test__/fuzzysearch.test.js +++ b/__test__/fuzzysearch.test.js @@ -1,78 +1,78 @@ const $ = require('jquery'), - fixtureFuzzysearch = require('./fixtures-fuzzysearch'), - List = require('../src/index'); + fixtureFuzzysearch = require('./fixtures-fuzzysearch'), + List = require('../src/index') function fireKeyup(el) { if (document.createEvent) { - var evObj; + var evObj if (window.KeyEvent) { - evObj = document.createEvent('KeyEvents'); - evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0); + evObj = document.createEvent('KeyEvents') + evObj.initKeyEvent('keyup', true, true, window, false, false, false, false, 13, 0) } else { - evObj = document.createEvent('UIEvents'); - evObj.initUIEvent('keyup', true, true, window, 1); + evObj = document.createEvent('UIEvents') + evObj.initUIEvent('keyup', true, true, window, 1) } - el.dispatchEvent(evObj); - } else if( document.createEventObject ) { - el.fireEvent('onkeyup'); + el.dispatchEvent(evObj) + } else if (document.createEventObject) { + el.fireEvent('onkeyup') } else { // IE 5.0, seriously? :) } } -describe('Fuzzy Search', function() { - var list, - itemHTML, - pagination; +describe('Fuzzy Search', function () { + var list, itemHTML, pagination - beforeEach(function() { + beforeEach(function () { itemHTML = fixtureFuzzysearch.list(['name', 'born']) - list = new List('list-fuzzy-search', { - valueNames: ['name', 'born'], - item: itemHTML - }, fixtureFuzzysearch.all); - }); + list = new List( + 'list-fuzzy-search', + { + valueNames: ['name', 'born'], + item: itemHTML, + }, + fixtureFuzzysearch.all + ) + }) - afterEach(function() { - fixtureFuzzysearch.removeList(); - }); + afterEach(function () { + fixtureFuzzysearch.removeList() + }) - it('should have default attribute', function() { - expect(list.fuzzySearch).toBeInstanceOf(Function); - }); + it('should have default attribute', function () { + expect(list.fuzzySearch).toBeInstanceOf(Function) + }) - it('should find result', function() { - list.fuzzySearch('guybrush'); - expect(list.matchingItems.length).toBe(1); - }); + it('should find result', function () { + list.fuzzySearch('guybrush') + expect(list.matchingItems.length).toBe(1) + }) - it('should find result', function() { - list.fuzzySearch('g thre'); - expect(list.matchingItems.length).toBe(1); - }); + it('should find result', function () { + list.fuzzySearch('g thre') + expect(list.matchingItems.length).toBe(1) + }) - it('should find result', function() { - list.fuzzySearch('thre'); - expect(list.matchingItems.length).toBe(4); - }); + it('should find result', function () { + list.fuzzySearch('thre') + expect(list.matchingItems.length).toBe(4) + }) - describe('Search field', function() { + describe('Search field', function () { + it('should trigger searchStart', function (done) { + list.on('searchStart', function () { + done() + }) + $('#list-fuzzy-search .fuzzy-search').val('angelica') + fireKeyup($('#list-fuzzy-search .fuzzy-search')[0]) + }) - it('should trigger searchStart', function(done) { - list.on('searchStart', function() { - done(); - }); - $('#list-fuzzy-search .fuzzy-search').val('angelica'); - fireKeyup($('#list-fuzzy-search .fuzzy-search')[0]); - }); - - it('should trigger searchComplete', function(done) { - list.on('searchComplete', function() { - done(); - }); - $('#list-fuzzy-search .fuzzy-search').val('angelica'); - fireKeyup($('#list-fuzzy-search .fuzzy-search')[0]); - }); - - }); -}); + it('should trigger searchComplete', function (done) { + list.on('searchComplete', function () { + done() + }) + $('#list-fuzzy-search .fuzzy-search').val('angelica') + fireKeyup($('#list-fuzzy-search .fuzzy-search')[0]) + }) + }) +}) diff --git a/__test__/item.test.js b/__test__/item.test.js index 665f1cbf..e1e6c464 100644 --- a/__test__/item.test.js +++ b/__test__/item.test.js @@ -1,149 +1,152 @@ const $ = require('jquery'), - fixture = require('./fixtures'); + fixture = require('./fixtures') -describe('Item', function() { +describe('Item', function () { + var list, item - var list, item; + beforeAll(function () { + list = fixture.list( + ['name', 'born', 'doin'], + [ + { + name: 'Jonny', + born: '1986', + doin: 'Living the dream', + }, + ] + ) + item = list.get('name', 'Jonny')[0] + }) - beforeAll(function() { - list = fixture.list(['name', 'born', 'doin'], [{ - name: "Jonny", - born: "1986", - doin: "Living the dream" - }]); - item = list.get('name', 'Jonny')[0]; - }); + beforeEach(function () { + list.search() + list.filter() + list.show(1, 200) + }) + afterAll(function () { + fixture.removeList() + }) - beforeEach(function() { - list.search(); - list.filter(); - list.show(1,200); - }); + describe('Defaults', function () { + it('should have all default attributes', function () { + expect(item.found).toBe(false) + expect(item.filtered).toBe(false) + }) - afterAll(function() { - fixture.removeList(); - }); + it('should have the right elements', function () { + expect(item.elm).toEqual($('#list li')[0]) + }) - describe('Defaults', function() { - it('should have all default attributes', function() { - expect(item.found).toBe(false); - expect(item.filtered).toBe(false); - }); + it('should have all default methods', function () { + expect(item.hide).toBeInstanceOf(Function) + expect(item.show).toBeInstanceOf(Function) + expect(item.values).toBeInstanceOf(Function) + expect(item.matching).toBeInstanceOf(Function) + expect(item.visible).toBeInstanceOf(Function) + }) + }) - it('should have the right elements', function() { - expect(item.elm).toEqual($('#list li')[0]); - }); - - it('should have all default methods', function() { - expect(item.hide).toBeInstanceOf(Function); - expect(item.show).toBeInstanceOf(Function); - expect(item.values).toBeInstanceOf(Function); - expect(item.matching).toBeInstanceOf(Function); - expect(item.visible).toBeInstanceOf(Function); - }); - }); - - describe('Values()', function() { - it('should have the right values', function() { + describe('Values()', function () { + it('should have the right values', function () { expect(item.values()).toEqual({ name: 'Jonny', born: '1986', - doin: 'Living the dream' - }); - }); - it('should be able to change one value', function() { - expect(item.values().name).toBe('Jonny'); - item.values({ name: 'Egon' }); - expect(item.values().name).toBe('Egon'); - }); - it('should be able to change many value', function() { + doin: 'Living the dream', + }) + }) + it('should be able to change one value', function () { + expect(item.values().name).toBe('Jonny') + item.values({ name: 'Egon' }) + expect(item.values().name).toBe('Egon') + }) + it('should be able to change many value', function () { expect(item.values()).toEqual({ name: 'Egon', born: '1986', - doin: 'Living the dream' - }); + doin: 'Living the dream', + }) item.values({ name: 'Sven', born: '1801', - doin: 'Is dead' - }); + doin: 'Is dead', + }) expect(item.values()).toEqual({ name: 'Sven', born: '1801', - doin: 'Is dead' - }); - }); - }); + doin: 'Is dead', + }) + }) + }) - describe('Hide, show, visible', function() { - it('should be hidden', function() { - expect($('#list li').length).toEqual(1); - item.hide(); - expect(item.visible()).toBe(false); - expect($('#list li').length).toEqual(0); - }); - it('should be visible', function() { - item.hide(); - expect($('#list li').length).toEqual(0); - item.show(); - expect(item.visible()).toBe(true); - expect($('#list li').length).toEqual(1); - }); - }); + describe('Hide, show, visible', function () { + it('should be hidden', function () { + expect($('#list li').length).toEqual(1) + item.hide() + expect(item.visible()).toBe(false) + expect($('#list li').length).toEqual(0) + }) + it('should be visible', function () { + item.hide() + expect($('#list li').length).toEqual(0) + item.show() + expect(item.visible()).toBe(true) + expect($('#list li').length).toEqual(1) + }) + }) - describe('Matching, found, filtered', function() { - describe('Searching', function() { - it('should not be visible, match, found or filtered', function() { - list.search('Fredrik'); - expect(item.matching()).toBe(false); - expect(item.found).toBe(false); - expect(item.filtered).toBe(false); - expect(item.visible()).toBe(false); - }); - it('should be visble, match and found but not filterd', function() { - var result = list.search('Sven'); - expect(item.matching()).toBe(true); - expect(item.found).toBe(true); - expect(item.filtered).toBe(false); - expect(item.visible()).toBe(true); - }); - it('reset: should be visible and matching but not found or filtered', function() { - list.search(); - expect(item.matching()).toBe(true); - expect(item.found).toBe(false); - expect(item.filtered).toBe(false); - expect(item.visible()).toBe(true); - }); - }); - describe('Filtering', function() { - it('should not be visble, match, found or filtered', function() { - list.filter(function(item) { - return (item.values().name == "Fredrik"); - }); - expect(item.matching()).toBe(false); - expect(item.found).toBe(false); - expect(item.filtered).toBe(false); - expect(item.visible()).toBe(false); - }); - it('should be visble, match and filtered but not found', function() { - list.filter(function(item) { - return (item.values().name == "Sven"); - }); - expect(item.matching()).toBe(true); - expect(item.found).toBe(false); - expect(item.filtered).toBe(true); - expect(item.visible()).toBe(true); - }); - it('reset: should be visble and match but not filtered or found', function() { - list.filter(); - expect(item.matching()).toBe(true); - expect(item.found).toBe(false); - expect(item.filtered).toBe(false); - expect(item.visible()).toBe(true); - }); - }); - }); + describe('Matching, found, filtered', function () { + describe('Searching', function () { + it('should not be visible, match, found or filtered', function () { + list.search('Fredrik') + expect(item.matching()).toBe(false) + expect(item.found).toBe(false) + expect(item.filtered).toBe(false) + expect(item.visible()).toBe(false) + }) + it('should be visble, match and found but not filterd', function () { + var result = list.search('Sven') + expect(item.matching()).toBe(true) + expect(item.found).toBe(true) + expect(item.filtered).toBe(false) + expect(item.visible()).toBe(true) + }) + it('reset: should be visible and matching but not found or filtered', function () { + list.search() + expect(item.matching()).toBe(true) + expect(item.found).toBe(false) + expect(item.filtered).toBe(false) + expect(item.visible()).toBe(true) + }) + }) + describe('Filtering', function () { + it('should not be visble, match, found or filtered', function () { + list.filter(function (item) { + return item.values().name == 'Fredrik' + }) + expect(item.matching()).toBe(false) + expect(item.found).toBe(false) + expect(item.filtered).toBe(false) + expect(item.visible()).toBe(false) + }) + it('should be visble, match and filtered but not found', function () { + list.filter(function (item) { + return item.values().name == 'Sven' + }) + expect(item.matching()).toBe(true) + expect(item.found).toBe(false) + expect(item.filtered).toBe(true) + expect(item.visible()).toBe(true) + }) + it('reset: should be visble and match but not filtered or found', function () { + list.filter() + expect(item.matching()).toBe(true) + expect(item.found).toBe(false) + expect(item.filtered).toBe(false) + expect(item.visible()).toBe(true) + }) + }) + }) - fixture.removeList(); -}); + fixture.removeList() +}) diff --git a/__test__/off.test.js b/__test__/off.test.js index c6109cf3..d0c2218c 100644 --- a/__test__/off.test.js +++ b/__test__/off.test.js @@ -1,41 +1,40 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Off', function() { +describe('Off', function () { + var list - var list; + beforeAll(function () { + list = fixture.list(['name', 'born'], fixture.all) + }) - beforeAll(function() { - list = fixture.list(['name', 'born'], fixture.all); - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); + describe('General', function () { + it('should be remove added handler', function (done) { + var updated = function (list) { + expect(list.handlers.updated.length).toEqual(1) + list.off('updated', updated) + expect(list.handlers.updated.length).toEqual(0) + done() + } + list.on('updated', updated) + list.search('jonny') + }) - describe('General', function() { - it('should be remove added handler', function(done) { - var updated = function(list) { - expect(list.handlers.updated.length).toEqual(1); - list.off('updated', updated); - expect(list.handlers.updated.length).toEqual(0); - done(); - }; - list.on('updated', updated); - list.search('jonny'); - }); - - it('should not remove unnamed handlers', function(done) { - var searchComplete = function(list) { - expect(list.handlers.searchComplete.length).toEqual(3); - list.off('searchComplete', function() {}); - list.off('searchComplete', searchComplete); - expect(list.handlers.searchComplete.length).toEqual(2); - done(); - }; - list.on('searchComplete', function() {}); - list.on('searchComplete', searchComplete); - list.on('searchComplete', function() {}); - list.search('jonny'); - }); - }); -}); + it('should not remove unnamed handlers', function (done) { + var searchComplete = function (list) { + expect(list.handlers.searchComplete.length).toEqual(3) + list.off('searchComplete', function () {}) + list.off('searchComplete', searchComplete) + expect(list.handlers.searchComplete.length).toEqual(2) + done() + } + list.on('searchComplete', function () {}) + list.on('searchComplete', searchComplete) + list.on('searchComplete', function () {}) + list.search('jonny') + }) + }) +}) diff --git a/__test__/on.test.js b/__test__/on.test.js index c576913e..4f887c63 100644 --- a/__test__/on.test.js +++ b/__test__/on.test.js @@ -1,125 +1,124 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('On', function() { +describe('On', function () { + var list - var list; + beforeEach(function () { + list = fixture.list(['name', 'born'], fixture.all) + }) - beforeEach(function() { - list = fixture.list(['name', 'born'], fixture.all); - }); + afterEach(function () { + fixture.removeList() + }) - afterEach(function() { - fixture.removeList(); - }); + describe('Updated', function () { + it('should be triggered after search', function (done) { + list.on('updated', function (list) { + done() + }) + list.search('jonny') + }) + it('should be triggered after sort', function (done) { + list.on('updated', function (list) { + done() + }) + list.sort('name') + }) + it('should be triggered after filter', function (done) { + list.on('updated', function (list) { + done() + }) + list.filter(function () { + return true + }) + }) + it('should be triggered after show', function (done) { + list.on('updated', function (list) { + done() + }) + list.show(1, 10) + }) - describe('Updated', function() { - it('should be triggered after search', function(done) { - list.on('updated', function(list) { - done(); - }); - list.search('jonny'); - }); - it('should be triggered after sort', function(done) { - list.on('updated', function(list) { - done(); - }); - list.sort('name'); - }); - it('should be triggered after filter', function(done) { - list.on('updated', function(list) { - done(); - }); - list.filter(function() { - return true; - }); - }); - it('should be triggered after show', function(done) { - list.on('updated', function(list) { - done(); - }); - list.show(1,10); - }); + it('should be triggered after add', function (done) { + list.on('updated', function (list) { + done() + }) + list.add({ name: 'Hej' }) + }) + it('should be triggered after remove', function (done) { + list.on('updated', function (list) { + done() + }) + list.remove('name', 'Jonny') + }) + }) - it('should be triggered after add', function(done) { - list.on('updated', function(list) { - done(); - }); - list.add({ name: 'Hej' }); - }); - it('should be triggered after remove', function(done) { - list.on('updated', function(list) { - done(); - }); - list.remove('name', 'Jonny'); - }); - }); - - describe('Multiple handlers', function() { - it('should be trigger both handlers', function(done) { + describe('Multiple handlers', function () { + it('should be trigger both handlers', function (done) { var done1 = false, done2 = false, - isDone = function() { + isDone = function () { if (done1 && done2) { - done(); + done() } - }; + } - list.on('updated', function(list) { - done1 = true; - isDone(); - }); - list.on('updated', function(list) { - done2 = true; - isDone(); - }); - list.search('jonny'); - }); - }); + list.on('updated', function (list) { + done1 = true + isDone() + }) + list.on('updated', function (list) { + done2 = true + isDone() + }) + list.search('jonny') + }) + }) - describe('Search', function() { - it('should be triggered before and after search', function(done) { - var done1 = false; - list.on('searchStart', function(list) { - done1 = true; - }); - list.on('searchComplete', function(list) { + describe('Search', function () { + it('should be triggered before and after search', function (done) { + var done1 = false + list.on('searchStart', function (list) { + done1 = true + }) + list.on('searchComplete', function (list) { if (done1) { - done(); + done() } - }); - list.search('jonny'); - }); - }); + }) + list.search('jonny') + }) + }) - describe('Sort', function() { - it('should be triggered before and after sort', function(done) { - var done1 = false; - list.on('sortStart', function(list) { - done1 = true; - }); - list.on('sortComplete', function(list) { + describe('Sort', function () { + it('should be triggered before and after sort', function (done) { + var done1 = false + list.on('sortStart', function (list) { + done1 = true + }) + list.on('sortComplete', function (list) { if (done1) { - done(); + done() } - }); - list.sort('name'); - }); - }); + }) + list.sort('name') + }) + }) - describe('Filter', function() { - it('should be triggered before and after filter', function(done) { - var done1 = false; - list.on('filterStart', function(list) { - done1 = true; - }); - list.on('filterComplete', function(list) { + describe('Filter', function () { + it('should be triggered before and after filter', function (done) { + var done1 = false + list.on('filterStart', function (list) { + done1 = true + }) + list.on('filterComplete', function (list) { if (done1) { - done(); + done() } - }); - list.filter(function() { - return true; - }); - }); - }); -}); + }) + list.filter(function () { + return true + }) + }) + }) +}) diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index 0c88831b..2e50b591 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -1,269 +1,271 @@ const $ = require('jquery'), - fixturePagination = require('./fixtures-pagination'), - List = require('../src/index'); + fixturePagination = require('./fixtures-pagination'), + List = require('../src/index') -describe('Pagination', function() { - describe('Default settings, innerWindow: 2, outerWindow: 0, left: 0, right: 0', function() { - var list, - itemHTML, - pagination; +describe('Pagination', function () { + describe('Default settings, innerWindow: 2, outerWindow: 0, left: 0, right: 0', function () { + var list, itemHTML, pagination - beforeAll(function() { + beforeAll(function () { itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: true - }, fixturePagination.all); + list = new List( + 'list-pagination', + { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: true, + }, + fixturePagination.all + ) - pagination = $('.pagination'); - }); + pagination = $('.pagination') + }) - afterAll(function() { - fixturePagination.removeList(); - }); + afterAll(function () { + fixturePagination.removeList() + }) - it('should have default settings', function() { - expect(pagination.find('a').length).toEqual(4); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("3"); - expect(pagination.find('a').get(3).innerHTML).toEqual("..."); - expect(pagination.find('a').get(4)).toEqual(undefined); - }); + it('should have default settings', function () { + expect(pagination.find('a').length).toEqual(4) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('3') + expect(pagination.find('a').get(3).innerHTML).toEqual('...') + expect(pagination.find('a').get(4)).toEqual(undefined) + }) - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(7, 2); - expect(pagination.find('a').length).toEqual(7); - expect(pagination.find('a').get(0).innerHTML).toEqual("..."); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("3"); - expect(pagination.find('a').get(3).innerHTML).toEqual("4"); - expect(pagination.find('a').get(4).innerHTML).toEqual("5"); - expect(pagination.find('a').get(5).innerHTML).toEqual("6"); - expect(pagination.find('a').get(6).innerHTML).toEqual("..."); - expect(pagination.find('a').get(7)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should show same pages for show(7,2) and show(8,2)', function () { + list.show(7, 2) + expect(pagination.find('a').length).toEqual(7) + expect(pagination.find('a').get(0).innerHTML).toEqual('...') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('3') + expect(pagination.find('a').get(3).innerHTML).toEqual('4') + expect(pagination.find('a').get(4).innerHTML).toEqual('5') + expect(pagination.find('a').get(5).innerHTML).toEqual('6') + expect(pagination.find('a').get(6).innerHTML).toEqual('...') + expect(pagination.find('a').get(7)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(8, 2); - expect(pagination.find('a').length).toEqual(7); - expect(pagination.find('a').get(0).innerHTML).toEqual("..."); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("3"); - expect(pagination.find('a').get(3).innerHTML).toEqual("4"); - expect(pagination.find('a').get(4).innerHTML).toEqual("5"); - expect(pagination.find('a').get(5).innerHTML).toEqual("6"); - expect(pagination.find('a').get(6).innerHTML).toEqual("..."); - expect(pagination.find('a').get(7)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should show same pages for show(7,2) and show(8,2)', function () { + list.show(8, 2) + expect(pagination.find('a').length).toEqual(7) + expect(pagination.find('a').get(0).innerHTML).toEqual('...') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('3') + expect(pagination.find('a').get(3).innerHTML).toEqual('4') + expect(pagination.find('a').get(4).innerHTML).toEqual('5') + expect(pagination.find('a').get(5).innerHTML).toEqual('6') + expect(pagination.find('a').get(6).innerHTML).toEqual('...') + expect(pagination.find('a').get(7)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - it('should test show(14,2)', function() { - list.show(14, 2); - expect(pagination.find('a').length).toEqual(6); - expect(pagination.find('a').get(0).innerHTML).toEqual("..."); - expect(pagination.find('a').get(1).innerHTML).toEqual("5"); - expect(pagination.find('a').get(2).innerHTML).toEqual("6"); - expect(pagination.find('a').get(3).innerHTML).toEqual("7"); - expect(pagination.find('a').get(4).innerHTML).toEqual("8"); - expect(pagination.find('a').get(5).innerHTML).toEqual("9"); - expect(pagination.find('a').get(6)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should test show(14,2)', function () { + list.show(14, 2) + expect(pagination.find('a').length).toEqual(6) + expect(pagination.find('a').get(0).innerHTML).toEqual('...') + expect(pagination.find('a').get(1).innerHTML).toEqual('5') + expect(pagination.find('a').get(2).innerHTML).toEqual('6') + expect(pagination.find('a').get(3).innerHTML).toEqual('7') + expect(pagination.find('a').get(4).innerHTML).toEqual('8') + expect(pagination.find('a').get(5).innerHTML).toEqual('9') + expect(pagination.find('a').get(6)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').length).toEqual(4); - expect(pagination.find('a').get(0).innerHTML).toEqual("..."); - expect(pagination.find('a').get(1).innerHTML).toEqual("7"); - expect(pagination.find('a').get(2).innerHTML).toEqual("8"); - expect(pagination.find('a').get(3).innerHTML).toEqual("9"); - expect(pagination.find('a').get(4)).toEqual(undefined); - expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - }); + it('should show last page with show(17,2)', function () { + list.show(17, 2) + expect(pagination.find('a').length).toEqual(4) + expect(pagination.find('a').get(0).innerHTML).toEqual('...') + expect(pagination.find('a').get(1).innerHTML).toEqual('7') + expect(pagination.find('a').get(2).innerHTML).toEqual('8') + expect(pagination.find('a').get(3).innerHTML).toEqual('9') + expect(pagination.find('a').get(4)).toEqual(undefined) + expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + }) - it('should handle page = 0', function() { - expect(list.listContainer.style.display).toBe(''); - list.show(0, 0); - expect(list.listContainer.style.display).toBe('none'); - list.show(1, 1); - expect(list.listContainer.style.display).toBe('block'); - }); - }); + it('should handle page = 0', function () { + expect(list.listContainer.style.display).toBe('') + list.show(0, 0) + expect(list.listContainer.style.display).toBe('none') + list.show(1, 1) + expect(list.listContainer.style.display).toBe('block') + }) + }) + describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 0, right: 0', function () { + var list, itemHTML, pagination - describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 0, right: 0', function() { - var list, - itemHTML, - pagination; - - beforeAll(function() { + beforeAll(function () { itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: { - innerWindow: 1, - outerWindow: 1 - } - }, fixturePagination.all); - - pagination = $('.pagination'); - }); + list = new List( + 'list-pagination', + { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: { + innerWindow: 1, + outerWindow: 1, + }, + }, + fixturePagination.all + ) - afterAll(function() { - fixturePagination.removeList(); - }); + pagination = $('.pagination') + }) - it('should have default settings', function() { - expect(pagination.find('a').length).toEqual(4); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("..."); - expect(pagination.find('a').get(3).innerHTML).toEqual("9"); - expect(pagination.find('a').get(4)).toEqual(undefined); - }); + afterAll(function () { + fixturePagination.removeList() + }) - it('should test show(7,2)', function() { - list.show(7, 2); - expect(pagination.find('a').length).toEqual(7); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("..."); - expect(pagination.find('a').get(2).innerHTML).toEqual("3"); - expect(pagination.find('a').get(3).innerHTML).toEqual("4"); - expect(pagination.find('a').get(4).innerHTML).toEqual("5"); - expect(pagination.find('a').get(5).innerHTML).toEqual("..."); - expect(pagination.find('a').get(6).innerHTML).toEqual("9"); - expect(pagination.find('a').get(7)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should have default settings', function () { + expect(pagination.find('a').length).toEqual(4) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('...') + expect(pagination.find('a').get(3).innerHTML).toEqual('9') + expect(pagination.find('a').get(4)).toEqual(undefined) + }) - it('should test show(14,2)', function() { - list.show(14, 2); - expect(pagination.find('a').length).toEqual(6); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("..."); - expect(pagination.find('a').get(2).innerHTML).toEqual("6"); - expect(pagination.find('a').get(3).innerHTML).toEqual("7"); - expect(pagination.find('a').get(4).innerHTML).toEqual("8"); - expect(pagination.find('a').get(5).innerHTML).toEqual("9"); - expect(pagination.find('a').get(6)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should test show(7,2)', function () { + list.show(7, 2) + expect(pagination.find('a').length).toEqual(7) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('...') + expect(pagination.find('a').get(2).innerHTML).toEqual('3') + expect(pagination.find('a').get(3).innerHTML).toEqual('4') + expect(pagination.find('a').get(4).innerHTML).toEqual('5') + expect(pagination.find('a').get(5).innerHTML).toEqual('...') + expect(pagination.find('a').get(6).innerHTML).toEqual('9') + expect(pagination.find('a').get(7)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').length).toEqual(4); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("..."); - expect(pagination.find('a').get(2).innerHTML).toEqual("8"); - expect(pagination.find('a').get(3).innerHTML).toEqual("9"); - expect(pagination.find('a').get(4)).toEqual(undefined); - expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - }); + it('should test show(14,2)', function () { + list.show(14, 2) + expect(pagination.find('a').length).toEqual(6) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('...') + expect(pagination.find('a').get(2).innerHTML).toEqual('6') + expect(pagination.find('a').get(3).innerHTML).toEqual('7') + expect(pagination.find('a').get(4).innerHTML).toEqual('8') + expect(pagination.find('a').get(5).innerHTML).toEqual('9') + expect(pagination.find('a').get(6)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - }); + it('should show last page with show(17,2)', function () { + list.show(17, 2) + expect(pagination.find('a').length).toEqual(4) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('...') + expect(pagination.find('a').get(2).innerHTML).toEqual('8') + expect(pagination.find('a').get(3).innerHTML).toEqual('9') + expect(pagination.find('a').get(4)).toEqual(undefined) + expect($(pagination.find('li').get(1)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + }) + }) + describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 2, right: 1', function () { + var list, itemHTML, pagination - describe('Custom settings, innerWindow: 1, outerWindow: 1, left: 2, right: 1', function() { - var list, - itemHTML, - pagination; - - beforeAll(function() { + beforeAll(function () { itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, - pagination: { - innerWindow: 1, - outerWindow: 1, - left: 2, - right: 1 - } - }, fixturePagination.all); - - pagination = $('.pagination'); - }); + list = new List( + 'list-pagination', + { + valueNames: ['name'], + item: itemHTML, + page: 2, + pagination: { + innerWindow: 1, + outerWindow: 1, + left: 2, + right: 1, + }, + }, + fixturePagination.all + ) - afterAll(function() { - fixturePagination.removeList(); - }); + pagination = $('.pagination') + }) - it('should have default settings', function() { - expect(pagination.find('a').length).toEqual(4); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("..."); - expect(pagination.find('a').get(3).innerHTML).toEqual("9"); - expect(pagination.find('a').get(4)).toEqual(undefined); - }); + afterAll(function () { + fixturePagination.removeList() + }) - it('should test show(7,2)', function() { - list.show(7, 2); - expect(pagination.find('a').length).toEqual(7); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("3"); - expect(pagination.find('a').get(3).innerHTML).toEqual("4"); - expect(pagination.find('a').get(4).innerHTML).toEqual("5"); - expect(pagination.find('a').get(5).innerHTML).toEqual("..."); - expect(pagination.find('a').get(6).innerHTML).toEqual("9"); - expect(pagination.find('a').get(7)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false); - }); + it('should have default settings', function () { + expect(pagination.find('a').length).toEqual(4) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('...') + expect(pagination.find('a').get(3).innerHTML).toEqual('9') + expect(pagination.find('a').get(4)).toEqual(undefined) + }) - it('should test show(12,2)', function() { - list.show(12, 2); - expect(pagination.find('a').length).toEqual(8); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("..."); - expect(pagination.find('a').get(3).innerHTML).toEqual("5"); - expect(pagination.find('a').get(4).innerHTML).toEqual("6"); - expect(pagination.find('a').get(5).innerHTML).toEqual("7"); - expect(pagination.find('a').get(6).innerHTML).toEqual("..."); - expect(pagination.find('a').get(7).innerHTML).toEqual("9"); - expect(pagination.find('a').get(8)).toEqual(undefined); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true); - expect($(pagination.find('li').get(5)).hasClass('active')).toEqual(false); - }); + it('should test show(7,2)', function () { + list.show(7, 2) + expect(pagination.find('a').length).toEqual(7) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('3') + expect(pagination.find('a').get(3).innerHTML).toEqual('4') + expect(pagination.find('a').get(4).innerHTML).toEqual('5') + expect(pagination.find('a').get(5).innerHTML).toEqual('...') + expect(pagination.find('a').get(6).innerHTML).toEqual('9') + expect(pagination.find('a').get(7)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(false) + }) - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('a').length).toEqual(5); - expect(pagination.find('a').get(0).innerHTML).toEqual("1"); - expect(pagination.find('a').get(1).innerHTML).toEqual("2"); - expect(pagination.find('a').get(2).innerHTML).toEqual("..."); - expect(pagination.find('a').get(3).innerHTML).toEqual("8"); - expect(pagination.find('a').get(4).innerHTML).toEqual("9"); - expect(pagination.find('a').get(5)).toEqual(undefined); - expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false); - expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true); - }); + it('should test show(12,2)', function () { + list.show(12, 2) + expect(pagination.find('a').length).toEqual(8) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('...') + expect(pagination.find('a').get(3).innerHTML).toEqual('5') + expect(pagination.find('a').get(4).innerHTML).toEqual('6') + expect(pagination.find('a').get(5).innerHTML).toEqual('7') + expect(pagination.find('a').get(6).innerHTML).toEqual('...') + expect(pagination.find('a').get(7).innerHTML).toEqual('9') + expect(pagination.find('a').get(8)).toEqual(undefined) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true) + expect($(pagination.find('li').get(5)).hasClass('active')).toEqual(false) + }) - }); -}); + it('should show last page with show(17,2)', function () { + list.show(17, 2) + expect(pagination.find('a').length).toEqual(5) + expect(pagination.find('a').get(0).innerHTML).toEqual('1') + expect(pagination.find('a').get(1).innerHTML).toEqual('2') + expect(pagination.find('a').get(2).innerHTML).toEqual('...') + expect(pagination.find('a').get(3).innerHTML).toEqual('8') + expect(pagination.find('a').get(4).innerHTML).toEqual('9') + expect(pagination.find('a').get(5)).toEqual(undefined) + expect($(pagination.find('li').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false) + expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true) + }) + }) +}) diff --git a/__test__/parse.test.js b/__test__/parse.test.js index 60485542..4055050f 100644 --- a/__test__/parse.test.js +++ b/__test__/parse.test.js @@ -1,60 +1,64 @@ const $ = require('jquery'), - List = require('../src/index'); + List = require('../src/index') -describe('Parse', function() { - - describe('Parse class', function() { - var list; - beforeEach(function() { - $('body').append($('
                                        \ +describe('Parse', function () { + describe('Parse class', function () { + var list + beforeEach(function () { + $('body').append( + $( + '
                                        \
                                        \
                                        Jonny1986
                                        \
                                        Jocke1985
                                        \
                                        \ -
                                        ')); +
                                        ' + ) + ) list = new List('parse-list', { - valueNames: ['name', 'born'] - }); - }); - - afterEach(function() { - $('#parse-list').remove(); - }); + valueNames: ['name', 'born'], + }) + }) - it('should have two items', function() { - expect(list.items.length).toEqual(2); - expect(list.items[0].values().name).toEqual("Jonny"); - expect(list.items[1].values().name).toEqual("Jocke"); - }); - it('should add item to parsed list', function() { - list.add({ name: "Sven", born: 1950 }); - expect(list.items.length).toEqual(3); - expect(list.items[0].values().name).toEqual("Jonny"); - expect(list.items[1].values().name).toEqual("Jocke"); - expect(list.items[2].values().name).toEqual("Sven"); - expect(list.items[0].values().born).toEqual("1986"); - expect(list.items[2].values().born).toEqual(1950); - var el = $($('#parse-list').find('.list div')[2]); - expect(el.find('span').length).toEqual(2); - expect(el.find('span.name').text()).toEqual('Sven'); - expect(el.find('span.born').text()).toEqual('1950'); - }); - it('should parsed value always be string while added could be number', function() { - list.add({ name: "Sven", born: 1950 }); - expect(list.items[0].values().born).toEqual("1986"); - expect(list.items[0].values().born).not.toEqual(1986); - expect(list.items[2].values().born).not.toEqual("1950"); - expect(list.items[2].values().born).toEqual(1950); - }); - }); + afterEach(function () { + $('#parse-list').remove() + }) - describe('Parse data', function() { + it('should have two items', function () { + expect(list.items.length).toEqual(2) + expect(list.items[0].values().name).toEqual('Jonny') + expect(list.items[1].values().name).toEqual('Jocke') + }) + it('should add item to parsed list', function () { + list.add({ name: 'Sven', born: 1950 }) + expect(list.items.length).toEqual(3) + expect(list.items[0].values().name).toEqual('Jonny') + expect(list.items[1].values().name).toEqual('Jocke') + expect(list.items[2].values().name).toEqual('Sven') + expect(list.items[0].values().born).toEqual('1986') + expect(list.items[2].values().born).toEqual(1950) + var el = $($('#parse-list').find('.list div')[2]) + expect(el.find('span').length).toEqual(2) + expect(el.find('span.name').text()).toEqual('Sven') + expect(el.find('span.born').text()).toEqual('1950') + }) + it('should parsed value always be string while added could be number', function () { + list.add({ name: 'Sven', born: 1950 }) + expect(list.items[0].values().born).toEqual('1986') + expect(list.items[0].values().born).not.toEqual(1986) + expect(list.items[2].values().born).not.toEqual('1950') + expect(list.items[2].values().born).toEqual(1950) + }) + }) - var list; + describe('Parse data', function () { + var list - beforeEach(function() { - $('body').append($('
                                        \ + beforeEach(function () { + $('body').append( + $( + '
                                        \
                                        \
                                        \ Jonny\ @@ -69,54 +73,64 @@ describe('Parse', function() { \
                                        \
                                        \ -
                                        ')); +
                                        ' + ) + ) list = new List('parse-list', { valueNames: [ 'name', 'born', - { data: [ 'id' ] }, - { attr: 'src', name: 'image'}, - { attr: 'href', name: 'link'}, - { attr: 'value', name: 'foo'}, - { attr: 'data-timestamp', name: 'timestamp' } - ] - }); - }); + { data: ['id'] }, + { attr: 'src', name: 'image' }, + { attr: 'href', name: 'link' }, + { attr: 'value', name: 'foo' }, + { attr: 'data-timestamp', name: 'timestamp' }, + ], + }) + }) - afterEach(function() { - $('#parse-list').remove(); - }); + afterEach(function () { + $('#parse-list').remove() + }) - it('should get values from class, data, src, value and child els data-attribute', function() { - expect(list.items.length).toEqual(2); - var jonny = list.items[0].values(); - expect(jonny.name).toEqual("Jonny"); - expect(jonny.born).toEqual("1986"); - expect(jonny.id).toEqual("1"); - expect(jonny.image).toEqual("usage/boba.jpeg"); - expect(jonny.timestamp).toEqual("54321"); - expect(jonny.foo).toEqual("Bar"); - }); - it('should add item to list with class, data and src', function() { - list.add({ name: "Sven", born: 1950, id: 4, image: 'usage/rey.jpeg', link: 'localhost', timestamp: '1337', foo: 'hej' }); - expect(list.items.length).toEqual(3); - var sven = list.items[2].values(); - expect(sven.name).toEqual("Sven"); - expect(sven.born).toEqual(1950); - expect(sven.id).toEqual(4); - expect(sven.image).toEqual("usage/rey.jpeg"); - expect(sven.link).toEqual("localhost"); - expect(sven.timestamp).toEqual("1337"); - expect(sven.foo).toEqual("hej"); - var el = $($('#parse-list').find('.list div')[2]); - expect(el.data('id')).toEqual(4); - expect(el.find('.name').text()).toEqual('Sven'); - expect(el.find('.born').text()).toEqual('1950'); - expect(el.find('.image').attr('src')).toEqual('usage/rey.jpeg'); - expect(el.find('.link').attr('href')).toEqual('localhost'); - expect(el.find('.timestamp').data('timestamp')).toEqual(1337); - expect(el.find('.foo').val()).toEqual('hej'); - }); - }); -}); + it('should get values from class, data, src, value and child els data-attribute', function () { + expect(list.items.length).toEqual(2) + var jonny = list.items[0].values() + expect(jonny.name).toEqual('Jonny') + expect(jonny.born).toEqual('1986') + expect(jonny.id).toEqual('1') + expect(jonny.image).toEqual('usage/boba.jpeg') + expect(jonny.timestamp).toEqual('54321') + expect(jonny.foo).toEqual('Bar') + }) + it('should add item to list with class, data and src', function () { + list.add({ + name: 'Sven', + born: 1950, + id: 4, + image: 'usage/rey.jpeg', + link: 'localhost', + timestamp: '1337', + foo: 'hej', + }) + expect(list.items.length).toEqual(3) + var sven = list.items[2].values() + expect(sven.name).toEqual('Sven') + expect(sven.born).toEqual(1950) + expect(sven.id).toEqual(4) + expect(sven.image).toEqual('usage/rey.jpeg') + expect(sven.link).toEqual('localhost') + expect(sven.timestamp).toEqual('1337') + expect(sven.foo).toEqual('hej') + var el = $($('#parse-list').find('.list div')[2]) + expect(el.data('id')).toEqual(4) + expect(el.find('.name').text()).toEqual('Sven') + expect(el.find('.born').text()).toEqual('1950') + expect(el.find('.image').attr('src')).toEqual('usage/rey.jpeg') + expect(el.find('.link').attr('href')).toEqual('localhost') + expect(el.find('.timestamp').data('timestamp')).toEqual(1337) + expect(el.find('.foo').val()).toEqual('hej') + }) + }) +}) diff --git a/__test__/re-index.test.js b/__test__/re-index.test.js index 5727083f..6bed7c97 100644 --- a/__test__/re-index.test.js +++ b/__test__/re-index.test.js @@ -1,37 +1,36 @@ const $ = require('jquery'), - fixture = require('./fixtures'); + fixture = require('./fixtures') -describe('ReIndex', function() { +describe('ReIndex', function () { + var list, jonny, martina, angelica, sebastian, imma, hasse - var list, jonny, martina, angelica, sebastian, imma, hasse; + beforeAll(function () { + list = fixture.list(['name', 'born'], fixture.all) + }) - beforeAll(function() { - list = fixture.list(['name', 'born'], fixture.all); - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); - - afterEach(function() { - list.show(1, 200); - }); - it('should return everyone born after 1988', function() { + afterEach(function () { + list.show(1, 200) + }) + it('should return everyone born after 1988', function () { expect(list.toJSON()).toEqual([ - { name: "Jonny Strömberg", born: '1986' }, - { name: "Martina Elm", born: '1986' }, - { name: "Angelica Abraham", born: '1986' }, - { name: "Sebastian Höglund", born: '1989' }, - { name: "Imma Grafström", born: '1953' }, - { name: "Hasse Strömberg", born: '1955' } - ]); - var newHtml = '
                                      • Sven2013'; - newHtml = newHtml + '
                                      • Anna3043'; - $(list.list).html(newHtml); - list.reIndex(); + { name: 'Jonny Strömberg', born: '1986' }, + { name: 'Martina Elm', born: '1986' }, + { name: 'Angelica Abraham', born: '1986' }, + { name: 'Sebastian Höglund', born: '1989' }, + { name: 'Imma Grafström', born: '1953' }, + { name: 'Hasse Strömberg', born: '1955' }, + ]) + var newHtml = '
                                      • Sven2013' + newHtml = newHtml + '
                                      • Anna3043' + $(list.list).html(newHtml) + list.reIndex() expect(list.toJSON()).toEqual([ - { name: "Sven", born: '2013' }, - { name: "Anna", born: '3043' } - ]); - }); -}); + { name: 'Sven', born: '2013' }, + { name: 'Anna', born: '3043' }, + ]) + }) +}) diff --git a/__test__/search-filter.test.js b/__test__/search-filter.test.js index 3dc8f565..73e7264f 100644 --- a/__test__/search-filter.test.js +++ b/__test__/search-filter.test.js @@ -1,68 +1,67 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Search and filter', function() { +describe('Search and filter', function () { + var list, jonny, martina, angelica, sebastian, imma, hasse - var list, jonny, martina, angelica, sebastian, imma, hasse; + beforeAll(function () { + list = fixture.list(['name', 'born'], fixture.all) - beforeAll(function() { - list = fixture.list(['name', 'born'], fixture.all); + jonny = list.get('name', 'Jonny Strömberg')[0] + martina = list.get('name', 'Martina Elm')[0] + angelica = list.get('name', 'Angelica Abraham')[0] + sebastian = list.get('name', 'Sebastian Höglund')[0] + imma = list.get('name', 'Imma Grafström')[0] + hasse = list.get('name', 'Hasse Strömberg')[0] + }) - jonny = list.get('name', 'Jonny Strömberg')[0]; - martina = list.get('name', 'Martina Elm')[0]; - angelica = list.get('name', 'Angelica Abraham')[0]; - sebastian = list.get('name', 'Sebastian Höglund')[0]; - imma = list.get('name', 'Imma Grafström')[0]; - hasse = list.get('name', 'Hasse Strömberg')[0]; - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); + afterEach(function () { + list.search() + list.filter() + }) - afterEach(function() { - list.search(); - list.filter(); - }); - - describe('Search with filter', function() { - it('should find everyone born 1986', function() { - list.filter(function(item) { - return (item.values().born == '1986'); - }); - expect(list.matchingItems.length).toEqual(3); - expect(jonny.matching()).toBe(true); - expect(martina.matching()).toBe(true); - expect(angelica.matching()).toBe(true); - expect(sebastian.matching()).toBe(false); - expect(imma.matching()).toBe(false); - expect(hasse.matching()).toBe(false); - }); - it('should find everyone born 1986 and containes "ö"', function() { - list.filter(function(item) { - return (item.values().born == '1986'); - }); - list.search('ö'); - expect(list.matchingItems.length).toEqual(1); - expect(jonny.matching()).toBe(true); - expect(martina.matching()).toBe(false); - expect(angelica.matching()).toBe(false); - expect(sebastian.matching()).toBe(false); - expect(imma.matching()).toBe(false); - expect(hasse.matching()).toBe(false); - }); - it('should find everyone with a "ö"', function() { - list.filter(function(item) { - return (item.values().born == '1986'); - }); - list.search('ö'); - list.filter(); - expect(list.matchingItems.length).toEqual(4); - expect(jonny.matching()).toBe(true); - expect(martina.matching()).toBe(false); - expect(angelica.matching()).toBe(false); - expect(sebastian.matching()).toBe(true); - expect(imma.matching()).toBe(true); - expect(hasse.matching()).toBe(true); - }); - }); -}); + describe('Search with filter', function () { + it('should find everyone born 1986', function () { + list.filter(function (item) { + return item.values().born == '1986' + }) + expect(list.matchingItems.length).toEqual(3) + expect(jonny.matching()).toBe(true) + expect(martina.matching()).toBe(true) + expect(angelica.matching()).toBe(true) + expect(sebastian.matching()).toBe(false) + expect(imma.matching()).toBe(false) + expect(hasse.matching()).toBe(false) + }) + it('should find everyone born 1986 and containes "ö"', function () { + list.filter(function (item) { + return item.values().born == '1986' + }) + list.search('ö') + expect(list.matchingItems.length).toEqual(1) + expect(jonny.matching()).toBe(true) + expect(martina.matching()).toBe(false) + expect(angelica.matching()).toBe(false) + expect(sebastian.matching()).toBe(false) + expect(imma.matching()).toBe(false) + expect(hasse.matching()).toBe(false) + }) + it('should find everyone with a "ö"', function () { + list.filter(function (item) { + return item.values().born == '1986' + }) + list.search('ö') + list.filter() + expect(list.matchingItems.length).toEqual(4) + expect(jonny.matching()).toBe(true) + expect(martina.matching()).toBe(false) + expect(angelica.matching()).toBe(false) + expect(sebastian.matching()).toBe(true) + expect(imma.matching()).toBe(true) + expect(hasse.matching()).toBe(true) + }) + }) +}) diff --git a/__test__/search.test.js b/__test__/search.test.js index 6139b49a..b819be16 100644 --- a/__test__/search.test.js +++ b/__test__/search.test.js @@ -1,162 +1,159 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Search', function() { +describe('Search', function () { + var list, jonny, martina, angelica, sebastian, imma, hasse - var list, jonny, martina, angelica, sebastian, imma, hasse; + beforeEach(function () { + list = fixture.list(['name', 'born'], fixture.all) - beforeEach(function() { - list = fixture.list(['name', 'born'], fixture.all); + jonny = list.get('name', 'Jonny Strömberg')[0] + martina = list.get('name', 'Martina Elm')[0] + angelica = list.get('name', 'Angelica Abraham')[0] + sebastian = list.get('name', 'Sebastian Höglund')[0] + imma = list.get('name', 'Imma Grafström')[0] + hasse = list.get('name', 'Hasse Strömberg')[0] + }) - jonny = list.get('name', 'Jonny Strömberg')[0]; - martina = list.get('name', 'Martina Elm')[0]; - angelica = list.get('name', 'Angelica Abraham')[0]; - sebastian = list.get('name', 'Sebastian Höglund')[0]; - imma = list.get('name', 'Imma Grafström')[0]; - hasse = list.get('name', 'Hasse Strömberg')[0]; - }); + afterEach(function () { + fixture.removeList() + }) - afterEach(function() { - fixture.removeList(); - }); + describe('Case-sensitive', function () { + it('should not be case-sensitive', function () { + var result = list.search('jonny') + expect(result.length).toEqual(1) + expect(result[0]).toEqual(jonny) + }) + }) - describe('Case-sensitive', function() { - it('should not be case-sensitive', function() { - var result = list.search('jonny'); - expect(result.length).toEqual(1); - expect(result[0]).toEqual(jonny); - }); - }); + describe('Number of results', function () { + it('should find jonny, martina, angelice', function () { + var result = list.search('1986') + expect(result.length).toEqual(3) // 3!! + expect(jonny.matching()).toBe(true) + expect(martina.matching()).toBe(true) + expect(angelica.matching()).toBe(true) + expect(sebastian.matching()).toBe(false) + expect(imma.matching()).toBe(false) + expect(hasse.matching()).toBe(false) + }) + it('should find all with utf-8 char ö', function () { + var result = list.search('ö') + expect(result.length).toEqual(4) // 4!! + expect(jonny.matching()).toBe(true) + expect(martina.matching()).toBe(false) + expect(angelica.matching()).toBe(false) + expect(sebastian.matching()).toBe(true) + expect(imma.matching()).toBe(true) + expect(hasse.matching()).toBe(true) + }) + it('should not break with weird searches', function () { + expect(function () { + list.search(undefined) + }).not.toThrow() + expect(function () { + list.search(null) + }).not.toThrow() + expect(function () { + list.search(0) + }).not.toThrow() + expect(function () { + list.search(function () {}) + }).not.toThrow() + expect(function () { + list.search({ foo: 'bar' }) + }).not.toThrow() + }) + it('should not break with weird values', function () { + jonny.values({ name: undefined }) + martina.values({ name: null }) + angelica.values({ name: 0 }) + sebastian.values({ name: function () {} }) + imma.values({ name: { foo: 'bar' } }) - describe('Number of results', function() { - it('should find jonny, martina, angelice', function() { - var result = list.search('1986'); - expect(result.length).toEqual(3); // 3!! - expect(jonny.matching()).toBe(true); - expect(martina.matching()).toBe(true); - expect(angelica.matching()).toBe(true); - expect(sebastian.matching()).toBe(false); - expect(imma.matching()).toBe(false); - expect(hasse.matching()).toBe(false); - }); - it('should find all with utf-8 char ö', function() { - var result = list.search('ö'); - expect(result.length).toEqual(4); // 4!! - expect(jonny.matching()).toBe(true); - expect(martina.matching()).toBe(false); - expect(angelica.matching()).toBe(false); - expect(sebastian.matching()).toBe(true); - expect(imma.matching()).toBe(true); - expect(hasse.matching()).toBe(true); - }); - it('should not break with weird searches', function() { - expect(function() { - list.search(undefined); - }).not.toThrow(); - expect(function() { - list.search(null); - }).not.toThrow(); - expect(function() { - list.search(0); - }).not.toThrow(); - expect(function() { - list.search(function() {}); - }).not.toThrow(); - expect(function() { - list.search({ foo: "bar" }); - }).not.toThrow(); - }); - it('should not break with weird values', function() { - jonny.values({ name: undefined }); - martina.values({ name: null }); - angelica.values({ name: 0 }); - sebastian.values({ name: function() {} }); - imma.values({ name: { foo: "bar" } }); + expect(function () { + list.search('jonny') + }).not.toThrow() + expect(function () { + list.search(undefined) + }).not.toThrow() + expect(function () { + list.search(null) + }).not.toThrow() + expect(function () { + list.search(0) + }).not.toThrow() + expect(function () { + list.search(function () {}) + }).not.toThrow() + expect(function () { + list.search({ foo: 'bar' }) + }).not.toThrow() + }) + }) - expect(function() { - list.search("jonny"); - }).not.toThrow(); - expect(function() { - list.search(undefined); - }).not.toThrow(); - expect(function() { - list.search(null); - }).not.toThrow(); - expect(function() { - list.search(0); - }).not.toThrow(); - expect(function() { - list.search(function() {}); - }).not.toThrow(); - expect(function() { - list.search({ foo: "bar" }); - }).not.toThrow(); - }); - }); + describe('Default search columns', function () { + it('should find in the default match column', function () { + list.searchColumns = ['name'] + var result = list.search('jonny') + expect(result.length).toEqual(1) + expect(result[0]).toEqual(jonny) + }) + it('should not find in the default match column', function () { + list.searchColumns = ['born'] + var result = list.search('jonny') + expect(result.length).toEqual(0) + }) + }) + describe('Specfic columns', function () { + it('should find match in column', function () { + var result = list.search('jonny', ['name']) + expect(result.length).toEqual(1) + expect(result[0]).toEqual(jonny) + }) + it('should not find match in column', function () { + var result = list.search('jonny', ['born']) + expect(result.length).toEqual(0) + }) + it('should find match in column', function () { + var result = list.search('jonny', ['name']) + expect(result.length).toEqual(1) + expect(result[0]).toEqual(jonny) + }) + it('should not find match in column', function () { + var result = list.search('jonny', ['born']) + expect(result.length).toEqual(0) + }) + it('should work with columns that does not exist', function () { + var result = list.search('jonny', ['pet']) + expect(result.length).toEqual(0) + }) + it('should remove columnm option', function () { + var result = list.search('jonny', ['born']) + expect(result.length).toEqual(0) + result = list.search('jonny') + expect(result.length).toEqual(1) + }) + }) - describe('Default search columns', function() { - it('should find in the default match column', function() { - list.searchColumns = ['name']; - var result = list.search('jonny'); - expect(result.length).toEqual(1); - expect(result[0]).toEqual(jonny); - }); - it('should not find in the default match column', function() { - list.searchColumns = ['born']; - var result = list.search('jonny'); - expect(result.length).toEqual(0); - }); - }); - - - describe('Specfic columns', function() { - it('should find match in column', function() { - var result = list.search('jonny', [ 'name' ]); - expect(result.length).toEqual(1); - expect(result[0]).toEqual(jonny); - }); - it('should not find match in column', function() { - var result = list.search('jonny', [ 'born' ]); - expect(result.length).toEqual(0); - }); - it('should find match in column', function() { - var result = list.search('jonny', [ 'name' ]); - expect(result.length).toEqual(1); - expect(result[0]).toEqual(jonny); - }); - it('should not find match in column', function() { - var result = list.search('jonny', [ 'born' ]); - expect(result.length).toEqual(0); - }); - it('should work with columns that does not exist', function() { - var result = list.search('jonny', [ 'pet' ]); - expect(result.length).toEqual(0); - }); - it('should remove columnm option', function() { - var result = list.search('jonny', [ 'born' ]); - expect(result.length).toEqual(0); - result = list.search('jonny'); - expect(result.length).toEqual(1); - }); - }); - - describe('Custom search function', function() { - var customSearchFunction = function(searchString, columns) { + describe('Custom search function', function () { + var customSearchFunction = function (searchString, columns) { for (var k = 0, kl = list.items.length; k < kl; k++) { if (list.items[k].values().born > 1985) { - list.items[k].found = true; + list.items[k].found = true } } - }; - it('should use custom function in third argument', function() { - var result = list.search('jonny', [ 'name' ], customSearchFunction); - expect(result.length).toEqual(4); - }); - it('should use custom function in second argument', function() { - var result = list.search('jonny', customSearchFunction); - expect(result.length).toEqual(4); - }); - }); + } + it('should use custom function in third argument', function () { + var result = list.search('jonny', ['name'], customSearchFunction) + expect(result.length).toEqual(4) + }) + it('should use custom function in second argument', function () { + var result = list.search('jonny', customSearchFunction) + expect(result.length).toEqual(4) + }) + }) // // describe('Special characters', function() { // it('should escape and handle special characters', function() { @@ -175,4 +172,4 @@ describe('Search', function() { // expect(result.length).toEqual(1); // }); // }); -}); +}) diff --git a/__test__/show.test.js b/__test__/show.test.js index f39a0195..60fa41cb 100644 --- a/__test__/show.test.js +++ b/__test__/show.test.js @@ -1,210 +1,212 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Show', function() { +describe('Show', function () { + var list, a, b, c, d, e, f - var list, a, b, c, d, e, f; + beforeAll(function () { + list = fixture.list( + ['id', 'id2'], + [ + { id: '1', id2: 'a' }, + { id: '2', id2: 'a' }, + { id: '3', id2: 'b' }, + { id: '4', id2: 'b' }, + { id: '5', id2: 'bc' }, + { id: '6', id2: 'bc' }, + ] + ) + a = list.get('id', '1')[0] + b = list.get('id', '2')[0] + c = list.get('id', '3')[0] + d = list.get('id', '4')[0] + e = list.get('id', '5')[0] + f = list.get('id', '6')[0] + }) - beforeAll(function() { - list = fixture.list(['id', 'id2'], [ - { id: "1", id2: "a" }, - { id: "2", id2: "a" }, - { id: "3", id2: "b" }, - { id: "4", id2: "b" }, - { id: "5", id2: "bc" }, - { id: "6", id2: "bc" } - ]); - a = list.get('id', '1')[0]; - b = list.get('id', '2')[0]; - c = list.get('id', '3')[0]; - d = list.get('id', '4')[0]; - e = list.get('id', '5')[0]; - f = list.get('id', '6')[0]; - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); + afterEach(function () { + list.filter() + list.show(1, 200) + }) - afterEach(function() { - list.filter(); - list.show(1, 200); - }); + describe('Basics', function () { + it('should be 1, 2', function () { + list.show(1, 2) + expect(list.visibleItems.length).toEqual(2) + expect(a.visible()).toBe(true) + expect(b.visible()).toBe(true) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(false) + }) + it('should show item 6', function () { + list.show(6, 2) + expect(list.visibleItems.length).toEqual(1) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(true) + }) + it('should show item 1, 2, 3, 4, 5, 6', function () { + list.show(1, 200) + expect(list.visibleItems.length).toEqual(6) + expect(a.visible()).toBe(true) + expect(b.visible()).toBe(true) + expect(c.visible()).toBe(true) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(true) + }) + it('should show item 3, 4, 5', function () { + list.show(3, 3) + expect(list.visibleItems.length).toEqual(3) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(true) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(false) + }) + it('should show item 5, 6', function () { + list.show(5, 3) + expect(list.visibleItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(true) + }) + }) - describe('Basics', function() { - it('should be 1, 2', function() { - list.show(1,2); - expect(list.visibleItems.length).toEqual(2); - expect(a.visible()).toBe(true); - expect(b.visible()).toBe(true); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(false); - }); - it('should show item 6', function() { - list.show(6,2); - expect(list.visibleItems.length).toEqual(1); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(true); - }); - it('should show item 1, 2, 3, 4, 5, 6', function() { - list.show(1,200); - expect(list.visibleItems.length).toEqual(6); - expect(a.visible()).toBe(true); - expect(b.visible()).toBe(true); - expect(c.visible()).toBe(true); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(true); - }); - it('should show item 3, 4, 5', function() { - list.show(3,3); - expect(list.visibleItems.length).toEqual(3); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(true); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(false); - }); - it('should show item 5, 6', function() { - list.show(5,3); - expect(list.visibleItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(true); - }); - }); + describe('Search', function () { + afterEach(function () { + list.search() + }) + it('should show 3, 4', function () { + list.search('b') + list.show(1, 2) + expect(list.visibleItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(true) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(false) + }) + it('should show item 3,4,5,6', function () { + list.search('b') + list.show(1, 4) + expect(list.visibleItems.length).toEqual(4) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(true) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(true) + }) + it('should not show any items but match two', function () { + list.search('a') + list.show(3, 2) + expect(list.visibleItems.length).toEqual(0) + expect(list.matchingItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(false) + }) + }) - describe('Search', function() { - afterEach(function() { - list.search(); - }); - it('should show 3, 4', function() { - list.search('b'); - list.show(1,2); - expect(list.visibleItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(true); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(false); - }); - it('should show item 3,4,5,6', function() { - list.search('b'); - list.show(1,4); - expect(list.visibleItems.length).toEqual(4); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(true); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(true); - }); - it('should not show any items but match two', function() { - list.search('a'); - list.show(3,2); - expect(list.visibleItems.length).toEqual(0); - expect(list.matchingItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(false); - }); - }); + describe('Filter', function () { + afterEach(function () { + list.filter() + }) + it('should show 3, 4', function () { + list.filter(function (item) { + return item.values().id2 == 'b' + }) + list.show(1, 2) + expect(list.visibleItems.length).toEqual(2) + expect(list.matchingItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(true) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(false) + }) + it('should show item 3,4,5,6', function () { + list.filter(function (item) { + return item.values().id2 == 'bc' + }) + list.show(1, 4) + expect(list.visibleItems.length).toEqual(2) + expect(list.matchingItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(true) + }) + it('should not show any items but match two', function () { + list.filter(function (item) { + return item.values().id2 == 'b' + }) + list.show(3, 2) + expect(list.visibleItems.length).toEqual(0) + expect(list.matchingItems.length).toEqual(2) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(false) + expect(f.visible()).toBe(false) + }) + }) - describe('Filter', function() { - afterEach(function() { - list.filter(); - }); - it('should show 3, 4', function() { - list.filter(function(item) { - return (item.values().id2 == 'b'); - }); - list.show(1,2); - expect(list.visibleItems.length).toEqual(2); - expect(list.matchingItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(true); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(false); - }); - it('should show item 3,4,5,6', function() { - list.filter(function(item) { - return (item.values().id2 == 'bc'); - }); - list.show(1,4); - expect(list.visibleItems.length).toEqual(2); - expect(list.matchingItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(true); - }); - it('should not show any items but match two', function() { - list.filter(function(item) { - return (item.values().id2 == 'b'); - }); - list.show(3,2); - expect(list.visibleItems.length).toEqual(0); - expect(list.matchingItems.length).toEqual(2); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(false); - expect(f.visible()).toBe(false); - }); - }); - - describe('Filter and search', function() { - afterEach(function() { - list.filter(); - }); - it('should show 4, 5', function() { - list.show(1,2); - list.filter(function(item) { - return (item.values().id > '3'); - }); - list.search('b'); - expect(list.visibleItems.length).toEqual(2); - expect(list.matchingItems.length).toEqual(3); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(true); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(false); - }); - it('should show 5, 6', function() { - list.show(1,2); - list.filter(function(item) { - return (item.values().id > '3'); - }); - list.search('b'); - list.show(2,2); - expect(list.visibleItems.length).toEqual(2); - expect(list.matchingItems.length).toEqual(3); - expect(a.visible()).toBe(false); - expect(b.visible()).toBe(false); - expect(c.visible()).toBe(false); - expect(d.visible()).toBe(false); - expect(e.visible()).toBe(true); - expect(f.visible()).toBe(true); - }); - }); -}); + describe('Filter and search', function () { + afterEach(function () { + list.filter() + }) + it('should show 4, 5', function () { + list.show(1, 2) + list.filter(function (item) { + return item.values().id > '3' + }) + list.search('b') + expect(list.visibleItems.length).toEqual(2) + expect(list.matchingItems.length).toEqual(3) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(true) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(false) + }) + it('should show 5, 6', function () { + list.show(1, 2) + list.filter(function (item) { + return item.values().id > '3' + }) + list.search('b') + list.show(2, 2) + expect(list.visibleItems.length).toEqual(2) + expect(list.matchingItems.length).toEqual(3) + expect(a.visible()).toBe(false) + expect(b.visible()).toBe(false) + expect(c.visible()).toBe(false) + expect(d.visible()).toBe(false) + expect(e.visible()).toBe(true) + expect(f.visible()).toBe(true) + }) + }) +}) diff --git a/__test__/sort.test.js b/__test__/sort.test.js index 6e4babdd..c30503f8 100644 --- a/__test__/sort.test.js +++ b/__test__/sort.test.js @@ -1,367 +1,376 @@ const $ = require('jquery'), - fixture = require('./fixtures'); + fixture = require('./fixtures') -describe('Sort', function() { +describe('Sort', function () { + var list, i1, i2, i3, i4, i5, i6 - var list, i1, i2, i3, i4, i5, i6; + beforeEach(function () { + list = fixture.list( + ['id'], + [ + { id: '1', val: '' }, + { id: '2', val: '' }, + { id: '3', val: '' }, + { id: '4', val: '' }, + { id: '5', val: '' }, + { id: '6', val: '' }, + ] + ) + i1 = list.get('id', '1')[0] + i2 = list.get('id', '2')[0] + i3 = list.get('id', '3')[0] + i4 = list.get('id', '4')[0] + i5 = list.get('id', '5')[0] + i6 = list.get('id', '6')[0] + }) - beforeEach(function() { - list = fixture.list(['id'], [ - { id: "1", val: "" }, - { id: "2", val: "" }, - { id: "3", val: "" }, - { id: "4", val: "" }, - { id: "5", val: "" }, - { id: "6", val: "" } - ]); - i1 = list.get('id', '1')[0]; - i2 = list.get('id', '2')[0]; - i3 = list.get('id', '3')[0]; - i4 = list.get('id', '4')[0]; - i5 = list.get('id', '5')[0]; - i6 = list.get('id', '6')[0]; - }); + afterEach(function () { + fixture.removeList() + }) - afterEach(function() { - fixture.removeList(); - }); + describe('Basics', function () { + it('should sort letters asc', function () { + i1.values({ val: 'b' }) + i2.values({ val: 'a' }) + i3.values({ val: 'c' }) + i4.values({ val: 'z' }) + i5.values({ val: 's' }) + i6.values({ val: 'y' }) + list.sort('val') + expect(list.items[0].values().val).toBe('a') + expect(list.items[1].values().val).toBe('b') + expect(list.items[2].values().val).toBe('c') + expect(list.items[3].values().val).toBe('s') + expect(list.items[4].values().val).toBe('y') + expect(list.items[5].values().val).toBe('z') + }) + it('should sort letters desc', function () { + i1.values({ val: 'b' }) + i2.values({ val: 'a' }) + i3.values({ val: 'c' }) + i4.values({ val: 'z' }) + i5.values({ val: 's' }) + i6.values({ val: 'y' }) + list.sort('val', { order: 'desc' }) + expect(list.items[0].values().val).toBe('z') + expect(list.items[1].values().val).toBe('y') + expect(list.items[2].values().val).toBe('s') + expect(list.items[3].values().val).toBe('c') + expect(list.items[4].values().val).toBe('b') + expect(list.items[5].values().val).toBe('a') + }) + it('should sort åäö desc', function () { + list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö' + i1.values({ val: 'a' }) + i2.values({ val: 'å' }) + i3.values({ val: 'ä' }) + i4.values({ val: 'ö' }) + i5.values({ val: 'o' }) + i6.values({ val: 's' }) + list.sort('val', { order: 'desc' }) + expect(list.items[0].values().val).toBe('ö') + expect(list.items[1].values().val).toBe('ä') + expect(list.items[2].values().val).toBe('å') + expect(list.items[3].values().val).toBe('s') + expect(list.items[4].values().val).toBe('o') + expect(list.items[5].values().val).toBe('a') + }) + it('should sort åäö asc', function () { + list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö' + i1.values({ val: 'a' }) + i2.values({ val: 'å' }) + i3.values({ val: 'ä' }) + i4.values({ val: 'ö' }) + i5.values({ val: 'o' }) + i6.values({ val: 's' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('a') + expect(list.items[1].values().val).toBe('o') + expect(list.items[2].values().val).toBe('s') + expect(list.items[3].values().val).toBe('å') + expect(list.items[4].values().val).toBe('ä') + expect(list.items[5].values().val).toBe('ö') + }) + it('should sort åäö desc case insensitive', function () { + list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö' + i1.values({ val: 'a' }) + i2.values({ val: 'Å' }) + i3.values({ val: 'ä' }) + i4.values({ val: 'Ö' }) + i5.values({ val: 'o' }) + i6.values({ val: 'S' }) + list.sort('val', { order: 'desc' }) + expect(list.items[0].values().val).toBe('Ö') + expect(list.items[1].values().val).toBe('ä') + expect(list.items[2].values().val).toBe('Å') + expect(list.items[3].values().val).toBe('S') + expect(list.items[4].values().val).toBe('o') + expect(list.items[5].values().val).toBe('a') + }) + it('should sort åäö asc case insensitive', function () { + list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö' + i1.values({ val: 'A' }) + i2.values({ val: 'å' }) + i3.values({ val: 'Ä' }) + i4.values({ val: 'ö' }) + i5.values({ val: 'O' }) + i6.values({ val: 's' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('A') + expect(list.items[1].values().val).toBe('O') + expect(list.items[2].values().val).toBe('s') + expect(list.items[3].values().val).toBe('å') + expect(list.items[4].values().val).toBe('Ä') + expect(list.items[5].values().val).toBe('ö') + }) + it('should handle case-insensitive by default', function () { + i1.values({ val: 'e' }) + i2.values({ val: 'b' }) + i4.values({ val: 'F' }) + i3.values({ val: 'D' }) + i5.values({ val: 'A' }) + i6.values({ val: 'C' }) + list.sort('val') + expect(list.items[0].values().val).toBe('A') + expect(list.items[1].values().val).toBe('b') + expect(list.items[2].values().val).toBe('C') + expect(list.items[3].values().val).toBe('D') + expect(list.items[4].values().val).toBe('e') + expect(list.items[5].values().val).toBe('F') + }) + it('should disable insensitive', function () { + i1.values({ val: 'e' }) + i2.values({ val: 'b' }) + i4.values({ val: 'F' }) + i3.values({ val: 'D' }) + i5.values({ val: 'A' }) + i6.values({ val: 'C' }) + list.sort('val', { insensitive: false }) + expect(list.items[0].values().val).toBe('A') + expect(list.items[1].values().val).toBe('C') + expect(list.items[2].values().val).toBe('D') + expect(list.items[3].values().val).toBe('F') + expect(list.items[4].values().val).toBe('b') + expect(list.items[5].values().val).toBe('e') + }) + it('should sort dates', function () { + i1.values({ val: '2008-12-10' }) + i2.values({ val: '2008-11-10' }) + i3.values({ val: '2007-11-10' }) + i4.values({ val: '2009-12-10' }) + i5.values({ val: '2007-01-4' }) + i6.values({ val: '2006-12-10' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('2006-12-10') + expect(list.items[1].values().val).toBe('2007-01-4') + expect(list.items[2].values().val).toBe('2007-11-10') + expect(list.items[3].values().val).toBe('2008-11-10') + expect(list.items[4].values().val).toBe('2008-12-10') + expect(list.items[5].values().val).toBe('2009-12-10') + }) + it('should sort file names (a bit wrong)', function () { + i1.values({ val: 'car.mov' }) + i2.values({ val: '01alpha.sgi' }) + i3.values({ val: '001alpha.sgi' }) + i4.values({ val: 'my.string_41299.tif' }) + i5.values({ val: '0003.zip' }) + i6.values({ val: '0002.asp' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('01alpha.sgi') + expect(list.items[1].values().val).toBe('001alpha.sgi') + expect(list.items[2].values().val).toBe('0002.asp') + expect(list.items[3].values().val).toBe('0003.zip') + expect(list.items[4].values().val).toBe('car.mov') + expect(list.items[5].values().val).toBe('my.string_41299.tif') + }) + it('should show order of sorted floates (a bit wrong)', function () { + i1.values({ val: '10.0401' }) + i2.values({ val: '10.022' }) + i3.values({ val: '10.021999' }) + i4.values({ val: '11.231' }) + i5.values({ val: '0003.123' }) + i6.values({ val: '09.2123' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('0003.123') + expect(list.items[1].values().val).toBe('09.2123') + expect(list.items[2].values().val).toBe('10.022') + expect(list.items[3].values().val).toBe('10.0401') + expect(list.items[4].values().val).toBe('10.021999') + expect(list.items[5].values().val).toBe('11.231') + }) + it('should sort IP addresses', function () { + i1.values({ val: '192.168.1.1' }) + i2.values({ val: '192.168.0.100' }) + i3.values({ val: '192.168.0.1' }) + i4.values({ val: '192.168.1.3' }) + i5.values({ val: '127.0.0.1' }) + i6.values({ val: '192.168.1.2' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('127.0.0.1') + expect(list.items[1].values().val).toBe('192.168.0.1') + expect(list.items[2].values().val).toBe('192.168.0.100') + expect(list.items[3].values().val).toBe('192.168.1.1') + expect(list.items[4].values().val).toBe('192.168.1.2') + expect(list.items[5].values().val).toBe('192.168.1.3') + }) + it('should not break with weird values', function () { + i1.values({ val: undefined }) + i2.values({ val: null }) + i3.values({ val: 0 }) + i4.values({ val: function () {} }) + i5.values({ val: { foo: 'bar' } }) - describe('Basics', function() { - it('should sort letters asc', function() { - i1.values({ val: "b" }); - i2.values({ val: "a" }); - i3.values({ val: "c" }); - i4.values({ val: "z" }); - i5.values({ val: "s" }); - i6.values({ val: "y" }); - list.sort('val'); - expect(list.items[0].values().val).toBe("a"); - expect(list.items[1].values().val).toBe("b"); - expect(list.items[2].values().val).toBe("c"); - expect(list.items[3].values().val).toBe("s"); - expect(list.items[4].values().val).toBe("y"); - expect(list.items[5].values().val).toBe("z"); - }); - it('should sort letters desc', function() { - i1.values({ val: "b" }); - i2.values({ val: "a" }); - i3.values({ val: "c" }); - i4.values({ val: "z" }); - i5.values({ val: "s" }); - i6.values({ val: "y" }); - list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).toBe("z"); - expect(list.items[1].values().val).toBe("y"); - expect(list.items[2].values().val).toBe("s"); - expect(list.items[3].values().val).toBe("c"); - expect(list.items[4].values().val).toBe("b"); - expect(list.items[5].values().val).toBe("a"); - }); - it('should sort åäö desc', function() { - list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö'; - i1.values({ val: "a" }); - i2.values({ val: "å" }); - i3.values({ val: "ä" }); - i4.values({ val: "ö" }); - i5.values({ val: "o" }); - i6.values({ val: "s" }); - list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).toBe("ö"); - expect(list.items[1].values().val).toBe("ä"); - expect(list.items[2].values().val).toBe("å"); - expect(list.items[3].values().val).toBe("s"); - expect(list.items[4].values().val).toBe("o"); - expect(list.items[5].values().val).toBe("a"); - }); - it('should sort åäö asc', function() { - list.alphabet = 'ABCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstuvxyzåäö'; - i1.values({ val: "a" }); - i2.values({ val: "å" }); - i3.values({ val: "ä" }); - i4.values({ val: "ö" }); - i5.values({ val: "o" }); - i6.values({ val: "s" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("a"); - expect(list.items[1].values().val).toBe("o"); - expect(list.items[2].values().val).toBe("s"); - expect(list.items[3].values().val).toBe("å"); - expect(list.items[4].values().val).toBe("ä"); - expect(list.items[5].values().val).toBe("ö"); - }); - it('should sort åäö desc case insensitive', function() { - list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö'; - i1.values({ val: "a" }); - i2.values({ val: "Å" }); - i3.values({ val: "ä" }); - i4.values({ val: "Ö" }); - i5.values({ val: "o" }); - i6.values({ val: "S" }); - list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).toBe("Ö"); - expect(list.items[1].values().val).toBe("ä"); - expect(list.items[2].values().val).toBe("Å"); - expect(list.items[3].values().val).toBe("S"); - expect(list.items[4].values().val).toBe("o"); - expect(list.items[5].values().val).toBe("a"); - }); - it('should sort åäö asc case insensitive', function() { - list.alphabet = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvXxYyZzÅåÄäÖö'; - i1.values({ val: "A" }); - i2.values({ val: "å" }); - i3.values({ val: "Ä" }); - i4.values({ val: "ö" }); - i5.values({ val: "O" }); - i6.values({ val: "s" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("A"); - expect(list.items[1].values().val).toBe("O"); - expect(list.items[2].values().val).toBe("s"); - expect(list.items[3].values().val).toBe("å"); - expect(list.items[4].values().val).toBe("Ä"); - expect(list.items[5].values().val).toBe("ö"); - }); - it('should handle case-insensitive by default', function() { - i1.values({ val: "e" }); - i2.values({ val: "b" }); - i4.values({ val: "F" }); - i3.values({ val: "D" }); - i5.values({ val: "A" }); - i6.values({ val: "C" }); - list.sort('val'); - expect(list.items[0].values().val).toBe("A"); - expect(list.items[1].values().val).toBe("b"); - expect(list.items[2].values().val).toBe("C"); - expect(list.items[3].values().val).toBe("D"); - expect(list.items[4].values().val).toBe("e"); - expect(list.items[5].values().val).toBe("F"); - }); - it('should disable insensitive', function() { - i1.values({ val: "e" }); - i2.values({ val: "b" }); - i4.values({ val: "F" }); - i3.values({ val: "D" }); - i5.values({ val: "A" }); - i6.values({ val: "C" }); - list.sort('val', { insensitive: false }); - expect(list.items[0].values().val).toBe("A"); - expect(list.items[1].values().val).toBe("C"); - expect(list.items[2].values().val).toBe("D"); - expect(list.items[3].values().val).toBe("F"); - expect(list.items[4].values().val).toBe("b"); - expect(list.items[5].values().val).toBe("e"); - }); - it('should sort dates', function() { - i1.values({ val: "2008-12-10" }); - i2.values({ val: "2008-11-10" }); - i3.values({ val: "2007-11-10" }); - i4.values({ val: "2009-12-10" }); - i5.values({ val: "2007-01-4" }); - i6.values({ val: "2006-12-10" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("2006-12-10"); - expect(list.items[1].values().val).toBe("2007-01-4"); - expect(list.items[2].values().val).toBe("2007-11-10"); - expect(list.items[3].values().val).toBe("2008-11-10"); - expect(list.items[4].values().val).toBe("2008-12-10"); - expect(list.items[5].values().val).toBe("2009-12-10"); - }); - it('should sort file names (a bit wrong)', function() { - i1.values({ val: "car.mov" }); - i2.values({ val: "01alpha.sgi" }); - i3.values({ val: "001alpha.sgi" }); - i4.values({ val: "my.string_41299.tif" }); - i5.values({ val: "0003.zip" }); - i6.values({ val: "0002.asp" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("01alpha.sgi"); - expect(list.items[1].values().val).toBe("001alpha.sgi"); - expect(list.items[2].values().val).toBe("0002.asp"); - expect(list.items[3].values().val).toBe("0003.zip"); - expect(list.items[4].values().val).toBe("car.mov"); - expect(list.items[5].values().val).toBe("my.string_41299.tif"); - }); - it('should show order of sorted floates (a bit wrong)', function() { - i1.values({ val: "10.0401" }); - i2.values({ val: "10.022" }); - i3.values({ val: "10.021999" }); - i4.values({ val: "11.231" }); - i5.values({ val: "0003.123" }); - i6.values({ val: "09.2123" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("0003.123"); - expect(list.items[1].values().val).toBe("09.2123"); - expect(list.items[2].values().val).toBe("10.022"); - expect(list.items[3].values().val).toBe("10.0401"); - expect(list.items[4].values().val).toBe("10.021999"); - expect(list.items[5].values().val).toBe("11.231"); - }); - it('should sort IP addresses', function() { - i1.values({ val: "192.168.1.1" }); - i2.values({ val: "192.168.0.100" }); - i3.values({ val: "192.168.0.1" }); - i4.values({ val: "192.168.1.3" }); - i5.values({ val: "127.0.0.1" }); - i6.values({ val: "192.168.1.2" }); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe("127.0.0.1"); - expect(list.items[1].values().val).toBe("192.168.0.1"); - expect(list.items[2].values().val).toBe("192.168.0.100"); - expect(list.items[3].values().val).toBe("192.168.1.1"); - expect(list.items[4].values().val).toBe("192.168.1.2"); - expect(list.items[5].values().val).toBe("192.168.1.3"); - }); - it('should not break with weird values', function() { - i1.values({ val: undefined }); - i2.values({ val: null }); - i3.values({ val: 0 }); - i4.values({ val: function() {} }); - i5.values({ val: { foo: "bar" } }); + expect(function () { + list.sort('val') + }).not.toThrow() + }) + it('should handle values from issue 387', function () { + i1.values({ val: 'Test' }) + i2.values({ val: 'Test1Test2' }) + i3.values({ val: 'Bill-To Phone1 Extension' }) + i4.values({ val: 'z' }) + i5.values({ val: 's' }) + i6.values({ val: 'y' }) + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('Bill-To Phone1 Extension') + expect(list.items[1].values().val).toBe('s') + expect(list.items[2].values().val).toBe('Test') + expect(list.items[3].values().val).toBe('Test1Test2') + expect(list.items[4].values().val).toBe('y') + expect(list.items[5].values().val).toBe('z') + }) - expect(function() { - list.sort('val'); - }).not.toThrow(); - }); - it('should handle values from issue 387', function() { - i1.values({ val: 'Test' }); - i2.values({ val: 'Test1Test2' }); - i3.values({ val: 'Bill-To Phone1 Extension' }); - i4.values({ val: "z" }); - i5.values({ val: "s" }); - i6.values({ val: "y" }); - list.sort('val', { order: 'asc' }); - expect(list.items[0].values().val).toBe('Bill-To Phone1 Extension'); - expect(list.items[1].values().val).toBe('s'); - expect(list.items[2].values().val).toBe('Test'); - expect(list.items[3].values().val).toBe('Test1Test2'); - expect(list.items[4].values().val).toBe('y'); - expect(list.items[5].values().val).toBe('z'); - }); - - xit('should show how random values are sorted', function() { - list.add({ id: '7', val: "" }); - list.add({ id: '8', val: "" }); - list.add({ id: '9', val: "" }); - list.add({ id: '10', val: "" }); - list.add({ id: '11', val: "" }); - list.add({ id: '12', val: "" }); + xit('should show how random values are sorted', function () { + list.add({ id: '7', val: '' }) + list.add({ id: '8', val: '' }) + list.add({ id: '9', val: '' }) + list.add({ id: '10', val: '' }) + list.add({ id: '11', val: '' }) + list.add({ id: '12', val: '' }) var i7 = list.get('id', '7')[0], i8 = list.get('id', '8')[0], i9 = list.get('id', '9')[0], i10 = list.get('id', '10')[0], i11 = list.get('id', '11')[0], - i12 = list.get('id', '12')[0]; - - i1.values({ val: undefined }); - i2.values({ val: "" }); - i3.values({ val: null }); - i4.values({ val: "a" }); - i5.values({ val: "0" }); - i6.values({ val: true }); - i7.values({ val: 0 }); - i8.values({ val: "z" }); - i9.values({ val: "!" }); - i10.values({ val: "?" }); - i11.values({ val: 100 }); - i12.values({ val: false }); + i12 = list.get('id', '12')[0] - list.sort('val', { order: "asc" }); - list.sort('val', { order: "desc" }); - list.sort('val', { order: "asc" }); + i1.values({ val: undefined }) + i2.values({ val: '' }) + i3.values({ val: null }) + i4.values({ val: 'a' }) + i5.values({ val: '0' }) + i6.values({ val: true }) + i7.values({ val: 0 }) + i8.values({ val: 'z' }) + i9.values({ val: '!' }) + i10.values({ val: '?' }) + i11.values({ val: 100 }) + i12.values({ val: false }) - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe("!"); - expect(list.items[2].values().val).toBe(0); - expect(list.items[3].values().val).toBe("0"); - expect(list.items[4].values().val).toBe(100); - expect(list.items[5].values().val).toBe("?"); - expect(list.items[6].values().val).toBe("a"); - expect(list.items[7].values().val).toBe(false); - expect(list.items[8].values().val).toBe(null); - expect(list.items[9].values().val).toBe(true); - expect(list.items[10].values().val).toBe(undefined); - expect(list.items[11].values().val).toBe("z"); - }); + list.sort('val', { order: 'asc' }) + list.sort('val', { order: 'desc' }) + list.sort('val', { order: 'asc' }) - it('should handle not longer (since 1.4.0) space and zero the same for desc and asc', function() { - list.clear(); - list.add({ val: "" }); - list.add({ val: "0" }); - list.add({ val: 0 }); + expect(list.items[0].values().val).toBe('') + expect(list.items[1].values().val).toBe('!') + expect(list.items[2].values().val).toBe(0) + expect(list.items[3].values().val).toBe('0') + expect(list.items[4].values().val).toBe(100) + expect(list.items[5].values().val).toBe('?') + expect(list.items[6].values().val).toBe('a') + expect(list.items[7].values().val).toBe(false) + expect(list.items[8].values().val).toBe(null) + expect(list.items[9].values().val).toBe(true) + expect(list.items[10].values().val).toBe(undefined) + expect(list.items[11].values().val).toBe('z') + }) - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe("0"); - expect(list.items[2].values().val).toBe(0); - list.sort('val', { order: "desc" }); - expect(list.items[0].values().val).toBe("0"); - expect(list.items[1].values().val).toBe(0); - expect(list.items[2].values().val).toBe(""); - list.sort('val', { order: "asc" }); - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe("0"); - expect(list.items[2].values().val).toBe(0); - }); + it('should handle not longer (since 1.4.0) space and zero the same for desc and asc', function () { + list.clear() + list.add({ val: '' }) + list.add({ val: '0' }) + list.add({ val: 0 }) - }); + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('') + expect(list.items[1].values().val).toBe('0') + expect(list.items[2].values().val).toBe(0) + list.sort('val', { order: 'desc' }) + expect(list.items[0].values().val).toBe('0') + expect(list.items[1].values().val).toBe(0) + expect(list.items[2].values().val).toBe('') + list.sort('val', { order: 'asc' }) + expect(list.items[0].values().val).toBe('') + expect(list.items[1].values().val).toBe('0') + expect(list.items[2].values().val).toBe(0) + }) + }) - describe('Custom sort function', function() { - it('should use custom sort option', function() { - i1.values({ val: "" }); - i2.values({ val: "" }); - i3.values({ val: "" }); - i4.values({ val: "" }); - i5.values({ val: "" }); - i6.values({ val: "" }); + describe('Custom sort function', function () { + it('should use custom sort option', function () { + i1.values({ val: "" }) + i2.values({ val: "" }) + i3.values({ val: "" }) + i4.values({ val: "" }) + i5.values({ val: "" }) + i6.values({ val: "" }) list.sort('val', { - sortFunction: function(itemA, itemB, options) { - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); - } - }); - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe(""); - expect(list.items[2].values().val).toBe(""); - expect(list.items[3].values().val).toBe(""); - expect(list.items[4].values().val).toBe(""); - expect(list.items[5].values().val).toBe(""); - }); - it('should use default custom sort function', function() { - list.sortFunction = function(itemA, itemB, options) { - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); - }; - i1.values({ val: "" }); - i2.values({ val: "" }); - i3.values({ val: "" }); - i4.values({ val: "" }); - i5.values({ val: "" }); - i6.values({ val: "" }); - list.sort('val'); - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe(""); - expect(list.items[2].values().val).toBe(""); - expect(list.items[3].values().val).toBe(""); - expect(list.items[4].values().val).toBe(""); - expect(list.items[5].values().val).toBe(""); - }); - it('should use default custom sort function with order desc', function() { - list.sortFunction = function(itemA, itemB, options) { - return list.utils.naturalSort($(itemA.values()[options.valueName]).val(), $(itemB.values()[options.valueName]).val()); - }; - i1.values({ val: "" }); - i2.values({ val: "" }); - i3.values({ val: "" }); - i4.values({ val: "" }); - i5.values({ val: "" }); - i6.values({ val: "" }); - list.sort('val', { order: "desc"}); - expect(list.items[0].values().val).toBe(""); - expect(list.items[1].values().val).toBe(""); - expect(list.items[2].values().val).toBe(""); - expect(list.items[3].values().val).toBe(""); - expect(list.items[4].values().val).toBe(""); - expect(list.items[5].values().val).toBe(""); - }); - }); - -}); + sortFunction: function (itemA, itemB, options) { + return list.utils.naturalSort( + $(itemA.values()[options.valueName]).val(), + $(itemB.values()[options.valueName]).val() + ) + }, + }) + expect(list.items[0].values().val).toBe("") + expect(list.items[1].values().val).toBe("") + expect(list.items[2].values().val).toBe("") + expect(list.items[3].values().val).toBe("") + expect(list.items[4].values().val).toBe("") + expect(list.items[5].values().val).toBe("") + }) + it('should use default custom sort function', function () { + list.sortFunction = function (itemA, itemB, options) { + return list.utils.naturalSort( + $(itemA.values()[options.valueName]).val(), + $(itemB.values()[options.valueName]).val() + ) + } + i1.values({ val: "" }) + i2.values({ val: "" }) + i3.values({ val: "" }) + i4.values({ val: "" }) + i5.values({ val: "" }) + i6.values({ val: "" }) + list.sort('val') + expect(list.items[0].values().val).toBe("") + expect(list.items[1].values().val).toBe("") + expect(list.items[2].values().val).toBe("") + expect(list.items[3].values().val).toBe("") + expect(list.items[4].values().val).toBe("") + expect(list.items[5].values().val).toBe("") + }) + it('should use default custom sort function with order desc', function () { + list.sortFunction = function (itemA, itemB, options) { + return list.utils.naturalSort( + $(itemA.values()[options.valueName]).val(), + $(itemB.values()[options.valueName]).val() + ) + } + i1.values({ val: "" }) + i2.values({ val: "" }) + i3.values({ val: "" }) + i4.values({ val: "" }) + i5.values({ val: "" }) + i6.values({ val: "" }) + list.sort('val', { order: 'desc' }) + expect(list.items[0].values().val).toBe("") + expect(list.items[1].values().val).toBe("") + expect(list.items[2].values().val).toBe("") + expect(list.items[3].values().val).toBe("") + expect(list.items[4].values().val).toBe("") + expect(list.items[5].values().val).toBe("") + }) + }) +}) diff --git a/__test__/trigger.test.js b/__test__/trigger.test.js index 4e92a31c..9c0077a7 100644 --- a/__test__/trigger.test.js +++ b/__test__/trigger.test.js @@ -1,23 +1,22 @@ -const fixture = require('./fixtures'); +const fixture = require('./fixtures') -describe('Trigger', function() { +describe('Trigger', function () { + var list - var list; + beforeAll(function () { + list = fixture.list(['name', 'born'], fixture.all) + }) - beforeAll(function() { - list = fixture.list(['name', 'born'], fixture.all); - }); + afterAll(function () { + fixture.removeList() + }) - afterAll(function() { - fixture.removeList(); - }); - - describe('General', function() { - it('should be triggered by searchComplete', function(done) { - list.on('searchComplete', function() { - done(); - }); - list.trigger('searchComplete'); - }); - }); -}); + describe('General', function () { + it('should be triggered by searchComplete', function (done) { + list.on('searchComplete', function () { + done() + }) + list.trigger('searchComplete') + }) + }) +}) diff --git a/__test__/usage/main.js b/__test__/usage/main.js index 63cc377b..5ff9002e 100644 --- a/__test__/usage/main.js +++ b/__test__/usage/main.js @@ -1,6 +1,6 @@ -require(['../../dist/list', '../../dist/list.min'], function(List, ListMin) { +require(['../../dist/list', '../../dist/list.min'], function (List, ListMin) { var options = { - valueNames: [ 'name', 'born' ] - }; - var userList = new List('users', options); -}); + valueNames: ['name', 'born'], + } + var userList = new List('users', options) +}) diff --git a/__test__/usage/require.js b/__test__/usage/require.js index d50f25fe..7360434e 100644 --- a/__test__/usage/require.js +++ b/__test__/usage/require.js @@ -8,2076 +8,2135 @@ /*jslint regexp: true, nomen: true, sloppy: true */ /*global window, navigator, document, importScripts, setTimeout, opera */ -var requirejs, require, define; -(function (global) { - var req, s, head, baseElement, dataMain, src, - interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.17', - commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, - cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, - jsSuffixRegExp = /\.js$/, - currDirRegExp = /^\.\//, - op = Object.prototype, - ostring = op.toString, - hasOwn = op.hasOwnProperty, - ap = Array.prototype, - apsp = ap.splice, - isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), - isWebWorker = !isBrowser && typeof importScripts !== 'undefined', - //PS3 indicates loaded and complete, but need to wait for complete - //specifically. Sequence is 'loading', 'loaded', execution, - // then 'complete'. The UA check is unfortunate, but not sure how - //to feature test w/o causing perf issues. - readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? - /^complete$/ : /^(complete|loaded)$/, - defContextName = '_', - //Oh the tragedy, detecting opera. See the usage of isOpera for reason. - isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', - contexts = {}, - cfg = {}, - globalDefQueue = [], - useInteractive = false; - - function isFunction(it) { - return ostring.call(it) === '[object Function]'; +var requirejs, require, define +;(function (global) { + var req, + s, + head, + baseElement, + dataMain, + src, + interactiveScript, + currentlyAddingScript, + mainScript, + subPath, + version = '2.1.17', + commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm, + cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, + jsSuffixRegExp = /\.js$/, + currDirRegExp = /^\.\//, + op = Object.prototype, + ostring = op.toString, + hasOwn = op.hasOwnProperty, + ap = Array.prototype, + apsp = ap.splice, + isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), + isWebWorker = !isBrowser && typeof importScripts !== 'undefined', + //PS3 indicates loaded and complete, but need to wait for complete + //specifically. Sequence is 'loading', 'loaded', execution, + // then 'complete'. The UA check is unfortunate, but not sure how + //to feature test w/o causing perf issues. + readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? /^complete$/ : /^(complete|loaded)$/, + defContextName = '_', + //Oh the tragedy, detecting opera. See the usage of isOpera for reason. + isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', + contexts = {}, + cfg = {}, + globalDefQueue = [], + useInteractive = false + + function isFunction(it) { + return ostring.call(it) === '[object Function]' + } + + function isArray(it) { + return ostring.call(it) === '[object Array]' + } + + /** + * Helper function for iterating over an array. If the func returns + * a true value, it will break out of the loop. + */ + function each(ary, func) { + if (ary) { + var i + for (i = 0; i < ary.length; i += 1) { + if (ary[i] && func(ary[i], i, ary)) { + break + } + } } - - function isArray(it) { - return ostring.call(it) === '[object Array]'; + } + + /** + * Helper function for iterating over an array backwards. If the func + * returns a true value, it will break out of the loop. + */ + function eachReverse(ary, func) { + if (ary) { + var i + for (i = ary.length - 1; i > -1; i -= 1) { + if (ary[i] && func(ary[i], i, ary)) { + break + } + } } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } + } + + function hasProp(obj, prop) { + return hasOwn.call(obj, prop) + } + + function getOwn(obj, prop) { + return hasProp(obj, prop) && obj[prop] + } + + /** + * Cycles over properties in an object and calls a function for each + * property value. If the function returns a truthy value, then the + * iteration is stopped. + */ + function eachProp(obj, func) { + var prop + for (prop in obj) { + if (hasProp(obj, prop)) { + if (func(obj[prop], prop)) { + break } + } } - - /** - * Helper function for iterating over an array backwards. If the func - * returns a true value, it will break out of the loop. - */ - function eachReverse(ary, func) { - if (ary) { - var i; - for (i = ary.length - 1; i > -1; i -= 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } + } + + /** + * Simple function to mix in properties from source into target, + * but only if target does not already have a property of the same name. + */ + function mixin(target, source, force, deepStringMixin) { + if (source) { + eachProp(source, function (value, prop) { + if (force || !hasProp(target, prop)) { + if ( + deepStringMixin && + typeof value === 'object' && + value && + !isArray(value) && + !isFunction(value) && + !(value instanceof RegExp) + ) { + if (!target[prop]) { + target[prop] = {} } + mixin(target[prop], value, force, deepStringMixin) + } else { + target[prop] = value + } } + }) } - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); + return target + } + + //Similar to Function.prototype.bind, but the 'this' object is specified + //first, since it is easier to read/figure out what 'this' will be. + function bind(obj, fn) { + return function () { + return fn.apply(obj, arguments) } + } + + function scripts() { + return document.getElementsByTagName('script') + } + + function defaultOnError(err) { + throw err + } - function getOwn(obj, prop) { - return hasProp(obj, prop) && obj[prop]; + //Allow getting a global that is expressed in + //dot notation, like 'a.b.c'. + function getGlobal(value) { + if (!value) { + return value } + var g = global + each(value.split('.'), function (part) { + g = g[part] + }) + return g + } + + /** + * Constructs an error with a pointer to an URL with more information. + * @param {String} id the error ID that maps to an ID on a web page. + * @param {String} message human readable error. + * @param {Error} [err] the original error, if there is one. + * + * @returns {Error} + */ + function makeError(id, msg, err, requireModules) { + var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id) + e.requireType = id + e.requireModules = requireModules + if (err) { + e.originalError = err + } + return e + } + + if (typeof define !== 'undefined') { + //If a define is already in play via another AMD loader, + //do not overwrite. + return + } + + if (typeof requirejs !== 'undefined') { + if (isFunction(requirejs)) { + //Do not overwrite an existing requirejs instance. + return + } + cfg = requirejs + requirejs = undefined + } + + //Allow for a require config object + if (typeof require !== 'undefined' && !isFunction(require)) { + //assume it is a config object. + cfg = require + require = undefined + } + + function newContext(contextName) { + var inCheckLoaded, + Module, + context, + handlers, + checkLoadedTimeoutId, + config = { + //Defaults. Do not set a default for map + //config to speed up normalize(), which + //will run faster if there is no default. + waitSeconds: 7, + baseUrl: './', + paths: {}, + bundles: {}, + pkgs: {}, + shim: {}, + config: {}, + }, + registry = {}, + //registry of just enabled modules, to speed + //cycle breaking code when lots of modules + //are registered, but not activated. + enabledRegistry = {}, + undefEvents = {}, + defQueue = [], + defined = {}, + urlFetched = {}, + bundlesMap = {}, + requireCounter = 1, + unnormalizedCounter = 1 /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. + * Trims the . and .. from an array of path segments. + * It will keep a leading path segment if a .. will become + * the first path segment, to help with module name lookups, + * which act like paths, but can be remapped. But the end result, + * all paths that use this function should look normalized. + * NOTE: this method MODIFIES the input array. + * @param {Array} ary the array of path segments. */ - function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } + function trimDots(ary) { + var i, part + for (i = 0; i < ary.length; i++) { + part = ary[i] + if (part === '.') { + ary.splice(i, 1) + i -= 1 + } else if (part === '..') { + // If at the start, or previous value is still .., + // keep them so that when converted to a path it may + // still work when converted to a path, even though + // as an ID it is less than ideal. In larger point + // releases, may be better to just kick out an error. + if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { + continue + } else if (i > 0) { + ary.splice(i - 1, 2) + i -= 2 + } } + } } /** - * Simple function to mix in properties from source into target, - * but only if target does not already have a property of the same name. + * Given a relative module name, like ./something, normalize it to + * a real name that can be mapped to a path. + * @param {String} name the relative name + * @param {String} baseName a real name that the name arg is relative + * to. + * @param {Boolean} applyMap apply the map config to the value. Should + * only be done if this normalization is for a dependency ID. + * @returns {String} normalized name */ - function mixin(target, source, force, deepStringMixin) { - if (source) { - eachProp(source, function (value, prop) { - if (force || !hasProp(target, prop)) { - if (deepStringMixin && typeof value === 'object' && value && - !isArray(value) && !isFunction(value) && - !(value instanceof RegExp)) { - - if (!target[prop]) { - target[prop] = {}; - } - mixin(target[prop], value, force, deepStringMixin); - } else { - target[prop] = value; - } + function normalize(name, baseName, applyMap) { + var pkgMain, + mapValue, + nameParts, + i, + j, + nameSegment, + lastIndex, + foundMap, + foundI, + foundStarMap, + starI, + normalizedBaseParts, + baseParts = baseName && baseName.split('/'), + map = config.map, + starMap = map && map['*'] + + //Adjust any relative paths. + if (name) { + name = name.split('/') + lastIndex = name.length - 1 + + // If wanting node ID compatibility, strip .js from end + // of IDs. Have to do this here, and not in nameToUrl + // because node allows either .js or non .js to map + // to same file. + if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { + name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '') + } + + // Starts with a '.' so need the baseName + if (name[0].charAt(0) === '.' && baseParts) { + //Convert baseName to array, and lop off the last part, + //so that . matches that 'directory' and not name of the baseName's + //module. For instance, baseName of 'one/two/three', maps to + //'one/two/three.js', but we want the directory, 'one/two' for + //this normalization. + normalizedBaseParts = baseParts.slice(0, baseParts.length - 1) + name = normalizedBaseParts.concat(name) + } + + trimDots(name) + name = name.join('/') + } + + //Apply map config if available. + if (applyMap && map && (baseParts || starMap)) { + nameParts = name.split('/') + + outerLoop: for (i = nameParts.length; i > 0; i -= 1) { + nameSegment = nameParts.slice(0, i).join('/') + + if (baseParts) { + //Find the longest baseName segment match in the config. + //So, do joins on the biggest to smallest lengths of baseParts. + for (j = baseParts.length; j > 0; j -= 1) { + mapValue = getOwn(map, baseParts.slice(0, j).join('/')) + + //baseName segment has config, find if it has one for + //this name. + if (mapValue) { + mapValue = getOwn(mapValue, nameSegment) + if (mapValue) { + //Match, update name to the new value. + foundMap = mapValue + foundI = i + break outerLoop } - }); + } + } + } + + //Check for a star map match, but just hold on to it, + //if there is a shorter segment match later in a matching + //config, then favor over this star map. + if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { + foundStarMap = getOwn(starMap, nameSegment) + starI = i + } } - return target; - } - //Similar to Function.prototype.bind, but the 'this' object is specified - //first, since it is easier to read/figure out what 'this' will be. - function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; + if (!foundMap && foundStarMap) { + foundMap = foundStarMap + foundI = starI + } + + if (foundMap) { + nameParts.splice(0, foundI, foundMap) + name = nameParts.join('/') + } + } + + // If the name points to a package's name, use + // the package main instead. + pkgMain = getOwn(config.pkgs, name) + + return pkgMain ? pkgMain : name } - function scripts() { - return document.getElementsByTagName('script'); + function removeScript(name) { + if (isBrowser) { + each(scripts(), function (scriptNode) { + if ( + scriptNode.getAttribute('data-requiremodule') === name && + scriptNode.getAttribute('data-requirecontext') === context.contextName + ) { + scriptNode.parentNode.removeChild(scriptNode) + return true + } + }) + } } - function defaultOnError(err) { - throw err; + function hasPathFallback(id) { + var pathConfig = getOwn(config.paths, id) + if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { + //Pop off the first array value, since it failed, and + //retry + pathConfig.shift() + context.require.undef(id) + + //Custom require that does not do map translation, since + //ID is "absolute", already mapped/resolved. + context.makeRequire(null, { + skipMap: true, + })([id]) + + return true + } } - //Allow getting a global that is expressed in - //dot notation, like 'a.b.c'. - function getGlobal(value) { - if (!value) { - return value; - } - var g = global; - each(value.split('.'), function (part) { - g = g[part]; - }); - return g; + //Turns a plugin!resource to [plugin, resource] + //with the plugin being undefined if the name + //did not have a plugin prefix. + function splitPrefix(name) { + var prefix, + index = name ? name.indexOf('!') : -1 + if (index > -1) { + prefix = name.substring(0, index) + name = name.substring(index + 1, name.length) + } + return [prefix, name] } /** - * Constructs an error with a pointer to an URL with more information. - * @param {String} id the error ID that maps to an ID on a web page. - * @param {String} message human readable error. - * @param {Error} [err] the original error, if there is one. + * Creates a module mapping that includes plugin prefix, module + * name, and path. If parentModuleMap is provided it will + * also normalize the name via require.normalize() + * + * @param {String} name the module name + * @param {String} [parentModuleMap] parent module map + * for the module name, used to resolve relative names. + * @param {Boolean} isNormalized: is the ID already normalized. + * This is true if this call is done for a define() module ID. + * @param {Boolean} applyMap: apply the map config to the ID. + * Should only be true if this map is for a dependency. * - * @returns {Error} + * @returns {Object} */ - function makeError(id, msg, err, requireModules) { - var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); - e.requireType = id; - e.requireModules = requireModules; - if (err) { - e.originalError = err; + function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { + var url, + pluginModule, + suffix, + nameParts, + prefix = null, + parentName = parentModuleMap ? parentModuleMap.name : null, + originalName = name, + isDefine = true, + normalizedName = '' + + //If no name, then it means it is a require call, generate an + //internal name. + if (!name) { + isDefine = false + name = '_@r' + (requireCounter += 1) + } + + nameParts = splitPrefix(name) + prefix = nameParts[0] + name = nameParts[1] + + if (prefix) { + prefix = normalize(prefix, parentName, applyMap) + pluginModule = getOwn(defined, prefix) + } + + //Account for relative paths if there is a base name. + if (name) { + if (prefix) { + if (pluginModule && pluginModule.normalize) { + //Plugin is loaded, use its normalize method. + normalizedName = pluginModule.normalize(name, function (name) { + return normalize(name, parentName, applyMap) + }) + } else { + // If nested plugin references, then do not try to + // normalize, as it will not normalize correctly. This + // places a restriction on resourceIds, and the longer + // term solution is not to normalize until plugins are + // loaded and all normalizations to allow for async + // loading of a loader plugin. But for now, fixes the + // common uses. Details in #1131 + normalizedName = name.indexOf('!') === -1 ? normalize(name, parentName, applyMap) : name + } + } else { + //A regular module. + normalizedName = normalize(name, parentName, applyMap) + + //Normalized name may be a plugin ID due to map config + //application in normalize. The map config values must + //already be normalized, so do not need to redo that part. + nameParts = splitPrefix(normalizedName) + prefix = nameParts[0] + normalizedName = nameParts[1] + isNormalized = true + + url = context.nameToUrl(normalizedName) } - return e; + } + + //If the id is a plugin id that cannot be determined if it needs + //normalization, stamp it with a unique ID so two matching relative + //ids that may conflict can be separate. + suffix = prefix && !pluginModule && !isNormalized ? '_unnormalized' + (unnormalizedCounter += 1) : '' + + return { + prefix: prefix, + name: normalizedName, + parentMap: parentModuleMap, + unnormalized: !!suffix, + url: url, + originalName: originalName, + isDefine: isDefine, + id: (prefix ? prefix + '!' + normalizedName : normalizedName) + suffix, + } } - if (typeof define !== 'undefined') { - //If a define is already in play via another AMD loader, - //do not overwrite. - return; - } + function getModule(depMap) { + var id = depMap.id, + mod = getOwn(registry, id) - if (typeof requirejs !== 'undefined') { - if (isFunction(requirejs)) { - //Do not overwrite an existing requirejs instance. - return; - } - cfg = requirejs; - requirejs = undefined; - } + if (!mod) { + mod = registry[id] = new context.Module(depMap) + } - //Allow for a require config object - if (typeof require !== 'undefined' && !isFunction(require)) { - //assume it is a config object. - cfg = require; - require = undefined; + return mod } - function newContext(contextName) { - var inCheckLoaded, Module, context, handlers, - checkLoadedTimeoutId, - config = { - //Defaults. Do not set a default for map - //config to speed up normalize(), which - //will run faster if there is no default. - waitSeconds: 7, - baseUrl: './', - paths: {}, - bundles: {}, - pkgs: {}, - shim: {}, - config: {} - }, - registry = {}, - //registry of just enabled modules, to speed - //cycle breaking code when lots of modules - //are registered, but not activated. - enabledRegistry = {}, - undefEvents = {}, - defQueue = [], - defined = {}, - urlFetched = {}, - bundlesMap = {}, - requireCounter = 1, - unnormalizedCounter = 1; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; i < ary.length; i++) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - // If at the start, or previous value is still .., - // keep them so that when converted to a path it may - // still work when converted to a path, even though - // as an ID it is less than ideal. In larger point - // releases, may be better to just kick out an error. - if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') { - continue; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - /** - * Given a relative module name, like ./something, normalize it to - * a real name that can be mapped to a path. - * @param {String} name the relative name - * @param {String} baseName a real name that the name arg is relative - * to. - * @param {Boolean} applyMap apply the map config to the value. Should - * only be done if this normalization is for a dependency ID. - * @returns {String} normalized name - */ - function normalize(name, baseName, applyMap) { - var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex, - foundMap, foundI, foundStarMap, starI, normalizedBaseParts, - baseParts = (baseName && baseName.split('/')), - map = config.map, - starMap = map && map['*']; - - //Adjust any relative paths. - if (name) { - name = name.split('/'); - lastIndex = name.length - 1; - - // If wanting node ID compatibility, strip .js from end - // of IDs. Have to do this here, and not in nameToUrl - // because node allows either .js or non .js to map - // to same file. - if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) { - name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, ''); - } - - // Starts with a '.' so need the baseName - if (name[0].charAt(0) === '.' && baseParts) { - //Convert baseName to array, and lop off the last part, - //so that . matches that 'directory' and not name of the baseName's - //module. For instance, baseName of 'one/two/three', maps to - //'one/two/three.js', but we want the directory, 'one/two' for - //this normalization. - normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); - name = normalizedBaseParts.concat(name); - } - - trimDots(name); - name = name.join('/'); - } - - //Apply map config if available. - if (applyMap && map && (baseParts || starMap)) { - nameParts = name.split('/'); - - outerLoop: for (i = nameParts.length; i > 0; i -= 1) { - nameSegment = nameParts.slice(0, i).join('/'); - - if (baseParts) { - //Find the longest baseName segment match in the config. - //So, do joins on the biggest to smallest lengths of baseParts. - for (j = baseParts.length; j > 0; j -= 1) { - mapValue = getOwn(map, baseParts.slice(0, j).join('/')); - - //baseName segment has config, find if it has one for - //this name. - if (mapValue) { - mapValue = getOwn(mapValue, nameSegment); - if (mapValue) { - //Match, update name to the new value. - foundMap = mapValue; - foundI = i; - break outerLoop; - } - } - } - } - - //Check for a star map match, but just hold on to it, - //if there is a shorter segment match later in a matching - //config, then favor over this star map. - if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { - foundStarMap = getOwn(starMap, nameSegment); - starI = i; - } - } - - if (!foundMap && foundStarMap) { - foundMap = foundStarMap; - foundI = starI; - } - - if (foundMap) { - nameParts.splice(0, foundI, foundMap); - name = nameParts.join('/'); - } - } - - // If the name points to a package's name, use - // the package main instead. - pkgMain = getOwn(config.pkgs, name); + function on(depMap, name, fn) { + var id = depMap.id, + mod = getOwn(registry, id) - return pkgMain ? pkgMain : name; + if (hasProp(defined, id) && (!mod || mod.defineEmitComplete)) { + if (name === 'defined') { + fn(defined[id]) } - - function removeScript(name) { - if (isBrowser) { - each(scripts(), function (scriptNode) { - if (scriptNode.getAttribute('data-requiremodule') === name && - scriptNode.getAttribute('data-requirecontext') === context.contextName) { - scriptNode.parentNode.removeChild(scriptNode); - return true; - } - }); - } + } else { + mod = getModule(depMap) + if (mod.error && name === 'error') { + fn(mod.error) + } else { + mod.on(name, fn) } + } + } - function hasPathFallback(id) { - var pathConfig = getOwn(config.paths, id); - if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { - //Pop off the first array value, since it failed, and - //retry - pathConfig.shift(); - context.require.undef(id); - - //Custom require that does not do map translation, since - //ID is "absolute", already mapped/resolved. - context.makeRequire(null, { - skipMap: true - })([id]); - - return true; + function onError(err, errback) { + var ids = err.requireModules, + notified = false + + if (errback) { + errback(err) + } else { + each(ids, function (id) { + var mod = getOwn(registry, id) + if (mod) { + //Set error on module, so it skips timeout checks. + mod.error = err + if (mod.events.error) { + notified = true + mod.emit('error', err) } - } + } + }) - //Turns a plugin!resource to [plugin, resource] - //with the plugin being undefined if the name - //did not have a plugin prefix. - function splitPrefix(name) { - var prefix, - index = name ? name.indexOf('!') : -1; - if (index > -1) { - prefix = name.substring(0, index); - name = name.substring(index + 1, name.length); - } - return [prefix, name]; + if (!notified) { + req.onError(err) } + } + } - /** - * Creates a module mapping that includes plugin prefix, module - * name, and path. If parentModuleMap is provided it will - * also normalize the name via require.normalize() - * - * @param {String} name the module name - * @param {String} [parentModuleMap] parent module map - * for the module name, used to resolve relative names. - * @param {Boolean} isNormalized: is the ID already normalized. - * This is true if this call is done for a define() module ID. - * @param {Boolean} applyMap: apply the map config to the ID. - * Should only be true if this map is for a dependency. - * - * @returns {Object} - */ - function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { - var url, pluginModule, suffix, nameParts, - prefix = null, - parentName = parentModuleMap ? parentModuleMap.name : null, - originalName = name, - isDefine = true, - normalizedName = ''; - - //If no name, then it means it is a require call, generate an - //internal name. - if (!name) { - isDefine = false; - name = '_@r' + (requireCounter += 1); - } - - nameParts = splitPrefix(name); - prefix = nameParts[0]; - name = nameParts[1]; - - if (prefix) { - prefix = normalize(prefix, parentName, applyMap); - pluginModule = getOwn(defined, prefix); - } - - //Account for relative paths if there is a base name. - if (name) { - if (prefix) { - if (pluginModule && pluginModule.normalize) { - //Plugin is loaded, use its normalize method. - normalizedName = pluginModule.normalize(name, function (name) { - return normalize(name, parentName, applyMap); - }); - } else { - // If nested plugin references, then do not try to - // normalize, as it will not normalize correctly. This - // places a restriction on resourceIds, and the longer - // term solution is not to normalize until plugins are - // loaded and all normalizations to allow for async - // loading of a loader plugin. But for now, fixes the - // common uses. Details in #1131 - normalizedName = name.indexOf('!') === -1 ? - normalize(name, parentName, applyMap) : - name; - } - } else { - //A regular module. - normalizedName = normalize(name, parentName, applyMap); - - //Normalized name may be a plugin ID due to map config - //application in normalize. The map config values must - //already be normalized, so do not need to redo that part. - nameParts = splitPrefix(normalizedName); - prefix = nameParts[0]; - normalizedName = nameParts[1]; - isNormalized = true; - - url = context.nameToUrl(normalizedName); - } - } + /** + * Internal method to transfer globalQueue items to this context's + * defQueue. + */ + function takeGlobalQueue() { + //Push all the globalDefQueue items into the context's defQueue + if (globalDefQueue.length) { + //Array splice in the values since the context code has a + //local var ref to defQueue, so cannot just reassign the one + //on context. + apsp.apply(defQueue, [defQueue.length, 0].concat(globalDefQueue)) + globalDefQueue = [] + } + } - //If the id is a plugin id that cannot be determined if it needs - //normalization, stamp it with a unique ID so two matching relative - //ids that may conflict can be separate. - suffix = prefix && !pluginModule && !isNormalized ? - '_unnormalized' + (unnormalizedCounter += 1) : - ''; - - return { - prefix: prefix, - name: normalizedName, - parentMap: parentModuleMap, - unnormalized: !!suffix, - url: url, - originalName: originalName, - isDefine: isDefine, - id: (prefix ? - prefix + '!' + normalizedName : - normalizedName) + suffix - }; + handlers = { + require: function (mod) { + if (mod.require) { + return mod.require + } else { + return (mod.require = context.makeRequire(mod.map)) } - - function getModule(depMap) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (!mod) { - mod = registry[id] = new context.Module(depMap); - } - - return mod; + }, + exports: function (mod) { + mod.usingExports = true + if (mod.map.isDefine) { + if (mod.exports) { + return (defined[mod.map.id] = mod.exports) + } else { + return (mod.exports = defined[mod.map.id] = {}) + } } - - function on(depMap, name, fn) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (hasProp(defined, id) && - (!mod || mod.defineEmitComplete)) { - if (name === 'defined') { - fn(defined[id]); - } - } else { - mod = getModule(depMap); - if (mod.error && name === 'error') { - fn(mod.error); - } else { - mod.on(name, fn); - } - } + }, + module: function (mod) { + if (mod.module) { + return mod.module + } else { + return (mod.module = { + id: mod.map.id, + uri: mod.map.url, + config: function () { + return getOwn(config.config, mod.map.id) || {} + }, + exports: mod.exports || (mod.exports = {}), + }) } + }, + } - function onError(err, errback) { - var ids = err.requireModules, - notified = false; + function cleanRegistry(id) { + //Clean up machinery used for waiting modules. + delete registry[id] + delete enabledRegistry[id] + } - if (errback) { - errback(err); + function breakCycle(mod, traced, processed) { + var id = mod.map.id + + if (mod.error) { + mod.emit('error', mod.error) + } else { + traced[id] = true + each(mod.depMaps, function (depMap, i) { + var depId = depMap.id, + dep = getOwn(registry, depId) + + //Only force things that have not completed + //being defined, so still in the registry, + //and only if it has not been matched up + //in the module already. + if (dep && !mod.depMatched[i] && !processed[depId]) { + if (getOwn(traced, depId)) { + mod.defineDep(i, defined[depId]) + mod.check() //pass false? } else { - each(ids, function (id) { - var mod = getOwn(registry, id); - if (mod) { - //Set error on module, so it skips timeout checks. - mod.error = err; - if (mod.events.error) { - notified = true; - mod.emit('error', err); - } - } - }); - - if (!notified) { - req.onError(err); - } + breakCycle(dep, traced, processed) } - } + } + }) + processed[id] = true + } + } - /** - * Internal method to transfer globalQueue items to this context's - * defQueue. - */ - function takeGlobalQueue() { - //Push all the globalDefQueue items into the context's defQueue - if (globalDefQueue.length) { - //Array splice in the values since the context code has a - //local var ref to defQueue, so cannot just reassign the one - //on context. - apsp.apply(defQueue, - [defQueue.length, 0].concat(globalDefQueue)); - globalDefQueue = []; - } + function checkLoaded() { + var err, + usingPathFallback, + waitInterval = config.waitSeconds * 1000, + //It is possible to disable the wait interval by using waitSeconds of 0. + expired = waitInterval && context.startTime + waitInterval < new Date().getTime(), + noLoads = [], + reqCalls = [], + stillLoading = false, + needCycleCheck = true + + //Do not bother if this call was a result of a cycle break. + if (inCheckLoaded) { + return + } + + inCheckLoaded = true + + //Figure out the state of all the modules. + eachProp(enabledRegistry, function (mod) { + var map = mod.map, + modId = map.id + + //Skip things that are not enabled or in error state. + if (!mod.enabled) { + return } - handlers = { - 'require': function (mod) { - if (mod.require) { - return mod.require; - } else { - return (mod.require = context.makeRequire(mod.map)); - } - }, - 'exports': function (mod) { - mod.usingExports = true; - if (mod.map.isDefine) { - if (mod.exports) { - return (defined[mod.map.id] = mod.exports); - } else { - return (mod.exports = defined[mod.map.id] = {}); - } - } - }, - 'module': function (mod) { - if (mod.module) { - return mod.module; - } else { - return (mod.module = { - id: mod.map.id, - uri: mod.map.url, - config: function () { - return getOwn(config.config, mod.map.id) || {}; - }, - exports: mod.exports || (mod.exports = {}) - }); - } - } - }; - - function cleanRegistry(id) { - //Clean up machinery used for waiting modules. - delete registry[id]; - delete enabledRegistry[id]; + if (!map.isDefine) { + reqCalls.push(mod) } - function breakCycle(mod, traced, processed) { - var id = mod.map.id; - - if (mod.error) { - mod.emit('error', mod.error); + if (!mod.error) { + //If the module should be executed, and it has not + //been inited and time is up, remember it. + if (!mod.inited && expired) { + if (hasPathFallback(modId)) { + usingPathFallback = true + stillLoading = true } else { - traced[id] = true; - each(mod.depMaps, function (depMap, i) { - var depId = depMap.id, - dep = getOwn(registry, depId); - - //Only force things that have not completed - //being defined, so still in the registry, - //and only if it has not been matched up - //in the module already. - if (dep && !mod.depMatched[i] && !processed[depId]) { - if (getOwn(traced, depId)) { - mod.defineDep(i, defined[depId]); - mod.check(); //pass false? - } else { - breakCycle(dep, traced, processed); - } - } - }); - processed[id] = true; - } - } - - function checkLoaded() { - var err, usingPathFallback, - waitInterval = config.waitSeconds * 1000, - //It is possible to disable the wait interval by using waitSeconds of 0. - expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), - noLoads = [], - reqCalls = [], - stillLoading = false, - needCycleCheck = true; - - //Do not bother if this call was a result of a cycle break. - if (inCheckLoaded) { - return; - } - - inCheckLoaded = true; - - //Figure out the state of all the modules. - eachProp(enabledRegistry, function (mod) { - var map = mod.map, - modId = map.id; - - //Skip things that are not enabled or in error state. - if (!mod.enabled) { - return; - } - - if (!map.isDefine) { - reqCalls.push(mod); - } - - if (!mod.error) { - //If the module should be executed, and it has not - //been inited and time is up, remember it. - if (!mod.inited && expired) { - if (hasPathFallback(modId)) { - usingPathFallback = true; - stillLoading = true; - } else { - noLoads.push(modId); - removeScript(modId); - } - } else if (!mod.inited && mod.fetched && map.isDefine) { - stillLoading = true; - if (!map.prefix) { - //No reason to keep looking for unfinished - //loading. If the only stillLoading is a - //plugin resource though, keep going, - //because it may be that a plugin resource - //is waiting on a non-plugin cycle. - return (needCycleCheck = false); - } - } - } - }); - - if (expired && noLoads.length) { - //If wait time expired, throw error of unloaded modules. - err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); - err.contextName = context.contextName; - return onError(err); - } - - //Not expired, check for a cycle. - if (needCycleCheck) { - each(reqCalls, function (mod) { - breakCycle(mod, {}, {}); - }); + noLoads.push(modId) + removeScript(modId) } - - //If still waiting on loads, and the waiting load is something - //other than a plugin resource, or there are still outstanding - //scripts, then just try back later. - if ((!expired || usingPathFallback) && stillLoading) { - //Something is still waiting to load. Wait for it, but only - //if a timeout is not already in effect. - if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { - checkLoadedTimeoutId = setTimeout(function () { - checkLoadedTimeoutId = 0; - checkLoaded(); - }, 50); - } + } else if (!mod.inited && mod.fetched && map.isDefine) { + stillLoading = true + if (!map.prefix) { + //No reason to keep looking for unfinished + //loading. If the only stillLoading is a + //plugin resource though, keep going, + //because it may be that a plugin resource + //is waiting on a non-plugin cycle. + return (needCycleCheck = false) } - - inCheckLoaded = false; + } + } + }) + + if (expired && noLoads.length) { + //If wait time expired, throw error of unloaded modules. + err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads) + err.contextName = context.contextName + return onError(err) + } + + //Not expired, check for a cycle. + if (needCycleCheck) { + each(reqCalls, function (mod) { + breakCycle(mod, {}, {}) + }) + } + + //If still waiting on loads, and the waiting load is something + //other than a plugin resource, or there are still outstanding + //scripts, then just try back later. + if ((!expired || usingPathFallback) && stillLoading) { + //Something is still waiting to load. Wait for it, but only + //if a timeout is not already in effect. + if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { + checkLoadedTimeoutId = setTimeout(function () { + checkLoadedTimeoutId = 0 + checkLoaded() + }, 50) } + } - Module = function (map) { - this.events = getOwn(undefEvents, map.id) || {}; - this.map = map; - this.shim = getOwn(config.shim, map.id); - this.depExports = []; - this.depMaps = []; - this.depMatched = []; - this.pluginMaps = {}; - this.depCount = 0; - - /* this.exports this.factory + inCheckLoaded = false + } + + Module = function (map) { + this.events = getOwn(undefEvents, map.id) || {} + this.map = map + this.shim = getOwn(config.shim, map.id) + this.depExports = [] + this.depMaps = [] + this.depMatched = [] + this.pluginMaps = {} + this.depCount = 0 + + /* this.exports this.factory this.depMaps = [], this.enabled, this.fetched */ - }; - - Module.prototype = { - init: function (depMaps, factory, errback, options) { - options = options || {}; + } - //Do not do more inits if already done. Can happen if there - //are multiple define calls for the same module. That is not - //a normal, common case, but it is also not unexpected. - if (this.inited) { - return; - } + Module.prototype = { + init: function (depMaps, factory, errback, options) { + options = options || {} - this.factory = factory; - - if (errback) { - //Register for errors on this module. - this.on('error', errback); - } else if (this.events.error) { - //If no errback already, but there are error listeners - //on this module, set up an errback to pass to the deps. - errback = bind(this, function (err) { - this.emit('error', err); - }); - } + //Do not do more inits if already done. Can happen if there + //are multiple define calls for the same module. That is not + //a normal, common case, but it is also not unexpected. + if (this.inited) { + return + } - //Do a copy of the dependency array, so that - //source inputs are not modified. For example - //"shim" deps are passed in here directly, and - //doing a direct modification of the depMaps array - //would affect that config. - this.depMaps = depMaps && depMaps.slice(0); - - this.errback = errback; - - //Indicate this module has be initialized - this.inited = true; - - this.ignore = options.ignore; - - //Could have option to init this module in enabled mode, - //or could have been previously marked as enabled. However, - //the dependencies are not known until init is called. So - //if enabled previously, now trigger dependencies as enabled. - if (options.enabled || this.enabled) { - //Enable this module and dependencies. - //Will call this.check() - this.enable(); - } else { - this.check(); - } - }, + this.factory = factory + + if (errback) { + //Register for errors on this module. + this.on('error', errback) + } else if (this.events.error) { + //If no errback already, but there are error listeners + //on this module, set up an errback to pass to the deps. + errback = bind(this, function (err) { + this.emit('error', err) + }) + } - defineDep: function (i, depExports) { - //Because of cycles, defined callback for a given - //export can be called more than once. - if (!this.depMatched[i]) { - this.depMatched[i] = true; - this.depCount -= 1; - this.depExports[i] = depExports; - } - }, + //Do a copy of the dependency array, so that + //source inputs are not modified. For example + //"shim" deps are passed in here directly, and + //doing a direct modification of the depMaps array + //would affect that config. + this.depMaps = depMaps && depMaps.slice(0) + + this.errback = errback + + //Indicate this module has be initialized + this.inited = true + + this.ignore = options.ignore + + //Could have option to init this module in enabled mode, + //or could have been previously marked as enabled. However, + //the dependencies are not known until init is called. So + //if enabled previously, now trigger dependencies as enabled. + if (options.enabled || this.enabled) { + //Enable this module and dependencies. + //Will call this.check() + this.enable() + } else { + this.check() + } + }, + + defineDep: function (i, depExports) { + //Because of cycles, defined callback for a given + //export can be called more than once. + if (!this.depMatched[i]) { + this.depMatched[i] = true + this.depCount -= 1 + this.depExports[i] = depExports + } + }, - fetch: function () { - if (this.fetched) { - return; - } - this.fetched = true; - - context.startTime = (new Date()).getTime(); - - var map = this.map; - - //If the manager is for a plugin managed resource, - //ask the plugin to load it now. - if (this.shim) { - context.makeRequire(this.map, { - enableBuildCallback: true - })(this.shim.deps || [], bind(this, function () { - return map.prefix ? this.callPlugin() : this.load(); - })); - } else { - //Regular dependency. - return map.prefix ? this.callPlugin() : this.load(); - } - }, + fetch: function () { + if (this.fetched) { + return + } + this.fetched = true + + context.startTime = new Date().getTime() + + var map = this.map + + //If the manager is for a plugin managed resource, + //ask the plugin to load it now. + if (this.shim) { + context.makeRequire(this.map, { + enableBuildCallback: true, + })( + this.shim.deps || [], + bind(this, function () { + return map.prefix ? this.callPlugin() : this.load() + }) + ) + } else { + //Regular dependency. + return map.prefix ? this.callPlugin() : this.load() + } + }, - load: function () { - var url = this.map.url; + load: function () { + var url = this.map.url - //Regular dependency. - if (!urlFetched[url]) { - urlFetched[url] = true; - context.load(this.map.id, url); - } - }, + //Regular dependency. + if (!urlFetched[url]) { + urlFetched[url] = true + context.load(this.map.id, url) + } + }, + + /** + * Checks if the module is ready to define itself, and if so, + * define it. + */ + check: function () { + if (!this.enabled || this.enabling) { + return + } - /** - * Checks if the module is ready to define itself, and if so, - * define it. - */ - check: function () { - if (!this.enabled || this.enabling) { - return; + var err, + cjsModule, + id = this.map.id, + depExports = this.depExports, + exports = this.exports, + factory = this.factory + + if (!this.inited) { + this.fetch() + } else if (this.error) { + this.emit('error', this.error) + } else if (!this.defining) { + //The factory could trigger another require call + //that would result in checking this module to + //define itself again. If already in the process + //of doing that, skip this work. + this.defining = true + + if (this.depCount < 1 && !this.defined) { + if (isFunction(factory)) { + //If there is an error listener, favor passing + //to that instead of throwing an error. However, + //only do it for define()'d modules. require + //errbacks should not be called for failures in + //their callbacks (#699). However if a global + //onError is set, use that. + if ((this.events.error && this.map.isDefine) || req.onError !== defaultOnError) { + try { + exports = context.execCb(id, factory, depExports, exports) + } catch (e) { + err = e } - - var err, cjsModule, - id = this.map.id, - depExports = this.depExports, - exports = this.exports, - factory = this.factory; - - if (!this.inited) { - this.fetch(); - } else if (this.error) { - this.emit('error', this.error); - } else if (!this.defining) { - //The factory could trigger another require call - //that would result in checking this module to - //define itself again. If already in the process - //of doing that, skip this work. - this.defining = true; - - if (this.depCount < 1 && !this.defined) { - if (isFunction(factory)) { - //If there is an error listener, favor passing - //to that instead of throwing an error. However, - //only do it for define()'d modules. require - //errbacks should not be called for failures in - //their callbacks (#699). However if a global - //onError is set, use that. - if ((this.events.error && this.map.isDefine) || - req.onError !== defaultOnError) { - try { - exports = context.execCb(id, factory, depExports, exports); - } catch (e) { - err = e; - } - } else { - exports = context.execCb(id, factory, depExports, exports); - } - - // Favor return value over exports. If node/cjs in play, - // then will not have a return value anyway. Favor - // module.exports assignment over exports object. - if (this.map.isDefine && exports === undefined) { - cjsModule = this.module; - if (cjsModule) { - exports = cjsModule.exports; - } else if (this.usingExports) { - //exports already set the defined value. - exports = this.exports; - } - } - - if (err) { - err.requireMap = this.map; - err.requireModules = this.map.isDefine ? [this.map.id] : null; - err.requireType = this.map.isDefine ? 'define' : 'require'; - return onError((this.error = err)); - } - - } else { - //Just a literal value - exports = factory; - } - - this.exports = exports; - - if (this.map.isDefine && !this.ignore) { - defined[id] = exports; - - if (req.onResourceLoad) { - req.onResourceLoad(context, this.map, this.depMaps); - } - } - - //Clean up - cleanRegistry(id); - - this.defined = true; - } - - //Finished the define stage. Allow calling check again - //to allow define notifications below in the case of a - //cycle. - this.defining = false; - - if (this.defined && !this.defineEmitted) { - this.defineEmitted = true; - this.emit('defined', this.exports); - this.defineEmitComplete = true; - } - + } else { + exports = context.execCb(id, factory, depExports, exports) + } + + // Favor return value over exports. If node/cjs in play, + // then will not have a return value anyway. Favor + // module.exports assignment over exports object. + if (this.map.isDefine && exports === undefined) { + cjsModule = this.module + if (cjsModule) { + exports = cjsModule.exports + } else if (this.usingExports) { + //exports already set the defined value. + exports = this.exports } - }, + } + + if (err) { + err.requireMap = this.map + err.requireModules = this.map.isDefine ? [this.map.id] : null + err.requireType = this.map.isDefine ? 'define' : 'require' + return onError((this.error = err)) + } + } else { + //Just a literal value + exports = factory + } - callPlugin: function () { - var map = this.map, - id = map.id, - //Map already normalized the prefix. - pluginMap = makeModuleMap(map.prefix); + this.exports = exports - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(pluginMap); - - on(pluginMap, 'defined', bind(this, function (plugin) { - var load, normalizedMap, normalizedMod, - bundleId = getOwn(bundlesMap, this.map.id), - name = this.map.name, - parentName = this.map.parentMap ? this.map.parentMap.name : null, - localRequire = context.makeRequire(map.parentMap, { - enableBuildCallback: true - }); - - //If current map is not normalized, wait for that - //normalized name to load instead of continuing. - if (this.map.unnormalized) { - //Normalize the ID if the plugin allows it. - if (plugin.normalize) { - name = plugin.normalize(name, function (name) { - return normalize(name, parentName, true); - }) || ''; - } - - //prefix and name should already be normalized, no need - //for applying map config again either. - normalizedMap = makeModuleMap(map.prefix + '!' + name, - this.map.parentMap); - on(normalizedMap, - 'defined', bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true, - ignore: true - }); - })); - - normalizedMod = getOwn(registry, normalizedMap.id); - if (normalizedMod) { - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(normalizedMap); - - if (this.events.error) { - normalizedMod.on('error', bind(this, function (err) { - this.emit('error', err); - })); - } - normalizedMod.enable(); - } - - return; - } + if (this.map.isDefine && !this.ignore) { + defined[id] = exports - //If a paths config, then just load that file instead to - //resolve the plugin, as it is built into that paths layer. - if (bundleId) { - this.map.url = context.nameToUrl(bundleId); - this.load(); - return; - } + if (req.onResourceLoad) { + req.onResourceLoad(context, this.map, this.depMaps) + } + } - load = bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true - }); - }); - - load.error = bind(this, function (err) { - this.inited = true; - this.error = err; - err.requireModules = [id]; - - //Remove temp unnormalized modules for this module, - //since they will never be resolved otherwise now. - eachProp(registry, function (mod) { - if (mod.map.id.indexOf(id + '_unnormalized') === 0) { - cleanRegistry(mod.map.id); - } - }); - - onError(err); - }); - - //Allow plugins to load other code without having to know the - //context or how to 'complete' the load. - load.fromText = bind(this, function (text, textAlt) { - /*jslint evil: true */ - var moduleName = map.name, - moduleMap = makeModuleMap(moduleName), - hasInteractive = useInteractive; - - //As of 2.1.0, support just passing the text, to reinforce - //fromText only being called once per resource. Still - //support old style of passing moduleName but discard - //that moduleName in favor of the internal ref. - if (textAlt) { - text = textAlt; - } - - //Turn off interactive script matching for IE for any define - //calls in the text, then turn it back on at the end. - if (hasInteractive) { - useInteractive = false; - } - - //Prime the system by creating a module instance for - //it. - getModule(moduleMap); - - //Transfer any config to this other module. - if (hasProp(config.config, id)) { - config.config[moduleName] = config.config[id]; - } - - try { - req.exec(text); - } catch (e) { - return onError(makeError('fromtexteval', - 'fromText eval for ' + id + - ' failed: ' + e, - e, - [id])); - } - - if (hasInteractive) { - useInteractive = true; - } - - //Mark this as a dependency for the plugin - //resource - this.depMaps.push(moduleMap); - - //Support anonymous modules. - context.completeLoad(moduleName); - - //Bind the value of that module to the value for this - //resource ID. - localRequire([moduleName], load); - }); - - //Use parentName here since the plugin's name is not reliable, - //could be some weird string with no path that actually wants to - //reference the parentName's path. - plugin.load(map.name, localRequire, load, config); - })); - - context.enable(pluginMap, this); - this.pluginMaps[pluginMap.id] = pluginMap; - }, + //Clean up + cleanRegistry(id) - enable: function () { - enabledRegistry[this.map.id] = this; - this.enabled = true; - - //Set flag mentioning that the module is enabling, - //so that immediate calls to the defined callbacks - //for dependencies do not trigger inadvertent load - //with the depCount still being zero. - this.enabling = true; - - //Enable each dependency - each(this.depMaps, bind(this, function (depMap, i) { - var id, mod, handler; - - if (typeof depMap === 'string') { - //Dependency needs to be converted to a depMap - //and wired up to this module. - depMap = makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap), - false, - !this.skipMap); - this.depMaps[i] = depMap; - - handler = getOwn(handlers, depMap.id); - - if (handler) { - this.depExports[i] = handler(this); - return; - } - - this.depCount += 1; - - on(depMap, 'defined', bind(this, function (depExports) { - this.defineDep(i, depExports); - this.check(); - })); - - if (this.errback) { - on(depMap, 'error', bind(this, this.errback)); - } else if (this.events.error) { - // No direct errback on this module, but something - // else is listening for errors, so be sure to - // propagate the error correctly. - on(depMap, 'error', bind(this, function(err) { - this.emit('error', err); - })); - } - } + this.defined = true + } - id = depMap.id; - mod = registry[id]; + //Finished the define stage. Allow calling check again + //to allow define notifications below in the case of a + //cycle. + this.defining = false - //Skip special modules like 'require', 'exports', 'module' - //Also, don't call enable if it is already enabled, - //important in circular dependency cases. - if (!hasProp(handlers, id) && mod && !mod.enabled) { - context.enable(depMap, this); - } - })); - - //Enable each plugin that is used in - //a dependency - eachProp(this.pluginMaps, bind(this, function (pluginMap) { - var mod = getOwn(registry, pluginMap.id); - if (mod && !mod.enabled) { - context.enable(pluginMap, this); + if (this.defined && !this.defineEmitted) { + this.defineEmitted = true + this.emit('defined', this.exports) + this.defineEmitComplete = true + } + } + }, + + callPlugin: function () { + var map = this.map, + id = map.id, + //Map already normalized the prefix. + pluginMap = makeModuleMap(map.prefix) + + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(pluginMap) + + on( + pluginMap, + 'defined', + bind(this, function (plugin) { + var load, + normalizedMap, + normalizedMod, + bundleId = getOwn(bundlesMap, this.map.id), + name = this.map.name, + parentName = this.map.parentMap ? this.map.parentMap.name : null, + localRequire = context.makeRequire(map.parentMap, { + enableBuildCallback: true, + }) + + //If current map is not normalized, wait for that + //normalized name to load instead of continuing. + if (this.map.unnormalized) { + //Normalize the ID if the plugin allows it. + if (plugin.normalize) { + name = + plugin.normalize(name, function (name) { + return normalize(name, parentName, true) + }) || '' + } + + //prefix and name should already be normalized, no need + //for applying map config again either. + normalizedMap = makeModuleMap(map.prefix + '!' + name, this.map.parentMap) + on( + normalizedMap, + 'defined', + bind(this, function (value) { + this.init( + [], + function () { + return value + }, + null, + { + enabled: true, + ignore: true, } - })); - - this.enabling = false; - - this.check(); - }, + ) + }) + ) - on: function (name, cb) { - var cbs = this.events[name]; - if (!cbs) { - cbs = this.events[name] = []; + normalizedMod = getOwn(registry, normalizedMap.id) + if (normalizedMod) { + //Mark this as a dependency for this plugin, so it + //can be traced for cycles. + this.depMaps.push(normalizedMap) + + if (this.events.error) { + normalizedMod.on( + 'error', + bind(this, function (err) { + this.emit('error', err) + }) + ) } - cbs.push(cb); - }, + normalizedMod.enable() + } - emit: function (name, evt) { - each(this.events[name], function (cb) { - cb(evt); - }); - if (name === 'error') { - //Now that the error handler was triggered, remove - //the listeners, since this broken Module instance - //can stay around for a while in the registry. - delete this.events[name]; - } + return } - }; - function callGetModule(args) { - //Skip modules already defined. - if (!hasProp(defined, args[0])) { - getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); + //If a paths config, then just load that file instead to + //resolve the plugin, as it is built into that paths layer. + if (bundleId) { + this.map.url = context.nameToUrl(bundleId) + this.load() + return } - } - function removeListener(node, func, name, ieName) { - //Favor detachEvent because of IE9 - //issue, see attachEvent/addEventListener comment elsewhere - //in this file. - if (node.detachEvent && !isOpera) { - //Probably IE. If not it will throw an error, which will be - //useful to know. - if (ieName) { - node.detachEvent(ieName, func); + load = bind(this, function (value) { + this.init( + [], + function () { + return value + }, + null, + { + enabled: true, } - } else { - node.removeEventListener(name, func, false); - } - } - - /** - * Given an event from a script node, get the requirejs info from it, - * and then removes the event listeners on the node. - * @param {Event} evt - * @returns {Object} - */ - function getScriptData(evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - var node = evt.currentTarget || evt.srcElement; - - //Remove the listeners once here. - removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); - removeListener(node, context.onScriptError, 'error'); - - return { - node: node, - id: node && node.getAttribute('data-requiremodule') - }; - } - - function intakeDefines() { - var args; - - //Any defined modules in the global queue, intake them now. - takeGlobalQueue(); - - //Make sure any remaining defQueue items get properly processed. - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); - } else { - //args are id, deps, factory. Should be normalized by the - //define() function. - callGetModule(args); + ) + }) + + load.error = bind(this, function (err) { + this.inited = true + this.error = err + err.requireModules = [id] + + //Remove temp unnormalized modules for this module, + //since they will never be resolved otherwise now. + eachProp(registry, function (mod) { + if (mod.map.id.indexOf(id + '_unnormalized') === 0) { + cleanRegistry(mod.map.id) } + }) + + onError(err) + }) + + //Allow plugins to load other code without having to know the + //context or how to 'complete' the load. + load.fromText = bind(this, function (text, textAlt) { + /*jslint evil: true */ + var moduleName = map.name, + moduleMap = makeModuleMap(moduleName), + hasInteractive = useInteractive + + //As of 2.1.0, support just passing the text, to reinforce + //fromText only being called once per resource. Still + //support old style of passing moduleName but discard + //that moduleName in favor of the internal ref. + if (textAlt) { + text = textAlt + } + + //Turn off interactive script matching for IE for any define + //calls in the text, then turn it back on at the end. + if (hasInteractive) { + useInteractive = false + } + + //Prime the system by creating a module instance for + //it. + getModule(moduleMap) + + //Transfer any config to this other module. + if (hasProp(config.config, id)) { + config.config[moduleName] = config.config[id] + } + + try { + req.exec(text) + } catch (e) { + return onError(makeError('fromtexteval', 'fromText eval for ' + id + ' failed: ' + e, e, [id])) + } + + if (hasInteractive) { + useInteractive = true + } + + //Mark this as a dependency for the plugin + //resource + this.depMaps.push(moduleMap) + + //Support anonymous modules. + context.completeLoad(moduleName) + + //Bind the value of that module to the value for this + //resource ID. + localRequire([moduleName], load) + }) + + //Use parentName here since the plugin's name is not reliable, + //could be some weird string with no path that actually wants to + //reference the parentName's path. + plugin.load(map.name, localRequire, load, config) + }) + ) + + context.enable(pluginMap, this) + this.pluginMaps[pluginMap.id] = pluginMap + }, + + enable: function () { + enabledRegistry[this.map.id] = this + this.enabled = true + + //Set flag mentioning that the module is enabling, + //so that immediate calls to the defined callbacks + //for dependencies do not trigger inadvertent load + //with the depCount still being zero. + this.enabling = true + + //Enable each dependency + each( + this.depMaps, + bind(this, function (depMap, i) { + var id, mod, handler + + if (typeof depMap === 'string') { + //Dependency needs to be converted to a depMap + //and wired up to this module. + depMap = makeModuleMap(depMap, this.map.isDefine ? this.map : this.map.parentMap, false, !this.skipMap) + this.depMaps[i] = depMap + + handler = getOwn(handlers, depMap.id) + + if (handler) { + this.depExports[i] = handler(this) + return + } + + this.depCount += 1 + + on( + depMap, + 'defined', + bind(this, function (depExports) { + this.defineDep(i, depExports) + this.check() + }) + ) + + if (this.errback) { + on(depMap, 'error', bind(this, this.errback)) + } else if (this.events.error) { + // No direct errback on this module, but something + // else is listening for errors, so be sure to + // propagate the error correctly. + on( + depMap, + 'error', + bind(this, function (err) { + this.emit('error', err) + }) + ) + } } - } - - context = { - config: config, - contextName: contextName, - registry: registry, - defined: defined, - urlFetched: urlFetched, - defQueue: defQueue, - Module: Module, - makeModuleMap: makeModuleMap, - nextTick: req.nextTick, - onError: onError, - - /** - * Set a configuration for the context. - * @param {Object} cfg config object to integrate. - */ - configure: function (cfg) { - //Make sure the baseUrl ends in a slash. - if (cfg.baseUrl) { - if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { - cfg.baseUrl += '/'; - } - } - //Save off the paths since they require special processing, - //they are additive. - var shim = config.shim, - objs = { - paths: true, - bundles: true, - config: true, - map: true - }; - - eachProp(cfg, function (value, prop) { - if (objs[prop]) { - if (!config[prop]) { - config[prop] = {}; - } - mixin(config[prop], value, true, true); - } else { - config[prop] = value; - } - }); - - //Reverse map the bundles - if (cfg.bundles) { - eachProp(cfg.bundles, function (value, prop) { - each(value, function (v) { - if (v !== prop) { - bundlesMap[v] = prop; - } - }); - }); - } + id = depMap.id + mod = registry[id] - //Merge shim - if (cfg.shim) { - eachProp(cfg.shim, function (value, id) { - //Normalize the structure - if (isArray(value)) { - value = { - deps: value - }; - } - if ((value.exports || value.init) && !value.exportsFn) { - value.exportsFn = context.makeShimExports(value); - } - shim[id] = value; - }); - config.shim = shim; - } + //Skip special modules like 'require', 'exports', 'module' + //Also, don't call enable if it is already enabled, + //important in circular dependency cases. + if (!hasProp(handlers, id) && mod && !mod.enabled) { + context.enable(depMap, this) + } + }) + ) + + //Enable each plugin that is used in + //a dependency + eachProp( + this.pluginMaps, + bind(this, function (pluginMap) { + var mod = getOwn(registry, pluginMap.id) + if (mod && !mod.enabled) { + context.enable(pluginMap, this) + } + }) + ) - //Adjust packages if necessary. - if (cfg.packages) { - each(cfg.packages, function (pkgObj) { - var location, name; - - pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; - - name = pkgObj.name; - location = pkgObj.location; - if (location) { - config.paths[name] = pkgObj.location; - } - - //Save pointer to main module ID for pkg name. - //Remove leading dot in main, so main paths are normalized, - //and remove any trailing .js, since different package - //envs have different conventions: some use a module name, - //some use a file name. - config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main') - .replace(currDirRegExp, '') - .replace(jsSuffixRegExp, ''); - }); - } + this.enabling = false - //If there are any "waiting to execute" modules in the registry, - //update the maps for them, since their info, like URLs to load, - //may have changed. - eachProp(registry, function (mod, id) { - //If module already has init called, since it is too - //late to modify them, and ignore unnormalized ones - //since they are transient. - if (!mod.inited && !mod.map.unnormalized) { - mod.map = makeModuleMap(id); - } - }); + this.check() + }, - //If a deps array or a config callback is specified, then call - //require with those args. This is useful when require is defined as a - //config object before require.js is loaded. - if (cfg.deps || cfg.callback) { - context.require(cfg.deps || [], cfg.callback); - } - }, + on: function (name, cb) { + var cbs = this.events[name] + if (!cbs) { + cbs = this.events[name] = [] + } + cbs.push(cb) + }, + + emit: function (name, evt) { + each(this.events[name], function (cb) { + cb(evt) + }) + if (name === 'error') { + //Now that the error handler was triggered, remove + //the listeners, since this broken Module instance + //can stay around for a while in the registry. + delete this.events[name] + } + }, + } - makeShimExports: function (value) { - function fn() { - var ret; - if (value.init) { - ret = value.init.apply(global, arguments); - } - return ret || (value.exports && getGlobal(value.exports)); - } - return fn; - }, + function callGetModule(args) { + //Skip modules already defined. + if (!hasProp(defined, args[0])) { + getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]) + } + } - makeRequire: function (relMap, options) { - options = options || {}; + function removeListener(node, func, name, ieName) { + //Favor detachEvent because of IE9 + //issue, see attachEvent/addEventListener comment elsewhere + //in this file. + if (node.detachEvent && !isOpera) { + //Probably IE. If not it will throw an error, which will be + //useful to know. + if (ieName) { + node.detachEvent(ieName, func) + } + } else { + node.removeEventListener(name, func, false) + } + } - function localRequire(deps, callback, errback) { - var id, map, requireMod; + /** + * Given an event from a script node, get the requirejs info from it, + * and then removes the event listeners on the node. + * @param {Event} evt + * @returns {Object} + */ + function getScriptData(evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + var node = evt.currentTarget || evt.srcElement + + //Remove the listeners once here. + removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange') + removeListener(node, context.onScriptError, 'error') + + return { + node: node, + id: node && node.getAttribute('data-requiremodule'), + } + } - if (options.enableBuildCallback && callback && isFunction(callback)) { - callback.__requireJsBuild = true; - } + function intakeDefines() { + var args + + //Any defined modules in the global queue, intake them now. + takeGlobalQueue() + + //Make sure any remaining defQueue items get properly processed. + while (defQueue.length) { + args = defQueue.shift() + if (args[0] === null) { + return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])) + } else { + //args are id, deps, factory. Should be normalized by the + //define() function. + callGetModule(args) + } + } + } - if (typeof deps === 'string') { - if (isFunction(callback)) { - //Invalid call - return onError(makeError('requireargs', 'Invalid require call'), errback); - } - - //If require|exports|module are requested, get the - //value for them from the special handlers. Caveat: - //this only works while module is being defined. - if (relMap && hasProp(handlers, deps)) { - return handlers[deps](registry[relMap.id]); - } - - //Synchronous access to one module. If require.get is - //available (as in the Node adapter), prefer that. - if (req.get) { - return req.get(context, deps, relMap, localRequire); - } - - //Normalize module name, if it contains . or .. - map = makeModuleMap(deps, relMap, false, true); - id = map.id; - - if (!hasProp(defined, id)) { - return onError(makeError('notloaded', 'Module name "' + - id + - '" has not been loaded yet for context: ' + - contextName + - (relMap ? '' : '. Use require([])'))); - } - return defined[id]; - } + context = { + config: config, + contextName: contextName, + registry: registry, + defined: defined, + urlFetched: urlFetched, + defQueue: defQueue, + Module: Module, + makeModuleMap: makeModuleMap, + nextTick: req.nextTick, + onError: onError, + + /** + * Set a configuration for the context. + * @param {Object} cfg config object to integrate. + */ + configure: function (cfg) { + //Make sure the baseUrl ends in a slash. + if (cfg.baseUrl) { + if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { + cfg.baseUrl += '/' + } + } - //Grab defines waiting in the global queue. - intakeDefines(); + //Save off the paths since they require special processing, + //they are additive. + var shim = config.shim, + objs = { + paths: true, + bundles: true, + config: true, + map: true, + } + + eachProp(cfg, function (value, prop) { + if (objs[prop]) { + if (!config[prop]) { + config[prop] = {} + } + mixin(config[prop], value, true, true) + } else { + config[prop] = value + } + }) + + //Reverse map the bundles + if (cfg.bundles) { + eachProp(cfg.bundles, function (value, prop) { + each(value, function (v) { + if (v !== prop) { + bundlesMap[v] = prop + } + }) + }) + } - //Mark all the dependencies as needing to be loaded. - context.nextTick(function () { - //Some defines could have been added since the - //require call, collect them. - intakeDefines(); + //Merge shim + if (cfg.shim) { + eachProp(cfg.shim, function (value, id) { + //Normalize the structure + if (isArray(value)) { + value = { + deps: value, + } + } + if ((value.exports || value.init) && !value.exportsFn) { + value.exportsFn = context.makeShimExports(value) + } + shim[id] = value + }) + config.shim = shim + } - requireMod = getModule(makeModuleMap(null, relMap)); + //Adjust packages if necessary. + if (cfg.packages) { + each(cfg.packages, function (pkgObj) { + var location, name - //Store if map config should be applied to this require - //call for dependencies. - requireMod.skipMap = options.skipMap; + pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj - requireMod.init(deps, callback, errback, { - enabled: true - }); + name = pkgObj.name + location = pkgObj.location + if (location) { + config.paths[name] = pkgObj.location + } - checkLoaded(); - }); + //Save pointer to main module ID for pkg name. + //Remove leading dot in main, so main paths are normalized, + //and remove any trailing .js, since different package + //envs have different conventions: some use a module name, + //some use a file name. + config.pkgs[name] = + pkgObj.name + '/' + (pkgObj.main || 'main').replace(currDirRegExp, '').replace(jsSuffixRegExp, '') + }) + } - return localRequire; - } + //If there are any "waiting to execute" modules in the registry, + //update the maps for them, since their info, like URLs to load, + //may have changed. + eachProp(registry, function (mod, id) { + //If module already has init called, since it is too + //late to modify them, and ignore unnormalized ones + //since they are transient. + if (!mod.inited && !mod.map.unnormalized) { + mod.map = makeModuleMap(id) + } + }) + + //If a deps array or a config callback is specified, then call + //require with those args. This is useful when require is defined as a + //config object before require.js is loaded. + if (cfg.deps || cfg.callback) { + context.require(cfg.deps || [], cfg.callback) + } + }, + + makeShimExports: function (value) { + function fn() { + var ret + if (value.init) { + ret = value.init.apply(global, arguments) + } + return ret || (value.exports && getGlobal(value.exports)) + } + return fn + }, - mixin(localRequire, { - isBrowser: isBrowser, - - /** - * Converts a module name + .extension into an URL path. - * *Requires* the use of a module name. It does not support using - * plain URLs like nameToUrl. - */ - toUrl: function (moduleNamePlusExt) { - var ext, - index = moduleNamePlusExt.lastIndexOf('.'), - segment = moduleNamePlusExt.split('/')[0], - isRelative = segment === '.' || segment === '..'; - - //Have a file extension alias, and it is not the - //dots from a relative path. - if (index !== -1 && (!isRelative || index > 1)) { - ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); - moduleNamePlusExt = moduleNamePlusExt.substring(0, index); - } - - return context.nameToUrl(normalize(moduleNamePlusExt, - relMap && relMap.id, true), ext, true); - }, + makeRequire: function (relMap, options) { + options = options || {} - defined: function (id) { - return hasProp(defined, makeModuleMap(id, relMap, false, true).id); - }, + function localRequire(deps, callback, errback) { + var id, map, requireMod - specified: function (id) { - id = makeModuleMap(id, relMap, false, true).id; - return hasProp(defined, id) || hasProp(registry, id); - } - }); - - //Only allow undef on top level require calls - if (!relMap) { - localRequire.undef = function (id) { - //Bind any waiting define() calls to this context, - //fix for #408 - takeGlobalQueue(); - - var map = makeModuleMap(id, relMap, true), - mod = getOwn(registry, id); - - removeScript(id); - - delete defined[id]; - delete urlFetched[map.url]; - delete undefEvents[id]; - - //Clean queued defines too. Go backwards - //in array so that the splices do not - //mess up the iteration. - eachReverse(defQueue, function(args, i) { - if(args[0] === id) { - defQueue.splice(i, 1); - } - }); - - if (mod) { - //Hold on to listeners in case the - //module will be attempted to be reloaded - //using a different config. - if (mod.events.defined) { - undefEvents[id] = mod.events; - } - - cleanRegistry(id); - } - }; - } + if (options.enableBuildCallback && callback && isFunction(callback)) { + callback.__requireJsBuild = true + } - return localRequire; - }, + if (typeof deps === 'string') { + if (isFunction(callback)) { + //Invalid call + return onError(makeError('requireargs', 'Invalid require call'), errback) + } - /** - * Called to enable a module if it is still in the registry - * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overridden by - * the optimizer. Not shown here to keep code compact. - */ - enable: function (depMap) { - var mod = getOwn(registry, depMap.id); - if (mod) { - getModule(depMap).enable(); - } - }, + //If require|exports|module are requested, get the + //value for them from the special handlers. Caveat: + //this only works while module is being defined. + if (relMap && hasProp(handlers, deps)) { + return handlers[deps](registry[relMap.id]) + } - /** - * Internal method used by environment adapters to complete a load event. - * A load event could be a script load or just a load pass from a synchronous - * load call. - * @param {String} moduleName the name of the module to potentially complete. - */ - completeLoad: function (moduleName) { - var found, args, mod, - shim = getOwn(config.shim, moduleName) || {}, - shExports = shim.exports; - - takeGlobalQueue(); - - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - args[0] = moduleName; - //If already found an anonymous module and bound it - //to this name, then this is some other anon module - //waiting for its completeLoad to fire. - if (found) { - break; - } - found = true; - } else if (args[0] === moduleName) { - //Found matching define call for this script! - found = true; - } + //Synchronous access to one module. If require.get is + //available (as in the Node adapter), prefer that. + if (req.get) { + return req.get(context, deps, relMap, localRequire) + } - callGetModule(args); - } + //Normalize module name, if it contains . or .. + map = makeModuleMap(deps, relMap, false, true) + id = map.id + + if (!hasProp(defined, id)) { + return onError( + makeError( + 'notloaded', + 'Module name "' + + id + + '" has not been loaded yet for context: ' + + contextName + + (relMap ? '' : '. Use require([])') + ) + ) + } + return defined[id] + } - //Do this after the cycle of callGetModule in case the result - //of those calls/init calls changes the registry. - mod = getOwn(registry, moduleName); - - if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { - if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { - if (hasPathFallback(moduleName)) { - return; - } else { - return onError(makeError('nodefine', - 'No define call for ' + moduleName, - null, - [moduleName])); - } - } else { - //A script that does not call define(), so just simulate - //the call for it. - callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); - } - } + //Grab defines waiting in the global queue. + intakeDefines() - checkLoaded(); - }, + //Mark all the dependencies as needing to be loaded. + context.nextTick(function () { + //Some defines could have been added since the + //require call, collect them. + intakeDefines() - /** - * Converts a module name to a file path. Supports cases where - * moduleName may actually be just an URL. - * Note that it **does not** call normalize on the moduleName, - * it is assumed to have already been normalized. This is an - * internal API, not a public one. Use toUrl for the public API. - */ - nameToUrl: function (moduleName, ext, skipExt) { - var paths, syms, i, parentModule, url, - parentPath, bundleId, - pkgMain = getOwn(config.pkgs, moduleName); - - if (pkgMain) { - moduleName = pkgMain; - } + requireMod = getModule(makeModuleMap(null, relMap)) - bundleId = getOwn(bundlesMap, moduleName); + //Store if map config should be applied to this require + //call for dependencies. + requireMod.skipMap = options.skipMap - if (bundleId) { - return context.nameToUrl(bundleId, ext, skipExt); - } + requireMod.init(deps, callback, errback, { + enabled: true, + }) - //If a colon is in the URL, it indicates a protocol is used and it is just - //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) - //or ends with .js, then assume the user meant to use an url and not a module id. - //The slash is important for protocol-less URLs as well as full paths. - if (req.jsExtRegExp.test(moduleName)) { - //Just a plain path, not module name lookup, so just return it. - //Add extension if it is included. This is a bit wonky, only non-.js things pass - //an extension, this method probably needs to be reworked. - url = moduleName + (ext || ''); - } else { - //A module that needs to be converted to a path. - paths = config.paths; - - syms = moduleName.split('/'); - //For each module name segment, see if there is a path - //registered for it. Start with most specific name - //and work up from it. - for (i = syms.length; i > 0; i -= 1) { - parentModule = syms.slice(0, i).join('/'); - - parentPath = getOwn(paths, parentModule); - if (parentPath) { - //If an array, it means there are a few choices, - //Choose the one that is desired - if (isArray(parentPath)) { - parentPath = parentPath[0]; - } - syms.splice(0, i, parentPath); - break; - } - } + checkLoaded() + }) - //Join the path parts together, then figure out if baseUrl is needed. - url = syms.join('/'); - url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); - url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; - } - - return config.urlArgs ? url + - ((url.indexOf('?') === -1 ? '?' : '&') + - config.urlArgs) : url; - }, - - //Delegates to req.load. Broken out as a separate function to - //allow overriding in the optimizer. - load: function (id, url) { - req.load(context, id, url); - }, + return localRequire + } - /** - * Executes a module callback function. Broken out as a separate function - * solely to allow the build system to sequence the files in the built - * layer in the right sequence. - * - * @private - */ - execCb: function (name, callback, args, exports) { - return callback.apply(exports, args); - }, + mixin(localRequire, { + isBrowser: isBrowser, + + /** + * Converts a module name + .extension into an URL path. + * *Requires* the use of a module name. It does not support using + * plain URLs like nameToUrl. + */ + toUrl: function (moduleNamePlusExt) { + var ext, + index = moduleNamePlusExt.lastIndexOf('.'), + segment = moduleNamePlusExt.split('/')[0], + isRelative = segment === '.' || segment === '..' + + //Have a file extension alias, and it is not the + //dots from a relative path. + if (index !== -1 && (!isRelative || index > 1)) { + ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length) + moduleNamePlusExt = moduleNamePlusExt.substring(0, index) + } - /** - * callback for script loads, used to check status of loading. - * - * @param {Event} evt the event from the browser for the script - * that was loaded. - */ - onScriptLoad: function (evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - if (evt.type === 'load' || - (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { - //Reset interactive script so a script node is not held onto for - //to long. - interactiveScript = null; - - //Pull out the name of the module and the context. - var data = getScriptData(evt); - context.completeLoad(data.id); - } - }, + return context.nameToUrl(normalize(moduleNamePlusExt, relMap && relMap.id, true), ext, true) + }, + + defined: function (id) { + return hasProp(defined, makeModuleMap(id, relMap, false, true).id) + }, + + specified: function (id) { + id = makeModuleMap(id, relMap, false, true).id + return hasProp(defined, id) || hasProp(registry, id) + }, + }) + + //Only allow undef on top level require calls + if (!relMap) { + localRequire.undef = function (id) { + //Bind any waiting define() calls to this context, + //fix for #408 + takeGlobalQueue() + + var map = makeModuleMap(id, relMap, true), + mod = getOwn(registry, id) + + removeScript(id) + + delete defined[id] + delete urlFetched[map.url] + delete undefEvents[id] + + //Clean queued defines too. Go backwards + //in array so that the splices do not + //mess up the iteration. + eachReverse(defQueue, function (args, i) { + if (args[0] === id) { + defQueue.splice(i, 1) + } + }) + + if (mod) { + //Hold on to listeners in case the + //module will be attempted to be reloaded + //using a different config. + if (mod.events.defined) { + undefEvents[id] = mod.events + } + + cleanRegistry(id) + } + } + } - /** - * Callback for script errors. - */ - onScriptError: function (evt) { - var data = getScriptData(evt); - if (!hasPathFallback(data.id)) { - return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); - } + return localRequire + }, + + /** + * Called to enable a module if it is still in the registry + * awaiting enablement. A second arg, parent, the parent module, + * is passed in for context, when this method is overridden by + * the optimizer. Not shown here to keep code compact. + */ + enable: function (depMap) { + var mod = getOwn(registry, depMap.id) + if (mod) { + getModule(depMap).enable() + } + }, + + /** + * Internal method used by environment adapters to complete a load event. + * A load event could be a script load or just a load pass from a synchronous + * load call. + * @param {String} moduleName the name of the module to potentially complete. + */ + completeLoad: function (moduleName) { + var found, + args, + mod, + shim = getOwn(config.shim, moduleName) || {}, + shExports = shim.exports + + takeGlobalQueue() + + while (defQueue.length) { + args = defQueue.shift() + if (args[0] === null) { + args[0] = moduleName + //If already found an anonymous module and bound it + //to this name, then this is some other anon module + //waiting for its completeLoad to fire. + if (found) { + break } - }; + found = true + } else if (args[0] === moduleName) { + //Found matching define call for this script! + found = true + } - context.require = context.makeRequire(); - return context; - } + callGetModule(args) + } - /** - * Main entry point. - * - * If the only argument to require is a string, then the module that - * is represented by that string is fetched for the appropriate context. - * - * If the first argument is an array, then it will be treated as an array - * of dependency string names to fetch. An optional function callback can - * be specified to execute when all of those dependencies are available. - * - * Make a local req variable to help Caja compliance (it assumes things - * on a require that are not standardized), and to give a short - * name for minification/local scope use. - */ - req = requirejs = function (deps, callback, errback, optional) { - - //Find the right context, use default - var context, config, - contextName = defContextName; - - // Determine if have config object in the call. - if (!isArray(deps) && typeof deps !== 'string') { - // deps is a config object - config = deps; - if (isArray(callback)) { - // Adjust args if there are dependencies - deps = callback; - callback = errback; - errback = optional; + //Do this after the cycle of callGetModule in case the result + //of those calls/init calls changes the registry. + mod = getOwn(registry, moduleName) + + if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { + if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { + if (hasPathFallback(moduleName)) { + return } else { - deps = []; + return onError(makeError('nodefine', 'No define call for ' + moduleName, null, [moduleName])) } + } else { + //A script that does not call define(), so just simulate + //the call for it. + callGetModule([moduleName, shim.deps || [], shim.exportsFn]) + } } - if (config && config.context) { - contextName = config.context; + checkLoaded() + }, + + /** + * Converts a module name to a file path. Supports cases where + * moduleName may actually be just an URL. + * Note that it **does not** call normalize on the moduleName, + * it is assumed to have already been normalized. This is an + * internal API, not a public one. Use toUrl for the public API. + */ + nameToUrl: function (moduleName, ext, skipExt) { + var paths, + syms, + i, + parentModule, + url, + parentPath, + bundleId, + pkgMain = getOwn(config.pkgs, moduleName) + + if (pkgMain) { + moduleName = pkgMain } - context = getOwn(contexts, contextName); - if (!context) { - context = contexts[contextName] = req.s.newContext(contextName); - } + bundleId = getOwn(bundlesMap, moduleName) - if (config) { - context.configure(config); + if (bundleId) { + return context.nameToUrl(bundleId, ext, skipExt) } - return context.require(deps, callback, errback); - }; - - /** - * Support require.config() to make it easier to cooperate with other - * AMD loaders on globally agreed names. - */ - req.config = function (config) { - return req(config); - }; + //If a colon is in the URL, it indicates a protocol is used and it is just + //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) + //or ends with .js, then assume the user meant to use an url and not a module id. + //The slash is important for protocol-less URLs as well as full paths. + if (req.jsExtRegExp.test(moduleName)) { + //Just a plain path, not module name lookup, so just return it. + //Add extension if it is included. This is a bit wonky, only non-.js things pass + //an extension, this method probably needs to be reworked. + url = moduleName + (ext || '') + } else { + //A module that needs to be converted to a path. + paths = config.paths + + syms = moduleName.split('/') + //For each module name segment, see if there is a path + //registered for it. Start with most specific name + //and work up from it. + for (i = syms.length; i > 0; i -= 1) { + parentModule = syms.slice(0, i).join('/') + + parentPath = getOwn(paths, parentModule) + if (parentPath) { + //If an array, it means there are a few choices, + //Choose the one that is desired + if (isArray(parentPath)) { + parentPath = parentPath[0] + } + syms.splice(0, i, parentPath) + break + } + } - /** - * Execute something after the current tick - * of the event loop. Override for other envs - * that have a better solution than setTimeout. - * @param {Function} fn function to execute later. - */ - req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { - setTimeout(fn, 4); - } : function (fn) { fn(); }; + //Join the path parts together, then figure out if baseUrl is needed. + url = syms.join('/') + url += ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js') + url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url + } - /** - * Export require as a global, but only if it does not already exist. - */ - if (!require) { - require = req; + return config.urlArgs ? url + ((url.indexOf('?') === -1 ? '?' : '&') + config.urlArgs) : url + }, + + //Delegates to req.load. Broken out as a separate function to + //allow overriding in the optimizer. + load: function (id, url) { + req.load(context, id, url) + }, + + /** + * Executes a module callback function. Broken out as a separate function + * solely to allow the build system to sequence the files in the built + * layer in the right sequence. + * + * @private + */ + execCb: function (name, callback, args, exports) { + return callback.apply(exports, args) + }, + + /** + * callback for script loads, used to check status of loading. + * + * @param {Event} evt the event from the browser for the script + * that was loaded. + */ + onScriptLoad: function (evt) { + //Using currentTarget instead of target for Firefox 2.0's sake. Not + //all old browsers will be supported, but this one was easy enough + //to support and still makes sense. + if (evt.type === 'load' || readyRegExp.test((evt.currentTarget || evt.srcElement).readyState)) { + //Reset interactive script so a script node is not held onto for + //to long. + interactiveScript = null + + //Pull out the name of the module and the context. + var data = getScriptData(evt) + context.completeLoad(data.id) + } + }, + + /** + * Callback for script errors. + */ + onScriptError: function (evt) { + var data = getScriptData(evt) + if (!hasPathFallback(data.id)) { + return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])) + } + }, } - req.version = version; - - //Used to filter out dependencies that are already paths. - req.jsExtRegExp = /^\/|:|\?|\.js$/; - req.isBrowser = isBrowser; - s = req.s = { - contexts: contexts, - newContext: newContext - }; - - //Create default context. - req({}); - - //Exports some context-sensitive methods on global require. - each([ - 'toUrl', - 'undef', - 'defined', - 'specified' - ], function (prop) { - //Reference from contexts instead of early binding to default context, - //so that during builds, the latest instance of the default context - //with its config gets used. - req[prop] = function () { - var ctx = contexts[defContextName]; - return ctx.require[prop].apply(ctx, arguments); - }; - }); + context.require = context.makeRequire() + return context + } + + /** + * Main entry point. + * + * If the only argument to require is a string, then the module that + * is represented by that string is fetched for the appropriate context. + * + * If the first argument is an array, then it will be treated as an array + * of dependency string names to fetch. An optional function callback can + * be specified to execute when all of those dependencies are available. + * + * Make a local req variable to help Caja compliance (it assumes things + * on a require that are not standardized), and to give a short + * name for minification/local scope use. + */ + req = requirejs = function (deps, callback, errback, optional) { + //Find the right context, use default + var context, + config, + contextName = defContextName + + // Determine if have config object in the call. + if (!isArray(deps) && typeof deps !== 'string') { + // deps is a config object + config = deps + if (isArray(callback)) { + // Adjust args if there are dependencies + deps = callback + callback = errback + errback = optional + } else { + deps = [] + } + } - if (isBrowser) { - head = s.head = document.getElementsByTagName('head')[0]; - //If BASE tag is in play, using appendChild is a problem for IE6. - //When that browser dies, this can be removed. Details in this jQuery bug: - //http://dev.jquery.com/ticket/2709 - baseElement = document.getElementsByTagName('base')[0]; - if (baseElement) { - head = s.head = baseElement.parentNode; - } + if (config && config.context) { + contextName = config.context } - /** - * Any errors that require explicitly generates will be passed to this - * function. Intercept/override it if you want custom error handling. - * @param {Error} err the error object. - */ - req.onError = defaultOnError; + context = getOwn(contexts, contextName) + if (!context) { + context = contexts[contextName] = req.s.newContext(contextName) + } - /** - * Creates the node for the load command. Only used in browser envs. - */ - req.createNode = function (config, moduleName, url) { - var node = config.xhtml ? - document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : - document.createElement('script'); - node.type = config.scriptType || 'text/javascript'; - node.charset = 'utf-8'; - node.async = true; - return node; - }; + if (config) { + context.configure(config) + } - /** - * Does the request to load a module for the browser case. - * Make this a separate function to allow other environments - * to override it. - * - * @param {Object} context the require context to find state. - * @param {String} moduleName the name of the module. - * @param {Object} url the URL to the module. - */ - req.load = function (context, moduleName, url) { - var config = (context && context.config) || {}, - node; - if (isBrowser) { - //In the browser so use a script tag - node = req.createNode(config, moduleName, url); - - node.setAttribute('data-requirecontext', context.contextName); - node.setAttribute('data-requiremodule', moduleName); - - //Set up load listener. Test attachEvent first because IE9 has - //a subtle issue in its addEventListener and script onload firings - //that do not match the behavior of all other browsers with - //addEventListener support, which fire the onload event for a - //script right after the script execution. See: - //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution - //UNFORTUNATELY Opera implements attachEvent but does not follow the script - //script execution mode. - if (node.attachEvent && - //Check if node.attachEvent is artificially added by custom script or - //natively supported by browser - //read https://github.com/jrburke/requirejs/issues/187 - //if we can NOT find [native code] then it must NOT natively supported. - //in IE8, node.attachEvent does not have toString() - //Note the test for "[native code" with no closing brace, see: - //https://github.com/jrburke/requirejs/issues/273 - !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && - !isOpera) { - //Probably IE. IE (at least 6-8) do not fire - //script onload right after executing the script, so - //we cannot tie the anonymous define call to a name. - //However, IE reports the script as being in 'interactive' - //readyState at the time of the define call. - useInteractive = true; - - node.attachEvent('onreadystatechange', context.onScriptLoad); - //It would be great to add an error handler here to catch - //404s in IE9+. However, onreadystatechange will fire before - //the error handler, so that does not help. If addEventListener - //is used, then IE will fire error before load, but we cannot - //use that pathway given the connect.microsoft.com issue - //mentioned above about not doing the 'script execute, - //then fire the script load event listener before execute - //next script' that other browsers do. - //Best hope: IE10 fixes the issues, - //and then destroys all installs of IE 6-9. - //node.attachEvent('onerror', context.onScriptError); - } else { - node.addEventListener('load', context.onScriptLoad, false); - node.addEventListener('error', context.onScriptError, false); - } - node.src = url; - - //For some cache cases in IE 6-8, the script executes before the end - //of the appendChild execution, so to tie an anonymous define - //call to the module name (which is stored on the node), hold on - //to a reference to this node, but clear after the DOM insertion. - currentlyAddingScript = node; - if (baseElement) { - head.insertbeforeAll(node, baseElement); - } else { - head.appendChild(node); - } - currentlyAddingScript = null; - - return node; - } else if (isWebWorker) { - try { - //In a web worker, use importScripts. This is not a very - //efficient use of importScripts, importScripts will block until - //its script is downloaded and evaluated. However, if web workers - //are in play, the expectation that a build has been done so that - //only one script needs to be loaded anyway. This may need to be - //reevaluated if other use cases become common. - importScripts(url); - - //Account for anonymous modules - context.completeLoad(moduleName); - } catch (e) { - context.onError(makeError('importscripts', - 'importScripts failed for ' + - moduleName + ' at ' + url, - e, - [moduleName])); - } + return context.require(deps, callback, errback) + } + + /** + * Support require.config() to make it easier to cooperate with other + * AMD loaders on globally agreed names. + */ + req.config = function (config) { + return req(config) + } + + /** + * Execute something after the current tick + * of the event loop. Override for other envs + * that have a better solution than setTimeout. + * @param {Function} fn function to execute later. + */ + req.nextTick = + typeof setTimeout !== 'undefined' + ? function (fn) { + setTimeout(fn, 4) } - }; - - function getInteractiveScript() { - if (interactiveScript && interactiveScript.readyState === 'interactive') { - return interactiveScript; + : function (fn) { + fn() } - eachReverse(scripts(), function (script) { - if (script.readyState === 'interactive') { - return (interactiveScript = script); - } - }); - return interactiveScript; + /** + * Export require as a global, but only if it does not already exist. + */ + if (!require) { + require = req + } + + req.version = version + + //Used to filter out dependencies that are already paths. + req.jsExtRegExp = /^\/|:|\?|\.js$/ + req.isBrowser = isBrowser + s = req.s = { + contexts: contexts, + newContext: newContext, + } + + //Create default context. + req({}) + + //Exports some context-sensitive methods on global require. + each(['toUrl', 'undef', 'defined', 'specified'], function (prop) { + //Reference from contexts instead of early binding to default context, + //so that during builds, the latest instance of the default context + //with its config gets used. + req[prop] = function () { + var ctx = contexts[defContextName] + return ctx.require[prop].apply(ctx, arguments) } + }) + + if (isBrowser) { + head = s.head = document.getElementsByTagName('head')[0] + //If BASE tag is in play, using appendChild is a problem for IE6. + //When that browser dies, this can be removed. Details in this jQuery bug: + //http://dev.jquery.com/ticket/2709 + baseElement = document.getElementsByTagName('base')[0] + if (baseElement) { + head = s.head = baseElement.parentNode + } + } + + /** + * Any errors that require explicitly generates will be passed to this + * function. Intercept/override it if you want custom error handling. + * @param {Error} err the error object. + */ + req.onError = defaultOnError + + /** + * Creates the node for the load command. Only used in browser envs. + */ + req.createNode = function (config, moduleName, url) { + var node = config.xhtml + ? document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') + : document.createElement('script') + node.type = config.scriptType || 'text/javascript' + node.charset = 'utf-8' + node.async = true + return node + } + + /** + * Does the request to load a module for the browser case. + * Make this a separate function to allow other environments + * to override it. + * + * @param {Object} context the require context to find state. + * @param {String} moduleName the name of the module. + * @param {Object} url the URL to the module. + */ + req.load = function (context, moduleName, url) { + var config = (context && context.config) || {}, + node + if (isBrowser) { + //In the browser so use a script tag + node = req.createNode(config, moduleName, url) + + node.setAttribute('data-requirecontext', context.contextName) + node.setAttribute('data-requiremodule', moduleName) + + //Set up load listener. Test attachEvent first because IE9 has + //a subtle issue in its addEventListener and script onload firings + //that do not match the behavior of all other browsers with + //addEventListener support, which fire the onload event for a + //script right after the script execution. See: + //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution + //UNFORTUNATELY Opera implements attachEvent but does not follow the script + //script execution mode. + if ( + node.attachEvent && + //Check if node.attachEvent is artificially added by custom script or + //natively supported by browser + //read https://github.com/jrburke/requirejs/issues/187 + //if we can NOT find [native code] then it must NOT natively supported. + //in IE8, node.attachEvent does not have toString() + //Note the test for "[native code" with no closing brace, see: + //https://github.com/jrburke/requirejs/issues/273 + !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && + !isOpera + ) { + //Probably IE. IE (at least 6-8) do not fire + //script onload right after executing the script, so + //we cannot tie the anonymous define call to a name. + //However, IE reports the script as being in 'interactive' + //readyState at the time of the define call. + useInteractive = true + + node.attachEvent('onreadystatechange', context.onScriptLoad) + //It would be great to add an error handler here to catch + //404s in IE9+. However, onreadystatechange will fire before + //the error handler, so that does not help. If addEventListener + //is used, then IE will fire error before load, but we cannot + //use that pathway given the connect.microsoft.com issue + //mentioned above about not doing the 'script execute, + //then fire the script load event listener before execute + //next script' that other browsers do. + //Best hope: IE10 fixes the issues, + //and then destroys all installs of IE 6-9. + //node.attachEvent('onerror', context.onScriptError); + } else { + node.addEventListener('load', context.onScriptLoad, false) + node.addEventListener('error', context.onScriptError, false) + } + node.src = url + + //For some cache cases in IE 6-8, the script executes before the end + //of the appendChild execution, so to tie an anonymous define + //call to the module name (which is stored on the node), hold on + //to a reference to this node, but clear after the DOM insertion. + currentlyAddingScript = node + if (baseElement) { + head.insertbeforeAll(node, baseElement) + } else { + head.appendChild(node) + } + currentlyAddingScript = null + + return node + } else if (isWebWorker) { + try { + //In a web worker, use importScripts. This is not a very + //efficient use of importScripts, importScripts will block until + //its script is downloaded and evaluated. However, if web workers + //are in play, the expectation that a build has been done so that + //only one script needs to be loaded anyway. This may need to be + //reevaluated if other use cases become common. + importScripts(url) + + //Account for anonymous modules + context.completeLoad(moduleName) + } catch (e) { + context.onError( + makeError('importscripts', 'importScripts failed for ' + moduleName + ' at ' + url, e, [moduleName]) + ) + } + } + } - //Look for a data-main script attribute, which could also adjust the baseUrl. - if (isBrowser && !cfg.skipDataMain) { - //Figure out baseUrl. Get it from the script tag with require.js in it. - eachReverse(scripts(), function (script) { - //Set the 'head' where we can append children by - //using the script's parent. - if (!head) { - head = script.parentNode; - } - - //Look for a data-main attribute to set main script for the page - //to load. If it is there, the path to data main becomes the - //baseUrl, if it is not already set. - dataMain = script.getAttribute('data-main'); - if (dataMain) { - //Preserve dataMain in case it is a path (i.e. contains '?') - mainScript = dataMain; - - //Set final baseUrl if there is not already an explicit one. - if (!cfg.baseUrl) { - //Pull off the directory of data-main for use as the - //baseUrl. - src = mainScript.split('/'); - mainScript = src.pop(); - subPath = src.length ? src.join('/') + '/' : './'; - - cfg.baseUrl = subPath; - } - - //Strip off any trailing .js since mainScript is now - //like a module name. - mainScript = mainScript.replace(jsSuffixRegExp, ''); - - //If mainScript is still a path, fall back to dataMain - if (req.jsExtRegExp.test(mainScript)) { - mainScript = dataMain; - } - - //Put the data-main script in the files to load. - cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; - - return true; - } - }); + function getInteractiveScript() { + if (interactiveScript && interactiveScript.readyState === 'interactive') { + return interactiveScript } - /** - * The function that handles definitions of modules. Differs from - * require() in that a string for the module should be the first argument, - * and the function to execute after dependencies are loaded should - * return a value to define the module corresponding to the first argument's - * name. - */ - define = function (name, deps, callback) { - var node, context; - - //Allow for anonymous modules - if (typeof name !== 'string') { - //Adjust args appropriately - callback = deps; - deps = name; - name = null; + eachReverse(scripts(), function (script) { + if (script.readyState === 'interactive') { + return (interactiveScript = script) + } + }) + return interactiveScript + } + + //Look for a data-main script attribute, which could also adjust the baseUrl. + if (isBrowser && !cfg.skipDataMain) { + //Figure out baseUrl. Get it from the script tag with require.js in it. + eachReverse(scripts(), function (script) { + //Set the 'head' where we can append children by + //using the script's parent. + if (!head) { + head = script.parentNode + } + + //Look for a data-main attribute to set main script for the page + //to load. If it is there, the path to data main becomes the + //baseUrl, if it is not already set. + dataMain = script.getAttribute('data-main') + if (dataMain) { + //Preserve dataMain in case it is a path (i.e. contains '?') + mainScript = dataMain + + //Set final baseUrl if there is not already an explicit one. + if (!cfg.baseUrl) { + //Pull off the directory of data-main for use as the + //baseUrl. + src = mainScript.split('/') + mainScript = src.pop() + subPath = src.length ? src.join('/') + '/' : './' + + cfg.baseUrl = subPath } - //This module may not have dependencies - if (!isArray(deps)) { - callback = deps; - deps = null; - } + //Strip off any trailing .js since mainScript is now + //like a module name. + mainScript = mainScript.replace(jsSuffixRegExp, '') - //If no name, and callback is a function, then figure out if it a - //CommonJS thing with dependencies. - if (!deps && isFunction(callback)) { - deps = []; - //Remove comments from the callback string, - //look for require calls, and pull them into the dependencies, - //but only if there are function args. - if (callback.length) { - callback - .toString() - .replace(commentRegExp, '') - .replace(cjsRequireRegExp, function (match, dep) { - deps.push(dep); - }); - - //May be a CommonJS thing even without require calls, but still - //could use exports, and module. Avoid doing exports and module - //work though if it just needs require. - //REQUIRES the function to expect the CommonJS variables in the - //order listed below. - deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); - } + //If mainScript is still a path, fall back to dataMain + if (req.jsExtRegExp.test(mainScript)) { + mainScript = dataMain } - //If in IE 6-8 and hit an anonymous define() call, do the interactive - //work. - if (useInteractive) { - node = currentlyAddingScript || getInteractiveScript(); - if (node) { - if (!name) { - name = node.getAttribute('data-requiremodule'); - } - context = contexts[node.getAttribute('data-requirecontext')]; - } - } + //Put the data-main script in the files to load. + cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript] + + return true + } + }) + } + + /** + * The function that handles definitions of modules. Differs from + * require() in that a string for the module should be the first argument, + * and the function to execute after dependencies are loaded should + * return a value to define the module corresponding to the first argument's + * name. + */ + define = function (name, deps, callback) { + var node, context + + //Allow for anonymous modules + if (typeof name !== 'string') { + //Adjust args appropriately + callback = deps + deps = name + name = null + } - //Always save off evaluating the def call until the script onload handler. - //This allows multiple modules to be in a file without prematurely - //tracing dependencies, and allows for anonymous module support, - //where the module name is not known until the script onload event - //occurs. If no context, use the global queue, and get it processed - //in the onscript load callback. - (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); - }; + //This module may not have dependencies + if (!isArray(deps)) { + callback = deps + deps = null + } - define.amd = { - jQuery: true - }; + //If no name, and callback is a function, then figure out if it a + //CommonJS thing with dependencies. + if (!deps && isFunction(callback)) { + deps = [] + //Remove comments from the callback string, + //look for require calls, and pull them into the dependencies, + //but only if there are function args. + if (callback.length) { + callback + .toString() + .replace(commentRegExp, '') + .replace(cjsRequireRegExp, function (match, dep) { + deps.push(dep) + }) + + //May be a CommonJS thing even without require calls, but still + //could use exports, and module. Avoid doing exports and module + //work though if it just needs require. + //REQUIRES the function to expect the CommonJS variables in the + //order listed below. + deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps) + } + } + //If in IE 6-8 and hit an anonymous define() call, do the interactive + //work. + if (useInteractive) { + node = currentlyAddingScript || getInteractiveScript() + if (node) { + if (!name) { + name = node.getAttribute('data-requiremodule') + } + context = contexts[node.getAttribute('data-requirecontext')] + } + } - /** - * Executes the text. Normally just uses eval, but can be modified - * to use a better, environment-specific call. Only used for transpiling - * loader plugins, not for plain JS modules. - * @param {String} text the text to execute/evaluate. - */ - req.exec = function (text) { - /*jslint evil: true */ - return eval(text); - }; - - //Set up with config info. - req(cfg); -}(this)); + //Always save off evaluating the def call until the script onload handler. + //This allows multiple modules to be in a file without prematurely + //tracing dependencies, and allows for anonymous module support, + //where the module name is not known until the script onload event + //occurs. If no context, use the global queue, and get it processed + //in the onscript load callback. + ;(context ? context.defQueue : globalDefQueue).push([name, deps, callback]) + } + + define.amd = { + jQuery: true, + } + + /** + * Executes the text. Normally just uses eval, but can be modified + * to use a better, environment-specific call. Only used for transpiling + * loader plugins, not for plain JS modules. + * @param {String} text the text to execute/evaluate. + */ + req.exec = function (text) { + /*jslint evil: true */ + return eval(text) + } + + //Set up with config info. + req(cfg) +})(this) diff --git a/__test__/utils.classes.test.js b/__test__/utils.classes.test.js index 9ea0f3c7..e2ad006f 100644 --- a/__test__/utils.classes.test.js +++ b/__test__/utils.classes.test.js @@ -1,46 +1,45 @@ -const classes = require('../src/utils/classes'); +const classes = require('../src/utils/classes') -describe('Classes', function() { - var el; +describe('Classes', function () { + var el - beforeEach(function() { + beforeEach(function () { el = document.createElement('div') - document.body.appendChild(el); - }); + document.body.appendChild(el) + }) - afterEach(function() { - document.body.removeChild(el); - }); + afterEach(function () { + document.body.removeChild(el) + }) - it('should add', function() { + it('should add', function () { classes(el).add('show') - expect(el.getAttribute('class')).toBe('show'); - }); - it('should remove', function() { - el.setAttribute('class', 'show'); - expect(el.getAttribute('class')).toBe('show'); + expect(el.getAttribute('class')).toBe('show') + }) + it('should remove', function () { + el.setAttribute('class', 'show') + expect(el.getAttribute('class')).toBe('show') classes(el).remove('show') - expect(el.getAttribute('class')).toBe(''); - }); - it('should toggle', function() { + expect(el.getAttribute('class')).toBe('') + }) + it('should toggle', function () { classes(el).toggle('show') - expect(el.getAttribute('class')).toBe('show'); + expect(el.getAttribute('class')).toBe('show') classes(el).toggle('show') - expect(el.getAttribute('class')).toBe(''); - }); - it('should array', function() { - el.setAttribute('class', 'foo bar'); - expect(classes(el).array()).toEqual(['foo','bar']); - }); - it('should has', function() { - expect(classes(el).has('show')).toBe(false); - el.setAttribute('class', 'show'); - expect(classes(el).has('show')).toBe(true); - }); - it('should contains', function() { - expect(classes(el).contains('show')).toBe(false); - el.setAttribute('class', 'show'); - expect(classes(el).contains('show')).toBe(true); - }); - -}); + expect(el.getAttribute('class')).toBe('') + }) + it('should array', function () { + el.setAttribute('class', 'foo bar') + expect(classes(el).array()).toEqual(['foo', 'bar']) + }) + it('should has', function () { + expect(classes(el).has('show')).toBe(false) + el.setAttribute('class', 'show') + expect(classes(el).has('show')).toBe(true) + }) + it('should contains', function () { + expect(classes(el).contains('show')).toBe(false) + el.setAttribute('class', 'show') + expect(classes(el).contains('show')).toBe(true) + }) +}) diff --git a/__test__/utils.get-by-class.test.js b/__test__/utils.get-by-class.test.js index e1ececcf..b524b544 100644 --- a/__test__/utils.get-by-class.test.js +++ b/__test__/utils.get-by-class.test.js @@ -1,25 +1,25 @@ -const getByClass = require('../src/utils/get-by-class'); +const getByClass = require('../src/utils/get-by-class') -describe('GetByClass', function() { - var el; +describe('GetByClass', function () { + var el - beforeEach(function() { + beforeEach(function () { el = document.createElement('div') el.setAttribute('class', 'foo') - document.body.appendChild(el); - }); + document.body.appendChild(el) + }) - afterEach(function() { - document.body.removeChild(el); - }); + afterEach(function () { + document.body.removeChild(el) + }) - it('should use getElementsByClassName', function() { - expect(getByClass(document.body, 'foo', false, { test: true, getElementsByClassName: true}).length).toBe(1); - }); - it('should use getElementsByClassName', function() { - expect(getByClass(document.body, 'foo', false, { test: true, querySelector: true}).length).toBe(1); - }); - it('should toggle', function() { - expect(getByClass(document.body, 'foo', false, { test: true, polyfill: true}).length).toBe(1); - }); -}); + it('should use getElementsByClassName', function () { + expect(getByClass(document.body, 'foo', false, { test: true, getElementsByClassName: true }).length).toBe(1) + }) + it('should use getElementsByClassName', function () { + expect(getByClass(document.body, 'foo', false, { test: true, querySelector: true }).length).toBe(1) + }) + it('should toggle', function () { + expect(getByClass(document.body, 'foo', false, { test: true, polyfill: true }).length).toBe(1) + }) +}) diff --git a/package.json b/package.json index 063efacc..aefa1c9a 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "jshint": "^2.12.0", "jshint-loader": "^0.8.4", "webpack": "^3.12.0" + "prettier": "^2.2.0", }, "main": "src/index", "engines": { diff --git a/prettier.config.js b/prettier.config.js new file mode 100644 index 00000000..342b8e5c --- /dev/null +++ b/prettier.config.js @@ -0,0 +1,5 @@ +module.exports = { + semi: false, + singleQuote: true, + printWidth: 120, +} \ No newline at end of file diff --git a/src/add-async.js b/src/add-async.js index aa223f32..1e034ba3 100644 --- a/src/add-async.js +++ b/src/add-async.js @@ -1,16 +1,16 @@ -module.exports = function(list) { - var addAsync = function(values, callback, items) { - var valuesToAdd = values.splice(0, 50); - items = items || []; - items = items.concat(list.add(valuesToAdd)); +module.exports = function (list) { + var addAsync = function (values, callback, items) { + var valuesToAdd = values.splice(0, 50) + items = items || [] + items = items.concat(list.add(valuesToAdd)) if (values.length > 0) { - setTimeout(function() { - addAsync(values, callback, items); - }, 1); + setTimeout(function () { + addAsync(values, callback, items) + }, 1) } else { - list.update(); - callback(items); + list.update() + callback(items) } - }; - return addAsync; -}; + } + return addAsync +} diff --git a/src/filter.js b/src/filter.js index 4b147670..3fd79f38 100644 --- a/src/filter.js +++ b/src/filter.js @@ -1,29 +1,28 @@ -module.exports = function(list) { - +module.exports = function (list) { // Add handlers - list.handlers.filterStart = list.handlers.filterStart || []; - list.handlers.filterComplete = list.handlers.filterComplete || []; + list.handlers.filterStart = list.handlers.filterStart || [] + list.handlers.filterComplete = list.handlers.filterComplete || [] - return function(filterFunction) { - list.trigger('filterStart'); - list.i = 1; // Reset paging - list.reset.filter(); + return function (filterFunction) { + list.trigger('filterStart') + list.i = 1 // Reset paging + list.reset.filter() if (filterFunction === undefined) { - list.filtered = false; + list.filtered = false } else { - list.filtered = true; - var is = list.items; + list.filtered = true + var is = list.items for (var i = 0, il = is.length; i < il; i++) { - var item = is[i]; + var item = is[i] if (filterFunction(item)) { - item.filtered = true; + item.filtered = true } else { - item.filtered = false; + item.filtered = false } } } - list.update(); - list.trigger('filterComplete'); - return list.visibleItems; - }; -}; + list.update() + list.trigger('filterComplete') + return list.visibleItems + } +} diff --git a/src/fuzzy-search.js b/src/fuzzy-search.js index ac49dfa1..0c44d189 100644 --- a/src/fuzzy-search.js +++ b/src/fuzzy-search.js @@ -1,67 +1,66 @@ - var classes = require('./utils/classes'), events = require('./utils/events'), extend = require('./utils/extend'), toString = require('./utils/to-string'), getByClass = require('./utils/get-by-class'), - fuzzy = require('./utils/fuzzy'); - -module.exports = function(list, options) { - options = options || {}; - - options = extend({ - location: 0, - distance: 100, - threshold: 0.4, - multiSearch: true, - searchClass: 'fuzzy-search' - }, options); + fuzzy = require('./utils/fuzzy') +module.exports = function (list, options) { + options = options || {} + options = extend( + { + location: 0, + distance: 100, + threshold: 0.4, + multiSearch: true, + searchClass: 'fuzzy-search', + }, + options + ) var fuzzySearch = { - search: function(searchString, columns) { + search: function (searchString, columns) { // Substract arguments from the searchString or put searchString as only argument - var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]; + var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString] for (var k = 0, kl = list.items.length; k < kl; k++) { - fuzzySearch.item(list.items[k], columns, searchArguments); + fuzzySearch.item(list.items[k], columns, searchArguments) } }, - item: function(item, columns, searchArguments) { - var found = true; - for(var i = 0; i < searchArguments.length; i++) { - var foundArgument = false; + item: function (item, columns, searchArguments) { + var found = true + for (var i = 0; i < searchArguments.length; i++) { + var foundArgument = false for (var j = 0, jl = columns.length; j < jl; j++) { if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) { - foundArgument = true; + foundArgument = true } } - if(!foundArgument) { - found = false; + if (!foundArgument) { + found = false } } - item.found = found; + item.found = found }, - values: function(values, value, searchArgument) { + values: function (values, value, searchArgument) { if (values.hasOwnProperty(value)) { - var text = toString(values[value]).toLowerCase(); + var text = toString(values[value]).toLowerCase() if (fuzzy(text, searchArgument, options)) { - return true; + return true } } - return false; - } - }; - + return false + }, + } - events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) { - var target = e.target || e.srcElement; // IE have srcElement - list.search(target.value, fuzzySearch.search); - }); + events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) { + var target = e.target || e.srcElement // IE have srcElement + list.search(target.value, fuzzySearch.search) + }) - return function(str, columns) { - list.search(str, columns, fuzzySearch.search); - }; -}; + return function (str, columns) { + list.search(str, columns, fuzzySearch.search) + } +} diff --git a/src/index.js b/src/index.js index 887019ff..816bcaaa 100644 --- a/src/index.js +++ b/src/index.js @@ -6,32 +6,31 @@ var naturalSort = require('string-natural-compare'), toString = require('./utils/to-string'), classes = require('./utils/classes'), getAttribute = require('./utils/get-attribute'), - toArray = require('./utils/to-array'); - -module.exports = function(id, options, values) { + toArray = require('./utils/to-array') +module.exports = function (id, options, values) { var self = this, init, Item = require('./item')(self), addAsync = require('./add-async')(self), - initPagination = require('./pagination')(self); + initPagination = require('./pagination')(self) init = { - start: function() { - self.listClass = "list"; - self.searchClass = "search"; - self.sortClass = "sort"; - self.page = 10000; - self.i = 1; - self.items = []; - self.visibleItems = []; - self.matchingItems = []; - self.searched = false; - self.filtered = false; - self.searchColumns = undefined; - self.handlers = { 'updated': [] }; - self.valueNames = []; - self.utils = { + start: function () { + self.listClass = 'list' + self.searchClass = 'search' + self.sortClass = 'sort' + self.page = 10000 + self.i = 1 + self.items = [] + self.visibleItems = [] + self.matchingItems = [] + self.searched = false + self.filtered = false + self.searchColumns = undefined + self.handlers = { updated: [] } + self.valueNames = [] + self.utils = { getByClass: getByClass, extend: extend, indexOf: indexOf, @@ -40,223 +39,224 @@ module.exports = function(id, options, values) { naturalSort: naturalSort, classes: classes, getAttribute: getAttribute, - toArray: toArray - }; + toArray: toArray, + } - self.utils.extend(self, options); + self.utils.extend(self, options) - self.listContainer = (typeof(id) === 'string') ? document.getElementById(id) : id; - if (!self.listContainer) { return; } - self.list = getByClass(self.listContainer, self.listClass, true); + self.listContainer = typeof id === 'string' ? document.getElementById(id) : id + if (!self.listContainer) { + return + } + self.list = getByClass(self.listContainer, self.listClass, true) - self.parse = require('./parse')(self); - self.templater = require('./templater')(self); - self.search = require('./search')(self); - self.filter = require('./filter')(self); - self.sort = require('./sort')(self); - self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch); + self.parse = require('./parse')(self) + self.templater = require('./templater')(self) + self.search = require('./search')(self) + self.filter = require('./filter')(self) + self.sort = require('./sort')(self) + self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch) - this.handlers(); - this.items(); - this.pagination(); + this.handlers() + this.items() + this.pagination() - self.update(); + self.update() }, - handlers: function() { + handlers: function () { for (var handler in self.handlers) { if (self[handler]) { - self.on(handler, self[handler]); + self.on(handler, self[handler]) } } }, - items: function() { - self.parse(self.list); + items: function () { + self.parse(self.list) if (values !== undefined) { - self.add(values); + self.add(values) } }, - pagination: function() { + pagination: function () { if (options.pagination !== undefined) { if (options.pagination === true) { - options.pagination = [{}]; + options.pagination = [{}] } - if (options.pagination[0] === undefined){ - options.pagination = [options.pagination]; + if (options.pagination[0] === undefined) { + options.pagination = [options.pagination] } for (var i = 0, il = options.pagination.length; i < il; i++) { - initPagination(options.pagination[i]); + initPagination(options.pagination[i]) } } - } - }; + }, + } /* - * Re-parse the List, use if html have changed - */ - this.reIndex = function() { - self.items = []; - self.visibleItems = []; - self.matchingItems = []; - self.searched = false; - self.filtered = false; - self.parse(self.list); - }; + * Re-parse the List, use if html have changed + */ + this.reIndex = function () { + self.items = [] + self.visibleItems = [] + self.matchingItems = [] + self.searched = false + self.filtered = false + self.parse(self.list) + } - this.toJSON = function() { - var json = []; + this.toJSON = function () { + var json = [] for (var i = 0, il = self.items.length; i < il; i++) { - json.push(self.items[i].values()); + json.push(self.items[i].values()) } - return json; - }; - + return json + } /* - * Add object to list - */ - this.add = function(values, callback) { + * Add object to list + */ + this.add = function (values, callback) { if (values.length === 0) { - return; + return } if (callback) { - addAsync(values, callback); - return; + addAsync(values, callback) + return } var added = [], - notCreate = false; - if (values[0] === undefined){ - values = [values]; + notCreate = false + if (values[0] === undefined) { + values = [values] } for (var i = 0, il = values.length; i < il; i++) { - var item = null; - notCreate = (self.items.length > self.page) ? true : false; - item = new Item(values[i], undefined, notCreate); - self.items.push(item); - added.push(item); + var item = null + notCreate = self.items.length > self.page ? true : false + item = new Item(values[i], undefined, notCreate) + self.items.push(item) + added.push(item) } - self.update(); - return added; - }; + self.update() + return added + } - this.show = function(i, page) { - this.i = i; - this.page = page; - self.update(); - return self; - }; + this.show = function (i, page) { + this.i = i + this.page = page + self.update() + return self + } /* Removes object from list. - * Loops through the list and removes objects where - * property "valuename" === value - */ - this.remove = function(valueName, value, options) { - var found = 0; + * Loops through the list and removes objects where + * property "valuename" === value + */ + this.remove = function (valueName, value, options) { + var found = 0 for (var i = 0, il = self.items.length; i < il; i++) { if (self.items[i].values()[valueName] == value) { - self.templater.remove(self.items[i], options); - self.items.splice(i,1); - il--; - i--; - found++; + self.templater.remove(self.items[i], options) + self.items.splice(i, 1) + il-- + i-- + found++ } } - self.update(); - return found; - }; + self.update() + return found + } /* Gets the objects in the list which - * property "valueName" === value - */ - this.get = function(valueName, value) { - var matchedItems = []; + * property "valueName" === value + */ + this.get = function (valueName, value) { + var matchedItems = [] for (var i = 0, il = self.items.length; i < il; i++) { - var item = self.items[i]; + var item = self.items[i] if (item.values()[valueName] == value) { - matchedItems.push(item); + matchedItems.push(item) } } - return matchedItems; - }; + return matchedItems + } /* - * Get size of the list - */ - this.size = function() { - return self.items.length; - }; + * Get size of the list + */ + this.size = function () { + return self.items.length + } /* - * Removes all items from the list - */ - this.clear = function() { - self.templater.clear(); - self.items = []; - return self; - }; + * Removes all items from the list + */ + this.clear = function () { + self.templater.clear() + self.items = [] + return self + } - this.on = function(event, callback) { - self.handlers[event].push(callback); - return self; - }; + this.on = function (event, callback) { + self.handlers[event].push(callback) + return self + } - this.off = function(event, callback) { - var e = self.handlers[event]; - var index = indexOf(e, callback); + this.off = function (event, callback) { + var e = self.handlers[event] + var index = indexOf(e, callback) if (index > -1) { - e.splice(index, 1); + e.splice(index, 1) } - return self; - }; + return self + } - this.trigger = function(event) { - var i = self.handlers[event].length; - while(i--) { - self.handlers[event][i](self); + this.trigger = function (event) { + var i = self.handlers[event].length + while (i--) { + self.handlers[event][i](self) } - return self; - }; + return self + } this.reset = { - filter: function() { + filter: function () { var is = self.items, - il = is.length; + il = is.length while (il--) { - is[il].filtered = false; + is[il].filtered = false } - return self; + return self }, - search: function() { + search: function () { var is = self.items, - il = is.length; + il = is.length while (il--) { - is[il].found = false; + is[il].found = false } - return self; - } - }; + return self + }, + } - this.update = function() { + this.update = function () { var is = self.items, - il = is.length; + il = is.length - self.visibleItems = []; - self.matchingItems = []; - self.templater.clear(); + self.visibleItems = [] + self.matchingItems = [] + self.templater.clear() for (var i = 0; i < il; i++) { - if (is[i].matching() && ((self.matchingItems.length+1) >= self.i && self.visibleItems.length < self.page)) { - is[i].show(); - self.visibleItems.push(is[i]); - self.matchingItems.push(is[i]); + if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) { + is[i].show() + self.visibleItems.push(is[i]) + self.matchingItems.push(is[i]) } else if (is[i].matching()) { - self.matchingItems.push(is[i]); - is[i].hide(); + self.matchingItems.push(is[i]) + is[i].hide() } else { - is[i].hide(); + is[i].hide() } } - self.trigger('updated'); - return self; - }; + self.trigger('updated') + return self + } - init.start(); -}; + init.start() +} diff --git a/src/item.js b/src/item.js index f5ab9a18..41410625 100644 --- a/src/item.js +++ b/src/item.js @@ -1,60 +1,60 @@ -module.exports = function(list) { - return function(initValues, element, notCreate) { - var item = this; +module.exports = function (list) { + return function (initValues, element, notCreate) { + var item = this - this._values = {}; + this._values = {} - this.found = false; // Show if list.searched == true and this.found == true - this.filtered = false;// Show if list.filtered == true and this.filtered == true + this.found = false // Show if list.searched == true and this.found == true + this.filtered = false // Show if list.filtered == true and this.filtered == true - var init = function(initValues, element, notCreate) { + var init = function (initValues, element, notCreate) { if (element === undefined) { if (notCreate) { - item.values(initValues, notCreate); + item.values(initValues, notCreate) } else { - item.values(initValues); + item.values(initValues) } } else { - item.elm = element; - var values = list.templater.get(item, initValues); - item.values(values); + item.elm = element + var values = list.templater.get(item, initValues) + item.values(values) } - }; + } - this.values = function(newValues, notCreate) { + this.values = function (newValues, notCreate) { if (newValues !== undefined) { - for(var name in newValues) { - item._values[name] = newValues[name]; + for (var name in newValues) { + item._values[name] = newValues[name] } if (notCreate !== true) { - list.templater.set(item, item.values()); + list.templater.set(item, item.values()) } } else { - return item._values; + return item._values } - }; + } - this.show = function() { - list.templater.show(item); - }; + this.show = function () { + list.templater.show(item) + } - this.hide = function() { - list.templater.hide(item); - }; + this.hide = function () { + list.templater.hide(item) + } - this.matching = function() { + this.matching = function () { return ( (list.filtered && list.searched && item.found && item.filtered) || (list.filtered && !list.searched && item.filtered) || (!list.filtered && list.searched && item.found) || (!list.filtered && !list.searched) - ); - }; + ) + } - this.visible = function() { - return (item.elm && (item.elm.parentNode == list.list)) ? true : false; - }; + this.visible = function () { + return item.elm && item.elm.parentNode == list.list ? true : false + } - init(initValues, element, notCreate); - }; -}; + init(initValues, element, notCreate) + } +} diff --git a/src/pagination.js b/src/pagination.js index 69e9f5e7..203c195d 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -1,17 +1,17 @@ var classes = require('./utils/classes'), events = require('./utils/events'), - List = require('./index'); + List = require('./index') -module.exports = function(list) { - var isHidden = false; +module.exports = function (list) { + var isHidden = false - var refresh = function(pagingList, options) { + var refresh = function (pagingList, options) { if (list.page < 1) { - list.listContainer.style.display = 'none'; - isHidden = true; - return; - } else if (isHidden){ - list.listContainer.style.display = 'block'; + list.listContainer.style.display = 'none' + isHidden = true + return + } else if (isHidden) { + list.listContainer.style.display = 'block' } var item, @@ -19,87 +19,90 @@ module.exports = function(list) { index = list.i, page = list.page, pages = Math.ceil(l / page), - currentPage = Math.ceil((index / page)), + currentPage = Math.ceil(index / page), innerWindow = options.innerWindow || 2, left = options.left || options.outerWindow || 0, - right = options.right || options.outerWindow || 0; + right = options.right || options.outerWindow || 0 - right = pages - right; - pagingList.clear(); + right = pages - right + pagingList.clear() for (var i = 1; i <= pages; i++) { - var className = (currentPage === i) ? "active" : ""; + var className = currentPage === i ? 'active' : '' //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className); if (is.number(i, left, right, currentPage, innerWindow)) { item = pagingList.add({ page: i, - dotted: false - })[0]; + dotted: false, + })[0] if (className) { - classes(item.elm).add(className); + classes(item.elm).add(className) } - item.elm.firstChild.setAttribute('data-i', i); - item.elm.firstChild.setAttribute('data-page', page); + item.elm.firstChild.setAttribute('data-i', i) + item.elm.firstChild.setAttribute('data-page', page) } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) { item = pagingList.add({ - page: "...", - dotted: true - })[0]; - classes(item.elm).add("disabled"); + page: '...', + dotted: true, + })[0] + classes(item.elm).add('disabled') } } - }; + } var is = { - number: function(i, left, right, currentPage, innerWindow) { - return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow); + number: function (i, left, right, currentPage, innerWindow) { + return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow) }, - left: function(i, left) { - return (i <= left); + left: function (i, left) { + return i <= left }, - right: function(i, right) { - return (i > right); + right: function (i, right) { + return i > right }, - innerWindow: function(i, currentPage, innerWindow) { - return ( i >= (currentPage - innerWindow) && i <= (currentPage + innerWindow)); + innerWindow: function (i, currentPage, innerWindow) { + return i >= currentPage - innerWindow && i <= currentPage + innerWindow }, - dotted: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { - return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || (this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)); + dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + return ( + this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || + this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) + ) }, - dottedLeft: function(pagingList, i, left, right, currentPage, innerWindow) { - return ((i == (left + 1)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) { + return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right) }, - dottedRight: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { - if (pagingList.items[currentPageItem-1].values().dotted) { - return false; + dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + if (pagingList.items[currentPageItem - 1].values().dotted) { + return false } else { - return ((i == (right)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right) } - } - }; + }, + } - return function(options) { + return function (options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', item: "
                                      • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', - sortClass: 'pagination-sort-that-is-not-supposed-to-exist' - }); + sortClass: 'pagination-sort-that-is-not-supposed-to-exist', + }) - events.bind(pagingList.listContainer, 'click', function(e) { - var target = e.target || e.srcElement - , page = list.utils.getAttribute(target, 'data-page') - , i = list.utils.getAttribute(target, 'data-i'); - if(i){ - list.show((i-1)*page + 1, page); + events.bind(pagingList.listContainer, 'click', function (e) { + var target = e.target || e.srcElement, + page = list.utils.getAttribute(target, 'data-page'), + i = list.utils.getAttribute(target, 'data-i') + if (i) { + list.show((i - 1) * page + 1, page) } - }); + }) - list.on('updated', function() { - refresh(pagingList, options); - }); - refresh(pagingList, options); - }; -}; + list.on('updated', function () { + refresh(pagingList, options) + }) + refresh(pagingList, options) + } +} diff --git a/src/parse.js b/src/parse.js index 2294a476..0abe5900 100644 --- a/src/parse.js +++ b/src/parse.js @@ -1,47 +1,46 @@ -module.exports = function(list) { +module.exports = function (list) { + var Item = require('./item')(list) - var Item = require('./item')(list); - - var getChildren = function(parent) { + var getChildren = function (parent) { var nodes = parent.childNodes, - items = []; + items = [] for (var i = 0, il = nodes.length; i < il; i++) { // Only textnodes have a data attribute if (nodes[i].data === undefined) { - items.push(nodes[i]); + items.push(nodes[i]) } } - return items; - }; + return items + } - var parse = function(itemElements, valueNames) { + var parse = function (itemElements, valueNames) { for (var i = 0, il = itemElements.length; i < il; i++) { - list.items.push(new Item(valueNames, itemElements[i])); + list.items.push(new Item(valueNames, itemElements[i])) } - }; - var parseAsync = function(itemElements, valueNames) { - var itemsToIndex = itemElements.splice(0, 50); // TODO: If < 100 items, what happens in IE etc? - parse(itemsToIndex, valueNames); + } + var parseAsync = function (itemElements, valueNames) { + var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc? + parse(itemsToIndex, valueNames) if (itemElements.length > 0) { - setTimeout(function() { - parseAsync(itemElements, valueNames); - }, 1); + setTimeout(function () { + parseAsync(itemElements, valueNames) + }, 1) } else { - list.update(); - list.trigger('parseComplete'); + list.update() + list.trigger('parseComplete') } - }; + } - list.handlers.parseComplete = list.handlers.parseComplete || []; + list.handlers.parseComplete = list.handlers.parseComplete || [] - return function() { + return function () { var itemsToIndex = getChildren(list.list), - valueNames = list.valueNames; + valueNames = list.valueNames if (list.indexAsync) { - parseAsync(itemsToIndex, valueNames); + parseAsync(itemsToIndex, valueNames) } else { - parse(itemsToIndex, valueNames); + parse(itemsToIndex, valueNames) } - }; -}; + } +} diff --git a/src/search.js b/src/search.js index f7b0b6db..afdfaef9 100644 --- a/src/search.js +++ b/src/search.js @@ -1,120 +1,117 @@ -module.exports = function(list) { - var item, - text, - columns, - searchString, - customSearch; +module.exports = function (list) { + var item, text, columns, searchString, customSearch var prepare = { - resetList: function() { - list.i = 1; - list.templater.clear(); - customSearch = undefined; + resetList: function () { + list.i = 1 + list.templater.clear() + customSearch = undefined }, - setOptions: function(args) { + setOptions: function (args) { if (args.length == 2 && args[1] instanceof Array) { - columns = args[1]; - } else if (args.length == 2 && typeof(args[1]) == "function") { - columns = undefined; - customSearch = args[1]; + columns = args[1] + } else if (args.length == 2 && typeof args[1] == 'function') { + columns = undefined + customSearch = args[1] } else if (args.length == 3) { - columns = args[1]; - customSearch = args[2]; + columns = args[1] + customSearch = args[2] } else { - columns = undefined; + columns = undefined } }, - setColumns: function() { - if (list.items.length === 0) return; + setColumns: function () { + if (list.items.length === 0) return if (columns === undefined) { - columns = (list.searchColumns === undefined) ? prepare.toArray(list.items[0].values()) : list.searchColumns; + columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns } }, - setSearchString: function(s) { - s = list.utils.toString(s).toLowerCase(); - s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); // Escape regular expression characters - searchString = s; + setSearchString: function (s) { + s = list.utils.toString(s).toLowerCase() + s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, '\\$&') // Escape regular expression characters + searchString = s }, - toArray: function(values) { - var tmpColumn = []; + toArray: function (values) { + var tmpColumn = [] for (var name in values) { - tmpColumn.push(name); + tmpColumn.push(name) } - return tmpColumn; - } - }; + return tmpColumn + }, + } var search = { - list: function() { + list: function () { for (var k = 0, kl = list.items.length; k < kl; k++) { - search.item(list.items[k]); + search.item(list.items[k]) } }, - item: function(item) { - item.found = false; + item: function (item) { + item.found = false for (var j = 0, jl = columns.length; j < jl; j++) { if (search.values(item.values(), columns[j])) { - item.found = true; - return; + item.found = true + return } } }, - values: function(values, column) { + values: function (values, column) { if (values.hasOwnProperty(column)) { - text = list.utils.toString(values[column]).toLowerCase(); - if ((searchString !== "") && (text.search(searchString) > -1)) { - return true; + text = list.utils.toString(values[column]).toLowerCase() + if (searchString !== '' && text.search(searchString) > -1) { + return true } } - return false; + return false }, - reset: function() { - list.reset.search(); - list.searched = false; - } - }; + reset: function () { + list.reset.search() + list.searched = false + }, + } - var searchMethod = function(str) { - list.trigger('searchStart'); + var searchMethod = function (str) { + list.trigger('searchStart') - prepare.resetList(); - prepare.setSearchString(str); - prepare.setOptions(arguments); // str, cols|searchFunction, searchFunction - prepare.setColumns(); + prepare.resetList() + prepare.setSearchString(str) + prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction + prepare.setColumns() - if (searchString === "" ) { - search.reset(); + if (searchString === '') { + search.reset() } else { - list.searched = true; + list.searched = true if (customSearch) { - customSearch(searchString, columns); + customSearch(searchString, columns) } else { - search.list(); + search.list() } } - list.update(); - list.trigger('searchComplete'); - return list.visibleItems; - }; + list.update() + list.trigger('searchComplete') + return list.visibleItems + } - list.handlers.searchStart = list.handlers.searchStart || []; - list.handlers.searchComplete = list.handlers.searchComplete || []; + list.handlers.searchStart = list.handlers.searchStart || [] + list.handlers.searchComplete = list.handlers.searchComplete || [] - list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function(e) { + list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) { var target = e.target || e.srcElement, // IE have srcElement - alreadyCleared = (target.value === "" && !list.searched); - if (!alreadyCleared) { // If oninput already have resetted the list, do nothing - searchMethod(target.value); + alreadyCleared = target.value === '' && !list.searched + if (!alreadyCleared) { + // If oninput already have resetted the list, do nothing + searchMethod(target.value) } - }); + }) // Used to detect click on HTML5 clear button - list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function(e) { - var target = e.target || e.srcElement; - if (target.value === "") { - searchMethod(''); + list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) { + var target = e.target || e.srcElement + if (target.value === '') { + searchMethod('') } - }); + }) - return searchMethod; -}; + return searchMethod +} diff --git a/src/sort.js b/src/sort.js index 8a59b0a3..4e4b415f 100644 --- a/src/sort.js +++ b/src/sort.js @@ -1,106 +1,104 @@ -module.exports = function(list) { - +module.exports = function (list) { var buttons = { els: undefined, - clear: function() { + clear: function () { for (var i = 0, il = buttons.els.length; i < il; i++) { - list.utils.classes(buttons.els[i]).remove('asc'); - list.utils.classes(buttons.els[i]).remove('desc'); + list.utils.classes(buttons.els[i]).remove('asc') + list.utils.classes(buttons.els[i]).remove('desc') } }, - getOrder: function(btn) { - var predefinedOrder = list.utils.getAttribute(btn, 'data-order'); - if (predefinedOrder == "asc" || predefinedOrder == "desc") { - return predefinedOrder; + getOrder: function (btn) { + var predefinedOrder = list.utils.getAttribute(btn, 'data-order') + if (predefinedOrder == 'asc' || predefinedOrder == 'desc') { + return predefinedOrder } else if (list.utils.classes(btn).has('desc')) { - return "asc"; + return 'asc' } else if (list.utils.classes(btn).has('asc')) { - return "desc"; + return 'desc' } else { - return "asc"; + return 'asc' } }, - getInSensitive: function(btn, options) { - var insensitive = list.utils.getAttribute(btn, 'data-insensitive'); - if (insensitive === "false") { - options.insensitive = false; + getInSensitive: function (btn, options) { + var insensitive = list.utils.getAttribute(btn, 'data-insensitive') + if (insensitive === 'false') { + options.insensitive = false } else { - options.insensitive = true; + options.insensitive = true } }, - setOrder: function(options) { + setOrder: function (options) { for (var i = 0, il = buttons.els.length; i < il; i++) { - var btn = buttons.els[i]; + var btn = buttons.els[i] if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) { - continue; + continue } - var predefinedOrder = list.utils.getAttribute(btn, 'data-order'); - if (predefinedOrder == "asc" || predefinedOrder == "desc") { + var predefinedOrder = list.utils.getAttribute(btn, 'data-order') + if (predefinedOrder == 'asc' || predefinedOrder == 'desc') { if (predefinedOrder == options.order) { - list.utils.classes(btn).add(options.order); + list.utils.classes(btn).add(options.order) } } else { - list.utils.classes(btn).add(options.order); + list.utils.classes(btn).add(options.order) } } - } - }; + }, + } - var sort = function() { - list.trigger('sortStart'); - var options = {}; + var sort = function () { + list.trigger('sortStart') + var options = {} - var target = arguments[0].currentTarget || arguments[0].srcElement || undefined; + var target = arguments[0].currentTarget || arguments[0].srcElement || undefined if (target) { - options.valueName = list.utils.getAttribute(target, 'data-sort'); - buttons.getInSensitive(target, options); - options.order = buttons.getOrder(target); + options.valueName = list.utils.getAttribute(target, 'data-sort') + buttons.getInSensitive(target, options) + options.order = buttons.getOrder(target) } else { - options = arguments[1] || options; - options.valueName = arguments[0]; - options.order = options.order || "asc"; - options.insensitive = (typeof options.insensitive == "undefined") ? true : options.insensitive; + options = arguments[1] || options + options.valueName = arguments[0] + options.order = options.order || 'asc' + options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive } - buttons.clear(); - buttons.setOrder(options); - + buttons.clear() + buttons.setOrder(options) // caseInsensitive // alphabet - var customSortFunction = (options.sortFunction || list.sortFunction || null), - multi = ((options.order === 'desc') ? -1 : 1), - sortFunction; + var customSortFunction = options.sortFunction || list.sortFunction || null, + multi = options.order === 'desc' ? -1 : 1, + sortFunction if (customSortFunction) { - sortFunction = function(itemA, itemB) { - return customSortFunction(itemA, itemB, options) * multi; - }; + sortFunction = function (itemA, itemB) { + return customSortFunction(itemA, itemB, options) * multi + } } else { - sortFunction = function(itemA, itemB) { - var sort = list.utils.naturalSort; - sort.alphabet = list.alphabet || options.alphabet || undefined; + sortFunction = function (itemA, itemB) { + var sort = list.utils.naturalSort + sort.alphabet = list.alphabet || options.alphabet || undefined if (!sort.alphabet && options.insensitive) { - sort = list.utils.naturalSort.caseInsensitive; + sort = list.utils.naturalSort.caseInsensitive } - return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi; - }; + return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi + } } - list.items.sort(sortFunction); - list.update(); - list.trigger('sortComplete'); - }; + list.items.sort(sortFunction) + list.update() + list.trigger('sortComplete') + } // Add handlers - list.handlers.sortStart = list.handlers.sortStart || []; - list.handlers.sortComplete = list.handlers.sortComplete || []; + list.handlers.sortStart = list.handlers.sortStart || [] + list.handlers.sortComplete = list.handlers.sortComplete || [] - buttons.els = list.utils.getByClass(list.listContainer, list.sortClass); - list.utils.events.bind(buttons.els, 'click', sort); - list.on('searchStart', buttons.clear); - list.on('filterStart', buttons.clear); + buttons.els = list.utils.getByClass(list.listContainer, list.sortClass) + list.utils.events.bind(buttons.els, 'click', sort) + list.on('searchStart', buttons.clear) + list.on('filterStart', buttons.clear) - return sort; -}; + return sort +} diff --git a/src/templater.js b/src/templater.js index ba37138f..83b91197 100644 --- a/src/templater.js +++ b/src/templater.js @@ -1,174 +1,172 @@ -var Templater = function(list) { +var Templater = function (list) { var itemSource, - templater = this; + templater = this - var init = function() { - itemSource = templater.getItemSource(list.item); + var init = function () { + itemSource = templater.getItemSource(list.item) if (itemSource) { - itemSource = templater.clearSourceItem(itemSource, list.valueNames); + itemSource = templater.clearSourceItem(itemSource, list.valueNames) } - }; + } - this.clearSourceItem = function(el, valueNames) { - for(var i = 0, il = valueNames.length; i < il; i++) { - var elm; + this.clearSourceItem = function (el, valueNames) { + for (var i = 0, il = valueNames.length; i < il; i++) { + var elm if (valueNames[i].data) { for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - el.setAttribute('data-'+valueNames[i].data[j], ''); + el.setAttribute('data-' + valueNames[i].data[j], '') } } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(el, valueNames[i].name, true); + elm = list.utils.getByClass(el, valueNames[i].name, true) if (elm) { - elm.setAttribute(valueNames[i].attr, ""); + elm.setAttribute(valueNames[i].attr, '') } } else { - elm = list.utils.getByClass(el, valueNames[i], true); + elm = list.utils.getByClass(el, valueNames[i], true) if (elm) { - elm.innerHTML = ""; + elm.innerHTML = '' } } - elm = undefined; + elm = undefined } - return el; - }; + return el + } - this.getItemSource = function(item) { + this.getItemSource = function (item) { if (item === undefined) { var nodes = list.list.childNodes, - items = []; + items = [] for (var i = 0, il = nodes.length; i < il; i++) { // Only textnodes have a data attribute if (nodes[i].data === undefined) { - return nodes[i].cloneNode(true); + return nodes[i].cloneNode(true) } } } else if (/]/g.exec(item)) { - var tbody = document.createElement('tbody'); - tbody.innerHTML = item; - return tbody.firstChild; - } else if (item.indexOf("<") !== -1) { - var div = document.createElement('div'); - div.innerHTML = item; - return div.firstChild; + var tbody = document.createElement('tbody') + tbody.innerHTML = item + return tbody.firstChild + } else if (item.indexOf('<') !== -1) { + var div = document.createElement('div') + div.innerHTML = item + return div.firstChild } else { - var source = document.getElementById(list.item); + var source = document.getElementById(list.item) if (source) { - return source; + return source } } - return undefined; - }; + return undefined + } - this.get = function(item, valueNames) { - templater.create(item); - var values = {}; - for(var i = 0, il = valueNames.length; i < il; i++) { - var elm; + this.get = function (item, valueNames) { + templater.create(item) + var values = {} + for (var i = 0, il = valueNames.length; i < il; i++) { + var elm if (valueNames[i].data) { for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-'+valueNames[i].data[j]); + values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j]) } } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(item.elm, valueNames[i].name, true); - values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ""; + elm = list.utils.getByClass(item.elm, valueNames[i].name, true) + values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : '' } else { - elm = list.utils.getByClass(item.elm, valueNames[i], true); - values[valueNames[i]] = elm ? elm.innerHTML : ""; + elm = list.utils.getByClass(item.elm, valueNames[i], true) + values[valueNames[i]] = elm ? elm.innerHTML : '' } - elm = undefined; + elm = undefined } - return values; - }; + return values + } - this.set = function(item, values) { - var getValueName = function(name) { + this.set = function (item, values) { + var getValueName = function (name) { for (var i = 0, il = list.valueNames.length; i < il; i++) { if (list.valueNames[i].data) { - var data = list.valueNames[i].data; + var data = list.valueNames[i].data for (var j = 0, jl = data.length; j < jl; j++) { if (data[j] === name) { - return { data: name }; + return { data: name } } } } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) { - return list.valueNames[i]; + return list.valueNames[i] } else if (list.valueNames[i] === name) { - return name; + return name } } - }; - var setValue = function(name, value) { - var elm; - var valueName = getValueName(name); - if (!valueName) - return; + } + var setValue = function (name, value) { + var elm + var valueName = getValueName(name) + if (!valueName) return if (valueName.data) { - item.elm.setAttribute('data-'+valueName.data, value); + item.elm.setAttribute('data-' + valueName.data, value) } else if (valueName.attr && valueName.name) { - elm = list.utils.getByClass(item.elm, valueName.name, true); + elm = list.utils.getByClass(item.elm, valueName.name, true) if (elm) { - elm.setAttribute(valueName.attr, value); + elm.setAttribute(valueName.attr, value) } } else { - elm = list.utils.getByClass(item.elm, valueName, true); + elm = list.utils.getByClass(item.elm, valueName, true) if (elm) { - elm.innerHTML = value; + elm.innerHTML = value } } - elm = undefined; - }; + elm = undefined + } if (!templater.create(item)) { - for(var v in values) { + for (var v in values) { if (values.hasOwnProperty(v)) { - setValue(v, values[v]); + setValue(v, values[v]) } } } - }; + } - this.create = function(item) { + this.create = function (item) { if (item.elm !== undefined) { - return false; + return false } if (itemSource === undefined) { - throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.") } /* If item source does not exists, use the first item in list as source for new items */ - var newItem = itemSource.cloneNode(true); - newItem.removeAttribute('id'); - item.elm = newItem; - templater.set(item, item.values()); - return true; - }; - this.remove = function(item) { + var newItem = itemSource.cloneNode(true) + newItem.removeAttribute('id') + item.elm = newItem + templater.set(item, item.values()) + return true + } + this.remove = function (item) { if (item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); + list.list.removeChild(item.elm) } - }; - this.show = function(item) { - templater.create(item); - list.list.appendChild(item.elm); - }; - this.hide = function(item) { + } + this.show = function (item) { + templater.create(item) + list.list.appendChild(item.elm) + } + this.hide = function (item) { if (item.elm !== undefined && item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); + list.list.removeChild(item.elm) } - }; - this.clear = function() { + } + this.clear = function () { /* .innerHTML = ''; fucks up IE */ if (list.list.hasChildNodes()) { - while (list.list.childNodes.length >= 1) - { - list.list.removeChild(list.list.firstChild); + while (list.list.childNodes.length >= 1) { + list.list.removeChild(list.list.firstChild) } } - }; + } - init(); -}; + init() +} -module.exports = function(list) { - return new Templater(list); -}; +module.exports = function (list) { + return new Templater(list) +} diff --git a/src/utils/classes.js b/src/utils/classes.js index a48abba9..523f277d 100644 --- a/src/utils/classes.js +++ b/src/utils/classes.js @@ -2,19 +2,19 @@ * Module dependencies. */ -var index = require('./index-of'); +var index = require('./index-of') /** * Whitespace regexp. */ -var re = /\s+/; +var re = /\s+/ /** * toString reference. */ -var toString = Object.prototype.toString; +var toString = Object.prototype.toString /** * Wrap `el` in a `ClassList`. @@ -24,9 +24,9 @@ var toString = Object.prototype.toString; * @api public */ -module.exports = function(el){ - return new ClassList(el); -}; +module.exports = function (el) { + return new ClassList(el) +} /** * Initialize a new ClassList for `el`. @@ -37,10 +37,10 @@ module.exports = function(el){ function ClassList(el) { if (!el || !el.nodeType) { - throw new Error('A DOM element reference is required'); + throw new Error('A DOM element reference is required') } - this.el = el; - this.list = el.classList; + this.el = el + this.list = el.classList } /** @@ -51,20 +51,20 @@ function ClassList(el) { * @api public */ -ClassList.prototype.add = function(name){ +ClassList.prototype.add = function (name) { // classList if (this.list) { - this.list.add(name); - return this; + this.list.add(name) + return this } // fallback - var arr = this.array(); - var i = index(arr, name); - if (!~i) arr.push(name); - this.el.className = arr.join(' '); - return this; -}; + var arr = this.array() + var i = index(arr, name) + if (!~i) arr.push(name) + this.el.className = arr.join(' ') + return this +} /** * Remove class `name` when present, or @@ -76,21 +76,20 @@ ClassList.prototype.add = function(name){ * @api public */ -ClassList.prototype.remove = function(name){ +ClassList.prototype.remove = function (name) { // classList if (this.list) { - this.list.remove(name); - return this; + this.list.remove(name) + return this } // fallback - var arr = this.array(); - var i = index(arr, name); - if (~i) arr.splice(i, 1); - this.el.className = arr.join(' '); - return this; -}; - + var arr = this.array() + var i = index(arr, name) + if (~i) arr.splice(i, 1) + this.el.className = arr.join(' ') + return this +} /** * Toggle class `name`, can force state via `force`. @@ -104,36 +103,36 @@ ClassList.prototype.remove = function(name){ * @api public */ -ClassList.prototype.toggle = function(name, force){ +ClassList.prototype.toggle = function (name, force) { // classList if (this.list) { - if ("undefined" !== typeof force) { + if ('undefined' !== typeof force) { if (force !== this.list.toggle(name, force)) { - this.list.toggle(name); // toggle again to correct + this.list.toggle(name) // toggle again to correct } } else { - this.list.toggle(name); + this.list.toggle(name) } - return this; + return this } // fallback - if ("undefined" !== typeof force) { + if ('undefined' !== typeof force) { if (!force) { - this.remove(name); + this.remove(name) } else { - this.add(name); + this.add(name) } } else { if (this.has(name)) { - this.remove(name); + this.remove(name) } else { - this.add(name); + this.add(name) } } - return this; -}; + return this +} /** * Return an array of classes. @@ -142,13 +141,13 @@ ClassList.prototype.toggle = function(name, force){ * @api public */ -ClassList.prototype.array = function(){ - var className = this.el.getAttribute('class') || ''; - var str = className.replace(/^\s+|\s+$/g, ''); - var arr = str.split(re); - if ('' === arr[0]) arr.shift(); - return arr; -}; +ClassList.prototype.array = function () { + var className = this.el.getAttribute('class') || '' + var str = className.replace(/^\s+|\s+$/g, '') + var arr = str.split(re) + if ('' === arr[0]) arr.shift() + return arr +} /** * Check if class `name` is present. @@ -158,7 +157,6 @@ ClassList.prototype.array = function(){ * @api public */ -ClassList.prototype.has = -ClassList.prototype.contains = function(name){ - return this.list ? this.list.contains(name) : !! ~index(this.array(), name); -}; +ClassList.prototype.has = ClassList.prototype.contains = function (name) { + return this.list ? this.list.contains(name) : !!~index(this.array(), name) +} diff --git a/src/utils/events.js b/src/utils/events.js index 21695985..30aa97ce 100644 --- a/src/utils/events.js +++ b/src/utils/events.js @@ -1,7 +1,7 @@ var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', - unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', - prefix = bind !== 'addEventListener' ? 'on' : '', - toArray = require('./to-array'); + unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', + prefix = bind !== 'addEventListener' ? 'on' : '', + toArray = require('./to-array') /** * Bind `el` event `type` to `fn`. @@ -13,12 +13,12 @@ var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', * @api public */ -exports.bind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][bind](prefix + type, fn, capture || false); +exports.bind = function (el, type, fn, capture) { + el = toArray(el) + for (var i = 0; i < el.length; i++) { + el[i][bind](prefix + type, fn, capture || false) } -}; +} /** * Unbind `el` event `type`'s callback `fn`. @@ -30,9 +30,9 @@ exports.bind = function(el, type, fn, capture){ * @api public */ -exports.unbind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][unbind](prefix + type, fn, capture || false); +exports.unbind = function (el, type, fn, capture) { + el = toArray(el) + for (var i = 0; i < el.length; i++) { + el[i][unbind](prefix + type, fn, capture || false) } -}; +} diff --git a/src/utils/extend.js b/src/utils/extend.js index 9fc60375..38cbe56b 100644 --- a/src/utils/extend.js +++ b/src/utils/extend.js @@ -2,17 +2,17 @@ * Source: https://github.com/segmentio/extend */ -module.exports = function extend (object) { - // Takes an unlimited number of extenders. - var args = Array.prototype.slice.call(arguments, 1); +module.exports = function extend(object) { + // Takes an unlimited number of extenders. + var args = Array.prototype.slice.call(arguments, 1) - // For each extender, copy their properties on our object. - for (var i = 0, source; source = args[i]; i++) { - if (!source) continue; - for (var property in source) { - object[property] = source[property]; - } + // For each extender, copy their properties on our object. + for (var i = 0, source; (source = args[i]); i++) { + if (!source) continue + for (var property in source) { + object[property] = source[property] } + } - return object; -}; + return object +} diff --git a/src/utils/fuzzy.js b/src/utils/fuzzy.js index b63787f3..c123dfc4 100644 --- a/src/utils/fuzzy.js +++ b/src/utils/fuzzy.js @@ -1,123 +1,123 @@ -module.exports = function(text, pattern, options) { - // Aproximately where in the text is the pattern expected to be found? - var Match_Location = options.location || 0; +module.exports = function (text, pattern, options) { + // Aproximately where in the text is the pattern expected to be found? + var Match_Location = options.location || 0 - //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. - var Match_Distance = options.distance || 100; + //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. + var Match_Distance = options.distance || 100 - // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. - var Match_Threshold = options.threshold || 0.4; + // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. + var Match_Threshold = options.threshold || 0.4 - if (pattern === text) return true; // Exact match - if (pattern.length > 32) return false; // This algorithm cannot be used + if (pattern === text) return true // Exact match + if (pattern.length > 32) return false // This algorithm cannot be used - // Set starting location at beginning text and initialise the alphabet. - var loc = Match_Location, - s = (function() { - var q = {}, - i; + // Set starting location at beginning text and initialise the alphabet. + var loc = Match_Location, + s = (function () { + var q = {}, + i - for (i = 0; i < pattern.length; i++) { - q[pattern.charAt(i)] = 0; - } + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] = 0 + } - for (i = 0; i < pattern.length; i++) { - q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1); - } + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1) + } - return q; - }()); + return q + })() - // Compute and return the score for a match with e errors and x location. - // Accesses loc and pattern through being a closure. + // Compute and return the score for a match with e errors and x location. + // Accesses loc and pattern through being a closure. - function match_bitapScore_(e, x) { - var accuracy = e / pattern.length, - proximity = Math.abs(loc - x); + function match_bitapScore_(e, x) { + var accuracy = e / pattern.length, + proximity = Math.abs(loc - x) - if (!Match_Distance) { - // Dodge divide by zero error. - return proximity ? 1.0 : accuracy; - } - return accuracy + (proximity / Match_Distance); + if (!Match_Distance) { + // Dodge divide by zero error. + return proximity ? 1.0 : accuracy } + return accuracy + proximity / Match_Distance + } - var score_threshold = Match_Threshold, // Highest score beyond which we give up. - best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup) + var score_threshold = Match_Threshold, // Highest score beyond which we give up. + best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup) - if (best_loc != -1) { - score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); - // What about in the other direction? (speedup) - best_loc = text.lastIndexOf(pattern, loc + pattern.length); + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold) + // What about in the other direction? (speedup) + best_loc = text.lastIndexOf(pattern, loc + pattern.length) - if (best_loc != -1) { - score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); - } + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold) } - - // Initialise the bit arrays. - var matchmask = 1 << (pattern.length - 1); - best_loc = -1; - - var bin_min, bin_mid; - var bin_max = pattern.length + text.length; - var last_rd; - for (var d = 0; d < pattern.length; d++) { - // Scan for the best match; each iteration allows for one more error. - // Run a binary search to determine how far from 'loc' we can stray at this - // error level. - bin_min = 0; - bin_mid = bin_max; - while (bin_min < bin_mid) { - if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { - bin_min = bin_mid; - } else { - bin_max = bin_mid; - } - bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); - } - // Use the result from this iteration as the maximum for the next. - bin_max = bin_mid; - var start = Math.max(1, loc - bin_mid + 1); - var finish = Math.min(loc + bin_mid, text.length) + pattern.length; - - var rd = Array(finish + 2); - rd[finish + 1] = (1 << d) - 1; - for (var j = finish; j >= start; j--) { - // The alphabet (s) is a sparse hash, so the following line generates - // warnings. - var charMatch = s[text.charAt(j - 1)]; - if (d === 0) { // First pass: exact match. - rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; - } else { // Subsequent passes: fuzzy match. - rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | - (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | - last_rd[j + 1]; - } - if (rd[j] & matchmask) { - var score = match_bitapScore_(d, j - 1); - // This match will almost certainly be better than any existing match. - // But check anyway. - if (score <= score_threshold) { - // Told you so. - score_threshold = score; - best_loc = j - 1; - if (best_loc > loc) { - // When passing loc, don't exceed our current distance from loc. - start = Math.max(1, 2 * loc - best_loc); - } else { - // Already passed loc, downhill from here on in. - break; - } - } - } - } - // No hope for a (better) match at greater error levels. - if (match_bitapScore_(d + 1, loc) > score_threshold) { - break; + } + + // Initialise the bit arrays. + var matchmask = 1 << (pattern.length - 1) + best_loc = -1 + + var bin_min, bin_mid + var bin_max = pattern.length + text.length + var last_rd + for (var d = 0; d < pattern.length; d++) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from 'loc' we can stray at this + // error level. + bin_min = 0 + bin_mid = bin_max + while (bin_min < bin_mid) { + if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { + bin_min = bin_mid + } else { + bin_max = bin_mid + } + bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min) + } + // Use the result from this iteration as the maximum for the next. + bin_max = bin_mid + var start = Math.max(1, loc - bin_mid + 1) + var finish = Math.min(loc + bin_mid, text.length) + pattern.length + + var rd = Array(finish + 2) + rd[finish + 1] = (1 << d) - 1 + for (var j = finish; j >= start; j--) { + // The alphabet (s) is a sparse hash, so the following line generates + // warnings. + var charMatch = s[text.charAt(j - 1)] + if (d === 0) { + // First pass: exact match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch + } else { + // Subsequent passes: fuzzy match. + rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1] + } + if (rd[j] & matchmask) { + var score = match_bitapScore_(d, j - 1) + // This match will almost certainly be better than any existing match. + // But check anyway. + if (score <= score_threshold) { + // Told you so. + score_threshold = score + best_loc = j - 1 + if (best_loc > loc) { + // When passing loc, don't exceed our current distance from loc. + start = Math.max(1, 2 * loc - best_loc) + } else { + // Already passed loc, downhill from here on in. + break + } } - last_rd = rd; + } + } + // No hope for a (better) match at greater error levels. + if (match_bitapScore_(d + 1, loc) > score_threshold) { + break } + last_rd = rd + } - return (best_loc < 0) ? false : true; -}; + return best_loc < 0 ? false : true +} diff --git a/src/utils/get-attribute.js b/src/utils/get-attribute.js index 729e6514..72b87ffc 100644 --- a/src/utils/get-attribute.js +++ b/src/utils/get-attribute.js @@ -9,18 +9,18 @@ * @api public */ -module.exports = function(el, attr) { - var result = (el.getAttribute && el.getAttribute(attr)) || null; - if( !result ) { - var attrs = el.attributes; - var length = attrs.length; - for(var i = 0; i < length; i++) { +module.exports = function (el, attr) { + var result = (el.getAttribute && el.getAttribute(attr)) || null + if (!result) { + var attrs = el.attributes + var length = attrs.length + for (var i = 0; i < length; i++) { if (attr[i] !== undefined) { - if(attr[i].nodeName === attr) { - result = attr[i].nodeValue; + if (attr[i].nodeName === attr) { + result = attr[i].nodeValue } } } } - return result; -}; + return result +} diff --git a/src/utils/get-by-class.js b/src/utils/get-by-class.js index 28fcb855..46926f65 100644 --- a/src/utils/get-by-class.js +++ b/src/utils/get-by-class.js @@ -12,52 +12,52 @@ * @api public */ -var getElementsByClassName = function(container, className, single) { +var getElementsByClassName = function (container, className, single) { if (single) { - return container.getElementsByClassName(className)[0]; + return container.getElementsByClassName(className)[0] } else { - return container.getElementsByClassName(className); + return container.getElementsByClassName(className) } -}; +} -var querySelector = function(container, className, single) { - className = '.' + className; +var querySelector = function (container, className, single) { + className = '.' + className if (single) { - return container.querySelector(className); + return container.querySelector(className) } else { - return container.querySelectorAll(className); + return container.querySelectorAll(className) } -}; +} -var polyfill = function(container, className, single) { +var polyfill = function (container, className, single) { var classElements = [], - tag = '*'; + tag = '*' - var els = container.getElementsByTagName(tag); - var elsLen = els.length; - var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); + var els = container.getElementsByTagName(tag) + var elsLen = els.length + var pattern = new RegExp('(^|\\s)' + className + '(\\s|$)') for (var i = 0, j = 0; i < elsLen; i++) { - if ( pattern.test(els[i].className) ) { + if (pattern.test(els[i].className)) { if (single) { - return els[i]; + return els[i] } else { - classElements[j] = els[i]; - j++; + classElements[j] = els[i] + j++ } } } - return classElements; -}; + return classElements +} -module.exports = (function() { - return function(container, className, single, options) { - options = options || {}; +module.exports = (function () { + return function (container, className, single, options) { + options = options || {} if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) { - return getElementsByClassName(container, className, single); + return getElementsByClassName(container, className, single) } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) { - return querySelector(container, className, single); + return querySelector(container, className, single) } else { - return polyfill(container, className, single); + return polyfill(container, className, single) } - }; -})(); + } +})() diff --git a/src/utils/index-of.js b/src/utils/index-of.js index 4c261619..64bd312c 100644 --- a/src/utils/index-of.js +++ b/src/utils/index-of.js @@ -1,9 +1,9 @@ -var indexOf = [].indexOf; +var indexOf = [].indexOf -module.exports = function(arr, obj){ - if (indexOf) return arr.indexOf(obj); +module.exports = function (arr, obj) { + if (indexOf) return arr.indexOf(obj) for (var i = 0; i < arr.length; ++i) { - if (arr[i] === obj) return i; + if (arr[i] === obj) return i } - return -1; -}; + return -1 +} diff --git a/src/utils/to-array.js b/src/utils/to-array.js index 9fac2610..cb2e6e8c 100644 --- a/src/utils/to-array.js +++ b/src/utils/to-array.js @@ -10,24 +10,24 @@ */ module.exports = function toArray(collection) { - if (typeof collection === 'undefined') return []; - if (collection === null) return [null]; - if (collection === window) return [window]; - if (typeof collection === 'string') return [collection]; - if (isArray(collection)) return collection; - if (typeof collection.length != 'number') return [collection]; - if (typeof collection === 'function' && collection instanceof Function) return [collection]; + if (typeof collection === 'undefined') return [] + if (collection === null) return [null] + if (collection === window) return [window] + if (typeof collection === 'string') return [collection] + if (isArray(collection)) return collection + if (typeof collection.length != 'number') return [collection] + if (typeof collection === 'function' && collection instanceof Function) return [collection] - var arr = []; + var arr = [] for (var i = 0; i < collection.length; i++) { if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { - arr.push(collection[i]); + arr.push(collection[i]) } } - if (!arr.length) return []; - return arr; -}; + if (!arr.length) return [] + return arr +} function isArray(arr) { - return Object.prototype.toString.call(arr) === "[object Array]"; + return Object.prototype.toString.call(arr) === '[object Array]' } diff --git a/src/utils/to-string.js b/src/utils/to-string.js index cdda3bcf..8ec67ca0 100644 --- a/src/utils/to-string.js +++ b/src/utils/to-string.js @@ -1,6 +1,6 @@ -module.exports = function(s) { - s = (s === undefined) ? "" : s; - s = (s === null) ? "" : s; - s = s.toString(); - return s; -}; +module.exports = function (s) { + s = s === undefined ? '' : s + s = s === null ? '' : s + s = s.toString() + return s +} From ed19f14adcfc1b43f9c227c8a5ece824e596cf54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 13:41:09 +0100 Subject: [PATCH 188/246] Update webpack 3 -> 5 --- package-lock.json | 4079 ++++++++++++--------------------------------- package.json | 5 +- webpack.config.js | 59 +- 3 files changed, 1106 insertions(+), 3037 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2c52dd3..1550c3c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -882,6 +882,32 @@ "@babel/types": "^7.3.0" } }, + "@types/eslint": { + "version": "7.2.5", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.5.tgz", + "integrity": "sha512-Dc6ar9x16BdaR3NSxSF7T4IjL9gxxViJq8RmFd+2UAyA+K6ck2W+gUwfgpG/y9TPyUuBL35109bbULpEynvltA==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.0.tgz", + "integrity": "sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.45", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz", + "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==", + "dev": true + }, "@types/graceful-fs": { "version": "4.1.4", "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.4.tgz", @@ -915,6 +941,12 @@ "@types/istanbul-lib-report": "*" } }, + "@types/json-schema": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", + "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==", + "dev": true + }, "@types/node": { "version": "14.14.9", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.9.tgz", @@ -954,6 +986,208 @@ "integrity": "sha512-FA/BWv8t8ZWJ+gEOnLLd8ygxH/2UFbAvgEonyfN6yWGLKc7zVjbpl2Y4CTjid9h2RfgPP6SEt6uHwEOply00yw==", "dev": true }, + "@webassemblyjs/ast": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz", + "integrity": "sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA==", + "dev": true, + "requires": { + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz", + "integrity": "sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz", + "integrity": "sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz", + "integrity": "sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA==", + "dev": true + }, + "@webassemblyjs/helper-code-frame": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz", + "integrity": "sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA==", + "dev": true, + "requires": { + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/helper-fsm": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz", + "integrity": "sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw==", + "dev": true + }, + "@webassemblyjs/helper-module-context": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz", + "integrity": "sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz", + "integrity": "sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz", + "integrity": "sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz", + "integrity": "sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz", + "integrity": "sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz", + "integrity": "sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz", + "integrity": "sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/helper-wasm-section": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-opt": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "@webassemblyjs/wast-printer": "1.9.0" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz", + "integrity": "sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz", + "integrity": "sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-buffer": "1.9.0", + "@webassemblyjs/wasm-gen": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz", + "integrity": "sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-wasm-bytecode": "1.9.0", + "@webassemblyjs/ieee754": "1.9.0", + "@webassemblyjs/leb128": "1.9.0", + "@webassemblyjs/utf8": "1.9.0" + } + }, + "@webassemblyjs/wast-parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz", + "integrity": "sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/floating-point-hex-parser": "1.9.0", + "@webassemblyjs/helper-api-error": "1.9.0", + "@webassemblyjs/helper-code-frame": "1.9.0", + "@webassemblyjs/helper-fsm": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz", + "integrity": "sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/wast-parser": "1.9.0", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/info": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.1.0.tgz", + "integrity": "sha512-uNWSdaYHc+f3LdIZNwhdhkjjLDDl3jP2+XBqAq9H8DjrJUvlOKdP8TNruy1yEaDfgpAIgbSAN7pye4FEHg9tYQ==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.1.0.tgz", + "integrity": "sha512-7RfnMXCpJ/NThrhq4gYQYILB18xWyoQcBey81oIyVbmgbc6m5ZHHyFK+DyH7pLHJf0p14MxL4mTsoPAgBSTpIg==", + "dev": true + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, "abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -961,28 +1195,11 @@ "dev": true }, "acorn": { - "version": "5.7.3", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz", - "integrity": "sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz", + "integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==", "dev": true }, - "acorn-dynamic-import": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", - "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", - "dev": true, - "requires": { - "acorn": "^4.0.3" - }, - "dependencies": { - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - } - } - }, "acorn-globals": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", @@ -1008,33 +1225,28 @@ "dev": true }, "ajv": { - "version": "6.10.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", - "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" } }, "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - } + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true }, "ansi-escapes": { "version": "4.3.1", @@ -1053,12 +1265,6 @@ } } }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1326,9 +1532,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "micromatch": { @@ -1381,6 +1587,12 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-back": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/array-back/-/array-back-4.0.1.tgz", + "integrity": "sha512-Z/JnaVEXv+A9xabHzN43FiiiWEE7gPCRXMrVmRm00tWbjZRul1iHm7ECzlyNq1p4a4ATXz+G9FJ3GqGOkOV3fg==", + "dev": true + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -1396,44 +1608,6 @@ "safer-buffer": "~2.1.0" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "requires": { - "object-assign": "^4.1.1", - "util": "0.10.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "requires": { - "inherits": "2.0.1" - } - } - } - }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -1446,21 +1620,6 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, - "async": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", - "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==", - "dev": true, - "requires": { - "lodash": "^4.17.14" - } - }, - "async-each": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", - "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", - "dev": true - }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -1631,18 +1790,11 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } }, - "base64-js": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", - "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", - "dev": true - }, "bcrypt-pbkdf": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", @@ -1652,24 +1804,6 @@ "tweetnacl": "^0.14.3" } }, - "big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true - }, - "binary-extensions": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", - "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", - "dev": true - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1689,87 +1823,23 @@ "fill-range": "^7.0.1" } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, "browser-process-hrtime": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "browserslist": { + "version": "4.14.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.14.7.tgz", + "integrity": "sha512-BSVRLCeG3Xt/j/1cCGj1019Wbty0H+Yvu2AOuZSuoaUWn3RatbL33Cxk+Q4jRMRAbOm0p7SLravLjpnT6s0vzQ==", "dev": true, "requires": { - "pako": "~1.0.5" + "caniuse-lite": "^1.0.30001157", + "colorette": "^1.2.1", + "electron-to-chromium": "^1.3.591", + "escalade": "^3.1.1", + "node-releases": "^1.1.66" } }, "bser": { @@ -1781,35 +1851,12 @@ "node-int64": "^0.4.0" } }, - "buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "requires": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", @@ -1841,10 +1888,10 @@ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "caniuse-lite": { + "version": "1.0.30001159", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001159.tgz", + "integrity": "sha512-w9Ph56jOsS8RL20K9cLND3u/+5WASWdhC/PPrf+V3/HsM3uHOavWOR1Xzakbv4Puo/srmPHudkmCRWM7Aq+/UA==", "dev": true }, "capture-exit": { @@ -1862,16 +1909,6 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, "chalk": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", @@ -1888,171 +1925,46 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, - "chokidar": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", - "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "chrome-trace-event": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", + "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.1", - "braces": "^2.3.2", - "fsevents": "^1.2.7", - "glob-parent": "^3.1.0", - "inherits": "^2.0.3", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^3.0.0", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.2.1", - "upath": "^1.1.1" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, "requires": { - "is-extendable": "^0.1.0" - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true, - "requires": { - "is-glob": "^3.1.0", - "path-dirname": "^1.0.0" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - } - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - }, - "normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true - } - } - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "cjs-module-lexer": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", - "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", - "dev": true - }, - "class-utils": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", - "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", - "dev": true, - "requires": { - "arr-union": "^3.1.0", - "define-property": "^0.2.5", - "isobject": "^3.0.0", - "static-extend": "^0.1.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" + "is-descriptor": "^0.1.0" } }, "isobject": { @@ -2063,16 +1975,6 @@ } } }, - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha1-IoF1NPJL+klQw01TLUjsvGIbjBQ=", - "dev": true, - "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" - } - }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -2135,12 +2037,6 @@ "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", "dev": true }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, "collect-v8-coverage": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", @@ -2172,6 +2068,12 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "colorette": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true + }, "combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2181,6 +2083,76 @@ "delayed-stream": "~1.0.0" } }, + "command-line-usage": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/command-line-usage/-/command-line-usage-6.1.1.tgz", + "integrity": "sha512-F59pEuAR9o1SF/bD0dQBDluhpT4jJQNWUHEuVBqpDmCUo6gPjCi+m9fCWnWZVR/oG6cMTUms4h+3NPl74wGXvA==", + "dev": true, + "requires": { + "array-back": "^4.0.1", + "chalk": "^2.4.2", + "table-layout": "^1.0.1", + "typical": "^5.2.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -2193,21 +2165,6 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, "convert-source-map": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", @@ -2229,43 +2186,6 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -2279,25 +2199,6 @@ "which": "^1.2.9" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, "cssom": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", @@ -2321,16 +2222,6 @@ } } }, - "d": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", - "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", - "dev": true, - "requires": { - "es5-ext": "^0.10.50", - "type": "^1.0.1" - } - }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -2351,12 +2242,6 @@ "whatwg-url": "^8.0.0" } }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -2384,6 +2269,12 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -2442,9 +2333,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -2455,16 +2346,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -2477,53 +2358,6 @@ "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.2.tgz", - "integrity": "sha512-wFwTwCVebUrMgGeAwRL/NhZtHAUyT9n9yg4IMDwf10+6iCMxSkVq9MGCVEH+QZWo1nNidy8kNvwmv4zWHDTqvA==", - "dev": true - }, - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - } - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, "domexception": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", @@ -2541,25 +2375,6 @@ } } }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha1-LeWaCCLVAn+r/28DLCsloqir5zg=", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha1-3NhIiib1Y9YQeeSMn3t+Mjc2gs8=", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -2570,20 +2385,11 @@ "safer-buffer": "^2.1.0" } }, - "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } + "electron-to-chromium": { + "version": "1.3.603", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.603.tgz", + "integrity": "sha512-J8OHxOeJkoSLgBXfV9BHgKccgfLMHh+CoeRo6wJsi6m0k3otaxS/5vrHpMNSEYY4MISwewqanPOuhAtuE8riQQ==", + "dev": true }, "emittery": { "version": "0.7.2", @@ -2597,12 +2403,6 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, - "emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true - }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -2613,32 +2413,30 @@ } }, "enhanced-resolve": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", - "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.3.2.tgz", + "integrity": "sha512-G28GCrglCAH6+EqMN2D+Q2wCUS1O1vVQJBn8ME2I/Api41YBe4vLWWRBOUbwDH7vwzSZdljxwTRVqnf+sm6XqQ==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", - "memory-fs": "^0.4.0", - "object-assign": "^4.0.1", - "tapable": "^0.2.7" + "graceful-fs": "^4.2.4", + "tapable": "^2.0.0" } }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha1-sph6o4ITR/zeZCsk/fyeT7cSvyY=", - "dev": true - }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", "dev": true, "requires": { - "prr": "~1.0.1" + "ansi-colors": "^4.1.1" } }, + "envinfo": { + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.3.tgz", + "integrity": "sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==", + "dev": true + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2648,88 +2446,11 @@ "is-arrayish": "^0.2.1" } }, - "es5-ext": { - "version": "0.10.53", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", - "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", - "dev": true, - "requires": { - "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.3", - "next-tick": "~1.0.0" - } - }, - "es6-iterator": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", - "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.35", - "es6-symbol": "^3.1.1" - } - }, - "es6-map": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", - "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-set": "~0.1.5", - "es6-symbol": "~3.1.1", - "event-emitter": "~0.3.5" - } - }, - "es6-set": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", - "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14", - "es6-iterator": "~2.0.1", - "es6-symbol": "3.1.1", - "event-emitter": "~0.3.5" - }, - "dependencies": { - "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - } - } - }, - "es6-symbol": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", - "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", - "dev": true, - "requires": { - "d": "^1.0.1", - "ext": "^1.1.2" - } - }, - "es6-weak-map": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", - "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "^0.10.46", - "es6-iterator": "^2.0.3", - "es6-symbol": "^3.1.1" - } + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true }, "escape-string-regexp": { "version": "1.0.5", @@ -2759,15 +2480,13 @@ } } }, - "escope": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", - "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "es6-map": "^0.1.3", - "es6-weak-map": "^2.0.1", - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, @@ -2778,12 +2497,20 @@ "dev": true }, "esrecurse": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", - "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "requires": { - "estraverse": "^4.1.0" + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, "estraverse": { @@ -2798,32 +2525,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "event-emitter": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", - "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", - "dev": true, - "requires": { - "d": "1", - "es5-ext": "~0.10.14" - } - }, "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", + "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==", "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "exec-sh": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.4.tgz", @@ -2900,23 +2607,6 @@ "jest-regex-util": "^26.0.0" } }, - "ext": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", - "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", - "dev": true, - "requires": { - "type": "^2.0.0" - }, - "dependencies": { - "type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", - "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", - "dev": true - } - } - }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -3022,9 +2712,9 @@ "dev": true }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, "fast-json-stable-stringify": { @@ -3068,15 +2758,6 @@ } } }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -3115,739 +2796,191 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz", - "integrity": "sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw==", + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "dev": true, - "optional": true, "requires": { - "nan": "^2.12.1", - "node-pre-gyp": "^0.12.0" + "ajv": "^6.12.3", + "har-schema": "^2.0.0" }, "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "optional": true, "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "dependencies": { + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + } + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, - "optional": true, "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } } }, - "chownr": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.3.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.2.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.2.1" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^4.1.0", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.12.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.0", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "get-value": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", - "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", - "dev": true - }, - "growly": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", - "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", - "dev": true, - "optional": true - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - } - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "has-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", - "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", - "dev": true, - "requires": { - "get-value": "^2.0.6", - "has-values": "^1.0.0", - "isobject": "^3.0.0" - }, - "dependencies": { - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true - } - } - }, - "has-values": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", - "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", - "dev": true, - "requires": { - "is-number": "^3.0.0", - "kind-of": "^4.0.0" - }, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, "requires": { "is-buffer": "^1.1.5" @@ -3855,37 +2988,6 @@ } } }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "hosted-git-info": { "version": "2.8.5", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", @@ -3907,45 +3009,6 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha1-mWwosZFRaovoZQGn15dX5ccMEGg=", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -3957,12 +3020,6 @@ "sshpk": "^1.7.0" } }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, "human-signals": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", @@ -3978,12 +3035,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, "import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -4017,9 +3068,9 @@ "dev": true }, "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", "dev": true }, "ip-regex": { @@ -4043,15 +3094,6 @@ "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", "dev": true }, - "is-binary-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", - "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", - "dev": true, - "requires": { - "binary-extensions": "^1.0.0" - } - }, "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -4117,12 +3159,6 @@ "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", "dev": true }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, "is-generator-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", @@ -5003,53 +4039,10 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, - "jshint": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.12.0.tgz", - "integrity": "sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==", - "dev": true, - "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.19", - "minimatch": "~3.0.2", - "shelljs": "0.3.x", - "strip-json-comments": "1.0.x" - }, - "dependencies": { - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - } - } - }, - "jshint-loader": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/jshint-loader/-/jshint-loader-0.8.4.tgz", - "integrity": "sha1-tD7kXRN3adVliUChH479mg7c1Hs=", - "dev": true, - "requires": { - "loader-utils": "^1.0.2", - "rcloader": "=0.1.2", - "strip-json-comments": "0.1.x" - }, - "dependencies": { - "strip-json-comments": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-0.1.3.tgz", - "integrity": "sha1-Fkxk43Coo8wAyeAbU55WmCPw7lQ=", - "dev": true - } - } - }, - "json-loader": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", - "integrity": "sha512-QLPs8Dj7lnf3e3QYS1zkCo+4ZwqOiF9d/nZnYozTISxXWCfNs9yuky5rJw4/W34s7POaNlbZmQGaB5NiXCbP4w==", + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, "json-parse-even-better-errors": { @@ -5076,12 +4069,6 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, - "json5": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true - }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -5109,12 +4096,6 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true - }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -5138,59 +4119,15 @@ "dev": true }, "loader-runner": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", - "integrity": "sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.1.0.tgz", + "integrity": "sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA==", "dev": true }, - "loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - } - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", - "dev": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "lodash.sortby": { @@ -5199,22 +4136,6 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -5256,27 +4177,6 @@ "object-visit": "^1.0.0" } }, - "md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "memory-fs": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", - "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", - "dev": true, - "requires": { - "errno": "^0.1.3", - "readable-stream": "^2.0.1" - } - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -5293,16 +4193,6 @@ "picomatch": "^2.0.5" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, "mime-db": { "version": "1.44.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", @@ -5324,18 +4214,6 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -5345,12 +4223,6 @@ "brace-expansion": "^1.1.7" } }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -5372,28 +4244,12 @@ } } }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -5426,9 +4282,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true } } @@ -5440,15 +4296,9 @@ "dev": true }, "neo-async": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", - "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", - "dev": true - }, - "next-tick": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", - "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "dev": true }, "nice-try": { @@ -5463,45 +4313,6 @@ "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", "dev": true }, - "node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "dev": true, - "requires": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - } - } - }, "node-modules-regexp": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", @@ -5542,6 +4353,12 @@ } } }, + "node-releases": { + "version": "1.1.67", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", + "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==", + "dev": true + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -5572,12 +4389,6 @@ "path-key": "^2.0.0" } }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true - }, "nwsapi": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", @@ -5590,12 +4401,6 @@ "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", "dev": true }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -5684,76 +4489,32 @@ "word-wrap": "~1.2.3" } }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, "p-each-series": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", - "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", "dev": true }, - "pako": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.10.tgz", - "integrity": "sha512-0DTvPVU3ed8+HNXOu5Bs+o//Mbdj9VNQMUOe9oKCwh8l0GNwpTDMKCWbRjgtD291AWnkAgkqA/LOnQS8AmS1tw==", + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, - "parse-asn1": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.5.tgz", - "integrity": "sha512-jkMYn1dcJqF6d5CpU689bq7w/b5ALS9ROVSpQDPrZsqqesUJii9qutvoT5ltGedNXMO2e16YUWIghG9KxaViTQ==", + "p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", "dev": true, "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" + "p-try": "^2.0.0" } }, - "parse-json": { + "p-try": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, "parse5": { "version": "5.1.1", @@ -5767,24 +4528,6 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, - "path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -5803,19 +4546,6 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", "dev": true }, - "pbkdf2": { - "version": "3.0.17", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", - "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -5828,294 +4558,22 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - }, "pirates": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - } - } - }, - "posix-character-classes": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", - "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", - "dev": true - }, - "pretty-format": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", - "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", - "dev": true, - "requires": { - "@jest/types": "^26.6.2", - "ansi-regex": "^5.0.0", - "ansi-styles": "^4.0.0", - "react-is": "^17.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true - } - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "prompts": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", - "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", - "dev": true, - "requires": { - "kleur": "^3.0.3", - "sisteransi": "^1.0.5" - } - }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", - "dev": true - }, - "public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "rcfinder": { - "version": "0.1.9", - "resolved": "https://registry.npmjs.org/rcfinder/-/rcfinder-0.1.9.tgz", - "integrity": "sha1-8+gPOH3fmugK4wpBADKWQuroERU=", - "dev": true, - "requires": { - "lodash.clonedeep": "^4.3.2" - } - }, - "rcloader": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/rcloader/-/rcloader-0.1.2.tgz", - "integrity": "sha1-oJY6ZDfQnvjLktky0trUl7DRc2w=", - "dev": true, - "requires": { - "lodash": "~2.4.1", - "rcfinder": "~0.1.6" - }, - "dependencies": { - "lodash": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-2.4.2.tgz", - "integrity": "sha1-+t2DS5aDBz2hebPq5tnA0VBT9z4=", - "dev": true - } - } - }, - "react-is": { - "version": "17.0.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", - "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", - "dev": true - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - }, - "dependencies": { - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" } }, - "read-pkg-up": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", - "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", "dev": true, "requires": { - "find-up": "^4.1.0", - "read-pkg": "^5.2.0", - "type-fest": "^0.8.1" + "find-up": "^4.0.0" }, "dependencies": { "find-up": { @@ -6169,308 +4627,206 @@ } } }, - "readable-stream": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", - "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "prettier": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.0.tgz", + "integrity": "sha512-yYerpkvseM4iKD/BXLYUkQV5aKt4tQPqaGW6EsZjzyu0r7sVZZNPJW4Y8MyKmicp6t42XUPcBVA+H6sB3gqndw==", + "dev": true }, - "readdirp": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", - "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "micromatch": "^3.1.10", - "readable-stream": "^2.0.2" + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" }, "dependencies": { - "arr-diff": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", - "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true - }, - "array-unique": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", - "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", "dev": true - }, - "braces": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", - "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", - "dev": true, - "requires": { - "arr-flatten": "^1.1.0", - "array-unique": "^0.3.2", - "extend-shallow": "^2.0.1", - "fill-range": "^4.0.0", - "isobject": "^3.0.1", - "repeat-element": "^1.1.2", - "snapdragon": "^0.8.1", - "snapdragon-node": "^2.0.1", - "split-string": "^3.0.2", - "to-regex": "^3.0.1" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "expand-brackets": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", - "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", - "dev": true, - "requires": { - "debug": "^2.3.3", - "define-property": "^0.2.5", - "extend-shallow": "^2.0.1", - "posix-character-classes": "^0.1.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", - "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", - "dev": true, - "requires": { - "is-descriptor": "^0.1.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "is-accessor-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", - "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-data-descriptor": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", - "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", - "dev": true, - "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "is-descriptor": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", - "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", - "dev": true, - "requires": { - "is-accessor-descriptor": "^0.1.6", - "is-data-descriptor": "^0.1.4", - "kind-of": "^5.0.0" - } - }, - "kind-of": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", - "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true - } - } - }, - "extglob": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", - "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", - "dev": true, - "requires": { - "array-unique": "^0.3.2", - "define-property": "^1.0.0", - "expand-brackets": "^2.1.4", - "extend-shallow": "^2.0.1", - "fragment-cache": "^0.2.1", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.1" - }, - "dependencies": { - "define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", - "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", - "dev": true, - "requires": { - "is-descriptor": "^1.0.0" - } - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } - } - }, - "fill-range": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", - "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + } + } + }, + "prompts": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.0.tgz", + "integrity": "sha512-awZAKrk3vN6CroQukBL+R9051a4R3zCZBlJm/HBfrSZ8iTpYix3VX1vU4mveiLpiwmOJT4wokTF9m6HUk4KqWQ==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "react-is": { + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", + "integrity": "sha512-NAnt2iGDXohE5LI7uBnLnqvLQMtzhkiAOLXTmv+qnF9Ky7xAPcX8Up/xWIhxvLVGJvuLiNc4xQLtuqDRzb4fSA==", + "dev": true + }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "parse-json": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", + "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", "dev": true, "requires": { - "extend-shallow": "^2.0.1", - "is-number": "^3.0.0", - "repeat-string": "^1.6.1", - "to-regex-range": "^2.1.0" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - } + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, - "is-accessor-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", - "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "is-data-descriptor": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", - "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "kind-of": "^6.0.0" + "p-locate": "^4.1.0" } }, - "is-descriptor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", - "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { - "is-accessor-descriptor": "^1.0.0", - "is-data-descriptor": "^1.0.0", - "kind-of": "^6.0.2" + "p-try": "^2.0.0" } }, - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "kind-of": "^3.0.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } + "p-limit": "^2.2.0" } }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, - "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true - }, - "micromatch": { - "version": "3.1.10", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", - "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", - "dev": true, - "requires": { - "arr-diff": "^4.0.0", - "array-unique": "^0.3.2", - "braces": "^2.3.1", - "define-property": "^2.0.2", - "extend-shallow": "^3.0.2", - "extglob": "^2.0.4", - "fragment-cache": "^0.2.1", - "kind-of": "^6.0.2", - "nanomatch": "^1.2.9", - "object.pick": "^1.3.0", - "regex-not": "^1.0.0", - "snapdragon": "^0.8.1", - "to-regex": "^3.0.2" - } } } }, + "rechoir": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", + "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "reduce-flatten": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/reduce-flatten/-/reduce-flatten-2.0.0.tgz", + "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", + "dev": true + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -6591,12 +4947,6 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, "resolve": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.13.1.tgz", @@ -6633,15 +4983,6 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6651,16 +4992,6 @@ "glob": "^7.1.3" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "rsvp": { "version": "4.8.5", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", @@ -6821,12 +5152,32 @@ "xmlchars": "^2.2.0" } }, + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, + "serialize-javascript": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", + "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -6856,22 +5207,6 @@ } } }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -6887,12 +5222,6 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, "shellwords": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", @@ -7011,8 +5340,7 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "resolved": "", "dev": true } } @@ -7183,29 +5511,6 @@ "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", "dev": true }, - "stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "requires": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "requires": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, "string-length": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.1.tgz", @@ -7238,42 +5543,6 @@ "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-2.0.3.tgz", "integrity": "sha512-4Kcl12rNjc+6EKhY8QyDVuQTAlMWwRiNbsxnVwBUKFr7dYPQuXVrtNU4sEkjF9LHY0AY6uVbB3ktbkIH4LC+BQ==" }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - } - } - }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -7292,12 +5561,6 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=", - "dev": true - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -7323,20 +5586,84 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "table-layout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.1.tgz", + "integrity": "sha512-dEquqYNJiGwY7iPfZ3wbXDI944iqanTSchrACLL2nOB+1r+h1Nzu2eH+DuPPvWvm5Ry7iAPeFlgEtP5bIp5U7Q==", + "dev": true, + "requires": { + "array-back": "^4.0.1", + "deep-extend": "~0.6.0", + "typical": "^5.2.0", + "wordwrapjs": "^4.0.0" + } + }, "tapable": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.9.tgz", - "integrity": "sha512-2wsvQ+4GwBvLPLWsNfLCDYGsW6xb7aeC6utq2Qh0PFwgEy7K7dsma9Jsmb2zSQj7GvYAyUGSntLtsv++GmgL1A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.1.1.tgz", + "integrity": "sha512-Wib1S8m2wdpLbmQz0RBEVosIyvb/ykfKXf3ZIDqvWoMg/zTNm6G/tDSuUM61J1kNCDXWJrLHGSFeMhAG+gAGpQ==", "dev": true }, - "terminal-link": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", - "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "terser": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.0.tgz", + "integrity": "sha512-eopt1Gf7/AQyPhpygdKePTzaet31TvQxXvrf7xYUvD/d8qkCJm4SKPDzu+GHK5ZaYTn8rvttfqaZc3swK21e5g==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.0.3.tgz", + "integrity": "sha512-zFdGk8Lh9ZJGPxxPE6jwysOlATWB8GMW8HcfGULWA/nPal+3VdATflQvSBSLQJRCmYZnfFJl6vkRTiwJGNgPiQ==", "dev": true, "requires": { - "ansi-escapes": "^4.2.1", - "supports-hyperlinks": "^2.0.0" + "jest-worker": "^26.6.1", + "p-limit": "^3.0.2", + "schema-utils": "^3.0.0", + "serialize-javascript": "^5.0.1", + "source-map": "^0.6.1", + "terser": "^5.3.8" + }, + "dependencies": { + "schema-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", + "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.6", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "test-exclude": { @@ -7356,27 +5683,12 @@ "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", "dev": true }, - "timers-browserify": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.11.tgz", - "integrity": "sha512-60aV6sgJ5YEbzUdn9c8kYGIqOubPoUdqQCul3SBAsRCZ40s6Y5cMcrW4dt3/k/EsbLVJNl9n6Vz3fTc+k2GeKQ==", - "dev": true, - "requires": { - "setimmediate": "^1.0.4" - } - }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", "dev": true }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", @@ -7445,10 +5757,10 @@ "punycode": "^2.1.1" } }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "tunnel-agent": { @@ -7466,12 +5778,6 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, - "type": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", - "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", - "dev": true - }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -7502,71 +5808,11 @@ "is-typedarray": "^1.0.0" } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, - "uglifyjs-webpack-plugin": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", - "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", - "dev": true, - "requires": { - "source-map": "^0.5.6", - "uglify-js": "^2.8.29", - "webpack-sources": "^1.0.1" - }, - "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", - "dev": true - }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, - "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", - "dev": true, - "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - } - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" - } - } - } + "typical": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/typical/-/typical-5.2.0.tgz", + "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", + "dev": true }, "union-value": { "version": "1.0.1", @@ -7626,12 +5872,6 @@ } } }, - "upath": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", - "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", - "dev": true - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -7647,53 +5887,12 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, - "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "requires": { - "inherits": "2.0.3" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, "uuid": { "version": "8.3.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", @@ -7701,6 +5900,12 @@ "dev": true, "optional": true }, + "v8-compile-cache": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "dev": true + }, "v8-to-istanbul": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.0.0.tgz", @@ -7741,12 +5946,6 @@ "extsprintf": "^1.2.0" } }, - "vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -7775,14 +5974,13 @@ } }, "watchpack": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", - "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.0.1.tgz", + "integrity": "sha512-vO8AKGX22ZRo6PiOFM9dC0re8IcKh8Kd/aH2zeqUc6w4/jBGlTy2P7fTC6ekT0NjVeGjgU2dGC5rNstKkeLEQg==", "dev": true, "requires": { - "chokidar": "^2.0.2", - "graceful-fs": "^4.1.2", - "neo-async": "^2.5.0" + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" } }, "webidl-conversions": { @@ -7792,253 +5990,165 @@ "dev": true }, "webpack": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", - "integrity": "sha512-Sw7MdIIOv/nkzPzee4o0EdvCuPmxT98+vVpIvwtcwcF1Q4SDSNp92vwcKc4REe7NItH9f1S4ra9FuQ7yuYZ8bQ==", - "dev": true, - "requires": { - "acorn": "^5.0.0", - "acorn-dynamic-import": "^2.0.0", - "ajv": "^6.1.0", - "ajv-keywords": "^3.1.0", - "async": "^2.1.2", - "enhanced-resolve": "^3.4.0", - "escope": "^3.6.0", - "interpret": "^1.0.0", - "json-loader": "^0.5.4", - "json5": "^0.5.1", - "loader-runner": "^2.3.0", - "loader-utils": "^1.1.0", - "memory-fs": "~0.4.1", - "mkdirp": "~0.5.0", - "node-libs-browser": "^2.0.0", - "source-map": "^0.5.3", - "supports-color": "^4.2.1", - "tapable": "^0.2.7", - "uglifyjs-webpack-plugin": "^0.4.6", - "watchpack": "^1.4.0", - "webpack-sources": "^1.0.1", - "yargs": "^8.0.2" + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.6.0.tgz", + "integrity": "sha512-SIeFuBhuheKElRbd84O35UhKc0nxlgSwtzm2ksZ0BVhRJqxVJxEguT/pYhfiR0le/pxTa1VsCp7EOYyTsa6XOA==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.45", + "@webassemblyjs/ast": "1.9.0", + "@webassemblyjs/helper-module-context": "1.9.0", + "@webassemblyjs/wasm-edit": "1.9.0", + "@webassemblyjs/wasm-parser": "1.9.0", + "acorn": "^8.0.4", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.3.1", + "eslint-scope": "^5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.1.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "pkg-dir": "^4.2.0", + "schema-utils": "^3.0.0", + "tapable": "^2.0.0", + "terser-webpack-plugin": "^5.0.3", + "watchpack": "^2.0.0", + "webpack-sources": "^2.1.1" + } + }, + "webpack-cli": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.2.0.tgz", + "integrity": "sha512-EIl3k88vaF4fSxWSgtAQR+VwicfLMTZ9amQtqS4o+TDPW9HGaEpbFBbAZ4A3ZOT5SOnMxNOzROsSTPiE8tBJPA==", + "dev": true, + "requires": { + "@webpack-cli/info": "^1.1.0", + "@webpack-cli/serve": "^1.1.0", + "colorette": "^1.2.1", + "command-line-usage": "^6.1.0", + "commander": "^6.2.0", + "enquirer": "^2.3.6", + "execa": "^4.1.0", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "leven": "^3.1.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^4.2.2" }, "dependencies": { - "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" - }, - "dependencies": { - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - } - } + "commander": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true }, "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" } }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - }, - "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "pump": "^3.0.0" } }, - "load-json-file": { + "is-stream": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, - "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", "dev": true }, - "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", - "dev": true, - "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" - } - }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", "dev": true, "requires": { - "pify": "^2.0.0" + "path-key": "^3.0.0" } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, - "read-pkg-up": { + "shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "ansi-regex": "^2.0.0" + "shebang-regex": "^3.0.0" } }, - "strip-bom": { + "shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "supports-color": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz", - "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" - } - }, - "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "isexe": "^2.0.0" } } } }, + "webpack-merge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", + "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", + "dev": true, + "requires": { + "lodash": "^4.17.15" + } + }, "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", + "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", "dev": true, "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -8090,57 +6200,20 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true - }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "wordwrapjs": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wordwrapjs/-/wordwrapjs-4.0.0.tgz", + "integrity": "sha512-Svqw723a3R34KvsMgpjFBYCgNOSdcW3mQFK4wIfhGQhtaFVOJmdYoXgi63ne3dTlWgatVcUc7t4HtQ/+bUVIzQ==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } + "reduce-flatten": "^2.0.0", + "typical": "^5.0.0" } }, "wrappy": { @@ -8179,24 +6252,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true - }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", diff --git a/package.json b/package.json index aefa1c9a..d18ed745 100644 --- a/package.json +++ b/package.json @@ -28,10 +28,9 @@ "devDependencies": { "jest": "^26.6.3", "jquery": "^3.5.1", - "jshint": "^2.12.0", - "jshint-loader": "^0.8.4", - "webpack": "^3.12.0" "prettier": "^2.2.0", + "webpack": "^5.6.0", + "webpack-cli": "^4.2.0" }, "main": "src/index", "engines": { diff --git a/webpack.config.js b/webpack.config.js index 579ba406..9a2aec79 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,34 +1,49 @@ -const webpack = require('webpack'), - PACKAGE = require('./package.json'); +const webpack = require('webpack') +const PACKAGE = require('./package.json') +const TerserPlugin = require('terser-webpack-plugin') module.exports = { entry: { list: './src/index.js', - "list.min": './src/index.js' + 'list.min': './src/index.js', }, output: { path: __dirname + '/dist', - filename: "[name].js", - library: 'List' - }, - module: { - rules: [{ - enforce: 'pre', - test: /\.js$/, - exclude: /(node_modules|src\/utils\/extend\.js)/, - loader: "jshint-loader" - }] + filename: '[name].js', + library: 'List', }, + devtool: false, + module: {}, devServer: { - inline: true + inline: true, }, plugins: [ - new webpack.optimize.UglifyJsPlugin({ - include: /\.min\.js$/, - minimize: true - }), new webpack.BannerPlugin({ - banner: 'List.js v' + PACKAGE.version + ' (' + PACKAGE.homepage + ') by ' + PACKAGE.author.name + ' (' + PACKAGE.author.url + ')' - }) - ] -}; + banner: + 'List.js v' + + PACKAGE.version + + ' (' + + PACKAGE.homepage + + ') by ' + + PACKAGE.author.name + + ' (' + + PACKAGE.author.url + + ')', + }), + ], + optimization: { + minimize: true, + minimizer: [ + new TerserPlugin({ + include: /\.min\.js$/, + extractComments: false, + terserOptions: { + format: { + comments: /^! List.js v.*/, + }, + mangle: true, + }, + }), + ], + }, +} From 5bf33347e320a1f5ae21866f3e0d48951ffb9114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 14:05:46 +0100 Subject: [PATCH 189/246] Update circleci config with new node version --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bdb870b7..87bdc6f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,8 +1,8 @@ -version: 2 +version: 2.1 jobs: build: docker: - - image: circleci/node:6.15 + - image: circleci/node:14.15.1 steps: - checkout - restore_cache: From 4bf8e2994955c744d17dead7aafb9e7b59af931d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 14:25:43 +0100 Subject: [PATCH 190/246] Fix codepen examples --- docs/_includes/codepen.html | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/_includes/codepen.html b/docs/_includes/codepen.html index 4fc9b1f3..10e914d9 100644 --- a/docs/_includes/codepen.html +++ b/docs/_includes/codepen.html @@ -1,7 +1,10 @@

                                        {{ page.name }}

                                        {{ page.title }}

                                        -

                                        - See the Pen {{ page.url }} by Jonny Strömberg (@javve) on CodePen + +

                                        + See the Pen {{ page.url }} by Jonny Strömberg (@javve) + on CodePen.

                                        - + \ No newline at end of file From 5858cd9dcfdda2c71171c4819fc756aa99f0f80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:30:22 +0100 Subject: [PATCH 191/246] Fix support for IE9 with webpack 5 and remove support for IE6-8 --- .browserslistrc | 1 + .prettierignore | 1 + docs/overview/index.html | 2 +- package-lock.json | 1162 +++++++++++++++++++++++++++++++++++--- package.json | 3 + webpack.config.js | 17 +- 6 files changed, 1111 insertions(+), 75 deletions(-) create mode 100644 .browserslistrc create mode 100644 .prettierignore diff --git a/.browserslistrc b/.browserslistrc new file mode 100644 index 00000000..3bd7a036 --- /dev/null +++ b/.browserslistrc @@ -0,0 +1 @@ +ie 9 \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..0baf8092 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.min.js \ No newline at end of file diff --git a/docs/overview/index.html b/docs/overview/index.html index d1fbd7d4..f778964e 100644 --- a/docs/overview/index.html +++ b/docs/overview/index.html @@ -25,7 +25,7 @@

                                        Features

                                      • Filter Read more ›
                                      • Simple templating system that adds possibility to add, edit, remove items Read more ›
                                      • Plugins "Read more ›
                                      • -
                                      • Support for Chrome, Safari, Firefox, IE6+
                                      • +
                                      • Support for Chrome, Safari, Firefox, IE9+
                                      • Used by

                                        diff --git a/package-lock.json b/package-lock.json index 1550c3c8..2b2fdcb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,12 @@ "@babel/highlight": "^7.10.4" } }, + "@babel/compat-data": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz", + "integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==", + "dev": true + }, "@babel/core": { "version": "7.12.7", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.7.tgz", @@ -46,27 +52,6 @@ "ms": "2.1.2" } }, - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", - "dev": true - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -86,6 +71,80 @@ "source-map": "^0.5.0" } }, + "@babel/helper-annotate-as-pure": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz", + "integrity": "sha512-XQlqKQP4vXFB7BN8fEEerrmYvHp3fK/rBkRFz9jaJbzK0B1DSfej9Kc7ZzE8Z/OnId1jpJdNAZ3BFQjWG68rcA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", + "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz", + "integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.5", + "@babel/helper-validator-option": "^7.12.1", + "browserslist": "^4.14.5", + "semver": "^5.5.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", + "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-member-expression-to-functions": "^7.12.1", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz", + "integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "regexpu-core": "^4.7.1" + } + }, + "@babel/helper-define-map": { + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", + "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", + "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, "@babel/helper-function-name": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", @@ -106,6 +165,15 @@ "@babel/types": "^7.10.4" } }, + "@babel/helper-hoist-variables": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", + "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", + "dev": true, + "requires": { + "@babel/types": "^7.10.4" + } + }, "@babel/helper-member-expression-to-functions": { "version": "7.12.7", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", @@ -164,6 +232,17 @@ "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==", "dev": true }, + "@babel/helper-remap-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", + "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-wrap-function": "^7.10.4", + "@babel/types": "^7.12.1" + } + }, "@babel/helper-replace-supers": { "version": "7.12.5", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.5.tgz", @@ -185,6 +264,15 @@ "@babel/types": "^7.12.1" } }, + "@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", + "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "dev": true, + "requires": { + "@babel/types": "^7.12.1" + } + }, "@babel/helper-split-export-declaration": { "version": "7.11.0", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.11.0.tgz", @@ -200,6 +288,24 @@ "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", "dev": true }, + "@babel/helper-validator-option": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.1.tgz", + "integrity": "sha512-YpJabsXlJVWP0USHjnC/AQDTLlZERbON577YUVO/wLpqyj6HAtVYnWaQaN0iUN+1/tWn3c+uKKXjRut5115Y2A==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.12.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", + "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" + } + }, "@babel/helpers": { "version": "7.12.5", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", @@ -280,114 +386,674 @@ "integrity": "sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg==", "dev": true }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz", + "integrity": "sha512-d+/o30tJxFxrA1lhzJqiUcEJdI6jKlNregCv5bASeGf2Q4MXmnwH7viDo7nhx1/ohf09oaH8j1GVYG/e3Yqk6A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", + "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz", + "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-export-namespace-from": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz", + "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz", + "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz", + "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", + "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz", + "integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", + "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-transform-parameters": "^7.12.1" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", + "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz", + "integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-private-methods": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz", + "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz", + "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", + "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", + "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", + "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", + "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-remap-async-to-generator": "^7.12.1" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", + "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.1.tgz", + "integrity": "sha512-zJyAC9sZdE60r1nVQHblcfCj29Dh2Y0DOvlMkcqSo0ckqjiCwNiUezUKw+RjOCwGfpLRwnAeQ2XlLpsnGkvv9w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", + "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-define-map": "^7.10.4", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1", + "@babel/helper-split-export-declaration": "^7.10.4", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", + "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", + "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz", + "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz", + "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", + "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", + "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz", + "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", + "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz", + "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz", + "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", + "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-simple-access": "^7.12.1", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz", + "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.10.4", + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-identifier": "^7.10.4", + "babel-plugin-dynamic-import-node": "^2.3.3" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz", + "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.12.1", + "@babel/helper-plugin-utils": "^7.10.4" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz", + "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz", + "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-bigint": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", - "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "@babel/plugin-transform-object-super": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", + "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-replace-supers": "^7.12.1" } }, - "@babel/plugin-syntax-class-properties": { + "@babel/plugin-transform-parameters": { "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", - "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", + "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-import-meta": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", - "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "@babel/plugin-transform-property-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", + "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "@babel/plugin-transform-regenerator": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", + "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "regenerator-transform": "^0.14.2" } }, - "@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "@babel/plugin-transform-reserved-words": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz", + "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "@babel/plugin-transform-shorthand-properties": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", + "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "@babel/plugin-transform-spread": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", + "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz", + "integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==", "dev": true, "requires": { "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "@babel/plugin-transform-template-literals": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", + "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "@babel/plugin-transform-typeof-symbol": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.1.tgz", + "integrity": "sha512-EPGgpGy+O5Kg5pJFNDKuxt9RdmTgj5sgrus2XVeMp/ZIbOESadgILUbm50SNpghOh3/6yrbsH+NB5+WJTmsA7Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "@babel/plugin-transform-unicode-escapes": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz", + "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.10.4" } }, - "@babel/plugin-syntax-top-level-await": { + "@babel/plugin-transform-unicode-regex": { "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", - "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", + "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==", "dev": true, "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.12.1", "@babel/helper-plugin-utils": "^7.10.4" } }, + "@babel/preset-env": { + "version": "7.12.7", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.7.tgz", + "integrity": "sha512-OnNdfAr1FUQg7ksb7bmbKoby4qFOHw6DKWWUNB9KqnnCldxhxJlP+21dpyaWFmf2h0rTbOkXJtAGevY3XW1eew==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.12.7", + "@babel/helper-compilation-targets": "^7.12.5", + "@babel/helper-module-imports": "^7.12.5", + "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-validator-option": "^7.12.1", + "@babel/plugin-proposal-async-generator-functions": "^7.12.1", + "@babel/plugin-proposal-class-properties": "^7.12.1", + "@babel/plugin-proposal-dynamic-import": "^7.12.1", + "@babel/plugin-proposal-export-namespace-from": "^7.12.1", + "@babel/plugin-proposal-json-strings": "^7.12.1", + "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", + "@babel/plugin-proposal-numeric-separator": "^7.12.7", + "@babel/plugin-proposal-object-rest-spread": "^7.12.1", + "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", + "@babel/plugin-proposal-optional-chaining": "^7.12.7", + "@babel/plugin-proposal-private-methods": "^7.12.1", + "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-class-properties": "^7.12.1", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.12.1", + "@babel/plugin-transform-arrow-functions": "^7.12.1", + "@babel/plugin-transform-async-to-generator": "^7.12.1", + "@babel/plugin-transform-block-scoped-functions": "^7.12.1", + "@babel/plugin-transform-block-scoping": "^7.12.1", + "@babel/plugin-transform-classes": "^7.12.1", + "@babel/plugin-transform-computed-properties": "^7.12.1", + "@babel/plugin-transform-destructuring": "^7.12.1", + "@babel/plugin-transform-dotall-regex": "^7.12.1", + "@babel/plugin-transform-duplicate-keys": "^7.12.1", + "@babel/plugin-transform-exponentiation-operator": "^7.12.1", + "@babel/plugin-transform-for-of": "^7.12.1", + "@babel/plugin-transform-function-name": "^7.12.1", + "@babel/plugin-transform-literals": "^7.12.1", + "@babel/plugin-transform-member-expression-literals": "^7.12.1", + "@babel/plugin-transform-modules-amd": "^7.12.1", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/plugin-transform-modules-systemjs": "^7.12.1", + "@babel/plugin-transform-modules-umd": "^7.12.1", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", + "@babel/plugin-transform-new-target": "^7.12.1", + "@babel/plugin-transform-object-super": "^7.12.1", + "@babel/plugin-transform-parameters": "^7.12.1", + "@babel/plugin-transform-property-literals": "^7.12.1", + "@babel/plugin-transform-regenerator": "^7.12.1", + "@babel/plugin-transform-reserved-words": "^7.12.1", + "@babel/plugin-transform-shorthand-properties": "^7.12.1", + "@babel/plugin-transform-spread": "^7.12.1", + "@babel/plugin-transform-sticky-regex": "^7.12.7", + "@babel/plugin-transform-template-literals": "^7.12.1", + "@babel/plugin-transform-typeof-symbol": "^7.12.1", + "@babel/plugin-transform-unicode-escapes": "^7.12.1", + "@babel/plugin-transform-unicode-regex": "^7.12.1", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.12.7", + "core-js-compat": "^3.7.0", + "semver": "^5.5.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/runtime": { + "version": "7.12.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", + "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, "@babel/template": { "version": "7.12.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", @@ -1668,6 +2334,51 @@ } } }, + "babel-loader": { + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.1.tgz", + "integrity": "sha512-dMF8sb2KQ8kJl21GUjkW1HWmcsL39GOV5vnzjqrCzEPNY0S0UfMLnumidiwIajDSBmKhYf5iRW+HXaM4cvCKBw==", + "dev": true, + "requires": { + "find-cache-dir": "^2.1.0", + "loader-utils": "^1.4.0", + "make-dir": "^2.1.0", + "pify": "^4.0.1", + "schema-utils": "^2.6.5" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "schema-utils": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", + "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.5", + "ajv": "^6.12.4", + "ajv-keywords": "^3.5.2" + } + } + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, "babel-plugin-istanbul": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", @@ -1790,7 +2501,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -1804,6 +2516,12 @@ "tweetnacl": "^0.14.3" } }, + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1882,6 +2600,16 @@ } } }, + "call-bind": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", + "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2153,6 +2881,12 @@ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, "component-emitter": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", @@ -2180,6 +2914,24 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, + "core-js-compat": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.7.0.tgz", + "integrity": "sha512-V8yBI3+ZLDVomoWICO6kq/CD28Y4r1M7CWeO4AGpMdMfseu8bkSubBmUPySMGKRTS+su4XQ07zUkAsiu9FCWTg==", + "dev": true, + "requires": { + "browserslist": "^4.14.6", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2287,6 +3039,15 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", @@ -2403,6 +3164,12 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true + }, "end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -2758,6 +3525,47 @@ } } }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } + } + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -2808,6 +3616,17 @@ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true }, + "get-intrinsic": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.1.tgz", + "integrity": "sha512-ZnWP+AmS1VUaLgTRy47+zKtjTxz+0xMpx3I52i+aalBK1QP19ggLF3Db89KJX7kjfOfP2eoa01qc++GwPgufPg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, "get-package-type": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", @@ -2928,6 +3747,12 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", @@ -4069,6 +4894,15 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4124,6 +4958,38 @@ "integrity": "sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA==", "dev": true }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, "lodash": { "version": "4.17.20", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", @@ -4223,6 +5089,12 @@ "brace-expansion": "^1.1.7" } }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -4423,6 +5295,12 @@ } } }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -4440,6 +5318,18 @@ } } }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -4510,6 +5400,26 @@ "p-try": "^2.0.0" } }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, "p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -4528,6 +5438,12 @@ "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", "dev": true }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -4558,6 +5474,12 @@ "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", "dev": true }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + }, "pirates": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", @@ -4827,6 +5749,36 @@ "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true }, + "regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4837,6 +5789,43 @@ "safe-regex": "^1.1.0" } }, + "regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -5340,7 +6329,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -5814,6 +6804,34 @@ "integrity": "sha512-dvdQgNDNJo+8B2uBQoqdb11eUCE1JQXhvjC/CZtgvZseVd5TYMXnq0+vuUemXbd/Se29cTaUuPX3YIc2xgbvIg==", "dev": true }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", diff --git a/package.json b/package.json index d18ed745..a093fe02 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,9 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { + "@babel/core": "^7.12.7", + "@babel/preset-env": "^7.12.7", + "babel-loader": "^8.2.1", "jest": "^26.6.3", "jquery": "^3.5.1", "prettier": "^2.2.0", diff --git a/webpack.config.js b/webpack.config.js index 9a2aec79..13150119 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -12,8 +12,21 @@ module.exports = { filename: '[name].js', library: 'List', }, - devtool: false, - module: {}, + devtool: 'cheap-module-source-map', + module: { + rules: [ + { + test: /\.js$/, + exclude: /(node_modules)/, + use: { + loader: 'babel-loader', + options: { + presets: ['@babel/preset-env'], + }, + }, + }, + ], + }, devServer: { inline: true, }, From f616cc3b5d6bc8e5c556680e87b6ec3639791e40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:30:42 +0100 Subject: [PATCH 192/246] Update format for readme and move npm before bower --- README.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 430382d4..92179e6f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # List.js + Perfect library for adding **search**, **sort**, **filters** and **flexibility** to **tables**, **lists** and various HTML elements. Built to be invisible and work on existing HTML. Really simple and easy to use! @@ -10,6 +11,7 @@ Really simple and easy to use! [![jsDelivr Hits](https://data.jsdelivr.com/v1/package/npm/list.js/badge?style=rounded)](https://www.jsdelivr.com/package/npm/list.js) ### Core idea + - Simple and invisible - Easy to apply to existing HTML - No dependencies @@ -18,35 +20,46 @@ Really simple and easy to use! - Handle thousands of items ### Features + - Works both lists, tables and almost anything else. E.g. `
                                        `,`
                                          `,``, etc. - Search [Read more ›](http://listjs.com/docs/list-api#search) - Sort [Read more ›](http://listjs.com/docs/list-api#sort) - Filter [Read more ›](http://listjs.com/docs/list-api#filter) - Simple templating system that adds possibility to add, edit, remove items [Read more ›](http://listjs.com/docs/list-api#add) - Plugins [Read more ›](http://listjs.com/docs/plugins) -- Support for Chrome, Safari, Firefox, IE6+ +- Support for Chrome, Safari, Firefox, IE9+ ### Download / Install -##### Via Bower -``` -bower install list.js -``` + ##### Via NPM + ``` npm install list.js ``` + +##### Via Bower + +``` +bower install list.js +``` + ##### Via CDNJS + ```html ``` + ##### Via Direct Download + - [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js) - [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js) ### Questions / How to? + https://stackoverflow.com/questions/tagged/list.js ### Demo / Examples + - [Existing list](http://listjs.com/examples/existing-list) - [Existing list + add](http://listjs.com/examples/existing-list-add) - [New list](http://listjs.com/examples/new-list) @@ -59,6 +72,7 @@ https://stackoverflow.com/questions/tagged/list.js - [Only show list after search/filter](http://codepen.io/javve/pen/YyqyRg) ## Documentation + - [Getting started](http://listjs.com/docs) - [Options](http://listjs.com/docs/options) - [List API](http://listjs.com/docs/list-api) @@ -66,19 +80,21 @@ https://stackoverflow.com/questions/tagged/list.js - [Changelog](http://listjs.com/overview/changelog) ### Plugins + - [Introduction](http://listjs.com/docs/plugins) - [Pagination](http://listjs.com/docs/plugins/pagination) - [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch) - [Build your own](http://listjs.com/docs/plugins/build) ### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them? + - Read more at [listjs.com/overview/contribute](http://listjs.com/overview/contribute) ### Creator -| | Jonny Strömberg [@javve](http://twitter.com/javve) | -| ------------- | ------------- | -| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) +| | Jonny Strömberg [@javve](http://twitter.com/javve) | +| ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) | ## License (MIT) From ce51b7a63f77c721a057594c53fb343e046dd516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:37:52 +0100 Subject: [PATCH 193/246] Update package with script instructions --- docs/overview/contribute.html | 3 --- package.json | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/overview/contribute.html b/docs/overview/contribute.html index a11d1b45..7d4ac0da 100644 --- a/docs/overview/contribute.html +++ b/docs/overview/contribute.html @@ -17,9 +17,6 @@

                                          Compile the script (webpack.config.js)

                                          Watch and recompile when files change

                                          npx webpack --watch
                                          -

                                          Create standalone List.js (dist/list.js)

                                          -
                                          npx webpack --production
                                          -

                                          Run the test suite

                                          npx jest

                                          Run tests continuously when files change

                                          diff --git a/package.json b/package.json index a093fe02..6382f822 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ ], "author": { "name": "Jonny Strömberg", - "email": "jonny.stromberg@gmail.com>", + "email": "jonny.stromberg@gmail.com", "url": "https://javve.com" }, "homepage": "https://listjs.com", @@ -40,7 +40,10 @@ "node": "^14.15.1" }, "scripts": { - "test": "jest" + "test": "npx jest", + "build": "npx webpack", + "watch": "npx webpack --watch", + "watch-test": "npx jest --watch" }, "npmName": "list.js", "npmFileMap": [ From 8f9d93ca1929d80f6d4e309c5c7aa797248f2d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:56:25 +0100 Subject: [PATCH 194/246] Update History.md --- History.md | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/History.md b/History.md index ce3e3bce..8324e858 100644 --- a/History.md +++ b/History.md @@ -1,6 +1,18 @@ # Changelog +### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 + +- **[Breaking]** Drop support for IE6-8 +- **[Website]** Update Jekyll to remove security warnings +- **[Website]** Fix all examples (sorry that they we're broken) +- **[Misc]** Update dev dependencies to latest version: Webpack 3.12.0 -> 5.6.0, jest 23.3 -> 26.6.3, jquery 3.3.1 -> 3.5.1, Removed: jshint jshint-loader +- **[Misc]** Replace uglify-js with terser +- **[Misc]** Update Node for dev from 6.15 to 14.15.1 +- **[Misc]** Prettier on everything +- **[Misc]** Make release script simpler + ### 1.5.1 + - **[Misc]** Added WISHLIST.md for feature requests to allow cleanup of issue list. - **[Misc]** Update CircleCI from 1.0 to 2.0 - **[Website]** Use https instead of http for listjs.com @@ -11,23 +23,27 @@ - **[Bugfix]** Don't break pagination if page=0 [See commit →](https://github.com/javve/list.js/commit/b3db0de731d436422e016b5e17f7ceab5941cd5d) [See commit →](https://github.com/javve/list.js/commit/725bc188d7ba72c7d234bda1e09fc50b40661310) + ### 2017-01-29 v1.5.0 + - **[Feature]** Bundle fuzzySearch and pagination plugins into List.js [See commit →](https://github.com/javve/list.js/commit/2f5322fd139ee6f30cef3bb5e15d382ff29f9489) - **[Misc]** Switch from Grunt to Webpack and from Mocha to Jest [See commit →](https://github.com/javve/list.js/commit/8376ef01b1da4b6e60a7457d628d97a803a82e14) ### 2017-01-19 v1.4.1 + - **[Bugfix]** Move string-natural-compare to dependencies instead of devDependencies [See commit →](https://github.com/javve/list.js/commit/c17162b26fd5093d3ddde01e11a3f748310d993c) - ### 2017-01-15 v1.4.0 + - **[Bugfix/Feature]** Change natural-sort library to support custom alphabets -and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong. + and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong. [See commit →](https://github.com/javve/list.js/commit/81e1386bed88d1f932e729feca2b3649e489bdfe) ### 2016-10-23 v1.3.0 + - **[Bugfix]** Make mkdir in build script OS agnostic [See commit →](https://github.com/javve/list.js/commit/ba387125efddd7f5f4f8360bce516ae740cb5ae5) - **[Bugfix]** Make it possible to reset search columns @@ -46,6 +62,7 @@ and thereby handle JavaScripts unicode bugs like sorting ÅÄÖ in Swedish wrong [See commit →](https://github.com/javve/list.js/commit/1af94012de89fd6bcf8446c31305ad517507c44b) ### 2016-02-27: v1.2.0 + It's been two years since the last update of List.js. That is absolutely not ok and I'm very sorry that it has taken so long. I promise I'll do better in the future! @@ -100,14 +117,15 @@ I hope you'll like this update! get same values as first item in list [See commit →](https://github.com/javve/list.js/commit/3a4733d52cff25ef99ee8a1326c0b54be81d64ca) - ### 2014-02-03: 1.1.1 + - **[Bugfix]** Update `javve/events` version which fixes critical bugs in Safari for PC and PhantomJS (which makes the command line tests work again). - **[Bugfix]** Clear search when clicking in the HTML5 clear button. - **[Misc]** Add History.md file for changelog instead of having it at Listjs.com. ### 2014-02-03: 1.1.0 + - **[Breaking]** The sorting API is update so it looks like this `listObj.sort('name', { order: "asc "})` and `listObj.sort('name', { order: "desc "})` instead or `listObj.sort('name', { desc: true/false })`. @@ -117,11 +135,12 @@ I hope you'll like this update! - **[Bugfix]** Remove sorting when searching and filtering. - **[Bugfix]** Fix sorting and search when using pagiation plugin - ### 2014-01-17: 1.0.2 + - **[Bugfix]** Fix error that broke the lib in IE8. ### 2013-11-12: 1.0.0 + - **[Feature]** Add more events and enable to add them on initialization. - **[Feature]** Add support for Component.js, Bower, RequireJS and CommonJS - **[Feature]** Make it possible to remove event handlers by `.off('event', handler)` @@ -143,42 +162,49 @@ I hope you'll like this update! - **[Change]** Move plugins into seperated repos: github.com/javve/list.pagination.js and github.com/javve/list.fuzzysearch.js - **[Change]** Plugin initiation have changed. See getting started with plugins - ### 2012-04-24: 0.2.1 -- Fuzzy Search plugin, `.filter()` changes and bug fixes *[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)* + +- Fuzzy Search plugin, `.filter()` changes and bug fixes _[Read more »](http://jonnystromberg.com/listjs-0-2-1-release-notes/)_ ### 2012-01-23: 0.2.0 -- Lots of updates and interesting features. *[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)* + +- Lots of updates and interesting features. _[Read more »](http://jonnystromberg.com/listjs-0-2-0-plugins-paging/)_ ### 2011-12-15: 0.1.4 + - `.filters()`, `.sort()` and `.search()` now deped on each other. If the list is filtered and then there is a search, the items hidden by the filters will stay hidden etc. - `.filter()` is the only way to reset filter. `.filter(false)` does not work anymore. ### 2011-11-29: 0.1.3 release + - Added function `.clear()` that removes all items from the list - Changed the sort function to be based on `data-sort` instead of `rel` - When sorting one category, all sort-related classes will be removed from the other sort buttons - Updated `.sort(valueName, sortFunction)` to `.sort(valueName, options)`, se more info in the documentation ### 2011-11-16: 0.1.2 release + - Sorting is now indicated by class `asc` or `desc` at sorting buttons -- Added three new small helper functions `hasClass(element, class)`, `addClass(element, class)`` - and `removeClass(element, class)` +- Added three new small helper functions `hasClass(element, class)`, ` addClass(element, class)`` and `removeClass(element, class)` ### 2011-10-20: 0.1.1 release + - Added possibility to reverse sort the list ### 2011-10-18: 0.1 release + - Examples at Listjs.com works in IE7,8,9 (IE6 is not tested, should work) - More documentation - Misc bug fixes ### 2011-10-15 Final alpha 0.3 release + - More documentation - Only show 200 items at same time, huge speed increase - Misc bug fixes ### 2011-08-08 Alpha 0.2 release + - Added asynchronous item adding - Added asynchronous list indexing - Improved (but incomplete) documentation From 63bcb09a99d0d87cf83bbd5f12ec66c672b82ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:58:48 +0100 Subject: [PATCH 195/246] Update changelog url and remove plugin docs (removed in 1.5.0) --- README.md | 9 +-------- docs/overview/changelog.html | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 92179e6f..aed965f4 100644 --- a/README.md +++ b/README.md @@ -77,14 +77,7 @@ https://stackoverflow.com/questions/tagged/list.js - [Options](http://listjs.com/docs/options) - [List API](http://listjs.com/docs/list-api) - [Item API](http://listjs.com/docs/item-api) -- [Changelog](http://listjs.com/overview/changelog) - -### Plugins - -- [Introduction](http://listjs.com/docs/plugins) -- [Pagination](http://listjs.com/docs/plugins/pagination) -- [Fuzzy search](http://listjs.com/docs/plugins/fuzzysearch) -- [Build your own](http://listjs.com/docs/plugins/build) +- [Changelog](https://github.com/javve/list.js/blob/master/CHANGELOG.md) ### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them? diff --git a/docs/overview/changelog.html b/docs/overview/changelog.html index b6183676..4b6dea10 100644 --- a/docs/overview/changelog.html +++ b/docs/overview/changelog.html @@ -4,4 +4,4 @@ ---

                                          Changelog

                                          -

                                          Go to the changelog at GitHub

                                          +

                                          Go to the changelog at GitHub

                                          From 071cd706094e3d3983cb03bea9f055394ef59028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:59:15 +0100 Subject: [PATCH 196/246] Rename History.md to CHANGELOG.md --- History.md => CHANGELOG.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename History.md => CHANGELOG.md (100%) diff --git a/History.md b/CHANGELOG.md similarity index 100% rename from History.md rename to CHANGELOG.md From d22c6373aa1ed4fbceb1fb8246b4ed04a91e2792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:59:44 +0100 Subject: [PATCH 197/246] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8324e858..7ae415a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - **[Misc]** Update Node for dev from 6.15 to 14.15.1 - **[Misc]** Prettier on everything - **[Misc]** Make release script simpler +- **[Misc]** Rename History.md to CHANGELOG.md ### 1.5.1 From 817bbb360e37ff65f8c8006df24d3f65c9b1c56b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 15:59:57 +0100 Subject: [PATCH 198/246] Make releasing List.js easier --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6382f822..6a0177ba 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,9 @@ "test": "npx jest", "build": "npx webpack", "watch": "npx webpack --watch", - "watch-test": "npx jest --watch" + "watch-test": "npx jest --watch", + "preversion": "npm test && npm run build && cp package.json docs/_data/pkg.json && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts", + "postversion": "git push --follow-tags origin master" }, "npmName": "list.js", "npmFileMap": [ From 6cdd0c8cd07e256f2ae74b76d11b4503caee6b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:00:53 +0100 Subject: [PATCH 199/246] 2.0.0 --- dist/list.js | 2198 ++++++++++++----------- dist/list.js.map | 1 + dist/list.min.js | 5 +- dist/list.min.js.map | 1 + docs/assets/javascripts/list.min.js | 5 +- docs/assets/javascripts/list.min.js.map | 1 + package-lock.json | 2 +- package.json | 2 +- 8 files changed, 1206 insertions(+), 1009 deletions(-) create mode 100644 dist/list.js.map create mode 100644 dist/list.min.js.map create mode 100644 docs/assets/javascripts/list.min.js.map diff --git a/dist/list.js b/dist/list.js index d40457fb..560ae864 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,523 +1,25 @@ -/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */ -var List = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.l = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; - -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; - -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; - -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 11); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * Module dependencies. - */ - -var index = __webpack_require__(4); - -/** - * Whitespace regexp. - */ - -var re = /\s+/; - -/** - * toString reference. - */ - -var toString = Object.prototype.toString; - -/** - * Wrap `el` in a `ClassList`. - * - * @param {Element} el - * @return {ClassList} - * @api public - */ - -module.exports = function(el){ - return new ClassList(el); -}; - -/** - * Initialize a new ClassList for `el`. - * - * @param {Element} el - * @api private - */ - -function ClassList(el) { - if (!el || !el.nodeType) { - throw new Error('A DOM element reference is required'); - } - this.el = el; - this.list = el.classList; -} - -/** - * Add class `name` if not already present. - * - * @param {String} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.add = function(name){ - // classList - if (this.list) { - this.list.add(name); - return this; - } - - // fallback - var arr = this.array(); - var i = index(arr, name); - if (!~i) arr.push(name); - this.el.className = arr.join(' '); - return this; -}; - -/** - * Remove class `name` when present, or - * pass a regular expression to remove - * any which match. - * - * @param {String|RegExp} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.remove = function(name){ - // classList - if (this.list) { - this.list.remove(name); - return this; - } - - // fallback - var arr = this.array(); - var i = index(arr, name); - if (~i) arr.splice(i, 1); - this.el.className = arr.join(' '); - return this; -}; - - -/** - * Toggle class `name`, can force state via `force`. - * - * For browsers that support classList, but do not support `force` yet, - * the mistake will be detected and corrected. - * - * @param {String} name - * @param {Boolean} force - * @return {ClassList} - * @api public - */ - -ClassList.prototype.toggle = function(name, force){ - // classList - if (this.list) { - if ("undefined" !== typeof force) { - if (force !== this.list.toggle(name, force)) { - this.list.toggle(name); // toggle again to correct - } - } else { - this.list.toggle(name); - } - return this; - } - - // fallback - if ("undefined" !== typeof force) { - if (!force) { - this.remove(name); - } else { - this.add(name); - } - } else { - if (this.has(name)) { - this.remove(name); - } else { - this.add(name); - } - } - - return this; -}; - -/** - * Return an array of classes. - * - * @return {Array} - * @api public - */ - -ClassList.prototype.array = function(){ - var className = this.el.getAttribute('class') || ''; - var str = className.replace(/^\s+|\s+$/g, ''); - var arr = str.split(re); - if ('' === arr[0]) arr.shift(); - return arr; -}; - -/** - * Check if class `name` is present. - * - * @param {String} name - * @return {ClassList} - * @api public - */ - -ClassList.prototype.has = -ClassList.prototype.contains = function(name){ - return this.list ? this.list.contains(name) : !! ~index(this.array(), name); -}; - - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __webpack_require__) { - -var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', - unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', - prefix = bind !== 'addEventListener' ? 'on' : '', - toArray = __webpack_require__(5); - -/** - * Bind `el` event `type` to `fn`. - * - * @param {Element} el, NodeList, HTMLCollection or Array - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @api public - */ - -exports.bind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][bind](prefix + type, fn, capture || false); - } -}; - -/** - * Unbind `el` event `type`'s callback `fn`. - * - * @param {Element} el, NodeList, HTMLCollection or Array - * @param {String} type - * @param {Function} fn - * @param {Boolean} capture - * @api public - */ - -exports.unbind = function(el, type, fn, capture){ - el = toArray(el); - for ( var i = 0; i < el.length; i++ ) { - el[i][unbind](prefix + type, fn, capture || false); - } -}; - - -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -module.exports = function(list) { - return function(initValues, element, notCreate) { - var item = this; - - this._values = {}; - - this.found = false; // Show if list.searched == true and this.found == true - this.filtered = false;// Show if list.filtered == true and this.filtered == true - - var init = function(initValues, element, notCreate) { - if (element === undefined) { - if (notCreate) { - item.values(initValues, notCreate); - } else { - item.values(initValues); - } - } else { - item.elm = element; - var values = list.templater.get(item, initValues); - item.values(values); - } - }; - - this.values = function(newValues, notCreate) { - if (newValues !== undefined) { - for(var name in newValues) { - item._values[name] = newValues[name]; - } - if (notCreate !== true) { - list.templater.set(item, item.values()); - } - } else { - return item._values; - } - }; - - this.show = function() { - list.templater.show(item); - }; - - this.hide = function() { - list.templater.hide(item); - }; - - this.matching = function() { - return ( - (list.filtered && list.searched && item.found && item.filtered) || - (list.filtered && !list.searched && item.filtered) || - (!list.filtered && list.searched && item.found) || - (!list.filtered && !list.searched) - ); - }; - - this.visible = function() { - return (item.elm && (item.elm.parentNode == list.list)) ? true : false; - }; - - init(initValues, element, notCreate); - }; -}; - - -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -/** - * A cross-browser implementation of getElementsByClass. - * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass. - * - * Find all elements with class `className` inside `container`. - * Use `single = true` to increase performance in older browsers - * when only one element is needed. - * - * @param {String} className - * @param {Element} container - * @param {Boolean} single - * @api public - */ - -var getElementsByClassName = function(container, className, single) { - if (single) { - return container.getElementsByClassName(className)[0]; - } else { - return container.getElementsByClassName(className); - } -}; - -var querySelector = function(container, className, single) { - className = '.' + className; - if (single) { - return container.querySelector(className); - } else { - return container.querySelectorAll(className); - } -}; - -var polyfill = function(container, className, single) { - var classElements = [], - tag = '*'; - - var els = container.getElementsByTagName(tag); - var elsLen = els.length; - var pattern = new RegExp("(^|\\s)"+className+"(\\s|$)"); - for (var i = 0, j = 0; i < elsLen; i++) { - if ( pattern.test(els[i].className) ) { - if (single) { - return els[i]; - } else { - classElements[j] = els[i]; - j++; - } - } - } - return classElements; -}; - -module.exports = (function() { - return function(container, className, single, options) { - options = options || {}; - if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) { - return getElementsByClassName(container, className, single); - } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) { - return querySelector(container, className, single); - } else { - return polyfill(container, className, single); - } - }; -})(); - - -/***/ }), -/* 4 */ -/***/ (function(module, exports) { - -var indexOf = [].indexOf; - -module.exports = function(arr, obj){ - if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { - if (arr[i] === obj) return i; - } - return -1; -}; - - -/***/ }), -/* 5 */ -/***/ (function(module, exports) { - -/** - * Source: https://github.com/timoxley/to-array - * - * Convert an array-like object into an `Array`. - * If `collection` is already an `Array`, then will return a clone of `collection`. - * - * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList` - * @return {Array} Naive conversion of `collection` to a new `Array`. - * @api public - */ - -module.exports = function toArray(collection) { - if (typeof collection === 'undefined') return []; - if (collection === null) return [null]; - if (collection === window) return [window]; - if (typeof collection === 'string') return [collection]; - if (isArray(collection)) return collection; - if (typeof collection.length != 'number') return [collection]; - if (typeof collection === 'function' && collection instanceof Function) return [collection]; - - var arr = []; - for (var i = 0; i < collection.length; i++) { - if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { - arr.push(collection[i]); - } - } - if (!arr.length) return []; - return arr; -}; - -function isArray(arr) { - return Object.prototype.toString.call(arr) === "[object Array]"; -} - - -/***/ }), -/* 6 */ -/***/ (function(module, exports) { - -module.exports = function(s) { - s = (s === undefined) ? "" : s; - s = (s === null) ? "" : s; - s = s.toString(); - return s; -}; - - -/***/ }), -/* 7 */ -/***/ (function(module, exports) { - -/* - * Source: https://github.com/segmentio/extend - */ - -module.exports = function extend (object) { - // Takes an unlimited number of extenders. - var args = Array.prototype.slice.call(arguments, 1); - - // For each extender, copy their properties on our object. - for (var i = 0, source; source = args[i]; i++) { - if (!source) continue; - for (var property in source) { - object[property] = source[property]; - } - } - - return object; -}; - - -/***/ }), -/* 8 */ -/***/ (function(module, exports) { - -module.exports = function(list) { - var addAsync = function(values, callback, items) { +/*! List.js v1.5.0 (https://listjs.com) by Jonny Strömberg (https://javve.com) */ +var List;List = +/******/ (function() { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ "./src/add-async.js": +/*!**************************!*\ + !*** ./src/add-async.js ***! + \**************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { + +module.exports = function (list) { + var addAsync = function addAsync(values, callback, items) { var valuesToAdd = values.splice(0, 50); items = items || []; items = items.concat(list.add(valuesToAdd)); + if (values.length > 0) { - setTimeout(function() { + setTimeout(function () { addAsync(values, callback, items); }, 1); } else { @@ -525,31 +27,40 @@ module.exports = function(list) { callback(items); } }; + return addAsync; }; - /***/ }), -/* 9 */ -/***/ (function(module, exports) { -module.exports = function(list) { +/***/ "./src/filter.js": +/*!***********************!*\ + !*** ./src/filter.js ***! + \***********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { +module.exports = function (list) { // Add handlers list.handlers.filterStart = list.handlers.filterStart || []; list.handlers.filterComplete = list.handlers.filterComplete || []; - - return function(filterFunction) { + return function (filterFunction) { list.trigger('filterStart'); list.i = 1; // Reset paging + list.reset.filter(); + if (filterFunction === undefined) { list.filtered = false; } else { list.filtered = true; var is = list.items; + for (var i = 0, il = is.length; i < il; i++) { var item = is[i]; + if (filterFunction(item)) { item.filtered = true; } else { @@ -557,28 +68,33 @@ module.exports = function(list) { } } } + list.update(); list.trigger('filterComplete'); return list.visibleItems; }; }; - /***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -var classes = __webpack_require__(0), - events = __webpack_require__(1), - extend = __webpack_require__(7), - toString = __webpack_require__(6), - getByClass = __webpack_require__(3), - fuzzy = __webpack_require__(19); - -module.exports = function(list, options) { +/***/ "./src/fuzzy-search.js": +/*!*****************************!*\ + !*** ./src/fuzzy-search.js ***! + \*****************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module, __webpack_require__ */ +/*! CommonJS bailout: module.exports is used directly at 8:0-14 */ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var classes = __webpack_require__(/*! ./utils/classes */ "./src/utils/classes.js"), + events = __webpack_require__(/*! ./utils/events */ "./src/utils/events.js"), + extend = __webpack_require__(/*! ./utils/extend */ "./src/utils/extend.js"), + toString = __webpack_require__(/*! ./utils/to-string */ "./src/utils/to-string.js"), + getByClass = __webpack_require__(/*! ./utils/get-by-class */ "./src/utils/get-by-class.js"), + fuzzy = __webpack_require__(/*! ./utils/fuzzy */ "./src/utils/fuzzy.js"); + +module.exports = function (list, options) { options = options || {}; - options = extend({ location: 0, distance: 100, @@ -586,11 +102,8 @@ module.exports = function(list, options) { multiSearch: true, searchClass: 'fuzzy-search' }, options); - - - var fuzzySearch = { - search: function(searchString, columns) { + search: function search(searchString, columns) { // Substract arguments from the searchString or put searchString as only argument var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]; @@ -598,83 +111,93 @@ module.exports = function(list, options) { fuzzySearch.item(list.items[k], columns, searchArguments); } }, - item: function(item, columns, searchArguments) { + item: function item(_item, columns, searchArguments) { var found = true; - for(var i = 0; i < searchArguments.length; i++) { + + for (var i = 0; i < searchArguments.length; i++) { var foundArgument = false; + for (var j = 0, jl = columns.length; j < jl; j++) { - if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) { + if (fuzzySearch.values(_item.values(), columns[j], searchArguments[i])) { foundArgument = true; } } - if(!foundArgument) { + + if (!foundArgument) { found = false; } } - item.found = found; + + _item.found = found; }, - values: function(values, value, searchArgument) { - if (values.hasOwnProperty(value)) { - var text = toString(values[value]).toLowerCase(); + values: function values(_values, value, searchArgument) { + if (_values.hasOwnProperty(value)) { + var text = toString(_values[value]).toLowerCase(); if (fuzzy(text, searchArgument, options)) { return true; } } + return false; } }; - - - events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function(e) { + events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) { var target = e.target || e.srcElement; // IE have srcElement + list.search(target.value, fuzzySearch.search); }); - - return function(str, columns) { + return function (str, columns) { list.search(str, columns, fuzzySearch.search); }; }; - /***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -var naturalSort = __webpack_require__(18), - getByClass = __webpack_require__(3), - extend = __webpack_require__(7), - indexOf = __webpack_require__(4), - events = __webpack_require__(1), - toString = __webpack_require__(6), - classes = __webpack_require__(0), - getAttribute = __webpack_require__(17), - toArray = __webpack_require__(5); - -module.exports = function(id, options, values) { +/***/ "./src/index.js": +/*!**********************!*\ + !*** ./src/index.js ***! + \**********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module, __webpack_require__ */ +/*! CommonJS bailout: module.exports is used directly at 11:0-14 */ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var naturalSort = __webpack_require__(/*! string-natural-compare */ "./node_modules/string-natural-compare/natural-compare.js"), + getByClass = __webpack_require__(/*! ./utils/get-by-class */ "./src/utils/get-by-class.js"), + extend = __webpack_require__(/*! ./utils/extend */ "./src/utils/extend.js"), + indexOf = __webpack_require__(/*! ./utils/index-of */ "./src/utils/index-of.js"), + events = __webpack_require__(/*! ./utils/events */ "./src/utils/events.js"), + toString = __webpack_require__(/*! ./utils/to-string */ "./src/utils/to-string.js"), + classes = __webpack_require__(/*! ./utils/classes */ "./src/utils/classes.js"), + getAttribute = __webpack_require__(/*! ./utils/get-attribute */ "./src/utils/get-attribute.js"), + toArray = __webpack_require__(/*! ./utils/to-array */ "./src/utils/to-array.js"); + +module.exports = function (id, options, values) { var self = this, - init, - Item = __webpack_require__(2)(self), - addAsync = __webpack_require__(8)(self), - initPagination = __webpack_require__(12)(self); + init, + Item = __webpack_require__(/*! ./item */ "./src/item.js")(self), + addAsync = __webpack_require__(/*! ./add-async */ "./src/add-async.js")(self), + initPagination = __webpack_require__(/*! ./pagination */ "./src/pagination.js")(self); init = { - start: function() { - self.listClass = "list"; - self.searchClass = "search"; - self.sortClass = "sort"; - self.page = 10000; - self.i = 1; - self.items = []; - self.visibleItems = []; - self.matchingItems = []; - self.searched = false; - self.filtered = false; - self.searchColumns = undefined; - self.handlers = { 'updated': [] }; - self.valueNames = []; - self.utils = { + start: function start() { + self.listClass = 'list'; + self.searchClass = 'search'; + self.sortClass = 'sort'; + self.page = 10000; + self.i = 1; + self.items = []; + self.visibleItems = []; + self.matchingItems = []; + self.searched = false; + self.filtered = false; + self.searchColumns = undefined; + self.handlers = { + updated: [] + }; + self.valueNames = []; + self.utils = { getByClass: getByClass, extend: extend, indexOf: indexOf, @@ -685,208 +208,234 @@ module.exports = function(id, options, values) { getAttribute: getAttribute, toArray: toArray }; - self.utils.extend(self, options); + self.listContainer = typeof id === 'string' ? document.getElementById(id) : id; - self.listContainer = (typeof(id) === 'string') ? document.getElementById(id) : id; - if (!self.listContainer) { return; } - self.list = getByClass(self.listContainer, self.listClass, true); - - self.parse = __webpack_require__(13)(self); - self.templater = __webpack_require__(16)(self); - self.search = __webpack_require__(14)(self); - self.filter = __webpack_require__(9)(self); - self.sort = __webpack_require__(15)(self); - self.fuzzySearch = __webpack_require__(10)(self, options.fuzzySearch); + if (!self.listContainer) { + return; + } + self.list = getByClass(self.listContainer, self.listClass, true); + self.parse = __webpack_require__(/*! ./parse */ "./src/parse.js")(self); + self.templater = __webpack_require__(/*! ./templater */ "./src/templater.js")(self); + self.search = __webpack_require__(/*! ./search */ "./src/search.js")(self); + self.filter = __webpack_require__(/*! ./filter */ "./src/filter.js")(self); + self.sort = __webpack_require__(/*! ./sort */ "./src/sort.js")(self); + self.fuzzySearch = __webpack_require__(/*! ./fuzzy-search */ "./src/fuzzy-search.js")(self, options.fuzzySearch); this.handlers(); this.items(); this.pagination(); - self.update(); }, - handlers: function() { + handlers: function handlers() { for (var handler in self.handlers) { if (self[handler]) { self.on(handler, self[handler]); } } }, - items: function() { + items: function items() { self.parse(self.list); + if (values !== undefined) { self.add(values); } }, - pagination: function() { + pagination: function pagination() { if (options.pagination !== undefined) { if (options.pagination === true) { options.pagination = [{}]; } - if (options.pagination[0] === undefined){ + + if (options.pagination[0] === undefined) { options.pagination = [options.pagination]; } + for (var i = 0, il = options.pagination.length; i < il; i++) { initPagination(options.pagination[i]); } } } }; - /* - * Re-parse the List, use if html have changed - */ - this.reIndex = function() { - self.items = []; - self.visibleItems = []; - self.matchingItems = []; - self.searched = false; - self.filtered = false; + * Re-parse the List, use if html have changed + */ + + this.reIndex = function () { + self.items = []; + self.visibleItems = []; + self.matchingItems = []; + self.searched = false; + self.filtered = false; self.parse(self.list); }; - this.toJSON = function() { + this.toJSON = function () { var json = []; + for (var i = 0, il = self.items.length; i < il; i++) { json.push(self.items[i].values()); } + return json; }; + /* + * Add object to list + */ - /* - * Add object to list - */ - this.add = function(values, callback) { + this.add = function (values, callback) { if (values.length === 0) { return; } + if (callback) { addAsync(values, callback); return; } + var added = [], - notCreate = false; - if (values[0] === undefined){ + notCreate = false; + + if (values[0] === undefined) { values = [values]; } + for (var i = 0, il = values.length; i < il; i++) { var item = null; - notCreate = (self.items.length > self.page) ? true : false; + notCreate = self.items.length > self.page ? true : false; item = new Item(values[i], undefined, notCreate); self.items.push(item); added.push(item); } + self.update(); return added; }; - this.show = function(i, page) { - this.i = i; - this.page = page; - self.update(); + this.show = function (i, page) { + this.i = i; + this.page = page; + self.update(); return self; - }; - + }; /* Removes object from list. - * Loops through the list and removes objects where - * property "valuename" === value - */ - this.remove = function(valueName, value, options) { + * Loops through the list and removes objects where + * property "valuename" === value + */ + + + this.remove = function (valueName, value, options) { var found = 0; + for (var i = 0, il = self.items.length; i < il; i++) { if (self.items[i].values()[valueName] == value) { self.templater.remove(self.items[i], options); - self.items.splice(i,1); + self.items.splice(i, 1); il--; i--; found++; } } + self.update(); return found; }; - /* Gets the objects in the list which - * property "valueName" === value - */ - this.get = function(valueName, value) { + * property "valueName" === value + */ + + + this.get = function (valueName, value) { var matchedItems = []; + for (var i = 0, il = self.items.length; i < il; i++) { var item = self.items[i]; + if (item.values()[valueName] == value) { matchedItems.push(item); } } + return matchedItems; }; - /* - * Get size of the list - */ - this.size = function() { + * Get size of the list + */ + + + this.size = function () { return self.items.length; }; - /* - * Removes all items from the list - */ - this.clear = function() { + * Removes all items from the list + */ + + + this.clear = function () { self.templater.clear(); self.items = []; return self; }; - this.on = function(event, callback) { + this.on = function (event, callback) { self.handlers[event].push(callback); return self; }; - this.off = function(event, callback) { + this.off = function (event, callback) { var e = self.handlers[event]; var index = indexOf(e, callback); + if (index > -1) { e.splice(index, 1); } + return self; }; - this.trigger = function(event) { + this.trigger = function (event) { var i = self.handlers[event].length; - while(i--) { + + while (i--) { self.handlers[event][i](self); } + return self; }; this.reset = { - filter: function() { + filter: function filter() { var is = self.items, - il = is.length; + il = is.length; + while (il--) { is[il].filtered = false; } + return self; }, - search: function() { + search: function search() { var is = self.items, - il = is.length; + il = is.length; + while (il--) { is[il].found = false; } + return self; } }; - this.update = function() { + this.update = function () { var is = self.items, - il = is.length; - + il = is.length; self.visibleItems = []; self.matchingItems = []; self.templater.clear(); + for (var i = 0; i < il; i++) { - if (is[i].matching() && ((self.matchingItems.length+1) >= self.i && self.visibleItems.length < self.page)) { + if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) { is[i].show(); self.visibleItems.push(is[i]); self.matchingItems.push(is[i]); @@ -897,6 +446,7 @@ module.exports = function(id, options, values) { is[i].hide(); } } + self.trigger('updated'); return self; }; @@ -904,136 +454,229 @@ module.exports = function(id, options, values) { init.start(); }; - /***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { -var classes = __webpack_require__(0), - events = __webpack_require__(1), - List = __webpack_require__(11); +/***/ "./src/item.js": +/*!*********************!*\ + !*** ./src/item.js ***! + \*********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { + +module.exports = function (list) { + return function (initValues, element, notCreate) { + var item = this; + this._values = {}; + this.found = false; // Show if list.searched == true and this.found == true -module.exports = function(list) { + this.filtered = false; // Show if list.filtered == true and this.filtered == true - var refresh = function(pagingList, options) { - var item, - l = list.matchingItems.length, - index = list.i, - page = list.page, - pages = Math.ceil(l / page), - currentPage = Math.ceil((index / page)), - innerWindow = options.innerWindow || 2, - left = options.left || options.outerWindow || 0, - right = options.right || options.outerWindow || 0; + var init = function init(initValues, element, notCreate) { + if (element === undefined) { + if (notCreate) { + item.values(initValues, notCreate); + } else { + item.values(initValues); + } + } else { + item.elm = element; + var values = list.templater.get(item, initValues); + item.values(values); + } + }; - right = pages - right; + this.values = function (newValues, notCreate) { + if (newValues !== undefined) { + for (var name in newValues) { + item._values[name] = newValues[name]; + } + if (notCreate !== true) { + list.templater.set(item, item.values()); + } + } else { + return item._values; + } + }; + + this.show = function () { + list.templater.show(item); + }; + + this.hide = function () { + list.templater.hide(item); + }; + + this.matching = function () { + return list.filtered && list.searched && item.found && item.filtered || list.filtered && !list.searched && item.filtered || !list.filtered && list.searched && item.found || !list.filtered && !list.searched; + }; + + this.visible = function () { + return item.elm && item.elm.parentNode == list.list ? true : false; + }; + + init(initValues, element, notCreate); + }; +}; + +/***/ }), + +/***/ "./src/pagination.js": +/*!***************************!*\ + !*** ./src/pagination.js ***! + \***************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module, __webpack_require__ */ +/*! CommonJS bailout: module.exports is used directly at 5:0-14 */ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var classes = __webpack_require__(/*! ./utils/classes */ "./src/utils/classes.js"), + events = __webpack_require__(/*! ./utils/events */ "./src/utils/events.js"), + List = __webpack_require__(/*! ./index */ "./src/index.js"); + +module.exports = function (list) { + var isHidden = false; + + var refresh = function refresh(pagingList, options) { + if (list.page < 1) { + list.listContainer.style.display = 'none'; + isHidden = true; + return; + } else if (isHidden) { + list.listContainer.style.display = 'block'; + } + + var item, + l = list.matchingItems.length, + index = list.i, + page = list.page, + pages = Math.ceil(l / page), + currentPage = Math.ceil(index / page), + innerWindow = options.innerWindow || 2, + left = options.left || options.outerWindow || 0, + right = options.right || options.outerWindow || 0; + right = pages - right; pagingList.clear(); - for (var i = 1; i <= pages; i++) { - var className = (currentPage === i) ? "active" : ""; - //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className); + for (var i = 1; i <= pages; i++) { + var className = currentPage === i ? 'active' : ''; //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className); if (is.number(i, left, right, currentPage, innerWindow)) { item = pagingList.add({ page: i, dotted: false })[0]; + if (className) { classes(item.elm).add(className); } - addEvent(item.elm, i, page); + + item.elm.firstChild.setAttribute('data-i', i); + item.elm.firstChild.setAttribute('data-page', page); } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) { item = pagingList.add({ - page: "...", + page: '...', dotted: true })[0]; - classes(item.elm).add("disabled"); + classes(item.elm).add('disabled'); } } }; var is = { - number: function(i, left, right, currentPage, innerWindow) { - return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow); + number: function number(i, left, right, currentPage, innerWindow) { + return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow); }, - left: function(i, left) { - return (i <= left); + left: function left(i, _left) { + return i <= _left; }, - right: function(i, right) { - return (i > right); + right: function right(i, _right) { + return i > _right; }, - innerWindow: function(i, currentPage, innerWindow) { - return ( i >= (currentPage - innerWindow) && i <= (currentPage + innerWindow)); + innerWindow: function innerWindow(i, currentPage, _innerWindow) { + return i >= currentPage - _innerWindow && i <= currentPage + _innerWindow; }, - dotted: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { - return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || (this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)); + dotted: function dotted(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + return this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) || this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem); }, - dottedLeft: function(pagingList, i, left, right, currentPage, innerWindow) { - return ((i == (left + 1)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + dottedLeft: function dottedLeft(pagingList, i, left, right, currentPage, innerWindow) { + return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right); }, - dottedRight: function(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { - if (pagingList.items[currentPageItem-1].values().dotted) { + dottedRight: function dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem) { + if (pagingList.items[currentPageItem - 1].values().dotted) { return false; } else { - return ((i == (right)) && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)); + return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right); } } }; - - var addEvent = function(elm, i, page) { - events.bind(elm, 'click', function() { - list.show((i-1)*page + 1, page); - }); - }; - - return function(options) { + return function (options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: "
                                        • ", + item: "
                                        • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist' }); + events.bind(pagingList.listContainer, 'click', function (e) { + var target = e.target || e.srcElement, + page = list.utils.getAttribute(target, 'data-page'), + i = list.utils.getAttribute(target, 'data-i'); - list.on('updated', function() { + if (i) { + list.show((i - 1) * page + 1, page); + } + }); + list.on('updated', function () { refresh(pagingList, options); }); refresh(pagingList, options); }; }; - /***/ }), -/* 13 */ -/***/ (function(module, exports, __webpack_require__) { -module.exports = function(list) { +/***/ "./src/parse.js": +/*!**********************!*\ + !*** ./src/parse.js ***! + \**********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module, __webpack_require__ */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - var Item = __webpack_require__(2)(list); +module.exports = function (list) { + var Item = __webpack_require__(/*! ./item */ "./src/item.js")(list); - var getChildren = function(parent) { + var getChildren = function getChildren(parent) { var nodes = parent.childNodes, - items = []; + items = []; + for (var i = 0, il = nodes.length; i < il; i++) { // Only textnodes have a data attribute if (nodes[i].data === undefined) { items.push(nodes[i]); } } + return items; }; - var parse = function(itemElements, valueNames) { + var parse = function parse(itemElements, valueNames) { for (var i = 0, il = itemElements.length; i < il; i++) { list.items.push(new Item(valueNames, itemElements[i])); } }; - var parseAsync = function(itemElements, valueNames) { + + var parseAsync = function parseAsync(itemElements, valueNames) { var itemsToIndex = itemElements.splice(0, 50); // TODO: If < 100 items, what happens in IE etc? + parse(itemsToIndex, valueNames); + if (itemElements.length > 0) { - setTimeout(function() { + setTimeout(function () { parseAsync(itemElements, valueNames); }, 1); } else { @@ -1043,10 +686,9 @@ module.exports = function(list) { }; list.handlers.parseComplete = list.handlers.parseComplete || []; - - return function() { + return function () { var itemsToIndex = getChildren(list.list), - valueNames = list.valueNames; + valueNames = list.valueNames; if (list.indexAsync) { parseAsync(itemsToIndex, valueNames); @@ -1056,28 +698,31 @@ module.exports = function(list) { }; }; - /***/ }), -/* 14 */ -/***/ (function(module, exports) { - -module.exports = function(list) { - var item, - text, - columns, - searchString, - customSearch; +/***/ "./src/search.js": +/*!***********************!*\ + !*** ./src/search.js ***! + \***********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { + +module.exports = function (_list) { + var item, text, columns, searchString, customSearch; var prepare = { - resetList: function() { - list.i = 1; - list.templater.clear(); + resetList: function resetList() { + _list.i = 1; + + _list.templater.clear(); + customSearch = undefined; }, - setOptions: function(args) { + setOptions: function setOptions(args) { if (args.length == 2 && args[1] instanceof Array) { columns = args[1]; - } else if (args.length == 2 && typeof(args[1]) == "function") { + } else if (args.length == 2 && typeof args[1] == 'function') { columns = undefined; customSearch = args[1]; } else if (args.length == 3) { @@ -1087,67 +732,77 @@ module.exports = function(list) { columns = undefined; } }, - setColumns: function() { - if (list.items.length === 0) return; + setColumns: function setColumns() { + if (_list.items.length === 0) return; + if (columns === undefined) { - columns = (list.searchColumns === undefined) ? prepare.toArray(list.items[0].values()) : list.searchColumns; + columns = _list.searchColumns === undefined ? prepare.toArray(_list.items[0].values()) : _list.searchColumns; } }, - setSearchString: function(s) { - s = list.utils.toString(s).toLowerCase(); - s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, "\\$&"); // Escape regular expression characters + setSearchString: function setSearchString(s) { + s = _list.utils.toString(s).toLowerCase(); + s = s.replace(/[-[\]{}()*+?.,\\^$|#]/g, '\\$&'); // Escape regular expression characters + searchString = s; }, - toArray: function(values) { + toArray: function toArray(values) { var tmpColumn = []; + for (var name in values) { tmpColumn.push(name); } + return tmpColumn; } }; var search = { - list: function() { - for (var k = 0, kl = list.items.length; k < kl; k++) { - search.item(list.items[k]); + list: function list() { + for (var k = 0, kl = _list.items.length; k < kl; k++) { + search.item(_list.items[k]); } }, - item: function(item) { - item.found = false; + item: function item(_item) { + _item.found = false; + for (var j = 0, jl = columns.length; j < jl; j++) { - if (search.values(item.values(), columns[j])) { - item.found = true; + if (search.values(_item.values(), columns[j])) { + _item.found = true; return; } } }, - values: function(values, column) { - if (values.hasOwnProperty(column)) { - text = list.utils.toString(values[column]).toLowerCase(); - if ((searchString !== "") && (text.search(searchString) > -1)) { + values: function values(_values, column) { + if (_values.hasOwnProperty(column)) { + text = _list.utils.toString(_values[column]).toLowerCase(); + + if (searchString !== '' && text.search(searchString) > -1) { return true; } } + return false; }, - reset: function() { - list.reset.search(); - list.searched = false; + reset: function reset() { + _list.reset.search(); + + _list.searched = false; } }; - var searchMethod = function(str) { - list.trigger('searchStart'); + var searchMethod = function searchMethod(str) { + _list.trigger('searchStart'); prepare.resetList(); prepare.setSearchString(str); prepare.setOptions(arguments); // str, cols|searchFunction, searchFunction + prepare.setColumns(); - if (searchString === "" ) { + if (searchString === '') { search.reset(); } else { - list.searched = true; + _list.searched = true; + if (customSearch) { customSearch(searchString, columns); } else { @@ -1155,26 +810,32 @@ module.exports = function(list) { } } - list.update(); - list.trigger('searchComplete'); - return list.visibleItems; + _list.update(); + + _list.trigger('searchComplete'); + + return _list.visibleItems; }; - list.handlers.searchStart = list.handlers.searchStart || []; - list.handlers.searchComplete = list.handlers.searchComplete || []; + _list.handlers.searchStart = _list.handlers.searchStart || []; + _list.handlers.searchComplete = _list.handlers.searchComplete || []; + + _list.utils.events.bind(_list.utils.getByClass(_list.listContainer, _list.searchClass), 'keyup', function (e) { + var target = e.target || e.srcElement, + // IE have srcElement + alreadyCleared = target.value === '' && !_list.searched; - list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function(e) { - var target = e.target || e.srcElement, // IE have srcElement - alreadyCleared = (target.value === "" && !list.searched); - if (!alreadyCleared) { // If oninput already have resetted the list, do nothing + if (!alreadyCleared) { + // If oninput already have resetted the list, do nothing searchMethod(target.value); } - }); + }); // Used to detect click on HTML5 clear button + - // Used to detect click on HTML5 clear button - list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function(e) { + _list.utils.events.bind(_list.utils.getByClass(_list.listContainer, _list.searchClass), 'input', function (e) { var target = e.target || e.srcElement; - if (target.value === "") { + + if (target.value === '') { searchMethod(''); } }); @@ -1182,49 +843,59 @@ module.exports = function(list) { return searchMethod; }; - /***/ }), -/* 15 */ -/***/ (function(module, exports) { -module.exports = function(list) { +/***/ "./src/sort.js": +/*!*********************!*\ + !*** ./src/sort.js ***! + \*********************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { +module.exports = function (list) { var buttons = { els: undefined, - clear: function() { + clear: function clear() { for (var i = 0, il = buttons.els.length; i < il; i++) { list.utils.classes(buttons.els[i]).remove('asc'); list.utils.classes(buttons.els[i]).remove('desc'); } }, - getOrder: function(btn) { + getOrder: function getOrder(btn) { var predefinedOrder = list.utils.getAttribute(btn, 'data-order'); - if (predefinedOrder == "asc" || predefinedOrder == "desc") { + + if (predefinedOrder == 'asc' || predefinedOrder == 'desc') { return predefinedOrder; } else if (list.utils.classes(btn).has('desc')) { - return "asc"; + return 'asc'; } else if (list.utils.classes(btn).has('asc')) { - return "desc"; + return 'desc'; } else { - return "asc"; + return 'asc'; } }, - getInSensitive: function(btn, options) { + getInSensitive: function getInSensitive(btn, options) { var insensitive = list.utils.getAttribute(btn, 'data-insensitive'); - if (insensitive === "false") { + + if (insensitive === 'false') { options.insensitive = false; } else { options.insensitive = true; } }, - setOrder: function(options) { + setOrder: function setOrder(options) { for (var i = 0, il = buttons.els.length; i < il; i++) { var btn = buttons.els[i]; + if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) { continue; } + var predefinedOrder = list.utils.getAttribute(btn, 'data-order'); - if (predefinedOrder == "asc" || predefinedOrder == "desc") { + + if (predefinedOrder == 'asc' || predefinedOrder == 'desc') { if (predefinedOrder == options.order) { list.utils.classes(btn).add(options.order); } @@ -1235,10 +906,9 @@ module.exports = function(list) { } }; - var sort = function() { + var sort = function sort() { list.trigger('sortStart'); var options = {}; - var target = arguments[0].currentTarget || arguments[0].srcElement || undefined; if (target) { @@ -1248,31 +918,31 @@ module.exports = function(list) { } else { options = arguments[1] || options; options.valueName = arguments[0]; - options.order = options.order || "asc"; - options.insensitive = (typeof options.insensitive == "undefined") ? true : options.insensitive; + options.order = options.order || 'asc'; + options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive; } buttons.clear(); - buttons.setOrder(options); - - - // caseInsensitive + buttons.setOrder(options); // caseInsensitive // alphabet - var customSortFunction = (options.sortFunction || list.sortFunction || null), - multi = ((options.order === 'desc') ? -1 : 1), + + var customSortFunction = options.sortFunction || list.sortFunction || null, + multi = options.order === 'desc' ? -1 : 1, sortFunction; if (customSortFunction) { - sortFunction = function(itemA, itemB) { + sortFunction = function sortFunction(itemA, itemB) { return customSortFunction(itemA, itemB, options) * multi; }; } else { - sortFunction = function(itemA, itemB) { + sortFunction = function sortFunction(itemA, itemB) { var sort = list.utils.naturalSort; sort.alphabet = list.alphabet || options.alphabet || undefined; + if (!sort.alphabet && options.insensitive) { sort = list.utils.naturalSort.caseInsensitive; } + return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi; }; } @@ -1280,63 +950,73 @@ module.exports = function(list) { list.items.sort(sortFunction); list.update(); list.trigger('sortComplete'); - }; + }; // Add handlers + - // Add handlers list.handlers.sortStart = list.handlers.sortStart || []; list.handlers.sortComplete = list.handlers.sortComplete || []; - buttons.els = list.utils.getByClass(list.listContainer, list.sortClass); list.utils.events.bind(buttons.els, 'click', sort); list.on('searchStart', buttons.clear); list.on('filterStart', buttons.clear); - return sort; }; - /***/ }), -/* 16 */ -/***/ (function(module, exports) { -var Templater = function(list) { +/***/ "./src/templater.js": +/*!**************************!*\ + !*** ./src/templater.js ***! + \**************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 198:0-14 */ +/***/ (function(module) { + +var Templater = function Templater(list) { var itemSource, - templater = this; + templater = this; - var init = function() { + var init = function init() { itemSource = templater.getItemSource(list.item); + if (itemSource) { itemSource = templater.clearSourceItem(itemSource, list.valueNames); } }; - this.clearSourceItem = function(el, valueNames) { - for(var i = 0, il = valueNames.length; i < il; i++) { + this.clearSourceItem = function (el, valueNames) { + for (var i = 0, il = valueNames.length; i < il; i++) { var elm; + if (valueNames[i].data) { for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - el.setAttribute('data-'+valueNames[i].data[j], ''); + el.setAttribute('data-' + valueNames[i].data[j], ''); } } else if (valueNames[i].attr && valueNames[i].name) { elm = list.utils.getByClass(el, valueNames[i].name, true); + if (elm) { - elm.setAttribute(valueNames[i].attr, ""); + elm.setAttribute(valueNames[i].attr, ''); } } else { elm = list.utils.getByClass(el, valueNames[i], true); + if (elm) { - elm.innerHTML = ""; + elm.innerHTML = ''; } } + elm = undefined; } + return el; }; - this.getItemSource = function(item) { + this.getItemSource = function (item) { if (item === undefined) { var nodes = list.list.childNodes, - items = []; + items = []; for (var i = 0, il = nodes.length; i < il; i++) { // Only textnodes have a data attribute @@ -1348,48 +1028,57 @@ var Templater = function(list) { var tbody = document.createElement('tbody'); tbody.innerHTML = item; return tbody.firstChild; - } else if (item.indexOf("<") !== -1) { + } else if (item.indexOf('<') !== -1) { var div = document.createElement('div'); div.innerHTML = item; return div.firstChild; } else { var source = document.getElementById(list.item); + if (source) { return source; } } + return undefined; }; - this.get = function(item, valueNames) { + this.get = function (item, valueNames) { templater.create(item); var values = {}; - for(var i = 0, il = valueNames.length; i < il; i++) { + + for (var i = 0, il = valueNames.length; i < il; i++) { var elm; + if (valueNames[i].data) { for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-'+valueNames[i].data[j]); + values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j]); } } else if (valueNames[i].attr && valueNames[i].name) { elm = list.utils.getByClass(item.elm, valueNames[i].name, true); - values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ""; + values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''; } else { elm = list.utils.getByClass(item.elm, valueNames[i], true); - values[valueNames[i]] = elm ? elm.innerHTML : ""; + values[valueNames[i]] = elm ? elm.innerHTML : ''; } + elm = undefined; } + return values; }; - this.set = function(item, values) { - var getValueName = function(name) { + this.set = function (item, values) { + var getValueName = function getValueName(name) { for (var i = 0, il = list.valueNames.length; i < il; i++) { if (list.valueNames[i].data) { var data = list.valueNames[i].data; + for (var j = 0, jl = data.length; j < jl; j++) { if (data[j] === name) { - return { data: name }; + return { + data: name + }; } } } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) { @@ -1399,85 +1088,500 @@ var Templater = function(list) { } } }; - var setValue = function(name, value) { + + var setValue = function setValue(name, value) { var elm; var valueName = getValueName(name); - if (!valueName) - return; + if (!valueName) return; + if (valueName.data) { - item.elm.setAttribute('data-'+valueName.data, value); + item.elm.setAttribute('data-' + valueName.data, value); } else if (valueName.attr && valueName.name) { elm = list.utils.getByClass(item.elm, valueName.name, true); + if (elm) { elm.setAttribute(valueName.attr, value); } } else { elm = list.utils.getByClass(item.elm, valueName, true); + if (elm) { elm.innerHTML = value; } } + elm = undefined; }; + if (!templater.create(item)) { - for(var v in values) { + for (var v in values) { if (values.hasOwnProperty(v)) { setValue(v, values[v]); } } } - }; + }; + + this.create = function (item) { + if (item.elm !== undefined) { + return false; + } + + if (itemSource === undefined) { + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); + } + /* If item source does not exists, use the first item in list as + source for new items */ + + + var newItem = itemSource.cloneNode(true); + newItem.removeAttribute('id'); + item.elm = newItem; + templater.set(item, item.values()); + return true; + }; + + this.remove = function (item) { + if (item.elm.parentNode === list.list) { + list.list.removeChild(item.elm); + } + }; + + this.show = function (item) { + templater.create(item); + list.list.appendChild(item.elm); + }; + + this.hide = function (item) { + if (item.elm !== undefined && item.elm.parentNode === list.list) { + list.list.removeChild(item.elm); + } + }; + + this.clear = function () { + /* .innerHTML = ''; fucks up IE */ + if (list.list.hasChildNodes()) { + while (list.list.childNodes.length >= 1) { + list.list.removeChild(list.list.firstChild); + } + } + }; + + init(); +}; + +module.exports = function (list) { + return new Templater(list); +}; + +/***/ }), + +/***/ "./src/utils/classes.js": +/*!******************************!*\ + !*** ./src/utils/classes.js ***! + \******************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module, __webpack_require__ */ +/*! CommonJS bailout: module.exports is used directly at 24:0-14 */ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/** + * Module dependencies. + */ +var index = __webpack_require__(/*! ./index-of */ "./src/utils/index-of.js"); +/** + * Whitespace regexp. + */ + + +var re = /\s+/; +/** + * toString reference. + */ + +var toString = Object.prototype.toString; +/** + * Wrap `el` in a `ClassList`. + * + * @param {Element} el + * @return {ClassList} + * @api public + */ + +module.exports = function (el) { + return new ClassList(el); +}; +/** + * Initialize a new ClassList for `el`. + * + * @param {Element} el + * @api private + */ + + +function ClassList(el) { + if (!el || !el.nodeType) { + throw new Error('A DOM element reference is required'); + } + + this.el = el; + this.list = el.classList; +} +/** + * Add class `name` if not already present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + + +ClassList.prototype.add = function (name) { + // classList + if (this.list) { + this.list.add(name); + return this; + } // fallback + + + var arr = this.array(); + var i = index(arr, name); + if (!~i) arr.push(name); + this.el.className = arr.join(' '); + return this; +}; +/** + * Remove class `name` when present, or + * pass a regular expression to remove + * any which match. + * + * @param {String|RegExp} name + * @return {ClassList} + * @api public + */ + + +ClassList.prototype.remove = function (name) { + // classList + if (this.list) { + this.list.remove(name); + return this; + } // fallback + + + var arr = this.array(); + var i = index(arr, name); + if (~i) arr.splice(i, 1); + this.el.className = arr.join(' '); + return this; +}; +/** + * Toggle class `name`, can force state via `force`. + * + * For browsers that support classList, but do not support `force` yet, + * the mistake will be detected and corrected. + * + * @param {String} name + * @param {Boolean} force + * @return {ClassList} + * @api public + */ + + +ClassList.prototype.toggle = function (name, force) { + // classList + if (this.list) { + if ('undefined' !== typeof force) { + if (force !== this.list.toggle(name, force)) { + this.list.toggle(name); // toggle again to correct + } + } else { + this.list.toggle(name); + } + + return this; + } // fallback + + + if ('undefined' !== typeof force) { + if (!force) { + this.remove(name); + } else { + this.add(name); + } + } else { + if (this.has(name)) { + this.remove(name); + } else { + this.add(name); + } + } + + return this; +}; +/** + * Return an array of classes. + * + * @return {Array} + * @api public + */ + + +ClassList.prototype.array = function () { + var className = this.el.getAttribute('class') || ''; + var str = className.replace(/^\s+|\s+$/g, ''); + var arr = str.split(re); + if ('' === arr[0]) arr.shift(); + return arr; +}; +/** + * Check if class `name` is present. + * + * @param {String} name + * @return {ClassList} + * @api public + */ + + +ClassList.prototype.has = ClassList.prototype.contains = function (name) { + return this.list ? this.list.contains(name) : !!~index(this.array(), name); +}; + +/***/ }), + +/***/ "./src/utils/events.js": +/*!*****************************!*\ + !*** ./src/utils/events.js ***! + \*****************************/ +/*! default exports */ +/*! export bind [provided] [no usage info] [missing usage info prevents renaming] */ +/*! export unbind [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_exports__, __webpack_require__ */ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', + unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent', + prefix = bind !== 'addEventListener' ? 'on' : '', + toArray = __webpack_require__(/*! ./to-array */ "./src/utils/to-array.js"); +/** + * Bind `el` event `type` to `fn`. + * + * @param {Element} el, NodeList, HTMLCollection or Array + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @api public + */ + + +exports.bind = function (el, type, fn, capture) { + el = toArray(el); + + for (var i = 0; i < el.length; i++) { + el[i][bind](prefix + type, fn, capture || false); + } +}; +/** + * Unbind `el` event `type`'s callback `fn`. + * + * @param {Element} el, NodeList, HTMLCollection or Array + * @param {String} type + * @param {Function} fn + * @param {Boolean} capture + * @api public + */ + + +exports.unbind = function (el, type, fn, capture) { + el = toArray(el); + + for (var i = 0; i < el.length; i++) { + el[i][unbind](prefix + type, fn, capture || false); + } +}; + +/***/ }), + +/***/ "./src/utils/extend.js": +/*!*****************************!*\ + !*** ./src/utils/extend.js ***! + \*****************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 4:0-14 */ +/***/ (function(module) { + +/* + * Source: https://github.com/segmentio/extend + */ +module.exports = function extend(object) { + // Takes an unlimited number of extenders. + var args = Array.prototype.slice.call(arguments, 1); // For each extender, copy their properties on our object. + + for (var i = 0, source; source = args[i]; i++) { + if (!source) continue; + + for (var property in source) { + object[property] = source[property]; + } + } - this.create = function(item) { - if (item.elm !== undefined) { - return false; + return object; +}; + +/***/ }), + +/***/ "./src/utils/fuzzy.js": +/*!****************************!*\ + !*** ./src/utils/fuzzy.js ***! + \****************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { + +module.exports = function (text, pattern, options) { + // Aproximately where in the text is the pattern expected to be found? + var Match_Location = options.location || 0; //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. + + var Match_Distance = options.distance || 100; // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. + + var Match_Threshold = options.threshold || 0.4; + if (pattern === text) return true; // Exact match + + if (pattern.length > 32) return false; // This algorithm cannot be used + // Set starting location at beginning text and initialise the alphabet. + + var loc = Match_Location, + s = function () { + var q = {}, + i; + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] = 0; } - if (itemSource === undefined) { - throw new Error("The list need to have at list one item on init otherwise you'll have to add a template."); + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] |= 1 << pattern.length - i - 1; } - /* If item source does not exists, use the first item in list as - source for new items */ - var newItem = itemSource.cloneNode(true); - newItem.removeAttribute('id'); - item.elm = newItem; - templater.set(item, item.values()); - return true; - }; - this.remove = function(item) { - if (item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); + + return q; + }(); // Compute and return the score for a match with e errors and x location. + // Accesses loc and pattern through being a closure. + + + function match_bitapScore_(e, x) { + var accuracy = e / pattern.length, + proximity = Math.abs(loc - x); + + if (!Match_Distance) { + // Dodge divide by zero error. + return proximity ? 1.0 : accuracy; } - }; - this.show = function(item) { - templater.create(item); - list.list.appendChild(item.elm); - }; - this.hide = function(item) { - if (item.elm !== undefined && item.elm.parentNode === list.list) { - list.list.removeChild(item.elm); + + return accuracy + proximity / Match_Distance; + } + + var score_threshold = Match_Threshold, + // Highest score beyond which we give up. + best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup) + + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); // What about in the other direction? (speedup) + + best_loc = text.lastIndexOf(pattern, loc + pattern.length); + + if (best_loc != -1) { + score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); } - }; - this.clear = function() { - /* .innerHTML = ''; fucks up IE */ - if (list.list.hasChildNodes()) { - while (list.list.childNodes.length >= 1) - { - list.list.removeChild(list.list.firstChild); + } // Initialise the bit arrays. + + + var matchmask = 1 << pattern.length - 1; + best_loc = -1; + var bin_min, bin_mid; + var bin_max = pattern.length + text.length; + var last_rd; + + for (var d = 0; d < pattern.length; d++) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from 'loc' we can stray at this + // error level. + bin_min = 0; + bin_mid = bin_max; + + while (bin_min < bin_mid) { + if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { + bin_min = bin_mid; + } else { + bin_max = bin_mid; + } + + bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); + } // Use the result from this iteration as the maximum for the next. + + + bin_max = bin_mid; + var start = Math.max(1, loc - bin_mid + 1); + var finish = Math.min(loc + bin_mid, text.length) + pattern.length; + var rd = Array(finish + 2); + rd[finish + 1] = (1 << d) - 1; + + for (var j = finish; j >= start; j--) { + // The alphabet (s) is a sparse hash, so the following line generates + // warnings. + var charMatch = s[text.charAt(j - 1)]; + + if (d === 0) { + // First pass: exact match. + rd[j] = (rd[j + 1] << 1 | 1) & charMatch; + } else { + // Subsequent passes: fuzzy match. + rd[j] = (rd[j + 1] << 1 | 1) & charMatch | ((last_rd[j + 1] | last_rd[j]) << 1 | 1) | last_rd[j + 1]; + } + + if (rd[j] & matchmask) { + var score = match_bitapScore_(d, j - 1); // This match will almost certainly be better than any existing match. + // But check anyway. + + if (score <= score_threshold) { + // Told you so. + score_threshold = score; + best_loc = j - 1; + + if (best_loc > loc) { + // When passing loc, don't exceed our current distance from loc. + start = Math.max(1, 2 * loc - best_loc); + } else { + // Already passed loc, downhill from here on in. + break; + } + } } + } // No hope for a (better) match at greater error levels. + + + if (match_bitapScore_(d + 1, loc) > score_threshold) { + break; } - }; - init(); -}; + last_rd = rd; + } -module.exports = function(list) { - return new Templater(list); + return best_loc < 0 ? false : true; }; - /***/ }), -/* 17 */ -/***/ (function(module, exports) { + +/***/ "./src/utils/get-attribute.js": +/*!************************************!*\ + !*** ./src/utils/get-attribute.js ***! + \************************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 11:0-14 */ +/***/ (function(module) { /** * A cross-browser implementation of getAttribute. @@ -1489,27 +1593,198 @@ module.exports = function(list) { * @param {String} attr * @api public */ +module.exports = function (el, attr) { + var result = el.getAttribute && el.getAttribute(attr) || null; -module.exports = function(el, attr) { - var result = (el.getAttribute && el.getAttribute(attr)) || null; - if( !result ) { + if (!result) { var attrs = el.attributes; var length = attrs.length; - for(var i = 0; i < length; i++) { + + for (var i = 0; i < length; i++) { if (attr[i] !== undefined) { - if(attr[i].nodeName === attr) { + if (attr[i].nodeName === attr) { result = attr[i].nodeValue; } } } } + return result; }; +/***/ }), + +/***/ "./src/utils/get-by-class.js": +/*!***********************************!*\ + !*** ./src/utils/get-by-class.js ***! + \***********************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 53:0-14 */ +/***/ (function(module) { + +/** + * A cross-browser implementation of getElementsByClass. + * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass. + * + * Find all elements with class `className` inside `container`. + * Use `single = true` to increase performance in older browsers + * when only one element is needed. + * + * @param {String} className + * @param {Element} container + * @param {Boolean} single + * @api public + */ +var getElementsByClassName = function getElementsByClassName(container, className, single) { + if (single) { + return container.getElementsByClassName(className)[0]; + } else { + return container.getElementsByClassName(className); + } +}; + +var querySelector = function querySelector(container, className, single) { + className = '.' + className; + + if (single) { + return container.querySelector(className); + } else { + return container.querySelectorAll(className); + } +}; + +var polyfill = function polyfill(container, className, single) { + var classElements = [], + tag = '*'; + var els = container.getElementsByTagName(tag); + var elsLen = els.length; + var pattern = new RegExp('(^|\\s)' + className + '(\\s|$)'); + + for (var i = 0, j = 0; i < elsLen; i++) { + if (pattern.test(els[i].className)) { + if (single) { + return els[i]; + } else { + classElements[j] = els[i]; + j++; + } + } + } + + return classElements; +}; + +module.exports = function () { + return function (container, className, single, options) { + options = options || {}; + + if (options.test && options.getElementsByClassName || !options.test && document.getElementsByClassName) { + return getElementsByClassName(container, className, single); + } else if (options.test && options.querySelector || !options.test && document.querySelector) { + return querySelector(container, className, single); + } else { + return polyfill(container, className, single); + } + }; +}(); + +/***/ }), + +/***/ "./src/utils/index-of.js": +/*!*******************************!*\ + !*** ./src/utils/index-of.js ***! + \*******************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 3:0-14 */ +/***/ (function(module) { + +var indexOf = [].indexOf; + +module.exports = function (arr, obj) { + if (indexOf) return arr.indexOf(obj); + + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + + return -1; +}; + +/***/ }), + +/***/ "./src/utils/to-array.js": +/*!*******************************!*\ + !*** ./src/utils/to-array.js ***! + \*******************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 11:0-14 */ +/***/ (function(module) { + +/** + * Source: https://github.com/timoxley/to-array + * + * Convert an array-like object into an `Array`. + * If `collection` is already an `Array`, then will return a clone of `collection`. + * + * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList` + * @return {Array} Naive conversion of `collection` to a new `Array`. + * @api public + */ +module.exports = function toArray(collection) { + if (typeof collection === 'undefined') return []; + if (collection === null) return [null]; + if (collection === window) return [window]; + if (typeof collection === 'string') return [collection]; + if (isArray(collection)) return collection; + if (typeof collection.length != 'number') return [collection]; + if (typeof collection === 'function' && collection instanceof Function) return [collection]; + var arr = []; + + for (var i = 0; i < collection.length; i++) { + if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { + arr.push(collection[i]); + } + } + + if (!arr.length) return []; + return arr; +}; + +function isArray(arr) { + return Object.prototype.toString.call(arr) === '[object Array]'; +} + +/***/ }), + +/***/ "./src/utils/to-string.js": +/*!********************************!*\ + !*** ./src/utils/to-string.js ***! + \********************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 1:0-14 */ +/***/ (function(module) { + +module.exports = function (s) { + s = s === undefined ? '' : s; + s = s === null ? '' : s; + s = s.toString(); + return s; +}; /***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { + +/***/ "./node_modules/string-natural-compare/natural-compare.js": +/*!****************************************************************!*\ + !*** ./node_modules/string-natural-compare/natural-compare.js ***! + \****************************************************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/*! CommonJS bailout: module.exports is used directly at 124:0-14 */ +/***/ (function(module) { "use strict"; @@ -1591,6 +1866,14 @@ function naturalCompare(a, b) { ++bIndex; } + if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) { + return -1; + } + + if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) { + return 1; + } + return lengthA - lengthB; } @@ -1603,16 +1886,21 @@ Object.defineProperties(naturalCompare, { get: function() { return alphabet; }, + set: function(value) { alphabet = value; alphabetIndexMap = []; + var i = 0; + if (alphabet) { for (; i < alphabet.length; i++) { alphabetIndexMap[alphabet.charCodeAt(i)] = i; } } + alphabetIndexMapLength = alphabetIndexMap.length; + for (i = 0; i < alphabetIndexMapLength; i++) { if (alphabetIndexMap[i] === undefined) { alphabetIndexMap[i] = -1; @@ -1625,134 +1913,38 @@ Object.defineProperties(naturalCompare, { module.exports = naturalCompare; -/***/ }), -/* 19 */ -/***/ (function(module, exports) { - -module.exports = function(text, pattern, options) { - // Aproximately where in the text is the pattern expected to be found? - var Match_Location = options.location || 0; - - //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold. - var Match_Distance = options.distance || 100; - - // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything. - var Match_Threshold = options.threshold || 0.4; - - if (pattern === text) return true; // Exact match - if (pattern.length > 32) return false; // This algorithm cannot be used - - // Set starting location at beginning text and initialise the alphabet. - var loc = Match_Location, - s = (function() { - var q = {}, - i; - - for (i = 0; i < pattern.length; i++) { - q[pattern.charAt(i)] = 0; - } - - for (i = 0; i < pattern.length; i++) { - q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1); - } - - return q; - }()); - - // Compute and return the score for a match with e errors and x location. - // Accesses loc and pattern through being a closure. - - function match_bitapScore_(e, x) { - var accuracy = e / pattern.length, - proximity = Math.abs(loc - x); - - if (!Match_Distance) { - // Dodge divide by zero error. - return proximity ? 1.0 : accuracy; - } - return accuracy + (proximity / Match_Distance); - } - - var score_threshold = Match_Threshold, // Highest score beyond which we give up. - best_loc = text.indexOf(pattern, loc); // Is there a nearby exact match? (speedup) - - if (best_loc != -1) { - score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); - // What about in the other direction? (speedup) - best_loc = text.lastIndexOf(pattern, loc + pattern.length); - - if (best_loc != -1) { - score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold); - } - } - - // Initialise the bit arrays. - var matchmask = 1 << (pattern.length - 1); - best_loc = -1; - - var bin_min, bin_mid; - var bin_max = pattern.length + text.length; - var last_rd; - for (var d = 0; d < pattern.length; d++) { - // Scan for the best match; each iteration allows for one more error. - // Run a binary search to determine how far from 'loc' we can stray at this - // error level. - bin_min = 0; - bin_mid = bin_max; - while (bin_min < bin_mid) { - if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { - bin_min = bin_mid; - } else { - bin_max = bin_mid; - } - bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); - } - // Use the result from this iteration as the maximum for the next. - bin_max = bin_mid; - var start = Math.max(1, loc - bin_mid + 1); - var finish = Math.min(loc + bin_mid, text.length) + pattern.length; - - var rd = Array(finish + 2); - rd[finish + 1] = (1 << d) - 1; - for (var j = finish; j >= start; j--) { - // The alphabet (s) is a sparse hash, so the following line generates - // warnings. - var charMatch = s[text.charAt(j - 1)]; - if (d === 0) { // First pass: exact match. - rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; - } else { // Subsequent passes: fuzzy match. - rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | - (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | - last_rd[j + 1]; - } - if (rd[j] & matchmask) { - var score = match_bitapScore_(d, j - 1); - // This match will almost certainly be better than any existing match. - // But check anyway. - if (score <= score_threshold) { - // Told you so. - score_threshold = score; - best_loc = j - 1; - if (best_loc > loc) { - // When passing loc, don't exceed our current distance from loc. - start = Math.max(1, 2 * loc - best_loc); - } else { - // Already passed loc, downhill from here on in. - break; - } - } - } - } - // No hope for a (better) match at greater error levels. - if (match_bitapScore_(d + 1, loc) > score_threshold) { - break; - } - last_rd = rd; - } - - return (best_loc < 0) ? false : true; -}; - - /***/ }) -/******/ ]); \ No newline at end of file + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ if(__webpack_module_cache__[moduleId]) { +/******/ return __webpack_module_cache__[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ // module exports must be returned from runtime so entry inlining is disabled +/******/ // startup +/******/ // Load entry module and return exports +/******/ return __webpack_require__("./src/index.js"); +/******/ })() +; +//# sourceMappingURL=list.js.map \ No newline at end of file diff --git a/dist/list.js.map b/dist/list.js.map new file mode 100644 index 00000000..42bbc2ca --- /dev/null +++ b/dist/list.js.map @@ -0,0 +1 @@ +{"version":3,"file":"list.js","sources":["webpack://List/./src/add-async.js","webpack://List/./src/filter.js","webpack://List/./src/fuzzy-search.js","webpack://List/./src/index.js","webpack://List/./src/item.js","webpack://List/./src/pagination.js","webpack://List/./src/parse.js","webpack://List/./src/search.js","webpack://List/./src/sort.js","webpack://List/./src/templater.js","webpack://List/./src/utils/classes.js","webpack://List/./src/utils/events.js","webpack://List/./src/utils/extend.js","webpack://List/./src/utils/fuzzy.js","webpack://List/./src/utils/get-attribute.js","webpack://List/./src/utils/get-by-class.js","webpack://List/./src/utils/index-of.js","webpack://List/./src/utils/to-array.js","webpack://List/./src/utils/to-string.js","webpack://List/./node_modules/string-natural-compare/natural-compare.js","webpack://List/webpack/bootstrap","webpack://List/webpack/startup"],"sourcesContent":["module.exports = function (list) {\n var addAsync = function (values, callback, items) {\n var valuesToAdd = values.splice(0, 50)\n items = items || []\n items = items.concat(list.add(valuesToAdd))\n if (values.length > 0) {\n setTimeout(function () {\n addAsync(values, callback, items)\n }, 1)\n } else {\n list.update()\n callback(items)\n }\n }\n return addAsync\n}\n","module.exports = function (list) {\n // Add handlers\n list.handlers.filterStart = list.handlers.filterStart || []\n list.handlers.filterComplete = list.handlers.filterComplete || []\n\n return function (filterFunction) {\n list.trigger('filterStart')\n list.i = 1 // Reset paging\n list.reset.filter()\n if (filterFunction === undefined) {\n list.filtered = false\n } else {\n list.filtered = true\n var is = list.items\n for (var i = 0, il = is.length; i < il; i++) {\n var item = is[i]\n if (filterFunction(item)) {\n item.filtered = true\n } else {\n item.filtered = false\n }\n }\n }\n list.update()\n list.trigger('filterComplete')\n return list.visibleItems\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n extend = require('./utils/extend'),\n toString = require('./utils/to-string'),\n getByClass = require('./utils/get-by-class'),\n fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n options = options || {}\n\n options = extend(\n {\n location: 0,\n distance: 100,\n threshold: 0.4,\n multiSearch: true,\n searchClass: 'fuzzy-search',\n },\n options\n )\n\n var fuzzySearch = {\n search: function (searchString, columns) {\n // Substract arguments from the searchString or put searchString as only argument\n var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n fuzzySearch.item(list.items[k], columns, searchArguments)\n }\n },\n item: function (item, columns, searchArguments) {\n var found = true\n for (var i = 0; i < searchArguments.length; i++) {\n var foundArgument = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n foundArgument = true\n }\n }\n if (!foundArgument) {\n found = false\n }\n }\n item.found = found\n },\n values: function (values, value, searchArgument) {\n if (values.hasOwnProperty(value)) {\n var text = toString(values[value]).toLowerCase()\n\n if (fuzzy(text, searchArgument, options)) {\n return true\n }\n }\n return false\n },\n }\n\n events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement // IE have srcElement\n list.search(target.value, fuzzySearch.search)\n })\n\n return function (str, columns) {\n list.search(str, columns, fuzzySearch.search)\n }\n}\n","var naturalSort = require('string-natural-compare'),\n getByClass = require('./utils/get-by-class'),\n extend = require('./utils/extend'),\n indexOf = require('./utils/index-of'),\n events = require('./utils/events'),\n toString = require('./utils/to-string'),\n classes = require('./utils/classes'),\n getAttribute = require('./utils/get-attribute'),\n toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n var self = this,\n init,\n Item = require('./item')(self),\n addAsync = require('./add-async')(self),\n initPagination = require('./pagination')(self)\n\n init = {\n start: function () {\n self.listClass = 'list'\n self.searchClass = 'search'\n self.sortClass = 'sort'\n self.page = 10000\n self.i = 1\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.searchColumns = undefined\n self.handlers = { updated: [] }\n self.valueNames = []\n self.utils = {\n getByClass: getByClass,\n extend: extend,\n indexOf: indexOf,\n events: events,\n toString: toString,\n naturalSort: naturalSort,\n classes: classes,\n getAttribute: getAttribute,\n toArray: toArray,\n }\n\n self.utils.extend(self, options)\n\n self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n if (!self.listContainer) {\n return\n }\n self.list = getByClass(self.listContainer, self.listClass, true)\n\n self.parse = require('./parse')(self)\n self.templater = require('./templater')(self)\n self.search = require('./search')(self)\n self.filter = require('./filter')(self)\n self.sort = require('./sort')(self)\n self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n this.handlers()\n this.items()\n this.pagination()\n\n self.update()\n },\n handlers: function () {\n for (var handler in self.handlers) {\n if (self[handler]) {\n self.on(handler, self[handler])\n }\n }\n },\n items: function () {\n self.parse(self.list)\n if (values !== undefined) {\n self.add(values)\n }\n },\n pagination: function () {\n if (options.pagination !== undefined) {\n if (options.pagination === true) {\n options.pagination = [{}]\n }\n if (options.pagination[0] === undefined) {\n options.pagination = [options.pagination]\n }\n for (var i = 0, il = options.pagination.length; i < il; i++) {\n initPagination(options.pagination[i])\n }\n }\n },\n }\n\n /*\n * Re-parse the List, use if html have changed\n */\n this.reIndex = function () {\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.parse(self.list)\n }\n\n this.toJSON = function () {\n var json = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n json.push(self.items[i].values())\n }\n return json\n }\n\n /*\n * Add object to list\n */\n this.add = function (values, callback) {\n if (values.length === 0) {\n return\n }\n if (callback) {\n addAsync(values, callback)\n return\n }\n var added = [],\n notCreate = false\n if (values[0] === undefined) {\n values = [values]\n }\n for (var i = 0, il = values.length; i < il; i++) {\n var item = null\n notCreate = self.items.length > self.page ? true : false\n item = new Item(values[i], undefined, notCreate)\n self.items.push(item)\n added.push(item)\n }\n self.update()\n return added\n }\n\n this.show = function (i, page) {\n this.i = i\n this.page = page\n self.update()\n return self\n }\n\n /* Removes object from list.\n * Loops through the list and removes objects where\n * property \"valuename\" === value\n */\n this.remove = function (valueName, value, options) {\n var found = 0\n for (var i = 0, il = self.items.length; i < il; i++) {\n if (self.items[i].values()[valueName] == value) {\n self.templater.remove(self.items[i], options)\n self.items.splice(i, 1)\n il--\n i--\n found++\n }\n }\n self.update()\n return found\n }\n\n /* Gets the objects in the list which\n * property \"valueName\" === value\n */\n this.get = function (valueName, value) {\n var matchedItems = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n var item = self.items[i]\n if (item.values()[valueName] == value) {\n matchedItems.push(item)\n }\n }\n return matchedItems\n }\n\n /*\n * Get size of the list\n */\n this.size = function () {\n return self.items.length\n }\n\n /*\n * Removes all items from the list\n */\n this.clear = function () {\n self.templater.clear()\n self.items = []\n return self\n }\n\n this.on = function (event, callback) {\n self.handlers[event].push(callback)\n return self\n }\n\n this.off = function (event, callback) {\n var e = self.handlers[event]\n var index = indexOf(e, callback)\n if (index > -1) {\n e.splice(index, 1)\n }\n return self\n }\n\n this.trigger = function (event) {\n var i = self.handlers[event].length\n while (i--) {\n self.handlers[event][i](self)\n }\n return self\n }\n\n this.reset = {\n filter: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].filtered = false\n }\n return self\n },\n search: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].found = false\n }\n return self\n },\n }\n\n this.update = function () {\n var is = self.items,\n il = is.length\n\n self.visibleItems = []\n self.matchingItems = []\n self.templater.clear()\n for (var i = 0; i < il; i++) {\n if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n is[i].show()\n self.visibleItems.push(is[i])\n self.matchingItems.push(is[i])\n } else if (is[i].matching()) {\n self.matchingItems.push(is[i])\n is[i].hide()\n } else {\n is[i].hide()\n }\n }\n self.trigger('updated')\n return self\n }\n\n init.start()\n}\n","module.exports = function (list) {\n return function (initValues, element, notCreate) {\n var item = this\n\n this._values = {}\n\n this.found = false // Show if list.searched == true and this.found == true\n this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n var init = function (initValues, element, notCreate) {\n if (element === undefined) {\n if (notCreate) {\n item.values(initValues, notCreate)\n } else {\n item.values(initValues)\n }\n } else {\n item.elm = element\n var values = list.templater.get(item, initValues)\n item.values(values)\n }\n }\n\n this.values = function (newValues, notCreate) {\n if (newValues !== undefined) {\n for (var name in newValues) {\n item._values[name] = newValues[name]\n }\n if (notCreate !== true) {\n list.templater.set(item, item.values())\n }\n } else {\n return item._values\n }\n }\n\n this.show = function () {\n list.templater.show(item)\n }\n\n this.hide = function () {\n list.templater.hide(item)\n }\n\n this.matching = function () {\n return (\n (list.filtered && list.searched && item.found && item.filtered) ||\n (list.filtered && !list.searched && item.filtered) ||\n (!list.filtered && list.searched && item.found) ||\n (!list.filtered && !list.searched)\n )\n }\n\n this.visible = function () {\n return item.elm && item.elm.parentNode == list.list ? true : false\n }\n\n init(initValues, element, notCreate)\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n List = require('./index')\n\nmodule.exports = function (list) {\n var isHidden = false\n\n var refresh = function (pagingList, options) {\n if (list.page < 1) {\n list.listContainer.style.display = 'none'\n isHidden = true\n return\n } else if (isHidden) {\n list.listContainer.style.display = 'block'\n }\n\n var item,\n l = list.matchingItems.length,\n index = list.i,\n page = list.page,\n pages = Math.ceil(l / page),\n currentPage = Math.ceil(index / page),\n innerWindow = options.innerWindow || 2,\n left = options.left || options.outerWindow || 0,\n right = options.right || options.outerWindow || 0\n\n right = pages - right\n pagingList.clear()\n for (var i = 1; i <= pages; i++) {\n var className = currentPage === i ? 'active' : ''\n\n //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n if (is.number(i, left, right, currentPage, innerWindow)) {\n item = pagingList.add({\n page: i,\n dotted: false,\n })[0]\n if (className) {\n classes(item.elm).add(className)\n }\n item.elm.firstChild.setAttribute('data-i', i)\n item.elm.firstChild.setAttribute('data-page', page)\n } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n item = pagingList.add({\n page: '...',\n dotted: true,\n })[0]\n classes(item.elm).add('disabled')\n }\n }\n }\n\n var is = {\n number: function (i, left, right, currentPage, innerWindow) {\n return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n },\n left: function (i, left) {\n return i <= left\n },\n right: function (i, right) {\n return i > right\n },\n innerWindow: function (i, currentPage, innerWindow) {\n return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n },\n dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n return (\n this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n )\n },\n dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n },\n dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n if (pagingList.items[currentPageItem - 1].values().dotted) {\n return false\n } else {\n return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n }\n },\n }\n\n return function (options) {\n var pagingList = new List(list.listContainer.id, {\n listClass: options.paginationClass || 'pagination',\n item: \"
                                        • \",\n valueNames: ['page', 'dotted'],\n searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n })\n\n events.bind(pagingList.listContainer, 'click', function (e) {\n var target = e.target || e.srcElement,\n page = list.utils.getAttribute(target, 'data-page'),\n i = list.utils.getAttribute(target, 'data-i')\n if (i) {\n list.show((i - 1) * page + 1, page)\n }\n })\n\n list.on('updated', function () {\n refresh(pagingList, options)\n })\n refresh(pagingList, options)\n }\n}\n","module.exports = function (list) {\n var Item = require('./item')(list)\n\n var getChildren = function (parent) {\n var nodes = parent.childNodes,\n items = []\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n items.push(nodes[i])\n }\n }\n return items\n }\n\n var parse = function (itemElements, valueNames) {\n for (var i = 0, il = itemElements.length; i < il; i++) {\n list.items.push(new Item(valueNames, itemElements[i]))\n }\n }\n var parseAsync = function (itemElements, valueNames) {\n var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n parse(itemsToIndex, valueNames)\n if (itemElements.length > 0) {\n setTimeout(function () {\n parseAsync(itemElements, valueNames)\n }, 1)\n } else {\n list.update()\n list.trigger('parseComplete')\n }\n }\n\n list.handlers.parseComplete = list.handlers.parseComplete || []\n\n return function () {\n var itemsToIndex = getChildren(list.list),\n valueNames = list.valueNames\n\n if (list.indexAsync) {\n parseAsync(itemsToIndex, valueNames)\n } else {\n parse(itemsToIndex, valueNames)\n }\n }\n}\n","module.exports = function (list) {\n var item, text, columns, searchString, customSearch\n\n var prepare = {\n resetList: function () {\n list.i = 1\n list.templater.clear()\n customSearch = undefined\n },\n setOptions: function (args) {\n if (args.length == 2 && args[1] instanceof Array) {\n columns = args[1]\n } else if (args.length == 2 && typeof args[1] == 'function') {\n columns = undefined\n customSearch = args[1]\n } else if (args.length == 3) {\n columns = args[1]\n customSearch = args[2]\n } else {\n columns = undefined\n }\n },\n setColumns: function () {\n if (list.items.length === 0) return\n if (columns === undefined) {\n columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n }\n },\n setSearchString: function (s) {\n s = list.utils.toString(s).toLowerCase()\n s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n searchString = s\n },\n toArray: function (values) {\n var tmpColumn = []\n for (var name in values) {\n tmpColumn.push(name)\n }\n return tmpColumn\n },\n }\n var search = {\n list: function () {\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n search.item(list.items[k])\n }\n },\n item: function (item) {\n item.found = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (search.values(item.values(), columns[j])) {\n item.found = true\n return\n }\n }\n },\n values: function (values, column) {\n if (values.hasOwnProperty(column)) {\n text = list.utils.toString(values[column]).toLowerCase()\n if (searchString !== '' && text.search(searchString) > -1) {\n return true\n }\n }\n return false\n },\n reset: function () {\n list.reset.search()\n list.searched = false\n },\n }\n\n var searchMethod = function (str) {\n list.trigger('searchStart')\n\n prepare.resetList()\n prepare.setSearchString(str)\n prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n prepare.setColumns()\n\n if (searchString === '') {\n search.reset()\n } else {\n list.searched = true\n if (customSearch) {\n customSearch(searchString, columns)\n } else {\n search.list()\n }\n }\n\n list.update()\n list.trigger('searchComplete')\n return list.visibleItems\n }\n\n list.handlers.searchStart = list.handlers.searchStart || []\n list.handlers.searchComplete = list.handlers.searchComplete || []\n\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement, // IE have srcElement\n alreadyCleared = target.value === '' && !list.searched\n if (!alreadyCleared) {\n // If oninput already have resetted the list, do nothing\n searchMethod(target.value)\n }\n })\n\n // Used to detect click on HTML5 clear button\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n var target = e.target || e.srcElement\n if (target.value === '') {\n searchMethod('')\n }\n })\n\n return searchMethod\n}\n","module.exports = function (list) {\n var buttons = {\n els: undefined,\n clear: function () {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n list.utils.classes(buttons.els[i]).remove('asc')\n list.utils.classes(buttons.els[i]).remove('desc')\n }\n },\n getOrder: function (btn) {\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n return predefinedOrder\n } else if (list.utils.classes(btn).has('desc')) {\n return 'asc'\n } else if (list.utils.classes(btn).has('asc')) {\n return 'desc'\n } else {\n return 'asc'\n }\n },\n getInSensitive: function (btn, options) {\n var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n if (insensitive === 'false') {\n options.insensitive = false\n } else {\n options.insensitive = true\n }\n },\n setOrder: function (options) {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n var btn = buttons.els[i]\n if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n continue\n }\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n if (predefinedOrder == options.order) {\n list.utils.classes(btn).add(options.order)\n }\n } else {\n list.utils.classes(btn).add(options.order)\n }\n }\n },\n }\n\n var sort = function () {\n list.trigger('sortStart')\n var options = {}\n\n var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n if (target) {\n options.valueName = list.utils.getAttribute(target, 'data-sort')\n buttons.getInSensitive(target, options)\n options.order = buttons.getOrder(target)\n } else {\n options = arguments[1] || options\n options.valueName = arguments[0]\n options.order = options.order || 'asc'\n options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n }\n\n buttons.clear()\n buttons.setOrder(options)\n\n // caseInsensitive\n // alphabet\n var customSortFunction = options.sortFunction || list.sortFunction || null,\n multi = options.order === 'desc' ? -1 : 1,\n sortFunction\n\n if (customSortFunction) {\n sortFunction = function (itemA, itemB) {\n return customSortFunction(itemA, itemB, options) * multi\n }\n } else {\n sortFunction = function (itemA, itemB) {\n var sort = list.utils.naturalSort\n sort.alphabet = list.alphabet || options.alphabet || undefined\n if (!sort.alphabet && options.insensitive) {\n sort = list.utils.naturalSort.caseInsensitive\n }\n return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n }\n }\n\n list.items.sort(sortFunction)\n list.update()\n list.trigger('sortComplete')\n }\n\n // Add handlers\n list.handlers.sortStart = list.handlers.sortStart || []\n list.handlers.sortComplete = list.handlers.sortComplete || []\n\n buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n list.utils.events.bind(buttons.els, 'click', sort)\n list.on('searchStart', buttons.clear)\n list.on('filterStart', buttons.clear)\n\n return sort\n}\n","var Templater = function (list) {\n var itemSource,\n templater = this\n\n var init = function () {\n itemSource = templater.getItemSource(list.item)\n if (itemSource) {\n itemSource = templater.clearSourceItem(itemSource, list.valueNames)\n }\n }\n\n this.clearSourceItem = function (el, valueNames) {\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n el.setAttribute('data-' + valueNames[i].data[j], '')\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(el, valueNames[i].name, true)\n if (elm) {\n elm.setAttribute(valueNames[i].attr, '')\n }\n } else {\n elm = list.utils.getByClass(el, valueNames[i], true)\n if (elm) {\n elm.innerHTML = ''\n }\n }\n elm = undefined\n }\n return el\n }\n\n this.getItemSource = function (item) {\n if (item === undefined) {\n var nodes = list.list.childNodes,\n items = []\n\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n return nodes[i].cloneNode(true)\n }\n }\n } else if (/]/g.exec(item)) {\n var tbody = document.createElement('tbody')\n tbody.innerHTML = item\n return tbody.firstChild\n } else if (item.indexOf('<') !== -1) {\n var div = document.createElement('div')\n div.innerHTML = item\n return div.firstChild\n } else {\n var source = document.getElementById(list.item)\n if (source) {\n return source\n }\n }\n return undefined\n }\n\n this.get = function (item, valueNames) {\n templater.create(item)\n var values = {}\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j])\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(item.elm, valueNames[i].name, true)\n values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''\n } else {\n elm = list.utils.getByClass(item.elm, valueNames[i], true)\n values[valueNames[i]] = elm ? elm.innerHTML : ''\n }\n elm = undefined\n }\n return values\n }\n\n this.set = function (item, values) {\n var getValueName = function (name) {\n for (var i = 0, il = list.valueNames.length; i < il; i++) {\n if (list.valueNames[i].data) {\n var data = list.valueNames[i].data\n for (var j = 0, jl = data.length; j < jl; j++) {\n if (data[j] === name) {\n return { data: name }\n }\n }\n } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) {\n return list.valueNames[i]\n } else if (list.valueNames[i] === name) {\n return name\n }\n }\n }\n var setValue = function (name, value) {\n var elm\n var valueName = getValueName(name)\n if (!valueName) return\n if (valueName.data) {\n item.elm.setAttribute('data-' + valueName.data, value)\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, value)\n }\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n if (elm) {\n elm.innerHTML = value\n }\n }\n elm = undefined\n }\n if (!templater.create(item)) {\n for (var v in values) {\n if (values.hasOwnProperty(v)) {\n setValue(v, values[v])\n }\n }\n }\n }\n\n this.create = function (item) {\n if (item.elm !== undefined) {\n return false\n }\n if (itemSource === undefined) {\n throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n }\n /* If item source does not exists, use the first item in list as\n source for new items */\n var newItem = itemSource.cloneNode(true)\n newItem.removeAttribute('id')\n item.elm = newItem\n templater.set(item, item.values())\n return true\n }\n this.remove = function (item) {\n if (item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.show = function (item) {\n templater.create(item)\n list.list.appendChild(item.elm)\n }\n this.hide = function (item) {\n if (item.elm !== undefined && item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.clear = function () {\n /* .innerHTML = ''; fucks up IE */\n if (list.list.hasChildNodes()) {\n while (list.list.childNodes.length >= 1) {\n list.list.removeChild(list.list.firstChild)\n }\n }\n }\n\n init()\n}\n\nmodule.exports = function (list) {\n return new Templater(list)\n}\n","/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required')\n }\n this.el = el\n this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n // classList\n if (this.list) {\n this.list.add(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (!~i) arr.push(name)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n // classList\n if (this.list) {\n this.list.remove(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (~i) arr.splice(i, 1)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n // classList\n if (this.list) {\n if ('undefined' !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name) // toggle again to correct\n }\n } else {\n this.list.toggle(name)\n }\n return this\n }\n\n // fallback\n if ('undefined' !== typeof force) {\n if (!force) {\n this.remove(name)\n } else {\n this.add(name)\n }\n } else {\n if (this.has(name)) {\n this.remove(name)\n } else {\n this.add(name)\n }\n }\n\n return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n var className = this.el.getAttribute('class') || ''\n var str = className.replace(/^\\s+|\\s+$/g, '')\n var arr = str.split(re)\n if ('' === arr[0]) arr.shift()\n return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n","var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n prefix = bind !== 'addEventListener' ? 'on' : '',\n toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][bind](prefix + type, fn, capture || false)\n }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][unbind](prefix + type, fn, capture || false)\n }\n}\n","/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1)\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; (source = args[i]); i++) {\n if (!source) continue\n for (var property in source) {\n object[property] = source[property]\n }\n }\n\n return object\n}\n","module.exports = function (text, pattern, options) {\n // Aproximately where in the text is the pattern expected to be found?\n var Match_Location = options.location || 0\n\n //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n var Match_Distance = options.distance || 100\n\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n var Match_Threshold = options.threshold || 0.4\n\n if (pattern === text) return true // Exact match\n if (pattern.length > 32) return false // This algorithm cannot be used\n\n // Set starting location at beginning text and initialise the alphabet.\n var loc = Match_Location,\n s = (function () {\n var q = {},\n i\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] = 0\n }\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n }\n\n return q\n })()\n\n // Compute and return the score for a match with e errors and x location.\n // Accesses loc and pattern through being a closure.\n\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length,\n proximity = Math.abs(loc - x)\n\n if (!Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n return accuracy + proximity / Match_Distance\n }\n\n var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1)\n best_loc = -1\n\n var bin_min, bin_mid\n var bin_max = pattern.length + text.length\n var last_rd\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0\n bin_mid = bin_max\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid\n } else {\n bin_max = bin_mid\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid\n var start = Math.max(1, loc - bin_mid + 1)\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n var rd = Array(finish + 2)\n rd[finish + 1] = (1 << d) - 1\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)]\n if (d === 0) {\n // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n } else {\n // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1)\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score\n best_loc = j - 1\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc)\n } else {\n // Already passed loc, downhill from here on in.\n break\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break\n }\n last_rd = rd\n }\n\n return best_loc < 0 ? false : true\n}\n","/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n var result = (el.getAttribute && el.getAttribute(attr)) || null\n if (!result) {\n var attrs = el.attributes\n var length = attrs.length\n for (var i = 0; i < length; i++) {\n if (attr[i] !== undefined) {\n if (attr[i].nodeName === attr) {\n result = attr[i].nodeValue\n }\n }\n }\n }\n return result\n}\n","/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n if (single) {\n return container.getElementsByClassName(className)[0]\n } else {\n return container.getElementsByClassName(className)\n }\n}\n\nvar querySelector = function (container, className, single) {\n className = '.' + className\n if (single) {\n return container.querySelector(className)\n } else {\n return container.querySelectorAll(className)\n }\n}\n\nvar polyfill = function (container, className, single) {\n var classElements = [],\n tag = '*'\n\n var els = container.getElementsByTagName(tag)\n var elsLen = els.length\n var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n for (var i = 0, j = 0; i < elsLen; i++) {\n if (pattern.test(els[i].className)) {\n if (single) {\n return els[i]\n } else {\n classElements[j] = els[i]\n j++\n }\n }\n }\n return classElements\n}\n\nmodule.exports = (function () {\n return function (container, className, single, options) {\n options = options || {}\n if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n return getElementsByClassName(container, className, single)\n } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n return querySelector(container, className, single)\n } else {\n return polyfill(container, className, single)\n }\n }\n})()\n","var indexOf = [].indexOf\n\nmodule.exports = function (arr, obj) {\n if (indexOf) return arr.indexOf(obj)\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i\n }\n return -1\n}\n","/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n if (typeof collection === 'undefined') return []\n if (collection === null) return [null]\n if (collection === window) return [window]\n if (typeof collection === 'string') return [collection]\n if (isArray(collection)) return collection\n if (typeof collection.length != 'number') return [collection]\n if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n var arr = []\n for (var i = 0; i < collection.length; i++) {\n if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n arr.push(collection[i])\n }\n }\n if (!arr.length) return []\n return arr\n}\n\nfunction isArray(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n","module.exports = function (s) {\n s = s === undefined ? '' : s\n s = s === null ? '' : s\n s = s.toString()\n return s\n}\n","'use strict';\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n var lengthA = (a += '').length;\n var lengthB = (b += '').length;\n var aIndex = 0;\n var bIndex = 0;\n\n while (aIndex < lengthA && bIndex < lengthB) {\n var charCodeA = a.charCodeAt(aIndex);\n var charCodeB = b.charCodeAt(bIndex);\n\n if (isNumberCode(charCodeA)) {\n if (!isNumberCode(charCodeB)) {\n return charCodeA - charCodeB;\n }\n\n var numStartA = aIndex;\n var numStartB = bIndex;\n\n while (charCodeA === 48 && ++numStartA < lengthA) {\n charCodeA = a.charCodeAt(numStartA);\n }\n while (charCodeB === 48 && ++numStartB < lengthB) {\n charCodeB = b.charCodeAt(numStartB);\n }\n\n var numEndA = numStartA;\n var numEndB = numStartB;\n\n while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n ++numEndA;\n }\n while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n ++numEndB;\n }\n\n var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n if (difference) {\n return difference;\n }\n\n while (numStartA < numEndA) {\n difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n if (difference) {\n return difference;\n }\n }\n\n aIndex = numEndA;\n bIndex = numEndB;\n continue;\n }\n\n if (charCodeA !== charCodeB) {\n if (\n charCodeA < alphabetIndexMapLength &&\n charCodeB < alphabetIndexMapLength &&\n alphabetIndexMap[charCodeA] !== -1 &&\n alphabetIndexMap[charCodeB] !== -1\n ) {\n return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n }\n\n return charCodeA - charCodeB;\n }\n\n ++aIndex;\n ++bIndex;\n }\n\n if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n return -1;\n }\n\n if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n return 1;\n }\n\n return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n alphabet: {\n get: function() {\n return alphabet;\n },\n\n set: function(value) {\n alphabet = value;\n alphabetIndexMap = [];\n\n var i = 0;\n\n if (alphabet) {\n for (; i < alphabet.length; i++) {\n alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n }\n }\n\n alphabetIndexMapLength = alphabetIndexMap.length;\n\n for (i = 0; i < alphabetIndexMapLength; i++) {\n if (alphabetIndexMap[i] === undefined) {\n alphabetIndexMap[i] = -1;\n }\n }\n },\n },\n});\n\nmodule.exports = naturalCompare;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/index.js\");\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AALA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAjCA;AAoCA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAYA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAzEA;AA4EA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAhBA;AACA;AAkBA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtQA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAQA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AApCA;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AA3BA;AACA;AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3CA;AACA;AA6CA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;ACxGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;AClKA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file diff --git a/dist/list.min.js b/dist/list.min.js index 3cb27373..446e11bf 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,2 +1,3 @@ -/*! List.js v1.5.0 (http://listjs.com) by Jonny Strömberg (http://javve.com) */ -var List=function(t){function e(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var r={};return e.m=t,e.c=r,e.i=function(t){return t},e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=11)}([function(t,e,r){function n(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}var i=r(4),s=/\s+/;Object.prototype.toString;t.exports=function(t){return new n(t)},n.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array(),r=i(e,t);return~r||e.push(t),this.el.className=e.join(" "),this},n.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=i(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},n.prototype.toggle=function(t,e){return this.list?("undefined"!=typeof e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):("undefined"!=typeof e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},n.prototype.array=function(){var t=this.el.getAttribute("class")||"",e=t.replace(/^\s+|\s+$/g,""),r=e.split(s);return""===r[0]&&r.shift(),r},n.prototype.has=n.prototype.contains=function(t){return this.list?this.list.contains(t):!!~i(this.array(),t)}},function(t,e,r){var n=window.addEventListener?"addEventListener":"attachEvent",i=window.removeEventListener?"removeEventListener":"detachEvent",s="addEventListener"!==n?"on":"",a=r(5);e.bind=function(t,e,r,i){t=a(t);for(var o=0;o0?setTimeout(function(){e(r,n,i)},1):(t.update(),n(i))};return e}},function(t,e){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,n=0,i=r.length;nv.page,a=new m(t[i],void 0,n),v.items.push(a),r.push(a)}return v.update(),r}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var n=0,i=0,s=v.items.length;i-1&&r.splice(n,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,n,i,s,a){return this.dottedLeft(t,e,r,n,i,s)||this.dottedRight(t,e,r,n,i,s,a)},dottedLeft:function(t,e,r,n,i,s){return e==r+1&&!this.innerWindow(e,i,s)&&!this.right(e,n)},dottedRight:function(t,e,r,n,i,s,a){return!t.items[a-1].values().dotted&&(e==n&&!this.innerWindow(e,i,s)&&!this.right(e,n))}},a=function(e,r,n){i.bind(e,"click",function(){t.show((r-1)*n+1,n)})};return function(r){var n=new s(t.listContainer.id,{listClass:r.paginationClass||"pagination",item:"
                                        • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});t.on("updated",function(){e(n,r)}),e(n,r)}}},function(t,e,r){t.exports=function(t){var e=r(2)(t),n=function(t){for(var e=t.childNodes,r=[],n=0,i=e.length;n0?setTimeout(function(){s(e,r)},1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=n(t.list),r=t.valueNames;t.indexAsync?s(e,r):i(e,r)}}},function(t,e){t.exports=function(t){var e,r,n,i,s={resetList:function(){t.i=1,t.templater.clear(),i=void 0},setOptions:function(t){2==t.length&&t[1]instanceof Array?r=t[1]:2==t.length&&"function"==typeof t[1]?(r=void 0,i=t[1]):3==t.length?(r=t[1],i=t[2]):r=void 0},setColumns:function(){0!==t.items.length&&void 0===r&&(r=void 0===t.searchColumns?s.toArray(t.items[0].values()):t.searchColumns)},setSearchString:function(e){e=t.utils.toString(e).toLowerCase(),e=e.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),n=e},toArray:function(t){var e=[];for(var r in t)e.push(r);return e}},a={list:function(){for(var e=0,r=t.items.length;e-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),s.resetList(),s.setSearchString(e),s.setOptions(arguments),s.setColumns(),""===n?a.reset():(t.searched=!0,i?i(n,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",function(e){var r=e.target||e.srcElement,n=""===r.value&&!t.searched;n||o(r.value)}),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",function(t){var e=t.target||t.srcElement;""===e.value&&o("")}),o}},function(t,e){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,n=e.els.length;r]/g.exec(e)){var s=document.createElement("tbody");return s.innerHTML=e,s.firstChild}if(e.indexOf("<")!==-1){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,n){r.create(e);for(var i={},s=0,a=n.length;s=1;)t.list.removeChild(t.list.firstChild)},n()};t.exports=function(t){return new r(t)}},function(t,e){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var n=t.attributes,i=n.length,s=0;s=48&&t<=57}function i(t,e){for(var r=(t+="").length,i=(e+="").length,s=0,l=0;s32)return!1;var o=i,l=function(){var t,r={};for(t=0;t=p;b--){var w=l[t.charAt(b-1)];if(0===g?y[b]=(y[b+1]<<1|1)&w:y[b]=(y[b+1]<<1|1)&w|((v[b+1]|v[b])<<1|1)|v[b+1],y[b]&f){var x=n(g,b-1);if(x<=u){if(u=x,c=b-1,!(c>o))break;p=Math.max(1,2*o-c)}}}if(n(g+1,o)>u)break;v=y}return!(c<0)}}]); \ No newline at end of file +/*! List.js v1.5.0 (https://listjs.com) by Jonny Strömberg (https://javve.com) */ +var List;List=function(){var t={"./src/add-async.js":function(t){t.exports=function(t){return function e(r,s,n){var i=r.splice(0,50);n=(n=n||[]).concat(t.add(i)),r.length>0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                        • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n=48&&a<=57}function e(a,b){for(var c=(a+="").length,e=(b+="").length,f=0,i=0;f0?setTimeout(function(){b(c,d,e)},1):(a.update(),d(e))};return b}},{}],3:[function(a,b,c){b.exports=function(a){return a.handlers.filterStart=a.handlers.filterStart||[],a.handlers.filterComplete=a.handlers.filterComplete||[],function(b){if(a.trigger("filterStart"),a.i=1,a.reset.filter(),void 0===b)a.filtered=!1;else{a.filtered=!0;for(var c=a.items,d=0,e=c.length;dr.page,h=new s(a[f],d,e),r.items.push(h),c.push(h)}return r.update(),c}},this.show=function(a,b){return this.i=a,this.page=b,r.update(),r},this.remove=function(a,b,c){for(var d=0,e=0,f=r.items.length;e-1&&c.splice(d,1),r},this.trigger=function(a){for(var b=r.handlers[a].length;b--;)r.handlers[a][b](r);return r},this.reset={filter:function(){for(var a=r.items,b=a.length;b--;)a[b].filtered=!1;return r},search:function(){for(var a=r.items,b=a.length;b--;)a[b].found=!1;return r}},this.update=function(){var a=r.items,b=a.length;r.visibleItems=[],r.matchingItems=[],r.templater.clear();for(var c=0;c=r.i&&r.visibleItems.length0?setTimeout(function(){f(a,c)},1):(b.update(),b.trigger("parseComplete"))};return b.handlers.parseComplete=b.handlers.parseComplete||[],function(){var a=d(b.list),c=b.valueNames;b.indexAsync?f(a,c):e(a,c)}}},{"./item":5}],7:[function(a,b,c){b.exports=function(a){var b,c,d,e,f={resetList:function(){a.i=1,a.templater.clear(),e=void 0},setOptions:function(a){2==a.length&&a[1]instanceof Array?c=a[1]:2==a.length&&"function"==typeof a[1]?(c=void 0,e=a[1]):3==a.length?(c=a[1],e=a[2]):c=void 0},setColumns:function(){0!==a.items.length&&void 0===c&&(c=void 0===a.searchColumns?f.toArray(a.items[0].values()):a.searchColumns)},setSearchString:function(b){b=a.utils.toString(b).toLowerCase(),b=b.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),d=b},toArray:function(a){var b=[];for(var c in a)b.push(c);return b}},g={list:function(){for(var b=0,c=a.items.length;b-1))},reset:function(){a.reset.search(),a.searched=!1}},h=function(b){return a.trigger("searchStart"),f.resetList(),f.setSearchString(b),f.setOptions(arguments),f.setColumns(),""===d?g.reset():(a.searched=!0,e?e(d,c):g.list()),a.update(),a.trigger("searchComplete"),a.visibleItems};return a.handlers.searchStart=a.handlers.searchStart||[],a.handlers.searchComplete=a.handlers.searchComplete||[],a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"keyup",function(b){var c=b.target||b.srcElement,d=""===c.value&&!a.searched;d||h(c.value)}),a.utils.events.bind(a.utils.getByClass(a.listContainer,a.searchClass),"input",function(a){var b=a.target||a.srcElement;""===b.value&&h("")}),h}},{}],8:[function(a,b,c){b.exports=function(a){var b={els:void 0,clear:function(){for(var c=0,d=b.els.length;c]/g.exec(b)){var f=document.createElement("tbody");return f.innerHTML=b,f.firstChild}if(b.indexOf("<")!==-1){var g=document.createElement("div");return g.innerHTML=b,g.firstChild}var h=document.getElementById(a.item);if(h)return h}},this.get=function(b,d){c.create(b);for(var e={},f=0,g=d.length;f=1;)a.list.removeChild(a.list.firstChild)},d()};b.exports=function(a){return new d(a)}},{}],10:[function(a,b,c){function d(a){if(!a||!a.nodeType)throw new Error("A DOM element reference is required");this.el=a,this.list=a.classList}var e=a("./index-of"),f=/\s+/,g=Object.prototype.toString;b.exports=function(a){return new d(a)},d.prototype.add=function(a){if(this.list)return this.list.add(a),this;var b=this.array(),c=e(b,a);return~c||b.push(a),this.el.className=b.join(" "),this},d.prototype.remove=function(a){if("[object RegExp]"==g.call(a))return this.removeMatching(a);if(this.list)return this.list.remove(a),this;var b=this.array(),c=e(b,a);return~c&&b.splice(c,1),this.el.className=b.join(" "),this},d.prototype.removeMatching=function(a){for(var b=this.array(),c=0;c0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                        • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n Date: Sat, 21 Nov 2020 16:16:04 +0100 Subject: [PATCH 200/246] Update links in readme --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index aed965f4..9ca519a5 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,6 @@ Really simple and easy to use! - Sort [Read more ›](http://listjs.com/docs/list-api#sort) - Filter [Read more ›](http://listjs.com/docs/list-api#filter) - Simple templating system that adds possibility to add, edit, remove items [Read more ›](http://listjs.com/docs/list-api#add) -- Plugins [Read more ›](http://listjs.com/docs/plugins) - Support for Chrome, Safari, Firefox, IE9+ ### Download / Install @@ -46,13 +45,13 @@ bower install list.js ##### Via CDNJS ```html - + ``` ##### Via Direct Download -- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.min.js) -- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v1.5.0/dist/list.js) +- [Compressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.0.0/dist/list.min.js) +- [Uncompressed list.js](https://raw.githubusercontent.com/javve/list.js/v2.0.0/dist/list.js) ### Questions / How to? @@ -91,5 +90,5 @@ https://stackoverflow.com/questions/tagged/list.js ## License (MIT) -Copyright (c) 2011-2018 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> -[http://javve.com](http://javve.com) +Copyright (c) 2011-2020 Jonny Strömberg <[jonny.stromberg@gmail.com](mailto:jonny.stromberg@gmail.com)> +[javve.com](https://javve.com) From 036685a87c2a2cb68c6d4155861ac6af4e66f319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:16:45 +0100 Subject: [PATCH 201/246] Revert version and update release script again --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5c089b76..ef0afdd9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "2.0.0", + "version": "1.5.1", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", @@ -44,8 +44,8 @@ "build": "npx webpack", "watch": "npx webpack --watch", "watch-test": "npx jest --watch", - "preversion": "npm test && npm run build && cp package.json docs/_data/pkg.json && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts", - "postversion": "git push --follow-tags origin master" + "preversion": "npm test && npm run build && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts", + "postversion": "git push --follow-tags origin master && cp package.json docs/_data/pkg.json && git add docs/_data/pkg.json && git commit -m \"pkg.json update\"" }, "npmName": "list.js", "npmFileMap": [ From be9ba9442824222e01c30134507c17090cb1e364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:17:03 +0100 Subject: [PATCH 202/246] Remove banner plugin since it don't work with new release strategy --- webpack.config.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 13150119..529f6b11 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -30,20 +30,7 @@ module.exports = { devServer: { inline: true, }, - plugins: [ - new webpack.BannerPlugin({ - banner: - 'List.js v' + - PACKAGE.version + - ' (' + - PACKAGE.homepage + - ') by ' + - PACKAGE.author.name + - ' (' + - PACKAGE.author.url + - ')', - }), - ], + plugins: [], optimization: { minimize: true, minimizer: [ From cf428ed790cf650abe54e353405e6f5df515ca5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:17:23 +0100 Subject: [PATCH 203/246] 2.0.0 --- dist/list.js | 1 - dist/list.js.map | 2 +- dist/list.min.js | 1 - dist/list.min.js.map | 2 +- docs/assets/javascripts/list.min.js | 1 - docs/assets/javascripts/list.min.js.map | 2 +- package.json | 2 +- 7 files changed, 4 insertions(+), 7 deletions(-) diff --git a/dist/list.js b/dist/list.js index 560ae864..e7390742 100644 --- a/dist/list.js +++ b/dist/list.js @@ -1,4 +1,3 @@ -/*! List.js v1.5.0 (https://listjs.com) by Jonny Strömberg (https://javve.com) */ var List;List = /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ diff --git a/dist/list.js.map b/dist/list.js.map index 42bbc2ca..52ac95db 100644 --- a/dist/list.js.map +++ b/dist/list.js.map @@ -1 +1 @@ -{"version":3,"file":"list.js","sources":["webpack://List/./src/add-async.js","webpack://List/./src/filter.js","webpack://List/./src/fuzzy-search.js","webpack://List/./src/index.js","webpack://List/./src/item.js","webpack://List/./src/pagination.js","webpack://List/./src/parse.js","webpack://List/./src/search.js","webpack://List/./src/sort.js","webpack://List/./src/templater.js","webpack://List/./src/utils/classes.js","webpack://List/./src/utils/events.js","webpack://List/./src/utils/extend.js","webpack://List/./src/utils/fuzzy.js","webpack://List/./src/utils/get-attribute.js","webpack://List/./src/utils/get-by-class.js","webpack://List/./src/utils/index-of.js","webpack://List/./src/utils/to-array.js","webpack://List/./src/utils/to-string.js","webpack://List/./node_modules/string-natural-compare/natural-compare.js","webpack://List/webpack/bootstrap","webpack://List/webpack/startup"],"sourcesContent":["module.exports = function (list) {\n var addAsync = function (values, callback, items) {\n var valuesToAdd = values.splice(0, 50)\n items = items || []\n items = items.concat(list.add(valuesToAdd))\n if (values.length > 0) {\n setTimeout(function () {\n addAsync(values, callback, items)\n }, 1)\n } else {\n list.update()\n callback(items)\n }\n }\n return addAsync\n}\n","module.exports = function (list) {\n // Add handlers\n list.handlers.filterStart = list.handlers.filterStart || []\n list.handlers.filterComplete = list.handlers.filterComplete || []\n\n return function (filterFunction) {\n list.trigger('filterStart')\n list.i = 1 // Reset paging\n list.reset.filter()\n if (filterFunction === undefined) {\n list.filtered = false\n } else {\n list.filtered = true\n var is = list.items\n for (var i = 0, il = is.length; i < il; i++) {\n var item = is[i]\n if (filterFunction(item)) {\n item.filtered = true\n } else {\n item.filtered = false\n }\n }\n }\n list.update()\n list.trigger('filterComplete')\n return list.visibleItems\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n extend = require('./utils/extend'),\n toString = require('./utils/to-string'),\n getByClass = require('./utils/get-by-class'),\n fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n options = options || {}\n\n options = extend(\n {\n location: 0,\n distance: 100,\n threshold: 0.4,\n multiSearch: true,\n searchClass: 'fuzzy-search',\n },\n options\n )\n\n var fuzzySearch = {\n search: function (searchString, columns) {\n // Substract arguments from the searchString or put searchString as only argument\n var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n fuzzySearch.item(list.items[k], columns, searchArguments)\n }\n },\n item: function (item, columns, searchArguments) {\n var found = true\n for (var i = 0; i < searchArguments.length; i++) {\n var foundArgument = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n foundArgument = true\n }\n }\n if (!foundArgument) {\n found = false\n }\n }\n item.found = found\n },\n values: function (values, value, searchArgument) {\n if (values.hasOwnProperty(value)) {\n var text = toString(values[value]).toLowerCase()\n\n if (fuzzy(text, searchArgument, options)) {\n return true\n }\n }\n return false\n },\n }\n\n events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement // IE have srcElement\n list.search(target.value, fuzzySearch.search)\n })\n\n return function (str, columns) {\n list.search(str, columns, fuzzySearch.search)\n }\n}\n","var naturalSort = require('string-natural-compare'),\n getByClass = require('./utils/get-by-class'),\n extend = require('./utils/extend'),\n indexOf = require('./utils/index-of'),\n events = require('./utils/events'),\n toString = require('./utils/to-string'),\n classes = require('./utils/classes'),\n getAttribute = require('./utils/get-attribute'),\n toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n var self = this,\n init,\n Item = require('./item')(self),\n addAsync = require('./add-async')(self),\n initPagination = require('./pagination')(self)\n\n init = {\n start: function () {\n self.listClass = 'list'\n self.searchClass = 'search'\n self.sortClass = 'sort'\n self.page = 10000\n self.i = 1\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.searchColumns = undefined\n self.handlers = { updated: [] }\n self.valueNames = []\n self.utils = {\n getByClass: getByClass,\n extend: extend,\n indexOf: indexOf,\n events: events,\n toString: toString,\n naturalSort: naturalSort,\n classes: classes,\n getAttribute: getAttribute,\n toArray: toArray,\n }\n\n self.utils.extend(self, options)\n\n self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n if (!self.listContainer) {\n return\n }\n self.list = getByClass(self.listContainer, self.listClass, true)\n\n self.parse = require('./parse')(self)\n self.templater = require('./templater')(self)\n self.search = require('./search')(self)\n self.filter = require('./filter')(self)\n self.sort = require('./sort')(self)\n self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n this.handlers()\n this.items()\n this.pagination()\n\n self.update()\n },\n handlers: function () {\n for (var handler in self.handlers) {\n if (self[handler]) {\n self.on(handler, self[handler])\n }\n }\n },\n items: function () {\n self.parse(self.list)\n if (values !== undefined) {\n self.add(values)\n }\n },\n pagination: function () {\n if (options.pagination !== undefined) {\n if (options.pagination === true) {\n options.pagination = [{}]\n }\n if (options.pagination[0] === undefined) {\n options.pagination = [options.pagination]\n }\n for (var i = 0, il = options.pagination.length; i < il; i++) {\n initPagination(options.pagination[i])\n }\n }\n },\n }\n\n /*\n * Re-parse the List, use if html have changed\n */\n this.reIndex = function () {\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.parse(self.list)\n }\n\n this.toJSON = function () {\n var json = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n json.push(self.items[i].values())\n }\n return json\n }\n\n /*\n * Add object to list\n */\n this.add = function (values, callback) {\n if (values.length === 0) {\n return\n }\n if (callback) {\n addAsync(values, callback)\n return\n }\n var added = [],\n notCreate = false\n if (values[0] === undefined) {\n values = [values]\n }\n for (var i = 0, il = values.length; i < il; i++) {\n var item = null\n notCreate = self.items.length > self.page ? true : false\n item = new Item(values[i], undefined, notCreate)\n self.items.push(item)\n added.push(item)\n }\n self.update()\n return added\n }\n\n this.show = function (i, page) {\n this.i = i\n this.page = page\n self.update()\n return self\n }\n\n /* Removes object from list.\n * Loops through the list and removes objects where\n * property \"valuename\" === value\n */\n this.remove = function (valueName, value, options) {\n var found = 0\n for (var i = 0, il = self.items.length; i < il; i++) {\n if (self.items[i].values()[valueName] == value) {\n self.templater.remove(self.items[i], options)\n self.items.splice(i, 1)\n il--\n i--\n found++\n }\n }\n self.update()\n return found\n }\n\n /* Gets the objects in the list which\n * property \"valueName\" === value\n */\n this.get = function (valueName, value) {\n var matchedItems = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n var item = self.items[i]\n if (item.values()[valueName] == value) {\n matchedItems.push(item)\n }\n }\n return matchedItems\n }\n\n /*\n * Get size of the list\n */\n this.size = function () {\n return self.items.length\n }\n\n /*\n * Removes all items from the list\n */\n this.clear = function () {\n self.templater.clear()\n self.items = []\n return self\n }\n\n this.on = function (event, callback) {\n self.handlers[event].push(callback)\n return self\n }\n\n this.off = function (event, callback) {\n var e = self.handlers[event]\n var index = indexOf(e, callback)\n if (index > -1) {\n e.splice(index, 1)\n }\n return self\n }\n\n this.trigger = function (event) {\n var i = self.handlers[event].length\n while (i--) {\n self.handlers[event][i](self)\n }\n return self\n }\n\n this.reset = {\n filter: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].filtered = false\n }\n return self\n },\n search: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].found = false\n }\n return self\n },\n }\n\n this.update = function () {\n var is = self.items,\n il = is.length\n\n self.visibleItems = []\n self.matchingItems = []\n self.templater.clear()\n for (var i = 0; i < il; i++) {\n if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n is[i].show()\n self.visibleItems.push(is[i])\n self.matchingItems.push(is[i])\n } else if (is[i].matching()) {\n self.matchingItems.push(is[i])\n is[i].hide()\n } else {\n is[i].hide()\n }\n }\n self.trigger('updated')\n return self\n }\n\n init.start()\n}\n","module.exports = function (list) {\n return function (initValues, element, notCreate) {\n var item = this\n\n this._values = {}\n\n this.found = false // Show if list.searched == true and this.found == true\n this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n var init = function (initValues, element, notCreate) {\n if (element === undefined) {\n if (notCreate) {\n item.values(initValues, notCreate)\n } else {\n item.values(initValues)\n }\n } else {\n item.elm = element\n var values = list.templater.get(item, initValues)\n item.values(values)\n }\n }\n\n this.values = function (newValues, notCreate) {\n if (newValues !== undefined) {\n for (var name in newValues) {\n item._values[name] = newValues[name]\n }\n if (notCreate !== true) {\n list.templater.set(item, item.values())\n }\n } else {\n return item._values\n }\n }\n\n this.show = function () {\n list.templater.show(item)\n }\n\n this.hide = function () {\n list.templater.hide(item)\n }\n\n this.matching = function () {\n return (\n (list.filtered && list.searched && item.found && item.filtered) ||\n (list.filtered && !list.searched && item.filtered) ||\n (!list.filtered && list.searched && item.found) ||\n (!list.filtered && !list.searched)\n )\n }\n\n this.visible = function () {\n return item.elm && item.elm.parentNode == list.list ? true : false\n }\n\n init(initValues, element, notCreate)\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n List = require('./index')\n\nmodule.exports = function (list) {\n var isHidden = false\n\n var refresh = function (pagingList, options) {\n if (list.page < 1) {\n list.listContainer.style.display = 'none'\n isHidden = true\n return\n } else if (isHidden) {\n list.listContainer.style.display = 'block'\n }\n\n var item,\n l = list.matchingItems.length,\n index = list.i,\n page = list.page,\n pages = Math.ceil(l / page),\n currentPage = Math.ceil(index / page),\n innerWindow = options.innerWindow || 2,\n left = options.left || options.outerWindow || 0,\n right = options.right || options.outerWindow || 0\n\n right = pages - right\n pagingList.clear()\n for (var i = 1; i <= pages; i++) {\n var className = currentPage === i ? 'active' : ''\n\n //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n if (is.number(i, left, right, currentPage, innerWindow)) {\n item = pagingList.add({\n page: i,\n dotted: false,\n })[0]\n if (className) {\n classes(item.elm).add(className)\n }\n item.elm.firstChild.setAttribute('data-i', i)\n item.elm.firstChild.setAttribute('data-page', page)\n } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n item = pagingList.add({\n page: '...',\n dotted: true,\n })[0]\n classes(item.elm).add('disabled')\n }\n }\n }\n\n var is = {\n number: function (i, left, right, currentPage, innerWindow) {\n return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n },\n left: function (i, left) {\n return i <= left\n },\n right: function (i, right) {\n return i > right\n },\n innerWindow: function (i, currentPage, innerWindow) {\n return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n },\n dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n return (\n this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n )\n },\n dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n },\n dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n if (pagingList.items[currentPageItem - 1].values().dotted) {\n return false\n } else {\n return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n }\n },\n }\n\n return function (options) {\n var pagingList = new List(list.listContainer.id, {\n listClass: options.paginationClass || 'pagination',\n item: \"
                                        • \",\n valueNames: ['page', 'dotted'],\n searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n })\n\n events.bind(pagingList.listContainer, 'click', function (e) {\n var target = e.target || e.srcElement,\n page = list.utils.getAttribute(target, 'data-page'),\n i = list.utils.getAttribute(target, 'data-i')\n if (i) {\n list.show((i - 1) * page + 1, page)\n }\n })\n\n list.on('updated', function () {\n refresh(pagingList, options)\n })\n refresh(pagingList, options)\n }\n}\n","module.exports = function (list) {\n var Item = require('./item')(list)\n\n var getChildren = function (parent) {\n var nodes = parent.childNodes,\n items = []\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n items.push(nodes[i])\n }\n }\n return items\n }\n\n var parse = function (itemElements, valueNames) {\n for (var i = 0, il = itemElements.length; i < il; i++) {\n list.items.push(new Item(valueNames, itemElements[i]))\n }\n }\n var parseAsync = function (itemElements, valueNames) {\n var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n parse(itemsToIndex, valueNames)\n if (itemElements.length > 0) {\n setTimeout(function () {\n parseAsync(itemElements, valueNames)\n }, 1)\n } else {\n list.update()\n list.trigger('parseComplete')\n }\n }\n\n list.handlers.parseComplete = list.handlers.parseComplete || []\n\n return function () {\n var itemsToIndex = getChildren(list.list),\n valueNames = list.valueNames\n\n if (list.indexAsync) {\n parseAsync(itemsToIndex, valueNames)\n } else {\n parse(itemsToIndex, valueNames)\n }\n }\n}\n","module.exports = function (list) {\n var item, text, columns, searchString, customSearch\n\n var prepare = {\n resetList: function () {\n list.i = 1\n list.templater.clear()\n customSearch = undefined\n },\n setOptions: function (args) {\n if (args.length == 2 && args[1] instanceof Array) {\n columns = args[1]\n } else if (args.length == 2 && typeof args[1] == 'function') {\n columns = undefined\n customSearch = args[1]\n } else if (args.length == 3) {\n columns = args[1]\n customSearch = args[2]\n } else {\n columns = undefined\n }\n },\n setColumns: function () {\n if (list.items.length === 0) return\n if (columns === undefined) {\n columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n }\n },\n setSearchString: function (s) {\n s = list.utils.toString(s).toLowerCase()\n s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n searchString = s\n },\n toArray: function (values) {\n var tmpColumn = []\n for (var name in values) {\n tmpColumn.push(name)\n }\n return tmpColumn\n },\n }\n var search = {\n list: function () {\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n search.item(list.items[k])\n }\n },\n item: function (item) {\n item.found = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (search.values(item.values(), columns[j])) {\n item.found = true\n return\n }\n }\n },\n values: function (values, column) {\n if (values.hasOwnProperty(column)) {\n text = list.utils.toString(values[column]).toLowerCase()\n if (searchString !== '' && text.search(searchString) > -1) {\n return true\n }\n }\n return false\n },\n reset: function () {\n list.reset.search()\n list.searched = false\n },\n }\n\n var searchMethod = function (str) {\n list.trigger('searchStart')\n\n prepare.resetList()\n prepare.setSearchString(str)\n prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n prepare.setColumns()\n\n if (searchString === '') {\n search.reset()\n } else {\n list.searched = true\n if (customSearch) {\n customSearch(searchString, columns)\n } else {\n search.list()\n }\n }\n\n list.update()\n list.trigger('searchComplete')\n return list.visibleItems\n }\n\n list.handlers.searchStart = list.handlers.searchStart || []\n list.handlers.searchComplete = list.handlers.searchComplete || []\n\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement, // IE have srcElement\n alreadyCleared = target.value === '' && !list.searched\n if (!alreadyCleared) {\n // If oninput already have resetted the list, do nothing\n searchMethod(target.value)\n }\n })\n\n // Used to detect click on HTML5 clear button\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n var target = e.target || e.srcElement\n if (target.value === '') {\n searchMethod('')\n }\n })\n\n return searchMethod\n}\n","module.exports = function (list) {\n var buttons = {\n els: undefined,\n clear: function () {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n list.utils.classes(buttons.els[i]).remove('asc')\n list.utils.classes(buttons.els[i]).remove('desc')\n }\n },\n getOrder: function (btn) {\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n return predefinedOrder\n } else if (list.utils.classes(btn).has('desc')) {\n return 'asc'\n } else if (list.utils.classes(btn).has('asc')) {\n return 'desc'\n } else {\n return 'asc'\n }\n },\n getInSensitive: function (btn, options) {\n var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n if (insensitive === 'false') {\n options.insensitive = false\n } else {\n options.insensitive = true\n }\n },\n setOrder: function (options) {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n var btn = buttons.els[i]\n if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n continue\n }\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n if (predefinedOrder == options.order) {\n list.utils.classes(btn).add(options.order)\n }\n } else {\n list.utils.classes(btn).add(options.order)\n }\n }\n },\n }\n\n var sort = function () {\n list.trigger('sortStart')\n var options = {}\n\n var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n if (target) {\n options.valueName = list.utils.getAttribute(target, 'data-sort')\n buttons.getInSensitive(target, options)\n options.order = buttons.getOrder(target)\n } else {\n options = arguments[1] || options\n options.valueName = arguments[0]\n options.order = options.order || 'asc'\n options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n }\n\n buttons.clear()\n buttons.setOrder(options)\n\n // caseInsensitive\n // alphabet\n var customSortFunction = options.sortFunction || list.sortFunction || null,\n multi = options.order === 'desc' ? -1 : 1,\n sortFunction\n\n if (customSortFunction) {\n sortFunction = function (itemA, itemB) {\n return customSortFunction(itemA, itemB, options) * multi\n }\n } else {\n sortFunction = function (itemA, itemB) {\n var sort = list.utils.naturalSort\n sort.alphabet = list.alphabet || options.alphabet || undefined\n if (!sort.alphabet && options.insensitive) {\n sort = list.utils.naturalSort.caseInsensitive\n }\n return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n }\n }\n\n list.items.sort(sortFunction)\n list.update()\n list.trigger('sortComplete')\n }\n\n // Add handlers\n list.handlers.sortStart = list.handlers.sortStart || []\n list.handlers.sortComplete = list.handlers.sortComplete || []\n\n buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n list.utils.events.bind(buttons.els, 'click', sort)\n list.on('searchStart', buttons.clear)\n list.on('filterStart', buttons.clear)\n\n return sort\n}\n","var Templater = function (list) {\n var itemSource,\n templater = this\n\n var init = function () {\n itemSource = templater.getItemSource(list.item)\n if (itemSource) {\n itemSource = templater.clearSourceItem(itemSource, list.valueNames)\n }\n }\n\n this.clearSourceItem = function (el, valueNames) {\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n el.setAttribute('data-' + valueNames[i].data[j], '')\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(el, valueNames[i].name, true)\n if (elm) {\n elm.setAttribute(valueNames[i].attr, '')\n }\n } else {\n elm = list.utils.getByClass(el, valueNames[i], true)\n if (elm) {\n elm.innerHTML = ''\n }\n }\n elm = undefined\n }\n return el\n }\n\n this.getItemSource = function (item) {\n if (item === undefined) {\n var nodes = list.list.childNodes,\n items = []\n\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n return nodes[i].cloneNode(true)\n }\n }\n } else if (/]/g.exec(item)) {\n var tbody = document.createElement('tbody')\n tbody.innerHTML = item\n return tbody.firstChild\n } else if (item.indexOf('<') !== -1) {\n var div = document.createElement('div')\n div.innerHTML = item\n return div.firstChild\n } else {\n var source = document.getElementById(list.item)\n if (source) {\n return source\n }\n }\n return undefined\n }\n\n this.get = function (item, valueNames) {\n templater.create(item)\n var values = {}\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j])\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(item.elm, valueNames[i].name, true)\n values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''\n } else {\n elm = list.utils.getByClass(item.elm, valueNames[i], true)\n values[valueNames[i]] = elm ? elm.innerHTML : ''\n }\n elm = undefined\n }\n return values\n }\n\n this.set = function (item, values) {\n var getValueName = function (name) {\n for (var i = 0, il = list.valueNames.length; i < il; i++) {\n if (list.valueNames[i].data) {\n var data = list.valueNames[i].data\n for (var j = 0, jl = data.length; j < jl; j++) {\n if (data[j] === name) {\n return { data: name }\n }\n }\n } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) {\n return list.valueNames[i]\n } else if (list.valueNames[i] === name) {\n return name\n }\n }\n }\n var setValue = function (name, value) {\n var elm\n var valueName = getValueName(name)\n if (!valueName) return\n if (valueName.data) {\n item.elm.setAttribute('data-' + valueName.data, value)\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, value)\n }\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n if (elm) {\n elm.innerHTML = value\n }\n }\n elm = undefined\n }\n if (!templater.create(item)) {\n for (var v in values) {\n if (values.hasOwnProperty(v)) {\n setValue(v, values[v])\n }\n }\n }\n }\n\n this.create = function (item) {\n if (item.elm !== undefined) {\n return false\n }\n if (itemSource === undefined) {\n throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n }\n /* If item source does not exists, use the first item in list as\n source for new items */\n var newItem = itemSource.cloneNode(true)\n newItem.removeAttribute('id')\n item.elm = newItem\n templater.set(item, item.values())\n return true\n }\n this.remove = function (item) {\n if (item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.show = function (item) {\n templater.create(item)\n list.list.appendChild(item.elm)\n }\n this.hide = function (item) {\n if (item.elm !== undefined && item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.clear = function () {\n /* .innerHTML = ''; fucks up IE */\n if (list.list.hasChildNodes()) {\n while (list.list.childNodes.length >= 1) {\n list.list.removeChild(list.list.firstChild)\n }\n }\n }\n\n init()\n}\n\nmodule.exports = function (list) {\n return new Templater(list)\n}\n","/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required')\n }\n this.el = el\n this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n // classList\n if (this.list) {\n this.list.add(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (!~i) arr.push(name)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n // classList\n if (this.list) {\n this.list.remove(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (~i) arr.splice(i, 1)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n // classList\n if (this.list) {\n if ('undefined' !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name) // toggle again to correct\n }\n } else {\n this.list.toggle(name)\n }\n return this\n }\n\n // fallback\n if ('undefined' !== typeof force) {\n if (!force) {\n this.remove(name)\n } else {\n this.add(name)\n }\n } else {\n if (this.has(name)) {\n this.remove(name)\n } else {\n this.add(name)\n }\n }\n\n return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n var className = this.el.getAttribute('class') || ''\n var str = className.replace(/^\\s+|\\s+$/g, '')\n var arr = str.split(re)\n if ('' === arr[0]) arr.shift()\n return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n","var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n prefix = bind !== 'addEventListener' ? 'on' : '',\n toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][bind](prefix + type, fn, capture || false)\n }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][unbind](prefix + type, fn, capture || false)\n }\n}\n","/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1)\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; (source = args[i]); i++) {\n if (!source) continue\n for (var property in source) {\n object[property] = source[property]\n }\n }\n\n return object\n}\n","module.exports = function (text, pattern, options) {\n // Aproximately where in the text is the pattern expected to be found?\n var Match_Location = options.location || 0\n\n //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n var Match_Distance = options.distance || 100\n\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n var Match_Threshold = options.threshold || 0.4\n\n if (pattern === text) return true // Exact match\n if (pattern.length > 32) return false // This algorithm cannot be used\n\n // Set starting location at beginning text and initialise the alphabet.\n var loc = Match_Location,\n s = (function () {\n var q = {},\n i\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] = 0\n }\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n }\n\n return q\n })()\n\n // Compute and return the score for a match with e errors and x location.\n // Accesses loc and pattern through being a closure.\n\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length,\n proximity = Math.abs(loc - x)\n\n if (!Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n return accuracy + proximity / Match_Distance\n }\n\n var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1)\n best_loc = -1\n\n var bin_min, bin_mid\n var bin_max = pattern.length + text.length\n var last_rd\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0\n bin_mid = bin_max\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid\n } else {\n bin_max = bin_mid\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid\n var start = Math.max(1, loc - bin_mid + 1)\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n var rd = Array(finish + 2)\n rd[finish + 1] = (1 << d) - 1\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)]\n if (d === 0) {\n // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n } else {\n // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1)\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score\n best_loc = j - 1\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc)\n } else {\n // Already passed loc, downhill from here on in.\n break\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break\n }\n last_rd = rd\n }\n\n return best_loc < 0 ? false : true\n}\n","/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n var result = (el.getAttribute && el.getAttribute(attr)) || null\n if (!result) {\n var attrs = el.attributes\n var length = attrs.length\n for (var i = 0; i < length; i++) {\n if (attr[i] !== undefined) {\n if (attr[i].nodeName === attr) {\n result = attr[i].nodeValue\n }\n }\n }\n }\n return result\n}\n","/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n if (single) {\n return container.getElementsByClassName(className)[0]\n } else {\n return container.getElementsByClassName(className)\n }\n}\n\nvar querySelector = function (container, className, single) {\n className = '.' + className\n if (single) {\n return container.querySelector(className)\n } else {\n return container.querySelectorAll(className)\n }\n}\n\nvar polyfill = function (container, className, single) {\n var classElements = [],\n tag = '*'\n\n var els = container.getElementsByTagName(tag)\n var elsLen = els.length\n var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n for (var i = 0, j = 0; i < elsLen; i++) {\n if (pattern.test(els[i].className)) {\n if (single) {\n return els[i]\n } else {\n classElements[j] = els[i]\n j++\n }\n }\n }\n return classElements\n}\n\nmodule.exports = (function () {\n return function (container, className, single, options) {\n options = options || {}\n if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n return getElementsByClassName(container, className, single)\n } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n return querySelector(container, className, single)\n } else {\n return polyfill(container, className, single)\n }\n }\n})()\n","var indexOf = [].indexOf\n\nmodule.exports = function (arr, obj) {\n if (indexOf) return arr.indexOf(obj)\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i\n }\n return -1\n}\n","/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n if (typeof collection === 'undefined') return []\n if (collection === null) return [null]\n if (collection === window) return [window]\n if (typeof collection === 'string') return [collection]\n if (isArray(collection)) return collection\n if (typeof collection.length != 'number') return [collection]\n if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n var arr = []\n for (var i = 0; i < collection.length; i++) {\n if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n arr.push(collection[i])\n }\n }\n if (!arr.length) return []\n return arr\n}\n\nfunction isArray(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n","module.exports = function (s) {\n s = s === undefined ? '' : s\n s = s === null ? '' : s\n s = s.toString()\n return s\n}\n","'use strict';\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n var lengthA = (a += '').length;\n var lengthB = (b += '').length;\n var aIndex = 0;\n var bIndex = 0;\n\n while (aIndex < lengthA && bIndex < lengthB) {\n var charCodeA = a.charCodeAt(aIndex);\n var charCodeB = b.charCodeAt(bIndex);\n\n if (isNumberCode(charCodeA)) {\n if (!isNumberCode(charCodeB)) {\n return charCodeA - charCodeB;\n }\n\n var numStartA = aIndex;\n var numStartB = bIndex;\n\n while (charCodeA === 48 && ++numStartA < lengthA) {\n charCodeA = a.charCodeAt(numStartA);\n }\n while (charCodeB === 48 && ++numStartB < lengthB) {\n charCodeB = b.charCodeAt(numStartB);\n }\n\n var numEndA = numStartA;\n var numEndB = numStartB;\n\n while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n ++numEndA;\n }\n while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n ++numEndB;\n }\n\n var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n if (difference) {\n return difference;\n }\n\n while (numStartA < numEndA) {\n difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n if (difference) {\n return difference;\n }\n }\n\n aIndex = numEndA;\n bIndex = numEndB;\n continue;\n }\n\n if (charCodeA !== charCodeB) {\n if (\n charCodeA < alphabetIndexMapLength &&\n charCodeB < alphabetIndexMapLength &&\n alphabetIndexMap[charCodeA] !== -1 &&\n alphabetIndexMap[charCodeB] !== -1\n ) {\n return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n }\n\n return charCodeA - charCodeB;\n }\n\n ++aIndex;\n ++bIndex;\n }\n\n if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n return -1;\n }\n\n if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n return 1;\n }\n\n return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n alphabet: {\n get: function() {\n return alphabet;\n },\n\n set: function(value) {\n alphabet = value;\n alphabetIndexMap = [];\n\n var i = 0;\n\n if (alphabet) {\n for (; i < alphabet.length; i++) {\n alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n }\n }\n\n alphabetIndexMapLength = alphabetIndexMap.length;\n\n for (i = 0; i < alphabetIndexMapLength; i++) {\n if (alphabetIndexMap[i] === undefined) {\n alphabetIndexMap[i] = -1;\n }\n }\n },\n },\n});\n\nmodule.exports = naturalCompare;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/index.js\");\n"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;AChBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AALA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAjCA;AAoCA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAYA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAzEA;AA4EA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAhBA;AACA;AAkBA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtQA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5DA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAQA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC9CA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AApCA;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AA3BA;AACA;AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3CA;AACA;AA6CA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;;;;;;;;;;;;ACxGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC5KA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;;;;;;;;;;;;;;AClKA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACtCA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AClBA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"list.js","sources":["webpack://List/./src/add-async.js","webpack://List/./src/filter.js","webpack://List/./src/fuzzy-search.js","webpack://List/./src/index.js","webpack://List/./src/item.js","webpack://List/./src/pagination.js","webpack://List/./src/parse.js","webpack://List/./src/search.js","webpack://List/./src/sort.js","webpack://List/./src/templater.js","webpack://List/./src/utils/classes.js","webpack://List/./src/utils/events.js","webpack://List/./src/utils/extend.js","webpack://List/./src/utils/fuzzy.js","webpack://List/./src/utils/get-attribute.js","webpack://List/./src/utils/get-by-class.js","webpack://List/./src/utils/index-of.js","webpack://List/./src/utils/to-array.js","webpack://List/./src/utils/to-string.js","webpack://List/./node_modules/string-natural-compare/natural-compare.js","webpack://List/webpack/bootstrap","webpack://List/webpack/startup"],"sourcesContent":["module.exports = function (list) {\n var addAsync = function (values, callback, items) {\n var valuesToAdd = values.splice(0, 50)\n items = items || []\n items = items.concat(list.add(valuesToAdd))\n if (values.length > 0) {\n setTimeout(function () {\n addAsync(values, callback, items)\n }, 1)\n } else {\n list.update()\n callback(items)\n }\n }\n return addAsync\n}\n","module.exports = function (list) {\n // Add handlers\n list.handlers.filterStart = list.handlers.filterStart || []\n list.handlers.filterComplete = list.handlers.filterComplete || []\n\n return function (filterFunction) {\n list.trigger('filterStart')\n list.i = 1 // Reset paging\n list.reset.filter()\n if (filterFunction === undefined) {\n list.filtered = false\n } else {\n list.filtered = true\n var is = list.items\n for (var i = 0, il = is.length; i < il; i++) {\n var item = is[i]\n if (filterFunction(item)) {\n item.filtered = true\n } else {\n item.filtered = false\n }\n }\n }\n list.update()\n list.trigger('filterComplete')\n return list.visibleItems\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n extend = require('./utils/extend'),\n toString = require('./utils/to-string'),\n getByClass = require('./utils/get-by-class'),\n fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n options = options || {}\n\n options = extend(\n {\n location: 0,\n distance: 100,\n threshold: 0.4,\n multiSearch: true,\n searchClass: 'fuzzy-search',\n },\n options\n )\n\n var fuzzySearch = {\n search: function (searchString, columns) {\n // Substract arguments from the searchString or put searchString as only argument\n var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n fuzzySearch.item(list.items[k], columns, searchArguments)\n }\n },\n item: function (item, columns, searchArguments) {\n var found = true\n for (var i = 0; i < searchArguments.length; i++) {\n var foundArgument = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n foundArgument = true\n }\n }\n if (!foundArgument) {\n found = false\n }\n }\n item.found = found\n },\n values: function (values, value, searchArgument) {\n if (values.hasOwnProperty(value)) {\n var text = toString(values[value]).toLowerCase()\n\n if (fuzzy(text, searchArgument, options)) {\n return true\n }\n }\n return false\n },\n }\n\n events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement // IE have srcElement\n list.search(target.value, fuzzySearch.search)\n })\n\n return function (str, columns) {\n list.search(str, columns, fuzzySearch.search)\n }\n}\n","var naturalSort = require('string-natural-compare'),\n getByClass = require('./utils/get-by-class'),\n extend = require('./utils/extend'),\n indexOf = require('./utils/index-of'),\n events = require('./utils/events'),\n toString = require('./utils/to-string'),\n classes = require('./utils/classes'),\n getAttribute = require('./utils/get-attribute'),\n toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n var self = this,\n init,\n Item = require('./item')(self),\n addAsync = require('./add-async')(self),\n initPagination = require('./pagination')(self)\n\n init = {\n start: function () {\n self.listClass = 'list'\n self.searchClass = 'search'\n self.sortClass = 'sort'\n self.page = 10000\n self.i = 1\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.searchColumns = undefined\n self.handlers = { updated: [] }\n self.valueNames = []\n self.utils = {\n getByClass: getByClass,\n extend: extend,\n indexOf: indexOf,\n events: events,\n toString: toString,\n naturalSort: naturalSort,\n classes: classes,\n getAttribute: getAttribute,\n toArray: toArray,\n }\n\n self.utils.extend(self, options)\n\n self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n if (!self.listContainer) {\n return\n }\n self.list = getByClass(self.listContainer, self.listClass, true)\n\n self.parse = require('./parse')(self)\n self.templater = require('./templater')(self)\n self.search = require('./search')(self)\n self.filter = require('./filter')(self)\n self.sort = require('./sort')(self)\n self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n this.handlers()\n this.items()\n this.pagination()\n\n self.update()\n },\n handlers: function () {\n for (var handler in self.handlers) {\n if (self[handler]) {\n self.on(handler, self[handler])\n }\n }\n },\n items: function () {\n self.parse(self.list)\n if (values !== undefined) {\n self.add(values)\n }\n },\n pagination: function () {\n if (options.pagination !== undefined) {\n if (options.pagination === true) {\n options.pagination = [{}]\n }\n if (options.pagination[0] === undefined) {\n options.pagination = [options.pagination]\n }\n for (var i = 0, il = options.pagination.length; i < il; i++) {\n initPagination(options.pagination[i])\n }\n }\n },\n }\n\n /*\n * Re-parse the List, use if html have changed\n */\n this.reIndex = function () {\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.parse(self.list)\n }\n\n this.toJSON = function () {\n var json = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n json.push(self.items[i].values())\n }\n return json\n }\n\n /*\n * Add object to list\n */\n this.add = function (values, callback) {\n if (values.length === 0) {\n return\n }\n if (callback) {\n addAsync(values, callback)\n return\n }\n var added = [],\n notCreate = false\n if (values[0] === undefined) {\n values = [values]\n }\n for (var i = 0, il = values.length; i < il; i++) {\n var item = null\n notCreate = self.items.length > self.page ? true : false\n item = new Item(values[i], undefined, notCreate)\n self.items.push(item)\n added.push(item)\n }\n self.update()\n return added\n }\n\n this.show = function (i, page) {\n this.i = i\n this.page = page\n self.update()\n return self\n }\n\n /* Removes object from list.\n * Loops through the list and removes objects where\n * property \"valuename\" === value\n */\n this.remove = function (valueName, value, options) {\n var found = 0\n for (var i = 0, il = self.items.length; i < il; i++) {\n if (self.items[i].values()[valueName] == value) {\n self.templater.remove(self.items[i], options)\n self.items.splice(i, 1)\n il--\n i--\n found++\n }\n }\n self.update()\n return found\n }\n\n /* Gets the objects in the list which\n * property \"valueName\" === value\n */\n this.get = function (valueName, value) {\n var matchedItems = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n var item = self.items[i]\n if (item.values()[valueName] == value) {\n matchedItems.push(item)\n }\n }\n return matchedItems\n }\n\n /*\n * Get size of the list\n */\n this.size = function () {\n return self.items.length\n }\n\n /*\n * Removes all items from the list\n */\n this.clear = function () {\n self.templater.clear()\n self.items = []\n return self\n }\n\n this.on = function (event, callback) {\n self.handlers[event].push(callback)\n return self\n }\n\n this.off = function (event, callback) {\n var e = self.handlers[event]\n var index = indexOf(e, callback)\n if (index > -1) {\n e.splice(index, 1)\n }\n return self\n }\n\n this.trigger = function (event) {\n var i = self.handlers[event].length\n while (i--) {\n self.handlers[event][i](self)\n }\n return self\n }\n\n this.reset = {\n filter: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].filtered = false\n }\n return self\n },\n search: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].found = false\n }\n return self\n },\n }\n\n this.update = function () {\n var is = self.items,\n il = is.length\n\n self.visibleItems = []\n self.matchingItems = []\n self.templater.clear()\n for (var i = 0; i < il; i++) {\n if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n is[i].show()\n self.visibleItems.push(is[i])\n self.matchingItems.push(is[i])\n } else if (is[i].matching()) {\n self.matchingItems.push(is[i])\n is[i].hide()\n } else {\n is[i].hide()\n }\n }\n self.trigger('updated')\n return self\n }\n\n init.start()\n}\n","module.exports = function (list) {\n return function (initValues, element, notCreate) {\n var item = this\n\n this._values = {}\n\n this.found = false // Show if list.searched == true and this.found == true\n this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n var init = function (initValues, element, notCreate) {\n if (element === undefined) {\n if (notCreate) {\n item.values(initValues, notCreate)\n } else {\n item.values(initValues)\n }\n } else {\n item.elm = element\n var values = list.templater.get(item, initValues)\n item.values(values)\n }\n }\n\n this.values = function (newValues, notCreate) {\n if (newValues !== undefined) {\n for (var name in newValues) {\n item._values[name] = newValues[name]\n }\n if (notCreate !== true) {\n list.templater.set(item, item.values())\n }\n } else {\n return item._values\n }\n }\n\n this.show = function () {\n list.templater.show(item)\n }\n\n this.hide = function () {\n list.templater.hide(item)\n }\n\n this.matching = function () {\n return (\n (list.filtered && list.searched && item.found && item.filtered) ||\n (list.filtered && !list.searched && item.filtered) ||\n (!list.filtered && list.searched && item.found) ||\n (!list.filtered && !list.searched)\n )\n }\n\n this.visible = function () {\n return item.elm && item.elm.parentNode == list.list ? true : false\n }\n\n init(initValues, element, notCreate)\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n List = require('./index')\n\nmodule.exports = function (list) {\n var isHidden = false\n\n var refresh = function (pagingList, options) {\n if (list.page < 1) {\n list.listContainer.style.display = 'none'\n isHidden = true\n return\n } else if (isHidden) {\n list.listContainer.style.display = 'block'\n }\n\n var item,\n l = list.matchingItems.length,\n index = list.i,\n page = list.page,\n pages = Math.ceil(l / page),\n currentPage = Math.ceil(index / page),\n innerWindow = options.innerWindow || 2,\n left = options.left || options.outerWindow || 0,\n right = options.right || options.outerWindow || 0\n\n right = pages - right\n pagingList.clear()\n for (var i = 1; i <= pages; i++) {\n var className = currentPage === i ? 'active' : ''\n\n //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n if (is.number(i, left, right, currentPage, innerWindow)) {\n item = pagingList.add({\n page: i,\n dotted: false,\n })[0]\n if (className) {\n classes(item.elm).add(className)\n }\n item.elm.firstChild.setAttribute('data-i', i)\n item.elm.firstChild.setAttribute('data-page', page)\n } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n item = pagingList.add({\n page: '...',\n dotted: true,\n })[0]\n classes(item.elm).add('disabled')\n }\n }\n }\n\n var is = {\n number: function (i, left, right, currentPage, innerWindow) {\n return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n },\n left: function (i, left) {\n return i <= left\n },\n right: function (i, right) {\n return i > right\n },\n innerWindow: function (i, currentPage, innerWindow) {\n return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n },\n dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n return (\n this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n )\n },\n dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n },\n dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n if (pagingList.items[currentPageItem - 1].values().dotted) {\n return false\n } else {\n return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n }\n },\n }\n\n return function (options) {\n var pagingList = new List(list.listContainer.id, {\n listClass: options.paginationClass || 'pagination',\n item: \"
                                        • \",\n valueNames: ['page', 'dotted'],\n searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n })\n\n events.bind(pagingList.listContainer, 'click', function (e) {\n var target = e.target || e.srcElement,\n page = list.utils.getAttribute(target, 'data-page'),\n i = list.utils.getAttribute(target, 'data-i')\n if (i) {\n list.show((i - 1) * page + 1, page)\n }\n })\n\n list.on('updated', function () {\n refresh(pagingList, options)\n })\n refresh(pagingList, options)\n }\n}\n","module.exports = function (list) {\n var Item = require('./item')(list)\n\n var getChildren = function (parent) {\n var nodes = parent.childNodes,\n items = []\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n items.push(nodes[i])\n }\n }\n return items\n }\n\n var parse = function (itemElements, valueNames) {\n for (var i = 0, il = itemElements.length; i < il; i++) {\n list.items.push(new Item(valueNames, itemElements[i]))\n }\n }\n var parseAsync = function (itemElements, valueNames) {\n var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n parse(itemsToIndex, valueNames)\n if (itemElements.length > 0) {\n setTimeout(function () {\n parseAsync(itemElements, valueNames)\n }, 1)\n } else {\n list.update()\n list.trigger('parseComplete')\n }\n }\n\n list.handlers.parseComplete = list.handlers.parseComplete || []\n\n return function () {\n var itemsToIndex = getChildren(list.list),\n valueNames = list.valueNames\n\n if (list.indexAsync) {\n parseAsync(itemsToIndex, valueNames)\n } else {\n parse(itemsToIndex, valueNames)\n }\n }\n}\n","module.exports = function (list) {\n var item, text, columns, searchString, customSearch\n\n var prepare = {\n resetList: function () {\n list.i = 1\n list.templater.clear()\n customSearch = undefined\n },\n setOptions: function (args) {\n if (args.length == 2 && args[1] instanceof Array) {\n columns = args[1]\n } else if (args.length == 2 && typeof args[1] == 'function') {\n columns = undefined\n customSearch = args[1]\n } else if (args.length == 3) {\n columns = args[1]\n customSearch = args[2]\n } else {\n columns = undefined\n }\n },\n setColumns: function () {\n if (list.items.length === 0) return\n if (columns === undefined) {\n columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n }\n },\n setSearchString: function (s) {\n s = list.utils.toString(s).toLowerCase()\n s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n searchString = s\n },\n toArray: function (values) {\n var tmpColumn = []\n for (var name in values) {\n tmpColumn.push(name)\n }\n return tmpColumn\n },\n }\n var search = {\n list: function () {\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n search.item(list.items[k])\n }\n },\n item: function (item) {\n item.found = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (search.values(item.values(), columns[j])) {\n item.found = true\n return\n }\n }\n },\n values: function (values, column) {\n if (values.hasOwnProperty(column)) {\n text = list.utils.toString(values[column]).toLowerCase()\n if (searchString !== '' && text.search(searchString) > -1) {\n return true\n }\n }\n return false\n },\n reset: function () {\n list.reset.search()\n list.searched = false\n },\n }\n\n var searchMethod = function (str) {\n list.trigger('searchStart')\n\n prepare.resetList()\n prepare.setSearchString(str)\n prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n prepare.setColumns()\n\n if (searchString === '') {\n search.reset()\n } else {\n list.searched = true\n if (customSearch) {\n customSearch(searchString, columns)\n } else {\n search.list()\n }\n }\n\n list.update()\n list.trigger('searchComplete')\n return list.visibleItems\n }\n\n list.handlers.searchStart = list.handlers.searchStart || []\n list.handlers.searchComplete = list.handlers.searchComplete || []\n\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement, // IE have srcElement\n alreadyCleared = target.value === '' && !list.searched\n if (!alreadyCleared) {\n // If oninput already have resetted the list, do nothing\n searchMethod(target.value)\n }\n })\n\n // Used to detect click on HTML5 clear button\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n var target = e.target || e.srcElement\n if (target.value === '') {\n searchMethod('')\n }\n })\n\n return searchMethod\n}\n","module.exports = function (list) {\n var buttons = {\n els: undefined,\n clear: function () {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n list.utils.classes(buttons.els[i]).remove('asc')\n list.utils.classes(buttons.els[i]).remove('desc')\n }\n },\n getOrder: function (btn) {\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n return predefinedOrder\n } else if (list.utils.classes(btn).has('desc')) {\n return 'asc'\n } else if (list.utils.classes(btn).has('asc')) {\n return 'desc'\n } else {\n return 'asc'\n }\n },\n getInSensitive: function (btn, options) {\n var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n if (insensitive === 'false') {\n options.insensitive = false\n } else {\n options.insensitive = true\n }\n },\n setOrder: function (options) {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n var btn = buttons.els[i]\n if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n continue\n }\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n if (predefinedOrder == options.order) {\n list.utils.classes(btn).add(options.order)\n }\n } else {\n list.utils.classes(btn).add(options.order)\n }\n }\n },\n }\n\n var sort = function () {\n list.trigger('sortStart')\n var options = {}\n\n var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n if (target) {\n options.valueName = list.utils.getAttribute(target, 'data-sort')\n buttons.getInSensitive(target, options)\n options.order = buttons.getOrder(target)\n } else {\n options = arguments[1] || options\n options.valueName = arguments[0]\n options.order = options.order || 'asc'\n options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n }\n\n buttons.clear()\n buttons.setOrder(options)\n\n // caseInsensitive\n // alphabet\n var customSortFunction = options.sortFunction || list.sortFunction || null,\n multi = options.order === 'desc' ? -1 : 1,\n sortFunction\n\n if (customSortFunction) {\n sortFunction = function (itemA, itemB) {\n return customSortFunction(itemA, itemB, options) * multi\n }\n } else {\n sortFunction = function (itemA, itemB) {\n var sort = list.utils.naturalSort\n sort.alphabet = list.alphabet || options.alphabet || undefined\n if (!sort.alphabet && options.insensitive) {\n sort = list.utils.naturalSort.caseInsensitive\n }\n return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n }\n }\n\n list.items.sort(sortFunction)\n list.update()\n list.trigger('sortComplete')\n }\n\n // Add handlers\n list.handlers.sortStart = list.handlers.sortStart || []\n list.handlers.sortComplete = list.handlers.sortComplete || []\n\n buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n list.utils.events.bind(buttons.els, 'click', sort)\n list.on('searchStart', buttons.clear)\n list.on('filterStart', buttons.clear)\n\n return sort\n}\n","var Templater = function (list) {\n var itemSource,\n templater = this\n\n var init = function () {\n itemSource = templater.getItemSource(list.item)\n if (itemSource) {\n itemSource = templater.clearSourceItem(itemSource, list.valueNames)\n }\n }\n\n this.clearSourceItem = function (el, valueNames) {\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n el.setAttribute('data-' + valueNames[i].data[j], '')\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(el, valueNames[i].name, true)\n if (elm) {\n elm.setAttribute(valueNames[i].attr, '')\n }\n } else {\n elm = list.utils.getByClass(el, valueNames[i], true)\n if (elm) {\n elm.innerHTML = ''\n }\n }\n elm = undefined\n }\n return el\n }\n\n this.getItemSource = function (item) {\n if (item === undefined) {\n var nodes = list.list.childNodes,\n items = []\n\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n return nodes[i].cloneNode(true)\n }\n }\n } else if (/]/g.exec(item)) {\n var tbody = document.createElement('tbody')\n tbody.innerHTML = item\n return tbody.firstChild\n } else if (item.indexOf('<') !== -1) {\n var div = document.createElement('div')\n div.innerHTML = item\n return div.firstChild\n } else {\n var source = document.getElementById(list.item)\n if (source) {\n return source\n }\n }\n return undefined\n }\n\n this.get = function (item, valueNames) {\n templater.create(item)\n var values = {}\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j])\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(item.elm, valueNames[i].name, true)\n values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''\n } else {\n elm = list.utils.getByClass(item.elm, valueNames[i], true)\n values[valueNames[i]] = elm ? elm.innerHTML : ''\n }\n elm = undefined\n }\n return values\n }\n\n this.set = function (item, values) {\n var getValueName = function (name) {\n for (var i = 0, il = list.valueNames.length; i < il; i++) {\n if (list.valueNames[i].data) {\n var data = list.valueNames[i].data\n for (var j = 0, jl = data.length; j < jl; j++) {\n if (data[j] === name) {\n return { data: name }\n }\n }\n } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) {\n return list.valueNames[i]\n } else if (list.valueNames[i] === name) {\n return name\n }\n }\n }\n var setValue = function (name, value) {\n var elm\n var valueName = getValueName(name)\n if (!valueName) return\n if (valueName.data) {\n item.elm.setAttribute('data-' + valueName.data, value)\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, value)\n }\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n if (elm) {\n elm.innerHTML = value\n }\n }\n elm = undefined\n }\n if (!templater.create(item)) {\n for (var v in values) {\n if (values.hasOwnProperty(v)) {\n setValue(v, values[v])\n }\n }\n }\n }\n\n this.create = function (item) {\n if (item.elm !== undefined) {\n return false\n }\n if (itemSource === undefined) {\n throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n }\n /* If item source does not exists, use the first item in list as\n source for new items */\n var newItem = itemSource.cloneNode(true)\n newItem.removeAttribute('id')\n item.elm = newItem\n templater.set(item, item.values())\n return true\n }\n this.remove = function (item) {\n if (item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.show = function (item) {\n templater.create(item)\n list.list.appendChild(item.elm)\n }\n this.hide = function (item) {\n if (item.elm !== undefined && item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.clear = function () {\n /* .innerHTML = ''; fucks up IE */\n if (list.list.hasChildNodes()) {\n while (list.list.childNodes.length >= 1) {\n list.list.removeChild(list.list.firstChild)\n }\n }\n }\n\n init()\n}\n\nmodule.exports = function (list) {\n return new Templater(list)\n}\n","/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required')\n }\n this.el = el\n this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n // classList\n if (this.list) {\n this.list.add(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (!~i) arr.push(name)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n // classList\n if (this.list) {\n this.list.remove(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (~i) arr.splice(i, 1)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n // classList\n if (this.list) {\n if ('undefined' !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name) // toggle again to correct\n }\n } else {\n this.list.toggle(name)\n }\n return this\n }\n\n // fallback\n if ('undefined' !== typeof force) {\n if (!force) {\n this.remove(name)\n } else {\n this.add(name)\n }\n } else {\n if (this.has(name)) {\n this.remove(name)\n } else {\n this.add(name)\n }\n }\n\n return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n var className = this.el.getAttribute('class') || ''\n var str = className.replace(/^\\s+|\\s+$/g, '')\n var arr = str.split(re)\n if ('' === arr[0]) arr.shift()\n return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n","var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n prefix = bind !== 'addEventListener' ? 'on' : '',\n toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][bind](prefix + type, fn, capture || false)\n }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][unbind](prefix + type, fn, capture || false)\n }\n}\n","/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1)\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; (source = args[i]); i++) {\n if (!source) continue\n for (var property in source) {\n object[property] = source[property]\n }\n }\n\n return object\n}\n","module.exports = function (text, pattern, options) {\n // Aproximately where in the text is the pattern expected to be found?\n var Match_Location = options.location || 0\n\n //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n var Match_Distance = options.distance || 100\n\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n var Match_Threshold = options.threshold || 0.4\n\n if (pattern === text) return true // Exact match\n if (pattern.length > 32) return false // This algorithm cannot be used\n\n // Set starting location at beginning text and initialise the alphabet.\n var loc = Match_Location,\n s = (function () {\n var q = {},\n i\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] = 0\n }\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n }\n\n return q\n })()\n\n // Compute and return the score for a match with e errors and x location.\n // Accesses loc and pattern through being a closure.\n\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length,\n proximity = Math.abs(loc - x)\n\n if (!Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n return accuracy + proximity / Match_Distance\n }\n\n var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1)\n best_loc = -1\n\n var bin_min, bin_mid\n var bin_max = pattern.length + text.length\n var last_rd\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0\n bin_mid = bin_max\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid\n } else {\n bin_max = bin_mid\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid\n var start = Math.max(1, loc - bin_mid + 1)\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n var rd = Array(finish + 2)\n rd[finish + 1] = (1 << d) - 1\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)]\n if (d === 0) {\n // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n } else {\n // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1)\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score\n best_loc = j - 1\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc)\n } else {\n // Already passed loc, downhill from here on in.\n break\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break\n }\n last_rd = rd\n }\n\n return best_loc < 0 ? false : true\n}\n","/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n var result = (el.getAttribute && el.getAttribute(attr)) || null\n if (!result) {\n var attrs = el.attributes\n var length = attrs.length\n for (var i = 0; i < length; i++) {\n if (attr[i] !== undefined) {\n if (attr[i].nodeName === attr) {\n result = attr[i].nodeValue\n }\n }\n }\n }\n return result\n}\n","/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n if (single) {\n return container.getElementsByClassName(className)[0]\n } else {\n return container.getElementsByClassName(className)\n }\n}\n\nvar querySelector = function (container, className, single) {\n className = '.' + className\n if (single) {\n return container.querySelector(className)\n } else {\n return container.querySelectorAll(className)\n }\n}\n\nvar polyfill = function (container, className, single) {\n var classElements = [],\n tag = '*'\n\n var els = container.getElementsByTagName(tag)\n var elsLen = els.length\n var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n for (var i = 0, j = 0; i < elsLen; i++) {\n if (pattern.test(els[i].className)) {\n if (single) {\n return els[i]\n } else {\n classElements[j] = els[i]\n j++\n }\n }\n }\n return classElements\n}\n\nmodule.exports = (function () {\n return function (container, className, single, options) {\n options = options || {}\n if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n return getElementsByClassName(container, className, single)\n } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n return querySelector(container, className, single)\n } else {\n return polyfill(container, className, single)\n }\n }\n})()\n","var indexOf = [].indexOf\n\nmodule.exports = function (arr, obj) {\n if (indexOf) return arr.indexOf(obj)\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i\n }\n return -1\n}\n","/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n if (typeof collection === 'undefined') return []\n if (collection === null) return [null]\n if (collection === window) return [window]\n if (typeof collection === 'string') return [collection]\n if (isArray(collection)) return collection\n if (typeof collection.length != 'number') return [collection]\n if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n var arr = []\n for (var i = 0; i < collection.length; i++) {\n if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n arr.push(collection[i])\n }\n }\n if (!arr.length) return []\n return arr\n}\n\nfunction isArray(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n","module.exports = function (s) {\n s = s === undefined ? '' : s\n s = s === null ? '' : s\n s = s.toString()\n return s\n}\n","'use strict';\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n var lengthA = (a += '').length;\n var lengthB = (b += '').length;\n var aIndex = 0;\n var bIndex = 0;\n\n while (aIndex < lengthA && bIndex < lengthB) {\n var charCodeA = a.charCodeAt(aIndex);\n var charCodeB = b.charCodeAt(bIndex);\n\n if (isNumberCode(charCodeA)) {\n if (!isNumberCode(charCodeB)) {\n return charCodeA - charCodeB;\n }\n\n var numStartA = aIndex;\n var numStartB = bIndex;\n\n while (charCodeA === 48 && ++numStartA < lengthA) {\n charCodeA = a.charCodeAt(numStartA);\n }\n while (charCodeB === 48 && ++numStartB < lengthB) {\n charCodeB = b.charCodeAt(numStartB);\n }\n\n var numEndA = numStartA;\n var numEndB = numStartB;\n\n while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n ++numEndA;\n }\n while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n ++numEndB;\n }\n\n var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n if (difference) {\n return difference;\n }\n\n while (numStartA < numEndA) {\n difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n if (difference) {\n return difference;\n }\n }\n\n aIndex = numEndA;\n bIndex = numEndB;\n continue;\n }\n\n if (charCodeA !== charCodeB) {\n if (\n charCodeA < alphabetIndexMapLength &&\n charCodeB < alphabetIndexMapLength &&\n alphabetIndexMap[charCodeA] !== -1 &&\n alphabetIndexMap[charCodeB] !== -1\n ) {\n return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n }\n\n return charCodeA - charCodeB;\n }\n\n ++aIndex;\n ++bIndex;\n }\n\n if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n return -1;\n }\n\n if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n return 1;\n }\n\n return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n alphabet: {\n get: function() {\n return alphabet;\n },\n\n set: function(value) {\n alphabet = value;\n alphabetIndexMap = [];\n\n var i = 0;\n\n if (alphabet) {\n for (; i < alphabet.length; i++) {\n alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n }\n }\n\n alphabetIndexMapLength = alphabetIndexMap.length;\n\n for (i = 0; i < alphabetIndexMapLength; i++) {\n if (alphabetIndexMap[i] === undefined) {\n alphabetIndexMap[i] = -1;\n }\n }\n },\n },\n});\n\nmodule.exports = naturalCompare;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/index.js\");\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AChBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AALA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAjCA;AAoCA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAYA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAzEA;AA4EA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAhBA;AACA;AAkBA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtQA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5DA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAQA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC9CA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AApCA;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AA3BA;AACA;AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3CA;AACA;AA6CA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;A;;;;;;;;;;;ACxGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5KA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;A;;;;;;;;;;;;;AClKA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtCA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClBA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file diff --git a/dist/list.min.js b/dist/list.min.js index 446e11bf..5b987547 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,3 +1,2 @@ -/*! List.js v1.5.0 (https://listjs.com) by Jonny Strömberg (https://javve.com) */ var List;List=function(){var t={"./src/add-async.js":function(t){t.exports=function(t){return function e(r,s,n){var i=r.splice(0,50);n=(n=n||[]).concat(t.add(i)),r.length>0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                        • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                        • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n Date: Sat, 21 Nov 2020 16:17:26 +0100 Subject: [PATCH 204/246] pkg.json update --- docs/_data/pkg.json | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/docs/_data/pkg.json b/docs/_data/pkg.json index 26341bbb..0d7b58ca 100644 --- a/docs/_data/pkg.json +++ b/docs/_data/pkg.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "1.5.0", + "version": "2.0.0", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", @@ -13,10 +13,10 @@ ], "author": { "name": "Jonny Strömberg", - "email": "jonny.stromberg@gmail.com>", - "url": "http://javve.com" + "email": "jonny.stromberg@gmail.com", + "url": "https://javve.com" }, - "homepage": "http://listjs.com", + "homepage": "https://listjs.com", "repository": "git://github.com/javve/list.js.git", "license": "MIT", "bugs": { @@ -26,18 +26,26 @@ "string-natural-compare": "^2.0.2" }, "devDependencies": { - "jest": "^18.1.0", - "jquery": "^1.12.0", - "jshint": "^2.9.4", - "jshint-loader": "^0.8.3", - "webpack": "^2.2.0" + "@babel/core": "^7.12.7", + "@babel/preset-env": "^7.12.7", + "babel-loader": "^8.2.1", + "jest": "^26.6.3", + "jquery": "^3.5.1", + "prettier": "^2.2.0", + "webpack": "^5.6.0", + "webpack-cli": "^4.2.0" }, "main": "src/index", "engines": { - "node": ">= 0.10.21" + "node": "^14.15.1" }, "scripts": { - "test": "jest" + "test": "npx jest", + "build": "npx webpack", + "watch": "npx webpack --watch", + "watch-test": "npx jest --watch", + "preversion": "npm test && npm run build && cp dist/list.min.js docs/assets/javascripts/list.min.js && cp dist/list.min.js.map docs/assets/javascripts/list.min.js.map && git add dist && git add docs/assets/javascripts", + "postversion": "git push --follow-tags origin master && cp package.json docs/_data/pkg.json && git add docs/_data/pkg.json && git commit -m \"pkg.json update\"" }, "npmName": "list.js", "npmFileMap": [ @@ -51,6 +59,10 @@ "jest": { "coverageDirectory": "./coverage/", "collectCoverage": true, - "collectCoverageFrom": ["src/*.js", "src/utils/*.js"] + "collectCoverageFrom": [ + "src/*.js", + "src/utils/*.js" + ], + "testURL": "http://localhost/" } } From 1ba2c0f88ab14dcb6eaf9cdd2307532dfd93c78c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:28:41 +0100 Subject: [PATCH 205/246] Update relase instructions --- Release.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/Release.md b/Release.md index 97e6bbfa..664b7b4a 100644 --- a/Release.md +++ b/Release.md @@ -1,10 +1,5 @@ # RELEASE -1. Update version in package.json -2. Update links in README.md -3. `cp package.json docs/_data/pkg.json` -4. Commit "Version x.y.z" -5. Tag with `git tag -a v1.14.0 -m "Version 1.14.0` -6. Push with `git push` -7. Push tags with `git push --tags` -8. `npm publish` +1. `npm release patch|minor|major` (depending on what kind of release it is) +2. `npm publish` +3. Update links in README.md with new version number From b8404bdef480dc5c63fea4f52d26a2e886543723 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 16:28:47 +0100 Subject: [PATCH 206/246] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ae415a0..f4e721cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ - **[Misc]** Prettier on everything - **[Misc]** Make release script simpler - **[Misc]** Rename History.md to CHANGELOG.md +- **[Misc]** Use `babal-loader` with `@babel/preset-env` for supporting IE9-11 +- **[Misc]** Add source-maps to `/dist` ### 1.5.1 From c8dc33d4218945ac6a6c516cd25bcf6e5982a4d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 19:57:38 +0100 Subject: [PATCH 207/246] Fixes #414 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 816bcaaa..15c1bb15 100644 --- a/src/index.js +++ b/src/index.js @@ -65,7 +65,7 @@ module.exports = function (id, options, values) { }, handlers: function () { for (var handler in self.handlers) { - if (self[handler]) { + if (self[handler] && self.handlers.hasOwnProperty(handler)) { self.on(handler, self[handler]) } } From 2975dcd67834f2f3fe1d97852f2454b1a26e4adc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 20:32:18 +0100 Subject: [PATCH 208/246] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4e721cf..e8aa8bb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog +- [Bugfix] #667 Fix `getAttribute` fallback method + ### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 - **[Breaking]** Drop support for IE6-8 From 35aa35fb6156efbde9b41abb450d1782de34eb56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 20:42:40 +0100 Subject: [PATCH 209/246] Fix test and formatting after merge --- CHANGELOG.md | 3 +- __test__/create.test.js | 141 ++++++++++++++++++++++++------------ src/templater.js | 157 +++++++++++++++++++--------------------- 3 files changed, 169 insertions(+), 132 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8aa8bb0..e6d33d99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog -- [Bugfix] #667 Fix `getAttribute` fallback method +- **[Feature]** #634 Add item template function +- **[Bugfix]** #667 Fix `getAttribute` fallback method ### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 diff --git a/__test__/create.test.js b/__test__/create.test.js index fbc1f388..cc069b2d 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -36,66 +36,113 @@ describe('Create', function () { $(document.body).append(listEl) - describe('Without items and with template function', function() { - var listEl = $('
                                          \ -
                                            \ -
                                            '); - - $(document.body).append(listEl); - - var list = new List('list', { - valueNames: ['name'], - item: function(values) { - return `
                                          • `; - } - }, [ - { name: 'Jonny' } - ]); - - it('should contain one item', function() { - expect(list.items.length).toEqual(1); - expect(listEl.find('li').size()).toEqual(1); - }); - - it('should contain two items', function() { - list.add({ name: 'Jonas' }); - expect(list.items.length).toEqual(2); - expect(listEl.find('li').size()).toEqual(2); - }); - - it('should get values from items', function() { - list.add({ name: 'Egon' }); - expect(listEl.find('li[data-template-fn-egon]').size()).toEqual(1); - }); - - listEl.remove(); - }); - - describe('Without items and with string template for table', function() { + var list = new List( + 'list', + { + valueNames: ['name'], + item: '
                                          • ', + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) + + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('li').length).toEqual(2) + }) + + listEl.remove() + }) + + describe('Without items and with string template for table', function () { var listEl = $('
                                            \
                                            \
                                          ') $(document.body).append(listEl) - describe('without items and or template', function() { + var list = new List( + 'list', + { + valueNames: ['name'], + item: '', + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('tr').length).toEqual(1) + }) - it('should throw error on init', function() { + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('tr').length).toEqual(2) + }) + + listEl.remove() + }) + + describe('Without items and with template function', function () { + var listEl = $('
                                          \ +
                                            \ +
                                            ') + + $(document.body).append(listEl) + + var list = new List( + 'list', + { + valueNames: ['name'], + item: function (values) { + return `
                                          • ` + }, + }, + [{ name: 'Jonny' }] + ) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) + + it('should contain two items', function () { + list.add({ name: 'Jonas' }) + expect(list.items.length).toEqual(2) + expect(listEl.find('li').length).toEqual(2) + }) + + it('should get values from items', function () { + list.add({ name: 'Egon' }) + expect(listEl.find('li[data-template-fn-egon]').length).toEqual(1) + }) + + listEl.remove() + }) + + describe('without items and or template', function () { + it('should throw error on init', function () { var listEl = $('
                                            \
                                              \
                                              ') $(document.body).append(listEl) - expect(function() { + expect(function () { var list = new List('list', { - valueNames: ['name'] - }); - }).toThrow(); - listEl.remove(); - }); - }); - - describe('Without items and with HTML template', function() { + valueNames: ['name'], + }) + }).toThrow() + listEl.remove() + }) + }) + + describe('Without items and with HTML template', function () { var listEl = $('
                                              \
                                                \
                                                ') diff --git a/src/templater.js b/src/templater.js index f40148cb..d791a49a 100644 --- a/src/templater.js +++ b/src/templater.js @@ -1,61 +1,59 @@ -var Templater = function(list) { +var Templater = function (list) { var createItem, - templater = this; + templater = this - var init = function() { - var itemSource; + var init = function () { + var itemSource - if (typeof list.item === "function") { - createItem = function(values) { - var item = list.item(values); - return getItemSource(item); + if (typeof list.item === 'function') { + createItem = function (values) { + var item = list.item(values) + return getItemSource(item) } - return; + return } - if (typeof list.item === "string") { - if (list.item.indexOf("<") === -1) { - itemSource = document.getElementById(list.item); + if (typeof list.item === 'string') { + if (list.item.indexOf('<') === -1) { + itemSource = document.getElementById(list.item) } else { - itemSource = getItemSource(list.item); + itemSource = getItemSource(list.item) } } else { /* If item source does not exists, use the first item in list as source for new items */ - itemSource = getFirstListItem(); + itemSource = getFirstListItem() } if (!itemSource) { - throw new Error( - "The list needs to have at least one item on init otherwise you'll have to add a template." - ); + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.") } - itemSource = createCleanTemplateItem(itemSource, list.valueNames); + itemSource = createCleanTemplateItem(itemSource, list.valueNames) - createItem = function() { - return itemSource.cloneNode(true); + createItem = function () { + return itemSource.cloneNode(true) } } - var createCleanTemplateItem = function(templateNode, valueNames) { - var el = templateNode.cloneNode(true); - el.removeAttribute("id"); + var createCleanTemplateItem = function (templateNode, valueNames) { + var el = templateNode.cloneNode(true) + el.removeAttribute('id') for (var i = 0, il = valueNames.length; i < il; i++) { var elm = undefined, - valueName = valueNames[i]; + valueName = valueNames[i] if (valueName.data) { for (var j = 0, jl = valueName.data.length; j < jl; j++) { - el.setAttribute("data-" + valueName.data[j], ""); + el.setAttribute('data-' + valueName.data[j], '') } } else if (valueName.attr && valueName.name) { - elm = list.utils.getByClass(el, valueName.name, true); + elm = list.utils.getByClass(el, valueName.name, true) if (elm) { - elm.setAttribute(valueName.attr, ""); + elm.setAttribute(valueName.attr, '') } } else { - elm = list.utils.getByClass(el, valueName, true); + elm = list.utils.getByClass(el, valueName, true) if (elm) { elm.innerHTML = '' } @@ -64,103 +62,94 @@ var Templater = function(list) { return el } - var getFirstListItem = function() { - var nodes = list.list.childNodes; + var getFirstListItem = function () { + var nodes = list.list.childNodes for (var i = 0, il = nodes.length; i < il; i++) { // Only textnodes have a data attribute if (nodes[i].data === undefined) { - return nodes[i].cloneNode(true); + return nodes[i].cloneNode(true) } } - return undefined; + return undefined } - var getItemSource = function(itemHTML) { + var getItemSource = function (itemHTML) { if (/]/g.exec(itemHTML)) { - var tbody = document.createElement("tbody"); - tbody.innerHTML = itemHTML; - return tbody.firstElementChild; - } else if (itemHTML.indexOf("<") !== -1) { - var div = document.createElement("div"); - div.innerHTML = itemHTML; - return div.firstElementChild; + var tbody = document.createElement('tbody') + tbody.innerHTML = itemHTML + return tbody.firstElementChild + } else if (itemHTML.indexOf('<') !== -1) { + var div = document.createElement('div') + div.innerHTML = itemHTML + return div.firstElementChild } - return undefined; - }; + return undefined + } - var getValueName = function(name) { + var getValueName = function (name) { for (var i = 0, il = list.valueNames.length; i < il; i++) { - var valueName = list.valueNames[i]; + var valueName = list.valueNames[i] if (valueName.data) { - var data = valueName.data; + var data = valueName.data for (var j = 0, jl = data.length; j < jl; j++) { if (data[j] === name) { - return { data: name }; + return { data: name } } } - } else if ( - valueName.attr && - valueName.name && - valueName.name == name - ) { - return valueName; + } else if (valueName.attr && valueName.name && valueName.name == name) { + return valueName } else if (valueName === name) { - return name; + return name } } - }; + } - var setValue = function(item, name, value) { + var setValue = function (item, name, value) { var elm = undefined, - valueName = getValueName(name); - if (!valueName) return; + valueName = getValueName(name) + if (!valueName) return if (valueName.data) { - item.elm.setAttribute("data-" + valueName.data, value); + item.elm.setAttribute('data-' + valueName.data, value) } else if (valueName.attr && valueName.name) { - elm = list.utils.getByClass(item.elm, valueName.name, true); + elm = list.utils.getByClass(item.elm, valueName.name, true) if (elm) { - elm.setAttribute(valueName.attr, value); + elm.setAttribute(valueName.attr, value) } } else { - elm = list.utils.getByClass(item.elm, valueName, true); + elm = list.utils.getByClass(item.elm, valueName, true) if (elm) { - elm.innerHTML = value; + elm.innerHTML = value } } - }; + } - this.get = function(item, valueNames) { - templater.create(item); - var values = {}; + this.get = function (item, valueNames) { + templater.create(item) + var values = {} for (var i = 0, il = valueNames.length; i < il; i++) { var elm = undefined, - valueName = valueNames[i]; + valueName = valueNames[i] if (valueName.data) { for (var j = 0, jl = valueName.data.length; j < jl; j++) { - values[valueName.data[j]] = list.utils.getAttribute( - item.elm, - "data-" + valueName.data[j] - ); + values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j]) } } else if (valueName.attr && valueName.name) { - elm = list.utils.getByClass(item.elm, valueName.name, true); - values[valueName.name] = elm - ? list.utils.getAttribute(elm, valueName.attr) - : ""; + elm = list.utils.getByClass(item.elm, valueName.name, true) + values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : '' } else { - elm = list.utils.getByClass(item.elm, valueName, true); - values[valueName] = elm ? elm.innerHTML : ""; + elm = list.utils.getByClass(item.elm, valueName, true) + values[valueName] = elm ? elm.innerHTML : '' } } return values } - this.set = function(item, values) { + this.set = function (item, values) { if (!templater.create(item)) { for (var v in values) { if (values.hasOwnProperty(v)) { - setValue(item, v, values[v]); + setValue(item, v, values[v]) } } } @@ -170,11 +159,11 @@ var Templater = function(list) { if (item.elm !== undefined) { return false } - item.elm = createItem(item.values()); - templater.set(item, item.values()); - return true; - }; - this.remove = function(item) { + item.elm = createItem(item.values()) + templater.set(item, item.values()) + return true + } + this.remove = function (item) { if (item.elm.parentNode === list.list) { list.list.removeChild(item.elm) } From 275c1e6930a3f55beb0780a892d556a94d8c064b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 21:43:59 +0100 Subject: [PATCH 210/246] Add test for initiating List.js with element instead of id --- __test__/create.test.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/__test__/create.test.js b/__test__/create.test.js index cc069b2d..bae4c927 100644 --- a/__test__/create.test.js +++ b/__test__/create.test.js @@ -29,6 +29,28 @@ describe('Create', function () { listEl.remove() }) + describe('With and element instead of id', function () { + var listEl = $( + '
                                                \ +
                                                  \ +
                                                • Jonny
                                                • \ +
                                                \ +
                                                ' + ) + + $(document.body).append(listEl) + var el = document.getElementById('list') + + var list = new List(el, { valueNames: ['name'] }) + + it('should contain one item', function () { + expect(list.items.length).toEqual(1) + expect(listEl.find('li').length).toEqual(1) + }) + + listEl.remove() + }) + describe('Without items and with string template', function () { var listEl = $('
                                                \
                                                  \ From ff0a2609434b786f4743284b88b73170226e35ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 21:44:24 +0100 Subject: [PATCH 211/246] Include sorce maps for cdnjs --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0d7b58ca..1644ab4b 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,8 @@ { "basePath": "/dist/", "files": [ - "*.js" + "*.js", + "*.js.map" ] } ], From 0cafa8cbd5feffc392631ea8759a3aabbf7cfc36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 21:49:40 +0100 Subject: [PATCH 212/246] Update .npmignore --- .npmignore | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 77f12ae2..dceaa19c 100644 --- a/.npmignore +++ b/.npmignore @@ -1 +1,10 @@ -docs/ +docs +__test__ +.circleci +WISHLIST.md +webpack.config.js +Release.md +prettier.config.js +.prettierignore +.codecov.yml +.browserslistrc \ No newline at end of file From 4ba063a31ae2a62865bbaa662096f319f06a6e18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:06:37 +0100 Subject: [PATCH 213/246] Docs and prettier for custom page item --- CHANGELOG.md | 1 + __test__/pagination.test.js | 198 ++++++++++++++++++------------------ docs/docs/pagination.html | 4 + src/pagination.js | 2 +- 4 files changed, 106 insertions(+), 99 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6d33d99..fde114f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog - **[Feature]** #634 Add item template function +- **[Feature]** #591 Support adding custom pagination item - **[Bugfix]** #667 Fix `getAttribute` fallback method ### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 diff --git a/__test__/pagination.test.js b/__test__/pagination.test.js index 6d83997a..0e113b1e 100644 --- a/__test__/pagination.test.js +++ b/__test__/pagination.test.js @@ -266,106 +266,108 @@ describe('Pagination', function () { expect($(pagination.find('li').get(3)).hasClass('active')).toEqual(false) expect($(pagination.find('li').get(4)).hasClass('active')).toEqual(true) }) - }); + }) - describe('Custom settings, pagination: { item: "" }', function() { - var list, - itemHTML, - pagination; + describe('Custom settings, pagination: { item: "" }', function () { + var list, itemHTML, pagination - beforeAll(function() { + beforeAll(function () { itemHTML = fixturePagination.list(['name']) - list = new List('list-pagination', { - valueNames: ['name'], - item: itemHTML, - page: 2, + list = new List( + 'list-pagination', + { + valueNames: ['name'], + item: itemHTML, + page: 2, pagination: { - item: "", + item: '', }, - }, fixturePagination.all); - - pagination = $('.pagination'); - }); - - afterAll(function() { - fixturePagination.removeList(); - }); - - it('should have default settings', function() { - expect(pagination.find('span').length).toEqual(4); - expect(pagination.find('span').get(0).innerHTML).toEqual("1"); - expect(pagination.find('span').get(1).innerHTML).toEqual("2"); - expect(pagination.find('span').get(2).innerHTML).toEqual("3"); - expect(pagination.find('span').get(3).innerHTML).toEqual("..."); - expect(pagination.find('span').get(4)).toEqual(undefined); - }); - - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(7, 2); - expect(pagination.find('span').length).toEqual(7); - expect(pagination.find('span').get(0).innerHTML).toEqual("..."); - expect(pagination.find('span').get(1).innerHTML).toEqual("2"); - expect(pagination.find('span').get(2).innerHTML).toEqual("3"); - expect(pagination.find('span').get(3).innerHTML).toEqual("4"); - expect(pagination.find('span').get(4).innerHTML).toEqual("5"); - expect(pagination.find('span').get(5).innerHTML).toEqual("6"); - expect(pagination.find('span').get(6).innerHTML).toEqual("..."); - expect(pagination.find('span').get(7)).toEqual(undefined); - expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); - }); - - it('should show same pages for show(7,2) and show(8,2)', function() { - list.show(8, 2); - expect(pagination.find('span').length).toEqual(7); - expect(pagination.find('span').get(0).innerHTML).toEqual("..."); - expect(pagination.find('span').get(1).innerHTML).toEqual("2"); - expect(pagination.find('span').get(2).innerHTML).toEqual("3"); - expect(pagination.find('span').get(3).innerHTML).toEqual("4"); - expect(pagination.find('span').get(4).innerHTML).toEqual("5"); - expect(pagination.find('span').get(5).innerHTML).toEqual("6"); - expect(pagination.find('span').get(6).innerHTML).toEqual("..."); - expect(pagination.find('span').get(7)).toEqual(undefined); - expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); - }); - - it('should test show(14,2)', function() { - list.show(14, 2); - expect(pagination.find('span').length).toEqual(6); - expect(pagination.find('span').get(0).innerHTML).toEqual("..."); - expect(pagination.find('span').get(1).innerHTML).toEqual("5"); - expect(pagination.find('span').get(2).innerHTML).toEqual("6"); - expect(pagination.find('span').get(3).innerHTML).toEqual("7"); - expect(pagination.find('span').get(4).innerHTML).toEqual("8"); - expect(pagination.find('span').get(5).innerHTML).toEqual("9"); - expect(pagination.find('span').get(6)).toEqual(undefined); - expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); - expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false); - }); - - it('should show last page with show(17,2)', function() { - list.show(17, 2); - expect(pagination.find('span').length).toEqual(4); - expect(pagination.find('span').get(0).innerHTML).toEqual("..."); - expect(pagination.find('span').get(1).innerHTML).toEqual("7"); - expect(pagination.find('span').get(2).innerHTML).toEqual("8"); - expect(pagination.find('span').get(3).innerHTML).toEqual("9"); - expect(pagination.find('span').get(4)).toEqual(undefined); - expect($(pagination.find('button').get(1)).hasClass('active')).toEqual(false); - expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false); - expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true); - }); - - it('should handle page = 0', function() { - expect(list.listContainer.style.display).toBe(''); - list.show(0, 0); - expect(list.listContainer.style.display).toBe('none'); - list.show(1, 1); - expect(list.listContainer.style.display).toBe('block'); - }); - }); -}); + }, + fixturePagination.all + ) + + pagination = $('.pagination') + }) + + afterAll(function () { + fixturePagination.removeList() + }) + + it('should have default settings', function () { + expect(pagination.find('span').length).toEqual(4) + expect(pagination.find('span').get(0).innerHTML).toEqual('1') + expect(pagination.find('span').get(1).innerHTML).toEqual('2') + expect(pagination.find('span').get(2).innerHTML).toEqual('3') + expect(pagination.find('span').get(3).innerHTML).toEqual('...') + expect(pagination.find('span').get(4)).toEqual(undefined) + }) + + it('should show same pages for show(7,2) and show(8,2)', function () { + list.show(7, 2) + expect(pagination.find('span').length).toEqual(7) + expect(pagination.find('span').get(0).innerHTML).toEqual('...') + expect(pagination.find('span').get(1).innerHTML).toEqual('2') + expect(pagination.find('span').get(2).innerHTML).toEqual('3') + expect(pagination.find('span').get(3).innerHTML).toEqual('4') + expect(pagination.find('span').get(4).innerHTML).toEqual('5') + expect(pagination.find('span').get(5).innerHTML).toEqual('6') + expect(pagination.find('span').get(6).innerHTML).toEqual('...') + expect(pagination.find('span').get(7)).toEqual(undefined) + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false) + }) + + it('should show same pages for show(7,2) and show(8,2)', function () { + list.show(8, 2) + expect(pagination.find('span').length).toEqual(7) + expect(pagination.find('span').get(0).innerHTML).toEqual('...') + expect(pagination.find('span').get(1).innerHTML).toEqual('2') + expect(pagination.find('span').get(2).innerHTML).toEqual('3') + expect(pagination.find('span').get(3).innerHTML).toEqual('4') + expect(pagination.find('span').get(4).innerHTML).toEqual('5') + expect(pagination.find('span').get(5).innerHTML).toEqual('6') + expect(pagination.find('span').get(6).innerHTML).toEqual('...') + expect(pagination.find('span').get(7)).toEqual(undefined) + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false) + }) + + it('should test show(14,2)', function () { + list.show(14, 2) + expect(pagination.find('span').length).toEqual(6) + expect(pagination.find('span').get(0).innerHTML).toEqual('...') + expect(pagination.find('span').get(1).innerHTML).toEqual('5') + expect(pagination.find('span').get(2).innerHTML).toEqual('6') + expect(pagination.find('span').get(3).innerHTML).toEqual('7') + expect(pagination.find('span').get(4).innerHTML).toEqual('8') + expect(pagination.find('span').get(5).innerHTML).toEqual('9') + expect(pagination.find('span').get(6)).toEqual(undefined) + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true) + expect($(pagination.find('button').get(4)).hasClass('active')).toEqual(false) + }) + + it('should show last page with show(17,2)', function () { + list.show(17, 2) + expect(pagination.find('span').length).toEqual(4) + expect(pagination.find('span').get(0).innerHTML).toEqual('...') + expect(pagination.find('span').get(1).innerHTML).toEqual('7') + expect(pagination.find('span').get(2).innerHTML).toEqual('8') + expect(pagination.find('span').get(3).innerHTML).toEqual('9') + expect(pagination.find('span').get(4)).toEqual(undefined) + expect($(pagination.find('button').get(1)).hasClass('active')).toEqual(false) + expect($(pagination.find('button').get(2)).hasClass('active')).toEqual(false) + expect($(pagination.find('button').get(3)).hasClass('active')).toEqual(true) + }) + + it('should handle page = 0', function () { + expect(list.listContainer.style.display).toBe('') + list.show(0, 0) + expect(list.listContainer.style.display).toBe('none') + list.show(1, 1) + expect(list.listContainer.style.display).toBe('block') + }) + }) +}) diff --git a/docs/docs/pagination.html b/docs/docs/pagination.html index 8c1e401e..f1554cf1 100644 --- a/docs/docs/pagination.html +++ b/docs/docs/pagination.html @@ -59,6 +59,10 @@

                                                  Options

                                                  right Int, default: 0
                                                  Same as left but from right. +
                                                • + item String, default <li><a class='page' href='#'></a></li>
                                                  + Template for the pagination items. +
                                                • Notice

                                                  diff --git a/src/pagination.js b/src/pagination.js index 7a729641..ae93b9f7 100644 --- a/src/pagination.js +++ b/src/pagination.js @@ -85,7 +85,7 @@ module.exports = function (list) { return function (options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: options.item || "
                                                • ", + item: options.item || "
                                                • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist', From d0815513a10fe14301edeafd0d35835491023894 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:11:28 +0100 Subject: [PATCH 214/246] Fixes #636 --- src/templater.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/templater.js b/src/templater.js index d791a49a..5d09973d 100644 --- a/src/templater.js +++ b/src/templater.js @@ -75,6 +75,7 @@ var Templater = function (list) { } var getItemSource = function (itemHTML) { + if (typeof itemHTML !== 'string') return undefined if (/]/g.exec(itemHTML)) { var tbody = document.createElement('tbody') tbody.innerHTML = itemHTML From 572cc9519a3c84fe7344ff5c88e94c9889a12e21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:28:00 +0100 Subject: [PATCH 215/246] Revert to old fuzzy search --- src/utils/fuzzy.js | 144 ++++++++++++++++++++++----------------------- 1 file changed, 69 insertions(+), 75 deletions(-) diff --git a/src/utils/fuzzy.js b/src/utils/fuzzy.js index 1c82ce18..c123dfc4 100644 --- a/src/utils/fuzzy.js +++ b/src/utils/fuzzy.js @@ -11,20 +11,20 @@ module.exports = function (text, pattern, options) { if (pattern === text) return true // Exact match if (pattern.length > 32) return false // This algorithm cannot be used - // Set starting location at beginning text and initialise the alphabet. - var loc = Match_Location, - s = (function() { - var q = {}, - i, - il; - - for (i = 0, il = pattern.length; i < il; i++) { - q[pattern.charAt(i)] = 0; - } - - for (i = 0, il = pattern.length; i < il; i++) { - q[pattern.charAt(i)] |= 1 << (il - i - 1); - } + // Set starting location at beginning text and initialise the alphabet. + var loc = Match_Location, + s = (function () { + var q = {}, + i + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] = 0 + } + + for (i = 0; i < pattern.length; i++) { + q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1) + } + return q })() @@ -53,68 +53,62 @@ module.exports = function (text, pattern, options) { if (best_loc != -1) { score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold) } + } - // Initialise the bit arrays. - var matchmask = 1 << (pattern.length - 1); - best_loc = -1; - - var bin_min, bin_mid; - var bin_max = pattern.length + text.length; - var last_rd; - for (var d = 0, dl = pattern.length; d < dl; d++) { - // Scan for the best match; each iteration allows for one more error. - // Run a binary search to determine how far from 'loc' we can stray at this - // error level. - bin_min = 0; - bin_mid = bin_max; - while (bin_min < bin_mid) { - if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { - bin_min = bin_mid; - } else { - bin_max = bin_mid; - } - bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min); - } - // Use the result from this iteration as the maximum for the next. - bin_max = bin_mid; - var start = Math.max(1, loc - bin_mid + 1); - var finish = Math.min(loc + bin_mid, text.length) + dl; - - var rd = Array(finish + 2); - rd[finish + 1] = (1 << d) - 1; - for (var j = finish; j >= start; j--) { - // The alphabet (s) is a sparse hash, so the following line generates - // warnings. - var charMatch = s[text.charAt(j - 1)]; - if (d === 0) { // First pass: exact match. - rd[j] = ((rd[j + 1] << 1) | 1) & charMatch; - } else { // Subsequent passes: fuzzy match. - rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | - (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | - last_rd[j + 1]; - } - if (rd[j] & matchmask) { - var score = match_bitapScore_(d, j - 1); - // This match will almost certainly be better than any existing match. - // But check anyway. - if (score <= score_threshold) { - // Told you so. - score_threshold = score; - best_loc = j - 1; - if (best_loc > loc) { - // When passing loc, don't exceed our current distance from loc. - start = Math.max(1, 2 * loc - best_loc); - } else { - // Already passed loc, downhill from here on in. - break; - } - } - } - } - // No hope for a (better) match at greater error levels. - if (match_bitapScore_(d + 1, loc) > score_threshold) { - break; - + // Initialise the bit arrays. + var matchmask = 1 << (pattern.length - 1) + best_loc = -1 + + var bin_min, bin_mid + var bin_max = pattern.length + text.length + var last_rd + for (var d = 0; d < pattern.length; d++) { + // Scan for the best match; each iteration allows for one more error. + // Run a binary search to determine how far from 'loc' we can stray at this + // error level. + bin_min = 0 + bin_mid = bin_max + while (bin_min < bin_mid) { + if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) { + bin_min = bin_mid + } else { + bin_max = bin_mid + } + bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min) + } + // Use the result from this iteration as the maximum for the next. + bin_max = bin_mid + var start = Math.max(1, loc - bin_mid + 1) + var finish = Math.min(loc + bin_mid, text.length) + pattern.length + + var rd = Array(finish + 2) + rd[finish + 1] = (1 << d) - 1 + for (var j = finish; j >= start; j--) { + // The alphabet (s) is a sparse hash, so the following line generates + // warnings. + var charMatch = s[text.charAt(j - 1)] + if (d === 0) { + // First pass: exact match. + rd[j] = ((rd[j + 1] << 1) | 1) & charMatch + } else { + // Subsequent passes: fuzzy match. + rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1] + } + if (rd[j] & matchmask) { + var score = match_bitapScore_(d, j - 1) + // This match will almost certainly be better than any existing match. + // But check anyway. + if (score <= score_threshold) { + // Told you so. + score_threshold = score + best_loc = j - 1 + if (best_loc > loc) { + // When passing loc, don't exceed our current distance from loc. + start = Math.max(1, 2 * loc - best_loc) + } else { + // Already passed loc, downhill from here on in. + break + } } } } From 3735b2feb1b99d8d29a76e8590fdee4e0d34aba0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:29:28 +0100 Subject: [PATCH 216/246] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fde114f1..e7cc20df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ - **[Feature]** #634 Add item template function - **[Feature]** #591 Support adding custom pagination item - **[Bugfix]** #667 Fix `getAttribute` fallback method +- **[Bugfix]** #636 Aviod strange ie11 bug +- **[Misc]** #637 Reuse iteration indices ### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 From 0cb85548d2c957159d9dce4c3eee9f875d5a2e0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:55:34 +0100 Subject: [PATCH 217/246] Update WISHLIST.md --- WISHLIST.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WISHLIST.md b/WISHLIST.md index afb04475..567a141a 100644 --- a/WISHLIST.md +++ b/WISHLIST.md @@ -1,4 +1,5 @@ # Wishlist + - Add tests for custom event handlers. 27e2d6fdeee7090eb1342a108013db898fc29b96 - Regex in search https://github.com/javve/list.js/issues/371 - Keep original order? + know @@ -16,6 +17,9 @@ - Multiple filter functionality - Activ search term, sort order, filter, etc - [Smarter pagination window](https://github.com/javve/list.js/issues/599) +- [Handle input checkboxes in list](https://github.com/javve/list.js/pull/630) +- Use query-selector to support more than just ID for item and list initiation # Known bugs + Pagination does not respect .show(i, page) From 000150a5cbf518ecfebd3d93f8e43fb0a37573da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 22:56:54 +0100 Subject: [PATCH 218/246] Add test to confirm #570 --- __test__/add-get-remove.test.js | 196 ++++++++++++++++---------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/__test__/add-get-remove.test.js b/__test__/add-get-remove.test.js index 3fdd2535..4e7f50e3 100644 --- a/__test__/add-get-remove.test.js +++ b/__test__/add-get-remove.test.js @@ -26,104 +26,104 @@ describe('Add, get, remove', function () { expect(list.items.length).toEqual(3) }) it('should add async items', function (done) { - list.add( - [ - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - { name: 'Sven' }, - ], - function () { - expect(list.items.length).toEqual(91) - done() - } - ) + var itemsToAdd = [ + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + { name: 'Sven' }, + ] + list.add(itemsToAdd, function (items) { + expect(list.items.length).toEqual(91) + expect(items.length).toEqual(90) + expect(itemsToAdd.length).toEqual(90) + done() + }) }) it('should add async items to empty list', function (done) { list.clear() From 06d1b0413a51b3177bf10dd186445206aa45e9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 23:03:38 +0100 Subject: [PATCH 219/246] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7cc20df..d4ec6ba8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,12 @@ # Changelog +### 2.1.0 - 2020-11-21 + - **[Feature]** #634 Add item template function - **[Feature]** #591 Support adding custom pagination item - **[Bugfix]** #667 Fix `getAttribute` fallback method - **[Bugfix]** #636 Aviod strange ie11 bug +- **[Bugfix]** #570 Don't empty original value array when adding items async - **[Misc]** #637 Reuse iteration indices ### 2.0.0 - 2020-11-21 - Winter cleanup 🧹 From 4ac0c978b8fd8ca8b7cf023b791c70c2e78de6f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 23:07:25 +0100 Subject: [PATCH 220/246] 2.1.0 --- dist/list.js | 238 +++++++++++++++------------- dist/list.js.map | 2 +- dist/list.min.js | 2 +- docs/assets/javascripts/list.min.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 133 insertions(+), 115 deletions(-) diff --git a/dist/list.js b/dist/list.js index e7390742..edf49993 100644 --- a/dist/list.js +++ b/dist/list.js @@ -228,7 +228,7 @@ module.exports = function (id, options, values) { }, handlers: function handlers() { for (var handler in self.handlers) { - if (self[handler]) { + if (self[handler] && self.handlers.hasOwnProperty(handler)) { self.on(handler, self[handler]); } } @@ -289,7 +289,7 @@ module.exports = function (id, options, values) { } if (callback) { - addAsync(values, callback); + addAsync(values.slice(0), callback); return; } @@ -614,7 +614,7 @@ module.exports = function (list) { return function (options) { var pagingList = new List(list.listContainer.id, { listClass: options.paginationClass || 'pagination', - item: "
                                                • ", + item: options.item || "
                                                • ", valueNames: ['page', 'dotted'], searchClass: 'pagination-search-that-is-not-supposed-to-exist', sortClass: 'pagination-sort-that-is-not-supposed-to-exist' @@ -969,153 +969,180 @@ module.exports = function (list) { \**************************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: module */ -/*! CommonJS bailout: module.exports is used directly at 198:0-14 */ +/*! CommonJS bailout: module.exports is used directly at 216:0-14 */ /***/ (function(module) { var Templater = function Templater(list) { - var itemSource, + var createItem, templater = this; var init = function init() { - itemSource = templater.getItemSource(list.item); + var itemSource; - if (itemSource) { - itemSource = templater.clearSourceItem(itemSource, list.valueNames); + if (typeof list.item === 'function') { + createItem = function createItem(values) { + var item = list.item(values); + return getItemSource(item); + }; + + return; + } + + if (typeof list.item === 'string') { + if (list.item.indexOf('<') === -1) { + itemSource = document.getElementById(list.item); + } else { + itemSource = getItemSource(list.item); + } + } else { + /* If item source does not exists, use the first item in list as + source for new items */ + itemSource = getFirstListItem(); } + + if (!itemSource) { + throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); + } + + itemSource = createCleanTemplateItem(itemSource, list.valueNames); + + createItem = function createItem() { + return itemSource.cloneNode(true); + }; }; - this.clearSourceItem = function (el, valueNames) { + var createCleanTemplateItem = function createCleanTemplateItem(templateNode, valueNames) { + var el = templateNode.cloneNode(true); + el.removeAttribute('id'); + for (var i = 0, il = valueNames.length; i < il; i++) { - var elm; + var elm = undefined, + valueName = valueNames[i]; - if (valueNames[i].data) { - for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - el.setAttribute('data-' + valueNames[i].data[j], ''); + if (valueName.data) { + for (var j = 0, jl = valueName.data.length; j < jl; j++) { + el.setAttribute('data-' + valueName.data[j], ''); } - } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(el, valueNames[i].name, true); + } else if (valueName.attr && valueName.name) { + elm = list.utils.getByClass(el, valueName.name, true); if (elm) { - elm.setAttribute(valueNames[i].attr, ''); + elm.setAttribute(valueName.attr, ''); } } else { - elm = list.utils.getByClass(el, valueNames[i], true); + elm = list.utils.getByClass(el, valueName, true); if (elm) { elm.innerHTML = ''; } } - - elm = undefined; } return el; }; - this.getItemSource = function (item) { - if (item === undefined) { - var nodes = list.list.childNodes, - items = []; + var getFirstListItem = function getFirstListItem() { + var nodes = list.list.childNodes; - for (var i = 0, il = nodes.length; i < il; i++) { - // Only textnodes have a data attribute - if (nodes[i].data === undefined) { - return nodes[i].cloneNode(true); - } + for (var i = 0, il = nodes.length; i < il; i++) { + // Only textnodes have a data attribute + if (nodes[i].data === undefined) { + return nodes[i].cloneNode(true); } - } else if (/]/g.exec(item)) { + } + + return undefined; + }; + + var getItemSource = function getItemSource(itemHTML) { + if (typeof itemHTML !== 'string') return undefined; + + if (/]/g.exec(itemHTML)) { var tbody = document.createElement('tbody'); - tbody.innerHTML = item; - return tbody.firstChild; - } else if (item.indexOf('<') !== -1) { + tbody.innerHTML = itemHTML; + return tbody.firstElementChild; + } else if (itemHTML.indexOf('<') !== -1) { var div = document.createElement('div'); - div.innerHTML = item; - return div.firstChild; - } else { - var source = document.getElementById(list.item); - - if (source) { - return source; - } + div.innerHTML = itemHTML; + return div.firstElementChild; } return undefined; }; - this.get = function (item, valueNames) { - templater.create(item); - var values = {}; + var getValueName = function getValueName(name) { + for (var i = 0, il = list.valueNames.length; i < il; i++) { + var valueName = list.valueNames[i]; - for (var i = 0, il = valueNames.length; i < il; i++) { - var elm; + if (valueName.data) { + var data = valueName.data; - if (valueNames[i].data) { - for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) { - values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j]); + for (var j = 0, jl = data.length; j < jl; j++) { + if (data[j] === name) { + return { + data: name + }; + } } - } else if (valueNames[i].attr && valueNames[i].name) { - elm = list.utils.getByClass(item.elm, valueNames[i].name, true); - values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''; - } else { - elm = list.utils.getByClass(item.elm, valueNames[i], true); - values[valueNames[i]] = elm ? elm.innerHTML : ''; + } else if (valueName.attr && valueName.name && valueName.name == name) { + return valueName; + } else if (valueName === name) { + return name; } - - elm = undefined; } - - return values; }; - this.set = function (item, values) { - var getValueName = function getValueName(name) { - for (var i = 0, il = list.valueNames.length; i < il; i++) { - if (list.valueNames[i].data) { - var data = list.valueNames[i].data; - - for (var j = 0, jl = data.length; j < jl; j++) { - if (data[j] === name) { - return { - data: name - }; - } - } - } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) { - return list.valueNames[i]; - } else if (list.valueNames[i] === name) { - return name; - } + var setValue = function setValue(item, name, value) { + var elm = undefined, + valueName = getValueName(name); + if (!valueName) return; + + if (valueName.data) { + item.elm.setAttribute('data-' + valueName.data, value); + } else if (valueName.attr && valueName.name) { + elm = list.utils.getByClass(item.elm, valueName.name, true); + + if (elm) { + elm.setAttribute(valueName.attr, value); } - }; + } else { + elm = list.utils.getByClass(item.elm, valueName, true); + + if (elm) { + elm.innerHTML = value; + } + } + }; + + this.get = function (item, valueNames) { + templater.create(item); + var values = {}; - var setValue = function setValue(name, value) { - var elm; - var valueName = getValueName(name); - if (!valueName) return; + for (var i = 0, il = valueNames.length; i < il; i++) { + var elm = undefined, + valueName = valueNames[i]; if (valueName.data) { - item.elm.setAttribute('data-' + valueName.data, value); + for (var j = 0, jl = valueName.data.length; j < jl; j++) { + values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j]); + } } else if (valueName.attr && valueName.name) { elm = list.utils.getByClass(item.elm, valueName.name, true); - - if (elm) { - elm.setAttribute(valueName.attr, value); - } + values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : ''; } else { elm = list.utils.getByClass(item.elm, valueName, true); - - if (elm) { - elm.innerHTML = value; - } + values[valueName] = elm ? elm.innerHTML : ''; } + } - elm = undefined; - }; + return values; + }; + this.set = function (item, values) { if (!templater.create(item)) { for (var v in values) { if (values.hasOwnProperty(v)) { - setValue(v, values[v]); + setValue(item, v, values[v]); } } } @@ -1126,16 +1153,7 @@ var Templater = function Templater(list) { return false; } - if (itemSource === undefined) { - throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template."); - } - /* If item source does not exists, use the first item in list as - source for new items */ - - - var newItem = itemSource.cloneNode(true); - newItem.removeAttribute('id'); - item.elm = newItem; + item.elm = createItem(item.values()); templater.set(item, item.values()); return true; }; @@ -1377,7 +1395,7 @@ var bind = window.addEventListener ? 'addEventListener' : 'attachEvent', exports.bind = function (el, type, fn, capture) { el = toArray(el); - for (var i = 0; i < el.length; i++) { + for (var i = 0, il = el.length; i < il; i++) { el[i][bind](prefix + type, fn, capture || false); } }; @@ -1395,7 +1413,7 @@ exports.bind = function (el, type, fn, capture) { exports.unbind = function (el, type, fn, capture) { el = toArray(el); - for (var i = 0; i < el.length; i++) { + for (var i = 0, il = el.length; i < il; i++) { el[i][unbind](prefix + type, fn, capture || false); } }; @@ -1600,9 +1618,9 @@ module.exports = function (el, attr) { var length = attrs.length; for (var i = 0; i < length; i++) { - if (attr[i] !== undefined) { - if (attr[i].nodeName === attr) { - result = attr[i].nodeValue; + if (attrs[i] !== undefined) { + if (attrs[i].nodeName === attr) { + result = attrs[i].nodeValue; } } } @@ -1704,7 +1722,7 @@ var indexOf = [].indexOf; module.exports = function (arr, obj) { if (indexOf) return arr.indexOf(obj); - for (var i = 0; i < arr.length; ++i) { + for (var i = 0, il = arr.length; i < il; ++i) { if (arr[i] === obj) return i; } @@ -1742,7 +1760,7 @@ module.exports = function toArray(collection) { if (typeof collection === 'function' && collection instanceof Function) return [collection]; var arr = []; - for (var i = 0; i < collection.length; i++) { + for (var i = 0, il = collection.length; i < il; i++) { if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) { arr.push(collection[i]); } diff --git a/dist/list.js.map b/dist/list.js.map index 52ac95db..0a23bc91 100644 --- a/dist/list.js.map +++ b/dist/list.js.map @@ -1 +1 @@ -{"version":3,"file":"list.js","sources":["webpack://List/./src/add-async.js","webpack://List/./src/filter.js","webpack://List/./src/fuzzy-search.js","webpack://List/./src/index.js","webpack://List/./src/item.js","webpack://List/./src/pagination.js","webpack://List/./src/parse.js","webpack://List/./src/search.js","webpack://List/./src/sort.js","webpack://List/./src/templater.js","webpack://List/./src/utils/classes.js","webpack://List/./src/utils/events.js","webpack://List/./src/utils/extend.js","webpack://List/./src/utils/fuzzy.js","webpack://List/./src/utils/get-attribute.js","webpack://List/./src/utils/get-by-class.js","webpack://List/./src/utils/index-of.js","webpack://List/./src/utils/to-array.js","webpack://List/./src/utils/to-string.js","webpack://List/./node_modules/string-natural-compare/natural-compare.js","webpack://List/webpack/bootstrap","webpack://List/webpack/startup"],"sourcesContent":["module.exports = function (list) {\n var addAsync = function (values, callback, items) {\n var valuesToAdd = values.splice(0, 50)\n items = items || []\n items = items.concat(list.add(valuesToAdd))\n if (values.length > 0) {\n setTimeout(function () {\n addAsync(values, callback, items)\n }, 1)\n } else {\n list.update()\n callback(items)\n }\n }\n return addAsync\n}\n","module.exports = function (list) {\n // Add handlers\n list.handlers.filterStart = list.handlers.filterStart || []\n list.handlers.filterComplete = list.handlers.filterComplete || []\n\n return function (filterFunction) {\n list.trigger('filterStart')\n list.i = 1 // Reset paging\n list.reset.filter()\n if (filterFunction === undefined) {\n list.filtered = false\n } else {\n list.filtered = true\n var is = list.items\n for (var i = 0, il = is.length; i < il; i++) {\n var item = is[i]\n if (filterFunction(item)) {\n item.filtered = true\n } else {\n item.filtered = false\n }\n }\n }\n list.update()\n list.trigger('filterComplete')\n return list.visibleItems\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n extend = require('./utils/extend'),\n toString = require('./utils/to-string'),\n getByClass = require('./utils/get-by-class'),\n fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n options = options || {}\n\n options = extend(\n {\n location: 0,\n distance: 100,\n threshold: 0.4,\n multiSearch: true,\n searchClass: 'fuzzy-search',\n },\n options\n )\n\n var fuzzySearch = {\n search: function (searchString, columns) {\n // Substract arguments from the searchString or put searchString as only argument\n var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n fuzzySearch.item(list.items[k], columns, searchArguments)\n }\n },\n item: function (item, columns, searchArguments) {\n var found = true\n for (var i = 0; i < searchArguments.length; i++) {\n var foundArgument = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n foundArgument = true\n }\n }\n if (!foundArgument) {\n found = false\n }\n }\n item.found = found\n },\n values: function (values, value, searchArgument) {\n if (values.hasOwnProperty(value)) {\n var text = toString(values[value]).toLowerCase()\n\n if (fuzzy(text, searchArgument, options)) {\n return true\n }\n }\n return false\n },\n }\n\n events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement // IE have srcElement\n list.search(target.value, fuzzySearch.search)\n })\n\n return function (str, columns) {\n list.search(str, columns, fuzzySearch.search)\n }\n}\n","var naturalSort = require('string-natural-compare'),\n getByClass = require('./utils/get-by-class'),\n extend = require('./utils/extend'),\n indexOf = require('./utils/index-of'),\n events = require('./utils/events'),\n toString = require('./utils/to-string'),\n classes = require('./utils/classes'),\n getAttribute = require('./utils/get-attribute'),\n toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n var self = this,\n init,\n Item = require('./item')(self),\n addAsync = require('./add-async')(self),\n initPagination = require('./pagination')(self)\n\n init = {\n start: function () {\n self.listClass = 'list'\n self.searchClass = 'search'\n self.sortClass = 'sort'\n self.page = 10000\n self.i = 1\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.searchColumns = undefined\n self.handlers = { updated: [] }\n self.valueNames = []\n self.utils = {\n getByClass: getByClass,\n extend: extend,\n indexOf: indexOf,\n events: events,\n toString: toString,\n naturalSort: naturalSort,\n classes: classes,\n getAttribute: getAttribute,\n toArray: toArray,\n }\n\n self.utils.extend(self, options)\n\n self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n if (!self.listContainer) {\n return\n }\n self.list = getByClass(self.listContainer, self.listClass, true)\n\n self.parse = require('./parse')(self)\n self.templater = require('./templater')(self)\n self.search = require('./search')(self)\n self.filter = require('./filter')(self)\n self.sort = require('./sort')(self)\n self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n this.handlers()\n this.items()\n this.pagination()\n\n self.update()\n },\n handlers: function () {\n for (var handler in self.handlers) {\n if (self[handler]) {\n self.on(handler, self[handler])\n }\n }\n },\n items: function () {\n self.parse(self.list)\n if (values !== undefined) {\n self.add(values)\n }\n },\n pagination: function () {\n if (options.pagination !== undefined) {\n if (options.pagination === true) {\n options.pagination = [{}]\n }\n if (options.pagination[0] === undefined) {\n options.pagination = [options.pagination]\n }\n for (var i = 0, il = options.pagination.length; i < il; i++) {\n initPagination(options.pagination[i])\n }\n }\n },\n }\n\n /*\n * Re-parse the List, use if html have changed\n */\n this.reIndex = function () {\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.parse(self.list)\n }\n\n this.toJSON = function () {\n var json = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n json.push(self.items[i].values())\n }\n return json\n }\n\n /*\n * Add object to list\n */\n this.add = function (values, callback) {\n if (values.length === 0) {\n return\n }\n if (callback) {\n addAsync(values, callback)\n return\n }\n var added = [],\n notCreate = false\n if (values[0] === undefined) {\n values = [values]\n }\n for (var i = 0, il = values.length; i < il; i++) {\n var item = null\n notCreate = self.items.length > self.page ? true : false\n item = new Item(values[i], undefined, notCreate)\n self.items.push(item)\n added.push(item)\n }\n self.update()\n return added\n }\n\n this.show = function (i, page) {\n this.i = i\n this.page = page\n self.update()\n return self\n }\n\n /* Removes object from list.\n * Loops through the list and removes objects where\n * property \"valuename\" === value\n */\n this.remove = function (valueName, value, options) {\n var found = 0\n for (var i = 0, il = self.items.length; i < il; i++) {\n if (self.items[i].values()[valueName] == value) {\n self.templater.remove(self.items[i], options)\n self.items.splice(i, 1)\n il--\n i--\n found++\n }\n }\n self.update()\n return found\n }\n\n /* Gets the objects in the list which\n * property \"valueName\" === value\n */\n this.get = function (valueName, value) {\n var matchedItems = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n var item = self.items[i]\n if (item.values()[valueName] == value) {\n matchedItems.push(item)\n }\n }\n return matchedItems\n }\n\n /*\n * Get size of the list\n */\n this.size = function () {\n return self.items.length\n }\n\n /*\n * Removes all items from the list\n */\n this.clear = function () {\n self.templater.clear()\n self.items = []\n return self\n }\n\n this.on = function (event, callback) {\n self.handlers[event].push(callback)\n return self\n }\n\n this.off = function (event, callback) {\n var e = self.handlers[event]\n var index = indexOf(e, callback)\n if (index > -1) {\n e.splice(index, 1)\n }\n return self\n }\n\n this.trigger = function (event) {\n var i = self.handlers[event].length\n while (i--) {\n self.handlers[event][i](self)\n }\n return self\n }\n\n this.reset = {\n filter: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].filtered = false\n }\n return self\n },\n search: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].found = false\n }\n return self\n },\n }\n\n this.update = function () {\n var is = self.items,\n il = is.length\n\n self.visibleItems = []\n self.matchingItems = []\n self.templater.clear()\n for (var i = 0; i < il; i++) {\n if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n is[i].show()\n self.visibleItems.push(is[i])\n self.matchingItems.push(is[i])\n } else if (is[i].matching()) {\n self.matchingItems.push(is[i])\n is[i].hide()\n } else {\n is[i].hide()\n }\n }\n self.trigger('updated')\n return self\n }\n\n init.start()\n}\n","module.exports = function (list) {\n return function (initValues, element, notCreate) {\n var item = this\n\n this._values = {}\n\n this.found = false // Show if list.searched == true and this.found == true\n this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n var init = function (initValues, element, notCreate) {\n if (element === undefined) {\n if (notCreate) {\n item.values(initValues, notCreate)\n } else {\n item.values(initValues)\n }\n } else {\n item.elm = element\n var values = list.templater.get(item, initValues)\n item.values(values)\n }\n }\n\n this.values = function (newValues, notCreate) {\n if (newValues !== undefined) {\n for (var name in newValues) {\n item._values[name] = newValues[name]\n }\n if (notCreate !== true) {\n list.templater.set(item, item.values())\n }\n } else {\n return item._values\n }\n }\n\n this.show = function () {\n list.templater.show(item)\n }\n\n this.hide = function () {\n list.templater.hide(item)\n }\n\n this.matching = function () {\n return (\n (list.filtered && list.searched && item.found && item.filtered) ||\n (list.filtered && !list.searched && item.filtered) ||\n (!list.filtered && list.searched && item.found) ||\n (!list.filtered && !list.searched)\n )\n }\n\n this.visible = function () {\n return item.elm && item.elm.parentNode == list.list ? true : false\n }\n\n init(initValues, element, notCreate)\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n List = require('./index')\n\nmodule.exports = function (list) {\n var isHidden = false\n\n var refresh = function (pagingList, options) {\n if (list.page < 1) {\n list.listContainer.style.display = 'none'\n isHidden = true\n return\n } else if (isHidden) {\n list.listContainer.style.display = 'block'\n }\n\n var item,\n l = list.matchingItems.length,\n index = list.i,\n page = list.page,\n pages = Math.ceil(l / page),\n currentPage = Math.ceil(index / page),\n innerWindow = options.innerWindow || 2,\n left = options.left || options.outerWindow || 0,\n right = options.right || options.outerWindow || 0\n\n right = pages - right\n pagingList.clear()\n for (var i = 1; i <= pages; i++) {\n var className = currentPage === i ? 'active' : ''\n\n //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n if (is.number(i, left, right, currentPage, innerWindow)) {\n item = pagingList.add({\n page: i,\n dotted: false,\n })[0]\n if (className) {\n classes(item.elm).add(className)\n }\n item.elm.firstChild.setAttribute('data-i', i)\n item.elm.firstChild.setAttribute('data-page', page)\n } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n item = pagingList.add({\n page: '...',\n dotted: true,\n })[0]\n classes(item.elm).add('disabled')\n }\n }\n }\n\n var is = {\n number: function (i, left, right, currentPage, innerWindow) {\n return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n },\n left: function (i, left) {\n return i <= left\n },\n right: function (i, right) {\n return i > right\n },\n innerWindow: function (i, currentPage, innerWindow) {\n return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n },\n dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n return (\n this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n )\n },\n dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n },\n dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n if (pagingList.items[currentPageItem - 1].values().dotted) {\n return false\n } else {\n return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n }\n },\n }\n\n return function (options) {\n var pagingList = new List(list.listContainer.id, {\n listClass: options.paginationClass || 'pagination',\n item: \"
                                                • \",\n valueNames: ['page', 'dotted'],\n searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n })\n\n events.bind(pagingList.listContainer, 'click', function (e) {\n var target = e.target || e.srcElement,\n page = list.utils.getAttribute(target, 'data-page'),\n i = list.utils.getAttribute(target, 'data-i')\n if (i) {\n list.show((i - 1) * page + 1, page)\n }\n })\n\n list.on('updated', function () {\n refresh(pagingList, options)\n })\n refresh(pagingList, options)\n }\n}\n","module.exports = function (list) {\n var Item = require('./item')(list)\n\n var getChildren = function (parent) {\n var nodes = parent.childNodes,\n items = []\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n items.push(nodes[i])\n }\n }\n return items\n }\n\n var parse = function (itemElements, valueNames) {\n for (var i = 0, il = itemElements.length; i < il; i++) {\n list.items.push(new Item(valueNames, itemElements[i]))\n }\n }\n var parseAsync = function (itemElements, valueNames) {\n var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n parse(itemsToIndex, valueNames)\n if (itemElements.length > 0) {\n setTimeout(function () {\n parseAsync(itemElements, valueNames)\n }, 1)\n } else {\n list.update()\n list.trigger('parseComplete')\n }\n }\n\n list.handlers.parseComplete = list.handlers.parseComplete || []\n\n return function () {\n var itemsToIndex = getChildren(list.list),\n valueNames = list.valueNames\n\n if (list.indexAsync) {\n parseAsync(itemsToIndex, valueNames)\n } else {\n parse(itemsToIndex, valueNames)\n }\n }\n}\n","module.exports = function (list) {\n var item, text, columns, searchString, customSearch\n\n var prepare = {\n resetList: function () {\n list.i = 1\n list.templater.clear()\n customSearch = undefined\n },\n setOptions: function (args) {\n if (args.length == 2 && args[1] instanceof Array) {\n columns = args[1]\n } else if (args.length == 2 && typeof args[1] == 'function') {\n columns = undefined\n customSearch = args[1]\n } else if (args.length == 3) {\n columns = args[1]\n customSearch = args[2]\n } else {\n columns = undefined\n }\n },\n setColumns: function () {\n if (list.items.length === 0) return\n if (columns === undefined) {\n columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n }\n },\n setSearchString: function (s) {\n s = list.utils.toString(s).toLowerCase()\n s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n searchString = s\n },\n toArray: function (values) {\n var tmpColumn = []\n for (var name in values) {\n tmpColumn.push(name)\n }\n return tmpColumn\n },\n }\n var search = {\n list: function () {\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n search.item(list.items[k])\n }\n },\n item: function (item) {\n item.found = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (search.values(item.values(), columns[j])) {\n item.found = true\n return\n }\n }\n },\n values: function (values, column) {\n if (values.hasOwnProperty(column)) {\n text = list.utils.toString(values[column]).toLowerCase()\n if (searchString !== '' && text.search(searchString) > -1) {\n return true\n }\n }\n return false\n },\n reset: function () {\n list.reset.search()\n list.searched = false\n },\n }\n\n var searchMethod = function (str) {\n list.trigger('searchStart')\n\n prepare.resetList()\n prepare.setSearchString(str)\n prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n prepare.setColumns()\n\n if (searchString === '') {\n search.reset()\n } else {\n list.searched = true\n if (customSearch) {\n customSearch(searchString, columns)\n } else {\n search.list()\n }\n }\n\n list.update()\n list.trigger('searchComplete')\n return list.visibleItems\n }\n\n list.handlers.searchStart = list.handlers.searchStart || []\n list.handlers.searchComplete = list.handlers.searchComplete || []\n\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement, // IE have srcElement\n alreadyCleared = target.value === '' && !list.searched\n if (!alreadyCleared) {\n // If oninput already have resetted the list, do nothing\n searchMethod(target.value)\n }\n })\n\n // Used to detect click on HTML5 clear button\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n var target = e.target || e.srcElement\n if (target.value === '') {\n searchMethod('')\n }\n })\n\n return searchMethod\n}\n","module.exports = function (list) {\n var buttons = {\n els: undefined,\n clear: function () {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n list.utils.classes(buttons.els[i]).remove('asc')\n list.utils.classes(buttons.els[i]).remove('desc')\n }\n },\n getOrder: function (btn) {\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n return predefinedOrder\n } else if (list.utils.classes(btn).has('desc')) {\n return 'asc'\n } else if (list.utils.classes(btn).has('asc')) {\n return 'desc'\n } else {\n return 'asc'\n }\n },\n getInSensitive: function (btn, options) {\n var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n if (insensitive === 'false') {\n options.insensitive = false\n } else {\n options.insensitive = true\n }\n },\n setOrder: function (options) {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n var btn = buttons.els[i]\n if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n continue\n }\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n if (predefinedOrder == options.order) {\n list.utils.classes(btn).add(options.order)\n }\n } else {\n list.utils.classes(btn).add(options.order)\n }\n }\n },\n }\n\n var sort = function () {\n list.trigger('sortStart')\n var options = {}\n\n var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n if (target) {\n options.valueName = list.utils.getAttribute(target, 'data-sort')\n buttons.getInSensitive(target, options)\n options.order = buttons.getOrder(target)\n } else {\n options = arguments[1] || options\n options.valueName = arguments[0]\n options.order = options.order || 'asc'\n options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n }\n\n buttons.clear()\n buttons.setOrder(options)\n\n // caseInsensitive\n // alphabet\n var customSortFunction = options.sortFunction || list.sortFunction || null,\n multi = options.order === 'desc' ? -1 : 1,\n sortFunction\n\n if (customSortFunction) {\n sortFunction = function (itemA, itemB) {\n return customSortFunction(itemA, itemB, options) * multi\n }\n } else {\n sortFunction = function (itemA, itemB) {\n var sort = list.utils.naturalSort\n sort.alphabet = list.alphabet || options.alphabet || undefined\n if (!sort.alphabet && options.insensitive) {\n sort = list.utils.naturalSort.caseInsensitive\n }\n return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n }\n }\n\n list.items.sort(sortFunction)\n list.update()\n list.trigger('sortComplete')\n }\n\n // Add handlers\n list.handlers.sortStart = list.handlers.sortStart || []\n list.handlers.sortComplete = list.handlers.sortComplete || []\n\n buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n list.utils.events.bind(buttons.els, 'click', sort)\n list.on('searchStart', buttons.clear)\n list.on('filterStart', buttons.clear)\n\n return sort\n}\n","var Templater = function (list) {\n var itemSource,\n templater = this\n\n var init = function () {\n itemSource = templater.getItemSource(list.item)\n if (itemSource) {\n itemSource = templater.clearSourceItem(itemSource, list.valueNames)\n }\n }\n\n this.clearSourceItem = function (el, valueNames) {\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n el.setAttribute('data-' + valueNames[i].data[j], '')\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(el, valueNames[i].name, true)\n if (elm) {\n elm.setAttribute(valueNames[i].attr, '')\n }\n } else {\n elm = list.utils.getByClass(el, valueNames[i], true)\n if (elm) {\n elm.innerHTML = ''\n }\n }\n elm = undefined\n }\n return el\n }\n\n this.getItemSource = function (item) {\n if (item === undefined) {\n var nodes = list.list.childNodes,\n items = []\n\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n return nodes[i].cloneNode(true)\n }\n }\n } else if (/]/g.exec(item)) {\n var tbody = document.createElement('tbody')\n tbody.innerHTML = item\n return tbody.firstChild\n } else if (item.indexOf('<') !== -1) {\n var div = document.createElement('div')\n div.innerHTML = item\n return div.firstChild\n } else {\n var source = document.getElementById(list.item)\n if (source) {\n return source\n }\n }\n return undefined\n }\n\n this.get = function (item, valueNames) {\n templater.create(item)\n var values = {}\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm\n if (valueNames[i].data) {\n for (var j = 0, jl = valueNames[i].data.length; j < jl; j++) {\n values[valueNames[i].data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueNames[i].data[j])\n }\n } else if (valueNames[i].attr && valueNames[i].name) {\n elm = list.utils.getByClass(item.elm, valueNames[i].name, true)\n values[valueNames[i].name] = elm ? list.utils.getAttribute(elm, valueNames[i].attr) : ''\n } else {\n elm = list.utils.getByClass(item.elm, valueNames[i], true)\n values[valueNames[i]] = elm ? elm.innerHTML : ''\n }\n elm = undefined\n }\n return values\n }\n\n this.set = function (item, values) {\n var getValueName = function (name) {\n for (var i = 0, il = list.valueNames.length; i < il; i++) {\n if (list.valueNames[i].data) {\n var data = list.valueNames[i].data\n for (var j = 0, jl = data.length; j < jl; j++) {\n if (data[j] === name) {\n return { data: name }\n }\n }\n } else if (list.valueNames[i].attr && list.valueNames[i].name && list.valueNames[i].name == name) {\n return list.valueNames[i]\n } else if (list.valueNames[i] === name) {\n return name\n }\n }\n }\n var setValue = function (name, value) {\n var elm\n var valueName = getValueName(name)\n if (!valueName) return\n if (valueName.data) {\n item.elm.setAttribute('data-' + valueName.data, value)\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, value)\n }\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n if (elm) {\n elm.innerHTML = value\n }\n }\n elm = undefined\n }\n if (!templater.create(item)) {\n for (var v in values) {\n if (values.hasOwnProperty(v)) {\n setValue(v, values[v])\n }\n }\n }\n }\n\n this.create = function (item) {\n if (item.elm !== undefined) {\n return false\n }\n if (itemSource === undefined) {\n throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n }\n /* If item source does not exists, use the first item in list as\n source for new items */\n var newItem = itemSource.cloneNode(true)\n newItem.removeAttribute('id')\n item.elm = newItem\n templater.set(item, item.values())\n return true\n }\n this.remove = function (item) {\n if (item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.show = function (item) {\n templater.create(item)\n list.list.appendChild(item.elm)\n }\n this.hide = function (item) {\n if (item.elm !== undefined && item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.clear = function () {\n /* .innerHTML = ''; fucks up IE */\n if (list.list.hasChildNodes()) {\n while (list.list.childNodes.length >= 1) {\n list.list.removeChild(list.list.firstChild)\n }\n }\n }\n\n init()\n}\n\nmodule.exports = function (list) {\n return new Templater(list)\n}\n","/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required')\n }\n this.el = el\n this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n // classList\n if (this.list) {\n this.list.add(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (!~i) arr.push(name)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n // classList\n if (this.list) {\n this.list.remove(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (~i) arr.splice(i, 1)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n // classList\n if (this.list) {\n if ('undefined' !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name) // toggle again to correct\n }\n } else {\n this.list.toggle(name)\n }\n return this\n }\n\n // fallback\n if ('undefined' !== typeof force) {\n if (!force) {\n this.remove(name)\n } else {\n this.add(name)\n }\n } else {\n if (this.has(name)) {\n this.remove(name)\n } else {\n this.add(name)\n }\n }\n\n return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n var className = this.el.getAttribute('class') || ''\n var str = className.replace(/^\\s+|\\s+$/g, '')\n var arr = str.split(re)\n if ('' === arr[0]) arr.shift()\n return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n","var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n prefix = bind !== 'addEventListener' ? 'on' : '',\n toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][bind](prefix + type, fn, capture || false)\n }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function (el, type, fn, capture) {\n el = toArray(el)\n for (var i = 0; i < el.length; i++) {\n el[i][unbind](prefix + type, fn, capture || false)\n }\n}\n","/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1)\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; (source = args[i]); i++) {\n if (!source) continue\n for (var property in source) {\n object[property] = source[property]\n }\n }\n\n return object\n}\n","module.exports = function (text, pattern, options) {\n // Aproximately where in the text is the pattern expected to be found?\n var Match_Location = options.location || 0\n\n //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n var Match_Distance = options.distance || 100\n\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n var Match_Threshold = options.threshold || 0.4\n\n if (pattern === text) return true // Exact match\n if (pattern.length > 32) return false // This algorithm cannot be used\n\n // Set starting location at beginning text and initialise the alphabet.\n var loc = Match_Location,\n s = (function () {\n var q = {},\n i\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] = 0\n }\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n }\n\n return q\n })()\n\n // Compute and return the score for a match with e errors and x location.\n // Accesses loc and pattern through being a closure.\n\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length,\n proximity = Math.abs(loc - x)\n\n if (!Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n return accuracy + proximity / Match_Distance\n }\n\n var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1)\n best_loc = -1\n\n var bin_min, bin_mid\n var bin_max = pattern.length + text.length\n var last_rd\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0\n bin_mid = bin_max\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid\n } else {\n bin_max = bin_mid\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid\n var start = Math.max(1, loc - bin_mid + 1)\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n var rd = Array(finish + 2)\n rd[finish + 1] = (1 << d) - 1\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)]\n if (d === 0) {\n // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n } else {\n // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1)\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score\n best_loc = j - 1\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc)\n } else {\n // Already passed loc, downhill from here on in.\n break\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break\n }\n last_rd = rd\n }\n\n return best_loc < 0 ? false : true\n}\n","/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n var result = (el.getAttribute && el.getAttribute(attr)) || null\n if (!result) {\n var attrs = el.attributes\n var length = attrs.length\n for (var i = 0; i < length; i++) {\n if (attr[i] !== undefined) {\n if (attr[i].nodeName === attr) {\n result = attr[i].nodeValue\n }\n }\n }\n }\n return result\n}\n","/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n if (single) {\n return container.getElementsByClassName(className)[0]\n } else {\n return container.getElementsByClassName(className)\n }\n}\n\nvar querySelector = function (container, className, single) {\n className = '.' + className\n if (single) {\n return container.querySelector(className)\n } else {\n return container.querySelectorAll(className)\n }\n}\n\nvar polyfill = function (container, className, single) {\n var classElements = [],\n tag = '*'\n\n var els = container.getElementsByTagName(tag)\n var elsLen = els.length\n var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n for (var i = 0, j = 0; i < elsLen; i++) {\n if (pattern.test(els[i].className)) {\n if (single) {\n return els[i]\n } else {\n classElements[j] = els[i]\n j++\n }\n }\n }\n return classElements\n}\n\nmodule.exports = (function () {\n return function (container, className, single, options) {\n options = options || {}\n if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n return getElementsByClassName(container, className, single)\n } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n return querySelector(container, className, single)\n } else {\n return polyfill(container, className, single)\n }\n }\n})()\n","var indexOf = [].indexOf\n\nmodule.exports = function (arr, obj) {\n if (indexOf) return arr.indexOf(obj)\n for (var i = 0; i < arr.length; ++i) {\n if (arr[i] === obj) return i\n }\n return -1\n}\n","/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n if (typeof collection === 'undefined') return []\n if (collection === null) return [null]\n if (collection === window) return [window]\n if (typeof collection === 'string') return [collection]\n if (isArray(collection)) return collection\n if (typeof collection.length != 'number') return [collection]\n if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n var arr = []\n for (var i = 0; i < collection.length; i++) {\n if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n arr.push(collection[i])\n }\n }\n if (!arr.length) return []\n return arr\n}\n\nfunction isArray(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n","module.exports = function (s) {\n s = s === undefined ? '' : s\n s = s === null ? '' : s\n s = s.toString()\n return s\n}\n","'use strict';\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n var lengthA = (a += '').length;\n var lengthB = (b += '').length;\n var aIndex = 0;\n var bIndex = 0;\n\n while (aIndex < lengthA && bIndex < lengthB) {\n var charCodeA = a.charCodeAt(aIndex);\n var charCodeB = b.charCodeAt(bIndex);\n\n if (isNumberCode(charCodeA)) {\n if (!isNumberCode(charCodeB)) {\n return charCodeA - charCodeB;\n }\n\n var numStartA = aIndex;\n var numStartB = bIndex;\n\n while (charCodeA === 48 && ++numStartA < lengthA) {\n charCodeA = a.charCodeAt(numStartA);\n }\n while (charCodeB === 48 && ++numStartB < lengthB) {\n charCodeB = b.charCodeAt(numStartB);\n }\n\n var numEndA = numStartA;\n var numEndB = numStartB;\n\n while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n ++numEndA;\n }\n while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n ++numEndB;\n }\n\n var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n if (difference) {\n return difference;\n }\n\n while (numStartA < numEndA) {\n difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n if (difference) {\n return difference;\n }\n }\n\n aIndex = numEndA;\n bIndex = numEndB;\n continue;\n }\n\n if (charCodeA !== charCodeB) {\n if (\n charCodeA < alphabetIndexMapLength &&\n charCodeB < alphabetIndexMapLength &&\n alphabetIndexMap[charCodeA] !== -1 &&\n alphabetIndexMap[charCodeB] !== -1\n ) {\n return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n }\n\n return charCodeA - charCodeB;\n }\n\n ++aIndex;\n ++bIndex;\n }\n\n if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n return -1;\n }\n\n if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n return 1;\n }\n\n return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n alphabet: {\n get: function() {\n return alphabet;\n },\n\n set: function(value) {\n alphabet = value;\n alphabetIndexMap = [];\n\n var i = 0;\n\n if (alphabet) {\n for (; i < alphabet.length; i++) {\n alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n }\n }\n\n alphabetIndexMapLength = alphabetIndexMap.length;\n\n for (i = 0; i < alphabetIndexMapLength; i++) {\n if (alphabetIndexMap[i] === undefined) {\n alphabetIndexMap[i] = -1;\n }\n }\n },\n },\n});\n\nmodule.exports = naturalCompare;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/index.js\");\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AChBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AALA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAjCA;AAoCA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAYA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAzEA;AA4EA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAhBA;AACA;AAkBA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtQA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5DA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAQA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC9CA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AApCA;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AA3BA;AACA;AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3CA;AACA;AA6CA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;A;;;;;;;;;;;ACxGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5KA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;A;;;;;;;;;;;;;AClKA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtCA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClBA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file +{"version":3,"file":"list.js","sources":["webpack://List/./src/add-async.js","webpack://List/./src/filter.js","webpack://List/./src/fuzzy-search.js","webpack://List/./src/index.js","webpack://List/./src/item.js","webpack://List/./src/pagination.js","webpack://List/./src/parse.js","webpack://List/./src/search.js","webpack://List/./src/sort.js","webpack://List/./src/templater.js","webpack://List/./src/utils/classes.js","webpack://List/./src/utils/events.js","webpack://List/./src/utils/extend.js","webpack://List/./src/utils/fuzzy.js","webpack://List/./src/utils/get-attribute.js","webpack://List/./src/utils/get-by-class.js","webpack://List/./src/utils/index-of.js","webpack://List/./src/utils/to-array.js","webpack://List/./src/utils/to-string.js","webpack://List/./node_modules/string-natural-compare/natural-compare.js","webpack://List/webpack/bootstrap","webpack://List/webpack/startup"],"sourcesContent":["module.exports = function (list) {\n var addAsync = function (values, callback, items) {\n var valuesToAdd = values.splice(0, 50)\n items = items || []\n items = items.concat(list.add(valuesToAdd))\n if (values.length > 0) {\n setTimeout(function () {\n addAsync(values, callback, items)\n }, 1)\n } else {\n list.update()\n callback(items)\n }\n }\n return addAsync\n}\n","module.exports = function (list) {\n // Add handlers\n list.handlers.filterStart = list.handlers.filterStart || []\n list.handlers.filterComplete = list.handlers.filterComplete || []\n\n return function (filterFunction) {\n list.trigger('filterStart')\n list.i = 1 // Reset paging\n list.reset.filter()\n if (filterFunction === undefined) {\n list.filtered = false\n } else {\n list.filtered = true\n var is = list.items\n for (var i = 0, il = is.length; i < il; i++) {\n var item = is[i]\n if (filterFunction(item)) {\n item.filtered = true\n } else {\n item.filtered = false\n }\n }\n }\n list.update()\n list.trigger('filterComplete')\n return list.visibleItems\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n extend = require('./utils/extend'),\n toString = require('./utils/to-string'),\n getByClass = require('./utils/get-by-class'),\n fuzzy = require('./utils/fuzzy')\n\nmodule.exports = function (list, options) {\n options = options || {}\n\n options = extend(\n {\n location: 0,\n distance: 100,\n threshold: 0.4,\n multiSearch: true,\n searchClass: 'fuzzy-search',\n },\n options\n )\n\n var fuzzySearch = {\n search: function (searchString, columns) {\n // Substract arguments from the searchString or put searchString as only argument\n var searchArguments = options.multiSearch ? searchString.replace(/ +$/, '').split(/ +/) : [searchString]\n\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n fuzzySearch.item(list.items[k], columns, searchArguments)\n }\n },\n item: function (item, columns, searchArguments) {\n var found = true\n for (var i = 0; i < searchArguments.length; i++) {\n var foundArgument = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (fuzzySearch.values(item.values(), columns[j], searchArguments[i])) {\n foundArgument = true\n }\n }\n if (!foundArgument) {\n found = false\n }\n }\n item.found = found\n },\n values: function (values, value, searchArgument) {\n if (values.hasOwnProperty(value)) {\n var text = toString(values[value]).toLowerCase()\n\n if (fuzzy(text, searchArgument, options)) {\n return true\n }\n }\n return false\n },\n }\n\n events.bind(getByClass(list.listContainer, options.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement // IE have srcElement\n list.search(target.value, fuzzySearch.search)\n })\n\n return function (str, columns) {\n list.search(str, columns, fuzzySearch.search)\n }\n}\n","var naturalSort = require('string-natural-compare'),\n getByClass = require('./utils/get-by-class'),\n extend = require('./utils/extend'),\n indexOf = require('./utils/index-of'),\n events = require('./utils/events'),\n toString = require('./utils/to-string'),\n classes = require('./utils/classes'),\n getAttribute = require('./utils/get-attribute'),\n toArray = require('./utils/to-array')\n\nmodule.exports = function (id, options, values) {\n var self = this,\n init,\n Item = require('./item')(self),\n addAsync = require('./add-async')(self),\n initPagination = require('./pagination')(self)\n\n init = {\n start: function () {\n self.listClass = 'list'\n self.searchClass = 'search'\n self.sortClass = 'sort'\n self.page = 10000\n self.i = 1\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.searchColumns = undefined\n self.handlers = { updated: [] }\n self.valueNames = []\n self.utils = {\n getByClass: getByClass,\n extend: extend,\n indexOf: indexOf,\n events: events,\n toString: toString,\n naturalSort: naturalSort,\n classes: classes,\n getAttribute: getAttribute,\n toArray: toArray,\n }\n\n self.utils.extend(self, options)\n\n self.listContainer = typeof id === 'string' ? document.getElementById(id) : id\n if (!self.listContainer) {\n return\n }\n self.list = getByClass(self.listContainer, self.listClass, true)\n\n self.parse = require('./parse')(self)\n self.templater = require('./templater')(self)\n self.search = require('./search')(self)\n self.filter = require('./filter')(self)\n self.sort = require('./sort')(self)\n self.fuzzySearch = require('./fuzzy-search')(self, options.fuzzySearch)\n\n this.handlers()\n this.items()\n this.pagination()\n\n self.update()\n },\n handlers: function () {\n for (var handler in self.handlers) {\n if (self[handler] && self.handlers.hasOwnProperty(handler)) {\n self.on(handler, self[handler])\n }\n }\n },\n items: function () {\n self.parse(self.list)\n if (values !== undefined) {\n self.add(values)\n }\n },\n pagination: function () {\n if (options.pagination !== undefined) {\n if (options.pagination === true) {\n options.pagination = [{}]\n }\n if (options.pagination[0] === undefined) {\n options.pagination = [options.pagination]\n }\n for (var i = 0, il = options.pagination.length; i < il; i++) {\n initPagination(options.pagination[i])\n }\n }\n },\n }\n\n /*\n * Re-parse the List, use if html have changed\n */\n this.reIndex = function () {\n self.items = []\n self.visibleItems = []\n self.matchingItems = []\n self.searched = false\n self.filtered = false\n self.parse(self.list)\n }\n\n this.toJSON = function () {\n var json = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n json.push(self.items[i].values())\n }\n return json\n }\n\n /*\n * Add object to list\n */\n this.add = function (values, callback) {\n if (values.length === 0) {\n return\n }\n if (callback) {\n addAsync(values.slice(0), callback)\n return\n }\n var added = [],\n notCreate = false\n if (values[0] === undefined) {\n values = [values]\n }\n for (var i = 0, il = values.length; i < il; i++) {\n var item = null\n notCreate = self.items.length > self.page ? true : false\n item = new Item(values[i], undefined, notCreate)\n self.items.push(item)\n added.push(item)\n }\n self.update()\n return added\n }\n\n this.show = function (i, page) {\n this.i = i\n this.page = page\n self.update()\n return self\n }\n\n /* Removes object from list.\n * Loops through the list and removes objects where\n * property \"valuename\" === value\n */\n this.remove = function (valueName, value, options) {\n var found = 0\n for (var i = 0, il = self.items.length; i < il; i++) {\n if (self.items[i].values()[valueName] == value) {\n self.templater.remove(self.items[i], options)\n self.items.splice(i, 1)\n il--\n i--\n found++\n }\n }\n self.update()\n return found\n }\n\n /* Gets the objects in the list which\n * property \"valueName\" === value\n */\n this.get = function (valueName, value) {\n var matchedItems = []\n for (var i = 0, il = self.items.length; i < il; i++) {\n var item = self.items[i]\n if (item.values()[valueName] == value) {\n matchedItems.push(item)\n }\n }\n return matchedItems\n }\n\n /*\n * Get size of the list\n */\n this.size = function () {\n return self.items.length\n }\n\n /*\n * Removes all items from the list\n */\n this.clear = function () {\n self.templater.clear()\n self.items = []\n return self\n }\n\n this.on = function (event, callback) {\n self.handlers[event].push(callback)\n return self\n }\n\n this.off = function (event, callback) {\n var e = self.handlers[event]\n var index = indexOf(e, callback)\n if (index > -1) {\n e.splice(index, 1)\n }\n return self\n }\n\n this.trigger = function (event) {\n var i = self.handlers[event].length\n while (i--) {\n self.handlers[event][i](self)\n }\n return self\n }\n\n this.reset = {\n filter: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].filtered = false\n }\n return self\n },\n search: function () {\n var is = self.items,\n il = is.length\n while (il--) {\n is[il].found = false\n }\n return self\n },\n }\n\n this.update = function () {\n var is = self.items,\n il = is.length\n\n self.visibleItems = []\n self.matchingItems = []\n self.templater.clear()\n for (var i = 0; i < il; i++) {\n if (is[i].matching() && self.matchingItems.length + 1 >= self.i && self.visibleItems.length < self.page) {\n is[i].show()\n self.visibleItems.push(is[i])\n self.matchingItems.push(is[i])\n } else if (is[i].matching()) {\n self.matchingItems.push(is[i])\n is[i].hide()\n } else {\n is[i].hide()\n }\n }\n self.trigger('updated')\n return self\n }\n\n init.start()\n}\n","module.exports = function (list) {\n return function (initValues, element, notCreate) {\n var item = this\n\n this._values = {}\n\n this.found = false // Show if list.searched == true and this.found == true\n this.filtered = false // Show if list.filtered == true and this.filtered == true\n\n var init = function (initValues, element, notCreate) {\n if (element === undefined) {\n if (notCreate) {\n item.values(initValues, notCreate)\n } else {\n item.values(initValues)\n }\n } else {\n item.elm = element\n var values = list.templater.get(item, initValues)\n item.values(values)\n }\n }\n\n this.values = function (newValues, notCreate) {\n if (newValues !== undefined) {\n for (var name in newValues) {\n item._values[name] = newValues[name]\n }\n if (notCreate !== true) {\n list.templater.set(item, item.values())\n }\n } else {\n return item._values\n }\n }\n\n this.show = function () {\n list.templater.show(item)\n }\n\n this.hide = function () {\n list.templater.hide(item)\n }\n\n this.matching = function () {\n return (\n (list.filtered && list.searched && item.found && item.filtered) ||\n (list.filtered && !list.searched && item.filtered) ||\n (!list.filtered && list.searched && item.found) ||\n (!list.filtered && !list.searched)\n )\n }\n\n this.visible = function () {\n return item.elm && item.elm.parentNode == list.list ? true : false\n }\n\n init(initValues, element, notCreate)\n }\n}\n","var classes = require('./utils/classes'),\n events = require('./utils/events'),\n List = require('./index')\n\nmodule.exports = function (list) {\n var isHidden = false\n\n var refresh = function (pagingList, options) {\n if (list.page < 1) {\n list.listContainer.style.display = 'none'\n isHidden = true\n return\n } else if (isHidden) {\n list.listContainer.style.display = 'block'\n }\n\n var item,\n l = list.matchingItems.length,\n index = list.i,\n page = list.page,\n pages = Math.ceil(l / page),\n currentPage = Math.ceil(index / page),\n innerWindow = options.innerWindow || 2,\n left = options.left || options.outerWindow || 0,\n right = options.right || options.outerWindow || 0\n\n right = pages - right\n pagingList.clear()\n for (var i = 1; i <= pages; i++) {\n var className = currentPage === i ? 'active' : ''\n\n //console.log(i, left, right, currentPage, (currentPage - innerWindow), (currentPage + innerWindow), className);\n\n if (is.number(i, left, right, currentPage, innerWindow)) {\n item = pagingList.add({\n page: i,\n dotted: false,\n })[0]\n if (className) {\n classes(item.elm).add(className)\n }\n item.elm.firstChild.setAttribute('data-i', i)\n item.elm.firstChild.setAttribute('data-page', page)\n } else if (is.dotted(pagingList, i, left, right, currentPage, innerWindow, pagingList.size())) {\n item = pagingList.add({\n page: '...',\n dotted: true,\n })[0]\n classes(item.elm).add('disabled')\n }\n }\n }\n\n var is = {\n number: function (i, left, right, currentPage, innerWindow) {\n return this.left(i, left) || this.right(i, right) || this.innerWindow(i, currentPage, innerWindow)\n },\n left: function (i, left) {\n return i <= left\n },\n right: function (i, right) {\n return i > right\n },\n innerWindow: function (i, currentPage, innerWindow) {\n return i >= currentPage - innerWindow && i <= currentPage + innerWindow\n },\n dotted: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n return (\n this.dottedLeft(pagingList, i, left, right, currentPage, innerWindow) ||\n this.dottedRight(pagingList, i, left, right, currentPage, innerWindow, currentPageItem)\n )\n },\n dottedLeft: function (pagingList, i, left, right, currentPage, innerWindow) {\n return i == left + 1 && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n },\n dottedRight: function (pagingList, i, left, right, currentPage, innerWindow, currentPageItem) {\n if (pagingList.items[currentPageItem - 1].values().dotted) {\n return false\n } else {\n return i == right && !this.innerWindow(i, currentPage, innerWindow) && !this.right(i, right)\n }\n },\n }\n\n return function (options) {\n var pagingList = new List(list.listContainer.id, {\n listClass: options.paginationClass || 'pagination',\n item: options.item || \"
                                                • \",\n valueNames: ['page', 'dotted'],\n searchClass: 'pagination-search-that-is-not-supposed-to-exist',\n sortClass: 'pagination-sort-that-is-not-supposed-to-exist',\n })\n\n events.bind(pagingList.listContainer, 'click', function (e) {\n var target = e.target || e.srcElement,\n page = list.utils.getAttribute(target, 'data-page'),\n i = list.utils.getAttribute(target, 'data-i')\n if (i) {\n list.show((i - 1) * page + 1, page)\n }\n })\n\n list.on('updated', function () {\n refresh(pagingList, options)\n })\n refresh(pagingList, options)\n }\n}\n","module.exports = function (list) {\n var Item = require('./item')(list)\n\n var getChildren = function (parent) {\n var nodes = parent.childNodes,\n items = []\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n items.push(nodes[i])\n }\n }\n return items\n }\n\n var parse = function (itemElements, valueNames) {\n for (var i = 0, il = itemElements.length; i < il; i++) {\n list.items.push(new Item(valueNames, itemElements[i]))\n }\n }\n var parseAsync = function (itemElements, valueNames) {\n var itemsToIndex = itemElements.splice(0, 50) // TODO: If < 100 items, what happens in IE etc?\n parse(itemsToIndex, valueNames)\n if (itemElements.length > 0) {\n setTimeout(function () {\n parseAsync(itemElements, valueNames)\n }, 1)\n } else {\n list.update()\n list.trigger('parseComplete')\n }\n }\n\n list.handlers.parseComplete = list.handlers.parseComplete || []\n\n return function () {\n var itemsToIndex = getChildren(list.list),\n valueNames = list.valueNames\n\n if (list.indexAsync) {\n parseAsync(itemsToIndex, valueNames)\n } else {\n parse(itemsToIndex, valueNames)\n }\n }\n}\n","module.exports = function (list) {\n var item, text, columns, searchString, customSearch\n\n var prepare = {\n resetList: function () {\n list.i = 1\n list.templater.clear()\n customSearch = undefined\n },\n setOptions: function (args) {\n if (args.length == 2 && args[1] instanceof Array) {\n columns = args[1]\n } else if (args.length == 2 && typeof args[1] == 'function') {\n columns = undefined\n customSearch = args[1]\n } else if (args.length == 3) {\n columns = args[1]\n customSearch = args[2]\n } else {\n columns = undefined\n }\n },\n setColumns: function () {\n if (list.items.length === 0) return\n if (columns === undefined) {\n columns = list.searchColumns === undefined ? prepare.toArray(list.items[0].values()) : list.searchColumns\n }\n },\n setSearchString: function (s) {\n s = list.utils.toString(s).toLowerCase()\n s = s.replace(/[-[\\]{}()*+?.,\\\\^$|#]/g, '\\\\$&') // Escape regular expression characters\n searchString = s\n },\n toArray: function (values) {\n var tmpColumn = []\n for (var name in values) {\n tmpColumn.push(name)\n }\n return tmpColumn\n },\n }\n var search = {\n list: function () {\n for (var k = 0, kl = list.items.length; k < kl; k++) {\n search.item(list.items[k])\n }\n },\n item: function (item) {\n item.found = false\n for (var j = 0, jl = columns.length; j < jl; j++) {\n if (search.values(item.values(), columns[j])) {\n item.found = true\n return\n }\n }\n },\n values: function (values, column) {\n if (values.hasOwnProperty(column)) {\n text = list.utils.toString(values[column]).toLowerCase()\n if (searchString !== '' && text.search(searchString) > -1) {\n return true\n }\n }\n return false\n },\n reset: function () {\n list.reset.search()\n list.searched = false\n },\n }\n\n var searchMethod = function (str) {\n list.trigger('searchStart')\n\n prepare.resetList()\n prepare.setSearchString(str)\n prepare.setOptions(arguments) // str, cols|searchFunction, searchFunction\n prepare.setColumns()\n\n if (searchString === '') {\n search.reset()\n } else {\n list.searched = true\n if (customSearch) {\n customSearch(searchString, columns)\n } else {\n search.list()\n }\n }\n\n list.update()\n list.trigger('searchComplete')\n return list.visibleItems\n }\n\n list.handlers.searchStart = list.handlers.searchStart || []\n list.handlers.searchComplete = list.handlers.searchComplete || []\n\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'keyup', function (e) {\n var target = e.target || e.srcElement, // IE have srcElement\n alreadyCleared = target.value === '' && !list.searched\n if (!alreadyCleared) {\n // If oninput already have resetted the list, do nothing\n searchMethod(target.value)\n }\n })\n\n // Used to detect click on HTML5 clear button\n list.utils.events.bind(list.utils.getByClass(list.listContainer, list.searchClass), 'input', function (e) {\n var target = e.target || e.srcElement\n if (target.value === '') {\n searchMethod('')\n }\n })\n\n return searchMethod\n}\n","module.exports = function (list) {\n var buttons = {\n els: undefined,\n clear: function () {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n list.utils.classes(buttons.els[i]).remove('asc')\n list.utils.classes(buttons.els[i]).remove('desc')\n }\n },\n getOrder: function (btn) {\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n return predefinedOrder\n } else if (list.utils.classes(btn).has('desc')) {\n return 'asc'\n } else if (list.utils.classes(btn).has('asc')) {\n return 'desc'\n } else {\n return 'asc'\n }\n },\n getInSensitive: function (btn, options) {\n var insensitive = list.utils.getAttribute(btn, 'data-insensitive')\n if (insensitive === 'false') {\n options.insensitive = false\n } else {\n options.insensitive = true\n }\n },\n setOrder: function (options) {\n for (var i = 0, il = buttons.els.length; i < il; i++) {\n var btn = buttons.els[i]\n if (list.utils.getAttribute(btn, 'data-sort') !== options.valueName) {\n continue\n }\n var predefinedOrder = list.utils.getAttribute(btn, 'data-order')\n if (predefinedOrder == 'asc' || predefinedOrder == 'desc') {\n if (predefinedOrder == options.order) {\n list.utils.classes(btn).add(options.order)\n }\n } else {\n list.utils.classes(btn).add(options.order)\n }\n }\n },\n }\n\n var sort = function () {\n list.trigger('sortStart')\n var options = {}\n\n var target = arguments[0].currentTarget || arguments[0].srcElement || undefined\n\n if (target) {\n options.valueName = list.utils.getAttribute(target, 'data-sort')\n buttons.getInSensitive(target, options)\n options.order = buttons.getOrder(target)\n } else {\n options = arguments[1] || options\n options.valueName = arguments[0]\n options.order = options.order || 'asc'\n options.insensitive = typeof options.insensitive == 'undefined' ? true : options.insensitive\n }\n\n buttons.clear()\n buttons.setOrder(options)\n\n // caseInsensitive\n // alphabet\n var customSortFunction = options.sortFunction || list.sortFunction || null,\n multi = options.order === 'desc' ? -1 : 1,\n sortFunction\n\n if (customSortFunction) {\n sortFunction = function (itemA, itemB) {\n return customSortFunction(itemA, itemB, options) * multi\n }\n } else {\n sortFunction = function (itemA, itemB) {\n var sort = list.utils.naturalSort\n sort.alphabet = list.alphabet || options.alphabet || undefined\n if (!sort.alphabet && options.insensitive) {\n sort = list.utils.naturalSort.caseInsensitive\n }\n return sort(itemA.values()[options.valueName], itemB.values()[options.valueName]) * multi\n }\n }\n\n list.items.sort(sortFunction)\n list.update()\n list.trigger('sortComplete')\n }\n\n // Add handlers\n list.handlers.sortStart = list.handlers.sortStart || []\n list.handlers.sortComplete = list.handlers.sortComplete || []\n\n buttons.els = list.utils.getByClass(list.listContainer, list.sortClass)\n list.utils.events.bind(buttons.els, 'click', sort)\n list.on('searchStart', buttons.clear)\n list.on('filterStart', buttons.clear)\n\n return sort\n}\n","var Templater = function (list) {\n var createItem,\n templater = this\n\n var init = function () {\n var itemSource\n\n if (typeof list.item === 'function') {\n createItem = function (values) {\n var item = list.item(values)\n return getItemSource(item)\n }\n return\n }\n\n if (typeof list.item === 'string') {\n if (list.item.indexOf('<') === -1) {\n itemSource = document.getElementById(list.item)\n } else {\n itemSource = getItemSource(list.item)\n }\n } else {\n /* If item source does not exists, use the first item in list as\n source for new items */\n itemSource = getFirstListItem()\n }\n\n if (!itemSource) {\n throw new Error(\"The list needs to have at least one item on init otherwise you'll have to add a template.\")\n }\n\n itemSource = createCleanTemplateItem(itemSource, list.valueNames)\n\n createItem = function () {\n return itemSource.cloneNode(true)\n }\n }\n\n var createCleanTemplateItem = function (templateNode, valueNames) {\n var el = templateNode.cloneNode(true)\n el.removeAttribute('id')\n\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm = undefined,\n valueName = valueNames[i]\n if (valueName.data) {\n for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n el.setAttribute('data-' + valueName.data[j], '')\n }\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(el, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, '')\n }\n } else {\n elm = list.utils.getByClass(el, valueName, true)\n if (elm) {\n elm.innerHTML = ''\n }\n }\n }\n return el\n }\n\n var getFirstListItem = function () {\n var nodes = list.list.childNodes\n\n for (var i = 0, il = nodes.length; i < il; i++) {\n // Only textnodes have a data attribute\n if (nodes[i].data === undefined) {\n return nodes[i].cloneNode(true)\n }\n }\n return undefined\n }\n\n var getItemSource = function (itemHTML) {\n if (typeof itemHTML !== 'string') return undefined\n if (/]/g.exec(itemHTML)) {\n var tbody = document.createElement('tbody')\n tbody.innerHTML = itemHTML\n return tbody.firstElementChild\n } else if (itemHTML.indexOf('<') !== -1) {\n var div = document.createElement('div')\n div.innerHTML = itemHTML\n return div.firstElementChild\n }\n return undefined\n }\n\n var getValueName = function (name) {\n for (var i = 0, il = list.valueNames.length; i < il; i++) {\n var valueName = list.valueNames[i]\n if (valueName.data) {\n var data = valueName.data\n for (var j = 0, jl = data.length; j < jl; j++) {\n if (data[j] === name) {\n return { data: name }\n }\n }\n } else if (valueName.attr && valueName.name && valueName.name == name) {\n return valueName\n } else if (valueName === name) {\n return name\n }\n }\n }\n\n var setValue = function (item, name, value) {\n var elm = undefined,\n valueName = getValueName(name)\n if (!valueName) return\n if (valueName.data) {\n item.elm.setAttribute('data-' + valueName.data, value)\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n if (elm) {\n elm.setAttribute(valueName.attr, value)\n }\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n if (elm) {\n elm.innerHTML = value\n }\n }\n }\n\n this.get = function (item, valueNames) {\n templater.create(item)\n var values = {}\n for (var i = 0, il = valueNames.length; i < il; i++) {\n var elm = undefined,\n valueName = valueNames[i]\n if (valueName.data) {\n for (var j = 0, jl = valueName.data.length; j < jl; j++) {\n values[valueName.data[j]] = list.utils.getAttribute(item.elm, 'data-' + valueName.data[j])\n }\n } else if (valueName.attr && valueName.name) {\n elm = list.utils.getByClass(item.elm, valueName.name, true)\n values[valueName.name] = elm ? list.utils.getAttribute(elm, valueName.attr) : ''\n } else {\n elm = list.utils.getByClass(item.elm, valueName, true)\n values[valueName] = elm ? elm.innerHTML : ''\n }\n }\n return values\n }\n\n this.set = function (item, values) {\n if (!templater.create(item)) {\n for (var v in values) {\n if (values.hasOwnProperty(v)) {\n setValue(item, v, values[v])\n }\n }\n }\n }\n\n this.create = function (item) {\n if (item.elm !== undefined) {\n return false\n }\n item.elm = createItem(item.values())\n templater.set(item, item.values())\n return true\n }\n this.remove = function (item) {\n if (item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.show = function (item) {\n templater.create(item)\n list.list.appendChild(item.elm)\n }\n this.hide = function (item) {\n if (item.elm !== undefined && item.elm.parentNode === list.list) {\n list.list.removeChild(item.elm)\n }\n }\n this.clear = function () {\n /* .innerHTML = ''; fucks up IE */\n if (list.list.hasChildNodes()) {\n while (list.list.childNodes.length >= 1) {\n list.list.removeChild(list.list.firstChild)\n }\n }\n }\n\n init()\n}\n\nmodule.exports = function (list) {\n return new Templater(list)\n}\n","/**\n * Module dependencies.\n */\n\nvar index = require('./index-of')\n\n/**\n * Whitespace regexp.\n */\n\nvar re = /\\s+/\n\n/**\n * toString reference.\n */\n\nvar toString = Object.prototype.toString\n\n/**\n * Wrap `el` in a `ClassList`.\n *\n * @param {Element} el\n * @return {ClassList}\n * @api public\n */\n\nmodule.exports = function (el) {\n return new ClassList(el)\n}\n\n/**\n * Initialize a new ClassList for `el`.\n *\n * @param {Element} el\n * @api private\n */\n\nfunction ClassList(el) {\n if (!el || !el.nodeType) {\n throw new Error('A DOM element reference is required')\n }\n this.el = el\n this.list = el.classList\n}\n\n/**\n * Add class `name` if not already present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.add = function (name) {\n // classList\n if (this.list) {\n this.list.add(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (!~i) arr.push(name)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Remove class `name` when present, or\n * pass a regular expression to remove\n * any which match.\n *\n * @param {String|RegExp} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.remove = function (name) {\n // classList\n if (this.list) {\n this.list.remove(name)\n return this\n }\n\n // fallback\n var arr = this.array()\n var i = index(arr, name)\n if (~i) arr.splice(i, 1)\n this.el.className = arr.join(' ')\n return this\n}\n\n/**\n * Toggle class `name`, can force state via `force`.\n *\n * For browsers that support classList, but do not support `force` yet,\n * the mistake will be detected and corrected.\n *\n * @param {String} name\n * @param {Boolean} force\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.toggle = function (name, force) {\n // classList\n if (this.list) {\n if ('undefined' !== typeof force) {\n if (force !== this.list.toggle(name, force)) {\n this.list.toggle(name) // toggle again to correct\n }\n } else {\n this.list.toggle(name)\n }\n return this\n }\n\n // fallback\n if ('undefined' !== typeof force) {\n if (!force) {\n this.remove(name)\n } else {\n this.add(name)\n }\n } else {\n if (this.has(name)) {\n this.remove(name)\n } else {\n this.add(name)\n }\n }\n\n return this\n}\n\n/**\n * Return an array of classes.\n *\n * @return {Array}\n * @api public\n */\n\nClassList.prototype.array = function () {\n var className = this.el.getAttribute('class') || ''\n var str = className.replace(/^\\s+|\\s+$/g, '')\n var arr = str.split(re)\n if ('' === arr[0]) arr.shift()\n return arr\n}\n\n/**\n * Check if class `name` is present.\n *\n * @param {String} name\n * @return {ClassList}\n * @api public\n */\n\nClassList.prototype.has = ClassList.prototype.contains = function (name) {\n return this.list ? this.list.contains(name) : !!~index(this.array(), name)\n}\n","var bind = window.addEventListener ? 'addEventListener' : 'attachEvent',\n unbind = window.removeEventListener ? 'removeEventListener' : 'detachEvent',\n prefix = bind !== 'addEventListener' ? 'on' : '',\n toArray = require('./to-array')\n\n/**\n * Bind `el` event `type` to `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.bind = function(el, type, fn, capture){\n el = toArray(el);\n for ( var i = 0, il = el.length; i < il; i++ ) {\n el[i][bind](prefix + type, fn, capture || false);\n }\n}\n\n/**\n * Unbind `el` event `type`'s callback `fn`.\n *\n * @param {Element} el, NodeList, HTMLCollection or Array\n * @param {String} type\n * @param {Function} fn\n * @param {Boolean} capture\n * @api public\n */\n\nexports.unbind = function(el, type, fn, capture){\n el = toArray(el);\n for ( var i = 0, il = el.length; i < il; i++ ) {\n el[i][unbind](prefix + type, fn, capture || false);\n }\n}\n","/*\n * Source: https://github.com/segmentio/extend\n */\n\nmodule.exports = function extend(object) {\n // Takes an unlimited number of extenders.\n var args = Array.prototype.slice.call(arguments, 1)\n\n // For each extender, copy their properties on our object.\n for (var i = 0, source; (source = args[i]); i++) {\n if (!source) continue\n for (var property in source) {\n object[property] = source[property]\n }\n }\n\n return object\n}\n","module.exports = function (text, pattern, options) {\n // Aproximately where in the text is the pattern expected to be found?\n var Match_Location = options.location || 0\n\n //Determines how close the match must be to the fuzzy location (specified above). An exact letter match which is 'distance' characters away from the fuzzy location would score as a complete mismatch. A distance of '0' requires the match be at the exact location specified, a threshold of '1000' would require a perfect match to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n var Match_Distance = options.distance || 100\n\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match (of both letters and location), a threshold of '1.0' would match anything.\n var Match_Threshold = options.threshold || 0.4\n\n if (pattern === text) return true // Exact match\n if (pattern.length > 32) return false // This algorithm cannot be used\n\n // Set starting location at beginning text and initialise the alphabet.\n var loc = Match_Location,\n s = (function () {\n var q = {},\n i\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] = 0\n }\n\n for (i = 0; i < pattern.length; i++) {\n q[pattern.charAt(i)] |= 1 << (pattern.length - i - 1)\n }\n\n return q\n })()\n\n // Compute and return the score for a match with e errors and x location.\n // Accesses loc and pattern through being a closure.\n\n function match_bitapScore_(e, x) {\n var accuracy = e / pattern.length,\n proximity = Math.abs(loc - x)\n\n if (!Match_Distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n return accuracy + proximity / Match_Distance\n }\n\n var score_threshold = Match_Threshold, // Highest score beyond which we give up.\n best_loc = text.indexOf(pattern, loc) // Is there a nearby exact match? (speedup)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n // What about in the other direction? (speedup)\n best_loc = text.lastIndexOf(pattern, loc + pattern.length)\n\n if (best_loc != -1) {\n score_threshold = Math.min(match_bitapScore_(0, best_loc), score_threshold)\n }\n }\n\n // Initialise the bit arrays.\n var matchmask = 1 << (pattern.length - 1)\n best_loc = -1\n\n var bin_min, bin_mid\n var bin_max = pattern.length + text.length\n var last_rd\n for (var d = 0; d < pattern.length; d++) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from 'loc' we can stray at this\n // error level.\n bin_min = 0\n bin_mid = bin_max\n while (bin_min < bin_mid) {\n if (match_bitapScore_(d, loc + bin_mid) <= score_threshold) {\n bin_min = bin_mid\n } else {\n bin_max = bin_mid\n }\n bin_mid = Math.floor((bin_max - bin_min) / 2 + bin_min)\n }\n // Use the result from this iteration as the maximum for the next.\n bin_max = bin_mid\n var start = Math.max(1, loc - bin_mid + 1)\n var finish = Math.min(loc + bin_mid, text.length) + pattern.length\n\n var rd = Array(finish + 2)\n rd[finish + 1] = (1 << d) - 1\n for (var j = finish; j >= start; j--) {\n // The alphabet (s) is a sparse hash, so the following line generates\n // warnings.\n var charMatch = s[text.charAt(j - 1)]\n if (d === 0) {\n // First pass: exact match.\n rd[j] = ((rd[j + 1] << 1) | 1) & charMatch\n } else {\n // Subsequent passes: fuzzy match.\n rd[j] = (((rd[j + 1] << 1) | 1) & charMatch) | (((last_rd[j + 1] | last_rd[j]) << 1) | 1) | last_rd[j + 1]\n }\n if (rd[j] & matchmask) {\n var score = match_bitapScore_(d, j - 1)\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (score <= score_threshold) {\n // Told you so.\n score_threshold = score\n best_loc = j - 1\n if (best_loc > loc) {\n // When passing loc, don't exceed our current distance from loc.\n start = Math.max(1, 2 * loc - best_loc)\n } else {\n // Already passed loc, downhill from here on in.\n break\n }\n }\n }\n }\n // No hope for a (better) match at greater error levels.\n if (match_bitapScore_(d + 1, loc) > score_threshold) {\n break\n }\n last_rd = rd\n }\n\n return best_loc < 0 ? false : true\n}\n","/**\n * A cross-browser implementation of getAttribute.\n * Source found here: http://stackoverflow.com/a/3755343/361337 written by Vivin Paliath\n *\n * Return the value for `attr` at `element`.\n *\n * @param {Element} el\n * @param {String} attr\n * @api public\n */\n\nmodule.exports = function (el, attr) {\n var result = (el.getAttribute && el.getAttribute(attr)) || null\n if (!result) {\n var attrs = el.attributes\n var length = attrs.length\n for (var i = 0; i < length; i++) {\n if (attrs[i] !== undefined) {\n if (attrs[i].nodeName === attr) {\n result = attrs[i].nodeValue\n }\n }\n }\n }\n return result\n}\n","/**\n * A cross-browser implementation of getElementsByClass.\n * Heavily based on Dustin Diaz's function: http://dustindiaz.com/getelementsbyclass.\n *\n * Find all elements with class `className` inside `container`.\n * Use `single = true` to increase performance in older browsers\n * when only one element is needed.\n *\n * @param {String} className\n * @param {Element} container\n * @param {Boolean} single\n * @api public\n */\n\nvar getElementsByClassName = function (container, className, single) {\n if (single) {\n return container.getElementsByClassName(className)[0]\n } else {\n return container.getElementsByClassName(className)\n }\n}\n\nvar querySelector = function (container, className, single) {\n className = '.' + className\n if (single) {\n return container.querySelector(className)\n } else {\n return container.querySelectorAll(className)\n }\n}\n\nvar polyfill = function (container, className, single) {\n var classElements = [],\n tag = '*'\n\n var els = container.getElementsByTagName(tag)\n var elsLen = els.length\n var pattern = new RegExp('(^|\\\\s)' + className + '(\\\\s|$)')\n for (var i = 0, j = 0; i < elsLen; i++) {\n if (pattern.test(els[i].className)) {\n if (single) {\n return els[i]\n } else {\n classElements[j] = els[i]\n j++\n }\n }\n }\n return classElements\n}\n\nmodule.exports = (function () {\n return function (container, className, single, options) {\n options = options || {}\n if ((options.test && options.getElementsByClassName) || (!options.test && document.getElementsByClassName)) {\n return getElementsByClassName(container, className, single)\n } else if ((options.test && options.querySelector) || (!options.test && document.querySelector)) {\n return querySelector(container, className, single)\n } else {\n return polyfill(container, className, single)\n }\n }\n})()\n","var indexOf = [].indexOf\n\nmodule.exports = function(arr, obj){\n if (indexOf) return arr.indexOf(obj);\n for (var i = 0, il = arr.length; i < il; ++i) {\n if (arr[i] === obj) return i;\n }\n return -1\n}\n","/**\n * Source: https://github.com/timoxley/to-array\n *\n * Convert an array-like object into an `Array`.\n * If `collection` is already an `Array`, then will return a clone of `collection`.\n *\n * @param {Array | Mixed} collection An `Array` or array-like object to convert e.g. `arguments` or `NodeList`\n * @return {Array} Naive conversion of `collection` to a new `Array`.\n * @api public\n */\n\nmodule.exports = function toArray(collection) {\n if (typeof collection === 'undefined') return []\n if (collection === null) return [null]\n if (collection === window) return [window]\n if (typeof collection === 'string') return [collection]\n if (isArray(collection)) return collection\n if (typeof collection.length != 'number') return [collection]\n if (typeof collection === 'function' && collection instanceof Function) return [collection]\n\n var arr = [];\n for (var i = 0, il = collection.length; i < il; i++) {\n if (Object.prototype.hasOwnProperty.call(collection, i) || i in collection) {\n arr.push(collection[i])\n }\n }\n if (!arr.length) return []\n return arr\n}\n\nfunction isArray(arr) {\n return Object.prototype.toString.call(arr) === '[object Array]'\n}\n","module.exports = function (s) {\n s = s === undefined ? '' : s\n s = s === null ? '' : s\n s = s.toString()\n return s\n}\n","'use strict';\n\nvar alphabet;\nvar alphabetIndexMap;\nvar alphabetIndexMapLength = 0;\n\nfunction isNumberCode(code) {\n return code >= 48 && code <= 57;\n}\n\nfunction naturalCompare(a, b) {\n var lengthA = (a += '').length;\n var lengthB = (b += '').length;\n var aIndex = 0;\n var bIndex = 0;\n\n while (aIndex < lengthA && bIndex < lengthB) {\n var charCodeA = a.charCodeAt(aIndex);\n var charCodeB = b.charCodeAt(bIndex);\n\n if (isNumberCode(charCodeA)) {\n if (!isNumberCode(charCodeB)) {\n return charCodeA - charCodeB;\n }\n\n var numStartA = aIndex;\n var numStartB = bIndex;\n\n while (charCodeA === 48 && ++numStartA < lengthA) {\n charCodeA = a.charCodeAt(numStartA);\n }\n while (charCodeB === 48 && ++numStartB < lengthB) {\n charCodeB = b.charCodeAt(numStartB);\n }\n\n var numEndA = numStartA;\n var numEndB = numStartB;\n\n while (numEndA < lengthA && isNumberCode(a.charCodeAt(numEndA))) {\n ++numEndA;\n }\n while (numEndB < lengthB && isNumberCode(b.charCodeAt(numEndB))) {\n ++numEndB;\n }\n\n var difference = numEndA - numStartA - numEndB + numStartB; // numA length - numB length\n if (difference) {\n return difference;\n }\n\n while (numStartA < numEndA) {\n difference = a.charCodeAt(numStartA++) - b.charCodeAt(numStartB++);\n if (difference) {\n return difference;\n }\n }\n\n aIndex = numEndA;\n bIndex = numEndB;\n continue;\n }\n\n if (charCodeA !== charCodeB) {\n if (\n charCodeA < alphabetIndexMapLength &&\n charCodeB < alphabetIndexMapLength &&\n alphabetIndexMap[charCodeA] !== -1 &&\n alphabetIndexMap[charCodeB] !== -1\n ) {\n return alphabetIndexMap[charCodeA] - alphabetIndexMap[charCodeB];\n }\n\n return charCodeA - charCodeB;\n }\n\n ++aIndex;\n ++bIndex;\n }\n\n if (aIndex >= lengthA && bIndex < lengthB && lengthA >= lengthB) {\n return -1;\n }\n\n if (bIndex >= lengthB && aIndex < lengthA && lengthB >= lengthA) {\n return 1;\n }\n\n return lengthA - lengthB;\n}\n\nnaturalCompare.caseInsensitive = naturalCompare.i = function(a, b) {\n return naturalCompare(('' + a).toLowerCase(), ('' + b).toLowerCase());\n};\n\nObject.defineProperties(naturalCompare, {\n alphabet: {\n get: function() {\n return alphabet;\n },\n\n set: function(value) {\n alphabet = value;\n alphabetIndexMap = [];\n\n var i = 0;\n\n if (alphabet) {\n for (; i < alphabet.length; i++) {\n alphabetIndexMap[alphabet.charCodeAt(i)] = i;\n }\n }\n\n alphabetIndexMapLength = alphabetIndexMap.length;\n\n for (i = 0; i < alphabetIndexMapLength; i++) {\n if (alphabetIndexMap[i] === undefined) {\n alphabetIndexMap[i] = -1;\n }\n }\n },\n },\n});\n\nmodule.exports = naturalCompare;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// module exports must be returned from runtime so entry inlining is disabled\n// startup\n// Load entry module and return exports\nreturn __webpack_require__(\"./src/index.js\");\n"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AChBA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AAMA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AALA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAjCA;AAoCA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClEA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AASA;AACA;AAAA;AAAA;AAAA;AAAA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAYA;AAEA;AACA;AAAA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAzEA;AA4EA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAhBA;AACA;AAkBA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtQA;AACA;AACA;AAEA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5DA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AACA;AACA;AAAA;AACA;AACA;AAGA;AACA;AACA;AACA;AAFA;AACA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA5BA;AA+BA;AACA;AACA;AACA;AACA;AACA;AACA;AALA;AAQA;AACA;AAAA;AAAA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC5GA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC9CA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AApCA;AAsCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AA3BA;AACA;AA6BA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACrHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA3CA;AACA;AA6CA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAAA;AAAA;AAAA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;A;;;;;;;;;;;ACxGA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACnMA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;A;;;;;;;;;;;;;AClKA;AAAA;AAAA;AAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACtCA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AClBA;AACA;AACA;AACA;AAEA;AACA;AAEA;AAEA;AACA;AAAA;AAEA;AACA;AAAA;AAAA;AAEA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAAA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;AC/DA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AAAA;AACA;AACA;A;;;;;;;;;;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A;;;;AC7HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;;A","sourceRoot":""} \ No newline at end of file diff --git a/dist/list.min.js b/dist/list.min.js index 5b987547..bcc8d465 100644 --- a/dist/list.min.js +++ b/dist/list.min.js @@ -1,2 +1,2 @@ -var List;List=function(){var t={"./src/add-async.js":function(t){t.exports=function(t){return function e(r,s,n){var i=r.splice(0,50);n=(n=n||[]).concat(t.add(i)),r.length>0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                                • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new g(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}m(t.slice(0),e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:e.item||"
                                                • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(t)){var e=document.createElement("tbody");return e.innerHTML=t,e.firstElementChild}if(-1!==t.indexOf("<")){var r=document.createElement("div");return r.innerHTML=t,r.firstElementChild}}},a=function(e,r,s){var n=void 0,i=function(e){for(var r=0,s=t.valueNames.length;r=1;)t.list.removeChild(t.list.firstChild)},function(){var r;if("function"!=typeof t.item){if(!(r="string"==typeof t.item?-1===t.item.indexOf("<")?document.getElementById(t.item):i(t.item):n()))throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");r=s(r,t.valueNames),e=function(){return r.cloneNode(!0)}}else e=function(e){var r=t.item(e);return i(r)}}()};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){for(var o=0,l=(t=a(t)).length;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(C[b]=0===m?(C[b+1]<<1|1)&j:(C[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],C[b]&h){var x=l(m,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(m+1,a)>u)break;v=C}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes,n=s.length,i=0;i=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new m(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}g(t,e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:"
                                                • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(e)){var i=document.createElement("tbody");return i.innerHTML=e,i.firstChild}if(-1!==e.indexOf("<")){var a=document.createElement("div");return a.innerHTML=e,a.firstChild}var o=document.getElementById(t.item);if(o)return o}},this.get=function(e,s){r.create(e);for(var n={},i=0,a=s.length;i=1;)t.list.removeChild(t.list.firstChild)},(e=r.getItemSource(t.item))&&(e=r.clearSourceItem(e,t.valueNames))};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){t=a(t);for(var o=0;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(y[b]=0===g?(y[b+1]<<1|1)&j:(y[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],y[b]&h){var x=l(g,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(g+1,a)>u)break;v=y}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes.length,n=0;n=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n0?setTimeout((function(){e(r,s,n)}),1):(t.update(),s(n))}}},"./src/filter.js":function(t){t.exports=function(t){return t.handlers.filterStart=t.handlers.filterStart||[],t.handlers.filterComplete=t.handlers.filterComplete||[],function(e){if(t.trigger("filterStart"),t.i=1,t.reset.filter(),void 0===e)t.filtered=!1;else{t.filtered=!0;for(var r=t.items,s=0,n=r.length;sv.page,a=new g(t[n],void 0,s),v.items.push(a),r.push(a)}return v.update(),r}m(t.slice(0),e)}},this.show=function(t,e){return this.i=t,this.page=e,v.update(),v},this.remove=function(t,e,r){for(var s=0,n=0,i=v.items.length;n-1&&r.splice(s,1),v},this.trigger=function(t){for(var e=v.handlers[t].length;e--;)v.handlers[t][e](v);return v},this.reset={filter:function(){for(var t=v.items,e=t.length;e--;)t[e].filtered=!1;return v},search:function(){for(var t=v.items,e=t.length;e--;)t[e].found=!1;return v}},this.update=function(){var t=v.items,e=t.length;v.visibleItems=[],v.matchingItems=[],v.templater.clear();for(var r=0;r=v.i&&v.visibleItems.lengthe},innerWindow:function(t,e,r){return t>=e-r&&t<=e+r},dotted:function(t,e,r,s,n,i,a){return this.dottedLeft(t,e,r,s,n,i)||this.dottedRight(t,e,r,s,n,i,a)},dottedLeft:function(t,e,r,s,n,i){return e==r+1&&!this.innerWindow(e,n,i)&&!this.right(e,s)},dottedRight:function(t,e,r,s,n,i,a){return!t.items[a-1].values().dotted&&(e==s&&!this.innerWindow(e,n,i)&&!this.right(e,s))}};return function(e){var s=new i(t.listContainer.id,{listClass:e.paginationClass||"pagination",item:e.item||"
                                                • ",valueNames:["page","dotted"],searchClass:"pagination-search-that-is-not-supposed-to-exist",sortClass:"pagination-sort-that-is-not-supposed-to-exist"});n.bind(s.listContainer,"click",(function(e){var r=e.target||e.srcElement,s=t.utils.getAttribute(r,"data-page"),n=t.utils.getAttribute(r,"data-i");n&&t.show((n-1)*s+1,s)})),t.on("updated",(function(){r(s,e)})),r(s,e)}}},"./src/parse.js":function(t,e,r){t.exports=function(t){var e=r("./src/item.js")(t),s=function(r,s){for(var n=0,i=r.length;n0?setTimeout((function(){e(r,n)}),1):(t.update(),t.trigger("parseComplete"))};return t.handlers.parseComplete=t.handlers.parseComplete||[],function(){var e=function(t){for(var e=t.childNodes,r=[],s=0,n=e.length;s-1))},reset:function(){t.reset.search(),t.searched=!1}},o=function(e){return t.trigger("searchStart"),i.resetList(),i.setSearchString(e),i.setOptions(arguments),i.setColumns(),""===s?a.reset():(t.searched=!0,n?n(s,r):a.list()),t.update(),t.trigger("searchComplete"),t.visibleItems};return t.handlers.searchStart=t.handlers.searchStart||[],t.handlers.searchComplete=t.handlers.searchComplete||[],t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"keyup",(function(e){var r=e.target||e.srcElement;""===r.value&&!t.searched||o(r.value)})),t.utils.events.bind(t.utils.getByClass(t.listContainer,t.searchClass),"input",(function(t){""===(t.target||t.srcElement).value&&o("")})),o}},"./src/sort.js":function(t){t.exports=function(t){var e={els:void 0,clear:function(){for(var r=0,s=e.els.length;r]/g.exec(t)){var e=document.createElement("tbody");return e.innerHTML=t,e.firstElementChild}if(-1!==t.indexOf("<")){var r=document.createElement("div");return r.innerHTML=t,r.firstElementChild}}},a=function(e,r,s){var n=void 0,i=function(e){for(var r=0,s=t.valueNames.length;r=1;)t.list.removeChild(t.list.firstChild)},function(){var r;if("function"!=typeof t.item){if(!(r="string"==typeof t.item?-1===t.item.indexOf("<")?document.getElementById(t.item):i(t.item):n()))throw new Error("The list needs to have at least one item on init otherwise you'll have to add a template.");r=s(r,t.valueNames),e=function(){return r.cloneNode(!0)}}else e=function(e){var r=t.item(e);return i(r)}}()};t.exports=function(t){return new e(t)}},"./src/utils/classes.js":function(t,e,r){var s=r("./src/utils/index-of.js"),n=/\s+/;Object.prototype.toString;function i(t){if(!t||!t.nodeType)throw new Error("A DOM element reference is required");this.el=t,this.list=t.classList}t.exports=function(t){return new i(t)},i.prototype.add=function(t){if(this.list)return this.list.add(t),this;var e=this.array();return~s(e,t)||e.push(t),this.el.className=e.join(" "),this},i.prototype.remove=function(t){if(this.list)return this.list.remove(t),this;var e=this.array(),r=s(e,t);return~r&&e.splice(r,1),this.el.className=e.join(" "),this},i.prototype.toggle=function(t,e){return this.list?(void 0!==e?e!==this.list.toggle(t,e)&&this.list.toggle(t):this.list.toggle(t),this):(void 0!==e?e?this.add(t):this.remove(t):this.has(t)?this.remove(t):this.add(t),this)},i.prototype.array=function(){var t=(this.el.getAttribute("class")||"").replace(/^\s+|\s+$/g,"").split(n);return""===t[0]&&t.shift(),t},i.prototype.has=i.prototype.contains=function(t){return this.list?this.list.contains(t):!!~s(this.array(),t)}},"./src/utils/events.js":function(t,e,r){var s=window.addEventListener?"addEventListener":"attachEvent",n=window.removeEventListener?"removeEventListener":"detachEvent",i="addEventListener"!==s?"on":"",a=r("./src/utils/to-array.js");e.bind=function(t,e,r,n){for(var o=0,l=(t=a(t)).length;o32)return!1;var a=s,o=function(){var t,r={};for(t=0;t=p;b--){var j=o[t.charAt(b-1)];if(C[b]=0===m?(C[b+1]<<1|1)&j:(C[b+1]<<1|1)&j|(v[b+1]|v[b])<<1|1|v[b+1],C[b]&h){var x=l(m,b-1);if(x<=u){if(u=x,!((c=b-1)>a))break;p=Math.max(1,2*a-c)}}}if(l(m+1,a)>u)break;v=C}return!(c<0)}},"./src/utils/get-attribute.js":function(t){t.exports=function(t,e){var r=t.getAttribute&&t.getAttribute(e)||null;if(!r)for(var s=t.attributes,n=s.length,i=0;i=48&&t<=57}function i(t,e){for(var i=(t+="").length,a=(e+="").length,o=0,l=0;o=i&&l=a?-1:l>=a&&o=i?1:i-a}i.caseInsensitive=i.i=function(t,e){return i((""+t).toLowerCase(),(""+e).toLowerCase())},Object.defineProperties(i,{alphabet:{get:function(){return e},set:function(t){r=[];var n=0;if(e=t)for(;n Date: Sat, 21 Nov 2020 23:07:29 +0100 Subject: [PATCH 221/246] pkg.json update --- docs/_data/pkg.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/_data/pkg.json b/docs/_data/pkg.json index 0d7b58ca..ddf8dadb 100644 --- a/docs/_data/pkg.json +++ b/docs/_data/pkg.json @@ -1,6 +1,6 @@ { "name": "list.js", - "version": "2.0.0", + "version": "2.1.0", "description": "The perfect library for lists. Supports search, sort, filters and flexibility. Built to be invisible and work on existing HTML", "keywords": [ "list", @@ -52,7 +52,8 @@ { "basePath": "/dist/", "files": [ - "*.js" + "*.js", + "*.js.map" ] } ], From f6f701385ba5426b07842328d396f58d569d21f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonny=20Str=C3=B6mberg?= Date: Sat, 21 Nov 2020 23:07:47 +0100 Subject: [PATCH 222/246] Update release info --- Release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release.md b/Release.md index 664b7b4a..518b2385 100644 --- a/Release.md +++ b/Release.md @@ -1,5 +1,5 @@ # RELEASE -1. `npm release patch|minor|major` (depending on what kind of release it is) +1. `npm version patch|minor|major` (depending on what kind of release it is) 2. `npm publish` 3. Update links in README.md with new version number From 846645318fc5dd772bcd78150b630eaa3d7004e4 Mon Sep 17 00:00:00 2001 From: Raphael Boidol Date: Sun, 22 Nov 2020 16:13:38 +0100 Subject: [PATCH 223/246] Use `https` links throughout --- CHANGELOG.md | 6 +-- README.md | 40 +++++++++---------- docs/_config.yml | 2 +- docs/_examples/add-get-remove.html | 2 +- .../data-attributes-custom-attributes.html | 2 +- docs/_examples/existing-list-add.html | 2 +- docs/_examples/existing-list.html | 2 +- docs/_examples/fuzzy-search.html | 2 +- docs/_examples/new-list.html | 2 +- docs/_examples/pagination.html | 2 +- docs/_examples/table.html | 2 +- docs/_includes/author.html | 2 +- docs/_layouts/default.html | 4 +- docs/docs/plugins/fuzzysearch.html | 2 +- docs/docs/plugins/pagination.html | 2 +- docs/index.html | 6 +-- docs/overview/download.html | 4 +- docs/overview/index.html | 2 +- docs/overview/press.html | 22 +++++----- 19 files changed, 54 insertions(+), 54 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4ec6ba8..41dd9649 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -80,7 +80,7 @@ and I'm very sorry that it has taken so long. I promise I'll do better in the fu Anyways, this release introduces a bunch of bug fixes and improvements, but most importantly: List.js now has support for data attributes PLUS all other attributes. -[See an example]() and [read the docs](http://www.listjs.com/docs#example-6). +[See an example]() and [read the docs](https://www.listjs.com/docs#example-6). Another noteworthy update is that I've left Component and moved back all utils to the core lib. Instead I'm using Browserify as module handler. @@ -99,7 +99,7 @@ I hope you'll like this update! [See commit →](https://github.com/javve/list.js/commit/618565b203b61c34b868a9cb86eea899e75ea4b6) - **[Breaking]** Rename list.helpers to list.utils [See commit →](https://github.com/javve/list.js/commit/58695c93849b78787d9cf78cbf9be20b01cdcc8a) -- **[Feature]** Add support for data attributes and custom attributes ex. links and images. [See docs](http://listjs.com/). +- **[Feature]** Add support for data attributes and custom attributes ex. links and images. [See docs](https://listjs.com/). [See commit →](https://github.com/javve/list.js/commit/a8e083dc0f642e90b7a3f3cc11b12f9bb353d3a0) - **[Feature]** Add toJSON method. [See commit →](https://github.com/javve/list.js/commit/570fd10e65fcf2e0d3d959ca42137625d9fd3b7c) @@ -157,7 +157,7 @@ I hope you'll like this update! - **[Feature]** Add support for Component.js, Bower, RequireJS and CommonJS - **[Feature]** Make it possible to remove event handlers by `.off('event', handler)` - **[Improvement]** Many new tests -- **[Improvement]** Paging plugin default classes and structure now correspons to Twitter Bootstraps pagination. +- **[Improvement]** Paging plugin default classes and structure now correspons to Twitter Bootstraps pagination. - **[Improvement]** Make sorting case-insensitive (thanks @thomasklemm) - **[Improvement]** Add item.\_values for direct access to a items values. Simplifies debugging. Note: Always use item.values() when interacting with the values. - **[Bugfix]** `.add(items, callbak)` with `callback` set does no longer add an extra item. diff --git a/README.md b/README.md index 9ca519a5..c6ee6c30 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,10 @@ Really simple and easy to use! ### Features - Works both lists, tables and almost anything else. E.g. `
                                                  `,`
                                                    `,``, etc. -- Search [Read more ›](http://listjs.com/docs/list-api#search) -- Sort [Read more ›](http://listjs.com/docs/list-api#sort) -- Filter [Read more ›](http://listjs.com/docs/list-api#filter) -- Simple templating system that adds possibility to add, edit, remove items [Read more ›](http://listjs.com/docs/list-api#add) +- Search [Read more ›](https://listjs.com/docs/list-api#search) +- Sort [Read more ›](https://listjs.com/docs/list-api#sort) +- Filter [Read more ›](https://listjs.com/docs/list-api#filter) +- Simple templating system that adds possibility to add, edit, remove items [Read more ›](https://listjs.com/docs/list-api#add) - Support for Chrome, Safari, Firefox, IE9+ ### Download / Install @@ -59,32 +59,32 @@ https://stackoverflow.com/questions/tagged/list.js ### Demo / Examples -- [Existing list](http://listjs.com/examples/existing-list) -- [Existing list + add](http://listjs.com/examples/existing-list-add) -- [New list](http://listjs.com/examples/new-list) -- [Add, get, remove](http://listjs.com/examples/add-get-remove) -- [Fuzzy search](http://listjs.com/examples/fuzzy-search) -- [Pagination](http://listjs.com/examples/pagination) -- [Search in specific column](http://codepen.io/javve/pen/GpZpow) -- [Filter in range](http://codepen.io/javve/pen/wKGKWL) -- [Show message filter/search results in 0 items](http://codepen.io/javve/pen/VvavzG) -- [Only show list after search/filter](http://codepen.io/javve/pen/YyqyRg) +- [Existing list](https://listjs.com/examples/existing-list) +- [Existing list + add](https://listjs.com/examples/existing-list-add) +- [New list](https://listjs.com/examples/new-list) +- [Add, get, remove](https://listjs.com/examples/add-get-remove) +- [Fuzzy search](https://listjs.com/examples/fuzzy-search) +- [Pagination](https://listjs.com/examples/pagination) +- [Search in specific column](https://codepen.io/javve/pen/GpZpow) +- [Filter in range](https://codepen.io/javve/pen/wKGKWL) +- [Show message filter/search results in 0 items](https://codepen.io/javve/pen/VvavzG) +- [Only show list after search/filter](https://codepen.io/javve/pen/YyqyRg) ## Documentation -- [Getting started](http://listjs.com/docs) -- [Options](http://listjs.com/docs/options) -- [List API](http://listjs.com/docs/list-api) -- [Item API](http://listjs.com/docs/item-api) +- [Getting started](https://listjs.com/docs) +- [Options](https://listjs.com/docs/options) +- [List API](https://listjs.com/docs/list-api) +- [Item API](https://listjs.com/docs/item-api) - [Changelog](https://github.com/javve/list.js/blob/master/CHANGELOG.md) ### Thanks to [all lovely contributors](https://github.com/javve/list.js/graphs/contributors)! Want to join them? -- Read more at [listjs.com/overview/contribute](http://listjs.com/overview/contribute) +- Read more at [listjs.com/overview/contribute](https://listjs.com/overview/contribute) ### Creator -| | Jonny Strömberg [@javve](http://twitter.com/javve) | +| | Jonny Strömberg [@javve](https://twitter.com/javve) | | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ![Image of Jonny](http://1.gravatar.com/avatar/9f8130715cb4c452f1294eafa1b36290?size=80) | I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on [Twitter](http://twitter.com/javve) for news and [donate a coffee](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=M7ZGHV75VSD2E) for good karma ;) | diff --git a/docs/_config.yml b/docs/_config.yml index b0128eef..302b3c25 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -4,7 +4,7 @@ description: > # this means to ignore newlines until "baseurl:" Perfect library for adding search, sort, filters and flexibility to tables, lists and various HTML elements. Built to be invisible and work on existing HTML. baseurl: "" # the subpath of your site, e.g. /blog -url: "http://listjs.com" # the base hostname & protocol for your site +url: "https://listjs.com" # the base hostname & protocol for your site twitter_username: javve github_username: javve diff --git a/docs/_examples/add-get-remove.html b/docs/_examples/add-get-remove.html index 25ca93a5..d764b4b5 100644 --- a/docs/_examples/add-get-remove.html +++ b/docs/_examples/add-get-remove.html @@ -2,7 +2,7 @@ layout: default name: Add, get, remove title: Example to showcase the add, get and remove methods. -url: http://codepen.io/javve/pen/cLdfw +url: https://codepen.io/javve/pen/cLdfw slug: cLdfw --- diff --git a/docs/_examples/data-attributes-custom-attributes.html b/docs/_examples/data-attributes-custom-attributes.html index 1d90f38c..22e1628f 100644 --- a/docs/_examples/data-attributes-custom-attributes.html +++ b/docs/_examples/data-attributes-custom-attributes.html @@ -1,6 +1,6 @@ --- layout: default -url: http://codepen.io/javve/pen/GZREaN +url: https://codepen.io/javve/pen/GZREaN slug: GZREaN title: Use data attributes and other custom attributes as keys name: Data attributes + custom diff --git a/docs/_examples/existing-list-add.html b/docs/_examples/existing-list-add.html index ac646d67..46bc9e83 100644 --- a/docs/_examples/existing-list-add.html +++ b/docs/_examples/existing-list-add.html @@ -1,6 +1,6 @@ --- layout: default -url: http://codepen.io/javve/pen/lAmCz +url: https://codepen.io/javve/pen/lAmCz slug: lAmCz title: Existing list and add items name: Existing list and add diff --git a/docs/_examples/existing-list.html b/docs/_examples/existing-list.html index 43204ad6..34adca62 100644 --- a/docs/_examples/existing-list.html +++ b/docs/_examples/existing-list.html @@ -1,6 +1,6 @@ --- layout: default -url: http://codepen.io/javve/pen/zpuKF +url: https://codepen.io/javve/pen/zpuKF slug: zpuKF title: Basic example with existing list name: Existing list diff --git a/docs/_examples/fuzzy-search.html b/docs/_examples/fuzzy-search.html index f25871c9..dc654f59 100644 --- a/docs/_examples/fuzzy-search.html +++ b/docs/_examples/fuzzy-search.html @@ -2,7 +2,7 @@ layout: default name: Fuzzy search title: Example of how to use the fuzzy search plugin -url: http://codepen.io/javve/pen/isInl +url: https://codepen.io/javve/pen/isInl slug: isInl --- diff --git a/docs/_examples/new-list.html b/docs/_examples/new-list.html index ee3f9bc0..990f5c58 100644 --- a/docs/_examples/new-list.html +++ b/docs/_examples/new-list.html @@ -1,6 +1,6 @@ --- layout: default -url: http://codepen.io/javve/pen/yroGq +url: https://codepen.io/javve/pen/yroGq slug: yroGq title: Basic example with a new list name: New list diff --git a/docs/_examples/pagination.html b/docs/_examples/pagination.html index 9fbcbeb6..35e4144f 100644 --- a/docs/_examples/pagination.html +++ b/docs/_examples/pagination.html @@ -2,7 +2,7 @@ layout: default name: Pagination title: Example of how to use the pagination plugin -url: http://codepen.io/javve/pen/bBfgD +url: https://codepen.io/javve/pen/bBfgD slug: bBfgD --- diff --git a/docs/_examples/table.html b/docs/_examples/table.html index e6ec1186..fc759145 100644 --- a/docs/_examples/table.html +++ b/docs/_examples/table.html @@ -1,6 +1,6 @@ --- layout: default -url: http://codepen.io/javve/pen/oEezp +url: https://codepen.io/javve/pen/oEezp slug: oEezp title: Example of how to use a table with List.js name: Table diff --git a/docs/_includes/author.html b/docs/_includes/author.html index 77f3d928..ee139f67 100644 --- a/docs/_includes/author.html +++ b/docs/_includes/author.html @@ -7,7 +7,7 @@

                                                    Hi! I'm Jonny and the author of List.js.

                                                    I hope you like the lib. I’ve put a lot of hours into it! Feel free to follow me on Twitter and GitHub for news and donate a coffee for good karma ;)

                                                    - + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index d3b7eb0a..b030ec6a 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -59,7 +59,7 @@ @@ -76,7 +76,7 @@