From f7c9828a137578672c83f3eb7f340abb652bc043 Mon Sep 17 00:00:00 2001 From: aureooms Date: Thu, 2 Oct 2014 22:54:37 +0200 Subject: [PATCH 01/15] Generated documentation for a46d39bc04a75986e76051eaec9fceee9a9fb776 --- .gitignore | 31 ++++ assets/behavior.js | 394 +++++++++++++++++++++++++++++++++++++++++++++ assets/style.css | 1 + index.html | 7 + 4 files changed, 433 insertions(+) create mode 100644 .gitignore create mode 100644 assets/behavior.js create mode 100644 assets/style.css create mode 100644 index.html diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f0e82e --- /dev/null +++ b/.gitignore @@ -0,0 +1,31 @@ +# Logs +logs +*.log + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directory +# Commenting this out is preferred by some people, see +# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- +node_modules + +# Users Environment Variables +.lock-wscript + +# groc +doc diff --git a/assets/behavior.js b/assets/behavior.js new file mode 100644 index 0000000..ee1fc7f --- /dev/null +++ b/assets/behavior.js @@ -0,0 +1,394 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);(function() { + var MAX_FILTER_SIZE, appendSearchNode, buildNav, buildTOCNode, clearFilter, clearHighlight, currentNode$, currentQuery, fileMap, focusCurrentNode, highlightMatch, moveCurrentNode, nav$, searchNodes, searchableNodes, selectNode, selectNodeByDocumentPath, setCurrentNodeExpanded, setTableOfContentsActive, tableOfContents, toc$, toggleTableOfContents, visitCurrentNode; + + tableOfContents = [ + { + "type": "file", + "data": { + "language": { + "nameMatchers": [".md", ".markdown", ".mkd", ".mkdn", ".mdown"], + "commentsOnly": true, + "name": "Markdown" + }, + "sourcePath": "/home/genius/dev/js/js-random/README.md", + "projectPath": "README.md", + "targetPath": "index", + "pageTitle": "index", + "title": "index" + }, + "depth": 1, + "outline": [] + } + ]; + + nav$ = null; + + toc$ = null; + + setTableOfContentsActive = function(active) { + var html$; + html$ = $('html'); + if (active) { + nav$.addClass('active'); + return html$.addClass('popped'); + } else { + nav$.removeClass('active'); + return html$.removeClass('popped'); + } + }; + + toggleTableOfContents = function() { + return setTableOfContentsActive(!nav$.hasClass('active')); + }; + + currentNode$ = null; + + focusCurrentNode = function() { + var currentNodeBottom, currentNodeTop; + currentNodeTop = currentNode$.offset().top - toc$.children(':visible').first().offset().top; + currentNodeBottom = currentNodeTop + currentNode$.children('.label').height(); + if (currentNodeTop < toc$.scrollTop()) { + toc$.scrollTop(currentNodeTop); + } + if (currentNodeBottom > toc$.scrollTop() + toc$.height()) { + return toc$.scrollTop(currentNodeBottom - toc$.height()); + } + }; + + setCurrentNodeExpanded = function(expanded) { + var parents$; + if (expanded) { + currentNode$.addClass('expanded'); + } else { + if (currentNode$.hasClass('expanded')) { + currentNode$.removeClass('expanded'); + } else { + parents$ = currentNode$.parents('li'); + if (parents$.length > 0) { + selectNode(parents$.first()); + } + } + } + return focusCurrentNode(); + }; + + selectNode = function(newNode$) { + currentNode$.removeClass('selected'); + newNode$.addClass('selected'); + currentNode$ = newNode$; + return focusCurrentNode(); + }; + + selectNodeByDocumentPath = function(documentPath, headerSlug) { + var link, urlChunks, _i, _len, _ref; + if (headerSlug == null) { + headerSlug = null; + } + currentNode$ = fileMap[documentPath]; + if (headerSlug) { + _ref = currentNode$.find('.outline a'); + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + link = _ref[_i]; + urlChunks = $(link).attr('href').split('#'); + if (urlChunks[1] === headerSlug) { + currentNode$ = $(link).parents('li').first(); + break; + } + } + } + currentNode$.addClass('selected expanded'); + currentNode$.parents('li').addClass('expanded'); + return focusCurrentNode(); + }; + + moveCurrentNode = function(up) { + var i, newIndex, node, visibleNodes$, _i, _len; + visibleNodes$ = toc$.find('li:visible:not(.filtered)'); + newIndex = 0; + for (i = _i = 0, _len = visibleNodes$.length; _i < _len; i = ++_i) { + node = visibleNodes$[i]; + if (node === currentNode$[0]) { + newIndex = up ? i - 1 : i + 1; + if (newIndex < 0) { + newIndex = 0; + } + if (newIndex > visibleNodes$.length - 1) { + newIndex = visibleNodes$.length - 1; + } + break; + } + } + return selectNode($(visibleNodes$[newIndex])); + }; + + visitCurrentNode = function() { + var labelLink$; + labelLink$ = currentNode$.children('a.label'); + if (labelLink$.length > 0) { + return window.location = labelLink$.attr('href'); + } + }; + + MAX_FILTER_SIZE = 10; + + searchableNodes = []; + + appendSearchNode = function(node$) { + var text$; + text$ = node$.find('> .label .text'); + return searchableNodes.push([text$.text().toLowerCase(), node$, text$]); + }; + + currentQuery = ''; + + searchNodes = function(queryString) { + var c, filtered, matched, matcher, nodeInfo, p, _i, _j, _k, _len, _len1, _len2, _results; + queryString = queryString.toLowerCase().replace(/\s+/, ''); + if (queryString === currentQuery) { + return; + } + currentQuery = queryString; + if (queryString === '') { + return clearFilter(); + } + matcher = new RegExp(((function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = queryString.length; _i < _len; _i++) { + c = queryString[_i]; + _results.push(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/, "\\$&")); + } + return _results; + })()).join('.*')); + matched = []; + filtered = []; + for (_i = 0, _len = searchableNodes.length; _i < _len; _i++) { + nodeInfo = searchableNodes[_i]; + if (matcher.test(nodeInfo[0])) { + matched.push(nodeInfo); + } else { + filtered.push(nodeInfo); + } + } + if (matched.length > MAX_FILTER_SIZE) { + return clearFilter(); + } + nav$.addClass('searching'); + for (_j = 0, _len1 = filtered.length; _j < _len1; _j++) { + nodeInfo = filtered[_j]; + nodeInfo[1].removeClass('matched-child'); + nodeInfo[1].addClass('filtered'); + clearHighlight(nodeInfo[2]); + } + _results = []; + for (_k = 0, _len2 = matched.length; _k < _len2; _k++) { + nodeInfo = matched[_k]; + nodeInfo[1].removeClass('filtered matched-child'); + nodeInfo[1].addClass('matched'); + highlightMatch(nodeInfo[2], queryString); + _results.push((function() { + var _l, _len3, _ref, _results1; + _ref = nodeInfo[1].parents('li'); + _results1 = []; + for (_l = 0, _len3 = _ref.length; _l < _len3; _l++) { + p = _ref[_l]; + _results1.push($(p).addClass('matched-child')); + } + return _results1; + })()); + } + return _results; + }; + + clearFilter = function() { + var nodeInfo, _i, _len, _results; + nav$.removeClass('searching'); + currentQuery = ''; + _results = []; + for (_i = 0, _len = searchableNodes.length; _i < _len; _i++) { + nodeInfo = searchableNodes[_i]; + nodeInfo[1].removeClass('filtered matched-child'); + _results.push(clearHighlight(nodeInfo[2])); + } + return _results; + }; + + highlightMatch = function(text$, queryString) { + var char, foundIndex, furthestIndex, lowerText, markedText, nodeText, _i, _len; + nodeText = text$.text(); + lowerText = nodeText.toLowerCase(); + markedText = ''; + furthestIndex = 0; + for (_i = 0, _len = queryString.length; _i < _len; _i++) { + char = queryString[_i]; + foundIndex = lowerText.indexOf(char, furthestIndex); + markedText += nodeText.slice(furthestIndex, foundIndex) + ("" + nodeText[foundIndex] + ""); + furthestIndex = foundIndex + 1; + } + return text$.html(markedText + nodeText.slice(furthestIndex)); + }; + + clearHighlight = function(text$) { + return text$.text(text$.text()); + }; + + fileMap = {}; + + buildNav = function(metaInfo) { + var node, sourceURL, _i, _len; + nav$ = $("
\n").appendTo($('body')); + toc$ = nav$.find('.toc'); + if (metaInfo.githubURL) { + if (metaInfo.documentPath === 'index') { + sourceURL = metaInfo.githubURL; + } else { + sourceURL = "" + metaInfo.githubURL + "/blob/master/" + metaInfo.projectPath; + } + nav$.find('.tools').prepend("
  • \n \n View source on GitHub\n \n
  • "); + } + for (_i = 0, _len = tableOfContents.length; _i < _len; _i++) { + node = tableOfContents[_i]; + toc$.append(buildTOCNode(node, metaInfo)); + } + return nav$; + }; + + buildTOCNode = function(node, metaInfo) { + var c, children$, clickLabel, discloser, discloser$, label$, node$, _i, _len, _ref, _ref1, _ref2; + node$ = $("
  • "); + discloser = null; + switch (node.type) { + case 'file': + node$.append("" + node.data.title + ""); + clickLabel = function(evt) { + if (evt.target === discloser) { + node$.toggleClass('expanded'); + evt.preventDefault(); + return false; + } + return selectNode(node$); + }; + break; + case 'folder': + node$.append("" + node.data.title + ""); + clickLabel = function(evt) { + selectNode(node$); + node$.toggleClass('expanded'); + evt.preventDefault(); + return false; + }; + } + if (((_ref = node.children) != null ? _ref.length : void 0) > 0) { + children$ = $('
      '); + _ref1 = node.children; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + c = _ref1[_i]; + children$.append(buildTOCNode(c, metaInfo)); + } + node$.append(children$); + } + label$ = node$.find('> .label'); + label$.click(clickLabel); + discloser$ = $('').prependTo(label$); + if (!(((_ref2 = node.children) != null ? _ref2.length : void 0) > 0)) { + discloser$.addClass('placeholder'); + } + discloser = discloser$.get(0); + if (node.type === 'file') { + fileMap[node.data.targetPath] = node$; + } + appendSearchNode(node$); + return node$; + }; + + $(function() { + var lastMousedownTimestamp, metaInfo, search$, toggle$; + metaInfo = { + relativeRoot: $('meta[name="groc-relative-root"]').attr('content'), + githubURL: $('meta[name="groc-github-url"]').attr('content'), + documentPath: $('meta[name="groc-document-path"]').attr('content'), + projectPath: $('meta[name="groc-project-path"]').attr('content') + }; + nav$ = buildNav(metaInfo); + toc$ = nav$.find('.toc'); + search$ = $('#search'); + selectNodeByDocumentPath(metaInfo.documentPath, window.location.hash.replace('#', '')); + search$.focus(function() { + return setTableOfContentsActive(true); + }); + lastMousedownTimestamp = null; + nav$.mousedown(function(evt) { + if (evt.target !== toggle$[0]) { + return lastMousedownTimestamp = evt.timeStamp; + } + }); + search$.blur(function(evt) { + if (evt.timeStamp - lastMousedownTimestamp < 10) { + return search$.focus(); + } else { + return setTableOfContentsActive(false); + } + }); + toggle$ = nav$.find('.toggle'); + toggle$.click(function(evt) { + if (search$.is(':focus')) { + search$.blur(); + } else { + search$.focus(); + } + return evt.preventDefault(); + }); + toggle$.mousedown(function(evt) { + return evt.preventDefault(); + }); + $('body').keydown(function(evt) { + if (nav$.hasClass('active')) { + switch (evt.keyCode) { + case 13: + visitCurrentNode(); + break; + case 37: + setCurrentNodeExpanded(false); + break; + case 38: + moveCurrentNode(true); + break; + case 39: + setCurrentNodeExpanded(true); + break; + case 40: + moveCurrentNode(false); + break; + default: + return; + } + return evt.preventDefault(); + } + }); + search$.bind('keyup search', function(evt) { + return searchNodes(search$.val()); + }); + search$.keydown(function(evt) { + if (evt.keyCode === 27) { + if (search$.val().trim() === '') { + return search$.blur(); + } else { + return search$.val(''); + } + } + }); + return $('.code.folded').each(function(index, code) { + var code$; + code$ = $(code); + return code$.click(function(evt) { + code$.toggleClass('folded'); + evt.preventDefault(); + return false; + }); + }); + }); + +}).call(this); diff --git a/assets/style.css b/assets/style.css new file mode 100644 index 0000000..f9e0d43 --- /dev/null +++ b/assets/style.css @@ -0,0 +1 @@ +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html,body{height:100%}#document{min-height:100%}body{max-width:33em}.segment{padding:0.5em 0 0.5em 33em;white-space:nowrap}.segment:first-child{padding-top:4.1em}.segment:last-child{padding-bottom:2em}.segment .comments,.segment .code{display:inline-block;vertical-align:top;padding:0 2em}.segment .comments{margin-left:-33em;width:29em;white-space:normal}.segment .code{white-space:pre}#meta{position:absolute;left:33em;padding:0.25em 1em}@media (max-width: 53em){html{font-size:1em}}@media (max-width: 52.94111em){html{font-size:0.99889em}}@media (max-width: 52.88222em){html{font-size:0.99778em}}@media (max-width: 52.82333em){html{font-size:0.99667em}}@media (max-width: 52.76444em){html{font-size:0.99556em}}@media (max-width: 52.70556em){html{font-size:0.99444em}}@media (max-width: 52.64667em){html{font-size:0.99333em}}@media (max-width: 52.58778em){html{font-size:0.99222em}}@media (max-width: 52.52889em){html{font-size:0.99111em}}@media (max-width: 52.47em){html{font-size:0.99em}}@media (max-width: 52.41111em){html{font-size:0.98889em}}@media (max-width: 52.35222em){html{font-size:0.98778em}}@media (max-width: 52.29333em){html{font-size:0.98667em}}@media (max-width: 52.23444em){html{font-size:0.98556em}}@media (max-width: 52.17556em){html{font-size:0.98444em}}@media (max-width: 52.11667em){html{font-size:0.98333em}}@media (max-width: 52.05778em){html{font-size:0.98222em}}@media (max-width: 51.99889em){html{font-size:0.98111em}}@media (max-width: 51.94em){html{font-size:0.98em}}@media (max-width: 51.88111em){html{font-size:0.97889em}}@media (max-width: 51.82222em){html{font-size:0.97778em}}@media (max-width: 51.76333em){html{font-size:0.97667em}}@media (max-width: 51.70444em){html{font-size:0.97556em}}@media (max-width: 51.64556em){html{font-size:0.97444em}}@media (max-width: 51.58667em){html{font-size:0.97333em}}@media (max-width: 51.52778em){html{font-size:0.97222em}}@media (max-width: 51.46889em){html{font-size:0.97111em}}@media (max-width: 51.41em){html{font-size:0.97em}}@media (max-width: 51.35111em){html{font-size:0.96889em}}@media (max-width: 51.29222em){html{font-size:0.96778em}}@media (max-width: 51.23333em){html{font-size:0.96667em}}@media (max-width: 51.17444em){html{font-size:0.96556em}}@media (max-width: 51.11556em){html{font-size:0.96444em}}@media (max-width: 51.05667em){html{font-size:0.96333em}}@media (max-width: 50.99778em){html{font-size:0.96222em}}@media (max-width: 50.93889em){html{font-size:0.96111em}}@media (max-width: 50.88em){html{font-size:0.96em}}@media (max-width: 50.82111em){html{font-size:0.95889em}}@media (max-width: 50.76222em){html{font-size:0.95778em}}@media (max-width: 50.70333em){html{font-size:0.95667em}}@media (max-width: 50.64444em){html{font-size:0.95556em}}@media (max-width: 50.58556em){html{font-size:0.95444em}}@media (max-width: 50.52667em){html{font-size:0.95333em}}@media (max-width: 50.46778em){html{font-size:0.95222em}}@media (max-width: 50.40889em){html{font-size:0.95111em}}@media (max-width: 50.35em){html{font-size:0.95em}}@media (max-width: 50.29111em){html{font-size:0.94889em}}@media (max-width: 50.23222em){html{font-size:0.94778em}}@media (max-width: 50.17333em){html{font-size:0.94667em}}@media (max-width: 50.11444em){html{font-size:0.94556em}}@media (max-width: 50.05556em){html{font-size:0.94444em}}@media (max-width: 49.99667em){html{font-size:0.94333em}}@media (max-width: 49.93778em){html{font-size:0.94222em}}@media (max-width: 49.87889em){html{font-size:0.94111em}}@media (max-width: 49.82em){html{font-size:0.94em}}@media (max-width: 49.76111em){html{font-size:0.93889em}}@media (max-width: 49.70222em){html{font-size:0.93778em}}@media (max-width: 49.64333em){html{font-size:0.93667em}}@media (max-width: 49.58444em){html{font-size:0.93556em}}@media (max-width: 49.52556em){html{font-size:0.93444em}}@media (max-width: 49.46667em){html{font-size:0.93333em}}@media (max-width: 49.40778em){html{font-size:0.93222em}}@media (max-width: 49.34889em){html{font-size:0.93111em}}@media (max-width: 49.29em){html{font-size:0.93em}}@media (max-width: 49.23111em){html{font-size:0.92889em}}@media (max-width: 49.17222em){html{font-size:0.92778em}}@media (max-width: 49.11333em){html{font-size:0.92667em}}@media (max-width: 49.05444em){html{font-size:0.92556em}}@media (max-width: 48.99556em){html{font-size:0.92444em}}@media (max-width: 48.93667em){html{font-size:0.92333em}}@media (max-width: 48.87778em){html{font-size:0.92222em}}@media (max-width: 48.81889em){html{font-size:0.92111em}}@media (max-width: 48.76em){html{font-size:0.92em}}@media (max-width: 48.70111em){html{font-size:0.91889em}}@media (max-width: 48.64222em){html{font-size:0.91778em}}@media (max-width: 48.58333em){html{font-size:0.91667em}}@media (max-width: 48.52444em){html{font-size:0.91556em}}@media (max-width: 48.46556em){html{font-size:0.91444em}}@media (max-width: 48.40667em){html{font-size:0.91333em}}@media (max-width: 48.34778em){html{font-size:0.91222em}}@media (max-width: 48.28889em){html{font-size:0.91111em}}@media (max-width: 48.23em){html{font-size:0.91em}}@media (max-width: 48.17111em){html{font-size:0.90889em}}@media (max-width: 48.11222em){html{font-size:0.90778em}}@media (max-width: 48.05333em){html{font-size:0.90667em}}@media (max-width: 47.99444em){html{font-size:0.90556em}}@media (max-width: 47.93556em){html{font-size:0.90444em}}@media (max-width: 47.87667em){html{font-size:0.90333em}}@media (max-width: 47.81778em){html{font-size:0.90222em}}@media (max-width: 47.75889em){html{font-size:0.90111em}}@media (max-width: 47.7em){html{font-size:0.9em}}@media (max-width: 47.64111em){html{font-size:0.89889em}}@media (max-width: 47.58222em){html{font-size:0.89778em}}@media (max-width: 47.52333em){html{font-size:0.89667em}}@media (max-width: 47.46444em){html{font-size:0.89556em}}@media (max-width: 47.40556em){html{font-size:0.89444em}}@media (max-width: 47.34667em){html{font-size:0.89333em}}@media (max-width: 47.28778em){html{font-size:0.89222em}}@media (max-width: 47.22889em){html{font-size:0.89111em}}@media (max-width: 47.17em){html{font-size:0.89em}}@media (max-width: 47.11111em){html{font-size:0.88889em}}@media (max-width: 47.05222em){html{font-size:0.88778em}}@media (max-width: 46.99333em){html{font-size:0.88667em}}@media (max-width: 46.93444em){html{font-size:0.88556em}}@media (max-width: 46.87556em){html{font-size:0.88444em}}@media (max-width: 46.81667em){html{font-size:0.88333em}}@media (max-width: 46.75778em){html{font-size:0.88222em}}@media (max-width: 46.69889em){html{font-size:0.88111em}}@media (max-width: 46.64em){html{font-size:0.88em}}@media (max-width: 46.58111em){html{font-size:0.87889em}}@media (max-width: 46.52222em){html{font-size:0.87778em}}@media (max-width: 46.46333em){html{font-size:0.87667em}}@media (max-width: 46.40444em){html{font-size:0.87556em}}@media (max-width: 46.34556em){html{font-size:0.87444em}}@media (max-width: 46.28667em){html{font-size:0.87333em}}@media (max-width: 46.22778em){html{font-size:0.87222em}}@media (max-width: 46.16889em){html{font-size:0.87111em}}@media (max-width: 46.11em){html{font-size:0.87em}}@media (max-width: 46.05111em){html{font-size:0.86889em}}@media (max-width: 45.99222em){html{font-size:0.86778em}}@media (max-width: 45.93333em){html{font-size:0.86667em}}@media (max-width: 45.87444em){html{font-size:0.86556em}}@media (max-width: 45.81556em){html{font-size:0.86444em}}@media (max-width: 45.75667em){html{font-size:0.86333em}}@media (max-width: 45.69778em){html{font-size:0.86222em}}@media (max-width: 45.63889em){html{font-size:0.86111em}}@media (max-width: 45.58em){html{font-size:0.86em}}@media (max-width: 45.52111em){html{font-size:0.85889em}}@media (max-width: 45.46222em){html{font-size:0.85778em}}@media (max-width: 45.40333em){html{font-size:0.85667em}}@media (max-width: 45.34444em){html{font-size:0.85556em}}@media (max-width: 45.28556em){html{font-size:0.85444em}}@media (max-width: 45.22667em){html{font-size:0.85333em}}@media (max-width: 45.16778em){html{font-size:0.85222em}}@media (max-width: 45.10889em){html{font-size:0.85111em}}@media (max-width: 45.05em){html{font-size:1em}body{margin:0 auto}.segment{padding:0;white-space:normal;max-width:29em;margin:0 auto}.segment .comments,.segment .code{display:block;padding:1em}.segment .comments{margin-left:0;width:auto}.segment .code{display:block;overflow-y:hidden;overflow-x:auto}.segment .code .wrapper{display:inline-block}#meta{position:static;margin:2em 0 0 0;overflow-y:hidden;overflow-x:auto}#meta .file-path{display:inline-block}}nav{position:fixed;top:0;right:0;width:20em}@media (max-width: 45.05em){nav{left:0;width:100%}}nav .tools{position:relative;z-index:100}nav .tools li{display:table-cell;vertical-align:middle;text-align:center;white-space:nowrap;height:2.1em;padding:0 0.55em}nav .tools .github{padding:0}nav .tools .github a{display:block;height:2.1em;width:2.1em;text-indent:-9001em}nav .tools .search{width:100%}nav .tools .search input{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%}nav .toc{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:2.1em;bottom:0;width:100%;overflow-x:hidden;overflow-y:auto}nav .toc li{position:relative}nav .toc .label{display:block;line-height:2em;padding:0 0.55em 0 0.55em}nav .toc li li .label{padding-left:1.1em}nav .toc li li li .label{padding-left:1.65em}nav .toc li li li li .label{padding-left:2.2em}nav .toc li li li li li .label{padding-left:2.75em}nav .toc li li li li li li .label{padding-left:3.3em}nav{-moz-transition:height 150ms 0;-o-transition:height 150ms 0;-webkit-transition:height 150ms 0;transition:height 150ms 0}nav .tools .toggle{-moz-transition:background 150ms;-o-transition:background 150ms;-webkit-transition:background 150ms;transition:background 150ms}nav.active{-moz-transition:height 0;-o-transition:height 0;-webkit-transition:height 0;transition:height 0;height:100%}nav .toc{-moz-transition:right 150ms;-o-transition:right 150ms;-webkit-transition:right 150ms;transition:right 150ms;right:-100%}nav.active .toc{right:0}@media (max-width: 45.05em){nav .toc{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;right:auto;left:-100%}nav.active .toc{left:0}}@media (max-width: 45.05em){body{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;position:relative;left:0}html.popped{overflow:hidden}html.popped body{left:100%;overflow:hidden}}nav .toc .children,nav .toc .outline{display:none}nav .toc .expanded>.children,nav .toc .expanded>.outline,nav .toc .expanded>.outline .children{display:block}nav .toc .discloser{-moz-transition-property:-moz-transform,-webkit-transform,-o-transform,-moz-transform;-o-transition-property:-moz-transform,-webkit-transform,-o-transform,-o-transform;-webkit-transition-property:-moz-transform,-webkit-transform,-o-transform,-webkit-transform;transition-property:-moz-transform -webkit-transform -o-transform transform;-moz-transition-duration:200ms;-o-transition-duration:200ms;-webkit-transition-duration:200ms;transition-duration:200ms;-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);display:inline-block;height:9px;width:9px;padding:0.2em;margin:0.2em 0.2em -0.2em 0.2em;vertical-align:baseline;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGQzE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGRDE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0ZBMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0ZCMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nQHMgwAAAM1JREFUeNpi/P//P0NJSYkuAwNDJhDXAPE7BjIAExIbZNA9IC4CYjZKDAIBfiDuBeLzQOxBiUEwoAXE26FYixKDYMAD6rpeqGvJNogBGl5F0PDLpMQgGBAC4mlQF9pTYhAMGADxASBeB8RylBgEA4FAfAOIW4CYhxKDQIAZxmChwJD1QFwGxHfINegaEGcB8UFyA/sd1AA9dEOIddFfIJ4OzdAfcSkiZNAOIC6GegcvwGXQHagBm8jNtB+hBmiTYgi6i+ZCw+EFOWkBIMAA1W4l62UzKWwAAAAASUVORK5CYII=') center center no-repeat;background-size:9px 9px}nav .toc .discloser.placeholder,nav .toc .expanded>.outline .discloser{background:none}nav .toc .expanded>.label .discloser{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}nav .toc .filtered>.label{display:none}nav .toc .matched-child>.label{display:block}nav .toc .matched-child>.children,nav .toc .matched-child>.outline,nav .toc .matched-child>.outline .children{display:block}nav .toc .matched>.children,nav .toc .matched>.outline,nav .toc .matched>.outline .children{display:block}nav.searching .toc .discloser{display:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}.comments .wrapper h1,.comments .wrapper h2,.comments .wrapper h3,.comments .wrapper h4,.comments .wrapper h5,.comments .wrapper h6{font-family:"HelveticaNeue-UltraLight","Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:100;letter-spacing:0.0625em;line-height:1.25;margin-bottom:0.5em}.comments .wrapper h1{font-size:2.5em}.comments .wrapper h2{font-size:2em}.comments .wrapper h3{font-size:1.6em}.comments .wrapper h4{font-size:1.4em}.comments .wrapper h5{font-size:1.3em}.comments .wrapper h6{font-size:1.2em}.comments .wrapper p{margin:1em 0}.comments .wrapper>*:first-child{margin-top:0}.comments .wrapper>*:last-child{margin-bottom:0}.comments .wrapper ol,.comments .wrapper ul{padding-left:1.75em;margin:1em 0}.comments .wrapper ol li{list-style:decimal}.comments .wrapper ul li{list-style:disc}.comments .wrapper li{margin:1em 0}.comments .wrapper li:first-child{margin-top:0}.comments .wrapper li:last-child{margin-bottom:0}.comments .wrapper code{display:inline-block;padding:0.25em 0.25em 0 0.25em}.comments .wrapper pre{display:block;overflow-x:auto;overflow-y:hidden}.comments .wrapper pre .hljs-comment,.comments .wrapper pre .hljs-template_comment,.comments .wrapper pre .diff .hljs-header,.comments .wrapper pre .hljs-doctype,.comments .wrapper pre .hljs-pi,.comments .wrapper pre .lisp .hljs-string,.comments .wrapper pre .hljs-javadoc{color:#93a1a1;font-style:italic}.comments .wrapper pre .hljs-keyword,.comments .wrapper pre .hljs-winutils,.comments .wrapper pre .method,.comments .wrapper pre .hljs-addition,.comments .wrapper pre .css .hljs-tag,.comments .wrapper pre .hljs-request,.comments .wrapper pre .hljs-status,.comments .wrapper pre .nginx .hljs-title{color:#859900}.comments .wrapper pre .hljs-number,.comments .wrapper pre .hljs-command,.comments .wrapper pre .hljs-string,.comments .wrapper pre .hljs-tag .hljs-value,.comments .wrapper pre .hljs-rules .hljs-value,.comments .wrapper pre .hljs-phpdoc,.comments .wrapper pre .tex .hljs-formula,.comments .wrapper pre .hljs-regexp,.comments .wrapper pre .hljs-hexcolor{color:#2aa198}.comments .wrapper pre .hljs-title,.comments .wrapper pre .hljs-localvars,.comments .wrapper pre .hljs-chunk,.comments .wrapper pre .hljs-decorator,.comments .wrapper pre .hljs-built_in,.comments .wrapper pre .hljs-identifier,.comments .wrapper pre .vhdl .hljs-literal,.comments .wrapper pre .hljs-id,.comments .wrapper pre .css .hljs-function{color:#268bd2}.comments .wrapper pre .hljs-attribute,.comments .wrapper pre .hljs-variable,.comments .wrapper pre .lisp .hljs-body,.comments .wrapper pre .smalltalk .hljs-number,.comments .wrapper pre .hljs-constant,.comments .wrapper pre .hljs-class .hljs-title,.comments .wrapper pre .hljs-parent,.comments .wrapper pre .haskell .hljs-type{color:#b58900}.comments .wrapper pre .hljs-preprocessor,.comments .wrapper pre .hljs-preprocessor .hljs-keyword,.comments .wrapper pre .hljs-pragma,.comments .wrapper pre .hljs-shebang,.comments .wrapper pre .hljs-symbol,.comments .wrapper pre .hljs-symbol .hljs-string,.comments .wrapper pre .diff .hljs-change,.comments .wrapper pre .hljs-special,.comments .wrapper pre .hljs-attr_selector,.comments .wrapper pre .hljs-important,.comments .wrapper pre .hljs-subst,.comments .wrapper pre .hljs-cdata,.comments .wrapper pre .clojure .hljs-title,.comments .wrapper pre .css .hljs-pseudo{color:#cb4b16}.comments .wrapper pre .hljs-deletion{color:#dc322f}.comments .wrapper pre .tex .hljs-formula{background:#eee8d5}.comments .wrapper pre code{padding:1em}.comments .wrapper blockquote{padding:0 1em}.comments .wrapper strong{font-weight:700}.comments .wrapper em{font-style:italic}html{background:#4a525a}#document{background:#f5fbff url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI3MmMzMCIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjM2U0NTRjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNGE1MjVhIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 33em no-repeat;background:#f5fbff -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #272c30),color-stop(30%, #3e454c),color-stop(100%, #4a525a)) 33em no-repeat;background:#f5fbff -moz-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff -webkit-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff linear-gradient(to right, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;margin-right:-1em;padding-right:1em}@media (max-width: 45.05em){#document{margin-right:0;padding-right:0}}#meta>*{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#272c30 1px 1px 0}#meta>*,#meta>* a{color:#9faab7}#meta>* a{text-decoration:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#fff 1px 1px 0;color:#4a525a}.code .wrapper{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;text-shadow:#272c30 1px 1px 0;color:#cbd1d8}.code .wrapper .hljs{display:block;padding:0.5em}.code .wrapper .hljs-comment,.code .wrapper .hljs-template_comment,.code .wrapper .diff .hljs-header,.code .wrapper .hljs-doctype,.code .wrapper .hljs-pi,.code .wrapper .lisp .hljs-string,.code .wrapper .hljs-javadoc{color:#b1bac4;font-style:italic}.code .wrapper .hljs-keyword,.code .wrapper .hljs-winutils,.code .wrapper .method,.code .wrapper .hljs-addition,.code .wrapper .css .hljs-tag,.code .wrapper .hljs-request,.code .wrapper .hljs-status,.code .wrapper .nginx .hljs-title{color:#e0c090}.code .wrapper .hljs-string{color:#e9baba}.code .wrapper .hljs-property{color:#b9d0af}.code .wrapper .hljs-function{color:#abd9cf}.code .wrapper .hljs-class{color:#cee4dd}.code .wrapper .hljs-number,.code .wrapper .hljs-command,.code .wrapper .hljs-tag .hljs-value,.code .wrapper .hljs-rules .hljs-value,.code .wrapper .hljs-phpdoc,.code .wrapper .tex .hljs-formula,.code .wrapper .hljs-regexp,.code .wrapper .hljs-hexcolor{color:#cba8d6}.code .wrapper .hljs-title,.code .wrapper .hljs-localvars,.code .wrapper .hljs-chunk,.code .wrapper .hljs-decorator,.code .wrapper .hljs-built_in,.code .wrapper .hljs-identifier,.code .wrapper .vhdl .hljs-literal,.code .wrapper .hljs-id,.code .wrapper .css .hljs-function{color:#a9c2ba}.code .wrapper .hljs-attribute,.code .wrapper .hljs-variable,.code .wrapper .lisp .hljs-body,.code .wrapper .smalltalk .hljs-number,.code .wrapper .hljs-constant,.code .wrapper .hljs-class .hljs-title,.code .wrapper .hljs-parent,.code .wrapper .haskell .hljs-type{color:#b9d0af}.code .wrapper .hljs-preprocessor,.code .wrapper .hljs-preprocessor .hljs-keyword,.code .wrapper .hljs-pragma,.code .wrapper .hljs-shebang,.code .wrapper .hljs-symbol,.code .wrapper .hljs-symbol .hljs-string,.code .wrapper .diff .hljs-change,.code .wrapper .hljs-special,.code .wrapper .hljs-attr_selector,.code .wrapper .hljs-important,.code .wrapper .hljs-subst,.code .wrapper .hljs-cdata,.code .wrapper .clojure .hljs-title,.code .wrapper .css .hljs-pseudo{color:#cee4dd}.code .wrapper .hljs-deletion{color:#dc322f}.code .wrapper .tex .hljs-formula{background:#e9baba}@media (max-width: 45.05em){.code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;-moz-box-shadow:#272c30 0 0 0.5em 0.2em inset;-webkit-box-shadow:#272c30 0 0 0.5em 0.2em inset;box-shadow:#272c30 0 0 0.5em 0.2em inset;background:#4a525a}.code .wrapper{-moz-box-shadow:#4a525a 0 0 0.25em 0.75em;-webkit-box-shadow:#4a525a 0 0 0.25em 0.75em;box-shadow:#4a525a 0 0 0.25em 0.75em;background:#4a525a}}@media (max-width: 29em){.code{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}}nav{text-shadow:#f0f0f0 1px 1px 0;color:#4a525a}nav .tools,nav .toc{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}nav .tools{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZGNkY2QiIHN0b3Atb3BhY2l0eT0iMC45Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.9)),color-stop(100%, rgba(205,205,205,0.9)));background:-moz-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:-webkit-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:linear-gradient(to bottom, rgba(255,255,255,0.9),rgba(205,205,205,0.9));-moz-border-radius-bottomleft:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;border-bottom:1px solid #4a525a;border-left:1px solid #4a525a}@media (max-width: 53em){nav .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}nav .tools li{border-right:1px solid #4a525a}nav .tools li:last-child{border-right:none}nav .tools .toggle{cursor:pointer}nav .tools .github a{-moz-transition:opacity 200ms;-o-transition:opacity 200ms;-webkit-transition:opacity 200ms;transition:opacity 200ms;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGODE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGOTE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0Y2MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0Y3MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FC/Z5AAACv9JREFUeNrMWXl0VNUdvu/NmzWZJQnZN0hCWIQEIQuErUCBI2qwEAFRBJUeDvUPDwfKVhDUY2mPp8spakVELSq11goIiCBbUVKKUGKQQFiCSBJIQjLJZPbJzOt3J/dOXiYJgcqh3nO+vPfm3Xfvd3/3t94IsiyTH2sTyY+4SfxGpVIpfzdBokdxjQHOADuAj4GmuzRvFjAbmAZkAocEQZjLX/r9/vYbuq0UgigoQKagsxyG74FlgB4gYdAA0UASkAIkACahvSn70Xd/AlrCxm4VRDEBIBScUxg5wiCs7oZcEJDwN7g+AswH3gAOApVALdAIWIEGtpgyYAfwPFtYTU/jbtmy5W/gsZAugnMKbSsJ2oXAn1J62o9AIJCDy/ZgbzbQLVoqkAtM722fa2pqYnHJwfgmXG23MgjV7SjO3bR06BnlogUSe7PW+ntplXQHUlNTHewxqjdyR+8lOehxYNCgQa3hnHoil8a18F60trY2cenSpYU+n48qfXMnvaEQYcIMQ4KmrbAk/Cb3ZGV3gt7GWbx4cSm4xHd1JR2+aPfdIPK/ICIiwlNaWroKfMSgwDq0Moj78feB/1e4cjqdmq1btz6C25921jk5iOLe4i2XdDh+aF/ejhw5ksYEZJE6BAeHSuT83nyaMTLSZzAYfO2K7BPdbo/k9ngkOM8u32i1moBep2/TarVtGrU64PZ6VC0tLVqv1ydyFxLeamtrzbgYgJFSh+Bk2jOpe1ICmf7QtKp5856sHJo7zGoym4Lk3G636HQ4JXurTd3U1KTBtqgcTpcQZTYHIiIjfNExMV6DIaINuuTX6XQBp8sp1t24odv3+d6UN9/cPPTqtWpjOEFYLOeUI3CJwJJULAMZFE5u9cqVx1/esKE8jLebgWc3akCjjIFKbwF46dw0AlLXVnXpUlzx9OJpZyvO9VEShJR9LpfrHdy2SgqDCEB83i7Elj53NozYKeAY3QHAE0ZOz0KQmukuJ+VifUPkMrKyjO9t2bzvwUdmbL5eV2/gBBVE1crAL/OAy4mlJSe5Vq5Zd0pB7O/4OB7XXwJbgC/pYLHRFhJtNhONRk1q6xtIv+RE4vJ4SUOTldTdDKWABcBi+g3wdtH9OfaHJ4zaVpg7NHvH/oPrFKGMW4wghYn/uvJhwvjx1UZLFN+6I/iQ3r/Pnh+iGQcWUVPfaCWNzTZiiowgMA5yo7GJ1N5oIP4OI4llmQzV6QVAdenp8v3J8X1IhF7aplarV0HXaE5IJEniH8md/RwhFZ1iWFoqj3dUop8yQrzFPPvss78Cuf48e7W22IjL7SHXauuUxGgbpTS2goKC5fhu9InyCnLmfFWDiByQv6OOuCu5dmEeU46Iyfj7CqzKwXQp1OLj4wfSrcJEll78q0b5EBMTQ4k++V3N9cE6rVYCuRCP5OTkFm5ECskJFMdxd5X/dLOh3shuG9n1n8pMYuLEiQ10sawmuFU7SQMAfxg3bhxXn1yLyWDx+X0mhVT5O2d4NLADb/GHr0/9J97ltFO9lDJSgruyC3gpNjb20tq1a4+OHj26OaxQGgDMYxarbN8BTxuNxm9nzZr1zZIlS6r4GiWVekhbW0BL9Q0L9s+dO/dqKKfsJvCb4fMuMKuRP/nwvSN4//PHH55CsAXckqkhbGJ4nWYSbMCXmIKkKRNJhQeIATYqvs3PGZD1EX1F55s0adI5xbupXciJ7ddCWBCVopyekuw8ffJr2lkzMLMviYky0/7UeRcDNIMYxbeIKf6IvLy8madOnZqId1KEQU8S4/rA1ZiwODX9Ng9YCcxc/sxjkyWVivo+GRGkurKy8j1G7DW6YGWECMVY2hKTEicjHH1stVpNSYkJztmPlqw/uG/vK/6ATPeC+Nv88JIqUg2X0epwEo/XW4LPltMaFNs+vays7HhSUtLS9OTEpgi9jkRbTMRmd5Ios5G0OuGTA/LkMxcubWtr89MIcRnZyLYnnniC70Ap8JfutjWE9evXF02YMKGCiz0hPu5YWlLC/PuyMzOGZGdKOQP7k76pSSR3YDZJSYyDVE0js7KyVhw88MVQjJkODAR0AzLSyJi8XIJvzMMGZU+M7xP9V5p4snHf3/jqxp+g35+Z1F4GTEFOCsktYCHmANCgKAX779q1a9W7776bd/jw4b6QpFEtSUSr0VyTJPE8vMB3Br2uSRREh0oUbPEpaQlFhQW5dXU3mtUaddzBA4crHE5HItba3+ly9/V4fWbMSQuo7SD2DsanPnQhEMnmfYM66c4Vf3txTFdSDTwakqAYrE2jgAV2u/2tvXv3/mPRokUfZWdnfwhvXhHKBBm4IYXhX8BrwC/wvmDZsmV9mFQXKgzgaeovRUXFr5QcdQcvAKupwFJSUkqqa6q3Kxw0lWIqU/rhly9fTsKWP1hdXR3dW4YL3fumqqrq1xqNhpZ9cewMhiYJNAKdpjqG+a9wy+56VsIkNXLkSOqIZXjx5s/37Z3QnS5SK4yMjDx8J/VBSUlJOb5bATwGUB3rC2j57gQ9BSuyeixwEJLiYdbUucq5uTnXNm3a1B3BXKDtTshZLBbnxYsXV1M31GW82yXH8ArXHbPZbENa/kc8zwPoQcvrwDU+Kd7ZIUUXq57cc+bMKeMlICKCC1sZWsTOnTs/wVyP3i65noqZjezEiNhsNiP83XPovBXYzHKy0EHPzJkzz6elpQXDGIj48/Pz67mWjhgxorqoqOhKKJGwWmkCUADdNXSuBTqrWG8V//d0hXq93spDEEd4Gz58eCMqdoENLtPqPXQyKUl+vK8PS8tMQaMQeDkqk477zkm+dAsjOzxjxozxXq/3rZMnT2Y0NzcbaIWFrXLjKqJKCqZJCHOy4qTIj+ghK47GBLwPhEsITddxL/R+7Npd++CDD86AyJPAMzU1NXGYW0C+5UHkGLhhw4axzL0IyiCvUomBsPM84QefCfd4oi2KlZhgQ2pq6ng83ke3xeFweHo6ykIKJCuykB90GCTdTicQpLq3AyR30oIXQXoRPzLopu9dO52S7uSUkrkXmq67uzMOOAMZRtDj6aeisrqt+UIjqTWasEHbM/eo2HiiQ07G9JtodDpibahTNdXdCPYzRBoFo8XCDr2D48h8clRutH8oROoMkaEVpQ8YzCxE6PEoMERubPHPFJZDvXOwpiB6gyF4/E5/87jcJDE9gxz7bMcDlBx1mOkZGS5UXMFxNHq9v29mf4+I+oIarj9ApCE5w+x8jhNl5emzSmbUBM8aRo3lUaBdCjJzKQrrVUhO23kVcrsP8nk9TJdUxGGzJXz2/pYXbtbWBI/JxkyavKd/Zlbr1StV9PCFDB6aW1dUmN/YLzOr5cK5iuizZ8v7PDD17S+HDLu/8tuy0wP+8NuXh/jdds/8BU9Fet3uXrc2RM7a0NBOjq1ECB0CtBMVoUu2psZxrVbrOKM5emeE2bj7iz27Ilauf/EZR2srVE3tXvP8ui+R55Hla9Z9tfDx2cVVFy6YP9r5acaRQ4deLZk9K9Nlt5fs3r0nc3h+4RRbc+PJAETL5RH0jWHOMKQPk+fM7+7cq+NjSSQum4M01V8nZ//9FfXyxRevXJ02ZtTI6TGxsVf6ZWWv2LP946ms8iofkDOsKeBx/06j1WtPHC99E7XEizSfA7LZ6LSSOzBl7lPuTkqOtn/bO53J3WHLAx4G6igRlvPPZO6FFiy/B2j5V0hLQvYNPcY4AVB/Sa3BEqwTCLnSo3e4S//oiGHFDTXh3cDFsIVMZXH8N4z8bbX/CjAA0UTEH4oMvREAAAAASUVORK5CYII=') center center no-repeat;background-size:19.5px 24px}nav .tools .github a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);opacity:0.9}nav.active .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}nav.active .tools .toggle{background:rgba(205,205,205,0.9);position:relative}nav .toc{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:rgba(230,230,230,0.9);border-left:1px solid #4a525a}nav .toc .label{color:#4a525a;text-decoration:none;border-top:1px solid rgba(192,192,192,0.9);border-bottom:1px solid rgba(192,192,192,0.9);margin-top:-1px}nav .toc .label:hover{background:rgba(205,205,205,0.9)}nav .toc .file>.label{font-weight:bold}nav .toc .selected>.label{background:#f5fbff}nav .toc .label em{font-weight:bold}nav .toc .file>.label em{color:#101214}nav .toc .matched-child>.label{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:0.65;text-shadow:none;background:rgba(192,192,192,0.9)}@media (max-width: 45.05em){nav .tools,nav .toc{border-left-width:0}nav .tools{background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NkY2RjZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),color-stop(100%, #cdcdcd));background:-moz-linear-gradient(top, #ffffff,#cdcdcd);background:-webkit-linear-gradient(top, #ffffff,#cdcdcd);background:linear-gradient(to bottom, #ffffff,#cdcdcd)}nav .toc{background:#e6e6e6}}.comments .wrapper a{display:inline-block;color:#a8614e;text-decoration:none}.comments .wrapper a:hover,.comments .wrapper a:hover *{text-decoration:underline}.comments .wrapper code{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;border:1px solid #e6e0d5}.comments .wrapper pre,.comments .wrapper code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;background:#fbf8f3}.comments .wrapper pre{-moz-box-shadow:#f2ece3 0 0 0.4em 0.2em;-webkit-box-shadow:#f2ece3 0 0 0.4em 0.2em;box-shadow:#f2ece3 0 0 0.4em 0.2em;border:1px solid #d9c9af}.comments .wrapper pre code{border-width:0;background:transparent}.comments .wrapper blockquote{border-left:0.15em solid #959fa8;margin-left:-0.15em}body{-webkit-text-size-adjust:100%}input[type="search"]{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;-moz-box-shadow:#ddd 0 1px 1px 0 inset;-webkit-box-shadow:#ddd 0 1px 1px 0 inset;box-shadow:#ddd 0 1px 1px 0 inset;border:1px solid #959595;padding:0.15em 0.8em}.comments.doc-section .wrapper{color:#252519}.comments.doc-section.doc-section-private .wrapper,.comments.doc-section.doc-section-protected .wrapper,.comments.doc-section.doc-section-internal .wrapper{color:#7f7f7f}.comments.doc-section .doc-section-header{font:bold 18px "helvetica neue",helvetica,sans-serif}.comments.doc-section .docs .doc-section-header code{font-size:18px}.code .marker,.code .marker.wrapper,.code .wrapper.marker{display:none}.code.folded .wrapper{display:none;cursor:default}.code.folded .marker{-moz-border-radius:0.2em;-webkit-border-radius:0.2em;border-radius:0.2em;-moz-box-shadow:#2f3539 1px 1px 1px 0;-webkit-box-shadow:#2f3539 1px 1px 1px 0;box-shadow:#2f3539 1px 1px 1px 0;display:inline-block;border:1px solid #73787f;padding:0.2em 0.5em;margin-left:-0.5em;margin-right:-0.5em;background:#58616b;font:12px "Droid Sans Mono",Menlo,Monaco,monospace;text-shadow:#2f3539 1px 1px 0px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.code.folded .marker .c1{color:#73787f;font-style:normal}.code.folded .marker:hover{background:#5f6872}.code.folded .marker:hover .c1{color:#7b8087}.code.folded .marker .c1:after{content:" …"} diff --git a/index.html b/index.html new file mode 100644 index 0000000..68f0dbc --- /dev/null +++ b/index.html @@ -0,0 +1,7 @@ +index

      js-random

      +

      randomness code bricks for JavaScript

      +

      Build Status +Coverage Status +Dependencies Status +devDependencies Status +Code Climate

      \ No newline at end of file From a8c730fbbb96bf513eb96671ba74cda7dd104fbd Mon Sep 17 00:00:00 2001 From: aureooms Date: Sun, 12 Oct 2014 15:24:16 +0200 Subject: [PATCH 02/15] Generated documentation for d3e380ab1a8c3a0641005f81916580d107f0a0a3 --- assets/behavior.js | 80 ++++++++++++++++++++++++++++++++++++++++++++++ fisheryates.html | 20 ++++++++++++ index.html | 9 ++++-- randfloat.html | 6 ++++ randint.html | 6 ++++ shuffle.html | 10 ++++++ 6 files changed, 129 insertions(+), 2 deletions(-) create mode 100644 fisheryates.html create mode 100644 randfloat.html create mode 100644 randint.html create mode 100644 shuffle.html diff --git a/assets/behavior.js b/assets/behavior.js index ee1fc7f..b0bccc7 100644 --- a/assets/behavior.js +++ b/assets/behavior.js @@ -21,6 +21,86 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 }, "depth": 1, "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/genius/dev/js/js-random/js/src/fisheryates.js", + "projectPath": "js/src/fisheryates.js", + "targetPath": "fisheryates", + "pageTitle": "fisheryates", + "title": "fisheryates" + }, + "depth": 1, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/genius/dev/js/js-random/js/src/randfloat.js", + "projectPath": "js/src/randfloat.js", + "targetPath": "randfloat", + "pageTitle": "randfloat", + "title": "randfloat" + }, + "depth": 1, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/genius/dev/js/js-random/js/src/randint.js", + "projectPath": "js/src/randint.js", + "targetPath": "randint", + "pageTitle": "randint", + "title": "randint" + }, + "depth": 1, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/genius/dev/js/js-random/js/src/shuffle.js", + "projectPath": "js/src/shuffle.js", + "targetPath": "shuffle", + "pageTitle": "shuffle", + "title": "shuffle" + }, + "depth": 1, + "outline": [] } ]; diff --git a/fisheryates.html b/fisheryates.html new file mode 100644 index 0000000..d566773 --- /dev/null +++ b/fisheryates.html @@ -0,0 +1,20 @@ +fisheryates

      Sample array using Fisher-Yates method.

      var __fisheryates__ = function ( randint ) { + + var fisheryates = function ( n, a, i, j ) { + + var k, p, tmp;

      we will swap at most n elements

      k = i + n; + + for ( ; i < k ; ++i ) {

      choose any index p in the remaining array

      p = randint( i, j );

      swap element at index p with first element in the array

      tmp = a[i]; + a[i] = a[p]; + a[p] = tmp; + + } + + }; + + return fisheryates; + +}; + +exports.__fisheryates__ = __fisheryates__; +exports.__sample__ = __fisheryates__;
      \ No newline at end of file diff --git a/index.html b/index.html index 68f0dbc..f371642 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,12 @@ index

      js-random

      randomness code bricks for JavaScript

      -

      Build Status +

      NPM license +NPM version +Bower version +Build Status Coverage Status Dependencies Status devDependencies Status -Code Climate

      \ No newline at end of file +Code Climate +NPM downloads per month +GitHub issues

      \ No newline at end of file diff --git a/randfloat.html b/randfloat.html new file mode 100644 index 0000000..75f4186 --- /dev/null +++ b/randfloat.html @@ -0,0 +1,6 @@ +randfloat

      Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

      var randfloat = function ( i, j ) { + return i + Math.random() * (j - i); +}; + +exports.randfloat = randfloat;
      \ No newline at end of file diff --git a/randint.html b/randint.html new file mode 100644 index 0000000..d2be861 --- /dev/null +++ b/randint.html @@ -0,0 +1,6 @@ +randint

      Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

      var randint = function ( i, j ) { + return i + Math.floor( Math.random() * (j - i) ); +}; + +exports.randint = randint;
      \ No newline at end of file diff --git a/shuffle.html b/shuffle.html new file mode 100644 index 0000000..3a1f46e --- /dev/null +++ b/shuffle.html @@ -0,0 +1,10 @@ +shuffle

      Shuffle array by sampling the complete array.

      var __shuffle__ = function ( sample ) { + + var shuffle = function ( a, i, j ) { + sample(j - i, a, i, j); + }; + + return shuffle; +}; + +exports.__shuffle__ = __shuffle__;
      \ No newline at end of file From 3f8041d92df2edad3c16403558528148ffa1c0f4 Mon Sep 17 00:00:00 2001 From: aureooms Date: Wed, 11 Feb 2015 20:54:46 +0100 Subject: [PATCH 03/15] Generated documentation for 56b3f9948fa3d0db19a3027570701aeba8461e11 --- assets/behavior.js | 12 ++++++------ index.html | 20 ++++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/assets/behavior.js b/assets/behavior.js index b0bccc7..d8644cb 100644 --- a/assets/behavior.js +++ b/assets/behavior.js @@ -13,7 +13,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "commentsOnly": true, "name": "Markdown" }, - "sourcePath": "/home/genius/dev/js/js-random/README.md", + "sourcePath": "/home/aureooms/dev/js/js-random/README.md", "projectPath": "README.md", "targetPath": "index", "pageTitle": "index", @@ -33,7 +33,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "foldPrefix": "^", "name": "JavaScript" }, - "sourcePath": "/home/genius/dev/js/js-random/js/src/fisheryates.js", + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/fisheryates.js", "projectPath": "js/src/fisheryates.js", "targetPath": "fisheryates", "pageTitle": "fisheryates", @@ -53,7 +53,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "foldPrefix": "^", "name": "JavaScript" }, - "sourcePath": "/home/genius/dev/js/js-random/js/src/randfloat.js", + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/randfloat.js", "projectPath": "js/src/randfloat.js", "targetPath": "randfloat", "pageTitle": "randfloat", @@ -73,7 +73,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "foldPrefix": "^", "name": "JavaScript" }, - "sourcePath": "/home/genius/dev/js/js-random/js/src/randint.js", + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/randint.js", "projectPath": "js/src/randint.js", "targetPath": "randint", "pageTitle": "randint", @@ -93,7 +93,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "foldPrefix": "^", "name": "JavaScript" }, - "sourcePath": "/home/genius/dev/js/js-random/js/src/shuffle.js", + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/shuffle.js", "projectPath": "js/src/shuffle.js", "targetPath": "shuffle", "pageTitle": "shuffle", @@ -325,7 +325,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 if (metaInfo.documentPath === 'index') { sourceURL = metaInfo.githubURL; } else { - sourceURL = "" + metaInfo.githubURL + "/blob/master/" + metaInfo.projectPath; + sourceURL = metaInfo.githubURL + "/blob/master/" + metaInfo.projectPath; } nav$.find('.tools').prepend("
    1. \n \n View source on GitHub\n \n
    2. "); } diff --git a/index.html b/index.html index f371642..3727e28 100644 --- a/index.html +++ b/index.html @@ -1,12 +1,12 @@ index

      js-random

      randomness code bricks for JavaScript

      -

      NPM license -NPM version -Bower version -Build Status -Coverage Status -Dependencies Status -devDependencies Status -Code Climate -NPM downloads per month -GitHub issues

      \ No newline at end of file +

      NPM license +NPM version +Bower version +Build Status +Coverage Status +Dependencies Status +devDependencies Status +Code Climate +NPM downloads per month +GitHub issues

      \ No newline at end of file From 1fbbff574ecc5b4b15169ae1b635443918253de5 Mon Sep 17 00:00:00 2001 From: aureooms Date: Thu, 9 Apr 2015 10:49:30 +0200 Subject: [PATCH 04/15] undefined --- 000-kernel/fisheryates.html | 19 +++ 000-kernel/shuffle.html | 11 ++ 001-api/000-randfloat.html | 6 + 001-api/001-randint.html | 6 + 001-api/002-sample.html | 3 + 001-api/003-shuffle.html | 3 + assets/behavior.js | 298 ++++++++++++++++++++++-------------- assets/style.css | 2 +- fisheryates.html | 20 --- randfloat.html | 6 - randint.html | 6 - shuffle.html | 10 -- 12 files changed, 228 insertions(+), 162 deletions(-) create mode 100644 000-kernel/fisheryates.html create mode 100644 000-kernel/shuffle.html create mode 100644 001-api/000-randfloat.html create mode 100644 001-api/001-randint.html create mode 100644 001-api/002-sample.html create mode 100644 001-api/003-shuffle.html delete mode 100644 fisheryates.html delete mode 100644 randfloat.html delete mode 100644 randint.html delete mode 100644 shuffle.html diff --git a/000-kernel/fisheryates.html b/000-kernel/fisheryates.html new file mode 100644 index 0000000..25123d1 --- /dev/null +++ b/000-kernel/fisheryates.html @@ -0,0 +1,19 @@ +000-kernel/fisheryates

      Sample array using Fisher-Yates method.

      var _fisheryates = function ( randint ) { + + var fisheryates = function ( n , a , i , j ) { + + var k , p , tmp ;

      we will swap at most n elements

      k = i + n ; + + for ( ; i < k ; ++i ) {

      choose any index p in the remaining array

      p = randint( i , j ) ;

      swap element at index p with first element in the array

      tmp = a[i] ; + a[i] = a[p] ; + a[p] = tmp ; + + } + + } ; + + return fisheryates ; + +} ; + +exports._fisheryates = _fisheryates ;
      \ No newline at end of file diff --git a/000-kernel/shuffle.html b/000-kernel/shuffle.html new file mode 100644 index 0000000..cc2ea54 --- /dev/null +++ b/000-kernel/shuffle.html @@ -0,0 +1,11 @@ +000-kernel/shuffle

      Shuffle array by sampling the complete array.

      var _shuffle = function ( sample ) { + + var shuffle = function ( a , i , j ) { + sample( j - i , a , i , j ) ; + } ; + + return shuffle ; + +} ; + +exports._shuffle = _shuffle ;
      \ No newline at end of file diff --git a/001-api/000-randfloat.html b/001-api/000-randfloat.html new file mode 100644 index 0000000..46080cb --- /dev/null +++ b/001-api/000-randfloat.html @@ -0,0 +1,6 @@ +001-api/000-randfloat

      Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

      var randfloat = function ( i , j ) { + return i + Math.random( ) * ( j - i ) ; +} ; + +exports.randfloat = randfloat ;
      \ No newline at end of file diff --git a/001-api/001-randint.html b/001-api/001-randint.html new file mode 100644 index 0000000..f0b2b07 --- /dev/null +++ b/001-api/001-randint.html @@ -0,0 +1,6 @@ +001-api/001-randint

      Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

      var randint = function ( i , j ) { + return i + Math.floor( Math.random( ) * ( j - i ) ) ; +} ; + +exports.randint = randint ;
      \ No newline at end of file diff --git a/001-api/002-sample.html b/001-api/002-sample.html new file mode 100644 index 0000000..9bb1cf7 --- /dev/null +++ b/001-api/002-sample.html @@ -0,0 +1,3 @@ +001-api/002-sample
      var sample = _fisheryates( randint ) ; + +exports.sample = sample ;
      \ No newline at end of file diff --git a/001-api/003-shuffle.html b/001-api/003-shuffle.html new file mode 100644 index 0000000..f4f2732 --- /dev/null +++ b/001-api/003-shuffle.html @@ -0,0 +1,3 @@ +001-api/003-shuffle
      var shuffle = _shuffle( sample ) ; + +exports.shuffle = shuffle ;
      \ No newline at end of file diff --git a/assets/behavior.js b/assets/behavior.js index d8644cb..b237d03 100644 --- a/assets/behavior.js +++ b/assets/behavior.js @@ -22,85 +22,145 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 "depth": 1, "outline": [] }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/fisheryates.js", - "projectPath": "js/src/fisheryates.js", - "targetPath": "fisheryates", - "pageTitle": "fisheryates", - "title": "fisheryates" - }, - "depth": 1, - "outline": [] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/randfloat.js", - "projectPath": "js/src/randfloat.js", - "targetPath": "randfloat", - "pageTitle": "randfloat", - "title": "randfloat" - }, - "depth": 1, - "outline": [] - }, { - "type": "file", + "type": "folder", "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/randint.js", - "projectPath": "js/src/randint.js", - "targetPath": "randint", - "pageTitle": "randint", - "title": "randint" + "path": "000-kernel", + "title": "000-kernel" }, "depth": 1, - "outline": [] + "children": [ + { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/000-kernel/fisheryates.js", + "projectPath": "js/src/000-kernel/fisheryates.js", + "targetPath": "000-kernel/fisheryates", + "pageTitle": "000-kernel/fisheryates", + "title": "fisheryates" + }, + "depth": 2, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/000-kernel/shuffle.js", + "projectPath": "js/src/000-kernel/shuffle.js", + "targetPath": "000-kernel/shuffle", + "pageTitle": "000-kernel/shuffle", + "title": "shuffle" + }, + "depth": 2, + "outline": [] + } + ] }, { - "type": "file", + "type": "folder", "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/shuffle.js", - "projectPath": "js/src/shuffle.js", - "targetPath": "shuffle", - "pageTitle": "shuffle", - "title": "shuffle" + "path": "001-api", + "title": "001-api" }, "depth": 1, - "outline": [] + "children": [ + { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/000-randfloat.js", + "projectPath": "js/src/001-api/000-randfloat.js", + "targetPath": "001-api/000-randfloat", + "pageTitle": "001-api/000-randfloat", + "title": "000-randfloat" + }, + "depth": 2, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/001-randint.js", + "projectPath": "js/src/001-api/001-randint.js", + "targetPath": "001-api/001-randint", + "pageTitle": "001-api/001-randint", + "title": "001-randint" + }, + "depth": 2, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/002-sample.js", + "projectPath": "js/src/001-api/002-sample.js", + "targetPath": "001-api/002-sample", + "pageTitle": "001-api/002-sample", + "title": "002-sample" + }, + "depth": 2, + "outline": [] + }, { + "type": "file", + "data": { + "language": { + "nameMatchers": [".js"], + "pygmentsLexer": "javascript", + "multiLineComment": ["/*", "*", "*/"], + "singleLineComment": ["//"], + "ignorePrefix": "}", + "foldPrefix": "^", + "name": "JavaScript" + }, + "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/003-shuffle.js", + "projectPath": "js/src/001-api/003-shuffle.js", + "targetPath": "001-api/003-shuffle", + "pageTitle": "001-api/003-shuffle", + "title": "003-shuffle" + }, + "depth": 2, + "outline": [] + } + ] } ]; @@ -163,15 +223,15 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 }; selectNodeByDocumentPath = function(documentPath, headerSlug) { - var link, urlChunks, _i, _len, _ref; + var j, len, link, ref, urlChunks; if (headerSlug == null) { headerSlug = null; } currentNode$ = fileMap[documentPath]; if (headerSlug) { - _ref = currentNode$.find('.outline a'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - link = _ref[_i]; + ref = currentNode$.find('.outline a'); + for (j = 0, len = ref.length; j < len; j++) { + link = ref[j]; urlChunks = $(link).attr('href').split('#'); if (urlChunks[1] === headerSlug) { currentNode$ = $(link).parents('li').first(); @@ -185,10 +245,10 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 }; moveCurrentNode = function(up) { - var i, newIndex, node, visibleNodes$, _i, _len; + var i, j, len, newIndex, node, visibleNodes$; visibleNodes$ = toc$.find('li:visible:not(.filtered)'); newIndex = 0; - for (i = _i = 0, _len = visibleNodes$.length; _i < _len; i = ++_i) { + for (i = j = 0, len = visibleNodes$.length; j < len; i = ++j) { node = visibleNodes$[i]; if (node === currentNode$[0]) { newIndex = up ? i - 1 : i + 1; @@ -225,7 +285,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 currentQuery = ''; searchNodes = function(queryString) { - var c, filtered, matched, matcher, nodeInfo, p, _i, _j, _k, _len, _len1, _len2, _results; + var c, filtered, j, k, l, len, len1, len2, matched, matcher, nodeInfo, p, results; queryString = queryString.toLowerCase().replace(/\s+/, ''); if (queryString === currentQuery) { return; @@ -235,18 +295,18 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 return clearFilter(); } matcher = new RegExp(((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = queryString.length; _i < _len; _i++) { - c = queryString[_i]; - _results.push(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/, "\\$&")); + var j, len, results; + results = []; + for (j = 0, len = queryString.length; j < len; j++) { + c = queryString[j]; + results.push(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/, "\\$&")); } - return _results; + return results; })()).join('.*')); matched = []; filtered = []; - for (_i = 0, _len = searchableNodes.length; _i < _len; _i++) { - nodeInfo = searchableNodes[_i]; + for (j = 0, len = searchableNodes.length; j < len; j++) { + nodeInfo = searchableNodes[j]; if (matcher.test(nodeInfo[0])) { matched.push(nodeInfo); } else { @@ -257,53 +317,53 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 return clearFilter(); } nav$.addClass('searching'); - for (_j = 0, _len1 = filtered.length; _j < _len1; _j++) { - nodeInfo = filtered[_j]; + for (k = 0, len1 = filtered.length; k < len1; k++) { + nodeInfo = filtered[k]; nodeInfo[1].removeClass('matched-child'); nodeInfo[1].addClass('filtered'); clearHighlight(nodeInfo[2]); } - _results = []; - for (_k = 0, _len2 = matched.length; _k < _len2; _k++) { - nodeInfo = matched[_k]; + results = []; + for (l = 0, len2 = matched.length; l < len2; l++) { + nodeInfo = matched[l]; nodeInfo[1].removeClass('filtered matched-child'); nodeInfo[1].addClass('matched'); highlightMatch(nodeInfo[2], queryString); - _results.push((function() { - var _l, _len3, _ref, _results1; - _ref = nodeInfo[1].parents('li'); - _results1 = []; - for (_l = 0, _len3 = _ref.length; _l < _len3; _l++) { - p = _ref[_l]; - _results1.push($(p).addClass('matched-child')); + results.push((function() { + var len3, m, ref, results1; + ref = nodeInfo[1].parents('li'); + results1 = []; + for (m = 0, len3 = ref.length; m < len3; m++) { + p = ref[m]; + results1.push($(p).addClass('matched-child')); } - return _results1; + return results1; })()); } - return _results; + return results; }; clearFilter = function() { - var nodeInfo, _i, _len, _results; + var j, len, nodeInfo, results; nav$.removeClass('searching'); currentQuery = ''; - _results = []; - for (_i = 0, _len = searchableNodes.length; _i < _len; _i++) { - nodeInfo = searchableNodes[_i]; + results = []; + for (j = 0, len = searchableNodes.length; j < len; j++) { + nodeInfo = searchableNodes[j]; nodeInfo[1].removeClass('filtered matched-child'); - _results.push(clearHighlight(nodeInfo[2])); + results.push(clearHighlight(nodeInfo[2])); } - return _results; + return results; }; highlightMatch = function(text$, queryString) { - var char, foundIndex, furthestIndex, lowerText, markedText, nodeText, _i, _len; + var char, foundIndex, furthestIndex, j, len, lowerText, markedText, nodeText; nodeText = text$.text(); lowerText = nodeText.toLowerCase(); markedText = ''; furthestIndex = 0; - for (_i = 0, _len = queryString.length; _i < _len; _i++) { - char = queryString[_i]; + for (j = 0, len = queryString.length; j < len; j++) { + char = queryString[j]; foundIndex = lowerText.indexOf(char, furthestIndex); markedText += nodeText.slice(furthestIndex, foundIndex) + ("" + nodeText[foundIndex] + ""); furthestIndex = foundIndex + 1; @@ -318,7 +378,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 fileMap = {}; buildNav = function(metaInfo) { - var node, sourceURL, _i, _len; + var j, len, node, sourceURL; nav$ = $("").appendTo($('body')); toc$ = nav$.find('.toc'); if (metaInfo.githubURL) { @@ -329,15 +389,15 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 } nav$.find('.tools').prepend("
    3. \n \n View source on GitHub\n \n
    4. "); } - for (_i = 0, _len = tableOfContents.length; _i < _len; _i++) { - node = tableOfContents[_i]; + for (j = 0, len = tableOfContents.length; j < len; j++) { + node = tableOfContents[j]; toc$.append(buildTOCNode(node, metaInfo)); } return nav$; }; buildTOCNode = function(node, metaInfo) { - var c, children$, clickLabel, discloser, discloser$, label$, node$, _i, _len, _ref, _ref1, _ref2; + var c, children$, clickLabel, discloser, discloser$, j, label$, len, node$, ref, ref1, ref2; node$ = $("
    5. "); discloser = null; switch (node.type) { @@ -361,11 +421,11 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 return false; }; } - if (((_ref = node.children) != null ? _ref.length : void 0) > 0) { + if (((ref = node.children) != null ? ref.length : void 0) > 0) { children$ = $('
        '); - _ref1 = node.children; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - c = _ref1[_i]; + ref1 = node.children; + for (j = 0, len = ref1.length; j < len; j++) { + c = ref1[j]; children$.append(buildTOCNode(c, metaInfo)); } node$.append(children$); @@ -373,7 +433,7 @@ f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3 label$ = node$.find('> .label'); label$.click(clickLabel); discloser$ = $('').prependTo(label$); - if (!(((_ref2 = node.children) != null ? _ref2.length : void 0) > 0)) { + if (!(((ref2 = node.children) != null ? ref2.length : void 0) > 0)) { discloser$.addClass('placeholder'); } discloser = discloser$.get(0); diff --git a/assets/style.css b/assets/style.css index f9e0d43..3804e61 100644 --- a/assets/style.css +++ b/assets/style.css @@ -1 +1 @@ -html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html,body{height:100%}#document{min-height:100%}body{max-width:33em}.segment{padding:0.5em 0 0.5em 33em;white-space:nowrap}.segment:first-child{padding-top:4.1em}.segment:last-child{padding-bottom:2em}.segment .comments,.segment .code{display:inline-block;vertical-align:top;padding:0 2em}.segment .comments{margin-left:-33em;width:29em;white-space:normal}.segment .code{white-space:pre}#meta{position:absolute;left:33em;padding:0.25em 1em}@media (max-width: 53em){html{font-size:1em}}@media (max-width: 52.94111em){html{font-size:0.99889em}}@media (max-width: 52.88222em){html{font-size:0.99778em}}@media (max-width: 52.82333em){html{font-size:0.99667em}}@media (max-width: 52.76444em){html{font-size:0.99556em}}@media (max-width: 52.70556em){html{font-size:0.99444em}}@media (max-width: 52.64667em){html{font-size:0.99333em}}@media (max-width: 52.58778em){html{font-size:0.99222em}}@media (max-width: 52.52889em){html{font-size:0.99111em}}@media (max-width: 52.47em){html{font-size:0.99em}}@media (max-width: 52.41111em){html{font-size:0.98889em}}@media (max-width: 52.35222em){html{font-size:0.98778em}}@media (max-width: 52.29333em){html{font-size:0.98667em}}@media (max-width: 52.23444em){html{font-size:0.98556em}}@media (max-width: 52.17556em){html{font-size:0.98444em}}@media (max-width: 52.11667em){html{font-size:0.98333em}}@media (max-width: 52.05778em){html{font-size:0.98222em}}@media (max-width: 51.99889em){html{font-size:0.98111em}}@media (max-width: 51.94em){html{font-size:0.98em}}@media (max-width: 51.88111em){html{font-size:0.97889em}}@media (max-width: 51.82222em){html{font-size:0.97778em}}@media (max-width: 51.76333em){html{font-size:0.97667em}}@media (max-width: 51.70444em){html{font-size:0.97556em}}@media (max-width: 51.64556em){html{font-size:0.97444em}}@media (max-width: 51.58667em){html{font-size:0.97333em}}@media (max-width: 51.52778em){html{font-size:0.97222em}}@media (max-width: 51.46889em){html{font-size:0.97111em}}@media (max-width: 51.41em){html{font-size:0.97em}}@media (max-width: 51.35111em){html{font-size:0.96889em}}@media (max-width: 51.29222em){html{font-size:0.96778em}}@media (max-width: 51.23333em){html{font-size:0.96667em}}@media (max-width: 51.17444em){html{font-size:0.96556em}}@media (max-width: 51.11556em){html{font-size:0.96444em}}@media (max-width: 51.05667em){html{font-size:0.96333em}}@media (max-width: 50.99778em){html{font-size:0.96222em}}@media (max-width: 50.93889em){html{font-size:0.96111em}}@media (max-width: 50.88em){html{font-size:0.96em}}@media (max-width: 50.82111em){html{font-size:0.95889em}}@media (max-width: 50.76222em){html{font-size:0.95778em}}@media (max-width: 50.70333em){html{font-size:0.95667em}}@media (max-width: 50.64444em){html{font-size:0.95556em}}@media (max-width: 50.58556em){html{font-size:0.95444em}}@media (max-width: 50.52667em){html{font-size:0.95333em}}@media (max-width: 50.46778em){html{font-size:0.95222em}}@media (max-width: 50.40889em){html{font-size:0.95111em}}@media (max-width: 50.35em){html{font-size:0.95em}}@media (max-width: 50.29111em){html{font-size:0.94889em}}@media (max-width: 50.23222em){html{font-size:0.94778em}}@media (max-width: 50.17333em){html{font-size:0.94667em}}@media (max-width: 50.11444em){html{font-size:0.94556em}}@media (max-width: 50.05556em){html{font-size:0.94444em}}@media (max-width: 49.99667em){html{font-size:0.94333em}}@media (max-width: 49.93778em){html{font-size:0.94222em}}@media (max-width: 49.87889em){html{font-size:0.94111em}}@media (max-width: 49.82em){html{font-size:0.94em}}@media (max-width: 49.76111em){html{font-size:0.93889em}}@media (max-width: 49.70222em){html{font-size:0.93778em}}@media (max-width: 49.64333em){html{font-size:0.93667em}}@media (max-width: 49.58444em){html{font-size:0.93556em}}@media (max-width: 49.52556em){html{font-size:0.93444em}}@media (max-width: 49.46667em){html{font-size:0.93333em}}@media (max-width: 49.40778em){html{font-size:0.93222em}}@media (max-width: 49.34889em){html{font-size:0.93111em}}@media (max-width: 49.29em){html{font-size:0.93em}}@media (max-width: 49.23111em){html{font-size:0.92889em}}@media (max-width: 49.17222em){html{font-size:0.92778em}}@media (max-width: 49.11333em){html{font-size:0.92667em}}@media (max-width: 49.05444em){html{font-size:0.92556em}}@media (max-width: 48.99556em){html{font-size:0.92444em}}@media (max-width: 48.93667em){html{font-size:0.92333em}}@media (max-width: 48.87778em){html{font-size:0.92222em}}@media (max-width: 48.81889em){html{font-size:0.92111em}}@media (max-width: 48.76em){html{font-size:0.92em}}@media (max-width: 48.70111em){html{font-size:0.91889em}}@media (max-width: 48.64222em){html{font-size:0.91778em}}@media (max-width: 48.58333em){html{font-size:0.91667em}}@media (max-width: 48.52444em){html{font-size:0.91556em}}@media (max-width: 48.46556em){html{font-size:0.91444em}}@media (max-width: 48.40667em){html{font-size:0.91333em}}@media (max-width: 48.34778em){html{font-size:0.91222em}}@media (max-width: 48.28889em){html{font-size:0.91111em}}@media (max-width: 48.23em){html{font-size:0.91em}}@media (max-width: 48.17111em){html{font-size:0.90889em}}@media (max-width: 48.11222em){html{font-size:0.90778em}}@media (max-width: 48.05333em){html{font-size:0.90667em}}@media (max-width: 47.99444em){html{font-size:0.90556em}}@media (max-width: 47.93556em){html{font-size:0.90444em}}@media (max-width: 47.87667em){html{font-size:0.90333em}}@media (max-width: 47.81778em){html{font-size:0.90222em}}@media (max-width: 47.75889em){html{font-size:0.90111em}}@media (max-width: 47.7em){html{font-size:0.9em}}@media (max-width: 47.64111em){html{font-size:0.89889em}}@media (max-width: 47.58222em){html{font-size:0.89778em}}@media (max-width: 47.52333em){html{font-size:0.89667em}}@media (max-width: 47.46444em){html{font-size:0.89556em}}@media (max-width: 47.40556em){html{font-size:0.89444em}}@media (max-width: 47.34667em){html{font-size:0.89333em}}@media (max-width: 47.28778em){html{font-size:0.89222em}}@media (max-width: 47.22889em){html{font-size:0.89111em}}@media (max-width: 47.17em){html{font-size:0.89em}}@media (max-width: 47.11111em){html{font-size:0.88889em}}@media (max-width: 47.05222em){html{font-size:0.88778em}}@media (max-width: 46.99333em){html{font-size:0.88667em}}@media (max-width: 46.93444em){html{font-size:0.88556em}}@media (max-width: 46.87556em){html{font-size:0.88444em}}@media (max-width: 46.81667em){html{font-size:0.88333em}}@media (max-width: 46.75778em){html{font-size:0.88222em}}@media (max-width: 46.69889em){html{font-size:0.88111em}}@media (max-width: 46.64em){html{font-size:0.88em}}@media (max-width: 46.58111em){html{font-size:0.87889em}}@media (max-width: 46.52222em){html{font-size:0.87778em}}@media (max-width: 46.46333em){html{font-size:0.87667em}}@media (max-width: 46.40444em){html{font-size:0.87556em}}@media (max-width: 46.34556em){html{font-size:0.87444em}}@media (max-width: 46.28667em){html{font-size:0.87333em}}@media (max-width: 46.22778em){html{font-size:0.87222em}}@media (max-width: 46.16889em){html{font-size:0.87111em}}@media (max-width: 46.11em){html{font-size:0.87em}}@media (max-width: 46.05111em){html{font-size:0.86889em}}@media (max-width: 45.99222em){html{font-size:0.86778em}}@media (max-width: 45.93333em){html{font-size:0.86667em}}@media (max-width: 45.87444em){html{font-size:0.86556em}}@media (max-width: 45.81556em){html{font-size:0.86444em}}@media (max-width: 45.75667em){html{font-size:0.86333em}}@media (max-width: 45.69778em){html{font-size:0.86222em}}@media (max-width: 45.63889em){html{font-size:0.86111em}}@media (max-width: 45.58em){html{font-size:0.86em}}@media (max-width: 45.52111em){html{font-size:0.85889em}}@media (max-width: 45.46222em){html{font-size:0.85778em}}@media (max-width: 45.40333em){html{font-size:0.85667em}}@media (max-width: 45.34444em){html{font-size:0.85556em}}@media (max-width: 45.28556em){html{font-size:0.85444em}}@media (max-width: 45.22667em){html{font-size:0.85333em}}@media (max-width: 45.16778em){html{font-size:0.85222em}}@media (max-width: 45.10889em){html{font-size:0.85111em}}@media (max-width: 45.05em){html{font-size:1em}body{margin:0 auto}.segment{padding:0;white-space:normal;max-width:29em;margin:0 auto}.segment .comments,.segment .code{display:block;padding:1em}.segment .comments{margin-left:0;width:auto}.segment .code{display:block;overflow-y:hidden;overflow-x:auto}.segment .code .wrapper{display:inline-block}#meta{position:static;margin:2em 0 0 0;overflow-y:hidden;overflow-x:auto}#meta .file-path{display:inline-block}}nav{position:fixed;top:0;right:0;width:20em}@media (max-width: 45.05em){nav{left:0;width:100%}}nav .tools{position:relative;z-index:100}nav .tools li{display:table-cell;vertical-align:middle;text-align:center;white-space:nowrap;height:2.1em;padding:0 0.55em}nav .tools .github{padding:0}nav .tools .github a{display:block;height:2.1em;width:2.1em;text-indent:-9001em}nav .tools .search{width:100%}nav .tools .search input{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%}nav .toc{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:2.1em;bottom:0;width:100%;overflow-x:hidden;overflow-y:auto}nav .toc li{position:relative}nav .toc .label{display:block;line-height:2em;padding:0 0.55em 0 0.55em}nav .toc li li .label{padding-left:1.1em}nav .toc li li li .label{padding-left:1.65em}nav .toc li li li li .label{padding-left:2.2em}nav .toc li li li li li .label{padding-left:2.75em}nav .toc li li li li li li .label{padding-left:3.3em}nav{-moz-transition:height 150ms 0;-o-transition:height 150ms 0;-webkit-transition:height 150ms 0;transition:height 150ms 0}nav .tools .toggle{-moz-transition:background 150ms;-o-transition:background 150ms;-webkit-transition:background 150ms;transition:background 150ms}nav.active{-moz-transition:height 0;-o-transition:height 0;-webkit-transition:height 0;transition:height 0;height:100%}nav .toc{-moz-transition:right 150ms;-o-transition:right 150ms;-webkit-transition:right 150ms;transition:right 150ms;right:-100%}nav.active .toc{right:0}@media (max-width: 45.05em){nav .toc{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;right:auto;left:-100%}nav.active .toc{left:0}}@media (max-width: 45.05em){body{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;position:relative;left:0}html.popped{overflow:hidden}html.popped body{left:100%;overflow:hidden}}nav .toc .children,nav .toc .outline{display:none}nav .toc .expanded>.children,nav .toc .expanded>.outline,nav .toc .expanded>.outline .children{display:block}nav .toc .discloser{-moz-transition-property:-moz-transform,-webkit-transform,-o-transform,-moz-transform;-o-transition-property:-moz-transform,-webkit-transform,-o-transform,-o-transform;-webkit-transition-property:-moz-transform,-webkit-transform,-o-transform,-webkit-transform;transition-property:-moz-transform -webkit-transform -o-transform transform;-moz-transition-duration:200ms;-o-transition-duration:200ms;-webkit-transition-duration:200ms;transition-duration:200ms;-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);display:inline-block;height:9px;width:9px;padding:0.2em;margin:0.2em 0.2em -0.2em 0.2em;vertical-align:baseline;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGQzE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGRDE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0ZBMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0ZCMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nQHMgwAAAM1JREFUeNpi/P//P0NJSYkuAwNDJhDXAPE7BjIAExIbZNA9IC4CYjZKDAIBfiDuBeLzQOxBiUEwoAXE26FYixKDYMAD6rpeqGvJNogBGl5F0PDLpMQgGBAC4mlQF9pTYhAMGADxASBeB8RylBgEA4FAfAOIW4CYhxKDQIAZxmChwJD1QFwGxHfINegaEGcB8UFyA/sd1AA9dEOIddFfIJ4OzdAfcSkiZNAOIC6GegcvwGXQHagBm8jNtB+hBmiTYgi6i+ZCw+EFOWkBIMAA1W4l62UzKWwAAAAASUVORK5CYII=') center center no-repeat;background-size:9px 9px}nav .toc .discloser.placeholder,nav .toc .expanded>.outline .discloser{background:none}nav .toc .expanded>.label .discloser{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}nav .toc .filtered>.label{display:none}nav .toc .matched-child>.label{display:block}nav .toc .matched-child>.children,nav .toc .matched-child>.outline,nav .toc .matched-child>.outline .children{display:block}nav .toc .matched>.children,nav .toc .matched>.outline,nav .toc .matched>.outline .children{display:block}nav.searching .toc .discloser{display:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}.comments .wrapper h1,.comments .wrapper h2,.comments .wrapper h3,.comments .wrapper h4,.comments .wrapper h5,.comments .wrapper h6{font-family:"HelveticaNeue-UltraLight","Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:100;letter-spacing:0.0625em;line-height:1.25;margin-bottom:0.5em}.comments .wrapper h1{font-size:2.5em}.comments .wrapper h2{font-size:2em}.comments .wrapper h3{font-size:1.6em}.comments .wrapper h4{font-size:1.4em}.comments .wrapper h5{font-size:1.3em}.comments .wrapper h6{font-size:1.2em}.comments .wrapper p{margin:1em 0}.comments .wrapper>*:first-child{margin-top:0}.comments .wrapper>*:last-child{margin-bottom:0}.comments .wrapper ol,.comments .wrapper ul{padding-left:1.75em;margin:1em 0}.comments .wrapper ol li{list-style:decimal}.comments .wrapper ul li{list-style:disc}.comments .wrapper li{margin:1em 0}.comments .wrapper li:first-child{margin-top:0}.comments .wrapper li:last-child{margin-bottom:0}.comments .wrapper code{display:inline-block;padding:0.25em 0.25em 0 0.25em}.comments .wrapper pre{display:block;overflow-x:auto;overflow-y:hidden}.comments .wrapper pre .hljs-comment,.comments .wrapper pre .hljs-template_comment,.comments .wrapper pre .diff .hljs-header,.comments .wrapper pre .hljs-doctype,.comments .wrapper pre .hljs-pi,.comments .wrapper pre .lisp .hljs-string,.comments .wrapper pre .hljs-javadoc{color:#93a1a1;font-style:italic}.comments .wrapper pre .hljs-keyword,.comments .wrapper pre .hljs-winutils,.comments .wrapper pre .method,.comments .wrapper pre .hljs-addition,.comments .wrapper pre .css .hljs-tag,.comments .wrapper pre .hljs-request,.comments .wrapper pre .hljs-status,.comments .wrapper pre .nginx .hljs-title{color:#859900}.comments .wrapper pre .hljs-number,.comments .wrapper pre .hljs-command,.comments .wrapper pre .hljs-string,.comments .wrapper pre .hljs-tag .hljs-value,.comments .wrapper pre .hljs-rules .hljs-value,.comments .wrapper pre .hljs-phpdoc,.comments .wrapper pre .tex .hljs-formula,.comments .wrapper pre .hljs-regexp,.comments .wrapper pre .hljs-hexcolor{color:#2aa198}.comments .wrapper pre .hljs-title,.comments .wrapper pre .hljs-localvars,.comments .wrapper pre .hljs-chunk,.comments .wrapper pre .hljs-decorator,.comments .wrapper pre .hljs-built_in,.comments .wrapper pre .hljs-identifier,.comments .wrapper pre .vhdl .hljs-literal,.comments .wrapper pre .hljs-id,.comments .wrapper pre .css .hljs-function{color:#268bd2}.comments .wrapper pre .hljs-attribute,.comments .wrapper pre .hljs-variable,.comments .wrapper pre .lisp .hljs-body,.comments .wrapper pre .smalltalk .hljs-number,.comments .wrapper pre .hljs-constant,.comments .wrapper pre .hljs-class .hljs-title,.comments .wrapper pre .hljs-parent,.comments .wrapper pre .haskell .hljs-type{color:#b58900}.comments .wrapper pre .hljs-preprocessor,.comments .wrapper pre .hljs-preprocessor .hljs-keyword,.comments .wrapper pre .hljs-pragma,.comments .wrapper pre .hljs-shebang,.comments .wrapper pre .hljs-symbol,.comments .wrapper pre .hljs-symbol .hljs-string,.comments .wrapper pre .diff .hljs-change,.comments .wrapper pre .hljs-special,.comments .wrapper pre .hljs-attr_selector,.comments .wrapper pre .hljs-important,.comments .wrapper pre .hljs-subst,.comments .wrapper pre .hljs-cdata,.comments .wrapper pre .clojure .hljs-title,.comments .wrapper pre .css .hljs-pseudo{color:#cb4b16}.comments .wrapper pre .hljs-deletion{color:#dc322f}.comments .wrapper pre .tex .hljs-formula{background:#eee8d5}.comments .wrapper pre code{padding:1em}.comments .wrapper blockquote{padding:0 1em}.comments .wrapper strong{font-weight:700}.comments .wrapper em{font-style:italic}html{background:#4a525a}#document{background:#f5fbff url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI3MmMzMCIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjM2U0NTRjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNGE1MjVhIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 33em no-repeat;background:#f5fbff -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #272c30),color-stop(30%, #3e454c),color-stop(100%, #4a525a)) 33em no-repeat;background:#f5fbff -moz-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff -webkit-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff linear-gradient(to right, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;margin-right:-1em;padding-right:1em}@media (max-width: 45.05em){#document{margin-right:0;padding-right:0}}#meta>*{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#272c30 1px 1px 0}#meta>*,#meta>* a{color:#9faab7}#meta>* a{text-decoration:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#fff 1px 1px 0;color:#4a525a}.code .wrapper{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;text-shadow:#272c30 1px 1px 0;color:#cbd1d8}.code .wrapper .hljs{display:block;padding:0.5em}.code .wrapper .hljs-comment,.code .wrapper .hljs-template_comment,.code .wrapper .diff .hljs-header,.code .wrapper .hljs-doctype,.code .wrapper .hljs-pi,.code .wrapper .lisp .hljs-string,.code .wrapper .hljs-javadoc{color:#b1bac4;font-style:italic}.code .wrapper .hljs-keyword,.code .wrapper .hljs-winutils,.code .wrapper .method,.code .wrapper .hljs-addition,.code .wrapper .css .hljs-tag,.code .wrapper .hljs-request,.code .wrapper .hljs-status,.code .wrapper .nginx .hljs-title{color:#e0c090}.code .wrapper .hljs-string{color:#e9baba}.code .wrapper .hljs-property{color:#b9d0af}.code .wrapper .hljs-function{color:#abd9cf}.code .wrapper .hljs-class{color:#cee4dd}.code .wrapper .hljs-number,.code .wrapper .hljs-command,.code .wrapper .hljs-tag .hljs-value,.code .wrapper .hljs-rules .hljs-value,.code .wrapper .hljs-phpdoc,.code .wrapper .tex .hljs-formula,.code .wrapper .hljs-regexp,.code .wrapper .hljs-hexcolor{color:#cba8d6}.code .wrapper .hljs-title,.code .wrapper .hljs-localvars,.code .wrapper .hljs-chunk,.code .wrapper .hljs-decorator,.code .wrapper .hljs-built_in,.code .wrapper .hljs-identifier,.code .wrapper .vhdl .hljs-literal,.code .wrapper .hljs-id,.code .wrapper .css .hljs-function{color:#a9c2ba}.code .wrapper .hljs-attribute,.code .wrapper .hljs-variable,.code .wrapper .lisp .hljs-body,.code .wrapper .smalltalk .hljs-number,.code .wrapper .hljs-constant,.code .wrapper .hljs-class .hljs-title,.code .wrapper .hljs-parent,.code .wrapper .haskell .hljs-type{color:#b9d0af}.code .wrapper .hljs-preprocessor,.code .wrapper .hljs-preprocessor .hljs-keyword,.code .wrapper .hljs-pragma,.code .wrapper .hljs-shebang,.code .wrapper .hljs-symbol,.code .wrapper .hljs-symbol .hljs-string,.code .wrapper .diff .hljs-change,.code .wrapper .hljs-special,.code .wrapper .hljs-attr_selector,.code .wrapper .hljs-important,.code .wrapper .hljs-subst,.code .wrapper .hljs-cdata,.code .wrapper .clojure .hljs-title,.code .wrapper .css .hljs-pseudo{color:#cee4dd}.code .wrapper .hljs-deletion{color:#dc322f}.code .wrapper .tex .hljs-formula{background:#e9baba}@media (max-width: 45.05em){.code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;-moz-box-shadow:#272c30 0 0 0.5em 0.2em inset;-webkit-box-shadow:#272c30 0 0 0.5em 0.2em inset;box-shadow:#272c30 0 0 0.5em 0.2em inset;background:#4a525a}.code .wrapper{-moz-box-shadow:#4a525a 0 0 0.25em 0.75em;-webkit-box-shadow:#4a525a 0 0 0.25em 0.75em;box-shadow:#4a525a 0 0 0.25em 0.75em;background:#4a525a}}@media (max-width: 29em){.code{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}}nav{text-shadow:#f0f0f0 1px 1px 0;color:#4a525a}nav .tools,nav .toc{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}nav .tools{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZGNkY2QiIHN0b3Atb3BhY2l0eT0iMC45Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.9)),color-stop(100%, rgba(205,205,205,0.9)));background:-moz-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:-webkit-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:linear-gradient(to bottom, rgba(255,255,255,0.9),rgba(205,205,205,0.9));-moz-border-radius-bottomleft:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;border-bottom:1px solid #4a525a;border-left:1px solid #4a525a}@media (max-width: 53em){nav .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}nav .tools li{border-right:1px solid #4a525a}nav .tools li:last-child{border-right:none}nav .tools .toggle{cursor:pointer}nav .tools .github a{-moz-transition:opacity 200ms;-o-transition:opacity 200ms;-webkit-transition:opacity 200ms;transition:opacity 200ms;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGODE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGOTE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0Y2MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0Y3MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FC/Z5AAACv9JREFUeNrMWXl0VNUdvu/NmzWZJQnZN0hCWIQEIQuErUCBI2qwEAFRBJUeDvUPDwfKVhDUY2mPp8spakVELSq11goIiCBbUVKKUGKQQFiCSBJIQjLJZPbJzOt3J/dOXiYJgcqh3nO+vPfm3Xfvd3/3t94IsiyTH2sTyY+4SfxGpVIpfzdBokdxjQHOADuAj4GmuzRvFjAbmAZkAocEQZjLX/r9/vYbuq0UgigoQKagsxyG74FlgB4gYdAA0UASkAIkACahvSn70Xd/AlrCxm4VRDEBIBScUxg5wiCs7oZcEJDwN7g+AswH3gAOApVALdAIWIEGtpgyYAfwPFtYTU/jbtmy5W/gsZAugnMKbSsJ2oXAn1J62o9AIJCDy/ZgbzbQLVoqkAtM722fa2pqYnHJwfgmXG23MgjV7SjO3bR06BnlogUSe7PW+ntplXQHUlNTHewxqjdyR+8lOehxYNCgQa3hnHoil8a18F60trY2cenSpYU+n48qfXMnvaEQYcIMQ4KmrbAk/Cb3ZGV3gt7GWbx4cSm4xHd1JR2+aPfdIPK/ICIiwlNaWroKfMSgwDq0Moj78feB/1e4cjqdmq1btz6C25921jk5iOLe4i2XdDh+aF/ejhw5ksYEZJE6BAeHSuT83nyaMTLSZzAYfO2K7BPdbo/k9ngkOM8u32i1moBep2/TarVtGrU64PZ6VC0tLVqv1ydyFxLeamtrzbgYgJFSh+Bk2jOpe1ICmf7QtKp5856sHJo7zGoym4Lk3G636HQ4JXurTd3U1KTBtqgcTpcQZTYHIiIjfNExMV6DIaINuuTX6XQBp8sp1t24odv3+d6UN9/cPPTqtWpjOEFYLOeUI3CJwJJULAMZFE5u9cqVx1/esKE8jLebgWc3akCjjIFKbwF46dw0AlLXVnXpUlzx9OJpZyvO9VEShJR9LpfrHdy2SgqDCEB83i7Elj53NozYKeAY3QHAE0ZOz0KQmukuJ+VifUPkMrKyjO9t2bzvwUdmbL5eV2/gBBVE1crAL/OAy4mlJSe5Vq5Zd0pB7O/4OB7XXwJbgC/pYLHRFhJtNhONRk1q6xtIv+RE4vJ4SUOTldTdDKWABcBi+g3wdtH9OfaHJ4zaVpg7NHvH/oPrFKGMW4wghYn/uvJhwvjx1UZLFN+6I/iQ3r/Pnh+iGQcWUVPfaCWNzTZiiowgMA5yo7GJ1N5oIP4OI4llmQzV6QVAdenp8v3J8X1IhF7aplarV0HXaE5IJEniH8md/RwhFZ1iWFoqj3dUop8yQrzFPPvss78Cuf48e7W22IjL7SHXauuUxGgbpTS2goKC5fhu9InyCnLmfFWDiByQv6OOuCu5dmEeU46Iyfj7CqzKwXQp1OLj4wfSrcJEll78q0b5EBMTQ4k++V3N9cE6rVYCuRCP5OTkFm5ECskJFMdxd5X/dLOh3shuG9n1n8pMYuLEiQ10sawmuFU7SQMAfxg3bhxXn1yLyWDx+X0mhVT5O2d4NLADb/GHr0/9J97ltFO9lDJSgruyC3gpNjb20tq1a4+OHj26OaxQGgDMYxarbN8BTxuNxm9nzZr1zZIlS6r4GiWVekhbW0BL9Q0L9s+dO/dqKKfsJvCb4fMuMKuRP/nwvSN4//PHH55CsAXckqkhbGJ4nWYSbMCXmIKkKRNJhQeIATYqvs3PGZD1EX1F55s0adI5xbupXciJ7ddCWBCVopyekuw8ffJr2lkzMLMviYky0/7UeRcDNIMYxbeIKf6IvLy8madOnZqId1KEQU8S4/rA1ZiwODX9Ng9YCcxc/sxjkyWVivo+GRGkurKy8j1G7DW6YGWECMVY2hKTEicjHH1stVpNSYkJztmPlqw/uG/vK/6ATPeC+Nv88JIqUg2X0epwEo/XW4LPltMaFNs+vays7HhSUtLS9OTEpgi9jkRbTMRmd5Ios5G0OuGTA/LkMxcubWtr89MIcRnZyLYnnniC70Ap8JfutjWE9evXF02YMKGCiz0hPu5YWlLC/PuyMzOGZGdKOQP7k76pSSR3YDZJSYyDVE0js7KyVhw88MVQjJkODAR0AzLSyJi8XIJvzMMGZU+M7xP9V5p4snHf3/jqxp+g35+Z1F4GTEFOCsktYCHmANCgKAX779q1a9W7776bd/jw4b6QpFEtSUSr0VyTJPE8vMB3Br2uSRREh0oUbPEpaQlFhQW5dXU3mtUaddzBA4crHE5HItba3+ly9/V4fWbMSQuo7SD2DsanPnQhEMnmfYM66c4Vf3txTFdSDTwakqAYrE2jgAV2u/2tvXv3/mPRokUfZWdnfwhvXhHKBBm4IYXhX8BrwC/wvmDZsmV9mFQXKgzgaeovRUXFr5QcdQcvAKupwFJSUkqqa6q3Kxw0lWIqU/rhly9fTsKWP1hdXR3dW4YL3fumqqrq1xqNhpZ9cewMhiYJNAKdpjqG+a9wy+56VsIkNXLkSOqIZXjx5s/37Z3QnS5SK4yMjDx8J/VBSUlJOb5bATwGUB3rC2j57gQ9BSuyeixwEJLiYdbUucq5uTnXNm3a1B3BXKDtTshZLBbnxYsXV1M31GW82yXH8ArXHbPZbENa/kc8zwPoQcvrwDU+Kd7ZIUUXq57cc+bMKeMlICKCC1sZWsTOnTs/wVyP3i65noqZjezEiNhsNiP83XPovBXYzHKy0EHPzJkzz6elpQXDGIj48/Pz67mWjhgxorqoqOhKKJGwWmkCUADdNXSuBTqrWG8V//d0hXq93spDEEd4Gz58eCMqdoENLtPqPXQyKUl+vK8PS8tMQaMQeDkqk477zkm+dAsjOzxjxozxXq/3rZMnT2Y0NzcbaIWFrXLjKqJKCqZJCHOy4qTIj+ghK47GBLwPhEsITddxL/R+7Npd++CDD86AyJPAMzU1NXGYW0C+5UHkGLhhw4axzL0IyiCvUomBsPM84QefCfd4oi2KlZhgQ2pq6ng83ke3xeFweHo6ykIKJCuykB90GCTdTicQpLq3AyR30oIXQXoRPzLopu9dO52S7uSUkrkXmq67uzMOOAMZRtDj6aeisrqt+UIjqTWasEHbM/eo2HiiQ07G9JtodDpibahTNdXdCPYzRBoFo8XCDr2D48h8clRutH8oROoMkaEVpQ8YzCxE6PEoMERubPHPFJZDvXOwpiB6gyF4/E5/87jcJDE9gxz7bMcDlBx1mOkZGS5UXMFxNHq9v29mf4+I+oIarj9ApCE5w+x8jhNl5emzSmbUBM8aRo3lUaBdCjJzKQrrVUhO23kVcrsP8nk9TJdUxGGzJXz2/pYXbtbWBI/JxkyavKd/Zlbr1StV9PCFDB6aW1dUmN/YLzOr5cK5iuizZ8v7PDD17S+HDLu/8tuy0wP+8NuXh/jdds/8BU9Fet3uXrc2RM7a0NBOjq1ECB0CtBMVoUu2psZxrVbrOKM5emeE2bj7iz27Ilauf/EZR2srVE3tXvP8ui+R55Hla9Z9tfDx2cVVFy6YP9r5acaRQ4deLZk9K9Nlt5fs3r0nc3h+4RRbc+PJAETL5RH0jWHOMKQPk+fM7+7cq+NjSSQum4M01V8nZ//9FfXyxRevXJ02ZtTI6TGxsVf6ZWWv2LP946ms8iofkDOsKeBx/06j1WtPHC99E7XEizSfA7LZ6LSSOzBl7lPuTkqOtn/bO53J3WHLAx4G6igRlvPPZO6FFiy/B2j5V0hLQvYNPcY4AVB/Sa3BEqwTCLnSo3e4S//oiGHFDTXh3cDFsIVMZXH8N4z8bbX/CjAA0UTEH4oMvREAAAAASUVORK5CYII=') center center no-repeat;background-size:19.5px 24px}nav .tools .github a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);opacity:0.9}nav.active .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}nav.active .tools .toggle{background:rgba(205,205,205,0.9);position:relative}nav .toc{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:rgba(230,230,230,0.9);border-left:1px solid #4a525a}nav .toc .label{color:#4a525a;text-decoration:none;border-top:1px solid rgba(192,192,192,0.9);border-bottom:1px solid rgba(192,192,192,0.9);margin-top:-1px}nav .toc .label:hover{background:rgba(205,205,205,0.9)}nav .toc .file>.label{font-weight:bold}nav .toc .selected>.label{background:#f5fbff}nav .toc .label em{font-weight:bold}nav .toc .file>.label em{color:#101214}nav .toc .matched-child>.label{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:0.65;text-shadow:none;background:rgba(192,192,192,0.9)}@media (max-width: 45.05em){nav .tools,nav .toc{border-left-width:0}nav .tools{background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NkY2RjZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),color-stop(100%, #cdcdcd));background:-moz-linear-gradient(top, #ffffff,#cdcdcd);background:-webkit-linear-gradient(top, #ffffff,#cdcdcd);background:linear-gradient(to bottom, #ffffff,#cdcdcd)}nav .toc{background:#e6e6e6}}.comments .wrapper a{display:inline-block;color:#a8614e;text-decoration:none}.comments .wrapper a:hover,.comments .wrapper a:hover *{text-decoration:underline}.comments .wrapper code{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;border:1px solid #e6e0d5}.comments .wrapper pre,.comments .wrapper code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;background:#fbf8f3}.comments .wrapper pre{-moz-box-shadow:#f2ece3 0 0 0.4em 0.2em;-webkit-box-shadow:#f2ece3 0 0 0.4em 0.2em;box-shadow:#f2ece3 0 0 0.4em 0.2em;border:1px solid #d9c9af}.comments .wrapper pre code{border-width:0;background:transparent}.comments .wrapper blockquote{border-left:0.15em solid #959fa8;margin-left:-0.15em}body{-webkit-text-size-adjust:100%}input[type="search"]{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;-moz-box-shadow:#ddd 0 1px 1px 0 inset;-webkit-box-shadow:#ddd 0 1px 1px 0 inset;box-shadow:#ddd 0 1px 1px 0 inset;border:1px solid #959595;padding:0.15em 0.8em}.comments.doc-section .wrapper{color:#252519}.comments.doc-section.doc-section-private .wrapper,.comments.doc-section.doc-section-protected .wrapper,.comments.doc-section.doc-section-internal .wrapper{color:#7f7f7f}.comments.doc-section .doc-section-header{font:bold 18px "helvetica neue",helvetica,sans-serif}.comments.doc-section .docs .doc-section-header code{font-size:18px}.code .marker,.code .marker.wrapper,.code .wrapper.marker{display:none}.code.folded .wrapper{display:none;cursor:default}.code.folded .marker{-moz-border-radius:0.2em;-webkit-border-radius:0.2em;border-radius:0.2em;-moz-box-shadow:#2f3539 1px 1px 1px 0;-webkit-box-shadow:#2f3539 1px 1px 1px 0;box-shadow:#2f3539 1px 1px 1px 0;display:inline-block;border:1px solid #73787f;padding:0.2em 0.5em;margin-left:-0.5em;margin-right:-0.5em;background:#58616b;font:12px "Droid Sans Mono",Menlo,Monaco,monospace;text-shadow:#2f3539 1px 1px 0px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.code.folded .marker .c1{color:#73787f;font-style:normal}.code.folded .marker:hover{background:#5f6872}.code.folded .marker:hover .c1{color:#7b8087}.code.folded .marker .c1:after{content:" …"} +html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html,body{height:100%}#document{min-height:100%}body{max-width:33em}.segment{padding:0.5em 0 0.5em 33em;white-space:nowrap}.segment:first-child{padding-top:4.1em}.segment:last-child{padding-bottom:2em}.segment .comments,.segment .code{display:inline-block;vertical-align:top;padding:0 2em}.segment .comments{margin-left:-33em;width:29em;white-space:normal}.segment .code{white-space:pre}#meta{position:absolute;left:33em;padding:0.25em 1em}@media (max-width: 53em){html{font-size:1em}}@media (max-width: 52.94111em){html{font-size:0.99889em}}@media (max-width: 52.88222em){html{font-size:0.99778em}}@media (max-width: 52.82333em){html{font-size:0.99667em}}@media (max-width: 52.76444em){html{font-size:0.99556em}}@media (max-width: 52.70556em){html{font-size:0.99444em}}@media (max-width: 52.64667em){html{font-size:0.99333em}}@media (max-width: 52.58778em){html{font-size:0.99222em}}@media (max-width: 52.52889em){html{font-size:0.99111em}}@media (max-width: 52.47em){html{font-size:0.99em}}@media (max-width: 52.41111em){html{font-size:0.98889em}}@media (max-width: 52.35222em){html{font-size:0.98778em}}@media (max-width: 52.29333em){html{font-size:0.98667em}}@media (max-width: 52.23444em){html{font-size:0.98556em}}@media (max-width: 52.17556em){html{font-size:0.98444em}}@media (max-width: 52.11667em){html{font-size:0.98333em}}@media (max-width: 52.05778em){html{font-size:0.98222em}}@media (max-width: 51.99889em){html{font-size:0.98111em}}@media (max-width: 51.94em){html{font-size:0.98em}}@media (max-width: 51.88111em){html{font-size:0.97889em}}@media (max-width: 51.82222em){html{font-size:0.97778em}}@media (max-width: 51.76333em){html{font-size:0.97667em}}@media (max-width: 51.70444em){html{font-size:0.97556em}}@media (max-width: 51.64556em){html{font-size:0.97444em}}@media (max-width: 51.58667em){html{font-size:0.97333em}}@media (max-width: 51.52778em){html{font-size:0.97222em}}@media (max-width: 51.46889em){html{font-size:0.97111em}}@media (max-width: 51.41em){html{font-size:0.97em}}@media (max-width: 51.35111em){html{font-size:0.96889em}}@media (max-width: 51.29222em){html{font-size:0.96778em}}@media (max-width: 51.23333em){html{font-size:0.96667em}}@media (max-width: 51.17444em){html{font-size:0.96556em}}@media (max-width: 51.11556em){html{font-size:0.96444em}}@media (max-width: 51.05667em){html{font-size:0.96333em}}@media (max-width: 50.99778em){html{font-size:0.96222em}}@media (max-width: 50.93889em){html{font-size:0.96111em}}@media (max-width: 50.88em){html{font-size:0.96em}}@media (max-width: 50.82111em){html{font-size:0.95889em}}@media (max-width: 50.76222em){html{font-size:0.95778em}}@media (max-width: 50.70333em){html{font-size:0.95667em}}@media (max-width: 50.64444em){html{font-size:0.95556em}}@media (max-width: 50.58556em){html{font-size:0.95444em}}@media (max-width: 50.52667em){html{font-size:0.95333em}}@media (max-width: 50.46778em){html{font-size:0.95222em}}@media (max-width: 50.40889em){html{font-size:0.95111em}}@media (max-width: 50.35em){html{font-size:0.95em}}@media (max-width: 50.29111em){html{font-size:0.94889em}}@media (max-width: 50.23222em){html{font-size:0.94778em}}@media (max-width: 50.17333em){html{font-size:0.94667em}}@media (max-width: 50.11444em){html{font-size:0.94556em}}@media (max-width: 50.05556em){html{font-size:0.94444em}}@media (max-width: 49.99667em){html{font-size:0.94333em}}@media (max-width: 49.93778em){html{font-size:0.94222em}}@media (max-width: 49.87889em){html{font-size:0.94111em}}@media (max-width: 49.82em){html{font-size:0.94em}}@media (max-width: 49.76111em){html{font-size:0.93889em}}@media (max-width: 49.70222em){html{font-size:0.93778em}}@media (max-width: 49.64333em){html{font-size:0.93667em}}@media (max-width: 49.58444em){html{font-size:0.93556em}}@media (max-width: 49.52556em){html{font-size:0.93444em}}@media (max-width: 49.46667em){html{font-size:0.93333em}}@media (max-width: 49.40778em){html{font-size:0.93222em}}@media (max-width: 49.34889em){html{font-size:0.93111em}}@media (max-width: 49.29em){html{font-size:0.93em}}@media (max-width: 49.23111em){html{font-size:0.92889em}}@media (max-width: 49.17222em){html{font-size:0.92778em}}@media (max-width: 49.11333em){html{font-size:0.92667em}}@media (max-width: 49.05444em){html{font-size:0.92556em}}@media (max-width: 48.99556em){html{font-size:0.92444em}}@media (max-width: 48.93667em){html{font-size:0.92333em}}@media (max-width: 48.87778em){html{font-size:0.92222em}}@media (max-width: 48.81889em){html{font-size:0.92111em}}@media (max-width: 48.76em){html{font-size:0.92em}}@media (max-width: 48.70111em){html{font-size:0.91889em}}@media (max-width: 48.64222em){html{font-size:0.91778em}}@media (max-width: 48.58333em){html{font-size:0.91667em}}@media (max-width: 48.52444em){html{font-size:0.91556em}}@media (max-width: 48.46556em){html{font-size:0.91444em}}@media (max-width: 48.40667em){html{font-size:0.91333em}}@media (max-width: 48.34778em){html{font-size:0.91222em}}@media (max-width: 48.28889em){html{font-size:0.91111em}}@media (max-width: 48.23em){html{font-size:0.91em}}@media (max-width: 48.17111em){html{font-size:0.90889em}}@media (max-width: 48.11222em){html{font-size:0.90778em}}@media (max-width: 48.05333em){html{font-size:0.90667em}}@media (max-width: 47.99444em){html{font-size:0.90556em}}@media (max-width: 47.93556em){html{font-size:0.90444em}}@media (max-width: 47.87667em){html{font-size:0.90333em}}@media (max-width: 47.81778em){html{font-size:0.90222em}}@media (max-width: 47.75889em){html{font-size:0.90111em}}@media (max-width: 47.7em){html{font-size:0.9em}}@media (max-width: 47.64111em){html{font-size:0.89889em}}@media (max-width: 47.58222em){html{font-size:0.89778em}}@media (max-width: 47.52333em){html{font-size:0.89667em}}@media (max-width: 47.46444em){html{font-size:0.89556em}}@media (max-width: 47.40556em){html{font-size:0.89444em}}@media (max-width: 47.34667em){html{font-size:0.89333em}}@media (max-width: 47.28778em){html{font-size:0.89222em}}@media (max-width: 47.22889em){html{font-size:0.89111em}}@media (max-width: 47.17em){html{font-size:0.89em}}@media (max-width: 47.11111em){html{font-size:0.88889em}}@media (max-width: 47.05222em){html{font-size:0.88778em}}@media (max-width: 46.99333em){html{font-size:0.88667em}}@media (max-width: 46.93444em){html{font-size:0.88556em}}@media (max-width: 46.87556em){html{font-size:0.88444em}}@media (max-width: 46.81667em){html{font-size:0.88333em}}@media (max-width: 46.75778em){html{font-size:0.88222em}}@media (max-width: 46.69889em){html{font-size:0.88111em}}@media (max-width: 46.64em){html{font-size:0.88em}}@media (max-width: 46.58111em){html{font-size:0.87889em}}@media (max-width: 46.52222em){html{font-size:0.87778em}}@media (max-width: 46.46333em){html{font-size:0.87667em}}@media (max-width: 46.40444em){html{font-size:0.87556em}}@media (max-width: 46.34556em){html{font-size:0.87444em}}@media (max-width: 46.28667em){html{font-size:0.87333em}}@media (max-width: 46.22778em){html{font-size:0.87222em}}@media (max-width: 46.16889em){html{font-size:0.87111em}}@media (max-width: 46.11em){html{font-size:0.87em}}@media (max-width: 46.05111em){html{font-size:0.86889em}}@media (max-width: 45.99222em){html{font-size:0.86778em}}@media (max-width: 45.93333em){html{font-size:0.86667em}}@media (max-width: 45.87444em){html{font-size:0.86556em}}@media (max-width: 45.81556em){html{font-size:0.86444em}}@media (max-width: 45.75667em){html{font-size:0.86333em}}@media (max-width: 45.69778em){html{font-size:0.86222em}}@media (max-width: 45.63889em){html{font-size:0.86111em}}@media (max-width: 45.58em){html{font-size:0.86em}}@media (max-width: 45.52111em){html{font-size:0.85889em}}@media (max-width: 45.46222em){html{font-size:0.85778em}}@media (max-width: 45.40333em){html{font-size:0.85667em}}@media (max-width: 45.34444em){html{font-size:0.85556em}}@media (max-width: 45.28556em){html{font-size:0.85444em}}@media (max-width: 45.22667em){html{font-size:0.85333em}}@media (max-width: 45.16778em){html{font-size:0.85222em}}@media (max-width: 45.10889em){html{font-size:0.85111em}}@media (max-width: 45.05em){html{font-size:1em}body{margin:0 auto}.segment{padding:0;white-space:normal;max-width:29em;margin:0 auto}.segment .comments,.segment .code{display:block;padding:1em}.segment .comments{margin-left:0;width:auto}.segment .code{display:block;overflow-y:hidden;overflow-x:auto}.segment .code .wrapper{display:inline-block}#meta{position:static;margin:2em 0 0 0;overflow-y:hidden;overflow-x:auto}#meta .file-path{display:inline-block}}nav{position:fixed;top:0;right:0;width:20em}@media (max-width: 45.05em){nav{left:0;width:100%}}nav .tools{position:relative;z-index:100}nav .tools li{display:table-cell;vertical-align:middle;text-align:center;white-space:nowrap;height:2.1em;padding:0 0.55em}nav .tools .github{padding:0}nav .tools .github a{display:block;height:2.1em;width:2.1em;text-indent:-9001em}nav .tools .search{width:100%}nav .tools .search input{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%}nav .toc{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:2.1em;bottom:0;width:100%;overflow-x:hidden;overflow-y:auto}nav .toc li{position:relative}nav .toc .label{display:block;line-height:2em;padding:0 0.55em 0 0.55em}nav .toc li li .label{padding-left:1.1em}nav .toc li li li .label{padding-left:1.65em}nav .toc li li li li .label{padding-left:2.2em}nav .toc li li li li li .label{padding-left:2.75em}nav .toc li li li li li li .label{padding-left:3.3em}nav{-moz-transition:height 150ms 0;-o-transition:height 150ms 0;-webkit-transition:height 150ms 0;transition:height 150ms 0}nav .tools .toggle{-moz-transition:background 150ms;-o-transition:background 150ms;-webkit-transition:background 150ms;transition:background 150ms}nav.active{-moz-transition:height 0;-o-transition:height 0;-webkit-transition:height 0;transition:height 0;height:100%}nav .toc{-moz-transition:right 150ms;-o-transition:right 150ms;-webkit-transition:right 150ms;transition:right 150ms;right:-100%}nav.active .toc{right:0}@media (max-width: 45.05em){nav .toc{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;right:auto;left:-100%}nav.active .toc{left:0}}@media (max-width: 45.05em){body{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;position:relative;left:0}html.popped{overflow:hidden}html.popped body{left:100%;overflow:hidden}}nav .toc .children,nav .toc .outline{display:none}nav .toc .expanded>.children,nav .toc .expanded>.outline,nav .toc .expanded>.outline .children{display:block}nav .toc .discloser{-moz-transition-property:-moz-transform,-webkit-transform,-o-transform,-moz-transform;-o-transition-property:-moz-transform,-webkit-transform,-o-transform,-o-transform;-webkit-transition-property:-moz-transform,-webkit-transform,-o-transform,-webkit-transform;transition-property:-moz-transform -webkit-transform -o-transform transform;-moz-transition-duration:200ms;-o-transition-duration:200ms;-webkit-transition-duration:200ms;transition-duration:200ms;-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);display:inline-block;height:9px;width:9px;padding:0.2em;margin:0.2em 0.2em -0.2em 0.2em;vertical-align:baseline;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGQzE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGRDE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0ZBMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0ZCMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nQHMgwAAAM1JREFUeNpi/P//P0NJSYkuAwNDJhDXAPE7BjIAExIbZNA9IC4CYjZKDAIBfiDuBeLzQOxBiUEwoAXE26FYixKDYMAD6rpeqGvJNogBGl5F0PDLpMQgGBAC4mlQF9pTYhAMGADxASBeB8RylBgEA4FAfAOIW4CYhxKDQIAZxmChwJD1QFwGxHfINegaEGcB8UFyA/sd1AA9dEOIddFfIJ4OzdAfcSkiZNAOIC6GegcvwGXQHagBm8jNtB+hBmiTYgi6i+ZCw+EFOWkBIMAA1W4l62UzKWwAAAAASUVORK5CYII=') center center no-repeat;background-size:9px 9px}nav .toc .discloser.placeholder,nav .toc .expanded>.outline .discloser{background:none}nav .toc .expanded>.label .discloser{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}nav .toc .filtered>.label{display:none}nav .toc .matched-child>.label{display:block}nav .toc .matched-child>.children,nav .toc .matched-child>.outline,nav .toc .matched-child>.outline .children{display:block}nav .toc .matched>.children,nav .toc .matched>.outline,nav .toc .matched>.outline .children{display:block}nav.searching .toc .discloser{display:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}.comments .wrapper h1,.comments .wrapper h2,.comments .wrapper h3,.comments .wrapper h4,.comments .wrapper h5,.comments .wrapper h6{font-family:"HelveticaNeue-UltraLight","Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:100;letter-spacing:0.0625em;line-height:1.25;margin-bottom:0.5em}.comments .wrapper h1{font-size:2.5em}.comments .wrapper h2{font-size:2em}.comments .wrapper h3{font-size:1.6em}.comments .wrapper h4{font-size:1.4em}.comments .wrapper h5{font-size:1.3em}.comments .wrapper h6{font-size:1.2em}.comments .wrapper p{margin:1em 0}.comments .wrapper>*:first-child{margin-top:0}.comments .wrapper>*:last-child{margin-bottom:0}.comments .wrapper ol,.comments .wrapper ul{padding-left:1.75em;margin:1em 0}.comments .wrapper ol li{list-style:decimal}.comments .wrapper ul li{list-style:disc}.comments .wrapper li{margin:1em 0}.comments .wrapper li:first-child{margin-top:0}.comments .wrapper li:last-child{margin-bottom:0}.comments .wrapper code{display:inline-block;padding:0.25em 0.25em 0 0.25em}.comments .wrapper pre{display:block;overflow-x:auto;overflow-y:hidden;margin-bottom:1em}.comments .wrapper pre .hljs-comment,.comments .wrapper pre .hljs-template_comment,.comments .wrapper pre .diff .hljs-header,.comments .wrapper pre .hljs-doctype,.comments .wrapper pre .hljs-pi,.comments .wrapper pre .lisp .hljs-string,.comments .wrapper pre .hljs-javadoc{color:#93a1a1;font-style:italic}.comments .wrapper pre .hljs-keyword,.comments .wrapper pre .hljs-winutils,.comments .wrapper pre .method,.comments .wrapper pre .hljs-addition,.comments .wrapper pre .css .hljs-tag,.comments .wrapper pre .hljs-request,.comments .wrapper pre .hljs-status,.comments .wrapper pre .nginx .hljs-title{color:#859900}.comments .wrapper pre .hljs-number,.comments .wrapper pre .hljs-command,.comments .wrapper pre .hljs-string,.comments .wrapper pre .hljs-tag .hljs-value,.comments .wrapper pre .hljs-rules .hljs-value,.comments .wrapper pre .hljs-phpdoc,.comments .wrapper pre .tex .hljs-formula,.comments .wrapper pre .hljs-regexp,.comments .wrapper pre .hljs-hexcolor{color:#2aa198}.comments .wrapper pre .hljs-title,.comments .wrapper pre .hljs-localvars,.comments .wrapper pre .hljs-chunk,.comments .wrapper pre .hljs-decorator,.comments .wrapper pre .hljs-built_in,.comments .wrapper pre .hljs-identifier,.comments .wrapper pre .vhdl .hljs-literal,.comments .wrapper pre .hljs-id,.comments .wrapper pre .css .hljs-function{color:#268bd2}.comments .wrapper pre .hljs-attribute,.comments .wrapper pre .hljs-variable,.comments .wrapper pre .lisp .hljs-body,.comments .wrapper pre .smalltalk .hljs-number,.comments .wrapper pre .hljs-constant,.comments .wrapper pre .hljs-class .hljs-title,.comments .wrapper pre .hljs-parent,.comments .wrapper pre .haskell .hljs-type{color:#b58900}.comments .wrapper pre .hljs-preprocessor,.comments .wrapper pre .hljs-preprocessor .hljs-keyword,.comments .wrapper pre .hljs-pragma,.comments .wrapper pre .hljs-shebang,.comments .wrapper pre .hljs-symbol,.comments .wrapper pre .hljs-symbol .hljs-string,.comments .wrapper pre .diff .hljs-change,.comments .wrapper pre .hljs-special,.comments .wrapper pre .hljs-attr_selector,.comments .wrapper pre .hljs-important,.comments .wrapper pre .hljs-subst,.comments .wrapper pre .hljs-cdata,.comments .wrapper pre .clojure .hljs-title,.comments .wrapper pre .css .hljs-pseudo{color:#cb4b16}.comments .wrapper pre .hljs-deletion{color:#dc322f}.comments .wrapper pre .tex .hljs-formula{background:#eee8d5}.comments .wrapper pre code{padding:1em}.comments .wrapper blockquote{padding:0 1em}.comments .wrapper strong{font-weight:700}.comments .wrapper em{font-style:italic}html{background:#4a525a}#document{background:#f5fbff url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI3MmMzMCIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjM2U0NTRjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNGE1MjVhIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 33em no-repeat;background:#f5fbff -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #272c30),color-stop(30%, #3e454c),color-stop(100%, #4a525a)) 33em no-repeat;background:#f5fbff -moz-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff -webkit-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff linear-gradient(to right, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;margin-right:-1em;padding-right:1em}@media (max-width: 45.05em){#document{margin-right:0;padding-right:0}}#meta>*{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#272c30 1px 1px 0}#meta>*,#meta>* a{color:#9faab7}#meta>* a{text-decoration:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#fff 1px 1px 0;color:#4a525a}.code .wrapper{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;text-shadow:#272c30 1px 1px 0;color:#cbd1d8}.code .wrapper .hljs{display:block;padding:0.5em}.code .wrapper .hljs-comment,.code .wrapper .hljs-template_comment,.code .wrapper .diff .hljs-header,.code .wrapper .hljs-doctype,.code .wrapper .hljs-pi,.code .wrapper .lisp .hljs-string,.code .wrapper .hljs-javadoc{color:#b1bac4;font-style:italic}.code .wrapper .hljs-keyword,.code .wrapper .hljs-winutils,.code .wrapper .method,.code .wrapper .hljs-addition,.code .wrapper .css .hljs-tag,.code .wrapper .hljs-request,.code .wrapper .hljs-status,.code .wrapper .nginx .hljs-title{color:#e0c090}.code .wrapper .hljs-string{color:#e9baba}.code .wrapper .hljs-property{color:#b9d0af}.code .wrapper .hljs-function{color:#abd9cf}.code .wrapper .hljs-class{color:#cee4dd}.code .wrapper .hljs-number,.code .wrapper .hljs-command,.code .wrapper .hljs-tag .hljs-value,.code .wrapper .hljs-rules .hljs-value,.code .wrapper .hljs-phpdoc,.code .wrapper .tex .hljs-formula,.code .wrapper .hljs-regexp,.code .wrapper .hljs-hexcolor{color:#cba8d6}.code .wrapper .hljs-title,.code .wrapper .hljs-localvars,.code .wrapper .hljs-chunk,.code .wrapper .hljs-decorator,.code .wrapper .hljs-built_in,.code .wrapper .hljs-identifier,.code .wrapper .vhdl .hljs-literal,.code .wrapper .hljs-id,.code .wrapper .css .hljs-function{color:#a9c2ba}.code .wrapper .hljs-attribute,.code .wrapper .hljs-variable,.code .wrapper .lisp .hljs-body,.code .wrapper .smalltalk .hljs-number,.code .wrapper .hljs-constant,.code .wrapper .hljs-class .hljs-title,.code .wrapper .hljs-parent,.code .wrapper .haskell .hljs-type{color:#b9d0af}.code .wrapper .hljs-preprocessor,.code .wrapper .hljs-preprocessor .hljs-keyword,.code .wrapper .hljs-pragma,.code .wrapper .hljs-shebang,.code .wrapper .hljs-symbol,.code .wrapper .hljs-symbol .hljs-string,.code .wrapper .diff .hljs-change,.code .wrapper .hljs-special,.code .wrapper .hljs-attr_selector,.code .wrapper .hljs-important,.code .wrapper .hljs-subst,.code .wrapper .hljs-cdata,.code .wrapper .clojure .hljs-title,.code .wrapper .css .hljs-pseudo{color:#cee4dd}.code .wrapper .hljs-deletion{color:#dc322f}.code .wrapper .tex .hljs-formula{background:#e9baba}@media (max-width: 45.05em){.code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;-moz-box-shadow:#272c30 0 0 0.5em 0.2em inset;-webkit-box-shadow:#272c30 0 0 0.5em 0.2em inset;box-shadow:#272c30 0 0 0.5em 0.2em inset;background:#4a525a}.code .wrapper{-moz-box-shadow:#4a525a 0 0 0.25em 0.75em;-webkit-box-shadow:#4a525a 0 0 0.25em 0.75em;box-shadow:#4a525a 0 0 0.25em 0.75em;background:#4a525a}}@media (max-width: 29em){.code{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}}nav{text-shadow:#f0f0f0 1px 1px 0;color:#4a525a}nav .tools,nav .toc{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}nav .tools{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZGNkY2QiIHN0b3Atb3BhY2l0eT0iMC45Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.9)),color-stop(100%, rgba(205,205,205,0.9)));background:-moz-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:-webkit-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:linear-gradient(to bottom, rgba(255,255,255,0.9),rgba(205,205,205,0.9));-moz-border-radius-bottomleft:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;border-bottom:1px solid #4a525a;border-left:1px solid #4a525a}@media (max-width: 53em){nav .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}nav .tools li{border-right:1px solid #4a525a}nav .tools li:last-child{border-right:none}nav .tools .toggle{cursor:pointer}nav .tools .github a{-moz-transition:opacity 200ms;-o-transition:opacity 200ms;-webkit-transition:opacity 200ms;transition:opacity 200ms;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGODE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGOTE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0Y2MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0Y3MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FC/Z5AAACv9JREFUeNrMWXl0VNUdvu/NmzWZJQnZN0hCWIQEIQuErUCBI2qwEAFRBJUeDvUPDwfKVhDUY2mPp8spakVELSq11goIiCBbUVKKUGKQQFiCSBJIQjLJZPbJzOt3J/dOXiYJgcqh3nO+vPfm3Xfvd3/3t94IsiyTH2sTyY+4SfxGpVIpfzdBokdxjQHOADuAj4GmuzRvFjAbmAZkAocEQZjLX/r9/vYbuq0UgigoQKagsxyG74FlgB4gYdAA0UASkAIkACahvSn70Xd/AlrCxm4VRDEBIBScUxg5wiCs7oZcEJDwN7g+AswH3gAOApVALdAIWIEGtpgyYAfwPFtYTU/jbtmy5W/gsZAugnMKbSsJ2oXAn1J62o9AIJCDy/ZgbzbQLVoqkAtM722fa2pqYnHJwfgmXG23MgjV7SjO3bR06BnlogUSe7PW+ntplXQHUlNTHewxqjdyR+8lOehxYNCgQa3hnHoil8a18F60trY2cenSpYU+n48qfXMnvaEQYcIMQ4KmrbAk/Cb3ZGV3gt7GWbx4cSm4xHd1JR2+aPfdIPK/ICIiwlNaWroKfMSgwDq0Moj78feB/1e4cjqdmq1btz6C25921jk5iOLe4i2XdDh+aF/ejhw5ksYEZJE6BAeHSuT83nyaMTLSZzAYfO2K7BPdbo/k9ngkOM8u32i1moBep2/TarVtGrU64PZ6VC0tLVqv1ydyFxLeamtrzbgYgJFSh+Bk2jOpe1ICmf7QtKp5856sHJo7zGoym4Lk3G636HQ4JXurTd3U1KTBtqgcTpcQZTYHIiIjfNExMV6DIaINuuTX6XQBp8sp1t24odv3+d6UN9/cPPTqtWpjOEFYLOeUI3CJwJJULAMZFE5u9cqVx1/esKE8jLebgWc3akCjjIFKbwF46dw0AlLXVnXpUlzx9OJpZyvO9VEShJR9LpfrHdy2SgqDCEB83i7Elj53NozYKeAY3QHAE0ZOz0KQmukuJ+VifUPkMrKyjO9t2bzvwUdmbL5eV2/gBBVE1crAL/OAy4mlJSe5Vq5Zd0pB7O/4OB7XXwJbgC/pYLHRFhJtNhONRk1q6xtIv+RE4vJ4SUOTldTdDKWABcBi+g3wdtH9OfaHJ4zaVpg7NHvH/oPrFKGMW4wghYn/uvJhwvjx1UZLFN+6I/iQ3r/Pnh+iGQcWUVPfaCWNzTZiiowgMA5yo7GJ1N5oIP4OI4llmQzV6QVAdenp8v3J8X1IhF7aplarV0HXaE5IJEniH8md/RwhFZ1iWFoqj3dUop8yQrzFPPvss78Cuf48e7W22IjL7SHXauuUxGgbpTS2goKC5fhu9InyCnLmfFWDiByQv6OOuCu5dmEeU46Iyfj7CqzKwXQp1OLj4wfSrcJEll78q0b5EBMTQ4k++V3N9cE6rVYCuRCP5OTkFm5ECskJFMdxd5X/dLOh3shuG9n1n8pMYuLEiQ10sawmuFU7SQMAfxg3bhxXn1yLyWDx+X0mhVT5O2d4NLADb/GHr0/9J97ltFO9lDJSgruyC3gpNjb20tq1a4+OHj26OaxQGgDMYxarbN8BTxuNxm9nzZr1zZIlS6r4GiWVekhbW0BL9Q0L9s+dO/dqKKfsJvCb4fMuMKuRP/nwvSN4//PHH55CsAXckqkhbGJ4nWYSbMCXmIKkKRNJhQeIATYqvs3PGZD1EX1F55s0adI5xbupXciJ7ddCWBCVopyekuw8ffJr2lkzMLMviYky0/7UeRcDNIMYxbeIKf6IvLy8madOnZqId1KEQU8S4/rA1ZiwODX9Ng9YCcxc/sxjkyWVivo+GRGkurKy8j1G7DW6YGWECMVY2hKTEicjHH1stVpNSYkJztmPlqw/uG/vK/6ATPeC+Nv88JIqUg2X0epwEo/XW4LPltMaFNs+vays7HhSUtLS9OTEpgi9jkRbTMRmd5Ios5G0OuGTA/LkMxcubWtr89MIcRnZyLYnnniC70Ap8JfutjWE9evXF02YMKGCiz0hPu5YWlLC/PuyMzOGZGdKOQP7k76pSSR3YDZJSYyDVE0js7KyVhw88MVQjJkODAR0AzLSyJi8XIJvzMMGZU+M7xP9V5p4snHf3/jqxp+g35+Z1F4GTEFOCsktYCHmANCgKAX779q1a9W7776bd/jw4b6QpFEtSUSr0VyTJPE8vMB3Br2uSRREh0oUbPEpaQlFhQW5dXU3mtUaddzBA4crHE5HItba3+ly9/V4fWbMSQuo7SD2DsanPnQhEMnmfYM66c4Vf3txTFdSDTwakqAYrE2jgAV2u/2tvXv3/mPRokUfZWdnfwhvXhHKBBm4IYXhX8BrwC/wvmDZsmV9mFQXKgzgaeovRUXFr5QcdQcvAKupwFJSUkqqa6q3Kxw0lWIqU/rhly9fTsKWP1hdXR3dW4YL3fumqqrq1xqNhpZ9cewMhiYJNAKdpjqG+a9wy+56VsIkNXLkSOqIZXjx5s/37Z3QnS5SK4yMjDx8J/VBSUlJOb5bATwGUB3rC2j57gQ9BSuyeixwEJLiYdbUucq5uTnXNm3a1B3BXKDtTshZLBbnxYsXV1M31GW82yXH8ArXHbPZbENa/kc8zwPoQcvrwDU+Kd7ZIUUXq57cc+bMKeMlICKCC1sZWsTOnTs/wVyP3i65noqZjezEiNhsNiP83XPovBXYzHKy0EHPzJkzz6elpQXDGIj48/Pz67mWjhgxorqoqOhKKJGwWmkCUADdNXSuBTqrWG8V//d0hXq93spDEEd4Gz58eCMqdoENLtPqPXQyKUl+vK8PS8tMQaMQeDkqk477zkm+dAsjOzxjxozxXq/3rZMnT2Y0NzcbaIWFrXLjKqJKCqZJCHOy4qTIj+ghK47GBLwPhEsITddxL/R+7Npd++CDD86AyJPAMzU1NXGYW0C+5UHkGLhhw4axzL0IyiCvUomBsPM84QefCfd4oi2KlZhgQ2pq6ng83ke3xeFweHo6ykIKJCuykB90GCTdTicQpLq3AyR30oIXQXoRPzLopu9dO52S7uSUkrkXmq67uzMOOAMZRtDj6aeisrqt+UIjqTWasEHbM/eo2HiiQ07G9JtodDpibahTNdXdCPYzRBoFo8XCDr2D48h8clRutH8oROoMkaEVpQ8YzCxE6PEoMERubPHPFJZDvXOwpiB6gyF4/E5/87jcJDE9gxz7bMcDlBx1mOkZGS5UXMFxNHq9v29mf4+I+oIarj9ApCE5w+x8jhNl5emzSmbUBM8aRo3lUaBdCjJzKQrrVUhO23kVcrsP8nk9TJdUxGGzJXz2/pYXbtbWBI/JxkyavKd/Zlbr1StV9PCFDB6aW1dUmN/YLzOr5cK5iuizZ8v7PDD17S+HDLu/8tuy0wP+8NuXh/jdds/8BU9Fet3uXrc2RM7a0NBOjq1ECB0CtBMVoUu2psZxrVbrOKM5emeE2bj7iz27Ilauf/EZR2srVE3tXvP8ui+R55Hla9Z9tfDx2cVVFy6YP9r5acaRQ4deLZk9K9Nlt5fs3r0nc3h+4RRbc+PJAETL5RH0jWHOMKQPk+fM7+7cq+NjSSQum4M01V8nZ//9FfXyxRevXJ02ZtTI6TGxsVf6ZWWv2LP946ms8iofkDOsKeBx/06j1WtPHC99E7XEizSfA7LZ6LSSOzBl7lPuTkqOtn/bO53J3WHLAx4G6igRlvPPZO6FFiy/B2j5V0hLQvYNPcY4AVB/Sa3BEqwTCLnSo3e4S//oiGHFDTXh3cDFsIVMZXH8N4z8bbX/CjAA0UTEH4oMvREAAAAASUVORK5CYII=') center center no-repeat;background-size:19.5px 24px}nav .tools .github a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);opacity:0.9}nav.active .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}nav.active .tools .toggle{background:rgba(205,205,205,0.9);position:relative}nav .toc{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:rgba(230,230,230,0.9);border-left:1px solid #4a525a}nav .toc .label{color:#4a525a;text-decoration:none;border-top:1px solid rgba(192,192,192,0.9);border-bottom:1px solid rgba(192,192,192,0.9);margin-top:-1px}nav .toc .label:hover{background:rgba(205,205,205,0.9)}nav .toc .file>.label{font-weight:bold}nav .toc .selected>.label{background:#f5fbff}nav .toc .label em{font-weight:bold}nav .toc .file>.label em{color:#101214}nav .toc .matched-child>.label{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:0.65;text-shadow:none;background:rgba(192,192,192,0.9)}@media (max-width: 45.05em){nav .tools,nav .toc{border-left-width:0}nav .tools{background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NkY2RjZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),color-stop(100%, #cdcdcd));background:-moz-linear-gradient(top, #ffffff,#cdcdcd);background:-webkit-linear-gradient(top, #ffffff,#cdcdcd);background:linear-gradient(to bottom, #ffffff,#cdcdcd)}nav .toc{background:#e6e6e6}}.comments .wrapper a{display:inline-block;color:#a8614e;text-decoration:none}.comments .wrapper a:hover,.comments .wrapper a:hover *{text-decoration:underline}.comments .wrapper code{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;border:1px solid #e6e0d5}.comments .wrapper pre,.comments .wrapper code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;background:#fbf8f3}.comments .wrapper pre{-moz-box-shadow:#f2ece3 0 0 0.4em 0.2em;-webkit-box-shadow:#f2ece3 0 0 0.4em 0.2em;box-shadow:#f2ece3 0 0 0.4em 0.2em;border:1px solid #d9c9af}.comments .wrapper pre code{border-width:0;background:transparent}.comments .wrapper blockquote{border-left:0.15em solid #959fa8;margin-left:-0.15em}body{-webkit-text-size-adjust:100%}input[type="search"]{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;-moz-box-shadow:#ddd 0 1px 1px 0 inset;-webkit-box-shadow:#ddd 0 1px 1px 0 inset;box-shadow:#ddd 0 1px 1px 0 inset;border:1px solid #959595;padding:0.15em 0.8em}.comments.doc-section .wrapper{color:#252519}.comments.doc-section.doc-section-private .wrapper,.comments.doc-section.doc-section-protected .wrapper,.comments.doc-section.doc-section-internal .wrapper{color:#7f7f7f}.comments.doc-section .doc-section-header{font:bold 18px "helvetica neue",helvetica,sans-serif}.comments.doc-section .docs .doc-section-header code{font-size:18px}.code .marker,.code .marker.wrapper,.code .wrapper.marker{display:none}.code.folded .wrapper{display:none;cursor:default}.code.folded .marker{-moz-border-radius:0.2em;-webkit-border-radius:0.2em;border-radius:0.2em;-moz-box-shadow:#2f3539 1px 1px 1px 0;-webkit-box-shadow:#2f3539 1px 1px 1px 0;box-shadow:#2f3539 1px 1px 1px 0;display:inline-block;border:1px solid #73787f;padding:0.2em 0.5em;margin-left:-0.5em;margin-right:-0.5em;background:#58616b;font:12px "Droid Sans Mono",Menlo,Monaco,monospace;text-shadow:#2f3539 1px 1px 0px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.code.folded .marker .c1{color:#73787f;font-style:normal}.code.folded .marker:hover{background:#5f6872}.code.folded .marker:hover .c1{color:#7b8087}.code.folded .marker .c1:after{content:" …"} diff --git a/fisheryates.html b/fisheryates.html deleted file mode 100644 index d566773..0000000 --- a/fisheryates.html +++ /dev/null @@ -1,20 +0,0 @@ -fisheryates

        Sample array using Fisher-Yates method.

        var __fisheryates__ = function ( randint ) { - - var fisheryates = function ( n, a, i, j ) { - - var k, p, tmp;

        we will swap at most n elements

        k = i + n; - - for ( ; i < k ; ++i ) {

        choose any index p in the remaining array

        p = randint( i, j );

        swap element at index p with first element in the array

        tmp = a[i]; - a[i] = a[p]; - a[p] = tmp; - - } - - }; - - return fisheryates; - -}; - -exports.__fisheryates__ = __fisheryates__; -exports.__sample__ = __fisheryates__;
        \ No newline at end of file diff --git a/randfloat.html b/randfloat.html deleted file mode 100644 index 75f4186..0000000 --- a/randfloat.html +++ /dev/null @@ -1,6 +0,0 @@ -randfloat

        Returns a floating point number in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randfloat = function ( i, j ) { - return i + Math.random() * (j - i); -}; - -exports.randfloat = randfloat;
        \ No newline at end of file diff --git a/randint.html b/randint.html deleted file mode 100644 index d2be861..0000000 --- a/randint.html +++ /dev/null @@ -1,6 +0,0 @@ -randint

        Returns an integer in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randint = function ( i, j ) { - return i + Math.floor( Math.random() * (j - i) ); -}; - -exports.randint = randint;
        \ No newline at end of file diff --git a/shuffle.html b/shuffle.html deleted file mode 100644 index 3a1f46e..0000000 --- a/shuffle.html +++ /dev/null @@ -1,10 +0,0 @@ -shuffle

        Shuffle array by sampling the complete array.

        var __shuffle__ = function ( sample ) { - - var shuffle = function ( a, i, j ) { - sample(j - i, a, i, j); - }; - - return shuffle; -}; - -exports.__shuffle__ = __shuffle__;
        \ No newline at end of file From 989b71feb7c5081ee4a03be683df7af52f6f4e76 Mon Sep 17 00:00:00 2001 From: aureooms Date: Fri, 10 Apr 2015 16:37:03 +0200 Subject: [PATCH 05/15] undefined --- index.html | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 3727e28..37e2ea8 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ index

        js-random

        -

        randomness code bricks for JavaScript

        +

        Randomness code bricks for JavaScript.

        NPM license NPM version Bower version @@ -9,4 +9,28 @@ devDependencies Status Code Climate NPM downloads per month -GitHub issues

        \ No newline at end of file +GitHub issues

        +

        Can be managed through bower, +component, or +npm.

        +
        let random = require( "aureooms-js-random" ) ;
        +

        Example usage:

        +
        random.randfloat( 0 , 1 ) ; // 0.19876947347074747
        +random.randfloat( 0 , 1 ) ; // 0.23755912738852203
        +
        +random.randint( 0 , 100 ) ; // 57
        +random.randint( 0 , 100 ) ; // 31
        +
        +let a = [ 0 , 1 , 2 , 3 ] ;
        +
        +random.sample( 1 , a , 0 , 4 ) ;
        +a ; // [ 0 , 1 , 2 , 3 ]
        +
        +random.sample( 1 , a , 0 , 4 ) ;
        +a ; // [ 1 , 0 , 2 , 3 ]
        +
        +random.shuffle( a , 0 , 4 ) ;
        +a ; // [ 1 , 3 , 0 , 2 ]
        +
        +random.shuffle( a , 0 , 4 ) ;
        +a ; // [ 3 , 2 , 1 , 0 ]
        \ No newline at end of file From 73a1210e2946033ab34def3a724e2e3202959bd1 Mon Sep 17 00:00:00 2001 From: aureooms Date: Mon, 15 Jun 2015 18:45:08 +0200 Subject: [PATCH 06/15] undefined --- 000-kernel/fisheryates.html | 4 ++-- 000-kernel/shuffle.html | 4 ++-- 001-api/000-randfloat.html | 2 +- 001-api/001-randint.html | 2 +- index.html | 8 +++++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/000-kernel/fisheryates.html b/000-kernel/fisheryates.html index 25123d1..0bc22be 100644 --- a/000-kernel/fisheryates.html +++ b/000-kernel/fisheryates.html @@ -1,6 +1,6 @@ -000-kernel/fisheryates

        Sample array using Fisher-Yates method.

        var _fisheryates = function ( randint ) { +000-kernel/fisheryates

        Sample array using Fisher-Yates method.

        var _fisheryates = function ( randint ) { - var fisheryates = function ( n , a , i , j ) { + var fisheryates = function ( n , a , i , j ) { var k , p , tmp ;

        we will swap at most n elements

        k = i + n ; diff --git a/000-kernel/shuffle.html b/000-kernel/shuffle.html index cc2ea54..3fa56ac 100644 --- a/000-kernel/shuffle.html +++ b/000-kernel/shuffle.html @@ -1,6 +1,6 @@ -000-kernel/shuffle

        Shuffle array by sampling the complete array.

        var _shuffle = function ( sample ) { +000-kernel/shuffle

        Shuffle array by sampling the complete array.

        var _shuffle = function ( sample ) { - var shuffle = function ( a , i , j ) { + var shuffle = function ( a , i , j ) { sample( j - i , a , i , j ) ; } ; diff --git a/001-api/000-randfloat.html b/001-api/000-randfloat.html index 46080cb..7e6cd7f 100644 --- a/001-api/000-randfloat.html +++ b/001-api/000-randfloat.html @@ -1,5 +1,5 @@ 001-api/000-randfloat

        Returns a floating point number in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randfloat = function ( i , j ) { +according to a uniform distribution.

        var randfloat = function ( i , j ) { return i + Math.random( ) * ( j - i ) ; } ; diff --git a/001-api/001-randint.html b/001-api/001-randint.html index f0b2b07..afb291c 100644 --- a/001-api/001-randint.html +++ b/001-api/001-randint.html @@ -1,5 +1,5 @@ 001-api/001-randint

        Returns an integer in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randint = function ( i , j ) { +according to a uniform distribution.

        var randint = function ( i , j ) { return i + Math.floor( Math.random( ) * ( j - i ) ) ; } ; diff --git a/index.html b/index.html index 37e2ea8..b9e5d0b 100644 --- a/index.html +++ b/index.html @@ -9,9 +9,11 @@ devDependencies Status Code Climate NPM downloads per month -GitHub issues

        -

        Can be managed through bower, -component, or +GitHub issues +Inline docs

        +

        Can be managed through duo, +component, +bower, or npm.

        let random = require( "aureooms-js-random" ) ;

        Example usage:

        From 60e89dc925aa3ec658b4cc4c09b395062f979796 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Ooms?= Date: Thu, 26 Jan 2017 01:13:03 +0100 Subject: [PATCH 07/15] esdoc update --- 000-kernel/fisheryates.html | 19 - 000-kernel/shuffle.html | 11 - 001-api/000-randfloat.html | 6 - 001-api/001-randint.html | 6 - 001-api/002-sample.html | 3 - 001-api/003-shuffle.html | 3 - assets/behavior.js | 534 ---- assets/style.css | 1 - ast/source/api/index.js.json | 908 ++++++ ast/source/api/randfloat.js.json | 1074 +++++++ ast/source/api/randint.js.json | 1269 ++++++++ ast/source/api/randrange.js.json | 4031 ++++++++++++++++++++++++ ast/source/api/sample.js.json | 958 ++++++ ast/source/api/shuffle.js.json | 958 ++++++ ast/source/index.js.json | 401 +++ ast/source/kernel/_fisheryates.js.json | 3370 ++++++++++++++++++++ ast/source/kernel/_shuffle.js.json | 1533 +++++++++ ast/source/kernel/index.js.json | 401 +++ badge.svg | 17 + coverage.json | 46 + css/prettify-tomorrow.css | 132 + css/style.css | 1024 ++++++ dump.json | 995 ++++++ file/src/api/index.js.html | 70 + file/src/api/randfloat.js.html | 75 + file/src/api/randint.js.html | 75 + file/src/api/randrange.js.html | 87 + file/src/api/sample.js.html | 69 + file/src/api/shuffle.js.html | 69 + file/src/index.js.html | 67 + file/src/kernel/_fisheryates.js.html | 99 + file/src/kernel/_shuffle.js.html | 80 + file/src/kernel/index.js.html | 67 + function/index.html | 609 ++++ identifiers.html | 283 ++ image/badge.svg | 17 + image/esdoc-logo-mini-black.png | Bin 0 -> 5651 bytes image/esdoc-logo-mini.png | Bin 0 -> 6504 bytes image/github.png | Bin 0 -> 4268 bytes image/manual-badge.svg | 17 + image/search.png | Bin 0 -> 12704 bytes index.html | 94 +- manual-badge.svg | 17 + manual/example/example.html | 113 + manual/index.html | 320 ++ manual/installation/installation.html | 100 + manual/overview/overview.html | 91 + manual/usage/usage.html | 102 + package.json | 65 + script/inherited-summary.js | 28 + script/inner-link.js | 31 + script/manual.js | 11 + script/patch-for-local.js | 8 + script/prettify/Apache-License-2.0.txt | 202 ++ script/prettify/prettify.js | 28 + script/pretty-print.js | 25 + script/search.js | 117 + script/search_index.js | 434 +++ script/test-summary.js | 54 + source.html | 159 + user/css/0-style.css | 52 + user/script/0-header.js | 34 + variable/index.html | 213 ++ 63 files changed, 21072 insertions(+), 610 deletions(-) delete mode 100644 000-kernel/fisheryates.html delete mode 100644 000-kernel/shuffle.html delete mode 100644 001-api/000-randfloat.html delete mode 100644 001-api/001-randint.html delete mode 100644 001-api/002-sample.html delete mode 100644 001-api/003-shuffle.html delete mode 100644 assets/behavior.js delete mode 100644 assets/style.css create mode 100644 ast/source/api/index.js.json create mode 100644 ast/source/api/randfloat.js.json create mode 100644 ast/source/api/randint.js.json create mode 100644 ast/source/api/randrange.js.json create mode 100644 ast/source/api/sample.js.json create mode 100644 ast/source/api/shuffle.js.json create mode 100644 ast/source/index.js.json create mode 100644 ast/source/kernel/_fisheryates.js.json create mode 100644 ast/source/kernel/_shuffle.js.json create mode 100644 ast/source/kernel/index.js.json create mode 100644 badge.svg create mode 100644 coverage.json create mode 100644 css/prettify-tomorrow.css create mode 100644 css/style.css create mode 100644 dump.json create mode 100644 file/src/api/index.js.html create mode 100644 file/src/api/randfloat.js.html create mode 100644 file/src/api/randint.js.html create mode 100644 file/src/api/randrange.js.html create mode 100644 file/src/api/sample.js.html create mode 100644 file/src/api/shuffle.js.html create mode 100644 file/src/index.js.html create mode 100644 file/src/kernel/_fisheryates.js.html create mode 100644 file/src/kernel/_shuffle.js.html create mode 100644 file/src/kernel/index.js.html create mode 100644 function/index.html create mode 100644 identifiers.html create mode 100644 image/badge.svg create mode 100644 image/esdoc-logo-mini-black.png create mode 100644 image/esdoc-logo-mini.png create mode 100644 image/github.png create mode 100644 image/manual-badge.svg create mode 100644 image/search.png create mode 100644 manual-badge.svg create mode 100644 manual/example/example.html create mode 100644 manual/index.html create mode 100644 manual/installation/installation.html create mode 100644 manual/overview/overview.html create mode 100644 manual/usage/usage.html create mode 100644 package.json create mode 100644 script/inherited-summary.js create mode 100644 script/inner-link.js create mode 100644 script/manual.js create mode 100644 script/patch-for-local.js create mode 100644 script/prettify/Apache-License-2.0.txt create mode 100644 script/prettify/prettify.js create mode 100644 script/pretty-print.js create mode 100644 script/search.js create mode 100644 script/search_index.js create mode 100644 script/test-summary.js create mode 100644 source.html create mode 100644 user/css/0-style.css create mode 100644 user/script/0-header.js create mode 100644 variable/index.html diff --git a/000-kernel/fisheryates.html b/000-kernel/fisheryates.html deleted file mode 100644 index 0bc22be..0000000 --- a/000-kernel/fisheryates.html +++ /dev/null @@ -1,19 +0,0 @@ -000-kernel/fisheryates

        Sample array using Fisher-Yates method.

        var _fisheryates = function ( randint ) { - - var fisheryates = function ( n , a , i , j ) { - - var k , p , tmp ;

        we will swap at most n elements

        k = i + n ; - - for ( ; i < k ; ++i ) {

        choose any index p in the remaining array

        p = randint( i , j ) ;

        swap element at index p with first element in the array

        tmp = a[i] ; - a[i] = a[p] ; - a[p] = tmp ; - - } - - } ; - - return fisheryates ; - -} ; - -exports._fisheryates = _fisheryates ;
        \ No newline at end of file diff --git a/000-kernel/shuffle.html b/000-kernel/shuffle.html deleted file mode 100644 index 3fa56ac..0000000 --- a/000-kernel/shuffle.html +++ /dev/null @@ -1,11 +0,0 @@ -000-kernel/shuffle

        Shuffle array by sampling the complete array.

        var _shuffle = function ( sample ) { - - var shuffle = function ( a , i , j ) { - sample( j - i , a , i , j ) ; - } ; - - return shuffle ; - -} ; - -exports._shuffle = _shuffle ;
        \ No newline at end of file diff --git a/001-api/000-randfloat.html b/001-api/000-randfloat.html deleted file mode 100644 index 7e6cd7f..0000000 --- a/001-api/000-randfloat.html +++ /dev/null @@ -1,6 +0,0 @@ -001-api/000-randfloat

        Returns a floating point number in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randfloat = function ( i , j ) { - return i + Math.random( ) * ( j - i ) ; -} ; - -exports.randfloat = randfloat ;
        \ No newline at end of file diff --git a/001-api/001-randint.html b/001-api/001-randint.html deleted file mode 100644 index afb291c..0000000 --- a/001-api/001-randint.html +++ /dev/null @@ -1,6 +0,0 @@ -001-api/001-randint

        Returns an integer in interval [i, j[ (i included, j excluded) -according to a uniform distribution.

        var randint = function ( i , j ) { - return i + Math.floor( Math.random( ) * ( j - i ) ) ; -} ; - -exports.randint = randint ;
        \ No newline at end of file diff --git a/001-api/002-sample.html b/001-api/002-sample.html deleted file mode 100644 index 9bb1cf7..0000000 --- a/001-api/002-sample.html +++ /dev/null @@ -1,3 +0,0 @@ -001-api/002-sample
        var sample = _fisheryates( randint ) ; - -exports.sample = sample ;
        \ No newline at end of file diff --git a/001-api/003-shuffle.html b/001-api/003-shuffle.html deleted file mode 100644 index f4f2732..0000000 --- a/001-api/003-shuffle.html +++ /dev/null @@ -1,3 +0,0 @@ -001-api/003-shuffle
        var shuffle = _shuffle( sample ) ; - -exports.shuffle = shuffle ;
        \ No newline at end of file diff --git a/assets/behavior.js b/assets/behavior.js deleted file mode 100644 index b237d03..0000000 --- a/assets/behavior.js +++ /dev/null @@ -1,534 +0,0 @@ -/*! jQuery v1.7.1 jquery.com | jquery.org/license */ -(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
  • a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
    "+""+"
    ",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
    t
    ",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
    ",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; -f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() -{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);(function() { - var MAX_FILTER_SIZE, appendSearchNode, buildNav, buildTOCNode, clearFilter, clearHighlight, currentNode$, currentQuery, fileMap, focusCurrentNode, highlightMatch, moveCurrentNode, nav$, searchNodes, searchableNodes, selectNode, selectNodeByDocumentPath, setCurrentNodeExpanded, setTableOfContentsActive, tableOfContents, toc$, toggleTableOfContents, visitCurrentNode; - - tableOfContents = [ - { - "type": "file", - "data": { - "language": { - "nameMatchers": [".md", ".markdown", ".mkd", ".mkdn", ".mdown"], - "commentsOnly": true, - "name": "Markdown" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/README.md", - "projectPath": "README.md", - "targetPath": "index", - "pageTitle": "index", - "title": "index" - }, - "depth": 1, - "outline": [] - }, { - "type": "folder", - "data": { - "path": "000-kernel", - "title": "000-kernel" - }, - "depth": 1, - "children": [ - { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/000-kernel/fisheryates.js", - "projectPath": "js/src/000-kernel/fisheryates.js", - "targetPath": "000-kernel/fisheryates", - "pageTitle": "000-kernel/fisheryates", - "title": "fisheryates" - }, - "depth": 2, - "outline": [] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/000-kernel/shuffle.js", - "projectPath": "js/src/000-kernel/shuffle.js", - "targetPath": "000-kernel/shuffle", - "pageTitle": "000-kernel/shuffle", - "title": "shuffle" - }, - "depth": 2, - "outline": [] - } - ] - }, { - "type": "folder", - "data": { - "path": "001-api", - "title": "001-api" - }, - "depth": 1, - "children": [ - { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/000-randfloat.js", - "projectPath": "js/src/001-api/000-randfloat.js", - "targetPath": "001-api/000-randfloat", - "pageTitle": "001-api/000-randfloat", - "title": "000-randfloat" - }, - "depth": 2, - "outline": [] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/001-randint.js", - "projectPath": "js/src/001-api/001-randint.js", - "targetPath": "001-api/001-randint", - "pageTitle": "001-api/001-randint", - "title": "001-randint" - }, - "depth": 2, - "outline": [] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/002-sample.js", - "projectPath": "js/src/001-api/002-sample.js", - "targetPath": "001-api/002-sample", - "pageTitle": "001-api/002-sample", - "title": "002-sample" - }, - "depth": 2, - "outline": [] - }, { - "type": "file", - "data": { - "language": { - "nameMatchers": [".js"], - "pygmentsLexer": "javascript", - "multiLineComment": ["/*", "*", "*/"], - "singleLineComment": ["//"], - "ignorePrefix": "}", - "foldPrefix": "^", - "name": "JavaScript" - }, - "sourcePath": "/home/aureooms/dev/js/js-random/js/src/001-api/003-shuffle.js", - "projectPath": "js/src/001-api/003-shuffle.js", - "targetPath": "001-api/003-shuffle", - "pageTitle": "001-api/003-shuffle", - "title": "003-shuffle" - }, - "depth": 2, - "outline": [] - } - ] - } - ]; - - nav$ = null; - - toc$ = null; - - setTableOfContentsActive = function(active) { - var html$; - html$ = $('html'); - if (active) { - nav$.addClass('active'); - return html$.addClass('popped'); - } else { - nav$.removeClass('active'); - return html$.removeClass('popped'); - } - }; - - toggleTableOfContents = function() { - return setTableOfContentsActive(!nav$.hasClass('active')); - }; - - currentNode$ = null; - - focusCurrentNode = function() { - var currentNodeBottom, currentNodeTop; - currentNodeTop = currentNode$.offset().top - toc$.children(':visible').first().offset().top; - currentNodeBottom = currentNodeTop + currentNode$.children('.label').height(); - if (currentNodeTop < toc$.scrollTop()) { - toc$.scrollTop(currentNodeTop); - } - if (currentNodeBottom > toc$.scrollTop() + toc$.height()) { - return toc$.scrollTop(currentNodeBottom - toc$.height()); - } - }; - - setCurrentNodeExpanded = function(expanded) { - var parents$; - if (expanded) { - currentNode$.addClass('expanded'); - } else { - if (currentNode$.hasClass('expanded')) { - currentNode$.removeClass('expanded'); - } else { - parents$ = currentNode$.parents('li'); - if (parents$.length > 0) { - selectNode(parents$.first()); - } - } - } - return focusCurrentNode(); - }; - - selectNode = function(newNode$) { - currentNode$.removeClass('selected'); - newNode$.addClass('selected'); - currentNode$ = newNode$; - return focusCurrentNode(); - }; - - selectNodeByDocumentPath = function(documentPath, headerSlug) { - var j, len, link, ref, urlChunks; - if (headerSlug == null) { - headerSlug = null; - } - currentNode$ = fileMap[documentPath]; - if (headerSlug) { - ref = currentNode$.find('.outline a'); - for (j = 0, len = ref.length; j < len; j++) { - link = ref[j]; - urlChunks = $(link).attr('href').split('#'); - if (urlChunks[1] === headerSlug) { - currentNode$ = $(link).parents('li').first(); - break; - } - } - } - currentNode$.addClass('selected expanded'); - currentNode$.parents('li').addClass('expanded'); - return focusCurrentNode(); - }; - - moveCurrentNode = function(up) { - var i, j, len, newIndex, node, visibleNodes$; - visibleNodes$ = toc$.find('li:visible:not(.filtered)'); - newIndex = 0; - for (i = j = 0, len = visibleNodes$.length; j < len; i = ++j) { - node = visibleNodes$[i]; - if (node === currentNode$[0]) { - newIndex = up ? i - 1 : i + 1; - if (newIndex < 0) { - newIndex = 0; - } - if (newIndex > visibleNodes$.length - 1) { - newIndex = visibleNodes$.length - 1; - } - break; - } - } - return selectNode($(visibleNodes$[newIndex])); - }; - - visitCurrentNode = function() { - var labelLink$; - labelLink$ = currentNode$.children('a.label'); - if (labelLink$.length > 0) { - return window.location = labelLink$.attr('href'); - } - }; - - MAX_FILTER_SIZE = 10; - - searchableNodes = []; - - appendSearchNode = function(node$) { - var text$; - text$ = node$.find('> .label .text'); - return searchableNodes.push([text$.text().toLowerCase(), node$, text$]); - }; - - currentQuery = ''; - - searchNodes = function(queryString) { - var c, filtered, j, k, l, len, len1, len2, matched, matcher, nodeInfo, p, results; - queryString = queryString.toLowerCase().replace(/\s+/, ''); - if (queryString === currentQuery) { - return; - } - currentQuery = queryString; - if (queryString === '') { - return clearFilter(); - } - matcher = new RegExp(((function() { - var j, len, results; - results = []; - for (j = 0, len = queryString.length; j < len; j++) { - c = queryString[j]; - results.push(c.replace(/[-[\]{}()*+?.,\\^$|#\s]/, "\\$&")); - } - return results; - })()).join('.*')); - matched = []; - filtered = []; - for (j = 0, len = searchableNodes.length; j < len; j++) { - nodeInfo = searchableNodes[j]; - if (matcher.test(nodeInfo[0])) { - matched.push(nodeInfo); - } else { - filtered.push(nodeInfo); - } - } - if (matched.length > MAX_FILTER_SIZE) { - return clearFilter(); - } - nav$.addClass('searching'); - for (k = 0, len1 = filtered.length; k < len1; k++) { - nodeInfo = filtered[k]; - nodeInfo[1].removeClass('matched-child'); - nodeInfo[1].addClass('filtered'); - clearHighlight(nodeInfo[2]); - } - results = []; - for (l = 0, len2 = matched.length; l < len2; l++) { - nodeInfo = matched[l]; - nodeInfo[1].removeClass('filtered matched-child'); - nodeInfo[1].addClass('matched'); - highlightMatch(nodeInfo[2], queryString); - results.push((function() { - var len3, m, ref, results1; - ref = nodeInfo[1].parents('li'); - results1 = []; - for (m = 0, len3 = ref.length; m < len3; m++) { - p = ref[m]; - results1.push($(p).addClass('matched-child')); - } - return results1; - })()); - } - return results; - }; - - clearFilter = function() { - var j, len, nodeInfo, results; - nav$.removeClass('searching'); - currentQuery = ''; - results = []; - for (j = 0, len = searchableNodes.length; j < len; j++) { - nodeInfo = searchableNodes[j]; - nodeInfo[1].removeClass('filtered matched-child'); - results.push(clearHighlight(nodeInfo[2])); - } - return results; - }; - - highlightMatch = function(text$, queryString) { - var char, foundIndex, furthestIndex, j, len, lowerText, markedText, nodeText; - nodeText = text$.text(); - lowerText = nodeText.toLowerCase(); - markedText = ''; - furthestIndex = 0; - for (j = 0, len = queryString.length; j < len; j++) { - char = queryString[j]; - foundIndex = lowerText.indexOf(char, furthestIndex); - markedText += nodeText.slice(furthestIndex, foundIndex) + ("" + nodeText[foundIndex] + ""); - furthestIndex = foundIndex + 1; - } - return text$.html(markedText + nodeText.slice(furthestIndex)); - }; - - clearHighlight = function(text$) { - return text$.text(text$.text()); - }; - - fileMap = {}; - - buildNav = function(metaInfo) { - var j, len, node, sourceURL; - nav$ = $("
    \n").appendTo($('body')); - toc$ = nav$.find('.toc'); - if (metaInfo.githubURL) { - if (metaInfo.documentPath === 'index') { - sourceURL = metaInfo.githubURL; - } else { - sourceURL = metaInfo.githubURL + "/blob/master/" + metaInfo.projectPath; - } - nav$.find('.tools').prepend("
  • \n \n View source on GitHub\n \n
  • "); - } - for (j = 0, len = tableOfContents.length; j < len; j++) { - node = tableOfContents[j]; - toc$.append(buildTOCNode(node, metaInfo)); - } - return nav$; - }; - - buildTOCNode = function(node, metaInfo) { - var c, children$, clickLabel, discloser, discloser$, j, label$, len, node$, ref, ref1, ref2; - node$ = $("
  • "); - discloser = null; - switch (node.type) { - case 'file': - node$.append("" + node.data.title + ""); - clickLabel = function(evt) { - if (evt.target === discloser) { - node$.toggleClass('expanded'); - evt.preventDefault(); - return false; - } - return selectNode(node$); - }; - break; - case 'folder': - node$.append("" + node.data.title + ""); - clickLabel = function(evt) { - selectNode(node$); - node$.toggleClass('expanded'); - evt.preventDefault(); - return false; - }; - } - if (((ref = node.children) != null ? ref.length : void 0) > 0) { - children$ = $('
      '); - ref1 = node.children; - for (j = 0, len = ref1.length; j < len; j++) { - c = ref1[j]; - children$.append(buildTOCNode(c, metaInfo)); - } - node$.append(children$); - } - label$ = node$.find('> .label'); - label$.click(clickLabel); - discloser$ = $('').prependTo(label$); - if (!(((ref2 = node.children) != null ? ref2.length : void 0) > 0)) { - discloser$.addClass('placeholder'); - } - discloser = discloser$.get(0); - if (node.type === 'file') { - fileMap[node.data.targetPath] = node$; - } - appendSearchNode(node$); - return node$; - }; - - $(function() { - var lastMousedownTimestamp, metaInfo, search$, toggle$; - metaInfo = { - relativeRoot: $('meta[name="groc-relative-root"]').attr('content'), - githubURL: $('meta[name="groc-github-url"]').attr('content'), - documentPath: $('meta[name="groc-document-path"]').attr('content'), - projectPath: $('meta[name="groc-project-path"]').attr('content') - }; - nav$ = buildNav(metaInfo); - toc$ = nav$.find('.toc'); - search$ = $('#search'); - selectNodeByDocumentPath(metaInfo.documentPath, window.location.hash.replace('#', '')); - search$.focus(function() { - return setTableOfContentsActive(true); - }); - lastMousedownTimestamp = null; - nav$.mousedown(function(evt) { - if (evt.target !== toggle$[0]) { - return lastMousedownTimestamp = evt.timeStamp; - } - }); - search$.blur(function(evt) { - if (evt.timeStamp - lastMousedownTimestamp < 10) { - return search$.focus(); - } else { - return setTableOfContentsActive(false); - } - }); - toggle$ = nav$.find('.toggle'); - toggle$.click(function(evt) { - if (search$.is(':focus')) { - search$.blur(); - } else { - search$.focus(); - } - return evt.preventDefault(); - }); - toggle$.mousedown(function(evt) { - return evt.preventDefault(); - }); - $('body').keydown(function(evt) { - if (nav$.hasClass('active')) { - switch (evt.keyCode) { - case 13: - visitCurrentNode(); - break; - case 37: - setCurrentNodeExpanded(false); - break; - case 38: - moveCurrentNode(true); - break; - case 39: - setCurrentNodeExpanded(true); - break; - case 40: - moveCurrentNode(false); - break; - default: - return; - } - return evt.preventDefault(); - } - }); - search$.bind('keyup search', function(evt) { - return searchNodes(search$.val()); - }); - search$.keydown(function(evt) { - if (evt.keyCode === 27) { - if (search$.val().trim() === '') { - return search$.blur(); - } else { - return search$.val(''); - } - } - }); - return $('.code.folded').each(function(index, code) { - var code$; - code$ = $(code); - return code$.click(function(evt) { - code$.toggleClass('folded'); - evt.preventDefault(); - return false; - }); - }); - }); - -}).call(this); diff --git a/assets/style.css b/assets/style.css deleted file mode 100644 index 3804e61..0000000 --- a/assets/style.css +++ /dev/null @@ -1 +0,0 @@ -html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}html{line-height:1}ol,ul{list-style:none}table{border-collapse:collapse;border-spacing:0}caption,th,td{text-align:left;font-weight:normal;vertical-align:middle}q,blockquote{quotes:none}q:before,q:after,blockquote:before,blockquote:after{content:"";content:none}a img{border:none}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}html,body{height:100%}#document{min-height:100%}body{max-width:33em}.segment{padding:0.5em 0 0.5em 33em;white-space:nowrap}.segment:first-child{padding-top:4.1em}.segment:last-child{padding-bottom:2em}.segment .comments,.segment .code{display:inline-block;vertical-align:top;padding:0 2em}.segment .comments{margin-left:-33em;width:29em;white-space:normal}.segment .code{white-space:pre}#meta{position:absolute;left:33em;padding:0.25em 1em}@media (max-width: 53em){html{font-size:1em}}@media (max-width: 52.94111em){html{font-size:0.99889em}}@media (max-width: 52.88222em){html{font-size:0.99778em}}@media (max-width: 52.82333em){html{font-size:0.99667em}}@media (max-width: 52.76444em){html{font-size:0.99556em}}@media (max-width: 52.70556em){html{font-size:0.99444em}}@media (max-width: 52.64667em){html{font-size:0.99333em}}@media (max-width: 52.58778em){html{font-size:0.99222em}}@media (max-width: 52.52889em){html{font-size:0.99111em}}@media (max-width: 52.47em){html{font-size:0.99em}}@media (max-width: 52.41111em){html{font-size:0.98889em}}@media (max-width: 52.35222em){html{font-size:0.98778em}}@media (max-width: 52.29333em){html{font-size:0.98667em}}@media (max-width: 52.23444em){html{font-size:0.98556em}}@media (max-width: 52.17556em){html{font-size:0.98444em}}@media (max-width: 52.11667em){html{font-size:0.98333em}}@media (max-width: 52.05778em){html{font-size:0.98222em}}@media (max-width: 51.99889em){html{font-size:0.98111em}}@media (max-width: 51.94em){html{font-size:0.98em}}@media (max-width: 51.88111em){html{font-size:0.97889em}}@media (max-width: 51.82222em){html{font-size:0.97778em}}@media (max-width: 51.76333em){html{font-size:0.97667em}}@media (max-width: 51.70444em){html{font-size:0.97556em}}@media (max-width: 51.64556em){html{font-size:0.97444em}}@media (max-width: 51.58667em){html{font-size:0.97333em}}@media (max-width: 51.52778em){html{font-size:0.97222em}}@media (max-width: 51.46889em){html{font-size:0.97111em}}@media (max-width: 51.41em){html{font-size:0.97em}}@media (max-width: 51.35111em){html{font-size:0.96889em}}@media (max-width: 51.29222em){html{font-size:0.96778em}}@media (max-width: 51.23333em){html{font-size:0.96667em}}@media (max-width: 51.17444em){html{font-size:0.96556em}}@media (max-width: 51.11556em){html{font-size:0.96444em}}@media (max-width: 51.05667em){html{font-size:0.96333em}}@media (max-width: 50.99778em){html{font-size:0.96222em}}@media (max-width: 50.93889em){html{font-size:0.96111em}}@media (max-width: 50.88em){html{font-size:0.96em}}@media (max-width: 50.82111em){html{font-size:0.95889em}}@media (max-width: 50.76222em){html{font-size:0.95778em}}@media (max-width: 50.70333em){html{font-size:0.95667em}}@media (max-width: 50.64444em){html{font-size:0.95556em}}@media (max-width: 50.58556em){html{font-size:0.95444em}}@media (max-width: 50.52667em){html{font-size:0.95333em}}@media (max-width: 50.46778em){html{font-size:0.95222em}}@media (max-width: 50.40889em){html{font-size:0.95111em}}@media (max-width: 50.35em){html{font-size:0.95em}}@media (max-width: 50.29111em){html{font-size:0.94889em}}@media (max-width: 50.23222em){html{font-size:0.94778em}}@media (max-width: 50.17333em){html{font-size:0.94667em}}@media (max-width: 50.11444em){html{font-size:0.94556em}}@media (max-width: 50.05556em){html{font-size:0.94444em}}@media (max-width: 49.99667em){html{font-size:0.94333em}}@media (max-width: 49.93778em){html{font-size:0.94222em}}@media (max-width: 49.87889em){html{font-size:0.94111em}}@media (max-width: 49.82em){html{font-size:0.94em}}@media (max-width: 49.76111em){html{font-size:0.93889em}}@media (max-width: 49.70222em){html{font-size:0.93778em}}@media (max-width: 49.64333em){html{font-size:0.93667em}}@media (max-width: 49.58444em){html{font-size:0.93556em}}@media (max-width: 49.52556em){html{font-size:0.93444em}}@media (max-width: 49.46667em){html{font-size:0.93333em}}@media (max-width: 49.40778em){html{font-size:0.93222em}}@media (max-width: 49.34889em){html{font-size:0.93111em}}@media (max-width: 49.29em){html{font-size:0.93em}}@media (max-width: 49.23111em){html{font-size:0.92889em}}@media (max-width: 49.17222em){html{font-size:0.92778em}}@media (max-width: 49.11333em){html{font-size:0.92667em}}@media (max-width: 49.05444em){html{font-size:0.92556em}}@media (max-width: 48.99556em){html{font-size:0.92444em}}@media (max-width: 48.93667em){html{font-size:0.92333em}}@media (max-width: 48.87778em){html{font-size:0.92222em}}@media (max-width: 48.81889em){html{font-size:0.92111em}}@media (max-width: 48.76em){html{font-size:0.92em}}@media (max-width: 48.70111em){html{font-size:0.91889em}}@media (max-width: 48.64222em){html{font-size:0.91778em}}@media (max-width: 48.58333em){html{font-size:0.91667em}}@media (max-width: 48.52444em){html{font-size:0.91556em}}@media (max-width: 48.46556em){html{font-size:0.91444em}}@media (max-width: 48.40667em){html{font-size:0.91333em}}@media (max-width: 48.34778em){html{font-size:0.91222em}}@media (max-width: 48.28889em){html{font-size:0.91111em}}@media (max-width: 48.23em){html{font-size:0.91em}}@media (max-width: 48.17111em){html{font-size:0.90889em}}@media (max-width: 48.11222em){html{font-size:0.90778em}}@media (max-width: 48.05333em){html{font-size:0.90667em}}@media (max-width: 47.99444em){html{font-size:0.90556em}}@media (max-width: 47.93556em){html{font-size:0.90444em}}@media (max-width: 47.87667em){html{font-size:0.90333em}}@media (max-width: 47.81778em){html{font-size:0.90222em}}@media (max-width: 47.75889em){html{font-size:0.90111em}}@media (max-width: 47.7em){html{font-size:0.9em}}@media (max-width: 47.64111em){html{font-size:0.89889em}}@media (max-width: 47.58222em){html{font-size:0.89778em}}@media (max-width: 47.52333em){html{font-size:0.89667em}}@media (max-width: 47.46444em){html{font-size:0.89556em}}@media (max-width: 47.40556em){html{font-size:0.89444em}}@media (max-width: 47.34667em){html{font-size:0.89333em}}@media (max-width: 47.28778em){html{font-size:0.89222em}}@media (max-width: 47.22889em){html{font-size:0.89111em}}@media (max-width: 47.17em){html{font-size:0.89em}}@media (max-width: 47.11111em){html{font-size:0.88889em}}@media (max-width: 47.05222em){html{font-size:0.88778em}}@media (max-width: 46.99333em){html{font-size:0.88667em}}@media (max-width: 46.93444em){html{font-size:0.88556em}}@media (max-width: 46.87556em){html{font-size:0.88444em}}@media (max-width: 46.81667em){html{font-size:0.88333em}}@media (max-width: 46.75778em){html{font-size:0.88222em}}@media (max-width: 46.69889em){html{font-size:0.88111em}}@media (max-width: 46.64em){html{font-size:0.88em}}@media (max-width: 46.58111em){html{font-size:0.87889em}}@media (max-width: 46.52222em){html{font-size:0.87778em}}@media (max-width: 46.46333em){html{font-size:0.87667em}}@media (max-width: 46.40444em){html{font-size:0.87556em}}@media (max-width: 46.34556em){html{font-size:0.87444em}}@media (max-width: 46.28667em){html{font-size:0.87333em}}@media (max-width: 46.22778em){html{font-size:0.87222em}}@media (max-width: 46.16889em){html{font-size:0.87111em}}@media (max-width: 46.11em){html{font-size:0.87em}}@media (max-width: 46.05111em){html{font-size:0.86889em}}@media (max-width: 45.99222em){html{font-size:0.86778em}}@media (max-width: 45.93333em){html{font-size:0.86667em}}@media (max-width: 45.87444em){html{font-size:0.86556em}}@media (max-width: 45.81556em){html{font-size:0.86444em}}@media (max-width: 45.75667em){html{font-size:0.86333em}}@media (max-width: 45.69778em){html{font-size:0.86222em}}@media (max-width: 45.63889em){html{font-size:0.86111em}}@media (max-width: 45.58em){html{font-size:0.86em}}@media (max-width: 45.52111em){html{font-size:0.85889em}}@media (max-width: 45.46222em){html{font-size:0.85778em}}@media (max-width: 45.40333em){html{font-size:0.85667em}}@media (max-width: 45.34444em){html{font-size:0.85556em}}@media (max-width: 45.28556em){html{font-size:0.85444em}}@media (max-width: 45.22667em){html{font-size:0.85333em}}@media (max-width: 45.16778em){html{font-size:0.85222em}}@media (max-width: 45.10889em){html{font-size:0.85111em}}@media (max-width: 45.05em){html{font-size:1em}body{margin:0 auto}.segment{padding:0;white-space:normal;max-width:29em;margin:0 auto}.segment .comments,.segment .code{display:block;padding:1em}.segment .comments{margin-left:0;width:auto}.segment .code{display:block;overflow-y:hidden;overflow-x:auto}.segment .code .wrapper{display:inline-block}#meta{position:static;margin:2em 0 0 0;overflow-y:hidden;overflow-x:auto}#meta .file-path{display:inline-block}}nav{position:fixed;top:0;right:0;width:20em}@media (max-width: 45.05em){nav{left:0;width:100%}}nav .tools{position:relative;z-index:100}nav .tools li{display:table-cell;vertical-align:middle;text-align:center;white-space:nowrap;height:2.1em;padding:0 0.55em}nav .tools .github{padding:0}nav .tools .github a{display:block;height:2.1em;width:2.1em;text-indent:-9001em}nav .tools .search{width:100%}nav .tools .search input{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;display:block;width:100%}nav .toc{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;position:absolute;top:2.1em;bottom:0;width:100%;overflow-x:hidden;overflow-y:auto}nav .toc li{position:relative}nav .toc .label{display:block;line-height:2em;padding:0 0.55em 0 0.55em}nav .toc li li .label{padding-left:1.1em}nav .toc li li li .label{padding-left:1.65em}nav .toc li li li li .label{padding-left:2.2em}nav .toc li li li li li .label{padding-left:2.75em}nav .toc li li li li li li .label{padding-left:3.3em}nav{-moz-transition:height 150ms 0;-o-transition:height 150ms 0;-webkit-transition:height 150ms 0;transition:height 150ms 0}nav .tools .toggle{-moz-transition:background 150ms;-o-transition:background 150ms;-webkit-transition:background 150ms;transition:background 150ms}nav.active{-moz-transition:height 0;-o-transition:height 0;-webkit-transition:height 0;transition:height 0;height:100%}nav .toc{-moz-transition:right 150ms;-o-transition:right 150ms;-webkit-transition:right 150ms;transition:right 150ms;right:-100%}nav.active .toc{right:0}@media (max-width: 45.05em){nav .toc{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;right:auto;left:-100%}nav.active .toc{left:0}}@media (max-width: 45.05em){body{-moz-transition:left 150ms;-o-transition:left 150ms;-webkit-transition:left 150ms;transition:left 150ms;position:relative;left:0}html.popped{overflow:hidden}html.popped body{left:100%;overflow:hidden}}nav .toc .children,nav .toc .outline{display:none}nav .toc .expanded>.children,nav .toc .expanded>.outline,nav .toc .expanded>.outline .children{display:block}nav .toc .discloser{-moz-transition-property:-moz-transform,-webkit-transform,-o-transform,-moz-transform;-o-transition-property:-moz-transform,-webkit-transform,-o-transform,-o-transform;-webkit-transition-property:-moz-transform,-webkit-transform,-o-transform,-webkit-transform;transition-property:-moz-transform -webkit-transform -o-transform transform;-moz-transition-duration:200ms;-o-transition-duration:200ms;-webkit-transition-duration:200ms;transition-duration:200ms;-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-webkit-transform:rotate(0deg);transform:rotate(0deg);display:inline-block;height:9px;width:9px;padding:0.2em;margin:0.2em 0.2em -0.2em 0.2em;vertical-align:baseline;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGQzE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGRDE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0ZBMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0ZCMTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nQHMgwAAAM1JREFUeNpi/P//P0NJSYkuAwNDJhDXAPE7BjIAExIbZNA9IC4CYjZKDAIBfiDuBeLzQOxBiUEwoAXE26FYixKDYMAD6rpeqGvJNogBGl5F0PDLpMQgGBAC4mlQF9pTYhAMGADxASBeB8RylBgEA4FAfAOIW4CYhxKDQIAZxmChwJD1QFwGxHfINegaEGcB8UFyA/sd1AA9dEOIddFfIJ4OzdAfcSkiZNAOIC6GegcvwGXQHagBm8jNtB+hBmiTYgi6i+ZCw+EFOWkBIMAA1W4l62UzKWwAAAAASUVORK5CYII=') center center no-repeat;background-size:9px 9px}nav .toc .discloser.placeholder,nav .toc .expanded>.outline .discloser{background:none}nav .toc .expanded>.label .discloser{-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-webkit-transform:rotate(90deg);transform:rotate(90deg)}nav .toc .filtered>.label{display:none}nav .toc .matched-child>.label{display:block}nav .toc .matched-child>.children,nav .toc .matched-child>.outline,nav .toc .matched-child>.outline .children{display:block}nav .toc .matched>.children,nav .toc .matched>.outline,nav .toc .matched>.outline .children{display:block}nav.searching .toc .discloser{display:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}.comments .wrapper h1,.comments .wrapper h2,.comments .wrapper h3,.comments .wrapper h4,.comments .wrapper h5,.comments .wrapper h6{font-family:"HelveticaNeue-UltraLight","Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:100;letter-spacing:0.0625em;line-height:1.25;margin-bottom:0.5em}.comments .wrapper h1{font-size:2.5em}.comments .wrapper h2{font-size:2em}.comments .wrapper h3{font-size:1.6em}.comments .wrapper h4{font-size:1.4em}.comments .wrapper h5{font-size:1.3em}.comments .wrapper h6{font-size:1.2em}.comments .wrapper p{margin:1em 0}.comments .wrapper>*:first-child{margin-top:0}.comments .wrapper>*:last-child{margin-bottom:0}.comments .wrapper ol,.comments .wrapper ul{padding-left:1.75em;margin:1em 0}.comments .wrapper ol li{list-style:decimal}.comments .wrapper ul li{list-style:disc}.comments .wrapper li{margin:1em 0}.comments .wrapper li:first-child{margin-top:0}.comments .wrapper li:last-child{margin-bottom:0}.comments .wrapper code{display:inline-block;padding:0.25em 0.25em 0 0.25em}.comments .wrapper pre{display:block;overflow-x:auto;overflow-y:hidden;margin-bottom:1em}.comments .wrapper pre .hljs-comment,.comments .wrapper pre .hljs-template_comment,.comments .wrapper pre .diff .hljs-header,.comments .wrapper pre .hljs-doctype,.comments .wrapper pre .hljs-pi,.comments .wrapper pre .lisp .hljs-string,.comments .wrapper pre .hljs-javadoc{color:#93a1a1;font-style:italic}.comments .wrapper pre .hljs-keyword,.comments .wrapper pre .hljs-winutils,.comments .wrapper pre .method,.comments .wrapper pre .hljs-addition,.comments .wrapper pre .css .hljs-tag,.comments .wrapper pre .hljs-request,.comments .wrapper pre .hljs-status,.comments .wrapper pre .nginx .hljs-title{color:#859900}.comments .wrapper pre .hljs-number,.comments .wrapper pre .hljs-command,.comments .wrapper pre .hljs-string,.comments .wrapper pre .hljs-tag .hljs-value,.comments .wrapper pre .hljs-rules .hljs-value,.comments .wrapper pre .hljs-phpdoc,.comments .wrapper pre .tex .hljs-formula,.comments .wrapper pre .hljs-regexp,.comments .wrapper pre .hljs-hexcolor{color:#2aa198}.comments .wrapper pre .hljs-title,.comments .wrapper pre .hljs-localvars,.comments .wrapper pre .hljs-chunk,.comments .wrapper pre .hljs-decorator,.comments .wrapper pre .hljs-built_in,.comments .wrapper pre .hljs-identifier,.comments .wrapper pre .vhdl .hljs-literal,.comments .wrapper pre .hljs-id,.comments .wrapper pre .css .hljs-function{color:#268bd2}.comments .wrapper pre .hljs-attribute,.comments .wrapper pre .hljs-variable,.comments .wrapper pre .lisp .hljs-body,.comments .wrapper pre .smalltalk .hljs-number,.comments .wrapper pre .hljs-constant,.comments .wrapper pre .hljs-class .hljs-title,.comments .wrapper pre .hljs-parent,.comments .wrapper pre .haskell .hljs-type{color:#b58900}.comments .wrapper pre .hljs-preprocessor,.comments .wrapper pre .hljs-preprocessor .hljs-keyword,.comments .wrapper pre .hljs-pragma,.comments .wrapper pre .hljs-shebang,.comments .wrapper pre .hljs-symbol,.comments .wrapper pre .hljs-symbol .hljs-string,.comments .wrapper pre .diff .hljs-change,.comments .wrapper pre .hljs-special,.comments .wrapper pre .hljs-attr_selector,.comments .wrapper pre .hljs-important,.comments .wrapper pre .hljs-subst,.comments .wrapper pre .hljs-cdata,.comments .wrapper pre .clojure .hljs-title,.comments .wrapper pre .css .hljs-pseudo{color:#cb4b16}.comments .wrapper pre .hljs-deletion{color:#dc322f}.comments .wrapper pre .tex .hljs-formula{background:#eee8d5}.comments .wrapper pre code{padding:1em}.comments .wrapper blockquote{padding:0 1em}.comments .wrapper strong{font-weight:700}.comments .wrapper em{font-style:italic}html{background:#4a525a}#document{background:#f5fbff url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuMCIgeTE9IjAuNSIgeDI9IjEuMCIgeTI9IjAuNSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzI3MmMzMCIvPjxzdG9wIG9mZnNldD0iMzAlIiBzdG9wLWNvbG9yPSIjM2U0NTRjIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjNGE1MjVhIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g') 33em no-repeat;background:#f5fbff -webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0%, #272c30),color-stop(30%, #3e454c),color-stop(100%, #4a525a)) 33em no-repeat;background:#f5fbff -moz-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff -webkit-linear-gradient(left, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;background:#f5fbff linear-gradient(to right, #272c30,#3e454c 0.3em,#4a525a 1em) 33em no-repeat;margin-right:-1em;padding-right:1em}@media (max-width: 45.05em){#document{margin-right:0;padding-right:0}}#meta>*{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#272c30 1px 1px 0}#meta>*,#meta>* a{color:#9faab7}#meta>* a{text-decoration:none}.comments .wrapper{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35;text-shadow:#fff 1px 1px 0;color:#4a525a}.code .wrapper{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;text-shadow:#272c30 1px 1px 0;color:#cbd1d8}.code .wrapper .hljs{display:block;padding:0.5em}.code .wrapper .hljs-comment,.code .wrapper .hljs-template_comment,.code .wrapper .diff .hljs-header,.code .wrapper .hljs-doctype,.code .wrapper .hljs-pi,.code .wrapper .lisp .hljs-string,.code .wrapper .hljs-javadoc{color:#b1bac4;font-style:italic}.code .wrapper .hljs-keyword,.code .wrapper .hljs-winutils,.code .wrapper .method,.code .wrapper .hljs-addition,.code .wrapper .css .hljs-tag,.code .wrapper .hljs-request,.code .wrapper .hljs-status,.code .wrapper .nginx .hljs-title{color:#e0c090}.code .wrapper .hljs-string{color:#e9baba}.code .wrapper .hljs-property{color:#b9d0af}.code .wrapper .hljs-function{color:#abd9cf}.code .wrapper .hljs-class{color:#cee4dd}.code .wrapper .hljs-number,.code .wrapper .hljs-command,.code .wrapper .hljs-tag .hljs-value,.code .wrapper .hljs-rules .hljs-value,.code .wrapper .hljs-phpdoc,.code .wrapper .tex .hljs-formula,.code .wrapper .hljs-regexp,.code .wrapper .hljs-hexcolor{color:#cba8d6}.code .wrapper .hljs-title,.code .wrapper .hljs-localvars,.code .wrapper .hljs-chunk,.code .wrapper .hljs-decorator,.code .wrapper .hljs-built_in,.code .wrapper .hljs-identifier,.code .wrapper .vhdl .hljs-literal,.code .wrapper .hljs-id,.code .wrapper .css .hljs-function{color:#a9c2ba}.code .wrapper .hljs-attribute,.code .wrapper .hljs-variable,.code .wrapper .lisp .hljs-body,.code .wrapper .smalltalk .hljs-number,.code .wrapper .hljs-constant,.code .wrapper .hljs-class .hljs-title,.code .wrapper .hljs-parent,.code .wrapper .haskell .hljs-type{color:#b9d0af}.code .wrapper .hljs-preprocessor,.code .wrapper .hljs-preprocessor .hljs-keyword,.code .wrapper .hljs-pragma,.code .wrapper .hljs-shebang,.code .wrapper .hljs-symbol,.code .wrapper .hljs-symbol .hljs-string,.code .wrapper .diff .hljs-change,.code .wrapper .hljs-special,.code .wrapper .hljs-attr_selector,.code .wrapper .hljs-important,.code .wrapper .hljs-subst,.code .wrapper .hljs-cdata,.code .wrapper .clojure .hljs-title,.code .wrapper .css .hljs-pseudo{color:#cee4dd}.code .wrapper .hljs-deletion{color:#dc322f}.code .wrapper .tex .hljs-formula{background:#e9baba}@media (max-width: 45.05em){.code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;-moz-box-shadow:#272c30 0 0 0.5em 0.2em inset;-webkit-box-shadow:#272c30 0 0 0.5em 0.2em inset;box-shadow:#272c30 0 0 0.5em 0.2em inset;background:#4a525a}.code .wrapper{-moz-box-shadow:#4a525a 0 0 0.25em 0.75em;-webkit-box-shadow:#4a525a 0 0 0.25em 0.75em;box-shadow:#4a525a 0 0 0.25em 0.75em;background:#4a525a}}@media (max-width: 29em){.code{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0}}nav{text-shadow:#f0f0f0 1px 1px 0;color:#4a525a}nav .tools,nav .toc{font-family:"Helvetica Neue",Helvetica,"Droid Sans",sans-serif;font-weight:300;font-size:0.9375em;line-height:1.35}nav .tools{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjkiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiNjZGNkY2QiIHN0b3Atb3BhY2l0eT0iMC45Ii8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255,255,255,0.9)),color-stop(100%, rgba(205,205,205,0.9)));background:-moz-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:-webkit-linear-gradient(top, rgba(255,255,255,0.9),rgba(205,205,205,0.9));background:linear-gradient(to bottom, rgba(255,255,255,0.9),rgba(205,205,205,0.9));-moz-border-radius-bottomleft:0.4em;-webkit-border-bottom-left-radius:0.4em;border-bottom-left-radius:0.4em;border-bottom:1px solid #4a525a;border-left:1px solid #4a525a}@media (max-width: 53em){nav .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}}nav .tools li{border-right:1px solid #4a525a}nav .tools li:last-child{border-right:none}nav .tools .toggle{cursor:pointer}nav .tools .github a{-moz-transition:opacity 200ms;-o-transition:opacity 200ms;-webkit-transition:opacity 200ms;transition:opacity 200ms;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=50);opacity:0.5;background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACcAAAAwCAYAAACScGMWAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowOEFDRENGODE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDowOEFDRENGOTE2NEUxMUUxODdDNUQ2ODM0QzVGRkVBMSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjA4QUNEQ0Y2MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjA4QUNEQ0Y3MTY0RTExRTE4N0M1RDY4MzRDNUZGRUExIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+FC/Z5AAACv9JREFUeNrMWXl0VNUdvu/NmzWZJQnZN0hCWIQEIQuErUCBI2qwEAFRBJUeDvUPDwfKVhDUY2mPp8spakVELSq11goIiCBbUVKKUGKQQFiCSBJIQjLJZPbJzOt3J/dOXiYJgcqh3nO+vPfm3Xfvd3/3t94IsiyTH2sTyY+4SfxGpVIpfzdBokdxjQHOADuAj4GmuzRvFjAbmAZkAocEQZjLX/r9/vYbuq0UgigoQKagsxyG74FlgB4gYdAA0UASkAIkACahvSn70Xd/AlrCxm4VRDEBIBScUxg5wiCs7oZcEJDwN7g+AswH3gAOApVALdAIWIEGtpgyYAfwPFtYTU/jbtmy5W/gsZAugnMKbSsJ2oXAn1J62o9AIJCDy/ZgbzbQLVoqkAtM722fa2pqYnHJwfgmXG23MgjV7SjO3bR06BnlogUSe7PW+ntplXQHUlNTHewxqjdyR+8lOehxYNCgQa3hnHoil8a18F60trY2cenSpYU+n48qfXMnvaEQYcIMQ4KmrbAk/Cb3ZGV3gt7GWbx4cSm4xHd1JR2+aPfdIPK/ICIiwlNaWroKfMSgwDq0Moj78feB/1e4cjqdmq1btz6C25921jk5iOLe4i2XdDh+aF/ejhw5ksYEZJE6BAeHSuT83nyaMTLSZzAYfO2K7BPdbo/k9ngkOM8u32i1moBep2/TarVtGrU64PZ6VC0tLVqv1ydyFxLeamtrzbgYgJFSh+Bk2jOpe1ICmf7QtKp5856sHJo7zGoym4Lk3G636HQ4JXurTd3U1KTBtqgcTpcQZTYHIiIjfNExMV6DIaINuuTX6XQBp8sp1t24odv3+d6UN9/cPPTqtWpjOEFYLOeUI3CJwJJULAMZFE5u9cqVx1/esKE8jLebgWc3akCjjIFKbwF46dw0AlLXVnXpUlzx9OJpZyvO9VEShJR9LpfrHdy2SgqDCEB83i7Elj53NozYKeAY3QHAE0ZOz0KQmukuJ+VifUPkMrKyjO9t2bzvwUdmbL5eV2/gBBVE1crAL/OAy4mlJSe5Vq5Zd0pB7O/4OB7XXwJbgC/pYLHRFhJtNhONRk1q6xtIv+RE4vJ4SUOTldTdDKWABcBi+g3wdtH9OfaHJ4zaVpg7NHvH/oPrFKGMW4wghYn/uvJhwvjx1UZLFN+6I/iQ3r/Pnh+iGQcWUVPfaCWNzTZiiowgMA5yo7GJ1N5oIP4OI4llmQzV6QVAdenp8v3J8X1IhF7aplarV0HXaE5IJEniH8md/RwhFZ1iWFoqj3dUop8yQrzFPPvss78Cuf48e7W22IjL7SHXauuUxGgbpTS2goKC5fhu9InyCnLmfFWDiByQv6OOuCu5dmEeU46Iyfj7CqzKwXQp1OLj4wfSrcJEll78q0b5EBMTQ4k++V3N9cE6rVYCuRCP5OTkFm5ECskJFMdxd5X/dLOh3shuG9n1n8pMYuLEiQ10sawmuFU7SQMAfxg3bhxXn1yLyWDx+X0mhVT5O2d4NLADb/GHr0/9J97ltFO9lDJSgruyC3gpNjb20tq1a4+OHj26OaxQGgDMYxarbN8BTxuNxm9nzZr1zZIlS6r4GiWVekhbW0BL9Q0L9s+dO/dqKKfsJvCb4fMuMKuRP/nwvSN4//PHH55CsAXckqkhbGJ4nWYSbMCXmIKkKRNJhQeIATYqvs3PGZD1EX1F55s0adI5xbupXciJ7ddCWBCVopyekuw8ffJr2lkzMLMviYky0/7UeRcDNIMYxbeIKf6IvLy8madOnZqId1KEQU8S4/rA1ZiwODX9Ng9YCcxc/sxjkyWVivo+GRGkurKy8j1G7DW6YGWECMVY2hKTEicjHH1stVpNSYkJztmPlqw/uG/vK/6ATPeC+Nv88JIqUg2X0epwEo/XW4LPltMaFNs+vays7HhSUtLS9OTEpgi9jkRbTMRmd5Ios5G0OuGTA/LkMxcubWtr89MIcRnZyLYnnniC70Ap8JfutjWE9evXF02YMKGCiz0hPu5YWlLC/PuyMzOGZGdKOQP7k76pSSR3YDZJSYyDVE0js7KyVhw88MVQjJkODAR0AzLSyJi8XIJvzMMGZU+M7xP9V5p4snHf3/jqxp+g35+Z1F4GTEFOCsktYCHmANCgKAX779q1a9W7776bd/jw4b6QpFEtSUSr0VyTJPE8vMB3Br2uSRREh0oUbPEpaQlFhQW5dXU3mtUaddzBA4crHE5HItba3+ly9/V4fWbMSQuo7SD2DsanPnQhEMnmfYM66c4Vf3txTFdSDTwakqAYrE2jgAV2u/2tvXv3/mPRokUfZWdnfwhvXhHKBBm4IYXhX8BrwC/wvmDZsmV9mFQXKgzgaeovRUXFr5QcdQcvAKupwFJSUkqqa6q3Kxw0lWIqU/rhly9fTsKWP1hdXR3dW4YL3fumqqrq1xqNhpZ9cewMhiYJNAKdpjqG+a9wy+56VsIkNXLkSOqIZXjx5s/37Z3QnS5SK4yMjDx8J/VBSUlJOb5bATwGUB3rC2j57gQ9BSuyeixwEJLiYdbUucq5uTnXNm3a1B3BXKDtTshZLBbnxYsXV1M31GW82yXH8ArXHbPZbENa/kc8zwPoQcvrwDU+Kd7ZIUUXq57cc+bMKeMlICKCC1sZWsTOnTs/wVyP3i65noqZjezEiNhsNiP83XPovBXYzHKy0EHPzJkzz6elpQXDGIj48/Pz67mWjhgxorqoqOhKKJGwWmkCUADdNXSuBTqrWG8V//d0hXq93spDEEd4Gz58eCMqdoENLtPqPXQyKUl+vK8PS8tMQaMQeDkqk477zkm+dAsjOzxjxozxXq/3rZMnT2Y0NzcbaIWFrXLjKqJKCqZJCHOy4qTIj+ghK47GBLwPhEsITddxL/R+7Npd++CDD86AyJPAMzU1NXGYW0C+5UHkGLhhw4axzL0IyiCvUomBsPM84QefCfd4oi2KlZhgQ2pq6ng83ke3xeFweHo6ykIKJCuykB90GCTdTicQpLq3AyR30oIXQXoRPzLopu9dO52S7uSUkrkXmq67uzMOOAMZRtDj6aeisrqt+UIjqTWasEHbM/eo2HiiQ07G9JtodDpibahTNdXdCPYzRBoFo8XCDr2D48h8clRutH8oROoMkaEVpQ8YzCxE6PEoMERubPHPFJZDvXOwpiB6gyF4/E5/87jcJDE9gxz7bMcDlBx1mOkZGS5UXMFxNHq9v29mf4+I+oIarj9ApCE5w+x8jhNl5emzSmbUBM8aRo3lUaBdCjJzKQrrVUhO23kVcrsP8nk9TJdUxGGzJXz2/pYXbtbWBI/JxkyavKd/Zlbr1StV9PCFDB6aW1dUmN/YLzOr5cK5iuizZ8v7PDD17S+HDLu/8tuy0wP+8NuXh/jdds/8BU9Fet3uXrc2RM7a0NBOjq1ECB0CtBMVoUu2psZxrVbrOKM5emeE2bj7iz27Ilauf/EZR2srVE3tXvP8ui+R55Hla9Z9tfDx2cVVFy6YP9r5acaRQ4deLZk9K9Nlt5fs3r0nc3h+4RRbc+PJAETL5RH0jWHOMKQPk+fM7+7cq+NjSSQum4M01V8nZ//9FfXyxRevXJ02ZtTI6TGxsVf6ZWWv2LP946ms8iofkDOsKeBx/06j1WtPHC99E7XEizSfA7LZ6LSSOzBl7lPuTkqOtn/bO53J3WHLAx4G6igRlvPPZO6FFiy/B2j5V0hLQvYNPcY4AVB/Sa3BEqwTCLnSo3e4S//oiGHFDTXh3cDFsIVMZXH8N4z8bbX/CjAA0UTEH4oMvREAAAAASUVORK5CYII=') center center no-repeat;background-size:19.5px 24px}nav .tools .github a:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=90);opacity:0.9}nav.active .tools{-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0}nav.active .tools .toggle{background:rgba(205,205,205,0.9);position:relative}nav .toc{-moz-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;-webkit-box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;box-shadow:rgba(0,0,0,0.3) 0 0 0.5em 0.1em;background:rgba(230,230,230,0.9);border-left:1px solid #4a525a}nav .toc .label{color:#4a525a;text-decoration:none;border-top:1px solid rgba(192,192,192,0.9);border-bottom:1px solid rgba(192,192,192,0.9);margin-top:-1px}nav .toc .label:hover{background:rgba(205,205,205,0.9)}nav .toc .file>.label{font-weight:bold}nav .toc .selected>.label{background:#f5fbff}nav .toc .label em{font-weight:bold}nav .toc .file>.label em{color:#101214}nav .toc .matched-child>.label{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=65);opacity:0.65;text-shadow:none;background:rgba(192,192,192,0.9)}@media (max-width: 45.05em){nav .tools,nav .toc{border-left-width:0}nav .tools{background:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2NkY2RjZCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');background:-webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff),color-stop(100%, #cdcdcd));background:-moz-linear-gradient(top, #ffffff,#cdcdcd);background:-webkit-linear-gradient(top, #ffffff,#cdcdcd);background:linear-gradient(to bottom, #ffffff,#cdcdcd)}nav .toc{background:#e6e6e6}}.comments .wrapper a{display:inline-block;color:#a8614e;text-decoration:none}.comments .wrapper a:hover,.comments .wrapper a:hover *{text-decoration:underline}.comments .wrapper code{font-family:"Droid Sans Mono",Menlo,Monaco,monospace;font-size:0.75em;line-height:1.4;border:1px solid #e6e0d5}.comments .wrapper pre,.comments .wrapper code{-moz-border-radius:0.4em;-webkit-border-radius:0.4em;border-radius:0.4em;background:#fbf8f3}.comments .wrapper pre{-moz-box-shadow:#f2ece3 0 0 0.4em 0.2em;-webkit-box-shadow:#f2ece3 0 0 0.4em 0.2em;box-shadow:#f2ece3 0 0 0.4em 0.2em;border:1px solid #d9c9af}.comments .wrapper pre code{border-width:0;background:transparent}.comments .wrapper blockquote{border-left:0.15em solid #959fa8;margin-left:-0.15em}body{-webkit-text-size-adjust:100%}input[type="search"]{-moz-border-radius:1em;-webkit-border-radius:1em;border-radius:1em;-moz-box-shadow:#ddd 0 1px 1px 0 inset;-webkit-box-shadow:#ddd 0 1px 1px 0 inset;box-shadow:#ddd 0 1px 1px 0 inset;border:1px solid #959595;padding:0.15em 0.8em}.comments.doc-section .wrapper{color:#252519}.comments.doc-section.doc-section-private .wrapper,.comments.doc-section.doc-section-protected .wrapper,.comments.doc-section.doc-section-internal .wrapper{color:#7f7f7f}.comments.doc-section .doc-section-header{font:bold 18px "helvetica neue",helvetica,sans-serif}.comments.doc-section .docs .doc-section-header code{font-size:18px}.code .marker,.code .marker.wrapper,.code .wrapper.marker{display:none}.code.folded .wrapper{display:none;cursor:default}.code.folded .marker{-moz-border-radius:0.2em;-webkit-border-radius:0.2em;border-radius:0.2em;-moz-box-shadow:#2f3539 1px 1px 1px 0;-webkit-box-shadow:#2f3539 1px 1px 1px 0;box-shadow:#2f3539 1px 1px 1px 0;display:inline-block;border:1px solid #73787f;padding:0.2em 0.5em;margin-left:-0.5em;margin-right:-0.5em;background:#58616b;font:12px "Droid Sans Mono",Menlo,Monaco,monospace;text-shadow:#2f3539 1px 1px 0px;cursor:pointer;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.code.folded .marker .c1{color:#73787f;font-style:normal}.code.folded .marker:hover{background:#5f6872}.code.folded .marker:hover .c1{color:#7b8087}.code.folded .marker .c1:after{content:" …"} diff --git a/ast/source/api/index.js.json b/ast/source/api/index.js.json new file mode 100644 index 0000000..f5630b3 --- /dev/null +++ b/ast/source/api/index.js.json @@ -0,0 +1,908 @@ +{ + "type": "File", + "start": 0, + "end": 143, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 143, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportAllDeclaration", + "start": 0, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 29 + } + }, + "source": { + "type": "StringLiteral", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + }, + "extra": { + "rawValue": "./randfloat", + "raw": "'./randfloat'" + }, + "value": "./randfloat" + } + }, + { + "type": "ExportAllDeclaration", + "start": 30, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 27 + } + }, + "source": { + "type": "StringLiteral", + "start": 44, + "end": 55, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + }, + "extra": { + "rawValue": "./randint", + "raw": "'./randint'" + }, + "value": "./randint" + } + }, + { + "type": "ExportAllDeclaration", + "start": 58, + "end": 87, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 29 + } + }, + "source": { + "type": "StringLiteral", + "start": 72, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 27 + } + }, + "extra": { + "rawValue": "./randrange", + "raw": "'./randrange'" + }, + "value": "./randrange" + } + }, + { + "type": "ExportAllDeclaration", + "start": 88, + "end": 114, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 26 + } + }, + "source": { + "type": "StringLiteral", + "start": 102, + "end": 112, + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 24 + } + }, + "extra": { + "rawValue": "./sample", + "raw": "'./sample'" + }, + "value": "./sample" + } + }, + { + "type": "ExportAllDeclaration", + "start": 115, + "end": 142, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 27 + } + }, + "source": { + "type": "StringLiteral", + "start": 129, + "end": 140, + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 25 + } + }, + "extra": { + "rawValue": "./shuffle", + "raw": "'./shuffle'" + }, + "value": "./shuffle" + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randfloat", + "start": 14, + "end": 27, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 30, + "end": 36, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 39, + "end": 43, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randint", + "start": 44, + "end": 55, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 25 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 56, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 26 + }, + "end": { + "line": 2, + "column": 27 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 58, + "end": 64, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 65, + "end": 66, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 67, + "end": 71, + "loc": { + "start": { + "line": 3, + "column": 9 + }, + "end": { + "line": 3, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randrange", + "start": 72, + "end": 85, + "loc": { + "start": { + "line": 3, + "column": 14 + }, + "end": { + "line": 3, + "column": 27 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 86, + "end": 87, + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 88, + "end": 94, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 95, + "end": 96, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 97, + "end": 101, + "loc": { + "start": { + "line": 4, + "column": 9 + }, + "end": { + "line": 4, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./sample", + "start": 102, + "end": 112, + "loc": { + "start": { + "line": 4, + "column": 14 + }, + "end": { + "line": 4, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 113, + "end": 114, + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 115, + "end": 121, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 122, + "end": 123, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 124, + "end": 128, + "loc": { + "start": { + "line": 5, + "column": 9 + }, + "end": { + "line": 5, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./shuffle", + "start": 129, + "end": 140, + "loc": { + "start": { + "line": 5, + "column": 14 + }, + "end": { + "line": 5, + "column": 25 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 141, + "end": 142, + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 143, + "end": 143, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/randfloat.js.json b/ast/source/api/randfloat.js.json new file mode 100644 index 0000000..970b001 --- /dev/null +++ b/ast/source/api/randfloat.js.json @@ -0,0 +1,1074 @@ +{ + "type": "File", + "start": 0, + "end": 211, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 211, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 129, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "FunctionDeclaration", + "start": 136, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 145, + "end": 154, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 25 + }, + "identifierName": "randfloat" + }, + "name": "randfloat", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 157, + "end": 158, + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 29 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 161, + "end": 162, + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 33 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 165, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 36 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 168, + "end": 207, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 40 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 175, + "end": 205, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 38 + } + }, + "left": { + "type": "Identifier", + "start": 175, + "end": 176, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 179, + "end": 205, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 38 + } + }, + "left": { + "type": "CallExpression", + "start": 179, + "end": 193, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 26 + } + }, + "callee": { + "type": "MemberExpression", + "start": 179, + "end": 190, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 179, + "end": 183, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 184, + "end": 190, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + }, + "identifierName": "random" + }, + "name": "random" + }, + "computed": false + }, + "arguments": [] + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "start": 198, + "end": 203, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 36 + } + }, + "left": { + "type": "Identifier", + "start": 198, + "end": 199, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 36 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesized": true, + "parenStart": 196 + } + } + } + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 127, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 127, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 127, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 127, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 129, + "end": 135, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 136, + "end": 144, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randfloat", + "start": 145, + "end": 154, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 155, + "end": 156, + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 157, + "end": 158, + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 29 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 159, + "end": 160, + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 161, + "end": 162, + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 163, + "end": 164, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 165, + "end": 166, + "loc": { + "start": { + "line": 7, + "column": 36 + }, + "end": { + "line": 7, + "column": 37 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 168, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 175, + "end": 176, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "+", + "start": 177, + "end": 178, + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Math", + "start": 179, + "end": 183, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 183, + "end": 184, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "random", + "start": 184, + "end": 190, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 190, + "end": 191, + "loc": { + "start": { + "line": 8, + "column": 23 + }, + "end": { + "line": 8, + "column": 24 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 192, + "end": 193, + "loc": { + "start": { + "line": 8, + "column": 25 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 194, + "end": 195, + "loc": { + "start": { + "line": 8, + "column": 27 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 196, + "end": 197, + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 198, + "end": 199, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 200, + "end": 201, + "loc": { + "start": { + "line": 8, + "column": 33 + }, + "end": { + "line": 8, + "column": 34 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 204, + "end": 205, + "loc": { + "start": { + "line": 8, + "column": 37 + }, + "end": { + "line": 8, + "column": 38 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 206, + "end": 207, + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 208, + "end": 209, + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 211, + "end": 211, + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/randint.js.json b/ast/source/api/randint.js.json new file mode 100644 index 0000000..46340a4 --- /dev/null +++ b/ast/source/api/randint.js.json @@ -0,0 +1,1269 @@ +{ + "type": "File", + "start": 0, + "end": 210, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 210, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 116, + "end": 208, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "FunctionDeclaration", + "start": 123, + "end": 208, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 132, + "end": 139, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 23 + }, + "identifierName": "randint" + }, + "name": "randint", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 142, + "end": 143, + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 146, + "end": 147, + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 31 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 150, + "end": 208, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 9, + "column": 1 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 153, + "end": 206, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 54 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 160, + "end": 204, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 52 + } + }, + "left": { + "type": "Identifier", + "start": 160, + "end": 161, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "CallExpression", + "start": 164, + "end": 204, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 52 + } + }, + "callee": { + "type": "MemberExpression", + "start": 164, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 22 + } + }, + "object": { + "type": "Identifier", + "start": 164, + "end": 168, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 169, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 22 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 176, + "end": 202, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 50 + } + }, + "left": { + "type": "CallExpression", + "start": 176, + "end": 190, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 38 + } + }, + "callee": { + "type": "MemberExpression", + "start": 176, + "end": 187, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 35 + } + }, + "object": { + "type": "Identifier", + "start": 176, + "end": 180, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 28 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 181, + "end": 187, + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 35 + }, + "identifierName": "random" + }, + "name": "random" + }, + "computed": false + }, + "arguments": [] + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "start": 195, + "end": 200, + "loc": { + "start": { + "line": 8, + "column": 43 + }, + "end": { + "line": 8, + "column": 48 + } + }, + "left": { + "type": "Identifier", + "start": 195, + "end": 196, + "loc": { + "start": { + "line": 8, + "column": 43 + }, + "end": { + "line": 8, + "column": 44 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 199, + "end": 200, + "loc": { + "start": { + "line": 8, + "column": 47 + }, + "end": { + "line": 8, + "column": 48 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesized": true, + "parenStart": 193 + } + } + } + ] + } + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 114, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 114, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 114, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", + "start": 1, + "end": 114, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 116, + "end": 122, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 123, + "end": 131, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 132, + "end": 139, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 23 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 140, + "end": 141, + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 142, + "end": 143, + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 144, + "end": 145, + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 146, + "end": 147, + "loc": { + "start": { + "line": 7, + "column": 30 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 148, + "end": 149, + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 150, + "end": 151, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 153, + "end": 159, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 160, + "end": 161, + "loc": { + "start": { + "line": 8, + "column": 8 + }, + "end": { + "line": 8, + "column": 9 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "+", + "start": 162, + "end": 163, + "loc": { + "start": { + "line": 8, + "column": 10 + }, + "end": { + "line": 8, + "column": 11 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Math", + "start": 164, + "end": 168, + "loc": { + "start": { + "line": 8, + "column": 12 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 168, + "end": 169, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "floor", + "start": 169, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 22 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 174, + "end": 175, + "loc": { + "start": { + "line": 8, + "column": 22 + }, + "end": { + "line": 8, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Math", + "start": 176, + "end": 180, + "loc": { + "start": { + "line": 8, + "column": 24 + }, + "end": { + "line": 8, + "column": 28 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 180, + "end": 181, + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "random", + "start": 181, + "end": 187, + "loc": { + "start": { + "line": 8, + "column": 29 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 187, + "end": 188, + "loc": { + "start": { + "line": 8, + "column": 35 + }, + "end": { + "line": 8, + "column": 36 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 189, + "end": 190, + "loc": { + "start": { + "line": 8, + "column": 37 + }, + "end": { + "line": 8, + "column": 38 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 191, + "end": 192, + "loc": { + "start": { + "line": 8, + "column": 39 + }, + "end": { + "line": 8, + "column": 40 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 193, + "end": 194, + "loc": { + "start": { + "line": 8, + "column": 41 + }, + "end": { + "line": 8, + "column": 42 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 195, + "end": 196, + "loc": { + "start": { + "line": 8, + "column": 43 + }, + "end": { + "line": 8, + "column": 44 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 197, + "end": 198, + "loc": { + "start": { + "line": 8, + "column": 45 + }, + "end": { + "line": 8, + "column": 46 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 199, + "end": 200, + "loc": { + "start": { + "line": 8, + "column": 47 + }, + "end": { + "line": 8, + "column": 48 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 201, + "end": 202, + "loc": { + "start": { + "line": 8, + "column": 49 + }, + "end": { + "line": 8, + "column": 50 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 203, + "end": 204, + "loc": { + "start": { + "line": 8, + "column": 51 + }, + "end": { + "line": 8, + "column": 52 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 205, + "end": 206, + "loc": { + "start": { + "line": 8, + "column": 53 + }, + "end": { + "line": 8, + "column": 54 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 207, + "end": 208, + "loc": { + "start": { + "line": 9, + "column": 0 + }, + "end": { + "line": 9, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 210, + "end": 210, + "loc": { + "start": { + "line": 11, + "column": 0 + }, + "end": { + "line": 11, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/randrange.js.json b/ast/source/api/randrange.js.json new file mode 100644 index 0000000..e530d24 --- /dev/null +++ b/ast/source/api/randrange.js.json @@ -0,0 +1,4031 @@ +{ + "type": "File", + "start": 0, + "end": 497, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 497, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "randint" + }, + "name": "randint" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 24, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 35 + } + }, + "extra": { + "rawValue": "./randint", + "raw": "'./randint'" + }, + "value": "./randint" + }, + "trailingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", + "start": 39, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ] + }, + { + "type": "ExportNamedDeclaration", + "start": 117, + "end": 495, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "FunctionDeclaration", + "start": 124, + "end": 495, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 133, + "end": 142, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 25 + }, + "identifierName": "randrange" + }, + "name": "randrange", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 145, + "end": 150, + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 33 + }, + "identifierName": "start" + }, + "name": "start" + }, + { + "type": "Identifier", + "start": 153, + "end": 157, + "loc": { + "start": { + "line": 7, + "column": 36 + }, + "end": { + "line": 7, + "column": 40 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + { + "type": "Identifier", + "start": 160, + "end": 164, + "loc": { + "start": { + "line": 7, + "column": 43 + }, + "end": { + "line": 7, + "column": 47 + }, + "identifierName": "step" + }, + "name": "step" + } + ], + "body": { + "type": "BlockStatement", + "start": 167, + "end": 495, + "loc": { + "start": { + "line": 7, + "column": 50 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 201, + "end": 256, + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 56 + } + }, + "test": { + "type": "BinaryExpression", + "start": 206, + "end": 224, + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 206, + "end": 210, + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 10 + }, + "identifierName": "stop" + }, + "name": "stop", + "leadingComments": null + }, + "operator": "===", + "right": { + "type": "Identifier", + "start": 215, + "end": 224, + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 24 + }, + "identifierName": "undefined" + }, + "name": "undefined" + }, + "leadingComments": null + }, + "consequent": { + "type": "ReturnStatement", + "start": 227, + "end": 256, + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 56 + } + }, + "argument": { + "type": "CallExpression", + "start": 234, + "end": 254, + "loc": { + "start": { + "line": 11, + "column": 34 + }, + "end": { + "line": 11, + "column": 54 + } + }, + "callee": { + "type": "Identifier", + "start": 234, + "end": 241, + "loc": { + "start": { + "line": 11, + "column": 34 + }, + "end": { + "line": 11, + "column": 41 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 243, + "end": 244, + "loc": { + "start": { + "line": 11, + "column": 43 + }, + "end": { + "line": 11, + "column": 44 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "Identifier", + "start": 247, + "end": 252, + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 52 + }, + "identifierName": "start" + }, + "name": "start" + } + ] + } + }, + "alternate": null, + "leadingComments": [ + { + "type": "CommentLine", + "value": " TODO handle empty ranges", + "start": 171, + "end": 198, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ] + }, + { + "type": "IfStatement", + "start": 258, + "end": 294, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 37 + } + }, + "test": { + "type": "BinaryExpression", + "start": 263, + "end": 281, + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 24 + } + }, + "left": { + "type": "Identifier", + "start": 263, + "end": 267, + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "===", + "right": { + "type": "Identifier", + "start": 272, + "end": 281, + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 24 + }, + "identifierName": "undefined" + }, + "name": "undefined" + } + }, + "consequent": { + "type": "ExpressionStatement", + "start": 284, + "end": 294, + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 37 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 284, + "end": 292, + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 35 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 284, + "end": 288, + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 31 + }, + "identifierName": "step" + }, + "name": "step" + }, + "right": { + "type": "NumericLiteral", + "start": 291, + "end": 292, + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 35 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 297, + "end": 492, + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + }, + "test": { + "type": "BinaryExpression", + "start": 302, + "end": 315, + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 19 + } + }, + "left": { + "type": "Identifier", + "start": 302, + "end": 306, + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 10 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": ">=", + "right": { + "type": "Identifier", + "start": 310, + "end": 315, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 19 + }, + "identifierName": "start" + }, + "name": "start" + } + }, + "consequent": { + "type": "BlockStatement", + "start": 318, + "end": 401, + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 16, + "column": 2 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 322, + "end": 398, + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 78 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 329, + "end": 396, + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 76 + } + }, + "left": { + "type": "Identifier", + "start": 329, + "end": 334, + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 14 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 337, + "end": 396, + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 76 + } + }, + "left": { + "type": "Identifier", + "start": 337, + "end": 341, + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 21 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "*", + "right": { + "type": "CallExpression", + "start": 344, + "end": 396, + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 76 + } + }, + "callee": { + "type": "Identifier", + "start": 344, + "end": 351, + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 31 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 353, + "end": 354, + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 34 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "CallExpression", + "start": 357, + "end": 394, + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 74 + } + }, + "callee": { + "type": "MemberExpression", + "start": 357, + "end": 367, + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 47 + } + }, + "object": { + "type": "Identifier", + "start": 357, + "end": 361, + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 41 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 362, + "end": 367, + "loc": { + "start": { + "line": 15, + "column": 42 + }, + "end": { + "line": 15, + "column": 47 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 369, + "end": 392, + "loc": { + "start": { + "line": 15, + "column": 49 + }, + "end": { + "line": 15, + "column": 72 + } + }, + "left": { + "type": "BinaryExpression", + "start": 371, + "end": 383, + "loc": { + "start": { + "line": 15, + "column": 51 + }, + "end": { + "line": 15, + "column": 63 + } + }, + "left": { + "type": "Identifier", + "start": 371, + "end": 375, + "loc": { + "start": { + "line": 15, + "column": 51 + }, + "end": { + "line": 15, + "column": 55 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 378, + "end": 383, + "loc": { + "start": { + "line": 15, + "column": 58 + }, + "end": { + "line": 15, + "column": 63 + }, + "identifierName": "start" + }, + "name": "start" + }, + "extra": { + "parenthesized": true, + "parenStart": 369 + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 388, + "end": 392, + "loc": { + "start": { + "line": 15, + "column": 68 + }, + "end": { + "line": 15, + "column": 72 + }, + "identifierName": "step" + }, + "name": "step" + } + } + ] + } + ] + } + } + } + } + ], + "directives": [] + }, + "alternate": { + "type": "BlockStatement", + "start": 408, + "end": 492, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 19, + "column": 2 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 412, + "end": 489, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 79 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 419, + "end": 487, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 77 + } + }, + "left": { + "type": "Identifier", + "start": 419, + "end": 424, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 427, + "end": 487, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 77 + } + }, + "left": { + "type": "Identifier", + "start": 427, + "end": 431, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "*", + "right": { + "type": "CallExpression", + "start": 434, + "end": 487, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 77 + } + }, + "callee": { + "type": "Identifier", + "start": 434, + "end": 441, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 31 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 443, + "end": 444, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "CallExpression", + "start": 447, + "end": 485, + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 75 + } + }, + "callee": { + "type": "MemberExpression", + "start": 447, + "end": 457, + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 47 + } + }, + "object": { + "type": "Identifier", + "start": 447, + "end": 451, + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 41 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 452, + "end": 457, + "loc": { + "start": { + "line": 18, + "column": 42 + }, + "end": { + "line": 18, + "column": 47 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 459, + "end": 483, + "loc": { + "start": { + "line": 18, + "column": 49 + }, + "end": { + "line": 18, + "column": 73 + } + }, + "left": { + "type": "BinaryExpression", + "start": 461, + "end": 473, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 63 + } + }, + "left": { + "type": "Identifier", + "start": 461, + "end": 466, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 56 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 469, + "end": 473, + "loc": { + "start": { + "line": 18, + "column": 59 + }, + "end": { + "line": 18, + "column": 63 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "extra": { + "parenthesized": true, + "parenStart": 459 + } + }, + "operator": "/", + "right": { + "type": "UnaryExpression", + "start": 478, + "end": 483, + "loc": { + "start": { + "line": 18, + "column": 68 + }, + "end": { + "line": 18, + "column": 73 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 479, + "end": 483, + "loc": { + "start": { + "line": 18, + "column": 69 + }, + "end": { + "line": 18, + "column": 73 + }, + "identifierName": "step" + }, + "name": "step" + }, + "extra": { + "parenthesizedArgument": false + } + } + } + ] + } + ] + } + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", + "start": 39, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", + "start": 39, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", + "start": 39, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " TODO handle empty ranges", + "start": 171, + "end": 198, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 28 + } + } + } + ], + "tokens": [ + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 9, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 17, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 19, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randint", + "start": 24, + "end": 35, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 35 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 36, + "end": 37, + "loc": { + "start": { + "line": 1, + "column": 36 + }, + "end": { + "line": 1, + "column": 37 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", + "start": 39, + "end": 115, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 5, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 117, + "end": 123, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 124, + "end": 132, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randrange", + "start": 133, + "end": 142, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 143, + "end": 144, + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 145, + "end": 150, + "loc": { + "start": { + "line": 7, + "column": 28 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 151, + "end": 152, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 35 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "stop", + "start": 153, + "end": 157, + "loc": { + "start": { + "line": 7, + "column": 36 + }, + "end": { + "line": 7, + "column": 40 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 158, + "end": 159, + "loc": { + "start": { + "line": 7, + "column": 41 + }, + "end": { + "line": 7, + "column": 42 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 160, + "end": 164, + "loc": { + "start": { + "line": 7, + "column": 43 + }, + "end": { + "line": 7, + "column": 47 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 165, + "end": 166, + "loc": { + "start": { + "line": 7, + "column": 48 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 167, + "end": 168, + "loc": { + "start": { + "line": 7, + "column": 50 + }, + "end": { + "line": 7, + "column": 51 + } + } + }, + { + "type": "CommentLine", + "value": " TODO handle empty ranges", + "start": 171, + "end": 198, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 9, + "column": 28 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 201, + "end": 203, + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 3 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 204, + "end": 205, + "loc": { + "start": { + "line": 11, + "column": 4 + }, + "end": { + "line": 11, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "stop", + "start": 206, + "end": 210, + "loc": { + "start": { + "line": 11, + "column": 6 + }, + "end": { + "line": 11, + "column": 10 + } + } + }, + { + "type": { + "label": "==/!=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 6, + "updateContext": null + }, + "value": "===", + "start": 211, + "end": 214, + "loc": { + "start": { + "line": 11, + "column": 11 + }, + "end": { + "line": 11, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "undefined", + "start": 215, + "end": 224, + "loc": { + "start": { + "line": 11, + "column": 15 + }, + "end": { + "line": 11, + "column": 24 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 225, + "end": 226, + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 26 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 227, + "end": 233, + "loc": { + "start": { + "line": 11, + "column": 27 + }, + "end": { + "line": 11, + "column": 33 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 234, + "end": 241, + "loc": { + "start": { + "line": 11, + "column": 34 + }, + "end": { + "line": 11, + "column": 41 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 241, + "end": 242, + "loc": { + "start": { + "line": 11, + "column": 41 + }, + "end": { + "line": 11, + "column": 42 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 0, + "start": 243, + "end": 244, + "loc": { + "start": { + "line": 11, + "column": 43 + }, + "end": { + "line": 11, + "column": 44 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 245, + "end": 246, + "loc": { + "start": { + "line": 11, + "column": 45 + }, + "end": { + "line": 11, + "column": 46 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 247, + "end": 252, + "loc": { + "start": { + "line": 11, + "column": 47 + }, + "end": { + "line": 11, + "column": 52 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 253, + "end": 254, + "loc": { + "start": { + "line": 11, + "column": 53 + }, + "end": { + "line": 11, + "column": 54 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 255, + "end": 256, + "loc": { + "start": { + "line": 11, + "column": 55 + }, + "end": { + "line": 11, + "column": 56 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 258, + "end": 260, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 261, + "end": 262, + "loc": { + "start": { + "line": 12, + "column": 4 + }, + "end": { + "line": 12, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 263, + "end": 267, + "loc": { + "start": { + "line": 12, + "column": 6 + }, + "end": { + "line": 12, + "column": 10 + } + } + }, + { + "type": { + "label": "==/!=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 6, + "updateContext": null + }, + "value": "===", + "start": 268, + "end": 271, + "loc": { + "start": { + "line": 12, + "column": 11 + }, + "end": { + "line": 12, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "undefined", + "start": 272, + "end": 281, + "loc": { + "start": { + "line": 12, + "column": 15 + }, + "end": { + "line": 12, + "column": 24 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 282, + "end": 283, + "loc": { + "start": { + "line": 12, + "column": 25 + }, + "end": { + "line": 12, + "column": 26 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 284, + "end": 288, + "loc": { + "start": { + "line": 12, + "column": 27 + }, + "end": { + "line": 12, + "column": 31 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 289, + "end": 290, + "loc": { + "start": { + "line": 12, + "column": 32 + }, + "end": { + "line": 12, + "column": 33 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 1, + "start": 291, + "end": 292, + "loc": { + "start": { + "line": 12, + "column": 34 + }, + "end": { + "line": 12, + "column": 35 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 293, + "end": 294, + "loc": { + "start": { + "line": 12, + "column": 36 + }, + "end": { + "line": 12, + "column": 37 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 297, + "end": 299, + "loc": { + "start": { + "line": 14, + "column": 1 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 300, + "end": 301, + "loc": { + "start": { + "line": 14, + "column": 4 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "stop", + "start": 302, + "end": 306, + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 10 + } + } + }, + { + "type": { + "label": "", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 7, + "updateContext": null + }, + "value": ">=", + "start": 307, + "end": 309, + "loc": { + "start": { + "line": 14, + "column": 11 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 310, + "end": 315, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 19 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 316, + "end": 317, + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 318, + "end": 319, + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 322, + "end": 328, + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 329, + "end": 334, + "loc": { + "start": { + "line": 15, + "column": 9 + }, + "end": { + "line": 15, + "column": 14 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "+", + "start": 335, + "end": 336, + "loc": { + "start": { + "line": 15, + "column": 15 + }, + "end": { + "line": 15, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 337, + "end": 341, + "loc": { + "start": { + "line": 15, + "column": 17 + }, + "end": { + "line": 15, + "column": 21 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 342, + "end": 343, + "loc": { + "start": { + "line": 15, + "column": 22 + }, + "end": { + "line": 15, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 344, + "end": 351, + "loc": { + "start": { + "line": 15, + "column": 24 + }, + "end": { + "line": 15, + "column": 31 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 351, + "end": 352, + "loc": { + "start": { + "line": 15, + "column": 31 + }, + "end": { + "line": 15, + "column": 32 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 0, + "start": 353, + "end": 354, + "loc": { + "start": { + "line": 15, + "column": 33 + }, + "end": { + "line": 15, + "column": 34 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 355, + "end": 356, + "loc": { + "start": { + "line": 15, + "column": 35 + }, + "end": { + "line": 15, + "column": 36 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Math", + "start": 357, + "end": 361, + "loc": { + "start": { + "line": 15, + "column": 37 + }, + "end": { + "line": 15, + "column": 41 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 361, + "end": 362, + "loc": { + "start": { + "line": 15, + "column": 41 + }, + "end": { + "line": 15, + "column": 42 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "floor", + "start": 362, + "end": 367, + "loc": { + "start": { + "line": 15, + "column": 42 + }, + "end": { + "line": 15, + "column": 47 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 367, + "end": 368, + "loc": { + "start": { + "line": 15, + "column": 47 + }, + "end": { + "line": 15, + "column": 48 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 369, + "end": 370, + "loc": { + "start": { + "line": 15, + "column": 49 + }, + "end": { + "line": 15, + "column": 50 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "stop", + "start": 371, + "end": 375, + "loc": { + "start": { + "line": 15, + "column": 51 + }, + "end": { + "line": 15, + "column": 55 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 376, + "end": 377, + "loc": { + "start": { + "line": 15, + "column": 56 + }, + "end": { + "line": 15, + "column": 57 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 378, + "end": 383, + "loc": { + "start": { + "line": 15, + "column": 58 + }, + "end": { + "line": 15, + "column": 63 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 384, + "end": 385, + "loc": { + "start": { + "line": 15, + "column": 64 + }, + "end": { + "line": 15, + "column": 65 + } + } + }, + { + "type": { + "label": "/", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "/", + "start": 386, + "end": 387, + "loc": { + "start": { + "line": 15, + "column": 66 + }, + "end": { + "line": 15, + "column": 67 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 388, + "end": 392, + "loc": { + "start": { + "line": 15, + "column": 68 + }, + "end": { + "line": 15, + "column": 72 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 393, + "end": 394, + "loc": { + "start": { + "line": 15, + "column": 73 + }, + "end": { + "line": 15, + "column": 74 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 395, + "end": 396, + "loc": { + "start": { + "line": 15, + "column": 75 + }, + "end": { + "line": 15, + "column": 76 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 397, + "end": 398, + "loc": { + "start": { + "line": 15, + "column": 77 + }, + "end": { + "line": 15, + "column": 78 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 400, + "end": 401, + "loc": { + "start": { + "line": 16, + "column": 1 + }, + "end": { + "line": 16, + "column": 2 + } + } + }, + { + "type": { + "label": "else", + "keyword": "else", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "else", + "start": 403, + "end": 407, + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 5 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 408, + "end": 409, + "loc": { + "start": { + "line": 17, + "column": 6 + }, + "end": { + "line": 17, + "column": 7 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 412, + "end": 418, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 419, + "end": 424, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 14 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "+", + "start": 425, + "end": 426, + "loc": { + "start": { + "line": 18, + "column": 15 + }, + "end": { + "line": 18, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 427, + "end": 431, + "loc": { + "start": { + "line": 18, + "column": 17 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 432, + "end": 433, + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 434, + "end": 441, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 441, + "end": 442, + "loc": { + "start": { + "line": 18, + "column": 31 + }, + "end": { + "line": 18, + "column": 32 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 0, + "start": 443, + "end": 444, + "loc": { + "start": { + "line": 18, + "column": 33 + }, + "end": { + "line": 18, + "column": 34 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 445, + "end": 446, + "loc": { + "start": { + "line": 18, + "column": 35 + }, + "end": { + "line": 18, + "column": 36 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Math", + "start": 447, + "end": 451, + "loc": { + "start": { + "line": 18, + "column": 37 + }, + "end": { + "line": 18, + "column": 41 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 451, + "end": 452, + "loc": { + "start": { + "line": 18, + "column": 41 + }, + "end": { + "line": 18, + "column": 42 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "floor", + "start": 452, + "end": 457, + "loc": { + "start": { + "line": 18, + "column": 42 + }, + "end": { + "line": 18, + "column": 47 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 457, + "end": 458, + "loc": { + "start": { + "line": 18, + "column": 47 + }, + "end": { + "line": 18, + "column": 48 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 459, + "end": 460, + "loc": { + "start": { + "line": 18, + "column": 49 + }, + "end": { + "line": 18, + "column": 50 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "start", + "start": 461, + "end": 466, + "loc": { + "start": { + "line": 18, + "column": 51 + }, + "end": { + "line": 18, + "column": 56 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 467, + "end": 468, + "loc": { + "start": { + "line": 18, + "column": 57 + }, + "end": { + "line": 18, + "column": 58 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "stop", + "start": 469, + "end": 473, + "loc": { + "start": { + "line": 18, + "column": 59 + }, + "end": { + "line": 18, + "column": 63 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 474, + "end": 475, + "loc": { + "start": { + "line": 18, + "column": 64 + }, + "end": { + "line": 18, + "column": 65 + } + } + }, + { + "type": { + "label": "/", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "/", + "start": 476, + "end": 477, + "loc": { + "start": { + "line": 18, + "column": 66 + }, + "end": { + "line": 18, + "column": 67 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 478, + "end": 479, + "loc": { + "start": { + "line": 18, + "column": 68 + }, + "end": { + "line": 18, + "column": 69 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "step", + "start": 479, + "end": 483, + "loc": { + "start": { + "line": 18, + "column": 69 + }, + "end": { + "line": 18, + "column": 73 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 484, + "end": 485, + "loc": { + "start": { + "line": 18, + "column": 74 + }, + "end": { + "line": 18, + "column": 75 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 486, + "end": 487, + "loc": { + "start": { + "line": 18, + "column": 76 + }, + "end": { + "line": 18, + "column": 77 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 488, + "end": 489, + "loc": { + "start": { + "line": 18, + "column": 78 + }, + "end": { + "line": 18, + "column": 79 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 491, + "end": 492, + "loc": { + "start": { + "line": 19, + "column": 1 + }, + "end": { + "line": 19, + "column": 2 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 494, + "end": 495, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 21, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 497, + "end": 497, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/sample.js.json b/ast/source/api/sample.js.json new file mode 100644 index 0000000..4d15da0 --- /dev/null +++ b/ast/source/api/sample.js.json @@ -0,0 +1,958 @@ +{ + "type": "File", + "start": 0, + "end": 130, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 130, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 42 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 29, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 40 + } + }, + "extra": { + "rawValue": "../kernel", + "raw": "'../kernel'" + }, + "value": "../kernel" + } + }, + { + "type": "ImportDeclaration", + "start": 43, + "end": 80, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 37 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 52, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + }, + "imported": { + "type": "Identifier", + "start": 52, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "local": { + "type": "Identifier", + "start": 52, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + }, + "identifierName": "randint" + }, + "name": "randint" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 67, + "end": 78, + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "extra": { + "rawValue": "./randint", + "raw": "'./randint'" + }, + "value": "./randint" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 82, + "end": 129, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 47 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "VariableDeclaration", + "start": 89, + "end": 129, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 47 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 95, + "end": 127, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 45 + } + }, + "id": { + "type": "Identifier", + "start": 95, + "end": 101, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "init": { + "type": "CallExpression", + "start": 104, + "end": 127, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 45 + } + }, + "callee": { + "type": "Identifier", + "start": 104, + "end": 116, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + }, + "arguments": [ + { + "type": "Identifier", + "start": 118, + "end": 125, + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 43 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ] + } + } + ], + "kind": "const", + "leadingComments": [], + "trailingComments": [] + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_fisheryates", + "start": 9, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 24, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 24 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "../kernel", + "start": 29, + "end": 40, + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 40 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 41, + "end": 42, + "loc": { + "start": { + "line": 1, + "column": 41 + }, + "end": { + "line": 1, + "column": 42 + } + } + }, + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 43, + "end": 49, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 50, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 52, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 16 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 60, + "end": 61, + "loc": { + "start": { + "line": 2, + "column": 17 + }, + "end": { + "line": 2, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 62, + "end": 66, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 23 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randint", + "start": 67, + "end": 78, + "loc": { + "start": { + "line": 2, + "column": 24 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 79, + "end": 80, + "loc": { + "start": { + "line": 2, + "column": 36 + }, + "end": { + "line": 2, + "column": 37 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 82, + "end": 88, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 89, + "end": 94, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 95, + "end": 101, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 19 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 102, + "end": 103, + "loc": { + "start": { + "line": 4, + "column": 20 + }, + "end": { + "line": 4, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_fisheryates", + "start": 104, + "end": 116, + "loc": { + "start": { + "line": 4, + "column": 22 + }, + "end": { + "line": 4, + "column": 34 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 116, + "end": 117, + "loc": { + "start": { + "line": 4, + "column": 34 + }, + "end": { + "line": 4, + "column": 35 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 118, + "end": 125, + "loc": { + "start": { + "line": 4, + "column": 36 + }, + "end": { + "line": 4, + "column": 43 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 126, + "end": 127, + "loc": { + "start": { + "line": 4, + "column": 44 + }, + "end": { + "line": 4, + "column": 45 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 128, + "end": 129, + "loc": { + "start": { + "line": 4, + "column": 46 + }, + "end": { + "line": 4, + "column": 47 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 130, + "end": 130, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/shuffle.js.json b/ast/source/api/shuffle.js.json new file mode 100644 index 0000000..6f513fa --- /dev/null +++ b/ast/source/api/shuffle.js.json @@ -0,0 +1,958 @@ +{ + "type": "File", + "start": 0, + "end": 120, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 120, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 38 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + }, + "imported": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + }, + "local": { + "type": "Identifier", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 25, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 36 + } + }, + "extra": { + "rawValue": "../kernel", + "raw": "'../kernel'" + }, + "value": "../kernel" + } + }, + { + "type": "ImportDeclaration", + "start": 39, + "end": 74, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "specifiers": [ + { + "type": "ImportSpecifier", + "start": 48, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + }, + "imported": { + "type": "Identifier", + "start": 48, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "local": { + "type": "Identifier", + "start": 48, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "sample" + }, + "name": "sample" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 62, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + }, + "extra": { + "rawValue": "./sample", + "raw": "'./sample'" + }, + "value": "./sample" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 76, + "end": 119, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 43 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "VariableDeclaration", + "start": 83, + "end": 119, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 43 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 89, + "end": 117, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "id": { + "type": "Identifier", + "start": 89, + "end": 96, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 20 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + }, + "init": { + "type": "CallExpression", + "start": 99, + "end": 117, + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 41 + } + }, + "callee": { + "type": "Identifier", + "start": 99, + "end": 107, + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 31 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + }, + "arguments": [ + { + "type": "Identifier", + "start": 109, + "end": 115, + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 39 + }, + "identifierName": "sample" + }, + "name": "sample" + } + ] + } + } + ], + "kind": "const", + "leadingComments": [], + "trailingComments": [] + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_shuffle", + "start": 9, + "end": 17, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 18, + "end": 19, + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 20, + "end": 24, + "loc": { + "start": { + "line": 1, + "column": 20 + }, + "end": { + "line": 1, + "column": 24 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "../kernel", + "start": 25, + "end": 36, + "loc": { + "start": { + "line": 1, + "column": 25 + }, + "end": { + "line": 1, + "column": 36 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 37, + "end": 38, + "loc": { + "start": { + "line": 1, + "column": 37 + }, + "end": { + "line": 1, + "column": 38 + } + } + }, + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 39, + "end": 45, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 46, + "end": 47, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 48, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 15 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 55, + "end": 56, + "loc": { + "start": { + "line": 2, + "column": 16 + }, + "end": { + "line": 2, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 57, + "end": 61, + "loc": { + "start": { + "line": 2, + "column": 18 + }, + "end": { + "line": 2, + "column": 22 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./sample", + "start": 62, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 23 + }, + "end": { + "line": 2, + "column": 33 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 73, + "end": 74, + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 76, + "end": 82, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 83, + "end": 88, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "shuffle", + "start": 89, + "end": 96, + "loc": { + "start": { + "line": 4, + "column": 13 + }, + "end": { + "line": 4, + "column": 20 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 97, + "end": 98, + "loc": { + "start": { + "line": 4, + "column": 21 + }, + "end": { + "line": 4, + "column": 22 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_shuffle", + "start": 99, + "end": 107, + "loc": { + "start": { + "line": 4, + "column": 23 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 107, + "end": 108, + "loc": { + "start": { + "line": 4, + "column": 31 + }, + "end": { + "line": 4, + "column": 32 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 109, + "end": 115, + "loc": { + "start": { + "line": 4, + "column": 33 + }, + "end": { + "line": 4, + "column": 39 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 116, + "end": 117, + "loc": { + "start": { + "line": 4, + "column": 40 + }, + "end": { + "line": 4, + "column": 41 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 118, + "end": 119, + "loc": { + "start": { + "line": 4, + "column": 42 + }, + "end": { + "line": 4, + "column": 43 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 120, + "end": 120, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/index.js.json b/ast/source/index.js.json new file mode 100644 index 0000000..82b1c63 --- /dev/null +++ b/ast/source/index.js.json @@ -0,0 +1,401 @@ +{ + "type": "File", + "start": 0, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 51, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportAllDeclaration", + "start": 0, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 23 + } + }, + "source": { + "type": "StringLiteral", + "start": 14, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 21 + } + }, + "extra": { + "rawValue": "./api", + "raw": "'./api'" + }, + "value": "./api" + } + }, + { + "type": "ExportAllDeclaration", + "start": 24, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "source": { + "type": "StringLiteral", + "start": 38, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + }, + "extra": { + "rawValue": "./kernel", + "raw": "'./kernel'" + }, + "value": "./kernel" + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api", + "start": 14, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 22, + "end": 23, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 23 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 24, + "end": 30, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 31, + "end": 32, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 33, + "end": 37, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./kernel", + "start": 38, + "end": 48, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 49, + "end": 50, + "loc": { + "start": { + "line": 2, + "column": 25 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 51, + "end": 51, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/kernel/_fisheryates.js.json b/ast/source/kernel/_fisheryates.js.json new file mode 100644 index 0000000..e023b48 --- /dev/null +++ b/ast/source/kernel/_fisheryates.js.json @@ -0,0 +1,3370 @@ +{ + "type": "File", + "start": 0, + "end": 475, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 475, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 53, + "end": 473, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "FunctionDeclaration", + "start": 60, + "end": 473, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 33, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 69, + "end": 81, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 28 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 84, + "end": 91, + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 38 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ], + "body": { + "type": "BlockStatement", + "start": 94, + "end": 473, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 33, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 98, + "end": 447, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 29, + "column": 4 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 104, + "end": 445, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 29, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 104, + "end": 115, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 18 + }, + "identifierName": "fisheryates" + }, + "name": "fisheryates" + }, + "init": { + "type": "FunctionExpression", + "start": 118, + "end": 445, + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 29, + "column": 2 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 129, + "end": 130, + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 33 + }, + "identifierName": "n" + }, + "name": "n" + }, + { + "type": "Identifier", + "start": 133, + "end": 134, + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 37 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 137, + "end": 138, + "loc": { + "start": { + "line": 8, + "column": 40 + }, + "end": { + "line": 8, + "column": 41 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 141, + "end": 142, + "loc": { + "start": { + "line": 8, + "column": 44 + }, + "end": { + "line": 8, + "column": 45 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 145, + "end": 445, + "loc": { + "start": { + "line": 8, + "column": 48 + }, + "end": { + "line": 29, + "column": 2 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 188, + "end": 205, + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 19 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 194, + "end": 203, + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 17 + } + }, + "id": { + "type": "Identifier", + "start": 194, + "end": 195, + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + }, + "identifierName": "k" + }, + "name": "k", + "leadingComments": null + }, + "init": { + "type": "BinaryExpression", + "start": 198, + "end": 203, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 17 + } + }, + "left": { + "type": "Identifier", + "start": 198, + "end": 199, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "Identifier", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + }, + "identifierName": "n" + }, + "name": "n" + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " we will swap at most n elements", + "start": 150, + "end": 184, + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + } + ] + }, + { + "type": "ForStatement", + "start": 209, + "end": 441, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 27, + "column": 3 + } + }, + "init": null, + "test": { + "type": "BinaryExpression", + "start": 217, + "end": 222, + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 15 + } + }, + "left": { + "type": "Identifier", + "start": 217, + "end": 218, + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 11 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 221, + "end": 222, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "update": { + "type": "UpdateExpression", + "start": 225, + "end": 228, + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 21 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 227, + "end": 228, + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 231, + "end": 441, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 27, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 286, + "end": 314, + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 31 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 292, + "end": 312, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "id": { + "type": "Identifier", + "start": 292, + "end": 293, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 10 + }, + "identifierName": "p" + }, + "name": "p", + "leadingComments": null + }, + "init": { + "type": "CallExpression", + "start": 296, + "end": 312, + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 29 + } + }, + "callee": { + "type": "Identifier", + "start": 296, + "end": 303, + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 20 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "Identifier", + "start": 305, + "end": 306, + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 23 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 309, + "end": 310, + "loc": { + "start": { + "line": 18, + "column": 26 + }, + "end": { + "line": 18, + "column": 27 + }, + "identifierName": "j" + }, + "name": "j" + } + ] + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " choose any index p in the remaining array", + "start": 237, + "end": 281, + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 47 + } + } + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " swap element at index p with first element in the array", + "start": 320, + "end": 378, + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 61 + } + } + } + ] + }, + { + "type": "VariableDeclaration", + "start": 383, + "end": 402, + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 22 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 389, + "end": 400, + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 20 + } + }, + "id": { + "type": "Identifier", + "start": 389, + "end": 392, + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 12 + }, + "identifierName": "tmp" + }, + "name": "tmp", + "leadingComments": null + }, + "init": { + "type": "MemberExpression", + "start": 396, + "end": 400, + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 20 + } + }, + "object": { + "type": "Identifier", + "start": 396, + "end": 397, + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 17 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 398, + "end": 399, + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 23, + "column": 19 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " swap element at index p with first element in the array", + "start": 320, + "end": 378, + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 61 + } + } + } + ] + }, + { + "type": "ExpressionStatement", + "start": 406, + "end": 419, + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 16 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 406, + "end": 417, + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 406, + "end": 410, + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 406, + "end": 407, + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 4 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 408, + "end": 409, + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 6 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "right": { + "type": "MemberExpression", + "start": 413, + "end": 417, + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 14 + } + }, + "object": { + "type": "Identifier", + "start": 413, + "end": 414, + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 415, + "end": 416, + "loc": { + "start": { + "line": 24, + "column": 12 + }, + "end": { + "line": 24, + "column": 13 + }, + "identifierName": "p" + }, + "name": "p" + }, + "computed": true + } + } + }, + { + "type": "ExpressionStatement", + "start": 423, + "end": 436, + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 16 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 423, + "end": 434, + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 14 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 423, + "end": 427, + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 7 + } + }, + "object": { + "type": "Identifier", + "start": 423, + "end": 424, + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 4 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 425, + "end": 426, + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 6 + }, + "identifierName": "p" + }, + "name": "p" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 431, + "end": 434, + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 14 + }, + "identifierName": "tmp" + }, + "name": "tmp" + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } + } + } + ], + "kind": "const" + }, + { + "type": "ReturnStatement", + "start": 450, + "end": 470, + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 21 + } + }, + "argument": { + "type": "Identifier", + "start": 457, + "end": 468, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 19 + }, + "identifierName": "fisheryates" + }, + "name": "fisheryates" + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Sample array using Fisher-Yates method.\n ", + "start": 1, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Sample array using Fisher-Yates method.\n ", + "start": 1, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Sample array using Fisher-Yates method.\n ", + "start": 1, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " we will swap at most n elements", + "start": 150, + "end": 184, + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": "CommentLine", + "value": " choose any index p in the remaining array", + "start": 237, + "end": 281, + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": "CommentLine", + "value": " swap element at index p with first element in the array", + "start": 320, + "end": 378, + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 61 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Sample array using Fisher-Yates method.\n ", + "start": 1, + "end": 51, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 53, + "end": 59, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 60, + "end": 68, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_fisheryates", + "start": 69, + "end": 81, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 82, + "end": 83, + "loc": { + "start": { + "line": 6, + "column": 29 + }, + "end": { + "line": 6, + "column": 30 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 84, + "end": 91, + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 38 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 92, + "end": 93, + "loc": { + "start": { + "line": 6, + "column": 39 + }, + "end": { + "line": 6, + "column": 40 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 94, + "end": 95, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 42 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 98, + "end": 103, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "fisheryates", + "start": 104, + "end": 115, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 18 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 116, + "end": 117, + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 20 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 118, + "end": 126, + "loc": { + "start": { + "line": 8, + "column": 21 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 127, + "end": 128, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 129, + "end": 130, + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 131, + "end": 132, + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 133, + "end": 134, + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 37 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 135, + "end": 136, + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 39 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 137, + "end": 138, + "loc": { + "start": { + "line": 8, + "column": 40 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 139, + "end": 140, + "loc": { + "start": { + "line": 8, + "column": 42 + }, + "end": { + "line": 8, + "column": 43 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 141, + "end": 142, + "loc": { + "start": { + "line": 8, + "column": 44 + }, + "end": { + "line": 8, + "column": 45 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 143, + "end": 144, + "loc": { + "start": { + "line": 8, + "column": 46 + }, + "end": { + "line": 8, + "column": 47 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 145, + "end": 146, + "loc": { + "start": { + "line": 8, + "column": 48 + }, + "end": { + "line": 8, + "column": 49 + } + } + }, + { + "type": "CommentLine", + "value": " we will swap at most n elements", + "start": 150, + "end": 184, + "loc": { + "start": { + "line": 10, + "column": 2 + }, + "end": { + "line": 10, + "column": 36 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 188, + "end": 193, + "loc": { + "start": { + "line": 12, + "column": 2 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 194, + "end": 195, + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 9 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 196, + "end": 197, + "loc": { + "start": { + "line": 12, + "column": 10 + }, + "end": { + "line": 12, + "column": 11 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 198, + "end": 199, + "loc": { + "start": { + "line": 12, + "column": 12 + }, + "end": { + "line": 12, + "column": 13 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "+", + "start": 200, + "end": 201, + "loc": { + "start": { + "line": 12, + "column": 14 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 202, + "end": 203, + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 204, + "end": 205, + "loc": { + "start": { + "line": 12, + "column": 18 + }, + "end": { + "line": 12, + "column": 19 + } + } + }, + { + "type": { + "label": "for", + "keyword": "for", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": true, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "for", + "start": 209, + "end": 212, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 213, + "end": 214, + "loc": { + "start": { + "line": 14, + "column": 6 + }, + "end": { + "line": 14, + "column": 7 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 215, + "end": 216, + "loc": { + "start": { + "line": 14, + "column": 8 + }, + "end": { + "line": 14, + "column": 9 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 217, + "end": 218, + "loc": { + "start": { + "line": 14, + "column": 10 + }, + "end": { + "line": 14, + "column": 11 + } + } + }, + { + "type": { + "label": "", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 7, + "updateContext": null + }, + "value": "<", + "start": 219, + "end": 220, + "loc": { + "start": { + "line": 14, + "column": 12 + }, + "end": { + "line": 14, + "column": 13 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 221, + "end": 222, + "loc": { + "start": { + "line": 14, + "column": 14 + }, + "end": { + "line": 14, + "column": 15 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 223, + "end": 224, + "loc": { + "start": { + "line": 14, + "column": 16 + }, + "end": { + "line": 14, + "column": 17 + } + } + }, + { + "type": { + "label": "++/--", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": true, + "binop": null + }, + "value": "++", + "start": 225, + "end": 227, + "loc": { + "start": { + "line": 14, + "column": 18 + }, + "end": { + "line": 14, + "column": 20 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 227, + "end": 228, + "loc": { + "start": { + "line": 14, + "column": 20 + }, + "end": { + "line": 14, + "column": 21 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 229, + "end": 230, + "loc": { + "start": { + "line": 14, + "column": 22 + }, + "end": { + "line": 14, + "column": 23 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 231, + "end": 232, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": "CommentLine", + "value": " choose any index p in the remaining array", + "start": 237, + "end": 281, + "loc": { + "start": { + "line": 16, + "column": 3 + }, + "end": { + "line": 16, + "column": 47 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 286, + "end": 291, + "loc": { + "start": { + "line": 18, + "column": 3 + }, + "end": { + "line": 18, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "p", + "start": 292, + "end": 293, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 10 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 294, + "end": 295, + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 296, + "end": 303, + "loc": { + "start": { + "line": 18, + "column": 13 + }, + "end": { + "line": 18, + "column": 20 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 303, + "end": 304, + "loc": { + "start": { + "line": 18, + "column": 20 + }, + "end": { + "line": 18, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 305, + "end": 306, + "loc": { + "start": { + "line": 18, + "column": 22 + }, + "end": { + "line": 18, + "column": 23 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 307, + "end": 308, + "loc": { + "start": { + "line": 18, + "column": 24 + }, + "end": { + "line": 18, + "column": 25 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 309, + "end": 310, + "loc": { + "start": { + "line": 18, + "column": 26 + }, + "end": { + "line": 18, + "column": 27 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 311, + "end": 312, + "loc": { + "start": { + "line": 18, + "column": 28 + }, + "end": { + "line": 18, + "column": 29 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 313, + "end": 314, + "loc": { + "start": { + "line": 18, + "column": 30 + }, + "end": { + "line": 18, + "column": 31 + } + } + }, + { + "type": "CommentLine", + "value": " swap element at index p with first element in the array", + "start": 320, + "end": 378, + "loc": { + "start": { + "line": 21, + "column": 3 + }, + "end": { + "line": 21, + "column": 61 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 383, + "end": 388, + "loc": { + "start": { + "line": 23, + "column": 3 + }, + "end": { + "line": 23, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "tmp", + "start": 389, + "end": 392, + "loc": { + "start": { + "line": 23, + "column": 9 + }, + "end": { + "line": 23, + "column": 12 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 394, + "end": 395, + "loc": { + "start": { + "line": 23, + "column": 14 + }, + "end": { + "line": 23, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 396, + "end": 397, + "loc": { + "start": { + "line": 23, + "column": 16 + }, + "end": { + "line": 23, + "column": 17 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 397, + "end": 398, + "loc": { + "start": { + "line": 23, + "column": 17 + }, + "end": { + "line": 23, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 398, + "end": 399, + "loc": { + "start": { + "line": 23, + "column": 18 + }, + "end": { + "line": 23, + "column": 19 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 399, + "end": 400, + "loc": { + "start": { + "line": 23, + "column": 19 + }, + "end": { + "line": 23, + "column": 20 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 401, + "end": 402, + "loc": { + "start": { + "line": 23, + "column": 21 + }, + "end": { + "line": 23, + "column": 22 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 406, + "end": 407, + "loc": { + "start": { + "line": 24, + "column": 3 + }, + "end": { + "line": 24, + "column": 4 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 407, + "end": 408, + "loc": { + "start": { + "line": 24, + "column": 4 + }, + "end": { + "line": 24, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 408, + "end": 409, + "loc": { + "start": { + "line": 24, + "column": 5 + }, + "end": { + "line": 24, + "column": 6 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 409, + "end": 410, + "loc": { + "start": { + "line": 24, + "column": 6 + }, + "end": { + "line": 24, + "column": 7 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 411, + "end": 412, + "loc": { + "start": { + "line": 24, + "column": 8 + }, + "end": { + "line": 24, + "column": 9 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 413, + "end": 414, + "loc": { + "start": { + "line": 24, + "column": 10 + }, + "end": { + "line": 24, + "column": 11 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 414, + "end": 415, + "loc": { + "start": { + "line": 24, + "column": 11 + }, + "end": { + "line": 24, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "p", + "start": 415, + "end": 416, + "loc": { + "start": { + "line": 24, + "column": 12 + }, + "end": { + "line": 24, + "column": 13 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 416, + "end": 417, + "loc": { + "start": { + "line": 24, + "column": 13 + }, + "end": { + "line": 24, + "column": 14 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 418, + "end": 419, + "loc": { + "start": { + "line": 24, + "column": 15 + }, + "end": { + "line": 24, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 423, + "end": 424, + "loc": { + "start": { + "line": 25, + "column": 3 + }, + "end": { + "line": 25, + "column": 4 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 424, + "end": 425, + "loc": { + "start": { + "line": 25, + "column": 4 + }, + "end": { + "line": 25, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "p", + "start": 425, + "end": 426, + "loc": { + "start": { + "line": 25, + "column": 5 + }, + "end": { + "line": 25, + "column": 6 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 426, + "end": 427, + "loc": { + "start": { + "line": 25, + "column": 6 + }, + "end": { + "line": 25, + "column": 7 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 428, + "end": 429, + "loc": { + "start": { + "line": 25, + "column": 8 + }, + "end": { + "line": 25, + "column": 9 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "tmp", + "start": 431, + "end": 434, + "loc": { + "start": { + "line": 25, + "column": 11 + }, + "end": { + "line": 25, + "column": 14 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 435, + "end": 436, + "loc": { + "start": { + "line": 25, + "column": 15 + }, + "end": { + "line": 25, + "column": 16 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 440, + "end": 441, + "loc": { + "start": { + "line": 27, + "column": 2 + }, + "end": { + "line": 27, + "column": 3 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 444, + "end": 445, + "loc": { + "start": { + "line": 29, + "column": 1 + }, + "end": { + "line": 29, + "column": 2 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 446, + "end": 447, + "loc": { + "start": { + "line": 29, + "column": 3 + }, + "end": { + "line": 29, + "column": 4 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 450, + "end": 456, + "loc": { + "start": { + "line": 31, + "column": 1 + }, + "end": { + "line": 31, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "fisheryates", + "start": 457, + "end": 468, + "loc": { + "start": { + "line": 31, + "column": 8 + }, + "end": { + "line": 31, + "column": 19 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 469, + "end": 470, + "loc": { + "start": { + "line": 31, + "column": 20 + }, + "end": { + "line": 31, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 472, + "end": 473, + "loc": { + "start": { + "line": 33, + "column": 0 + }, + "end": { + "line": 33, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 475, + "end": 475, + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 35, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/kernel/_shuffle.js.json b/ast/source/kernel/_shuffle.js.json new file mode 100644 index 0000000..b9d3421 --- /dev/null +++ b/ast/source/kernel/_shuffle.js.json @@ -0,0 +1,1533 @@ +{ + "type": "File", + "start": 0, + "end": 200, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 200, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportNamedDeclaration", + "start": 59, + "end": 198, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + }, + "specifiers": [], + "source": null, + "declaration": { + "type": "FunctionDeclaration", + "start": 66, + "end": 198, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 14, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 75, + "end": 83, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 24 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 86, + "end": 92, + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 33 + }, + "identifierName": "sample" + }, + "name": "sample" + } + ], + "body": { + "type": "BlockStatement", + "start": 95, + "end": 198, + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 14, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 99, + "end": 176, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 10, + "column": 4 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 105, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 10, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 105, + "end": 112, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 14 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + }, + "init": { + "type": "FunctionExpression", + "start": 115, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 10, + "column": 2 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 126, + "end": 127, + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 29 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 130, + "end": 131, + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 33 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 134, + "end": 135, + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 37 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 138, + "end": 174, + "loc": { + "start": { + "line": 8, + "column": 40 + }, + "end": { + "line": 10, + "column": 2 + } + }, + "body": [ + { + "type": "ExpressionStatement", + "start": 142, + "end": 171, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 31 + } + }, + "expression": { + "type": "CallExpression", + "start": 142, + "end": 169, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 29 + } + }, + "callee": { + "type": "Identifier", + "start": 142, + "end": 148, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 150, + "end": 155, + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 15 + } + }, + "left": { + "type": "Identifier", + "start": 150, + "end": 151, + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 154, + "end": 155, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + }, + "identifierName": "i" + }, + "name": "i" + } + }, + { + "type": "Identifier", + "start": 158, + "end": 159, + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 19 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 162, + "end": 163, + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 166, + "end": 167, + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + }, + "identifierName": "j" + }, + "name": "j" + } + ] + } + } + ], + "directives": [] + } + } + } + ], + "kind": "const" + }, + { + "type": "ReturnStatement", + "start": 179, + "end": 195, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 17 + } + }, + "argument": { + "type": "Identifier", + "start": 186, + "end": 193, + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 15 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + } + } + ], + "directives": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 1, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "trailingComments": [] + }, + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 1, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ] + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 1, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 1, + "end": 57, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 4, + "column": 3 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 59, + "end": 65, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 66, + "end": 74, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_shuffle", + "start": 75, + "end": 83, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 24 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 84, + "end": 85, + "loc": { + "start": { + "line": 6, + "column": 25 + }, + "end": { + "line": 6, + "column": 26 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 86, + "end": 92, + "loc": { + "start": { + "line": 6, + "column": 27 + }, + "end": { + "line": 6, + "column": 33 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 6, + "column": 34 + }, + "end": { + "line": 6, + "column": 35 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 95, + "end": 96, + "loc": { + "start": { + "line": 6, + "column": 36 + }, + "end": { + "line": 6, + "column": 37 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 99, + "end": 104, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "shuffle", + "start": 105, + "end": 112, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 14 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 113, + "end": 114, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + } + } + }, + { + "type": { + "label": "function", + "keyword": "function", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "function", + "start": 115, + "end": 123, + "loc": { + "start": { + "line": 8, + "column": 17 + }, + "end": { + "line": 8, + "column": 25 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 124, + "end": 125, + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 126, + "end": 127, + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 29 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 128, + "end": 129, + "loc": { + "start": { + "line": 8, + "column": 30 + }, + "end": { + "line": 8, + "column": 31 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 130, + "end": 131, + "loc": { + "start": { + "line": 8, + "column": 32 + }, + "end": { + "line": 8, + "column": 33 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 132, + "end": 133, + "loc": { + "start": { + "line": 8, + "column": 34 + }, + "end": { + "line": 8, + "column": 35 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 134, + "end": 135, + "loc": { + "start": { + "line": 8, + "column": 36 + }, + "end": { + "line": 8, + "column": 37 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 136, + "end": 137, + "loc": { + "start": { + "line": 8, + "column": 38 + }, + "end": { + "line": 8, + "column": 39 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 138, + "end": 139, + "loc": { + "start": { + "line": 8, + "column": 40 + }, + "end": { + "line": 8, + "column": 41 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 142, + "end": 148, + "loc": { + "start": { + "line": 9, + "column": 2 + }, + "end": { + "line": 9, + "column": 8 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 148, + "end": 149, + "loc": { + "start": { + "line": 9, + "column": 8 + }, + "end": { + "line": 9, + "column": 9 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 150, + "end": 151, + "loc": { + "start": { + "line": 9, + "column": 10 + }, + "end": { + "line": 9, + "column": 11 + } + } + }, + { + "type": { + "label": "+/-", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": false, + "binop": 9, + "updateContext": null + }, + "value": "-", + "start": 152, + "end": 153, + "loc": { + "start": { + "line": 9, + "column": 12 + }, + "end": { + "line": 9, + "column": 13 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 154, + "end": 155, + "loc": { + "start": { + "line": 9, + "column": 14 + }, + "end": { + "line": 9, + "column": 15 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 156, + "end": 157, + "loc": { + "start": { + "line": 9, + "column": 16 + }, + "end": { + "line": 9, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "a", + "start": 158, + "end": 159, + "loc": { + "start": { + "line": 9, + "column": 18 + }, + "end": { + "line": 9, + "column": 19 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 160, + "end": 161, + "loc": { + "start": { + "line": 9, + "column": 20 + }, + "end": { + "line": 9, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 162, + "end": 163, + "loc": { + "start": { + "line": 9, + "column": 22 + }, + "end": { + "line": 9, + "column": 23 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 164, + "end": 165, + "loc": { + "start": { + "line": 9, + "column": 24 + }, + "end": { + "line": 9, + "column": 25 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "j", + "start": 166, + "end": 167, + "loc": { + "start": { + "line": 9, + "column": 26 + }, + "end": { + "line": 9, + "column": 27 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 168, + "end": 169, + "loc": { + "start": { + "line": 9, + "column": 28 + }, + "end": { + "line": 9, + "column": 29 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 170, + "end": 171, + "loc": { + "start": { + "line": 9, + "column": 30 + }, + "end": { + "line": 9, + "column": 31 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 173, + "end": 174, + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 10, + "column": 2 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 175, + "end": 176, + "loc": { + "start": { + "line": 10, + "column": 3 + }, + "end": { + "line": 10, + "column": 4 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 179, + "end": 185, + "loc": { + "start": { + "line": 12, + "column": 1 + }, + "end": { + "line": 12, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "shuffle", + "start": 186, + "end": 193, + "loc": { + "start": { + "line": 12, + "column": 8 + }, + "end": { + "line": 12, + "column": 15 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 194, + "end": 195, + "loc": { + "start": { + "line": 12, + "column": 16 + }, + "end": { + "line": 12, + "column": 17 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 197, + "end": 198, + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 1 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 200, + "end": 200, + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/kernel/index.js.json b/ast/source/kernel/index.js.json new file mode 100644 index 0000000..2c11fce --- /dev/null +++ b/ast/source/kernel/index.js.json @@ -0,0 +1,401 @@ +{ + "type": "File", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 62, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ExportAllDeclaration", + "start": 0, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 32 + } + }, + "source": { + "type": "StringLiteral", + "start": 14, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 30 + } + }, + "extra": { + "rawValue": "./_fisheryates", + "raw": "'./_fisheryates'" + }, + "value": "./_fisheryates" + } + }, + { + "type": "ExportAllDeclaration", + "start": 33, + "end": 61, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 28 + } + }, + "source": { + "type": "StringLiteral", + "start": 47, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "extra": { + "rawValue": "./_shuffle", + "raw": "'./_shuffle'" + }, + "value": "./_shuffle" + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 7, + "end": 8, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 9, + "end": 13, + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./_fisheryates", + "start": 14, + "end": 30, + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 31, + "end": 32, + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 32 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 33, + "end": 39, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "*", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 10, + "updateContext": null + }, + "value": "*", + "start": 40, + "end": 41, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 42, + "end": 46, + "loc": { + "start": { + "line": 2, + "column": 9 + }, + "end": { + "line": 2, + "column": 13 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./_shuffle", + "start": 47, + "end": 59, + "loc": { + "start": { + "line": 2, + "column": 14 + }, + "end": { + "line": 2, + "column": 26 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 60, + "end": 61, + "loc": { + "start": { + "line": 2, + "column": 27 + }, + "end": { + "line": 2, + "column": 28 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 62, + "end": 62, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/badge.svg b/badge.svg new file mode 100644 index 0000000..33fd58c --- /dev/null +++ b/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + 71% + 71% + + diff --git a/coverage.json b/coverage.json new file mode 100644 index 0000000..7aa41e3 --- /dev/null +++ b/coverage.json @@ -0,0 +1,46 @@ +{ + "coverage": "71.42%", + "expectCount": 7, + "actualCount": 5, + "files": { + "src/kernel/_fisheryates.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/kernel/_shuffle.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/api/randfloat.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/api/randint.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/api/randrange.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/api/sample.js": { + "expectCount": 1, + "actualCount": 0, + "undocumentLines": [ + 4 + ] + }, + "src/api/shuffle.js": { + "expectCount": 1, + "actualCount": 0, + "undocumentLines": [ + 4 + ] + } + } +} \ No newline at end of file diff --git a/css/prettify-tomorrow.css b/css/prettify-tomorrow.css new file mode 100644 index 0000000..b6f92a7 --- /dev/null +++ b/css/prettify-tomorrow.css @@ -0,0 +1,132 @@ +/* Tomorrow Theme */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* Pretty printing styles. Used with prettify.js. */ +/* SPAN elements with the classes below are added by prettyprint. */ +/* plain text */ +.pln { + color: #4d4d4c; } + +@media screen { + /* string content */ + .str { + color: #718c00; } + + /* a keyword */ + .kwd { + color: #8959a8; } + + /* a comment */ + .com { + color: #8e908c; } + + /* a type name */ + .typ { + color: #4271ae; } + + /* a literal value */ + .lit { + color: #f5871f; } + + /* punctuation */ + .pun { + color: #4d4d4c; } + + /* lisp open bracket */ + .opn { + color: #4d4d4c; } + + /* lisp close bracket */ + .clo { + color: #4d4d4c; } + + /* a markup tag name */ + .tag { + color: #c82829; } + + /* a markup attribute name */ + .atn { + color: #f5871f; } + + /* a markup attribute value */ + .atv { + color: #3e999f; } + + /* a declaration */ + .dec { + color: #f5871f; } + + /* a variable name */ + .var { + color: #c82829; } + + /* a function name */ + .fun { + color: #4271ae; } } +/* Use higher contrast and text-weight for printable form. */ +@media print, projection { + .str { + color: #060; } + + .kwd { + color: #006; + font-weight: bold; } + + .com { + color: #600; + font-style: italic; } + + .typ { + color: #404; + font-weight: bold; } + + .lit { + color: #044; } + + .pun, .opn, .clo { + color: #440; } + + .tag { + color: #006; + font-weight: bold; } + + .atn { + color: #404; } + + .atv { + color: #060; } } +/* Style */ +/* +pre.prettyprint { + background: white; + font-family: Consolas, Monaco, 'Andale Mono', monospace; + font-size: 12px; + line-height: 1.5; + border: 1px solid #ccc; + padding: 10px; } +*/ + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; } + +/* IE indents via margin-left */ +li.L0, +li.L1, +li.L2, +li.L3, +li.L4, +li.L5, +li.L6, +li.L7, +li.L8, +li.L9 { + /* */ } + +/* Alternate shading for lines */ +li.L1, +li.L3, +li.L5, +li.L7, +li.L9 { + /* */ } diff --git a/css/style.css b/css/style.css new file mode 100644 index 0000000..5ad3785 --- /dev/null +++ b/css/style.css @@ -0,0 +1,1024 @@ +@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700); +@import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,700); + +* { + margin: 0; + padding: 0; + text-decoration: none; +} + +html +{ + font-family: 'Source Sans Pro', 'Roboto', sans-serif; + overflow: auto; + /*font-size: 14px;*/ + /*color: #4d4e53;*/ + /*color: rgba(0, 0, 0, .68);*/ + color: #555; + background-color: #fff; +} + +a { + /*color: #0095dd;*/ + /*color:rgb(37, 138, 175);*/ + color: #039BE5; +} + +code a:hover { + text-decoration: underline; +} + +ul, ol { + padding-left: 20px; +} + +ul li { + list-style: disc; + margin: 4px 0; +} + +ol li { + margin: 4px 0; +} + +h1 { + margin-bottom: 10px; + font-size: 34px; + font-weight: 300; + border-bottom: solid 1px #ddd; +} + +h2 { + margin-top: 24px; + margin-bottom: 10px; + font-size: 20px; + border-bottom: solid 1px #ddd; + font-weight: 300; +} + +h3 { + position: relative; + font-size: 16px; + margin-bottom: 12px; + background-color: #E2E2E2; + padding: 4px; + font-weight: 300; +} + +del { + text-decoration: line-through; +} + +p { + margin-bottom: 15px; + line-height: 1.5; +} + +pre > code { + display: block; +} + +pre.prettyprint, pre > code { + padding: 4px; + margin: 1em 0; + background-color: #f5f5f5; + border-radius: 3px; +} + +pre.prettyprint > code { + margin: 0; +} + +p > code, +li > code { + padding: 0.2em 0.5em; + margin: 0; + font-size: 85%; + background-color: rgba(0,0,0,0.04); + border-radius: 3px; +} + +.import-path pre.prettyprint, +.import-path pre.prettyprint code { + margin: 0; + padding: 0; + border: none; + background: white; +} + +.layout-container { + /*display: flex;*/ + /*flex-direction: row;*/ + /*justify-content: flex-start;*/ + /*align-items: stretch;*/ +} + +.layout-container > header { + height: 40px; + line-height: 40px; + font-size: 16px; + padding: 0 10px; + margin: 0; + position: fixed; + width: 100%; + z-index: 1; + background-color: #fafafa; + top: 0; + border-bottom: solid 1px #ddd; +} +.layout-container > header > a{ + margin: 0 5px; + color: #444; +} + +.layout-container > header > a.repo-url-github { + font-size: 0; + display: inline-block; + width: 20px; + height: 38px; + background: url("../image/github.png") no-repeat center; + background-size: 20px; + vertical-align: top; +} + +.navigation { + position: fixed; + top: 0; + left: 0; + box-sizing: border-box; + width: 250px; + height: 100%; + padding-top: 40px; + padding-left: 15px; + padding-bottom: 2em; + margin-top:1em; + overflow-x: scroll; + box-shadow: rgba(255, 255, 255, 1) -1px 0 0 inset; + border-right: 1px solid #ddd; +} + +.navigation ul { + padding: 0; +} + +.navigation li { + list-style: none; + margin: 4px 0; + white-space: nowrap; +} + +.navigation li a { + color: #666; +} + +.navigation .nav-dir-path { + margin-top: 0.7em; + margin-bottom: 0.25em; + font-size: 0.8em; + color: #aaa; +} + +.kind-class, +.kind-interface, +.kind-function, +.kind-typedef, +.kind-variable, +.kind-external { + margin-left: 0.75em; + width: 1.2em; + height: 1.2em; + display: inline-block; + text-align: center; + border-radius: 0.2em; + margin-right: 0.2em; + font-weight: bold; +} + +.kind-class { + color: #009800; + background-color: #bfe5bf; +} + +.kind-interface { + color: #fbca04; + background-color: #fef2c0; +} + +.kind-function { + color: #6b0090; + background-color: #d6bdde; +} + +.kind-variable { + color: #eb6420; + background-color: #fad8c7; +} + +.kind-typedef { + color: #db001e; + background-color: #edbec3; +} + +.kind-external { + color: #0738c3; + background-color: #bbcbea; +} + +h1 .version, +h1 .url a { + font-size: 14px; + color: #aaa; +} + +.content { + margin-top: 40px; + margin-left: 250px; + padding: 10px 50px 10px 20px; +} + +.header-notice { + font-size: 14px; + color: #aaa; + margin: 0; +} + +.expression-extends .prettyprint { + margin-left: 10px; + background: white; +} + +.extends-chain { + border-bottom: 1px solid#ddd; + padding-bottom: 10px; + margin-bottom: 10px; +} + +.extends-chain span:nth-of-type(1) { + padding-left: 10px; +} + +.extends-chain > div { + margin: 5px 0; +} + +.description table { + font-size: 14px; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +.description thead { + background: #999; + color: white; +} + +.description table td, +.description table th { + border: solid 1px #ddd; + padding: 4px; + font-weight: normal; +} + +.flat-list ul { + padding-left: 0; +} + +.flat-list li { + display: inline; + list-style: none; +} + +table.summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.summary thead { + background: #999; + color: white; +} + +table.summary td { + border: solid 1px #ddd; + padding: 4px 10px; +} + +table.summary tbody td:nth-child(1) { + text-align: right; + white-space: nowrap; + min-width: 64px; + vertical-align: top; +} + +table.summary tbody td:nth-child(2) { + width: 100%; + border-right: none; +} + +table.summary tbody td:nth-child(3) { + white-space: nowrap; + border-left: none; + vertical-align: top; +} + +table.summary td > div:nth-of-type(2) { + padding-top: 4px; + padding-left: 15px; +} + +table.summary td p { + margin-bottom: 0; +} + +.inherited-summary thead td { + padding-left: 2px; +} + +.inherited-summary thead a { + color: white; +} + +.inherited-summary .summary tbody { + display: none; +} + +.inherited-summary .summary .toggle { + padding: 0 4px; + font-size: 12px; + cursor: pointer; +} +.inherited-summary .summary .toggle.closed:before { + content: "▶"; +} +.inherited-summary .summary .toggle.opened:before { + content: "▼"; +} + +.member, .method { + margin-bottom: 24px; +} + +table.params { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.params thead { + background: #eee; + color: #aaa; +} + +table.params td { + padding: 4px; + border: solid 1px #ddd; +} + +table.params td p { + margin: 0; +} + +.content .detail > * { + margin: 15px 0; +} + +.content .detail > h3 { + color: black; +} + +.content .detail > div { + margin-left: 10px; +} + +.content .detail > .import-path { + margin-top: -8px; +} + +.content .detail + .detail { + margin-top: 30px; +} + +.content .detail .throw td:first-child { + padding-right: 10px; +} + +.content .detail h4 + :not(pre) { + padding-left: 0; + margin-left: 10px; +} + +.content .detail h4 + ul li { + list-style: none; +} + +.return-param * { + display: inline; +} + +.argument-params { + margin-bottom: 20px; +} + +.return-type { + padding-right: 10px; + font-weight: normal; +} + +.return-desc { + margin-left: 10px; + margin-top: 4px; +} + +.return-desc p { + margin: 0; +} + +.deprecated, .experimental, .instance-docs { + border-left: solid 5px orange; + padding-left: 4px; + margin: 4px 0; +} + +tr.listen p, +tr.throw p, +tr.emit p{ + margin-bottom: 10px; +} + +.version, .since { + color: #aaa; +} + +h3 .right-info { + position: absolute; + right: 4px; + font-size: 14px; +} + +.version + .since:before { + content: '| '; +} + +.see { + margin-top: 10px; +} + +.see h4 { + margin: 4px 0; +} + +.content .detail h4 + .example-doc { + margin: 6px 0; +} + +.example-caption { + position: relative; + bottom: -1px; + display: inline-block; + padding: 4px; + font-style: italic; + background-color: #f5f5f5; + font-weight: bold; + border-radius: 3px; + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +.example-caption + pre.source-code { + margin-top: 0; + border-top-left-radius: 0; +} + +footer, .file-footer { + text-align: right; + font-style: italic; + font-weight: 100; + font-size: 13px; + margin-right: 50px; + margin-left: 270px; + border-top: 1px solid #ddd; + padding-top: 30px; + margin-top: 20px; + padding-bottom: 10px; +} + +footer img { + width: 24px; + vertical-align: middle; + padding-left: 4px; + position: relative; + top: -3px; + opacity: 0.6; +} + +pre.source-code { + background: #f5f5f5; + padding: 4px; +} + +pre.raw-source-code > code { + padding: 0; + margin: 0; +} + +pre.source-code.line-number { + padding: 0; +} + +pre.source-code ol { + background: #eee; + padding-left: 40px; +} + +pre.source-code li { + background: white; + padding-left: 4px; + list-style: decimal; + margin: 0; +} + +pre.source-code.line-number li.active { + background: rgb(255, 255, 150); +} + +pre.source-code.line-number li.error-line { + background: #ffb8bf; +} + +table.files-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; + text-align: right; +} + +table.files-summary tbody tr:hover { + background: #eee; +} + +table.files-summary td:first-child, +table.files-summary td:nth-of-type(2) { + text-align: left; +} + +table.files-summary[data-use-coverage="false"] td.coverage { + display: none; +} + +table.files-summary thead { + background: #999; + color: white; +} + +table.files-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.files-summary td.identifiers > span { + display: block; + margin-top: 4px; +} +table.files-summary td.identifiers > span:first-child { + margin-top: 0; +} + +table.files-summary .coverage-count { + font-size: 12px; + color: #aaa; + display: inline-block; + min-width: 40px; +} + +.total-coverage-count { + position: relative; + bottom: 2px; + font-size: 12px; + color: #666; + font-weight: 500; + padding-left: 5px; +} + +table.test-summary thead { + background: #999; + color: white; +} + +table.test-summary thead .test-description { + width: 50%; +} + +table.test-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.test-summary thead .test-count { + width: 3em; +} + +table.test-summary tbody tr:hover { + background-color: #eee; +} + +table.test-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.test-summary td p { + margin: 0; +} + +table.test-summary tr.test-describe .toggle { + display: inline-block; + float: left; + margin-right: 4px; + cursor: pointer; + font-size: 0.8em; + padding-top: 0.25em; +} + +table.test-summary tr.test-describe .toggle.opened:before { + content: '▼'; +} + +table.test-summary tr.test-describe .toggle.closed:before { + content: '▶'; +} + +table.test-summary .test-target > span { + display: block; + margin-top: 4px; +} +table.test-summary .test-target > span:first-child { + margin-top: 0; +} + +.inner-link-active { + background: rgb(255, 255, 150); +} + +/* search box */ +.search-box { + position: absolute; + top: 10px; + right: 50px; + padding-right: 8px; + padding-bottom: 10px; + line-height: normal; + font-size: 12px; +} + +.search-box img { + width: 20px; + vertical-align: top; +} + +.search-input { + display: inline; + visibility: hidden; + width: 0; + padding: 2px; + height: 1.5em; + outline: none; + background: transparent; + border: 1px #0af; + border-style: none none solid none; + vertical-align: bottom; +} + +.search-input-edge { + display: none; + width: 1px; + height: 5px; + background-color: #0af; + vertical-align: bottom; +} + +.search-result { + position: absolute; + display: none; + height: 600px; + width: 100%; + padding: 0; + margin-top: 5px; + margin-left: 24px; + background: white; + box-shadow: 1px 1px 4px rgb(0,0,0); + white-space: nowrap; + overflow-y: scroll; +} + +.search-result-import-path { + color: #aaa; + font-size: 12px; +} + +.search-result li { + list-style: none; + padding: 2px 4px; +} + +.search-result li a { + display: block; +} + +.search-result li.selected { + background: #ddd; +} + +.search-result li.search-separator { + background: rgb(37, 138, 175); + color: white; +} + +.search-box.active .search-input { + visibility: visible; + transition: width 0.2s ease-out; + width: 300px; +} + +.search-box.active .search-input-edge { + display: inline-block; +} + +.github-markdown .manual-toc { + padding-left: 0; +} + +/** manual */ + +.manual-index .manual-cards { + display: flex; + flex-wrap: wrap; +} + +.manual-index .manual-card-wrap { + width: 280px; + padding: 10px 20px 10px 0; + box-sizing: border-box; +} + +.manual-index .manual-card-wrap > h1 { + margin: 0; + font-size: 1em; + font-weight: 600; + padding: 0.2em 0 0.2em 0.5em; + border-radius: 0.1em 0.1em 0 0; + border: none; +} + +.manual-index .manual-card-wrap > h1 span { + color: #555; +} + +.manual-index .manual-card { + height: 200px; + overflow: hidden; + border: solid 1px rgba(230, 230, 230, 0.84); + border-radius: 0 0 0.1em 0.1em; + padding: 8px; + position: relative; + border-top: none; +} + +.manual-index .manual-card > div { + transform: scale(0.4); + transform-origin: 0 0; + width: 250%; +} + +.manual-index .manual-card > a { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(210, 210, 210, 0.1); +} + +.manual-index .manual-card > a:hover { + background: none; +} + +.manual-index .manual-badge { + margin: 0; +} + +.manual-index .manual-user-index { + margin-bottom: 1em; + border-bottom: solid 1px #ddd; +} + +.manual-root .navigation { + padding-left: 4px; + margin-top: 4px; +} + +.navigation .manual-toc { + margin-top: -0.25em; +} + +.navigation .manual-toc-root > div { + padding-top: 1px; + padding-left: 0.25em; + padding-right: 0.75em; +} + +.github-markdown .manual-toc-title a { + color: inherit; +} + +.manual-breadcrumb-list { + font-size: 0.8em; + margin-bottom: 1em; +} + +.manual-toc-title a:hover { + color: #039BE5; +} + +.manual-toc li { + margin: 0.75em 0; + list-style-type: none; +} + +.navigation .manual-toc [class^="indent-h"] a { + color: #666; +} + +.navigation .manual-toc .indent-h1 a { + color: #555; + font-weight: 600; + display: block; +} + +.manual-toc .indent-h1 { + display: block; + margin: 1em 0 0 0.25em; + padding: 0.2em 0 0.2em 0.5em; + border-radius: 0.1em; +} +.manual-toc .indent-h2 { + display: none; + margin-left: 1.5em; +} +.manual-toc .indent-h3 { + display: none; + margin-left: 2.5em; +} +.manual-toc .indent-h4 { + display: none; + margin-left: 3.5em; +} +.manual-toc .indent-h5 { + display: none; + margin-left: 4.5em; +} + +.manual-color { + position: relative; +} + +.manual-color:after { + content: attr(data-section-count); + font-size: 0.5em; + opacity: 0.5; + position: absolute; + right: 0.5em; + top: 0.5em; +} + +.manual-color-overview, +.manual-color-design { + color: #db001e; + background-color: #edbec3; +} + +.manual-color-installation, +.manual-color-tutorial, +.manual-color-usage, +.manual-color-configuration, +.manual-color-advanced { + color: #009800; + background-color: #bfe5bf; +} + +.manual-color-example { + color: #eb6420; + background-color: #fad8c7; +} + +.manual-color-reference { + color: #6b0090; + background-color: #d6bdde; +} + +.manual-color-faq, +.manual-color-changelog { + color: #0738c3; + background-color: #bbcbea; +} + +.manual-nav li { + margin: 0.75em 0; +} + +/* github markdown */ +.github-markdown { + font-size: 16px; +} + +.github-markdown h1, +.github-markdown h2, +.github-markdown h3, +.github-markdown h4, +.github-markdown h5 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + padding: 0; +} + +.github-markdown h1:nth-of-type(1) { + margin-top: 0; +} + +.github-markdown h1 { + font-size: 2em; + padding-bottom: 0.3em; +} + +.github-markdown h2 { + font-size: 1.75em; + padding-bottom: 0.3em; +} + +.github-markdown h3 { + font-size: 1.5em; + background-color: transparent; +} + +.github-markdown h4 { + font-size: 1.25em; +} + +.github-markdown h5 { + font-size: 1em; +} + +.github-markdown ul, .github-markdown ol { + padding-left: 2em; +} + +.github-markdown pre > code { + font-size: 0.85em; +} + +.github-markdown table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.github-markdown table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.github-markdown table th, +.github-markdown table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.github-markdown table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.github-markdown hr { + border-right: 0; + border-bottom: 1px solid #e5e5e5; + border-left: 0; + border-top: 0; +} + +/** badge(.svg) does not have border */ +.github-markdown img:not([src*=".svg"]) { + max-width: 100%; + box-shadow: 1px 1px 1px rgba(0,0,0,0.5); +} diff --git a/dump.json b/dump.json new file mode 100644 index 0000000..d9286be --- /dev/null +++ b/dump.json @@ -0,0 +1,995 @@ +[ + { + "__docId__": 0, + "kind": "file", + "name": "src/api/index.js", + "content": "export * from './randfloat' ;\nexport * from './randint' ;\nexport * from './randrange' ;\nexport * from './sample' ;\nexport * from './shuffle' ;\n", + "static": true, + "longname": "src/api/index.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 1, + "kind": "file", + "name": "src/api/randfloat.js", + "content": "\n/**\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n */\n\nexport function randfloat ( i , j ) {\n\treturn i + Math.random( ) * ( j - i ) ;\n}\n\n", + "static": true, + "longname": "src/api/randfloat.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 2, + "kind": "function", + "name": "randfloat", + "memberof": "src/api/randfloat.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/api/randfloat.js~randfloat", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/api/randfloat.js", + "importStyle": "{randfloat}", + "description": "Returns a floating point number in interval [i, j[ (i included, j excluded)\naccording to a uniform distribution.", + "lineNumber": 7, + "params": [ + { + "name": "i", + "types": [ + "*" + ] + }, + { + "name": "j", + "types": [ + "*" + ] + } + ], + "return": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 3, + "kind": "file", + "name": "src/api/randint.js", + "content": "\n/**\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n */\n\nexport function randint ( i , j ) {\n\treturn i + Math.floor( Math.random( ) * ( j - i ) ) ;\n}\n\n", + "static": true, + "longname": "src/api/randint.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 4, + "kind": "function", + "name": "randint", + "memberof": "src/api/randint.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/api/randint.js~randint", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/api/randint.js", + "importStyle": "{randint}", + "description": "Returns an integer in interval [i, j[ (i included, j excluded)\naccording to a uniform distribution.", + "lineNumber": 7, + "params": [ + { + "name": "i", + "types": [ + "*" + ] + }, + { + "name": "j", + "types": [ + "*" + ] + } + ], + "return": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 5, + "kind": "file", + "name": "src/api/randrange.js", + "content": "import { randint } from './randint' ;\n\n/**\n * Return a randomly selected element from range(start, stop, step).\n */\n\nexport function randrange ( start , stop , step ) {\n\n\t// TODO handle empty ranges\n\n\tif ( stop === undefined ) return randint( 0 , start ) ;\n\tif ( step === undefined ) step = 1 ;\n\n\tif ( stop >= start ) {\n\t\treturn start + step * randint( 0 , Math.floor( ( stop - start ) / step ) ) ;\n\t}\n\telse {\n\t\treturn start + step * randint( 0 , Math.floor( ( start - stop ) / -step ) ) ;\n\t}\n\n}\n\n", + "static": true, + "longname": "src/api/randrange.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 6, + "kind": "function", + "name": "randrange", + "memberof": "src/api/randrange.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/api/randrange.js~randrange", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/api/randrange.js", + "importStyle": "{randrange}", + "description": "Return a randomly selected element from range(start, stop, step).", + "lineNumber": 7, + "params": [ + { + "name": "start", + "types": [ + "*" + ] + }, + { + "name": "stop", + "types": [ + "*" + ] + }, + { + "name": "step", + "types": [ + "*" + ] + } + ], + "return": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 7, + "kind": "file", + "name": "src/api/sample.js", + "content": "import { _fisheryates } from '../kernel' ;\nimport { randint } from './randint' ;\n\nexport const sample = _fisheryates( randint ) ;\n", + "static": true, + "longname": "src/api/sample.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 8, + "kind": "variable", + "name": "sample", + "memberof": "src/api/sample.js", + "static": true, + "longname": "src/api/sample.js~sample", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/api/sample.js", + "importStyle": "{sample}", + "description": null, + "lineNumber": 4, + "undocument": true, + "unknown": [ + { + "tagName": "@_undocument", + "tagValue": "" + } + ], + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 9, + "kind": "file", + "name": "src/api/shuffle.js", + "content": "import { _shuffle } from '../kernel' ;\nimport { sample } from './sample' ;\n\nexport const shuffle = _shuffle( sample ) ;\n", + "static": true, + "longname": "src/api/shuffle.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 10, + "kind": "variable", + "name": "shuffle", + "memberof": "src/api/shuffle.js", + "static": true, + "longname": "src/api/shuffle.js~shuffle", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/api/shuffle.js", + "importStyle": "{shuffle}", + "description": null, + "lineNumber": 4, + "undocument": true, + "unknown": [ + { + "tagName": "@_undocument", + "tagValue": "" + } + ], + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 11, + "kind": "file", + "name": "src/index.js", + "content": "export * from './api' ;\nexport * from './kernel' ;\n", + "static": true, + "longname": "src/index.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 12, + "kind": "file", + "name": "src/kernel/_fisheryates.js", + "content": "\n/**\n * Sample array using Fisher-Yates method.\n */\n\nexport function _fisheryates ( randint ) {\n\n\tconst fisheryates = function ( n , a , i , j ) {\n\n\t\t// we will swap at most n elements\n\n\t\tconst k = i + n ;\n\n\t\tfor ( ; i < k ; ++i ) {\n\n\t\t\t// choose any index p in the remaining array\n\n\t\t\tconst p = randint( i , j ) ;\n\n\n\t\t\t// swap element at index p with first element in the array\n\n\t\t\tconst tmp = a[i] ;\n\t\t\ta[i] = a[p] ;\n\t\t\ta[p] = tmp ;\n\n\t\t}\n\n\t} ;\n\n\treturn fisheryates ;\n\n}\n\n", + "static": true, + "longname": "src/kernel/_fisheryates.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 13, + "kind": "function", + "name": "_fisheryates", + "memberof": "src/kernel/_fisheryates.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/kernel/_fisheryates.js~_fisheryates", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/kernel/_fisheryates.js", + "importStyle": "{_fisheryates}", + "description": "Sample array using Fisher-Yates method.", + "lineNumber": 6, + "params": [ + { + "name": "randint", + "types": [ + "*" + ] + } + ], + "return": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 14, + "kind": "file", + "name": "src/kernel/_shuffle.js", + "content": "\n/**\n * Shuffle array by sampling the complete array.\n */\n\nexport function _shuffle ( sample ) {\n\n\tconst shuffle = function ( a , i , j ) {\n\t\tsample( j - i , a , i , j ) ;\n\t} ;\n\n\treturn shuffle ;\n\n}\n\n", + "static": true, + "longname": "src/kernel/_shuffle.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 15, + "kind": "function", + "name": "_shuffle", + "memberof": "src/kernel/_shuffle.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/kernel/_shuffle.js~_shuffle", + "access": null, + "export": true, + "importPath": "aureooms-js-random/src/kernel/_shuffle.js", + "importStyle": "{_shuffle}", + "description": "Shuffle array by sampling the complete array.", + "lineNumber": 6, + "params": [ + { + "name": "sample", + "types": [ + "*" + ] + } + ], + "return": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 16, + "kind": "file", + "name": "src/kernel/index.js", + "content": "export * from './_fisheryates' ;\nexport * from './_shuffle' ;\n", + "static": true, + "longname": "src/kernel/index.js", + "access": null, + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 18, + "kind": "external", + "name": "Infinity", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 19, + "kind": "external", + "name": "NaN", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 20, + "kind": "external", + "name": "undefined", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 21, + "kind": "external", + "name": "null", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~null", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 22, + "kind": "external", + "name": "Object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 23, + "kind": "external", + "name": "object", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~object", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 24, + "kind": "external", + "name": "Function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 25, + "kind": "external", + "name": "function", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~function", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 26, + "kind": "external", + "name": "Boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 27, + "kind": "external", + "name": "boolean", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 28, + "kind": "external", + "name": "Symbol", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 29, + "kind": "external", + "name": "Error", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Error", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 30, + "kind": "external", + "name": "EvalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 31, + "kind": "external", + "name": "InternalError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 32, + "kind": "external", + "name": "RangeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 33, + "kind": "external", + "name": "ReferenceError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 34, + "kind": "external", + "name": "SyntaxError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 35, + "kind": "external", + "name": "TypeError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 36, + "kind": "external", + "name": "URIError", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 37, + "kind": "external", + "name": "Number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 38, + "kind": "external", + "name": "number", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~number", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 39, + "kind": "external", + "name": "Date", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Date", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 40, + "kind": "external", + "name": "String", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~String", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 41, + "kind": "external", + "name": "string", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~string", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 42, + "kind": "external", + "name": "RegExp", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 43, + "kind": "external", + "name": "Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 44, + "kind": "external", + "name": "Int8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 45, + "kind": "external", + "name": "Uint8Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 46, + "kind": "external", + "name": "Uint8ClampedArray", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 47, + "kind": "external", + "name": "Int16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 48, + "kind": "external", + "name": "Uint16Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 49, + "kind": "external", + "name": "Int32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 50, + "kind": "external", + "name": "Uint32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 51, + "kind": "external", + "name": "Float32Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 52, + "kind": "external", + "name": "Float64Array", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 53, + "kind": "external", + "name": "Map", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Map", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 54, + "kind": "external", + "name": "Set", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Set", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 55, + "kind": "external", + "name": "WeakMap", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 56, + "kind": "external", + "name": "WeakSet", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 57, + "kind": "external", + "name": "ArrayBuffer", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 58, + "kind": "external", + "name": "DataView", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 59, + "kind": "external", + "name": "JSON", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 60, + "kind": "external", + "name": "Promise", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 61, + "kind": "external", + "name": "Generator", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 62, + "kind": "external", + "name": "GeneratorFunction", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 63, + "kind": "external", + "name": "Reflect", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 64, + "kind": "external", + "name": "Proxy", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy", + "memberof": "BuiltinExternal/ECMAScriptExternal.js", + "static": true, + "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "access": null, + "description": "", + "lineNumber": 193, + "builtinExternal": true + }, + { + "__docId__": 66, + "kind": "external", + "name": "CanvasRenderingContext2D", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 67, + "kind": "external", + "name": "DocumentFragment", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 68, + "kind": "external", + "name": "Element", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~Element", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 69, + "kind": "external", + "name": "Event", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~Event", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 70, + "kind": "external", + "name": "Node", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~Node", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 71, + "kind": "external", + "name": "NodeList", + "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~NodeList", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 72, + "kind": "external", + "name": "XMLHttpRequest", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "access": null, + "description": "", + "builtinExternal": true + }, + { + "__docId__": 73, + "kind": "external", + "name": "AudioContext", + "externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext", + "memberof": "BuiltinExternal/WebAPIExternal.js", + "static": true, + "longname": "BuiltinExternal/WebAPIExternal.js~AudioContext", + "access": null, + "description": "", + "lineNumber": 34, + "builtinExternal": true + } +] \ No newline at end of file diff --git a/file/src/api/index.js.html b/file/src/api/index.js.html new file mode 100644 index 0000000..e5f7ada --- /dev/null +++ b/file/src/api/index.js.html @@ -0,0 +1,70 @@ + + + + + + src/api/index.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/index.js

      +
      export * from './randfloat' ;
      +export * from './randint' ;
      +export * from './randrange' ;
      +export * from './sample' ;
      +export * from './shuffle' ;
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/api/randfloat.js.html b/file/src/api/randfloat.js.html new file mode 100644 index 0000000..57bb92c --- /dev/null +++ b/file/src/api/randfloat.js.html @@ -0,0 +1,75 @@ + + + + + + src/api/randfloat.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/randfloat.js

      +
      
      +/**
      + * Returns a floating point number in interval [i, j[ (i included, j excluded)
      + * according to a uniform distribution.
      + */
      +
      +export function randfloat ( i , j ) {
      +	return i + Math.random( ) * ( j - i ) ;
      +}
      +
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/api/randint.js.html b/file/src/api/randint.js.html new file mode 100644 index 0000000..d8d6478 --- /dev/null +++ b/file/src/api/randint.js.html @@ -0,0 +1,75 @@ + + + + + + src/api/randint.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/randint.js

      +
      
      +/**
      + * Returns an integer in interval [i, j[ (i included, j excluded)
      + * according to a uniform distribution.
      + */
      +
      +export function randint ( i , j ) {
      +	return i + Math.floor( Math.random( ) * ( j - i ) ) ;
      +}
      +
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/api/randrange.js.html b/file/src/api/randrange.js.html new file mode 100644 index 0000000..8eb0560 --- /dev/null +++ b/file/src/api/randrange.js.html @@ -0,0 +1,87 @@ + + + + + + src/api/randrange.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/randrange.js

      +
      import { randint } from './randint' ;
      +
      +/**
      + * Return a randomly selected element from range(start, stop, step).
      + */
      +
      +export function randrange ( start , stop , step ) {
      +
      +	// TODO handle empty ranges
      +
      +	if ( stop === undefined ) return randint( 0 , start ) ;
      +	if ( step === undefined ) step = 1 ;
      +
      +	if ( stop >= start ) {
      +		return start + step * randint( 0 , Math.floor( ( stop - start ) / step ) ) ;
      +	}
      +	else {
      +		return start + step * randint( 0 , Math.floor( ( start - stop ) / -step ) ) ;
      +	}
      +
      +}
      +
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/api/sample.js.html b/file/src/api/sample.js.html new file mode 100644 index 0000000..9c874f3 --- /dev/null +++ b/file/src/api/sample.js.html @@ -0,0 +1,69 @@ + + + + + + src/api/sample.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/sample.js

      +
      import { _fisheryates } from '../kernel' ;
      +import { randint } from './randint' ;
      +
      +export const sample = _fisheryates( randint ) ;
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/api/shuffle.js.html b/file/src/api/shuffle.js.html new file mode 100644 index 0000000..5ebae9f --- /dev/null +++ b/file/src/api/shuffle.js.html @@ -0,0 +1,69 @@ + + + + + + src/api/shuffle.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/api/shuffle.js

      +
      import { _shuffle } from '../kernel' ;
      +import { sample } from './sample' ;
      +
      +export const shuffle = _shuffle( sample ) ;
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/index.js.html b/file/src/index.js.html new file mode 100644 index 0000000..a626eed --- /dev/null +++ b/file/src/index.js.html @@ -0,0 +1,67 @@ + + + + + + src/index.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/index.js

      +
      export * from './api' ;
      +export * from './kernel' ;
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/kernel/_fisheryates.js.html b/file/src/kernel/_fisheryates.js.html new file mode 100644 index 0000000..2089481 --- /dev/null +++ b/file/src/kernel/_fisheryates.js.html @@ -0,0 +1,99 @@ + + + + + + src/kernel/_fisheryates.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/kernel/_fisheryates.js

      +
      
      +/**
      + * Sample array using Fisher-Yates method.
      + */
      +
      +export function _fisheryates ( randint ) {
      +
      +	const fisheryates = function ( n , a , i , j ) {
      +
      +		// we will swap at most n elements
      +
      +		const k = i + n ;
      +
      +		for ( ; i < k ; ++i ) {
      +
      +			// choose any index p in the remaining array
      +
      +			const p = randint( i , j ) ;
      +
      +
      +			// swap element at index p with first element in the array
      +
      +			const tmp  = a[i] ;
      +			a[i] = a[p] ;
      +			a[p] =  tmp ;
      +
      +		}
      +
      +	} ;
      +
      +	return fisheryates ;
      +
      +}
      +
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/kernel/_shuffle.js.html b/file/src/kernel/_shuffle.js.html new file mode 100644 index 0000000..5940938 --- /dev/null +++ b/file/src/kernel/_shuffle.js.html @@ -0,0 +1,80 @@ + + + + + + src/kernel/_shuffle.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/kernel/_shuffle.js

      +
      
      +/**
      + * Shuffle array by sampling the complete array.
      + */
      +
      +export function _shuffle ( sample ) {
      +
      +	const shuffle = function ( a , i , j ) {
      +		sample( j - i , a , i , j ) ;
      +	} ;
      +
      +	return shuffle ;
      +
      +}
      +
      +
      + +
      + + + + + + + + + + + + diff --git a/file/src/kernel/index.js.html b/file/src/kernel/index.js.html new file mode 100644 index 0000000..09c1bca --- /dev/null +++ b/file/src/kernel/index.js.html @@ -0,0 +1,67 @@ + + + + + + src/kernel/index.js | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      src/kernel/index.js

      +
      export * from './_fisheryates' ;
      +export * from './_shuffle' ;
      +
      + +
      + + + + + + + + + + + + diff --git a/function/index.html b/function/index.html new file mode 100644 index 0000000..cdab9f9 --- /dev/null +++ b/function/index.html @@ -0,0 +1,609 @@ + + + + + + Function | aureooms/js-random API Document + + + + + + + + + + + +
      + Home + Manual + Reference + Source + Test + Repository + +
      + + + +

      Function

      +
  • + + + + + + + + + + + + + + + + + + + +
    Static Public Summary
    + public + + + + + +
    +

    + + + randfloat(i: *, j: *): * +

    +
    +
    + + +

    Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randint(i: *, j: *): * +

    +
    +
    + + +

    Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randrange(start: *, stop: *, step: *): * +

    +
    +
    + + +

    Return a randomly selected element from range(start, stop, step).

    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + +
    Static Private Summary
    + private + + + + + +
    +

    + + + _fisheryates(randint: *): * +

    +
    +
    + + +

    Sample array using Fisher-Yates method.

    +
    +
    +
    + + +
    + private + + + + + +
    +

    + + + _shuffle(sample: *): * +

    +
    +
    + + +

    Shuffle array by sampling the complete array.

    +
    +
    +
    + + +
    + +

    Static Public

    + +
    +

    + public + + + + + + randfloat(i: *, j: *): * + + + + source + +

    + +
    import {randfloat} from 'aureooms-js-random/src/api/randfloat.js'
    + + +

    Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    i*
    j*
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + + randint(i: *, j: *): * + + + + source + +

    + + + + +

    Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    i*
    j*
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + public + + + + + + randrange(start: *, stop: *, step: *): * + + + + source + +

    + +
    import {randrange} from 'aureooms-js-random/src/api/randrange.js'
    + + +

    Return a randomly selected element from range(start, stop, step).

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    start*
    stop*
    step*
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + + + +
    +

    Static Private

    + +
    +

    + private + + + + + + _fisheryates(randint: *): * + + + + source + +

    + + + + +

    Sample array using Fisher-Yates method.

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    randint*
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    +

    + private + + + + + + _shuffle(sample: *): * + + + + source + +

    + + + + +

    Shuffle array by sampling the complete array.

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    sample*
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    *
    +
    +
    +
    + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + diff --git a/identifiers.html b/identifiers.html new file mode 100644 index 0000000..d2d22a0 --- /dev/null +++ b/identifiers.html @@ -0,0 +1,283 @@ + + + + + + Index | aureooms/js-random API Document + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +

    References

    + + +

    Function Summary

    + + + + + + + + + + + + + + + + + + + +
    Static Public Function Summary
    + public + + + + + +
    +

    + + + randfloat(i: *, j: *): * +

    +
    +
    + + +

    Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randint(i: *, j: *): * +

    +
    +
    + + +

    Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randrange(start: *, stop: *, step: *): * +

    +
    +
    + + +

    Return a randomly selected element from range(start, stop, step).

    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + +
    Static Private Function Summary
    + private + + + + + +
    +

    + + + _fisheryates(randint: *): * +

    +
    +
    + + +

    Sample array using Fisher-Yates method.

    +
    +
    +
    + + +
    + private + + + + + +
    +

    + + + _shuffle(sample: *): * +

    +
    +
    + + +

    Shuffle array by sampling the complete array.

    +
    +
    +
    + + +
    +
    +

    Variable Summary

    + + + + + + + + + + + + + + +
    Static Public Variable Summary
    + public + + + + + +
    +

    + + + sample: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + + + shuffle: * +

    +
    +
    + + + +
    +
    + + +
    +
    + + +
    + + + + + + + + + + + + diff --git a/image/badge.svg b/image/badge.svg new file mode 100644 index 0000000..b18426b --- /dev/null +++ b/image/badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + document + document + @ratio@ + @ratio@ + + diff --git a/image/esdoc-logo-mini-black.png b/image/esdoc-logo-mini-black.png new file mode 100644 index 0000000000000000000000000000000000000000..5d5f9a254a27bdd14a2156eb3c66fbe2daa89459 GIT binary patch literal 5651 zcmY*d2UJtdwmt!Zp;zf86hWkgE*%2W3`L{`P)aC4S|C(G2u*qurArqD=>pPAKoF#Z zNC!nJA`qoW6E6PuzWd%gYt5ONz4v_Ie0$BDwbzL?GSH?XXCnsyfJ#?K)A+Ji``aL- zm+x{Hucgb5#93Wm9RO;RDbDP`mvbme$5eE)oDvE={-%0PuwYz;{~!P{;%T zW=w9&9i>YL8Ab<*1po?$zYPRr=du6*2&33+*WahRmIq@?I&geW%9!^bW_ z)C0@+Z;=1N(R9S3yj?IpE}kCHzqoexp1wZHyu5#j{`>rUpFS>5|I6fo{g13mf#QEX z;u2yo@&969E>-$#RWS5+alB;yi?1S~^iSmfv;BuhN&GMQ|JlsHmHuPBl&V6mB>vyD zsgNV^f=B>hLOGG@svstB_ zrWm`Ox%8gLS?SW%>$}c9A;OeCH!6OG>Q7Rvu;~n0c9Wggr+RKOC--3LRl}0iMzbEc zG{p2+*D-6*{$TVO&dL4Fuq;;PWTV(-Y7Gaq5cH(lU3mI19s=y8b5}EiU<`hXzMss7 zvt_n~1q{tLc^*qX@F=qU*r$#PA7rx&DVOlnV;Pn4SU5@?RXL?p2Z=$Z7evr3w_apm z_N4FbPLT;kp+G=ZfP=>R5^rso|W&8+^QMsnqa z(NMGZ?iQ_6!3EEv^qJJAS|pOPJ|tJuc4wHHnAATTI4v58V9Raxc2(e;Iv=u5ya%Q4 zQ&L`TUG$q*W24Sq{o9R)!{$ug)E%jE7%ThK>KR*y2lJfxq-rGL5Ul>+sm5QL0JQ z8e?A**woDI@!D`s^ls;cO7Ou)bEvbT|Bm%*`5XuvS!ly_o6Bc>l>cNbEn_@FqD_t@ zBn=1-Tl8OUZx;xKQyyqe#!YXjoFAv7VMGC` zR!JzQEg_LG8_l5Of3C$og;Oo9BwYdLTLc9#i{4bH@Jlb9-jWw)a8#7qKHOPU+~1y; zlcL;>st#lLqwL9WU^xlY~xX<>SjMBl> z-D%O+ua3TD*pzE(Bu-bGJj(mdDU~$@MRw`EY`|36?^4kNPSvrlynEv4?nBFzlBks_ zmdPuyd-aVU#9AYzMsD)$Z;bOHGGRPz2h&!dZd)q%`Nntlh{+w&qed2TVe=}=cxG|x z-Hua_qm!-bL@$z9N8D;v_rnC!djoYv;LrK58e@xonvA!U7s6*=0SoIAL86gsWuIK^ zm`1TY&JdoJ)1V)<+D&WOu6QuBwXKtWPI!7&9byI(Lt#M#cbP2JpK+~j9}0(+Z@*n$ z!kAUxci$oLpev{~z?YeZijN;Qp}BDQDe6#16dVcC6te7^)HIAa9)%`PLd?P`EmB zyjVMW_Kowp*`!St8a-YVl^E;fhN{WF%#Ii$_vSb`u~^GS5oRsR`Ed`m;*cLP23M+| zV|kBoMQfN-diOt6W4s^z18A$T{n8g5~{TZ?HniWU_v+M z{CNG!HsteTb`Kb+X0R}t>p?)KWGir zGFi~vTmi6x%pngt*oLEp#LPFZ@eKLN8GPnXCX>>oDE8L9CCZw2zuyHfYd`%*MLh}w z>8tQ;-EPDTT+6Tkwl1X|eTf$*k_ky}(xRwIfpJVzt{b!U;cUr4IHc`S`e+>!~v+{?()31rtO%sUnTJ4M4S!|8ooP248 z=pN<@IkKC#J6sOEz(L~yGox$Y^zV54Cj6olX?jIFfuf5c18)o4+JR+mOzEbQzKNUg zvu(aSDRsP1Mf+Yz5c3|g+2HUUv(3=pS)JrTMP@Dj&EZK!IO=dEf@VZ7Ms_V1J2DVL z=)QvdMnootV%)D=4&Kv0tnKHLQUc4qc0?kb#Y?3z( z0;M5mk10Wp?EUIK-CwW-U(~v5H5?0f#L1GOGgZpAyTXWvf5c8XxW)0U^}9u(Cn->~ zWQ>`J_&+BHQt@5O-F9uObv?9FEk2v}-^R7MqeyNSC8?et74#Sd9L_q6GT8=#J#f6P z4q*NV`Y#efzjK1vlFO;+`zChh4o@D`B^@3rrOgW&{usRO32rbpYrIG`>&gVU~Oh0*xotspb#YDZOcT=6yf;>5|h z44V*_N9d%5d;Y|S1_iv>h+`t`ese`Bjr{=AILGKW0&DMFt^_TcnwlnEt{gz}tY~)b z3wMTI{!!8)eI7mNz2G)7dsDz(l1{$byXa>qwW6jgVmxd+VG#tE?MtC3m0iNoAslIzvln<#1W(j31=zsI?8F0lZk8{!*$?XXdo z^0xAy{mFE6Ed}POz;n`@=-OLPB#9yABu#*2Ur4B2C!~GaS-kw} z^rY};h%jN^t4ldVJ+%k!Mvzj~J&$0w(GyyMGk)MXZvGM{j3<2V5f!w3G)EVCrl3ab zlTIH#xAoJBDCMwHLp^G%>g@Ep&Q*ruTScO3)LrmiAUK~-VjjxOV*%=>z(Y)$!0E&) zt4+L$zZbBg8SBzydv34MwA~Wv@??HWQc1-JI1n-Zqqz;I-@Lor{Na(4+PEA!1FqGS zzuBUpv1VMfi=+VjDTb_Lf(bm7_J;{iaEGAo7$YHl(q1nH(gdv>oJL8LZDVZsG&41e zhp-d6g0l)u#2#TaN|^BIi()%oC792K5f+?$)S*%ZQL`bdc~vHF-gnO5bP8cmJDX0w z>lLz(Sc@WKviHgZEsb+HKlH$XPI6i6lMN$!q|74JB(oA6y;mmI0#<$vwV^XDFqhSH zmJwM8_2xl)r4ChUUk&;`+o}8t>rWTZ(cYJsr#eC%?00q8?;0|M!(gTmC&RU)^4$}s ztLP`^J|G%WI@(b**KNJk8iDDE7XU|FjpVc=<;vFi{@oEY@->NtB>!2|{s$R`rCb-b z?HS>c<~w!!-%Kj5Fhv;cdx2@F@q2`1f4yu5=qttu_>z+JxKO|U)jo`2G@xpL)1%|q>2_Tc;7A2*uZCQf@NMm=^IoF-9yV+!Es#-kkzT{p zf7p8#DDLC4BxEf_GaX5z1qx6^B?R~ps~8=v!(#ALzESQW@8y&seVWZuCGCY>X64*g zGn`Q83q#dE(rt%xuIXqV%?eEkVUEiZ*RNDZ_*w(0xs3(p`AN`iph;#o@ON$$kx?kM zZcw1G3o4Fj-U?0-$M5HqlIfvStJTrr71SAB%D}H+72A{pP)Qq!$b&}Fki&2nVt&P7 zUEUY(a;35okQ7uq{1A$CN zZpE@`g7$+6$FeXja9i(Hiv-&Zt1k_o?z?IpeY-B$C72&PK`z&PR&k3PP87|b*(V9{ zrp^=t(G(ij2t+;{6ne=*-tX2Slf+6a)V)J$%XOPai&5f_<@kH^Lf`T~Pr)>PTkdJS zst3JH^TQ@jIZOxN3b=$VAxb;iiY1xU^ggt=Eq_d{?}COUclCB(VO|M9C=T(c>9I{X zA-K8Kt6IL_P&8OwhU5Z2wo=@^B}H?!vGn~%&w=0B#SIaZiCa^XD%Z z^_{Wf1D3Cv1%|L-e#5aZDk+&bwHRVR)!%Elh8P&(_Z7l`QV)q>+uYhS^vL+YKUVP6 zz$3QE!(-*oIwwKTjt?y87byhk_b|ph-1!3Go^ekECC zz;6}beQD63rnj(?l|N&50s((MIlKQd){K2f&Q5IHFN0_;W`^d`E&X@>f|LOowR4ZI zrwzCXf)G>T?Y#vQg(bA(l5m{MN{R+`t*dB=T(9AMTFP{Fj^^`|tsV^;Wrw%AZZCVO zDxLAV$omq%M8v}Qvio9=Kkyp2D|gPUc#Ea1tZG2iof?dX@^AFzeGC^-o2|*e#^+6g zj^7w|N&54sn@BNXwwY_vPYptH6Ne>1I{5lFB#QPZWjp4qMn9JTG2D~EA#w|Y;eq!m97s&hZ)3Od{U>EyMP)M+|ukM0?I+`yZU zrn;2ljY&PuXkg z)g7muqqmSo|4x>7zIw1x-t@0y)$;3Ql<^?Ldk1&#v3*cihJWCBdGe$}5593DTsx*9 zB=!0jhQe)O{ViJ`EfFFf?du8DDMxDBG8_%1v(v@{L*;5IQic7t7g7KNN1$>`gdv_UxV7U3OV0%d0Es?^ z;D5*cEJLs`$RbqQsqayR57Xg9S6KPP^$cHs-4%>Y#vVLOu3O z1ylHre28dj|20AXEb!y%m$H$Q$sIIR4#D{inD*0tN*)P*gRQ@;Gg(jWnV6UUhF7XjZ{(!~X@J%1mzn literal 0 HcmV?d00001 diff --git a/image/esdoc-logo-mini.png b/image/esdoc-logo-mini.png new file mode 100644 index 0000000000000000000000000000000000000000..76ba5b7d8e547bb469f0479736e96707453718b4 GIT binary patch literal 6504 zcmY*;bzD?W-}a%U86yUr-GCsor|Oo z-uM09@AI6`XU@!AbIoV__G5*$QuB-et<%D0Kkh60CueaKq4Igs9$BZXiGf| z;J#8ZMgRal`QL&De8>U;0GhFbo{^`KhPs4}n+vbCts4}^>+ACBfeipsz7h{j7nr9t zldp@jD?-8-!u&6W#6$Zp3}$Bf7sb;F!fd3W#iZco0b>&872@S%md0aZVv_Q(g-hrt zD*tEtLl44i@9FtU0u1)?@!|Cm}FOMsN<=-Oz zPe&1ku<>ws<>}z&%Jf&)8tUfd31MdbYxLje-|O^rfd79dSHyq9dI%8wcLdDO%Lo3i z_QO=Ezo>+!hXd@v`LDh-ztq2&{|Ebzj}-W?`TttXza#w@`Vgu#o)q}MpG_K1z2~X% z!w&eVD$42kqHSmTC7A1H4+LL!RL-a>$cM;=)Npi%^iF@I!c(H-NP*xA(bj^v)p}`W zyJ<`6YWlHDYu|h-N%}Bdz)d6ac#O5%8bMJgr)-8q;?;3T;$kkzPmcr~txB#<9Ic*R zw~z0=R7d{tEwfnL&I%Ymx`cEd+>Sfccb<{mRbDaD)5j18?|ibC#UO4!Pl{jbT(HP^ z?5+q856`f$4R-qAz2v*WI*g6|;u374H*|e75)MCU!XClYvY%*QKAKkbpOK7o7_$`; z5~2vUvM*VRT_4btsuc<7kI7kw*Q?(R?$~c$U=V@C9k+-3dr{%&2cPfnKX-P@e4`{g zEkgSqLrl=yFhMBltes7r_Na8CmtX!a&TNeWI85?&Y9c2E1X254T@2eokS8N` zy5}4A{D{d0ol>(n1mR?W+fM8p19NYirQd>zE}cdaY5Qxl_)A3x|B=+%+E(KBO`?!G zK(WD*(&kWai4$NdFrT#qfyBgAlY%F?!PWgIw>dgP8KIww(hXEE5DL`k#Ip*>)omk{ zeYEmCOXIG#srT%#rRqA47G9o|`@InTa*K6I=e|6zy${#+P@hjLE*3tZ5a_)5zyjE^ z!%jrRI~0C>`>lLV{DQUC`cCgwQxf4XI+q?wTD8tFV*J4(^&cQcc{7nCu6or6weQ5T zM8IyHGP_an`2E{bWN2s=)>gbp^El!BTiD3Bdi{P~#@ue0_Smcug>c~>d<>pdD1bAF z8mBlf)Z0iiN$M5c5W}XSnQUc!nYQ2QeGurmCjBIM>{YO^d#E2x^J;}zhdlGO=CoVy zY~hoYnorJiWlA^u;fv^sL0FL}Mm=n2kBh+-cg7&VxHLUB&IGkzPsM35czyjLv29?~ zgvYU}3(2w&HAXsDlYybs3zucCsWPq%o&6f%u?OZPfV;T+q(s zf`zfxb5mI@=$s`QwJNEB<*P|=SWBLnyd@L)TzPyz1)FvNC;NK*?s!(?bb0dRt>Czr zeE6T{^x#Z5Q{t-K^pK;32s{H>`Z%!Rf*uhQ+jf?1(0K(PVF;XczV;lk@E^*Ehfg%w zPe8`b!yQUhrN2}UR^4rbQ(cyO)idWDS35kXRYhEW>6FuZrxRA2I}xIhO=QzOk5z8W zDT=KXszjzDur^mUd5t~1JmpAiKi&pxI%!!19z{GgjHWoSg9t28O2div=FP zdq1a=K-B4ofi7dCPv^?UH*Y~zGa{-rN-h>y;-FF9yBbK@T(U*g!a~Pu)Kc+t(Qge7 z0dkA%08e(>qTm_dAOC!9>J3WvHEp7nif1Ckq-lmV!=X4P+ihox>rU*PwR$aCyV8jq zb}TG-!CUjB!DHS+HgEfq;!dAL8XYX!m`gz4NgwFkG5dugn@ly!6PnLc{M$K6t}P!k zbgbW>jZ2afyBjj(symPuVTKUJO^>#Ak9gg?j7p6TX-bz?y}jp8~qvB#5Se5^V=}aW80I%R>_i8 zBEv;?G;412xzG%IwF07IC2+fEEW^Z8iUAGf@bKySLzoT_MT{8Xb&Br}Fz1MN>iA{L zfSrD2Xi1r!(RYd-YnM}78*o^AUD<3RA@pWlAlXq7hu$g?zLeowj7yrPSU~otmhrZ0 zHwpW^(|hBcK{A)pOwl&>`Os4yiQ8io_zQ%IHE)U{B+&n^4n{m`UJs8TmC)2C$*n51 z?D6}it6BK_N{7N+JSxbkV|H=MHIO1b__uX=&<44I3F&hq z%rkUs$#n+c5)_1~fj-_xuSz1D*ei2)cU0+qbCCMz>kDfc+Pwu+)K`SX(He{2W(4Td zlL;-IbHDRGe5$Xj&HfkBB`3p#bS*FB41usi-!}`+7S$ZiVB?jRez|kW==5O*|G~1{ zKW$^b7YCg8MLTQP!LPe3#W(iVSq^ukdN+1C^;F^$cYS8^U{ zNgj%oxBZ07|6ZElUTIs(TeTSbr^^XLu04gqd%;e>Jdj1TZbCm^>NGI@Pei01^jfld;$<3;r#y?$SmVa7OW{(=8!6JQ+ z{bYP|aj{5_2~0G(O*=h*36$ZmH{ixQt{AIW)eN6TXw>`V=Cz5-lbKFBfJp++4g6&` z>DFqJV&;k_UiU))UfyI)uv+l5D4Y!l>e%?j_8uLy?CJ}nSBwvWj{)HCO6W4onPI@g+O;RPdB8wY5UTIq<5 z{&wwQwkaR-yH{8NM|V`($wk6OznJJpNqA)j7|!^((m{ml?8nj%x4;nrnvR|C z;aK`h{@~Wp%@8B$PPV-3s-mTeJ<-!KHxu?W^y`ZZNC;CY4a-{c6*?Bslsz)8yymxZgOG+*F=gf(< zISZrQb~LRiNIp#H(;j!z#`_?rK>^W@ONby^cMQtHGx0*j(wyx0E&}|Ns0)HZCjN4? zncg%K6uU#@)^iD#PC*PfmIJidIDbLzJom2l?Xrzyc1zkYyR|Q31kGH4w!)Wa=vb_I z?cEYe+w}KLOW}SWVxNN_0|cD0eWpn?6+exq{R`5X$Ns!s3f{mix2Jl6=P+RV{xvo$ zsxdzJt0P%}87;y0!$)B~@jkQq+cf^R+ySZJ=DHAd{`a)thRqjfQX#*L+ZG4%HO`7< z8jA`l%Q*NyNG>Qit9K9+f(=2$CF_A!U&6DmLnD6shSvDGW zQm%tTr3|v@f%WVrh;ovoxU;AV_|-}e4dR&IHGOLU_)h(}GE;f8D~aQkZ=(g` zfS71bZjt`tijQv>Avb5afv61yVqs#-3{}vF3a#P}Da`&m{&~HFU(XNJ5I>A!VznLa z*NIadvQ8ye6RSZ_!+uttKaJ9{pL!JS7eR}RrgG;2<{>AFM6wh-tdR@YvO8Rzd2V&L zhntk0EK!G>O2A3m4I*TjN@4cPZxr9eAeL3pw(w>FIwU24$J*zks+A|r3=NO-QjgtB zNsa3~9d(gr9)RlN;+5B2zR!0wAJdaH&<3Y<)u>hbP6 z34+Q$X(wZ;q2iR`D@j0LbPhS)cedTj)y(otGfw9CPhKes7oU%qHA1QDM!0ZJ?WUeY zZnf>MqFGhP;dwjvUO2Of`)z5SK;m84c6c!H2=XMr0#O%x)y@1oflrphX}Nad-99(1 z{j~Jz$TzotmbVGLlJs9NpEqh8X5I!_3F+>y*T)ri1E(5kd8F%dr3!(`FhtwCu=b5W zB3Wd@VwDb-q=+sx2o5I+tP{r5zcUs@WBOuf;gD~F*BXHFXbdEmXc-;wR03dT>Gx=! ztFn)FXUPz#=(5uz{rJ>m&Jrp1PEM*+z9K~QQ|Doypr|}lw9Lyz`27|AS|P0ZWlEo? zj^HOIWxlxeM7&<;=gY4M7rkpu)*YunXAH&QUup(2SGMK$JeoxV`snER-v@8s)T9Z^ z>#CViTerOn0<|fst@Td?yAEjvK}qK=Y~U}dzTX5i{4RU!S1@O6mT0R)#*WiPlL%7r zk%-2aymF+^#yvu4+wlFvoE~O1k5;G|IQ&+a&Z~0%H4nIyiF6pR>MHxl7kw6jg~?nd z@V*foG*tvP{gL{5q`A{&>?mkKo%G3tt0K%kR*_2$x{aQIZIA?0%5A5uR$n&nlbgi^ z^@}YQRz3n-c-D>*g&a+k6Sg+ALm)OEepcf5=069~@$dX{g%tZ@5)ud+ZTB}Wm=sVx zRvyBQwC-7xe-0t9IO;d3s7Wg5vopS|%^UW<`JS^t}IC?7M0An)*EzIG~ zkpdY7eQfql!=`S%p#%nY?kqczMn2hNl^zVVOp2X?aX>bIlmL-`IGX1G%a z>nXgm6-Dt+oJFIm>Q)gn5W@SWV?@Xg`Vb!v^lvMs>DQh>?;_nrbP*;8wC|>ayKBuvxhEn;m(%F->~1( z?jBK3U;TXfDcFLWd>cKNR|4h!`=dTcQQdEu4zAb6(<@t3MajmkY62fV@iBrUo&QYb z(EKz%sq_IYAIn1A-*!RQm0Y{^NvsfWrCz==tPn{K?HXKGtQ8x{DOl;aIx}sf)GatZ zPBoS76U)--9iOE%+9B!zQA|-I7*MC90c95$Z<1ncVhEX*v}gUoU4yOYwOSiDAy#U! z$Gpg(0Qa8rY;Y?Le&c#(rJ8|`%mp_cW#w{_P6i0~l(zzl^%=2;*r!L4k^yh5fP`AL zrTz_?4GePse(7Fk7k$RkIKU9u%4UA{GF z(-r`QvhEOyhv)ayQjp$>WyZZH!nC5OodrK3`=W9}p8yU4FoTI@B~8$4_+kT`h&`j+ z(*eu4O*AB^7M$HT1oky<4sfr5epI=cYA8fsh74g}m}L$9Q;f`(Ys0``RNOl)>M^I1 zH(EE4vxU*=#4st!Q?LQ=Wn6B+2Wasf#@BTz%Katj6i2dNwjVNI#CYz@Hecq%)7?x< zj~o^ZCwI6=H3Ai<8 z?Tnh${RjUIKNc@9O^NDnG?Jq${(6DBQr4Kjh+V@DXkePfuAJ@&*0geywfaADseQ>v znd!_V3QGHChs=Ek6=&+;97!f!1)0qO_{P~t>Ya^c={e&v1sbp%+l+-tIuWO(vGi>< zG}O#Y*v7O0nt#s45%#^sJ8IX2o6X2#+U`2_z}-$-g{b8jX(VSIL@@~li(6uYt5tl$ zbT+@in0f!0ofz#&zCVM3*a1E(_M4)nJP};7EL-EU%0}W*)A}DdH9x23D-iVxj4peq4Q z3UOO|$(HmCFPUt;XCtF4yKG%ZN0!rA$Jrvf-V7Q2UKe(9-tVX5nHeIf)0$y3_c{=X zwHJIV{B8yJIztQdd7WvY&UDk&7~jzx{QwU;hY-$a+%zxNUK+P}b+e9fZQ&B8MbIV} z#zx&J@|mPm!I#X=yGmg%rZ98*UWQ9OleR^FaNDFKUYwXx7^#wg)JINutje@c6q2YG zMYfX2_-9dB=*vD@osX>4$K)plGavGKFJ4UEg%b^bJ5c;a-B5Q6qmhY-o!YpYuej>0 zS>t4o7#36Lb1GnR<~(Y>TwU;>b%GblbAQ7{@F6R16~FEnb~KToIL1(Glk#qA@5^WQjCjA;>Ytl6Gov!q$Nz6(KZyNiBF z(|mtb+rn*%c2+ZQ`T2_I@S=ti5MuJ$AAmN9B%poXYE-sK$52IoUer_xpkF`Ru>R^L z`8x=1N}y!Y?PvC}39s%HMG{Bxis#VO39Y5L5`;ovV(KBq)?P@wreAu;D=kAZzf-O^ zyi6acxN@C#Ca`(F$QsGog5LE!t7|I(^XIWxlrkS0ZrL)|@~d3JhtxyJ`hZ|}Qb(ch zmWpJ~RfKn+Aoldiq>_V+k^GI=y~k~Q-j}!D4P_qdrL()am&UE$`Eet!I!bl@ z2V{QnqRmF%#*n9fMG(d3+b<)2CWhJVaFfhi_`*Y(fknthP9K4jFZkd9?FCbB2{r@z z4;V1SEUrR+;}Xn!s8ka6wxUOI=-N`s=VJE{44t~tOq}!Vbr~r;*qIGyvs+w>uuinN zRxCm9wQwosmGcx*J<;2JiJwbV;}}2&=%czj?uKjux+|68dc;+Xh=kZ zx{ejY=f+HzWzzf0yZNeiE+PGIZ!&O&ue?qzR+j%EQjM`Nue1H3LQy&Q>0J;JE2YLV zbiFCQhlilfnpv4SVzLxP>Xc>%otco9TnHW$xc@`QrbBLg|8NyKYnLuiB3lR4``UVQ zGSWr_m&z!0mdx8!eyab~hR9kT8u-Kj}4bJNgB^55|;N-T6gwg!yF=mA&?& zZHS({Iv`FK3?XGUq{hp832YTB4x&i*oiqL5O;srtg@$W_XQ6%tR0<5&xw|dqz@!{t z-9+@nb(2LdyOL7n|jXx%fF6*^yFNl2`^~&;H+_0|+zFIXChjxtJo2 zO>EDkj0K|-D`uw&hbg_MM)yk4U{X))lcEUDTy7AN9%P4?=VXVn; zf2H;7he_13>fwrZkQ@%N;#?uU3iPD6mcnb91T^ToBV%@<+#J#+4e$fgp|*q4VrSVl z%s(jZ37@8T`Ix8S;Tnyo8WqY>JOeNwOR-4H@7+U0#l8qgLCKgnLRU0{J-6bz9UGlRJ>h`G$ z0TWW&`srbzFmk(F^5{`rGbrn-b8fuI{iOyPljj2A zqg}C#?sd$u%hwQwlA+xEP@l7Q2?)}U2)Dh+hfc*D|KoGI7gleBy1h3)G`i~N7n9I|KRMVuNYQI*{uBipP{PsQn5ts_(NG7gl9g!!zGxB>O!oD`5|znnkUw>mY4f9P83_1K2+3Ow@|RP#rsiNB z903hhkd~8jmxV&XaJV#7UI7k=N`hgsP?(G??SxA~<&_oS$}mOn-v@+djezn{w$#=C z+ZJu52Js@1@X9hWfq{Y2fpXF~f~O1=fj}H-z+h4|gcLCdOG1*RuteeC3c6^bI{||y zVQ^URks{I!=TB0D&^-Ms1Yi6=vRLBZX`&@ehK$6^K&54mLi!CfHU0mgzP|sUi6l$( z|N8r{!bGbeJX*#QO~m;V+-ZgL5I!=6SJok*kt7_!3WxLgokepm90^DC!r{R>SKwfA zQ=~fvd$e)kPllD+ zRvxaUgpifj{ms?Ix%>N~v83Nz6pahhl84G`Y3tCq(0}C~HG?mnW?2_azyzRC`UIRW z_|Kq~G5_t0?0@_67Z>#}zWf~rt)x_q6t=RejnvErW>9V+3xJmC z`WZuvjAn72w+0gZ!c zA#ROc&m%S~RCo}xuD5jUEbXg(tZCM@w!T|#S$ju3+PKnZvOq!Te!k1i>ZlAY2d$hq zcr3hl)6*dTc>dY=Qd5hg9F-3ZJx12?th3 zY?KG;EA_?MEA`bUgvx84mEd_1K6WD6Zh&~3v&UiJT=<@uGaZ9%(IN9U?-o?uhZNz# z0#o|=;zl}_TF1jsmf+jyEQ<#bNr0KCAUYnr%4g{D(N{m#MffRnz-^cE<1DqGVEx5r zS9<&IEpl`xM442IxYkCk*}6`7oUa@Kl_Om(Wi)GrS2ItP;Ou5QroVSmsVXN0)hk8e z;lQ7wszq5KKkzMEul9)W#^WhAdM9n0$1xd~J`)gN+?&lyrT2u#TL&e_WNZu=06!YS z_X6e%y?CXFn(qe)=6ByvLZ1sdi9L_*4O%9s*q`)g@<+ngXLPynb=p>5ndD-SPd(4C`aTbdZ?bxKHELC zZeth7;3PqZD?s#@He`g7m$B$qvPY*AnR5l@#vg7e+&xsaNZJ7s<$W$OK|T@wSM zh`E>hGt7-jtmLJrt}Ivhf&`2+J~l%A7}}Xca7jJxI^wvclcjQLM5Eta<3kf9Toscy z2I56cmFzMI1s+2ser!B|B({ns8CaFV`-AdpPxNlkWi`M4xfYlJ>bcQa_Db9t&LAY; zx^2E~@4$Karl&<}9jvxNSjTQMt#zzn;Qqi*Jw&F8Na(c1_Jsc6N8&(xJElah#X~^m zO$FtV=RBR5){5SC5(*jhk?uKK7`fi`Y}eJ#ci%vh-fi6~JE0;=vP_jpjlbT?{#e-Q zg~+X2Dcc7K^U`4_pWG;HNCdX~rJUssvKg;+f3y~ob_om7(fWQVrk~|8c+5Oyh)!0u zH&@f%C3-|i_!B$Ex|tDNvP7;t@z^Uj(%<;2W8RZEAuh0EPbru^)k9_D$^x*({E+n& z{y0*heI0x$J9Uj|T}LA6SZHS^U1@BX{##YX50iv${&P>g_W{k;`KLa}>>L)9+be$H za1Hq$db|JP;I|C#s!D6abpfQ!SMEJxNrX5Po=~2~$zN$@d{C4ae%`0;u5lJIc<5zV zW0x;w_KUnGPtktlP2P#J6QNQr*8K9PVlhCrtEJW_VcAdqvfOn2!G(Z&x2T5n3f@d6yv9qGdpFIWgxra94$P&Yhsnc!#t)-Gv2pxFx>U@5&M# z7#U*2+|*`pSdAT(GQiPE$Ex`}N+I!wwb~zatxGDuvCL1$dV-cI>A&21r3eoG;Lk8> zhmAcpb*$KgS=PzD#t!=+rn>kYXx#YR)Dn+tD7G%>f%NHRvzUhtr}1(z(HiB$A-%vD z`5X-Jp!>%UspC}u?_WmmD;h%*I*Zz09eZ~A{G;;OSqJ&?c>WA=&gyqG%p)(6V*26E z{`k1QNoE~O9dKi0)Wme|c} zpD9V60svR6jT^^lPq@XY4fnzWFP@(qA|#AoRZ#%ui7nS&g(Xw!JO=DIRz0X4b&exr zkY`td`J1Q{ea9M&%2%T#Ta;&a<1sj6L)n2PV_y7NO8EsgholQRo&m^2^@skl2bJt` zu{-&e43fXh6JRAQ*3k{gK53WkKIN2vD)Z{THopDGy|Ji5&I%H;Ecs!{lt{IB9_h<_F@CJB{)}FVpTFvK zXP(=eD=e5uI3>NH`X-wAtvibZtmZ?rL z7wsuLRIVuCeEjQ}R}+ZAfvu;^h{(w;f2~*YCtDTpuuti0eA}tHeTR8%o~dzA^q5{z zUQNy_)>BQCr4&n zY9ifZI%XxIcTU~-B#>+|02RG{!zI=^*x31j0>MV-*^bTh_(BK8Ju&5MRoaw8+1sG1 zL%CEWY*}Ha7nicSa&3PfVrP_f!DVI}!S&!{Ym;aR{feM{vMO6NOZr%GWB(&Z`wMOR z#)*@43&=FFCXmN^kEWAz)MHgZ6DzNPf8RC_rbOG((u3cI+!P)?mdoPYwy+W=xS^mz zfWC?vOdizPc*paTy;7&k%4PvouNbGIDHnoj<91_&*-aZqO)}LOa&*pZeF>N7l>Pz< zd;rv0z9>AUFFFYW!822_#dpkxb^lmTJyFw~@j`t0>4*7~9p0D`MHX1=O>e$JdK(YU zaj~=9#M%X_gvkYeC*Lkko|dT;vWBG#k0&O6W2g6_Mv4}FWx^J#7cBEjg3w2YH@g)Q zuPcXBzOk0d9;`^u*e`sV2s~bPHkR-tDYRo6Xua4hTUwLG+tvh)QIX*oR|Y1Ov28Zk zylyfJyrpjDH=Jjhz5$=Jg(|PB@fV!q?btPZ{rS$TKfdo!+1YTi23~<47U94_5&pH} znfUigS(B@ik&Xh(E?Ua@PItu=bDG)ZUT{R;eznP5G{Em}%@vdRrM`+tN6I(JQMxzt zzG?+!S4Ta~BX5?vtMn^pahCg%YIEzN%1z!wZj%6cu}N6lF1c=c&0t!fJ{z?E+8|pX ztL03D#Wef7T$WgBgBg5GX1JT$UHCk!=iSaW`dgj`dWdyaEzWVS!D%kH>i&#|Y?8|9 z-4$lE_MykI*a<$47lk7Bjbdv}w_`*zdXZuGN3Iu`_YOWZs2xJ(qa;J)R&SUlR@|sR zt8oL;Vk6BgD)ama+gNdT3rq5$E=wTS_vPNL5v7O8(WRT)ia$MvhreFxtoojl@A>L* z?V3N9{Or`QzB8zrK~Wzy9(B6iNvvA2IDC!4FDT_F{|-W_zsO%Zd!zcZU$$SrY)QbT z+}KQlk=a`^_W*hzPZ#yMhjHq8PQ9i6db5c4WxBN_N7p?>>OOl+NcT)WrFk4NdiE{l z;%pD)D#!i39~nk@^PUQri!2Iu0oQ(*7KqFFs)#t$B7j`oGM}O2VyLY`9N-5vh@n;< zRNIc6&UJhY@?%IVdD-=xjGWJqn^0=jZBU)tv{v1U7ED&2v5=oi(iJ2&r=CAe0V;*$ zW$8S9fv(wveNqLlBQuhxlIr{{L<<*+21HMjNzwF5+p`Q`+5~JF9k>|vUCpaTL{(Py zw>le+8;vV|Ci0p)i8;A|+2>n*&Llb{e1az3q!#5`h2t?5>RN5A0%e*-$ySQrj$M&HIK~a9W)6d?W8J*D|_Nsk$ zGP@D92-<(_m%Dt`w&=aK1L=et-x-8!#A~nMjd>p5y_E~xqvBa(g-xz$rbrZzJy}@V zMDqqtV5Q@0Jnd^ZegdA!J_j+KUwf*Q89r!GpX^tCjM-_vCiKDr%LHG*Tq?b|4*FY1 zr|I5VzQbkN?NfI!QSV9w{6i7N+PZuZNn#B7s)KDhPO1TQJe zZL1UgBIOOdRP;I*>7?O<3ezgLDn5OQ67L#>r1#{bKe8hz0Pg XLyRvu{aX3a{{tgEGu={c*U0|?Dtn-9 literal 0 HcmV?d00001 diff --git a/image/manual-badge.svg b/image/manual-badge.svg new file mode 100644 index 0000000..54224bc --- /dev/null +++ b/image/manual-badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + manual + manual + @value@ + @value@ + + diff --git a/image/search.png b/image/search.png new file mode 100644 index 0000000000000000000000000000000000000000..f5d84b697dad0c856a822c2df0a0da46ee3e9be3 GIT binary patch literal 12704 zcmaKTWn9x?_ct&$YBY?JE+wS96+raD)ZuW1T?Qn3UDI*M)-R57?D8{(G_ySR4Gggm^{a$ULZ`#Vl zSlI`9mR!860V&>^<>UGzD;4vViC})Ksa(fDL<)3`tNaT<{#2fw6lCrH>lD%OOh1aR z{Ml3g&0cbLo?W29O1rl;uYT|AlgnY5Wtk1R4fA56Y@{{Pk0y=hB9{g+(RJ5@-qNKjvOa^8CutOT_;keeKu@ z_jbkrr}T`M16BPOI@rG9dBd#DW>VRJ{#&#a8mSRjo@tTgVYnW?I9&fK^9LShqHR~{ z$R8L1OsSy~UIrW)mz5GLf*fiZIk{GSRhg^GGSMTs5zUk{PaJsQ(w^F#!a7XW=3U4z z4AJNt+u{kXwD)tMoSOx<=h4l5%wHVe@dVNP&MLuWh1Nm$=FKKwST}t}sBfyOa%w{a zt*5?f$bHex6HV#uP?MDB799wW=oz*W;m{eUa$fY6N&MX(9$!b-Ay}kWEZ1M{-ZfZj ztfc=7_nOtZen*(ef%;30)NJ++p(aumNd_c-=ORnXHxYRM-9%7MW`)tAhQMZFkn_GZc{UxHU(d&vI}-CD{u{JKt_sfMQ2f+e~1PX}g) z=yU{p!`wmdNnG#vywP9q0H0o*oEwx2n(2G_J-osbVltnfT=GJ4pl|k=v()=_&RSY5 zR5mY`_i4<2oKA25su*5#9{k+=oTsJ)aB`bWEi5aGb`j9x9uQm2mGv-ua!l-*Jvw3* z1X?C5dRE~*EjdJM^sBnO`TZP9lzJ5Hh&U~3?Y^W>OGkIyXRgjLjt`qEOIMvw zycfYPd#0*UcinQ^hHp&Er~`K?PP!Q9A~D(l>taQ51Sf4Bs~ex6{sATF%hoJkF>h(E zE_ybPL1AYGC|*@LRw>52Dk(-e3ywR;nB9?*362NUnTeko2S-rqnX1Z5DDG|`si(nI zrsM^8EfpT&5bu|0HkTVsJmagd1P@u}avO(Ek;zcy^VBCsU9!U`GR!yY4wWC8emffV zYafJtq~HooGv@!Utu_nFlx!q^>QKY1*1BJ`&_mJVb8v@TUtd?)o~d?o zuYZ{K1mtW53*8t^9!?W%XEb^BK)VaL>P@Za7JeS@Zk$t5s&dY#hc=H!vsn5wx0su> zzFWJhGVJaifQ5i{F;t#&p+FKf2Rpk|Wi1VMwqlA;+f?!f->oRRnnMCfYTVwsxh=mk zGYfnK6b@wrD2gg0<5VQ~T1inT)E#5^^SYK7(cekWU4a%9U9N=7inEQtSKfgZKS0FE%iFV;^>)0OMy$LK|I|vXh zhzS`bUcxGt*WTX#XN1@~M{>JivVMc5%K8~u&7`NN=j1n&`t`(D?vw;ry2`WoLc6zD z`&~@73ej4wk^1A^P?oyR-I}Y?3d71vQpNV30bCc!{E!+#^UF`%n)d9;{`8N0K3}+! z{KO;7*YfdoKKVPv6jH=5&Gju4%!PtYg-Ut-o%~i*RCI+&>0W-c$-}Edj*9+{6TZ*3 z&VKu5rpiobW@cu%fZ%Qb<_G#l1ON2tQ_izw9>GUyXB16%C+5QRY;_%+vn)!Uo4Qle zm8Pa($%xU%2$)M~dQ8=}5BobMWi=lI!t2sLRoeho<@2EUsy$-ZUtK`F@_;fc=o_Vc zd|ME$zGmJZg*L?{Qgp?_@1B&jHTtPQ3D{o~ZU*`k+}}VQmWysauEfuUBkJ}JaD_0x z;g76ITZ75>bgT^0qs|Gl*|kZCet^Svwfbq2uSD1m@EB*(YxH(fr1b+rx*na|A2ht3 z(6-UF;Vtmsi=(;=XNXMVz|GB$jNf}^>p9W0Bd_nQ-ggGVcb8em><`TyD-)-f?Bmf^y4J)XZpWkt?yEJIHL;|^ zqGfuKDhYtv#8n|%1QRHJ;L~VC2RW)^T7L&lgr}rQ%eva#_&DINL&vu`Fd?8^On$5T z!#$Zpi?OGWF|$($sMo<*n?sZ%?@a zE$BdYA)$SKo4)u92}8@3c8QmMgRgZ%9H1>0KHNN1Gwh>rKZ=tE7VU8|mmX@p%rh}D zxhR~stA}GmDK_Qd7e^Zwao_eNV$Glc;j}d>YAPlw&e{(vL82c803mkJIEWzMrypc0 zfp&ETz5!5r#QPRjjS?dRgGPRN!-*Hw^n_eJVY7>oNwbwSa@7ltI;~WkRQyz8r^Zh- zL#+{KU>#98B1=z`!%)$zldOK6y{%m2Hiu@$R_2D>^XR}4%%31FTUe-d=>uXgf`jg9 z4D-^27{Vl${W5K3@Xfb{@V>t6(OAGEIq`)Fe}Z`9HT>G#2SbS1!0#RKEKf@m$i+fR%YM7?i7qaDm~gM-c1?+)uTau(h;h~V$@ z12S1=(pY?7?|3I}iuh;0F%;}Pr>BW|9ukd8i;az4tm&=(!O0vzSG4zHQg9yZ zoSr>sdsyb7_kdtohdY=DMaTrmBg_+6%FNEb0^#qArBPq9FwRe8u%4R2Kd+F^&K349 zX~6-uvg>k7M63fZ{^lEm4pY-(kQZ3TvGrPYlG?A5Z_*1HCouf5daZqluY{wIElxIU zSH^jJG<7a=QMF>l%yHSdQ`I*HZnB!{M?2$Ev_qK`1=*Dq5bslHgutrLBu!f z!c5OzwFFQjb7nZ)-aYwi0^ecQup3fom_0zu+SF-X2!mqubfL?P$t%0DL>M5GrSuBf zr_ON~s%6hXi2d046z zJ|L$SM7XmYfw9YY0}%FMpSUX8ZRP@>Jh!aTAHj@MzPzIgbts?R1>FKO%sG<7FX*h; zIIfrbJ<}XtQAl!TJGKSg;i{YnW2hPv?k;coB8@U!I)rQkw zl5ly$AeqKlo6qp!&#cez)wXXL$wqG%D*EWRq8_|MW`u3=^SUFiEN+5cUM9ZI;I_xD zrq50TvZU16Nqzf5Am}c%;ZIm_Q8F5ejENH2zP-x`ouSF0CphWJw)JP;0{>s?+{^tcB z4xW3<n?TI268$OEjv^(LV{gTY{{8e~Ct41a%03AJRl?|+|V8n3x zv<$)A1zwYER6%xBtf<0&(nRQj2mwzod-b6Yz3x4|LGWuZx5-@PQ zr0R1J=;^jEi6~)$d3-Vmh}VX2!EsIJJ=@9n)jHyMeHi|J zMe#NX$-*uoPSkv~MZZ#QQ*sDen^VVklQ(sef z7gvw+Yh=$Qj*nC4tIt-sNP$a}fKU#GW`F;0=Z^w7IuDw7Hi|X1G@a#yLL9ONu#3a= z$Q>oYXYpw-4Gfsa<3-|UdwExx)|x6lxU4NO5V`3hd&KIgJ-BlUr$pn4tNuK~dDS6i z8-1=8@P)Rpx2dfKI@jP=9TBNY6-)LY z<%0@q6{8Dry;g5WLn}?2n=-V5=xgECRGTy40r&8UNZ5ldi256EHr*- z?#R_gJ7jhvaFAiYH5)_v1M|~ssE92}zKw{G9YhO#FD27C+YwKw-OsFL7lgvlAp~Bb zQT@poizbi)Y+~Z!so;Bm^!hQiycXhK0)MqYNaZ>?w8_TPt({RBf0Y=ps((<)AJO_U zy0^0dH$B!ygqUHI7n%Vx32iW+Vzic@E(f_qSTJ{wW=n*Wh0llzD;WU@zD3E8umDT(y2YHDiA?5s=1JrKlS zmw7(@)(Mc+Qj0tM1Zmpj{A=pzR`rA}4P%e&b7=JUKBnV?+^BYn$#D7}P! z>S9RFSo=%j#TI76+ zJ7)F1agox(sZP(pbW}Bd%lIKN%ZrO_afYyT#I+$ci}k?=T$j%2X$ag#F@W2GMn0oz zU7@I@`n~H&mV{e4ig~5MI6zR*$hIS^sUVt~zu=f~DM#jgpOvS^#5>)2gliNncp_RA zi&^7P2G`F_KS~zjfmK?DloQcw>+9uzf3D{J7w$*Eh*zVIaetEi zjYtSnX3F(~T1nD+Z2i59OSf7+ft7wDdWC0KLggh(rS`(`+izuMXcE7oB%1@pgVuBN zxR|WDaEP`uVvG|iY#R!(akr}^NP8#y5x)Y?$v}OG}|Dh(8H7cXZ^2rVG4HyH`DUHqP_K#rTonNVM?Byrd+L2p-8-uU_4U zX5Cxmgt&ChOiKoMMl>1}lQT&=r$Dydm%sS-M3SmEpxMcS87P)D!RMwX0Rf*53e5VwKlA$<$2}XGi-f$2?+e*d+sYD!PpH*D!#og!>0Oqj zka&E>dG6A~o&3lmK7QQ1DgyX=5#@+{bPp+9AOMs^_m0-9PK(N$I^_hUkqz3hSUzkIhCj5JUuf)@|>pjFv1;l|5RXPf9N|a6KhKB!no&_dXQL^3|FOGQltKS-I zr5y0Ea|X`{ds24{sk9$Hxyh8u^FAD%uRQX-s|tX*fU3&p(ESki$x%+|$jFGlcxK!c zwArcqvA~iTY)5)9v ziv^!%KfMOCyd?%Ggwo-*8~2}o^Tav0riU*Ax`p!-+f ztCqDP-?<_fhGwrc+VFhs+vRb0bEZ?Da9uOU*-4Y{SZ`so$dS>X zvNbUJRtNtWjS4Cn(~9wm@lBYG9y9|L5$C-OAb9MEoIZI^#Uyi)*A!>mu%&rw1i9Zck3mV)@DU<12 zto>MgY-g#9G_AKEVIA{YSUSUhzI*^37xhfHf7`7pfF;{W$r{+EJ|h+5660Z37Tu=_ z0@1>sepfo7QZBdS^f&H!GsdwL_AK>jI*Kko+U@nj>D|?r{Y~?Ib#V5_tHev?1{FbJ z{DpJP(kr*REarIiloKqG&`RSgU}c+pEnCX$d9x-7fO!B*UI+ zv?i9An7BN|V^q&!MAA51@Oc2c;+V5OSBXL8O?MUSB@*DiB zIr2AsZ{#F<2fNs`JF9N&V&H}SBhJol#f3!LNU}vpO|IhvnOi0(?UtvsZJ~R-B zgJ)$syj-a`QxB1K1#nmCL!)y!TS$F^IC zBRUs&13r|;h{OHa{Px8r-m6-5^FFiZwT=?}YOK+Mw@?0M(-&2n#rTPM92<-I(9qHO zu(jN2B>+WW(VHv#uF>X9s{2#)Q64_T-~k1>tv<$#UuKRHPxfD^3EU_>KvI*jv7G3a zYTsz$U!?N5@y2dQwv(Xqf$ zb@D?Oa$vj9ekaUVt8@%!Pc()a%^d5mV@Lm^h4}N&I~|a_*~NiF??Sx+(w&#zCwzEdS9~wq@FnAWVSW1|1xUJ9 z7=`Z&8HneW!GfRN`>w~Qf3y5!X5Pc#FX21}NT$#&mi|$NdkK*qni@~>WEqOmKkOQM zx(!?Pi)gj~qNAXpox+CYKG=9fswY2~W1$R(R-Q1{9HZzC4B^M7M@>xj29h`})B&wy zv@dZXp%3@|Z#JmHn^ak7^MR01m!A12Qr0v-y-sesI)A4YPBTjR70Z?G2z^@`@=T-y zctbTUGRbRPvhYAD)-K#T!xd$DF4FOaQPrG>BABG}y&wyyVgj>#-wz}=I)$VDyOo?n z&qkOPQ1BRR{prNkr-4%?LbSb228ypW;#0w7Wu@nmp)gB{>y`b6lGQi-IsJT>p zd?27jncg5HVp!;NuKd5-j8=Yq`pVyQ<-pVm{7-b&svze?Fy~ z0SdiS+V2`IaMgA4B1W(UIMgUaxiFX1J3rQ&ODEFlIsP<{PV}AKLzbK>P(NtlF4KSD zry{anV?G1aasTlzMUE{&xy`yO36WLrvv2z|CRW@)s;~S3{f?QvIWhj_6COGz+UICR z^riDXx%2w>p!a{QKyDsNW7u~30D78ey+OWmG1 zahql0m=l7FDO%?Bs%<^XX9U0l&&>@q$Btr6(uYs9F!;P}FZkVU0$PVN67G|&P7scL zjly9;Y=mIl^8ZV;f~0prr6XAA$Mz4}85&OiSEkhpU*t6O%O(TbR0l|YIz0a~D5ejZ zi2M2+kCI~wtVs5lFdO3wxyyfS=ndgSI;`m{qnoW-biv6w_uk8VV2E5kJdnY?+qlF_ zNtL#O6>Wq|u%ZrLVg85|7yj-~td8?+3=mH+ND5J=FW3Y=^0!Vcxqf2;ceF)5moL5C zUg?RtW2j56J@~M(Z;NmTozrJo6O>$qR902(f!mzL#-8~1Ctey8Fc49L=_v0EfaYoKHUQVF@ArA&DYRL=8=<{MpV@8}pnr3P{;vE{+ zx63E#>FQ#{tNa4MBZXqVukO=J$7*5hjN6DRJnonjO8Lib6d0-M^+olw(I@m_#UIvx4-2wEH=(O_L#B6%z{m2_A}7YoH@t@*)~t`?)9C2v zN>`YNtC64&ho>H2D3LsFk9%%nQ+HNR4|0$ecE^;Y?->I4DpcLVE$YFN>Vlq_D*^#o z|9tuJuaGY&L_CH33jW!Nt=)3MY<%#qW|X3#0W;%@xpTeWz67#57#BvPkO=3Zqje4@ z?c`S|?=G{R@_s91SKHZX-qzw&J2&KRi$8&B7qJffD#(7*MMCXpBrYi#)Lv4u9%fF4 zo@p-8&gJ7cH)_dXpib;KZwwBdaCY|j947~PJ%j63*50BP3u;Ya_-C`8feR1TF=eusR?=)c)HW)h7v;Lndw1a~Z znfg!lK5TvR@)4J>>Ht@p2c=(mW#w++-@kvU2UC>CG$REa`im-e`gbG7hlYm8b5kw% zOr{C(&E;<*70B@98+3K$j{!UdG6@2^fa`^LR@sQ>9QO|w9CL;61bWIJ7cRbIt z8VI|w_1e($strnQ2G{^I@>F_B+o;iNdm2)@rYe_MM3+G8a~ARZ7+d09`iSt15&-w3 z5^MvK{m+iXyg;M6WEyHwzpf=R_D1vkV#YKJHlJ*KAL+27Qm6n{>*x;f3DmO%kRP#F zuo~VAc=CIeq|hI1Hj^N&us2W<#s|uIG{&SHvn|)n;b%n&U&49T^D?dd02M~j$%o(LaX!#3d9tJOP|8oji^l;B?+RO=Ba}V22b_bZuXk%~Z;=IlBR_ zAePIadw-{GSufs^L}jn(9xvF6`I$7uumFYH@_+A{{Y%*$%5#vxfvZ0Mnj|vHTJECQ zQln1oE(cfwZt2Wp8|?nYoxj_?f@u`?%^Z_A^)RpF(`DYT#}AK;bP#n*F>pXhWAk8^ zt)M#{MB0Y6!DHP$2InZfz4rTO!o9m@*TFTdt-h$slkGL&&%%p;x8AWgjh2K=7XwdB z&0}=e5vI$Wrp4x#m?C~)hzVEkU%SgF)>CTLJ^ihFkrH;$LAq?ZM*V0y(rg3cOSKUk zfUPPfOW)Znymv~oxi}*NU>V~?g0NcjW##>bb#*9@_ZiXMZo3YHH&v;N#B5n<2G(WItdU&dH=i`0=5^b);) zWC1Pxs>t`bQ=33Xhyt;>XTC>uAhs_h;P~smTXI2<|BX)?G>Q`iGV+&pn!fKx19$JU z-u%`_xEe9aP>HZ~!BWzvpb1AS0E}P6g>EQ}=sAsYVV9LXT-BbZM-%{oLdvC%lvvs@ z6-0TU9il9q=3*#bC-p4_RslLc?In<+qjPh7LbMwe2r#}Nb}I}3o4V>ze*S#KS0I_S z+$Zq7$N8`k{{eRD&&_wSA9iS1>*($ymK3bUcVanTi4g+mTME#m-HFReKz6K}yE=Yc z;@RMk?ldC!9KP!@U`+q%U=fikDGKvBy(QTD?KS@@OF~4hbOW-^ZZysiP7EqZOBiU)4~k2ZOG$44Vi4yvSbzH#9fj4ZWjIkVH9QwZy>8 zf}bw{n3|fZ<{X~S-tm=RQUbyMec#|9+vk4t#+3xbNvbvoe(c&OHrZF-?9n~sO5aq{ zW}F+7AoLp%SUCg;!C4>g0fgX~N7VRkF7F%;HreRi|M9H?P4aTIL`P95JY*MfK4!nN+l-dGOT+LirWWqu1|nJ#8S`Xfl_g1m$|A3(!udzK#!BGyN;g>q!Q9C@Cg1kP+6_0+t*Pb0B* zGO6~XKE_(4=cdpeC;1af?>HVDa=@wn;o3yt4?K!4j$w~n0dRG;@0N{)CoZn8doG&~ zX~Xj<9uq3t2ThDfEngpE3*I0&G?yWdU7PENCB0<{9eDriWNekoD{LlDNVg9s&?YjS zxL#h01}r=wh8h_d=!ZZcol$!8i-BY0x`8H<-S2omhRj7`hQ&O_+_f9bh5oTs3WQjDiT9z3CRk*I^!7jFB6g^Hn)&G z&joW~?T`@er<8km$SZ4K-;0C}_xsQeEle_)3yGZ}s>4$h$0B@hA$($UA?j-`z%#62 z()?5dBkPC5{q?+1*8SM0nuBoMwS*OwE+^8%GiscF)oq2QgqAK_sFvkm&E7i#TyrBM zqpt;D&|7D;l#JLTbvlw=sl#dHPl7m<^|3I1>x8DQ(E_&(+}WsAof!Q?7gQrZwq{)W znJmG1wDA{M0%bf~Sy?$F)+06@h+mb8Ywstk5Y~9eb2KKJ+sV$?!+^GVb9pa1B+idG zPqB+4i5nY@P0Ab!19ftB2nTqu#@P=ZLo}fN0P1(G!j*;+x zqJxJetputfNtVb}DX6d;kg|-SKCu%oLQim=$Qb}RbyQ_NrVpSYhp3^R0jzF>tMfmj zfqe@6WMTlC4rRCwk|f;QPy_VOvM&oG?z?b`$p_0gxY!o3V&{WAp_k+!K{7pzd~rrZ za>zNB!PWPF`Y53d@u3@_B!MvSmmw@w1JLjMd~99h6g!Fy5c2PWQtm4Cm?&8DI_P8Wc?={EC<|j{rrKcswfGg=0y7neDnOsug<+#C z+<)WVFXygcu>gL|Tu!T@ZO%K0O#eH3E%lgh9Lh40}t?f*`y9eOD&)}tArkf({2#qw-# zkyqHo&P7{WTT=B8gfQQc8K=*M?&0eerZ8%uQVl6F_)CUA7q$pX5ai)&X>NZ0?G1_! zr73$Xy}@u`#yXX8ERl5+?r_%z%hUNFh&dFxqF0*>a#&hv$N;n z@-nMDEW~-)&UFH!mePQKjfA*kS4EYio;f-}dEZV;8DdlBw9=@qQecD%!pTuTOSFcIc&hy{iZ!&NJ1j z!^-~vu(r0AEK+VtymG~;m9p`^+S`$@_qm$s9re6q%0W9el!+Vgk`@&Db#%+LSA9J+ Vu(5TF{pSVFvnSfBRgWw~{|7^yU3&lk literal 0 HcmV?d00001 diff --git a/index.html b/index.html index b9e5d0b..f951315 100644 --- a/index.html +++ b/index.html @@ -1,8 +1,57 @@ -index

    js-random

    -

    Randomness code bricks for JavaScript.

    + + + + + + aureooms/js-random API Document + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +

    @aureooms/js-random

    +

    +

    Randomness algorithms for JavaScript. +See docs. +Parent is @aureooms/js-algorithms.

    NPM license NPM version -Bower version Build Status Coverage Status Dependencies Status @@ -10,29 +59,20 @@ Code Climate NPM downloads per month GitHub issues -Inline docs

    -

    Can be managed through duo, -component, -bower, or -npm.

    -
    let random = require( "aureooms-js-random" ) ;
    -

    Example usage:

    -
    random.randfloat( 0 , 1 ) ; // 0.19876947347074747
    -random.randfloat( 0 , 1 ) ; // 0.23755912738852203
    -
    -random.randint( 0 , 100 ) ; // 57
    -random.randint( 0 , 100 ) ; // 31
    -
    -let a = [ 0 , 1 , 2 , 3 ] ;
    -
    -random.sample( 1 , a , 0 , 4 ) ;
    -a ; // [ 0 , 1 , 2 , 3 ]
    -
    -random.sample( 1 , a , 0 , 4 ) ;
    -a ; // [ 1 , 0 , 2 , 3 ]
    +Documentation

    +
    +
    -random.shuffle( a , 0 , 4 ) ; -a ; // [ 1 , 3 , 0 , 2 ] + -random.shuffle( a , 0 , 4 ) ; -a ; // [ 3 , 2 , 1 , 0 ]
    \ No newline at end of file + + + + + + + + + diff --git a/manual-badge.svg b/manual-badge.svg new file mode 100644 index 0000000..08cb0c8 --- /dev/null +++ b/manual-badge.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + manual + manual + 40% + 40% + + diff --git a/manual/example/example.html b/manual/example/example.html new file mode 100644 index 0000000..ca855cd --- /dev/null +++ b/manual/example/example.html @@ -0,0 +1,113 @@ + + + + + + Example + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +
    +
    + Manual + » + Example +
    +
    import { randint , randfloat , sample , shuffle } from 'aureooms-js-random' ;
    +
    +randfloat( 0 , 1 ) ; // 0.19876947347074747
    +randfloat( 0 , 1 ) ; // 0.23755912738852203
    +
    +randint( 0 , 100 ) ; // 57
    +randint( 0 , 100 ) ; // 31
    +
    +let a = [ 0 , 1 , 2 , 3 ] ;
    +
    +sample( 1 , a , 0 , 4 ) ;
    +a ; // [ 0 , 1 , 2 , 3 ]
    +
    +sample( 1 , a , 0 , 4 ) ;
    +a ; // [ 1 , 0 , 2 , 3 ]
    +
    +shuffle( a , 0 , 4 ) ;
    +a ; // [ 1 , 3 , 0 , 2 ]
    +
    +shuffle( a , 0 , 4 ) ;
    +a ; // [ 3 , 2 , 1 , 0 ]
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/manual/index.html b/manual/index.html new file mode 100644 index 0000000..eb0ae4e --- /dev/null +++ b/manual/index.html @@ -0,0 +1,320 @@ + + + + + + Manual + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +
    + + +

    + +
    + +
    +

    References

    +
    +

    References

    + + +

    Function Summary

    + + + + + + + + + + + + + + + + + + + +
    Static Public Function Summary
    + public + + + + + +
    +

    + + + randfloat(i: *, j: *): * +

    +
    +
    + + +

    Returns a floating point number in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randint(i: *, j: *): * +

    +
    +
    + + +

    Returns an integer in interval [i, j[ (i included, j excluded) +according to a uniform distribution.

    +
    +
    +
    + + +
    + public + + + + + +
    +

    + + + randrange(start: *, stop: *, step: *): * +

    +
    +
    + + +

    Return a randomly selected element from range(start, stop, step).

    +
    +
    +
    + + +
    + + + + + + + + + + + + + + + +
    Static Private Function Summary
    + private + + + + + +
    +

    + + + _fisheryates(randint: *): * +

    +
    +
    + + +

    Sample array using Fisher-Yates method.

    +
    +
    +
    + + +
    + private + + + + + +
    +

    + + + _shuffle(sample: *): * +

    +
    +
    + + +

    Shuffle array by sampling the complete array.

    +
    +
    +
    + + +
    +
    +

    Variable Summary

    + + + + + + + + + + + + + + +
    Static Public Variable Summary
    + public + + + + + +
    +

    + + + sample: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + + + shuffle: * +

    +
    +
    + + + +
    +
    + + +
    +
    + + +
    + +
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/manual/installation/installation.html b/manual/installation/installation.html new file mode 100644 index 0000000..d4a36e1 --- /dev/null +++ b/manual/installation/installation.html @@ -0,0 +1,100 @@ + + + + + + Installation + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +
    +
    + Manual + » + Installation +
    +

    Can be managed using +jspm +or npm.

    +

    jspm

    +
    jspm install npm:aureooms-js-random
    +
    +

    npm

    +
    npm install aureooms-js-random --save
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/manual/overview/overview.html b/manual/overview/overview.html new file mode 100644 index 0000000..05ba367 --- /dev/null +++ b/manual/overview/overview.html @@ -0,0 +1,91 @@ + + + + + + Overview + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +
    +
    + Manual + » + Overview +
    + +
    +
    + + + + + + + + + + + + diff --git a/manual/usage/usage.html b/manual/usage/usage.html new file mode 100644 index 0000000..004a6dd --- /dev/null +++ b/manual/usage/usage.html @@ -0,0 +1,102 @@ + + + + + + Usage + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +
    +
    + Manual + » + Usage +
    +

    The code needs a ES2015+ polyfill to work, for example +babel-polyfill.

    +
    require( 'babel-polyfill' ) ;
    +// or
    +import 'babel-polyfill' ;
    +
    +

    Then

    +
    const random = require( 'aureooms-js-random' ) ;
    +// or
    +import * as random from 'aureooms-js-random' ;
    +
    +
    +
    +
    + + + + + + + + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..5810079 --- /dev/null +++ b/package.json @@ -0,0 +1,65 @@ +{ + "name": "aureooms-js-random", + "description": "Randomness algorithms for JavaScript", + "version": "2.0.0", + "author": "Aurélien Ooms ", + "ava": { + "require": [ + "babel-polyfill", + "babel-register" + ] + }, + "babel": { + "presets": [ + "env" + ], + "env": { + "development": { + "sourceMaps": "inline" + } + } + }, + "bugs": { + "url": "https://github.com/aureooms/js-random/issues" + }, + "dependencies": {}, + "devDependencies": { + "aureooms-js-array": "^4.0.0", + "aureooms-js-functools": "^2.0.3", + "aureooms-js-itertools": "^3.1.1", + "aureooms-js-mem": "^1.0.2", + "aureooms-js-operator": "^1.0.2", + "aureooms-js-type": "^1.0.4", + "ava": "^0.17.0", + "babel-cli": "^6.22.2", + "babel-polyfill": "^6.22.0", + "babel-preset-env": "^1.1.8", + "codeclimate-test-reporter": "^0.4.0", + "coveralls": "^2.11.15", + "esdoc": "^0.5.2", + "nyc": "^10.1.2" + }, + "homepage": "http://aureooms.github.io/js-random/", + "keywords": [ + "javascript", + "js", + "randfloat", + "randint", + "random", + "randomness", + "sample", + "shuffle" + ], + "license": "AGPL-3.0", + "main": "lib/index.js", + "repository": { + "url": "https://github.com/aureooms/js-random.git", + "type": "git" + }, + "scripts": { + "build": "babel src -d lib", + "cover": "nyc --reporter=lcov npm test", + "prepublish": "npm run build", + "test": "ava ./test/src --concurrency 8" + } +} diff --git a/script/inherited-summary.js b/script/inherited-summary.js new file mode 100644 index 0000000..0a35b6d --- /dev/null +++ b/script/inherited-summary.js @@ -0,0 +1,28 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TABLE' && parent.classList.contains('summary')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var tbody = parent.querySelector('tbody'); + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + tbody.style.display = 'none'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + tbody.style.display = 'block'; + } + } + + var buttons = document.querySelectorAll('.inherited-summary thead .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } +})(); diff --git a/script/inner-link.js b/script/inner-link.js new file mode 100644 index 0000000..69a7477 --- /dev/null +++ b/script/inner-link.js @@ -0,0 +1,31 @@ +// inner link(#foo) can not correctly scroll, because page has fixed header, +// so, I manually scroll. +(function(){ + var matched = location.hash.match(/errorLines=([\d,]+)/); + if (matched) return; + + function adjust() { + window.scrollBy(0, -55); + var el = document.querySelector('.inner-link-active'); + if (el) el.classList.remove('inner-link-active'); + + // ``[ ] . ' " @`` are not valid in DOM id. so must escape these. + var id = location.hash.replace(/([\[\].'"@$])/g, '\\$1'); + var el = document.querySelector(id); + if (el) el.classList.add('inner-link-active'); + } + + window.addEventListener('hashchange', adjust); + + if (location.hash) { + setTimeout(adjust, 0); + } +})(); + +(function(){ + var els = document.querySelectorAll('[href^="#"]'); + for (var i = 0; i < els.length; i++) { + var el = els[i]; + el.href = location.href + el.getAttribute('href'); // because el.href is absolute path + } +})(); diff --git a/script/manual.js b/script/manual.js new file mode 100644 index 0000000..4c2b169 --- /dev/null +++ b/script/manual.js @@ -0,0 +1,11 @@ +(function(){ + var matched = location.pathname.match(/\/(manual\/.*?\/.*\.html)$/); + if (!matched) return; + + var currentName = matched[1]; + var cssClass = '.navigation .manual-toc li[data-link="' + currentName + '"]'; + var styleText = cssClass + '{ display: block; }\n'; + var style = document.createElement('style'); + style.textContent = styleText; + document.querySelector('head').appendChild(style); +})(); diff --git a/script/patch-for-local.js b/script/patch-for-local.js new file mode 100644 index 0000000..5756d13 --- /dev/null +++ b/script/patch-for-local.js @@ -0,0 +1,8 @@ +(function(){ + if (location.protocol === 'file:') { + var elms = document.querySelectorAll('a[href="./"]'); + for (var i = 0; i < elms.length; i++) { + elms[i].href = './index.html'; + } + } +})(); diff --git a/script/prettify/Apache-License-2.0.txt b/script/prettify/Apache-License-2.0.txt new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/script/prettify/Apache-License-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/script/prettify/prettify.js b/script/prettify/prettify.js new file mode 100644 index 0000000..eef5ad7 --- /dev/null +++ b/script/prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p' + pair[2] + ''); + } + } + + var innerHTML = ''; + for (kind in html) { + var list = html[kind]; + if (!list.length) continue; + innerHTML += '
  • ' + kind + '
  • \n' + list.join('\n'); + } + result.innerHTML = innerHTML; + if (innerHTML) result.style.display = 'block'; + selectedIndex = -1; + }); + + // down, up and enter key are pressed, select search result. + input.addEventListener('keydown', function(ev){ + if (ev.keyCode === 40) { + // arrow down + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex + 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex + 2]; + selectedIndex++; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex++; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 38) { + // arrow up + var current = result.children[selectedIndex]; + var selected = result.children[selectedIndex - 1]; + if (selected && selected.classList.contains('search-separator')) { + var selected = result.children[selectedIndex - 2]; + selectedIndex--; + } + + if (selected) { + if (current) current.classList.remove('selected'); + selectedIndex--; + selected.classList.add('selected'); + } + } else if (ev.keyCode === 13) { + // enter + var current = result.children[selectedIndex]; + if (current) { + var link = current.querySelector('a'); + if (link) location.href = link.href; + } + } else { + return; + } + + ev.preventDefault(); + }); + + // select search result when search result is mouse over. + result.addEventListener('mousemove', function(ev){ + var current = result.children[selectedIndex]; + if (current) current.classList.remove('selected'); + + var li = ev.target; + while (li) { + if (li.nodeName === 'LI') break; + li = li.parentElement; + } + + if (li) { + selectedIndex = Array.prototype.indexOf.call(result.children, li); + li.classList.add('selected'); + } + }); + + // clear search result when body is clicked. + document.body.addEventListener('click', function(ev){ + selectedIndex = -1; + result.style.display = 'none'; + result.innerHTML = ''; + }); + +})(); diff --git a/script/search_index.js b/script/search_index.js new file mode 100644 index 0000000..73a4936 --- /dev/null +++ b/script/search_index.js @@ -0,0 +1,434 @@ +window.esdocSearchIndex = [ + [ + "aureooms-js-random/src/kernel/_fisheryates.js~_fisheryates", + "function/index.html#static-function-_fisheryates", + "_fisheryates aureooms-js-random/src/kernel/_fisheryates.js", + "function" + ], + [ + "aureooms-js-random/src/kernel/_shuffle.js~_shuffle", + "function/index.html#static-function-_shuffle", + "_shuffle aureooms-js-random/src/kernel/_shuffle.js", + "function" + ], + [ + "aureooms-js-random/src/api/randfloat.js~randfloat", + "function/index.html#static-function-randfloat", + "randfloat aureooms-js-random/src/api/randfloat.js", + "function" + ], + [ + "aureooms-js-random/src/api/randint.js~randint", + "function/index.html#static-function-randint", + "randint aureooms-js-random/src/api/randint.js", + "function" + ], + [ + "aureooms-js-random/src/api/randrange.js~randrange", + "function/index.html#static-function-randrange", + "randrange aureooms-js-random/src/api/randrange.js", + "function" + ], + [ + "aureooms-js-random/src/api/sample.js~sample", + "variable/index.html#static-variable-sample", + "sample aureooms-js-random/src/api/sample.js", + "variable" + ], + [ + "aureooms-js-random/src/api/shuffle.js~shuffle", + "variable/index.html#static-variable-shuffle", + "shuffle aureooms-js-random/src/api/shuffle.js", + "variable" + ], + [ + "builtinexternal/ecmascriptexternal.js~array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", + "BuiltinExternal/ECMAScriptExternal.js~Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~arraybuffer", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer", + "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "BuiltinExternal/ECMAScriptExternal.js~Boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~dataview", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView", + "BuiltinExternal/ECMAScriptExternal.js~DataView", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~date", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date", + "BuiltinExternal/ECMAScriptExternal.js~Date", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~error", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error", + "BuiltinExternal/ECMAScriptExternal.js~Error", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~evalerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError", + "BuiltinExternal/ECMAScriptExternal.js~EvalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float32array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array", + "BuiltinExternal/ECMAScriptExternal.js~Float32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~float64array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array", + "BuiltinExternal/ECMAScriptExternal.js~Float64Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "BuiltinExternal/ECMAScriptExternal.js~Function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generator", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator", + "BuiltinExternal/ECMAScriptExternal.js~Generator", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~generatorfunction", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction", + "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~infinity", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity", + "BuiltinExternal/ECMAScriptExternal.js~Infinity", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int16array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array", + "BuiltinExternal/ECMAScriptExternal.js~Int16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int32array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array", + "BuiltinExternal/ECMAScriptExternal.js~Int32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~int8array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array", + "BuiltinExternal/ECMAScriptExternal.js~Int8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~internalerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError", + "BuiltinExternal/ECMAScriptExternal.js~InternalError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~json", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON", + "BuiltinExternal/ECMAScriptExternal.js~JSON", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~map", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", + "BuiltinExternal/ECMAScriptExternal.js~Map", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~nan", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN", + "BuiltinExternal/ECMAScriptExternal.js~NaN", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "BuiltinExternal/ECMAScriptExternal.js~Number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "BuiltinExternal/ECMAScriptExternal.js~Object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~promise", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", + "BuiltinExternal/ECMAScriptExternal.js~Promise", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~proxy", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy", + "BuiltinExternal/ECMAScriptExternal.js~Proxy", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~rangeerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError", + "BuiltinExternal/ECMAScriptExternal.js~RangeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~referenceerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError", + "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~reflect", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect", + "BuiltinExternal/ECMAScriptExternal.js~Reflect", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~regexp", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", + "BuiltinExternal/ECMAScriptExternal.js~RegExp", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~set", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set", + "BuiltinExternal/ECMAScriptExternal.js~Set", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "BuiltinExternal/ECMAScriptExternal.js~String", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~symbol", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol", + "BuiltinExternal/ECMAScriptExternal.js~Symbol", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~syntaxerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError", + "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~typeerror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError", + "BuiltinExternal/ECMAScriptExternal.js~TypeError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~urierror", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError", + "BuiltinExternal/ECMAScriptExternal.js~URIError", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint16array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array", + "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint32array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array", + "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8array", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array", + "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~uint8clampedarray", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray", + "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakmap", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap", + "BuiltinExternal/ECMAScriptExternal.js~WeakMap", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~weakset", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet", + "BuiltinExternal/ECMAScriptExternal.js~WeakSet", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~boolean", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", + "BuiltinExternal/ECMAScriptExternal.js~boolean", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~function", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", + "BuiltinExternal/ECMAScriptExternal.js~function", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~null", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null", + "BuiltinExternal/ECMAScriptExternal.js~null", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~number", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", + "BuiltinExternal/ECMAScriptExternal.js~number", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~object", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", + "BuiltinExternal/ECMAScriptExternal.js~object", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~string", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", + "BuiltinExternal/ECMAScriptExternal.js~string", + "external" + ], + [ + "builtinexternal/ecmascriptexternal.js~undefined", + "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", + "BuiltinExternal/ECMAScriptExternal.js~undefined", + "external" + ], + [ + "builtinexternal/webapiexternal.js~audiocontext", + "https://developer.mozilla.org/en/docs/Web/API/AudioContext", + "BuiltinExternal/WebAPIExternal.js~AudioContext", + "external" + ], + [ + "builtinexternal/webapiexternal.js~canvasrenderingcontext2d", + "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D", + "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", + "external" + ], + [ + "builtinexternal/webapiexternal.js~documentfragment", + "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment", + "BuiltinExternal/WebAPIExternal.js~DocumentFragment", + "external" + ], + [ + "builtinexternal/webapiexternal.js~element", + "https://developer.mozilla.org/en-US/docs/Web/API/Element", + "BuiltinExternal/WebAPIExternal.js~Element", + "external" + ], + [ + "builtinexternal/webapiexternal.js~event", + "https://developer.mozilla.org/en-US/docs/Web/API/Event", + "BuiltinExternal/WebAPIExternal.js~Event", + "external" + ], + [ + "builtinexternal/webapiexternal.js~node", + "https://developer.mozilla.org/en-US/docs/Web/API/Node", + "BuiltinExternal/WebAPIExternal.js~Node", + "external" + ], + [ + "builtinexternal/webapiexternal.js~nodelist", + "https://developer.mozilla.org/en-US/docs/Web/API/NodeList", + "BuiltinExternal/WebAPIExternal.js~NodeList", + "external" + ], + [ + "builtinexternal/webapiexternal.js~xmlhttprequest", + "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest", + "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", + "external" + ], + [ + "src/api/index.js", + "file/src/api/index.js.html", + "src/api/index.js", + "file" + ], + [ + "src/api/randfloat.js", + "file/src/api/randfloat.js.html", + "src/api/randfloat.js", + "file" + ], + [ + "src/api/randint.js", + "file/src/api/randint.js.html", + "src/api/randint.js", + "file" + ], + [ + "src/api/randrange.js", + "file/src/api/randrange.js.html", + "src/api/randrange.js", + "file" + ], + [ + "src/api/sample.js", + "file/src/api/sample.js.html", + "src/api/sample.js", + "file" + ], + [ + "src/api/shuffle.js", + "file/src/api/shuffle.js.html", + "src/api/shuffle.js", + "file" + ], + [ + "src/index.js", + "file/src/index.js.html", + "src/index.js", + "file" + ], + [ + "src/kernel/_fisheryates.js", + "file/src/kernel/_fisheryates.js.html", + "src/kernel/_fisheryates.js", + "file" + ], + [ + "src/kernel/_shuffle.js", + "file/src/kernel/_shuffle.js.html", + "src/kernel/_shuffle.js", + "file" + ], + [ + "src/kernel/index.js", + "file/src/kernel/index.js.html", + "src/kernel/index.js", + "file" + ] +] \ No newline at end of file diff --git a/script/test-summary.js b/script/test-summary.js new file mode 100644 index 0000000..2f32cb0 --- /dev/null +++ b/script/test-summary.js @@ -0,0 +1,54 @@ +(function(){ + function toggle(ev) { + var button = ev.target; + var parent = ev.target.parentElement; + while(parent) { + if (parent.tagName === 'TR' && parent.classList.contains('test-describe')) break; + parent = parent.parentElement; + } + + if (!parent) return; + + var direction; + if (button.classList.contains('opened')) { + button.classList.remove('opened'); + button.classList.add('closed'); + direction = 'closed'; + } else { + button.classList.remove('closed'); + button.classList.add('opened'); + direction = 'opened'; + } + + var targetDepth = parseInt(parent.dataset.testDepth, 10) + 1; + var nextElement = parent.nextElementSibling; + while (nextElement) { + var depth = parseInt(nextElement.dataset.testDepth, 10); + if (depth >= targetDepth) { + if (direction === 'opened') { + if (depth === targetDepth) nextElement.style.display = ''; + } else if (direction === 'closed') { + nextElement.style.display = 'none'; + var innerButton = nextElement.querySelector('.toggle'); + if (innerButton && innerButton.classList.contains('opened')) { + innerButton.classList.remove('opened'); + innerButton.classList.add('closed'); + } + } + } else { + break; + } + nextElement = nextElement.nextElementSibling; + } + } + + var buttons = document.querySelectorAll('.test-summary tr.test-describe .toggle'); + for (var i = 0; i < buttons.length; i++) { + buttons[i].addEventListener('click', toggle); + } + + var topDescribes = document.querySelectorAll('.test-summary tr[data-test-depth="0"]'); + for (var i = 0; i < topDescribes.length; i++) { + topDescribes[i].style.display = ''; + } +})(); diff --git a/source.html b/source.html new file mode 100644 index 0000000..e17f8d2 --- /dev/null +++ b/source.html @@ -0,0 +1,159 @@ + + + + + + Source | aureooms/js-random API Document + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +

    Source 5/7

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FileIdentifierDocumentSizeLinesUpdated
    src/api/index.js--143 byte52017-01-05 00:12:38 (UTC)
    src/api/randfloat.jsrandfloat100 %1/1211 byte102017-01-05 00:12:38 (UTC)
    src/api/randint.jsrandint100 %1/1210 byte102017-01-05 00:12:38 (UTC)
    src/api/randrange.jsrandrange100 %1/1497 byte222017-01-05 00:12:38 (UTC)
    src/api/sample.jssample0 %0/1130 byte42017-01-05 00:12:38 (UTC)
    src/api/shuffle.jsshuffle0 %0/1120 byte42017-01-05 00:12:38 (UTC)
    src/index.js--51 byte22017-01-05 00:12:38 (UTC)
    src/kernel/_fisheryates.js_fisheryates100 %1/1475 byte342017-01-05 00:12:38 (UTC)
    src/kernel/_shuffle.js_shuffle100 %1/1200 byte152017-01-05 00:12:38 (UTC)
    src/kernel/index.js--62 byte22017-01-05 00:12:38 (UTC)
    +
    + + + + + + + + + + + + diff --git a/user/css/0-style.css b/user/css/0-style.css new file mode 100644 index 0000000..ed56934 --- /dev/null +++ b/user/css/0-style.css @@ -0,0 +1,52 @@ +h1, +h2, +.navigation, +.layout-container > header, +footer +{ + border: none; +} + +.project-name { + color: #FC913A; + font-weight: bold; +} + +.layout-container > header > a.repo-url-github { + font-size: inherit; + display: inline; + background: none; + vertical-align: inherit; +} + +.search-box img { + display: none; +} + +.search-box::before{ + content: "search"; +} + +.search-input-edge { + height: 0px; +} + +.search-result { + width: 300px; + margin-left: 42px; + box-shadow: 1px 1px 13px rgba(0,0,0,0.2); +} + +.search-input { + visibility: visible; +} + +.search-result li.search-separator { + text-transform: capitalize; + background-color: #ccc; +} + +span[data-ice="signature"] > span { + /*font-weight: bold;*/ + font-style: italic; +} diff --git a/user/script/0-header.js b/user/script/0-header.js new file mode 100644 index 0000000..ef881ba --- /dev/null +++ b/user/script/0-header.js @@ -0,0 +1,34 @@ +var domReady = function(callback) { + var state = document.readyState ; + if ( state === 'interactive' || state === 'complete' ) { + callback() ; + } + else { + document.addEventListener('DOMContentLoaded', callback); + } +} ; + + +domReady(function(){ + + var projectname = document.createElement('a'); + projectname.classList.add('project-name'); + projectname.text = 'aureooms/js-random'; + projectname.href = './index.html' ; + + var header = document.getElementsByTagName('header')[0] ; + header.insertBefore(projectname,header.firstChild); + + var testlink = document.querySelector('header > a[data-ice="testLink"]') ; + testlink.href = 'https://coveralls.io/github/aureooms/js-random' ; + testlink.target = '_BLANK' ; + + var searchBox = document.querySelector('.search-box'); + var input = document.querySelector('.search-input'); + + // active search box when focus on searchBox. + input.addEventListener('focus', function(){ + searchBox.classList.add('active'); + }); + +}); diff --git a/variable/index.html b/variable/index.html new file mode 100644 index 0000000..c0d0ef1 --- /dev/null +++ b/variable/index.html @@ -0,0 +1,213 @@ + + + + + + Variable | aureooms/js-random API Document + + + + + + + + + + + +
    + Home + Manual + Reference + Source + Test + Repository + +
    + + + +

    Variable

    +
    + + + + + + + + + + + + + + +
    Static Public Summary
    + public + + + + + +
    +

    + + + sample: * +

    +
    +
    + + + +
    +
    + + +
    + public + + + + + +
    +

    + + + shuffle: * +

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

    Static Public

    + +
    +

    + public + + + + + + sample: * + + + + source + +

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

    + public + + + + + + shuffle: * + + + + source + +

    + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + + + From 789f2236cf1b6da9b774c6abc6ac64d765445dee Mon Sep 17 00:00:00 2001 From: aureooms Date: Tue, 6 Apr 2021 13:59:29 +0000 Subject: [PATCH 08/15] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20au?= =?UTF-8?q?reooms/js-random@fa49309bd5664dd28064bb57e5165abc55906bbb=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 31 - ast/source/.external-ecmascript.js.json | 2802 ++++++++++++++++ ast/source/api/index.js.json | 908 ------ ast/source/api/randfloat.js.json | 1097 ++++--- ast/source/api/randint.js.json | 1286 +++++--- ast/source/api/randrange.js.json | 3994 +++++++++++++++-------- ast/source/api/sample.js.json | 681 ++-- ast/source/api/shuffle.js.json | 685 ++-- ast/source/index.js.json | 2100 +++++++++++- ast/source/kernel/_fisheryates.js.json | 3705 +++++++++++++-------- ast/source/kernel/_shuffle.js.json | 1602 ++++----- ast/source/kernel/index.js.json | 401 --- coverage.json | 20 +- css/github.css | 83 + css/identifiers.css | 37 + css/manual.css | 134 + css/search.css | 84 + css/source.css | 55 + css/style.css | 530 +-- css/test.css | 58 + dump.json | 995 ------ file/src/api/index.js.html | 70 - file/src/api/randfloat.js.html | 28 +- file/src/api/randint.js.html | 28 +- file/src/api/randrange.js.html | 39 +- file/src/api/sample.js.html | 26 +- file/src/api/shuffle.js.html | 26 +- file/src/index.js.html | 28 +- file/src/kernel/_fisheryates.js.html | 58 +- file/src/kernel/_shuffle.js.html | 34 +- file/src/kernel/index.js.html | 67 - function/index.html | 156 +- identifiers.html | 94 +- image/manual-badge.svg | 12 +- index.html | 59 +- index.json | 903 +++++ {user => inject}/css/0-style.css | 0 inject/script/0-header.js | 30 + lint.json | 1 + manual-badge.svg | 17 - manual/{example => }/example.html | 54 +- manual/index.html | 311 +- manual/installation.html | 82 + manual/installation/installation.html | 100 - manual/overview.html | 75 + manual/overview/overview.html | 91 - manual/usage.html | 86 + manual/usage/usage.html | 102 - package.json | 65 - script/inner-link.js | 3 +- script/manual.js | 3 +- script/prettify/prettify.js | 74 +- script/search_index.js | 276 +- script/test-summary.js | 4 +- source.html | 83 +- user/script/0-header.js | 34 - variable/index.html | 33 +- 57 files changed, 15119 insertions(+), 9321 deletions(-) delete mode 100644 .gitignore create mode 100644 ast/source/.external-ecmascript.js.json delete mode 100644 ast/source/api/index.js.json delete mode 100644 ast/source/kernel/index.js.json create mode 100644 css/github.css create mode 100644 css/identifiers.css create mode 100644 css/manual.css create mode 100644 css/search.css create mode 100644 css/source.css create mode 100644 css/test.css delete mode 100644 dump.json delete mode 100644 file/src/api/index.js.html delete mode 100644 file/src/kernel/index.js.html create mode 100644 index.json rename {user => inject}/css/0-style.css (100%) create mode 100644 inject/script/0-header.js create mode 100644 lint.json delete mode 100644 manual-badge.svg rename manual/{example => }/example.html (51%) create mode 100644 manual/installation.html delete mode 100644 manual/installation/installation.html create mode 100644 manual/overview.html delete mode 100644 manual/overview/overview.html create mode 100644 manual/usage.html delete mode 100644 manual/usage/usage.html delete mode 100644 package.json mode change 100644 => 100755 script/prettify/prettify.js delete mode 100644 user/script/0-header.js diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 4f0e82e..0000000 --- a/.gitignore +++ /dev/null @@ -1,31 +0,0 @@ -# Logs -logs -*.log - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directory -# Commenting this out is preferred by some people, see -# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- -node_modules - -# Users Environment Variables -.lock-wscript - -# groc -doc diff --git a/ast/source/.external-ecmascript.js.json b/ast/source/.external-ecmascript.js.json new file mode 100644 index 0000000..21893b9 --- /dev/null +++ b/ast/source/.external-ecmascript.js.json @@ -0,0 +1,2802 @@ +{ + "type": "File", + "start": 0, + "end": 6058, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 193, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 6058, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 193, + "column": 0 + } + }, + "sourceType": "module", + "body": [], + "directives": [], + "leadingComments": null, + "innerComments": [ + { + "type": "CommentLine", + "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 83 + } + } + }, + { + "type": "CommentLine", + "value": " Value properties", + "start": 85, + "end": 104, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ", + "start": 105, + "end": 226, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ", + "start": 228, + "end": 339, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ", + "start": 341, + "end": 464, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ", + "start": 466, + "end": 579, + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Fundamental objects", + "start": 581, + "end": 603, + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 604, + "end": 721, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 722, + "end": 839, + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 26, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 841, + "end": 962, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 963, + "end": 1084, + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 33, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1086, + "end": 1205, + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 37, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1206, + "end": 1325, + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ", + "start": 1327, + "end": 1444, + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 44, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ", + "start": 1446, + "end": 1561, + "loc": { + "start": { + "line": 46, + "column": 0 + }, + "end": { + "line": 48, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ", + "start": 1563, + "end": 1686, + "loc": { + "start": { + "line": 50, + "column": 0 + }, + "end": { + "line": 52, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ", + "start": 1688, + "end": 1819, + "loc": { + "start": { + "line": 54, + "column": 0 + }, + "end": { + "line": 56, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ", + "start": 1821, + "end": 1946, + "loc": { + "start": { + "line": 58, + "column": 0 + }, + "end": { + "line": 60, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ", + "start": 1948, + "end": 2081, + "loc": { + "start": { + "line": 62, + "column": 0 + }, + "end": { + "line": 64, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ", + "start": 2083, + "end": 2210, + "loc": { + "start": { + "line": 66, + "column": 0 + }, + "end": { + "line": 68, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ", + "start": 2212, + "end": 2335, + "loc": { + "start": { + "line": 70, + "column": 0 + }, + "end": { + "line": 72, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ", + "start": 2337, + "end": 2458, + "loc": { + "start": { + "line": 74, + "column": 0 + }, + "end": { + "line": 76, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Numbers and dates", + "start": 2460, + "end": 2480, + "loc": { + "start": { + "line": 78, + "column": 0 + }, + "end": { + "line": 78, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2481, + "end": 2598, + "loc": { + "start": { + "line": 79, + "column": 0 + }, + "end": { + "line": 81, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2599, + "end": 2716, + "loc": { + "start": { + "line": 82, + "column": 0 + }, + "end": { + "line": 84, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ", + "start": 2718, + "end": 2831, + "loc": { + "start": { + "line": 86, + "column": 0 + }, + "end": { + "line": 88, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Text processing", + "start": 2833, + "end": 2851, + "loc": { + "start": { + "line": 90, + "column": 0 + }, + "end": { + "line": 90, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2852, + "end": 2969, + "loc": { + "start": { + "line": 91, + "column": 0 + }, + "end": { + "line": 93, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2970, + "end": 3087, + "loc": { + "start": { + "line": 94, + "column": 0 + }, + "end": { + "line": 96, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ", + "start": 3089, + "end": 3206, + "loc": { + "start": { + "line": 98, + "column": 0 + }, + "end": { + "line": 100, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Indexed collections", + "start": 3208, + "end": 3230, + "loc": { + "start": { + "line": 102, + "column": 0 + }, + "end": { + "line": 102, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ", + "start": 3231, + "end": 3346, + "loc": { + "start": { + "line": 103, + "column": 0 + }, + "end": { + "line": 105, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ", + "start": 3348, + "end": 3471, + "loc": { + "start": { + "line": 107, + "column": 0 + }, + "end": { + "line": 109, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", + "start": 3472, + "end": 3597, + "loc": { + "start": { + "line": 110, + "column": 0 + }, + "end": { + "line": 112, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ", + "start": 3599, + "end": 3738, + "loc": { + "start": { + "line": 114, + "column": 0 + }, + "end": { + "line": 116, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ", + "start": 3740, + "end": 3865, + "loc": { + "start": { + "line": 118, + "column": 0 + }, + "end": { + "line": 120, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ", + "start": 3867, + "end": 3994, + "loc": { + "start": { + "line": 122, + "column": 0 + }, + "end": { + "line": 124, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ", + "start": 3996, + "end": 4121, + "loc": { + "start": { + "line": 126, + "column": 0 + }, + "end": { + "line": 128, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ", + "start": 4123, + "end": 4250, + "loc": { + "start": { + "line": 130, + "column": 0 + }, + "end": { + "line": 132, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ", + "start": 4252, + "end": 4381, + "loc": { + "start": { + "line": 134, + "column": 0 + }, + "end": { + "line": 136, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ", + "start": 4383, + "end": 4512, + "loc": { + "start": { + "line": 138, + "column": 0 + }, + "end": { + "line": 140, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Keyed collections", + "start": 4514, + "end": 4534, + "loc": { + "start": { + "line": 142, + "column": 0 + }, + "end": { + "line": 142, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ", + "start": 4535, + "end": 4646, + "loc": { + "start": { + "line": 143, + "column": 0 + }, + "end": { + "line": 145, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ", + "start": 4648, + "end": 4759, + "loc": { + "start": { + "line": 147, + "column": 0 + }, + "end": { + "line": 149, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ", + "start": 4761, + "end": 4880, + "loc": { + "start": { + "line": 151, + "column": 0 + }, + "end": { + "line": 153, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ", + "start": 4882, + "end": 5001, + "loc": { + "start": { + "line": 155, + "column": 0 + }, + "end": { + "line": 157, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Structured data", + "start": 5003, + "end": 5021, + "loc": { + "start": { + "line": 159, + "column": 0 + }, + "end": { + "line": 159, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ", + "start": 5022, + "end": 5149, + "loc": { + "start": { + "line": 160, + "column": 0 + }, + "end": { + "line": 162, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ", + "start": 5151, + "end": 5272, + "loc": { + "start": { + "line": 164, + "column": 0 + }, + "end": { + "line": 166, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ", + "start": 5274, + "end": 5387, + "loc": { + "start": { + "line": 168, + "column": 0 + }, + "end": { + "line": 170, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Control abstraction objects", + "start": 5389, + "end": 5419, + "loc": { + "start": { + "line": 172, + "column": 0 + }, + "end": { + "line": 172, + "column": 30 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ", + "start": 5420, + "end": 5539, + "loc": { + "start": { + "line": 173, + "column": 0 + }, + "end": { + "line": 175, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ", + "start": 5541, + "end": 5664, + "loc": { + "start": { + "line": 177, + "column": 0 + }, + "end": { + "line": 179, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ", + "start": 5666, + "end": 5805, + "loc": { + "start": { + "line": 181, + "column": 0 + }, + "end": { + "line": 183, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Reflection", + "start": 5807, + "end": 5820, + "loc": { + "start": { + "line": 185, + "column": 0 + }, + "end": { + "line": 185, + "column": 13 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ", + "start": 5821, + "end": 5940, + "loc": { + "start": { + "line": 186, + "column": 0 + }, + "end": { + "line": 188, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ", + "start": 5942, + "end": 6057, + "loc": { + "start": { + "line": 190, + "column": 0 + }, + "end": { + "line": 192, + "column": 3 + } + } + } + ] + }, + "comments": [ + { + "type": "CommentLine", + "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 83 + } + } + }, + { + "type": "CommentLine", + "value": " Value properties", + "start": 85, + "end": 104, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ", + "start": 105, + "end": 226, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ", + "start": 228, + "end": 339, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ", + "start": 341, + "end": 464, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ", + "start": 466, + "end": 579, + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Fundamental objects", + "start": 581, + "end": 603, + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 604, + "end": 721, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 722, + "end": 839, + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 26, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 841, + "end": 962, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 963, + "end": 1084, + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 33, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1086, + "end": 1205, + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 37, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1206, + "end": 1325, + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ", + "start": 1327, + "end": 1444, + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 44, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ", + "start": 1446, + "end": 1561, + "loc": { + "start": { + "line": 46, + "column": 0 + }, + "end": { + "line": 48, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ", + "start": 1563, + "end": 1686, + "loc": { + "start": { + "line": 50, + "column": 0 + }, + "end": { + "line": 52, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ", + "start": 1688, + "end": 1819, + "loc": { + "start": { + "line": 54, + "column": 0 + }, + "end": { + "line": 56, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ", + "start": 1821, + "end": 1946, + "loc": { + "start": { + "line": 58, + "column": 0 + }, + "end": { + "line": 60, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ", + "start": 1948, + "end": 2081, + "loc": { + "start": { + "line": 62, + "column": 0 + }, + "end": { + "line": 64, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ", + "start": 2083, + "end": 2210, + "loc": { + "start": { + "line": 66, + "column": 0 + }, + "end": { + "line": 68, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ", + "start": 2212, + "end": 2335, + "loc": { + "start": { + "line": 70, + "column": 0 + }, + "end": { + "line": 72, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ", + "start": 2337, + "end": 2458, + "loc": { + "start": { + "line": 74, + "column": 0 + }, + "end": { + "line": 76, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Numbers and dates", + "start": 2460, + "end": 2480, + "loc": { + "start": { + "line": 78, + "column": 0 + }, + "end": { + "line": 78, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2481, + "end": 2598, + "loc": { + "start": { + "line": 79, + "column": 0 + }, + "end": { + "line": 81, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2599, + "end": 2716, + "loc": { + "start": { + "line": 82, + "column": 0 + }, + "end": { + "line": 84, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ", + "start": 2718, + "end": 2831, + "loc": { + "start": { + "line": 86, + "column": 0 + }, + "end": { + "line": 88, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Text processing", + "start": 2833, + "end": 2851, + "loc": { + "start": { + "line": 90, + "column": 0 + }, + "end": { + "line": 90, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2852, + "end": 2969, + "loc": { + "start": { + "line": 91, + "column": 0 + }, + "end": { + "line": 93, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2970, + "end": 3087, + "loc": { + "start": { + "line": 94, + "column": 0 + }, + "end": { + "line": 96, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ", + "start": 3089, + "end": 3206, + "loc": { + "start": { + "line": 98, + "column": 0 + }, + "end": { + "line": 100, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Indexed collections", + "start": 3208, + "end": 3230, + "loc": { + "start": { + "line": 102, + "column": 0 + }, + "end": { + "line": 102, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ", + "start": 3231, + "end": 3346, + "loc": { + "start": { + "line": 103, + "column": 0 + }, + "end": { + "line": 105, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ", + "start": 3348, + "end": 3471, + "loc": { + "start": { + "line": 107, + "column": 0 + }, + "end": { + "line": 109, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", + "start": 3472, + "end": 3597, + "loc": { + "start": { + "line": 110, + "column": 0 + }, + "end": { + "line": 112, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ", + "start": 3599, + "end": 3738, + "loc": { + "start": { + "line": 114, + "column": 0 + }, + "end": { + "line": 116, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ", + "start": 3740, + "end": 3865, + "loc": { + "start": { + "line": 118, + "column": 0 + }, + "end": { + "line": 120, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ", + "start": 3867, + "end": 3994, + "loc": { + "start": { + "line": 122, + "column": 0 + }, + "end": { + "line": 124, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ", + "start": 3996, + "end": 4121, + "loc": { + "start": { + "line": 126, + "column": 0 + }, + "end": { + "line": 128, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ", + "start": 4123, + "end": 4250, + "loc": { + "start": { + "line": 130, + "column": 0 + }, + "end": { + "line": 132, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ", + "start": 4252, + "end": 4381, + "loc": { + "start": { + "line": 134, + "column": 0 + }, + "end": { + "line": 136, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ", + "start": 4383, + "end": 4512, + "loc": { + "start": { + "line": 138, + "column": 0 + }, + "end": { + "line": 140, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Keyed collections", + "start": 4514, + "end": 4534, + "loc": { + "start": { + "line": 142, + "column": 0 + }, + "end": { + "line": 142, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ", + "start": 4535, + "end": 4646, + "loc": { + "start": { + "line": 143, + "column": 0 + }, + "end": { + "line": 145, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ", + "start": 4648, + "end": 4759, + "loc": { + "start": { + "line": 147, + "column": 0 + }, + "end": { + "line": 149, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ", + "start": 4761, + "end": 4880, + "loc": { + "start": { + "line": 151, + "column": 0 + }, + "end": { + "line": 153, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ", + "start": 4882, + "end": 5001, + "loc": { + "start": { + "line": 155, + "column": 0 + }, + "end": { + "line": 157, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Structured data", + "start": 5003, + "end": 5021, + "loc": { + "start": { + "line": 159, + "column": 0 + }, + "end": { + "line": 159, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ", + "start": 5022, + "end": 5149, + "loc": { + "start": { + "line": 160, + "column": 0 + }, + "end": { + "line": 162, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ", + "start": 5151, + "end": 5272, + "loc": { + "start": { + "line": 164, + "column": 0 + }, + "end": { + "line": 166, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ", + "start": 5274, + "end": 5387, + "loc": { + "start": { + "line": 168, + "column": 0 + }, + "end": { + "line": 170, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Control abstraction objects", + "start": 5389, + "end": 5419, + "loc": { + "start": { + "line": 172, + "column": 0 + }, + "end": { + "line": 172, + "column": 30 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ", + "start": 5420, + "end": 5539, + "loc": { + "start": { + "line": 173, + "column": 0 + }, + "end": { + "line": 175, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ", + "start": 5541, + "end": 5664, + "loc": { + "start": { + "line": 177, + "column": 0 + }, + "end": { + "line": 179, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ", + "start": 5666, + "end": 5805, + "loc": { + "start": { + "line": 181, + "column": 0 + }, + "end": { + "line": 183, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Reflection", + "start": 5807, + "end": 5820, + "loc": { + "start": { + "line": 185, + "column": 0 + }, + "end": { + "line": 185, + "column": 13 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ", + "start": 5821, + "end": 5940, + "loc": { + "start": { + "line": 186, + "column": 0 + }, + "end": { + "line": 188, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ", + "start": 5942, + "end": 6057, + "loc": { + "start": { + "line": 190, + "column": 0 + }, + "end": { + "line": 192, + "column": 3 + } + } + } + ], + "tokens": [ + { + "type": "CommentLine", + "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects", + "start": 0, + "end": 83, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 83 + } + } + }, + { + "type": "CommentLine", + "value": " Value properties", + "start": 85, + "end": 104, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 19 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ", + "start": 105, + "end": 226, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 6, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ", + "start": 228, + "end": 339, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 10, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ", + "start": 341, + "end": 464, + "loc": { + "start": { + "line": 12, + "column": 0 + }, + "end": { + "line": 14, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ", + "start": 466, + "end": 579, + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 18, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Fundamental objects", + "start": 581, + "end": 603, + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 604, + "end": 721, + "loc": { + "start": { + "line": 21, + "column": 0 + }, + "end": { + "line": 23, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ", + "start": 722, + "end": 839, + "loc": { + "start": { + "line": 24, + "column": 0 + }, + "end": { + "line": 26, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 841, + "end": 962, + "loc": { + "start": { + "line": 28, + "column": 0 + }, + "end": { + "line": 30, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ", + "start": 963, + "end": 1084, + "loc": { + "start": { + "line": 31, + "column": 0 + }, + "end": { + "line": 33, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1086, + "end": 1205, + "loc": { + "start": { + "line": 35, + "column": 0 + }, + "end": { + "line": 37, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ", + "start": 1206, + "end": 1325, + "loc": { + "start": { + "line": 38, + "column": 0 + }, + "end": { + "line": 40, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ", + "start": 1327, + "end": 1444, + "loc": { + "start": { + "line": 42, + "column": 0 + }, + "end": { + "line": 44, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ", + "start": 1446, + "end": 1561, + "loc": { + "start": { + "line": 46, + "column": 0 + }, + "end": { + "line": 48, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ", + "start": 1563, + "end": 1686, + "loc": { + "start": { + "line": 50, + "column": 0 + }, + "end": { + "line": 52, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ", + "start": 1688, + "end": 1819, + "loc": { + "start": { + "line": 54, + "column": 0 + }, + "end": { + "line": 56, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ", + "start": 1821, + "end": 1946, + "loc": { + "start": { + "line": 58, + "column": 0 + }, + "end": { + "line": 60, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ", + "start": 1948, + "end": 2081, + "loc": { + "start": { + "line": 62, + "column": 0 + }, + "end": { + "line": 64, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ", + "start": 2083, + "end": 2210, + "loc": { + "start": { + "line": 66, + "column": 0 + }, + "end": { + "line": 68, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ", + "start": 2212, + "end": 2335, + "loc": { + "start": { + "line": 70, + "column": 0 + }, + "end": { + "line": 72, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ", + "start": 2337, + "end": 2458, + "loc": { + "start": { + "line": 74, + "column": 0 + }, + "end": { + "line": 76, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Numbers and dates", + "start": 2460, + "end": 2480, + "loc": { + "start": { + "line": 78, + "column": 0 + }, + "end": { + "line": 78, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2481, + "end": 2598, + "loc": { + "start": { + "line": 79, + "column": 0 + }, + "end": { + "line": 81, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ", + "start": 2599, + "end": 2716, + "loc": { + "start": { + "line": 82, + "column": 0 + }, + "end": { + "line": 84, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ", + "start": 2718, + "end": 2831, + "loc": { + "start": { + "line": 86, + "column": 0 + }, + "end": { + "line": 88, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Text processing", + "start": 2833, + "end": 2851, + "loc": { + "start": { + "line": 90, + "column": 0 + }, + "end": { + "line": 90, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2852, + "end": 2969, + "loc": { + "start": { + "line": 91, + "column": 0 + }, + "end": { + "line": 93, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ", + "start": 2970, + "end": 3087, + "loc": { + "start": { + "line": 94, + "column": 0 + }, + "end": { + "line": 96, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ", + "start": 3089, + "end": 3206, + "loc": { + "start": { + "line": 98, + "column": 0 + }, + "end": { + "line": 100, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Indexed collections", + "start": 3208, + "end": 3230, + "loc": { + "start": { + "line": 102, + "column": 0 + }, + "end": { + "line": 102, + "column": 22 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ", + "start": 3231, + "end": 3346, + "loc": { + "start": { + "line": 103, + "column": 0 + }, + "end": { + "line": 105, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ", + "start": 3348, + "end": 3471, + "loc": { + "start": { + "line": 107, + "column": 0 + }, + "end": { + "line": 109, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ", + "start": 3472, + "end": 3597, + "loc": { + "start": { + "line": 110, + "column": 0 + }, + "end": { + "line": 112, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ", + "start": 3599, + "end": 3738, + "loc": { + "start": { + "line": 114, + "column": 0 + }, + "end": { + "line": 116, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ", + "start": 3740, + "end": 3865, + "loc": { + "start": { + "line": 118, + "column": 0 + }, + "end": { + "line": 120, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ", + "start": 3867, + "end": 3994, + "loc": { + "start": { + "line": 122, + "column": 0 + }, + "end": { + "line": 124, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ", + "start": 3996, + "end": 4121, + "loc": { + "start": { + "line": 126, + "column": 0 + }, + "end": { + "line": 128, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ", + "start": 4123, + "end": 4250, + "loc": { + "start": { + "line": 130, + "column": 0 + }, + "end": { + "line": 132, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ", + "start": 4252, + "end": 4381, + "loc": { + "start": { + "line": 134, + "column": 0 + }, + "end": { + "line": 136, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ", + "start": 4383, + "end": 4512, + "loc": { + "start": { + "line": 138, + "column": 0 + }, + "end": { + "line": 140, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Keyed collections", + "start": 4514, + "end": 4534, + "loc": { + "start": { + "line": 142, + "column": 0 + }, + "end": { + "line": 142, + "column": 20 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ", + "start": 4535, + "end": 4646, + "loc": { + "start": { + "line": 143, + "column": 0 + }, + "end": { + "line": 145, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ", + "start": 4648, + "end": 4759, + "loc": { + "start": { + "line": 147, + "column": 0 + }, + "end": { + "line": 149, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ", + "start": 4761, + "end": 4880, + "loc": { + "start": { + "line": 151, + "column": 0 + }, + "end": { + "line": 153, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ", + "start": 4882, + "end": 5001, + "loc": { + "start": { + "line": 155, + "column": 0 + }, + "end": { + "line": 157, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Structured data", + "start": 5003, + "end": 5021, + "loc": { + "start": { + "line": 159, + "column": 0 + }, + "end": { + "line": 159, + "column": 18 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ", + "start": 5022, + "end": 5149, + "loc": { + "start": { + "line": 160, + "column": 0 + }, + "end": { + "line": 162, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ", + "start": 5151, + "end": 5272, + "loc": { + "start": { + "line": 164, + "column": 0 + }, + "end": { + "line": 166, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ", + "start": 5274, + "end": 5387, + "loc": { + "start": { + "line": 168, + "column": 0 + }, + "end": { + "line": 170, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Control abstraction objects", + "start": 5389, + "end": 5419, + "loc": { + "start": { + "line": 172, + "column": 0 + }, + "end": { + "line": 172, + "column": 30 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ", + "start": 5420, + "end": 5539, + "loc": { + "start": { + "line": 173, + "column": 0 + }, + "end": { + "line": 175, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ", + "start": 5541, + "end": 5664, + "loc": { + "start": { + "line": 177, + "column": 0 + }, + "end": { + "line": 179, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ", + "start": 5666, + "end": 5805, + "loc": { + "start": { + "line": 181, + "column": 0 + }, + "end": { + "line": 183, + "column": 3 + } + } + }, + { + "type": "CommentLine", + "value": " Reflection", + "start": 5807, + "end": 5820, + "loc": { + "start": { + "line": 185, + "column": 0 + }, + "end": { + "line": 185, + "column": 13 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ", + "start": 5821, + "end": 5940, + "loc": { + "start": { + "line": 186, + "column": 0 + }, + "end": { + "line": 188, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ", + "start": 5942, + "end": 6057, + "loc": { + "start": { + "line": 190, + "column": 0 + }, + "end": { + "line": 192, + "column": 3 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 6058, + "end": 6058, + "loc": { + "start": { + "line": 193, + "column": 0 + }, + "end": { + "line": 193, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/api/index.js.json b/ast/source/api/index.js.json deleted file mode 100644 index f5630b3..0000000 --- a/ast/source/api/index.js.json +++ /dev/null @@ -1,908 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 143, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 0 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 143, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 6, - "column": 0 - } - }, - "sourceType": "module", - "body": [ - { - "type": "ExportAllDeclaration", - "start": 0, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 29 - } - }, - "source": { - "type": "StringLiteral", - "start": 14, - "end": 27, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 27 - } - }, - "extra": { - "rawValue": "./randfloat", - "raw": "'./randfloat'" - }, - "value": "./randfloat" - } - }, - { - "type": "ExportAllDeclaration", - "start": 30, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 27 - } - }, - "source": { - "type": "StringLiteral", - "start": 44, - "end": 55, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - }, - "extra": { - "rawValue": "./randint", - "raw": "'./randint'" - }, - "value": "./randint" - } - }, - { - "type": "ExportAllDeclaration", - "start": 58, - "end": 87, - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 29 - } - }, - "source": { - "type": "StringLiteral", - "start": 72, - "end": 85, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 27 - } - }, - "extra": { - "rawValue": "./randrange", - "raw": "'./randrange'" - }, - "value": "./randrange" - } - }, - { - "type": "ExportAllDeclaration", - "start": 88, - "end": 114, - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 26 - } - }, - "source": { - "type": "StringLiteral", - "start": 102, - "end": 112, - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 24 - } - }, - "extra": { - "rawValue": "./sample", - "raw": "'./sample'" - }, - "value": "./sample" - } - }, - { - "type": "ExportAllDeclaration", - "start": 115, - "end": 142, - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 5, - "column": 27 - } - }, - "source": { - "type": "StringLiteral", - "start": 129, - "end": 140, - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 25 - } - }, - "extra": { - "rawValue": "./shuffle", - "raw": "'./shuffle'" - }, - "value": "./shuffle" - } - } - ], - "directives": [] - }, - "comments": [], - "tokens": [ - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 0, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 7, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 9, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./randfloat", - "start": 14, - "end": 27, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 27 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 28, - "end": 29, - "loc": { - "start": { - "line": 1, - "column": 28 - }, - "end": { - "line": 1, - "column": 29 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 30, - "end": 36, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 37, - "end": 38, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 39, - "end": 43, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./randint", - "start": 44, - "end": 55, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 25 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 56, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 26 - }, - "end": { - "line": 2, - "column": 27 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 58, - "end": 64, - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 65, - "end": 66, - "loc": { - "start": { - "line": 3, - "column": 7 - }, - "end": { - "line": 3, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 67, - "end": 71, - "loc": { - "start": { - "line": 3, - "column": 9 - }, - "end": { - "line": 3, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./randrange", - "start": 72, - "end": 85, - "loc": { - "start": { - "line": 3, - "column": 14 - }, - "end": { - "line": 3, - "column": 27 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 86, - "end": 87, - "loc": { - "start": { - "line": 3, - "column": 28 - }, - "end": { - "line": 3, - "column": 29 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 88, - "end": 94, - "loc": { - "start": { - "line": 4, - "column": 0 - }, - "end": { - "line": 4, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 95, - "end": 96, - "loc": { - "start": { - "line": 4, - "column": 7 - }, - "end": { - "line": 4, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 97, - "end": 101, - "loc": { - "start": { - "line": 4, - "column": 9 - }, - "end": { - "line": 4, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./sample", - "start": 102, - "end": 112, - "loc": { - "start": { - "line": 4, - "column": 14 - }, - "end": { - "line": 4, - "column": 24 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 113, - "end": 114, - "loc": { - "start": { - "line": 4, - "column": 25 - }, - "end": { - "line": 4, - "column": 26 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 115, - "end": 121, - "loc": { - "start": { - "line": 5, - "column": 0 - }, - "end": { - "line": 5, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 122, - "end": 123, - "loc": { - "start": { - "line": 5, - "column": 7 - }, - "end": { - "line": 5, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 124, - "end": 128, - "loc": { - "start": { - "line": 5, - "column": 9 - }, - "end": { - "line": 5, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./shuffle", - "start": 129, - "end": 140, - "loc": { - "start": { - "line": 5, - "column": 14 - }, - "end": { - "line": 5, - "column": 25 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 141, - "end": 142, - "loc": { - "start": { - "line": 5, - "column": 26 - }, - "end": { - "line": 5, - "column": 27 - } - } - }, - { - "type": { - "label": "eof", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 143, - "end": 143, - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 6, - "column": 0 - } - } - } - ] -} \ No newline at end of file diff --git a/ast/source/api/randfloat.js.json b/ast/source/api/randfloat.js.json index 970b001..e591315 100644 --- a/ast/source/api/randfloat.js.json +++ b/ast/source/api/randfloat.js.json @@ -8,7 +8,7 @@ "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } }, @@ -22,154 +22,484 @@ "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } }, "sourceType": "module", "body": [ { - "type": "ExportNamedDeclaration", - "start": 129, - "end": 209, + "type": "Identifier", + "start": 128, + "end": 184, "loc": { "start": { - "line": 7, + "line": 6, "column": 0 }, "end": { - "line": 9, - "column": 1 + "line": 6, + "column": 56 } }, - "specifiers": [], - "source": null, - "declaration": { - "type": "FunctionDeclaration", - "start": 136, - "end": 209, - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 9, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 145, - "end": 154, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 134, + "end": 183, "loc": { "start": { - "line": 7, - "column": 16 + "line": 6, + "column": 6 }, "end": { - "line": 7, - "column": 25 - }, - "identifierName": "randfloat" + "line": 6, + "column": 55 + } }, - "name": "randfloat", - "leadingComments": null - }, - "generator": false, - "expression": false, - "async": false, - "params": [ - { + "id": { "type": "Identifier", - "start": 157, - "end": 158, + "start": 134, + "end": 143, "loc": { "start": { - "line": 7, - "column": 28 + "line": 6, + "column": 6 }, "end": { - "line": 7, - "column": 29 + "line": 6, + "column": 15 }, - "identifierName": "i" + "identifierName": "randfloat" }, - "name": "i" + "name": "randfloat", + "leadingComments": null }, - { - "type": "Identifier", - "start": 161, - "end": 162, + "init": { + "type": "ArrowFunctionExpression", + "start": 146, + "end": 183, "loc": { "start": { - "line": 7, - "column": 32 + "line": 6, + "column": 18 }, "end": { - "line": 7, - "column": 33 - }, - "identifierName": "j" - }, - "name": "j" - } - ], - "body": { - "type": "BlockStatement", - "start": 165, - "end": 209, - "loc": { - "start": { - "line": 7, - "column": 36 + "line": 6, + "column": 55 + } }, - "end": { - "line": 9, - "column": 1 + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 147, + "end": 148, + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 150, + "end": 151, + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BinaryExpression", + "start": 156, + "end": 183, + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 55 + } + }, + "left": { + "type": "Identifier", + "start": 156, + "end": 157, + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 29 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 160, + "end": 183, + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 55 + } + }, + "left": { + "type": "CallExpression", + "start": 160, + "end": 173, + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 45 + } + }, + "callee": { + "type": "MemberExpression", + "start": 160, + "end": 171, + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 43 + } + }, + "object": { + "type": "Identifier", + "start": 160, + "end": 164, + "loc": { + "start": { + "line": 6, + "column": 32 + }, + "end": { + "line": 6, + "column": 36 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 165, + "end": 171, + "loc": { + "start": { + "line": 6, + "column": 37 + }, + "end": { + "line": 6, + "column": 43 + }, + "identifierName": "random" + }, + "name": "random" + }, + "computed": false + }, + "arguments": [] + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "start": 177, + "end": 182, + "loc": { + "start": { + "line": 6, + "column": 49 + }, + "end": { + "line": 6, + "column": 54 + } + }, + "left": { + "type": "Identifier", + "start": 177, + "end": 178, + "loc": { + "start": { + "line": 6, + "column": 49 + }, + "end": { + "line": 6, + "column": 50 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 181, + "end": 182, + "loc": { + "start": { + "line": 6, + "column": 53 + }, + "end": { + "line": 6, + "column": 54 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesized": true, + "parenStart": 176 + } + } + } } }, - "body": [ - { - "type": "ReturnStatement", - "start": 168, - "end": 207, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 185, + "end": 210, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 25 + } + }, + "declaration": { + "type": "Identifier", + "start": 200, + "end": 209, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 24 + }, + "identifierName": "randfloat" + }, + "name": "randfloat" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 185, + "end": 210, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 25 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 128, + "end": 184, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 56 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 134, + "end": 183, + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 55 + } + }, + "id": { + "type": "Identifier", + "start": 134, + "end": 143, "loc": { "start": { - "line": 8, - "column": 1 + "line": 6, + "column": 6 }, "end": { - "line": 8, - "column": 40 + "line": 6, + "column": 15 + }, + "identifierName": "randfloat" + }, + "name": "randfloat", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 146, + "end": 183, + "loc": { + "start": { + "line": 6, + "column": 18 + }, + "end": { + "line": 6, + "column": 55 } }, - "argument": { + "id": { + "type": "Identifier", + "start": 134, + "end": 143, + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 15 + }, + "identifierName": "randfloat" + }, + "name": "randfloat", + "leadingComments": null + }, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 147, + "end": 148, + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 20 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 150, + "end": 151, + "loc": { + "start": { + "line": 6, + "column": 22 + }, + "end": { + "line": 6, + "column": 23 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { "type": "BinaryExpression", - "start": 175, - "end": 205, + "start": 156, + "end": 183, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 28 }, "end": { - "line": 8, - "column": 38 + "line": 6, + "column": 55 } }, "left": { "type": "Identifier", - "start": 175, - "end": 176, + "start": 156, + "end": 157, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 28 }, "end": { - "line": 8, - "column": 9 + "line": 6, + "column": 29 }, "identifierName": "i" }, @@ -178,58 +508,58 @@ "operator": "+", "right": { "type": "BinaryExpression", - "start": 179, - "end": 205, + "start": 160, + "end": 183, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 32 }, "end": { - "line": 8, - "column": 38 + "line": 6, + "column": 55 } }, "left": { "type": "CallExpression", - "start": 179, - "end": 193, + "start": 160, + "end": 173, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 32 }, "end": { - "line": 8, - "column": 26 + "line": 6, + "column": 45 } }, "callee": { "type": "MemberExpression", - "start": 179, - "end": 190, + "start": 160, + "end": 171, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 32 }, "end": { - "line": 8, - "column": 23 + "line": 6, + "column": 43 } }, "object": { "type": "Identifier", - "start": 179, - "end": 183, + "start": 160, + "end": 164, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 32 }, "end": { - "line": 8, - "column": 16 + "line": 6, + "column": 36 }, "identifierName": "Math" }, @@ -237,16 +567,16 @@ }, "property": { "type": "Identifier", - "start": 184, - "end": 190, + "start": 165, + "end": 171, "loc": { "start": { - "line": 8, - "column": 17 + "line": 6, + "column": 37 }, "end": { - "line": 8, - "column": 23 + "line": 6, + "column": 43 }, "identifierName": "random" }, @@ -259,30 +589,30 @@ "operator": "*", "right": { "type": "BinaryExpression", - "start": 198, - "end": 203, + "start": 177, + "end": 182, "loc": { "start": { - "line": 8, - "column": 31 + "line": 6, + "column": 49 }, "end": { - "line": 8, - "column": 36 + "line": 6, + "column": 54 } }, "left": { "type": "Identifier", - "start": 198, - "end": 199, + "start": 177, + "end": 178, "loc": { "start": { - "line": 8, - "column": 31 + "line": 6, + "column": 49 }, "end": { - "line": 8, - "column": 32 + "line": 6, + "column": 50 }, "identifierName": "j" }, @@ -291,16 +621,16 @@ "operator": "-", "right": { "type": "Identifier", - "start": 202, - "end": 203, + "start": 181, + "end": 182, "loc": { "start": { - "line": 8, - "column": 35 + "line": 6, + "column": 53 }, "end": { - "line": 8, - "column": 36 + "line": 6, + "column": 54 }, "identifierName": "i" }, @@ -308,53 +638,36 @@ }, "extra": { "parenthesized": true, - "parenStart": 196 + "parenStart": 176 } } } } - } - ], - "directives": [] - }, + }, + "leadingComments": null + } + ], + "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 127, + "start": 0, + "end": 126, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } } ], "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 127, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - } - } - ] + } } ], "directives": [] @@ -363,15 +676,15 @@ { "type": "CommentBlock", "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 127, + "start": 0, + "end": 126, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } @@ -381,23 +694,23 @@ { "type": "CommentBlock", "value": "*\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 127, + "start": 0, + "end": 126, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } }, { "type": { - "label": "export", - "keyword": "export", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -408,24 +721,23 @@ "binop": null, "updateContext": null }, - "value": "export", - "start": 129, - "end": 135, + "value": "const", + "start": 128, + "end": 133, "loc": { "start": { - "line": 7, + "line": 6, "column": 0 }, "end": { - "line": 7, - "column": 6 + "line": 6, + "column": 5 } } }, { "type": { - "label": "function", - "keyword": "function", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -435,43 +747,44 @@ "postfix": false, "binop": null }, - "value": "function", - "start": 136, - "end": 144, + "value": "randfloat", + "start": 134, + "end": 143, "loc": { "start": { - "line": 7, - "column": 7 + "line": 6, + "column": 6 }, "end": { - "line": 7, + "line": 6, "column": 15 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "=", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "randfloat", - "start": 145, - "end": 154, + "value": "=", + "start": 144, + "end": 145, "loc": { "start": { - "line": 7, + "line": 6, "column": 16 }, "end": { - "line": 7, - "column": 25 + "line": 6, + "column": 17 } } }, @@ -487,16 +800,16 @@ "postfix": false, "binop": null }, - "start": 155, - "end": 156, + "start": 146, + "end": 147, "loc": { "start": { - "line": 7, - "column": 26 + "line": 6, + "column": 18 }, "end": { - "line": 7, - "column": 27 + "line": 6, + "column": 19 } } }, @@ -513,16 +826,16 @@ "binop": null }, "value": "i", - "start": 157, - "end": 158, + "start": 147, + "end": 148, "loc": { "start": { - "line": 7, - "column": 28 + "line": 6, + "column": 19 }, "end": { - "line": 7, - "column": 29 + "line": 6, + "column": 20 } } }, @@ -539,16 +852,16 @@ "binop": null, "updateContext": null }, - "start": 159, - "end": 160, + "start": 148, + "end": 149, "loc": { "start": { - "line": 7, - "column": 30 + "line": 6, + "column": 20 }, "end": { - "line": 7, - "column": 31 + "line": 6, + "column": 21 } } }, @@ -565,16 +878,16 @@ "binop": null }, "value": "j", - "start": 161, - "end": 162, + "start": 150, + "end": 151, "loc": { "start": { - "line": 7, - "column": 32 + "line": 6, + "column": 22 }, "end": { - "line": 7, - "column": 33 + "line": 6, + "column": 23 } } }, @@ -590,48 +903,22 @@ "postfix": false, "binop": null }, - "start": 163, - "end": 164, - "loc": { - "start": { - "line": 7, - "column": 34 - }, - "end": { - "line": 7, - "column": 35 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 165, - "end": 166, + "start": 151, + "end": 152, "loc": { "start": { - "line": 7, - "column": 36 + "line": 6, + "column": 23 }, "end": { - "line": 7, - "column": 37 + "line": 6, + "column": 24 } } }, { "type": { - "label": "return", - "keyword": "return", + "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, @@ -642,17 +929,16 @@ "binop": null, "updateContext": null }, - "value": "return", - "start": 168, - "end": 174, + "start": 153, + "end": 155, "loc": { "start": { - "line": 8, - "column": 1 + "line": 6, + "column": 25 }, "end": { - "line": 8, - "column": 7 + "line": 6, + "column": 27 } } }, @@ -669,16 +955,16 @@ "binop": null }, "value": "i", - "start": 175, - "end": 176, + "start": 156, + "end": 157, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 28 }, "end": { - "line": 8, - "column": 9 + "line": 6, + "column": 29 } } }, @@ -696,16 +982,16 @@ "updateContext": null }, "value": "+", - "start": 177, - "end": 178, + "start": 158, + "end": 159, "loc": { "start": { - "line": 8, - "column": 10 + "line": 6, + "column": 30 }, "end": { - "line": 8, - "column": 11 + "line": 6, + "column": 31 } } }, @@ -722,16 +1008,16 @@ "binop": null }, "value": "Math", - "start": 179, - "end": 183, + "start": 160, + "end": 164, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 32 }, "end": { - "line": 8, - "column": 16 + "line": 6, + "column": 36 } } }, @@ -748,16 +1034,16 @@ "binop": null, "updateContext": null }, - "start": 183, - "end": 184, + "start": 164, + "end": 165, "loc": { "start": { - "line": 8, - "column": 16 + "line": 6, + "column": 36 }, "end": { - "line": 8, - "column": 17 + "line": 6, + "column": 37 } } }, @@ -774,16 +1060,16 @@ "binop": null }, "value": "random", - "start": 184, - "end": 190, + "start": 165, + "end": 171, "loc": { "start": { - "line": 8, - "column": 17 + "line": 6, + "column": 37 }, "end": { - "line": 8, - "column": 23 + "line": 6, + "column": 43 } } }, @@ -799,16 +1085,16 @@ "postfix": false, "binop": null }, - "start": 190, - "end": 191, + "start": 171, + "end": 172, "loc": { "start": { - "line": 8, - "column": 23 + "line": 6, + "column": 43 }, "end": { - "line": 8, - "column": 24 + "line": 6, + "column": 44 } } }, @@ -824,16 +1110,16 @@ "postfix": false, "binop": null }, - "start": 192, - "end": 193, + "start": 172, + "end": 173, "loc": { "start": { - "line": 8, - "column": 25 + "line": 6, + "column": 44 }, "end": { - "line": 8, - "column": 26 + "line": 6, + "column": 45 } } }, @@ -851,16 +1137,16 @@ "updateContext": null }, "value": "*", - "start": 194, - "end": 195, + "start": 174, + "end": 175, "loc": { "start": { - "line": 8, - "column": 27 + "line": 6, + "column": 46 }, "end": { - "line": 8, - "column": 28 + "line": 6, + "column": 47 } } }, @@ -876,16 +1162,16 @@ "postfix": false, "binop": null }, - "start": 196, - "end": 197, + "start": 176, + "end": 177, "loc": { "start": { - "line": 8, - "column": 29 + "line": 6, + "column": 48 }, "end": { - "line": 8, - "column": 30 + "line": 6, + "column": 49 } } }, @@ -902,16 +1188,16 @@ "binop": null }, "value": "j", - "start": 198, - "end": 199, + "start": 177, + "end": 178, "loc": { "start": { - "line": 8, - "column": 31 + "line": 6, + "column": 49 }, "end": { - "line": 8, - "column": 32 + "line": 6, + "column": 50 } } }, @@ -929,16 +1215,16 @@ "updateContext": null }, "value": "-", - "start": 200, - "end": 201, + "start": 179, + "end": 180, "loc": { "start": { - "line": 8, - "column": 33 + "line": 6, + "column": 51 }, "end": { - "line": 8, - "column": 34 + "line": 6, + "column": 52 } } }, @@ -955,16 +1241,16 @@ "binop": null }, "value": "i", - "start": 202, - "end": 203, + "start": 181, + "end": 182, "loc": { "start": { - "line": 8, - "column": 35 + "line": 6, + "column": 53 }, "end": { - "line": 8, - "column": 36 + "line": 6, + "column": 54 } } }, @@ -980,16 +1266,16 @@ "postfix": false, "binop": null }, - "start": 204, - "end": 205, + "start": 182, + "end": 183, "loc": { "start": { - "line": 8, - "column": 37 + "line": 6, + "column": 54 }, "end": { - "line": 8, - "column": 38 + "line": 6, + "column": 55 } } }, @@ -1006,22 +1292,23 @@ "binop": null, "updateContext": null }, - "start": 206, - "end": 207, + "start": 183, + "end": 184, "loc": { "start": { - "line": 8, - "column": 39 + "line": 6, + "column": 55 }, "end": { - "line": 8, - "column": 40 + "line": 6, + "column": 56 } } }, { "type": { - "label": "}", + "label": "export", + "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -1029,18 +1316,100 @@ "isAssign": false, "prefix": false, "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 185, + "end": 191, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 192, + "end": 199, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, "binop": null }, - "start": 208, + "value": "randfloat", + "start": 200, "end": 209, "loc": { "start": { - "line": 9, - "column": 0 + "line": 7, + "column": 15 }, "end": { - "line": 9, - "column": 1 + "line": 7, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 209, + "end": 210, + "loc": { + "start": { + "line": 7, + "column": 24 + }, + "end": { + "line": 7, + "column": 25 } } }, @@ -1061,11 +1430,11 @@ "end": 211, "loc": { "start": { - "line": 11, + "line": 8, "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } } diff --git a/ast/source/api/randint.js.json b/ast/source/api/randint.js.json index 46340a4..c82ee15 100644 --- a/ast/source/api/randint.js.json +++ b/ast/source/api/randint.js.json @@ -1,175 +1,572 @@ { "type": "File", "start": 0, - "end": 210, + "end": 206, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 210, + "end": 206, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } }, "sourceType": "module", "body": [ { - "type": "ExportNamedDeclaration", - "start": 116, - "end": 208, + "type": "Identifier", + "start": 115, + "end": 181, "loc": { "start": { - "line": 7, + "line": 6, "column": 0 }, "end": { - "line": 9, - "column": 1 + "line": 6, + "column": 66 } }, - "specifiers": [], - "source": null, - "declaration": { - "type": "FunctionDeclaration", - "start": 123, - "end": 208, - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 9, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 132, - "end": 139, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 121, + "end": 180, "loc": { "start": { - "line": 7, - "column": 16 + "line": 6, + "column": 6 }, "end": { - "line": 7, - "column": 23 - }, - "identifierName": "randint" + "line": 6, + "column": 65 + } }, - "name": "randint", - "leadingComments": null - }, - "generator": false, - "expression": false, - "async": false, - "params": [ - { + "id": { "type": "Identifier", - "start": 142, - "end": 143, + "start": 121, + "end": 128, "loc": { "start": { - "line": 7, - "column": 26 + "line": 6, + "column": 6 }, "end": { - "line": 7, - "column": 27 + "line": 6, + "column": 13 }, - "identifierName": "i" + "identifierName": "randint" }, - "name": "i" + "name": "randint", + "leadingComments": null }, - { - "type": "Identifier", - "start": 146, - "end": 147, + "init": { + "type": "ArrowFunctionExpression", + "start": 131, + "end": 180, "loc": { "start": { - "line": 7, - "column": 30 + "line": 6, + "column": 16 }, "end": { - "line": 7, - "column": 31 - }, - "identifierName": "j" - }, - "name": "j" - } - ], - "body": { - "type": "BlockStatement", - "start": 150, - "end": 208, - "loc": { - "start": { - "line": 7, - "column": 34 + "line": 6, + "column": 65 + } }, - "end": { - "line": 9, - "column": 1 + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 132, + "end": 133, + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 135, + "end": 136, + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BinaryExpression", + "start": 141, + "end": 180, + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 65 + } + }, + "left": { + "type": "Identifier", + "start": 141, + "end": 142, + "loc": { + "start": { + "line": 6, + "column": 26 + }, + "end": { + "line": 6, + "column": 27 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "CallExpression", + "start": 145, + "end": 180, + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 65 + } + }, + "callee": { + "type": "MemberExpression", + "start": 145, + "end": 155, + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 40 + } + }, + "object": { + "type": "Identifier", + "start": 145, + "end": 149, + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 150, + "end": 155, + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 6, + "column": 40 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 156, + "end": 179, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 64 + } + }, + "left": { + "type": "CallExpression", + "start": 156, + "end": 169, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 54 + } + }, + "callee": { + "type": "MemberExpression", + "start": 156, + "end": 167, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 52 + } + }, + "object": { + "type": "Identifier", + "start": 156, + "end": 160, + "loc": { + "start": { + "line": 6, + "column": 41 + }, + "end": { + "line": 6, + "column": 45 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 161, + "end": 167, + "loc": { + "start": { + "line": 6, + "column": 46 + }, + "end": { + "line": 6, + "column": 52 + }, + "identifierName": "random" + }, + "name": "random" + }, + "computed": false + }, + "arguments": [] + }, + "operator": "*", + "right": { + "type": "BinaryExpression", + "start": 173, + "end": 178, + "loc": { + "start": { + "line": 6, + "column": 58 + }, + "end": { + "line": 6, + "column": 63 + } + }, + "left": { + "type": "Identifier", + "start": 173, + "end": 174, + "loc": { + "start": { + "line": 6, + "column": 58 + }, + "end": { + "line": 6, + "column": 59 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 177, + "end": 178, + "loc": { + "start": { + "line": 6, + "column": 62 + }, + "end": { + "line": 6, + "column": 63 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesized": true, + "parenStart": 172 + } + } + } + ] + } } }, - "body": [ - { - "type": "ReturnStatement", - "start": 153, - "end": 206, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 182, + "end": 205, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 23 + } + }, + "declaration": { + "type": "Identifier", + "start": 197, + "end": 204, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 22 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 182, + "end": 205, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 23 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 115, + "end": 181, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 66 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 121, + "end": 180, + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 65 + } + }, + "id": { + "type": "Identifier", + "start": 121, + "end": 128, "loc": { "start": { - "line": 8, - "column": 1 + "line": 6, + "column": 6 }, "end": { - "line": 8, - "column": 54 + "line": 6, + "column": 13 + }, + "identifierName": "randint" + }, + "name": "randint", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 131, + "end": 180, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 65 } }, - "argument": { + "id": { + "type": "Identifier", + "start": 121, + "end": 128, + "loc": { + "start": { + "line": 6, + "column": 6 + }, + "end": { + "line": 6, + "column": 13 + }, + "identifierName": "randint" + }, + "name": "randint", + "leadingComments": null + }, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 132, + "end": 133, + "loc": { + "start": { + "line": 6, + "column": 17 + }, + "end": { + "line": 6, + "column": 18 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 135, + "end": 136, + "loc": { + "start": { + "line": 6, + "column": 20 + }, + "end": { + "line": 6, + "column": 21 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { "type": "BinaryExpression", - "start": 160, - "end": 204, + "start": 141, + "end": 180, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 26 }, "end": { - "line": 8, - "column": 52 + "line": 6, + "column": 65 } }, "left": { "type": "Identifier", - "start": 160, - "end": 161, + "start": 141, + "end": 142, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 26 }, "end": { - "line": 8, - "column": 9 + "line": 6, + "column": 27 }, "identifierName": "i" }, @@ -178,44 +575,44 @@ "operator": "+", "right": { "type": "CallExpression", - "start": 164, - "end": 204, + "start": 145, + "end": 180, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 30 }, "end": { - "line": 8, - "column": 52 + "line": 6, + "column": 65 } }, "callee": { "type": "MemberExpression", - "start": 164, - "end": 174, + "start": 145, + "end": 155, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 30 }, "end": { - "line": 8, - "column": 22 + "line": 6, + "column": 40 } }, "object": { "type": "Identifier", - "start": 164, - "end": 168, + "start": 145, + "end": 149, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 30 }, "end": { - "line": 8, - "column": 16 + "line": 6, + "column": 34 }, "identifierName": "Math" }, @@ -223,16 +620,16 @@ }, "property": { "type": "Identifier", - "start": 169, - "end": 174, + "start": 150, + "end": 155, "loc": { "start": { - "line": 8, - "column": 17 + "line": 6, + "column": 35 }, "end": { - "line": 8, - "column": 22 + "line": 6, + "column": 40 }, "identifierName": "floor" }, @@ -243,58 +640,58 @@ "arguments": [ { "type": "BinaryExpression", - "start": 176, - "end": 202, + "start": 156, + "end": 179, "loc": { "start": { - "line": 8, - "column": 24 + "line": 6, + "column": 41 }, "end": { - "line": 8, - "column": 50 + "line": 6, + "column": 64 } }, "left": { "type": "CallExpression", - "start": 176, - "end": 190, + "start": 156, + "end": 169, "loc": { "start": { - "line": 8, - "column": 24 + "line": 6, + "column": 41 }, "end": { - "line": 8, - "column": 38 + "line": 6, + "column": 54 } }, "callee": { "type": "MemberExpression", - "start": 176, - "end": 187, + "start": 156, + "end": 167, "loc": { "start": { - "line": 8, - "column": 24 + "line": 6, + "column": 41 }, "end": { - "line": 8, - "column": 35 + "line": 6, + "column": 52 } }, "object": { "type": "Identifier", - "start": 176, - "end": 180, + "start": 156, + "end": 160, "loc": { "start": { - "line": 8, - "column": 24 + "line": 6, + "column": 41 }, "end": { - "line": 8, - "column": 28 + "line": 6, + "column": 45 }, "identifierName": "Math" }, @@ -302,16 +699,16 @@ }, "property": { "type": "Identifier", - "start": 181, - "end": 187, + "start": 161, + "end": 167, "loc": { "start": { - "line": 8, - "column": 29 + "line": 6, + "column": 46 }, "end": { - "line": 8, - "column": 35 + "line": 6, + "column": 52 }, "identifierName": "random" }, @@ -324,30 +721,30 @@ "operator": "*", "right": { "type": "BinaryExpression", - "start": 195, - "end": 200, + "start": 173, + "end": 178, "loc": { "start": { - "line": 8, - "column": 43 + "line": 6, + "column": 58 }, "end": { - "line": 8, - "column": 48 + "line": 6, + "column": 63 } }, "left": { "type": "Identifier", - "start": 195, - "end": 196, + "start": 173, + "end": 174, "loc": { "start": { - "line": 8, - "column": 43 + "line": 6, + "column": 58 }, "end": { - "line": 8, - "column": 44 + "line": 6, + "column": 59 }, "identifierName": "j" }, @@ -356,16 +753,16 @@ "operator": "-", "right": { "type": "Identifier", - "start": 199, - "end": 200, + "start": 177, + "end": 178, "loc": { "start": { - "line": 8, - "column": 47 + "line": 6, + "column": 62 }, "end": { - "line": 8, - "column": 48 + "line": 6, + "column": 63 }, "identifierName": "i" }, @@ -373,55 +770,38 @@ }, "extra": { "parenthesized": true, - "parenStart": 193 + "parenStart": 172 } } } ] } } - } - ], - "directives": [] - }, + }, + "leadingComments": null + } + ], + "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 114, + "start": 0, + "end": 113, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } } ], "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 114, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - } - } - ] + } } ], "directives": [] @@ -430,15 +810,15 @@ { "type": "CommentBlock", "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 114, + "start": 0, + "end": 113, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } @@ -448,23 +828,23 @@ { "type": "CommentBlock", "value": "*\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n ", - "start": 1, - "end": 114, + "start": 0, + "end": 113, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 4, "column": 3 } } }, { "type": { - "label": "export", - "keyword": "export", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -475,24 +855,23 @@ "binop": null, "updateContext": null }, - "value": "export", - "start": 116, - "end": 122, + "value": "const", + "start": 115, + "end": 120, "loc": { "start": { - "line": 7, + "line": 6, "column": 0 }, "end": { - "line": 7, - "column": 6 + "line": 6, + "column": 5 } } }, { "type": { - "label": "function", - "keyword": "function", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -502,43 +881,44 @@ "postfix": false, "binop": null }, - "value": "function", - "start": 123, - "end": 131, + "value": "randint", + "start": 121, + "end": 128, "loc": { "start": { - "line": 7, - "column": 7 + "line": 6, + "column": 6 }, "end": { - "line": 7, - "column": 15 + "line": 6, + "column": 13 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "=", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "randint", - "start": 132, - "end": 139, + "value": "=", + "start": 129, + "end": 130, "loc": { "start": { - "line": 7, - "column": 16 + "line": 6, + "column": 14 }, "end": { - "line": 7, - "column": 23 + "line": 6, + "column": 15 } } }, @@ -554,16 +934,16 @@ "postfix": false, "binop": null }, - "start": 140, - "end": 141, + "start": 131, + "end": 132, "loc": { "start": { - "line": 7, - "column": 24 + "line": 6, + "column": 16 }, "end": { - "line": 7, - "column": 25 + "line": 6, + "column": 17 } } }, @@ -580,16 +960,16 @@ "binop": null }, "value": "i", - "start": 142, - "end": 143, + "start": 132, + "end": 133, "loc": { "start": { - "line": 7, - "column": 26 + "line": 6, + "column": 17 }, "end": { - "line": 7, - "column": 27 + "line": 6, + "column": 18 } } }, @@ -606,16 +986,16 @@ "binop": null, "updateContext": null }, - "start": 144, - "end": 145, + "start": 133, + "end": 134, "loc": { "start": { - "line": 7, - "column": 28 + "line": 6, + "column": 18 }, "end": { - "line": 7, - "column": 29 + "line": 6, + "column": 19 } } }, @@ -632,16 +1012,16 @@ "binop": null }, "value": "j", - "start": 146, - "end": 147, + "start": 135, + "end": 136, "loc": { "start": { - "line": 7, - "column": 30 + "line": 6, + "column": 20 }, "end": { - "line": 7, - "column": 31 + "line": 6, + "column": 21 } } }, @@ -657,48 +1037,22 @@ "postfix": false, "binop": null }, - "start": 148, - "end": 149, - "loc": { - "start": { - "line": 7, - "column": 32 - }, - "end": { - "line": 7, - "column": 33 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 150, - "end": 151, + "start": 136, + "end": 137, "loc": { "start": { - "line": 7, - "column": 34 + "line": 6, + "column": 21 }, "end": { - "line": 7, - "column": 35 + "line": 6, + "column": 22 } } }, { "type": { - "label": "return", - "keyword": "return", + "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, @@ -709,17 +1063,16 @@ "binop": null, "updateContext": null }, - "value": "return", - "start": 153, - "end": 159, + "start": 138, + "end": 140, "loc": { "start": { - "line": 8, - "column": 1 + "line": 6, + "column": 23 }, "end": { - "line": 8, - "column": 7 + "line": 6, + "column": 25 } } }, @@ -736,16 +1089,16 @@ "binop": null }, "value": "i", - "start": 160, - "end": 161, + "start": 141, + "end": 142, "loc": { "start": { - "line": 8, - "column": 8 + "line": 6, + "column": 26 }, "end": { - "line": 8, - "column": 9 + "line": 6, + "column": 27 } } }, @@ -763,16 +1116,16 @@ "updateContext": null }, "value": "+", - "start": 162, - "end": 163, + "start": 143, + "end": 144, "loc": { "start": { - "line": 8, - "column": 10 + "line": 6, + "column": 28 }, "end": { - "line": 8, - "column": 11 + "line": 6, + "column": 29 } } }, @@ -789,16 +1142,16 @@ "binop": null }, "value": "Math", - "start": 164, - "end": 168, + "start": 145, + "end": 149, "loc": { "start": { - "line": 8, - "column": 12 + "line": 6, + "column": 30 }, "end": { - "line": 8, - "column": 16 + "line": 6, + "column": 34 } } }, @@ -815,16 +1168,16 @@ "binop": null, "updateContext": null }, - "start": 168, - "end": 169, + "start": 149, + "end": 150, "loc": { "start": { - "line": 8, - "column": 16 + "line": 6, + "column": 34 }, "end": { - "line": 8, - "column": 17 + "line": 6, + "column": 35 } } }, @@ -841,16 +1194,16 @@ "binop": null }, "value": "floor", - "start": 169, - "end": 174, + "start": 150, + "end": 155, "loc": { "start": { - "line": 8, - "column": 17 + "line": 6, + "column": 35 }, "end": { - "line": 8, - "column": 22 + "line": 6, + "column": 40 } } }, @@ -866,16 +1219,16 @@ "postfix": false, "binop": null }, - "start": 174, - "end": 175, + "start": 155, + "end": 156, "loc": { "start": { - "line": 8, - "column": 22 + "line": 6, + "column": 40 }, "end": { - "line": 8, - "column": 23 + "line": 6, + "column": 41 } } }, @@ -892,16 +1245,16 @@ "binop": null }, "value": "Math", - "start": 176, - "end": 180, + "start": 156, + "end": 160, "loc": { "start": { - "line": 8, - "column": 24 + "line": 6, + "column": 41 }, "end": { - "line": 8, - "column": 28 + "line": 6, + "column": 45 } } }, @@ -918,16 +1271,16 @@ "binop": null, "updateContext": null }, - "start": 180, - "end": 181, + "start": 160, + "end": 161, "loc": { "start": { - "line": 8, - "column": 28 + "line": 6, + "column": 45 }, "end": { - "line": 8, - "column": 29 + "line": 6, + "column": 46 } } }, @@ -944,16 +1297,16 @@ "binop": null }, "value": "random", - "start": 181, - "end": 187, + "start": 161, + "end": 167, "loc": { "start": { - "line": 8, - "column": 29 + "line": 6, + "column": 46 }, "end": { - "line": 8, - "column": 35 + "line": 6, + "column": 52 } } }, @@ -969,16 +1322,16 @@ "postfix": false, "binop": null }, - "start": 187, - "end": 188, + "start": 167, + "end": 168, "loc": { "start": { - "line": 8, - "column": 35 + "line": 6, + "column": 52 }, "end": { - "line": 8, - "column": 36 + "line": 6, + "column": 53 } } }, @@ -994,16 +1347,16 @@ "postfix": false, "binop": null }, - "start": 189, - "end": 190, + "start": 168, + "end": 169, "loc": { "start": { - "line": 8, - "column": 37 + "line": 6, + "column": 53 }, "end": { - "line": 8, - "column": 38 + "line": 6, + "column": 54 } } }, @@ -1021,16 +1374,16 @@ "updateContext": null }, "value": "*", - "start": 191, - "end": 192, + "start": 170, + "end": 171, "loc": { "start": { - "line": 8, - "column": 39 + "line": 6, + "column": 55 }, "end": { - "line": 8, - "column": 40 + "line": 6, + "column": 56 } } }, @@ -1046,16 +1399,16 @@ "postfix": false, "binop": null }, - "start": 193, - "end": 194, + "start": 172, + "end": 173, "loc": { "start": { - "line": 8, - "column": 41 + "line": 6, + "column": 57 }, "end": { - "line": 8, - "column": 42 + "line": 6, + "column": 58 } } }, @@ -1072,16 +1425,16 @@ "binop": null }, "value": "j", - "start": 195, - "end": 196, + "start": 173, + "end": 174, "loc": { "start": { - "line": 8, - "column": 43 + "line": 6, + "column": 58 }, "end": { - "line": 8, - "column": 44 + "line": 6, + "column": 59 } } }, @@ -1099,16 +1452,16 @@ "updateContext": null }, "value": "-", - "start": 197, - "end": 198, + "start": 175, + "end": 176, "loc": { "start": { - "line": 8, - "column": 45 + "line": 6, + "column": 60 }, "end": { - "line": 8, - "column": 46 + "line": 6, + "column": 61 } } }, @@ -1125,16 +1478,16 @@ "binop": null }, "value": "i", - "start": 199, - "end": 200, + "start": 177, + "end": 178, "loc": { "start": { - "line": 8, - "column": 47 + "line": 6, + "column": 62 }, "end": { - "line": 8, - "column": 48 + "line": 6, + "column": 63 } } }, @@ -1150,16 +1503,16 @@ "postfix": false, "binop": null }, - "start": 201, - "end": 202, + "start": 178, + "end": 179, "loc": { "start": { - "line": 8, - "column": 49 + "line": 6, + "column": 63 }, "end": { - "line": 8, - "column": 50 + "line": 6, + "column": 64 } } }, @@ -1175,16 +1528,16 @@ "postfix": false, "binop": null }, - "start": 203, - "end": 204, + "start": 179, + "end": 180, "loc": { "start": { - "line": 8, - "column": 51 + "line": 6, + "column": 64 }, "end": { - "line": 8, - "column": 52 + "line": 6, + "column": 65 } } }, @@ -1201,22 +1554,23 @@ "binop": null, "updateContext": null }, - "start": 205, - "end": 206, + "start": 180, + "end": 181, "loc": { "start": { - "line": 8, - "column": 53 + "line": 6, + "column": 65 }, "end": { - "line": 8, - "column": 54 + "line": 6, + "column": 66 } } }, { "type": { - "label": "}", + "label": "export", + "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -1224,18 +1578,100 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 207, - "end": 208, + "value": "export", + "start": 182, + "end": 188, "loc": { "start": { - "line": 9, + "line": 7, "column": 0 }, "end": { - "line": 9, - "column": 1 + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 189, + "end": 196, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 197, + "end": 204, + "loc": { + "start": { + "line": 7, + "column": 15 + }, + "end": { + "line": 7, + "column": 22 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 204, + "end": 205, + "loc": { + "start": { + "line": 7, + "column": 22 + }, + "end": { + "line": 7, + "column": 23 } } }, @@ -1252,15 +1688,15 @@ "binop": null, "updateContext": null }, - "start": 210, - "end": 210, + "start": 206, + "end": 206, "loc": { "start": { - "line": 11, + "line": 8, "column": 0 }, "end": { - "line": 11, + "line": 8, "column": 0 } } diff --git a/ast/source/api/randrange.js.json b/ast/source/api/randrange.js.json index e530d24..f0b0818 100644 --- a/ast/source/api/randrange.js.json +++ b/ast/source/api/randrange.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 497, + "end": 473, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 23, + "line": 21, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 497, + "end": 473, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 23, + "line": 21, "column": 0 } }, @@ -31,7 +31,7 @@ { "type": "ImportDeclaration", "start": 0, - "end": 37, + "end": 35, "loc": { "start": { "line": 1, @@ -39,53 +39,36 @@ }, "end": { "line": 1, - "column": 37 + "column": 35 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 9, - "end": 16, + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 14, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 16 + "column": 14 } }, - "imported": { - "type": "Identifier", - "start": 9, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 16 - }, - "identifierName": "randint" - }, - "name": "randint" - }, "local": { "type": "Identifier", - "start": 9, - "end": 16, + "start": 7, + "end": 14, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 16 + "column": 14 }, "identifierName": "randint" }, @@ -95,30 +78,30 @@ ], "source": { "type": "StringLiteral", - "start": 24, - "end": 35, + "start": 20, + "end": 34, "loc": { "start": { "line": 1, - "column": 24 + "column": 20 }, "end": { "line": 1, - "column": 35 + "column": 34 } }, "extra": { - "rawValue": "./randint", - "raw": "'./randint'" + "rawValue": "./randint.js", + "raw": "'./randint.js'" }, - "value": "./randint" + "value": "./randint.js" }, "trailingComments": [ { "type": "CommentBlock", "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", - "start": 39, - "end": 115, + "start": 37, + "end": 113, "loc": { "start": { "line": 3, @@ -133,856 +116,2056 @@ ] }, { - "type": "ExportNamedDeclaration", - "start": 117, - "end": 495, + "type": "Identifier", + "start": 115, + "end": 445, "loc": { "start": { "line": 7, "column": 0 }, "end": { - "line": 21, - "column": 1 + "line": 18, + "column": 2 } }, - "specifiers": [], - "source": null, - "declaration": { - "type": "FunctionDeclaration", - "start": 124, - "end": 495, - "loc": { - "start": { - "line": 7, - "column": 7 - }, - "end": { - "line": 21, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 133, - "end": 142, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 121, + "end": 444, "loc": { "start": { "line": 7, - "column": 16 + "column": 6 }, "end": { - "line": 7, - "column": 25 - }, - "identifierName": "randrange" - }, - "name": "randrange", - "leadingComments": null - }, - "generator": false, - "expression": false, - "async": false, - "params": [ - { - "type": "Identifier", - "start": 145, - "end": 150, - "loc": { - "start": { - "line": 7, - "column": 28 - }, - "end": { - "line": 7, - "column": 33 - }, - "identifierName": "start" - }, - "name": "start" + "line": 18, + "column": 1 + } }, - { + "id": { "type": "Identifier", - "start": 153, - "end": 157, + "start": 121, + "end": 130, "loc": { "start": { "line": 7, - "column": 36 + "column": 6 }, "end": { "line": 7, - "column": 40 + "column": 15 }, - "identifierName": "stop" + "identifierName": "randrange" }, - "name": "stop" + "name": "randrange", + "leadingComments": null }, - { - "type": "Identifier", - "start": 160, - "end": 164, + "init": { + "type": "ArrowFunctionExpression", + "start": 133, + "end": 444, "loc": { "start": { "line": 7, - "column": 43 + "column": 18 }, "end": { - "line": 7, - "column": 47 - }, - "identifierName": "step" - }, - "name": "step" - } - ], - "body": { - "type": "BlockStatement", - "start": 167, - "end": 495, - "loc": { - "start": { - "line": 7, - "column": 50 + "line": 18, + "column": 1 + } }, - "end": { - "line": 21, - "column": 1 - } - }, - "body": [ - { - "type": "IfStatement", - "start": 201, - "end": 256, - "loc": { - "start": { - "line": 11, - "column": 1 - }, - "end": { - "line": 11, - "column": 56 - } - }, - "test": { - "type": "BinaryExpression", - "start": 206, - "end": 224, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 134, + "end": 139, "loc": { "start": { - "line": 11, - "column": 6 + "line": 7, + "column": 19 }, "end": { - "line": 11, + "line": 7, "column": 24 - } - }, - "left": { - "type": "Identifier", - "start": 206, - "end": 210, - "loc": { - "start": { - "line": 11, - "column": 6 - }, - "end": { - "line": 11, - "column": 10 - }, - "identifierName": "stop" }, - "name": "stop", - "leadingComments": null + "identifierName": "start" }, - "operator": "===", - "right": { - "type": "Identifier", - "start": 215, - "end": 224, - "loc": { - "start": { - "line": 11, - "column": 15 - }, - "end": { - "line": 11, - "column": 24 - }, - "identifierName": "undefined" + "name": "start" + }, + { + "type": "Identifier", + "start": 141, + "end": 145, + "loc": { + "start": { + "line": 7, + "column": 26 + }, + "end": { + "line": 7, + "column": 30 }, - "name": "undefined" + "identifierName": "stop" }, - "leadingComments": null + "name": "stop" }, - "consequent": { - "type": "ReturnStatement", - "start": 227, - "end": 256, + { + "type": "Identifier", + "start": 147, + "end": 151, "loc": { "start": { - "line": 11, - "column": 27 + "line": 7, + "column": 32 }, "end": { - "line": 11, - "column": 56 - } + "line": 7, + "column": 36 + }, + "identifierName": "step" + }, + "name": "step" + } + ], + "body": { + "type": "BlockStatement", + "start": 156, + "end": 444, + "loc": { + "start": { + "line": 7, + "column": 41 }, - "argument": { - "type": "CallExpression", - "start": 234, - "end": 254, + "end": { + "line": 18, + "column": 1 + } + }, + "body": [ + { + "type": "IfStatement", + "start": 189, + "end": 238, "loc": { "start": { - "line": 11, - "column": 34 + "line": 10, + "column": 1 }, "end": { - "line": 11, - "column": 54 + "line": 10, + "column": 50 } }, - "callee": { - "type": "Identifier", - "start": 234, - "end": 241, + "test": { + "type": "BinaryExpression", + "start": 193, + "end": 211, "loc": { "start": { - "line": 11, - "column": 34 + "line": 10, + "column": 5 }, "end": { - "line": 11, - "column": 41 - }, - "identifierName": "randint" + "line": 10, + "column": 23 + } }, - "name": "randint" - }, - "arguments": [ - { - "type": "NumericLiteral", - "start": 243, - "end": 244, + "left": { + "type": "Identifier", + "start": 193, + "end": 197, "loc": { "start": { - "line": 11, - "column": 43 + "line": 10, + "column": 5 }, "end": { - "line": 11, - "column": 44 - } - }, - "extra": { - "rawValue": 0, - "raw": "0" + "line": 10, + "column": 9 + }, + "identifierName": "stop" }, - "value": 0 + "name": "stop", + "leadingComments": null }, - { + "operator": "===", + "right": { "type": "Identifier", - "start": 247, - "end": 252, + "start": 202, + "end": 211, "loc": { "start": { - "line": 11, - "column": 47 + "line": 10, + "column": 14 }, "end": { - "line": 11, - "column": 52 + "line": 10, + "column": 23 }, - "identifierName": "start" + "identifierName": "undefined" }, - "name": "start" - } - ] - } - }, - "alternate": null, - "leadingComments": [ - { - "type": "CommentLine", - "value": " TODO handle empty ranges", - "start": 171, - "end": 198, - "loc": { - "start": { - "line": 9, - "column": 1 - }, - "end": { - "line": 9, - "column": 28 - } - } - } - ] - }, - { - "type": "IfStatement", - "start": 258, - "end": 294, - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 37 - } - }, - "test": { - "type": "BinaryExpression", - "start": 263, - "end": 281, - "loc": { - "start": { - "line": 12, - "column": 6 - }, - "end": { - "line": 12, - "column": 24 - } - }, - "left": { - "type": "Identifier", - "start": 263, - "end": 267, - "loc": { - "start": { - "line": 12, - "column": 6 + "name": "undefined" }, - "end": { - "line": 12, - "column": 10 - }, - "identifierName": "step" + "leadingComments": null }, - "name": "step" - }, - "operator": "===", - "right": { - "type": "Identifier", - "start": 272, - "end": 281, - "loc": { - "start": { - "line": 12, - "column": 15 - }, - "end": { - "line": 12, - "column": 24 + "consequent": { + "type": "ReturnStatement", + "start": 213, + "end": 238, + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 10, + "column": 50 + } }, - "identifierName": "undefined" - }, - "name": "undefined" - } - }, - "consequent": { - "type": "ExpressionStatement", - "start": 284, - "end": 294, - "loc": { - "start": { - "line": 12, - "column": 27 + "argument": { + "type": "CallExpression", + "start": 220, + "end": 237, + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 220, + "end": 227, + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 39 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 228, + "end": 229, + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 41 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "Identifier", + "start": 231, + "end": 236, + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 48 + }, + "identifierName": "start" + }, + "name": "start" + } + ] + } }, - "end": { - "line": 12, - "column": 37 - } + "alternate": null, + "leadingComments": [ + { + "type": "CommentLine", + "value": " TODO handle empty ranges", + "start": 159, + "end": 186, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 28 + } + } + } + ] }, - "expression": { - "type": "AssignmentExpression", - "start": 284, - "end": 292, + { + "type": "IfStatement", + "start": 240, + "end": 273, "loc": { "start": { - "line": 12, - "column": 27 + "line": 11, + "column": 1 }, "end": { - "line": 12, - "column": 35 + "line": 11, + "column": 34 } }, - "operator": "=", - "left": { - "type": "Identifier", - "start": 284, - "end": 288, + "test": { + "type": "BinaryExpression", + "start": 244, + "end": 262, "loc": { "start": { - "line": 12, - "column": 27 + "line": 11, + "column": 5 }, "end": { - "line": 12, - "column": 31 + "line": 11, + "column": 23 + } + }, + "left": { + "type": "Identifier", + "start": 244, + "end": 248, + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 9 + }, + "identifierName": "step" }, - "identifierName": "step" + "name": "step" }, - "name": "step" + "operator": "===", + "right": { + "type": "Identifier", + "start": 253, + "end": 262, + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 23 + }, + "identifierName": "undefined" + }, + "name": "undefined" + } }, - "right": { - "type": "NumericLiteral", - "start": 291, - "end": 292, + "consequent": { + "type": "ExpressionStatement", + "start": 264, + "end": 273, "loc": { "start": { - "line": 12, - "column": 34 + "line": 11, + "column": 25 }, "end": { - "line": 12, - "column": 35 + "line": 11, + "column": 34 } }, - "extra": { - "rawValue": 1, - "raw": "1" - }, - "value": 1 - } - } + "expression": { + "type": "AssignmentExpression", + "start": 264, + "end": 272, + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "operator": "=", + "left": { + "type": "Identifier", + "start": 264, + "end": 268, + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 29 + }, + "identifierName": "step" + }, + "name": "step" + }, + "right": { + "type": "NumericLiteral", + "start": 271, + "end": 272, + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 276, + "end": 370, + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + }, + "test": { + "type": "BinaryExpression", + "start": 280, + "end": 293, + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 18 + } + }, + "left": { + "type": "Identifier", + "start": 280, + "end": 284, + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 9 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": ">=", + "right": { + "type": "Identifier", + "start": 288, + "end": 293, + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 18 + }, + "identifierName": "start" + }, + "name": "start" + } + }, + "consequent": { + "type": "BlockStatement", + "start": 295, + "end": 370, + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 15, + "column": 2 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 299, + "end": 367, + "loc": { + "start": { + "line": 14, + "column": 2 + }, + "end": { + "line": 14, + "column": 70 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 306, + "end": 366, + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 69 + } + }, + "left": { + "type": "Identifier", + "start": 306, + "end": 311, + "loc": { + "start": { + "line": 14, + "column": 9 + }, + "end": { + "line": 14, + "column": 14 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 314, + "end": 366, + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 69 + } + }, + "left": { + "type": "Identifier", + "start": 314, + "end": 318, + "loc": { + "start": { + "line": 14, + "column": 17 + }, + "end": { + "line": 14, + "column": 21 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "*", + "right": { + "type": "CallExpression", + "start": 321, + "end": 366, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 69 + } + }, + "callee": { + "type": "Identifier", + "start": 321, + "end": 328, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 31 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 329, + "end": 330, + "loc": { + "start": { + "line": 14, + "column": 32 + }, + "end": { + "line": 14, + "column": 33 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "CallExpression", + "start": 332, + "end": 365, + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 68 + } + }, + "callee": { + "type": "MemberExpression", + "start": 332, + "end": 342, + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 45 + } + }, + "object": { + "type": "Identifier", + "start": 332, + "end": 336, + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 39 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 337, + "end": 342, + "loc": { + "start": { + "line": 14, + "column": 40 + }, + "end": { + "line": 14, + "column": 45 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 343, + "end": 364, + "loc": { + "start": { + "line": 14, + "column": 46 + }, + "end": { + "line": 14, + "column": 67 + } + }, + "left": { + "type": "BinaryExpression", + "start": 344, + "end": 356, + "loc": { + "start": { + "line": 14, + "column": 47 + }, + "end": { + "line": 14, + "column": 59 + } + }, + "left": { + "type": "Identifier", + "start": 344, + "end": 348, + "loc": { + "start": { + "line": 14, + "column": 47 + }, + "end": { + "line": 14, + "column": 51 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 351, + "end": 356, + "loc": { + "start": { + "line": 14, + "column": 54 + }, + "end": { + "line": 14, + "column": 59 + }, + "identifierName": "start" + }, + "name": "start" + }, + "extra": { + "parenthesized": true, + "parenStart": 343 + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 360, + "end": 364, + "loc": { + "start": { + "line": 14, + "column": 63 + }, + "end": { + "line": 14, + "column": 67 + }, + "identifierName": "step" + }, + "name": "step" + } + } + ] + } + ] + } + } + } + } + ], + "directives": [] + }, + "alternate": null + }, + { + "type": "ReturnStatement", + "start": 373, + "end": 442, + "loc": { + "start": { + "line": 17, + "column": 1 + }, + "end": { + "line": 17, + "column": 70 + } + }, + "argument": { + "type": "BinaryExpression", + "start": 380, + "end": 441, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 69 + } + }, + "left": { + "type": "Identifier", + "start": 380, + "end": 385, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 13 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 388, + "end": 441, + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 69 + } + }, + "left": { + "type": "Identifier", + "start": 388, + "end": 392, + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 20 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "*", + "right": { + "type": "CallExpression", + "start": 395, + "end": 441, + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 69 + } + }, + "callee": { + "type": "Identifier", + "start": 395, + "end": 402, + "loc": { + "start": { + "line": 17, + "column": 23 + }, + "end": { + "line": 17, + "column": 30 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 403, + "end": 404, + "loc": { + "start": { + "line": 17, + "column": 31 + }, + "end": { + "line": 17, + "column": 32 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "CallExpression", + "start": 406, + "end": 440, + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 17, + "column": 68 + } + }, + "callee": { + "type": "MemberExpression", + "start": 406, + "end": 416, + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 17, + "column": 44 + } + }, + "object": { + "type": "Identifier", + "start": 406, + "end": 410, + "loc": { + "start": { + "line": 17, + "column": 34 + }, + "end": { + "line": 17, + "column": 38 + }, + "identifierName": "Math" + }, + "name": "Math" + }, + "property": { + "type": "Identifier", + "start": 411, + "end": 416, + "loc": { + "start": { + "line": 17, + "column": 39 + }, + "end": { + "line": 17, + "column": 44 + }, + "identifierName": "floor" + }, + "name": "floor" + }, + "computed": false + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 417, + "end": 439, + "loc": { + "start": { + "line": 17, + "column": 45 + }, + "end": { + "line": 17, + "column": 67 + } + }, + "left": { + "type": "BinaryExpression", + "start": 418, + "end": 430, + "loc": { + "start": { + "line": 17, + "column": 46 + }, + "end": { + "line": 17, + "column": 58 + } + }, + "left": { + "type": "Identifier", + "start": 418, + "end": 423, + "loc": { + "start": { + "line": 17, + "column": 46 + }, + "end": { + "line": 17, + "column": 51 + }, + "identifierName": "start" + }, + "name": "start" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 426, + "end": 430, + "loc": { + "start": { + "line": 17, + "column": 54 + }, + "end": { + "line": 17, + "column": 58 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "extra": { + "parenthesized": true, + "parenStart": 417 + } + }, + "operator": "/", + "right": { + "type": "UnaryExpression", + "start": 434, + "end": 439, + "loc": { + "start": { + "line": 17, + "column": 62 + }, + "end": { + "line": 17, + "column": 67 + } + }, + "operator": "-", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 435, + "end": 439, + "loc": { + "start": { + "line": 17, + "column": 63 + }, + "end": { + "line": 17, + "column": 67 + }, + "identifierName": "step" + }, + "name": "step" + }, + "extra": { + "parenthesizedArgument": false + } + } + } + ] + } + ] + } + } + } + } + ], + "directives": [] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 447, + "end": 472, + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 25 + } + }, + "declaration": { + "type": "Identifier", + "start": 462, + "end": 471, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 24 + }, + "identifierName": "randrange" + }, + "name": "randrange" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 447, + "end": 472, + "loc": { + "start": { + "line": 20, + "column": 0 + }, + "end": { + "line": 20, + "column": 25 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 115, + "end": 445, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 18, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 121, + "end": 444, + "loc": { + "start": { + "line": 7, + "column": 6 }, - "alternate": null + "end": { + "line": 18, + "column": 1 + } }, - { - "type": "IfStatement", - "start": 297, - "end": 492, + "id": { + "type": "Identifier", + "start": 121, + "end": 130, "loc": { "start": { - "line": 14, - "column": 1 + "line": 7, + "column": 6 + }, + "end": { + "line": 7, + "column": 15 + }, + "identifierName": "randrange" + }, + "name": "randrange", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 133, + "end": 444, + "loc": { + "start": { + "line": 7, + "column": 18 }, "end": { - "line": 19, - "column": 2 + "line": 18, + "column": 1 } }, - "test": { - "type": "BinaryExpression", - "start": 302, - "end": 315, + "id": { + "type": "Identifier", + "start": 121, + "end": 130, "loc": { "start": { - "line": 14, + "line": 7, "column": 6 }, "end": { - "line": 14, - "column": 19 - } + "line": 7, + "column": 15 + }, + "identifierName": "randrange" + }, + "name": "randrange", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 134, + "end": 139, + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 24 + }, + "identifierName": "start" + }, + "name": "start" }, - "left": { + { "type": "Identifier", - "start": 302, - "end": 306, + "start": 141, + "end": 145, "loc": { "start": { - "line": 14, - "column": 6 + "line": 7, + "column": 26 }, "end": { - "line": 14, - "column": 10 + "line": 7, + "column": 30 }, "identifierName": "stop" }, "name": "stop" }, - "operator": ">=", - "right": { + { "type": "Identifier", - "start": 310, - "end": 315, + "start": 147, + "end": 151, "loc": { "start": { - "line": 14, - "column": 14 + "line": 7, + "column": 32 }, "end": { - "line": 14, - "column": 19 + "line": 7, + "column": 36 }, - "identifierName": "start" + "identifierName": "step" }, - "name": "start" + "name": "step" } - }, - "consequent": { + ], + "body": { "type": "BlockStatement", - "start": 318, - "end": 401, + "start": 156, + "end": 444, "loc": { "start": { - "line": 14, - "column": 22 + "line": 7, + "column": 41 }, "end": { - "line": 16, - "column": 2 + "line": 18, + "column": 1 } }, "body": [ { - "type": "ReturnStatement", - "start": 322, - "end": 398, + "type": "IfStatement", + "start": 189, + "end": 238, "loc": { "start": { - "line": 15, - "column": 2 + "line": 10, + "column": 1 }, "end": { - "line": 15, - "column": 78 + "line": 10, + "column": 50 } }, - "argument": { + "test": { "type": "BinaryExpression", - "start": 329, - "end": 396, + "start": 193, + "end": 211, "loc": { "start": { - "line": 15, - "column": 9 + "line": 10, + "column": 5 }, "end": { - "line": 15, - "column": 76 + "line": 10, + "column": 23 } }, "left": { "type": "Identifier", - "start": 329, - "end": 334, + "start": 193, + "end": 197, "loc": { "start": { - "line": 15, - "column": 9 + "line": 10, + "column": 5 }, "end": { - "line": 15, + "line": 10, + "column": 9 + }, + "identifierName": "stop" + }, + "name": "stop", + "leadingComments": null + }, + "operator": "===", + "right": { + "type": "Identifier", + "start": 202, + "end": 211, + "loc": { + "start": { + "line": 10, "column": 14 }, - "identifierName": "start" + "end": { + "line": 10, + "column": 23 + }, + "identifierName": "undefined" }, - "name": "start" + "name": "undefined" }, - "operator": "+", + "leadingComments": null + }, + "consequent": { + "type": "ReturnStatement", + "start": 213, + "end": 238, + "loc": { + "start": { + "line": 10, + "column": 25 + }, + "end": { + "line": 10, + "column": 50 + } + }, + "argument": { + "type": "CallExpression", + "start": 220, + "end": 237, + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 49 + } + }, + "callee": { + "type": "Identifier", + "start": 220, + "end": 227, + "loc": { + "start": { + "line": 10, + "column": 32 + }, + "end": { + "line": 10, + "column": 39 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 228, + "end": 229, + "loc": { + "start": { + "line": 10, + "column": 40 + }, + "end": { + "line": 10, + "column": 41 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "Identifier", + "start": 231, + "end": 236, + "loc": { + "start": { + "line": 10, + "column": 43 + }, + "end": { + "line": 10, + "column": 48 + }, + "identifierName": "start" + }, + "name": "start" + } + ] + } + }, + "alternate": null, + "leadingComments": [ + { + "type": "CommentLine", + "value": " TODO handle empty ranges", + "start": 159, + "end": 186, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 28 + } + } + } + ] + }, + { + "type": "IfStatement", + "start": 240, + "end": 273, + "loc": { + "start": { + "line": 11, + "column": 1 + }, + "end": { + "line": 11, + "column": 34 + } + }, + "test": { + "type": "BinaryExpression", + "start": 244, + "end": 262, + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 23 + } + }, + "left": { + "type": "Identifier", + "start": 244, + "end": 248, + "loc": { + "start": { + "line": 11, + "column": 5 + }, + "end": { + "line": 11, + "column": 9 + }, + "identifierName": "step" + }, + "name": "step" + }, + "operator": "===", "right": { - "type": "BinaryExpression", - "start": 337, - "end": 396, + "type": "Identifier", + "start": 253, + "end": 262, + "loc": { + "start": { + "line": 11, + "column": 14 + }, + "end": { + "line": 11, + "column": 23 + }, + "identifierName": "undefined" + }, + "name": "undefined" + } + }, + "consequent": { + "type": "ExpressionStatement", + "start": 264, + "end": 273, + "loc": { + "start": { + "line": 11, + "column": 25 + }, + "end": { + "line": 11, + "column": 34 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 264, + "end": 272, "loc": { "start": { - "line": 15, - "column": 17 + "line": 11, + "column": 25 }, "end": { - "line": 15, - "column": 76 + "line": 11, + "column": 33 } }, + "operator": "=", "left": { "type": "Identifier", - "start": 337, - "end": 341, + "start": 264, + "end": 268, "loc": { "start": { - "line": 15, - "column": 17 + "line": 11, + "column": 25 }, "end": { - "line": 15, - "column": 21 + "line": 11, + "column": 29 }, "identifierName": "step" }, - "name": "step" + "name": "step" + }, + "right": { + "type": "NumericLiteral", + "start": 271, + "end": 272, + "loc": { + "start": { + "line": 11, + "column": 32 + }, + "end": { + "line": 11, + "column": 33 + } + }, + "extra": { + "rawValue": 1, + "raw": "1" + }, + "value": 1 + } + } + }, + "alternate": null + }, + { + "type": "IfStatement", + "start": 276, + "end": 370, + "loc": { + "start": { + "line": 13, + "column": 1 + }, + "end": { + "line": 15, + "column": 2 + } + }, + "test": { + "type": "BinaryExpression", + "start": 280, + "end": 293, + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 18 + } + }, + "left": { + "type": "Identifier", + "start": 280, + "end": 284, + "loc": { + "start": { + "line": 13, + "column": 5 + }, + "end": { + "line": 13, + "column": 9 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": ">=", + "right": { + "type": "Identifier", + "start": 288, + "end": 293, + "loc": { + "start": { + "line": 13, + "column": 13 + }, + "end": { + "line": 13, + "column": 18 + }, + "identifierName": "start" }, - "operator": "*", - "right": { - "type": "CallExpression", - "start": 344, - "end": 396, + "name": "start" + } + }, + "consequent": { + "type": "BlockStatement", + "start": 295, + "end": 370, + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 15, + "column": 2 + } + }, + "body": [ + { + "type": "ReturnStatement", + "start": 299, + "end": 367, "loc": { "start": { - "line": 15, - "column": 24 + "line": 14, + "column": 2 }, "end": { - "line": 15, - "column": 76 + "line": 14, + "column": 70 } }, - "callee": { - "type": "Identifier", - "start": 344, - "end": 351, + "argument": { + "type": "BinaryExpression", + "start": 306, + "end": 366, "loc": { "start": { - "line": 15, - "column": 24 + "line": 14, + "column": 9 }, "end": { - "line": 15, - "column": 31 - }, - "identifierName": "randint" + "line": 14, + "column": 69 + } }, - "name": "randint" - }, - "arguments": [ - { - "type": "NumericLiteral", - "start": 353, - "end": 354, + "left": { + "type": "Identifier", + "start": 306, + "end": 311, "loc": { "start": { - "line": 15, - "column": 33 + "line": 14, + "column": 9 }, "end": { - "line": 15, - "column": 34 - } - }, - "extra": { - "rawValue": 0, - "raw": "0" + "line": 14, + "column": 14 + }, + "identifierName": "start" }, - "value": 0 + "name": "start" }, - { - "type": "CallExpression", - "start": 357, - "end": 394, + "operator": "+", + "right": { + "type": "BinaryExpression", + "start": 314, + "end": 366, "loc": { "start": { - "line": 15, - "column": 37 + "line": 14, + "column": 17 }, "end": { - "line": 15, - "column": 74 + "line": 14, + "column": 69 } }, - "callee": { - "type": "MemberExpression", - "start": 357, - "end": 367, + "left": { + "type": "Identifier", + "start": 314, + "end": 318, "loc": { "start": { - "line": 15, - "column": 37 + "line": 14, + "column": 17 }, "end": { - "line": 15, - "column": 47 - } + "line": 14, + "column": 21 + }, + "identifierName": "step" }, - "object": { - "type": "Identifier", - "start": 357, - "end": 361, - "loc": { - "start": { - "line": 15, - "column": 37 - }, - "end": { - "line": 15, - "column": 41 - }, - "identifierName": "Math" + "name": "step" + }, + "operator": "*", + "right": { + "type": "CallExpression", + "start": 321, + "end": 366, + "loc": { + "start": { + "line": 14, + "column": 24 }, - "name": "Math" + "end": { + "line": 14, + "column": 69 + } }, - "property": { + "callee": { "type": "Identifier", - "start": 362, - "end": 367, + "start": 321, + "end": 328, "loc": { "start": { - "line": 15, - "column": 42 + "line": 14, + "column": 24 }, "end": { - "line": 15, - "column": 47 + "line": 14, + "column": 31 }, - "identifierName": "floor" + "identifierName": "randint" }, - "name": "floor" + "name": "randint" }, - "computed": false - }, - "arguments": [ - { - "type": "BinaryExpression", - "start": 369, - "end": 392, - "loc": { - "start": { - "line": 15, - "column": 49 + "arguments": [ + { + "type": "NumericLiteral", + "start": 329, + "end": 330, + "loc": { + "start": { + "line": 14, + "column": 32 + }, + "end": { + "line": 14, + "column": 33 + } }, - "end": { - "line": 15, - "column": 72 - } + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 }, - "left": { - "type": "BinaryExpression", - "start": 371, - "end": 383, + { + "type": "CallExpression", + "start": 332, + "end": 365, "loc": { "start": { - "line": 15, - "column": 51 + "line": 14, + "column": 35 }, "end": { - "line": 15, - "column": 63 + "line": 14, + "column": 68 } }, - "left": { - "type": "Identifier", - "start": 371, - "end": 375, + "callee": { + "type": "MemberExpression", + "start": 332, + "end": 342, "loc": { "start": { - "line": 15, - "column": 51 + "line": 14, + "column": 35 }, "end": { - "line": 15, - "column": 55 - }, - "identifierName": "stop" + "line": 14, + "column": 45 + } }, - "name": "stop" - }, - "operator": "-", - "right": { - "type": "Identifier", - "start": 378, - "end": 383, - "loc": { - "start": { - "line": 15, - "column": 58 + "object": { + "type": "Identifier", + "start": 332, + "end": 336, + "loc": { + "start": { + "line": 14, + "column": 35 + }, + "end": { + "line": 14, + "column": 39 + }, + "identifierName": "Math" }, - "end": { - "line": 15, - "column": 63 - }, - "identifierName": "start" + "name": "Math" }, - "name": "start" - }, - "extra": { - "parenthesized": true, - "parenStart": 369 - } - }, - "operator": "/", - "right": { - "type": "Identifier", - "start": 388, - "end": 392, - "loc": { - "start": { - "line": 15, - "column": 68 - }, - "end": { - "line": 15, - "column": 72 + "property": { + "type": "Identifier", + "start": 337, + "end": 342, + "loc": { + "start": { + "line": 14, + "column": 40 + }, + "end": { + "line": 14, + "column": 45 + }, + "identifierName": "floor" + }, + "name": "floor" }, - "identifierName": "step" + "computed": false }, - "name": "step" + "arguments": [ + { + "type": "BinaryExpression", + "start": 343, + "end": 364, + "loc": { + "start": { + "line": 14, + "column": 46 + }, + "end": { + "line": 14, + "column": 67 + } + }, + "left": { + "type": "BinaryExpression", + "start": 344, + "end": 356, + "loc": { + "start": { + "line": 14, + "column": 47 + }, + "end": { + "line": 14, + "column": 59 + } + }, + "left": { + "type": "Identifier", + "start": 344, + "end": 348, + "loc": { + "start": { + "line": 14, + "column": 47 + }, + "end": { + "line": 14, + "column": 51 + }, + "identifierName": "stop" + }, + "name": "stop" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 351, + "end": 356, + "loc": { + "start": { + "line": 14, + "column": 54 + }, + "end": { + "line": 14, + "column": 59 + }, + "identifierName": "start" + }, + "name": "start" + }, + "extra": { + "parenthesized": true, + "parenStart": 343 + } + }, + "operator": "/", + "right": { + "type": "Identifier", + "start": 360, + "end": 364, + "loc": { + "start": { + "line": 14, + "column": 63 + }, + "end": { + "line": 14, + "column": 67 + }, + "identifierName": "step" + }, + "name": "step" + } + } + ] } - } - ] + ] + } } - ] + } } - } - } - } - ], - "directives": [] - }, - "alternate": { - "type": "BlockStatement", - "start": 408, - "end": 492, - "loc": { - "start": { - "line": 17, - "column": 6 + ], + "directives": [] + }, + "alternate": null }, - "end": { - "line": 19, - "column": 2 - } - }, - "body": [ { "type": "ReturnStatement", - "start": 412, - "end": 489, + "start": 373, + "end": 442, "loc": { "start": { - "line": 18, - "column": 2 + "line": 17, + "column": 1 }, "end": { - "line": 18, - "column": 79 + "line": 17, + "column": 70 } }, "argument": { "type": "BinaryExpression", - "start": 419, - "end": 487, + "start": 380, + "end": 441, "loc": { "start": { - "line": 18, - "column": 9 + "line": 17, + "column": 8 }, "end": { - "line": 18, - "column": 77 + "line": 17, + "column": 69 } }, "left": { "type": "Identifier", - "start": 419, - "end": 424, + "start": 380, + "end": 385, "loc": { "start": { - "line": 18, - "column": 9 + "line": 17, + "column": 8 }, "end": { - "line": 18, - "column": 14 + "line": 17, + "column": 13 }, "identifierName": "start" }, @@ -991,30 +2174,30 @@ "operator": "+", "right": { "type": "BinaryExpression", - "start": 427, - "end": 487, + "start": 388, + "end": 441, "loc": { "start": { - "line": 18, - "column": 17 + "line": 17, + "column": 16 }, "end": { - "line": 18, - "column": 77 + "line": 17, + "column": 69 } }, "left": { "type": "Identifier", - "start": 427, - "end": 431, + "start": 388, + "end": 392, "loc": { "start": { - "line": 18, - "column": 17 + "line": 17, + "column": 16 }, "end": { - "line": 18, - "column": 21 + "line": 17, + "column": 20 }, "identifierName": "step" }, @@ -1023,30 +2206,30 @@ "operator": "*", "right": { "type": "CallExpression", - "start": 434, - "end": 487, + "start": 395, + "end": 441, "loc": { "start": { - "line": 18, - "column": 24 + "line": 17, + "column": 23 }, "end": { - "line": 18, - "column": 77 + "line": 17, + "column": 69 } }, "callee": { "type": "Identifier", - "start": 434, - "end": 441, + "start": 395, + "end": 402, "loc": { "start": { - "line": 18, - "column": 24 + "line": 17, + "column": 23 }, "end": { - "line": 18, - "column": 31 + "line": 17, + "column": 30 }, "identifierName": "randint" }, @@ -1055,16 +2238,16 @@ "arguments": [ { "type": "NumericLiteral", - "start": 443, - "end": 444, + "start": 403, + "end": 404, "loc": { "start": { - "line": 18, - "column": 33 + "line": 17, + "column": 31 }, "end": { - "line": 18, - "column": 34 + "line": 17, + "column": 32 } }, "extra": { @@ -1075,44 +2258,44 @@ }, { "type": "CallExpression", - "start": 447, - "end": 485, + "start": 406, + "end": 440, "loc": { "start": { - "line": 18, - "column": 37 + "line": 17, + "column": 34 }, "end": { - "line": 18, - "column": 75 + "line": 17, + "column": 68 } }, "callee": { "type": "MemberExpression", - "start": 447, - "end": 457, + "start": 406, + "end": 416, "loc": { "start": { - "line": 18, - "column": 37 + "line": 17, + "column": 34 }, "end": { - "line": 18, - "column": 47 + "line": 17, + "column": 44 } }, "object": { "type": "Identifier", - "start": 447, - "end": 451, + "start": 406, + "end": 410, "loc": { "start": { - "line": 18, - "column": 37 + "line": 17, + "column": 34 }, "end": { - "line": 18, - "column": 41 + "line": 17, + "column": 38 }, "identifierName": "Math" }, @@ -1120,16 +2303,16 @@ }, "property": { "type": "Identifier", - "start": 452, - "end": 457, + "start": 411, + "end": 416, "loc": { "start": { - "line": 18, - "column": 42 + "line": 17, + "column": 39 }, "end": { - "line": 18, - "column": 47 + "line": 17, + "column": 44 }, "identifierName": "floor" }, @@ -1140,44 +2323,44 @@ "arguments": [ { "type": "BinaryExpression", - "start": 459, - "end": 483, + "start": 417, + "end": 439, "loc": { "start": { - "line": 18, - "column": 49 + "line": 17, + "column": 45 }, "end": { - "line": 18, - "column": 73 + "line": 17, + "column": 67 } }, "left": { "type": "BinaryExpression", - "start": 461, - "end": 473, + "start": 418, + "end": 430, "loc": { "start": { - "line": 18, - "column": 51 + "line": 17, + "column": 46 }, "end": { - "line": 18, - "column": 63 + "line": 17, + "column": 58 } }, "left": { "type": "Identifier", - "start": 461, - "end": 466, + "start": 418, + "end": 423, "loc": { "start": { - "line": 18, - "column": 51 + "line": 17, + "column": 46 }, "end": { - "line": 18, - "column": 56 + "line": 17, + "column": 51 }, "identifierName": "start" }, @@ -1186,16 +2369,16 @@ "operator": "-", "right": { "type": "Identifier", - "start": 469, - "end": 473, + "start": 426, + "end": 430, "loc": { "start": { - "line": 18, - "column": 59 + "line": 17, + "column": 54 }, "end": { - "line": 18, - "column": 63 + "line": 17, + "column": 58 }, "identifierName": "stop" }, @@ -1203,38 +2386,38 @@ }, "extra": { "parenthesized": true, - "parenStart": 459 + "parenStart": 417 } }, "operator": "/", "right": { "type": "UnaryExpression", - "start": 478, - "end": 483, + "start": 434, + "end": 439, "loc": { "start": { - "line": 18, - "column": 68 + "line": 17, + "column": 62 }, "end": { - "line": 18, - "column": 73 + "line": 17, + "column": 67 } }, "operator": "-", "prefix": true, "argument": { "type": "Identifier", - "start": 479, - "end": 483, + "start": 435, + "end": 439, "loc": { "start": { - "line": 18, - "column": 69 + "line": 17, + "column": 63 }, "end": { - "line": 18, - "column": 73 + "line": 17, + "column": 67 }, "identifierName": "step" }, @@ -1255,16 +2438,17 @@ ], "directives": [] } - } - ], - "directives": [] - }, + }, + "leadingComments": null + } + ], + "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", - "start": 39, - "end": 115, + "start": 37, + "end": 113, "loc": { "start": { "line": 3, @@ -1278,25 +2462,7 @@ } ], "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", - "start": 39, - "end": 115, - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 5, - "column": 3 - } - } - } - ] + } } ], "directives": [] @@ -1305,8 +2471,8 @@ { "type": "CommentBlock", "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", - "start": 39, - "end": 115, + "start": 37, + "end": 113, "loc": { "start": { "line": 3, @@ -1321,15 +2487,15 @@ { "type": "CommentLine", "value": " TODO handle empty ranges", - "start": 171, - "end": 198, + "start": 159, + "end": 186, "loc": { "start": { - "line": 9, + "line": 8, "column": 1 }, "end": { - "line": 9, + "line": 8, "column": 28 } } @@ -1341,7 +2507,7 @@ "label": "import", "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -1364,31 +2530,6 @@ } } }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 7, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, { "type": { "label": "name", @@ -1402,41 +2543,16 @@ "binop": null }, "value": "randint", - "start": 9, - "end": 16, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 16 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 17, - "end": 18, + "start": 7, + "end": 14, "loc": { "start": { "line": 1, - "column": 17 + "column": 7 }, "end": { "line": 1, - "column": 18 + "column": 14 } } }, @@ -1453,16 +2569,16 @@ "binop": null }, "value": "from", - "start": 19, - "end": 23, + "start": 15, + "end": 19, "loc": { "start": { "line": 1, - "column": 19 + "column": 15 }, "end": { "line": 1, - "column": 23 + "column": 19 } } }, @@ -1479,17 +2595,17 @@ "binop": null, "updateContext": null }, - "value": "./randint", - "start": 24, - "end": 35, + "value": "./randint.js", + "start": 20, + "end": 34, "loc": { "start": { "line": 1, - "column": 24 + "column": 20 }, "end": { "line": 1, - "column": 35 + "column": 34 } } }, @@ -1506,24 +2622,24 @@ "binop": null, "updateContext": null }, - "start": 36, - "end": 37, + "start": 34, + "end": 35, "loc": { "start": { "line": 1, - "column": 36 + "column": 34 }, "end": { "line": 1, - "column": 37 + "column": 35 } } }, { "type": "CommentBlock", "value": "*\n * Return a randomly selected element from range(start, stop, step).\n ", - "start": 39, - "end": 115, + "start": 37, + "end": 113, "loc": { "start": { "line": 3, @@ -1537,8 +2653,8 @@ }, { "type": { - "label": "export", - "keyword": "export", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -1549,9 +2665,9 @@ "binop": null, "updateContext": null }, - "value": "export", - "start": 117, - "end": 123, + "value": "const", + "start": 115, + "end": 120, "loc": { "start": { "line": 7, @@ -1559,14 +2675,13 @@ }, "end": { "line": 7, - "column": 6 + "column": 5 } } }, { "type": { - "label": "function", - "keyword": "function", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -1576,13 +2691,13 @@ "postfix": false, "binop": null }, - "value": "function", - "start": 124, - "end": 132, + "value": "randrange", + "start": 121, + "end": 130, "loc": { "start": { "line": 7, - "column": 7 + "column": 6 }, "end": { "line": 7, @@ -1592,19 +2707,20 @@ }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "=", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "randrange", - "start": 133, - "end": 142, + "value": "=", + "start": 131, + "end": 132, "loc": { "start": { "line": 7, @@ -1612,7 +2728,7 @@ }, "end": { "line": 7, - "column": 25 + "column": 17 } } }, @@ -1628,16 +2744,16 @@ "postfix": false, "binop": null }, - "start": 143, - "end": 144, + "start": 133, + "end": 134, "loc": { "start": { "line": 7, - "column": 26 + "column": 18 }, "end": { "line": 7, - "column": 27 + "column": 19 } } }, @@ -1654,16 +2770,16 @@ "binop": null }, "value": "start", - "start": 145, - "end": 150, + "start": 134, + "end": 139, "loc": { "start": { "line": 7, - "column": 28 + "column": 19 }, "end": { "line": 7, - "column": 33 + "column": 24 } } }, @@ -1680,16 +2796,16 @@ "binop": null, "updateContext": null }, - "start": 151, - "end": 152, + "start": 139, + "end": 140, "loc": { "start": { "line": 7, - "column": 34 + "column": 24 }, "end": { "line": 7, - "column": 35 + "column": 25 } } }, @@ -1706,16 +2822,16 @@ "binop": null }, "value": "stop", - "start": 153, - "end": 157, + "start": 141, + "end": 145, "loc": { "start": { "line": 7, - "column": 36 + "column": 26 }, "end": { "line": 7, - "column": 40 + "column": 30 } } }, @@ -1732,16 +2848,16 @@ "binop": null, "updateContext": null }, - "start": 158, - "end": 159, + "start": 145, + "end": 146, "loc": { "start": { "line": 7, - "column": 41 + "column": 30 }, "end": { "line": 7, - "column": 42 + "column": 31 } } }, @@ -1758,16 +2874,16 @@ "binop": null }, "value": "step", - "start": 160, - "end": 164, + "start": 147, + "end": 151, "loc": { "start": { "line": 7, - "column": 43 + "column": 32 }, "end": { "line": 7, - "column": 47 + "column": 36 } } }, @@ -1783,16 +2899,42 @@ "postfix": false, "binop": null }, - "start": 165, - "end": 166, + "start": 151, + "end": 152, "loc": { "start": { "line": 7, - "column": 48 + "column": 36 }, "end": { "line": 7, - "column": 49 + "column": 37 + } + } + }, + { + "type": { + "label": "=>", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 153, + "end": 155, + "loc": { + "start": { + "line": 7, + "column": 38 + }, + "end": { + "line": 7, + "column": 40 } } }, @@ -1808,31 +2950,31 @@ "postfix": false, "binop": null }, - "start": 167, - "end": 168, + "start": 156, + "end": 157, "loc": { "start": { "line": 7, - "column": 50 + "column": 41 }, "end": { "line": 7, - "column": 51 + "column": 42 } } }, { "type": "CommentLine", "value": " TODO handle empty ranges", - "start": 171, - "end": 198, + "start": 159, + "end": 186, "loc": { "start": { - "line": 9, + "line": 8, "column": 1 }, "end": { - "line": 9, + "line": 8, "column": 28 } } @@ -1852,15 +2994,15 @@ "updateContext": null }, "value": "if", - "start": 201, - "end": 203, + "start": 189, + "end": 191, "loc": { "start": { - "line": 11, + "line": 10, "column": 1 }, "end": { - "line": 11, + "line": 10, "column": 3 } } @@ -1877,15 +3019,15 @@ "postfix": false, "binop": null }, - "start": 204, - "end": 205, + "start": 192, + "end": 193, "loc": { "start": { - "line": 11, + "line": 10, "column": 4 }, "end": { - "line": 11, + "line": 10, "column": 5 } } @@ -1903,16 +3045,16 @@ "binop": null }, "value": "stop", - "start": 206, - "end": 210, + "start": 193, + "end": 197, "loc": { "start": { - "line": 11, - "column": 6 + "line": 10, + "column": 5 }, "end": { - "line": 11, - "column": 10 + "line": 10, + "column": 9 } } }, @@ -1930,16 +3072,16 @@ "updateContext": null }, "value": "===", - "start": 211, - "end": 214, + "start": 198, + "end": 201, "loc": { "start": { - "line": 11, - "column": 11 + "line": 10, + "column": 10 }, "end": { - "line": 11, - "column": 14 + "line": 10, + "column": 13 } } }, @@ -1956,16 +3098,16 @@ "binop": null }, "value": "undefined", - "start": 215, - "end": 224, + "start": 202, + "end": 211, "loc": { "start": { - "line": 11, - "column": 15 + "line": 10, + "column": 14 }, "end": { - "line": 11, - "column": 24 + "line": 10, + "column": 23 } } }, @@ -1981,16 +3123,16 @@ "postfix": false, "binop": null }, - "start": 225, - "end": 226, + "start": 211, + "end": 212, "loc": { "start": { - "line": 11, - "column": 25 + "line": 10, + "column": 23 }, "end": { - "line": 11, - "column": 26 + "line": 10, + "column": 24 } } }, @@ -2009,16 +3151,16 @@ "updateContext": null }, "value": "return", - "start": 227, - "end": 233, + "start": 213, + "end": 219, "loc": { "start": { - "line": 11, - "column": 27 + "line": 10, + "column": 25 }, "end": { - "line": 11, - "column": 33 + "line": 10, + "column": 31 } } }, @@ -2035,16 +3177,16 @@ "binop": null }, "value": "randint", - "start": 234, - "end": 241, + "start": 220, + "end": 227, "loc": { "start": { - "line": 11, - "column": 34 + "line": 10, + "column": 32 }, "end": { - "line": 11, - "column": 41 + "line": 10, + "column": 39 } } }, @@ -2060,16 +3202,16 @@ "postfix": false, "binop": null }, - "start": 241, - "end": 242, + "start": 227, + "end": 228, "loc": { "start": { - "line": 11, - "column": 41 + "line": 10, + "column": 39 }, "end": { - "line": 11, - "column": 42 + "line": 10, + "column": 40 } } }, @@ -2087,16 +3229,16 @@ "updateContext": null }, "value": 0, - "start": 243, - "end": 244, + "start": 228, + "end": 229, "loc": { "start": { - "line": 11, - "column": 43 + "line": 10, + "column": 40 }, "end": { - "line": 11, - "column": 44 + "line": 10, + "column": 41 } } }, @@ -2113,16 +3255,16 @@ "binop": null, "updateContext": null }, - "start": 245, - "end": 246, + "start": 229, + "end": 230, "loc": { "start": { - "line": 11, - "column": 45 + "line": 10, + "column": 41 }, "end": { - "line": 11, - "column": 46 + "line": 10, + "column": 42 } } }, @@ -2139,16 +3281,16 @@ "binop": null }, "value": "start", - "start": 247, - "end": 252, + "start": 231, + "end": 236, "loc": { "start": { - "line": 11, - "column": 47 + "line": 10, + "column": 43 }, "end": { - "line": 11, - "column": 52 + "line": 10, + "column": 48 } } }, @@ -2164,16 +3306,16 @@ "postfix": false, "binop": null }, - "start": 253, - "end": 254, + "start": 236, + "end": 237, "loc": { "start": { - "line": 11, - "column": 53 + "line": 10, + "column": 48 }, "end": { - "line": 11, - "column": 54 + "line": 10, + "column": 49 } } }, @@ -2190,16 +3332,16 @@ "binop": null, "updateContext": null }, - "start": 255, - "end": 256, + "start": 237, + "end": 238, "loc": { "start": { - "line": 11, - "column": 55 + "line": 10, + "column": 49 }, "end": { - "line": 11, - "column": 56 + "line": 10, + "column": 50 } } }, @@ -2218,15 +3360,15 @@ "updateContext": null }, "value": "if", - "start": 258, - "end": 260, + "start": 240, + "end": 242, "loc": { "start": { - "line": 12, + "line": 11, "column": 1 }, "end": { - "line": 12, + "line": 11, "column": 3 } } @@ -2243,15 +3385,15 @@ "postfix": false, "binop": null }, - "start": 261, - "end": 262, + "start": 243, + "end": 244, "loc": { "start": { - "line": 12, + "line": 11, "column": 4 }, "end": { - "line": 12, + "line": 11, "column": 5 } } @@ -2269,16 +3411,16 @@ "binop": null }, "value": "step", - "start": 263, - "end": 267, + "start": 244, + "end": 248, "loc": { "start": { - "line": 12, - "column": 6 + "line": 11, + "column": 5 }, "end": { - "line": 12, - "column": 10 + "line": 11, + "column": 9 } } }, @@ -2296,16 +3438,16 @@ "updateContext": null }, "value": "===", - "start": 268, - "end": 271, + "start": 249, + "end": 252, "loc": { "start": { - "line": 12, - "column": 11 + "line": 11, + "column": 10 }, "end": { - "line": 12, - "column": 14 + "line": 11, + "column": 13 } } }, @@ -2322,16 +3464,16 @@ "binop": null }, "value": "undefined", - "start": 272, - "end": 281, + "start": 253, + "end": 262, "loc": { "start": { - "line": 12, - "column": 15 + "line": 11, + "column": 14 }, "end": { - "line": 12, - "column": 24 + "line": 11, + "column": 23 } } }, @@ -2347,16 +3489,16 @@ "postfix": false, "binop": null }, - "start": 282, - "end": 283, + "start": 262, + "end": 263, "loc": { "start": { - "line": 12, - "column": 25 + "line": 11, + "column": 23 }, "end": { - "line": 12, - "column": 26 + "line": 11, + "column": 24 } } }, @@ -2373,16 +3515,16 @@ "binop": null }, "value": "step", - "start": 284, - "end": 288, + "start": 264, + "end": 268, "loc": { "start": { - "line": 12, - "column": 27 + "line": 11, + "column": 25 }, "end": { - "line": 12, - "column": 31 + "line": 11, + "column": 29 } } }, @@ -2400,16 +3542,16 @@ "updateContext": null }, "value": "=", - "start": 289, - "end": 290, + "start": 269, + "end": 270, "loc": { "start": { - "line": 12, - "column": 32 + "line": 11, + "column": 30 }, "end": { - "line": 12, - "column": 33 + "line": 11, + "column": 31 } } }, @@ -2427,16 +3569,16 @@ "updateContext": null }, "value": 1, - "start": 291, - "end": 292, + "start": 271, + "end": 272, "loc": { "start": { - "line": 12, - "column": 34 + "line": 11, + "column": 32 }, "end": { - "line": 12, - "column": 35 + "line": 11, + "column": 33 } } }, @@ -2453,16 +3595,16 @@ "binop": null, "updateContext": null }, - "start": 293, - "end": 294, + "start": 272, + "end": 273, "loc": { "start": { - "line": 12, - "column": 36 + "line": 11, + "column": 33 }, "end": { - "line": 12, - "column": 37 + "line": 11, + "column": 34 } } }, @@ -2481,15 +3623,15 @@ "updateContext": null }, "value": "if", - "start": 297, - "end": 299, + "start": 276, + "end": 278, "loc": { "start": { - "line": 14, + "line": 13, "column": 1 }, "end": { - "line": 14, + "line": 13, "column": 3 } } @@ -2506,15 +3648,15 @@ "postfix": false, "binop": null }, - "start": 300, - "end": 301, + "start": 279, + "end": 280, "loc": { "start": { - "line": 14, + "line": 13, "column": 4 }, "end": { - "line": 14, + "line": 13, "column": 5 } } @@ -2532,16 +3674,16 @@ "binop": null }, "value": "stop", - "start": 302, - "end": 306, + "start": 280, + "end": 284, "loc": { "start": { - "line": 14, - "column": 6 + "line": 13, + "column": 5 }, "end": { - "line": 14, - "column": 10 + "line": 13, + "column": 9 } } }, @@ -2559,16 +3701,16 @@ "updateContext": null }, "value": ">=", - "start": 307, - "end": 309, + "start": 285, + "end": 287, "loc": { "start": { - "line": 14, - "column": 11 + "line": 13, + "column": 10 }, "end": { - "line": 14, - "column": 13 + "line": 13, + "column": 12 } } }, @@ -2585,16 +3727,16 @@ "binop": null }, "value": "start", - "start": 310, - "end": 315, + "start": 288, + "end": 293, "loc": { "start": { - "line": 14, - "column": 14 + "line": 13, + "column": 13 }, "end": { - "line": 14, - "column": 19 + "line": 13, + "column": 18 } } }, @@ -2610,16 +3752,16 @@ "postfix": false, "binop": null }, - "start": 316, - "end": 317, + "start": 293, + "end": 294, "loc": { "start": { - "line": 14, - "column": 20 + "line": 13, + "column": 18 }, "end": { - "line": 14, - "column": 21 + "line": 13, + "column": 19 } } }, @@ -2635,16 +3777,16 @@ "postfix": false, "binop": null }, - "start": 318, - "end": 319, + "start": 295, + "end": 296, "loc": { "start": { - "line": 14, - "column": 22 + "line": 13, + "column": 20 }, "end": { - "line": 14, - "column": 23 + "line": 13, + "column": 21 } } }, @@ -2663,15 +3805,15 @@ "updateContext": null }, "value": "return", - "start": 322, - "end": 328, + "start": 299, + "end": 305, "loc": { "start": { - "line": 15, + "line": 14, "column": 2 }, "end": { - "line": 15, + "line": 14, "column": 8 } } @@ -2689,15 +3831,15 @@ "binop": null }, "value": "start", - "start": 329, - "end": 334, + "start": 306, + "end": 311, "loc": { "start": { - "line": 15, + "line": 14, "column": 9 }, "end": { - "line": 15, + "line": 14, "column": 14 } } @@ -2716,15 +3858,15 @@ "updateContext": null }, "value": "+", - "start": 335, - "end": 336, + "start": 312, + "end": 313, "loc": { "start": { - "line": 15, + "line": 14, "column": 15 }, "end": { - "line": 15, + "line": 14, "column": 16 } } @@ -2742,15 +3884,15 @@ "binop": null }, "value": "step", - "start": 337, - "end": 341, + "start": 314, + "end": 318, "loc": { "start": { - "line": 15, + "line": 14, "column": 17 }, "end": { - "line": 15, + "line": 14, "column": 21 } } @@ -2769,15 +3911,15 @@ "updateContext": null }, "value": "*", - "start": 342, - "end": 343, + "start": 319, + "end": 320, "loc": { "start": { - "line": 15, + "line": 14, "column": 22 }, "end": { - "line": 15, + "line": 14, "column": 23 } } @@ -2795,15 +3937,15 @@ "binop": null }, "value": "randint", - "start": 344, - "end": 351, + "start": 321, + "end": 328, "loc": { "start": { - "line": 15, + "line": 14, "column": 24 }, "end": { - "line": 15, + "line": 14, "column": 31 } } @@ -2820,15 +3962,15 @@ "postfix": false, "binop": null }, - "start": 351, - "end": 352, + "start": 328, + "end": 329, "loc": { "start": { - "line": 15, + "line": 14, "column": 31 }, "end": { - "line": 15, + "line": 14, "column": 32 } } @@ -2847,16 +3989,16 @@ "updateContext": null }, "value": 0, - "start": 353, - "end": 354, + "start": 329, + "end": 330, "loc": { "start": { - "line": 15, - "column": 33 + "line": 14, + "column": 32 }, "end": { - "line": 15, - "column": 34 + "line": 14, + "column": 33 } } }, @@ -2873,16 +4015,16 @@ "binop": null, "updateContext": null }, - "start": 355, - "end": 356, + "start": 330, + "end": 331, "loc": { "start": { - "line": 15, - "column": 35 + "line": 14, + "column": 33 }, "end": { - "line": 15, - "column": 36 + "line": 14, + "column": 34 } } }, @@ -2899,16 +4041,16 @@ "binop": null }, "value": "Math", - "start": 357, - "end": 361, + "start": 332, + "end": 336, "loc": { "start": { - "line": 15, - "column": 37 + "line": 14, + "column": 35 }, "end": { - "line": 15, - "column": 41 + "line": 14, + "column": 39 } } }, @@ -2925,16 +4067,16 @@ "binop": null, "updateContext": null }, - "start": 361, - "end": 362, + "start": 336, + "end": 337, "loc": { "start": { - "line": 15, - "column": 41 + "line": 14, + "column": 39 }, "end": { - "line": 15, - "column": 42 + "line": 14, + "column": 40 } } }, @@ -2951,16 +4093,16 @@ "binop": null }, "value": "floor", - "start": 362, - "end": 367, + "start": 337, + "end": 342, "loc": { "start": { - "line": 15, - "column": 42 + "line": 14, + "column": 40 }, "end": { - "line": 15, - "column": 47 + "line": 14, + "column": 45 } } }, @@ -2976,16 +4118,16 @@ "postfix": false, "binop": null }, - "start": 367, - "end": 368, + "start": 342, + "end": 343, "loc": { "start": { - "line": 15, - "column": 47 + "line": 14, + "column": 45 }, "end": { - "line": 15, - "column": 48 + "line": 14, + "column": 46 } } }, @@ -3001,16 +4143,16 @@ "postfix": false, "binop": null }, - "start": 369, - "end": 370, + "start": 343, + "end": 344, "loc": { "start": { - "line": 15, - "column": 49 + "line": 14, + "column": 46 }, "end": { - "line": 15, - "column": 50 + "line": 14, + "column": 47 } } }, @@ -3027,16 +4169,16 @@ "binop": null }, "value": "stop", - "start": 371, - "end": 375, + "start": 344, + "end": 348, "loc": { "start": { - "line": 15, - "column": 51 + "line": 14, + "column": 47 }, "end": { - "line": 15, - "column": 55 + "line": 14, + "column": 51 } } }, @@ -3054,16 +4196,16 @@ "updateContext": null }, "value": "-", - "start": 376, - "end": 377, + "start": 349, + "end": 350, "loc": { "start": { - "line": 15, - "column": 56 + "line": 14, + "column": 52 }, "end": { - "line": 15, - "column": 57 + "line": 14, + "column": 53 } } }, @@ -3080,16 +4222,16 @@ "binop": null }, "value": "start", - "start": 378, - "end": 383, + "start": 351, + "end": 356, "loc": { "start": { - "line": 15, - "column": 58 + "line": 14, + "column": 54 }, "end": { - "line": 15, - "column": 63 + "line": 14, + "column": 59 } } }, @@ -3105,16 +4247,16 @@ "postfix": false, "binop": null }, - "start": 384, - "end": 385, + "start": 356, + "end": 357, "loc": { "start": { - "line": 15, - "column": 64 + "line": 14, + "column": 59 }, "end": { - "line": 15, - "column": 65 + "line": 14, + "column": 60 } } }, @@ -3132,16 +4274,16 @@ "updateContext": null }, "value": "/", - "start": 386, - "end": 387, + "start": 358, + "end": 359, "loc": { "start": { - "line": 15, - "column": 66 + "line": 14, + "column": 61 }, "end": { - "line": 15, - "column": 67 + "line": 14, + "column": 62 } } }, @@ -3158,16 +4300,16 @@ "binop": null }, "value": "step", - "start": 388, - "end": 392, + "start": 360, + "end": 364, "loc": { "start": { - "line": 15, - "column": 68 + "line": 14, + "column": 63 }, "end": { - "line": 15, - "column": 72 + "line": 14, + "column": 67 } } }, @@ -3183,16 +4325,16 @@ "postfix": false, "binop": null }, - "start": 393, - "end": 394, + "start": 364, + "end": 365, "loc": { "start": { - "line": 15, - "column": 73 + "line": 14, + "column": 67 }, "end": { - "line": 15, - "column": 74 + "line": 14, + "column": 68 } } }, @@ -3208,16 +4350,16 @@ "postfix": false, "binop": null }, - "start": 395, - "end": 396, + "start": 365, + "end": 366, "loc": { "start": { - "line": 15, - "column": 75 + "line": 14, + "column": 68 }, "end": { - "line": 15, - "column": 76 + "line": 14, + "column": 69 } } }, @@ -3234,16 +4376,16 @@ "binop": null, "updateContext": null }, - "start": 397, - "end": 398, + "start": 366, + "end": 367, "loc": { "start": { - "line": 15, - "column": 77 + "line": 14, + "column": 69 }, "end": { - "line": 15, - "column": 78 + "line": 14, + "column": 70 } } }, @@ -3259,23 +4401,23 @@ "postfix": false, "binop": null }, - "start": 400, - "end": 401, + "start": 369, + "end": 370, "loc": { "start": { - "line": 16, + "line": 15, "column": 1 }, "end": { - "line": 16, + "line": 15, "column": 2 } } }, { "type": { - "label": "else", - "keyword": "else", + "label": "return", + "keyword": "return", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, @@ -3286,73 +4428,20 @@ "binop": null, "updateContext": null }, - "value": "else", - "start": 403, - "end": 407, + "value": "return", + "start": 373, + "end": 379, "loc": { "start": { "line": 17, "column": 1 }, - "end": { - "line": 17, - "column": 5 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 408, - "end": 409, - "loc": { - "start": { - "line": 17, - "column": 6 - }, "end": { "line": 17, "column": 7 } } }, - { - "type": { - "label": "return", - "keyword": "return", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "return", - "start": 412, - "end": 418, - "loc": { - "start": { - "line": 18, - "column": 2 - }, - "end": { - "line": 18, - "column": 8 - } - } - }, { "type": { "label": "name", @@ -3366,16 +4455,16 @@ "binop": null }, "value": "start", - "start": 419, - "end": 424, + "start": 380, + "end": 385, "loc": { "start": { - "line": 18, - "column": 9 + "line": 17, + "column": 8 }, "end": { - "line": 18, - "column": 14 + "line": 17, + "column": 13 } } }, @@ -3393,16 +4482,16 @@ "updateContext": null }, "value": "+", - "start": 425, - "end": 426, + "start": 386, + "end": 387, "loc": { "start": { - "line": 18, - "column": 15 + "line": 17, + "column": 14 }, "end": { - "line": 18, - "column": 16 + "line": 17, + "column": 15 } } }, @@ -3419,16 +4508,16 @@ "binop": null }, "value": "step", - "start": 427, - "end": 431, + "start": 388, + "end": 392, "loc": { "start": { - "line": 18, - "column": 17 + "line": 17, + "column": 16 }, "end": { - "line": 18, - "column": 21 + "line": 17, + "column": 20 } } }, @@ -3446,16 +4535,16 @@ "updateContext": null }, "value": "*", - "start": 432, - "end": 433, + "start": 393, + "end": 394, "loc": { "start": { - "line": 18, - "column": 22 + "line": 17, + "column": 21 }, "end": { - "line": 18, - "column": 23 + "line": 17, + "column": 22 } } }, @@ -3472,16 +4561,16 @@ "binop": null }, "value": "randint", - "start": 434, - "end": 441, + "start": 395, + "end": 402, "loc": { "start": { - "line": 18, - "column": 24 + "line": 17, + "column": 23 }, "end": { - "line": 18, - "column": 31 + "line": 17, + "column": 30 } } }, @@ -3497,16 +4586,16 @@ "postfix": false, "binop": null }, - "start": 441, - "end": 442, + "start": 402, + "end": 403, "loc": { "start": { - "line": 18, - "column": 31 + "line": 17, + "column": 30 }, "end": { - "line": 18, - "column": 32 + "line": 17, + "column": 31 } } }, @@ -3524,16 +4613,16 @@ "updateContext": null }, "value": 0, - "start": 443, - "end": 444, + "start": 403, + "end": 404, "loc": { "start": { - "line": 18, - "column": 33 + "line": 17, + "column": 31 }, "end": { - "line": 18, - "column": 34 + "line": 17, + "column": 32 } } }, @@ -3550,16 +4639,16 @@ "binop": null, "updateContext": null }, - "start": 445, - "end": 446, + "start": 404, + "end": 405, "loc": { "start": { - "line": 18, - "column": 35 + "line": 17, + "column": 32 }, "end": { - "line": 18, - "column": 36 + "line": 17, + "column": 33 } } }, @@ -3576,16 +4665,16 @@ "binop": null }, "value": "Math", - "start": 447, - "end": 451, + "start": 406, + "end": 410, "loc": { "start": { - "line": 18, - "column": 37 + "line": 17, + "column": 34 }, "end": { - "line": 18, - "column": 41 + "line": 17, + "column": 38 } } }, @@ -3602,16 +4691,16 @@ "binop": null, "updateContext": null }, - "start": 451, - "end": 452, + "start": 410, + "end": 411, "loc": { "start": { - "line": 18, - "column": 41 + "line": 17, + "column": 38 }, "end": { - "line": 18, - "column": 42 + "line": 17, + "column": 39 } } }, @@ -3628,16 +4717,16 @@ "binop": null }, "value": "floor", - "start": 452, - "end": 457, + "start": 411, + "end": 416, "loc": { "start": { - "line": 18, - "column": 42 + "line": 17, + "column": 39 }, "end": { - "line": 18, - "column": 47 + "line": 17, + "column": 44 } } }, @@ -3653,16 +4742,16 @@ "postfix": false, "binop": null }, - "start": 457, - "end": 458, + "start": 416, + "end": 417, "loc": { "start": { - "line": 18, - "column": 47 + "line": 17, + "column": 44 }, "end": { - "line": 18, - "column": 48 + "line": 17, + "column": 45 } } }, @@ -3678,16 +4767,16 @@ "postfix": false, "binop": null }, - "start": 459, - "end": 460, + "start": 417, + "end": 418, "loc": { "start": { - "line": 18, - "column": 49 + "line": 17, + "column": 45 }, "end": { - "line": 18, - "column": 50 + "line": 17, + "column": 46 } } }, @@ -3704,16 +4793,16 @@ "binop": null }, "value": "start", - "start": 461, - "end": 466, + "start": 418, + "end": 423, "loc": { "start": { - "line": 18, - "column": 51 + "line": 17, + "column": 46 }, "end": { - "line": 18, - "column": 56 + "line": 17, + "column": 51 } } }, @@ -3731,16 +4820,16 @@ "updateContext": null }, "value": "-", - "start": 467, - "end": 468, + "start": 424, + "end": 425, "loc": { "start": { - "line": 18, - "column": 57 + "line": 17, + "column": 52 }, "end": { - "line": 18, - "column": 58 + "line": 17, + "column": 53 } } }, @@ -3757,16 +4846,16 @@ "binop": null }, "value": "stop", - "start": 469, - "end": 473, + "start": 426, + "end": 430, "loc": { "start": { - "line": 18, - "column": 59 + "line": 17, + "column": 54 }, "end": { - "line": 18, - "column": 63 + "line": 17, + "column": 58 } } }, @@ -3782,16 +4871,16 @@ "postfix": false, "binop": null }, - "start": 474, - "end": 475, + "start": 430, + "end": 431, "loc": { "start": { - "line": 18, - "column": 64 + "line": 17, + "column": 58 }, "end": { - "line": 18, - "column": 65 + "line": 17, + "column": 59 } } }, @@ -3809,16 +4898,16 @@ "updateContext": null }, "value": "/", - "start": 476, - "end": 477, + "start": 432, + "end": 433, "loc": { "start": { - "line": 18, - "column": 66 + "line": 17, + "column": 60 }, "end": { - "line": 18, - "column": 67 + "line": 17, + "column": 61 } } }, @@ -3836,16 +4925,16 @@ "updateContext": null }, "value": "-", - "start": 478, - "end": 479, + "start": 434, + "end": 435, "loc": { "start": { - "line": 18, - "column": 68 + "line": 17, + "column": 62 }, "end": { - "line": 18, - "column": 69 + "line": 17, + "column": 63 } } }, @@ -3862,16 +4951,16 @@ "binop": null }, "value": "step", - "start": 479, - "end": 483, + "start": 435, + "end": 439, "loc": { "start": { - "line": 18, - "column": 69 + "line": 17, + "column": 63 }, "end": { - "line": 18, - "column": 73 + "line": 17, + "column": 67 } } }, @@ -3887,16 +4976,16 @@ "postfix": false, "binop": null }, - "start": 484, - "end": 485, + "start": 439, + "end": 440, "loc": { "start": { - "line": 18, - "column": 74 + "line": 17, + "column": 67 }, "end": { - "line": 18, - "column": 75 + "line": 17, + "column": 68 } } }, @@ -3912,16 +5001,16 @@ "postfix": false, "binop": null }, - "start": 486, - "end": 487, + "start": 440, + "end": 441, "loc": { "start": { - "line": 18, - "column": 76 + "line": 17, + "column": 68 }, "end": { - "line": 18, - "column": 77 + "line": 17, + "column": 69 } } }, @@ -3938,16 +5027,16 @@ "binop": null, "updateContext": null }, - "start": 488, - "end": 489, + "start": 441, + "end": 442, "loc": { "start": { - "line": 18, - "column": 78 + "line": 17, + "column": 69 }, "end": { - "line": 18, - "column": 79 + "line": 17, + "column": 70 } } }, @@ -3963,22 +5052,49 @@ "postfix": false, "binop": null }, - "start": 491, - "end": 492, + "start": 443, + "end": 444, + "loc": { + "start": { + "line": 18, + "column": 0 + }, + "end": { + "line": 18, + "column": 1 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 444, + "end": 445, "loc": { "start": { - "line": 19, + "line": 18, "column": 1 }, "end": { - "line": 19, + "line": 18, "column": 2 } } }, { "type": { - "label": "}", + "label": "export", + "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -3986,18 +5102,100 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 494, - "end": 495, + "value": "export", + "start": 447, + "end": 453, "loc": { "start": { - "line": 21, + "line": 20, "column": 0 }, "end": { - "line": 21, - "column": 1 + "line": 20, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 454, + "end": 461, + "loc": { + "start": { + "line": 20, + "column": 7 + }, + "end": { + "line": 20, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randrange", + "start": 462, + "end": 471, + "loc": { + "start": { + "line": 20, + "column": 15 + }, + "end": { + "line": 20, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 471, + "end": 472, + "loc": { + "start": { + "line": 20, + "column": 24 + }, + "end": { + "line": 20, + "column": 25 } } }, @@ -4014,15 +5212,15 @@ "binop": null, "updateContext": null }, - "start": 497, - "end": 497, + "start": 473, + "end": 473, "loc": { "start": { - "line": 23, + "line": 21, "column": 0 }, "end": { - "line": 23, + "line": 21, "column": 0 } } diff --git a/ast/source/api/sample.js.json b/ast/source/api/sample.js.json index 4d15da0..1535c6b 100644 --- a/ast/source/api/sample.js.json +++ b/ast/source/api/sample.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 130, + "end": 152, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 130, + "end": 152, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } }, @@ -31,7 +31,7 @@ { "type": "ImportDeclaration", "start": 0, - "end": 42, + "end": 53, "loc": { "start": { "line": 1, @@ -39,53 +39,36 @@ }, "end": { "line": 1, - "column": 42 + "column": 53 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 9, - "end": 21, + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 19, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 21 + "column": 19 } }, - "imported": { - "type": "Identifier", - "start": 9, - "end": 21, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 21 - }, - "identifierName": "_fisheryates" - }, - "name": "_fisheryates" - }, "local": { "type": "Identifier", - "start": 9, - "end": 21, + "start": 7, + "end": 19, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 21 + "column": 19 }, "identifierName": "_fisheryates" }, @@ -95,29 +78,29 @@ ], "source": { "type": "StringLiteral", - "start": 29, - "end": 40, + "start": 25, + "end": 52, "loc": { "start": { "line": 1, - "column": 29 + "column": 25 }, "end": { "line": 1, - "column": 40 + "column": 52 } }, "extra": { - "rawValue": "../kernel", - "raw": "'../kernel'" + "rawValue": "../kernel/_fisheryates.js", + "raw": "'../kernel/_fisheryates.js'" }, - "value": "../kernel" + "value": "../kernel/_fisheryates.js" } }, { "type": "ImportDeclaration", - "start": 43, - "end": 80, + "start": 54, + "end": 89, "loc": { "start": { "line": 2, @@ -125,53 +108,36 @@ }, "end": { "line": 2, - "column": 37 + "column": 35 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 52, - "end": 59, + "type": "ImportDefaultSpecifier", + "start": 61, + "end": 68, "loc": { "start": { "line": 2, - "column": 9 + "column": 7 }, "end": { "line": 2, - "column": 16 + "column": 14 } }, - "imported": { - "type": "Identifier", - "start": 52, - "end": 59, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 16 - }, - "identifierName": "randint" - }, - "name": "randint" - }, "local": { "type": "Identifier", - "start": 52, - "end": 59, + "start": 61, + "end": 68, "loc": { "start": { "line": 2, - "column": 9 + "column": 7 }, "end": { "line": 2, - "column": 16 + "column": 14 }, "identifierName": "randint" }, @@ -181,29 +147,29 @@ ], "source": { "type": "StringLiteral", - "start": 67, - "end": 78, + "start": 74, + "end": 88, "loc": { "start": { "line": 2, - "column": 24 + "column": 20 }, "end": { "line": 2, - "column": 35 + "column": 34 } }, "extra": { - "rawValue": "./randint", - "raw": "'./randint'" + "rawValue": "./randint.js", + "raw": "'./randint.js'" }, - "value": "./randint" + "value": "./randint.js" } }, { - "type": "ExportNamedDeclaration", - "start": 82, - "end": 129, + "type": "Identifier", + "start": 91, + "end": 128, "loc": { "start": { "line": 4, @@ -211,52 +177,189 @@ }, "end": { "line": 4, - "column": 47 + "column": 37 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 97, + "end": 127, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 36 + } + }, + "id": { + "type": "Identifier", + "start": 97, + "end": 103, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 12 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "init": { + "type": "CallExpression", + "start": 106, + "end": 127, + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 106, + "end": 118, + "loc": { + "start": { + "line": 4, + "column": 15 + }, + "end": { + "line": 4, + "column": 27 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + }, + "arguments": [ + { + "type": "Identifier", + "start": 119, + "end": 126, + "loc": { + "start": { + "line": 4, + "column": 28 + }, + "end": { + "line": 4, + "column": 35 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ] + } + } + ], + "kind": "const", + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 129, + "end": 151, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 22 + } + }, + "declaration": { + "type": "Identifier", + "start": 144, + "end": 150, + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 21 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 129, + "end": 151, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 22 } }, - "specifiers": [], - "source": null, "declaration": { "type": "VariableDeclaration", - "start": 89, - "end": 129, + "start": 91, + "end": 128, "loc": { "start": { "line": 4, - "column": 7 + "column": 0 }, "end": { "line": 4, - "column": 47 + "column": 37 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 95, + "start": 97, "end": 127, "loc": { "start": { "line": 4, - "column": 13 + "column": 6 }, "end": { "line": 4, - "column": 45 + "column": 36 } }, "id": { "type": "Identifier", - "start": 95, - "end": 101, + "start": 97, + "end": 103, "loc": { "start": { "line": 4, - "column": 13 + "column": 6 }, "end": { "line": 4, - "column": 19 + "column": 12 }, "identifierName": "sample" }, @@ -264,30 +367,30 @@ }, "init": { "type": "CallExpression", - "start": 104, + "start": 106, "end": 127, "loc": { "start": { "line": 4, - "column": 22 + "column": 15 }, "end": { "line": 4, - "column": 45 + "column": 36 } }, "callee": { "type": "Identifier", - "start": 104, - "end": 116, + "start": 106, + "end": 118, "loc": { "start": { "line": 4, - "column": 22 + "column": 15 }, "end": { "line": 4, - "column": 34 + "column": 27 }, "identifierName": "_fisheryates" }, @@ -296,16 +399,16 @@ "arguments": [ { "type": "Identifier", - "start": 118, - "end": 125, + "start": 119, + "end": 126, "loc": { "start": { "line": 4, - "column": 36 + "column": 28 }, "end": { "line": 4, - "column": 43 + "column": 35 }, "identifierName": "randint" }, @@ -330,7 +433,7 @@ "label": "import", "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -353,31 +456,6 @@ } } }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 7, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, { "type": { "label": "name", @@ -391,41 +469,16 @@ "binop": null }, "value": "_fisheryates", - "start": 9, - "end": 21, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 21 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 22, - "end": 23, + "start": 7, + "end": 19, "loc": { "start": { "line": 1, - "column": 22 + "column": 7 }, "end": { "line": 1, - "column": 23 + "column": 19 } } }, @@ -442,16 +495,16 @@ "binop": null }, "value": "from", - "start": 24, - "end": 28, + "start": 20, + "end": 24, "loc": { "start": { "line": 1, - "column": 24 + "column": 20 }, "end": { "line": 1, - "column": 28 + "column": 24 } } }, @@ -468,17 +521,17 @@ "binop": null, "updateContext": null }, - "value": "../kernel", - "start": 29, - "end": 40, + "value": "../kernel/_fisheryates.js", + "start": 25, + "end": 52, "loc": { "start": { "line": 1, - "column": 29 + "column": 25 }, "end": { "line": 1, - "column": 40 + "column": 52 } } }, @@ -495,16 +548,16 @@ "binop": null, "updateContext": null }, - "start": 41, - "end": 42, + "start": 52, + "end": 53, "loc": { "start": { "line": 1, - "column": 41 + "column": 52 }, "end": { "line": 1, - "column": 42 + "column": 53 } } }, @@ -513,7 +566,7 @@ "label": "import", "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -523,8 +576,8 @@ "updateContext": null }, "value": "import", - "start": 43, - "end": 49, + "start": 54, + "end": 60, "loc": { "start": { "line": 2, @@ -538,8 +591,8 @@ }, { "type": { - "label": "{", - "beforeExpr": true, + "label": "name", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -548,8 +601,9 @@ "postfix": false, "binop": null }, - "start": 50, - "end": 51, + "value": "randint", + "start": 61, + "end": 68, "loc": { "start": { "line": 2, @@ -557,7 +611,7 @@ }, "end": { "line": 2, - "column": 8 + "column": 14 } } }, @@ -573,76 +627,79 @@ "postfix": false, "binop": null }, - "value": "randint", - "start": 52, - "end": 59, + "value": "from", + "start": 69, + "end": 73, "loc": { "start": { "line": 2, - "column": 9 + "column": 15 }, "end": { "line": 2, - "column": 16 + "column": 19 } } }, { "type": { - "label": "}", + "label": "string", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 60, - "end": 61, + "value": "./randint.js", + "start": 74, + "end": 88, "loc": { "start": { "line": 2, - "column": 17 + "column": 20 }, "end": { "line": 2, - "column": 18 + "column": 34 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 62, - "end": 66, + "start": 88, + "end": 89, "loc": { "start": { "line": 2, - "column": 19 + "column": 34 }, "end": { "line": 2, - "column": 23 + "column": 35 } } }, { "type": { - "label": "string", + "label": "const", + "keyword": "const", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -651,106 +708,103 @@ "binop": null, "updateContext": null }, - "value": "./randint", - "start": 67, - "end": 78, + "value": "const", + "start": 91, + "end": 96, "loc": { "start": { - "line": 2, - "column": 24 + "line": 4, + "column": 0 }, "end": { - "line": 2, - "column": 35 + "line": 4, + "column": 5 } } }, { "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 79, - "end": 80, + "value": "sample", + "start": 97, + "end": 103, "loc": { "start": { - "line": 2, - "column": 36 + "line": 4, + "column": 6 }, "end": { - "line": 2, - "column": 37 + "line": 4, + "column": 12 } } }, { "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, + "label": "=", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "export", - "start": 82, - "end": 88, + "value": "=", + "start": 104, + "end": 105, "loc": { "start": { "line": 4, - "column": 0 + "column": 13 }, "end": { "line": 4, - "column": 6 + "column": 14 } } }, { "type": { - "label": "const", - "keyword": "const", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "const", - "start": 89, - "end": 94, + "value": "_fisheryates", + "start": 106, + "end": 118, "loc": { "start": { "line": 4, - "column": 7 + "column": 15 }, "end": { "line": 4, - "column": 12 + "column": 27 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -759,52 +813,50 @@ "postfix": false, "binop": null }, - "value": "sample", - "start": 95, - "end": 101, + "start": 118, + "end": 119, "loc": { "start": { "line": 4, - "column": 13 + "column": 27 }, "end": { "line": 4, - "column": 19 + "column": 28 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 102, - "end": 103, + "value": "randint", + "start": 119, + "end": 126, "loc": { "start": { "line": 4, - "column": 20 + "column": 28 }, "end": { "line": 4, - "column": 21 + "column": 35 } } }, { "type": { - "label": "name", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -812,93 +864,124 @@ "postfix": false, "binop": null }, - "value": "_fisheryates", - "start": 104, - "end": 116, + "start": 126, + "end": 127, "loc": { "start": { "line": 4, - "column": 22 + "column": 35 }, "end": { "line": 4, - "column": 34 + "column": 36 } } }, { "type": { - "label": "(", + "label": ";", "beforeExpr": true, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 116, - "end": 117, + "start": 127, + "end": 128, "loc": { "start": { "line": 4, - "column": 34 + "column": 36 }, "end": { "line": 4, - "column": 35 + "column": 37 } } }, { "type": { - "label": "name", + "label": "export", + "keyword": "export", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "randint", - "start": 118, - "end": 125, + "value": "export", + "start": 129, + "end": 135, "loc": { "start": { - "line": 4, - "column": 36 + "line": 5, + "column": 0 }, "end": { - "line": 4, - "column": 43 + "line": 5, + "column": 6 } } }, { "type": { - "label": ")", - "beforeExpr": false, + "label": "default", + "keyword": "default", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 136, + "end": 143, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, "binop": null }, - "start": 126, - "end": 127, + "value": "sample", + "start": 144, + "end": 150, "loc": { "start": { - "line": 4, - "column": 44 + "line": 5, + "column": 15 }, "end": { - "line": 4, - "column": 45 + "line": 5, + "column": 21 } } }, @@ -915,16 +998,16 @@ "binop": null, "updateContext": null }, - "start": 128, - "end": 129, + "start": 150, + "end": 151, "loc": { "start": { - "line": 4, - "column": 46 + "line": 5, + "column": 21 }, "end": { - "line": 4, - "column": 47 + "line": 5, + "column": 22 } } }, @@ -941,15 +1024,15 @@ "binop": null, "updateContext": null }, - "start": 130, - "end": 130, + "start": 152, + "end": 152, "loc": { "start": { - "line": 5, + "line": 6, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } } diff --git a/ast/source/api/shuffle.js.json b/ast/source/api/shuffle.js.json index 6f513fa..80fa9a5 100644 --- a/ast/source/api/shuffle.js.json +++ b/ast/source/api/shuffle.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 120, + "end": 139, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 120, + "end": 139, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } }, @@ -31,7 +31,7 @@ { "type": "ImportDeclaration", "start": 0, - "end": 38, + "end": 45, "loc": { "start": { "line": 1, @@ -39,53 +39,36 @@ }, "end": { "line": 1, - "column": 38 + "column": 45 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 9, - "end": 17, + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 15, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 17 + "column": 15 } }, - "imported": { - "type": "Identifier", - "start": 9, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 17 - }, - "identifierName": "_shuffle" - }, - "name": "_shuffle" - }, "local": { "type": "Identifier", - "start": 9, - "end": 17, + "start": 7, + "end": 15, "loc": { "start": { "line": 1, - "column": 9 + "column": 7 }, "end": { "line": 1, - "column": 17 + "column": 15 }, "identifierName": "_shuffle" }, @@ -95,29 +78,29 @@ ], "source": { "type": "StringLiteral", - "start": 25, - "end": 36, + "start": 21, + "end": 44, "loc": { "start": { "line": 1, - "column": 25 + "column": 21 }, "end": { "line": 1, - "column": 36 + "column": 44 } }, "extra": { - "rawValue": "../kernel", - "raw": "'../kernel'" + "rawValue": "../kernel/_shuffle.js", + "raw": "'../kernel/_shuffle.js'" }, - "value": "../kernel" + "value": "../kernel/_shuffle.js" } }, { "type": "ImportDeclaration", - "start": 39, - "end": 74, + "start": 46, + "end": 79, "loc": { "start": { "line": 2, @@ -125,53 +108,36 @@ }, "end": { "line": 2, - "column": 35 + "column": 33 } }, "specifiers": [ { - "type": "ImportSpecifier", - "start": 48, - "end": 54, + "type": "ImportDefaultSpecifier", + "start": 53, + "end": 59, "loc": { "start": { "line": 2, - "column": 9 + "column": 7 }, "end": { "line": 2, - "column": 15 + "column": 13 } }, - "imported": { - "type": "Identifier", - "start": 48, - "end": 54, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 15 - }, - "identifierName": "sample" - }, - "name": "sample" - }, "local": { "type": "Identifier", - "start": 48, - "end": 54, + "start": 53, + "end": 59, "loc": { "start": { "line": 2, - "column": 9 + "column": 7 }, "end": { "line": 2, - "column": 15 + "column": 13 }, "identifierName": "sample" }, @@ -181,29 +147,29 @@ ], "source": { "type": "StringLiteral", - "start": 62, - "end": 72, + "start": 65, + "end": 78, "loc": { "start": { "line": 2, - "column": 23 + "column": 19 }, "end": { "line": 2, - "column": 33 + "column": 32 } }, "extra": { - "rawValue": "./sample", - "raw": "'./sample'" + "rawValue": "./sample.js", + "raw": "'./sample.js'" }, - "value": "./sample" + "value": "./sample.js" } }, { - "type": "ExportNamedDeclaration", - "start": 76, - "end": 119, + "type": "Identifier", + "start": 81, + "end": 114, "loc": { "start": { "line": 4, @@ -211,52 +177,189 @@ }, "end": { "line": 4, - "column": 43 + "column": 33 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 87, + "end": 113, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 32 + } + }, + "id": { + "type": "Identifier", + "start": 87, + "end": 94, + "loc": { + "start": { + "line": 4, + "column": 6 + }, + "end": { + "line": 4, + "column": 13 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + }, + "init": { + "type": "CallExpression", + "start": 97, + "end": 113, + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 32 + } + }, + "callee": { + "type": "Identifier", + "start": 97, + "end": 105, + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 24 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + }, + "arguments": [ + { + "type": "Identifier", + "start": 106, + "end": 112, + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 31 + }, + "identifierName": "sample" + }, + "name": "sample" + } + ] + } + } + ], + "kind": "const", + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 115, + "end": 138, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 + } + }, + "declaration": { + "type": "Identifier", + "start": 130, + "end": 137, + "loc": { + "start": { + "line": 5, + "column": 15 + }, + "end": { + "line": 5, + "column": 22 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 115, + "end": 138, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 23 } }, - "specifiers": [], - "source": null, "declaration": { "type": "VariableDeclaration", - "start": 83, - "end": 119, + "start": 81, + "end": 114, "loc": { "start": { "line": 4, - "column": 7 + "column": 0 }, "end": { "line": 4, - "column": 43 + "column": 33 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 89, - "end": 117, + "start": 87, + "end": 113, "loc": { "start": { "line": 4, - "column": 13 + "column": 6 }, "end": { "line": 4, - "column": 41 + "column": 32 } }, "id": { "type": "Identifier", - "start": 89, - "end": 96, + "start": 87, + "end": 94, "loc": { "start": { "line": 4, - "column": 13 + "column": 6 }, "end": { "line": 4, - "column": 20 + "column": 13 }, "identifierName": "shuffle" }, @@ -264,30 +367,30 @@ }, "init": { "type": "CallExpression", - "start": 99, - "end": 117, + "start": 97, + "end": 113, "loc": { "start": { "line": 4, - "column": 23 + "column": 16 }, "end": { "line": 4, - "column": 41 + "column": 32 } }, "callee": { "type": "Identifier", - "start": 99, - "end": 107, + "start": 97, + "end": 105, "loc": { "start": { "line": 4, - "column": 23 + "column": 16 }, "end": { "line": 4, - "column": 31 + "column": 24 }, "identifierName": "_shuffle" }, @@ -296,16 +399,16 @@ "arguments": [ { "type": "Identifier", - "start": 109, - "end": 115, + "start": 106, + "end": 112, "loc": { "start": { "line": 4, - "column": 33 + "column": 25 }, "end": { "line": 4, - "column": 39 + "column": 31 }, "identifierName": "sample" }, @@ -330,7 +433,7 @@ "label": "import", "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -353,31 +456,6 @@ } } }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 7, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, { "type": { "label": "name", @@ -391,41 +469,16 @@ "binop": null }, "value": "_shuffle", - "start": 9, - "end": 17, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 17 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 18, - "end": 19, + "start": 7, + "end": 15, "loc": { "start": { "line": 1, - "column": 18 + "column": 7 }, "end": { "line": 1, - "column": 19 + "column": 15 } } }, @@ -442,16 +495,16 @@ "binop": null }, "value": "from", - "start": 20, - "end": 24, + "start": 16, + "end": 20, "loc": { "start": { "line": 1, - "column": 20 + "column": 16 }, "end": { "line": 1, - "column": 24 + "column": 20 } } }, @@ -468,17 +521,17 @@ "binop": null, "updateContext": null }, - "value": "../kernel", - "start": 25, - "end": 36, + "value": "../kernel/_shuffle.js", + "start": 21, + "end": 44, "loc": { "start": { "line": 1, - "column": 25 + "column": 21 }, "end": { "line": 1, - "column": 36 + "column": 44 } } }, @@ -495,16 +548,16 @@ "binop": null, "updateContext": null }, - "start": 37, - "end": 38, + "start": 44, + "end": 45, "loc": { "start": { "line": 1, - "column": 37 + "column": 44 }, "end": { "line": 1, - "column": 38 + "column": 45 } } }, @@ -513,7 +566,7 @@ "label": "import", "keyword": "import", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -523,8 +576,8 @@ "updateContext": null }, "value": "import", - "start": 39, - "end": 45, + "start": 46, + "end": 52, "loc": { "start": { "line": 2, @@ -538,8 +591,8 @@ }, { "type": { - "label": "{", - "beforeExpr": true, + "label": "name", + "beforeExpr": false, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -548,8 +601,9 @@ "postfix": false, "binop": null }, - "start": 46, - "end": 47, + "value": "sample", + "start": 53, + "end": 59, "loc": { "start": { "line": 2, @@ -557,7 +611,7 @@ }, "end": { "line": 2, - "column": 8 + "column": 13 } } }, @@ -573,76 +627,79 @@ "postfix": false, "binop": null }, - "value": "sample", - "start": 48, - "end": 54, + "value": "from", + "start": 60, + "end": 64, "loc": { "start": { "line": 2, - "column": 9 + "column": 14 }, "end": { "line": 2, - "column": 15 + "column": 18 } } }, { "type": { - "label": "}", + "label": "string", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 55, - "end": 56, + "value": "./sample.js", + "start": 65, + "end": 78, "loc": { "start": { "line": 2, - "column": 16 + "column": 19 }, "end": { "line": 2, - "column": 17 + "column": 32 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": ";", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 57, - "end": 61, + "start": 78, + "end": 79, "loc": { "start": { "line": 2, - "column": 18 + "column": 32 }, "end": { "line": 2, - "column": 22 + "column": 33 } } }, { "type": { - "label": "string", + "label": "const", + "keyword": "const", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -651,106 +708,103 @@ "binop": null, "updateContext": null }, - "value": "./sample", - "start": 62, - "end": 72, + "value": "const", + "start": 81, + "end": 86, "loc": { "start": { - "line": 2, - "column": 23 + "line": 4, + "column": 0 }, "end": { - "line": 2, - "column": 33 + "line": 4, + "column": 5 } } }, { "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 73, - "end": 74, + "value": "shuffle", + "start": 87, + "end": 94, "loc": { "start": { - "line": 2, - "column": 34 + "line": 4, + "column": 6 }, "end": { - "line": 2, - "column": 35 + "line": 4, + "column": 13 } } }, { "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, + "label": "=", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "export", - "start": 76, - "end": 82, + "value": "=", + "start": 95, + "end": 96, "loc": { "start": { "line": 4, - "column": 0 + "column": 14 }, "end": { "line": 4, - "column": 6 + "column": 15 } } }, { "type": { - "label": "const", - "keyword": "const", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "const", - "start": 83, - "end": 88, + "value": "_shuffle", + "start": 97, + "end": 105, "loc": { "start": { "line": 4, - "column": 7 + "column": 16 }, "end": { "line": 4, - "column": 12 + "column": 24 } } }, { "type": { - "label": "name", - "beforeExpr": false, + "label": "(", + "beforeExpr": true, "startsExpr": true, "rightAssociative": false, "isLoop": false, @@ -759,52 +813,50 @@ "postfix": false, "binop": null }, - "value": "shuffle", - "start": 89, - "end": 96, + "start": 105, + "end": 106, "loc": { "start": { "line": 4, - "column": 13 + "column": 24 }, "end": { "line": 4, - "column": 20 + "column": 25 } } }, { "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 97, - "end": 98, + "value": "sample", + "start": 106, + "end": 112, "loc": { "start": { "line": 4, - "column": 21 + "column": 25 }, "end": { "line": 4, - "column": 22 + "column": 31 } } }, { "type": { - "label": "name", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -812,93 +864,124 @@ "postfix": false, "binop": null }, - "value": "_shuffle", - "start": 99, - "end": 107, + "start": 112, + "end": 113, "loc": { "start": { "line": 4, - "column": 23 + "column": 31 }, "end": { "line": 4, - "column": 31 + "column": 32 } } }, { "type": { - "label": "(", + "label": ";", "beforeExpr": true, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 107, - "end": 108, + "start": 113, + "end": 114, "loc": { "start": { "line": 4, - "column": 31 + "column": 32 }, "end": { "line": 4, - "column": 32 + "column": 33 } } }, { "type": { - "label": "name", + "label": "export", + "keyword": "export", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "sample", - "start": 109, - "end": 115, + "value": "export", + "start": 115, + "end": 121, "loc": { "start": { - "line": 4, - "column": 33 + "line": 5, + "column": 0 }, "end": { - "line": 4, - "column": 39 + "line": 5, + "column": 6 } } }, { "type": { - "label": ")", - "beforeExpr": false, + "label": "default", + "keyword": "default", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 122, + "end": 129, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, "binop": null }, - "start": 116, - "end": 117, + "value": "shuffle", + "start": 130, + "end": 137, "loc": { "start": { - "line": 4, - "column": 40 + "line": 5, + "column": 15 }, "end": { - "line": 4, - "column": 41 + "line": 5, + "column": 22 } } }, @@ -915,16 +998,16 @@ "binop": null, "updateContext": null }, - "start": 118, - "end": 119, + "start": 137, + "end": 138, "loc": { "start": { - "line": 4, - "column": 42 + "line": 5, + "column": 22 }, "end": { - "line": 4, - "column": 43 + "line": 5, + "column": 23 } } }, @@ -941,15 +1024,15 @@ "binop": null, "updateContext": null }, - "start": 120, - "end": 120, + "start": 139, + "end": 139, "loc": { "start": { - "line": 5, + "line": 6, "column": 0 }, "end": { - "line": 5, + "line": 6, "column": 0 } } diff --git a/ast/source/index.js.json b/ast/source/index.js.json index 82b1c63..2af3670 100644 --- a/ast/source/index.js.json +++ b/ast/source/index.js.json @@ -1,37 +1,37 @@ { "type": "File", "start": 0, - "end": 51, + "end": 395, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 8, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 51, + "end": 395, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 3, + "line": 8, "column": 0 } }, "sourceType": "module", "body": [ { - "type": "ExportAllDeclaration", + "type": "ExportNamedDeclaration", "start": 0, - "end": 23, + "end": 56, "loc": { "start": { "line": 1, @@ -39,34 +39,86 @@ }, "end": { "line": 1, - "column": 23 + "column": 56 } }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 8, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 28 + } + }, + "local": { + "type": "Identifier", + "start": 8, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + }, + "identifierName": "randfloat" + }, + "name": "randfloat" + } + } + ], "source": { "type": "StringLiteral", - "start": 14, - "end": 21, + "start": 35, + "end": 55, "loc": { "start": { "line": 1, - "column": 14 + "column": 35 }, "end": { "line": 1, - "column": 21 + "column": 55 } }, "extra": { - "rawValue": "./api", - "raw": "'./api'" + "rawValue": "./api/randfloat.js", + "raw": "'./api/randfloat.js'" }, - "value": "./api" + "value": "./api/randfloat.js" } }, { - "type": "ExportAllDeclaration", - "start": 24, - "end": 50, + "type": "ExportNamedDeclaration", + "start": 57, + "end": 109, "loc": { "start": { "line": 2, @@ -74,28 +126,515 @@ }, "end": { "line": 2, - "column": 26 + "column": 52 } }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 65, + "end": 83, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 26 + } + }, + "local": { + "type": "Identifier", + "start": 65, + "end": 72, + "loc": { + "start": { + "line": 2, + "column": 8 + }, + "end": { + "line": 2, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 76, + "end": 83, + "loc": { + "start": { + "line": 2, + "column": 19 + }, + "end": { + "line": 2, + "column": 26 + }, + "identifierName": "randint" + }, + "name": "randint" + } + } + ], "source": { "type": "StringLiteral", - "start": 38, - "end": 48, + "start": 90, + "end": 108, "loc": { "start": { "line": 2, - "column": 14 + "column": 33 }, "end": { "line": 2, - "column": 24 + "column": 51 + } + }, + "extra": { + "rawValue": "./api/randint.js", + "raw": "'./api/randint.js'" + }, + "value": "./api/randint.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 110, + "end": 166, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 56 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 118, + "end": 138, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 28 + } + }, + "local": { + "type": "Identifier", + "start": 118, + "end": 125, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 129, + "end": 138, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + }, + "identifierName": "randrange" + }, + "name": "randrange" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 145, + "end": 165, + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 55 + } + }, + "extra": { + "rawValue": "./api/randrange.js", + "raw": "'./api/randrange.js'" + }, + "value": "./api/randrange.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 167, + "end": 217, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 50 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 175, + "end": 192, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 25 + } + }, + "local": { + "type": "Identifier", + "start": 175, + "end": 182, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 186, + "end": 192, + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + }, + "identifierName": "sample" + }, + "name": "sample" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 199, + "end": 216, + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 49 + } + }, + "extra": { + "rawValue": "./api/sample.js", + "raw": "'./api/sample.js'" + }, + "value": "./api/sample.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 218, + "end": 270, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 52 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 226, + "end": 244, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 26 + } + }, + "local": { + "type": "Identifier", + "start": 226, + "end": 233, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 237, + "end": 244, + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + }, + "identifierName": "shuffle" + }, + "name": "shuffle" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 251, + "end": 269, + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 51 + } + }, + "extra": { + "rawValue": "./api/shuffle.js", + "raw": "'./api/shuffle.js'" + }, + "value": "./api/shuffle.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 271, + "end": 336, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 65 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 279, + "end": 302, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 31 + } + }, + "local": { + "type": "Identifier", + "start": 279, + "end": 286, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 290, + "end": 302, + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 31 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 309, + "end": 335, + "loc": { + "start": { + "line": 6, + "column": 38 + }, + "end": { + "line": 6, + "column": 64 + } + }, + "extra": { + "rawValue": "./kernel/_fisheryates.js", + "raw": "'./kernel/_fisheryates.js'" + }, + "value": "./kernel/_fisheryates.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 337, + "end": 394, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 57 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 345, + "end": 364, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 27 + } + }, + "local": { + "type": "Identifier", + "start": 345, + "end": 352, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 356, + "end": 364, + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 27 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 371, + "end": 393, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 56 } }, "extra": { - "rawValue": "./kernel", - "raw": "'./kernel'" + "rawValue": "./kernel/_shuffle.js", + "raw": "'./kernel/_shuffle.js'" }, - "value": "./kernel" + "value": "./kernel/_shuffle.js" } } ], @@ -133,18 +672,16 @@ }, { "type": { - "label": "*", + "label": "{", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": 10, - "updateContext": null + "binop": null }, - "value": "*", "start": 7, "end": 8, "loc": { @@ -158,6 +695,111 @@ } } }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 8, + "end": 15, + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 16, + "end": 18, + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randfloat", + "start": 19, + "end": 28, + "loc": { + "start": { + "line": 1, + "column": 19 + }, + "end": { + "line": 1, + "column": 28 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 28, + "end": 29, + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 29 + } + } + }, { "type": { "label": "name", @@ -171,16 +813,16 @@ "binop": null }, "value": "from", - "start": 9, - "end": 13, + "start": 30, + "end": 34, "loc": { "start": { "line": 1, - "column": 9 + "column": 30 }, "end": { "line": 1, - "column": 13 + "column": 34 } } }, @@ -197,17 +839,17 @@ "binop": null, "updateContext": null }, - "value": "./api", - "start": 14, - "end": 21, + "value": "./api/randfloat.js", + "start": 35, + "end": 55, "loc": { "start": { "line": 1, - "column": 14 + "column": 35 }, "end": { "line": 1, - "column": 21 + "column": 55 } } }, @@ -224,16 +866,16 @@ "binop": null, "updateContext": null }, - "start": 22, - "end": 23, + "start": 55, + "end": 56, "loc": { "start": { "line": 1, - "column": 22 + "column": 55 }, "end": { "line": 1, - "column": 23 + "column": 56 } } }, @@ -252,8 +894,8 @@ "updateContext": null }, "value": "export", - "start": 24, - "end": 30, + "start": 57, + "end": 63, "loc": { "start": { "line": 2, @@ -267,20 +909,18 @@ }, { "type": { - "label": "*", + "label": "{", "beforeExpr": true, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": 10, - "updateContext": null + "binop": null }, - "value": "*", - "start": 31, - "end": 32, + "start": 64, + "end": 65, "loc": { "start": { "line": 2, @@ -294,33 +934,35 @@ }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "from", - "start": 33, - "end": 37, + "value": "default", + "start": 65, + "end": 72, "loc": { "start": { "line": 2, - "column": 9 + "column": 8 }, "end": { "line": 2, - "column": 13 + "column": 15 } } }, { "type": { - "label": "string", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -328,42 +970,41 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "./kernel", - "start": 38, - "end": 48, + "value": "as", + "start": 73, + "end": 75, "loc": { "start": { "line": 2, - "column": 14 + "column": 16 }, "end": { "line": 2, - "column": 24 + "column": 18 } } }, { "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 49, - "end": 50, + "value": "randint", + "start": 76, + "end": 83, "loc": { "start": { "line": 2, - "column": 25 + "column": 19 }, "end": { "line": 2, @@ -373,7 +1014,7 @@ }, { "type": { - "label": "eof", + "label": "}", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -381,18 +1022,1307 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 51, - "end": 51, + "start": 83, + "end": 84, "loc": { "start": { - "line": 3, - "column": 0 + "line": 2, + "column": 26 }, "end": { - "line": 3, + "line": 2, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 85, + "end": 89, + "loc": { + "start": { + "line": 2, + "column": 28 + }, + "end": { + "line": 2, + "column": 32 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/randint.js", + "start": 90, + "end": 108, + "loc": { + "start": { + "line": 2, + "column": 33 + }, + "end": { + "line": 2, + "column": 51 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 108, + "end": 109, + "loc": { + "start": { + "line": 2, + "column": 51 + }, + "end": { + "line": 2, + "column": 52 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 110, + "end": 116, + "loc": { + "start": { + "line": 3, + "column": 0 + }, + "end": { + "line": 3, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 117, + "end": 118, + "loc": { + "start": { + "line": 3, + "column": 7 + }, + "end": { + "line": 3, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 118, + "end": 125, + "loc": { + "start": { + "line": 3, + "column": 8 + }, + "end": { + "line": 3, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 126, + "end": 128, + "loc": { + "start": { + "line": 3, + "column": 16 + }, + "end": { + "line": 3, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randrange", + "start": 129, + "end": 138, + "loc": { + "start": { + "line": 3, + "column": 19 + }, + "end": { + "line": 3, + "column": 28 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 138, + "end": 139, + "loc": { + "start": { + "line": 3, + "column": 28 + }, + "end": { + "line": 3, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 140, + "end": 144, + "loc": { + "start": { + "line": 3, + "column": 30 + }, + "end": { + "line": 3, + "column": 34 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/randrange.js", + "start": 145, + "end": 165, + "loc": { + "start": { + "line": 3, + "column": 35 + }, + "end": { + "line": 3, + "column": 55 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 165, + "end": 166, + "loc": { + "start": { + "line": 3, + "column": 55 + }, + "end": { + "line": 3, + "column": 56 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 167, + "end": 173, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 4, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 174, + "end": 175, + "loc": { + "start": { + "line": 4, + "column": 7 + }, + "end": { + "line": 4, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 175, + "end": 182, + "loc": { + "start": { + "line": 4, + "column": 8 + }, + "end": { + "line": 4, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 183, + "end": 185, + "loc": { + "start": { + "line": 4, + "column": 16 + }, + "end": { + "line": 4, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 186, + "end": 192, + "loc": { + "start": { + "line": 4, + "column": 19 + }, + "end": { + "line": 4, + "column": 25 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 192, + "end": 193, + "loc": { + "start": { + "line": 4, + "column": 25 + }, + "end": { + "line": 4, + "column": 26 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 194, + "end": 198, + "loc": { + "start": { + "line": 4, + "column": 27 + }, + "end": { + "line": 4, + "column": 31 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/sample.js", + "start": 199, + "end": 216, + "loc": { + "start": { + "line": 4, + "column": 32 + }, + "end": { + "line": 4, + "column": 49 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 216, + "end": 217, + "loc": { + "start": { + "line": 4, + "column": 49 + }, + "end": { + "line": 4, + "column": 50 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 218, + "end": 224, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 225, + "end": 226, + "loc": { + "start": { + "line": 5, + "column": 7 + }, + "end": { + "line": 5, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 226, + "end": 233, + "loc": { + "start": { + "line": 5, + "column": 8 + }, + "end": { + "line": 5, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 234, + "end": 236, + "loc": { + "start": { + "line": 5, + "column": 16 + }, + "end": { + "line": 5, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "shuffle", + "start": 237, + "end": 244, + "loc": { + "start": { + "line": 5, + "column": 19 + }, + "end": { + "line": 5, + "column": 26 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 244, + "end": 245, + "loc": { + "start": { + "line": 5, + "column": 26 + }, + "end": { + "line": 5, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 246, + "end": 250, + "loc": { + "start": { + "line": 5, + "column": 28 + }, + "end": { + "line": 5, + "column": 32 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/shuffle.js", + "start": 251, + "end": 269, + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 51 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 269, + "end": 270, + "loc": { + "start": { + "line": 5, + "column": 51 + }, + "end": { + "line": 5, + "column": 52 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 271, + "end": 277, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 278, + "end": 279, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 279, + "end": 286, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 287, + "end": 289, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_fisheryates", + "start": 290, + "end": 302, + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 31 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 302, + "end": 303, + "loc": { + "start": { + "line": 6, + "column": 31 + }, + "end": { + "line": 6, + "column": 32 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 304, + "end": 308, + "loc": { + "start": { + "line": 6, + "column": 33 + }, + "end": { + "line": 6, + "column": 37 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./kernel/_fisheryates.js", + "start": 309, + "end": 335, + "loc": { + "start": { + "line": 6, + "column": 38 + }, + "end": { + "line": 6, + "column": 64 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 335, + "end": 336, + "loc": { + "start": { + "line": 6, + "column": 64 + }, + "end": { + "line": 6, + "column": 65 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 337, + "end": 343, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 344, + "end": 345, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 345, + "end": 352, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 353, + "end": 355, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_shuffle", + "start": 356, + "end": 364, + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 27 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 364, + "end": 365, + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 28 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 366, + "end": 370, + "loc": { + "start": { + "line": 7, + "column": 29 + }, + "end": { + "line": 7, + "column": 33 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./kernel/_shuffle.js", + "start": 371, + "end": 393, + "loc": { + "start": { + "line": 7, + "column": 34 + }, + "end": { + "line": 7, + "column": 56 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 393, + "end": 394, + "loc": { + "start": { + "line": 7, + "column": 56 + }, + "end": { + "line": 7, + "column": 57 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 395, + "end": 395, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, "column": 0 } } diff --git a/ast/source/kernel/_fisheryates.js.json b/ast/source/kernel/_fisheryates.js.json index e023b48..bb86aff 100644 --- a/ast/source/kernel/_fisheryates.js.json +++ b/ast/source/kernel/_fisheryates.js.json @@ -1,363 +1,571 @@ { "type": "File", "start": 0, - "end": 475, + "end": 405, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 35, + "line": 24, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 475, + "end": 405, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 35, + "line": 24, "column": 0 } }, "sourceType": "module", "body": [ { - "type": "ExportNamedDeclaration", - "start": 53, - "end": 473, + "type": "Identifier", + "start": 52, + "end": 374, "loc": { "start": { - "line": 6, + "line": 5, "column": 0 }, "end": { - "line": 33, - "column": 1 + "line": 21, + "column": 2 } }, - "specifiers": [], - "source": null, - "declaration": { - "type": "FunctionDeclaration", - "start": 60, - "end": 473, - "loc": { - "start": { - "line": 6, - "column": 7 - }, - "end": { - "line": 33, - "column": 1 - } - }, - "id": { - "type": "Identifier", - "start": 69, - "end": 81, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 58, + "end": 373, "loc": { "start": { - "line": 6, - "column": 16 + "line": 5, + "column": 6 }, "end": { - "line": 6, - "column": 28 - }, - "identifierName": "_fisheryates" + "line": 21, + "column": 1 + } }, - "name": "_fisheryates", - "leadingComments": null - }, - "generator": false, - "expression": false, - "async": false, - "params": [ - { + "id": { "type": "Identifier", - "start": 84, - "end": 91, + "start": 58, + "end": 70, "loc": { "start": { - "line": 6, - "column": 31 + "line": 5, + "column": 6 }, "end": { - "line": 6, - "column": 38 + "line": 5, + "column": 18 }, - "identifierName": "randint" - }, - "name": "randint" - } - ], - "body": { - "type": "BlockStatement", - "start": 94, - "end": 473, - "loc": { - "start": { - "line": 6, - "column": 41 + "identifierName": "_fisheryates" }, - "end": { - "line": 33, - "column": 1 - } + "name": "_fisheryates", + "leadingComments": null }, - "body": [ - { - "type": "VariableDeclaration", - "start": 98, - "end": 447, + "init": { + "type": "ArrowFunctionExpression", + "start": 73, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 74, + "end": 81, + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 29 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ], + "body": { + "type": "ArrowFunctionExpression", + "start": 86, + "end": 373, "loc": { "start": { - "line": 8, - "column": 1 + "line": 5, + "column": 34 }, "end": { - "line": 29, - "column": 4 + "line": 21, + "column": 1 } }, - "declarations": [ + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ { - "type": "VariableDeclarator", - "start": 104, - "end": 445, + "type": "Identifier", + "start": 87, + "end": 88, "loc": { "start": { - "line": 8, - "column": 7 + "line": 5, + "column": 35 }, "end": { - "line": 29, - "column": 2 - } + "line": 5, + "column": 36 + }, + "identifierName": "n" }, - "id": { - "type": "Identifier", - "start": 104, - "end": 115, - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 18 - }, - "identifierName": "fisheryates" + "name": "n" + }, + { + "type": "Identifier", + "start": 90, + "end": 91, + "loc": { + "start": { + "line": 5, + "column": 38 + }, + "end": { + "line": 5, + "column": 39 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 5, + "column": 41 + }, + "end": { + "line": 5, + "column": 42 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 96, + "end": 97, + "loc": { + "start": { + "line": 5, + "column": 44 }, - "name": "fisheryates" + "end": { + "line": 5, + "column": 45 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 102, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 50 }, - "init": { - "type": "FunctionExpression", - "start": 118, - "end": 445, + "end": { + "line": 21, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 142, + "end": 158, "loc": { "start": { "line": 8, - "column": 21 + "column": 1 }, "end": { - "line": 29, - "column": 2 + "line": 8, + "column": 17 } }, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ + "declarations": [ { - "type": "Identifier", - "start": 129, - "end": 130, + "type": "VariableDeclarator", + "start": 148, + "end": 157, "loc": { "start": { "line": 8, - "column": 32 + "column": 7 }, "end": { "line": 8, - "column": 33 + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 148, + "end": 149, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 8 + }, + "identifierName": "k" }, - "identifierName": "n" + "name": "k", + "leadingComments": null }, - "name": "n" - }, + "init": { + "type": "BinaryExpression", + "start": 152, + "end": 157, + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 16 + } + }, + "left": { + "type": "Identifier", + "start": 152, + "end": 153, + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 12 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "+", + "right": { + "type": "Identifier", + "start": 156, + "end": 157, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + }, + "identifierName": "n" + }, + "name": "n" + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ { - "type": "Identifier", - "start": 133, - "end": 134, + "type": "CommentLine", + "value": " We will swap at most n elements", + "start": 105, + "end": 139, "loc": { "start": { - "line": 8, - "column": 36 + "line": 6, + "column": 1 }, "end": { - "line": 8, - "column": 37 - }, - "identifierName": "a" + "line": 6, + "column": 35 + } + } + } + ] + }, + { + "type": "ForStatement", + "start": 161, + "end": 371, + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + }, + "init": null, + "test": { + "type": "BinaryExpression", + "start": 168, + "end": 173, + "loc": { + "start": { + "line": 10, + "column": 8 }, - "name": "a" + "end": { + "line": 10, + "column": 13 + } }, - { + "left": { "type": "Identifier", - "start": 137, - "end": 138, + "start": 168, + "end": 169, "loc": { "start": { - "line": 8, - "column": 40 + "line": 10, + "column": 8 }, "end": { - "line": 8, - "column": 41 + "line": 10, + "column": 9 }, "identifierName": "i" }, "name": "i" }, - { + "operator": "<", + "right": { "type": "Identifier", - "start": 141, - "end": 142, + "start": 172, + "end": 173, "loc": { "start": { - "line": 8, - "column": 44 + "line": 10, + "column": 12 }, "end": { - "line": 8, - "column": 45 + "line": 10, + "column": 13 }, - "identifierName": "j" + "identifierName": "k" }, - "name": "j" + "name": "k" } - ], + }, + "update": { + "type": "UpdateExpression", + "start": 175, + "end": 178, + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 18 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 177, + "end": 178, + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 18 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesizedArgument": false + } + }, "body": { "type": "BlockStatement", - "start": 145, - "end": 445, + "start": 180, + "end": 371, "loc": { "start": { - "line": 8, - "column": 48 + "line": 10, + "column": 20 }, "end": { - "line": 29, + "line": 20, "column": 2 } }, "body": [ { "type": "VariableDeclaration", - "start": 188, - "end": 205, + "start": 232, + "end": 256, "loc": { "start": { - "line": 12, + "line": 13, "column": 2 }, "end": { - "line": 12, - "column": 19 + "line": 13, + "column": 26 } }, "declarations": [ { "type": "VariableDeclarator", - "start": 194, - "end": 203, + "start": 238, + "end": 255, "loc": { "start": { - "line": 12, + "line": 13, "column": 8 }, "end": { - "line": 12, - "column": 17 + "line": 13, + "column": 25 } }, "id": { "type": "Identifier", - "start": 194, - "end": 195, + "start": 238, + "end": 239, "loc": { "start": { - "line": 12, + "line": 13, "column": 8 }, "end": { - "line": 12, + "line": 13, "column": 9 }, - "identifierName": "k" + "identifierName": "p" }, - "name": "k", + "name": "p", "leadingComments": null }, "init": { - "type": "BinaryExpression", - "start": 198, - "end": 203, + "type": "CallExpression", + "start": 242, + "end": 255, "loc": { "start": { - "line": 12, + "line": 13, "column": 12 }, "end": { - "line": 12, - "column": 17 + "line": 13, + "column": 25 } }, - "left": { + "callee": { "type": "Identifier", - "start": 198, - "end": 199, + "start": 242, + "end": 249, "loc": { "start": { - "line": 12, + "line": 13, "column": 12 }, "end": { - "line": 12, - "column": 13 + "line": 13, + "column": 19 }, - "identifierName": "i" + "identifierName": "randint" }, - "name": "i" + "name": "randint" }, - "operator": "+", - "right": { - "type": "Identifier", - "start": 202, - "end": 203, - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 17 + "arguments": [ + { + "type": "Identifier", + "start": 250, + "end": 251, + "loc": { + "start": { + "line": 13, + "column": 20 + }, + "end": { + "line": 13, + "column": 21 + }, + "identifierName": "i" }, - "identifierName": "n" + "name": "i" }, - "name": "n" - } + { + "type": "Identifier", + "start": 253, + "end": 254, + "loc": { + "start": { + "line": 13, + "column": 23 + }, + "end": { + "line": 13, + "column": 24 + }, + "identifierName": "j" + }, + "name": "j" + } + ] }, "leadingComments": null } @@ -366,729 +574,1434 @@ "leadingComments": [ { "type": "CommentLine", - "value": " we will swap at most n elements", - "start": 150, - "end": 184, + "value": " Choose any index p in the remaining array", + "start": 184, + "end": 228, + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 46 + } + } + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, "loc": { "start": { - "line": 10, + "line": 15, "column": 2 }, "end": { - "line": 10, - "column": 36 + "line": 15, + "column": 60 } } } ] }, { - "type": "ForStatement", - "start": 209, - "end": 441, + "type": "VariableDeclaration", + "start": 322, + "end": 339, "loc": { "start": { - "line": 14, + "line": 17, "column": 2 }, "end": { - "line": 27, - "column": 3 + "line": 17, + "column": 19 } }, - "init": null, - "test": { - "type": "BinaryExpression", - "start": 217, - "end": 222, - "loc": { - "start": { - "line": 14, - "column": 10 - }, - "end": { - "line": 14, - "column": 15 - } - }, - "left": { - "type": "Identifier", - "start": 217, - "end": 218, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 328, + "end": 338, "loc": { "start": { - "line": 14, - "column": 10 + "line": 17, + "column": 8 }, "end": { - "line": 14, - "column": 11 - }, - "identifierName": "i" + "line": 17, + "column": 18 + } }, - "name": "i" - }, - "operator": "<", - "right": { - "type": "Identifier", - "start": 221, - "end": 222, - "loc": { - "start": { - "line": 14, - "column": 14 - }, - "end": { - "line": 14, - "column": 15 + "id": { + "type": "Identifier", + "start": 328, + "end": 331, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 11 + }, + "identifierName": "tmp" }, - "identifierName": "k" - }, - "name": "k" - } - }, - "update": { - "type": "UpdateExpression", - "start": 225, - "end": 228, - "loc": { - "start": { - "line": 14, - "column": 18 + "name": "tmp", + "leadingComments": null }, - "end": { - "line": 14, - "column": 21 - } - }, - "operator": "++", - "prefix": true, - "argument": { - "type": "Identifier", - "start": 227, - "end": 228, - "loc": { - "start": { - "line": 14, - "column": 20 + "init": { + "type": "MemberExpression", + "start": 334, + "end": 338, + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 334, + "end": 335, + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 15 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 336, + "end": 337, + "loc": { + "start": { + "line": 17, + "column": 16 + }, + "end": { + "line": 17, + "column": 17 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 60 + } + } + } + ] + }, + { + "type": "ExpressionStatement", + "start": 342, + "end": 354, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 14 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 342, + "end": 353, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 342, + "end": 346, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 6 + } + }, + "object": { + "type": "Identifier", + "start": 342, + "end": 343, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 3 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 344, + "end": 345, + "loc": { + "start": { + "line": 18, + "column": 4 + }, + "end": { + "line": 18, + "column": 5 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "right": { + "type": "MemberExpression", + "start": 349, + "end": 353, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "object": { + "type": "Identifier", + "start": 349, + "end": 350, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 10 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 351, + "end": 352, + "loc": { + "start": { + "line": 18, + "column": 11 + }, + "end": { + "line": 18, + "column": 12 + }, + "identifierName": "p" + }, + "name": "p" + }, + "computed": true + } + } + }, + { + "type": "ExpressionStatement", + "start": 357, + "end": 368, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 13 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 357, + "end": 367, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 12 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 357, + "end": 361, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 6 + } + }, + "object": { + "type": "Identifier", + "start": 357, + "end": 358, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + }, + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 359, + "end": 360, + "loc": { + "start": { + "line": 19, + "column": 4 + }, + "end": { + "line": 19, + "column": 5 + }, + "identifierName": "p" + }, + "name": "p" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 364, + "end": 367, + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + }, + "identifierName": "tmp" + }, + "name": "tmp" + } + } + } + ], + "directives": [] + } + } + ], + "directives": [] + } + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 376, + "end": 404, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 28 + } + }, + "declaration": { + "type": "Identifier", + "start": 391, + "end": 403, + "loc": { + "start": { + "line": 23, + "column": 15 + }, + "end": { + "line": 23, + "column": 27 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 376, + "end": 404, + "loc": { + "start": { + "line": 23, + "column": 0 + }, + "end": { + "line": 23, + "column": 28 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 52, + "end": 374, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 21, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 58, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 58, + "end": 70, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 18 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 73, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 21 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 58, + "end": 70, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 18 + }, + "identifierName": "_fisheryates" + }, + "name": "_fisheryates", + "leadingComments": null + }, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 74, + "end": 81, + "loc": { + "start": { + "line": 5, + "column": 22 + }, + "end": { + "line": 5, + "column": 29 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ], + "body": { + "type": "ArrowFunctionExpression", + "start": 86, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 34 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 87, + "end": 88, + "loc": { + "start": { + "line": 5, + "column": 35 + }, + "end": { + "line": 5, + "column": 36 + }, + "identifierName": "n" + }, + "name": "n" + }, + { + "type": "Identifier", + "start": 90, + "end": 91, + "loc": { + "start": { + "line": 5, + "column": 38 + }, + "end": { + "line": 5, + "column": 39 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 93, + "end": 94, + "loc": { + "start": { + "line": 5, + "column": 41 + }, + "end": { + "line": 5, + "column": 42 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 96, + "end": 97, + "loc": { + "start": { + "line": 5, + "column": 44 + }, + "end": { + "line": 5, + "column": 45 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "BlockStatement", + "start": 102, + "end": 373, + "loc": { + "start": { + "line": 5, + "column": 50 + }, + "end": { + "line": 21, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 142, + "end": 158, + "loc": { + "start": { + "line": 8, + "column": 1 + }, + "end": { + "line": 8, + "column": 17 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 148, + "end": 157, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 16 + } + }, + "id": { + "type": "Identifier", + "start": 148, + "end": 149, + "loc": { + "start": { + "line": 8, + "column": 7 + }, + "end": { + "line": 8, + "column": 8 + }, + "identifierName": "k" + }, + "name": "k", + "leadingComments": null + }, + "init": { + "type": "BinaryExpression", + "start": 152, + "end": 157, + "loc": { + "start": { + "line": 8, + "column": 11 + }, + "end": { + "line": 8, + "column": 16 + } + }, + "left": { + "type": "Identifier", + "start": 152, + "end": 153, + "loc": { + "start": { + "line": 8, + "column": 11 }, "end": { - "line": 14, - "column": 21 + "line": 8, + "column": 12 }, "identifierName": "i" }, "name": "i" }, - "extra": { - "parenthesizedArgument": false + "operator": "+", + "right": { + "type": "Identifier", + "start": 156, + "end": 157, + "loc": { + "start": { + "line": 8, + "column": 15 + }, + "end": { + "line": 8, + "column": 16 + }, + "identifierName": "n" + }, + "name": "n" } }, - "body": { - "type": "BlockStatement", - "start": 231, - "end": 441, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " We will swap at most n elements", + "start": 105, + "end": 139, + "loc": { + "start": { + "line": 6, + "column": 1 + }, + "end": { + "line": 6, + "column": 35 + } + } + } + ] + }, + { + "type": "ForStatement", + "start": 161, + "end": 371, + "loc": { + "start": { + "line": 10, + "column": 1 + }, + "end": { + "line": 20, + "column": 2 + } + }, + "init": null, + "test": { + "type": "BinaryExpression", + "start": 168, + "end": 173, + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 13 + } + }, + "left": { + "type": "Identifier", + "start": 168, + "end": 169, + "loc": { + "start": { + "line": 10, + "column": 8 + }, + "end": { + "line": 10, + "column": 9 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 172, + "end": 173, + "loc": { + "start": { + "line": 10, + "column": 12 + }, + "end": { + "line": 10, + "column": 13 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "update": { + "type": "UpdateExpression", + "start": 175, + "end": 178, + "loc": { + "start": { + "line": 10, + "column": 15 + }, + "end": { + "line": 10, + "column": 18 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 177, + "end": 178, + "loc": { + "start": { + "line": 10, + "column": 17 + }, + "end": { + "line": 10, + "column": 18 + }, + "identifierName": "i" + }, + "name": "i" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 180, + "end": 371, + "loc": { + "start": { + "line": 10, + "column": 20 + }, + "end": { + "line": 20, + "column": 2 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 232, + "end": 256, "loc": { "start": { - "line": 14, - "column": 24 + "line": 13, + "column": 2 }, "end": { - "line": 27, - "column": 3 + "line": 13, + "column": 26 } }, - "body": [ + "declarations": [ { - "type": "VariableDeclaration", - "start": 286, - "end": 314, + "type": "VariableDeclarator", + "start": 238, + "end": 255, "loc": { "start": { - "line": 18, - "column": 3 + "line": 13, + "column": 8 }, "end": { - "line": 18, - "column": 31 + "line": 13, + "column": 25 } }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 292, - "end": 312, + "id": { + "type": "Identifier", + "start": 238, + "end": 239, + "loc": { + "start": { + "line": 13, + "column": 8 + }, + "end": { + "line": 13, + "column": 9 + }, + "identifierName": "p" + }, + "name": "p", + "leadingComments": null + }, + "init": { + "type": "CallExpression", + "start": 242, + "end": 255, + "loc": { + "start": { + "line": 13, + "column": 12 + }, + "end": { + "line": 13, + "column": 25 + } + }, + "callee": { + "type": "Identifier", + "start": 242, + "end": 249, "loc": { "start": { - "line": 18, - "column": 9 + "line": 13, + "column": 12 }, "end": { - "line": 18, - "column": 29 - } + "line": 13, + "column": 19 + }, + "identifierName": "randint" }, - "id": { + "name": "randint" + }, + "arguments": [ + { "type": "Identifier", - "start": 292, - "end": 293, + "start": 250, + "end": 251, "loc": { "start": { - "line": 18, - "column": 9 + "line": 13, + "column": 20 }, "end": { - "line": 18, - "column": 10 + "line": 13, + "column": 21 }, - "identifierName": "p" + "identifierName": "i" }, - "name": "p", - "leadingComments": null + "name": "i" }, - "init": { - "type": "CallExpression", - "start": 296, - "end": 312, + { + "type": "Identifier", + "start": 253, + "end": 254, "loc": { "start": { - "line": 18, - "column": 13 + "line": 13, + "column": 23 }, "end": { - "line": 18, - "column": 29 - } - }, - "callee": { - "type": "Identifier", - "start": 296, - "end": 303, - "loc": { - "start": { - "line": 18, - "column": 13 - }, - "end": { - "line": 18, - "column": 20 - }, - "identifierName": "randint" - }, - "name": "randint" - }, - "arguments": [ - { - "type": "Identifier", - "start": 305, - "end": 306, - "loc": { - "start": { - "line": 18, - "column": 22 - }, - "end": { - "line": 18, - "column": 23 - }, - "identifierName": "i" - }, - "name": "i" + "line": 13, + "column": 24 }, - { - "type": "Identifier", - "start": 309, - "end": 310, - "loc": { - "start": { - "line": 18, - "column": 26 - }, - "end": { - "line": 18, - "column": 27 - }, - "identifierName": "j" - }, - "name": "j" - } - ] - }, - "leadingComments": null - } - ], - "kind": "const", - "leadingComments": [ - { - "type": "CommentLine", - "value": " choose any index p in the remaining array", - "start": 237, - "end": 281, - "loc": { - "start": { - "line": 16, - "column": 3 + "identifierName": "j" }, - "end": { - "line": 16, - "column": 47 - } + "name": "j" } + ] + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " Choose any index p in the remaining array", + "start": 184, + "end": 228, + "loc": { + "start": { + "line": 11, + "column": 2 + }, + "end": { + "line": 11, + "column": 46 } - ], - "trailingComments": [ - { - "type": "CommentLine", - "value": " swap element at index p with first element in the array", - "start": 320, - "end": 378, - "loc": { - "start": { - "line": 21, - "column": 3 - }, - "end": { - "line": 21, - "column": 61 - } - } + } + } + ], + "trailingComments": [ + { + "type": "CommentLine", + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 60 } - ] + } + } + ] + }, + { + "type": "VariableDeclaration", + "start": 322, + "end": 339, + "loc": { + "start": { + "line": 17, + "column": 2 }, + "end": { + "line": 17, + "column": 19 + } + }, + "declarations": [ { - "type": "VariableDeclaration", - "start": 383, - "end": 402, + "type": "VariableDeclarator", + "start": 328, + "end": 338, "loc": { "start": { - "line": 23, - "column": 3 + "line": 17, + "column": 8 }, "end": { - "line": 23, - "column": 22 + "line": 17, + "column": 18 } }, - "declarations": [ - { - "type": "VariableDeclarator", - "start": 389, - "end": 400, + "id": { + "type": "Identifier", + "start": 328, + "end": 331, + "loc": { + "start": { + "line": 17, + "column": 8 + }, + "end": { + "line": 17, + "column": 11 + }, + "identifierName": "tmp" + }, + "name": "tmp", + "leadingComments": null + }, + "init": { + "type": "MemberExpression", + "start": 334, + "end": 338, + "loc": { + "start": { + "line": 17, + "column": 14 + }, + "end": { + "line": 17, + "column": 18 + } + }, + "object": { + "type": "Identifier", + "start": 334, + "end": 335, "loc": { "start": { - "line": 23, - "column": 9 + "line": 17, + "column": 14 }, "end": { - "line": 23, - "column": 20 - } - }, - "id": { - "type": "Identifier", - "start": 389, - "end": 392, - "loc": { - "start": { - "line": 23, - "column": 9 - }, - "end": { - "line": 23, - "column": 12 - }, - "identifierName": "tmp" - }, - "name": "tmp", - "leadingComments": null - }, - "init": { - "type": "MemberExpression", - "start": 396, - "end": 400, - "loc": { - "start": { - "line": 23, - "column": 16 - }, - "end": { - "line": 23, - "column": 20 - } - }, - "object": { - "type": "Identifier", - "start": 396, - "end": 397, - "loc": { - "start": { - "line": 23, - "column": 16 - }, - "end": { - "line": 23, - "column": 17 - }, - "identifierName": "a" - }, - "name": "a" + "line": 17, + "column": 15 }, - "property": { - "type": "Identifier", - "start": 398, - "end": 399, - "loc": { - "start": { - "line": 23, - "column": 18 - }, - "end": { - "line": 23, - "column": 19 - }, - "identifierName": "i" - }, - "name": "i" - }, - "computed": true + "identifierName": "a" }, - "leadingComments": null - } - ], - "kind": "const", - "leadingComments": [ - { - "type": "CommentLine", - "value": " swap element at index p with first element in the array", - "start": 320, - "end": 378, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 336, + "end": 337, "loc": { "start": { - "line": 21, - "column": 3 + "line": 17, + "column": 16 }, "end": { - "line": 21, - "column": 61 - } - } + "line": 17, + "column": 17 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentLine", + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, + "loc": { + "start": { + "line": 15, + "column": 2 + }, + "end": { + "line": 15, + "column": 60 } - ] + } + } + ] + }, + { + "type": "ExpressionStatement", + "start": 342, + "end": 354, + "loc": { + "start": { + "line": 18, + "column": 2 }, - { - "type": "ExpressionStatement", - "start": 406, - "end": 419, + "end": { + "line": 18, + "column": 14 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 342, + "end": 353, + "loc": { + "start": { + "line": 18, + "column": 2 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 342, + "end": 346, "loc": { "start": { - "line": 24, - "column": 3 + "line": 18, + "column": 2 }, "end": { - "line": 24, - "column": 16 + "line": 18, + "column": 6 } }, - "expression": { - "type": "AssignmentExpression", - "start": 406, - "end": 417, + "object": { + "type": "Identifier", + "start": 342, + "end": 343, "loc": { "start": { - "line": 24, - "column": 3 + "line": 18, + "column": 2 }, "end": { - "line": 24, - "column": 14 - } - }, - "operator": "=", - "left": { - "type": "MemberExpression", - "start": 406, - "end": 410, - "loc": { - "start": { - "line": 24, - "column": 3 - }, - "end": { - "line": 24, - "column": 7 - } + "line": 18, + "column": 3 }, - "object": { - "type": "Identifier", - "start": 406, - "end": 407, - "loc": { - "start": { - "line": 24, - "column": 3 - }, - "end": { - "line": 24, - "column": 4 - }, - "identifierName": "a" - }, - "name": "a" + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 344, + "end": 345, + "loc": { + "start": { + "line": 18, + "column": 4 }, - "property": { - "type": "Identifier", - "start": 408, - "end": 409, - "loc": { - "start": { - "line": 24, - "column": 5 - }, - "end": { - "line": 24, - "column": 6 - }, - "identifierName": "i" - }, - "name": "i" + "end": { + "line": 18, + "column": 5 }, - "computed": true + "identifierName": "i" }, - "right": { - "type": "MemberExpression", - "start": 413, - "end": 417, - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 14 - } + "name": "i" + }, + "computed": true + }, + "right": { + "type": "MemberExpression", + "start": 349, + "end": 353, + "loc": { + "start": { + "line": 18, + "column": 9 + }, + "end": { + "line": 18, + "column": 13 + } + }, + "object": { + "type": "Identifier", + "start": 349, + "end": 350, + "loc": { + "start": { + "line": 18, + "column": 9 }, - "object": { - "type": "Identifier", - "start": 413, - "end": 414, - "loc": { - "start": { - "line": 24, - "column": 10 - }, - "end": { - "line": 24, - "column": 11 - }, - "identifierName": "a" - }, - "name": "a" + "end": { + "line": 18, + "column": 10 }, - "property": { - "type": "Identifier", - "start": 415, - "end": 416, - "loc": { - "start": { - "line": 24, - "column": 12 - }, - "end": { - "line": 24, - "column": 13 - }, - "identifierName": "p" - }, - "name": "p" + "identifierName": "a" + }, + "name": "a" + }, + "property": { + "type": "Identifier", + "start": 351, + "end": 352, + "loc": { + "start": { + "line": 18, + "column": 11 }, - "computed": true - } + "end": { + "line": 18, + "column": 12 + }, + "identifierName": "p" + }, + "name": "p" + }, + "computed": true + } + } + }, + { + "type": "ExpressionStatement", + "start": 357, + "end": 368, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 13 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 357, + "end": 367, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 12 } }, - { - "type": "ExpressionStatement", - "start": 423, - "end": 436, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 357, + "end": 361, "loc": { "start": { - "line": 25, - "column": 3 + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 6 + } + }, + "object": { + "type": "Identifier", + "start": 357, + "end": 358, + "loc": { + "start": { + "line": 19, + "column": 2 + }, + "end": { + "line": 19, + "column": 3 + }, + "identifierName": "a" }, - "end": { - "line": 25, - "column": 16 - } + "name": "a" }, - "expression": { - "type": "AssignmentExpression", - "start": 423, - "end": 434, + "property": { + "type": "Identifier", + "start": 359, + "end": 360, "loc": { "start": { - "line": 25, - "column": 3 + "line": 19, + "column": 4 }, "end": { - "line": 25, - "column": 14 - } - }, - "operator": "=", - "left": { - "type": "MemberExpression", - "start": 423, - "end": 427, - "loc": { - "start": { - "line": 25, - "column": 3 - }, - "end": { - "line": 25, - "column": 7 - } - }, - "object": { - "type": "Identifier", - "start": 423, - "end": 424, - "loc": { - "start": { - "line": 25, - "column": 3 - }, - "end": { - "line": 25, - "column": 4 - }, - "identifierName": "a" - }, - "name": "a" - }, - "property": { - "type": "Identifier", - "start": 425, - "end": 426, - "loc": { - "start": { - "line": 25, - "column": 5 - }, - "end": { - "line": 25, - "column": 6 - }, - "identifierName": "p" - }, - "name": "p" + "line": 19, + "column": 5 }, - "computed": true + "identifierName": "p" }, - "right": { - "type": "Identifier", - "start": 431, - "end": 434, - "loc": { - "start": { - "line": 25, - "column": 11 - }, - "end": { - "line": 25, - "column": 14 - }, - "identifierName": "tmp" - }, - "name": "tmp" - } - } + "name": "p" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 364, + "end": 367, + "loc": { + "start": { + "line": 19, + "column": 9 + }, + "end": { + "line": 19, + "column": 12 + }, + "identifierName": "tmp" + }, + "name": "tmp" } - ], - "directives": [] + } } - } - ], - "directives": [] + ], + "directives": [] + } } - } - } - ], - "kind": "const" - }, - { - "type": "ReturnStatement", - "start": 450, - "end": 470, - "loc": { - "start": { - "line": 31, - "column": 1 - }, - "end": { - "line": 31, - "column": 21 + ], + "directives": [] } - }, - "argument": { - "type": "Identifier", - "start": 457, - "end": 468, - "loc": { - "start": { - "line": 31, - "column": 8 - }, - "end": { - "line": 31, - "column": 19 - }, - "identifierName": "fisheryates" - }, - "name": "fisheryates" } - } - ], - "directives": [] - }, + }, + "leadingComments": null + } + ], + "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Sample array using Fisher-Yates method.\n ", - "start": 1, - "end": 51, + "start": 0, + "end": 50, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 3 } } } ], "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Sample array using Fisher-Yates method.\n ", - "start": 1, - "end": 51, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 3 - } - } - } - ] + } } ], "directives": [] @@ -1097,64 +2010,64 @@ { "type": "CommentBlock", "value": "*\n * Sample array using Fisher-Yates method.\n ", - "start": 1, - "end": 51, + "start": 0, + "end": 50, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 3 } } }, { "type": "CommentLine", - "value": " we will swap at most n elements", - "start": 150, - "end": 184, + "value": " We will swap at most n elements", + "start": 105, + "end": 139, "loc": { "start": { - "line": 10, - "column": 2 + "line": 6, + "column": 1 }, "end": { - "line": 10, - "column": 36 + "line": 6, + "column": 35 } } }, { "type": "CommentLine", - "value": " choose any index p in the remaining array", - "start": 237, - "end": 281, + "value": " Choose any index p in the remaining array", + "start": 184, + "end": 228, "loc": { "start": { - "line": 16, - "column": 3 + "line": 11, + "column": 2 }, "end": { - "line": 16, - "column": 47 + "line": 11, + "column": 46 } } }, { "type": "CommentLine", - "value": " swap element at index p with first element in the array", - "start": 320, - "end": 378, + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, "loc": { "start": { - "line": 21, - "column": 3 + "line": 15, + "column": 2 }, "end": { - "line": 21, - "column": 61 + "line": 15, + "column": 60 } } } @@ -1163,23 +2076,23 @@ { "type": "CommentBlock", "value": "*\n * Sample array using Fisher-Yates method.\n ", - "start": 1, - "end": 51, + "start": 0, + "end": 50, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 3 } } }, { "type": { - "label": "export", - "keyword": "export", + "label": "const", + "keyword": "const", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -1190,24 +2103,23 @@ "binop": null, "updateContext": null }, - "value": "export", - "start": 53, - "end": 59, + "value": "const", + "start": 52, + "end": 57, "loc": { "start": { - "line": 6, + "line": 5, "column": 0 }, "end": { - "line": 6, - "column": 6 + "line": 5, + "column": 5 } } }, { "type": { - "label": "function", - "keyword": "function", + "label": "name", "beforeExpr": false, "startsExpr": true, "rightAssociative": false, @@ -1217,43 +2129,44 @@ "postfix": false, "binop": null }, - "value": "function", - "start": 60, - "end": 68, + "value": "_fisheryates", + "start": 58, + "end": 70, "loc": { "start": { - "line": 6, - "column": 7 + "line": 5, + "column": 6 }, "end": { - "line": 6, - "column": 15 + "line": 5, + "column": 18 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "=", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "_fisheryates", - "start": 69, - "end": 81, + "value": "=", + "start": 71, + "end": 72, "loc": { "start": { - "line": 6, - "column": 16 + "line": 5, + "column": 19 }, "end": { - "line": 6, - "column": 28 + "line": 5, + "column": 20 } } }, @@ -1269,16 +2182,16 @@ "postfix": false, "binop": null }, - "start": 82, - "end": 83, + "start": 73, + "end": 74, "loc": { "start": { - "line": 6, - "column": 29 + "line": 5, + "column": 21 }, "end": { - "line": 6, - "column": 30 + "line": 5, + "column": 22 } } }, @@ -1295,16 +2208,16 @@ "binop": null }, "value": "randint", - "start": 84, - "end": 91, + "start": 74, + "end": 81, "loc": { "start": { - "line": 6, - "column": 31 + "line": 5, + "column": 22 }, "end": { - "line": 6, - "column": 38 + "line": 5, + "column": 29 } } }, @@ -1318,151 +2231,44 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null - }, - "start": 92, - "end": 93, - "loc": { - "start": { - "line": 6, - "column": 39 - }, - "end": { - "line": 6, - "column": 40 - } - } - }, - { - "type": { - "label": "{", - "beforeExpr": true, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 94, - "end": 95, - "loc": { - "start": { - "line": 6, - "column": 41 - }, - "end": { - "line": 6, - "column": 42 - } - } - }, - { - "type": { - "label": "const", - "keyword": "const", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "const", - "start": 98, - "end": 103, - "loc": { - "start": { - "line": 8, - "column": 1 - }, - "end": { - "line": 8, - "column": 6 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "fisheryates", - "start": 104, - "end": 115, - "loc": { - "start": { - "line": 8, - "column": 7 - }, - "end": { - "line": 8, - "column": 18 - } - } - }, - { - "type": { - "label": "=", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": true, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "=", - "start": 116, - "end": 117, + "start": 81, + "end": 82, "loc": { "start": { - "line": 8, - "column": 19 + "line": 5, + "column": 29 }, "end": { - "line": 8, - "column": 20 + "line": 5, + "column": 30 } } }, { "type": { - "label": "function", - "keyword": "function", - "beforeExpr": false, - "startsExpr": true, + "label": "=>", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "function", - "start": 118, - "end": 126, + "start": 83, + "end": 85, "loc": { "start": { - "line": 8, - "column": 21 + "line": 5, + "column": 31 }, "end": { - "line": 8, - "column": 29 + "line": 5, + "column": 33 } } }, @@ -1478,16 +2284,16 @@ "postfix": false, "binop": null }, - "start": 127, - "end": 128, + "start": 86, + "end": 87, "loc": { "start": { - "line": 8, - "column": 30 + "line": 5, + "column": 34 }, "end": { - "line": 8, - "column": 31 + "line": 5, + "column": 35 } } }, @@ -1504,16 +2310,16 @@ "binop": null }, "value": "n", - "start": 129, - "end": 130, + "start": 87, + "end": 88, "loc": { "start": { - "line": 8, - "column": 32 + "line": 5, + "column": 35 }, "end": { - "line": 8, - "column": 33 + "line": 5, + "column": 36 } } }, @@ -1530,16 +2336,16 @@ "binop": null, "updateContext": null }, - "start": 131, - "end": 132, + "start": 88, + "end": 89, "loc": { "start": { - "line": 8, - "column": 34 + "line": 5, + "column": 36 }, "end": { - "line": 8, - "column": 35 + "line": 5, + "column": 37 } } }, @@ -1556,16 +2362,16 @@ "binop": null }, "value": "a", - "start": 133, - "end": 134, + "start": 90, + "end": 91, "loc": { "start": { - "line": 8, - "column": 36 + "line": 5, + "column": 38 }, "end": { - "line": 8, - "column": 37 + "line": 5, + "column": 39 } } }, @@ -1582,16 +2388,16 @@ "binop": null, "updateContext": null }, - "start": 135, - "end": 136, + "start": 91, + "end": 92, "loc": { "start": { - "line": 8, - "column": 38 + "line": 5, + "column": 39 }, "end": { - "line": 8, - "column": 39 + "line": 5, + "column": 40 } } }, @@ -1608,16 +2414,16 @@ "binop": null }, "value": "i", - "start": 137, - "end": 138, + "start": 93, + "end": 94, "loc": { "start": { - "line": 8, - "column": 40 + "line": 5, + "column": 41 }, "end": { - "line": 8, - "column": 41 + "line": 5, + "column": 42 } } }, @@ -1634,15 +2440,15 @@ "binop": null, "updateContext": null }, - "start": 139, - "end": 140, + "start": 94, + "end": 95, "loc": { "start": { - "line": 8, + "line": 5, "column": 42 }, "end": { - "line": 8, + "line": 5, "column": 43 } } @@ -1660,15 +2466,15 @@ "binop": null }, "value": "j", - "start": 141, - "end": 142, + "start": 96, + "end": 97, "loc": { "start": { - "line": 8, + "line": 5, "column": 44 }, "end": { - "line": 8, + "line": 5, "column": 45 } } @@ -1685,16 +2491,42 @@ "postfix": false, "binop": null }, - "start": 143, - "end": 144, + "start": 97, + "end": 98, "loc": { "start": { - "line": 8, - "column": 46 + "line": 5, + "column": 45 }, "end": { - "line": 8, + "line": 5, + "column": 46 + } + } + }, + { + "type": { + "label": "=>", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 99, + "end": 101, + "loc": { + "start": { + "line": 5, "column": 47 + }, + "end": { + "line": 5, + "column": 49 } } }, @@ -1710,32 +2542,32 @@ "postfix": false, "binop": null }, - "start": 145, - "end": 146, + "start": 102, + "end": 103, "loc": { "start": { - "line": 8, - "column": 48 + "line": 5, + "column": 50 }, "end": { - "line": 8, - "column": 49 + "line": 5, + "column": 51 } } }, { "type": "CommentLine", - "value": " we will swap at most n elements", - "start": 150, - "end": 184, + "value": " We will swap at most n elements", + "start": 105, + "end": 139, "loc": { "start": { - "line": 10, - "column": 2 + "line": 6, + "column": 1 }, "end": { - "line": 10, - "column": 36 + "line": 6, + "column": 35 } } }, @@ -1754,16 +2586,16 @@ "updateContext": null }, "value": "const", - "start": 188, - "end": 193, + "start": 142, + "end": 147, "loc": { "start": { - "line": 12, - "column": 2 + "line": 8, + "column": 1 }, "end": { - "line": 12, - "column": 7 + "line": 8, + "column": 6 } } }, @@ -1780,16 +2612,16 @@ "binop": null }, "value": "k", - "start": 194, - "end": 195, + "start": 148, + "end": 149, "loc": { "start": { - "line": 12, - "column": 8 + "line": 8, + "column": 7 }, "end": { - "line": 12, - "column": 9 + "line": 8, + "column": 8 } } }, @@ -1807,16 +2639,16 @@ "updateContext": null }, "value": "=", - "start": 196, - "end": 197, + "start": 150, + "end": 151, "loc": { "start": { - "line": 12, - "column": 10 + "line": 8, + "column": 9 }, "end": { - "line": 12, - "column": 11 + "line": 8, + "column": 10 } } }, @@ -1833,16 +2665,16 @@ "binop": null }, "value": "i", - "start": 198, - "end": 199, + "start": 152, + "end": 153, "loc": { "start": { - "line": 12, - "column": 12 + "line": 8, + "column": 11 }, "end": { - "line": 12, - "column": 13 + "line": 8, + "column": 12 } } }, @@ -1860,16 +2692,16 @@ "updateContext": null }, "value": "+", - "start": 200, - "end": 201, + "start": 154, + "end": 155, "loc": { "start": { - "line": 12, - "column": 14 + "line": 8, + "column": 13 }, "end": { - "line": 12, - "column": 15 + "line": 8, + "column": 14 } } }, @@ -1886,16 +2718,16 @@ "binop": null }, "value": "n", - "start": 202, - "end": 203, + "start": 156, + "end": 157, "loc": { "start": { - "line": 12, - "column": 16 + "line": 8, + "column": 15 }, "end": { - "line": 12, - "column": 17 + "line": 8, + "column": 16 } } }, @@ -1912,16 +2744,16 @@ "binop": null, "updateContext": null }, - "start": 204, - "end": 205, + "start": 157, + "end": 158, "loc": { "start": { - "line": 12, - "column": 18 + "line": 8, + "column": 16 }, "end": { - "line": 12, - "column": 19 + "line": 8, + "column": 17 } } }, @@ -1940,16 +2772,16 @@ "updateContext": null }, "value": "for", - "start": 209, - "end": 212, + "start": 161, + "end": 164, "loc": { "start": { - "line": 14, - "column": 2 + "line": 10, + "column": 1 }, "end": { - "line": 14, - "column": 5 + "line": 10, + "column": 4 } } }, @@ -1965,16 +2797,16 @@ "postfix": false, "binop": null }, - "start": 213, - "end": 214, + "start": 165, + "end": 166, "loc": { "start": { - "line": 14, - "column": 6 + "line": 10, + "column": 5 }, "end": { - "line": 14, - "column": 7 + "line": 10, + "column": 6 } } }, @@ -1991,16 +2823,16 @@ "binop": null, "updateContext": null }, - "start": 215, - "end": 216, + "start": 166, + "end": 167, "loc": { "start": { - "line": 14, - "column": 8 + "line": 10, + "column": 6 }, "end": { - "line": 14, - "column": 9 + "line": 10, + "column": 7 } } }, @@ -2017,16 +2849,16 @@ "binop": null }, "value": "i", - "start": 217, - "end": 218, + "start": 168, + "end": 169, "loc": { "start": { - "line": 14, - "column": 10 + "line": 10, + "column": 8 }, "end": { - "line": 14, - "column": 11 + "line": 10, + "column": 9 } } }, @@ -2044,16 +2876,16 @@ "updateContext": null }, "value": "<", - "start": 219, - "end": 220, + "start": 170, + "end": 171, "loc": { "start": { - "line": 14, - "column": 12 + "line": 10, + "column": 10 }, "end": { - "line": 14, - "column": 13 + "line": 10, + "column": 11 } } }, @@ -2070,16 +2902,16 @@ "binop": null }, "value": "k", - "start": 221, - "end": 222, + "start": 172, + "end": 173, "loc": { "start": { - "line": 14, - "column": 14 + "line": 10, + "column": 12 }, "end": { - "line": 14, - "column": 15 + "line": 10, + "column": 13 } } }, @@ -2096,16 +2928,16 @@ "binop": null, "updateContext": null }, - "start": 223, - "end": 224, + "start": 173, + "end": 174, "loc": { "start": { - "line": 14, - "column": 16 + "line": 10, + "column": 13 }, "end": { - "line": 14, - "column": 17 + "line": 10, + "column": 14 } } }, @@ -2122,16 +2954,16 @@ "binop": null }, "value": "++", - "start": 225, - "end": 227, + "start": 175, + "end": 177, "loc": { "start": { - "line": 14, - "column": 18 + "line": 10, + "column": 15 }, "end": { - "line": 14, - "column": 20 + "line": 10, + "column": 17 } } }, @@ -2148,16 +2980,16 @@ "binop": null }, "value": "i", - "start": 227, - "end": 228, + "start": 177, + "end": 178, "loc": { "start": { - "line": 14, - "column": 20 + "line": 10, + "column": 17 }, "end": { - "line": 14, - "column": 21 + "line": 10, + "column": 18 } } }, @@ -2173,16 +3005,16 @@ "postfix": false, "binop": null }, - "start": 229, - "end": 230, + "start": 178, + "end": 179, "loc": { "start": { - "line": 14, - "column": 22 + "line": 10, + "column": 18 }, "end": { - "line": 14, - "column": 23 + "line": 10, + "column": 19 } } }, @@ -2198,32 +3030,32 @@ "postfix": false, "binop": null }, - "start": 231, - "end": 232, + "start": 180, + "end": 181, "loc": { "start": { - "line": 14, - "column": 24 + "line": 10, + "column": 20 }, "end": { - "line": 14, - "column": 25 + "line": 10, + "column": 21 } } }, { "type": "CommentLine", - "value": " choose any index p in the remaining array", - "start": 237, - "end": 281, + "value": " Choose any index p in the remaining array", + "start": 184, + "end": 228, "loc": { "start": { - "line": 16, - "column": 3 + "line": 11, + "column": 2 }, "end": { - "line": 16, - "column": 47 + "line": 11, + "column": 46 } } }, @@ -2242,16 +3074,16 @@ "updateContext": null }, "value": "const", - "start": 286, - "end": 291, + "start": 232, + "end": 237, "loc": { "start": { - "line": 18, - "column": 3 + "line": 13, + "column": 2 }, "end": { - "line": 18, - "column": 8 + "line": 13, + "column": 7 } } }, @@ -2268,16 +3100,16 @@ "binop": null }, "value": "p", - "start": 292, - "end": 293, + "start": 238, + "end": 239, "loc": { "start": { - "line": 18, - "column": 9 + "line": 13, + "column": 8 }, "end": { - "line": 18, - "column": 10 + "line": 13, + "column": 9 } } }, @@ -2295,16 +3127,16 @@ "updateContext": null }, "value": "=", - "start": 294, - "end": 295, + "start": 240, + "end": 241, "loc": { "start": { - "line": 18, - "column": 11 + "line": 13, + "column": 10 }, "end": { - "line": 18, - "column": 12 + "line": 13, + "column": 11 } } }, @@ -2321,16 +3153,16 @@ "binop": null }, "value": "randint", - "start": 296, - "end": 303, + "start": 242, + "end": 249, "loc": { "start": { - "line": 18, - "column": 13 + "line": 13, + "column": 12 }, "end": { - "line": 18, - "column": 20 + "line": 13, + "column": 19 } } }, @@ -2346,16 +3178,16 @@ "postfix": false, "binop": null }, - "start": 303, - "end": 304, + "start": 249, + "end": 250, "loc": { "start": { - "line": 18, - "column": 20 + "line": 13, + "column": 19 }, "end": { - "line": 18, - "column": 21 + "line": 13, + "column": 20 } } }, @@ -2372,16 +3204,16 @@ "binop": null }, "value": "i", - "start": 305, - "end": 306, + "start": 250, + "end": 251, "loc": { "start": { - "line": 18, - "column": 22 + "line": 13, + "column": 20 }, "end": { - "line": 18, - "column": 23 + "line": 13, + "column": 21 } } }, @@ -2398,16 +3230,16 @@ "binop": null, "updateContext": null }, - "start": 307, - "end": 308, + "start": 251, + "end": 252, "loc": { "start": { - "line": 18, - "column": 24 + "line": 13, + "column": 21 }, "end": { - "line": 18, - "column": 25 + "line": 13, + "column": 22 } } }, @@ -2424,16 +3256,16 @@ "binop": null }, "value": "j", - "start": 309, - "end": 310, + "start": 253, + "end": 254, "loc": { "start": { - "line": 18, - "column": 26 + "line": 13, + "column": 23 }, "end": { - "line": 18, - "column": 27 + "line": 13, + "column": 24 } } }, @@ -2449,16 +3281,16 @@ "postfix": false, "binop": null }, - "start": 311, - "end": 312, + "start": 254, + "end": 255, "loc": { "start": { - "line": 18, - "column": 28 + "line": 13, + "column": 24 }, "end": { - "line": 18, - "column": 29 + "line": 13, + "column": 25 } } }, @@ -2475,32 +3307,32 @@ "binop": null, "updateContext": null }, - "start": 313, - "end": 314, + "start": 255, + "end": 256, "loc": { "start": { - "line": 18, - "column": 30 + "line": 13, + "column": 25 }, "end": { - "line": 18, - "column": 31 + "line": 13, + "column": 26 } } }, { "type": "CommentLine", - "value": " swap element at index p with first element in the array", - "start": 320, - "end": 378, + "value": " Swap element at index p with first element in the array", + "start": 260, + "end": 318, "loc": { "start": { - "line": 21, - "column": 3 + "line": 15, + "column": 2 }, "end": { - "line": 21, - "column": 61 + "line": 15, + "column": 60 } } }, @@ -2519,16 +3351,16 @@ "updateContext": null }, "value": "const", - "start": 383, - "end": 388, + "start": 322, + "end": 327, "loc": { "start": { - "line": 23, - "column": 3 + "line": 17, + "column": 2 }, "end": { - "line": 23, - "column": 8 + "line": 17, + "column": 7 } } }, @@ -2545,16 +3377,16 @@ "binop": null }, "value": "tmp", - "start": 389, - "end": 392, + "start": 328, + "end": 331, "loc": { "start": { - "line": 23, - "column": 9 + "line": 17, + "column": 8 }, "end": { - "line": 23, - "column": 12 + "line": 17, + "column": 11 } } }, @@ -2572,16 +3404,16 @@ "updateContext": null }, "value": "=", - "start": 394, - "end": 395, + "start": 332, + "end": 333, "loc": { "start": { - "line": 23, - "column": 14 + "line": 17, + "column": 12 }, "end": { - "line": 23, - "column": 15 + "line": 17, + "column": 13 } } }, @@ -2598,16 +3430,16 @@ "binop": null }, "value": "a", - "start": 396, - "end": 397, + "start": 334, + "end": 335, "loc": { "start": { - "line": 23, - "column": 16 + "line": 17, + "column": 14 }, "end": { - "line": 23, - "column": 17 + "line": 17, + "column": 15 } } }, @@ -2624,16 +3456,16 @@ "binop": null, "updateContext": null }, - "start": 397, - "end": 398, + "start": 335, + "end": 336, "loc": { "start": { - "line": 23, - "column": 17 + "line": 17, + "column": 15 }, "end": { - "line": 23, - "column": 18 + "line": 17, + "column": 16 } } }, @@ -2650,16 +3482,16 @@ "binop": null }, "value": "i", - "start": 398, - "end": 399, + "start": 336, + "end": 337, "loc": { "start": { - "line": 23, - "column": 18 + "line": 17, + "column": 16 }, "end": { - "line": 23, - "column": 19 + "line": 17, + "column": 17 } } }, @@ -2676,16 +3508,16 @@ "binop": null, "updateContext": null }, - "start": 399, - "end": 400, + "start": 337, + "end": 338, "loc": { "start": { - "line": 23, - "column": 19 + "line": 17, + "column": 17 }, "end": { - "line": 23, - "column": 20 + "line": 17, + "column": 18 } } }, @@ -2702,16 +3534,16 @@ "binop": null, "updateContext": null }, - "start": 401, - "end": 402, + "start": 338, + "end": 339, "loc": { "start": { - "line": 23, - "column": 21 + "line": 17, + "column": 18 }, "end": { - "line": 23, - "column": 22 + "line": 17, + "column": 19 } } }, @@ -2728,16 +3560,16 @@ "binop": null }, "value": "a", - "start": 406, - "end": 407, + "start": 342, + "end": 343, "loc": { "start": { - "line": 24, - "column": 3 + "line": 18, + "column": 2 }, "end": { - "line": 24, - "column": 4 + "line": 18, + "column": 3 } } }, @@ -2754,16 +3586,16 @@ "binop": null, "updateContext": null }, - "start": 407, - "end": 408, + "start": 343, + "end": 344, "loc": { "start": { - "line": 24, - "column": 4 + "line": 18, + "column": 3 }, "end": { - "line": 24, - "column": 5 + "line": 18, + "column": 4 } } }, @@ -2780,16 +3612,16 @@ "binop": null }, "value": "i", - "start": 408, - "end": 409, + "start": 344, + "end": 345, "loc": { "start": { - "line": 24, - "column": 5 + "line": 18, + "column": 4 }, "end": { - "line": 24, - "column": 6 + "line": 18, + "column": 5 } } }, @@ -2806,16 +3638,16 @@ "binop": null, "updateContext": null }, - "start": 409, - "end": 410, + "start": 345, + "end": 346, "loc": { "start": { - "line": 24, - "column": 6 + "line": 18, + "column": 5 }, "end": { - "line": 24, - "column": 7 + "line": 18, + "column": 6 } } }, @@ -2833,16 +3665,16 @@ "updateContext": null }, "value": "=", - "start": 411, - "end": 412, + "start": 347, + "end": 348, "loc": { "start": { - "line": 24, - "column": 8 + "line": 18, + "column": 7 }, "end": { - "line": 24, - "column": 9 + "line": 18, + "column": 8 } } }, @@ -2859,16 +3691,16 @@ "binop": null }, "value": "a", - "start": 413, - "end": 414, + "start": 349, + "end": 350, "loc": { "start": { - "line": 24, - "column": 10 + "line": 18, + "column": 9 }, "end": { - "line": 24, - "column": 11 + "line": 18, + "column": 10 } } }, @@ -2885,16 +3717,16 @@ "binop": null, "updateContext": null }, - "start": 414, - "end": 415, + "start": 350, + "end": 351, "loc": { "start": { - "line": 24, - "column": 11 + "line": 18, + "column": 10 }, "end": { - "line": 24, - "column": 12 + "line": 18, + "column": 11 } } }, @@ -2911,16 +3743,16 @@ "binop": null }, "value": "p", - "start": 415, - "end": 416, + "start": 351, + "end": 352, "loc": { "start": { - "line": 24, - "column": 12 + "line": 18, + "column": 11 }, "end": { - "line": 24, - "column": 13 + "line": 18, + "column": 12 } } }, @@ -2937,16 +3769,16 @@ "binop": null, "updateContext": null }, - "start": 416, - "end": 417, + "start": 352, + "end": 353, "loc": { "start": { - "line": 24, - "column": 13 + "line": 18, + "column": 12 }, "end": { - "line": 24, - "column": 14 + "line": 18, + "column": 13 } } }, @@ -2963,16 +3795,16 @@ "binop": null, "updateContext": null }, - "start": 418, - "end": 419, + "start": 353, + "end": 354, "loc": { "start": { - "line": 24, - "column": 15 + "line": 18, + "column": 13 }, "end": { - "line": 24, - "column": 16 + "line": 18, + "column": 14 } } }, @@ -2989,16 +3821,16 @@ "binop": null }, "value": "a", - "start": 423, - "end": 424, + "start": 357, + "end": 358, "loc": { "start": { - "line": 25, - "column": 3 + "line": 19, + "column": 2 }, "end": { - "line": 25, - "column": 4 + "line": 19, + "column": 3 } } }, @@ -3015,16 +3847,16 @@ "binop": null, "updateContext": null }, - "start": 424, - "end": 425, + "start": 358, + "end": 359, "loc": { "start": { - "line": 25, - "column": 4 + "line": 19, + "column": 3 }, "end": { - "line": 25, - "column": 5 + "line": 19, + "column": 4 } } }, @@ -3041,16 +3873,16 @@ "binop": null }, "value": "p", - "start": 425, - "end": 426, + "start": 359, + "end": 360, "loc": { "start": { - "line": 25, - "column": 5 + "line": 19, + "column": 4 }, "end": { - "line": 25, - "column": 6 + "line": 19, + "column": 5 } } }, @@ -3067,16 +3899,16 @@ "binop": null, "updateContext": null }, - "start": 426, - "end": 427, + "start": 360, + "end": 361, "loc": { "start": { - "line": 25, - "column": 6 + "line": 19, + "column": 5 }, "end": { - "line": 25, - "column": 7 + "line": 19, + "column": 6 } } }, @@ -3094,16 +3926,16 @@ "updateContext": null }, "value": "=", - "start": 428, - "end": 429, + "start": 362, + "end": 363, "loc": { "start": { - "line": 25, - "column": 8 + "line": 19, + "column": 7 }, "end": { - "line": 25, - "column": 9 + "line": 19, + "column": 8 } } }, @@ -3120,16 +3952,16 @@ "binop": null }, "value": "tmp", - "start": 431, - "end": 434, + "start": 364, + "end": 367, "loc": { "start": { - "line": 25, - "column": 11 + "line": 19, + "column": 9 }, "end": { - "line": 25, - "column": 14 + "line": 19, + "column": 12 } } }, @@ -3146,16 +3978,16 @@ "binop": null, "updateContext": null }, - "start": 435, - "end": 436, + "start": 367, + "end": 368, "loc": { "start": { - "line": 25, - "column": 15 + "line": 19, + "column": 12 }, "end": { - "line": 25, - "column": 16 + "line": 19, + "column": 13 } } }, @@ -3171,16 +4003,16 @@ "postfix": false, "binop": null }, - "start": 440, - "end": 441, + "start": 370, + "end": 371, "loc": { "start": { - "line": 27, - "column": 2 + "line": 20, + "column": 1 }, "end": { - "line": 27, - "column": 3 + "line": 20, + "column": 2 } } }, @@ -3196,16 +4028,16 @@ "postfix": false, "binop": null }, - "start": 444, - "end": 445, + "start": 372, + "end": 373, "loc": { "start": { - "line": 29, - "column": 1 + "line": 21, + "column": 0 }, "end": { - "line": 29, - "column": 2 + "line": 21, + "column": 1 } } }, @@ -3222,24 +4054,24 @@ "binop": null, "updateContext": null }, - "start": 446, - "end": 447, + "start": 373, + "end": 374, "loc": { "start": { - "line": 29, - "column": 3 + "line": 21, + "column": 1 }, "end": { - "line": 29, - "column": 4 + "line": 21, + "column": 2 } } }, { "type": { - "label": "return", - "keyword": "return", - "beforeExpr": true, + "label": "export", + "keyword": "export", + "beforeExpr": false, "startsExpr": false, "rightAssociative": false, "isLoop": false, @@ -3249,94 +4081,97 @@ "binop": null, "updateContext": null }, - "value": "return", - "start": 450, - "end": 456, + "value": "export", + "start": 376, + "end": 382, "loc": { "start": { - "line": 31, - "column": 1 + "line": 23, + "column": 0 }, "end": { - "line": 31, - "column": 7 + "line": 23, + "column": 6 } } }, { "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "value": "fisheryates", - "start": 457, - "end": 468, + "value": "default", + "start": 383, + "end": 390, "loc": { "start": { - "line": 31, - "column": 8 + "line": 23, + "column": 7 }, "end": { - "line": 31, - "column": 19 + "line": 23, + "column": 14 } } }, { "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, + "label": "name", + "beforeExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "start": 469, - "end": 470, + "value": "_fisheryates", + "start": 391, + "end": 403, "loc": { "start": { - "line": 31, - "column": 20 + "line": 23, + "column": 15 }, "end": { - "line": 31, - "column": 21 + "line": 23, + "column": 27 } } }, { "type": { - "label": "}", - "beforeExpr": false, + "label": ";", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 472, - "end": 473, + "start": 403, + "end": 404, "loc": { "start": { - "line": 33, - "column": 0 + "line": 23, + "column": 27 }, "end": { - "line": 33, - "column": 1 + "line": 23, + "column": 28 } } }, @@ -3353,15 +4188,15 @@ "binop": null, "updateContext": null }, - "start": 475, - "end": 475, + "start": 405, + "end": 405, "loc": { "start": { - "line": 35, + "line": 24, "column": 0 }, "end": { - "line": 35, + "line": 24, "column": 0 } } diff --git a/ast/source/kernel/_shuffle.js.json b/ast/source/kernel/_shuffle.js.json index b9d3421..7891b01 100644 --- a/ast/source/kernel/_shuffle.js.json +++ b/ast/source/kernel/_shuffle.js.json @@ -1,623 +1,779 @@ { "type": "File", "start": 0, - "end": 200, + "end": 149, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 16, + "line": 7, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 200, + "end": 149, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 16, + "line": 7, "column": 0 } }, "sourceType": "module", "body": [ { - "type": "ExportNamedDeclaration", - "start": 59, - "end": 198, + "type": "Identifier", + "start": 58, + "end": 123, + "loc": { + "start": { + "line": 5, + "column": 0 + }, + "end": { + "line": 5, + "column": 65 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 64, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "id": { + "type": "Identifier", + "start": 64, + "end": 72, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 14 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 75, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 17 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 76, + "end": 82, + "loc": { + "start": { + "line": 5, + "column": 18 + }, + "end": { + "line": 5, + "column": 24 + }, + "identifierName": "sample" + }, + "name": "sample" + } + ], + "body": { + "type": "ArrowFunctionExpression", + "start": 87, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 88, + "end": 89, + "loc": { + "start": { + "line": 5, + "column": 30 + }, + "end": { + "line": 5, + "column": 31 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 91, + "end": 92, + "loc": { + "start": { + "line": 5, + "column": 33 + }, + "end": { + "line": 5, + "column": 34 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 94, + "end": 95, + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 37 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "CallExpression", + "start": 100, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 100, + "end": 106, + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 48 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 107, + "end": 112, + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 54 + } + }, + "left": { + "type": "Identifier", + "start": 107, + "end": 108, + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 50 + }, + "identifierName": "j" + }, + "name": "j" + }, + "operator": "-", + "right": { + "type": "Identifier", + "start": 111, + "end": 112, + "loc": { + "start": { + "line": 5, + "column": 53 + }, + "end": { + "line": 5, + "column": 54 + }, + "identifierName": "i" + }, + "name": "i" + } + }, + { + "type": "Identifier", + "start": 114, + "end": 115, + "loc": { + "start": { + "line": 5, + "column": 56 + }, + "end": { + "line": 5, + "column": 57 + }, + "identifierName": "a" + }, + "name": "a" + }, + { + "type": "Identifier", + "start": 117, + "end": 118, + "loc": { + "start": { + "line": 5, + "column": 59 + }, + "end": { + "line": 5, + "column": 60 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 120, + "end": 121, + "loc": { + "start": { + "line": 5, + "column": 62 + }, + "end": { + "line": 5, + "column": 63 + }, + "identifierName": "j" + }, + "name": "j" + } + ] + } + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 124, + "end": 148, "loc": { "start": { "line": 6, "column": 0 }, "end": { - "line": 14, - "column": 1 + "line": 6, + "column": 24 } }, - "specifiers": [], - "source": null, "declaration": { - "type": "FunctionDeclaration", - "start": 66, - "end": 198, + "type": "Identifier", + "start": 139, + "end": 147, "loc": { "start": { "line": 6, - "column": 7 + "column": 15 }, "end": { - "line": 14, - "column": 1 - } + "line": 6, + "column": 23 + }, + "identifierName": "_shuffle" }, - "id": { - "type": "Identifier", - "start": 75, - "end": 83, - "loc": { - "start": { - "line": 6, - "column": 16 - }, - "end": { - "line": 6, - "column": 24 - }, - "identifierName": "_shuffle" + "name": "_shuffle" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 124, + "end": 148, + "loc": { + "start": { + "line": 6, + "column": 0 + }, + "end": { + "line": 6, + "column": 24 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 58, + "end": 123, + "loc": { + "start": { + "line": 5, + "column": 0 }, - "name": "_shuffle", - "leadingComments": null + "end": { + "line": 5, + "column": 65 + } }, - "generator": false, - "expression": false, - "async": false, - "params": [ + "declarations": [ { - "type": "Identifier", - "start": 86, - "end": 92, + "type": "VariableDeclarator", + "start": 64, + "end": 122, "loc": { "start": { - "line": 6, - "column": 27 + "line": 5, + "column": 6 }, "end": { - "line": 6, - "column": 33 - }, - "identifierName": "sample" + "line": 5, + "column": 64 + } }, - "name": "sample" - } - ], - "body": { - "type": "BlockStatement", - "start": 95, - "end": 198, - "loc": { - "start": { - "line": 6, - "column": 36 + "id": { + "type": "Identifier", + "start": 64, + "end": 72, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 14 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle", + "leadingComments": null }, - "end": { - "line": 14, - "column": 1 - } - }, - "body": [ - { - "type": "VariableDeclaration", - "start": 99, - "end": 176, + "init": { + "type": "ArrowFunctionExpression", + "start": 75, + "end": 122, "loc": { "start": { - "line": 8, - "column": 1 + "line": 5, + "column": 17 }, "end": { - "line": 10, - "column": 4 + "line": 5, + "column": 64 } }, - "declarations": [ + "id": { + "type": "Identifier", + "start": 64, + "end": 72, + "loc": { + "start": { + "line": 5, + "column": 6 + }, + "end": { + "line": 5, + "column": 14 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle", + "leadingComments": null + }, + "generator": false, + "expression": true, + "async": false, + "params": [ { - "type": "VariableDeclarator", - "start": 105, - "end": 174, + "type": "Identifier", + "start": 76, + "end": 82, "loc": { "start": { - "line": 8, - "column": 7 + "line": 5, + "column": 18 }, "end": { - "line": 10, - "column": 2 - } + "line": 5, + "column": 24 + }, + "identifierName": "sample" }, - "id": { + "name": "sample" + } + ], + "body": { + "type": "ArrowFunctionExpression", + "start": 87, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 29 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "id": null, + "generator": false, + "expression": true, + "async": false, + "params": [ + { "type": "Identifier", - "start": 105, - "end": 112, + "start": 88, + "end": 89, "loc": { "start": { - "line": 8, - "column": 7 + "line": 5, + "column": 30 }, "end": { - "line": 8, - "column": 14 + "line": 5, + "column": 31 }, - "identifierName": "shuffle" + "identifierName": "a" }, - "name": "shuffle" + "name": "a" }, - "init": { - "type": "FunctionExpression", - "start": 115, - "end": 174, + { + "type": "Identifier", + "start": 91, + "end": 92, "loc": { "start": { - "line": 8, - "column": 17 + "line": 5, + "column": 33 }, "end": { - "line": 10, - "column": 2 - } + "line": 5, + "column": 34 + }, + "identifierName": "i" }, - "id": null, - "generator": false, - "expression": false, - "async": false, - "params": [ - { + "name": "i" + }, + { + "type": "Identifier", + "start": 94, + "end": 95, + "loc": { + "start": { + "line": 5, + "column": 36 + }, + "end": { + "line": 5, + "column": 37 + }, + "identifierName": "j" + }, + "name": "j" + } + ], + "body": { + "type": "CallExpression", + "start": 100, + "end": 122, + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 64 + } + }, + "callee": { + "type": "Identifier", + "start": 100, + "end": 106, + "loc": { + "start": { + "line": 5, + "column": 42 + }, + "end": { + "line": 5, + "column": 48 + }, + "identifierName": "sample" + }, + "name": "sample" + }, + "arguments": [ + { + "type": "BinaryExpression", + "start": 107, + "end": 112, + "loc": { + "start": { + "line": 5, + "column": 49 + }, + "end": { + "line": 5, + "column": 54 + } + }, + "left": { "type": "Identifier", - "start": 126, - "end": 127, + "start": 107, + "end": 108, "loc": { "start": { - "line": 8, - "column": 28 + "line": 5, + "column": 49 }, "end": { - "line": 8, - "column": 29 + "line": 5, + "column": 50 }, - "identifierName": "a" + "identifierName": "j" }, - "name": "a" + "name": "j" }, - { + "operator": "-", + "right": { "type": "Identifier", - "start": 130, - "end": 131, + "start": 111, + "end": 112, "loc": { "start": { - "line": 8, - "column": 32 + "line": 5, + "column": 53 }, "end": { - "line": 8, - "column": 33 + "line": 5, + "column": 54 }, "identifierName": "i" }, "name": "i" + } + }, + { + "type": "Identifier", + "start": 114, + "end": 115, + "loc": { + "start": { + "line": 5, + "column": 56 + }, + "end": { + "line": 5, + "column": 57 + }, + "identifierName": "a" }, - { - "type": "Identifier", - "start": 134, - "end": 135, - "loc": { - "start": { - "line": 8, - "column": 36 - }, - "end": { - "line": 8, - "column": 37 - }, - "identifierName": "j" + "name": "a" + }, + { + "type": "Identifier", + "start": 117, + "end": 118, + "loc": { + "start": { + "line": 5, + "column": 59 }, - "name": "j" - } - ], - "body": { - "type": "BlockStatement", - "start": 138, - "end": 174, + "end": { + "line": 5, + "column": 60 + }, + "identifierName": "i" + }, + "name": "i" + }, + { + "type": "Identifier", + "start": 120, + "end": 121, "loc": { "start": { - "line": 8, - "column": 40 + "line": 5, + "column": 62 }, "end": { - "line": 10, - "column": 2 - } + "line": 5, + "column": 63 + }, + "identifierName": "j" }, - "body": [ - { - "type": "ExpressionStatement", - "start": 142, - "end": 171, - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 31 - } - }, - "expression": { - "type": "CallExpression", - "start": 142, - "end": 169, - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 29 - } - }, - "callee": { - "type": "Identifier", - "start": 142, - "end": 148, - "loc": { - "start": { - "line": 9, - "column": 2 - }, - "end": { - "line": 9, - "column": 8 - }, - "identifierName": "sample" - }, - "name": "sample" - }, - "arguments": [ - { - "type": "BinaryExpression", - "start": 150, - "end": 155, - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 15 - } - }, - "left": { - "type": "Identifier", - "start": 150, - "end": 151, - "loc": { - "start": { - "line": 9, - "column": 10 - }, - "end": { - "line": 9, - "column": 11 - }, - "identifierName": "j" - }, - "name": "j" - }, - "operator": "-", - "right": { - "type": "Identifier", - "start": 154, - "end": 155, - "loc": { - "start": { - "line": 9, - "column": 14 - }, - "end": { - "line": 9, - "column": 15 - }, - "identifierName": "i" - }, - "name": "i" - } - }, - { - "type": "Identifier", - "start": 158, - "end": 159, - "loc": { - "start": { - "line": 9, - "column": 18 - }, - "end": { - "line": 9, - "column": 19 - }, - "identifierName": "a" - }, - "name": "a" - }, - { - "type": "Identifier", - "start": 162, - "end": 163, - "loc": { - "start": { - "line": 9, - "column": 22 - }, - "end": { - "line": 9, - "column": 23 - }, - "identifierName": "i" - }, - "name": "i" - }, - { - "type": "Identifier", - "start": 166, - "end": 167, - "loc": { - "start": { - "line": 9, - "column": 26 - }, - "end": { - "line": 9, - "column": 27 - }, - "identifierName": "j" - }, - "name": "j" - } - ] - } - } - ], - "directives": [] + "name": "j" } - } + ] } - ], - "kind": "const" - }, - { - "type": "ReturnStatement", - "start": 179, - "end": 195, - "loc": { - "start": { - "line": 12, - "column": 1 - }, - "end": { - "line": 12, - "column": 17 - } - }, - "argument": { - "type": "Identifier", - "start": 186, - "end": 193, - "loc": { - "start": { - "line": 12, - "column": 8 - }, - "end": { - "line": 12, - "column": 15 - }, - "identifierName": "shuffle" - }, - "name": "shuffle" } - } - ], - "directives": [] - }, + }, + "leadingComments": null + } + ], + "kind": "const", "leadingComments": [ { "type": "CommentBlock", "value": "*\n * Shuffle array by sampling the complete array.\n ", - "start": 1, - "end": 57, + "start": 0, + "end": 56, "loc": { "start": { - "line": 2, + "line": 1, "column": 0 }, "end": { - "line": 4, + "line": 3, "column": 3 } } } ], "trailingComments": [] - }, - "leadingComments": [ - { - "type": "CommentBlock", - "value": "*\n * Shuffle array by sampling the complete array.\n ", - "start": 1, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 3 - } - } - } - ] + } } ], "directives": [] - }, - "comments": [ - { - "type": "CommentBlock", - "value": "*\n * Shuffle array by sampling the complete array.\n ", - "start": 1, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 3 - } - } - } - ], - "tokens": [ - { - "type": "CommentBlock", - "value": "*\n * Shuffle array by sampling the complete array.\n ", - "start": 1, - "end": 57, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 4, - "column": 3 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 59, - "end": 65, - "loc": { - "start": { - "line": 6, - "column": 0 - }, - "end": { - "line": 6, - "column": 6 - } - } - }, - { - "type": { - "label": "function", - "keyword": "function", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "function", - "start": 66, - "end": 74, + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 0, + "end": 56, "loc": { "start": { - "line": 6, - "column": 7 + "line": 1, + "column": 0 }, "end": { - "line": 6, - "column": 15 + "line": 3, + "column": 3 } } - }, + } + ], + "tokens": [ { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "_shuffle", - "start": 75, - "end": 83, + "type": "CommentBlock", + "value": "*\n * Shuffle array by sampling the complete array.\n ", + "start": 0, + "end": 56, "loc": { "start": { - "line": 6, - "column": 16 + "line": 1, + "column": 0 }, "end": { - "line": 6, - "column": 24 + "line": 3, + "column": 3 } } }, { "type": { - "label": "(", - "beforeExpr": true, - "startsExpr": true, + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 84, - "end": 85, + "value": "const", + "start": 58, + "end": 63, "loc": { "start": { - "line": 6, - "column": 25 + "line": 5, + "column": 0 }, "end": { - "line": 6, - "column": 26 + "line": 5, + "column": 5 } } }, @@ -633,48 +789,50 @@ "postfix": false, "binop": null }, - "value": "sample", - "start": 86, - "end": 92, + "value": "_shuffle", + "start": 64, + "end": 72, "loc": { "start": { - "line": 6, - "column": 27 + "line": 5, + "column": 6 }, "end": { - "line": 6, - "column": 33 + "line": 5, + "column": 14 } } }, { "type": { - "label": ")", - "beforeExpr": false, + "label": "=", + "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": false, + "isAssign": true, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 93, - "end": 94, + "value": "=", + "start": 73, + "end": 74, "loc": { "start": { - "line": 6, - "column": 34 + "line": 5, + "column": 15 }, "end": { - "line": 6, - "column": 35 + "line": 5, + "column": 16 } } }, { "type": { - "label": "{", + "label": "(", "beforeExpr": true, "startsExpr": true, "rightAssociative": false, @@ -684,52 +842,50 @@ "postfix": false, "binop": null }, - "start": 95, - "end": 96, + "start": 75, + "end": 76, "loc": { "start": { - "line": 6, - "column": 36 + "line": 5, + "column": 17 }, "end": { - "line": 6, - "column": 37 + "line": 5, + "column": 18 } } }, { "type": { - "label": "const", - "keyword": "const", + "label": "name", "beforeExpr": false, - "startsExpr": false, + "startsExpr": true, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null, - "updateContext": null + "binop": null }, - "value": "const", - "start": 99, - "end": 104, + "value": "sample", + "start": 76, + "end": 82, "loc": { "start": { - "line": 8, - "column": 1 + "line": 5, + "column": 18 }, "end": { - "line": 8, - "column": 6 + "line": 5, + "column": 24 } } }, { "type": { - "label": "name", + "label": ")", "beforeExpr": false, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, @@ -737,71 +893,42 @@ "postfix": false, "binop": null }, - "value": "shuffle", - "start": 105, - "end": 112, + "start": 82, + "end": 83, "loc": { "start": { - "line": 8, - "column": 7 + "line": 5, + "column": 24 }, "end": { - "line": 8, - "column": 14 + "line": 5, + "column": 25 } } }, { "type": { - "label": "=", + "label": "=>", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, "isLoop": false, - "isAssign": true, + "isAssign": false, "prefix": false, "postfix": false, "binop": null, "updateContext": null }, - "value": "=", - "start": 113, - "end": 114, - "loc": { - "start": { - "line": 8, - "column": 15 - }, - "end": { - "line": 8, - "column": 16 - } - } - }, - { - "type": { - "label": "function", - "keyword": "function", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "function", - "start": 115, - "end": 123, + "start": 84, + "end": 86, "loc": { "start": { - "line": 8, - "column": 17 + "line": 5, + "column": 26 }, "end": { - "line": 8, - "column": 25 + "line": 5, + "column": 28 } } }, @@ -817,16 +944,16 @@ "postfix": false, "binop": null }, - "start": 124, - "end": 125, + "start": 87, + "end": 88, "loc": { "start": { - "line": 8, - "column": 26 + "line": 5, + "column": 29 }, "end": { - "line": 8, - "column": 27 + "line": 5, + "column": 30 } } }, @@ -843,16 +970,16 @@ "binop": null }, "value": "a", - "start": 126, - "end": 127, + "start": 88, + "end": 89, "loc": { "start": { - "line": 8, - "column": 28 + "line": 5, + "column": 30 }, "end": { - "line": 8, - "column": 29 + "line": 5, + "column": 31 } } }, @@ -869,16 +996,16 @@ "binop": null, "updateContext": null }, - "start": 128, - "end": 129, + "start": 89, + "end": 90, "loc": { "start": { - "line": 8, - "column": 30 + "line": 5, + "column": 31 }, "end": { - "line": 8, - "column": 31 + "line": 5, + "column": 32 } } }, @@ -895,16 +1022,16 @@ "binop": null }, "value": "i", - "start": 130, - "end": 131, + "start": 91, + "end": 92, "loc": { "start": { - "line": 8, - "column": 32 + "line": 5, + "column": 33 }, "end": { - "line": 8, - "column": 33 + "line": 5, + "column": 34 } } }, @@ -921,15 +1048,15 @@ "binop": null, "updateContext": null }, - "start": 132, - "end": 133, + "start": 92, + "end": 93, "loc": { "start": { - "line": 8, + "line": 5, "column": 34 }, "end": { - "line": 8, + "line": 5, "column": 35 } } @@ -947,15 +1074,15 @@ "binop": null }, "value": "j", - "start": 134, - "end": 135, + "start": 94, + "end": 95, "loc": { "start": { - "line": 8, + "line": 5, "column": 36 }, "end": { - "line": 8, + "line": 5, "column": 37 } } @@ -972,40 +1099,41 @@ "postfix": false, "binop": null }, - "start": 136, - "end": 137, + "start": 95, + "end": 96, "loc": { "start": { - "line": 8, - "column": 38 + "line": 5, + "column": 37 }, "end": { - "line": 8, - "column": 39 + "line": 5, + "column": 38 } } }, { "type": { - "label": "{", + "label": "=>", "beforeExpr": true, - "startsExpr": true, + "startsExpr": false, "rightAssociative": false, "isLoop": false, "isAssign": false, "prefix": false, "postfix": false, - "binop": null + "binop": null, + "updateContext": null }, - "start": 138, - "end": 139, + "start": 97, + "end": 99, "loc": { "start": { - "line": 8, - "column": 40 + "line": 5, + "column": 39 }, "end": { - "line": 8, + "line": 5, "column": 41 } } @@ -1023,16 +1151,16 @@ "binop": null }, "value": "sample", - "start": 142, - "end": 148, + "start": 100, + "end": 106, "loc": { "start": { - "line": 9, - "column": 2 + "line": 5, + "column": 42 }, "end": { - "line": 9, - "column": 8 + "line": 5, + "column": 48 } } }, @@ -1048,16 +1176,16 @@ "postfix": false, "binop": null }, - "start": 148, - "end": 149, + "start": 106, + "end": 107, "loc": { "start": { - "line": 9, - "column": 8 + "line": 5, + "column": 48 }, "end": { - "line": 9, - "column": 9 + "line": 5, + "column": 49 } } }, @@ -1074,16 +1202,16 @@ "binop": null }, "value": "j", - "start": 150, - "end": 151, + "start": 107, + "end": 108, "loc": { "start": { - "line": 9, - "column": 10 + "line": 5, + "column": 49 }, "end": { - "line": 9, - "column": 11 + "line": 5, + "column": 50 } } }, @@ -1101,16 +1229,16 @@ "updateContext": null }, "value": "-", - "start": 152, - "end": 153, + "start": 109, + "end": 110, "loc": { "start": { - "line": 9, - "column": 12 + "line": 5, + "column": 51 }, "end": { - "line": 9, - "column": 13 + "line": 5, + "column": 52 } } }, @@ -1127,16 +1255,16 @@ "binop": null }, "value": "i", - "start": 154, - "end": 155, + "start": 111, + "end": 112, "loc": { "start": { - "line": 9, - "column": 14 + "line": 5, + "column": 53 }, "end": { - "line": 9, - "column": 15 + "line": 5, + "column": 54 } } }, @@ -1153,16 +1281,16 @@ "binop": null, "updateContext": null }, - "start": 156, - "end": 157, + "start": 112, + "end": 113, "loc": { "start": { - "line": 9, - "column": 16 + "line": 5, + "column": 54 }, "end": { - "line": 9, - "column": 17 + "line": 5, + "column": 55 } } }, @@ -1179,16 +1307,16 @@ "binop": null }, "value": "a", - "start": 158, - "end": 159, + "start": 114, + "end": 115, "loc": { "start": { - "line": 9, - "column": 18 + "line": 5, + "column": 56 }, "end": { - "line": 9, - "column": 19 + "line": 5, + "column": 57 } } }, @@ -1205,16 +1333,16 @@ "binop": null, "updateContext": null }, - "start": 160, - "end": 161, + "start": 115, + "end": 116, "loc": { "start": { - "line": 9, - "column": 20 + "line": 5, + "column": 57 }, "end": { - "line": 9, - "column": 21 + "line": 5, + "column": 58 } } }, @@ -1231,16 +1359,16 @@ "binop": null }, "value": "i", - "start": 162, - "end": 163, + "start": 117, + "end": 118, "loc": { "start": { - "line": 9, - "column": 22 + "line": 5, + "column": 59 }, "end": { - "line": 9, - "column": 23 + "line": 5, + "column": 60 } } }, @@ -1257,16 +1385,16 @@ "binop": null, "updateContext": null }, - "start": 164, - "end": 165, + "start": 118, + "end": 119, "loc": { "start": { - "line": 9, - "column": 24 + "line": 5, + "column": 60 }, "end": { - "line": 9, - "column": 25 + "line": 5, + "column": 61 } } }, @@ -1283,16 +1411,16 @@ "binop": null }, "value": "j", - "start": 166, - "end": 167, + "start": 120, + "end": 121, "loc": { "start": { - "line": 9, - "column": 26 + "line": 5, + "column": 62 }, "end": { - "line": 9, - "column": 27 + "line": 5, + "column": 63 } } }, @@ -1308,16 +1436,16 @@ "postfix": false, "binop": null }, - "start": 168, - "end": 169, + "start": 121, + "end": 122, "loc": { "start": { - "line": 9, - "column": 28 + "line": 5, + "column": 63 }, "end": { - "line": 9, - "column": 29 + "line": 5, + "column": 64 } } }, @@ -1334,22 +1462,23 @@ "binop": null, "updateContext": null }, - "start": 170, - "end": 171, + "start": 122, + "end": 123, "loc": { "start": { - "line": 9, - "column": 30 + "line": 5, + "column": 64 }, "end": { - "line": 9, - "column": 31 + "line": 5, + "column": 65 } } }, { "type": { - "label": "}", + "label": "export", + "keyword": "export", "beforeExpr": false, "startsExpr": false, "rightAssociative": false, @@ -1357,51 +1486,27 @@ "isAssign": false, "prefix": false, "postfix": false, - "binop": null - }, - "start": 173, - "end": 174, - "loc": { - "start": { - "line": 10, - "column": 1 - }, - "end": { - "line": 10, - "column": 2 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, "binop": null, "updateContext": null }, - "start": 175, - "end": 176, + "value": "export", + "start": 124, + "end": 130, "loc": { "start": { - "line": 10, - "column": 3 + "line": 6, + "column": 0 }, "end": { - "line": 10, - "column": 4 + "line": 6, + "column": 6 } } }, { "type": { - "label": "return", - "keyword": "return", + "label": "default", + "keyword": "default", "beforeExpr": true, "startsExpr": false, "rightAssociative": false, @@ -1412,17 +1517,17 @@ "binop": null, "updateContext": null }, - "value": "return", - "start": 179, - "end": 185, + "value": "default", + "start": 131, + "end": 138, "loc": { "start": { - "line": 12, - "column": 1 + "line": 6, + "column": 7 }, "end": { - "line": 12, - "column": 7 + "line": 6, + "column": 14 } } }, @@ -1438,17 +1543,17 @@ "postfix": false, "binop": null }, - "value": "shuffle", - "start": 186, - "end": 193, + "value": "_shuffle", + "start": 139, + "end": 147, "loc": { "start": { - "line": 12, - "column": 8 + "line": 6, + "column": 15 }, "end": { - "line": 12, - "column": 15 + "line": 6, + "column": 23 } } }, @@ -1465,41 +1570,16 @@ "binop": null, "updateContext": null }, - "start": 194, - "end": 195, - "loc": { - "start": { - "line": 12, - "column": 16 - }, - "end": { - "line": 12, - "column": 17 - } - } - }, - { - "type": { - "label": "}", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "start": 197, - "end": 198, + "start": 147, + "end": 148, "loc": { "start": { - "line": 14, - "column": 0 + "line": 6, + "column": 23 }, "end": { - "line": 14, - "column": 1 + "line": 6, + "column": 24 } } }, @@ -1516,15 +1596,15 @@ "binop": null, "updateContext": null }, - "start": 200, - "end": 200, + "start": 149, + "end": 149, "loc": { "start": { - "line": 16, + "line": 7, "column": 0 }, "end": { - "line": 16, + "line": 7, "column": 0 } } diff --git a/ast/source/kernel/index.js.json b/ast/source/kernel/index.js.json deleted file mode 100644 index 2c11fce..0000000 --- a/ast/source/kernel/index.js.json +++ /dev/null @@ -1,401 +0,0 @@ -{ - "type": "File", - "start": 0, - "end": 62, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 0 - } - }, - "program": { - "type": "Program", - "start": 0, - "end": 62, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 3, - "column": 0 - } - }, - "sourceType": "module", - "body": [ - { - "type": "ExportAllDeclaration", - "start": 0, - "end": 32, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 32 - } - }, - "source": { - "type": "StringLiteral", - "start": 14, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 30 - } - }, - "extra": { - "rawValue": "./_fisheryates", - "raw": "'./_fisheryates'" - }, - "value": "./_fisheryates" - } - }, - { - "type": "ExportAllDeclaration", - "start": 33, - "end": 61, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 28 - } - }, - "source": { - "type": "StringLiteral", - "start": 47, - "end": 59, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 26 - } - }, - "extra": { - "rawValue": "./_shuffle", - "raw": "'./_shuffle'" - }, - "value": "./_shuffle" - } - } - ], - "directives": [] - }, - "comments": [], - "tokens": [ - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 0, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 7, - "end": 8, - "loc": { - "start": { - "line": 1, - "column": 7 - }, - "end": { - "line": 1, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 9, - "end": 13, - "loc": { - "start": { - "line": 1, - "column": 9 - }, - "end": { - "line": 1, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./_fisheryates", - "start": 14, - "end": 30, - "loc": { - "start": { - "line": 1, - "column": 14 - }, - "end": { - "line": 1, - "column": 30 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 31, - "end": 32, - "loc": { - "start": { - "line": 1, - "column": 31 - }, - "end": { - "line": 1, - "column": 32 - } - } - }, - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "export", - "start": 33, - "end": 39, - "loc": { - "start": { - "line": 2, - "column": 0 - }, - "end": { - "line": 2, - "column": 6 - } - } - }, - { - "type": { - "label": "*", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": 10, - "updateContext": null - }, - "value": "*", - "start": 40, - "end": 41, - "loc": { - "start": { - "line": 2, - "column": 7 - }, - "end": { - "line": 2, - "column": 8 - } - } - }, - { - "type": { - "label": "name", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null - }, - "value": "from", - "start": 42, - "end": 46, - "loc": { - "start": { - "line": 2, - "column": 9 - }, - "end": { - "line": 2, - "column": 13 - } - } - }, - { - "type": { - "label": "string", - "beforeExpr": false, - "startsExpr": true, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "value": "./_shuffle", - "start": 47, - "end": 59, - "loc": { - "start": { - "line": 2, - "column": 14 - }, - "end": { - "line": 2, - "column": 26 - } - } - }, - { - "type": { - "label": ";", - "beforeExpr": true, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 60, - "end": 61, - "loc": { - "start": { - "line": 2, - "column": 27 - }, - "end": { - "line": 2, - "column": 28 - } - } - }, - { - "type": { - "label": "eof", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null - }, - "start": 62, - "end": 62, - "loc": { - "start": { - "line": 3, - "column": 0 - }, - "end": { - "line": 3, - "column": 0 - } - } - } - ] -} \ No newline at end of file diff --git a/coverage.json b/coverage.json index 7aa41e3..d7b9ee2 100644 --- a/coverage.json +++ b/coverage.json @@ -3,16 +3,6 @@ "expectCount": 7, "actualCount": 5, "files": { - "src/kernel/_fisheryates.js": { - "expectCount": 1, - "actualCount": 1, - "undocumentLines": [] - }, - "src/kernel/_shuffle.js": { - "expectCount": 1, - "actualCount": 1, - "undocumentLines": [] - }, "src/api/randfloat.js": { "expectCount": 1, "actualCount": 1, @@ -41,6 +31,16 @@ "undocumentLines": [ 4 ] + }, + "src/kernel/_fisheryates.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, + "src/kernel/_shuffle.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] } } } \ No newline at end of file diff --git a/css/github.css b/css/github.css new file mode 100644 index 0000000..db9ca23 --- /dev/null +++ b/css/github.css @@ -0,0 +1,83 @@ +/* github markdown */ +.github-markdown { + font-size: 16px; +} + +.github-markdown h1, +.github-markdown h2, +.github-markdown h3, +.github-markdown h4, +.github-markdown h5 { + margin-top: 1em; + margin-bottom: 16px; + font-weight: bold; + padding: 0; +} + +.github-markdown h1:nth-of-type(1) { + margin-top: 0; +} + +.github-markdown h1 { + font-size: 2em; + padding-bottom: 0.3em; +} + +.github-markdown h2 { + font-size: 1.75em; + padding-bottom: 0.3em; +} + +.github-markdown h3 { + font-size: 1.5em; +} + +.github-markdown h4 { + font-size: 1.25em; +} + +.github-markdown h5 { + font-size: 1em; +} + +.github-markdown ul, .github-markdown ol { + padding-left: 2em; +} + +.github-markdown pre > code { + font-size: 0.85em; +} + +.github-markdown table { + margin-bottom: 1em; + border-collapse: collapse; + border-spacing: 0; +} + +.github-markdown table tr { + background-color: #fff; + border-top: 1px solid #ccc; +} + +.github-markdown table th, +.github-markdown table td { + padding: 6px 13px; + border: 1px solid #ddd; +} + +.github-markdown table tr:nth-child(2n) { + background-color: #f8f8f8; +} + +.github-markdown hr { + border-right: 0; + border-bottom: 1px solid #e5e5e5; + border-left: 0; + border-top: 0; +} + +/** badge(.svg) does not have border */ +.github-markdown img:not([src*=".svg"]) { + max-width: 100%; + box-shadow: 1px 1px 1px rgba(0,0,0,0.5); +} diff --git a/css/identifiers.css b/css/identifiers.css new file mode 100644 index 0000000..52c8461 --- /dev/null +++ b/css/identifiers.css @@ -0,0 +1,37 @@ +.identifiers-wrap { + display: flex; + align-items: flex-start; +} + +.identifier-dir-tree { + background: #fff; + border: solid 1px #ddd; + border-radius: 0.25em; + top: 52px; + position: -webkit-sticky; + position: sticky; + max-height: calc(100vh - 155px); + overflow-y: scroll; + min-width: 200px; + margin-left: 1em; +} + +.identifier-dir-tree-header { + padding: 0.5em; + background-color: #fafafa; + border-bottom: solid 1px #ddd; +} + +.identifier-dir-tree-content { + padding: 0 0.5em 0; +} + +.identifier-dir-tree-content > div { + padding-top: 0.25em; + padding-bottom: 0.25em; +} + +.identifier-dir-tree-content a { + color: inherit; +} + diff --git a/css/manual.css b/css/manual.css new file mode 100644 index 0000000..138a07f --- /dev/null +++ b/css/manual.css @@ -0,0 +1,134 @@ +.github-markdown .manual-toc { + padding-left: 0; +} + +.manual-index .manual-cards { + display: flex; + flex-wrap: wrap; +} + +.manual-index .manual-card-wrap { + width: 280px; + padding: 10px 20px 10px 0; + box-sizing: border-box; +} + +.manual-index .manual-card-wrap > h1 { + margin: 0; + font-size: 1em; + font-weight: 600; + padding: 0.2em 0 0.2em 0.5em; + border-radius: 0.1em 0.1em 0 0; + border: none; +} + +.manual-index .manual-card-wrap > h1 span { + color: #555; +} + +.manual-index .manual-card { + height: 200px; + overflow: hidden; + border: solid 1px rgba(230, 230, 230, 0.84); + border-radius: 0 0 0.1em 0.1em; + padding: 8px; + position: relative; +} + +.manual-index .manual-card > div { + transform: scale(0.4); + transform-origin: 0 0; + width: 250%; +} + +.manual-index .manual-card > a { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(210, 210, 210, 0.1); +} + +.manual-index .manual-card > a:hover { + background: none; +} + +.manual-index .manual-badge { + margin: 0; +} + +.manual-index .manual-user-index { + margin-bottom: 1em; + border-bottom: solid 1px #ddd; +} + +.manual-root .navigation { + padding-left: 4px; + margin-top: 4px; +} + +.navigation .manual-toc-root > div { + padding-left: 0.25em; + padding-right: 0.75em; +} + +.github-markdown .manual-toc-title a { + color: inherit; +} + +.manual-breadcrumb-list { + font-size: 0.8em; + margin-bottom: 1em; +} + +.manual-toc-title a:hover { + color: #039BE5; +} + +.manual-toc li { + margin: 0.75em 0; + list-style-type: none; +} + +.navigation .manual-toc [class^="indent-h"] a { + color: #666; +} + +.navigation .manual-toc .indent-h1 a { + color: #555; + font-weight: 600; + display: block; +} + +.manual-toc .indent-h1 { + display: block; + margin: 0.4em 0 0 0.25em; + padding: 0.2em 0 0.2em 0.5em; + border-radius: 0.1em; +} + +.manual-root .navigation .manual-toc li:not(.indent-h1) { + margin-top: 0.5em; +} + +.manual-toc .indent-h2 { + display: none; + margin-left: 1.5em; +} +.manual-toc .indent-h3 { + display: none; + margin-left: 2.5em; +} +.manual-toc .indent-h4 { + display: none; + margin-left: 3.5em; +} +.manual-toc .indent-h5 { + display: none; + margin-left: 4.5em; +} + +.manual-nav li { + margin: 0.75em 0; +} diff --git a/css/search.css b/css/search.css new file mode 100644 index 0000000..9940a54 --- /dev/null +++ b/css/search.css @@ -0,0 +1,84 @@ +/* search box */ +.search-box { + position: absolute; + top: 10px; + right: 50px; + padding-right: 8px; + padding-bottom: 10px; + line-height: normal; + font-size: 12px; +} + +.search-box img { + width: 20px; + vertical-align: top; +} + +.search-input { + display: inline; + visibility: hidden; + width: 0; + padding: 2px; + height: 1.5em; + outline: none; + background: transparent; + border: 1px #0af; + border-style: none none solid none; + vertical-align: bottom; +} + +.search-input-edge { + display: none; + width: 1px; + height: 5px; + background-color: #0af; + vertical-align: bottom; +} + +.search-result { + position: absolute; + display: none; + height: 600px; + width: 100%; + padding: 0; + margin-top: 5px; + margin-left: 24px; + background: white; + box-shadow: 1px 1px 4px rgb(0,0,0); + white-space: nowrap; + overflow-y: scroll; +} + +.search-result-import-path { + color: #aaa; + font-size: 12px; +} + +.search-result li { + list-style: none; + padding: 2px 4px; +} + +.search-result li a { + display: block; +} + +.search-result li.selected { + background: #ddd; +} + +.search-result li.search-separator { + background: rgb(37, 138, 175); + color: white; +} + +.search-box.active .search-input { + visibility: visible; + transition: width 0.2s ease-out; + width: 300px; +} + +.search-box.active .search-input-edge { + display: inline-block; +} + diff --git a/css/source.css b/css/source.css new file mode 100644 index 0000000..3b9c92d --- /dev/null +++ b/css/source.css @@ -0,0 +1,55 @@ +table.files-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; + text-align: right; +} + +table.files-summary tbody tr:hover { + background: #eee; +} + +table.files-summary td:first-child, +table.files-summary td:nth-of-type(2) { + text-align: left; +} + +table.files-summary[data-use-coverage="false"] td.coverage { + display: none; +} + +table.files-summary thead { + background: #fafafa; +} + +table.files-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.files-summary td.identifiers > span { + display: block; + margin-top: 4px; +} +table.files-summary td.identifiers > span:first-child { + margin-top: 0; +} + +table.files-summary .coverage-count { + font-size: 12px; + color: #aaa; + display: inline-block; + min-width: 40px; +} + +.total-coverage-count { + position: relative; + bottom: 2px; + font-size: 12px; + color: #666; + font-weight: 500; + padding-left: 5px; +} diff --git a/css/style.css b/css/style.css index 5ad3785..fe3b2d9 100644 --- a/css/style.css +++ b/css/style.css @@ -1,5 +1,11 @@ @import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700); @import url(https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,700); +@import url(./manual.css); +@import url(./source.css); +@import url(./test.css); +@import url(./identifiers.css); +@import url(./github.css); +@import url(./search.css); * { margin: 0; @@ -60,11 +66,14 @@ h3 { position: relative; font-size: 16px; margin-bottom: 12px; - background-color: #E2E2E2; padding: 4px; font-weight: 300; } +details { + cursor: pointer; +} + del { text-decoration: line-through; } @@ -74,6 +83,10 @@ p { line-height: 1.5; } +code { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; +} + pre > code { display: block; } @@ -98,6 +111,11 @@ li > code { border-radius: 3px; } +.code { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 13px; +} + .import-path pre.prettyprint, .import-path pre.prettyprint code { margin: 0; @@ -114,6 +132,7 @@ li > code { } .layout-container > header { + display: flex; height: 40px; line-height: 40px; font-size: 16px; @@ -172,10 +191,10 @@ li > code { } .navigation .nav-dir-path { + display: block; margin-top: 0.7em; margin-bottom: 0.25em; - font-size: 0.8em; - color: #aaa; + font-weight: 600; } .kind-class, @@ -192,6 +211,7 @@ li > code { border-radius: 0.2em; margin-right: 0.2em; font-weight: bold; + line-height: 1.2em; } .kind-class { @@ -224,6 +244,10 @@ li > code { background-color: #bbcbea; } +.summary span[class^="kind-"] { + margin-left: 0; +} + h1 .version, h1 .url a { font-size: 14px; @@ -298,8 +322,7 @@ table.summary { } table.summary thead { - background: #999; - color: white; + background: #fafafa; } table.summary td { @@ -390,6 +413,7 @@ table.params td p { .content .detail > h3 { color: black; + background-color: #f0f0f0; } .content .detail > div { @@ -518,13 +542,34 @@ footer img { } pre.source-code { - background: #f5f5f5; padding: 4px; } pre.raw-source-code > code { padding: 0; margin: 0; + font-size: 12px; + background: #fff; + border: solid 1px #ddd; + line-height: 1.5; +} + +pre.raw-source-code > code > ol { + counter-reset:number; + list-style:none; + margin:0; + padding:0; + overflow: hidden; +} + +pre.raw-source-code > code > ol li:before { + counter-increment: number; + content: counter(number); + display: inline-block; + min-width: 3em; + color: #aaa; + text-align: right; + padding-right: 1em; } pre.source-code.line-number { @@ -544,481 +589,20 @@ pre.source-code li { } pre.source-code.line-number li.active { - background: rgb(255, 255, 150); + background: rgb(255, 255, 150) !important; } pre.source-code.line-number li.error-line { background: #ffb8bf; } -table.files-summary { - width: 100%; - margin: 10px 0; - border-spacing: 0; - border: 0; - border-collapse: collapse; - text-align: right; -} - -table.files-summary tbody tr:hover { - background: #eee; -} - -table.files-summary td:first-child, -table.files-summary td:nth-of-type(2) { - text-align: left; -} - -table.files-summary[data-use-coverage="false"] td.coverage { - display: none; -} - -table.files-summary thead { - background: #999; - color: white; -} - -table.files-summary td { - border: solid 1px #ddd; - padding: 4px 10px; - vertical-align: top; -} - -table.files-summary td.identifiers > span { - display: block; - margin-top: 4px; -} -table.files-summary td.identifiers > span:first-child { - margin-top: 0; -} - -table.files-summary .coverage-count { - font-size: 12px; - color: #aaa; - display: inline-block; - min-width: 40px; -} - -.total-coverage-count { - position: relative; - bottom: 2px; - font-size: 12px; - color: #666; - font-weight: 500; - padding-left: 5px; -} - -table.test-summary thead { - background: #999; - color: white; -} - -table.test-summary thead .test-description { - width: 50%; -} - -table.test-summary { - width: 100%; - margin: 10px 0; - border-spacing: 0; - border: 0; - border-collapse: collapse; -} - -table.test-summary thead .test-count { - width: 3em; -} - -table.test-summary tbody tr:hover { - background-color: #eee; -} - -table.test-summary td { - border: solid 1px #ddd; - padding: 4px 10px; - vertical-align: top; -} - -table.test-summary td p { - margin: 0; -} - -table.test-summary tr.test-describe .toggle { - display: inline-block; - float: left; - margin-right: 4px; - cursor: pointer; - font-size: 0.8em; - padding-top: 0.25em; -} - -table.test-summary tr.test-describe .toggle.opened:before { - content: '▼'; -} - -table.test-summary tr.test-describe .toggle.closed:before { - content: '▶'; -} - -table.test-summary .test-target > span { - display: block; - margin-top: 4px; -} -table.test-summary .test-target > span:first-child { - margin-top: 0; -} - .inner-link-active { - background: rgb(255, 255, 150); -} - -/* search box */ -.search-box { - position: absolute; - top: 10px; - right: 50px; - padding-right: 8px; - padding-bottom: 10px; - line-height: normal; - font-size: 12px; -} - -.search-box img { - width: 20px; - vertical-align: top; -} - -.search-input { - display: inline; - visibility: hidden; - width: 0; - padding: 2px; - height: 1.5em; - outline: none; - background: transparent; - border: 1px #0af; - border-style: none none solid none; - vertical-align: bottom; -} - -.search-input-edge { - display: none; - width: 1px; - height: 5px; - background-color: #0af; - vertical-align: bottom; -} - -.search-result { - position: absolute; - display: none; - height: 600px; - width: 100%; - padding: 0; - margin-top: 5px; - margin-left: 24px; - background: white; - box-shadow: 1px 1px 4px rgb(0,0,0); - white-space: nowrap; - overflow-y: scroll; -} - -.search-result-import-path { - color: #aaa; - font-size: 12px; -} - -.search-result li { - list-style: none; - padding: 2px 4px; -} - -.search-result li a { - display: block; -} - -.search-result li.selected { - background: #ddd; -} - -.search-result li.search-separator { - background: rgb(37, 138, 175); - color: white; -} - -.search-box.active .search-input { - visibility: visible; - transition: width 0.2s ease-out; - width: 300px; -} - -.search-box.active .search-input-edge { - display: inline-block; -} - -.github-markdown .manual-toc { - padding-left: 0; -} - -/** manual */ - -.manual-index .manual-cards { - display: flex; - flex-wrap: wrap; -} - -.manual-index .manual-card-wrap { - width: 280px; - padding: 10px 20px 10px 0; - box-sizing: border-box; -} - -.manual-index .manual-card-wrap > h1 { - margin: 0; - font-size: 1em; - font-weight: 600; - padding: 0.2em 0 0.2em 0.5em; - border-radius: 0.1em 0.1em 0 0; - border: none; -} - -.manual-index .manual-card-wrap > h1 span { - color: #555; -} - -.manual-index .manual-card { - height: 200px; - overflow: hidden; - border: solid 1px rgba(230, 230, 230, 0.84); - border-radius: 0 0 0.1em 0.1em; - padding: 8px; - position: relative; - border-top: none; -} - -.manual-index .manual-card > div { - transform: scale(0.4); - transform-origin: 0 0; - width: 250%; -} - -.manual-index .manual-card > a { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: rgba(210, 210, 210, 0.1); -} - -.manual-index .manual-card > a:hover { - background: none; -} - -.manual-index .manual-badge { - margin: 0; -} - -.manual-index .manual-user-index { - margin-bottom: 1em; - border-bottom: solid 1px #ddd; -} - -.manual-root .navigation { - padding-left: 4px; - margin-top: 4px; + /*background: rgb(255, 255, 150) !important;*/ + background: #039BE5 !important; + color: #fff !important; + padding-left: 0.1em !important; } -.navigation .manual-toc { - margin-top: -0.25em; -} - -.navigation .manual-toc-root > div { - padding-top: 1px; - padding-left: 0.25em; - padding-right: 0.75em; -} - -.github-markdown .manual-toc-title a { +.inner-link-active a { color: inherit; } - -.manual-breadcrumb-list { - font-size: 0.8em; - margin-bottom: 1em; -} - -.manual-toc-title a:hover { - color: #039BE5; -} - -.manual-toc li { - margin: 0.75em 0; - list-style-type: none; -} - -.navigation .manual-toc [class^="indent-h"] a { - color: #666; -} - -.navigation .manual-toc .indent-h1 a { - color: #555; - font-weight: 600; - display: block; -} - -.manual-toc .indent-h1 { - display: block; - margin: 1em 0 0 0.25em; - padding: 0.2em 0 0.2em 0.5em; - border-radius: 0.1em; -} -.manual-toc .indent-h2 { - display: none; - margin-left: 1.5em; -} -.manual-toc .indent-h3 { - display: none; - margin-left: 2.5em; -} -.manual-toc .indent-h4 { - display: none; - margin-left: 3.5em; -} -.manual-toc .indent-h5 { - display: none; - margin-left: 4.5em; -} - -.manual-color { - position: relative; -} - -.manual-color:after { - content: attr(data-section-count); - font-size: 0.5em; - opacity: 0.5; - position: absolute; - right: 0.5em; - top: 0.5em; -} - -.manual-color-overview, -.manual-color-design { - color: #db001e; - background-color: #edbec3; -} - -.manual-color-installation, -.manual-color-tutorial, -.manual-color-usage, -.manual-color-configuration, -.manual-color-advanced { - color: #009800; - background-color: #bfe5bf; -} - -.manual-color-example { - color: #eb6420; - background-color: #fad8c7; -} - -.manual-color-reference { - color: #6b0090; - background-color: #d6bdde; -} - -.manual-color-faq, -.manual-color-changelog { - color: #0738c3; - background-color: #bbcbea; -} - -.manual-nav li { - margin: 0.75em 0; -} - -/* github markdown */ -.github-markdown { - font-size: 16px; -} - -.github-markdown h1, -.github-markdown h2, -.github-markdown h3, -.github-markdown h4, -.github-markdown h5 { - margin-top: 1em; - margin-bottom: 16px; - font-weight: bold; - padding: 0; -} - -.github-markdown h1:nth-of-type(1) { - margin-top: 0; -} - -.github-markdown h1 { - font-size: 2em; - padding-bottom: 0.3em; -} - -.github-markdown h2 { - font-size: 1.75em; - padding-bottom: 0.3em; -} - -.github-markdown h3 { - font-size: 1.5em; - background-color: transparent; -} - -.github-markdown h4 { - font-size: 1.25em; -} - -.github-markdown h5 { - font-size: 1em; -} - -.github-markdown ul, .github-markdown ol { - padding-left: 2em; -} - -.github-markdown pre > code { - font-size: 0.85em; -} - -.github-markdown table { - margin-bottom: 1em; - border-collapse: collapse; - border-spacing: 0; -} - -.github-markdown table tr { - background-color: #fff; - border-top: 1px solid #ccc; -} - -.github-markdown table th, -.github-markdown table td { - padding: 6px 13px; - border: 1px solid #ddd; -} - -.github-markdown table tr:nth-child(2n) { - background-color: #f8f8f8; -} - -.github-markdown hr { - border-right: 0; - border-bottom: 1px solid #e5e5e5; - border-left: 0; - border-top: 0; -} - -/** badge(.svg) does not have border */ -.github-markdown img:not([src*=".svg"]) { - max-width: 100%; - box-shadow: 1px 1px 1px rgba(0,0,0,0.5); -} diff --git a/css/test.css b/css/test.css new file mode 100644 index 0000000..8ce1266 --- /dev/null +++ b/css/test.css @@ -0,0 +1,58 @@ +table.test-summary thead { + background: #fafafa; +} + +table.test-summary thead .test-description { + width: 50%; +} + +table.test-summary { + width: 100%; + margin: 10px 0; + border-spacing: 0; + border: 0; + border-collapse: collapse; +} + +table.test-summary thead .test-count { + width: 3em; +} + +table.test-summary tbody tr:hover { + background-color: #eee; +} + +table.test-summary td { + border: solid 1px #ddd; + padding: 4px 10px; + vertical-align: top; +} + +table.test-summary td p { + margin: 0; +} + +table.test-summary tr.test-interface .toggle { + display: inline-block; + float: left; + margin-right: 4px; + cursor: pointer; + font-size: 0.8em; + padding-top: 0.25em; +} + +table.test-summary tr.test-interface .toggle.opened:before { + content: '▼'; +} + +table.test-summary tr.test-interface .toggle.closed:before { + content: '▶'; +} + +table.test-summary .test-target > span { + display: block; + margin-top: 4px; +} +table.test-summary .test-target > span:first-child { + margin-top: 0; +} diff --git a/dump.json b/dump.json deleted file mode 100644 index d9286be..0000000 --- a/dump.json +++ /dev/null @@ -1,995 +0,0 @@ -[ - { - "__docId__": 0, - "kind": "file", - "name": "src/api/index.js", - "content": "export * from './randfloat' ;\nexport * from './randint' ;\nexport * from './randrange' ;\nexport * from './sample' ;\nexport * from './shuffle' ;\n", - "static": true, - "longname": "src/api/index.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 1, - "kind": "file", - "name": "src/api/randfloat.js", - "content": "\n/**\n * Returns a floating point number in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n */\n\nexport function randfloat ( i , j ) {\n\treturn i + Math.random( ) * ( j - i ) ;\n}\n\n", - "static": true, - "longname": "src/api/randfloat.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 2, - "kind": "function", - "name": "randfloat", - "memberof": "src/api/randfloat.js", - "generator": false, - "async": false, - "static": true, - "longname": "src/api/randfloat.js~randfloat", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/api/randfloat.js", - "importStyle": "{randfloat}", - "description": "Returns a floating point number in interval [i, j[ (i included, j excluded)\naccording to a uniform distribution.", - "lineNumber": 7, - "params": [ - { - "name": "i", - "types": [ - "*" - ] - }, - { - "name": "j", - "types": [ - "*" - ] - } - ], - "return": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 3, - "kind": "file", - "name": "src/api/randint.js", - "content": "\n/**\n * Returns an integer in interval [i, j[ (i included, j excluded)\n * according to a uniform distribution.\n */\n\nexport function randint ( i , j ) {\n\treturn i + Math.floor( Math.random( ) * ( j - i ) ) ;\n}\n\n", - "static": true, - "longname": "src/api/randint.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 4, - "kind": "function", - "name": "randint", - "memberof": "src/api/randint.js", - "generator": false, - "async": false, - "static": true, - "longname": "src/api/randint.js~randint", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/api/randint.js", - "importStyle": "{randint}", - "description": "Returns an integer in interval [i, j[ (i included, j excluded)\naccording to a uniform distribution.", - "lineNumber": 7, - "params": [ - { - "name": "i", - "types": [ - "*" - ] - }, - { - "name": "j", - "types": [ - "*" - ] - } - ], - "return": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 5, - "kind": "file", - "name": "src/api/randrange.js", - "content": "import { randint } from './randint' ;\n\n/**\n * Return a randomly selected element from range(start, stop, step).\n */\n\nexport function randrange ( start , stop , step ) {\n\n\t// TODO handle empty ranges\n\n\tif ( stop === undefined ) return randint( 0 , start ) ;\n\tif ( step === undefined ) step = 1 ;\n\n\tif ( stop >= start ) {\n\t\treturn start + step * randint( 0 , Math.floor( ( stop - start ) / step ) ) ;\n\t}\n\telse {\n\t\treturn start + step * randint( 0 , Math.floor( ( start - stop ) / -step ) ) ;\n\t}\n\n}\n\n", - "static": true, - "longname": "src/api/randrange.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 6, - "kind": "function", - "name": "randrange", - "memberof": "src/api/randrange.js", - "generator": false, - "async": false, - "static": true, - "longname": "src/api/randrange.js~randrange", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/api/randrange.js", - "importStyle": "{randrange}", - "description": "Return a randomly selected element from range(start, stop, step).", - "lineNumber": 7, - "params": [ - { - "name": "start", - "types": [ - "*" - ] - }, - { - "name": "stop", - "types": [ - "*" - ] - }, - { - "name": "step", - "types": [ - "*" - ] - } - ], - "return": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 7, - "kind": "file", - "name": "src/api/sample.js", - "content": "import { _fisheryates } from '../kernel' ;\nimport { randint } from './randint' ;\n\nexport const sample = _fisheryates( randint ) ;\n", - "static": true, - "longname": "src/api/sample.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 8, - "kind": "variable", - "name": "sample", - "memberof": "src/api/sample.js", - "static": true, - "longname": "src/api/sample.js~sample", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/api/sample.js", - "importStyle": "{sample}", - "description": null, - "lineNumber": 4, - "undocument": true, - "unknown": [ - { - "tagName": "@_undocument", - "tagValue": "" - } - ], - "type": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 9, - "kind": "file", - "name": "src/api/shuffle.js", - "content": "import { _shuffle } from '../kernel' ;\nimport { sample } from './sample' ;\n\nexport const shuffle = _shuffle( sample ) ;\n", - "static": true, - "longname": "src/api/shuffle.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 10, - "kind": "variable", - "name": "shuffle", - "memberof": "src/api/shuffle.js", - "static": true, - "longname": "src/api/shuffle.js~shuffle", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/api/shuffle.js", - "importStyle": "{shuffle}", - "description": null, - "lineNumber": 4, - "undocument": true, - "unknown": [ - { - "tagName": "@_undocument", - "tagValue": "" - } - ], - "type": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 11, - "kind": "file", - "name": "src/index.js", - "content": "export * from './api' ;\nexport * from './kernel' ;\n", - "static": true, - "longname": "src/index.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 12, - "kind": "file", - "name": "src/kernel/_fisheryates.js", - "content": "\n/**\n * Sample array using Fisher-Yates method.\n */\n\nexport function _fisheryates ( randint ) {\n\n\tconst fisheryates = function ( n , a , i , j ) {\n\n\t\t// we will swap at most n elements\n\n\t\tconst k = i + n ;\n\n\t\tfor ( ; i < k ; ++i ) {\n\n\t\t\t// choose any index p in the remaining array\n\n\t\t\tconst p = randint( i , j ) ;\n\n\n\t\t\t// swap element at index p with first element in the array\n\n\t\t\tconst tmp = a[i] ;\n\t\t\ta[i] = a[p] ;\n\t\t\ta[p] = tmp ;\n\n\t\t}\n\n\t} ;\n\n\treturn fisheryates ;\n\n}\n\n", - "static": true, - "longname": "src/kernel/_fisheryates.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 13, - "kind": "function", - "name": "_fisheryates", - "memberof": "src/kernel/_fisheryates.js", - "generator": false, - "async": false, - "static": true, - "longname": "src/kernel/_fisheryates.js~_fisheryates", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/kernel/_fisheryates.js", - "importStyle": "{_fisheryates}", - "description": "Sample array using Fisher-Yates method.", - "lineNumber": 6, - "params": [ - { - "name": "randint", - "types": [ - "*" - ] - } - ], - "return": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 14, - "kind": "file", - "name": "src/kernel/_shuffle.js", - "content": "\n/**\n * Shuffle array by sampling the complete array.\n */\n\nexport function _shuffle ( sample ) {\n\n\tconst shuffle = function ( a , i , j ) {\n\t\tsample( j - i , a , i , j ) ;\n\t} ;\n\n\treturn shuffle ;\n\n}\n\n", - "static": true, - "longname": "src/kernel/_shuffle.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 15, - "kind": "function", - "name": "_shuffle", - "memberof": "src/kernel/_shuffle.js", - "generator": false, - "async": false, - "static": true, - "longname": "src/kernel/_shuffle.js~_shuffle", - "access": null, - "export": true, - "importPath": "aureooms-js-random/src/kernel/_shuffle.js", - "importStyle": "{_shuffle}", - "description": "Shuffle array by sampling the complete array.", - "lineNumber": 6, - "params": [ - { - "name": "sample", - "types": [ - "*" - ] - } - ], - "return": { - "types": [ - "*" - ] - } - }, - { - "__docId__": 16, - "kind": "file", - "name": "src/kernel/index.js", - "content": "export * from './_fisheryates' ;\nexport * from './_shuffle' ;\n", - "static": true, - "longname": "src/kernel/index.js", - "access": null, - "description": null, - "lineNumber": 1 - }, - { - "__docId__": 18, - "kind": "external", - "name": "Infinity", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Infinity", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 19, - "kind": "external", - "name": "NaN", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~NaN", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 20, - "kind": "external", - "name": "undefined", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~undefined", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 21, - "kind": "external", - "name": "null", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~null", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 22, - "kind": "external", - "name": "Object", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Object", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 23, - "kind": "external", - "name": "object", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~object", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 24, - "kind": "external", - "name": "Function", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Function", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 25, - "kind": "external", - "name": "function", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~function", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 26, - "kind": "external", - "name": "Boolean", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Boolean", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 27, - "kind": "external", - "name": "boolean", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~boolean", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 28, - "kind": "external", - "name": "Symbol", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Symbol", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 29, - "kind": "external", - "name": "Error", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Error", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 30, - "kind": "external", - "name": "EvalError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~EvalError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 31, - "kind": "external", - "name": "InternalError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~InternalError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 32, - "kind": "external", - "name": "RangeError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~RangeError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 33, - "kind": "external", - "name": "ReferenceError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~ReferenceError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 34, - "kind": "external", - "name": "SyntaxError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~SyntaxError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 35, - "kind": "external", - "name": "TypeError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~TypeError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 36, - "kind": "external", - "name": "URIError", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~URIError", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 37, - "kind": "external", - "name": "Number", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Number", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 38, - "kind": "external", - "name": "number", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~number", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 39, - "kind": "external", - "name": "Date", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Date", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 40, - "kind": "external", - "name": "String", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~String", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 41, - "kind": "external", - "name": "string", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~string", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 42, - "kind": "external", - "name": "RegExp", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~RegExp", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 43, - "kind": "external", - "name": "Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 44, - "kind": "external", - "name": "Int8Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Int8Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 45, - "kind": "external", - "name": "Uint8Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 46, - "kind": "external", - "name": "Uint8ClampedArray", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint8ClampedArray", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 47, - "kind": "external", - "name": "Int16Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Int16Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 48, - "kind": "external", - "name": "Uint16Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint16Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 49, - "kind": "external", - "name": "Int32Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Int32Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 50, - "kind": "external", - "name": "Uint32Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Uint32Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 51, - "kind": "external", - "name": "Float32Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Float32Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 52, - "kind": "external", - "name": "Float64Array", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Float64Array", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 53, - "kind": "external", - "name": "Map", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Map", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 54, - "kind": "external", - "name": "Set", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Set", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 55, - "kind": "external", - "name": "WeakMap", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakMap", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 56, - "kind": "external", - "name": "WeakSet", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~WeakSet", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 57, - "kind": "external", - "name": "ArrayBuffer", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~ArrayBuffer", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 58, - "kind": "external", - "name": "DataView", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~DataView", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 59, - "kind": "external", - "name": "JSON", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~JSON", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 60, - "kind": "external", - "name": "Promise", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Promise", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 61, - "kind": "external", - "name": "Generator", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Generator", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 62, - "kind": "external", - "name": "GeneratorFunction", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~GeneratorFunction", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 63, - "kind": "external", - "name": "Reflect", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Reflect", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 64, - "kind": "external", - "name": "Proxy", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy", - "memberof": "BuiltinExternal/ECMAScriptExternal.js", - "static": true, - "longname": "BuiltinExternal/ECMAScriptExternal.js~Proxy", - "access": null, - "description": "", - "lineNumber": 193, - "builtinExternal": true - }, - { - "__docId__": 66, - "kind": "external", - "name": "CanvasRenderingContext2D", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~CanvasRenderingContext2D", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 67, - "kind": "external", - "name": "DocumentFragment", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~DocumentFragment", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 68, - "kind": "external", - "name": "Element", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Element", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~Element", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 69, - "kind": "external", - "name": "Event", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Event", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~Event", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 70, - "kind": "external", - "name": "Node", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/Node", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~Node", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 71, - "kind": "external", - "name": "NodeList", - "externalLink": "https://developer.mozilla.org/en-US/docs/Web/API/NodeList", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~NodeList", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 72, - "kind": "external", - "name": "XMLHttpRequest", - "externalLink": "https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~XMLHttpRequest", - "access": null, - "description": "", - "builtinExternal": true - }, - { - "__docId__": 73, - "kind": "external", - "name": "AudioContext", - "externalLink": "https://developer.mozilla.org/en/docs/Web/API/AudioContext", - "memberof": "BuiltinExternal/WebAPIExternal.js", - "static": true, - "longname": "BuiltinExternal/WebAPIExternal.js~AudioContext", - "access": null, - "description": "", - "lineNumber": 34, - "builtinExternal": true - } -] \ No newline at end of file diff --git a/file/src/api/index.js.html b/file/src/api/index.js.html deleted file mode 100644 index e5f7ada..0000000 --- a/file/src/api/index.js.html +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - src/api/index.js | aureooms/js-random API Document - - - - - - - - - - - -
    - Home - Manual - Reference - Source - Test - Repository - -
    - - - -

    src/api/index.js

    -
    export * from './randfloat' ;
    -export * from './randint' ;
    -export * from './randrange' ;
    -export * from './sample' ;
    -export * from './shuffle' ;
    -
    - -
    - - - - - - - - - - - - diff --git a/file/src/api/randfloat.js.html b/file/src/api/randfloat.js.html index 57bb92c..0c760c0 100644 --- a/file/src/api/randfloat.js.html +++ b/file/src/api/randfloat.js.html @@ -3,16 +3,12 @@ - src/api/randfloat.js | aureooms/js-random API Document + src/api/randfloat.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/api/randfloat.js

    -
    
    -/**
    +
    /**
      * Returns a floating point number in interval [i, j[ (i included, j excluded)
      * according to a uniform distribution.
      */
     
    -export function randfloat ( i , j ) {
    -	return i + Math.random( ) * ( j - i ) ;
    -}
    -
    +const randfloat = (i, j) => i + Math.random() * (j - i);
    +export default randfloat;
     
    diff --git a/file/src/api/randint.js.html b/file/src/api/randint.js.html index d8d6478..b6ff4e1 100644 --- a/file/src/api/randint.js.html +++ b/file/src/api/randint.js.html @@ -3,16 +3,12 @@ - src/api/randint.js | aureooms/js-random API Document + src/api/randint.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/api/randint.js

    -
    
    -/**
    +
    /**
      * Returns an integer in interval [i, j[ (i included, j excluded)
      * according to a uniform distribution.
      */
     
    -export function randint ( i , j ) {
    -	return i + Math.floor( Math.random( ) * ( j - i ) ) ;
    -}
    -
    +const randint = (i, j) => i + Math.floor(Math.random() * (j - i));
    +export default randint;
     
    diff --git a/file/src/api/randrange.js.html b/file/src/api/randrange.js.html index 8eb0560..3d1a4d5 100644 --- a/file/src/api/randrange.js.html +++ b/file/src/api/randrange.js.html @@ -3,16 +3,12 @@ - src/api/randrange.js | aureooms/js-random API Document + src/api/randrange.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/api/randrange.js

    -
    import { randint } from './randint' ;
    +
    import randint from './randint.js';
     
     /**
      * Return a randomly selected element from range(start, stop, step).
      */
     
    -export function randrange ( start , stop , step ) {
    -
    +const randrange = (start, stop, step) => {
     	// TODO handle empty ranges
     
    -	if ( stop === undefined ) return randint( 0 , start ) ;
    -	if ( step === undefined ) step = 1 ;
    +	if (stop === undefined) return randint(0, start);
    +	if (step === undefined) step = 1;
     
    -	if ( stop >= start ) {
    -		return start + step * randint( 0 , Math.floor( ( stop - start ) / step ) ) ;
    -	}
    -	else {
    -		return start + step * randint( 0 , Math.floor( ( start - stop ) / -step ) ) ;
    +	if (stop >= start) {
    +		return start + step * randint(0, Math.floor((stop - start) / step));
     	}
     
    -}
    +	return start + step * randint(0, Math.floor((start - stop) / -step));
    +};
     
    +export default randrange;
     
    diff --git a/file/src/api/sample.js.html b/file/src/api/sample.js.html index 9c874f3..b05fb42 100644 --- a/file/src/api/sample.js.html +++ b/file/src/api/sample.js.html @@ -3,16 +3,12 @@ - src/api/sample.js | aureooms/js-random API Document + src/api/sample.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/api/sample.js

    -
    import { _fisheryates } from '../kernel' ;
    -import { randint } from './randint' ;
    +
    import _fisheryates from '../kernel/_fisheryates.js';
    +import randint from './randint.js';
     
    -export const sample = _fisheryates( randint ) ;
    +const sample = _fisheryates(randint);
    +export default sample;
     
    diff --git a/file/src/api/shuffle.js.html b/file/src/api/shuffle.js.html index 5ebae9f..4c679e5 100644 --- a/file/src/api/shuffle.js.html +++ b/file/src/api/shuffle.js.html @@ -3,16 +3,12 @@ - src/api/shuffle.js | aureooms/js-random API Document + src/api/shuffle.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/api/shuffle.js

    -
    import { _shuffle } from '../kernel' ;
    -import { sample } from './sample' ;
    +
    import _shuffle from '../kernel/_shuffle.js';
    +import sample from './sample.js';
     
    -export const shuffle = _shuffle( sample ) ;
    +const shuffle = _shuffle(sample);
    +export default shuffle;
     
    diff --git a/file/src/index.js.html b/file/src/index.js.html index a626eed..e71e23d 100644 --- a/file/src/index.js.html +++ b/file/src/index.js.html @@ -3,16 +3,12 @@ - src/index.js | aureooms/js-random API Document + src/index.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/index.js

    -
    export * from './api' ;
    -export * from './kernel' ;
    +
    export {default as randfloat} from './api/randfloat.js';
    +export {default as randint} from './api/randint.js';
    +export {default as randrange} from './api/randrange.js';
    +export {default as sample} from './api/sample.js';
    +export {default as shuffle} from './api/shuffle.js';
    +export {default as _fisheryates} from './kernel/_fisheryates.js';
    +export {default as _shuffle} from './kernel/_shuffle.js';
     
    diff --git a/file/src/kernel/_fisheryates.js.html b/file/src/kernel/_fisheryates.js.html index 2089481..f7f9ca8 100644 --- a/file/src/kernel/_fisheryates.js.html +++ b/file/src/kernel/_fisheryates.js.html @@ -3,16 +3,12 @@ - src/kernel/_fisheryates.js | aureooms/js-random API Document + src/kernel/_fisheryates.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/kernel/_fisheryates.js

    -
    
    -/**
    +
    /**
      * Sample array using Fisher-Yates method.
      */
     
    -export function _fisheryates ( randint ) {
    -
    -	const fisheryates = function ( n , a , i , j ) {
    -
    -		// we will swap at most n elements
    -
    -		const k = i + n ;
    -
    -		for ( ; i < k ; ++i ) {
    -
    -			// choose any index p in the remaining array
    -
    -			const p = randint( i , j ) ;
    -
    -
    -			// swap element at index p with first element in the array
    +const _fisheryates = (randint) => (n, a, i, j) => {
    +	// We will swap at most n elements
     
    -			const tmp  = a[i] ;
    -			a[i] = a[p] ;
    -			a[p] =  tmp ;
    +	const k = i + n;
     
    -		}
    +	for (; i < k; ++i) {
    +		// Choose any index p in the remaining array
     
    -	} ;
    +		const p = randint(i, j);
     
    -	return fisheryates ;
    +		// Swap element at index p with first element in the array
     
    -}
    +		const tmp = a[i];
    +		a[i] = a[p];
    +		a[p] = tmp;
    +	}
    +};
     
    +export default _fisheryates;
     
    diff --git a/file/src/kernel/_shuffle.js.html b/file/src/kernel/_shuffle.js.html index 5940938..417ac2c 100644 --- a/file/src/kernel/_shuffle.js.html +++ b/file/src/kernel/_shuffle.js.html @@ -3,16 +3,12 @@ - src/kernel/_shuffle.js | aureooms/js-random API Document + src/kernel/_shuffle.js | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    +

    src/kernel/_shuffle.js

    -
    
    -/**
    +
    /**
      * Shuffle array by sampling the complete array.
      */
     
    -export function _shuffle ( sample ) {
    -
    -	const shuffle = function ( a , i , j ) {
    -		sample( j - i , a , i , j ) ;
    -	} ;
    -
    -	return shuffle ;
    -
    -}
    -
    +const _shuffle = (sample) => (a, i, j) => sample(j - i, a, i, j);
    +export default _shuffle;
     
    diff --git a/file/src/kernel/index.js.html b/file/src/kernel/index.js.html deleted file mode 100644 index 09c1bca..0000000 --- a/file/src/kernel/index.js.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - src/kernel/index.js | aureooms/js-random API Document - - - - - - - - - - - -
    - Home - Manual - Reference - Source - Test - Repository - -
    - - - -

    src/kernel/index.js

    -
    export * from './_fisheryates' ;
    -export * from './_shuffle' ;
    -
    - -
    - - - - - - - - - - - - diff --git a/function/index.html b/function/index.html index cdab9f9..03dc37b 100644 --- a/function/index.html +++ b/function/index.html @@ -3,16 +3,12 @@ - Function | aureooms/js-random API Document + Function | @aureooms/js-random - - - - - +
    @@ -20,8 +16,7 @@ Manual Reference Source - Test - Repository + -
    + -

    Usage

    The code needs a ES2015+ polyfill to work, for example -regenerator-runtime/runtime.

    +

    Usage

    +

    :warning: Depending on your environment, the code may require +regeneratorRuntime to be defined, for instance by importing +regenerator-runtime/runtime.

    +
    require( 'regenerator-runtime/runtime' ) ;
     // or
     import 'regenerator-runtime/runtime.js' ;
     

    Then

    -
    const random = require( '@aureooms/js-random' ) ;
    +
    const { ... } = require( '@aureooms/js-random' ) ;
     // or
    -import * as random from '@aureooms/js-random' ;
    +import { ... } from '@aureooms/js-random' ;
     
    diff --git a/script/search_index.js b/script/search_index.js index a805cdb..86fe0f5 100644 --- a/script/search_index.js +++ b/script/search_index.js @@ -11,6 +11,12 @@ window.esdocSearchIndex = [ "_fisheryates @aureooms/js-random/src/kernel/_fisheryates.js", "function" ], + [ + "@aureooms/js-random/src/kernel/_fisheryates_inside_out.js~_fisheryates_inside_out", + "function/index.html#static-function-_fisheryates_inside_out", + "_fisheryates_inside_out @aureooms/js-random/src/kernel/_fisheryates_inside_out.js", + "function" + ], [ "@aureooms/js-random/src/kernel/_randfloat.js~_randfloat", "function/index.html#static-function-_randfloat", @@ -71,6 +77,12 @@ window.esdocSearchIndex = [ "shuffle @aureooms/js-random/src/api/shuffle.js", "variable" ], + [ + "@aureooms/js-random/src/api/shuffled.js~shuffled", + "variable/index.html#static-variable-shuffled", + "shuffled @aureooms/js-random/src/api/shuffled.js", + "variable" + ], [ "src/.external-ecmascript.js~array", "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array", @@ -395,6 +407,12 @@ window.esdocSearchIndex = [ "src/api/shuffle.js", "file" ], + [ + "src/api/shuffled.js", + "file/src/api/shuffled.js.html", + "src/api/shuffled.js", + "file" + ], [ "src/index.js", "file/src/index.js.html", @@ -413,6 +431,12 @@ window.esdocSearchIndex = [ "src/kernel/_fisheryates.js", "file" ], + [ + "src/kernel/_fisheryates_inside_out.js", + "file/src/kernel/_fisheryates_inside_out.js.html", + "src/kernel/_fisheryates_inside_out.js", + "file" + ], [ "src/kernel/_randfloat.js", "file/src/kernel/_randfloat.js.html", diff --git a/source.html b/source.html index 3322455..9fcef39 100644 --- a/source.html +++ b/source.html @@ -36,8 +36,10 @@
  • Vrandint
  • Vsample
  • Vshuffle
  • +
  • Vshuffled
  • kernelF_choice
  • F_fisheryates
  • +
  • F_fisheryates_inside_out
  • F_randfloat
  • F_randint
  • F_shuffle
  • @@ -45,7 +47,7 @@
    -

    Source 12/12

    +

    Source 14/14

    @@ -66,7 +68,7 @@ - + @@ -74,7 +76,7 @@ - + @@ -82,7 +84,7 @@ - + @@ -90,15 +92,15 @@ - + - - - + + + @@ -106,7 +108,7 @@ - + @@ -114,15 +116,23 @@ - + + + + + + + + + - - - + + + @@ -130,15 +140,23 @@ - + - - - + + + + + + + + + + + @@ -146,7 +164,7 @@ - + @@ -154,7 +172,7 @@ - + @@ -162,7 +180,7 @@ - +
    100 %1/1 369 byte 142021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/randfloat.js100 %1/1 456 byte 152021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/randint.js100 %1/1 450 byte 152021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/random.js100 %1/1 176 byte 92021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/randrange.js randrange 100 %1/1473 byte202021-04-03 17:07:51 (UTC)1125 byte322021-04-03 20:27:03 (UTC)
    src/api/sample.js100 %1/1 536 byte 162021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/shuffle.js100 %1/1 406 byte 132021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/api/shuffled.jsshuffled100 %1/1423 byte132021-04-03 20:27:03 (UTC)
    src/index.js - -673 byte122021-04-03 17:07:51 (UTC)816 byte142021-04-03 20:27:03 (UTC)
    src/kernel/_choice.js100 %1/1 539 byte 242021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/kernel/_fisheryates.js _fisheryates 100 %1/12115 byte592021-04-03 17:07:51 (UTC)2114 byte572021-04-03 20:27:03 (UTC)
    src/kernel/_fisheryates_inside_out.js_fisheryates_inside_out100 %1/12464 byte622021-04-03 20:27:03 (UTC)
    src/kernel/_randfloat.js100 %1/1 689 byte 232021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/kernel/_randint.js100 %1/1 693 byte 232021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    src/kernel/_shuffle.js100 %1/1 551 byte 202021-04-03 17:07:51 (UTC)2021-04-03 20:27:03 (UTC)
    diff --git a/variable/index.html b/variable/index.html index 6602841..9ff8277 100644 --- a/variable/index.html +++ b/variable/index.html @@ -36,8 +36,10 @@
  • Vrandint
  • Vsample
  • Vshuffle
  • +
  • Vshuffled
  • kernelF_choice
  • F_fisheryates
  • +
  • F_fisheryates_inside_out
  • F_randfloat
  • F_randint
  • F_shuffle
  • @@ -159,7 +161,7 @@
    -

    Take a sample of size n (without repetitions) from the items i through +

    Take a sample of size n (without replacement) from the items i through j-1 of the input array.

    @@ -196,6 +198,36 @@ + + + + + public + + + + + + +
    +

    + + + + shuffled(iterable: Iterable): Array: * +

    +
    +
    + + +

    Given an input iterable, constructs an array containing the elements of the +input shuffled uniformly at random.

    +
    +
    + + + + @@ -397,7 +429,7 @@

    -

    Take a sample of size n (without repetitions) from the items i through +

    Take a sample of size n (without replacement) from the items i through j-1 of the input array. This is done in-place. The sample can be retrieved from position i to i+n.

    @@ -468,6 +500,64 @@

    +

    +
    +

    + public + + + + + + shuffled(iterable: Iterable): Array: * + + + + source + +

    + + + + +

    Given an input iterable, constructs an array containing the elements of the +input shuffled uniformly at random.

    +
    + + + +
    +
    + +
    +

    Return:

    + + + + + + + +
    Array

    The constructed array.

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

    From 7da2a230e59c74c6f75fa0c824a8e73ad230e8b7 Mon Sep 17 00:00:00 2001 From: aureooms Date: Thu, 8 Apr 2021 20:52:11 +0000 Subject: [PATCH 13/15] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20au?= =?UTF-8?q?reooms/js-random@5ace169f2d699171b7013f2887a88dc393d695c3=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ast/source/api/reservoir.js.json | 1113 +++ ast/source/index.js.json | 1878 +++-- ast/source/kernel/_waterman.js.json | 7487 +++++++++++++++++ coverage.json | 14 +- file/src/api/choice.js.html | 2 + file/src/api/randfloat.js.html | 2 + file/src/api/randint.js.html | 2 + file/src/api/random.js.html | 2 + file/src/api/randrange.js.html | 2 + file/src/api/reservoir.js.html | 83 + file/src/api/sample.js.html | 2 + file/src/api/shuffle.js.html | 2 + file/src/api/shuffled.js.html | 2 + file/src/index.js.html | 4 + file/src/kernel/_choice.js.html | 2 + file/src/kernel/_fisheryates.js.html | 2 + .../kernel/_fisheryates_inside_out.js.html | 2 + file/src/kernel/_randfloat.js.html | 2 + file/src/kernel/_randint.js.html | 2 + file/src/kernel/_shuffle.js.html | 2 + file/src/kernel/_waterman.js.html | 146 + function/index.html | 107 + identifiers.html | 61 + index.html | 2 + index.json | 165 +- script/search_index.js | 24 + source.html | 54 +- variable/index.html | 88 + 28 files changed, 10599 insertions(+), 655 deletions(-) create mode 100644 ast/source/api/reservoir.js.json create mode 100644 ast/source/kernel/_waterman.js.json create mode 100644 file/src/api/reservoir.js.html create mode 100644 file/src/kernel/_waterman.js.html diff --git a/ast/source/api/reservoir.js.json b/ast/source/api/reservoir.js.json new file mode 100644 index 0000000..13d8544 --- /dev/null +++ b/ast/source/api/reservoir.js.json @@ -0,0 +1,1113 @@ +{ + "type": "File", + "start": 0, + "end": 386, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 386, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "ImportDeclaration", + "start": 0, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 47 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + }, + "local": { + "type": "Identifier", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + }, + "identifierName": "_waterman" + }, + "name": "_waterman" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 22, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 46 + } + }, + "extra": { + "rawValue": "../kernel/_waterman.js", + "raw": "'../kernel/_waterman.js'" + }, + "value": "../kernel/_waterman.js" + } + }, + { + "type": "ImportDeclaration", + "start": 48, + "end": 83, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 35 + } + }, + "specifiers": [ + { + "type": "ImportDefaultSpecifier", + "start": 55, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + }, + "local": { + "type": "Identifier", + "start": 55, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + }, + "identifierName": "randint" + }, + "name": "randint" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 68, + "end": 82, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 34 + } + }, + "extra": { + "rawValue": "./randint.js", + "raw": "'./randint.js'" + }, + "value": "./randint.js" + }, + "trailingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Reservoir sampling.\n *\n * @function\n * @param {number} k The size of the sample.\n * @param {Iterable} iterable The input iterable.\n * @param {Array} [output=new Array(k)] The output array.\n * @return {Array} The output array.\n ", + "start": 85, + "end": 321, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + } + ] + }, + { + "type": "Identifier", + "start": 322, + "end": 359, + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 37 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 328, + "end": 358, + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "id": { + "type": "Identifier", + "start": 328, + "end": 337, + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 15 + }, + "identifierName": "reservoir" + }, + "name": "reservoir", + "leadingComments": null + }, + "init": { + "type": "CallExpression", + "start": 340, + "end": 358, + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 340, + "end": 349, + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 27 + }, + "identifierName": "_waterman" + }, + "name": "_waterman" + }, + "arguments": [ + { + "type": "Identifier", + "start": 350, + "end": 357, + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 35 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ] + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 360, + "end": 385, + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 25 + } + }, + "declaration": { + "type": "Identifier", + "start": 375, + "end": 384, + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 24 + }, + "identifierName": "reservoir" + }, + "name": "reservoir" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 360, + "end": 385, + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 25 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 322, + "end": 359, + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 37 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 328, + "end": 358, + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "id": { + "type": "Identifier", + "start": 328, + "end": 337, + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 15 + }, + "identifierName": "reservoir" + }, + "name": "reservoir", + "leadingComments": null + }, + "init": { + "type": "CallExpression", + "start": 340, + "end": 358, + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 36 + } + }, + "callee": { + "type": "Identifier", + "start": 340, + "end": 349, + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 27 + }, + "identifierName": "_waterman" + }, + "name": "_waterman" + }, + "arguments": [ + { + "type": "Identifier", + "start": 350, + "end": 357, + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 35 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ] + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Reservoir sampling.\n *\n * @function\n * @param {number} k The size of the sample.\n * @param {Iterable} iterable The input iterable.\n * @param {Array} [output=new Array(k)] The output array.\n * @return {Array} The output array.\n ", + "start": 85, + "end": 321, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + } + ], + "trailingComments": [] + } + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Reservoir sampling.\n *\n * @function\n * @param {number} k The size of the sample.\n * @param {Iterable} iterable The input iterable.\n * @param {Array} [output=new Array(k)] The output array.\n * @return {Array} The output array.\n ", + "start": 85, + "end": 321, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + } + ], + "tokens": [ + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_waterman", + "start": 7, + "end": 16, + "loc": { + "start": { + "line": 1, + "column": 7 + }, + "end": { + "line": 1, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 17, + "end": 21, + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "../kernel/_waterman.js", + "start": 22, + "end": 46, + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 46 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 46, + "end": 47, + "loc": { + "start": { + "line": 1, + "column": 46 + }, + "end": { + "line": 1, + "column": 47 + } + } + }, + { + "type": { + "label": "import", + "keyword": "import", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "import", + "start": 48, + "end": 54, + "loc": { + "start": { + "line": 2, + "column": 0 + }, + "end": { + "line": 2, + "column": 6 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 55, + "end": 62, + "loc": { + "start": { + "line": 2, + "column": 7 + }, + "end": { + "line": 2, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 63, + "end": 67, + "loc": { + "start": { + "line": 2, + "column": 15 + }, + "end": { + "line": 2, + "column": 19 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./randint.js", + "start": 68, + "end": 82, + "loc": { + "start": { + "line": 2, + "column": 20 + }, + "end": { + "line": 2, + "column": 34 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 82, + "end": 83, + "loc": { + "start": { + "line": 2, + "column": 34 + }, + "end": { + "line": 2, + "column": 35 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n * Reservoir sampling.\n *\n * @function\n * @param {number} k The size of the sample.\n * @param {Iterable} iterable The input iterable.\n * @param {Array} [output=new Array(k)] The output array.\n * @return {Array} The output array.\n ", + "start": 85, + "end": 321, + "loc": { + "start": { + "line": 4, + "column": 0 + }, + "end": { + "line": 12, + "column": 3 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 322, + "end": 327, + "loc": { + "start": { + "line": 13, + "column": 0 + }, + "end": { + "line": 13, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "reservoir", + "start": 328, + "end": 337, + "loc": { + "start": { + "line": 13, + "column": 6 + }, + "end": { + "line": 13, + "column": 15 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 338, + "end": 339, + "loc": { + "start": { + "line": 13, + "column": 16 + }, + "end": { + "line": 13, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_waterman", + "start": 340, + "end": 349, + "loc": { + "start": { + "line": 13, + "column": 18 + }, + "end": { + "line": 13, + "column": 27 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 349, + "end": 350, + "loc": { + "start": { + "line": 13, + "column": 27 + }, + "end": { + "line": 13, + "column": 28 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 350, + "end": 357, + "loc": { + "start": { + "line": 13, + "column": 28 + }, + "end": { + "line": 13, + "column": 35 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 357, + "end": 358, + "loc": { + "start": { + "line": 13, + "column": 35 + }, + "end": { + "line": 13, + "column": 36 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 358, + "end": 359, + "loc": { + "start": { + "line": 13, + "column": 36 + }, + "end": { + "line": 13, + "column": 37 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 360, + "end": 366, + "loc": { + "start": { + "line": 14, + "column": 0 + }, + "end": { + "line": 14, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 367, + "end": 374, + "loc": { + "start": { + "line": 14, + "column": 7 + }, + "end": { + "line": 14, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "reservoir", + "start": 375, + "end": 384, + "loc": { + "start": { + "line": 14, + "column": 15 + }, + "end": { + "line": 14, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 384, + "end": 385, + "loc": { + "start": { + "line": 14, + "column": 24 + }, + "end": { + "line": 14, + "column": 25 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 386, + "end": 386, + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/ast/source/index.js.json b/ast/source/index.js.json index ee0d067..de68965 100644 --- a/ast/source/index.js.json +++ b/ast/source/index.js.json @@ -1,28 +1,28 @@ { "type": "File", "start": 0, - "end": 816, + "end": 933, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 15, + "line": 17, "column": 0 } }, "program": { "type": "Program", "start": 0, - "end": 816, + "end": 933, "loc": { "start": { "line": 1, "column": 0 }, "end": { - "line": 15, + "line": 17, "column": 0 } }, @@ -466,7 +466,7 @@ { "type": "ExportNamedDeclaration", "start": 269, - "end": 319, + "end": 325, "loc": { "start": { "line": 6, @@ -474,7 +474,7 @@ }, "end": { "line": 6, - "column": 50 + "column": 56 } }, "declaration": null, @@ -482,7 +482,7 @@ { "type": "ExportSpecifier", "start": 277, - "end": 294, + "end": 297, "loc": { "start": { "line": 6, @@ -490,7 +490,7 @@ }, "end": { "line": 6, - "column": 25 + "column": 28 } }, "local": { @@ -513,7 +513,7 @@ "exported": { "type": "Identifier", "start": 288, - "end": 294, + "end": 297, "loc": { "start": { "line": 6, @@ -521,39 +521,39 @@ }, "end": { "line": 6, - "column": 25 + "column": 28 }, - "identifierName": "sample" + "identifierName": "reservoir" }, - "name": "sample" + "name": "reservoir" } } ], "source": { "type": "StringLiteral", - "start": 301, - "end": 318, + "start": 304, + "end": 324, "loc": { "start": { "line": 6, - "column": 32 + "column": 35 }, "end": { "line": 6, - "column": 49 + "column": 55 } }, "extra": { - "rawValue": "./api/sample.js", - "raw": "'./api/sample.js'" + "rawValue": "./api/reservoir.js", + "raw": "'./api/reservoir.js'" }, - "value": "./api/sample.js" + "value": "./api/reservoir.js" } }, { "type": "ExportNamedDeclaration", - "start": 320, - "end": 372, + "start": 326, + "end": 376, "loc": { "start": { "line": 7, @@ -561,15 +561,15 @@ }, "end": { "line": 7, - "column": 52 + "column": 50 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 328, - "end": 346, + "start": 334, + "end": 351, "loc": { "start": { "line": 7, @@ -577,13 +577,13 @@ }, "end": { "line": 7, - "column": 26 + "column": 25 } }, "local": { "type": "Identifier", - "start": 328, - "end": 335, + "start": 334, + "end": 341, "loc": { "start": { "line": 7, @@ -599,8 +599,8 @@ }, "exported": { "type": "Identifier", - "start": 339, - "end": 346, + "start": 345, + "end": 351, "loc": { "start": { "line": 7, @@ -608,39 +608,39 @@ }, "end": { "line": 7, - "column": 26 + "column": 25 }, - "identifierName": "shuffle" + "identifierName": "sample" }, - "name": "shuffle" + "name": "sample" } } ], "source": { "type": "StringLiteral", - "start": 353, - "end": 371, + "start": 358, + "end": 375, "loc": { "start": { "line": 7, - "column": 33 + "column": 32 }, "end": { "line": 7, - "column": 51 + "column": 49 } }, "extra": { - "rawValue": "./api/shuffle.js", - "raw": "'./api/shuffle.js'" + "rawValue": "./api/sample.js", + "raw": "'./api/sample.js'" }, - "value": "./api/shuffle.js" + "value": "./api/sample.js" } }, { "type": "ExportNamedDeclaration", - "start": 373, - "end": 427, + "start": 377, + "end": 429, "loc": { "start": { "line": 8, @@ -648,15 +648,15 @@ }, "end": { "line": 8, - "column": 54 + "column": 52 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 381, - "end": 400, + "start": 385, + "end": 403, "loc": { "start": { "line": 8, @@ -664,13 +664,13 @@ }, "end": { "line": 8, - "column": 27 + "column": 26 } }, "local": { "type": "Identifier", - "start": 381, - "end": 388, + "start": 385, + "end": 392, "loc": { "start": { "line": 8, @@ -686,8 +686,8 @@ }, "exported": { "type": "Identifier", - "start": 392, - "end": 400, + "start": 396, + "end": 403, "loc": { "start": { "line": 8, @@ -695,39 +695,39 @@ }, "end": { "line": 8, - "column": 27 + "column": 26 }, - "identifierName": "shuffled" + "identifierName": "shuffle" }, - "name": "shuffled" + "name": "shuffle" } } ], "source": { "type": "StringLiteral", - "start": 407, - "end": 426, + "start": 410, + "end": 428, "loc": { "start": { "line": 8, - "column": 34 + "column": 33 }, "end": { "line": 8, - "column": 53 + "column": 51 } }, "extra": { - "rawValue": "./api/shuffled.js", - "raw": "'./api/shuffled.js'" + "rawValue": "./api/shuffle.js", + "raw": "'./api/shuffle.js'" }, - "value": "./api/shuffled.js" + "value": "./api/shuffle.js" } }, { "type": "ExportNamedDeclaration", - "start": 428, - "end": 483, + "start": 430, + "end": 484, "loc": { "start": { "line": 9, @@ -735,15 +735,15 @@ }, "end": { "line": 9, - "column": 55 + "column": 54 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 436, - "end": 454, + "start": 438, + "end": 457, "loc": { "start": { "line": 9, @@ -751,13 +751,13 @@ }, "end": { "line": 9, - "column": 26 + "column": 27 } }, "local": { "type": "Identifier", - "start": 436, - "end": 443, + "start": 438, + "end": 445, "loc": { "start": { "line": 9, @@ -773,8 +773,8 @@ }, "exported": { "type": "Identifier", - "start": 447, - "end": 454, + "start": 449, + "end": 457, "loc": { "start": { "line": 9, @@ -782,39 +782,39 @@ }, "end": { "line": 9, - "column": 26 + "column": 27 }, - "identifierName": "_choice" + "identifierName": "shuffled" }, - "name": "_choice" + "name": "shuffled" } } ], "source": { "type": "StringLiteral", - "start": 461, - "end": 482, + "start": 464, + "end": 483, "loc": { "start": { "line": 9, - "column": 33 + "column": 34 }, "end": { "line": 9, - "column": 54 + "column": 53 } }, "extra": { - "rawValue": "./kernel/_choice.js", - "raw": "'./kernel/_choice.js'" + "rawValue": "./api/shuffled.js", + "raw": "'./api/shuffled.js'" }, - "value": "./kernel/_choice.js" + "value": "./api/shuffled.js" } }, { "type": "ExportNamedDeclaration", - "start": 484, - "end": 549, + "start": 485, + "end": 540, "loc": { "start": { "line": 10, @@ -822,15 +822,15 @@ }, "end": { "line": 10, - "column": 65 + "column": 55 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 492, - "end": 515, + "start": 493, + "end": 511, "loc": { "start": { "line": 10, @@ -838,13 +838,13 @@ }, "end": { "line": 10, - "column": 31 + "column": 26 } }, "local": { "type": "Identifier", - "start": 492, - "end": 499, + "start": 493, + "end": 500, "loc": { "start": { "line": 10, @@ -860,8 +860,8 @@ }, "exported": { "type": "Identifier", - "start": 503, - "end": 515, + "start": 504, + "end": 511, "loc": { "start": { "line": 10, @@ -869,39 +869,39 @@ }, "end": { "line": 10, - "column": 31 + "column": 26 }, - "identifierName": "_fisheryates" + "identifierName": "_choice" }, - "name": "_fisheryates" + "name": "_choice" } } ], "source": { "type": "StringLiteral", - "start": 522, - "end": 548, + "start": 518, + "end": 539, "loc": { "start": { "line": 10, - "column": 38 + "column": 33 }, "end": { "line": 10, - "column": 64 + "column": 54 } }, "extra": { - "rawValue": "./kernel/_fisheryates.js", - "raw": "'./kernel/_fisheryates.js'" + "rawValue": "./kernel/_choice.js", + "raw": "'./kernel/_choice.js'" }, - "value": "./kernel/_fisheryates.js" + "value": "./kernel/_choice.js" } }, { "type": "ExportNamedDeclaration", - "start": 550, - "end": 637, + "start": 541, + "end": 606, "loc": { "start": { "line": 11, @@ -909,15 +909,15 @@ }, "end": { "line": 11, - "column": 87 + "column": 65 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 558, - "end": 592, + "start": 549, + "end": 572, "loc": { "start": { "line": 11, @@ -925,13 +925,13 @@ }, "end": { "line": 11, - "column": 42 + "column": 31 } }, "local": { "type": "Identifier", - "start": 558, - "end": 565, + "start": 549, + "end": 556, "loc": { "start": { "line": 11, @@ -947,8 +947,8 @@ }, "exported": { "type": "Identifier", - "start": 569, - "end": 592, + "start": 560, + "end": 572, "loc": { "start": { "line": 11, @@ -956,39 +956,39 @@ }, "end": { "line": 11, - "column": 42 + "column": 31 }, - "identifierName": "_fisheryates_inside_out" + "identifierName": "_fisheryates" }, - "name": "_fisheryates_inside_out" + "name": "_fisheryates" } } ], "source": { "type": "StringLiteral", - "start": 599, - "end": 636, + "start": 579, + "end": 605, "loc": { "start": { "line": 11, - "column": 49 + "column": 38 }, "end": { "line": 11, - "column": 86 + "column": 64 } }, "extra": { - "rawValue": "./kernel/_fisheryates_inside_out.js", - "raw": "'./kernel/_fisheryates_inside_out.js'" + "rawValue": "./kernel/_fisheryates.js", + "raw": "'./kernel/_fisheryates.js'" }, - "value": "./kernel/_fisheryates_inside_out.js" + "value": "./kernel/_fisheryates.js" } }, { "type": "ExportNamedDeclaration", - "start": 638, - "end": 699, + "start": 607, + "end": 694, "loc": { "start": { "line": 12, @@ -996,15 +996,15 @@ }, "end": { "line": 12, - "column": 61 + "column": 87 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 646, - "end": 667, + "start": 615, + "end": 649, "loc": { "start": { "line": 12, @@ -1012,13 +1012,13 @@ }, "end": { "line": 12, - "column": 29 + "column": 42 } }, "local": { "type": "Identifier", - "start": 646, - "end": 653, + "start": 615, + "end": 622, "loc": { "start": { "line": 12, @@ -1034,8 +1034,8 @@ }, "exported": { "type": "Identifier", - "start": 657, - "end": 667, + "start": 626, + "end": 649, "loc": { "start": { "line": 12, @@ -1043,39 +1043,39 @@ }, "end": { "line": 12, - "column": 29 + "column": 42 }, - "identifierName": "_randfloat" + "identifierName": "_fisheryates_inside_out" }, - "name": "_randfloat" + "name": "_fisheryates_inside_out" } } ], "source": { "type": "StringLiteral", - "start": 674, - "end": 698, + "start": 656, + "end": 693, "loc": { "start": { "line": 12, - "column": 36 + "column": 49 }, "end": { "line": 12, - "column": 60 + "column": 86 } }, "extra": { - "rawValue": "./kernel/_randfloat.js", - "raw": "'./kernel/_randfloat.js'" + "rawValue": "./kernel/_fisheryates_inside_out.js", + "raw": "'./kernel/_fisheryates_inside_out.js'" }, - "value": "./kernel/_randfloat.js" + "value": "./kernel/_fisheryates_inside_out.js" } }, { "type": "ExportNamedDeclaration", - "start": 700, - "end": 757, + "start": 695, + "end": 756, "loc": { "start": { "line": 13, @@ -1083,15 +1083,15 @@ }, "end": { "line": 13, - "column": 57 + "column": 61 } }, "declaration": null, "specifiers": [ { "type": "ExportSpecifier", - "start": 708, - "end": 727, + "start": 703, + "end": 724, "loc": { "start": { "line": 13, @@ -1099,13 +1099,13 @@ }, "end": { "line": 13, - "column": 27 + "column": 29 } }, "local": { "type": "Identifier", - "start": 708, - "end": 715, + "start": 703, + "end": 710, "loc": { "start": { "line": 13, @@ -1121,8 +1121,8 @@ }, "exported": { "type": "Identifier", - "start": 719, - "end": 727, + "start": 714, + "end": 724, "loc": { "start": { "line": 13, @@ -1130,39 +1130,39 @@ }, "end": { "line": 13, - "column": 27 + "column": 29 }, - "identifierName": "_randint" + "identifierName": "_randfloat" }, - "name": "_randint" + "name": "_randfloat" } } ], "source": { "type": "StringLiteral", - "start": 734, - "end": 756, + "start": 731, + "end": 755, "loc": { "start": { "line": 13, - "column": 34 + "column": 36 }, "end": { "line": 13, - "column": 56 + "column": 60 } }, "extra": { - "rawValue": "./kernel/_randint.js", - "raw": "'./kernel/_randint.js'" + "rawValue": "./kernel/_randfloat.js", + "raw": "'./kernel/_randfloat.js'" }, - "value": "./kernel/_randint.js" + "value": "./kernel/_randfloat.js" } }, { "type": "ExportNamedDeclaration", - "start": 758, - "end": 815, + "start": 757, + "end": 814, "loc": { "start": { "line": 14, @@ -1177,8 +1177,8 @@ "specifiers": [ { "type": "ExportSpecifier", - "start": 766, - "end": 785, + "start": 765, + "end": 784, "loc": { "start": { "line": 14, @@ -1191,8 +1191,8 @@ }, "local": { "type": "Identifier", - "start": 766, - "end": 773, + "start": 765, + "end": 772, "loc": { "start": { "line": 14, @@ -1208,8 +1208,8 @@ }, "exported": { "type": "Identifier", - "start": 777, - "end": 785, + "start": 776, + "end": 784, "loc": { "start": { "line": 14, @@ -1219,16 +1219,16 @@ "line": 14, "column": 27 }, - "identifierName": "_shuffle" + "identifierName": "_randint" }, - "name": "_shuffle" + "name": "_randint" } } ], "source": { "type": "StringLiteral", - "start": 792, - "end": 814, + "start": 791, + "end": 813, "loc": { "start": { "line": 14, @@ -1239,43 +1239,217 @@ "column": 56 } }, + "extra": { + "rawValue": "./kernel/_randint.js", + "raw": "'./kernel/_randint.js'" + }, + "value": "./kernel/_randint.js" + } + }, + { + "type": "ExportNamedDeclaration", + "start": 815, + "end": 872, + "loc": { + "start": { + "line": 15, + "column": 0 + }, + "end": { + "line": 15, + "column": 57 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 823, + "end": 842, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 27 + } + }, + "local": { + "type": "Identifier", + "start": 823, + "end": 830, + "loc": { + "start": { + "line": 15, + "column": 8 + }, + "end": { + "line": 15, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 834, + "end": 842, + "loc": { + "start": { + "line": 15, + "column": 19 + }, + "end": { + "line": 15, + "column": 27 + }, + "identifierName": "_shuffle" + }, + "name": "_shuffle" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 849, + "end": 871, + "loc": { + "start": { + "line": 15, + "column": 34 + }, + "end": { + "line": 15, + "column": 56 + } + }, "extra": { "rawValue": "./kernel/_shuffle.js", "raw": "'./kernel/_shuffle.js'" }, "value": "./kernel/_shuffle.js" } - } - ], - "directives": [] - }, - "comments": [], - "tokens": [ - { - "type": { - "label": "export", - "keyword": "export", - "beforeExpr": false, - "startsExpr": false, - "rightAssociative": false, - "isLoop": false, - "isAssign": false, - "prefix": false, - "postfix": false, - "binop": null, - "updateContext": null }, - "value": "export", - "start": 0, - "end": 6, - "loc": { - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 1, - "column": 6 + { + "type": "ExportNamedDeclaration", + "start": 873, + "end": 932, + "loc": { + "start": { + "line": 16, + "column": 0 + }, + "end": { + "line": 16, + "column": 59 + } + }, + "declaration": null, + "specifiers": [ + { + "type": "ExportSpecifier", + "start": 881, + "end": 901, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 28 + } + }, + "local": { + "type": "Identifier", + "start": 881, + "end": 888, + "loc": { + "start": { + "line": 16, + "column": 8 + }, + "end": { + "line": 16, + "column": 15 + }, + "identifierName": "default" + }, + "name": "default" + }, + "exported": { + "type": "Identifier", + "start": 892, + "end": 901, + "loc": { + "start": { + "line": 16, + "column": 19 + }, + "end": { + "line": 16, + "column": 28 + }, + "identifierName": "_waterman" + }, + "name": "_waterman" + } + } + ], + "source": { + "type": "StringLiteral", + "start": 908, + "end": 931, + "loc": { + "start": { + "line": 16, + "column": 35 + }, + "end": { + "line": 16, + "column": 58 + } + }, + "extra": { + "rawValue": "./kernel/_waterman.js", + "raw": "'./kernel/_waterman.js'" + }, + "value": "./kernel/_waterman.js" + } + } + ], + "directives": [] + }, + "comments": [], + "tokens": [ + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 0, + "end": 6, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 6 } } }, @@ -2476,15 +2650,489 @@ "postfix": false, "binop": null }, - "start": 276, - "end": 277, + "start": 276, + "end": 277, + "loc": { + "start": { + "line": 6, + "column": 7 + }, + "end": { + "line": 6, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 277, + "end": 284, + "loc": { + "start": { + "line": 6, + "column": 8 + }, + "end": { + "line": 6, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 285, + "end": 287, + "loc": { + "start": { + "line": 6, + "column": 16 + }, + "end": { + "line": 6, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "reservoir", + "start": 288, + "end": 297, + "loc": { + "start": { + "line": 6, + "column": 19 + }, + "end": { + "line": 6, + "column": 28 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 297, + "end": 298, + "loc": { + "start": { + "line": 6, + "column": 28 + }, + "end": { + "line": 6, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 299, + "end": 303, + "loc": { + "start": { + "line": 6, + "column": 30 + }, + "end": { + "line": 6, + "column": 34 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/reservoir.js", + "start": 304, + "end": 324, + "loc": { + "start": { + "line": 6, + "column": 35 + }, + "end": { + "line": 6, + "column": 55 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 324, + "end": 325, + "loc": { + "start": { + "line": 6, + "column": 55 + }, + "end": { + "line": 6, + "column": 56 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 326, + "end": 332, + "loc": { + "start": { + "line": 7, + "column": 0 + }, + "end": { + "line": 7, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 333, + "end": 334, + "loc": { + "start": { + "line": 7, + "column": 7 + }, + "end": { + "line": 7, + "column": 8 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 334, + "end": 341, + "loc": { + "start": { + "line": 7, + "column": 8 + }, + "end": { + "line": 7, + "column": 15 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "as", + "start": 342, + "end": 344, + "loc": { + "start": { + "line": 7, + "column": 16 + }, + "end": { + "line": 7, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 345, + "end": 351, + "loc": { + "start": { + "line": 7, + "column": 19 + }, + "end": { + "line": 7, + "column": 25 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 351, + "end": 352, + "loc": { + "start": { + "line": 7, + "column": 25 + }, + "end": { + "line": 7, + "column": 26 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "from", + "start": 353, + "end": 357, + "loc": { + "start": { + "line": 7, + "column": 27 + }, + "end": { + "line": 7, + "column": 31 + } + } + }, + { + "type": { + "label": "string", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "./api/sample.js", + "start": 358, + "end": 375, + "loc": { + "start": { + "line": 7, + "column": 32 + }, + "end": { + "line": 7, + "column": 49 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 375, + "end": 376, + "loc": { + "start": { + "line": 7, + "column": 49 + }, + "end": { + "line": 7, + "column": 50 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 377, + "end": 383, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 6 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 384, + "end": 385, "loc": { "start": { - "line": 6, + "line": 8, "column": 7 }, "end": { - "line": 6, + "line": 8, "column": 8 } } @@ -2504,15 +3152,15 @@ "updateContext": null }, "value": "default", - "start": 277, - "end": 284, + "start": 385, + "end": 392, "loc": { "start": { - "line": 6, + "line": 8, "column": 8 }, "end": { - "line": 6, + "line": 8, "column": 15 } } @@ -2530,15 +3178,15 @@ "binop": null }, "value": "as", - "start": 285, - "end": 287, + "start": 393, + "end": 395, "loc": { "start": { - "line": 6, + "line": 8, "column": 16 }, "end": { - "line": 6, + "line": 8, "column": 18 } } @@ -2555,17 +3203,17 @@ "postfix": false, "binop": null }, - "value": "sample", - "start": 288, - "end": 294, + "value": "shuffle", + "start": 396, + "end": 403, "loc": { "start": { - "line": 6, + "line": 8, "column": 19 }, "end": { - "line": 6, - "column": 25 + "line": 8, + "column": 26 } } }, @@ -2581,16 +3229,16 @@ "postfix": false, "binop": null }, - "start": 294, - "end": 295, + "start": 403, + "end": 404, "loc": { "start": { - "line": 6, - "column": 25 + "line": 8, + "column": 26 }, "end": { - "line": 6, - "column": 26 + "line": 8, + "column": 27 } } }, @@ -2607,16 +3255,16 @@ "binop": null }, "value": "from", - "start": 296, - "end": 300, + "start": 405, + "end": 409, "loc": { "start": { - "line": 6, - "column": 27 + "line": 8, + "column": 28 }, "end": { - "line": 6, - "column": 31 + "line": 8, + "column": 32 } } }, @@ -2633,17 +3281,17 @@ "binop": null, "updateContext": null }, - "value": "./api/sample.js", - "start": 301, - "end": 318, + "value": "./api/shuffle.js", + "start": 410, + "end": 428, "loc": { "start": { - "line": 6, - "column": 32 + "line": 8, + "column": 33 }, "end": { - "line": 6, - "column": 49 + "line": 8, + "column": 51 } } }, @@ -2660,16 +3308,16 @@ "binop": null, "updateContext": null }, - "start": 318, - "end": 319, + "start": 428, + "end": 429, "loc": { "start": { - "line": 6, - "column": 49 + "line": 8, + "column": 51 }, "end": { - "line": 6, - "column": 50 + "line": 8, + "column": 52 } } }, @@ -2688,15 +3336,15 @@ "updateContext": null }, "value": "export", - "start": 320, - "end": 326, + "start": 430, + "end": 436, "loc": { "start": { - "line": 7, + "line": 9, "column": 0 }, "end": { - "line": 7, + "line": 9, "column": 6 } } @@ -2713,15 +3361,15 @@ "postfix": false, "binop": null }, - "start": 327, - "end": 328, + "start": 437, + "end": 438, "loc": { "start": { - "line": 7, + "line": 9, "column": 7 }, "end": { - "line": 7, + "line": 9, "column": 8 } } @@ -2741,15 +3389,15 @@ "updateContext": null }, "value": "default", - "start": 328, - "end": 335, + "start": 438, + "end": 445, "loc": { "start": { - "line": 7, + "line": 9, "column": 8 }, "end": { - "line": 7, + "line": 9, "column": 15 } } @@ -2767,15 +3415,15 @@ "binop": null }, "value": "as", - "start": 336, - "end": 338, + "start": 446, + "end": 448, "loc": { "start": { - "line": 7, + "line": 9, "column": 16 }, "end": { - "line": 7, + "line": 9, "column": 18 } } @@ -2792,17 +3440,17 @@ "postfix": false, "binop": null }, - "value": "shuffle", - "start": 339, - "end": 346, + "value": "shuffled", + "start": 449, + "end": 457, "loc": { "start": { - "line": 7, + "line": 9, "column": 19 }, "end": { - "line": 7, - "column": 26 + "line": 9, + "column": 27 } } }, @@ -2818,16 +3466,16 @@ "postfix": false, "binop": null }, - "start": 346, - "end": 347, + "start": 457, + "end": 458, "loc": { "start": { - "line": 7, - "column": 26 + "line": 9, + "column": 27 }, "end": { - "line": 7, - "column": 27 + "line": 9, + "column": 28 } } }, @@ -2844,16 +3492,16 @@ "binop": null }, "value": "from", - "start": 348, - "end": 352, + "start": 459, + "end": 463, "loc": { "start": { - "line": 7, - "column": 28 + "line": 9, + "column": 29 }, "end": { - "line": 7, - "column": 32 + "line": 9, + "column": 33 } } }, @@ -2870,17 +3518,17 @@ "binop": null, "updateContext": null }, - "value": "./api/shuffle.js", - "start": 353, - "end": 371, + "value": "./api/shuffled.js", + "start": 464, + "end": 483, "loc": { "start": { - "line": 7, - "column": 33 + "line": 9, + "column": 34 }, "end": { - "line": 7, - "column": 51 + "line": 9, + "column": 53 } } }, @@ -2897,16 +3545,16 @@ "binop": null, "updateContext": null }, - "start": 371, - "end": 372, + "start": 483, + "end": 484, "loc": { "start": { - "line": 7, - "column": 51 + "line": 9, + "column": 53 }, "end": { - "line": 7, - "column": 52 + "line": 9, + "column": 54 } } }, @@ -2925,15 +3573,15 @@ "updateContext": null }, "value": "export", - "start": 373, - "end": 379, + "start": 485, + "end": 491, "loc": { "start": { - "line": 8, + "line": 10, "column": 0 }, "end": { - "line": 8, + "line": 10, "column": 6 } } @@ -2950,15 +3598,15 @@ "postfix": false, "binop": null }, - "start": 380, - "end": 381, + "start": 492, + "end": 493, "loc": { "start": { - "line": 8, + "line": 10, "column": 7 }, "end": { - "line": 8, + "line": 10, "column": 8 } } @@ -2978,15 +3626,15 @@ "updateContext": null }, "value": "default", - "start": 381, - "end": 388, + "start": 493, + "end": 500, "loc": { "start": { - "line": 8, + "line": 10, "column": 8 }, "end": { - "line": 8, + "line": 10, "column": 15 } } @@ -3004,15 +3652,15 @@ "binop": null }, "value": "as", - "start": 389, - "end": 391, + "start": 501, + "end": 503, "loc": { "start": { - "line": 8, + "line": 10, "column": 16 }, "end": { - "line": 8, + "line": 10, "column": 18 } } @@ -3029,17 +3677,17 @@ "postfix": false, "binop": null }, - "value": "shuffled", - "start": 392, - "end": 400, + "value": "_choice", + "start": 504, + "end": 511, "loc": { "start": { - "line": 8, + "line": 10, "column": 19 }, "end": { - "line": 8, - "column": 27 + "line": 10, + "column": 26 } } }, @@ -3055,16 +3703,16 @@ "postfix": false, "binop": null }, - "start": 400, - "end": 401, + "start": 511, + "end": 512, "loc": { "start": { - "line": 8, - "column": 27 + "line": 10, + "column": 26 }, "end": { - "line": 8, - "column": 28 + "line": 10, + "column": 27 } } }, @@ -3081,16 +3729,16 @@ "binop": null }, "value": "from", - "start": 402, - "end": 406, + "start": 513, + "end": 517, "loc": { "start": { - "line": 8, - "column": 29 + "line": 10, + "column": 28 }, "end": { - "line": 8, - "column": 33 + "line": 10, + "column": 32 } } }, @@ -3107,17 +3755,17 @@ "binop": null, "updateContext": null }, - "value": "./api/shuffled.js", - "start": 407, - "end": 426, + "value": "./kernel/_choice.js", + "start": 518, + "end": 539, "loc": { "start": { - "line": 8, - "column": 34 + "line": 10, + "column": 33 }, "end": { - "line": 8, - "column": 53 + "line": 10, + "column": 54 } } }, @@ -3134,16 +3782,16 @@ "binop": null, "updateContext": null }, - "start": 426, - "end": 427, + "start": 539, + "end": 540, "loc": { "start": { - "line": 8, - "column": 53 + "line": 10, + "column": 54 }, "end": { - "line": 8, - "column": 54 + "line": 10, + "column": 55 } } }, @@ -3162,15 +3810,15 @@ "updateContext": null }, "value": "export", - "start": 428, - "end": 434, + "start": 541, + "end": 547, "loc": { "start": { - "line": 9, + "line": 11, "column": 0 }, "end": { - "line": 9, + "line": 11, "column": 6 } } @@ -3187,15 +3835,15 @@ "postfix": false, "binop": null }, - "start": 435, - "end": 436, + "start": 548, + "end": 549, "loc": { "start": { - "line": 9, + "line": 11, "column": 7 }, "end": { - "line": 9, + "line": 11, "column": 8 } } @@ -3215,15 +3863,15 @@ "updateContext": null }, "value": "default", - "start": 436, - "end": 443, + "start": 549, + "end": 556, "loc": { "start": { - "line": 9, + "line": 11, "column": 8 }, "end": { - "line": 9, + "line": 11, "column": 15 } } @@ -3241,15 +3889,15 @@ "binop": null }, "value": "as", - "start": 444, - "end": 446, + "start": 557, + "end": 559, "loc": { "start": { - "line": 9, + "line": 11, "column": 16 }, "end": { - "line": 9, + "line": 11, "column": 18 } } @@ -3266,17 +3914,17 @@ "postfix": false, "binop": null }, - "value": "_choice", - "start": 447, - "end": 454, + "value": "_fisheryates", + "start": 560, + "end": 572, "loc": { "start": { - "line": 9, + "line": 11, "column": 19 }, "end": { - "line": 9, - "column": 26 + "line": 11, + "column": 31 } } }, @@ -3292,16 +3940,16 @@ "postfix": false, "binop": null }, - "start": 454, - "end": 455, + "start": 572, + "end": 573, "loc": { "start": { - "line": 9, - "column": 26 + "line": 11, + "column": 31 }, "end": { - "line": 9, - "column": 27 + "line": 11, + "column": 32 } } }, @@ -3318,16 +3966,16 @@ "binop": null }, "value": "from", - "start": 456, - "end": 460, + "start": 574, + "end": 578, "loc": { "start": { - "line": 9, - "column": 28 + "line": 11, + "column": 33 }, "end": { - "line": 9, - "column": 32 + "line": 11, + "column": 37 } } }, @@ -3344,17 +3992,17 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_choice.js", - "start": 461, - "end": 482, + "value": "./kernel/_fisheryates.js", + "start": 579, + "end": 605, "loc": { "start": { - "line": 9, - "column": 33 + "line": 11, + "column": 38 }, "end": { - "line": 9, - "column": 54 + "line": 11, + "column": 64 } } }, @@ -3371,16 +4019,16 @@ "binop": null, "updateContext": null }, - "start": 482, - "end": 483, + "start": 605, + "end": 606, "loc": { "start": { - "line": 9, - "column": 54 + "line": 11, + "column": 64 }, "end": { - "line": 9, - "column": 55 + "line": 11, + "column": 65 } } }, @@ -3399,15 +4047,15 @@ "updateContext": null }, "value": "export", - "start": 484, - "end": 490, + "start": 607, + "end": 613, "loc": { "start": { - "line": 10, + "line": 12, "column": 0 }, "end": { - "line": 10, + "line": 12, "column": 6 } } @@ -3424,15 +4072,15 @@ "postfix": false, "binop": null }, - "start": 491, - "end": 492, + "start": 614, + "end": 615, "loc": { "start": { - "line": 10, + "line": 12, "column": 7 }, "end": { - "line": 10, + "line": 12, "column": 8 } } @@ -3452,15 +4100,15 @@ "updateContext": null }, "value": "default", - "start": 492, - "end": 499, + "start": 615, + "end": 622, "loc": { "start": { - "line": 10, + "line": 12, "column": 8 }, "end": { - "line": 10, + "line": 12, "column": 15 } } @@ -3478,15 +4126,15 @@ "binop": null }, "value": "as", - "start": 500, - "end": 502, + "start": 623, + "end": 625, "loc": { "start": { - "line": 10, + "line": 12, "column": 16 }, "end": { - "line": 10, + "line": 12, "column": 18 } } @@ -3503,17 +4151,17 @@ "postfix": false, "binop": null }, - "value": "_fisheryates", - "start": 503, - "end": 515, + "value": "_fisheryates_inside_out", + "start": 626, + "end": 649, "loc": { "start": { - "line": 10, + "line": 12, "column": 19 }, "end": { - "line": 10, - "column": 31 + "line": 12, + "column": 42 } } }, @@ -3529,16 +4177,16 @@ "postfix": false, "binop": null }, - "start": 515, - "end": 516, + "start": 649, + "end": 650, "loc": { "start": { - "line": 10, - "column": 31 + "line": 12, + "column": 42 }, "end": { - "line": 10, - "column": 32 + "line": 12, + "column": 43 } } }, @@ -3555,16 +4203,16 @@ "binop": null }, "value": "from", - "start": 517, - "end": 521, + "start": 651, + "end": 655, "loc": { "start": { - "line": 10, - "column": 33 + "line": 12, + "column": 44 }, "end": { - "line": 10, - "column": 37 + "line": 12, + "column": 48 } } }, @@ -3581,17 +4229,17 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_fisheryates.js", - "start": 522, - "end": 548, + "value": "./kernel/_fisheryates_inside_out.js", + "start": 656, + "end": 693, "loc": { "start": { - "line": 10, - "column": 38 + "line": 12, + "column": 49 }, "end": { - "line": 10, - "column": 64 + "line": 12, + "column": 86 } } }, @@ -3608,16 +4256,16 @@ "binop": null, "updateContext": null }, - "start": 548, - "end": 549, + "start": 693, + "end": 694, "loc": { "start": { - "line": 10, - "column": 64 + "line": 12, + "column": 86 }, "end": { - "line": 10, - "column": 65 + "line": 12, + "column": 87 } } }, @@ -3636,15 +4284,15 @@ "updateContext": null }, "value": "export", - "start": 550, - "end": 556, + "start": 695, + "end": 701, "loc": { "start": { - "line": 11, + "line": 13, "column": 0 }, "end": { - "line": 11, + "line": 13, "column": 6 } } @@ -3661,15 +4309,15 @@ "postfix": false, "binop": null }, - "start": 557, - "end": 558, + "start": 702, + "end": 703, "loc": { "start": { - "line": 11, + "line": 13, "column": 7 }, "end": { - "line": 11, + "line": 13, "column": 8 } } @@ -3689,15 +4337,15 @@ "updateContext": null }, "value": "default", - "start": 558, - "end": 565, + "start": 703, + "end": 710, "loc": { "start": { - "line": 11, + "line": 13, "column": 8 }, "end": { - "line": 11, + "line": 13, "column": 15 } } @@ -3715,15 +4363,15 @@ "binop": null }, "value": "as", - "start": 566, - "end": 568, + "start": 711, + "end": 713, "loc": { "start": { - "line": 11, + "line": 13, "column": 16 }, "end": { - "line": 11, + "line": 13, "column": 18 } } @@ -3740,17 +4388,17 @@ "postfix": false, "binop": null }, - "value": "_fisheryates_inside_out", - "start": 569, - "end": 592, + "value": "_randfloat", + "start": 714, + "end": 724, "loc": { "start": { - "line": 11, + "line": 13, "column": 19 }, "end": { - "line": 11, - "column": 42 + "line": 13, + "column": 29 } } }, @@ -3766,16 +4414,16 @@ "postfix": false, "binop": null }, - "start": 592, - "end": 593, + "start": 724, + "end": 725, "loc": { "start": { - "line": 11, - "column": 42 + "line": 13, + "column": 29 }, "end": { - "line": 11, - "column": 43 + "line": 13, + "column": 30 } } }, @@ -3792,16 +4440,16 @@ "binop": null }, "value": "from", - "start": 594, - "end": 598, + "start": 726, + "end": 730, "loc": { "start": { - "line": 11, - "column": 44 + "line": 13, + "column": 31 }, "end": { - "line": 11, - "column": 48 + "line": 13, + "column": 35 } } }, @@ -3818,17 +4466,17 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_fisheryates_inside_out.js", - "start": 599, - "end": 636, + "value": "./kernel/_randfloat.js", + "start": 731, + "end": 755, "loc": { "start": { - "line": 11, - "column": 49 + "line": 13, + "column": 36 }, "end": { - "line": 11, - "column": 86 + "line": 13, + "column": 60 } } }, @@ -3845,16 +4493,16 @@ "binop": null, "updateContext": null }, - "start": 636, - "end": 637, + "start": 755, + "end": 756, "loc": { "start": { - "line": 11, - "column": 86 + "line": 13, + "column": 60 }, "end": { - "line": 11, - "column": 87 + "line": 13, + "column": 61 } } }, @@ -3873,15 +4521,15 @@ "updateContext": null }, "value": "export", - "start": 638, - "end": 644, + "start": 757, + "end": 763, "loc": { "start": { - "line": 12, + "line": 14, "column": 0 }, "end": { - "line": 12, + "line": 14, "column": 6 } } @@ -3898,15 +4546,15 @@ "postfix": false, "binop": null }, - "start": 645, - "end": 646, + "start": 764, + "end": 765, "loc": { "start": { - "line": 12, + "line": 14, "column": 7 }, "end": { - "line": 12, + "line": 14, "column": 8 } } @@ -3926,15 +4574,15 @@ "updateContext": null }, "value": "default", - "start": 646, - "end": 653, + "start": 765, + "end": 772, "loc": { "start": { - "line": 12, + "line": 14, "column": 8 }, "end": { - "line": 12, + "line": 14, "column": 15 } } @@ -3952,15 +4600,15 @@ "binop": null }, "value": "as", - "start": 654, - "end": 656, + "start": 773, + "end": 775, "loc": { "start": { - "line": 12, + "line": 14, "column": 16 }, "end": { - "line": 12, + "line": 14, "column": 18 } } @@ -3977,17 +4625,17 @@ "postfix": false, "binop": null }, - "value": "_randfloat", - "start": 657, - "end": 667, + "value": "_randint", + "start": 776, + "end": 784, "loc": { "start": { - "line": 12, + "line": 14, "column": 19 }, "end": { - "line": 12, - "column": 29 + "line": 14, + "column": 27 } } }, @@ -4003,16 +4651,16 @@ "postfix": false, "binop": null }, - "start": 667, - "end": 668, + "start": 784, + "end": 785, "loc": { "start": { - "line": 12, - "column": 29 + "line": 14, + "column": 27 }, "end": { - "line": 12, - "column": 30 + "line": 14, + "column": 28 } } }, @@ -4029,16 +4677,16 @@ "binop": null }, "value": "from", - "start": 669, - "end": 673, + "start": 786, + "end": 790, "loc": { "start": { - "line": 12, - "column": 31 + "line": 14, + "column": 29 }, "end": { - "line": 12, - "column": 35 + "line": 14, + "column": 33 } } }, @@ -4055,17 +4703,17 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_randfloat.js", - "start": 674, - "end": 698, + "value": "./kernel/_randint.js", + "start": 791, + "end": 813, "loc": { "start": { - "line": 12, - "column": 36 + "line": 14, + "column": 34 }, "end": { - "line": 12, - "column": 60 + "line": 14, + "column": 56 } } }, @@ -4082,16 +4730,16 @@ "binop": null, "updateContext": null }, - "start": 698, - "end": 699, + "start": 813, + "end": 814, "loc": { "start": { - "line": 12, - "column": 60 + "line": 14, + "column": 56 }, "end": { - "line": 12, - "column": 61 + "line": 14, + "column": 57 } } }, @@ -4110,15 +4758,15 @@ "updateContext": null }, "value": "export", - "start": 700, - "end": 706, + "start": 815, + "end": 821, "loc": { "start": { - "line": 13, + "line": 15, "column": 0 }, "end": { - "line": 13, + "line": 15, "column": 6 } } @@ -4135,15 +4783,15 @@ "postfix": false, "binop": null }, - "start": 707, - "end": 708, + "start": 822, + "end": 823, "loc": { "start": { - "line": 13, + "line": 15, "column": 7 }, "end": { - "line": 13, + "line": 15, "column": 8 } } @@ -4163,15 +4811,15 @@ "updateContext": null }, "value": "default", - "start": 708, - "end": 715, + "start": 823, + "end": 830, "loc": { "start": { - "line": 13, + "line": 15, "column": 8 }, "end": { - "line": 13, + "line": 15, "column": 15 } } @@ -4189,15 +4837,15 @@ "binop": null }, "value": "as", - "start": 716, - "end": 718, + "start": 831, + "end": 833, "loc": { "start": { - "line": 13, + "line": 15, "column": 16 }, "end": { - "line": 13, + "line": 15, "column": 18 } } @@ -4214,16 +4862,16 @@ "postfix": false, "binop": null }, - "value": "_randint", - "start": 719, - "end": 727, + "value": "_shuffle", + "start": 834, + "end": 842, "loc": { "start": { - "line": 13, + "line": 15, "column": 19 }, "end": { - "line": 13, + "line": 15, "column": 27 } } @@ -4240,15 +4888,15 @@ "postfix": false, "binop": null }, - "start": 727, - "end": 728, + "start": 842, + "end": 843, "loc": { "start": { - "line": 13, + "line": 15, "column": 27 }, "end": { - "line": 13, + "line": 15, "column": 28 } } @@ -4266,15 +4914,15 @@ "binop": null }, "value": "from", - "start": 729, - "end": 733, + "start": 844, + "end": 848, "loc": { "start": { - "line": 13, + "line": 15, "column": 29 }, "end": { - "line": 13, + "line": 15, "column": 33 } } @@ -4292,16 +4940,16 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_randint.js", - "start": 734, - "end": 756, + "value": "./kernel/_shuffle.js", + "start": 849, + "end": 871, "loc": { "start": { - "line": 13, + "line": 15, "column": 34 }, "end": { - "line": 13, + "line": 15, "column": 56 } } @@ -4319,15 +4967,15 @@ "binop": null, "updateContext": null }, - "start": 756, - "end": 757, + "start": 871, + "end": 872, "loc": { "start": { - "line": 13, + "line": 15, "column": 56 }, "end": { - "line": 13, + "line": 15, "column": 57 } } @@ -4347,15 +4995,15 @@ "updateContext": null }, "value": "export", - "start": 758, - "end": 764, + "start": 873, + "end": 879, "loc": { "start": { - "line": 14, + "line": 16, "column": 0 }, "end": { - "line": 14, + "line": 16, "column": 6 } } @@ -4372,15 +5020,15 @@ "postfix": false, "binop": null }, - "start": 765, - "end": 766, + "start": 880, + "end": 881, "loc": { "start": { - "line": 14, + "line": 16, "column": 7 }, "end": { - "line": 14, + "line": 16, "column": 8 } } @@ -4400,15 +5048,15 @@ "updateContext": null }, "value": "default", - "start": 766, - "end": 773, + "start": 881, + "end": 888, "loc": { "start": { - "line": 14, + "line": 16, "column": 8 }, "end": { - "line": 14, + "line": 16, "column": 15 } } @@ -4426,15 +5074,15 @@ "binop": null }, "value": "as", - "start": 774, - "end": 776, + "start": 889, + "end": 891, "loc": { "start": { - "line": 14, + "line": 16, "column": 16 }, "end": { - "line": 14, + "line": 16, "column": 18 } } @@ -4451,17 +5099,17 @@ "postfix": false, "binop": null }, - "value": "_shuffle", - "start": 777, - "end": 785, + "value": "_waterman", + "start": 892, + "end": 901, "loc": { "start": { - "line": 14, + "line": 16, "column": 19 }, "end": { - "line": 14, - "column": 27 + "line": 16, + "column": 28 } } }, @@ -4477,16 +5125,16 @@ "postfix": false, "binop": null }, - "start": 785, - "end": 786, + "start": 901, + "end": 902, "loc": { "start": { - "line": 14, - "column": 27 + "line": 16, + "column": 28 }, "end": { - "line": 14, - "column": 28 + "line": 16, + "column": 29 } } }, @@ -4503,16 +5151,16 @@ "binop": null }, "value": "from", - "start": 787, - "end": 791, + "start": 903, + "end": 907, "loc": { "start": { - "line": 14, - "column": 29 + "line": 16, + "column": 30 }, "end": { - "line": 14, - "column": 33 + "line": 16, + "column": 34 } } }, @@ -4529,17 +5177,17 @@ "binop": null, "updateContext": null }, - "value": "./kernel/_shuffle.js", - "start": 792, - "end": 814, + "value": "./kernel/_waterman.js", + "start": 908, + "end": 931, "loc": { "start": { - "line": 14, - "column": 34 + "line": 16, + "column": 35 }, "end": { - "line": 14, - "column": 56 + "line": 16, + "column": 58 } } }, @@ -4556,16 +5204,16 @@ "binop": null, "updateContext": null }, - "start": 814, - "end": 815, + "start": 931, + "end": 932, "loc": { "start": { - "line": 14, - "column": 56 + "line": 16, + "column": 58 }, "end": { - "line": 14, - "column": 57 + "line": 16, + "column": 59 } } }, @@ -4582,15 +5230,15 @@ "binop": null, "updateContext": null }, - "start": 816, - "end": 816, + "start": 933, + "end": 933, "loc": { "start": { - "line": 15, + "line": 17, "column": 0 }, "end": { - "line": 15, + "line": 17, "column": 0 } } diff --git a/ast/source/kernel/_waterman.js.json b/ast/source/kernel/_waterman.js.json new file mode 100644 index 0000000..1e3b459 --- /dev/null +++ b/ast/source/kernel/_waterman.js.json @@ -0,0 +1,7487 @@ +{ + "type": "File", + "start": 0, + "end": 2804, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 78, + "column": 0 + } + }, + "program": { + "type": "Program", + "start": 0, + "end": 2804, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 78, + "column": 0 + } + }, + "sourceType": "module", + "body": [ + { + "type": "Identifier", + "start": 226, + "end": 2776, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 75, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 232, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 232, + "end": 241, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 15 + }, + "identifierName": "_waterman" + }, + "name": "_waterman", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 244, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 245, + "end": 252, + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 26 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ], + "body": { + "type": "BlockStatement", + "start": 257, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2378, + "end": 2756, + "loc": { + "start": { + "line": 55, + "column": 1 + }, + "end": { + "line": 72, + "column": 3 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2384, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 2384, + "end": 2390, + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 13 + }, + "identifierName": "sample" + }, + "name": "sample", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 2393, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 16 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2394, + "end": 2395, + "loc": { + "start": { + "line": 55, + "column": 17 + }, + "end": { + "line": 55, + "column": 18 + }, + "identifierName": "k" + }, + "name": "k" + }, + { + "type": "Identifier", + "start": 2397, + "end": 2405, + "loc": { + "start": { + "line": 55, + "column": 20 + }, + "end": { + "line": 55, + "column": 28 + }, + "identifierName": "iterable" + }, + "name": "iterable" + }, + { + "type": "AssignmentPattern", + "start": 2407, + "end": 2428, + "loc": { + "start": { + "line": 55, + "column": 30 + }, + "end": { + "line": 55, + "column": 51 + } + }, + "left": { + "type": "Identifier", + "start": 2407, + "end": 2413, + "loc": { + "start": { + "line": 55, + "column": 30 + }, + "end": { + "line": 55, + "column": 36 + }, + "identifierName": "output" + }, + "name": "output" + }, + "right": { + "type": "NewExpression", + "start": 2416, + "end": 2428, + "loc": { + "start": { + "line": 55, + "column": 39 + }, + "end": { + "line": 55, + "column": 51 + } + }, + "callee": { + "type": "Identifier", + "start": 2420, + "end": 2425, + "loc": { + "start": { + "line": 55, + "column": 43 + }, + "end": { + "line": 55, + "column": 48 + }, + "identifierName": "Array" + }, + "name": "Array" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2426, + "end": 2427, + "loc": { + "start": { + "line": 55, + "column": 49 + }, + "end": { + "line": 55, + "column": 50 + }, + "identifierName": "k" + }, + "name": "k" + } + ] + } + } + ], + "body": { + "type": "BlockStatement", + "start": 2433, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 56 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2437, + "end": 2476, + "loc": { + "start": { + "line": 56, + "column": 2 + }, + "end": { + "line": 56, + "column": 41 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2443, + "end": 2475, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 40 + } + }, + "id": { + "type": "Identifier", + "start": 2443, + "end": 2445, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 10 + }, + "identifierName": "it" + }, + "name": "it" + }, + "init": { + "type": "CallExpression", + "start": 2448, + "end": 2475, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2448, + "end": 2473, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 2448, + "end": 2456, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 21 + }, + "identifierName": "iterable" + }, + "name": "iterable" + }, + "property": { + "type": "MemberExpression", + "start": 2457, + "end": 2472, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 37 + } + }, + "object": { + "type": "Identifier", + "start": 2457, + "end": 2463, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + }, + "identifierName": "Symbol" + }, + "name": "Symbol" + }, + "property": { + "type": "Identifier", + "start": 2464, + "end": 2472, + "loc": { + "start": { + "line": 56, + "column": 29 + }, + "end": { + "line": 56, + "column": 37 + }, + "identifierName": "iterator" + }, + "name": "iterator" + }, + "computed": false + }, + "computed": true + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2480, + "end": 2490, + "loc": { + "start": { + "line": 58, + "column": 2 + }, + "end": { + "line": 58, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2484, + "end": 2489, + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 11 + } + }, + "id": { + "type": "Identifier", + "start": 2484, + "end": 2485, + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 7 + }, + "identifierName": "n" + }, + "name": "n" + }, + "init": { + "type": "NumericLiteral", + "start": 2488, + "end": 2489, + "loc": { + "start": { + "line": 58, + "column": 10 + }, + "end": { + "line": 58, + "column": 11 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + ], + "kind": "let" + }, + { + "type": "ForStatement", + "start": 2494, + "end": 2604, + "loc": { + "start": { + "line": 60, + "column": 2 + }, + "end": { + "line": 64, + "column": 3 + } + }, + "init": null, + "test": { + "type": "BinaryExpression", + "start": 2501, + "end": 2506, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 60, + "column": 14 + } + }, + "left": { + "type": "Identifier", + "start": 2501, + "end": 2502, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 60, + "column": 10 + }, + "identifierName": "n" + }, + "name": "n" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 2505, + "end": 2506, + "loc": { + "start": { + "line": 60, + "column": 13 + }, + "end": { + "line": 60, + "column": 14 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "update": { + "type": "UpdateExpression", + "start": 2508, + "end": 2511, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 19 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2510, + "end": 2511, + "loc": { + "start": { + "line": 60, + "column": 18 + }, + "end": { + "line": 60, + "column": 19 + }, + "identifierName": "n" + }, + "name": "n" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 2513, + "end": 2604, + "loc": { + "start": { + "line": 60, + "column": 21 + }, + "end": { + "line": 64, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2518, + "end": 2550, + "loc": { + "start": { + "line": 61, + "column": 3 + }, + "end": { + "line": 61, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2524, + "end": 2549, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "id": { + "type": "ObjectPattern", + "start": 2524, + "end": 2537, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 22 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "value": { + "type": "Identifier", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "value": { + "type": "Identifier", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": { + "type": "CallExpression", + "start": 2540, + "end": 2549, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2540, + "end": 2547, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2540, + "end": 2542, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 27 + }, + "identifierName": "it" + }, + "name": "it" + }, + "property": { + "type": "Identifier", + "start": 2543, + "end": 2547, + "loc": { + "start": { + "line": 61, + "column": 28 + }, + "end": { + "line": 61, + "column": 32 + }, + "identifierName": "next" + }, + "name": "next" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2554, + "end": 2578, + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 62, + "column": 27 + } + }, + "test": { + "type": "Identifier", + "start": 2558, + "end": 2562, + "loc": { + "start": { + "line": 62, + "column": 7 + }, + "end": { + "line": 62, + "column": 11 + }, + "identifierName": "done" + }, + "name": "done" + }, + "consequent": { + "type": "ReturnStatement", + "start": 2564, + "end": 2578, + "loc": { + "start": { + "line": 62, + "column": 13 + }, + "end": { + "line": 62, + "column": 27 + } + }, + "argument": { + "type": "Identifier", + "start": 2571, + "end": 2577, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 26 + }, + "identifierName": "output" + }, + "name": "output" + } + }, + "alternate": null + }, + { + "type": "ExpressionStatement", + "start": 2582, + "end": 2600, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 21 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2582, + "end": 2599, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 20 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2582, + "end": 2591, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 12 + } + }, + "object": { + "type": "Identifier", + "start": 2582, + "end": 2588, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 9 + }, + "identifierName": "output" + }, + "name": "output" + }, + "property": { + "type": "Identifier", + "start": 2589, + "end": 2590, + "loc": { + "start": { + "line": 63, + "column": 10 + }, + "end": { + "line": 63, + "column": 11 + }, + "identifierName": "n" + }, + "name": "n" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 2594, + "end": 2599, + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 20 + }, + "identifierName": "value" + }, + "name": "value" + } + } + } + ], + "directives": [] + } + }, + { + "type": "ForStatement", + "start": 2608, + "end": 2752, + "loc": { + "start": { + "line": 66, + "column": 2 + }, + "end": { + "line": 71, + "column": 3 + } + }, + "init": null, + "test": null, + "update": { + "type": "UpdateExpression", + "start": 2617, + "end": 2620, + "loc": { + "start": { + "line": 66, + "column": 11 + }, + "end": { + "line": 66, + "column": 14 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2619, + "end": 2620, + "loc": { + "start": { + "line": 66, + "column": 13 + }, + "end": { + "line": 66, + "column": 14 + }, + "identifierName": "n" + }, + "name": "n" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 2622, + "end": 2752, + "loc": { + "start": { + "line": 66, + "column": 16 + }, + "end": { + "line": 71, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2627, + "end": 2659, + "loc": { + "start": { + "line": 67, + "column": 3 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2633, + "end": 2658, + "loc": { + "start": { + "line": 67, + "column": 9 + }, + "end": { + "line": 67, + "column": 34 + } + }, + "id": { + "type": "ObjectPattern", + "start": 2633, + "end": 2646, + "loc": { + "start": { + "line": 67, + "column": 9 + }, + "end": { + "line": 67, + "column": 22 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "value": { + "type": "Identifier", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "value": { + "type": "Identifier", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": { + "type": "CallExpression", + "start": 2649, + "end": 2658, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2649, + "end": 2656, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2649, + "end": 2651, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 27 + }, + "identifierName": "it" + }, + "name": "it" + }, + "property": { + "type": "Identifier", + "start": 2652, + "end": 2656, + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 32 + }, + "identifierName": "next" + }, + "name": "next" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2663, + "end": 2687, + "loc": { + "start": { + "line": 68, + "column": 3 + }, + "end": { + "line": 68, + "column": 27 + } + }, + "test": { + "type": "Identifier", + "start": 2667, + "end": 2671, + "loc": { + "start": { + "line": 68, + "column": 7 + }, + "end": { + "line": 68, + "column": 11 + }, + "identifierName": "done" + }, + "name": "done" + }, + "consequent": { + "type": "ReturnStatement", + "start": 2673, + "end": 2687, + "loc": { + "start": { + "line": 68, + "column": 13 + }, + "end": { + "line": 68, + "column": 27 + } + }, + "argument": { + "type": "Identifier", + "start": 2680, + "end": 2686, + "loc": { + "start": { + "line": 68, + "column": 20 + }, + "end": { + "line": 68, + "column": 26 + }, + "identifierName": "output" + }, + "name": "output" + } + }, + "alternate": null + }, + { + "type": "VariableDeclaration", + "start": 2691, + "end": 2715, + "loc": { + "start": { + "line": 69, + "column": 3 + }, + "end": { + "line": 69, + "column": 27 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2697, + "end": 2714, + "loc": { + "start": { + "line": 69, + "column": 9 + }, + "end": { + "line": 69, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 2697, + "end": 2698, + "loc": { + "start": { + "line": 69, + "column": 9 + }, + "end": { + "line": 69, + "column": 10 + }, + "identifierName": "i" + }, + "name": "i" + }, + "init": { + "type": "CallExpression", + "start": 2701, + "end": 2714, + "loc": { + "start": { + "line": 69, + "column": 13 + }, + "end": { + "line": 69, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 2701, + "end": 2708, + "loc": { + "start": { + "line": 69, + "column": 13 + }, + "end": { + "line": 69, + "column": 20 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 2709, + "end": 2710, + "loc": { + "start": { + "line": 69, + "column": 21 + }, + "end": { + "line": 69, + "column": 22 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "Identifier", + "start": 2712, + "end": 2713, + "loc": { + "start": { + "line": 69, + "column": 24 + }, + "end": { + "line": 69, + "column": 25 + }, + "identifierName": "n" + }, + "name": "n" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2719, + "end": 2748, + "loc": { + "start": { + "line": 70, + "column": 3 + }, + "end": { + "line": 70, + "column": 32 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2723, + "end": 2728, + "loc": { + "start": { + "line": 70, + "column": 7 + }, + "end": { + "line": 70, + "column": 12 + } + }, + "left": { + "type": "Identifier", + "start": 2723, + "end": 2724, + "loc": { + "start": { + "line": 70, + "column": 7 + }, + "end": { + "line": 70, + "column": 8 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 2727, + "end": 2728, + "loc": { + "start": { + "line": 70, + "column": 11 + }, + "end": { + "line": 70, + "column": 12 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "consequent": { + "type": "ExpressionStatement", + "start": 2730, + "end": 2748, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 32 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2730, + "end": 2747, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2730, + "end": 2739, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 2730, + "end": 2736, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 20 + }, + "identifierName": "output" + }, + "name": "output" + }, + "property": { + "type": "Identifier", + "start": 2737, + "end": 2738, + "loc": { + "start": { + "line": 70, + "column": 21 + }, + "end": { + "line": 70, + "column": 22 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 2742, + "end": 2747, + "loc": { + "start": { + "line": 70, + "column": 26 + }, + "end": { + "line": 70, + "column": 31 + }, + "identifierName": "value" + }, + "name": "value" + } + } + }, + "alternate": null + } + ], + "directives": [] + } + } + ], + "directives": [] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n\t * Samples k items uniformly at random from an iterable of unknown size.\n\t *\n\t * We want each item to have probability k/n of being selected.\n\t *\n\t * The algorithm works as follows:\n\t * 1. We initialize a candidate sample with the first k items.\n\t * 2. For each remaining item i, decide whether to insert it in the\n\t * candidate sample with probability k/i, evicting an item from the\n\t * candidate sample at random, or to discard it immediately (with\n\t * probability 1-k/i),\n\t *\n\t * To prove that the obtained probability of inclusion for each item is correct\n\t * we multiply two probabilities:\n\t * 1. The probability of entering the candidate sample.\n\t * 2. The probability of staying in the candidate sample until the end.\n\t *\n\t * For items 1 to k, probability 1. is 1, and probability 2. is\n\t * (1-1/(k+1))(1-1/(k+2))...(1-1/n)\n\t * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.\n\t *\n\t * For items i = k+1 to n, where probability 1. is k/i, and probability 2.\n\t * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)\n\t * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.\n\t *\n\t * NOTE: Could also implement so that it yields after each input item.\n\t * NOTE: One can reduce the expected number of random bits needed by\n\t * avoiding generating any number above k-1:\n\t * - First we branch on whether i < k.\n\t * - Then we generate the random number between 0 and k-1 only if needed.\n\t *\n\t * To decide on the branch, flip a biased coin with parameter p = k/n.\n\t * To do so, flip a fair coin until it differs from the binary\n\t * representation of k/n (0.10110101...).\n\t * The computation can be made efficient by realizing several things:\n\t * - k is fixed and smaller than n (so divmod step can be skipped)\n\t * - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)\n\t *\n\t * This would reduce the number of necessary random bits from O(n log n) to\n\t * expected O(n).\n\t *\n\t * @param {number} k The size of the sample.\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=new Array(k)] The output array.\n\t * @return {Array} The output array.\n\t ", + "start": 260, + "end": 2376, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 54, + "column": 4 + } + } + } + ] + }, + { + "type": "ReturnStatement", + "start": 2759, + "end": 2773, + "loc": { + "start": { + "line": 74, + "column": 1 + }, + "end": { + "line": 74, + "column": 15 + } + }, + "argument": { + "type": "Identifier", + "start": 2766, + "end": 2772, + "loc": { + "start": { + "line": 74, + "column": 8 + }, + "end": { + "line": 74, + "column": 14 + }, + "identifierName": "sample" + }, + "name": "sample" + } + } + ], + "directives": [] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [], + "name": "_", + "trailingComments": [] + }, + { + "type": "Identifier", + "start": 2778, + "end": 2803, + "loc": { + "start": { + "line": 77, + "column": 0 + }, + "end": { + "line": 77, + "column": 25 + } + }, + "declaration": { + "type": "Identifier", + "start": 2793, + "end": 2802, + "loc": { + "start": { + "line": 77, + "column": 15 + }, + "end": { + "line": 77, + "column": 24 + }, + "identifierName": "_waterman" + }, + "name": "_waterman" + }, + "name": "_", + "leadingComments": [], + "trailingComments": [] + }, + { + "type": "ExportDefaultDeclaration", + "start": 2778, + "end": 2803, + "loc": { + "start": { + "line": 77, + "column": 0 + }, + "end": { + "line": 77, + "column": 25 + } + }, + "declaration": { + "type": "VariableDeclaration", + "start": 226, + "end": 2776, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 75, + "column": 2 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 232, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 232, + "end": 241, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 15 + }, + "identifierName": "_waterman" + }, + "name": "_waterman", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 244, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "id": { + "type": "Identifier", + "start": 232, + "end": 241, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 15 + }, + "identifierName": "_waterman" + }, + "name": "_waterman", + "leadingComments": null + }, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 245, + "end": 252, + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 26 + }, + "identifierName": "randint" + }, + "name": "randint" + } + ], + "body": { + "type": "BlockStatement", + "start": 257, + "end": 2775, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 75, + "column": 1 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2378, + "end": 2756, + "loc": { + "start": { + "line": 55, + "column": 1 + }, + "end": { + "line": 72, + "column": 3 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2384, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "id": { + "type": "Identifier", + "start": 2384, + "end": 2390, + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 13 + }, + "identifierName": "sample" + }, + "name": "sample", + "leadingComments": null + }, + "init": { + "type": "ArrowFunctionExpression", + "start": 2393, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 16 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "id": null, + "generator": false, + "expression": false, + "async": false, + "params": [ + { + "type": "Identifier", + "start": 2394, + "end": 2395, + "loc": { + "start": { + "line": 55, + "column": 17 + }, + "end": { + "line": 55, + "column": 18 + }, + "identifierName": "k" + }, + "name": "k" + }, + { + "type": "Identifier", + "start": 2397, + "end": 2405, + "loc": { + "start": { + "line": 55, + "column": 20 + }, + "end": { + "line": 55, + "column": 28 + }, + "identifierName": "iterable" + }, + "name": "iterable" + }, + { + "type": "AssignmentPattern", + "start": 2407, + "end": 2428, + "loc": { + "start": { + "line": 55, + "column": 30 + }, + "end": { + "line": 55, + "column": 51 + } + }, + "left": { + "type": "Identifier", + "start": 2407, + "end": 2413, + "loc": { + "start": { + "line": 55, + "column": 30 + }, + "end": { + "line": 55, + "column": 36 + }, + "identifierName": "output" + }, + "name": "output" + }, + "right": { + "type": "NewExpression", + "start": 2416, + "end": 2428, + "loc": { + "start": { + "line": 55, + "column": 39 + }, + "end": { + "line": 55, + "column": 51 + } + }, + "callee": { + "type": "Identifier", + "start": 2420, + "end": 2425, + "loc": { + "start": { + "line": 55, + "column": 43 + }, + "end": { + "line": 55, + "column": 48 + }, + "identifierName": "Array" + }, + "name": "Array" + }, + "arguments": [ + { + "type": "Identifier", + "start": 2426, + "end": 2427, + "loc": { + "start": { + "line": 55, + "column": 49 + }, + "end": { + "line": 55, + "column": 50 + }, + "identifierName": "k" + }, + "name": "k" + } + ] + } + } + ], + "body": { + "type": "BlockStatement", + "start": 2433, + "end": 2755, + "loc": { + "start": { + "line": 55, + "column": 56 + }, + "end": { + "line": 72, + "column": 2 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2437, + "end": 2476, + "loc": { + "start": { + "line": 56, + "column": 2 + }, + "end": { + "line": 56, + "column": 41 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2443, + "end": 2475, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 40 + } + }, + "id": { + "type": "Identifier", + "start": 2443, + "end": 2445, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 10 + }, + "identifierName": "it" + }, + "name": "it" + }, + "init": { + "type": "CallExpression", + "start": 2448, + "end": 2475, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 40 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2448, + "end": 2473, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 38 + } + }, + "object": { + "type": "Identifier", + "start": 2448, + "end": 2456, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 21 + }, + "identifierName": "iterable" + }, + "name": "iterable" + }, + "property": { + "type": "MemberExpression", + "start": 2457, + "end": 2472, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 37 + } + }, + "object": { + "type": "Identifier", + "start": 2457, + "end": 2463, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + }, + "identifierName": "Symbol" + }, + "name": "Symbol" + }, + "property": { + "type": "Identifier", + "start": 2464, + "end": 2472, + "loc": { + "start": { + "line": 56, + "column": 29 + }, + "end": { + "line": 56, + "column": 37 + }, + "identifierName": "iterator" + }, + "name": "iterator" + }, + "computed": false + }, + "computed": true + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "VariableDeclaration", + "start": 2480, + "end": 2490, + "loc": { + "start": { + "line": 58, + "column": 2 + }, + "end": { + "line": 58, + "column": 12 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2484, + "end": 2489, + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 11 + } + }, + "id": { + "type": "Identifier", + "start": 2484, + "end": 2485, + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 7 + }, + "identifierName": "n" + }, + "name": "n" + }, + "init": { + "type": "NumericLiteral", + "start": 2488, + "end": 2489, + "loc": { + "start": { + "line": 58, + "column": 10 + }, + "end": { + "line": 58, + "column": 11 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + } + } + ], + "kind": "let" + }, + { + "type": "ForStatement", + "start": 2494, + "end": 2604, + "loc": { + "start": { + "line": 60, + "column": 2 + }, + "end": { + "line": 64, + "column": 3 + } + }, + "init": null, + "test": { + "type": "BinaryExpression", + "start": 2501, + "end": 2506, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 60, + "column": 14 + } + }, + "left": { + "type": "Identifier", + "start": 2501, + "end": 2502, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 60, + "column": 10 + }, + "identifierName": "n" + }, + "name": "n" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 2505, + "end": 2506, + "loc": { + "start": { + "line": 60, + "column": 13 + }, + "end": { + "line": 60, + "column": 14 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "update": { + "type": "UpdateExpression", + "start": 2508, + "end": 2511, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 19 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2510, + "end": 2511, + "loc": { + "start": { + "line": 60, + "column": 18 + }, + "end": { + "line": 60, + "column": 19 + }, + "identifierName": "n" + }, + "name": "n" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 2513, + "end": 2604, + "loc": { + "start": { + "line": 60, + "column": 21 + }, + "end": { + "line": 64, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2518, + "end": 2550, + "loc": { + "start": { + "line": 61, + "column": 3 + }, + "end": { + "line": 61, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2524, + "end": 2549, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "id": { + "type": "ObjectPattern", + "start": 2524, + "end": 2537, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 22 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "value": { + "type": "Identifier", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "value": { + "type": "Identifier", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": { + "type": "CallExpression", + "start": 2540, + "end": 2549, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2540, + "end": 2547, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2540, + "end": 2542, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 27 + }, + "identifierName": "it" + }, + "name": "it" + }, + "property": { + "type": "Identifier", + "start": 2543, + "end": 2547, + "loc": { + "start": { + "line": 61, + "column": 28 + }, + "end": { + "line": 61, + "column": 32 + }, + "identifierName": "next" + }, + "name": "next" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2554, + "end": 2578, + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 62, + "column": 27 + } + }, + "test": { + "type": "Identifier", + "start": 2558, + "end": 2562, + "loc": { + "start": { + "line": 62, + "column": 7 + }, + "end": { + "line": 62, + "column": 11 + }, + "identifierName": "done" + }, + "name": "done" + }, + "consequent": { + "type": "ReturnStatement", + "start": 2564, + "end": 2578, + "loc": { + "start": { + "line": 62, + "column": 13 + }, + "end": { + "line": 62, + "column": 27 + } + }, + "argument": { + "type": "Identifier", + "start": 2571, + "end": 2577, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 26 + }, + "identifierName": "output" + }, + "name": "output" + } + }, + "alternate": null + }, + { + "type": "ExpressionStatement", + "start": 2582, + "end": 2600, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 21 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2582, + "end": 2599, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 20 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2582, + "end": 2591, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 12 + } + }, + "object": { + "type": "Identifier", + "start": 2582, + "end": 2588, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 9 + }, + "identifierName": "output" + }, + "name": "output" + }, + "property": { + "type": "Identifier", + "start": 2589, + "end": 2590, + "loc": { + "start": { + "line": 63, + "column": 10 + }, + "end": { + "line": 63, + "column": 11 + }, + "identifierName": "n" + }, + "name": "n" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 2594, + "end": 2599, + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 20 + }, + "identifierName": "value" + }, + "name": "value" + } + } + } + ], + "directives": [] + } + }, + { + "type": "ForStatement", + "start": 2608, + "end": 2752, + "loc": { + "start": { + "line": 66, + "column": 2 + }, + "end": { + "line": 71, + "column": 3 + } + }, + "init": null, + "test": null, + "update": { + "type": "UpdateExpression", + "start": 2617, + "end": 2620, + "loc": { + "start": { + "line": 66, + "column": 11 + }, + "end": { + "line": 66, + "column": 14 + } + }, + "operator": "++", + "prefix": true, + "argument": { + "type": "Identifier", + "start": 2619, + "end": 2620, + "loc": { + "start": { + "line": 66, + "column": 13 + }, + "end": { + "line": 66, + "column": 14 + }, + "identifierName": "n" + }, + "name": "n" + }, + "extra": { + "parenthesizedArgument": false + } + }, + "body": { + "type": "BlockStatement", + "start": 2622, + "end": 2752, + "loc": { + "start": { + "line": 66, + "column": 16 + }, + "end": { + "line": 71, + "column": 3 + } + }, + "body": [ + { + "type": "VariableDeclaration", + "start": 2627, + "end": 2659, + "loc": { + "start": { + "line": 67, + "column": 3 + }, + "end": { + "line": 67, + "column": 35 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2633, + "end": 2658, + "loc": { + "start": { + "line": 67, + "column": 9 + }, + "end": { + "line": 67, + "column": 34 + } + }, + "id": { + "type": "ObjectPattern", + "start": 2633, + "end": 2646, + "loc": { + "start": { + "line": 67, + "column": 9 + }, + "end": { + "line": 67, + "column": 22 + } + }, + "properties": [ + { + "type": "ObjectProperty", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "value": { + "type": "Identifier", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + }, + "identifierName": "value" + }, + "name": "value" + }, + "extra": { + "shorthand": true + } + }, + { + "type": "ObjectProperty", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + } + }, + "method": false, + "shorthand": true, + "computed": false, + "key": { + "type": "Identifier", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "value": { + "type": "Identifier", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + }, + "identifierName": "done" + }, + "name": "done" + }, + "extra": { + "shorthand": true + } + } + ] + }, + "init": { + "type": "CallExpression", + "start": 2649, + "end": 2658, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 34 + } + }, + "callee": { + "type": "MemberExpression", + "start": 2649, + "end": 2656, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 32 + } + }, + "object": { + "type": "Identifier", + "start": 2649, + "end": 2651, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 27 + }, + "identifierName": "it" + }, + "name": "it" + }, + "property": { + "type": "Identifier", + "start": 2652, + "end": 2656, + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 32 + }, + "identifierName": "next" + }, + "name": "next" + }, + "computed": false + }, + "arguments": [] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2663, + "end": 2687, + "loc": { + "start": { + "line": 68, + "column": 3 + }, + "end": { + "line": 68, + "column": 27 + } + }, + "test": { + "type": "Identifier", + "start": 2667, + "end": 2671, + "loc": { + "start": { + "line": 68, + "column": 7 + }, + "end": { + "line": 68, + "column": 11 + }, + "identifierName": "done" + }, + "name": "done" + }, + "consequent": { + "type": "ReturnStatement", + "start": 2673, + "end": 2687, + "loc": { + "start": { + "line": 68, + "column": 13 + }, + "end": { + "line": 68, + "column": 27 + } + }, + "argument": { + "type": "Identifier", + "start": 2680, + "end": 2686, + "loc": { + "start": { + "line": 68, + "column": 20 + }, + "end": { + "line": 68, + "column": 26 + }, + "identifierName": "output" + }, + "name": "output" + } + }, + "alternate": null + }, + { + "type": "VariableDeclaration", + "start": 2691, + "end": 2715, + "loc": { + "start": { + "line": 69, + "column": 3 + }, + "end": { + "line": 69, + "column": 27 + } + }, + "declarations": [ + { + "type": "VariableDeclarator", + "start": 2697, + "end": 2714, + "loc": { + "start": { + "line": 69, + "column": 9 + }, + "end": { + "line": 69, + "column": 26 + } + }, + "id": { + "type": "Identifier", + "start": 2697, + "end": 2698, + "loc": { + "start": { + "line": 69, + "column": 9 + }, + "end": { + "line": 69, + "column": 10 + }, + "identifierName": "i" + }, + "name": "i" + }, + "init": { + "type": "CallExpression", + "start": 2701, + "end": 2714, + "loc": { + "start": { + "line": 69, + "column": 13 + }, + "end": { + "line": 69, + "column": 26 + } + }, + "callee": { + "type": "Identifier", + "start": 2701, + "end": 2708, + "loc": { + "start": { + "line": 69, + "column": 13 + }, + "end": { + "line": 69, + "column": 20 + }, + "identifierName": "randint" + }, + "name": "randint" + }, + "arguments": [ + { + "type": "NumericLiteral", + "start": 2709, + "end": 2710, + "loc": { + "start": { + "line": 69, + "column": 21 + }, + "end": { + "line": 69, + "column": 22 + } + }, + "extra": { + "rawValue": 0, + "raw": "0" + }, + "value": 0 + }, + { + "type": "Identifier", + "start": 2712, + "end": 2713, + "loc": { + "start": { + "line": 69, + "column": 24 + }, + "end": { + "line": 69, + "column": 25 + }, + "identifierName": "n" + }, + "name": "n" + } + ] + } + } + ], + "kind": "const" + }, + { + "type": "IfStatement", + "start": 2719, + "end": 2748, + "loc": { + "start": { + "line": 70, + "column": 3 + }, + "end": { + "line": 70, + "column": 32 + } + }, + "test": { + "type": "BinaryExpression", + "start": 2723, + "end": 2728, + "loc": { + "start": { + "line": 70, + "column": 7 + }, + "end": { + "line": 70, + "column": 12 + } + }, + "left": { + "type": "Identifier", + "start": 2723, + "end": 2724, + "loc": { + "start": { + "line": 70, + "column": 7 + }, + "end": { + "line": 70, + "column": 8 + }, + "identifierName": "i" + }, + "name": "i" + }, + "operator": "<", + "right": { + "type": "Identifier", + "start": 2727, + "end": 2728, + "loc": { + "start": { + "line": 70, + "column": 11 + }, + "end": { + "line": 70, + "column": 12 + }, + "identifierName": "k" + }, + "name": "k" + } + }, + "consequent": { + "type": "ExpressionStatement", + "start": 2730, + "end": 2748, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 32 + } + }, + "expression": { + "type": "AssignmentExpression", + "start": 2730, + "end": 2747, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 31 + } + }, + "operator": "=", + "left": { + "type": "MemberExpression", + "start": 2730, + "end": 2739, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 23 + } + }, + "object": { + "type": "Identifier", + "start": 2730, + "end": 2736, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 20 + }, + "identifierName": "output" + }, + "name": "output" + }, + "property": { + "type": "Identifier", + "start": 2737, + "end": 2738, + "loc": { + "start": { + "line": 70, + "column": 21 + }, + "end": { + "line": 70, + "column": 22 + }, + "identifierName": "i" + }, + "name": "i" + }, + "computed": true + }, + "right": { + "type": "Identifier", + "start": 2742, + "end": 2747, + "loc": { + "start": { + "line": 70, + "column": 26 + }, + "end": { + "line": 70, + "column": 31 + }, + "identifierName": "value" + }, + "name": "value" + } + } + }, + "alternate": null + } + ], + "directives": [] + } + } + ], + "directives": [] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n\t * Samples k items uniformly at random from an iterable of unknown size.\n\t *\n\t * We want each item to have probability k/n of being selected.\n\t *\n\t * The algorithm works as follows:\n\t * 1. We initialize a candidate sample with the first k items.\n\t * 2. For each remaining item i, decide whether to insert it in the\n\t * candidate sample with probability k/i, evicting an item from the\n\t * candidate sample at random, or to discard it immediately (with\n\t * probability 1-k/i),\n\t *\n\t * To prove that the obtained probability of inclusion for each item is correct\n\t * we multiply two probabilities:\n\t * 1. The probability of entering the candidate sample.\n\t * 2. The probability of staying in the candidate sample until the end.\n\t *\n\t * For items 1 to k, probability 1. is 1, and probability 2. is\n\t * (1-1/(k+1))(1-1/(k+2))...(1-1/n)\n\t * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.\n\t *\n\t * For items i = k+1 to n, where probability 1. is k/i, and probability 2.\n\t * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)\n\t * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.\n\t *\n\t * NOTE: Could also implement so that it yields after each input item.\n\t * NOTE: One can reduce the expected number of random bits needed by\n\t * avoiding generating any number above k-1:\n\t * - First we branch on whether i < k.\n\t * - Then we generate the random number between 0 and k-1 only if needed.\n\t *\n\t * To decide on the branch, flip a biased coin with parameter p = k/n.\n\t * To do so, flip a fair coin until it differs from the binary\n\t * representation of k/n (0.10110101...).\n\t * The computation can be made efficient by realizing several things:\n\t * - k is fixed and smaller than n (so divmod step can be skipped)\n\t * - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)\n\t *\n\t * This would reduce the number of necessary random bits from O(n log n) to\n\t * expected O(n).\n\t *\n\t * @param {number} k The size of the sample.\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=new Array(k)] The output array.\n\t * @return {Array} The output array.\n\t ", + "start": 260, + "end": 2376, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 54, + "column": 4 + } + } + } + ] + }, + { + "type": "ReturnStatement", + "start": 2759, + "end": 2773, + "loc": { + "start": { + "line": 74, + "column": 1 + }, + "end": { + "line": 74, + "column": 15 + } + }, + "argument": { + "type": "Identifier", + "start": 2766, + "end": 2772, + "loc": { + "start": { + "line": 74, + "column": 8 + }, + "end": { + "line": 74, + "column": 14 + }, + "identifierName": "sample" + }, + "name": "sample" + } + } + ], + "directives": [] + } + }, + "leadingComments": null + } + ], + "kind": "const", + "leadingComments": [ + { + "type": "CommentBlock", + "value": "*\n * Construct a sampling function using Algorithm R due to Alan Waterman (both\n * name and attribution are due to Knuth).\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sample function.\n ", + "start": 0, + "end": 225, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + } + ], + "trailingComments": [] + } + } + ], + "directives": [] + }, + "comments": [ + { + "type": "CommentBlock", + "value": "*\n * Construct a sampling function using Algorithm R due to Alan Waterman (both\n * name and attribution are due to Knuth).\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sample function.\n ", + "start": 0, + "end": 225, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n\t * Samples k items uniformly at random from an iterable of unknown size.\n\t *\n\t * We want each item to have probability k/n of being selected.\n\t *\n\t * The algorithm works as follows:\n\t * 1. We initialize a candidate sample with the first k items.\n\t * 2. For each remaining item i, decide whether to insert it in the\n\t * candidate sample with probability k/i, evicting an item from the\n\t * candidate sample at random, or to discard it immediately (with\n\t * probability 1-k/i),\n\t *\n\t * To prove that the obtained probability of inclusion for each item is correct\n\t * we multiply two probabilities:\n\t * 1. The probability of entering the candidate sample.\n\t * 2. The probability of staying in the candidate sample until the end.\n\t *\n\t * For items 1 to k, probability 1. is 1, and probability 2. is\n\t * (1-1/(k+1))(1-1/(k+2))...(1-1/n)\n\t * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.\n\t *\n\t * For items i = k+1 to n, where probability 1. is k/i, and probability 2.\n\t * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)\n\t * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.\n\t *\n\t * NOTE: Could also implement so that it yields after each input item.\n\t * NOTE: One can reduce the expected number of random bits needed by\n\t * avoiding generating any number above k-1:\n\t * - First we branch on whether i < k.\n\t * - Then we generate the random number between 0 and k-1 only if needed.\n\t *\n\t * To decide on the branch, flip a biased coin with parameter p = k/n.\n\t * To do so, flip a fair coin until it differs from the binary\n\t * representation of k/n (0.10110101...).\n\t * The computation can be made efficient by realizing several things:\n\t * - k is fixed and smaller than n (so divmod step can be skipped)\n\t * - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)\n\t *\n\t * This would reduce the number of necessary random bits from O(n log n) to\n\t * expected O(n).\n\t *\n\t * @param {number} k The size of the sample.\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=new Array(k)] The output array.\n\t * @return {Array} The output array.\n\t ", + "start": 260, + "end": 2376, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 54, + "column": 4 + } + } + } + ], + "tokens": [ + { + "type": "CommentBlock", + "value": "*\n * Construct a sampling function using Algorithm R due to Alan Waterman (both\n * name and attribution are due to Knuth).\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sample function.\n ", + "start": 0, + "end": 225, + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 7, + "column": 3 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 226, + "end": 231, + "loc": { + "start": { + "line": 8, + "column": 0 + }, + "end": { + "line": 8, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_waterman", + "start": 232, + "end": 241, + "loc": { + "start": { + "line": 8, + "column": 6 + }, + "end": { + "line": 8, + "column": 15 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 242, + "end": 243, + "loc": { + "start": { + "line": 8, + "column": 16 + }, + "end": { + "line": 8, + "column": 17 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 244, + "end": 245, + "loc": { + "start": { + "line": 8, + "column": 18 + }, + "end": { + "line": 8, + "column": 19 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 245, + "end": 252, + "loc": { + "start": { + "line": 8, + "column": 19 + }, + "end": { + "line": 8, + "column": 26 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 252, + "end": 253, + "loc": { + "start": { + "line": 8, + "column": 26 + }, + "end": { + "line": 8, + "column": 27 + } + } + }, + { + "type": { + "label": "=>", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 254, + "end": 256, + "loc": { + "start": { + "line": 8, + "column": 28 + }, + "end": { + "line": 8, + "column": 30 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 257, + "end": 258, + "loc": { + "start": { + "line": 8, + "column": 31 + }, + "end": { + "line": 8, + "column": 32 + } + } + }, + { + "type": "CommentBlock", + "value": "*\n\t * Samples k items uniformly at random from an iterable of unknown size.\n\t *\n\t * We want each item to have probability k/n of being selected.\n\t *\n\t * The algorithm works as follows:\n\t * 1. We initialize a candidate sample with the first k items.\n\t * 2. For each remaining item i, decide whether to insert it in the\n\t * candidate sample with probability k/i, evicting an item from the\n\t * candidate sample at random, or to discard it immediately (with\n\t * probability 1-k/i),\n\t *\n\t * To prove that the obtained probability of inclusion for each item is correct\n\t * we multiply two probabilities:\n\t * 1. The probability of entering the candidate sample.\n\t * 2. The probability of staying in the candidate sample until the end.\n\t *\n\t * For items 1 to k, probability 1. is 1, and probability 2. is\n\t * (1-1/(k+1))(1-1/(k+2))...(1-1/n)\n\t * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.\n\t *\n\t * For items i = k+1 to n, where probability 1. is k/i, and probability 2.\n\t * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)\n\t * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.\n\t *\n\t * NOTE: Could also implement so that it yields after each input item.\n\t * NOTE: One can reduce the expected number of random bits needed by\n\t * avoiding generating any number above k-1:\n\t * - First we branch on whether i < k.\n\t * - Then we generate the random number between 0 and k-1 only if needed.\n\t *\n\t * To decide on the branch, flip a biased coin with parameter p = k/n.\n\t * To do so, flip a fair coin until it differs from the binary\n\t * representation of k/n (0.10110101...).\n\t * The computation can be made efficient by realizing several things:\n\t * - k is fixed and smaller than n (so divmod step can be skipped)\n\t * - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)\n\t *\n\t * This would reduce the number of necessary random bits from O(n log n) to\n\t * expected O(n).\n\t *\n\t * @param {number} k The size of the sample.\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=new Array(k)] The output array.\n\t * @return {Array} The output array.\n\t ", + "start": 260, + "end": 2376, + "loc": { + "start": { + "line": 9, + "column": 1 + }, + "end": { + "line": 54, + "column": 4 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 2378, + "end": 2383, + "loc": { + "start": { + "line": 55, + "column": 1 + }, + "end": { + "line": 55, + "column": 6 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 2384, + "end": 2390, + "loc": { + "start": { + "line": 55, + "column": 7 + }, + "end": { + "line": 55, + "column": 13 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2391, + "end": 2392, + "loc": { + "start": { + "line": 55, + "column": 14 + }, + "end": { + "line": 55, + "column": 15 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2393, + "end": 2394, + "loc": { + "start": { + "line": 55, + "column": 16 + }, + "end": { + "line": 55, + "column": 17 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 2394, + "end": 2395, + "loc": { + "start": { + "line": 55, + "column": 17 + }, + "end": { + "line": 55, + "column": 18 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2395, + "end": 2396, + "loc": { + "start": { + "line": 55, + "column": 18 + }, + "end": { + "line": 55, + "column": 19 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "iterable", + "start": 2397, + "end": 2405, + "loc": { + "start": { + "line": 55, + "column": 20 + }, + "end": { + "line": 55, + "column": 28 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2405, + "end": 2406, + "loc": { + "start": { + "line": 55, + "column": 28 + }, + "end": { + "line": 55, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "output", + "start": 2407, + "end": 2413, + "loc": { + "start": { + "line": 55, + "column": 30 + }, + "end": { + "line": 55, + "column": 36 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2414, + "end": 2415, + "loc": { + "start": { + "line": 55, + "column": 37 + }, + "end": { + "line": 55, + "column": 38 + } + } + }, + { + "type": { + "label": "new", + "keyword": "new", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "new", + "start": 2416, + "end": 2419, + "loc": { + "start": { + "line": 55, + "column": 39 + }, + "end": { + "line": 55, + "column": 42 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Array", + "start": 2420, + "end": 2425, + "loc": { + "start": { + "line": 55, + "column": 43 + }, + "end": { + "line": 55, + "column": 48 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2425, + "end": 2426, + "loc": { + "start": { + "line": 55, + "column": 48 + }, + "end": { + "line": 55, + "column": 49 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 2426, + "end": 2427, + "loc": { + "start": { + "line": 55, + "column": 49 + }, + "end": { + "line": 55, + "column": 50 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2427, + "end": 2428, + "loc": { + "start": { + "line": 55, + "column": 50 + }, + "end": { + "line": 55, + "column": 51 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2428, + "end": 2429, + "loc": { + "start": { + "line": 55, + "column": 51 + }, + "end": { + "line": 55, + "column": 52 + } + } + }, + { + "type": { + "label": "=>", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2430, + "end": 2432, + "loc": { + "start": { + "line": 55, + "column": 53 + }, + "end": { + "line": 55, + "column": 55 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2433, + "end": 2434, + "loc": { + "start": { + "line": 55, + "column": 56 + }, + "end": { + "line": 55, + "column": 57 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 2437, + "end": 2442, + "loc": { + "start": { + "line": 56, + "column": 2 + }, + "end": { + "line": 56, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "it", + "start": 2443, + "end": 2445, + "loc": { + "start": { + "line": 56, + "column": 8 + }, + "end": { + "line": 56, + "column": 10 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2446, + "end": 2447, + "loc": { + "start": { + "line": 56, + "column": 11 + }, + "end": { + "line": 56, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "iterable", + "start": 2448, + "end": 2456, + "loc": { + "start": { + "line": 56, + "column": 13 + }, + "end": { + "line": 56, + "column": 21 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2456, + "end": 2457, + "loc": { + "start": { + "line": 56, + "column": 21 + }, + "end": { + "line": 56, + "column": 22 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "Symbol", + "start": 2457, + "end": 2463, + "loc": { + "start": { + "line": 56, + "column": 22 + }, + "end": { + "line": 56, + "column": 28 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2463, + "end": 2464, + "loc": { + "start": { + "line": 56, + "column": 28 + }, + "end": { + "line": 56, + "column": 29 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "iterator", + "start": 2464, + "end": 2472, + "loc": { + "start": { + "line": 56, + "column": 29 + }, + "end": { + "line": 56, + "column": 37 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2472, + "end": 2473, + "loc": { + "start": { + "line": 56, + "column": 37 + }, + "end": { + "line": 56, + "column": 38 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2473, + "end": 2474, + "loc": { + "start": { + "line": 56, + "column": 38 + }, + "end": { + "line": 56, + "column": 39 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2474, + "end": 2475, + "loc": { + "start": { + "line": 56, + "column": 39 + }, + "end": { + "line": 56, + "column": 40 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2475, + "end": 2476, + "loc": { + "start": { + "line": 56, + "column": 40 + }, + "end": { + "line": 56, + "column": 41 + } + } + }, + { + "type": { + "label": "let", + "keyword": "let", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "let", + "start": 2480, + "end": 2483, + "loc": { + "start": { + "line": 58, + "column": 2 + }, + "end": { + "line": 58, + "column": 5 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2484, + "end": 2485, + "loc": { + "start": { + "line": 58, + "column": 6 + }, + "end": { + "line": 58, + "column": 7 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2486, + "end": 2487, + "loc": { + "start": { + "line": 58, + "column": 8 + }, + "end": { + "line": 58, + "column": 9 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 0, + "start": 2488, + "end": 2489, + "loc": { + "start": { + "line": 58, + "column": 10 + }, + "end": { + "line": 58, + "column": 11 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2489, + "end": 2490, + "loc": { + "start": { + "line": 58, + "column": 11 + }, + "end": { + "line": 58, + "column": 12 + } + } + }, + { + "type": { + "label": "for", + "keyword": "for", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": true, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "for", + "start": 2494, + "end": 2497, + "loc": { + "start": { + "line": 60, + "column": 2 + }, + "end": { + "line": 60, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2498, + "end": 2499, + "loc": { + "start": { + "line": 60, + "column": 6 + }, + "end": { + "line": 60, + "column": 7 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2499, + "end": 2500, + "loc": { + "start": { + "line": 60, + "column": 7 + }, + "end": { + "line": 60, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2501, + "end": 2502, + "loc": { + "start": { + "line": 60, + "column": 9 + }, + "end": { + "line": 60, + "column": 10 + } + } + }, + { + "type": { + "label": "", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 7, + "updateContext": null + }, + "value": "<", + "start": 2503, + "end": 2504, + "loc": { + "start": { + "line": 60, + "column": 11 + }, + "end": { + "line": 60, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 2505, + "end": 2506, + "loc": { + "start": { + "line": 60, + "column": 13 + }, + "end": { + "line": 60, + "column": 14 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2506, + "end": 2507, + "loc": { + "start": { + "line": 60, + "column": 14 + }, + "end": { + "line": 60, + "column": 15 + } + } + }, + { + "type": { + "label": "++/--", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": true, + "binop": null + }, + "value": "++", + "start": 2508, + "end": 2510, + "loc": { + "start": { + "line": 60, + "column": 16 + }, + "end": { + "line": 60, + "column": 18 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2510, + "end": 2511, + "loc": { + "start": { + "line": 60, + "column": 18 + }, + "end": { + "line": 60, + "column": 19 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2511, + "end": 2512, + "loc": { + "start": { + "line": 60, + "column": 19 + }, + "end": { + "line": 60, + "column": 20 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2513, + "end": 2514, + "loc": { + "start": { + "line": 60, + "column": 21 + }, + "end": { + "line": 60, + "column": 22 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 2518, + "end": 2523, + "loc": { + "start": { + "line": 61, + "column": 3 + }, + "end": { + "line": 61, + "column": 8 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2524, + "end": 2525, + "loc": { + "start": { + "line": 61, + "column": 9 + }, + "end": { + "line": 61, + "column": 10 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "value", + "start": 2525, + "end": 2530, + "loc": { + "start": { + "line": 61, + "column": 10 + }, + "end": { + "line": 61, + "column": 15 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2530, + "end": 2531, + "loc": { + "start": { + "line": 61, + "column": 15 + }, + "end": { + "line": 61, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "done", + "start": 2532, + "end": 2536, + "loc": { + "start": { + "line": 61, + "column": 17 + }, + "end": { + "line": 61, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2536, + "end": 2537, + "loc": { + "start": { + "line": 61, + "column": 21 + }, + "end": { + "line": 61, + "column": 22 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2538, + "end": 2539, + "loc": { + "start": { + "line": 61, + "column": 23 + }, + "end": { + "line": 61, + "column": 24 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "it", + "start": 2540, + "end": 2542, + "loc": { + "start": { + "line": 61, + "column": 25 + }, + "end": { + "line": 61, + "column": 27 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2542, + "end": 2543, + "loc": { + "start": { + "line": 61, + "column": 27 + }, + "end": { + "line": 61, + "column": 28 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "next", + "start": 2543, + "end": 2547, + "loc": { + "start": { + "line": 61, + "column": 28 + }, + "end": { + "line": 61, + "column": 32 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2547, + "end": 2548, + "loc": { + "start": { + "line": 61, + "column": 32 + }, + "end": { + "line": 61, + "column": 33 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2548, + "end": 2549, + "loc": { + "start": { + "line": 61, + "column": 33 + }, + "end": { + "line": 61, + "column": 34 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2549, + "end": 2550, + "loc": { + "start": { + "line": 61, + "column": 34 + }, + "end": { + "line": 61, + "column": 35 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 2554, + "end": 2556, + "loc": { + "start": { + "line": 62, + "column": 3 + }, + "end": { + "line": 62, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2557, + "end": 2558, + "loc": { + "start": { + "line": 62, + "column": 6 + }, + "end": { + "line": 62, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "done", + "start": 2558, + "end": 2562, + "loc": { + "start": { + "line": 62, + "column": 7 + }, + "end": { + "line": 62, + "column": 11 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2562, + "end": 2563, + "loc": { + "start": { + "line": 62, + "column": 11 + }, + "end": { + "line": 62, + "column": 12 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 2564, + "end": 2570, + "loc": { + "start": { + "line": 62, + "column": 13 + }, + "end": { + "line": 62, + "column": 19 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "output", + "start": 2571, + "end": 2577, + "loc": { + "start": { + "line": 62, + "column": 20 + }, + "end": { + "line": 62, + "column": 26 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2577, + "end": 2578, + "loc": { + "start": { + "line": 62, + "column": 26 + }, + "end": { + "line": 62, + "column": 27 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "output", + "start": 2582, + "end": 2588, + "loc": { + "start": { + "line": 63, + "column": 3 + }, + "end": { + "line": 63, + "column": 9 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2588, + "end": 2589, + "loc": { + "start": { + "line": 63, + "column": 9 + }, + "end": { + "line": 63, + "column": 10 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2589, + "end": 2590, + "loc": { + "start": { + "line": 63, + "column": 10 + }, + "end": { + "line": 63, + "column": 11 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2590, + "end": 2591, + "loc": { + "start": { + "line": 63, + "column": 11 + }, + "end": { + "line": 63, + "column": 12 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2592, + "end": 2593, + "loc": { + "start": { + "line": 63, + "column": 13 + }, + "end": { + "line": 63, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "value", + "start": 2594, + "end": 2599, + "loc": { + "start": { + "line": 63, + "column": 15 + }, + "end": { + "line": 63, + "column": 20 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2599, + "end": 2600, + "loc": { + "start": { + "line": 63, + "column": 20 + }, + "end": { + "line": 63, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2603, + "end": 2604, + "loc": { + "start": { + "line": 64, + "column": 2 + }, + "end": { + "line": 64, + "column": 3 + } + } + }, + { + "type": { + "label": "for", + "keyword": "for", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": true, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "for", + "start": 2608, + "end": 2611, + "loc": { + "start": { + "line": 66, + "column": 2 + }, + "end": { + "line": 66, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2612, + "end": 2613, + "loc": { + "start": { + "line": 66, + "column": 6 + }, + "end": { + "line": 66, + "column": 7 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2613, + "end": 2614, + "loc": { + "start": { + "line": 66, + "column": 7 + }, + "end": { + "line": 66, + "column": 8 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2615, + "end": 2616, + "loc": { + "start": { + "line": 66, + "column": 9 + }, + "end": { + "line": 66, + "column": 10 + } + } + }, + { + "type": { + "label": "++/--", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": true, + "postfix": true, + "binop": null + }, + "value": "++", + "start": 2617, + "end": 2619, + "loc": { + "start": { + "line": 66, + "column": 11 + }, + "end": { + "line": 66, + "column": 13 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2619, + "end": 2620, + "loc": { + "start": { + "line": 66, + "column": 13 + }, + "end": { + "line": 66, + "column": 14 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2620, + "end": 2621, + "loc": { + "start": { + "line": 66, + "column": 14 + }, + "end": { + "line": 66, + "column": 15 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2622, + "end": 2623, + "loc": { + "start": { + "line": 66, + "column": 16 + }, + "end": { + "line": 66, + "column": 17 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 2627, + "end": 2632, + "loc": { + "start": { + "line": 67, + "column": 3 + }, + "end": { + "line": 67, + "column": 8 + } + } + }, + { + "type": { + "label": "{", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2633, + "end": 2634, + "loc": { + "start": { + "line": 67, + "column": 9 + }, + "end": { + "line": 67, + "column": 10 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "value", + "start": 2634, + "end": 2639, + "loc": { + "start": { + "line": 67, + "column": 10 + }, + "end": { + "line": 67, + "column": 15 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2639, + "end": 2640, + "loc": { + "start": { + "line": 67, + "column": 15 + }, + "end": { + "line": 67, + "column": 16 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "done", + "start": 2641, + "end": 2645, + "loc": { + "start": { + "line": 67, + "column": 17 + }, + "end": { + "line": 67, + "column": 21 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2645, + "end": 2646, + "loc": { + "start": { + "line": 67, + "column": 21 + }, + "end": { + "line": 67, + "column": 22 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2647, + "end": 2648, + "loc": { + "start": { + "line": 67, + "column": 23 + }, + "end": { + "line": 67, + "column": 24 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "it", + "start": 2649, + "end": 2651, + "loc": { + "start": { + "line": 67, + "column": 25 + }, + "end": { + "line": 67, + "column": 27 + } + } + }, + { + "type": { + "label": ".", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2651, + "end": 2652, + "loc": { + "start": { + "line": 67, + "column": 27 + }, + "end": { + "line": 67, + "column": 28 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "next", + "start": 2652, + "end": 2656, + "loc": { + "start": { + "line": 67, + "column": 28 + }, + "end": { + "line": 67, + "column": 32 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2656, + "end": 2657, + "loc": { + "start": { + "line": 67, + "column": 32 + }, + "end": { + "line": 67, + "column": 33 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2657, + "end": 2658, + "loc": { + "start": { + "line": 67, + "column": 33 + }, + "end": { + "line": 67, + "column": 34 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2658, + "end": 2659, + "loc": { + "start": { + "line": 67, + "column": 34 + }, + "end": { + "line": 67, + "column": 35 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 2663, + "end": 2665, + "loc": { + "start": { + "line": 68, + "column": 3 + }, + "end": { + "line": 68, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2666, + "end": 2667, + "loc": { + "start": { + "line": 68, + "column": 6 + }, + "end": { + "line": 68, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "done", + "start": 2667, + "end": 2671, + "loc": { + "start": { + "line": 68, + "column": 7 + }, + "end": { + "line": 68, + "column": 11 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2671, + "end": 2672, + "loc": { + "start": { + "line": 68, + "column": 11 + }, + "end": { + "line": 68, + "column": 12 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 2673, + "end": 2679, + "loc": { + "start": { + "line": 68, + "column": 13 + }, + "end": { + "line": 68, + "column": 19 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "output", + "start": 2680, + "end": 2686, + "loc": { + "start": { + "line": 68, + "column": 20 + }, + "end": { + "line": 68, + "column": 26 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2686, + "end": 2687, + "loc": { + "start": { + "line": 68, + "column": 26 + }, + "end": { + "line": 68, + "column": 27 + } + } + }, + { + "type": { + "label": "const", + "keyword": "const", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "const", + "start": 2691, + "end": 2696, + "loc": { + "start": { + "line": 69, + "column": 3 + }, + "end": { + "line": 69, + "column": 8 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 2697, + "end": 2698, + "loc": { + "start": { + "line": 69, + "column": 9 + }, + "end": { + "line": 69, + "column": 10 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2699, + "end": 2700, + "loc": { + "start": { + "line": 69, + "column": 11 + }, + "end": { + "line": 69, + "column": 12 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "randint", + "start": 2701, + "end": 2708, + "loc": { + "start": { + "line": 69, + "column": 13 + }, + "end": { + "line": 69, + "column": 20 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2708, + "end": 2709, + "loc": { + "start": { + "line": 69, + "column": 20 + }, + "end": { + "line": 69, + "column": 21 + } + } + }, + { + "type": { + "label": "num", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": 0, + "start": 2709, + "end": 2710, + "loc": { + "start": { + "line": 69, + "column": 21 + }, + "end": { + "line": 69, + "column": 22 + } + } + }, + { + "type": { + "label": ",", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2710, + "end": 2711, + "loc": { + "start": { + "line": 69, + "column": 22 + }, + "end": { + "line": 69, + "column": 23 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "n", + "start": 2712, + "end": 2713, + "loc": { + "start": { + "line": 69, + "column": 24 + }, + "end": { + "line": 69, + "column": 25 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2713, + "end": 2714, + "loc": { + "start": { + "line": 69, + "column": 25 + }, + "end": { + "line": 69, + "column": 26 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2714, + "end": 2715, + "loc": { + "start": { + "line": 69, + "column": 26 + }, + "end": { + "line": 69, + "column": 27 + } + } + }, + { + "type": { + "label": "if", + "keyword": "if", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "if", + "start": 2719, + "end": 2721, + "loc": { + "start": { + "line": 70, + "column": 3 + }, + "end": { + "line": 70, + "column": 5 + } + } + }, + { + "type": { + "label": "(", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2722, + "end": 2723, + "loc": { + "start": { + "line": 70, + "column": 6 + }, + "end": { + "line": 70, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 2723, + "end": 2724, + "loc": { + "start": { + "line": 70, + "column": 7 + }, + "end": { + "line": 70, + "column": 8 + } + } + }, + { + "type": { + "label": "", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": 7, + "updateContext": null + }, + "value": "<", + "start": 2725, + "end": 2726, + "loc": { + "start": { + "line": 70, + "column": 9 + }, + "end": { + "line": 70, + "column": 10 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "k", + "start": 2727, + "end": 2728, + "loc": { + "start": { + "line": 70, + "column": 11 + }, + "end": { + "line": 70, + "column": 12 + } + } + }, + { + "type": { + "label": ")", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2728, + "end": 2729, + "loc": { + "start": { + "line": 70, + "column": 12 + }, + "end": { + "line": 70, + "column": 13 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "output", + "start": 2730, + "end": 2736, + "loc": { + "start": { + "line": 70, + "column": 14 + }, + "end": { + "line": 70, + "column": 20 + } + } + }, + { + "type": { + "label": "[", + "beforeExpr": true, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2736, + "end": 2737, + "loc": { + "start": { + "line": 70, + "column": 20 + }, + "end": { + "line": 70, + "column": 21 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "i", + "start": 2737, + "end": 2738, + "loc": { + "start": { + "line": 70, + "column": 21 + }, + "end": { + "line": 70, + "column": 22 + } + } + }, + { + "type": { + "label": "]", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2738, + "end": 2739, + "loc": { + "start": { + "line": 70, + "column": 22 + }, + "end": { + "line": 70, + "column": 23 + } + } + }, + { + "type": { + "label": "=", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": true, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "=", + "start": 2740, + "end": 2741, + "loc": { + "start": { + "line": 70, + "column": 24 + }, + "end": { + "line": 70, + "column": 25 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "value", + "start": 2742, + "end": 2747, + "loc": { + "start": { + "line": 70, + "column": 26 + }, + "end": { + "line": 70, + "column": 31 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2747, + "end": 2748, + "loc": { + "start": { + "line": 70, + "column": 31 + }, + "end": { + "line": 70, + "column": 32 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2751, + "end": 2752, + "loc": { + "start": { + "line": 71, + "column": 2 + }, + "end": { + "line": 71, + "column": 3 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2754, + "end": 2755, + "loc": { + "start": { + "line": 72, + "column": 1 + }, + "end": { + "line": 72, + "column": 2 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2755, + "end": 2756, + "loc": { + "start": { + "line": 72, + "column": 2 + }, + "end": { + "line": 72, + "column": 3 + } + } + }, + { + "type": { + "label": "return", + "keyword": "return", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "return", + "start": 2759, + "end": 2765, + "loc": { + "start": { + "line": 74, + "column": 1 + }, + "end": { + "line": 74, + "column": 7 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "sample", + "start": 2766, + "end": 2772, + "loc": { + "start": { + "line": 74, + "column": 8 + }, + "end": { + "line": 74, + "column": 14 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2772, + "end": 2773, + "loc": { + "start": { + "line": 74, + "column": 14 + }, + "end": { + "line": 74, + "column": 15 + } + } + }, + { + "type": { + "label": "}", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "start": 2774, + "end": 2775, + "loc": { + "start": { + "line": 75, + "column": 0 + }, + "end": { + "line": 75, + "column": 1 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2775, + "end": 2776, + "loc": { + "start": { + "line": 75, + "column": 1 + }, + "end": { + "line": 75, + "column": 2 + } + } + }, + { + "type": { + "label": "export", + "keyword": "export", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "export", + "start": 2778, + "end": 2784, + "loc": { + "start": { + "line": 77, + "column": 0 + }, + "end": { + "line": 77, + "column": 6 + } + } + }, + { + "type": { + "label": "default", + "keyword": "default", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "value": "default", + "start": 2785, + "end": 2792, + "loc": { + "start": { + "line": 77, + "column": 7 + }, + "end": { + "line": 77, + "column": 14 + } + } + }, + { + "type": { + "label": "name", + "beforeExpr": false, + "startsExpr": true, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null + }, + "value": "_waterman", + "start": 2793, + "end": 2802, + "loc": { + "start": { + "line": 77, + "column": 15 + }, + "end": { + "line": 77, + "column": 24 + } + } + }, + { + "type": { + "label": ";", + "beforeExpr": true, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2802, + "end": 2803, + "loc": { + "start": { + "line": 77, + "column": 24 + }, + "end": { + "line": 77, + "column": 25 + } + } + }, + { + "type": { + "label": "eof", + "beforeExpr": false, + "startsExpr": false, + "rightAssociative": false, + "isLoop": false, + "isAssign": false, + "prefix": false, + "postfix": false, + "binop": null, + "updateContext": null + }, + "start": 2804, + "end": 2804, + "loc": { + "start": { + "line": 78, + "column": 0 + }, + "end": { + "line": 78, + "column": 0 + } + } + } + ] +} \ No newline at end of file diff --git a/coverage.json b/coverage.json index e9a2e3d..cc440d4 100644 --- a/coverage.json +++ b/coverage.json @@ -1,7 +1,7 @@ { "coverage": "100%", - "expectCount": 14, - "actualCount": 14, + "expectCount": 16, + "actualCount": 16, "files": { "src/api/choice.js": { "expectCount": 1, @@ -28,6 +28,11 @@ "actualCount": 1, "undocumentLines": [] }, + "src/api/reservoir.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] + }, "src/api/sample.js": { "expectCount": 1, "actualCount": 1, @@ -72,6 +77,11 @@ "expectCount": 1, "actualCount": 1, "undocumentLines": [] + }, + "src/kernel/_waterman.js": { + "expectCount": 1, + "actualCount": 1, + "undocumentLines": [] } } } \ No newline at end of file diff --git a/file/src/api/choice.js.html b/file/src/api/choice.js.html index dfc99b2..9696078 100644 --- a/file/src/api/choice.js.html +++ b/file/src/api/choice.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/randfloat.js.html b/file/src/api/randfloat.js.html index 0c2e575..d5012f6 100644 --- a/file/src/api/randfloat.js.html +++ b/file/src/api/randfloat.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/randint.js.html b/file/src/api/randint.js.html index 67dc47d..65df0d4 100644 --- a/file/src/api/randint.js.html +++ b/file/src/api/randint.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/random.js.html b/file/src/api/random.js.html index d097aef..96c2bb7 100644 --- a/file/src/api/random.js.html +++ b/file/src/api/random.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/randrange.js.html b/file/src/api/randrange.js.html index 99aa047..f2d9dc4 100644 --- a/file/src/api/randrange.js.html +++ b/file/src/api/randrange.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/reservoir.js.html b/file/src/api/reservoir.js.html new file mode 100644 index 0000000..bf348a2 --- /dev/null +++ b/file/src/api/reservoir.js.html @@ -0,0 +1,83 @@ + + + + + + src/api/reservoir.js | @aureooms/js-random + + + + + + + +
    + Home + Manual + Reference + Source + + +
    + + + +

    src/api/reservoir.js

    +
    import _waterman from '../kernel/_waterman.js';
    +import randint from './randint.js';
    +
    +/**
    + * Reservoir sampling.
    + *
    + * @function
    + * @param {number} k The size of the sample.
    + * @param {Iterable} iterable The input iterable.
    + * @param {Array} [output=new Array(k)] The output array.
    + * @return {Array} The output array.
    + */
    +const reservoir = _waterman(randint);
    +export default reservoir;
    +
    + +
    + + + + + + + + + + + + diff --git a/file/src/api/sample.js.html b/file/src/api/sample.js.html index 8c644b8..524fa74 100644 --- a/file/src/api/sample.js.html +++ b/file/src/api/sample.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/shuffle.js.html b/file/src/api/shuffle.js.html index c639a6a..569cea5 100644 --- a/file/src/api/shuffle.js.html +++ b/file/src/api/shuffle.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/api/shuffled.js.html b/file/src/api/shuffled.js.html index 7161cbe..1c8f85a 100644 --- a/file/src/api/shuffled.js.html +++ b/file/src/api/shuffled.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/index.js.html b/file/src/index.js.html index e9b7d00..defea6d 100644 --- a/file/src/index.js.html +++ b/file/src/index.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • @@ -53,6 +55,7 @@ export {default as randint} from './api/randint.js'; export {default as random} from './api/random.js'; export {default as randrange} from './api/randrange.js'; +export {default as reservoir} from './api/reservoir.js'; export {default as sample} from './api/sample.js'; export {default as shuffle} from './api/shuffle.js'; export {default as shuffled} from './api/shuffled.js'; @@ -62,6 +65,7 @@ export {default as _randfloat} from './kernel/_randfloat.js'; export {default as _randint} from './kernel/_randint.js'; export {default as _shuffle} from './kernel/_shuffle.js'; +export {default as _waterman} from './kernel/_waterman.js';
    diff --git a/file/src/kernel/_choice.js.html b/file/src/kernel/_choice.js.html index 95e36d8..781e476 100644 --- a/file/src/kernel/_choice.js.html +++ b/file/src/kernel/_choice.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_fisheryates.js.html b/file/src/kernel/_fisheryates.js.html index 7a0a965..03d764e 100644 --- a/file/src/kernel/_fisheryates.js.html +++ b/file/src/kernel/_fisheryates.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_fisheryates_inside_out.js.html b/file/src/kernel/_fisheryates_inside_out.js.html index 55676fd..ef63642 100644 --- a/file/src/kernel/_fisheryates_inside_out.js.html +++ b/file/src/kernel/_fisheryates_inside_out.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_randfloat.js.html b/file/src/kernel/_randfloat.js.html index a675278..783c2af 100644 --- a/file/src/kernel/_randfloat.js.html +++ b/file/src/kernel/_randfloat.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_randint.js.html b/file/src/kernel/_randint.js.html index 78a9e8c..cbe11d9 100644 --- a/file/src/kernel/_randint.js.html +++ b/file/src/kernel/_randint.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_shuffle.js.html b/file/src/kernel/_shuffle.js.html index cc41c46..12d1ff3 100644 --- a/file/src/kernel/_shuffle.js.html +++ b/file/src/kernel/_shuffle.js.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/file/src/kernel/_waterman.js.html b/file/src/kernel/_waterman.js.html new file mode 100644 index 0000000..a8d4ca1 --- /dev/null +++ b/file/src/kernel/_waterman.js.html @@ -0,0 +1,146 @@ + + + + + + src/kernel/_waterman.js | @aureooms/js-random + + + + + + + +
    + Home + Manual + Reference + Source + + +
    + + + +

    src/kernel/_waterman.js

    +
    /**
    + * Construct a sampling function using Algorithm R due to Alan Waterman (both
    + * name and attribution are due to Knuth).
    + *
    + * @param {Function} randint The randint function.
    + * @return {Function} The sample function.
    + */
    +const _waterman = (randint) => {
    +	/**
    +	 * Samples k items uniformly at random from an iterable of unknown size.
    +	 *
    +	 * We want each item to have probability k/n of being selected.
    +	 *
    +	 * The algorithm works as follows:
    +	 *   1. We initialize a candidate sample with the first k items.
    +	 *   2. For each remaining item i, decide whether to insert it in the
    +	 *   candidate sample with probability k/i, evicting an item from the
    +	 *   candidate sample at random, or to discard it immediately (with
    +	 *   probability 1-k/i),
    +	 *
    +	 * To prove that the obtained probability of inclusion for each item is correct
    +	 * we multiply two probabilities:
    +	 *   1. The probability of entering the candidate sample.
    +	 *   2. The probability of staying in the candidate sample until the end.
    +	 *
    +	 * For items 1 to k, probability 1. is 1, and probability 2. is
    +	 * (1-1/(k+1))(1-1/(k+2))...(1-1/n)
    +	 * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.
    +	 *
    +	 * For items i = k+1 to n, where probability 1. is k/i, and probability 2.
    +	 * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)
    +	 * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.
    +	 *
    +	 * NOTE: Could also implement so that it yields after each input item.
    +	 * NOTE: One can reduce the expected number of random bits needed by
    +	 * avoiding generating any number above k-1:
    +	 *   - First we branch on whether i < k.
    +	 *   - Then we generate the random number between 0 and k-1 only if needed.
    +	 *
    +	 * To decide on the branch, flip a biased coin with parameter p = k/n.
    +	 * To do so, flip a fair coin until it differs from the binary
    +	 * representation of k/n (0.10110101...).
    +	 * The computation can be made efficient by realizing several things:
    +	 *   - k is fixed and smaller than n (so divmod step can be skipped)
    +	 *   - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)
    +	 *
    +	 * This would reduce the number of necessary random bits from O(n log n) to
    +	 * expected O(n).
    +	 *
    +	 * @param {number} k The size of the sample.
    +	 * @param {Iterable} iterable The input iterable.
    +	 * @param {Array} [output=new Array(k)] The output array.
    +	 * @return {Array} The output array.
    +	 */
    +	const sample = (k, iterable, output = new Array(k)) => {
    +		const it = iterable[Symbol.iterator]();
    +
    +		let n = 0;
    +
    +		for (; n < k; ++n) {
    +			const {value, done} = it.next();
    +			if (done) return output;
    +			output[n] = value;
    +		}
    +
    +		for (; ; ++n) {
    +			const {value, done} = it.next();
    +			if (done) return output;
    +			const i = randint(0, n);
    +			if (i < k) output[i] = value;
    +		}
    +	};
    +
    +	return sample;
    +};
    +
    +export default _waterman;
    +
    + +
    + + + + + + + + + + + + diff --git a/function/index.html b/function/index.html index a0b0627..b98ca27 100644 --- a/function/index.html +++ b/function/index.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • @@ -289,6 +291,36 @@ + + + + + private + + + + + + +
    +

    + + + + _waterman(randint: Function): Function +

    +
    +
    + + +

    Construct a sampling function using Algorithm R due to Alan Waterman (both +name and attribution are due to Knuth).

    +
    +
    + + + + @@ -941,6 +973,81 @@

    Return:

    + +
    +

    + private + + + + + + _waterman(randint: Function): Function + + + + source + +

    + + + + +

    Construct a sampling function using Algorithm R due to Alan Waterman (both +name and attribution are due to Knuth).

    +
    + + + +
    +

    Params:

    + + + + + + + + + + + + + +
    NameTypeAttributeDescription
    randintFunction

    The randint function.

    +
    +
    +
    + +
    +

    Return:

    + + + + + + + +
    Function

    The sample function.

    +
    +
    +
    +
    + + + + + + + + + + + + + + +
    diff --git a/identifiers.html b/identifiers.html index 229a14c..0503107 100644 --- a/identifiers.html +++ b/identifiers.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • @@ -211,6 +213,35 @@

    api

    + + + +
    +

    + V + + + reservoir(k: number, iterable: Iterable, output: Array): Array: * +

    +
    +
    + + +

    Reservoir sampling.

    +
    +
    + + + + + + + + + public + + + @@ -477,6 +508,36 @@

    kernel

    + + + + + private + + + + + + +
    +

    + F + + + _waterman(randint: Function): Function +

    +
    +
    + + +

    Construct a sampling function using Algorithm R due to Alan Waterman (both +name and attribution are due to Knuth).

    +
    +
    + + + + diff --git a/index.html b/index.html index b51c4b1..8d8041e 100644 --- a/index.html +++ b/index.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • diff --git a/index.json b/index.json index de36e51..98651ed 100644 --- a/index.json +++ b/index.json @@ -881,6 +881,84 @@ { "__docId__": 58, "kind": "file", + "name": "src/api/reservoir.js", + "content": "import _waterman from '../kernel/_waterman.js';\nimport randint from './randint.js';\n\n/**\n * Reservoir sampling.\n *\n * @function\n * @param {number} k The size of the sample.\n * @param {Iterable} iterable The input iterable.\n * @param {Array} [output=new Array(k)] The output array.\n * @return {Array} The output array.\n */\nconst reservoir = _waterman(randint);\nexport default reservoir;\n", + "static": true, + "longname": "/home/runner/work/js-random/js-random/src/api/reservoir.js", + "access": "public", + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 59, + "kind": "variable", + "name": "reservoir", + "memberof": "src/api/reservoir.js", + "static": true, + "longname": "src/api/reservoir.js~reservoir", + "access": "public", + "export": true, + "importPath": "@aureooms/js-random/src/api/reservoir.js", + "importStyle": "reservoir", + "description": "Reservoir sampling.", + "lineNumber": 13, + "unknown": [ + { + "tagName": "@function", + "tagValue": "" + } + ], + "params": [ + { + "nullable": null, + "types": [ + "number" + ], + "spread": false, + "optional": false, + "name": "k", + "description": "The size of the sample." + }, + { + "nullable": null, + "types": [ + "Iterable" + ], + "spread": false, + "optional": false, + "name": "iterable", + "description": "The input iterable." + }, + { + "nullable": null, + "types": [ + "Array" + ], + "spread": false, + "optional": true, + "defaultValue": "new Array(k)", + "defaultRaw": "new Array(k)", + "name": "output", + "description": "The output array." + } + ], + "return": { + "nullable": null, + "types": [ + "Array" + ], + "spread": false, + "description": "The output array." + }, + "type": { + "types": [ + "*" + ] + } + }, + { + "__docId__": 60, + "kind": "file", "name": "src/api/sample.js", "content": "import _fisheryates from '../kernel/_fisheryates.js';\nimport randint from './randint.js';\n\n/**\n * Take a sample of size n (without replacement) from the items i through\n * j-1 of the input array. This is done in-place. The sample can be retrieved\n * from position i to i+n.\n *\n * @function\n * @param {number} n The size of the sample.\n * @param {Array} a The input array.\n * @param {number} i The inclusive left bound.\n * @param {number} j The non-inclusive right bound.\n */\nconst sample = _fisheryates(randint);\nexport default sample;\n", "static": true, @@ -890,7 +968,7 @@ "lineNumber": 1 }, { - "__docId__": 59, + "__docId__": 61, "kind": "variable", "name": "sample", "memberof": "src/api/sample.js", @@ -957,7 +1035,7 @@ } }, { - "__docId__": 60, + "__docId__": 62, "kind": "file", "name": "src/api/shuffle.js", "content": "import _shuffle from '../kernel/_shuffle.js';\nimport sample from './sample.js';\n\n/**\n * Shuffle array in-place between positions i and j-1 (inclusive).\n * The other positions are left untouched.\n * @function\n * @param {Array} a The input array.\n * @param {number} i The inclusive left bound.\n * @param {number} j The non-inclusive right bound.\n */\nconst shuffle = _shuffle(sample);\nexport default shuffle;\n", @@ -968,7 +1046,7 @@ "lineNumber": 1 }, { - "__docId__": 61, + "__docId__": 63, "kind": "variable", "name": "shuffle", "memberof": "src/api/shuffle.js", @@ -1025,7 +1103,7 @@ } }, { - "__docId__": 62, + "__docId__": 64, "kind": "file", "name": "src/api/shuffled.js", "content": "import _fisheryates_inside_out from '../kernel/_fisheryates_inside_out.js';\nimport randint from './randint.js';\n\n/**\n * Given an input iterable, constructs an array containing the elements of the\n * input shuffled uniformly at random.\n *\n * @function\n * @param {Iterable} iterable The input iterable.\n * @return {Array} The constructed array.\n */\nconst shuffled = _fisheryates_inside_out(randint);\nexport default shuffled;\n", @@ -1036,7 +1114,7 @@ "lineNumber": 1 }, { - "__docId__": 63, + "__docId__": 65, "kind": "variable", "name": "shuffled", "memberof": "src/api/shuffled.js", @@ -1081,10 +1159,10 @@ } }, { - "__docId__": 64, + "__docId__": 66, "kind": "file", "name": "src/index.js", - "content": "export {default as choice} from './api/choice.js';\nexport {default as randfloat} from './api/randfloat.js';\nexport {default as randint} from './api/randint.js';\nexport {default as random} from './api/random.js';\nexport {default as randrange} from './api/randrange.js';\nexport {default as sample} from './api/sample.js';\nexport {default as shuffle} from './api/shuffle.js';\nexport {default as shuffled} from './api/shuffled.js';\nexport {default as _choice} from './kernel/_choice.js';\nexport {default as _fisheryates} from './kernel/_fisheryates.js';\nexport {default as _fisheryates_inside_out} from './kernel/_fisheryates_inside_out.js';\nexport {default as _randfloat} from './kernel/_randfloat.js';\nexport {default as _randint} from './kernel/_randint.js';\nexport {default as _shuffle} from './kernel/_shuffle.js';\n", + "content": "export {default as choice} from './api/choice.js';\nexport {default as randfloat} from './api/randfloat.js';\nexport {default as randint} from './api/randint.js';\nexport {default as random} from './api/random.js';\nexport {default as randrange} from './api/randrange.js';\nexport {default as reservoir} from './api/reservoir.js';\nexport {default as sample} from './api/sample.js';\nexport {default as shuffle} from './api/shuffle.js';\nexport {default as shuffled} from './api/shuffled.js';\nexport {default as _choice} from './kernel/_choice.js';\nexport {default as _fisheryates} from './kernel/_fisheryates.js';\nexport {default as _fisheryates_inside_out} from './kernel/_fisheryates_inside_out.js';\nexport {default as _randfloat} from './kernel/_randfloat.js';\nexport {default as _randint} from './kernel/_randint.js';\nexport {default as _shuffle} from './kernel/_shuffle.js';\nexport {default as _waterman} from './kernel/_waterman.js';\n", "static": true, "longname": "/home/runner/work/js-random/js-random/src/index.js", "access": "public", @@ -1092,7 +1170,7 @@ "lineNumber": 1 }, { - "__docId__": 65, + "__docId__": 67, "kind": "file", "name": "src/kernel/_choice.js", "content": "/**\n * Builds a choice function given a randint function.\n *\n * @param {Function} randint The randint function.\n * @return {Function} The choice function.\n */\nconst _choice = (randint) => {\n\t/**\n\t * Sample a single element from an array.\n\t *\n\t * @param {Array} a The input array.\n\t * @param {number} i Inclusive left bound.\n\t * @param {number} j Non-inclusive right bound.\n\t * @return {any} The sampled element.\n\t */\n\tconst choice = (a, i, j) => {\n\t\tconst x = randint(i, j);\n\t\treturn a[x];\n\t};\n\n\treturn choice;\n};\n\nexport default _choice;\n", @@ -1103,7 +1181,7 @@ "lineNumber": 1 }, { - "__docId__": 66, + "__docId__": 68, "kind": "function", "name": "_choice", "memberof": "src/kernel/_choice.js", @@ -1139,7 +1217,7 @@ } }, { - "__docId__": 67, + "__docId__": 69, "kind": "file", "name": "src/kernel/_fisheryates.js", "content": "/**\n * Sample elements from an array using Fisher-Yates method.\n *\n * NOTE: The original description of the algorithm by Fisher and Yates [1] had\n * unnecessary bookkeeping which made the algorithm run in O(n * (j-i)) time.\n * This implementation follows Durstenfeld's [2] and Knuth's [3] descriptions\n * which yield O(n) running time.\n *\n * For more information see the excellent \"Fisher–Yates shuffle\" page on\n * Wikipedia [4]. Fisher and Yates description is referred there as\n * \"Fisher and Yate's original method\" or \"pencil-and-paper method\".\n * The more efficient implementation described by Durstenfeld and Knuth is\n * referred there as \"the modern method\".\n *\n * [1] Fisher, Ronald A.; Yates, Frank (1938). Statistical tables for\n * biological, agricultural and medical research.\n * [2] Durstenfeld, R. (July 1964). \"Algorithm 235: Random permutation\"\n * [3] Knuth, Donald E. (1969). Seminumerical algorithms. The Art of Computer\n * Programming Volume 2.\n * [4] https://en.wikipedia.org/wiki/Fisher–Yates_shuffle\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sampling function.\n */\nconst _fisheryates = (randint) => {\n\t/**\n\t * Take a sample of size n (without replacement) from the items i through\n\t * j-1 of the input array. This is done in-place. The sample can be\n\t * retrieved from position i to i+n.\n\t *\n\t * @param {number} n The size of the sample.\n\t * @param {Array} a The input array.\n\t * @param {number} i The inclusive left bound.\n\t * @param {number} j The non-inclusive right bound.\n\t */\n\tconst sample = (n, a, i, j) => {\n\t\t// We will swap at most n elements\n\t\t// NOTE: When n = j - i, the last swap swaps a[j-1] with itself,\n\t\t// which is a NOOP. /!\\ HOWEVER, the last swap is NOT a NOOP when\n\t\t// n < j - i. Hence we cannot let k = i + n - 1 in general.\n\t\tconst k = i + n;\n\n\t\tfor (; i < k; ++i) {\n\t\t\t// Choose any index p in the remaining array\n\t\t\tconst p = randint(i, j);\n\n\t\t\t// Swap selected element with the first remaining element.\n\t\t\tconst tmp = a[i];\n\t\t\ta[i] = a[p];\n\t\t\ta[p] = tmp;\n\t\t}\n\t};\n\n\treturn sample;\n};\n\nexport default _fisheryates;\n", @@ -1150,7 +1228,7 @@ "lineNumber": 1 }, { - "__docId__": 68, + "__docId__": 70, "kind": "function", "name": "_fisheryates", "memberof": "src/kernel/_fisheryates.js", @@ -1186,7 +1264,7 @@ } }, { - "__docId__": 69, + "__docId__": 71, "kind": "file", "name": "src/kernel/_fisheryates_inside_out.js", "content": "/**\n * Shuffle elements of an iterable using an inside-out implementation of the\n * Fisher-Yates method.\n *\n * One can observe that if the input contains n elements, the loop has exactly\n * n! possible outcomes: one for the first iteration, two for the second, three\n * for the third, etc., the number of outcomes of a loop being the product of\n * the number of outcomes for each iteration. Given a perfect randint function,\n * each iteration's outcomes are equally likely, and independent of other\n * iterations outcomes. The proof below shows that these outcomes are\n * distinct.\n *\n * To see that this method yields the correct result (assume perfect randint):\n * 1. Observe that it is correct when the input is empty.\n * 2. By induction:\n * - Induction hypothesis: assume it is correct when the input consists of\n * n elements.\n * - We almost insert the (n+1)th element at one of the n+1 possible\n * insertion position in the output array. Almost because we move the\n * element that is at the insertion position at the end instead of\n * shifting the elements right of the insertion position to make room for\n * the inserted element.\n * - Ideally, since we inserted the last element at one of the n+1\n * positions, we would like that the elements inserted earlier form one\n * of n! permutations uniformly at random after moving the element under\n * the insertion position. This is true because the permutations that we\n * obtain after this move are in one-to-one correspondance with the n!\n * distinct permutations that can be obtained before the move. These are\n * equally likely to be produced by the induction hypothesis.\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sampling function.\n */\nconst _fisheryates_inside_out = (randint) => {\n\t/**\n\t * Given an input iterable, constructs an array containing the elements of\n\t * the input shuffled uniformly at random.\n\t *\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=[]] The constructed array.\n\t * @return {Array} The constructed array.\n\t */\n\tconst shuffled = (iterable, output = []) => {\n\t\tlet n = 0;\n\t\tfor (const item of iterable) {\n\t\t\tconst i = randint(-1, n);\n\t\t\tif (i === -1) output.push(item);\n\t\t\telse {\n\t\t\t\toutput.push(output[i]);\n\t\t\t\toutput[i] = item;\n\t\t\t}\n\n\t\t\t++n;\n\t\t}\n\n\t\treturn output;\n\t};\n\n\treturn shuffled;\n};\n\nexport default _fisheryates_inside_out;\n", @@ -1197,7 +1275,7 @@ "lineNumber": 1 }, { - "__docId__": 70, + "__docId__": 72, "kind": "function", "name": "_fisheryates_inside_out", "memberof": "src/kernel/_fisheryates_inside_out.js", @@ -1233,7 +1311,7 @@ } }, { - "__docId__": 71, + "__docId__": 73, "kind": "file", "name": "src/kernel/_randfloat.js", "content": "/**\n * Builds a randfloat function given a random number generator.\n *\n * @param {Function} random A function taking no arguments that returns a\n * double uniformly at random in the interval [0, 1).\n *\n * @return {Function} A randfloat function.\n */\nconst _randfloat = (random) => {\n\t/**\n\t * Returns a double in interval [i, j[ (i included, j excluded)\n\t * according to a uniform distribution.\n\t *\n\t * @param {number} i The inclusive left bound\n\t * @param {number} j The non-inclusive right bound\n\t * @return {number} A double in the interval [i, j[ taken uniformly at\n\t * random.\n\t */\n\tconst randfloat = (i, j) => i + random() * (j - i);\n\treturn randfloat;\n};\n\nexport default _randfloat;\n", @@ -1244,7 +1322,7 @@ "lineNumber": 1 }, { - "__docId__": 72, + "__docId__": 74, "kind": "function", "name": "_randfloat", "memberof": "src/kernel/_randfloat.js", @@ -1280,7 +1358,7 @@ } }, { - "__docId__": 73, + "__docId__": 75, "kind": "file", "name": "src/kernel/_randint.js", "content": "/**\n * Builds a randint function given a random number generator.\n *\n * @param {Function} random A function taking no arguments that returns a\n * double uniformly at random in the interval [0, 1).\n *\n * @return {Function} A randint function.\n */\nconst _randint = (random) => {\n\t/**\n\t * Returns an integer in interval [i, j[ (i included, j excluded)\n\t * according to a uniform distribution.\n\t *\n\t * @param {number} i The inclusive left bound\n\t * @param {number} j The non-inclusive right bound\n\t * @return {number} An integer in the interval [i, j[ taken uniformly at\n\t * random.\n\t */\n\tconst randint = (i, j) => i + Math.floor(random() * (j - i));\n\treturn randint;\n};\n\nexport default _randint;\n", @@ -1291,7 +1369,7 @@ "lineNumber": 1 }, { - "__docId__": 74, + "__docId__": 76, "kind": "function", "name": "_randint", "memberof": "src/kernel/_randint.js", @@ -1327,7 +1405,7 @@ } }, { - "__docId__": 75, + "__docId__": 77, "kind": "file", "name": "src/kernel/_shuffle.js", "content": "/**\n * Shuffle the array by sampling the entire array.\n *\n * @param {Function} sample The sample function.\n * @return {Function} The shuffle function.\n */\nconst _shuffle = (sample) => {\n\t/**\n\t * Shuffle array in-place between positions i and j-1 (inclusive).\n\t * The other positions are left untouched.\n\t *\n\t * @param {Array} a The input array.\n\t * @param {number} i The inclusive left bound.\n\t * @param {number} j The non-inclusive right bound.\n\t */\n\tconst shuffle = (a, i, j) => sample(j - i, a, i, j);\n\treturn shuffle;\n};\n\nexport default _shuffle;\n", @@ -1338,7 +1416,7 @@ "lineNumber": 1 }, { - "__docId__": 76, + "__docId__": 78, "kind": "function", "name": "_shuffle", "memberof": "src/kernel/_shuffle.js", @@ -1373,6 +1451,53 @@ "description": "The shuffle function." } }, + { + "__docId__": 79, + "kind": "file", + "name": "src/kernel/_waterman.js", + "content": "/**\n * Construct a sampling function using Algorithm R due to Alan Waterman (both\n * name and attribution are due to Knuth).\n *\n * @param {Function} randint The randint function.\n * @return {Function} The sample function.\n */\nconst _waterman = (randint) => {\n\t/**\n\t * Samples k items uniformly at random from an iterable of unknown size.\n\t *\n\t * We want each item to have probability k/n of being selected.\n\t *\n\t * The algorithm works as follows:\n\t * 1. We initialize a candidate sample with the first k items.\n\t * 2. For each remaining item i, decide whether to insert it in the\n\t * candidate sample with probability k/i, evicting an item from the\n\t * candidate sample at random, or to discard it immediately (with\n\t * probability 1-k/i),\n\t *\n\t * To prove that the obtained probability of inclusion for each item is correct\n\t * we multiply two probabilities:\n\t * 1. The probability of entering the candidate sample.\n\t * 2. The probability of staying in the candidate sample until the end.\n\t *\n\t * For items 1 to k, probability 1. is 1, and probability 2. is\n\t * (1-1/(k+1))(1-1/(k+2))...(1-1/n)\n\t * = (k/(k+1))((k+1)/(k+2))...((n-1)/n) which telescopes to k/n.\n\t *\n\t * For items i = k+1 to n, where probability 1. is k/i, and probability 2.\n\t * is (1-1/(i+1))(1-1/(i+2))...(1-1/n)\n\t * = (i/(i+1))((i+1)/(i+2))...((n-1)/n) which telescopes to i/n.\n\t *\n\t * NOTE: Could also implement so that it yields after each input item.\n\t * NOTE: One can reduce the expected number of random bits needed by\n\t * avoiding generating any number above k-1:\n\t * - First we branch on whether i < k.\n\t * - Then we generate the random number between 0 and k-1 only if needed.\n\t *\n\t * To decide on the branch, flip a biased coin with parameter p = k/n.\n\t * To do so, flip a fair coin until it differs from the binary\n\t * representation of k/n (0.10110101...).\n\t * The computation can be made efficient by realizing several things:\n\t * - k is fixed and smaller than n (so divmod step can be skipped)\n\t * - k/(n+1) < k/n (so we can avoid recomputing if the biased flip > k/n)\n\t *\n\t * This would reduce the number of necessary random bits from O(n log n) to\n\t * expected O(n).\n\t *\n\t * @param {number} k The size of the sample.\n\t * @param {Iterable} iterable The input iterable.\n\t * @param {Array} [output=new Array(k)] The output array.\n\t * @return {Array} The output array.\n\t */\n\tconst sample = (k, iterable, output = new Array(k)) => {\n\t\tconst it = iterable[Symbol.iterator]();\n\n\t\tlet n = 0;\n\n\t\tfor (; n < k; ++n) {\n\t\t\tconst {value, done} = it.next();\n\t\t\tif (done) return output;\n\t\t\toutput[n] = value;\n\t\t}\n\n\t\tfor (; ; ++n) {\n\t\t\tconst {value, done} = it.next();\n\t\t\tif (done) return output;\n\t\t\tconst i = randint(0, n);\n\t\t\tif (i < k) output[i] = value;\n\t\t}\n\t};\n\n\treturn sample;\n};\n\nexport default _waterman;\n", + "static": true, + "longname": "/home/runner/work/js-random/js-random/src/kernel/_waterman.js", + "access": "public", + "description": null, + "lineNumber": 1 + }, + { + "__docId__": 80, + "kind": "function", + "name": "_waterman", + "memberof": "src/kernel/_waterman.js", + "generator": false, + "async": false, + "static": true, + "longname": "src/kernel/_waterman.js~_waterman", + "access": "private", + "export": true, + "importPath": "@aureooms/js-random/src/kernel/_waterman.js", + "importStyle": "_waterman", + "description": "Construct a sampling function using Algorithm R due to Alan Waterman (both\nname and attribution are due to Knuth).", + "lineNumber": 8, + "params": [ + { + "nullable": null, + "types": [ + "Function" + ], + "spread": false, + "optional": false, + "name": "randint", + "description": "The randint function." + } + ], + "return": { + "nullable": null, + "types": [ + "Function" + ], + "spread": false, + "description": "The sample function." + } + }, { "kind": "index", "content": ":game_die: [@aureooms/js-random](https://aureooms.github.io/js-random)\n==\n\n

    \n\n\n
    \n© xkcd.com\n

    \n\nRandomness algorithms for JavaScript.\nSee [docs](https://aureooms.github.io/js-random).\nParent is [@aureooms/js-algorithms](https://aureooms.github.io/js-algorithms).\n\n> :warning: Depending on your environment, the code may require\n> `regeneratorRuntime` to be defined, for instance by importing\n> [regenerator-runtime/runtime](https://www.npmjs.com/package/regenerator-runtime).\n\n```js\nimport {\n\trandint , // randint(i, j) -> [i, j[ \\cap ZZ\n\trandfloat , // randfloat(i, j) -> [i, j[\n\tsample , // /!\\ in-place\n\tshuffle , // /!\\ in-place\n} from '@aureooms/js-random' ;\n```\n\n[![License](https://img.shields.io/github/license/aureooms/js-random.svg)](https://raw.githubusercontent.com/aureooms/js-random/main/LICENSE)\n[![Version](https://img.shields.io/npm/v/@aureooms/js-random.svg)](https://www.npmjs.org/package/@aureooms/js-random)\n[![Tests](https://img.shields.io/github/workflow/status/aureooms/js-random/ci:test?event=push&label=tests)](https://github.com/aureooms/js-random/actions/workflows/ci:test.yml?query=branch:main)\n[![Dependencies](https://img.shields.io/david/aureooms/js-random.svg)](https://david-dm.org/aureooms/js-random)\n[![Dev dependencies](https://img.shields.io/david/dev/aureooms/js-random.svg)](https://david-dm.org/aureooms/js-random?type=dev)\n[![GitHub issues](https://img.shields.io/github/issues/aureooms/js-random.svg)](https://github.com/aureooms/js-random/issues)\n[![Downloads](https://img.shields.io/npm/dm/@aureooms/js-random.svg)](https://www.npmjs.org/package/@aureooms/js-random)\n\n[![Code issues](https://img.shields.io/codeclimate/issues/aureooms/js-random.svg)](https://codeclimate.com/github/aureooms/js-random/issues)\n[![Code maintainability](https://img.shields.io/codeclimate/maintainability/aureooms/js-random.svg)](https://codeclimate.com/github/aureooms/js-random/trends/churn)\n[![Code coverage (cov)](https://img.shields.io/codecov/c/gh/aureooms/js-random/main.svg)](https://codecov.io/gh/aureooms/js-random)\n[![Code technical debt](https://img.shields.io/codeclimate/tech-debt/aureooms/js-random.svg)](https://codeclimate.com/github/aureooms/js-random/trends/technical_debt)\n[![Documentation](https://aureooms.github.io/js-random/badge.svg)](https://aureooms.github.io/js-random/source.html)\n[![Package size](https://img.shields.io/bundlephobia/minzip/@aureooms/js-random)](https://bundlephobia.com/result?p=@aureooms/js-random)\n", @@ -1383,7 +1508,7 @@ }, { "kind": "packageJSON", - "content": "{\n \"name\": \"@aureooms/js-random\",\n \"description\": \"Randomness algorithms for JavaScript\",\n \"version\": \"3.3.0\",\n \"license\": \"AGPL-3.0\",\n \"author\": \"Aurélien Ooms \",\n \"homepage\": \"https://aureooms.github.io/js-random\",\n \"repository\": {\n \"url\": \"https://github.com/aureooms/js-random\",\n \"type\": \"git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/aureooms/js-random/issues\"\n },\n \"keywords\": [\n \"javascript\",\n \"js\",\n \"randfloat\",\n \"randint\",\n \"random\",\n \"randomness\",\n \"sample\",\n \"shuffle\"\n ],\n \"sideEffects\": false,\n \"source\": \"src/index.js\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.module.js\",\n \"esmodule\": \"dist/index.modern.js\",\n \"umd:main\": \"dist/index.umd.js\",\n \"unpkg\": \"dist/index.umd.js\",\n \"exports\": {\n \".\": {\n \"browser\": \"./dist/index.module.js\",\n \"umd\": \"./dist/index.umd.js\",\n \"require\": \"./dist/index.js\",\n \"default\": \"./dist/index.modern.js\"\n }\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"NODE_ENV=production microbundle\",\n \"build-docs\": \"esdoc\",\n \"build-gh-pages\": \"npm run build-docs\",\n \"ci:test\": \"npm run lint-config && npm run lint && npm run cover\",\n \"commit-msg\": \"commitlint --edit\",\n \"cover\": \"NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test\",\n \"debug\": \"NODE_ENV=debug npm run test -- -st --fail-fast\",\n \"dev\": \"npm run lint-config-and-fix && npm run lint-and-fix && npm run cover -- -- -st --fail-fast\",\n \"install-hooks\": \"husky install\",\n \"lint\": \"xo\",\n \"lint-and-fix\": \"npm run lint -- --fix\",\n \"lint-config\": \"fixpack --dryRun\",\n \"lint-config-and-fix\": \"fixpack || fixpack\",\n \"postinstall\": \"npm run install-hooks\",\n \"postpublish\": \"pinst --enable\",\n \"precommit\": \"lint-staged\",\n \"prepare\": \"npm run build\",\n \"prepublishOnly\": \"pinst --disable\",\n \"release\": \"np --message ':hatching_chick: release: Bumping to v%s.'\",\n \"test\": \"ava\"\n },\n \"dependencies\": {},\n \"devDependencies\": {\n \"@aureooms/js-array\": \"4.0.0\",\n \"@aureooms/js-compare\": \"^2.0.1\",\n \"@aureooms/js-functools\": \"2.0.3\",\n \"@aureooms/js-itertools\": \"5.1.0\",\n \"@aureooms/js-memory\": \"4.0.0\",\n \"@aureooms/js-type\": \"1.0.4\",\n \"@babel/core\": \"7.13.14\",\n \"@babel/preset-env\": \"7.13.12\",\n \"@babel/register\": \"7.13.14\",\n \"@commitlint/cli\": \"12.1.1\",\n \"@js-library/commitlint-config\": \"0.0.4\",\n \"ava\": \"3.15.0\",\n \"babel-plugin-transform-remove-console\": \"6.9.4\",\n \"babel-plugin-unassert\": \"3.0.1\",\n \"babel-preset-power-assert\": \"3.0.0\",\n \"c8\": \"7.7.0\",\n \"coveralls\": \"3.1.0\",\n \"esdoc\": \"1.1.0\",\n \"esdoc-inject-script-plugin\": \"1.0.0\",\n \"esdoc-inject-style-plugin\": \"1.0.0\",\n \"esdoc-standard-plugin\": \"1.0.0\",\n \"fixpack\": \"4.0.0\",\n \"husky\": \"6.0.0\",\n \"lint-staged\": \"10.5.4\",\n \"microbundle\": \"0.13.0\",\n \"np\": \"7.4.0\",\n \"pinst\": \"2.1.6\",\n \"power-assert\": \"1.6.1\",\n \"regenerator-runtime\": \"0.13.7\",\n \"xo\": \"0.38.2\"\n },\n \"ava\": {\n \"files\": [\n \"test/src/**/*\"\n ],\n \"require\": [\n \"regenerator-runtime/runtime\",\n \"@babel/register\"\n ],\n \"timeout\": \"1m\",\n \"concurrency\": 8\n },\n \"babel\": {\n \"sourceMaps\": true,\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": \"current node\"\n }\n ]\n ],\n \"plugins\": [\n [\n \"transform-remove-console\",\n {\n \"exclude\": [\n \"log\",\n \"error\",\n \"warn\"\n ]\n }\n ]\n ],\n \"env\": {\n \"debug\": {\n \"presets\": [\n \"babel-preset-power-assert\"\n ],\n \"plugins\": [\n [\n \"transform-remove-console\",\n {\n \"exclude\": [\n \"debug\",\n \"log\",\n \"error\",\n \"warn\"\n ]\n }\n ]\n ]\n },\n \"test\": {\n \"presets\": [\n \"babel-preset-power-assert\"\n ]\n },\n \"development\": {\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": [\n \"defaults\",\n \"maintained node versions\"\n ]\n }\n ],\n \"babel-preset-power-assert\"\n ]\n },\n \"production\": {\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": [\n \"defaults\",\n \"maintained node versions\"\n ]\n }\n ]\n ],\n \"plugins\": [\n \"babel-plugin-unassert\"\n ]\n },\n \"cover\": {\n \"sourceMaps\": \"both\",\n \"presets\": [\n \"babel-preset-power-assert\"\n ]\n }\n }\n },\n \"lint-staged\": {\n \"*.js\": [\n \"npm run lint-and-fix\"\n ],\n \"package.json\": [\n \"npm run lint-config-and-fix\"\n ]\n },\n \"prettier\": {\n \"trailingComma\": \"all\"\n },\n \"xo\": {\n \"prettier\": true,\n \"plugins\": [\n \"unicorn\"\n ],\n \"rules\": {\n \"unicorn/filename-case\": \"off\",\n \"camelcase\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n \"no-constant-condition\": \"off\",\n \"unicorn/prefer-math-trunc\": \"off\",\n \"unicorn/no-new-array\": \"off\",\n \"no-negated-condition\": \"off\"\n },\n \"overrides\": [\n {\n \"files\": [\n \"doc/**\"\n ],\n \"env\": \"browser\"\n }\n ]\n }\n}\n", + "content": "{\n \"name\": \"@aureooms/js-random\",\n \"description\": \"Randomness algorithms for JavaScript\",\n \"version\": \"3.4.0\",\n \"license\": \"AGPL-3.0\",\n \"author\": \"Aurélien Ooms \",\n \"homepage\": \"https://aureooms.github.io/js-random\",\n \"repository\": {\n \"url\": \"https://github.com/aureooms/js-random\",\n \"type\": \"git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/aureooms/js-random/issues\"\n },\n \"keywords\": [\n \"javascript\",\n \"js\",\n \"randfloat\",\n \"randint\",\n \"random\",\n \"randomness\",\n \"sample\",\n \"shuffle\"\n ],\n \"sideEffects\": false,\n \"source\": \"src/index.js\",\n \"main\": \"dist/index.js\",\n \"module\": \"dist/index.module.js\",\n \"esmodule\": \"dist/index.modern.js\",\n \"umd:main\": \"dist/index.umd.js\",\n \"unpkg\": \"dist/index.umd.js\",\n \"exports\": {\n \".\": {\n \"browser\": \"./dist/index.module.js\",\n \"umd\": \"./dist/index.umd.js\",\n \"require\": \"./dist/index.js\",\n \"default\": \"./dist/index.modern.js\"\n }\n },\n \"files\": [\n \"dist\"\n ],\n \"scripts\": {\n \"build\": \"NODE_ENV=production microbundle\",\n \"build-docs\": \"esdoc\",\n \"build-gh-pages\": \"npm run build-docs\",\n \"ci:test\": \"npm run lint-config && npm run lint && npm run cover\",\n \"commit-msg\": \"commitlint --edit\",\n \"cover\": \"NODE_ENV=cover c8 --all --src src --reporter lcov --reporter text-summary --reporter text npm test\",\n \"debug\": \"NODE_ENV=debug npm run test -- -st --fail-fast\",\n \"dev\": \"npm run lint-config-and-fix && npm run lint-and-fix && npm run cover -- -- -st --fail-fast\",\n \"install-hooks\": \"husky install\",\n \"lint\": \"xo\",\n \"lint-and-fix\": \"npm run lint -- --fix\",\n \"lint-config\": \"fixpack --dryRun\",\n \"lint-config-and-fix\": \"fixpack || fixpack\",\n \"postinstall\": \"npm run install-hooks\",\n \"postpublish\": \"pinst --enable\",\n \"precommit\": \"lint-staged\",\n \"prepare\": \"npm run build\",\n \"prepublishOnly\": \"pinst --disable\",\n \"release\": \"np --message ':hatching_chick: release: Bumping to v%s.'\",\n \"test\": \"ava\"\n },\n \"dependencies\": {},\n \"devDependencies\": {\n \"@aureooms/js-array\": \"4.0.0\",\n \"@aureooms/js-compare\": \"2.0.1\",\n \"@aureooms/js-functools\": \"2.0.3\",\n \"@aureooms/js-itertools\": \"5.1.0\",\n \"@aureooms/js-memory\": \"4.0.0\",\n \"@aureooms/js-red-black-tree\": \"^9.0.0\",\n \"@aureooms/js-type\": \"1.0.4\",\n \"@babel/core\": \"7.13.14\",\n \"@babel/preset-env\": \"7.13.12\",\n \"@babel/register\": \"7.13.14\",\n \"@commitlint/cli\": \"12.1.1\",\n \"@js-library/commitlint-config\": \"0.0.4\",\n \"ava\": \"3.15.0\",\n \"babel-plugin-transform-remove-console\": \"6.9.4\",\n \"babel-plugin-unassert\": \"3.0.1\",\n \"babel-preset-power-assert\": \"3.0.0\",\n \"c8\": \"7.7.1\",\n \"coveralls\": \"3.1.0\",\n \"esdoc\": \"1.1.0\",\n \"esdoc-inject-script-plugin\": \"1.0.0\",\n \"esdoc-inject-style-plugin\": \"1.0.0\",\n \"esdoc-standard-plugin\": \"1.0.0\",\n \"fixpack\": \"4.0.0\",\n \"husky\": \"6.0.0\",\n \"lint-staged\": \"10.5.4\",\n \"microbundle\": \"0.13.0\",\n \"np\": \"7.4.0\",\n \"pinst\": \"2.1.6\",\n \"power-assert\": \"1.6.1\",\n \"regenerator-runtime\": \"0.13.7\",\n \"xo\": \"0.38.2\"\n },\n \"ava\": {\n \"files\": [\n \"test/src/**/*\"\n ],\n \"require\": [\n \"regenerator-runtime/runtime\",\n \"@babel/register\"\n ],\n \"timeout\": \"1m\",\n \"concurrency\": 8\n },\n \"babel\": {\n \"sourceMaps\": true,\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": \"current node\"\n }\n ]\n ],\n \"plugins\": [\n [\n \"transform-remove-console\",\n {\n \"exclude\": [\n \"log\",\n \"error\",\n \"warn\"\n ]\n }\n ]\n ],\n \"env\": {\n \"debug\": {\n \"presets\": [\n \"babel-preset-power-assert\"\n ],\n \"plugins\": [\n [\n \"transform-remove-console\",\n {\n \"exclude\": [\n \"debug\",\n \"log\",\n \"error\",\n \"warn\"\n ]\n }\n ]\n ]\n },\n \"test\": {\n \"presets\": [\n \"babel-preset-power-assert\"\n ]\n },\n \"development\": {\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": [\n \"defaults\",\n \"maintained node versions\"\n ]\n }\n ],\n \"babel-preset-power-assert\"\n ]\n },\n \"production\": {\n \"presets\": [\n [\n \"@babel/preset-env\",\n {\n \"targets\": [\n \"defaults\",\n \"maintained node versions\"\n ]\n }\n ]\n ],\n \"plugins\": [\n \"babel-plugin-unassert\"\n ]\n },\n \"cover\": {\n \"sourceMaps\": \"both\",\n \"presets\": [\n \"babel-preset-power-assert\"\n ]\n }\n }\n },\n \"lint-staged\": {\n \"*.js\": [\n \"npm run lint-and-fix\"\n ],\n \"package.json\": [\n \"npm run lint-config-and-fix\"\n ]\n },\n \"prettier\": {\n \"trailingComma\": \"all\"\n },\n \"xo\": {\n \"prettier\": true,\n \"plugins\": [\n \"unicorn\"\n ],\n \"rules\": {\n \"unicorn/filename-case\": \"off\",\n \"camelcase\": \"off\",\n \"unicorn/prevent-abbreviations\": \"off\",\n \"no-constant-condition\": \"off\",\n \"unicorn/prefer-math-trunc\": \"off\",\n \"unicorn/no-new-array\": \"off\",\n \"no-negated-condition\": \"off\"\n },\n \"overrides\": [\n {\n \"files\": [\n \"doc/**\"\n ],\n \"env\": \"browser\"\n }\n ]\n }\n}\n", "longname": "/home/runner/work/js-random/js-random/package.json", "name": "package.json", "static": true, diff --git a/script/search_index.js b/script/search_index.js index 86fe0f5..0326aa3 100644 --- a/script/search_index.js +++ b/script/search_index.js @@ -35,6 +35,12 @@ window.esdocSearchIndex = [ "_shuffle @aureooms/js-random/src/kernel/_shuffle.js", "function" ], + [ + "@aureooms/js-random/src/kernel/_waterman.js~_waterman", + "function/index.html#static-function-_waterman", + "_waterman @aureooms/js-random/src/kernel/_waterman.js", + "function" + ], [ "@aureooms/js-random/src/api/choice.js~choice", "variable/index.html#static-variable-choice", @@ -65,6 +71,12 @@ window.esdocSearchIndex = [ "randrange @aureooms/js-random/src/api/randrange.js", "function" ], + [ + "@aureooms/js-random/src/api/reservoir.js~reservoir", + "variable/index.html#static-variable-reservoir", + "reservoir @aureooms/js-random/src/api/reservoir.js", + "variable" + ], [ "@aureooms/js-random/src/api/sample.js~sample", "variable/index.html#static-variable-sample", @@ -395,6 +407,12 @@ window.esdocSearchIndex = [ "src/api/randrange.js", "file" ], + [ + "src/api/reservoir.js", + "file/src/api/reservoir.js.html", + "src/api/reservoir.js", + "file" + ], [ "src/api/sample.js", "file/src/api/sample.js.html", @@ -454,5 +472,11 @@ window.esdocSearchIndex = [ "file/src/kernel/_shuffle.js.html", "src/kernel/_shuffle.js", "file" + ], + [ + "src/kernel/_waterman.js", + "file/src/kernel/_waterman.js.html", + "src/kernel/_waterman.js", + "file" ] ] \ No newline at end of file diff --git a/source.html b/source.html index 9fcef39..b0d011a 100644 --- a/source.html +++ b/source.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,11 +44,12 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • -

    Source 14/14

    +

    Source 16/16

    @@ -68,7 +70,7 @@ - + @@ -76,7 +78,7 @@ - + @@ -84,7 +86,7 @@ - + @@ -92,7 +94,7 @@ - + @@ -100,7 +102,15 @@ - + + + + + + + + + @@ -108,7 +118,7 @@ - + @@ -116,7 +126,7 @@ - + @@ -124,15 +134,15 @@ - + - - - + + + @@ -140,7 +150,7 @@ - + @@ -148,7 +158,7 @@ - + @@ -156,7 +166,7 @@ - + @@ -164,7 +174,7 @@ - + @@ -172,7 +182,7 @@ - + @@ -180,7 +190,15 @@ - + + + + + + + + +
    100 %1/1 369 byte 142021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/randfloat.js100 %1/1 456 byte 152021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/randint.js100 %1/1 450 byte 152021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/random.js100 %1/1 176 byte 92021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/randrange.js100 %1/1 1125 byte 322021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/reservoir.jsreservoir100 %1/1386 byte142021-04-05 20:51:23 (UTC)
    src/api/sample.js100 %1/1 536 byte 162021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/shuffle.js100 %1/1 406 byte 132021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/api/shuffled.js100 %1/1 423 byte 132021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/index.js - -816 byte142021-04-03 20:27:03 (UTC)933 byte162021-04-05 20:51:23 (UTC)
    src/kernel/_choice.js100 %1/1 539 byte 242021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_fisheryates.js100 %1/1 2114 byte 572021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_fisheryates_inside_out.js100 %1/1 2464 byte 622021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_randfloat.js100 %1/1 689 byte 232021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_randint.js100 %1/1 693 byte 232021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_shuffle.js100 %1/1 551 byte 202021-04-03 20:27:03 (UTC)2021-04-05 20:51:23 (UTC)
    src/kernel/_waterman.js_waterman100 %1/12804 byte772021-04-05 20:51:23 (UTC)
    diff --git a/variable/index.html b/variable/index.html index 9ff8277..482e0ac 100644 --- a/variable/index.html +++ b/variable/index.html @@ -34,6 +34,7 @@
  • Vchoice
  • Vrandfloat
  • Vrandint
  • +
  • Vreservoir
  • Vsample
  • Vshuffle
  • Vshuffled
  • @@ -43,6 +44,7 @@
  • F_randfloat
  • F_randint
  • F_shuffle
  • +
  • F_waterman
  • @@ -147,6 +149,35 @@ + + + +
    +

    + + + + reservoir(k: number, iterable: Iterable, output: Array): Array: * +

    +
    +
    + + +

    Reservoir sampling.

    +
    +
    + + + + + + + + + public + + + @@ -409,6 +440,63 @@

    Return:

    +
    +
    +

    + public + + + + + + reservoir(k: number, iterable: Iterable, output: Array): Array: * + + + + source + +

    + + + + +

    Reservoir sampling.

    +
    + + + +
    +
    + +
    +

    Return:

    + + + + + + + +
    Array

    The output array.

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

    From 14e99c54276389fc05395e0ca37f8a2db337358f Mon Sep 17 00:00:00 2001 From: make-github-pseudonymous-again Date: Thu, 15 Jul 2021 13:11:50 +0000 Subject: [PATCH 14/15] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20ra?= =?UTF-8?q?ndomized-algorithm/random@0c7b2970b8da4761e57bbf326e9845e69238e?= =?UTF-8?q?ffd=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- file/src/api/choice.js.html | 6 +- file/src/api/randfloat.js.html | 6 +- file/src/api/randint.js.html | 6 +- file/src/api/random.js.html | 6 +- file/src/api/randrange.js.html | 6 +- file/src/api/reservoir.js.html | 6 +- file/src/api/sample.js.html | 6 +- file/src/api/shuffle.js.html | 6 +- file/src/api/shuffled.js.html | 6 +- file/src/index.js.html | 6 +- file/src/kernel/_choice.js.html | 6 +- file/src/kernel/_fisheryates.js.html | 6 +- .../kernel/_fisheryates_inside_out.js.html | 6 +- file/src/kernel/_randfloat.js.html | 6 +- file/src/kernel/_randint.js.html | 6 +- file/src/kernel/_shuffle.js.html | 6 +- file/src/kernel/_waterman.js.html | 6 +- function/index.html | 24 ++--- identifiers.html | 6 +- index.html | 40 ++++----- index.json | 88 +++++++++---------- inject/script/0-header.js | 4 +- manual/example.html | 8 +- manual/index.html | 18 ++-- manual/installation.html | 10 +-- manual/overview.html | 6 +- manual/usage.html | 12 +-- script/search_index.js | 64 +++++++------- source.html | 40 ++++----- variable/index.html | 20 ++--- 30 files changed, 221 insertions(+), 221 deletions(-) diff --git a/file/src/api/choice.js.html b/file/src/api/choice.js.html index 9696078..7a82f98 100644 --- a/file/src/api/choice.js.html +++ b/file/src/api/choice.js.html @@ -3,12 +3,12 @@ - src/api/choice.js | @aureooms/js-random + src/api/choice.js | @randomized/random - +
    @@ -24,7 +24,7 @@

      - +