Comparing version 0.22.1 to 0.23.0
@@ -11,4 +11,4 @@ # Ramda Bookmarklet | ||
```javascript | ||
javascript:!function(t,n){function r(r){var e=n.createElement("div"),u=n.body;e.innerHTML=r,e.style.position="fixed",e.style.top="20px",e.style.right="20px",e.style.padding="5px 10px",e.style.zIndex="1001",e.style.fontSize="18px",e.style.color="#222",e.style.backgroundColor="#DFF2BF",e.style.textAlign="center",e.style.border="solid 2px black",e.style.borderRadius="25px",u.appendChild(e),t.setTimeout(u.removeChild.bind(u,e),2500)}var e="???";return"undefined"!=typeof t.R?r("This page already using ramda"):(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,s){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,s,a){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,s,a,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},r=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},e=function(){return Array.prototype.slice.call(arguments)},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},a=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},f=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},l=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},p=function(t){return t},h=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return l("callee",t)}}(),g=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},y=Number.isInteger||function(t){return t<<0===t},m=function(t){return"[object Number]"===Object.prototype.toString.call(t)},v=function(t){return"[object Object]"===Object.prototype.toString.call(t)},b=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},w=function(t){return"[object String]"===Object.prototype.toString.call(t)},j=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)l(i,u)&&(n[i]=u[i]);r+=1}return n},A=function(t){return[t]},E=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},_=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},k=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},N=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},I=function Mu(t,n,r){switch(arguments.length){case 1:return Mu(t,0,t.length);case 2:return Mu(t,n,t.length);default:for(var e=[],u=0,i=Math.max(0,Math.min(t.length,r)-n);i>u;)e[u]=t[n+u],u+=1;return e}},q=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),C={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},W=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),T=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=I(n,r,r+t),r+=1;return u},F="function"==typeof Object.assign?Object.assign:S,P=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return g(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,I(arguments,0,r-1))}},R=function(t){return function n(r){return 0===arguments.length||b(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return b(r)?n:R(function(n){return t(r,n)});default:return b(r)&&b(e)?n:b(r)?R(function(n){return t(n,e)}):b(e)?R(function(n){return t(r,n)}):t(r,e)}}},M=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return b(r)?n:B(function(n,e){return t(r,n,e)});case 2:return b(r)&&b(e)?n:b(r)?B(function(n,r){return t(n,e,r)}):b(e)?B(function(n,e){return t(r,n,e)}):R(function(n){return t(r,e,n)});default:return b(r)&&b(e)&&b(u)?n:b(r)&&b(e)?B(function(n,r){return t(n,r,u)}):b(r)&&b(u)?B(function(n,r){return t(n,e,r)}):b(e)&&b(u)?B(function(n,e){return t(r,n,e)}):b(r)?R(function(n){return t(n,e,u)}):b(e)?R(function(n){return t(r,n,u)}):b(u)?R(function(n){return t(r,e,n)}):t(r,e,u)}}},L=function Lu(t,r,e){return function(){for(var u=[],i=0,o=t,c=0;c<r.length||i<arguments.length;){var s;c<r.length&&(!b(r[c])||i>=arguments.length)?s=r[c]:(s=arguments[i],i+=1),u[c]=s,b(s)||(o-=1),c+=1}return 0>=o?e.apply(this,u):n(o,Lu(t,u,e))}},U=function(t,n,r){return function(){var e=arguments.length;if(0===e)return r();var u=arguments[e-1];if(!g(u)){var i=I(arguments,0,e-1);if("function"==typeof u[t])return u[t].apply(u,i);if(j(u)){var o=n.apply(null,i);return o(u)}}return r.apply(this,arguments)}},z=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return I(n,0,r+1)},D=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=N(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=N(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(I(this.acc,this.pos),I(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=function(){return this.xf["@@transducer/init"]()},t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),nt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(l(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},L(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),et=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.i>=this.n?N(r):r},B(function(n,r){return new t(n,r)})}(),ut=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):N(t)},B(function(n,r){return new t(n,r)})}(),it=B(function(t,n){return Number(t)+Number(n)}),ot=M(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),ct=B(U("all",D,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),st=R(function(t){return function(){return t}}),at=B(function(t,n){return t&&n}),ft=B(U("any",V,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),lt=B(U("aperture",K,T)),pt=B(function(t,n){return o(n,[t])}),ht=B(function(t,n){return t.apply(this,n)}),gt=M(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),dt=M(function Uu(t,n,r){switch(t.length){case 0:return n;case 1:return gt(t[0],n,r);default:return gt(t[0],Uu(I(t,1),n,Object(r[t[0]])),r)}}),yt=B(function(t,r){return n(t.length,function(){return t.apply(r,arguments)})}),mt=M(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),vt=R(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),bt=B(function(t,r){return 1===t?R(r):n(t,L(t,[],r))}),xt=it(-1),wt=B(function(t,n){return null==n||n!==n?t:n}),jt=M(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),Ot=B(function(t,n){var r={};for(var e in n)e!==t&&(r[e]=n[e]);return r}),St=B(function zu(t,n){switch(t.length){case 0:return n;case 1:return Ot(t[0],n);default:var r=t[0],e=I(t,1);return null==n[r]?n:gt(r,zu(e,n[r]),n)}}),At=B(function(t,n){return t/n}),Et=B(U("dropWhile",Y,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return I(n,r)})),_t=R(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():g(t)?[]:w(t)?"":v(t)?{}:h(t)?function(){return arguments}():void 0}),kt=B(function Du(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):"object"===u?Du(t[e],n[e]):n[e];return i}),Nt=B(U("find",G,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),It=B(U("findIndex",J,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),qt=B(U("findLast",Q,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Ct=B(U("findLastIndex",tt,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Wt=B(P("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Tt=R(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Ft=B(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[e],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Pt=B(function(t,n){return t>n}),Rt=B(function(t,n){return t>=n}),Bt=B(l),Mt=B(function(t,n){return t in n}),Lt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Ut=R(p),zt=M(function(t,n,r){return bt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Dt=it(1),Vt=M(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=I(r);return e.splice(t,0,n),e}),Kt=M(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,o(o(I(r,0,t),n),I(r,t))}),Ht=B(P("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),$t=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Xt=R(function(t){return g(t)?!0:t?"object"!=typeof t?!1:w(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),Yt=R(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return R("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],s=r&&h(u);for(i in u)!l(i,u)||s&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],l(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=R(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Jt=R(function(t){return null!=t&&m(t.length)?t.length:NaN}),Qt=B(function(t,n){return n>t}),tn=B(function(t,n){return n>=t}),nn=M(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),rn=M(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(i[0],r[e]),u[e]=i[1],e-=1;return[i[0],u]}),en=B(function(t,n){return n.match(t)||[]}),un=B(function(t,n){return y(t)?!y(n)||1>n?NaN:(t%n+n)%n:NaN}),on=B(function(t,n){return n>t?n:t}),cn=M(function(t,n,r){return t(r)>t(n)?r:n}),sn=B(function(t,n){return F({},t,n)}),an=R(function(t){return F.apply(null,[{}].concat(t))}),fn=M(function(t,n,r){var e,u={};for(e in n)l(e,n)&&(u[e]=l(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)l(e,r)&&!l(e,u)&&(u[e]=r[e]);return u}),ln=B(function(t,n){return t>n?n:t}),pn=M(function(t,n,r){return t(r)<t(n)?r:n}),hn=B(function(t,n){return t%n}),gn=B(function(t,n){return t*n}),dn=B(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,s){return n.call(this,t,r,e,u,i,o,c,s)};case 9:return function(t,r,e,u,i,o,c,s,a){return n.call(this,t,r,e,u,i,o,c,s,a)};case 10:return function(t,r,e,u,i,o,c,s,a,f){return n.call(this,t,r,e,u,i,o,c,s,a,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),yn=R(function(t){return-t}),mn=B(i(U("any",V,ft))),vn=R(function(t){return!t}),bn=B(function(t,n){var r=0>t?n.length+t:t;return w(n)?n.charAt(r):n[r]}),xn=R(function(t){var n=0>t?1:t+1;return bt(n,function(){return bn(t,arguments)})}),wn=B(function(t,n){var r={};return r[t]=n,r}),jn=R(A),On=R(function(t){var r,e=!1;return n(t.length,function(){return e?r:(e=!0,r=t.apply(this,arguments))})}),Sn=B(function(t,n){return t||n}),An=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return M(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),En=B(function(t,n){return[t,n]}),_n=B(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),kn=M(function(t,n,r){return wt(t,_n(n,r))}),Nn=M(function(t,n,r){return n.length>0&&t(_n(n,r))}),In=B(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),qn=B(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Cn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Wn=B(function(t,n){return o([t],n)}),Tn=B(function(t,n){return n[t]}),Fn=M(function(t,n,r){return $t(t,r[n])}),Pn=M(function(t,n,r){return null!=r&&l(n,r)?r[n]:t}),Rn=M(function(t,n,r){return t(r[n])}),Bn=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Mn=B(function(t,n){if(!m(t)||!m(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Ln=M(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(n,r[e]),e-=1;return n}),Un=R(N),zn=M(function(t,n,r){return o(I(r,0,Math.min(t,r.length)),I(r,Math.min(r.length,t+n)))}),Dn=M(function(t,n,r){return r.replace(t,n)}),Vn=R(function(t){return w(t)?t.split("").reverse().join(""):I(t).reverse()}),Kn=M(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Hn=M(function(t,n,r){return An(t,st(n),r)}),$n=M(P("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Xn=B(function(t,n){return I(n).sort(t)}),Yn=B(function(t,n){return I(n).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Zn=B(function(t,n){return[$n(0,t,n),$n(t,Jt(n),n)]}),Gn=B(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push($n(e,e+=t,n));return r}),Jn=B(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,I(n,r)]}),Qn=B(function(t,n){return Number(t)-Number(n)}),tr=P("tail",$n(1,1/0)),nr=B(U("take",et,function(t,n){return $n(0,0>t?1/0:t,n)})),rr=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return I(n,r+1,1/0)}),er=B(U("takeWhile",ut,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return I(n,0,r)})),ur=B(function(t,n){return t(n),n}),ir=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),or=R(function(t){var n=[];for(var r in t)l(r,t)&&(n[n.length]=[r,t[r]]);return n}),cr=R(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),sr=R(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),ar=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return R(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),fr=B(function(t,r){return n(t.length,function(){try{return t.apply(this,arguments)}catch(n){return r.apply(this,o([n],arguments))}})}),lr=R(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),pr=R(function(t){return function(){return t(I(arguments))}}),hr=R(function(t){return dn(1,t)}),gr=B(function(t,n){return bt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,I(arguments,i,r)),e+=1,i=r;return u})}),dr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),yr=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),mr=M(function(t,n,r){return t(r)?r:n(r)}),vr=M(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),br=M(function(t,n,r){return ot(st(n),t,r)}),xr=B(function(t,n){return bt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(I(arguments,n.length)))})}),wr=R(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),jr=R(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Or=function(){var t=function(t){return{value:t,map:function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),Sr=M(function(t,n,r){return t(r)?n(r):r}),Ar=B(function(t,n){for(var r in t)if(l(r,t)&&!t[r](n[r]))return!1;return!0}),Er=B(function(t,n){return bt(t.length,function(){return n.apply(this,o([t],arguments))})}),_r=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),kr=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Nr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Ir=M(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),qr=st(!1),Cr=st(!0),Wr=function Vu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Vu(t[c],n,r,!0):t[c];return u};switch(lr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Tr=function(t){return B(function(r,e){return n(Math.max(0,r.length-e.length),function(){return r.apply(this,t(e,arguments))})})},Fr=function(t,n){return nr(t<n.length?n.length-t:0,n)},Pr=function Ku(t,n,e,u){if(Lt(t,n))return!0;if(lr(t)!==lr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(lr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===f(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Lt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Lt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ku(r(t.entries()),r(n.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=e.length-1;o>=0;){if(e[o]===t)return u[o]===n;o-=1}for(e.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!l(c,n)||!Ku(n[c],t[c],e,u))return!1;o-=1}return e.pop(),u.pop(),!0},Rr=function(t){return function n(r){for(var e,u,i,o=[],c=0,s=r.length;s>c;){if(Xt(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},Br=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(yt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=W(u)),Xt(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),Mr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":p},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":p},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return F(t,Xt(n)?wn(n[0],n[1]):n)},"@@transducer/result":p};return function(e){if(j(e))return e;if(Xt(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Lr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Br(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),Ur=R(function(t){return bt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=I(arguments);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),zr=R(function(t){return dn(2,t)}),Dr=R(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Wr(t,[],[],!0)}),Vr=R(function(t){return bt(t.length,t)}),Kr=B(U("drop",H,function(t,n){return $n(Math.max(0,t),1/0,n)})),Hr=B(U("dropLast",$,Fr)),$r=B(U("dropLastWhile",Lr,z)),Xr=B(function(t,n){return Pr(t,n,[],[])}),Yr=B(U("filter",Z,function(t,n){return v(n)?Br(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),Zr=R(Rr(!0)),Gr=R(function(t){return Vr(function(n,r){var e=I(arguments);return e[0]=r,e[1]=n,t.apply(this,e)})}),Jr=bn(0),Qr=$n(0,-1),te=M(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return yr(t,i)}),ne=M(function(t,n,r){return j(t)?Br(n(t),t["@@transducer/init"](),r):Br(n(Mr(t)),Wr(t,[],[],!1),r)}),re=R(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=l(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ee=R(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ue=R(function(t){return null!=t&&Xr(t,_t(t))}),ie=bn(-1),oe=B(function(t,n){if("function"!=typeof n.lastIndexOf||g(n)){for(var r=n.length-1;r>=0;){if(Xr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),ce=B(U("map",nt,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return bt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Br(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),se=B(function(t,n){return Br(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),ae=M(function(t,n,r){return fn(function(n,r,e){return t(r,e)},n,r)}),fe=Tr(o),le=Tr(Gr(o)),pe=M(function(t,n,r){return Xr(_n(t,r),n)}),he=B(function(t,n){return ce(Tn(t),n)}),ge=xr(O,[qn,Ut]),de=M(function(t,n,r){return Xr(n,r[t])}),ye=M(Br),me=L(4,[],U("reduceBy",rt,function(t,n,r,e){return Br(function(e,u){var i=r(u);return e[i]=t(l(i,e)?e[i]:n,u),e},{},e)})),ve=L(4,[],function(t,n,r,e){return Br(function(r,e){return t(r,e)?n(r,e):N(r)},r,e)}),be=B(function(t,n){return Yr(i(t),n)}),xe=B(function(t,n){return ir(st(t),n)}),we=ye(it,0),je=B(function(t,n){return Kr(t>=0?n.length-t:0,n)}),Oe=bt(4,function(t,n,r,e){return Br(t("function"==typeof n?W(n):n),r,e)}),Se=M(function(t,n,r){return yr(t,o(n,r))}),Ae=B(function(t,n){return Ar(ce(Xr,t),n)}),Ee=function(){var t=function(t){return{"@@transducer/init":C.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?a(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":C.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Xt(n)?Br(r,t,n):Br(r,t,[n])}}}}(),_e=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r;r+=1}return-1}if(n!==n){ | ||
for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Xr(t[r],n))return r;r+=1}return-1},ke=B(function(t,n){return ce(t,Ee(n))}),Ne=R(function(t){return bt(ye(on,0,he("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),Ie=R(function(t){return bt(ye(on,0,he("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),qe=B(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Br(function(t,r){return o(t,ce(r,n))},[],t)}),Ce=R(function Hu(t){return t=ce(function(t){return"function"==typeof t?t:Hu(t)},t),bt(ye(on,0,he("length",wr(t))),function(){var n=arguments;return ce(function(t){return ht(t,n)},t)})}),We=Vr(function(t){return t.apply(this,I(arguments,1))}),Te=B(U("chain",ke,function(t,n){return"function"==typeof n?function(){return n.call(this,t.apply(this,arguments)).apply(this,arguments)}:Rr(!1)(ce(t,n))})),Fe=R(function(t){var r=ye(on,0,ce(function(t){return t[0].length},t));return n(r,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Pe=B(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Vr(dn(t,function(t,r,e,u,i,o,c,s,a,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,s);case 9:return new n(t,r,e,u,i,o,c,s,a);case 10:return new n(t,r,e,u,i,o,c,s,a,f)}}))}),Re=B(function(t,n){return bt(ye(on,0,he("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Be=me(function(t,n){return t+1},0),Me=B(U("dropRepeatsWith",X,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(ie(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Le=M(function(t,n,r){return Xr(t(n),t(r))}),Ue=M(function(t,n,r){return Xr(n[t],r[t])}),ze=B(P("groupBy",me(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),De=me(function(t,n){return n},null),Ve=B(function(t,n){return"function"!=typeof n.indexOf||g(n)?_e(n,t,0):n.indexOf(t)}),Ke=R(function(t){return Re(e,t)}),He=B(function(t,n){return function(r){return function(e){return ce(function(t){return n(t,e)},r(t(e)))}}}),$e=R(function(t){return He(bn(t),br(t))}),Xe=R(function(t){return He(_n(t),dt(t))}),Ye=R(function(t){return He(Tn(t),gt(t))}),Ze=B(function(t,n){var r=bt(t,n);return bt(t,function(){return Br(qe,ce(r,arguments[0]),I(arguments,1))})}),Ge=R(function(t){return we(t)/t.length}),Je=R(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Ge(I(t).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),Qe=Ke([Yr,be]),tu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return n(arguments[0].length,ye(E,arguments[0],tr(arguments)))},nu=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return n(arguments[0].length,ye(_,arguments[0],tr(arguments)))},ru=ye(gn,1),eu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Ln(function(t,n){return qe(ce(Wn,n),t)},t([]),n)}),uu=M(function(t,n,r){return eu(t,ce(n,r))}),iu=Te(p),ou=function(t,n){return _e(n,t,0)>=0},cu=function $u(t,n){var r=function(r){var e=n.concat([t]);return ou(r,e)?"<Circular>":$u(r,e)},e=function(t,n){return O(function(n){return k(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,be(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):k(q(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":k(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},su=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return tu.apply(this,Vn(arguments))},au=function(){return su.apply(this,Wn(Ut,ce(Te,arguments)))},fu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return nu.apply(this,Vn(arguments))},lu=R(function(t){return Pe(t.length,t)}),pu=B(ou),hu=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)ou(t[e],n)||ou(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),gu=R(U("dropRepeats",X(Xr),Me(Xr))),du=R(function(t){return Ze(t.length,t)}),yu=B(function(t,n){var r={};for(var e in n)ou(e,t)||(r[e]=n[e]);return r}),mu=function(){return au.apply(this,Vn(arguments))},vu=R(function(t){return cu(t,[])}),bu=B(function(t,n){return be(Gr(ou)(t),n)}),xu=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u>e):r._nativeSet.has(t):i in r._items?ou(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?ou(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),wu=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:du(at)(t,n)}),ju=du(vn),Ou=B(function(t,n){if(null==t||!d(t.concat))throw new TypeError(vu(t)+' does not have a method named "concat"');if(g(t)&&!g(n))throw new TypeError(vu(n)+" is not an array");return t.concat(n)}),Su=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:du(Sn)(t,n)}),Au=B(function(t,n){return bt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,I(arguments,0,t));throw new TypeError(vu(r)+' does not have a method named "'+n+'"')})}),Eu=Au(1,"join"),_u=R(function(t){var r={};return n(t.length,function(){var n=vu(arguments);return l(n,r)||(r[n]=t.apply(this,arguments)),r[n]})}),ku=Au(1,"split"),Nu=B(function(t,n){return Ou(hu(t,n),hu(n,t))}),Iu=M(function(t,n,r){return Ou(jt(t,n,r),jt(t,r,n))}),qu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+vu(t));return u(t).test(n)}),Cu=Au(0,"toLowerCase"),Wu=Au(0,"toUpperCase"),Tu=B(function(t,n){for(var r,e,u=new xu,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Fu=Tu(Ut),Pu=B(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Fu(s(Gr(ou)(r),e))}),Ru=B(su(Fu,o)),Bu={F:qr,T:Cr,__:t,add:it,addIndex:Ur,adjust:ot,all:ct,allPass:Ne,always:st,and:at,any:ft,anyPass:Ie,ap:qe,aperture:lt,append:pt,apply:ht,applySpec:Ce,assoc:gt,assocPath:dt,binary:zr,bind:yt,both:wu,call:We,chain:Te,clamp:mt,clone:Dr,comparator:vt,complement:ju,compose:su,composeK:au,composeP:fu,concat:Ou,cond:Fe,construct:lu,constructN:Pe,contains:pu,converge:Re,countBy:Be,curry:Vr,curryN:bt,dec:xt,defaultTo:wt,difference:hu,differenceWith:jt,dissoc:Ot,dissocPath:St,divide:At,drop:Kr,dropLast:Hr,dropLastWhile:$r,dropRepeats:gu,dropRepeatsWith:Me,dropWhile:Et,either:Su,empty:_t,eqBy:Le,eqProps:Ue,equals:Xr,evolve:kt,filter:Yr,find:Nt,findIndex:It,findLast:qt,findLastIndex:Ct,flatten:Zr,flip:Gr,forEach:Wt,fromPairs:Tt,groupBy:ze,groupWith:Ft,gt:Pt,gte:Rt,has:Bt,hasIn:Mt,head:Jr,identical:Lt,identity:Ut,ifElse:zt,inc:Dt,indexBy:De,indexOf:Ve,init:Qr,insert:Vt,insertAll:Kt,intersection:Pu,intersectionWith:te,intersperse:Ht,into:ne,invert:re,invertObj:ee,invoker:Au,is:$t,isArrayLike:Xt,isEmpty:ue,isNil:Yt,join:Eu,juxt:Ke,keys:Zt,keysIn:Gt,last:ie,lastIndexOf:oe,length:Jt,lens:He,lensIndex:$e,lensPath:Xe,lensProp:Ye,lift:du,liftN:Ze,lt:Qt,lte:tn,map:ce,mapAccum:nn,mapAccumRight:rn,mapObjIndexed:se,match:en,mathMod:un,max:on,maxBy:cn,mean:Ge,median:Je,memoize:_u,merge:sn,mergeAll:an,mergeWith:ae,mergeWithKey:fn,min:ln,minBy:pn,modulo:hn,multiply:gn,nAry:dn,negate:yn,none:mn,not:vn,nth:bn,nthArg:xn,objOf:wn,of:jn,omit:yu,once:On,or:Sn,over:An,pair:En,partial:fe,partialRight:le,partition:Qe,path:_n,pathEq:pe,pathOr:kn,pathSatisfies:Nn,pick:In,pickAll:qn,pickBy:Cn,pipe:tu,pipeK:mu,pipeP:nu,pluck:he,prepend:Wn,product:ru,project:ge,prop:Tn,propEq:de,propIs:Fn,propOr:Pn,propSatisfies:Rn,props:Bn,range:Mn,reduce:ye,reduceBy:me,reduceRight:Ln,reduceWhile:ve,reduced:Un,reject:be,remove:zn,repeat:xe,replace:Dn,reverse:Vn,scan:Kn,sequence:eu,set:Hn,slice:$n,sort:Xn,sortBy:Yn,split:ku,splitAt:Zn,splitEvery:Gn,splitWhen:Jn,subtract:Qn,sum:we,symmetricDifference:Nu,symmetricDifferenceWith:Iu,tail:tr,take:nr,takeLast:je,takeLastWhile:rr,takeWhile:er,tap:ur,test:qu,times:ir,toLower:Cu,toPairs:or,toPairsIn:cr,toString:vu,toUpper:Wu,transduce:Oe,transpose:sr,traverse:uu,trim:ar,tryCatch:fr,type:lr,unapply:pr,unary:hr,uncurryN:gr,unfold:dr,union:Ru,unionWith:Se,uniq:Fu,uniqBy:Tu,uniqWith:yr,unless:mr,unnest:iu,until:vr,update:br,useWith:xr,values:wr,valuesIn:jr,view:Or,when:Sr,where:Ar,whereEq:Ae,without:bu,wrap:Er,xprod:_r,zip:kr,zipObj:Nr,zipWith:Ir};"object"==typeof exports?module.exports=Bu:"function"==typeof define&&define.amd?define(function(){return Bu}):this.R=Bu}.call(this),e="0.22.0",void r("Ramda v"+e+" loaded"))}(window,document); | ||
javascript:!function(t,n){function r(r){var e=n.createElement("div"),u=n.body;e.innerHTML=r,e.style.position="fixed",e.style.top="20px",e.style.right="20px",e.style.padding="5px 10px",e.style.zIndex="1001",e.style.fontSize="18px",e.style.color="#222",e.style.backgroundColor="#DFF2BF",e.style.textAlign="center",e.style.border="solid 2px black",e.style.borderRadius="25px",u.appendChild(e),t.setTimeout(u.removeChild.bind(u,e),2500)}var e="???";return"undefined"!=typeof t.R?r("This page already using ramda"):(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u},r=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},e=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},a=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},f=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},l=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},p=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},h=function(t){return t},g=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return p("callee",t)}}(),y=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},m=Number.isInteger||function(t){return t<<0===t},v=function(t){return"[object Number]"===Object.prototype.toString.call(t)},b=function(t){return"[object Object]"===Object.prototype.toString.call(t)},w=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},A=function(t){return"[object String]"===Object.prototype.toString.call(t)},j=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)p(i,u)&&(n[i]=u[i]);r+=1}return n},E=function(t){return[t]},_=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},k=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},N=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},I=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},q=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),C={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},T=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),W="function"==typeof Object.assign?Object.assign:S,F=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return y(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},P=function(t){return function n(r){return 0===arguments.length||w(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return w(r)?n:P(function(n){return t(r,n)});default:return w(r)&&w(e)?n:w(r)?P(function(n){return t(n,e)}):w(e)?P(function(n){return t(r,n)}):t(r,e)}}},R=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return w(r)?n:B(function(n,e){return t(r,n,e)});case 2:return w(r)&&w(e)?n:w(r)?B(function(n,r){return t(n,e,r)}):w(e)?B(function(n,e){return t(r,n,e)}):P(function(n){return t(r,e,n)});default:return w(r)&&w(e)&&w(u)?n:w(r)&&w(e)?B(function(n,r){return t(n,r,u)}):w(r)&&w(u)?B(function(n,r){return t(n,e,r)}):w(e)&&w(u)?B(function(n,e){return t(r,n,e)}):w(r)?P(function(n){return t(n,e,u)}):w(e)?P(function(n){return t(r,n,u)}):w(u)?P(function(n){return t(r,e,n)}):t(r,e,u)}}},U=function Mu(t,n,e){return function(){for(var u=[],i=0,o=t,c=0;c<n.length||i<arguments.length;){var a;c<n.length&&(!w(n[c])||i>=arguments.length)?a=n[c]:(a=arguments[i],i+=1),u[c]=a,w(a)||(o-=1),c+=1}return 0>=o?e.apply(this,u):r(o,Mu(t,u,e))}},M=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!y(u)){for(var i=0;i<t.length;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(j(u)){var o=n.apply(null,e);return o(u)}}return r.apply(this,arguments)}},L=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=I(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),z=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=I(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),D=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(p(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},U(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),nt=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.i>=this.n?I(r):r},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=C.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):I(t)},B(function(n,r){return new t(n,r)})}(),et=B(function(t,n){return Number(t)+Number(n)}),ut=R(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),it=B(M(["all"],L,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),ot=P(function(t){return function(){return t}}),ct=B(function(t,n){return t&&n}),at=B(M(["any"],z,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),st=B(M([],D,n)),ft=B(function(t,n){return o(n,[t])}),lt=B(function(t,n){return t.apply(this,n)}),pt=R(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),ht=R(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),gt=R(function Lu(t,n,r){if(0===t.length)return n;var e=t[0];if(t.length>1){var u=p(e,r)?r[e]:m(t[1])?[]:{};n=Lu(Array.prototype.slice.call(t,1),n,u)}if(m(e)&&y(r)){var i=[].concat(r);return i[e]=n,i}return ht(e,n,r)}),yt=B(function(t,n){return r(t.length,function(){return t.apply(n,arguments)})}),dt=R(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),mt=P(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),vt=B(function(t,n){return 1===t?P(n):r(t,U(t,[],n))}),bt=et(-1),wt=B(function(t,n){return null==n||n!==n?t:n}),xt=R(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),At=R(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),jt=B(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),Ot=B(function zu(t,n){switch(t.length){case 0:return n;case 1:return jt(t[0],n);default:var r=t[0],e=Array.prototype.slice.call(t,1);return null==n[r]?n:ht(r,zu(e,n[r]),n)}}),St=B(function(t,n){return t/n}),Et=B(M(["dropWhile"],$,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),_t=P(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():y(t)?[]:A(t)?"":b(t)?{}:g(t)?function(){return arguments}():void 0}),kt=B(function Du(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):r&&"object"===u?Du(r,n[e]):n[e];return i}),Nt=B(M(["find"],Y,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),It=B(M([],Z,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),qt=B(M([],G,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Ct=B(M([],J,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Tt=B(F("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Wt=P(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Ft=B(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[e],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Pt=B(function(t,n){return t>n}),Bt=B(function(t,n){return t>=n}),Rt=B(p),Ut=B(function(t,n){return t in n}),Mt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=P(h),zt=R(function(t,n,r){return vt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Dt=et(1),Vt=R(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),Kt=R(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),Ht=B(F("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),$t=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Xt=P(function(t){return y(t)?!0:t?"object"!=typeof t?!1:A(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),Yt=P(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return P("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&g(u);for(i in u)!p(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],p(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=P(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Jt=P(function(t){return null!=t&&v(t.length)?t.length:NaN}),Qt=B(function(t,n){return n>t}),tn=B(function(t,n){return n>=t}),nn=R(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),rn=R(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),en=B(function(t,n){return n.match(t)||[]}),un=B(function(t,n){return m(t)?!m(n)||1>n?NaN:(t%n+n)%n:NaN}),on=B(function(t,n){return n>t?n:t}),cn=R(function(t,n,r){return t(r)>t(n)?r:n}),an=B(function(t,n){return W({},t,n)}),sn=P(function(t){return W.apply(null,[{}].concat(t))}),fn=R(function(t,n,r){var e,u={};for(e in n)p(e,n)&&(u[e]=p(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)p(e,r)&&!p(e,u)&&(u[e]=r[e]);return u}),ln=B(function(t,n){return t>n?n:t}),pn=R(function(t,n,r){return t(r)<t(n)?r:n}),hn=B(function(t,n){return t%n}),gn=B(function(t,n){return t*n}),yn=B(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.call(this,t,r,e,u,i,o,c,a,s)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.call(this,t,r,e,u,i,o,c,a,s,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),dn=P(function(t){return-t}),mn=B(i(M(["any"],z,at))),vn=P(function(t){return!t}),bn=B(function(t,n){var r=0>t?n.length+t:t;return A(n)?n.charAt(r):n[r]}),wn=P(function(t){var n=0>t?1:t+1;return vt(n,function(){return bn(t,arguments)})}),xn=B(function(t,n){var r={};return r[t]=n,r}),An=P(E),jn=P(function(t){var n,e=!1;return r(t.length,function(){return e?n:(e=!0,n=t.apply(this,arguments))})}),On=B(function(t,n){return t||n}),Sn=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return R(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),En=B(function(t,n){return[t,n]}),_n=B(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),kn=R(function(t,n,r){return wt(t,_n(n,r))}),Nn=R(function(t,n,r){return n.length>0&&t(_n(n,r))}),In=B(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),qn=B(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Cn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Tn=B(function(t,n){return o([t],n)}),Wn=B(function(t,n){return n[t]}),Fn=R(function(t,n,r){return $t(t,r[n])}),Pn=R(function(t,n,r){return null!=r&&p(n,r)?r[n]:t}),Bn=R(function(t,n,r){return t(r[n])}),Rn=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Un=B(function(t,n){if(!v(t)||!v(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Mn=R(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),Ln=P(I),zn=R(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),Dn=R(function(t,n,r){return r.replace(t,n)}),Vn=P(function(t){return A(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Kn=R(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),Hn=R(function(t,n,r){return Sn(t,ot(n),r)}),$n=R(F("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Xn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),Yn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Zn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&u<t.length;)e=t[u](n,r),u+=1;return e})}),Gn=B(function(t,n){return[$n(0,t,n),$n(t,Jt(n),n)]}),Jn=B(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push($n(e,e+=t,n));return r}),Qn=B(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),tr=B(function(t,n){return Number(t)-Number(n)}),nr=P(F("tail",$n(1,1/0))),rr=B(M(["take"],nt,function(t,n){return $n(0,0>t?1/0:t,n)})),er=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),ur=B(M(["takeWhile"],rt,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),ir=B(function(t,n){return t(n),n}),or=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),cr=P(function(t){var n=[];for(var r in t)p(r,t)&&(n[n.length]=[r,t[r]]);return n}),ar=P(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),sr=P(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),fr=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return P(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),lr=B(function(t,n){return r(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,o([r],arguments))}})}),pr=P(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),hr=P(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),gr=P(function(t){return yn(1,t)}),yr=B(function(t,n){return vt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),dr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),mr=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),vr=R(function(t,n,r){return t(r)?r:n(r)}),br=R(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),wr=R(function(t,n,r){return ut(ot(n),t,r)}),xr=B(function(t,n){return vt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Ar=P(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),jr=P(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Or=function(){var t=function(t){return{value:t,map:function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),Sr=R(function(t,n,r){return t(r)?n(r):r}),Er=B(function(t,n){for(var r in t)if(p(r,t)&&!t[r](n[r]))return!1;return!0}),_r=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),kr=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Nr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Ir=R(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),qr=ot(!1),Cr=ot(!0),Tr=function Vu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Vu(t[c],n,r,!0):t[c];return u};switch(pr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Wr=function(t){return B(function(n,e){return r(Math.max(0,n.length-e.length),function(){return n.apply(this,t(e,arguments))})})},Fr=function(t,n){return rr(t<n.length?n.length-t:0,n)},Pr=function Ku(t,n,r,u){if(Mt(t,n))return!0;if(pr(t)!==pr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(pr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===l(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ku(e(t.entries()),e(n.entries()),r,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=r.length-1;o>=0;){if(r[o]===t)return u[o]===n;o-=1}for(r.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!p(c,n)||!Ku(n[c],t[c],r,u))return!1;o-=1}return r.pop(),u.pop(),!0},Br=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(Xt(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},Rr=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(yt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=T(u)),Xt(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),Ur=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":h},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":h},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return W(t,Xt(n)?xn(n[0],n[1]):n)},"@@transducer/result":h};return function(e){if(j(e))return e;if(Xt(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Mr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=C.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Rr(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),Lr=P(function(t){return vt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),zr=P(function(t){return yn(2,t)}),Dr=P(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Tr(t,[],[],!0)}),Vr=P(function(t){return vt(t.length,t)}),Kr=B(M(["drop"],V,function(t,n){return $n(Math.max(0,t),1/0,n)})),Hr=B(M([],K,Fr)),$r=B(M([],Mr,a)),Xr=B(function(t,n){return Pr(t,n,[],[])}),Yr=B(M(["filter"],X,function(t,n){return b(n)?Rr(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),Zr=P(Br(!0)),Gr=P(function(t){return Vr(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),Jr=B(function(t,n){for(var r=Zt(n),e=0;e<r.length;){var u=r[e];t(n[u],u,n),e+=1}return n}),Qr=bn(0),te=$n(0,-1),ne=R(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return mr(t,i)}),re=R(function(t,n,r){return j(t)?Rr(n(t),t["@@transducer/init"](),r):Rr(n(Ur(t)),Tr(t,[],[],!1),r)}),ee=P(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=p(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ue=P(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ie=P(function(t){return null!=t&&Xr(t,_t(t))}),oe=bn(-1),ce=B(function(t,n){if("function"!=typeof n.lastIndexOf||y(n)){for(var r=n.length-1;r>=0;){if(Xr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),ae=B(M(["map"],Q,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return vt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Rr(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),se=B(function(t,n){return Rr(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),fe=R(function(t,n,r){return fn(function(n,r,e){return t(r,e)},n,r)}),le=Wr(o),pe=Wr(Gr(o)),he=R(function(t,n,r){return Xr(_n(t,r),n)}),ge=B(function(t,n){return ae(Wn(t),n)}),ye=xr(O,[qn,Lt]),de=R(function(t,n,r){return Xr(n,r[t])}),me=R(Rr),ve=U(4,[],M([],tt,function(t,n,r,e){return Rr(function(e,u){var i=r(u);return e[i]=t(p(i,e)?e[i]:n,u),e},{},e)})),be=U(4,[],function(t,n,r,e){return Rr(function(r,e){return t(r,e)?n(r,e):I(r)},r,e)}),we=B(function(t,n){return Yr(i(t),n)}),xe=B(function(t,n){return or(ot(t),n)}),Ae=me(et,0),je=B(function(t,n){return Kr(t>=0?n.length-t:0,n)}),Oe=vt(4,function(t,n,r,e){return Rr(t("function"==typeof n?T(n):n),r,e)}),Se=R(function(t,n,r){return mr(t,o(n,r))}),Ee=B(function(t,n){return Er(ae(Xr,t),n)}),_e=function(){var t=function(t){return{"@@transducer/init":C.init,"@@transducer/result":function(n){return t["@@transducer/result"](n); | ||
},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?f(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":C.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Xt(n)?Rr(r,t,n):Rr(r,t,[n])}}}}(),ke=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r;r+=1}return-1}if(n!==n){for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Xr(t[r],n))return r;r+=1}return-1},Ne=B(function(t,n){return ae(t,_e(n))}),Ie=P(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),qe=P(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),Ce=B(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Rr(function(t,r){return o(t,ae(r,n))},[],t)}),Te=P(function Hu(t){return t=ae(function(t){return"function"==typeof t?t:Hu(t)},t),vt(me(on,0,ge("length",Ar(t))),function(){var n=arguments;return ae(function(t){return lt(t,n)},t)})}),We=Vr(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),Fe=B(M(["chain"],Ne,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:Br(!1)(ae(t,n))})),Pe=P(function(t){var n=me(on,0,ae(function(t){return t[0].length},t));return r(n,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Be=B(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Vr(yn(t,function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}}))}),Re=B(function(t,n){return vt(me(on,0,ge("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Ue=ve(function(t,n){return t+1},0),Me=B(M([],H,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(oe(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Le=R(function(t,n,r){return Xr(t(n),t(r))}),ze=R(function(t,n,r){return Xr(n[t],r[t])}),De=B(F("groupBy",ve(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),Ve=ve(function(t,n){return n},null),Ke=B(function(t,n){return"function"!=typeof n.indexOf||y(n)?ke(n,t,0):n.indexOf(t)}),He=P(function(t){return Re(function(){return Array.prototype.slice.call(arguments,0)},t)}),$e=B(function(t,n){return function(r){return function(e){return ae(function(t){return n(t,e)},r(t(e)))}}}),Xe=P(function(t){return $e(bn(t),wr(t))}),Ye=P(function(t){return $e(_n(t),gt(t))}),Ze=P(function(t){return $e(Wn(t),ht(t))}),Ge=B(function(t,n){var r=vt(t,n);return vt(t,function(){return Rr(Ce,ae(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Je=P(function(t){return Ae(t)/t.length}),Qe=P(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Je(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),tu=He([Yr,we]),nu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,me(_,arguments[0],nr(arguments)))},ru=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,me(k,arguments[0],nr(arguments)))},eu=me(gn,1),uu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Mn(function(t,n){return Ce(ae(Tn,t),n)},t([]),n)}),iu=R(function(t,n,r){return uu(t,ae(n,r))}),ou=Fe(h),cu=function(t,n){return ke(n,t,0)>=0},au=function $u(t,n){var r=function(r){var e=n.concat([t]);return cu(r,e)?"<Circular>":$u(r,e)},e=function(t,n){return O(function(n){return N(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,we(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):N(q(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":N(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},su=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return nu.apply(this,Vn(arguments))},fu=function(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return su(su.apply(this,ae(Fe,t)),n)},lu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return ru.apply(this,Vn(arguments))},pu=P(function(t){return Be(t.length,t)}),hu=B(cu),gu=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)cu(t[e],n)||cu(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),yu=P(M([],H(Xr),Me(Xr))),du=P(function(t){return Ge(t.length,t)}),mu=B(function(t,n){var r={};for(var e in n)cu(e,t)||(r[e]=n[e]);return r}),vu=function(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return fu.apply(this,Vn(arguments))},bu=P(function(t){return au(t,[])}),wu=B(function(t,n){return we(Gr(cu)(t),n)}),xu=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),Au=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:du(ct)(t,n)}),ju=du(vn),Ou=B(function(t,n){if(null==t||!d(t.concat))throw new TypeError(bu(t)+' does not have a method named "concat"');if(y(t)&&!y(n))throw new TypeError(bu(n)+" is not an array");return t.concat(n)}),Su=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:du(On)(t,n)}),Eu=B(function(t,n){return vt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(bu(r)+' does not have a method named "'+n+'"')})}),_u=Eu(1,"join"),ku=P(function(t){var n={};return r(t.length,function(){var r=bu(arguments);return p(r,n)||(n[r]=t.apply(this,arguments)),n[r]})}),Nu=Eu(1,"split"),Iu=B(function(t,n){return Ou(gu(t,n),gu(n,t))}),qu=R(function(t,n,r){return Ou(At(t,n,r),At(t,r,n))}),Cu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+bu(t));return u(t).test(n)}),Tu=Eu(0,"toLowerCase"),Wu=Eu(0,"toUpperCase"),Fu=B(function(t,n){for(var r,e,u=new xu,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Pu=Fu(Lt),Bu=B(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Pu(s(Gr(cu)(r),e))}),Ru=B(su(Pu,o)),Uu={F:qr,T:Cr,__:t,add:et,addIndex:Lr,adjust:ut,all:it,allPass:Ie,always:ot,and:ct,any:at,anyPass:qe,ap:Ce,aperture:st,append:ft,apply:lt,applySpec:Te,ascend:pt,assoc:ht,assocPath:gt,binary:zr,bind:yt,both:Au,call:We,chain:Fe,clamp:dt,clone:Dr,comparator:mt,complement:ju,compose:su,composeK:fu,composeP:lu,concat:Ou,cond:Pe,construct:pu,constructN:Be,contains:hu,converge:Re,countBy:Ue,curry:Vr,curryN:vt,dec:bt,defaultTo:wt,descend:xt,difference:gu,differenceWith:At,dissoc:jt,dissocPath:Ot,divide:St,drop:Kr,dropLast:Hr,dropLastWhile:$r,dropRepeats:yu,dropRepeatsWith:Me,dropWhile:Et,either:Su,empty:_t,eqBy:Le,eqProps:ze,equals:Xr,evolve:kt,filter:Yr,find:Nt,findIndex:It,findLast:qt,findLastIndex:Ct,flatten:Zr,flip:Gr,forEach:Tt,forEachObjIndexed:Jr,fromPairs:Wt,groupBy:De,groupWith:Ft,gt:Pt,gte:Bt,has:Rt,hasIn:Ut,head:Qr,identical:Mt,identity:Lt,ifElse:zt,inc:Dt,indexBy:Ve,indexOf:Ke,init:te,insert:Vt,insertAll:Kt,intersection:Bu,intersectionWith:ne,intersperse:Ht,into:re,invert:ee,invertObj:ue,invoker:Eu,is:$t,isArrayLike:Xt,isEmpty:ie,isNil:Yt,join:_u,juxt:He,keys:Zt,keysIn:Gt,last:oe,lastIndexOf:ce,length:Jt,lens:$e,lensIndex:Xe,lensPath:Ye,lensProp:Ze,lift:du,liftN:Ge,lt:Qt,lte:tn,map:ae,mapAccum:nn,mapAccumRight:rn,mapObjIndexed:se,match:en,mathMod:un,max:on,maxBy:cn,mean:Je,median:Qe,memoize:ku,merge:an,mergeAll:sn,mergeWith:fe,mergeWithKey:fn,min:ln,minBy:pn,modulo:hn,multiply:gn,nAry:yn,negate:dn,none:mn,not:vn,nth:bn,nthArg:wn,objOf:xn,of:An,omit:mu,once:jn,or:On,over:Sn,pair:En,partial:le,partialRight:pe,partition:tu,path:_n,pathEq:he,pathOr:kn,pathSatisfies:Nn,pick:In,pickAll:qn,pickBy:Cn,pipe:nu,pipeK:vu,pipeP:ru,pluck:ge,prepend:Tn,product:eu,project:ye,prop:Wn,propEq:de,propIs:Fn,propOr:Pn,propSatisfies:Bn,props:Rn,range:Un,reduce:me,reduceBy:ve,reduceRight:Mn,reduceWhile:be,reduced:Ln,reject:we,remove:zn,repeat:xe,replace:Dn,reverse:Vn,scan:Kn,sequence:uu,set:Hn,slice:$n,sort:Xn,sortBy:Yn,sortWith:Zn,split:Nu,splitAt:Gn,splitEvery:Jn,splitWhen:Qn,subtract:tr,sum:Ae,symmetricDifference:Iu,symmetricDifferenceWith:qu,tail:nr,take:rr,takeLast:je,takeLastWhile:er,takeWhile:ur,tap:ir,test:Cu,times:or,toLower:Tu,toPairs:cr,toPairsIn:ar,toString:bu,toUpper:Wu,transduce:Oe,transpose:sr,traverse:iu,trim:fr,tryCatch:lr,type:pr,unapply:hr,unary:gr,uncurryN:yr,unfold:dr,union:Ru,unionWith:Se,uniq:Pu,uniqBy:Fu,uniqWith:mr,unless:vr,unnest:ou,until:br,update:wr,useWith:xr,values:Ar,valuesIn:jr,view:Or,when:Sr,where:Er,whereEq:Ee,without:wu,xprod:_r,zip:kr,zipObj:Nr,zipWith:Ir};"object"==typeof exports?module.exports=Uu:"function"==typeof define&&define.amd?define(function(){return Uu}):this.R=Uu}.call(this),e="0.22.1",void r("Ramda v"+e+" loaded"))}(window,document); | ||
``` |
@@ -1,2 +0,2 @@ | ||
// Ramda v0.22.1 | ||
// Ramda v0.23.0 | ||
// https://github.com/ramda/ramda | ||
@@ -6,3 +6,3 @@ // (c) 2013-2016 Scott Sauyet, Michael Hurley, and David Chambers | ||
(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,s){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,s,a){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,s,a,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},r=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},e=function(){return Array.prototype.slice.call(arguments)},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},a=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},f=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},l=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},p=function(t){return t},h=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return l("callee",t)}}(),g=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},y=Number.isInteger||function(t){return t<<0===t},m=function(t){return"[object Number]"===Object.prototype.toString.call(t)},v=function(t){return"[object Object]"===Object.prototype.toString.call(t)},w=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},b=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},x=function(t){return"[object String]"===Object.prototype.toString.call(t)},j=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)l(i,u)&&(n[i]=u[i]);r+=1}return n},A=function(t){return[t]},E=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},_=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},k=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},N=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},I=function Mu(t,n,r){switch(arguments.length){case 1:return Mu(t,0,t.length);case 2:return Mu(t,n,t.length);default:for(var e=[],u=0,i=Math.max(0,Math.min(t.length,r)-n);i>u;)e[u]=t[n+u],u+=1;return e}},q=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),W={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},C=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),P=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=I(n,r,r+t),r+=1;return u},T="function"==typeof Object.assign?Object.assign:S,B=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return g(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,I(arguments,0,r-1))}},F=function(t){return function n(r){return 0===arguments.length||w(r)?n:t.apply(this,arguments)}},R=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return w(r)?n:F(function(n){return t(r,n)});default:return w(r)&&w(e)?n:w(r)?F(function(n){return t(n,e)}):w(e)?F(function(n){return t(r,n)}):t(r,e)}}},M=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return w(r)?n:R(function(n,e){return t(r,n,e)});case 2:return w(r)&&w(e)?n:w(r)?R(function(n,r){return t(n,e,r)}):w(e)?R(function(n,e){return t(r,n,e)}):F(function(n){return t(r,e,n)});default:return w(r)&&w(e)&&w(u)?n:w(r)&&w(e)?R(function(n,r){return t(n,r,u)}):w(r)&&w(u)?R(function(n,r){return t(n,e,r)}):w(e)&&w(u)?R(function(n,e){return t(r,n,e)}):w(r)?F(function(n){return t(n,e,u)}):w(e)?F(function(n){return t(r,n,u)}):w(u)?F(function(n){return t(r,e,n)}):t(r,e,u)}}},U=function Uu(t,r,e){return function(){for(var u=[],i=0,o=t,c=0;c<r.length||i<arguments.length;){var s;c<r.length&&(!w(r[c])||i>=arguments.length)?s=r[c]:(s=arguments[i],i+=1),u[c]=s,w(s)||(o-=1),c+=1}return 0>=o?e.apply(this,u):n(o,Uu(t,u,e))}},L=function(t,n,r){return function(){var e=arguments.length;if(0===e)return r();var u=arguments[e-1];if(!g(u)){var i=I(arguments,0,e-1);if("function"==typeof u[t])return u[t].apply(u,i);if(j(u)){var o=n.apply(null,i);return o(u)}}return r.apply(this,arguments)}},D=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return I(n,0,r+1)},z=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=N(this.xf["@@transducer/step"](t,!1))),t},R(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=N(this.xf["@@transducer/step"](t,!0))),t},R(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(I(this.acc,this.pos),I(this.acc,0,this.pos))},R(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},R(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},R(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=function(){return this.xf["@@transducer/init"]()},t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},R(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},R(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},R(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,n))),t},R(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=N(this.xf["@@transducer/step"](t,this.idx))),t},R(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},R(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},R(function(n,r){return new t(n,r)})}(),nt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},R(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(l(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},U(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),et=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.i>=this.n?N(r):r},R(function(n,r){return new t(n,r)})}(),ut=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):N(t)},R(function(n,r){return new t(n,r)})}(),it=R(function(t,n){return Number(t)+Number(n)}),ot=M(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),ct=R(L("all",z,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),st=F(function(t){return function(){return t}}),at=R(function(t,n){return t&&n}),ft=R(L("any",V,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),lt=R(L("aperture",K,P)),pt=R(function(t,n){return o(n,[t])}),ht=R(function(t,n){return t.apply(this,n)}),gt=M(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),dt=M(function Lu(t,n,r){switch(t.length){case 0:return n;case 1:return gt(t[0],n,r);default:return gt(t[0],Lu(I(t,1),n,Object(r[t[0]])),r)}}),yt=R(function(t,r){return n(t.length,function(){return t.apply(r,arguments)})}),mt=M(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),vt=F(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),wt=R(function(t,r){return 1===t?F(r):n(t,U(t,[],r))}),bt=it(-1),xt=R(function(t,n){return null==n||n!==n?t:n}),jt=M(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),Ot=R(function(t,n){var r={};for(var e in n)e!==t&&(r[e]=n[e]);return r}),St=R(function Du(t,n){switch(t.length){case 0:return n;case 1:return Ot(t[0],n);default:var r=t[0],e=I(t,1);return null==n[r]?n:gt(r,Du(e,n[r]),n)}}),At=R(function(t,n){return t/n}),Et=R(L("dropWhile",Y,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return I(n,r)})),_t=F(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():g(t)?[]:x(t)?"":v(t)?{}:h(t)?function(){return arguments}():void 0}),kt=R(function zu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):"object"===u?zu(t[e],n[e]):n[e];return i}),Nt=R(L("find",G,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),It=R(L("findIndex",J,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),qt=R(L("findLast",Q,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Wt=R(L("findLastIndex",tt,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Ct=R(B("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Pt=F(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Tt=R(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[e],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Bt=R(function(t,n){return t>n}),Ft=R(function(t,n){return t>=n}),Rt=R(l),Mt=R(function(t,n){return t in n}),Ut=R(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=F(p),Dt=M(function(t,n,r){return wt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),zt=it(1),Vt=M(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=I(r);return e.splice(t,0,n),e}),Kt=M(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,o(o(I(r,0,t),n),I(r,t))}),$t=R(B("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Ht=R(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Xt=F(function(t){return g(t)?!0:t?"object"!=typeof t?!1:x(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),Yt=F(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return F("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],s=r&&h(u);for(i in u)!l(i,u)||s&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],l(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=F(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Jt=F(function(t){return null!=t&&m(t.length)?t.length:NaN}),Qt=R(function(t,n){return n>t}),tn=R(function(t,n){return n>=t}),nn=M(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),rn=M(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(i[0],r[e]),u[e]=i[1],e-=1;return[i[0],u]}),en=R(function(t,n){return n.match(t)||[]}),un=R(function(t,n){return y(t)?!y(n)||1>n?NaN:(t%n+n)%n:NaN}),on=R(function(t,n){return n>t?n:t}),cn=M(function(t,n,r){return t(r)>t(n)?r:n}),sn=R(function(t,n){return T({},t,n)}),an=F(function(t){return T.apply(null,[{}].concat(t))}),fn=M(function(t,n,r){var e,u={};for(e in n)l(e,n)&&(u[e]=l(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)l(e,r)&&!l(e,u)&&(u[e]=r[e]);return u}),ln=R(function(t,n){return t>n?n:t}),pn=M(function(t,n,r){return t(r)<t(n)?r:n}),hn=R(function(t,n){return t%n}),gn=R(function(t,n){return t*n}),dn=R(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,s){return n.call(this,t,r,e,u,i,o,c,s)};case 9:return function(t,r,e,u,i,o,c,s,a){return n.call(this,t,r,e,u,i,o,c,s,a)};case 10:return function(t,r,e,u,i,o,c,s,a,f){return n.call(this,t,r,e,u,i,o,c,s,a,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),yn=F(function(t){return-t}),mn=R(i(L("any",V,ft))),vn=F(function(t){return!t}),wn=R(function(t,n){var r=0>t?n.length+t:t;return x(n)?n.charAt(r):n[r]}),bn=F(function(t){var n=0>t?1:t+1;return wt(n,function(){return wn(t,arguments)})}),xn=R(function(t,n){var r={};return r[t]=n,r}),jn=F(A),On=F(function(t){var r,e=!1;return n(t.length,function(){return e?r:(e=!0,r=t.apply(this,arguments))})}),Sn=R(function(t,n){return t||n}),An=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return M(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),En=R(function(t,n){return[t,n]}),_n=R(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),kn=M(function(t,n,r){return xt(t,_n(n,r))}),Nn=M(function(t,n,r){return n.length>0&&t(_n(n,r))}),In=R(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),qn=R(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Wn=R(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Cn=R(function(t,n){return o([t],n)}),Pn=R(function(t,n){return n[t]}),Tn=M(function(t,n,r){return Ht(t,r[n])}),Bn=M(function(t,n,r){return null!=r&&l(n,r)?r[n]:t}),Fn=M(function(t,n,r){return t(r[n])}),Rn=R(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Mn=R(function(t,n){if(!m(t)||!m(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Un=M(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(n,r[e]),e-=1;return n}),Ln=F(N),Dn=M(function(t,n,r){return o(I(r,0,Math.min(t,r.length)),I(r,Math.min(r.length,t+n)))}),zn=M(function(t,n,r){return r.replace(t,n)}),Vn=F(function(t){return x(t)?t.split("").reverse().join(""):I(t).reverse()}),Kn=M(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),$n=M(function(t,n,r){return An(t,st(n),r)}),Hn=M(B("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Xn=R(function(t,n){return I(n).sort(t)}),Yn=R(function(t,n){return I(n).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Zn=R(function(t,n){return[Hn(0,t,n),Hn(t,Jt(n),n)]}),Gn=R(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Hn(e,e+=t,n));return r}),Jn=R(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,I(n,r)]}),Qn=R(function(t,n){return Number(t)-Number(n)}),tr=B("tail",Hn(1,1/0)),nr=R(L("take",et,function(t,n){return Hn(0,0>t?1/0:t,n)})),rr=R(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return I(n,r+1,1/0)}),er=R(L("takeWhile",ut,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return I(n,0,r)})),ur=R(function(t,n){return t(n),n}),ir=R(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),or=F(function(t){var n=[];for(var r in t)l(r,t)&&(n[n.length]=[r,t[r]]);return n}),cr=F(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),sr=F(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),ar=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return F(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),fr=R(function(t,r){return n(t.length,function(){try{return t.apply(this,arguments)}catch(n){return r.apply(this,o([n],arguments))}})}),lr=F(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),pr=F(function(t){return function(){return t(I(arguments))}}),hr=F(function(t){return dn(1,t)}),gr=R(function(t,n){return wt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,I(arguments,i,r)),e+=1,i=r;return u})}),dr=R(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),yr=R(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),mr=M(function(t,n,r){return t(r)?r:n(r)}),vr=M(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),wr=M(function(t,n,r){return ot(st(n),t,r)}),br=R(function(t,n){return wt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(I(arguments,n.length)))})}),xr=F(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),jr=F(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Or=function(){var t=function(t){return{value:t,map:function(){return this}}};return R(function(n,r){return n(t)(r).value})}(),Sr=M(function(t,n,r){return t(r)?n(r):r}),Ar=R(function(t,n){for(var r in t)if(l(r,t)&&!t[r](n[r]))return!1;return!0}),Er=R(function(t,n){return wt(t.length,function(){return n.apply(this,o([t],arguments))})}),_r=R(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),kr=R(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Nr=R(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Ir=M(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),qr=st(!1),Wr=st(!0),Cr=function Vu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Vu(t[c],n,r,!0):t[c];return u};switch(lr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Pr=function(t){return R(function(r,e){return n(Math.max(0,r.length-e.length),function(){return r.apply(this,t(e,arguments))})})},Tr=function(t,n){return nr(t<n.length?n.length-t:0,n)},Br=function Ku(t,n,e,u){if(Ut(t,n))return!0;if(lr(t)!==lr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(lr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===f(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Ut(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Ut(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ku(r(t.entries()),r(n.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=e.length-1;o>=0;){if(e[o]===t)return u[o]===n;o-=1}for(e.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!l(c,n)||!Ku(n[c],t[c],e,u))return!1;o-=1}return e.pop(),u.pop(),!0},Fr=function(t){return function n(r){for(var e,u,i,o=[],c=0,s=r.length;s>c;){if(Xt(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},Rr=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(yt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=C(u)),Xt(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),Mr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":p},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":p},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return T(t,Xt(n)?xn(n[0],n[1]):n)},"@@transducer/result":p};return function(e){if(j(e))return e;if(Xt(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Ur=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Rr(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},R(function(n,r){return new t(n,r)})}(),Lr=F(function(t){return wt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=I(arguments);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),Dr=F(function(t){return dn(2,t)}),zr=F(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Cr(t,[],[],!0)}),Vr=F(function(t){return wt(t.length,t)}),Kr=R(L("drop",$,function(t,n){return Hn(Math.max(0,t),1/0,n)})),$r=R(L("dropLast",H,Tr)),Hr=R(L("dropLastWhile",Ur,D)),Xr=R(function(t,n){return Br(t,n,[],[])}),Yr=R(L("filter",Z,function(t,n){return v(n)?Rr(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),Zr=F(Fr(!0)),Gr=F(function(t){return Vr(function(n,r){var e=I(arguments);return e[0]=r,e[1]=n,t.apply(this,e)})}),Jr=wn(0),Qr=Hn(0,-1),te=M(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return yr(t,i)}),ne=M(function(t,n,r){return j(t)?Rr(n(t),t["@@transducer/init"](),r):Rr(n(Mr(t)),Cr(t,[],[],!1),r)}),re=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=l(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ee=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ue=F(function(t){return null!=t&&Xr(t,_t(t))}),ie=wn(-1),oe=R(function(t,n){if("function"!=typeof n.lastIndexOf||g(n)){for(var r=n.length-1;r>=0;){if(Xr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),ce=R(L("map",nt,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return wt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Rr(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),se=R(function(t,n){return Rr(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),ae=M(function(t,n,r){return fn(function(n,r,e){return t(r,e)},n,r)}),fe=Pr(o),le=Pr(Gr(o)),pe=M(function(t,n,r){return Xr(_n(t,r),n)}),he=R(function(t,n){return ce(Pn(t),n)}),ge=br(O,[qn,Lt]),de=M(function(t,n,r){return Xr(n,r[t])}),ye=M(Rr),me=U(4,[],L("reduceBy",rt,function(t,n,r,e){return Rr(function(e,u){var i=r(u);return e[i]=t(l(i,e)?e[i]:n,u),e},{},e)})),ve=U(4,[],function(t,n,r,e){return Rr(function(r,e){return t(r,e)?n(r,e):N(r)},r,e)}),we=R(function(t,n){return Yr(i(t),n)}),be=R(function(t,n){return ir(st(t),n)}),xe=ye(it,0),je=R(function(t,n){return Kr(t>=0?n.length-t:0,n)}),Oe=wt(4,function(t,n,r,e){return Rr(t("function"==typeof n?C(n):n),r,e)}),Se=M(function(t,n,r){return yr(t,o(n,r))}),Ae=R(function(t,n){return Ar(ce(Xr,t),n)}),Ee=function(){var t=function(t){return{"@@transducer/init":W.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?a(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":W.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Xt(n)?Rr(r,t,n):Rr(r,t,[n])}}}}(),_e=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r;r+=1}return-1}if(n!==n){for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Xr(t[r],n))return r;r+=1}return-1},ke=R(function(t,n){return ce(t,Ee(n))}),Ne=F(function(t){return wt(ye(on,0,he("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),Ie=F(function(t){return wt(ye(on,0,he("length",t)),function(){ | ||
for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),qe=R(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Rr(function(t,r){return o(t,ce(r,n))},[],t)}),We=F(function $u(t){return t=ce(function(t){return"function"==typeof t?t:$u(t)},t),wt(ye(on,0,he("length",xr(t))),function(){var n=arguments;return ce(function(t){return ht(t,n)},t)})}),Ce=Vr(function(t){return t.apply(this,I(arguments,1))}),Pe=R(L("chain",ke,function(t,n){return"function"==typeof n?function(){return n.call(this,t.apply(this,arguments)).apply(this,arguments)}:Fr(!1)(ce(t,n))})),Te=F(function(t){var r=ye(on,0,ce(function(t){return t[0].length},t));return n(r,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Be=R(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Vr(dn(t,function(t,r,e,u,i,o,c,s,a,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,s);case 9:return new n(t,r,e,u,i,o,c,s,a);case 10:return new n(t,r,e,u,i,o,c,s,a,f)}}))}),Fe=R(function(t,n){return wt(ye(on,0,he("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Re=me(function(t,n){return t+1},0),Me=R(L("dropRepeatsWith",X,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(ie(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Ue=M(function(t,n,r){return Xr(t(n),t(r))}),Le=M(function(t,n,r){return Xr(n[t],r[t])}),De=R(B("groupBy",me(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),ze=me(function(t,n){return n},null),Ve=R(function(t,n){return"function"!=typeof n.indexOf||g(n)?_e(n,t,0):n.indexOf(t)}),Ke=F(function(t){return Fe(e,t)}),$e=R(function(t,n){return function(r){return function(e){return ce(function(t){return n(t,e)},r(t(e)))}}}),He=F(function(t){return $e(wn(t),wr(t))}),Xe=F(function(t){return $e(_n(t),dt(t))}),Ye=F(function(t){return $e(Pn(t),gt(t))}),Ze=R(function(t,n){var r=wt(t,n);return wt(t,function(){return Rr(qe,ce(r,arguments[0]),I(arguments,1))})}),Ge=F(function(t){return xe(t)/t.length}),Je=F(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Ge(I(t).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),Qe=Ke([Yr,we]),tu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return n(arguments[0].length,ye(E,arguments[0],tr(arguments)))},nu=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return n(arguments[0].length,ye(_,arguments[0],tr(arguments)))},ru=ye(gn,1),eu=R(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Un(function(t,n){return qe(ce(Cn,n),t)},t([]),n)}),uu=M(function(t,n,r){return eu(t,ce(n,r))}),iu=Pe(p),ou=function(t,n){return _e(n,t,0)>=0},cu=function Hu(t,n){var r=function(r){var e=n.concat([t]);return ou(r,e)?"<Circular>":Hu(r,e)},e=function(t,n){return O(function(n){return k(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,we(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):k(q(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":k(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},su=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return tu.apply(this,Vn(arguments))},au=function(){return su.apply(this,Cn(Lt,ce(Pe,arguments)))},fu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return nu.apply(this,Vn(arguments))},lu=F(function(t){return Be(t.length,t)}),pu=R(ou),hu=R(function(t,n){for(var r=[],e=0,u=t.length;u>e;)ou(t[e],n)||ou(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),gu=F(L("dropRepeats",X(Xr),Me(Xr))),du=F(function(t){return Ze(t.length,t)}),yu=R(function(t,n){var r={};for(var e in n)ou(e,t)||(r[e]=n[e]);return r}),mu=function(){return au.apply(this,Vn(arguments))},vu=F(function(t){return cu(t,[])}),wu=R(function(t,n){return we(Gr(ou)(t),n)}),bu=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u>e):r._nativeSet.has(t):i in r._items?ou(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?ou(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),xu=R(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:du(at)(t,n)}),ju=du(vn),Ou=R(function(t,n){if(null==t||!d(t.concat))throw new TypeError(vu(t)+' does not have a method named "concat"');if(g(t)&&!g(n))throw new TypeError(vu(n)+" is not an array");return t.concat(n)}),Su=R(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:du(Sn)(t,n)}),Au=R(function(t,n){return wt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,I(arguments,0,t));throw new TypeError(vu(r)+' does not have a method named "'+n+'"')})}),Eu=Au(1,"join"),_u=F(function(t){var r={};return n(t.length,function(){var n=vu(arguments);return l(n,r)||(r[n]=t.apply(this,arguments)),r[n]})}),ku=Au(1,"split"),Nu=R(function(t,n){return Ou(hu(t,n),hu(n,t))}),Iu=M(function(t,n,r){return Ou(jt(t,n,r),jt(t,r,n))}),qu=R(function(t,n){if(!b(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+vu(t));return u(t).test(n)}),Wu=Au(0,"toLowerCase"),Cu=Au(0,"toUpperCase"),Pu=R(function(t,n){for(var r,e,u=new bu,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Tu=Pu(Lt),Bu=R(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Tu(s(Gr(ou)(r),e))}),Fu=R(su(Tu,o)),Ru={F:qr,T:Wr,__:t,add:it,addIndex:Lr,adjust:ot,all:ct,allPass:Ne,always:st,and:at,any:ft,anyPass:Ie,ap:qe,aperture:lt,append:pt,apply:ht,applySpec:We,assoc:gt,assocPath:dt,binary:Dr,bind:yt,both:xu,call:Ce,chain:Pe,clamp:mt,clone:zr,comparator:vt,complement:ju,compose:su,composeK:au,composeP:fu,concat:Ou,cond:Te,construct:lu,constructN:Be,contains:pu,converge:Fe,countBy:Re,curry:Vr,curryN:wt,dec:bt,defaultTo:xt,difference:hu,differenceWith:jt,dissoc:Ot,dissocPath:St,divide:At,drop:Kr,dropLast:$r,dropLastWhile:Hr,dropRepeats:gu,dropRepeatsWith:Me,dropWhile:Et,either:Su,empty:_t,eqBy:Ue,eqProps:Le,equals:Xr,evolve:kt,filter:Yr,find:Nt,findIndex:It,findLast:qt,findLastIndex:Wt,flatten:Zr,flip:Gr,forEach:Ct,fromPairs:Pt,groupBy:De,groupWith:Tt,gt:Bt,gte:Ft,has:Rt,hasIn:Mt,head:Jr,identical:Ut,identity:Lt,ifElse:Dt,inc:zt,indexBy:ze,indexOf:Ve,init:Qr,insert:Vt,insertAll:Kt,intersection:Bu,intersectionWith:te,intersperse:$t,into:ne,invert:re,invertObj:ee,invoker:Au,is:Ht,isArrayLike:Xt,isEmpty:ue,isNil:Yt,join:Eu,juxt:Ke,keys:Zt,keysIn:Gt,last:ie,lastIndexOf:oe,length:Jt,lens:$e,lensIndex:He,lensPath:Xe,lensProp:Ye,lift:du,liftN:Ze,lt:Qt,lte:tn,map:ce,mapAccum:nn,mapAccumRight:rn,mapObjIndexed:se,match:en,mathMod:un,max:on,maxBy:cn,mean:Ge,median:Je,memoize:_u,merge:sn,mergeAll:an,mergeWith:ae,mergeWithKey:fn,min:ln,minBy:pn,modulo:hn,multiply:gn,nAry:dn,negate:yn,none:mn,not:vn,nth:wn,nthArg:bn,objOf:xn,of:jn,omit:yu,once:On,or:Sn,over:An,pair:En,partial:fe,partialRight:le,partition:Qe,path:_n,pathEq:pe,pathOr:kn,pathSatisfies:Nn,pick:In,pickAll:qn,pickBy:Wn,pipe:tu,pipeK:mu,pipeP:nu,pluck:he,prepend:Cn,product:ru,project:ge,prop:Pn,propEq:de,propIs:Tn,propOr:Bn,propSatisfies:Fn,props:Rn,range:Mn,reduce:ye,reduceBy:me,reduceRight:Un,reduceWhile:ve,reduced:Ln,reject:we,remove:Dn,repeat:be,replace:zn,reverse:Vn,scan:Kn,sequence:eu,set:$n,slice:Hn,sort:Xn,sortBy:Yn,split:ku,splitAt:Zn,splitEvery:Gn,splitWhen:Jn,subtract:Qn,sum:xe,symmetricDifference:Nu,symmetricDifferenceWith:Iu,tail:tr,take:nr,takeLast:je,takeLastWhile:rr,takeWhile:er,tap:ur,test:qu,times:ir,toLower:Wu,toPairs:or,toPairsIn:cr,toString:vu,toUpper:Cu,transduce:Oe,transpose:sr,traverse:uu,trim:ar,tryCatch:fr,type:lr,unapply:pr,unary:hr,uncurryN:gr,unfold:dr,union:Fu,unionWith:Se,uniq:Tu,uniqBy:Pu,uniqWith:yr,unless:mr,unnest:iu,until:vr,update:wr,useWith:br,values:xr,valuesIn:jr,view:Or,when:Sr,where:Ar,whereEq:Ae,without:wu,wrap:Er,xprod:_r,zip:kr,zipObj:Nr,zipWith:Ir};"object"==typeof exports?module.exports=Ru:"function"==typeof define&&define.amd?define(function(){return Ru}):this.R=Ru}).call(this); | ||
(function(){"use strict";var t={"@@functional/placeholder":!0},n=function(t,n){for(var r=0,e=n.length-(t-1),u=new Array(e>=0?e:0);e>r;)u[r]=Array.prototype.slice.call(n,r,r+t),r+=1;return u},r=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,i){return n.apply(this,arguments)};case 6:return function(t,r,e,u,i,o){return n.apply(this,arguments)};case 7:return function(t,r,e,u,i,o,c){return n.apply(this,arguments)};case 8:return function(t,r,e,u,i,o,c,a){return n.apply(this,arguments)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.apply(this,arguments)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}},e=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},u=function(t){return new RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))},i=function(t){return function(){return!t.apply(this,arguments)}},o=function(t,n){t=t||[],n=n||[];var r,e=t.length,u=n.length,i=[];for(r=0;e>r;)i[i.length]=t[r],r+=1;for(r=0;u>r;)i[i.length]=n[r],r+=1;return i},c=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1},a=function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,0,r+1)},s=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},f=function(t){return{"@@transducer/value":t,"@@transducer/reduced":!0}},l=function(t){var n=String(t).match(/^function (\w*)/);return null==n?"":n[1]},p=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},h=function(t){return t},g=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return p("callee",t)}}(),y=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},d=function(t){return"[object Function]"===Object.prototype.toString.call(t)},m=Number.isInteger||function(t){return t<<0===t},v=function(t){return"[object Number]"===Object.prototype.toString.call(t)},w=function(t){return"[object Object]"===Object.prototype.toString.call(t)},b=function(t){return null!=t&&"object"==typeof t&&t["@@functional/placeholder"]===!0},x=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},A=function(t){return"[object String]"===Object.prototype.toString.call(t)},j=function(t){return"function"==typeof t["@@transducer/step"]},O=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u},S=function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var i in u)p(i,u)&&(n[i]=u[i]);r+=1}return n},E=function(t){return[t]},_=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}},k=function(t,n){return function(){var r=this;return t.apply(r,arguments).then(function(t){return n.call(r,t)})}},N=function(t){var n=t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+n.replace(/"/g,'\\"')+'"'},I=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},q=function(){var t=function(t){return(10>t?"0":"")+t};return"function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(n){return n.getUTCFullYear()+"-"+t(n.getUTCMonth()+1)+"-"+t(n.getUTCDate())+"T"+t(n.getUTCHours())+":"+t(n.getUTCMinutes())+":"+t(n.getUTCSeconds())+"."+(n.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"}}(),W={init:function(){return this.xf["@@transducer/init"]()},result:function(t){return this.xf["@@transducer/result"](t)}},C=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),P="function"==typeof Object.assign?Object.assign:S,T=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return y(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},F=function(t){return function n(r){return 0===arguments.length||b(r)?n:t.apply(this,arguments)}},B=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return b(r)?n:F(function(n){return t(r,n)});default:return b(r)&&b(e)?n:b(r)?F(function(n){return t(n,e)}):b(e)?F(function(n){return t(r,n)}):t(r,e)}}},U=function(t){return function n(r,e,u){switch(arguments.length){case 0:return n;case 1:return b(r)?n:B(function(n,e){return t(r,n,e)});case 2:return b(r)&&b(e)?n:b(r)?B(function(n,r){return t(n,e,r)}):b(e)?B(function(n,e){return t(r,n,e)}):F(function(n){return t(r,e,n)});default:return b(r)&&b(e)&&b(u)?n:b(r)&&b(e)?B(function(n,r){return t(n,r,u)}):b(r)&&b(u)?B(function(n,r){return t(n,e,r)}):b(e)&&b(u)?B(function(n,e){return t(r,n,e)}):b(r)?F(function(n){return t(n,e,u)}):b(e)?F(function(n){return t(r,n,u)}):b(u)?F(function(n){return t(r,e,n)}):t(r,e,u)}}},R=function Mu(t,n,e){return function(){for(var u=[],i=0,o=t,c=0;c<n.length||i<arguments.length;){var a;c<n.length&&(!b(n[c])||i>=arguments.length)?a=n[c]:(a=arguments[i],i+=1),u[c]=a,b(a)||(o-=1),c+=1}return 0>=o?e.apply(this,u):r(o,Mu(t,u,e))}},M=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!y(u)){for(var i=0;i<t.length;){if("function"==typeof u[t[i]])return u[t[i]].apply(u,e);i+=1}if(j(u)){var o=n.apply(null,e);return o(u)}}return r.apply(this,arguments)}},L=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=I(this.xf["@@transducer/step"](t,!1))),t},B(function(n,r){return new t(n,r)})}(),D=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=I(this.xf["@@transducer/step"](t,!0))),t},B(function(n,r){return new t(n,r)})}(),z=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.store(n),this.full?this.xf["@@transducer/step"](t,this.getCopy()):t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},t.prototype.getCopy=function(){return o(Array.prototype.slice.call(this.acc,this.pos),Array.prototype.slice.call(this.acc,0,this.pos))},B(function(n,r){return new t(n,r)})}(),V=function(){function t(t,n){this.xf=n,this.n=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.n>0?(this.n-=1,t):this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),K=function(){function t(t,n){this.xf=n,this.pos=0,this.full=!1,this.acc=new Array(t)}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.acc=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.full&&(t=this.xf["@@transducer/step"](t,this.acc[this.pos])),this.store(n),t},t.prototype.store=function(t){this.acc[this.pos]=t,this.pos+=1,this.pos===this.acc.length&&(this.pos=0,this.full=!0)},B(function(n,r){return new t(n,r)})}(),$=function(){function t(t,n){this.xf=n,this.pred=t,this.lastValue=void 0,this.seenFirstValue=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){var r=!1;return this.seenFirstValue?this.pred(this.lastValue,n)&&(r=!0):this.seenFirstValue=!0,this.lastValue=n,r?t:this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),H=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){if(this.f){if(this.f(n))return t;this.f=null}return this.xf["@@transducer/step"](t,n)},B(function(n,r){return new t(n,r)})}(),X=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},B(function(n,r){return new t(n,r)})}(),Y=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,n))),t},B(function(n,r){return new t(n,r)})}(),Z=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.found=!1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,-1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.found=!0,t=I(this.xf["@@transducer/step"](t,this.idx))),t},B(function(n,r){return new t(n,r)})}(),G=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.last))},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.last=n),t},B(function(n,r){return new t(n,r)})}(),J=function(){function t(t,n){this.xf=n,this.f=t,this.idx=-1,this.lastIdx=-1}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.xf["@@transducer/result"](this.xf["@@transducer/step"](t,this.lastIdx))},t.prototype["@@transducer/step"]=function(t,n){return this.idx+=1,this.f(n)&&(this.lastIdx=this.idx),t},B(function(n,r){return new t(n,r)})}(),Q=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},B(function(n,r){return new t(n,r)})}(),tt=function(){function t(t,n,r,e){this.valueFn=t,this.valueAcc=n,this.keyFn=r,this.xf=e,this.inputs={}}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){var n;for(n in this.inputs)if(p(n,this.inputs)&&(t=this.xf["@@transducer/step"](t,this.inputs[n]),t["@@transducer/reduced"])){t=t["@@transducer/value"];break}return this.inputs=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r=this.keyFn(n);return this.inputs[r]=this.inputs[r]||[r,this.valueAcc],this.inputs[r][1]=this.valueFn(this.inputs[r][1],n),t},R(4,[],function(n,r,e,u){return new t(n,r,e,u)})}(),nt=function(){function t(t,n){this.xf=n,this.n=t,this.i=0}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){this.i+=1;var r=0===this.n?t:this.xf["@@transducer/step"](t,n);return this.i>=this.n?I(r):r},B(function(n,r){return new t(n,r)})}(),rt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=W.result,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):I(t)},B(function(n,r){return new t(n,r)})}(),et=B(function(t,n){return Number(t)+Number(n)}),ut=U(function(t,n,r){if(n>=r.length||n<-r.length)return r;var e=0>n?r.length:0,u=e+n,i=o(r);return i[u]=t(r[u]),i}),it=B(M(["all"],L,function(t,n){for(var r=0;r<n.length;){if(!t(n[r]))return!1;r+=1}return!0})),ot=F(function(t){return function(){return t}}),ct=B(function(t,n){return t&&n}),at=B(M(["any"],D,function(t,n){for(var r=0;r<n.length;){if(t(n[r]))return!0;r+=1}return!1})),st=B(M([],z,n)),ft=B(function(t,n){return o(n,[t])}),lt=B(function(t,n){return t.apply(this,n)}),pt=U(function(t,n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0}),ht=U(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),gt=U(function Lu(t,n,r){if(0===t.length)return n;var e=t[0];if(t.length>1){var u=p(e,r)?r[e]:m(t[1])?[]:{};n=Lu(Array.prototype.slice.call(t,1),n,u)}if(m(e)&&y(r)){var i=[].concat(r);return i[e]=n,i}return ht(e,n,r)}),yt=B(function(t,n){return r(t.length,function(){return t.apply(n,arguments)})}),dt=U(function(t,n,r){if(t>n)throw new Error("min must not be greater than max in clamp(min, max, value)");return t>r?t:r>n?n:r}),mt=F(function(t){return function(n,r){return t(n,r)?-1:t(r,n)?1:0}}),vt=B(function(t,n){return 1===t?F(n):r(t,R(t,[],n))}),wt=et(-1),bt=B(function(t,n){return null==n||n!==n?t:n}),xt=U(function(t,n,r){var e=t(n),u=t(r);return e>u?-1:u>e?1:0}),At=U(function(t,n,r){for(var e=[],u=0,i=n.length;i>u;)c(t,n[u],r)||c(t,n[u],e)||e.push(n[u]),u+=1;return e}),jt=B(function(t,n){var r={};for(var e in n)r[e]=n[e];return delete r[t],r}),Ot=B(function Du(t,n){switch(t.length){case 0:return n;case 1:return jt(t[0],n);default:var r=t[0],e=Array.prototype.slice.call(t,1);return null==n[r]?n:ht(r,Du(e,n[r]),n)}}),St=B(function(t,n){return t/n}),Et=B(M(["dropWhile"],H,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,r)})),_t=F(function(t){return null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():y(t)?[]:A(t)?"":w(t)?{}:g(t)?function(){return arguments}():void 0}),kt=B(function zu(t,n){var r,e,u,i={};for(e in n)r=t[e],u=typeof r,i[e]="function"===u?r(n[e]):r&&"object"===u?zu(r,n[e]):n[e];return i}),Nt=B(M(["find"],Y,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),It=B(M([],Z,function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return r;r+=1}return-1})),qt=B(M([],G,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return n[r];r-=1}})),Wt=B(M([],J,function(t,n){for(var r=n.length-1;r>=0;){if(t(n[r]))return r;r-=1}return-1})),Ct=B(T("forEach",function(t,n){for(var r=n.length,e=0;r>e;)t(n[e]),e+=1;return n})),Pt=F(function(t){for(var n={},r=0;r<t.length;)n[t[r][0]]=t[r][1],r+=1;return n}),Tt=B(function(t,n){for(var r=[],e=0,u=n.length;u>e;){for(var i=e+1;u>i&&t(n[e],n[i]);)i+=1;r.push(n.slice(e,i)),e=i}return r}),Ft=B(function(t,n){return t>n}),Bt=B(function(t,n){return t>=n}),Ut=B(p),Rt=B(function(t,n){return t in n}),Mt=B(function(t,n){return t===n?0!==t||1/t===1/n:t!==t&&n!==n}),Lt=F(h),Dt=U(function(t,n,r){return vt(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),zt=et(1),Vt=U(function(t,n,r){t=t<r.length&&t>=0?t:r.length;var e=Array.prototype.slice.call(r,0);return e.splice(t,0,n),e}),Kt=U(function(t,n,r){return t=t<r.length&&t>=0?t:r.length,[].concat(Array.prototype.slice.call(r,0,t),n,Array.prototype.slice.call(r,t))}),$t=B(T("intersperse",function(t,n){for(var r=[],e=0,u=n.length;u>e;)e===u-1?r.push(n[e]):r.push(n[e],t),e+=1;return r})),Ht=B(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),Xt=F(function(t){return y(t)?!0:t?"object"!=typeof t?!1:A(t)?!1:1===t.nodeType?!!t.length:0===t.length?!0:t.length>0?t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1):!1:!1}),Yt=F(function(t){return null==t}),Zt=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;r<t.length;){if(t[r]===n)return!0;r+=1}return!1};return F("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var i,o,c=[],a=r&&g(u);for(i in u)!p(i,u)||a&&"length"===i||(c[c.length]=i);if(t)for(o=n.length-1;o>=0;)i=n[o],p(i,u)&&!e(c,i)&&(c[c.length]=i),o-=1;return c}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Gt=F(function(t){var n,r=[];for(n in t)r[r.length]=n;return r}),Jt=F(function(t){return null!=t&&v(t.length)?t.length:NaN}),Qt=B(function(t,n){return n>t}),tn=B(function(t,n){return n>=t}),nn=U(function(t,n,r){for(var e=0,u=r.length,i=[],o=[n];u>e;)o=t(o[0],r[e]),i[e]=o[1],e+=1;return[o[0],i]}),rn=U(function(t,n,r){for(var e=r.length-1,u=[],i=[n];e>=0;)i=t(r[e],i[0]),u[e]=i[1],e-=1;return[u,i[0]]}),en=B(function(t,n){return n.match(t)||[]}),un=B(function(t,n){return m(t)?!m(n)||1>n?NaN:(t%n+n)%n:NaN}),on=B(function(t,n){return n>t?n:t}),cn=U(function(t,n,r){return t(r)>t(n)?r:n}),an=B(function(t,n){return P({},t,n)}),sn=F(function(t){return P.apply(null,[{}].concat(t))}),fn=U(function(t,n,r){var e,u={};for(e in n)p(e,n)&&(u[e]=p(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)p(e,r)&&!p(e,u)&&(u[e]=r[e]);return u}),ln=B(function(t,n){return t>n?n:t}),pn=U(function(t,n,r){return t(r)<t(n)?r:n}),hn=B(function(t,n){return t%n}),gn=B(function(t,n){return t*n}),yn=B(function(t,n){switch(t){case 0:return function(){return n.call(this)};case 1:return function(t){return n.call(this,t)};case 2:return function(t,r){return n.call(this,t,r)};case 3:return function(t,r,e){return n.call(this,t,r,e)};case 4:return function(t,r,e,u){return n.call(this,t,r,e,u)};case 5:return function(t,r,e,u,i){return n.call(this,t,r,e,u,i)};case 6:return function(t,r,e,u,i,o){return n.call(this,t,r,e,u,i,o)};case 7:return function(t,r,e,u,i,o,c){return n.call(this,t,r,e,u,i,o,c)};case 8:return function(t,r,e,u,i,o,c,a){return n.call(this,t,r,e,u,i,o,c,a)};case 9:return function(t,r,e,u,i,o,c,a,s){return n.call(this,t,r,e,u,i,o,c,a,s)};case 10:return function(t,r,e,u,i,o,c,a,s,f){return n.call(this,t,r,e,u,i,o,c,a,s,f)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}}),dn=F(function(t){return-t}),mn=B(i(M(["any"],D,at))),vn=F(function(t){return!t}),wn=B(function(t,n){var r=0>t?n.length+t:t;return A(n)?n.charAt(r):n[r]}),bn=F(function(t){var n=0>t?1:t+1;return vt(n,function(){return wn(t,arguments)})}),xn=B(function(t,n){var r={};return r[t]=n,r}),An=F(E),jn=F(function(t){var n,e=!1;return r(t.length,function(){return e?n:(e=!0,n=t.apply(this,arguments))})}),On=B(function(t,n){return t||n}),Sn=function(){var t=function(n){return{value:n,map:function(r){return t(r(n))}}};return U(function(n,r,e){return n(function(n){return t(r(n))})(e).value})}(),En=B(function(t,n){return[t,n]}),_n=B(function(t,n){for(var r=n,e=0;e<t.length;){if(null==r)return;r=r[t[e]],e+=1}return r}),kn=U(function(t,n,r){return bt(t,_n(n,r))}),Nn=U(function(t,n,r){return n.length>0&&t(_n(n,r))}),In=B(function(t,n){for(var r={},e=0;e<t.length;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),qn=B(function(t,n){for(var r={},e=0,u=t.length;u>e;){var i=t[e];r[i]=n[i],e+=1}return r}),Wn=B(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),Cn=B(function(t,n){return o([t],n)}),Pn=B(function(t,n){return n[t]}),Tn=U(function(t,n,r){return Ht(t,r[n])}),Fn=U(function(t,n,r){return null!=r&&p(n,r)?r[n]:t}),Bn=U(function(t,n,r){return t(r[n])}),Un=B(function(t,n){for(var r=t.length,e=[],u=0;r>u;)e[u]=n[t[u]],u+=1;return e}),Rn=B(function(t,n){if(!v(t)||!v(n))throw new TypeError("Both arguments to range must be numbers");for(var r=[],e=t;n>e;)r.push(e),e+=1;return r}),Mn=U(function(t,n,r){for(var e=r.length-1;e>=0;)n=t(r[e],n),e-=1;return n}),Ln=F(I),Dn=U(function(t,n,r){var e=Array.prototype.slice.call(r,0);return e.splice(t,n),e}),zn=U(function(t,n,r){return r.replace(t,n)}),Vn=F(function(t){return A(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()}),Kn=U(function(t,n,r){for(var e=0,u=r.length,i=[n];u>e;)n=t(n,r[e]),i[e+1]=n,e+=1;return i}),$n=U(function(t,n,r){return Sn(t,ot(n),r)}),Hn=U(T("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),Xn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(t)}),Yn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){var e=t(n),u=t(r);return u>e?-1:e>u?1:0})}),Zn=B(function(t,n){return Array.prototype.slice.call(n,0).sort(function(n,r){for(var e=0,u=0;0===e&&u<t.length;)e=t[u](n,r),u+=1;return e})}),Gn=B(function(t,n){return[Hn(0,t,n),Hn(t,Jt(n),n)]}),Jn=B(function(t,n){if(0>=t)throw new Error("First argument to splitEvery must be a positive integer");for(var r=[],e=0;e<n.length;)r.push(Hn(e,e+=t,n));return r}),Qn=B(function(t,n){for(var r=0,e=n.length,u=[];e>r&&!t(n[r]);)u.push(n[r]),r+=1;return[u,Array.prototype.slice.call(n,r)]}),tr=B(function(t,n){return Number(t)-Number(n)}),nr=F(T("tail",Hn(1,1/0))),rr=B(M(["take"],nt,function(t,n){return Hn(0,0>t?1/0:t,n)})),er=B(function(t,n){for(var r=n.length-1;r>=0&&t(n[r]);)r-=1;return Array.prototype.slice.call(n,r+1)}),ur=B(M(["takeWhile"],rt,function(t,n){for(var r=0,e=n.length;e>r&&t(n[r]);)r+=1;return Array.prototype.slice.call(n,0,r)})),ir=B(function(t,n){return t(n),n}),or=B(function(t,n){var r,e=Number(n),u=0;if(0>e||isNaN(e))throw new RangeError("n must be a non-negative number");for(r=new Array(e);e>u;)r[u]=t(u),u+=1;return r}),cr=F(function(t){var n=[];for(var r in t)p(r,t)&&(n[n.length]=[r,t[r]]);return n}),ar=F(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),sr=F(function(t){for(var n=0,r=[];n<t.length;){for(var e=t[n],u=0;u<e.length;)"undefined"==typeof r[u]&&(r[u]=[]),r[u].push(e[u]),u+=1;n+=1}return r}),fr=function(){var t=" \n\f\r \u2028\u2029\ufeff",n="",r="function"==typeof String.prototype.trim;return F(r&&!t.trim()&&n.trim()?function(t){return t.trim()}:function(n){var r=new RegExp("^["+t+"]["+t+"]*"),e=new RegExp("["+t+"]["+t+"]*$");return n.replace(r,"").replace(e,"")})}(),lr=B(function(t,n){return r(t.length,function(){try{return t.apply(this,arguments)}catch(r){return n.apply(this,o([r],arguments))}})}),pr=F(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),hr=F(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}}),gr=F(function(t){return yn(1,t)}),yr=B(function(t,n){return vt(t,function(){for(var r,e=1,u=n,i=0;t>=e&&"function"==typeof u;)r=e===t?arguments.length:i+u.length,u=u.apply(this,Array.prototype.slice.call(arguments,i,r)),e+=1,i=r;return u})}),dr=B(function(t,n){for(var r=t(n),e=[];r&&r.length;)e[e.length]=r[0],r=t(r[1]);return e}),mr=B(function(t,n){for(var r,e=0,u=n.length,i=[];u>e;)r=n[e],c(t,r,i)||(i[i.length]=r),e+=1;return i}),vr=U(function(t,n,r){return t(r)?r:n(r)}),wr=U(function(t,n,r){for(var e=r;!t(e);)e=n(e);return e}),br=U(function(t,n,r){return ut(ot(n),t,r)}),xr=B(function(t,n){return vt(n.length,function(){for(var r=[],e=0;e<n.length;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Ar=F(function(t){for(var n=Zt(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),jr=F(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Or=function(){var t=function(t){return{value:t,map:function(){return this}}};return B(function(n,r){return n(t)(r).value})}(),Sr=U(function(t,n,r){return t(r)?n(r):r}),Er=B(function(t,n){for(var r in t)if(p(r,t)&&!t[r](n[r]))return!1;return!0}),_r=B(function(t,n){for(var r,e=0,u=t.length,i=n.length,o=[];u>e;){for(r=0;i>r;)o[o.length]=[t[e],n[r]],r+=1;e+=1}return o}),kr=B(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Nr=B(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Ir=U(function(t,n,r){for(var e=[],u=0,i=Math.min(n.length,r.length);i>u;)e[u]=t(n[u],r[u]),u+=1;return e}),qr=ot(!1),Wr=ot(!0),Cr=function Vu(t,n,r,e){var i=function(u){for(var i=n.length,o=0;i>o;){if(t===n[o])return r[o];o+=1}n[o+1]=t,r[o+1]=u;for(var c in t)u[c]=e?Vu(t[c],n,r,!0):t[c];return u};switch(pr(t)){case"Object":return i({});case"Array":return i([]);case"Date":return new Date(t.valueOf());case"RegExp":return u(t);default:return t}},Pr=function(t){return B(function(n,e){return r(Math.max(0,n.length-e.length),function(){return n.apply(this,t(e,arguments))})})},Tr=function(t,n){return rr(t<n.length?n.length-t:0,n)},Fr=function Ku(t,n,r,u){if(Mt(t,n))return!0;if(pr(t)!==pr(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(pr(t)){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===l(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!Mt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1;break;case"Map":case"Set":if(!Ku(e(t.entries()),e(n.entries()),r,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":break;case"ArrayBuffer":break;default:return!1}var i=Zt(t);if(i.length!==Zt(n).length)return!1;for(var o=r.length-1;o>=0;){if(r[o]===t)return u[o]===n;o-=1}for(r.push(t),u.push(n),o=i.length-1;o>=0;){var c=i[o];if(!p(c,n)||!Ku(n[c],t[c],r,u))return!1;o-=1}return r.pop(),u.pop(),!0},Br=function(t){return function n(r){for(var e,u,i,o=[],c=0,a=r.length;a>c;){if(Xt(r[c]))for(e=t?n(r[c]):r[c],i=0,u=e.length;u>i;)o[o.length]=e[i],i+=1;else o[o.length]=r[c];c+=1}return o}},Ur=function(){function t(t,n,r){for(var e=0,u=r.length;u>e;){if(n=t["@@transducer/step"](n,r[e]),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}function n(t,n,r){for(var e=r.next();!e.done;){if(n=t["@@transducer/step"](n,e.value),n&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function r(t,n,r){return t["@@transducer/result"](r.reduce(yt(t["@@transducer/step"],t),n))}var e="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(u,i,o){if("function"==typeof u&&(u=C(u)),Xt(o))return t(u,i,o);if("function"==typeof o.reduce)return r(u,i,o);if(null!=o[e])return n(u,i,o[e]());if("function"==typeof o.next)return n(u,i,o);throw new TypeError("reduce: list must be array or iterable")}}(),Rr=function(){var t={"@@transducer/init":Array,"@@transducer/step":function(t,n){return t.push(n),t},"@@transducer/result":h},n={"@@transducer/init":String,"@@transducer/step":function(t,n){return t+n},"@@transducer/result":h},r={"@@transducer/init":Object,"@@transducer/step":function(t,n){return P(t,Xt(n)?xn(n[0],n[1]):n)},"@@transducer/result":h};return function(e){if(j(e))return e;if(Xt(e))return t;if("string"==typeof e)return n;if("object"==typeof e)return r;throw new Error("Cannot create transformer for "+e)}}(),Mr=function(){function t(t,n){this.f=t,this.retained=[],this.xf=n}return t.prototype["@@transducer/init"]=W.init,t.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.retain(t,n):this.flush(t,n)},t.prototype.flush=function(t,n){return t=Ur(this.xf["@@transducer/step"],t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,n)},t.prototype.retain=function(t,n){return this.retained.push(n),t},B(function(n,r){return new t(n,r)})}(),Lr=F(function(t){return vt(t.length,function(){var n=0,r=arguments[0],e=arguments[arguments.length-1],u=Array.prototype.slice.call(arguments,0);return u[0]=function(){var t=r.apply(this,o(arguments,[n,e]));return n+=1,t},t.apply(this,u)})}),Dr=F(function(t){return yn(2,t)}),zr=F(function(t){return null!=t&&"function"==typeof t.clone?t.clone():Cr(t,[],[],!0)}),Vr=F(function(t){return vt(t.length,t)}),Kr=B(M(["drop"],V,function(t,n){return Hn(Math.max(0,t),1/0,n)})),$r=B(M([],K,Tr)),Hr=B(M([],Mr,a)),Xr=B(function(t,n){return Fr(t,n,[],[])}),Yr=B(M(["filter"],X,function(t,n){return w(n)?Ur(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Zt(n)):s(t,n)})),Zr=F(Br(!0)),Gr=F(function(t){return Vr(function(n,r){var e=Array.prototype.slice.call(arguments,0);return e[0]=r,e[1]=n,t.apply(this,e)})}),Jr=B(function(t,n){for(var r=Zt(n),e=0;e<r.length;){var u=r[e];t(n[u],u,n),e+=1}return n}),Qr=wn(0),te=Hn(0,-1),ne=U(function(t,n,r){var e,u;n.length>r.length?(e=n,u=r):(e=r,u=n);for(var i=[],o=0;o<u.length;)c(t,u[o],e)&&(i[i.length]=u[o]),o+=1;return mr(t,i)}),re=U(function(t,n,r){return j(t)?Ur(n(t),t["@@transducer/init"](),r):Ur(n(Rr(t)),Cr(t,[],[],!1),r)}),ee=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e],o=t[i],c=p(o,u)?u[o]:u[o]=[];c[c.length]=i,e+=1}return u}),ue=F(function(t){for(var n=Zt(t),r=n.length,e=0,u={};r>e;){var i=n[e];u[t[i]]=i,e+=1}return u}),ie=F(function(t){return null!=t&&Xr(t,_t(t))}),oe=wn(-1),ce=B(function(t,n){if("function"!=typeof n.lastIndexOf||y(n)){for(var r=n.length-1;r>=0;){if(Xr(n[r],t))return r;r-=1}return-1}return n.lastIndexOf(t)}),ae=B(M(["map"],Q,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return vt(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Ur(function(r,e){return r[e]=t(n[e]),r},{},Zt(n));default:return O(t,n)}})),se=B(function(t,n){return Ur(function(r,e){return r[e]=t(n[e],e,n),r},{},Zt(n))}),fe=U(function(t,n,r){return fn(function(n,r,e){return t(r,e)},n,r)}),le=Pr(o),pe=Pr(Gr(o)),he=U(function(t,n,r){return Xr(_n(t,r),n)}),ge=B(function(t,n){return ae(Pn(t),n)}),ye=xr(O,[qn,Lt]),de=U(function(t,n,r){return Xr(n,r[t])}),me=U(Ur),ve=R(4,[],M([],tt,function(t,n,r,e){return Ur(function(e,u){var i=r(u);return e[i]=t(p(i,e)?e[i]:n,u),e},{},e)})),we=R(4,[],function(t,n,r,e){return Ur(function(r,e){return t(r,e)?n(r,e):I(r)},r,e)}),be=B(function(t,n){return Yr(i(t),n)}),xe=B(function(t,n){return or(ot(t),n)}),Ae=me(et,0),je=B(function(t,n){return Kr(t>=0?n.length-t:0,n)}),Oe=vt(4,function(t,n,r,e){return Ur(t("function"==typeof n?C(n):n),r,e)}),Se=U(function(t,n,r){return mr(t,o(n,r))}),Ee=B(function(t,n){return Er(ae(Xr,t),n)}),_e=function(){var t=function(t){return{"@@transducer/init":W.init,"@@transducer/result":function(n){return t["@@transducer/result"](n)},"@@transducer/step":function(n,r){var e=t["@@transducer/step"](n,r);return e["@@transducer/reduced"]?f(e):e}}};return function(n){var r=t(n);return{"@@transducer/init":W.init,"@@transducer/result":function(t){return r["@@transducer/result"](t)},"@@transducer/step":function(t,n){return Xt(n)?Ur(r,t,n):Ur(r,t,[n])}}}}(),ke=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;r<t.length;){if(u=t[r],0===u&&1/u===e)return r; | ||
r+=1}return-1}if(n!==n){for(;r<t.length;){if(u=t[r],"number"==typeof u&&u!==u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;r<t.length;){if(Xr(t[r],n))return r;r+=1}return-1},Ne=B(function(t,n){return ae(t,_e(n))}),Ie=F(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),qe=F(function(t){return vt(me(on,0,ge("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),We=B(function(t,n){return"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:Ur(function(t,r){return o(t,ae(r,n))},[],t)}),Ce=F(function $u(t){return t=ae(function(t){return"function"==typeof t?t:$u(t)},t),vt(me(on,0,ge("length",Ar(t))),function(){var n=arguments;return ae(function(t){return lt(t,n)},t)})}),Pe=Vr(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),Te=B(M(["chain"],Ne,function(t,n){return"function"==typeof n?function(r){return t(n(r))(r)}:Br(!1)(ae(t,n))})),Fe=F(function(t){var n=me(on,0,ae(function(t){return t[0].length},t));return r(n,function(){for(var n=0;n<t.length;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})}),Be=B(function(t,n){if(t>10)throw new Error("Constructor with greater than ten arguments");return 0===t?function(){return new n}:Vr(yn(t,function(t,r,e,u,i,o,c,a,s,f){switch(arguments.length){case 1:return new n(t);case 2:return new n(t,r);case 3:return new n(t,r,e);case 4:return new n(t,r,e,u);case 5:return new n(t,r,e,u,i);case 6:return new n(t,r,e,u,i,o);case 7:return new n(t,r,e,u,i,o,c);case 8:return new n(t,r,e,u,i,o,c,a);case 9:return new n(t,r,e,u,i,o,c,a,s);case 10:return new n(t,r,e,u,i,o,c,a,s,f)}}))}),Ue=B(function(t,n){return vt(me(on,0,ge("length",n)),function(){var r=arguments,e=this;return t.apply(e,O(function(t){return t.apply(e,r)},n))})}),Re=ve(function(t,n){return t+1},0),Me=B(M([],$,function(t,n){var r=[],e=1,u=n.length;if(0!==u)for(r[0]=n[0];u>e;)t(oe(r),n[e])||(r[r.length]=n[e]),e+=1;return r})),Le=U(function(t,n,r){return Xr(t(n),t(r))}),De=U(function(t,n,r){return Xr(n[t],r[t])}),ze=B(T("groupBy",ve(function(t,n){return null==t&&(t=[]),t.push(n),t},null))),Ve=ve(function(t,n){return n},null),Ke=B(function(t,n){return"function"!=typeof n.indexOf||y(n)?ke(n,t,0):n.indexOf(t)}),$e=F(function(t){return Ue(function(){return Array.prototype.slice.call(arguments,0)},t)}),He=B(function(t,n){return function(r){return function(e){return ae(function(t){return n(t,e)},r(t(e)))}}}),Xe=F(function(t){return He(wn(t),br(t))}),Ye=F(function(t){return He(_n(t),gt(t))}),Ze=F(function(t){return He(Pn(t),ht(t))}),Ge=B(function(t,n){var r=vt(t,n);return vt(t,function(){return Ur(We,ae(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Je=F(function(t){return Ae(t)/t.length}),Qe=F(function(t){var n=t.length;if(0===n)return NaN;var r=2-n%2,e=(n-r)/2;return Je(Array.prototype.slice.call(t,0).sort(function(t,n){return n>t?-1:t>n?1:0}).slice(e,e+r))}),tu=$e([Yr,be]),nu=function(){if(0===arguments.length)throw new Error("pipe requires at least one argument");return r(arguments[0].length,me(_,arguments[0],nr(arguments)))},ru=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,me(k,arguments[0],nr(arguments)))},eu=me(gn,1),uu=B(function(t,n){return"function"==typeof n.sequence?n.sequence(t):Mn(function(t,n){return We(ae(Cn,t),n)},t([]),n)}),iu=U(function(t,n,r){return uu(t,ae(n,r))}),ou=Te(h),cu=function(t,n){return ke(n,t,0)>=0},au=function Hu(t,n){var r=function(r){var e=n.concat([t]);return cu(r,e)?"<Circular>":Hu(r,e)},e=function(t,n){return O(function(n){return N(n)+": "+r(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(t)){case"[object Arguments]":return"(function() { return arguments; }("+O(r,t).join(", ")+"))";case"[object Array]":return"["+O(r,t).concat(e(t,be(function(t){return/^\d+$/.test(t)},Zt(t)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof t?"new Boolean("+r(t.valueOf())+")":t.toString();case"[object Date]":return"new Date("+(isNaN(t.valueOf())?r(NaN):N(q(t)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof t?"new Number("+r(t.valueOf())+")":1/t===-(1/0)?"-0":t.toString(10);case"[object String]":return"object"==typeof t?"new String("+r(t.valueOf())+")":N(t);case"[object Undefined]":return"undefined";default:if("function"==typeof t.toString){var u=t.toString();if("[object Object]"!==u)return u}return"{"+e(t,Zt(t)).join(", ")+"}"}},su=function(){if(0===arguments.length)throw new Error("compose requires at least one argument");return nu.apply(this,Vn(arguments))},fu=function(){if(0===arguments.length)throw new Error("composeK requires at least one argument");var t=Array.prototype.slice.call(arguments),n=t.pop();return su(su.apply(this,ae(Te,t)),n)},lu=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return ru.apply(this,Vn(arguments))},pu=F(function(t){return Be(t.length,t)}),hu=B(cu),gu=B(function(t,n){for(var r=[],e=0,u=t.length;u>e;)cu(t[e],n)||cu(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),yu=F(M([],$(Xr),Me(Xr))),du=F(function(t){return Ge(t.length,t)}),mu=B(function(t,n){var r={};for(var e in n)cu(e,t)||(r[e]=n[e]);return r}),vu=function(){if(0===arguments.length)throw new Error("pipeK requires at least one argument");return fu.apply(this,Vn(arguments))},wu=F(function(t){return au(t,[])}),bu=B(function(t,n){return be(Gr(cu)(t),n)}),xu=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}function n(t,n,r){var e,u,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t===-(1/0)?r._items["-0"]?!0:(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?t in r._items[i]?!0:(n&&(r._items[i][t]=!0),!1):(n&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return r._items[i][o]?!0:(n&&(r._items[i][o]=!0),!1)}return n&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),u=r._nativeSet.size,u===e):r._nativeSet.has(t):i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1);case"undefined":return r._items[i]?!0:(n&&(r._items[i]=!0),!1);case"object":if(null===t)return r._items["null"]?!0:(n&&(r._items["null"]=!0),!1);default:return i=Object.prototype.toString.call(t),i in r._items?cu(t,r._items[i])?!0:(n&&r._items[i].push(t),!1):(n&&(r._items[i]=[t]),!1)}}return t.prototype.add=function(t){return!n(t,!0,this)},t.prototype.has=function(t){return n(t,!1,this)},t}(),Au=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:du(ct)(t,n)}),ju=du(vn),Ou=B(function(t,n){if(null==t||!d(t.concat))throw new TypeError(wu(t)+' does not have a method named "concat"');if(y(t)&&!y(n))throw new TypeError(wu(n)+" is not an array");return t.concat(n)}),Su=B(function(t,n){return d(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:du(On)(t,n)}),Eu=B(function(t,n){return vt(t+1,function(){var r=arguments[t];if(null!=r&&d(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(wu(r)+' does not have a method named "'+n+'"')})}),_u=Eu(1,"join"),ku=F(function(t){var n={};return r(t.length,function(){var r=wu(arguments);return p(r,n)||(n[r]=t.apply(this,arguments)),n[r]})}),Nu=Eu(1,"split"),Iu=B(function(t,n){return Ou(gu(t,n),gu(n,t))}),qu=U(function(t,n,r){return Ou(At(t,n,r),At(t,r,n))}),Wu=B(function(t,n){if(!x(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+wu(t));return u(t).test(n)}),Cu=Eu(0,"toLowerCase"),Pu=Eu(0,"toUpperCase"),Tu=B(function(t,n){for(var r,e,u=new xu,i=[],o=0;o<n.length;)e=n[o],r=t(e),u.add(r)&&i.push(e),o+=1;return i}),Fu=Tu(Lt),Bu=B(function(t,n){var r,e;return t.length>n.length?(r=t,e=n):(r=n,e=t),Fu(s(Gr(cu)(r),e))}),Uu=B(su(Fu,o)),Ru={F:qr,T:Wr,__:t,add:et,addIndex:Lr,adjust:ut,all:it,allPass:Ie,always:ot,and:ct,any:at,anyPass:qe,ap:We,aperture:st,append:ft,apply:lt,applySpec:Ce,ascend:pt,assoc:ht,assocPath:gt,binary:Dr,bind:yt,both:Au,call:Pe,chain:Te,clamp:dt,clone:zr,comparator:mt,complement:ju,compose:su,composeK:fu,composeP:lu,concat:Ou,cond:Fe,construct:pu,constructN:Be,contains:hu,converge:Ue,countBy:Re,curry:Vr,curryN:vt,dec:wt,defaultTo:bt,descend:xt,difference:gu,differenceWith:At,dissoc:jt,dissocPath:Ot,divide:St,drop:Kr,dropLast:$r,dropLastWhile:Hr,dropRepeats:yu,dropRepeatsWith:Me,dropWhile:Et,either:Su,empty:_t,eqBy:Le,eqProps:De,equals:Xr,evolve:kt,filter:Yr,find:Nt,findIndex:It,findLast:qt,findLastIndex:Wt,flatten:Zr,flip:Gr,forEach:Ct,forEachObjIndexed:Jr,fromPairs:Pt,groupBy:ze,groupWith:Tt,gt:Ft,gte:Bt,has:Ut,hasIn:Rt,head:Qr,identical:Mt,identity:Lt,ifElse:Dt,inc:zt,indexBy:Ve,indexOf:Ke,init:te,insert:Vt,insertAll:Kt,intersection:Bu,intersectionWith:ne,intersperse:$t,into:re,invert:ee,invertObj:ue,invoker:Eu,is:Ht,isArrayLike:Xt,isEmpty:ie,isNil:Yt,join:_u,juxt:$e,keys:Zt,keysIn:Gt,last:oe,lastIndexOf:ce,length:Jt,lens:He,lensIndex:Xe,lensPath:Ye,lensProp:Ze,lift:du,liftN:Ge,lt:Qt,lte:tn,map:ae,mapAccum:nn,mapAccumRight:rn,mapObjIndexed:se,match:en,mathMod:un,max:on,maxBy:cn,mean:Je,median:Qe,memoize:ku,merge:an,mergeAll:sn,mergeWith:fe,mergeWithKey:fn,min:ln,minBy:pn,modulo:hn,multiply:gn,nAry:yn,negate:dn,none:mn,not:vn,nth:wn,nthArg:bn,objOf:xn,of:An,omit:mu,once:jn,or:On,over:Sn,pair:En,partial:le,partialRight:pe,partition:tu,path:_n,pathEq:he,pathOr:kn,pathSatisfies:Nn,pick:In,pickAll:qn,pickBy:Wn,pipe:nu,pipeK:vu,pipeP:ru,pluck:ge,prepend:Cn,product:eu,project:ye,prop:Pn,propEq:de,propIs:Tn,propOr:Fn,propSatisfies:Bn,props:Un,range:Rn,reduce:me,reduceBy:ve,reduceRight:Mn,reduceWhile:we,reduced:Ln,reject:be,remove:Dn,repeat:xe,replace:zn,reverse:Vn,scan:Kn,sequence:uu,set:$n,slice:Hn,sort:Xn,sortBy:Yn,sortWith:Zn,split:Nu,splitAt:Gn,splitEvery:Jn,splitWhen:Qn,subtract:tr,sum:Ae,symmetricDifference:Iu,symmetricDifferenceWith:qu,tail:nr,take:rr,takeLast:je,takeLastWhile:er,takeWhile:ur,tap:ir,test:Wu,times:or,toLower:Cu,toPairs:cr,toPairsIn:ar,toString:wu,toUpper:Pu,transduce:Oe,transpose:sr,traverse:iu,trim:fr,tryCatch:lr,type:pr,unapply:hr,unary:gr,uncurryN:yr,unfold:dr,union:Uu,unionWith:Se,uniq:Fu,uniqBy:Tu,uniqWith:mr,unless:vr,unnest:ou,until:wr,update:br,useWith:xr,values:Ar,valuesIn:jr,view:Or,when:Sr,where:Er,whereEq:Ee,without:bu,xprod:_r,zip:kr,zipObj:Nr,zipWith:Ir};"object"==typeof exports?module.exports=Ru:"function"==typeof define&&define.amd?define(function(){return Ru}):this.R=Ru}).call(this); |
@@ -27,3 +27,3 @@ { | ||
"description": "A practical functional library for JavaScript programmers.", | ||
"version": "0.22.1", | ||
"version": "0.23.0", | ||
"homepage": "http://ramdajs.com/", | ||
@@ -35,3 +35,3 @@ "license": "MIT", | ||
}, | ||
"main": "dist/ramda.js", | ||
"main": "index.js", | ||
"scripts": { | ||
@@ -46,3 +46,2 @@ "bench": "scripts/benchRunner", | ||
"lint": "eslint scripts/bookmarklet scripts/build src/*.js src/internal/*.js test/*.js test/**/*.js lib/sauce/*.js lib/bench/*.js", | ||
"pretest": "npm install && npm run lint && npm run clean && npm run build", | ||
"test": "mocha --reporter spec", | ||
@@ -68,2 +67,3 @@ "posttest": "git checkout -- dist", | ||
"js-yaml": "^3.2.5", | ||
"jsverify": "^0.7.3", | ||
"mocha": "2.x.x", | ||
@@ -77,4 +77,4 @@ "q": "^1.1.1", | ||
"uglify-js": "2.4.x", | ||
"xyz": "0.5.x" | ||
"xyz": "1.0.x" | ||
} | ||
} |
Ramda | ||
============= | ||
A practical functional library for Javascript programmers. | ||
A practical functional library for JavaScript programmers. | ||
@@ -52,10 +52,10 @@ [![Build Status](https://travis-ci.org/ramda/ramda.svg?branch=master)](https://travis-ci.org/ramda/ramda) | ||
---------- | ||
Using Ramda should feel much like just using Javascript. | ||
It is practical, functional Javascript. We're not introducing | ||
Using Ramda should feel much like just using JavaScript. | ||
It is practical, functional JavaScript. We're not introducing | ||
lambda expressions in strings, we're not borrowing consed | ||
lists, we're not porting over all of the Clojure functions. | ||
Our basic data structures are plain Javascript objects, and our | ||
usual collections are Javascript arrays. We also keep other | ||
native features of Javascript, such as functions as objects | ||
Our basic data structures are plain JavaScript objects, and our | ||
usual collections are JavaScript arrays. We also keep other | ||
native features of JavaScript, such as functions as objects | ||
with properties. | ||
@@ -104,3 +104,3 @@ | ||
```html | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.22.1/ramda.min.js"></script> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/ramda/0.23.0/ramda.min.js"></script> | ||
``` | ||
@@ -111,4 +111,4 @@ | ||
```html | ||
<script src="//cdn.jsdelivr.net/ramda/0.22.1/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.22/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.23.0/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/0.23/ramda.min.js"></script> | ||
<script src="//cdn.jsdelivr.net/ramda/latest/ramda.min.js"></script> | ||
@@ -115,0 +115,0 @@ ``` |
var _concat = require('./internal/_concat'); | ||
var _curry1 = require('./internal/_curry1'); | ||
var _slice = require('./internal/_slice'); | ||
var curryN = require('./curryN'); | ||
@@ -36,3 +35,3 @@ | ||
var list = arguments[arguments.length - 1]; | ||
var args = _slice(arguments); | ||
var args = Array.prototype.slice.call(arguments, 0); | ||
args[0] = function() { | ||
@@ -39,0 +38,0 @@ var result = origFn.apply(this, _concat(arguments, [idx, list])); |
@@ -25,4 +25,6 @@ var _concat = require('./internal/_concat'); | ||
* | ||
* R.adjust(R.add(10), 1, [0, 1, 2]); //=> [0, 11, 2] | ||
* R.adjust(R.add(10))(1)([0, 1, 2]); //=> [0, 11, 2] | ||
* R.adjust(R.add(10), 1, [1, 2, 3]); //=> [1, 12, 3] | ||
* R.adjust(R.add(10))(1)([1, 2, 3]); //=> [1, 12, 3] | ||
* @symb R.adjust(f, -1, [a, b]) = [a, f(b)] | ||
* @symb R.adjust(f, 0, [a, b]) = [f(a), b] | ||
*/ | ||
@@ -29,0 +31,0 @@ module.exports = _curry3(function adjust(fn, idx, list) { |
@@ -26,8 +26,7 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* var lessThan2 = R.flip(R.lt)(2); | ||
* var lessThan3 = R.flip(R.lt)(3); | ||
* R.all(lessThan2)([1, 2]); //=> false | ||
* R.all(lessThan3)([1, 2]); //=> true | ||
* var equals3 = R.equals(3); | ||
* R.all(equals3)([3, 3, 3, 3]); //=> true | ||
* R.all(equals3)([3, 3, 1, 3]); //=> false | ||
*/ | ||
module.exports = _curry2(_dispatchable('all', _xall, function all(fn, list) { | ||
module.exports = _curry2(_dispatchable(['all'], _xall, function all(fn, list) { | ||
var idx = 0; | ||
@@ -34,0 +33,0 @@ while (idx < list.length) { |
@@ -21,4 +21,4 @@ var _curry1 = require('./internal/_curry1'); | ||
* @sig [(*... -> Boolean)] -> (*... -> Boolean) | ||
* @param {Array} preds | ||
* @return {Function} | ||
* @param {Array} predicates An array of predicates to check | ||
* @return {Function} The combined predicate | ||
* @see R.anyPass | ||
@@ -25,0 +25,0 @@ * @example |
@@ -11,6 +11,6 @@ var _curry2 = require('./internal/_curry2'); | ||
* @category Logic | ||
* @sig * -> * -> * | ||
* @param {Boolean} a A boolean value | ||
* @param {Boolean} b A boolean value | ||
* @return {Boolean} `true` if both arguments are `true`, `false` otherwise | ||
* @sig a -> b -> a | b | ||
* @param {Any} a | ||
* @param {Any} b | ||
* @return {Any} the first argument if it is falsy, otherwise the second argument. | ||
* @see R.both | ||
@@ -17,0 +17,0 @@ * @example |
@@ -31,3 +31,3 @@ var _curry2 = require('./internal/_curry2'); | ||
*/ | ||
module.exports = _curry2(_dispatchable('any', _xany, function any(fn, list) { | ||
module.exports = _curry2(_dispatchable(['any'], _xany, function any(fn, list) { | ||
var idx = 0; | ||
@@ -34,0 +34,0 @@ while (idx < list.length) { |
@@ -21,12 +21,14 @@ var _curry1 = require('./internal/_curry1'); | ||
* @sig [(*... -> Boolean)] -> (*... -> Boolean) | ||
* @param {Array} preds | ||
* @return {Function} | ||
* @param {Array} predicates An array of predicates to check | ||
* @return {Function} The combined predicate | ||
* @see R.allPass | ||
* @example | ||
* | ||
* var gte = R.anyPass([R.gt, R.equals]); | ||
* var isClub = R.propEq('suit', '♣'); | ||
* var isSpade = R.propEq('suit', '♠'); | ||
* var isBlackCard = R.anyPass([isClub, isSpade]); | ||
* | ||
* gte(3, 2); //=> true | ||
* gte(2, 2); //=> true | ||
* gte(2, 3); //=> false | ||
* isBlackCard({rank: '10', suit: '♣'}); //=> true | ||
* isBlackCard({rank: 'Q', suit: '♠'}); //=> true | ||
* isBlackCard({rank: 'Q', suit: '♦'}); //=> false | ||
*/ | ||
@@ -33,0 +35,0 @@ module.exports = _curry1(function anyPass(preds) { |
@@ -25,2 +25,4 @@ var _concat = require('./internal/_concat'); | ||
* R.ap([R.multiply(2), R.add(3)], [1,2,3]); //=> [2, 4, 6, 4, 5, 6] | ||
* R.ap([R.concat('tasty '), R.toUpper], ['pizza', 'salad']); //=> ["tasty pizza", "tasty salad", "PIZZA", "SALAD"] | ||
* @symb R.ap([f, g], [a, b]) = [f(a), f(b), g(a), g(b)] | ||
*/ | ||
@@ -27,0 +29,0 @@ module.exports = _curry2(function ap(applicative, fn) { |
@@ -11,4 +11,2 @@ var _aperture = require('./internal/_aperture'); | ||
* | ||
* Dispatches to the `aperture` method of the second argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -22,4 +20,4 @@ * | ||
* @param {Number} n The size of the tuples to create | ||
* @param {Array} list The list to split into `n`-tuples | ||
* @return {Array} The new list. | ||
* @param {Array} list The list to split into `n`-length tuples | ||
* @return {Array} The resulting list of `n`-length tuples | ||
* @see R.transduce | ||
@@ -32,2 +30,2 @@ * @example | ||
*/ | ||
module.exports = _curry2(_dispatchable('aperture', _xaperture, _aperture)); | ||
module.exports = _curry2(_dispatchable([], _xaperture, _aperture)); |
@@ -15,5 +15,5 @@ var _concat = require('./internal/_concat'); | ||
* @param {*} el The element to add to the end of the new list. | ||
* @param {Array} list The list whose contents will be added to the beginning of the output | ||
* @param {Array} list The list of elements to add a new item to. | ||
* list. | ||
* @return {Array} A new list containing the contents of the old list followed by `el`. | ||
* @return {Array} A new list containing the elements of the old list followed by `el`. | ||
* @see R.prepend | ||
@@ -20,0 +20,0 @@ * @example |
@@ -14,5 +14,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig (*... -> a) -> [*] -> a | ||
* @param {Function} fn | ||
* @param {Array} args | ||
* @return {*} | ||
* @param {Function} fn The function which will be called with `args` | ||
* @param {Array} args The arguments to call `fn` with | ||
* @return {*} result The result, equivalent to `fn(...args)` | ||
* @see R.call, R.unapply | ||
@@ -23,2 +23,3 @@ * @example | ||
* R.apply(Math.max, nums); //=> 42 | ||
* @symb R.apply(f, [a, b, c]) = f(a, b, c) | ||
*/ | ||
@@ -25,0 +26,0 @@ module.exports = _curry2(function apply(fn, args) { |
@@ -34,5 +34,6 @@ var _curry1 = require('./internal/_curry1'); | ||
* getMetrics(2, 4); // => { sum: 6, nested: { mul: 8 } } | ||
* @symb R.applySpec({ x: f, y: { z: g } })(a, b) = { x: f(a, b), y: { z: g(a, b) } } | ||
*/ | ||
module.exports = _curry1(function applySpec(spec) { | ||
spec = map(function(v) { return typeof v == 'function' ? v : applySpec(v) }, | ||
spec = map(function(v) { return typeof v == 'function' ? v : applySpec(v); }, | ||
spec); | ||
@@ -39,0 +40,0 @@ return curryN(reduce(max, 0, pluck('length', values(spec))), |
@@ -15,6 +15,6 @@ var _curry3 = require('./internal/_curry3'); | ||
* @sig String -> a -> {k: v} -> {k: v} | ||
* @param {String} prop the property name to set | ||
* @param {*} val the new value | ||
* @param {Object} obj the object to clone | ||
* @return {Object} a new object similar to the original except for the specified property. | ||
* @param {String} prop The property name to set | ||
* @param {*} val The new value | ||
* @param {Object} obj The object to clone | ||
* @return {Object} A new object equivalent to the original except for the changed property. | ||
* @see R.dissoc | ||
@@ -21,0 +21,0 @@ * @example |
var _curry3 = require('./internal/_curry3'); | ||
var _slice = require('./internal/_slice'); | ||
var _has = require('./internal/_has'); | ||
var _isArray = require('./internal/_isArray'); | ||
var _isInteger = require('./internal/_isInteger'); | ||
var assoc = require('./assoc'); | ||
@@ -16,7 +18,8 @@ | ||
* @category Object | ||
* @sig [String] -> a -> {k: v} -> {k: v} | ||
* @typedefn Idx = String | Int | ||
* @sig [Idx] -> a -> {a} -> {a} | ||
* @param {Array} path the path to set | ||
* @param {*} val the new value | ||
* @param {Object} obj the object to clone | ||
* @return {Object} a new object similar to the original except along the specified path. | ||
* @param {*} val The new value | ||
* @param {Object} obj The object to clone | ||
* @return {Object} A new object equivalent to the original except along the specified path. | ||
* @see R.dissocPath | ||
@@ -26,12 +29,22 @@ * @example | ||
* R.assocPath(['a', 'b', 'c'], 42, {a: {b: {c: 0}}}); //=> {a: {b: {c: 42}}} | ||
* | ||
* // Any missing or non-object keys in path will be overridden | ||
* R.assocPath(['a', 'b', 'c'], 42, {a: 5}); //=> {a: {b: {c: 42}}} | ||
*/ | ||
module.exports = _curry3(function assocPath(path, val, obj) { | ||
switch (path.length) { | ||
case 0: | ||
return val; | ||
case 1: | ||
return assoc(path[0], val, obj); | ||
default: | ||
return assoc(path[0], assocPath(_slice(path, 1), val, Object(obj[path[0]])), obj); | ||
if (path.length === 0) { | ||
return val; | ||
} | ||
var idx = path[0]; | ||
if (path.length > 1) { | ||
var nextObj = _has(idx, obj) ? obj[idx] : _isInteger(path[1]) ? [] : {}; | ||
val = assocPath(Array.prototype.slice.call(path, 1), val, nextObj); | ||
} | ||
if (_isInteger(idx) && _isArray(obj)) { | ||
var arr = [].concat(obj); | ||
arr[idx] = val; | ||
return arr; | ||
} else { | ||
return assoc(idx, val, obj); | ||
} | ||
}); |
@@ -30,2 +30,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* takesTwoArgs(1, 2, 3); //=> [1, 2, undefined] | ||
* @symb R.binary(f)(a, b, c) = f(a, b) | ||
*/ | ||
@@ -32,0 +33,0 @@ module.exports = _curry1(function binary(fn) { |
@@ -25,2 +25,3 @@ var _arity = require('./internal/_arity'); | ||
* // logs {a: 2} | ||
* @symb R.bind(f, o)(a, b) = f.call(o, a, b) | ||
*/ | ||
@@ -27,0 +28,0 @@ module.exports = _curry2(function bind(fn, thisObj) { |
@@ -8,4 +8,5 @@ var _curry2 = require('./internal/_curry2'); | ||
/** | ||
* A function wrapping calls to the two functions in an `&&` operation, | ||
* returning the result of the first function if it is false-y and the result | ||
* A function which calls the two provided functions and returns the `&&` | ||
* of the results. | ||
* It returns the result of the first function if it is false-y and the result | ||
* of the second function otherwise. Note that this is short-circuited, | ||
@@ -23,4 +24,4 @@ * meaning that the second function will not be invoked if the first returns a | ||
* @sig (*... -> Boolean) -> (*... -> Boolean) -> (*... -> Boolean) | ||
* @param {Function} f a predicate | ||
* @param {Function} g another predicate | ||
* @param {Function} f A predicate | ||
* @param {Function} g Another predicate | ||
* @return {Function} a function that applies its arguments to `f` and `g` and `&&`s their outputs together. | ||
@@ -30,7 +31,7 @@ * @see R.and | ||
* | ||
* var gt10 = x => x > 10; | ||
* var even = x => x % 2 === 0; | ||
* var f = R.both(gt10, even); | ||
* f(100); //=> true | ||
* f(101); //=> false | ||
* var gt10 = R.gt(R.__, 10) | ||
* var lt20 = R.lt(R.__, 20) | ||
* var f = R.both(gt10, lt20); | ||
* f(15); //=> true | ||
* f(30); //=> false | ||
*/ | ||
@@ -37,0 +38,0 @@ module.exports = _curry2(function both(f, g) { |
@@ -1,2 +0,1 @@ | ||
var _slice = require('./internal/_slice'); | ||
var curry = require('./curry'); | ||
@@ -22,2 +21,4 @@ | ||
* | ||
* R.call(R.add, 1, 2); //=> 3 | ||
* | ||
* var indentN = R.pipe(R.times(R.always(' ')), | ||
@@ -33,5 +34,6 @@ * R.join(''), | ||
* format({indent: 2, value: 'foo\nbar\nbaz\n'}); //=> ' foo\n bar\n baz\n' | ||
* @symb R.call(f, a, b) = f(a, b) | ||
*/ | ||
module.exports = curry(function call(fn) { | ||
return fn.apply(this, _slice(arguments, 1)); | ||
return fn.apply(this, Array.prototype.slice.call(arguments, 1)); | ||
}); |
@@ -20,5 +20,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig Chain m => (a -> m b) -> m a -> m b | ||
* @param {Function} fn | ||
* @param {Array} list | ||
* @return {Array} | ||
* @param {Function} fn The function to map with | ||
* @param {Array} list The list to map over | ||
* @return {Array} The result of flat-mapping `list` with `fn` | ||
* @example | ||
@@ -28,10 +28,10 @@ * | ||
* R.chain(duplicate, [1, 2, 3]); //=> [1, 1, 2, 2, 3, 3] | ||
* | ||
* R.chain(R.append, R.head)([1, 2, 3]); //=> [1, 2, 3, 1] | ||
*/ | ||
module.exports = _curry2(_dispatchable('chain', _xchain, function chain(fn, monad) { | ||
module.exports = _curry2(_dispatchable(['chain'], _xchain, function chain(fn, monad) { | ||
if (typeof monad === 'function') { | ||
return function() { | ||
return monad.call(this, fn.apply(this, arguments)).apply(this, arguments); | ||
}; | ||
return function(x) { return fn(monad(x))(x); }; | ||
} | ||
return _makeFlat(false)(map(fn, monad)); | ||
})); |
@@ -13,10 +13,10 @@ var _curry3 = require('./internal/_curry3'); | ||
* @sig Ord a => a -> a -> a -> a | ||
* @param {Number} minimum number | ||
* @param {Number} maximum number | ||
* @param {Number} value to be clamped | ||
* @return {Number} Returns the clamped value | ||
* @param {Number} minimum The lower limit of the clamp (inclusive) | ||
* @param {Number} maximum The upper limit of the clamp (inclusive) | ||
* @param {Number} value Value to be clamped | ||
* @return {Number} Returns `minimum` when `val < minimum`, `maximum` when `val > maximum`, returns `val` otherwise | ||
* @example | ||
* | ||
* R.clamp(1, 10, -1) // => 1 | ||
* R.clamp(1, 10, 11) // => 10 | ||
* R.clamp(1, 10, -5) // => 1 | ||
* R.clamp(1, 10, 15) // => 10 | ||
* R.clamp(1, 10, 4) // => 4 | ||
@@ -23,0 +23,0 @@ */ |
@@ -7,4 +7,4 @@ var _clone = require('./internal/_clone'); | ||
* Creates a deep copy of the value which may contain (nested) `Array`s and | ||
* `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are not | ||
* copied, but assigned by their reference. | ||
* `Object`s, `Number`s, `String`s, `Boolean`s and `Date`s. `Function`s are | ||
* assigned by reference rather than copied | ||
* | ||
@@ -19,3 +19,3 @@ * Dispatches to a `clone` method if present. | ||
* @param {*} value The object or array to clone | ||
* @return {*} A new object or array. | ||
* @return {*} A deeply cloned copy of `val` | ||
* @example | ||
@@ -25,2 +25,3 @@ * | ||
* var objectsClone = R.clone(objects); | ||
* objects === objectsClone; //=> false | ||
* objects[0] === objectsClone[0]; //=> false | ||
@@ -27,0 +28,0 @@ */ |
@@ -13,11 +13,12 @@ var _curry1 = require('./internal/_curry1'); | ||
* @sig (a, b -> Boolean) -> (a, b -> Number) | ||
* @param {Function} pred A predicate function of arity two. | ||
* @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0`. | ||
* @param {Function} pred A predicate function of arity two which will return `true` if the first argument | ||
* is less than the second, `false` otherwise | ||
* @return {Function} A Function :: a -> b -> Int that returns `-1` if a < b, `1` if b < a, otherwise `0` | ||
* @example | ||
* | ||
* var cmp = R.comparator((a, b) => a.age < b.age); | ||
* var byAge = R.comparator((a, b) => a.age < b.age); | ||
* var people = [ | ||
* // ... | ||
* ]; | ||
* R.sort(cmp, people); | ||
* var peopleByIncreasingAge = R.sort(byAge, people); | ||
*/ | ||
@@ -24,0 +25,0 @@ module.exports = _curry1(function comparator(pred) { |
@@ -6,12 +6,7 @@ var lift = require('./lift'); | ||
/** | ||
* Takes a function `f` and returns a function `g` such that: | ||
* Takes a function `f` and returns a function `g` such that if called with the same arguments | ||
* when `f` returns a "truthy" value, `g` returns `false` and when `f` returns a "falsy" value `g` returns `true`. | ||
* | ||
* - applying `g` to zero or more arguments will give __true__ if applying | ||
* the same arguments to `f` gives a logical __false__ value; and | ||
* `R.complement` may be applied to any functor | ||
* | ||
* - applying `g` to zero or more arguments will give __false__ if applying | ||
* the same arguments to `f` gives a logical __true__ value. | ||
* | ||
* `R.complement` will work on all other functors as well. | ||
* | ||
* @func | ||
@@ -27,7 +22,8 @@ * @memberOf R | ||
* | ||
* var isEven = n => n % 2 === 0; | ||
* var isOdd = R.complement(isEven); | ||
* isOdd(21); //=> true | ||
* isOdd(42); //=> false | ||
* var isNotNil = R.complement(R.isNil); | ||
* isNil(null); //=> true | ||
* isNotNil(null); //=> false | ||
* isNil(7); //=> false | ||
* isNotNil(7); //=> true | ||
*/ | ||
module.exports = lift(not); |
@@ -16,3 +16,3 @@ var pipe = require('./pipe'); | ||
* @sig ((y -> z), (x -> y), ..., (o -> p), ((a, b, ..., n) -> o)) -> ((a, b, ..., n) -> z) | ||
* @param {...Function} functions | ||
* @param {...Function} ...functions The functions to compose | ||
* @return {Function} | ||
@@ -22,5 +22,9 @@ * @see R.pipe | ||
* | ||
* var f = R.compose(R.inc, R.negate, Math.pow); | ||
* var classyGreeting = (firstName, lastName) => "The name's " + lastName + ", " + firstName + " " + lastName | ||
* var yellGreeting = R.compose(R.toUpper, classyGreeting); | ||
* yellGreeting('James', 'Bond'); //=> "THE NAME'S BOND, JAMES BOND" | ||
* | ||
* f(3, 4); // -(3^4) + 1 | ||
* R.compose(Math.abs, R.add(1), R.multiply(2))(-4) //=> 7 | ||
* | ||
* @symb R.compose(f, g, h)(a, b) = f(g(h(a, b))) | ||
*/ | ||
@@ -27,0 +31,0 @@ module.exports = function compose() { |
var chain = require('./chain'); | ||
var compose = require('./compose'); | ||
var identity = require('./identity'); | ||
var map = require('./map'); | ||
var prepend = require('./prepend'); | ||
@@ -18,4 +16,4 @@ | ||
* @category Function | ||
* @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (m a -> m z) | ||
* @param {...Function} | ||
* @sig Chain m => ((y -> m z), (x -> m y), ..., (a -> m b)) -> (a -> m z) | ||
* @param {...Function} ...functions The functions to compose | ||
* @return {Function} | ||
@@ -25,21 +23,23 @@ * @see R.pipeK | ||
* | ||
* // parseJson :: String -> Maybe * | ||
* // get :: String -> Object -> Maybe * | ||
* // get :: String -> Object -> Maybe * | ||
* var get = R.curry((propName, obj) => Maybe(obj[propName])) | ||
* | ||
* // getStateCode :: Maybe String -> Maybe String | ||
* var getStateCode = R.composeK( | ||
* R.compose(Maybe.of, R.toUpper), | ||
* get('state'), | ||
* get('address'), | ||
* get('user'), | ||
* parseJson | ||
* ); | ||
* | ||
* getStateCode(Maybe.of('{"user":{"address":{"state":"ny"}}}')); | ||
* //=> Just('NY') | ||
* getStateCode(Maybe.of('[Invalid JSON]')); | ||
* //=> Nothing() | ||
* // getStateCode :: Maybe String -> Maybe String | ||
* var getStateCode = R.composeK( | ||
* R.compose(Maybe.of, R.toUpper), | ||
* get('state'), | ||
* get('address'), | ||
* get('user'), | ||
* ); | ||
* getStateCode({"user":{"address":{"state":"ny"}}}); //=> Maybe.Just("NY") | ||
* getStateCode({}); //=> Maybe.Nothing() | ||
* @symb R.composeK(f, g, h)(a) = R.chain(f, R.chain(g, h(a))) | ||
*/ | ||
module.exports = function composeK() { | ||
return compose.apply(this, prepend(identity, map(chain, arguments))); | ||
if (arguments.length === 0) { | ||
throw new Error('composeK requires at least one argument'); | ||
} | ||
var init = Array.prototype.slice.call(arguments); | ||
var last = init.pop(); | ||
return compose(compose.apply(this, map(chain, init)), last); | ||
}; |
@@ -15,3 +15,3 @@ var pipeP = require('./pipeP'); | ||
* @sig ((y -> Promise z), (x -> Promise y), ..., (a -> Promise b)) -> (a -> Promise z) | ||
* @param {...Function} functions | ||
* @param {...Function} functions The functions to compose | ||
* @return {Function} | ||
@@ -21,4 +21,20 @@ * @see R.pipeP | ||
* | ||
* // followersForUser :: String -> Promise [User] | ||
* var followersForUser = R.composeP(db.getFollowers, db.getUserById); | ||
* var db = { | ||
* users: { | ||
* JOE: { | ||
* name: 'Joe', | ||
* followers: ['STEVE', 'SUZY'] | ||
* } | ||
* } | ||
* } | ||
* | ||
* // We'll pretend to do a db lookup which returns a promise | ||
* var lookupUser = (userId) => Promise.resolve(db.users[userId]) | ||
* var lookupFollowers = (user) => Promise.resolve(user.followers) | ||
* lookupUser('JOE').then(lookupFollowers) | ||
* | ||
* // followersForUser :: String -> Promise [UserId] | ||
* var followersForUser = R.composeP(lookupFollowers, lookupUser); | ||
* followersForUser('JOE').then(followers => console.log('Followers:', followers)) | ||
* // Followers: ["STEVE","SUZY"] | ||
*/ | ||
@@ -25,0 +41,0 @@ module.exports = function composeP() { |
@@ -22,11 +22,12 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig String -> String -> String | ||
* @param {Array|String} a | ||
* @param {Array|String} b | ||
* @return {Array|String} | ||
* @param {Array|String} firstList The first list | ||
* @param {Array|String} secondList The second list | ||
* @return {Array|String} A list consisting of the elements of `firstList` followed by the elements of | ||
* `secondList`. | ||
* | ||
* @example | ||
* | ||
* R.concat('ABC', 'DEF'); // 'ABCDEF' | ||
* R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] | ||
* R.concat([], []); //=> [] | ||
* R.concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3] | ||
* R.concat('ABC', 'DEF'); // 'ABCDEF' | ||
*/ | ||
@@ -33,0 +34,0 @@ module.exports = _curry2(function concat(a, b) { |
@@ -9,4 +9,4 @@ var _arity = require('./internal/_arity'); | ||
/** | ||
* Returns a function, `fn`, which encapsulates if/else-if/else logic. | ||
* `R.cond` takes a list of [predicate, transform] pairs. All of the arguments | ||
* Returns a function, `fn`, which encapsulates `if/else, if/else, ...` logic. | ||
* `R.cond` takes a list of [predicate, transformer] pairs. All of the arguments | ||
* to `fn` are applied to each of the predicates in turn until one returns a | ||
@@ -22,3 +22,3 @@ * "truthy" value, at which point `fn` returns the result of applying its | ||
* @sig [[(*... -> Boolean),(*... -> *)]] -> (*... -> *) | ||
* @param {Array} pairs | ||
* @param {Array} pairs A list of [predicate, transformer] | ||
* @return {Function} | ||
@@ -25,0 +25,0 @@ * @example |
@@ -14,3 +14,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @sig (* -> {*}) -> (* -> {*}) | ||
* @param {Function} Fn The constructor function to wrap. | ||
* @param {Function} fn The constructor function to wrap. | ||
* @return {Function} A wrapped, curried constructor function. | ||
@@ -20,12 +20,18 @@ * @example | ||
* // Constructor function | ||
* var Widget = config => { | ||
* // ... | ||
* function Animal(kind) { | ||
* this.kind = kind; | ||
* }; | ||
* Widget.prototype = { | ||
* // ... | ||
* }; | ||
* var allConfigs = [ | ||
* // ... | ||
* ]; | ||
* R.map(R.construct(Widget), allConfigs); // a list of Widgets | ||
* Animal.prototype.sighting = function() { | ||
* return "It's a " + this.kind + "!"; | ||
* } | ||
* | ||
* var AnimalConstructor = R.construct(Animal) | ||
* | ||
* // Notice we no longer need the 'new' keyword: | ||
* AnimalConstructor('Pig'); //=> {"kind": "Pig", "sighting": function (){...}}; | ||
* | ||
* var animalTypes = ["Lion", "Tiger", "Bear"]; | ||
* var animalSighting = R.invoker(0, 'sighting'); | ||
* var sightNewAnimal = R.compose(animalSighting, AnimalConstructor); | ||
* R.map(sightNewAnimal, animalTypes); //=> ["It's a Lion!", "It's a Tiger!", "It's a Bear!"] | ||
*/ | ||
@@ -32,0 +38,0 @@ module.exports = _curry1(function construct(Fn) { |
@@ -21,14 +21,21 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* // Variadic constructor function | ||
* var Widget = () => { | ||
* this.children = Array.prototype.slice.call(arguments); | ||
* // ... | ||
* // Variadic Constructor function | ||
* function Salad() { | ||
* this.ingredients = arguments; | ||
* }; | ||
* Widget.prototype = { | ||
* // ... | ||
* }; | ||
* var allConfigs = [ | ||
* // ... | ||
* ]; | ||
* R.map(R.constructN(1, Widget), allConfigs); // a list of Widgets | ||
* Salad.prototype.recipe = function() { | ||
* var instructions = R.map((ingredient) => ( | ||
* 'Add a whollop of ' + ingredient, this.ingredients) | ||
* ) | ||
* return R.join('\n', instructions) | ||
* } | ||
* | ||
* var ThreeLayerSalad = R.constructN(3, Salad) | ||
* | ||
* // Notice we no longer need the 'new' keyword, and the constructor is curried for 3 arguments. | ||
* var salad = ThreeLayerSalad('Mayonnaise')('Potato Chips')('Ketchup') | ||
* console.log(salad.recipe()); | ||
* // Add a whollop of Mayonnaise | ||
* // Add a whollop of Potato Chips | ||
* // Add a whollop of Potato Ketchup | ||
*/ | ||
@@ -35,0 +42,0 @@ module.exports = _curry2(function constructN(n, Fn) { |
@@ -16,3 +16,3 @@ var _contains = require('./internal/_contains'); | ||
* @param {Array} list The array to consider. | ||
* @return {Boolean} `true` if the item is in the list, `false` otherwise. | ||
* @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise. | ||
* @see R.any | ||
@@ -23,4 +23,5 @@ * @example | ||
* R.contains(4, [1, 2, 3]); //=> false | ||
* R.contains({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true | ||
* R.contains([42], [[42]]); //=> true | ||
*/ | ||
module.exports = _curry2(_contains); |
@@ -25,13 +25,12 @@ var _curry2 = require('./internal/_curry2'); | ||
* @return {Function} A new function. | ||
* @see R.useWith | ||
* @example | ||
* | ||
* var add = (a, b) => a + b; | ||
* var multiply = (a, b) => a * b; | ||
* var subtract = (a, b) => a - b; | ||
* var average = R.converge(R.divide, [R.sum, R.length]) | ||
* average([1, 2, 3, 4, 5, 6, 7]) //=> 4 | ||
* | ||
* //≅ multiply( add(1, 2), subtract(1, 2) ); | ||
* R.converge(multiply, [add, subtract])(1, 2); //=> -3 | ||
* var strangeConcat = R.converge(R.concat, [R.toUpper, R.toLower]) | ||
* strangeConcat("Yodel") //=> "YODELyodel" | ||
* | ||
* var add3 = (a, b, c) => a + b + c; | ||
* R.converge(add3, [multiply, add, subtract])(1, 2); //=> 4 | ||
* @symb R.converge(f, [g, h])(a, b) = f(g(a, b), h(a, b)) | ||
*/ | ||
@@ -38,0 +37,0 @@ module.exports = _curry2(function converge(after, fns) { |
@@ -23,6 +23,7 @@ var reduceBy = require('./reduceBy'); | ||
* var numbers = [1.0, 1.1, 1.2, 2.0, 3.0, 2.2]; | ||
* var letters = R.split('', 'abcABCaaaBBc'); | ||
* R.countBy(Math.floor)(numbers); //=> {'1': 3, '2': 2, '3': 1} | ||
* R.countBy(R.toLower)(letters); //=> {'a': 5, 'b': 4, 'c': 3} | ||
* | ||
* var letters = ['a', 'b', 'A', 'a', 'B', 'c']; | ||
* R.countBy(R.toLower)(letters); //=> {'a': 3, 'b': 2, 'c': 1} | ||
*/ | ||
module.exports = reduceBy(function(acc, elem) { return acc + 1; }, 0); |
@@ -13,3 +13,3 @@ var add = require('./add'); | ||
* @param {Number} n | ||
* @return {Number} | ||
* @return {Number} n - 1 | ||
* @see R.inc | ||
@@ -16,0 +16,0 @@ * @example |
@@ -13,5 +13,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig a -> b -> a | b | ||
* @param {a} val The default value. | ||
* @param {b} val The value to return if it is not null or undefined | ||
* @return {*} The the second value or the default value | ||
* @param {a} default The default value. | ||
* @param {b} val `val` will be returned instead of `default` unless `val` is `null`, `undefined` or `NaN`. | ||
* @return {*} The second value if it is not `null`, `undefined` or `NaN`, otherwise the default value | ||
* @example | ||
@@ -24,2 +24,3 @@ * | ||
* defaultTo42('Ramda'); //=> 'Ramda' | ||
* // parseInt('string') results in NaN | ||
* defaultTo42(parseInt('string')); //=> 42 | ||
@@ -26,0 +27,0 @@ */ |
@@ -7,3 +7,4 @@ var _contains = require('./internal/_contains'); | ||
* Finds the set (i.e. no duplicates) of all elements in the first list not | ||
* contained in the second list. | ||
* contained in the second list. Objects and Arrays are compared are compared | ||
* in terms of value equality, not reference equality. | ||
* | ||
@@ -23,2 +24,3 @@ * @func | ||
* R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5] | ||
* R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}] | ||
*/ | ||
@@ -25,0 +27,0 @@ module.exports = _curry2(function difference(first, second) { |
@@ -14,3 +14,3 @@ var _containsWith = require('./internal/_containsWith'); | ||
* @category Relation | ||
* @sig (a -> a -> Boolean) -> [*] -> [*] -> [*] | ||
* @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] | ||
* @param {Function} pred A predicate used to test whether two items are equal. | ||
@@ -17,0 +17,0 @@ * @param {Array} list1 The first list. |
@@ -12,5 +12,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig String -> {k: v} -> {k: v} | ||
* @param {String} prop the name of the property to dissociate | ||
* @param {Object} obj the object to clone | ||
* @return {Object} a new object similar to the original but without the specified property | ||
* @param {String} prop The name of the property to dissociate | ||
* @param {Object} obj The object to clone | ||
* @return {Object} A new object equivalent to the original but without the specified property | ||
* @see R.assoc | ||
@@ -24,7 +24,6 @@ * @example | ||
for (var p in obj) { | ||
if (p !== prop) { | ||
result[p] = obj[p]; | ||
} | ||
result[p] = obj[p]; | ||
} | ||
delete result[prop]; | ||
return result; | ||
}); |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
var assoc = require('./assoc'); | ||
@@ -17,5 +16,5 @@ var dissoc = require('./dissoc'); | ||
* @sig [String] -> {k: v} -> {k: v} | ||
* @param {Array} path the path to set | ||
* @param {Object} obj the object to clone | ||
* @return {Object} a new object without the property at path | ||
* @param {Array} path The path to the value to omit | ||
* @param {Object} obj The object to clone | ||
* @return {Object} A new object without the property at path | ||
* @see R.assocPath | ||
@@ -34,5 +33,5 @@ * @example | ||
var head = path[0]; | ||
var tail = _slice(path, 1); | ||
var tail = Array.prototype.slice.call(path, 1); | ||
return obj[head] == null ? obj : assoc(head, dissocPath(tail, obj[head]), obj); | ||
} | ||
}); |
@@ -20,5 +20,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* @param {Number} n | ||
* @param {*} list | ||
* @return {*} | ||
* @see R.take, R.transduce | ||
* @param {[a]} list | ||
* @return {[a]} A copy of list without the first `n` elements | ||
* @see R.take, R.transduce, R.dropLast, R.dropWhile | ||
* @example | ||
@@ -32,4 +32,4 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('drop', _xdrop, function drop(n, xs) { | ||
module.exports = _curry2(_dispatchable(['drop'], _xdrop, function drop(n, xs) { | ||
return slice(Math.max(0, n), Infinity, xs); | ||
})); |
@@ -16,6 +16,6 @@ var _curry2 = require('./internal/_curry2'); | ||
* @sig Number -> String -> String | ||
* @param {Number} n The number of elements of `xs` to skip. | ||
* @param {Array} xs The collection to consider. | ||
* @return {Array} | ||
* @see R.takeLast | ||
* @param {Number} n The number of elements of `list` to skip. | ||
* @param {Array} list The list of elements to consider. | ||
* @return {Array} A copy of the list with only the first `list.length - n` elements | ||
* @see R.takeLast, R.drop, R.dropWhile, R.dropLastWhile | ||
* @example | ||
@@ -29,2 +29,2 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('dropLast', _xdropLast, _dropLast)); | ||
module.exports = _curry2(_dispatchable([], _xdropLast, _dropLast)); |
@@ -10,4 +10,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* satisfy the supplied predicate function. It passes each value from the right | ||
* to the supplied predicate function, skipping elements while the predicate | ||
* function returns `true`. The predicate function is applied to one argument: | ||
* to the supplied predicate function, skipping elements until the predicate | ||
* function returns a `falsy` value. The predicate function is applied to one argument: | ||
* *(value)*. | ||
@@ -20,6 +20,6 @@ * | ||
* @sig (a -> Boolean) -> [a] -> [a] | ||
* @param {Function} fn The function called per iteration. | ||
* @param {Function} predicate The function to be called on each element | ||
* @param {Array} list The collection to iterate over. | ||
* @return {Array} A new array. | ||
* @see R.takeLastWhile, R.addIndex | ||
* @return {Array} A new array without any trailing elements that return `falsy` values from the `predicate`. | ||
* @see R.takeLastWhile, R.addIndex, R.drop, R.dropWhile | ||
* @example | ||
@@ -31,2 +31,2 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('dropLastWhile', _xdropLastWhile, _dropLastWhile)); | ||
module.exports = _curry2(_dispatchable([], _xdropLastWhile, _dropLastWhile)); |
@@ -12,4 +12,2 @@ var _curry1 = require('./internal/_curry1'); | ||
* | ||
* Dispatches to the `dropRepeats` method of the first argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -29,2 +27,2 @@ * | ||
*/ | ||
module.exports = _curry1(_dispatchable('dropRepeats', _xdropRepeatsWith(equals), dropRepeatsWith(equals))); | ||
module.exports = _curry1(_dispatchable([], _xdropRepeatsWith(equals), dropRepeatsWith(equals))); |
@@ -9,7 +9,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* Returns a new list without any consecutively repeating elements. Equality is | ||
* determined by applying the supplied predicate two consecutive elements. The | ||
* first element in a series of equal element is the one being preserved. | ||
* determined by applying the supplied predicate to each pair of consecutive elements. The | ||
* first element in a series of equal elements will be preserved. | ||
* | ||
* Dispatches to the `dropRepeatsWith` method of the second argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -31,3 +29,3 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('dropRepeatsWith', _xdropRepeatsWith, function dropRepeatsWith(pred, list) { | ||
module.exports = _curry2(_dispatchable([], _xdropRepeatsWith, function dropRepeatsWith(pred, list) { | ||
var result = []; | ||
@@ -34,0 +32,0 @@ var idx = 1; |
var _curry2 = require('./internal/_curry2'); | ||
var _dispatchable = require('./internal/_dispatchable'); | ||
var _slice = require('./internal/_slice'); | ||
var _xdropWhile = require('./internal/_xdropWhile'); | ||
@@ -32,3 +31,3 @@ | ||
*/ | ||
module.exports = _curry2(_dispatchable('dropWhile', _xdropWhile, function dropWhile(pred, list) { | ||
module.exports = _curry2(_dispatchable(['dropWhile'], _xdropWhile, function dropWhile(pred, list) { | ||
var idx = 0; | ||
@@ -39,3 +38,3 @@ var len = list.length; | ||
} | ||
return _slice(list, idx); | ||
return Array.prototype.slice.call(list, idx); | ||
})); |
@@ -37,7 +37,7 @@ var _curry2 = require('./internal/_curry2'); | ||
type = typeof transformation; | ||
result[key] = type === 'function' ? transformation(object[key]) | ||
: type === 'object' ? evolve(transformations[key], object[key]) | ||
: object[key]; | ||
result[key] = type === 'function' ? transformation(object[key]) | ||
: transformation && type === 'object' ? evolve(transformation, object[key]) | ||
: object[key]; | ||
} | ||
return result; | ||
}); |
@@ -36,3 +36,3 @@ var _curry2 = require('./internal/_curry2'); | ||
*/ | ||
module.exports = _curry2(_dispatchable('filter', _xfilter, function(pred, filterable) { | ||
module.exports = _curry2(_dispatchable(['filter'], _xfilter, function(pred, filterable) { | ||
return ( | ||
@@ -39,0 +39,0 @@ _isObject(filterable) ? |
@@ -30,3 +30,3 @@ var _curry2 = require('./internal/_curry2'); | ||
*/ | ||
module.exports = _curry2(_dispatchable('find', _xfind, function find(fn, list) { | ||
module.exports = _curry2(_dispatchable(['find'], _xfind, function find(fn, list) { | ||
var idx = 0; | ||
@@ -33,0 +33,0 @@ var len = list.length; |
@@ -10,4 +10,2 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* Dispatches to the `findIndex` method of the second argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -31,3 +29,3 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('findIndex', _xfindIndex, function findIndex(fn, list) { | ||
module.exports = _curry2(_dispatchable([], _xfindIndex, function findIndex(fn, list) { | ||
var idx = 0; | ||
@@ -34,0 +32,0 @@ var len = list.length; |
@@ -10,4 +10,2 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* Dispatches to the `findLast` method of the second argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -31,3 +29,3 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('findLast', _xfindLast, function findLast(fn, list) { | ||
module.exports = _curry2(_dispatchable([], _xfindLast, function findLast(fn, list) { | ||
var idx = list.length - 1; | ||
@@ -34,0 +32,0 @@ while (idx >= 0) { |
@@ -10,4 +10,2 @@ var _curry2 = require('./internal/_curry2'); | ||
* | ||
* Dispatches to the `findLastIndex` method of the second argument, if present. | ||
* | ||
* Acts as a transducer if a transformer is given in list position. | ||
@@ -31,3 +29,3 @@ * | ||
*/ | ||
module.exports = _curry2(_dispatchable('findLastIndex', _xfindLastIndex, function findLastIndex(fn, list) { | ||
module.exports = _curry2(_dispatchable([], _xfindLastIndex, function findLastIndex(fn, list) { | ||
var idx = list.length - 1; | ||
@@ -34,0 +32,0 @@ while (idx >= 0) { |
var _curry1 = require('./internal/_curry1'); | ||
var _slice = require('./internal/_slice'); | ||
var curry = require('./curry'); | ||
@@ -24,6 +23,7 @@ | ||
* R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3] | ||
* @symb R.flip(f)(a, b, c) = f(b, a, c) | ||
*/ | ||
module.exports = _curry1(function flip(fn) { | ||
return curry(function(a, b) { | ||
var args = _slice(arguments); | ||
var args = Array.prototype.slice.call(arguments, 0); | ||
args[0] = b; | ||
@@ -30,0 +30,0 @@ args[1] = a; |
@@ -37,2 +37,3 @@ var _checkForMethod = require('./internal/_checkForMethod'); | ||
* // logs 8 | ||
* @symb R.forEach(f, [a, b, c]) = [a, b, c] | ||
*/ | ||
@@ -39,0 +40,0 @@ module.exports = _curry2(_checkForMethod('forEach', function forEach(fn, list) { |
@@ -22,3 +22,4 @@ var _curry1 = require('./internal/_curry1'); | ||
* R.identity(obj) === obj; //=> true | ||
* @symb R.identity(a) = a | ||
*/ | ||
module.exports = _curry1(_identity); |
@@ -13,3 +13,3 @@ var add = require('./add'); | ||
* @param {Number} n | ||
* @return {Number} | ||
* @return {Number} n + 1 | ||
* @see R.dec | ||
@@ -16,0 +16,0 @@ * @example |
var _curry3 = require('./internal/_curry3'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -25,5 +24,5 @@ | ||
idx = idx < list.length && idx >= 0 ? idx : list.length; | ||
var result = _slice(list); | ||
var result = Array.prototype.slice.call(list, 0); | ||
result.splice(idx, 0, elt); | ||
return result; | ||
}); |
@@ -1,4 +0,2 @@ | ||
var _concat = require('./internal/_concat'); | ||
var _curry3 = require('./internal/_curry3'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -26,3 +24,5 @@ | ||
idx = idx < list.length && idx >= 0 ? idx : list.length; | ||
return _concat(_concat(_slice(list, 0, idx), elts), _slice(list, idx)); | ||
return [].concat(Array.prototype.slice.call(list, 0, idx), | ||
elts, | ||
Array.prototype.slice.call(list, idx)); | ||
}); |
@@ -1,3 +0,1 @@ | ||
var _slice = require('./_slice'); | ||
module.exports = function _aperture(n, list) { | ||
@@ -8,3 +6,3 @@ var idx = 0; | ||
while (idx < limit) { | ||
acc[idx] = _slice(list, idx, idx + n); | ||
acc[idx] = Array.prototype.slice.call(list, idx, idx + n); | ||
idx += 1; | ||
@@ -11,0 +9,0 @@ } |
var _isArray = require('./_isArray'); | ||
var _slice = require('./_slice'); | ||
/** | ||
* Similar to hasMethod, this checks whether a function has a [methodname] | ||
* function. If it isn't an array it will execute that function otherwise it | ||
* will default to the ramda implementation. | ||
* This checks whether a function has a [methodname] function. If it isn't an | ||
* array it will execute that function otherwise it will default to the ramda | ||
* implementation. | ||
* | ||
@@ -24,4 +23,4 @@ * @private | ||
fn.apply(this, arguments) : | ||
obj[methodname].apply(obj, _slice(arguments, 0, length - 1)); | ||
obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1)); | ||
}; | ||
}; |
var _isArray = require('./_isArray'); | ||
var _isTransformer = require('./_isTransformer'); | ||
var _slice = require('./_slice'); | ||
@@ -9,9 +8,9 @@ | ||
* object in list position (last argument). If it is an array, executes [fn]. | ||
* Otherwise, if it has a function with [methodname], it will execute that | ||
* function (functor case). Otherwise, if it is a transformer, uses transducer | ||
* [xf] to return a new transformer (transducer case). Otherwise, it will | ||
* default to executing [fn]. | ||
* Otherwise, if it has a function with one of the given method names, it will | ||
* execute that function (functor case). Otherwise, if it is a transformer, | ||
* uses transducer [xf] to return a new transformer (transducer case). | ||
* Otherwise, it will default to executing [fn]. | ||
* | ||
* @private | ||
* @param {String} methodname property to check for a custom implementation | ||
* @param {Array} methodNames properties to check for a custom implementation | ||
* @param {Function} xf transducer to initialize if object is transformer | ||
@@ -21,13 +20,16 @@ * @param {Function} fn default ramda implementation | ||
*/ | ||
module.exports = function _dispatchable(methodname, xf, fn) { | ||
module.exports = function _dispatchable(methodNames, xf, fn) { | ||
return function() { | ||
var length = arguments.length; | ||
if (length === 0) { | ||
if (arguments.length === 0) { | ||
return fn(); | ||
} | ||
var obj = arguments[length - 1]; | ||
var args = Array.prototype.slice.call(arguments, 0); | ||
var obj = args.pop(); | ||
if (!_isArray(obj)) { | ||
var args = _slice(arguments, 0, length - 1); | ||
if (typeof obj[methodname] === 'function') { | ||
return obj[methodname].apply(obj, args); | ||
var idx = 0; | ||
while (idx < methodNames.length) { | ||
if (typeof obj[methodNames[idx]] === 'function') { | ||
return obj[methodNames[idx]].apply(obj, args); | ||
} | ||
idx += 1; | ||
} | ||
@@ -34,0 +36,0 @@ if (_isTransformer(obj)) { |
@@ -1,3 +0,1 @@ | ||
var _slice = require('./_slice'); | ||
module.exports = function dropLastWhile(pred, list) { | ||
@@ -8,3 +6,3 @@ var idx = list.length - 1; | ||
} | ||
return _slice(list, 0, idx + 1); | ||
return Array.prototype.slice.call(list, 0, idx + 1); | ||
}; |
@@ -109,3 +109,3 @@ var _contains = require('./_contains'); | ||
newSize = set._nativeSet.size; | ||
return (newSize > prevSize); | ||
return newSize === prevSize; | ||
} else { | ||
@@ -112,0 +112,0 @@ return set._nativeSet.has(item); |
var _concat = require('./_concat'); | ||
var _curry2 = require('./_curry2'); | ||
var _slice = require('./_slice'); | ||
var _xfBase = require('./_xfBase'); | ||
@@ -32,3 +31,4 @@ | ||
XAperture.prototype.getCopy = function() { | ||
return _concat(_slice(this.acc, this.pos), _slice(this.acc, 0, this.pos)); | ||
return _concat(Array.prototype.slice.call(this.acc, this.pos), | ||
Array.prototype.slice.call(this.acc, 0, this.pos)); | ||
}; | ||
@@ -35,0 +35,0 @@ |
var _curry2 = require('./_curry2'); | ||
var _xfBase = require('./_xfBase'); | ||
@@ -11,8 +12,5 @@ | ||
} | ||
XDropRepeatsWith.prototype['@@transducer/init'] = function() { | ||
return this.xf['@@transducer/init'](); | ||
}; | ||
XDropRepeatsWith.prototype['@@transducer/result'] = function(result) { | ||
return this.xf['@@transducer/result'](result); | ||
}; | ||
XDropRepeatsWith.prototype['@@transducer/init'] = _xfBase.init; | ||
XDropRepeatsWith.prototype['@@transducer/result'] = _xfBase.result; | ||
XDropRepeatsWith.prototype['@@transducer/step'] = function(result, input) { | ||
@@ -19,0 +17,0 @@ var sameAsLast = false; |
@@ -15,3 +15,3 @@ var _containsWith = require('./internal/_containsWith'); | ||
* @category Relation | ||
* @sig (a -> a -> Boolean) -> [*] -> [*] -> [*] | ||
* @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] | ||
* @param {Function} pred A predicate function that determines whether | ||
@@ -18,0 +18,0 @@ * the two supplied elements are equal. |
var _curry2 = require('./internal/_curry2'); | ||
var _isFunction = require('./internal/_isFunction'); | ||
var _slice = require('./internal/_slice'); | ||
var curryN = require('./curryN'); | ||
@@ -30,2 +29,5 @@ var toString = require('./toString'); | ||
* sliceFrom6(8, 'abcdefghijklm'); //=> 'gh' | ||
* @symb R.invoker(0, 'method')(o) = o['method']() | ||
* @symb R.invoker(1, 'method')(a, o) = o['method'](a) | ||
* @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b) | ||
*/ | ||
@@ -36,3 +38,3 @@ module.exports = _curry2(function invoker(arity, method) { | ||
if (target != null && _isFunction(target[method])) { | ||
return target[method].apply(target, _slice(arguments, 0, arity)); | ||
return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity)); | ||
} | ||
@@ -39,0 +41,0 @@ throw new TypeError(toString(target) + ' does not have a method named "' + method + '"'); |
@@ -17,2 +17,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise. | ||
* @deprecated since v0.23.0 | ||
* @example | ||
@@ -19,0 +20,0 @@ * |
@@ -1,2 +0,1 @@ | ||
var _arrayOf = require('./internal/_arrayOf'); | ||
var _curry1 = require('./internal/_curry1'); | ||
@@ -21,5 +20,6 @@ var converge = require('./converge'); | ||
* getRange(3, 4, 9, -3); //=> [-3, 9] | ||
* @symb R.juxt([f, g, h])(a, b) = [f(a, b), g(a, b), h(a, b)] | ||
*/ | ||
module.exports = _curry1(function juxt(fns) { | ||
return converge(_arrayOf, fns); | ||
return converge(function() { return Array.prototype.slice.call(arguments, 0); }, fns); | ||
}); |
@@ -14,4 +14,5 @@ var _curry1 = require('./internal/_curry1'); | ||
* @category Object | ||
* @typedefn Idx = String | Int | ||
* @typedefn Lens s a = Functor f => (a -> f a) -> s -> f s | ||
* @sig [String] -> Lens s a | ||
* @sig [Idx] -> Lens s a | ||
* @param {Array} path The path to use. | ||
@@ -22,7 +23,10 @@ * @return {Lens} | ||
* | ||
* var xyLens = R.lensPath(['x', 'y']); | ||
* var xHeadYLens = R.lensPath(['x', 0, 'y']); | ||
* | ||
* R.view(xyLens, {x: {y: 2, z: 3}}); //=> 2 | ||
* R.set(xyLens, 4, {x: {y: 2, z: 3}}); //=> {x: {y: 4, z: 3}} | ||
* R.over(xyLens, R.negate, {x: {y: 2, z: 3}}); //=> {x: {y: -2, z: 3}} | ||
* R.view(xHeadYLens, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); | ||
* //=> 2 | ||
* R.set(xHeadYLens, 1, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); | ||
* //=> {x: [{y: 1, z: 3}, {y: 4, z: 5}]} | ||
* R.over(xHeadYLens, R.negate, {x: [{y: 2, z: 3}, {y: 4, z: 5}]}); | ||
* //=> {x: [{y: -2, z: 3}, {y: 4, z: 5}]} | ||
*/ | ||
@@ -29,0 +33,0 @@ module.exports = _curry1(function lensPath(p) { |
@@ -19,7 +19,7 @@ var _curry1 = require('./internal/_curry1'); | ||
* | ||
* var madd3 = R.lift(R.curry((a, b, c) => a + b + c)); | ||
* var madd3 = R.lift((a, b, c) => a + b + c); | ||
* | ||
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] | ||
* | ||
* var madd5 = R.lift(R.curry((a, b, c, d, e) => a + b + c + d + e)); | ||
* var madd5 = R.lift((a, b, c, d, e) => a + b + c + d + e); | ||
* | ||
@@ -26,0 +26,0 @@ * madd5([1,2], [3], [4, 5], [6], [7, 8]); //=> [21, 22, 22, 23, 22, 23, 23, 24] |
var _curry2 = require('./internal/_curry2'); | ||
var _reduce = require('./internal/_reduce'); | ||
var _slice = require('./internal/_slice'); | ||
var ap = require('./ap'); | ||
@@ -23,3 +22,3 @@ var curryN = require('./curryN'); | ||
* | ||
* var madd3 = R.liftN(3, R.curryN(3, (...args) => R.sum(args))); | ||
* var madd3 = R.liftN(3, (...args) => R.sum(args)); | ||
* madd3([1,2,3], [1,2,3], [1]); //=> [3, 4, 5, 4, 5, 6, 5, 6, 7] | ||
@@ -30,4 +29,4 @@ */ | ||
return curryN(arity, function() { | ||
return _reduce(ap, map(lifted, arguments[0]), _slice(arguments, 1)); | ||
return _reduce(ap, map(lifted, arguments[0]), Array.prototype.slice.call(arguments, 1)); | ||
}); | ||
}); |
@@ -41,4 +41,7 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6} | ||
* @symb R.map(f, [a, b]) = [f(a), f(b)] | ||
* @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) } | ||
* @symb R.map(f, functor_o) = functor_o.map(f) | ||
*/ | ||
module.exports = _curry2(_dispatchable('map', _xmap, function map(fn, functor) { | ||
module.exports = _curry2(_dispatchable(['map'], _xmap, function map(fn, functor) { | ||
switch (Object.prototype.toString.call(functor)) { | ||
@@ -45,0 +48,0 @@ case '[object Function]': |
@@ -22,3 +22,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* @return {*} The final, accumulated value. | ||
* @see R.addIndex | ||
* @see R.addIndex, R.mapAccumRight | ||
* @example | ||
@@ -30,2 +30,10 @@ * | ||
* R.mapAccum(appender, 0, digits); //=> ['01234', ['01', '012', '0123', '01234']] | ||
* @symb R.mapAccum(f, a, [b, c, d]) = [ | ||
* f(f(f(a, b)[0], c)[0], d)[0], | ||
* [ | ||
* f(a, b)[1], | ||
* f(f(a, b)[0], c)[1], | ||
* f(f(f(a, b)[0], c)[0], d)[1] | ||
* ] | ||
* ] | ||
*/ | ||
@@ -32,0 +40,0 @@ module.exports = _curry3(function mapAccum(fn, acc, list) { |
@@ -13,4 +13,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* | ||
* The iterator function receives two arguments, *acc* and *value*, and should | ||
* return a tuple *[acc, value]*. | ||
* The iterator function receives two arguments, *value* and *acc*, and should | ||
* return a tuple *[value, acc]*. | ||
* | ||
@@ -21,3 +21,3 @@ * @func | ||
* @category List | ||
* @sig (acc -> x -> (acc, y)) -> acc -> [x] -> (acc, [y]) | ||
* @sig (x-> acc -> (y, acc)) -> acc -> [x] -> ([y], acc) | ||
* @param {Function} fn The function to be called on every element of the input `list`. | ||
@@ -27,3 +27,3 @@ * @param {*} acc The accumulator value. | ||
* @return {*} The final, accumulated value. | ||
* @see R.addIndex | ||
* @see R.addIndex, R.mapAccum | ||
* @example | ||
@@ -34,3 +34,11 @@ * | ||
* | ||
* R.mapAccumRight(append, 0, digits); //=> ['04321', ['04321', '0432', '043', '04']] | ||
* R.mapAccumRight(append, 5, digits); //=> [['12345', '2345', '345', '45'], '12345'] | ||
* @symb R.mapAccumRight(f, a, [b, c, d]) = [ | ||
* [ | ||
* f(b, f(c, f(d, a)[0])[0])[1], | ||
* f(c, f(d, a)[0])[1], | ||
* f(d, a)[1], | ||
* ] | ||
* f(b, f(c, f(d, a)[0])[0])[0], | ||
* ] | ||
*/ | ||
@@ -42,7 +50,7 @@ module.exports = _curry3(function mapAccumRight(fn, acc, list) { | ||
while (idx >= 0) { | ||
tuple = fn(tuple[0], list[idx]); | ||
tuple = fn(list[idx], tuple[0]); | ||
result[idx] = tuple[1]; | ||
idx -= 1; | ||
} | ||
return [tuple[0], result]; | ||
return [result, tuple[0]]; | ||
}); |
var _curry1 = require('./internal/_curry1'); | ||
var _slice = require('./internal/_slice'); | ||
var mean = require('./mean'); | ||
@@ -29,5 +28,5 @@ | ||
var idx = (len - width) / 2; | ||
return mean(_slice(list).sort(function(a, b) { | ||
return mean(Array.prototype.slice.call(list, 0).sort(function(a, b) { | ||
return a < b ? -1 : a > b ? 1 : 0; | ||
}).slice(idx, idx + width)); | ||
}); |
@@ -26,2 +26,3 @@ var _assign = require('./internal/_assign'); | ||
* resetToDefault({x: 5, y: 2}); //=> {x: 0, y: 2} | ||
* @symb R.merge({ x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: 5, z: 3 } | ||
*/ | ||
@@ -28,0 +29,0 @@ module.exports = _curry2(function merge(l, r) { |
@@ -20,2 +20,3 @@ var _assign = require('./internal/_assign'); | ||
* R.mergeAll([{foo:1},{foo:2},{bar:2}]); //=> {foo:2,bar:2} | ||
* @symb R.mergeAll([{ x: 1 }, { y: 2 }, { z: 3 }]) = { x: 1, y: 2, z: 3 } | ||
*/ | ||
@@ -22,0 +23,0 @@ module.exports = _curry1(function mergeAll(list) { |
@@ -30,2 +30,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] } | ||
* @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 } | ||
*/ | ||
@@ -32,0 +33,0 @@ module.exports = _curry3(function mergeWithKey(fn, l, r) { |
@@ -29,2 +29,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* takesOneArg(1, 2); //=> [1, undefined] | ||
* @symb R.nAry(0, f)(a, b) = f() | ||
* @symb R.nAry(1, f)(a, b) = f(a) | ||
* @symb R.nAry(2, f)(a, b) = f(a, b) | ||
*/ | ||
@@ -31,0 +34,0 @@ module.exports = _curry2(function nAry(n, fn) { |
@@ -30,2 +30,2 @@ var _complement = require('./internal/_complement'); | ||
*/ | ||
module.exports = _curry2(_complement(_dispatchable('any', _xany, any))); | ||
module.exports = _curry2(_complement(_dispatchable(['any'], _xany, any))); |
@@ -27,2 +27,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.nth(3, 'abc'); //=> '' | ||
* @symb R.nth(-1, [a, b, c]) = c | ||
* @symb R.nth(0, [a, b, c]) = a | ||
* @symb R.nth(1, [a, b, c]) = b | ||
*/ | ||
@@ -29,0 +32,0 @@ module.exports = _curry2(function nth(offset, list) { |
@@ -20,2 +20,5 @@ var _curry1 = require('./internal/_curry1'); | ||
* R.nthArg(-1)('a', 'b', 'c'); //=> 'c' | ||
* @symb R.nthArg(-1)(a, b, c) = c | ||
* @symb R.nthArg(0)(a, b, c) = a | ||
* @symb R.nthArg(1)(a, b, c) = b | ||
*/ | ||
@@ -22,0 +25,0 @@ module.exports = _curry1(function nthArg(n) { |
@@ -12,6 +12,6 @@ var _curry2 = require('./internal/_curry2'); | ||
* @category Logic | ||
* @sig * -> * -> * | ||
* @param {Boolean} a A boolean value | ||
* @param {Boolean} b A boolean value | ||
* @return {Boolean} `true` if one or both arguments are `true`, `false` otherwise | ||
* @sig a -> b -> a | b | ||
* @param {Any} a | ||
* @param {Any} b | ||
* @return {Any} the first argument if truthy, otherwise the second argument. | ||
* @see R.either | ||
@@ -18,0 +18,0 @@ * @example |
@@ -21,4 +21,4 @@ var _concat = require('./internal/_concat'); | ||
* | ||
* var multiply = (a, b) => a * b; | ||
* var double = R.partial(multiply, [2]); | ||
* var multiply2 = (a, b) => a * b; | ||
* var double = R.partial(multiply2, [2]); | ||
* double(2); //=> 4 | ||
@@ -32,3 +32,4 @@ * | ||
* sayHelloToMs('Jane', 'Jones'); //=> 'Hello, Ms. Jane Jones!' | ||
* @symb R.partial(f, [a, b])(c, d) = f(a, b, c, d) | ||
*/ | ||
module.exports = _createPartialApplicator(_concat); |
@@ -28,3 +28,4 @@ var _concat = require('./internal/_concat'); | ||
* greetMsJaneJones('Hello'); //=> 'Hello, Ms. Jane Jones!' | ||
* @symb R.partialRight(f, [a, b])(c, d) = f(c, d, a, b) | ||
*/ | ||
module.exports = _createPartialApplicator(flip(_concat)); |
@@ -11,3 +11,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* @category Object | ||
* @sig [String] -> {k: v} -> v | Undefined | ||
* @typedefn Idx = String | Int | ||
* @sig [Idx] -> {a} -> a | Undefined | ||
* @param {Array} path The path to use. | ||
@@ -14,0 +15,0 @@ * @param {Object} obj The object to retrieve the nested property from. |
@@ -14,3 +14,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* @category Relation | ||
* @sig [String] -> * -> {String: *} -> Boolean | ||
* @typedefn Idx = String | Int | ||
* @sig [Idx] -> a -> {a} -> Boolean | ||
* @param {Array} path The path of the nested property to use | ||
@@ -17,0 +18,0 @@ * @param {*} val The value to compare the nested property with |
@@ -14,3 +14,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* @category Object | ||
* @sig a -> [String] -> Object -> a | ||
* @typedefn Idx = String | Int | ||
* @sig a -> [Idx] -> {a} -> a | ||
* @param {*} d The default value. | ||
@@ -17,0 +18,0 @@ * @param {Array} p The path to use. |
@@ -13,3 +13,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* @category Logic | ||
* @sig (a -> Boolean) -> [String] -> Object -> Boolean | ||
* @typedefn Idx = String | Int | ||
* @sig (a -> Boolean) -> [Idx] -> {a} -> Boolean | ||
* @param {Function} pred | ||
@@ -16,0 +17,0 @@ * @param {Array} propPath |
@@ -28,2 +28,3 @@ var _arity = require('./internal/_arity'); | ||
* f(3, 4); // -(3^4) + 1 | ||
* @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b))) | ||
*/ | ||
@@ -30,0 +31,0 @@ module.exports = function pipe() { |
@@ -14,3 +14,3 @@ var composeK = require('./composeK'); | ||
* @category Function | ||
* @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (m a -> m z) | ||
* @sig Chain m => ((a -> m b), (b -> m c), ..., (y -> m z)) -> (a -> m z) | ||
* @param {...Function} | ||
@@ -33,9 +33,13 @@ * @return {Function} | ||
* | ||
* getStateCode(Maybe.of('{"user":{"address":{"state":"ny"}}}')); | ||
* getStateCode('{"user":{"address":{"state":"ny"}}}'); | ||
* //=> Just('NY') | ||
* getStateCode(Maybe.of('[Invalid JSON]')); | ||
* getStateCode('[Invalid JSON]'); | ||
* //=> Nothing() | ||
* @symb R.pipeK(f, g, h)(a) = R.chain(h, R.chain(g, f(a))) | ||
*/ | ||
module.exports = function pipeK() { | ||
if (arguments.length === 0) { | ||
throw new Error('pipeK requires at least one argument'); | ||
} | ||
return composeK.apply(this, reverse(arguments)); | ||
}; |
@@ -23,2 +23,4 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.pluck(0)([[1, 2], [3, 4]]); //=> [1, 3] | ||
* @symb R.pluck('x', [{x: 1, y: 2}, {x: 3, y: 4}, {x: 5, y: 6}]) = [1, 3, 5] | ||
* @symb R.pluck(0, [[1, 2], [3, 4], [5, 6]]) = [1, 3, 5] | ||
*/ | ||
@@ -25,0 +27,0 @@ module.exports = _curry2(function pluck(p, list) { |
@@ -13,2 +13,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* | ||
* The arguments' order of `reduceRight`'s iterator function is *(value, acc)*. | ||
* | ||
* Note: `R.reduce` does not skip deleted or unassigned indices (sparse | ||
@@ -31,10 +33,18 @@ * arrays), unlike the native `Array.prototype.reduce` method. For more details | ||
* @return {*} The final, accumulated value. | ||
* @see R.reduced, R.addIndex | ||
* @see R.reduced, R.addIndex, R.reduceRight | ||
* @example | ||
* | ||
* var numbers = [1, 2, 3]; | ||
* var plus = (a, b) => a + b; | ||
* R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10 | ||
* - -10 | ||
* / \ / \ | ||
* - 4 -6 4 | ||
* / \ / \ | ||
* - 3 ==> -3 3 | ||
* / \ / \ | ||
* - 2 -1 2 | ||
* / \ / \ | ||
* 0 1 0 1 | ||
* | ||
* R.reduce(plus, 10, numbers); //=> 16 | ||
* @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d) | ||
*/ | ||
module.exports = _curry3(_reduce); |
@@ -52,3 +52,3 @@ var _curryN = require('./internal/_curryN'); | ||
*/ | ||
module.exports = _curryN(4, [], _dispatchable('reduceBy', _xreduceBy, | ||
module.exports = _curryN(4, [], _dispatchable([], _xreduceBy, | ||
function reduceBy(valueFn, valueAcc, keyFn, list) { | ||
@@ -55,0 +55,0 @@ return _reduce(function(acc, elt) { |
@@ -12,3 +12,4 @@ var _curry3 = require('./internal/_curry3'); | ||
* | ||
* The iterator function receives two values: *(acc, value)* | ||
* The iterator function receives two values: *(value, acc)*, while the arguments' | ||
* order of `reduce`'s iterator function is *(acc, value)*. | ||
* | ||
@@ -24,15 +25,23 @@ * Note: `R.reduceRight` does not skip deleted or unassigned indices (sparse | ||
* @category List | ||
* @sig (a,b -> a) -> a -> [b] -> a | ||
* @param {Function} fn The iterator function. Receives two values, the accumulator and the | ||
* current element from the array. | ||
* @sig (a, b -> b) -> b -> [a] -> b | ||
* @param {Function} fn The iterator function. Receives two values, the current element from the array | ||
* and the accumulator. | ||
* @param {*} acc The accumulator value. | ||
* @param {Array} list The list to iterate over. | ||
* @return {*} The final, accumulated value. | ||
* @see R.addIndex | ||
* @see R.reduce, R.addIndex | ||
* @example | ||
* | ||
* var pairs = [ ['a', 1], ['b', 2], ['c', 3] ]; | ||
* var flattenPairs = (acc, pair) => acc.concat(pair); | ||
* R.reduceRight(R.subtract, 0, [1, 2, 3, 4]) // => (1 - (2 - (3 - (4 - 0)))) = -2 | ||
* - -2 | ||
* / \ / \ | ||
* 1 - 1 3 | ||
* / \ / \ | ||
* 2 - ==> 2 -1 | ||
* / \ / \ | ||
* 3 - 3 4 | ||
* / \ / \ | ||
* 4 0 4 0 | ||
* | ||
* R.reduceRight(flattenPairs, [], pairs); //=> [ 'c', 3, 'b', 2, 'a', 1 ] | ||
* @symb R.reduceRight(f, a, [b, c, d]) = f(b, f(c, f(d, a))) | ||
*/ | ||
@@ -42,3 +51,3 @@ module.exports = _curry3(function reduceRight(fn, acc, list) { | ||
while (idx >= 0) { | ||
acc = fn(acc, list[idx]); | ||
acc = fn(list[idx], acc); | ||
idx -= 1; | ||
@@ -45,0 +54,0 @@ } |
@@ -1,4 +0,2 @@ | ||
var _concat = require('./internal/_concat'); | ||
var _curry3 = require('./internal/_curry3'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -26,4 +24,5 @@ | ||
module.exports = _curry3(function remove(start, count, list) { | ||
return _concat(_slice(list, 0, Math.min(start, list.length)), | ||
_slice(list, Math.min(list.length, start + count))); | ||
var result = Array.prototype.slice.call(list, 0); | ||
result.splice(start, count); | ||
return result; | ||
}); |
@@ -24,2 +24,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* repeatedObjs[0] === repeatedObjs[1]; //=> true | ||
* @symb R.repeat(a, 0) = [] | ||
* @symb R.repeat(a, 1) = [a] | ||
* @symb R.repeat(a, 2) = [a, a] | ||
*/ | ||
@@ -26,0 +29,0 @@ module.exports = _curry2(function repeat(value, n) { |
var _curry1 = require('./internal/_curry1'); | ||
var _isString = require('./internal/_isString'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -32,3 +31,3 @@ | ||
return _isString(list) ? list.split('').reverse().join('') : | ||
_slice(list).reverse(); | ||
Array.prototype.slice.call(list, 0).reverse(); | ||
}); |
@@ -22,2 +22,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* var factorials = R.scan(R.multiply, 1, numbers); //=> [1, 1, 2, 6, 24] | ||
* @symb R.scan(f, a, [b, c]) = [a, f(a, b), f(f(a, b), c)] | ||
*/ | ||
@@ -24,0 +25,0 @@ module.exports = _curry3(function scan(fn, acc, list) { |
@@ -35,5 +35,5 @@ var _curry2 = require('./internal/_curry2'); | ||
traversable.sequence(of) : | ||
reduceRight(function(acc, x) { return ap(map(prepend, x), acc); }, | ||
reduceRight(function(x, acc) { return ap(map(prepend, x), acc); }, | ||
of([]), | ||
traversable); | ||
}); |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -26,3 +25,3 @@ | ||
module.exports = _curry2(function sort(comparator, list) { | ||
return _slice(list).sort(comparator); | ||
return Array.prototype.slice.call(list, 0).sort(comparator); | ||
}); |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -38,3 +37,3 @@ | ||
module.exports = _curry2(function sortBy(fn, list) { | ||
return _slice(list).sort(function(a, b) { | ||
return Array.prototype.slice.call(list, 0).sort(function(a, b) { | ||
var aa = fn(a); | ||
@@ -41,0 +40,0 @@ var bb = fn(b); |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -34,3 +33,3 @@ | ||
return [prefix, _slice(list, idx)]; | ||
return [prefix, Array.prototype.slice.call(list, idx)]; | ||
}); |
@@ -15,3 +15,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* @category Relation | ||
* @sig (a -> a -> Boolean) -> [a] -> [a] -> [a] | ||
* @sig ((a, a) -> Boolean) -> [a] -> [a] -> [a] | ||
* @param {Function} pred A predicate used to test whether two items are equal. | ||
@@ -18,0 +18,0 @@ * @param {Array} list1 The first list. |
var _checkForMethod = require('./internal/_checkForMethod'); | ||
var _curry1 = require('./internal/_curry1'); | ||
var slice = require('./slice'); | ||
@@ -32,2 +33,2 @@ | ||
*/ | ||
module.exports = _checkForMethod('tail', slice(1, Infinity)); | ||
module.exports = _curry1(_checkForMethod('tail', slice(1, Infinity))); |
@@ -45,5 +45,9 @@ var _curry2 = require('./internal/_curry2'); | ||
* //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan'] | ||
* @symb R.take(-1, [a, b]) = [a, b] | ||
* @symb R.take(0, [a, b]) = [] | ||
* @symb R.take(1, [a, b]) = [a] | ||
* @symb R.take(2, [a, b]) = [a, b] | ||
*/ | ||
module.exports = _curry2(_dispatchable('take', _xtake, function take(n, xs) { | ||
module.exports = _curry2(_dispatchable(['take'], _xtake, function take(n, xs) { | ||
return slice(0, n < 0 ? Infinity : n, xs); | ||
})); |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -32,3 +31,3 @@ | ||
} | ||
return _slice(list, idx + 1, Infinity); | ||
return Array.prototype.slice.call(list, idx + 1); | ||
}); |
var _curry2 = require('./internal/_curry2'); | ||
var _dispatchable = require('./internal/_dispatchable'); | ||
var _slice = require('./internal/_slice'); | ||
var _xtakeWhile = require('./internal/_xtakeWhile'); | ||
@@ -33,3 +32,3 @@ | ||
*/ | ||
module.exports = _curry2(_dispatchable('takeWhile', _xtakeWhile, function takeWhile(fn, list) { | ||
module.exports = _curry2(_dispatchable(['takeWhile'], _xtakeWhile, function takeWhile(fn, list) { | ||
var idx = 0; | ||
@@ -40,3 +39,3 @@ var len = list.length; | ||
} | ||
return _slice(list, 0, idx); | ||
return Array.prototype.slice.call(list, 0, idx); | ||
})); |
@@ -20,2 +20,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* // logs 'x is 100' | ||
* @symb R.tap(f, a) = a | ||
*/ | ||
@@ -22,0 +23,0 @@ module.exports = _curry2(function tap(fn, x) { |
@@ -22,2 +22,5 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.times(R.identity, 5); //=> [0, 1, 2, 3, 4] | ||
* @symb R.times(f, 0) = [] | ||
* @symb R.times(f, 1) = [f(0)] | ||
* @symb R.times(f, 2) = [f(0), f(1)] | ||
*/ | ||
@@ -24,0 +27,0 @@ module.exports = _curry2(function times(fn, n) { |
@@ -25,2 +25,5 @@ var _curry1 = require('./internal/_curry1'); | ||
* R.transpose([[10, 11], [20], [], [30, 31, 32]]) //=> [[10, 20, 30], [11, 31], [32]] | ||
* @symb R.transpose([[a], [b], [c]]) = [a, b, c] | ||
* @symb R.transpose([[a, b], [c, d]]) = [[a, c], [b, d]] | ||
* @symb R.transpose([[a, b], [c]]) = [[a, c], [b]] | ||
*/ | ||
@@ -27,0 +30,0 @@ module.exports = _curry1(function transpose(outerlist) { |
var _curry1 = require('./internal/_curry1'); | ||
var _slice = require('./internal/_slice'); | ||
@@ -27,7 +26,8 @@ | ||
* R.unapply(JSON.stringify)(1, 2, 3); //=> '[1,2,3]' | ||
* @symb R.unapply(f)(a, b) = f([a, b]) | ||
*/ | ||
module.exports = _curry1(function unapply(fn) { | ||
return function() { | ||
return fn(_slice(arguments)); | ||
return fn(Array.prototype.slice.call(arguments, 0)); | ||
}; | ||
}); |
@@ -30,2 +30,3 @@ var _curry1 = require('./internal/_curry1'); | ||
* takesOneArg(1, 2); //=> [1, undefined] | ||
* @symb R.unary(f)(a, b, c) = f(a) | ||
*/ | ||
@@ -32,0 +33,0 @@ module.exports = _curry1(function unary(fn) { |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
var curryN = require('./curryN'); | ||
@@ -33,3 +32,3 @@ | ||
endIdx = currentDepth === depth ? arguments.length : idx + value.length; | ||
value = value.apply(this, _slice(arguments, idx, endIdx)); | ||
value = value.apply(this, Array.prototype.slice.call(arguments, idx, endIdx)); | ||
currentDepth += 1; | ||
@@ -36,0 +35,0 @@ idx = endIdx; |
@@ -27,2 +27,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.unfold(f, 10); //=> [-10, -20, -30, -40, -50] | ||
* @symb R.unfold(f, x) = [f(x)[0], f(f(x)[1])[0], f(f(f(x)[1])[1])[0], ...] | ||
*/ | ||
@@ -29,0 +30,0 @@ module.exports = _curry2(function unfold(fn, seed) { |
@@ -24,2 +24,5 @@ var _curry3 = require('./internal/_curry3'); | ||
* R.update(1)(11)([0, 1, 2]); //=> [0, 11, 2] | ||
* @symb R.update(-1, a, [b, c]) = [b, a] | ||
* @symb R.update(0, a, [b, c]) = [a, c] | ||
* @symb R.update(1, a, [b, c]) = [b, a] | ||
*/ | ||
@@ -26,0 +29,0 @@ module.exports = _curry3(function update(idx, x, list) { |
var _curry2 = require('./internal/_curry2'); | ||
var _slice = require('./internal/_slice'); | ||
var curryN = require('./curryN'); | ||
@@ -26,2 +25,3 @@ | ||
* @return {Function} The wrapped function. | ||
* @see R.converge | ||
* @example | ||
@@ -33,2 +33,3 @@ * | ||
* R.useWith(Math.pow, [R.dec, R.inc])(3)(4); //=> 32 | ||
* @symb R.useWith(f, [g, h])(a, b) = f(g(a), h(b)) | ||
*/ | ||
@@ -43,4 +44,4 @@ module.exports = _curry2(function useWith(fn, transformers) { | ||
} | ||
return fn.apply(this, args.concat(_slice(arguments, transformers.length))); | ||
return fn.apply(this, args.concat(Array.prototype.slice.call(arguments, transformers.length))); | ||
}); | ||
}); |
@@ -26,7 +26,7 @@ var _curry2 = require('./internal/_curry2'); | ||
* // pred :: Object -> Boolean | ||
* var pred = where({ | ||
* a: equals('foo'), | ||
* b: complement(equals('bar')), | ||
* x: gt(__, 10), | ||
* y: lt(__, 20) | ||
* var pred = R.where({ | ||
* a: R.equals('foo'), | ||
* b: R.complement(R.equals('bar')), | ||
* x: R.gt(__, 10), | ||
* y: R.lt(__, 20) | ||
* }); | ||
@@ -33,0 +33,0 @@ * |
@@ -20,2 +20,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.xprod([1, 2], ['a', 'b']); //=> [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] | ||
* @symb R.xprod([a, b], [c, d]) = [[a, c], [a, d], [b, c], [b, d]] | ||
*/ | ||
@@ -22,0 +23,0 @@ module.exports = _curry2(function xprod(a, b) { // = xprodWith(prepend); (takes about 3 times as long...) |
@@ -21,2 +21,3 @@ var _curry2 = require('./internal/_curry2'); | ||
* R.zip([1, 2, 3], ['a', 'b', 'c']); //=> [[1, 'a'], [2, 'b'], [3, 'c']] | ||
* @symb R.zip([a, b, c], [d, e, f]) = [[a, d], [b, e], [c, f]] | ||
*/ | ||
@@ -23,0 +24,0 @@ module.exports = _curry2(function zip(a, b) { |
@@ -26,2 +26,3 @@ var _curry3 = require('./internal/_curry3'); | ||
* //=> [f(1, 'a'), f(2, 'b'), f(3, 'c')] | ||
* @symb R.zipWith(fn, [a, b, c], [d, e, f]) = [fn(a, d), fn(b, e), fn(c, f)] | ||
*/ | ||
@@ -28,0 +29,0 @@ module.exports = _curry3(function zipWith(fn, a, b) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2094282
332
55211
22
1