made with requirebin
Last active
August 29, 2015 14:20
-
-
Save chrisbuttery/a38dfbfa8e3f2b987891 to your computer and use it in GitHub Desktop.
requirebin sketch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var curry = require('ramda').curry; | |
var _ = require('lodash'); | |
var map = curry(function(f, xs){ | |
return xs.map(f); | |
}); | |
var split = curry(function(what, x){ | |
return x.split(what); | |
}); | |
var match = curry(function(what, x) { | |
return x.match(what); | |
}) | |
var filter = curry(function(f, xs) { | |
return xs.filter(f); | |
}); | |
var reduce = curry(function(f, a, xs) { | |
return xs.reduce(f, a); | |
}); | |
var words = split(' '); | |
var sentences = map(words); | |
console.log(sentences(['yo', 'whats', 'up'])); | |
var filterQs = filter(match(/q/i)); | |
console.log(filterQs(['queen', 'quick', 'up'])); | |
var _keepHighest = function(x,y){ return x >= y ? x : y; }; | |
var max = reduce(_keepHighest, 0); | |
console.log(max([30, 10, 18, 31, 2])); | |
var slice = _.curry(function(start, end, xs) { | |
return xs.slice(start, end); | |
}); | |
var take = slice(1, 2); | |
console.log(take(['1', 2, 'foo'])); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({ramda:[function(require,module,exports){(function(){"use strict";var __={ramda:"placeholder"};var _add=function _add(a,b){return a+b};var _all=function _all(fn,list){var idx=-1;while(++idx<list.length){if(!fn(list[idx])){return false}}return true};var _any=function _any(fn,list){var idx=-1;while(++idx<list.length){if(fn(list[idx])){return true}}return false};var _assoc=function _assoc(prop,val,obj){var result={};for(var p in obj){result[p]=obj[p]}result[prop]=val;return result};var _cloneRegExp=function _cloneRegExp(pattern){return new RegExp(pattern.source,(pattern.global?"g":"")+(pattern.ignoreCase?"i":"")+(pattern.multiline?"m":"")+(pattern.sticky?"y":"")+(pattern.unicode?"u":""))};var _complement=function _complement(f){return function(){return!f.apply(this,arguments)}};var _compose=function _compose(f,g){return function(){return f.call(this,g.apply(this,arguments))}};var _concat=function _concat(set1,set2){set1=set1||[];set2=set2||[];var idx;var len1=set1.length;var len2=set2.length;var result=[];idx=-1;while(++idx<len1){result[result.length]=set1[idx]}idx=-1;while(++idx<len2){result[result.length]=set2[idx]}return result};var _containsWith=function _containsWith(pred,x,list){var idx=-1,len=list.length;while(++idx<len){if(pred(x,list[idx])){return true}}return false};var _createMapEntry=function _createMapEntry(key,val){var obj={};obj[key]=val;return obj};var _createMaxMinBy=function _createMaxMinBy(comparator){return function(valueComputer,list){if(!(list&&list.length>0)){return}var idx=0;var winner=list[idx];var computedWinner=valueComputer(winner);var computedCurrent;while(++idx<list.length){computedCurrent=valueComputer(list[idx]);if(comparator(computedCurrent,computedWinner)){computedWinner=computedCurrent;winner=list[idx]}}return winner}};var _curry1=function _curry1(fn){return function f1(a){if(arguments.length===0){return f1}else if(a===__){return f1}else{return fn(a)}}};var _curry2=function _curry2(fn){return function f2(a,b){var n=arguments.length;if(n===0){return f2}else if(n===1&&a===__){return f2}else if(n===1){return _curry1(function(b){return fn(a,b)})}else if(n===2&&a===__&&b===__){return f2}else if(n===2&&a===__){return _curry1(function(a){return fn(a,b)})}else if(n===2&&b===__){return _curry1(function(b){return fn(a,b)})}else{return fn(a,b)}}};var _curry3=function _curry3(fn){return function f3(a,b,c){var n=arguments.length;if(n===0){return f3}else if(n===1&&a===__){return f3}else if(n===1){return _curry2(function(b,c){return fn(a,b,c)})}else if(n===2&&a===__&&b===__){return f3}else if(n===2&&a===__){return _curry2(function(a,c){return fn(a,b,c)})}else if(n===2&&b===__){return _curry2(function(b,c){return fn(a,b,c)})}else if(n===2){return _curry1(function(c){return fn(a,b,c)})}else if(n===3&&a===__&&b===__&&c===__){return f3}else if(n===3&&a===__&&b===__){return _curry2(function(a,b){return fn(a,b,c)})}else if(n===3&&a===__&&c===__){return _curry2(function(a,c){return fn(a,b,c)})}else if(n===3&&b===__&&c===__){return _curry2(function(b,c){return fn(a,b,c)})}else if(n===3&&a===__){return _curry1(function(a){return fn(a,b,c)})}else if(n===3&&b===__){return _curry1(function(b){return fn(a,b,c)})}else if(n===3&&c===__){return _curry1(function(c){return fn(a,b,c)})}else{return fn(a,b,c)}}};var _dissoc=function _dissoc(prop,obj){var result={};for(var p in obj){if(p!==prop){result[p]=obj[p]}}return result};var _filter=function _filter(fn,list){var idx=-1,len=list.length,result=[];while(++idx<len){if(fn(list[idx])){result[result.length]=list[idx]}}return result};var _filterIndexed=function _filterIndexed(fn,list){var idx=-1,len=list.length,result=[];while(++idx<len){if(fn(list[idx],idx,list)){result[result.length]=list[idx]}}return result};var _forEach=function _forEach(fn,list){var idx=-1,len=list.length;while(++idx<len){fn(list[idx])}return list};var _functionsWith=function _functionsWith(fn){return function(obj){return _filter(function(key){return typeof obj[key]==="function"},fn(obj))}};var _gt=function _gt(a,b){return a>b};var _has=function _has(prop,obj){return Object.prototype.hasOwnProperty.call(obj,prop)};var _identity=function _identity(x){return x};var _indexOf=function _indexOf(list,item,from){var idx=0,len=list.length;if(typeof from=="number"){idx=from<0?Math.max(0,len+from):from}while(idx<len){if(list[idx]===item){return idx}++idx}return-1};var _isArray=Array.isArray||function _isArray(val){return val!=null&&val.length>=0&&Object.prototype.toString.call(val)==="[object Array]"};var _isInteger=Number.isInteger||function _isInteger(n){return n<<0===n};var _isThenable=function _isThenable(value){return value!=null&&value===Object(value)&&typeof value.then==="function"};var _isTransformer=function _isTransformer(obj){return typeof obj.step==="function"&&typeof obj.result==="function"};var _lastIndexOf=function _lastIndexOf(list,item,from){var idx=list.length;if(typeof from=="number"){idx=from<0?idx+from+1:Math.min(idx,from+1)}while(--idx>=0){if(list[idx]===item){return idx}}return-1};var _lt=function _lt(a,b){return a<b};var _map=function _map(fn,list){var idx=-1,len=list.length,result=[];while(++idx<len){result[idx]=fn(list[idx])}return result};var _multiply=function _multiply(a,b){return a*b};var _nth=function _nth(n,list){return n<0?list[list.length+n]:list[n]};var _path=function _path(paths,obj){if(obj==null||paths.length===0){return}else{var val=obj;for(var idx=0,len=paths.length;idx<len&&val!=null;idx+=1){val=val[paths[idx]]}return val}};var _prepend=function _prepend(el,list){return _concat([el],list)};var _reduced=function(x){return x&&x.__transducers_reduced__?x:{value:x,__transducers_reduced__:true}};var _satisfiesSpec=function _satisfiesSpec(spec,parsedSpec,testObj){if(spec===testObj){return true}if(testObj==null){return false}parsedSpec.fn=parsedSpec.fn||[];parsedSpec.obj=parsedSpec.obj||[];var key,val,idx=-1,fnLen=parsedSpec.fn.length,j=-1,objLen=parsedSpec.obj.length;while(++idx<fnLen){key=parsedSpec.fn[idx];val=spec[key];if(!(key in testObj)){return false}if(!val(testObj[key],testObj)){return false}}while(++j<objLen){key=parsedSpec.obj[j];if(spec[key]!==testObj[key]){return false}}return true};var _slice=function _slice(args,from,to){switch(arguments.length){case 1:return _slice(args,0,args.length);case 2:return _slice(args,from,args.length);default:var length=Math.max(0,to-from),list=[],idx=-1;while(++idx<length){list[idx]=args[from+idx]}return list}};var _xall=function(){function XAll(f,xf){this.xf=xf;this.f=f;this.all=true}XAll.prototype.init=function(){return this.xf.init()};XAll.prototype.result=function(result){if(this.all){result=this.xf.step(result,true)}return this.xf.result(result)};XAll.prototype.step=function(result,input){if(!this.f(input)){this.all=false;result=_reduced(this.xf.step(result,false))}return result};return _curry2(function _xall(f,xf){return new XAll(f,xf)})}();var _xany=function(){function XAny(f,xf){this.xf=xf;this.f=f;this.any=false}XAny.prototype.init=function(){return this.xf.init()};XAny.prototype.result=function(result){if(!this.any){result=this.xf.step(result,false)}return this.xf.result(result)};XAny.prototype.step=function(result,input){if(this.f(input)){this.any=true;result=_reduced(this.xf.step(result,true))}return result};return _curry2(function _xany(f,xf){return new XAny(f,xf)})}();var _xdrop=function(){function XDrop(n,xf){this.xf=xf;this.n=n}XDrop.prototype.init=function(){return this.xf.init()};XDrop.prototype.result=function(result){return this.xf.result(result)};XDrop.prototype.step=function(result,input){if(this.n>0){this.n-=1;return result}return this.xf.step(result,input)};return _curry2(function _xdrop(n,xf){return new XDrop(n,xf)})}();var _xdropWhile=function(){function XDropWhile(f,xf){this.xf=xf;this.f=f}XDropWhile.prototype.init=function(){return this.xf.init()};XDropWhile.prototype.result=function(result){return this.xf.result(result)};XDropWhile.prototype.step=function(result,input){if(this.f){if(this.f(input)){return result}this.f=null}return this.xf.step(result,input)};return _curry2(function _xdropWhile(f,xf){return new XDropWhile(f,xf)})}();var _xfilter=function(){function XFilter(f,xf){this.xf=xf;this.f=f}XFilter.prototype.init=function(){return this.xf.init()};XFilter.prototype.result=function(result){return this.xf.result(result)};XFilter.prototype.step=function(result,input){return this.f(input)?this.xf.step(result,input):result};return _curry2(function _xfilter(f,xf){return new XFilter(f,xf)})}();var _xfind=function(){function XFind(f,xf){this.xf=xf;this.f=f;this.found=false}XFind.prototype.init=function(){return this.xf.init()};XFind.prototype.result=function(result){if(!this.found){result=this.xf.step(result,void 0)}return this.xf.result(result)};XFind.prototype.step=function(result,input){if(this.f(input)){this.found=true;result=_reduced(this.xf.step(result,input))}return result};return _curry2(function _xfind(f,xf){return new XFind(f,xf)})}();var _xfindIndex=function(){function XFindIndex(f,xf){this.xf=xf;this.f=f;this.idx=-1;this.found=false}XFindIndex.prototype.init=function(){return this.xf.init()};XFindIndex.prototype.result=function(result){if(!this.found){result=this.xf.step(result,-1)}return this.xf.result(result)};XFindIndex.prototype.step=function(result,input){this.idx+=1;if(this.f(input)){this.found=true;result=_reduced(this.xf.step(result,this.idx))}return result};return _curry2(function _xfindIndex(f,xf){return new XFindIndex(f,xf)})}();var _xfindLast=function(){function XFindLast(f,xf){this.xf=xf;this.f=f}XFindLast.prototype.init=function(){return this.xf.init()};XFindLast.prototype.result=function(result){return this.xf.result(this.xf.step(result,this.last))};XFindLast.prototype.step=function(result,input){if(this.f(input)){this.last=input}return result};return _curry2(function _xfindLast(f,xf){return new XFindLast(f,xf)})}();var _xfindLastIndex=function(){function XFindLastIndex(f,xf){this.xf=xf;this.f=f;this.idx=-1;this.lastIdx=-1}XFindLastIndex.prototype.init=function(){return this.xf.init()};XFindLastIndex.prototype.result=function(result){return this.xf.result(this.xf.step(result,this.lastIdx))};XFindLastIndex.prototype.step=function(result,input){this.idx+=1;if(this.f(input)){this.lastIdx=this.idx}return result};return _curry2(function _xfindLastIndex(f,xf){return new XFindLastIndex(f,xf)})}();var _xmap=function(){function XMap(f,xf){this.xf=xf;this.f=f}XMap.prototype.init=function(){return this.xf.init()};XMap.prototype.result=function(result){return this.xf.result(result)};XMap.prototype.step=function(result,input){return this.xf.step(result,this.f(input))};return _curry2(function _xmap(f,xf){return new XMap(f,xf)})}();var _xtake=function(){function XTake(n,xf){this.xf=xf;this.n=n}XTake.prototype.init=function(){return this.xf.init()};XTake.prototype.result=function(result){return this.xf.result(result)};XTake.prototype.step=function(result,input){this.n-=1;return this.n===0?_reduced(this.xf.step(result,input)):this.xf.step(result,input)};return _curry2(function _xtake(n,xf){return new XTake(n,xf)})}();var _xtakeWhile=function(){function XTakeWhile(f,xf){this.xf=xf;this.f=f}XTakeWhile.prototype.init=function(){return this.xf.init()};XTakeWhile.prototype.result=function(result){return this.xf.result(result)};XTakeWhile.prototype.step=function(result,input){return this.f(input)?this.xf.step(result,input):_reduced(result)};return _curry2(function _xtakeWhile(f,xf){return new XTakeWhile(f,xf)})}();var _xwrap=function(){function XWrap(fn){this.f=fn}XWrap.prototype.init=function(){throw new Error("init not implemented on XWrap")};XWrap.prototype.result=function(acc){return acc};XWrap.prototype.step=function(acc,x){return this.f(acc,x)};return function _xwrap(fn){return new XWrap(fn)}}();var add=_curry2(_add);var always=_curry1(function always(val){return function(){return val}});var and=_curry2(function and(a,b){return a&&b});var aperture=_curry2(function aperture(n,list){var idx=-1;var limit=list.length-(n-1);var acc=new Array(limit>=0?limit:0);while(++idx<limit){acc[idx]=_slice(list,idx,idx+n)}return acc});var apply=_curry2(function apply(fn,args){return fn.apply(this,args)});var arity=_curry2(function(n,fn){switch(n){case 0:return function(){return fn.apply(this,arguments)};case 1:return function(a0){void a0;return fn.apply(this,arguments)};case 2:return function(a0,a1){void a1;return fn.apply(this,arguments)};case 3:return function(a0,a1,a2){void a2;return fn.apply(this,arguments)};case 4:return function(a0,a1,a2,a3){void a3;return fn.apply(this,arguments)};case 5:return function(a0,a1,a2,a3,a4){void a4;return fn.apply(this,arguments)};case 6:return function(a0,a1,a2,a3,a4,a5){void a5;return fn.apply(this,arguments)};case 7:return function(a0,a1,a2,a3,a4,a5,a6){void a6;return fn.apply(this,arguments)};case 8:return function(a0,a1,a2,a3,a4,a5,a6,a7){void a7;return fn.apply(this,arguments)};case 9:return function(a0,a1,a2,a3,a4,a5,a6,a7,a8){void a8;return fn.apply(this,arguments)};case 10:return function(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9){void a9;return fn.apply(this,arguments)};default:throw new Error("First argument to arity must be a non-negative integer no greater than ten")}});var assoc=_curry3(_assoc);var bind=_curry2(function bind(fn,thisObj){return arity(fn.length,function(){return fn.apply(thisObj,arguments)})});var both=_curry2(function both(f,g){return function _both(){return f.apply(this,arguments)&&g.apply(this,arguments)}});var comparator=_curry1(function comparator(pred){return function(a,b){return pred(a,b)?-1:pred(b,a)?1:0}});var complement=_curry1(_complement);var cond=function cond(){var pairs=arguments;return function(){var idx=-1;while(++idx<pairs.length){if(pairs[idx][0].apply(this,arguments)){return pairs[idx][1].apply(this,arguments)}}}};var containsWith=_curry3(_containsWith);var countBy=_curry2(function countBy(fn,list){var counts={};var len=list.length;var idx=-1;while(++idx<len){var key=fn(list[idx]);counts[key]=(_has(key,counts)?counts[key]:0)+1}return counts});var createMapEntry=_curry2(_createMapEntry);var curryN=_curry2(function curryN(length,fn){return arity(length,function(){var n=arguments.length;var shortfall=length-n;var idx=n;while(--idx>=0){if(arguments[idx]===__){shortfall+=1}}if(shortfall<=0){return fn.apply(this,arguments)}else{var initialArgs=_slice(arguments);return curryN(shortfall,function(){var currentArgs=_slice(arguments);var combinedArgs=[];var idx=-1;while(++idx<n){var val=initialArgs[idx];combinedArgs[idx]=val===__?currentArgs.shift():val}return fn.apply(this,combinedArgs.concat(currentArgs))})}})});var dec=add(-1);var defaultTo=_curry2(function defaultTo(d,v){return v==null?d:v});var differenceWith=_curry3(function differenceWith(pred,first,second){var out=[];var idx=-1;var firstLen=first.length;var containsPred=containsWith(pred);while(++idx<firstLen){if(!containsPred(first[idx],second)&&!containsPred(first[idx],out)){out[idx]=first[idx]}}return out});var dissoc=_curry2(_dissoc);var divide=_curry2(function divide(a,b){return a/b});var either=_curry2(function either(f,g){return function _either(){return f.apply(this,arguments)||g.apply(this,arguments)}});var eq=_curry2(function eq(a,b){if(a===0){return 1/a===1/b}else{return a===b||a!==a&&b!==b}});var eqProps=_curry3(function eqProps(prop,obj1,obj2){return obj1[prop]===obj2[prop]});var filterIndexed=_curry2(_filterIndexed);var forEach=_curry2(_forEach);var forEachIndexed=_curry2(function forEachIndexed(fn,list){var idx=-1,len=list.length;while(++idx<len){fn(list[idx],idx,list)}return list});var fromPairs=_curry1(function fromPairs(pairs){var idx=-1,len=pairs.length,out={};while(++idx<len){if(_isArray(pairs[idx])&&pairs[idx].length){out[pairs[idx][0]]=pairs[idx][1]}}return out});var gt=_curry2(_gt);var gte=_curry2(function gte(a,b){return a>=b});var has=_curry2(_has);var hasIn=_curry2(function(prop,obj){return prop in obj});var identity=_curry1(_identity);var ifElse=_curry3(function ifElse(condition,onTrue,onFalse){return curryN(Math.max(condition.length,onTrue.length,onFalse.length),function _ifElse(){return condition.apply(this,arguments)?onTrue.apply(this,arguments):onFalse.apply(this,arguments)})});var inc=add(1);var indexOf=_curry2(function indexOf(target,list){return _indexOf(list,target)});var insertAll=_curry3(function insertAll(idx,elts,list){idx=idx<list.length&&idx>=0?idx:list.length;return _concat(_concat(_slice(list,0,idx),elts),_slice(list,idx))});var is=_curry2(function is(Ctor,val){return val!=null&&val.constructor===Ctor||val instanceof Ctor});var isArrayLike=_curry1(function isArrayLike(x){if(_isArray(x)){return true}if(!x){return false}if(typeof x!=="object"){return false}if(x instanceof String){return false}if(x.nodeType===1){return!!x.length}if(x.length===0){return true}if(x.length>0){return x.hasOwnProperty(0)&&x.hasOwnProperty(x.length-1)}return false});var isEmpty=_curry1(function isEmpty(list){return Object(list).length===0});var isNaN=_curry1(function isNaN(x){return typeof x==="number"&&x!==x});var isNil=_curry1(function isNil(x){return x==null});var isSet=_curry1(function isSet(list){var len=list.length;var idx=-1;while(++idx<len){if(_indexOf(list,list[idx],idx+1)>=0){return false}}return true});var keysIn=_curry1(function keysIn(obj){var prop,ks=[];for(prop in obj){ks[ks.length]=prop}return ks});var lastIndexOf=_curry2(function lastIndexOf(target,list){return _lastIndexOf(list,target)});var length=_curry1(function length(list){return list!=null&&is(Number,list.length)?list.length:NaN});var lens=_curry2(function lens(get,set){var lns=function(a){return get(a)};lns.set=_curry2(set);lns.map=_curry2(function(fn,a){return set(fn(get(a)),a)});return lns});var lensOn=_curry3(function lensOn(get,set,obj){var lns=function(){return get(obj)};lns.set=set;lns.map=function(fn){return set(fn(get(obj)))};return lns});var lt=_curry2(_lt);var lte=_curry2(function lte(a,b){return a<=b});var mapAccum=_curry3(function mapAccum(fn,acc,list){var idx=-1,len=list.length,result=[],tuple=[acc];while(++idx<len){tuple=fn(tuple[0],list[idx]);result[idx]=tuple[1]}return[tuple[0],result]});var mapAccumRight=_curry3(function mapAccumRight(fn,acc,list){var idx=list.length,result=[],tuple=[acc];while(--idx>=0){tuple=fn(tuple[0],list[idx]);result[idx]=tuple[1]}return[tuple[0],result]});var mapIndexed=_curry2(function mapIndexed(fn,list){var idx=-1,len=list.length,result=[];while(++idx<len){result[idx]=fn(list[idx],idx,list)}return result});var mathMod=_curry2(function mathMod(m,p){if(!_isInteger(m)){return NaN}if(!_isInteger(p)||p<1){return NaN}return(m%p+p)%p});var maxBy=_curry2(_createMaxMinBy(_gt));var memoize=function(){var repr=function(x){return x+"::"+Object.prototype.toString.call(x)};var serialize=function(args){return args.length+":{"+_map(repr,args).join(",")+"}"};return _curry1(function memoize(fn){var cache={};return function(){var key=serialize(arguments);if(!_has(key,cache)){cache[key]=fn.apply(this,arguments)}return cache[key]}})}();var minBy=_curry2(_createMaxMinBy(_lt));var modulo=_curry2(function modulo(a,b){return a%b});var multiply=_curry2(_multiply);var nAry=_curry2(function(n,fn){switch(n){case 0:return function(){return fn.call(this)};case 1:return function(a0){return fn.call(this,a0)};case 2:return function(a0,a1){return fn.call(this,a0,a1)};case 3:return function(a0,a1,a2){return fn.call(this,a0,a1,a2)};case 4:return function(a0,a1,a2,a3){return fn.call(this,a0,a1,a2,a3)};case 5:return function(a0,a1,a2,a3,a4){return fn.call(this,a0,a1,a2,a3,a4)};case 6:return function(a0,a1,a2,a3,a4,a5){return fn.call(this,a0,a1,a2,a3,a4,a5)};case 7:return function(a0,a1,a2,a3,a4,a5,a6){return fn.call(this,a0,a1,a2,a3,a4,a5,a6)};case 8:return function(a0,a1,a2,a3,a4,a5,a6,a7){return fn.call(this,a0,a1,a2,a3,a4,a5,a6,a7)};case 9:return function(a0,a1,a2,a3,a4,a5,a6,a7,a8){return fn.call(this,a0,a1,a2,a3,a4,a5,a6,a7,a8)};case 10:return function(a0,a1,a2,a3,a4,a5,a6,a7,a8,a9){return fn.call(this,a0,a1,a2,a3,a4,a5,a6,a7,a8,a9)};default:throw new Error("First argument to nAry must be a non-negative integer no greater than ten")}});var negate=_curry1(function negate(n){return-n});var not=_curry1(function not(a){return!a});var nth=_curry2(_nth);var nthArg=_curry1(function nthArg(n){return function(){return _nth(n,arguments)}});var nthChar=_curry2(function nthChar(n,str){return str.charAt(n<0?str.length+n:n)});var nthCharCode=_curry2(function nthCharCode(n,str){return str.charCodeAt(n<0?str.length+n:n)});var of=_curry1(function of(x){return[x]});var omit=_curry2(function omit(names,obj){var result={};for(var prop in obj){if(_indexOf(names,prop)<0){result[prop]=obj[prop]}}return result});var once=_curry1(function once(fn){var called=false,result;return function(){if(called){return result}called=true;result=fn.apply(this,arguments);return result}});var or=_curry2(function or(a,b){return a||b});var path=_curry2(_path);var pathEq=_curry3(function pathEq(path,val,obj){return _path(path,obj)===val});var pick=_curry2(function pick(names,obj){var result={};for(var prop in obj){if(_indexOf(names,prop)>=0){result[prop]=obj[prop]}}return result});var pickAll=_curry2(function pickAll(names,obj){var result={};var idx=-1;var len=names.length;while(++idx<len){var name=names[idx];result[name]=obj[name]}return result});var pickBy=_curry2(function pickBy(test,obj){var result={};for(var prop in obj){if(test(obj[prop],prop,obj)){result[prop]=obj[prop]}}return result});var prepend=_curry2(_prepend);var prop=_curry2(function prop(p,obj){return obj[p]});var propEq=_curry3(function propEq(name,val,obj){return obj[name]===val});var propOr=_curry3(function propOr(val,p,obj){return _has(p,obj)?obj[p]:val});var props=_curry2(function props(ps,obj){var len=ps.length;var out=[];var idx=-1;while(++idx<len){out[idx]=obj[ps[idx]]}return out});var range=_curry2(function range(from,to){var result=[];var n=from;while(n<to){result[result.length]=n;n+=1}return result});var reduceIndexed=_curry3(function reduceIndexed(fn,acc,list){var idx=-1,len=list.length;while(++idx<len){acc=fn(acc,list[idx],idx,list)}return acc});var reduceRight=_curry3(function reduceRight(fn,acc,list){var idx=list.length;while(--idx>=0){acc=fn(acc,list[idx])}return acc});var reduceRightIndexed=_curry3(function reduceRightIndexed(fn,acc,list){var idx=list.length;while(--idx>=0){acc=fn(acc,list[idx],idx,list)}return acc});var rejectIndexed=_curry2(function rejectIndexed(fn,list){return _filterIndexed(_complement(fn),list)});var remove=_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 replace=_curry3(function replace(regex,replacement,str){return str.replace(regex,replacement)});var reverse=_curry1(function reverse(list){return _slice(list).reverse()});var scan=_curry3(function scan(fn,acc,list){var idx=0,len=list.length+1,result=[acc];while(++idx<len){acc=fn(acc,list[idx-1]);result[idx]=acc}return result});var sortBy=_curry2(function sortBy(fn,list){return _slice(list).sort(function(a,b){var aa=fn(a);var bb=fn(b);return aa<bb?-1:aa>bb?1:0})});var strIndexOf=_curry2(function strIndexOf(c,str){return str.indexOf(c)});var strLastIndexOf=_curry2(function(c,str){return str.lastIndexOf(c)});var subtract=_curry2(function subtract(a,b){return a-b});var tap=_curry2(function tap(fn,x){fn(x);return x});var test=_curry2(function test(pattern,str){return _cloneRegExp(pattern).test(str)});var times=_curry2(function times(fn,n){var len=Number(n);var list=new Array(len);var idx=0;while(idx<len){list[idx]=fn(idx);idx+=1}return list});var toPairs=_curry1(function toPairs(obj){var pairs=[];for(var prop in obj){if(_has(prop,obj)){pairs[pairs.length]=[prop,obj[prop]]}}return pairs});var toPairsIn=_curry1(function toPairsIn(obj){var pairs=[];for(var prop in obj){pairs[pairs.length]=[prop,obj[prop]]}return pairs});var trim=function(){var ws=" \n\f\r "+" \u2028"+"\u2029\ufeff";var zeroWidth="";var hasProtoTrim=typeof String.prototype.trim==="function";if(!hasProtoTrim||(ws.trim()||!zeroWidth.trim())){return _curry1(function trim(str){var beginRx=new RegExp("^["+ws+"]["+ws+"]*");var endRx=new RegExp("["+ws+"]["+ws+"]*$");return str.replace(beginRx,"").replace(endRx,"")})}else{return _curry1(function trim(str){return str.trim()})}}();var type=_curry1(function type(val){return val===null?"Null":val===undefined?"Undefined":Object.prototype.toString.call(val).slice(8,-1)});var unapply=_curry1(function unapply(fn){return function(){return fn(_slice(arguments))}});var unary=_curry1(function unary(fn){return nAry(1,fn)});var unfold=_curry2(function unfold(fn,seed){var pair=fn(seed);var result=[];while(pair&&pair.length){result[result.length]=pair[0];pair=fn(pair[1])}return result});var uniqWith=_curry2(function uniqWith(pred,list){var idx=-1,len=list.length;var result=[],item;while(++idx<len){item=list[idx];if(!_containsWith(pred,item,result)){result[result.length]=item}}return result});var valuesIn=_curry1(function valuesIn(obj){var prop,vs=[];for(prop in obj){vs[vs.length]=obj[prop]}return vs});var wrap=_curry2(function wrap(fn,wrapper){return curryN(fn.length,function(){return wrapper.apply(this,_concat([fn],arguments))})});var xprod=_curry2(function xprod(a,b){var idx=-1;var ilen=a.length;var j;var jlen=b.length;var result=[];while(++idx<ilen){j=-1;while(++j<jlen){result[result.length]=[a[idx],b[j]]}}return result});var zip=_curry2(function zip(a,b){var rv=[];var idx=-1;var len=Math.min(a.length,b.length);while(++idx<len){rv[idx]=[a[idx],b[idx]]}return rv});var zipObj=_curry2(function zipObj(keys,values){var idx=-1,len=keys.length,out={};while(++idx<len){out[keys[idx]]=values[idx]}return out});var zipWith=_curry3(function zipWith(fn,a,b){var rv=[],idx=-1,len=Math.min(a.length,b.length);while(++idx<len){rv[idx]=fn(a[idx],b[idx])}return rv});var F=always(false);var T=always(true);var _append=function _append(el,list){return _concat(list,[el])};var _assocPath=function _assocPath(path,val,obj){switch(path.length){case 0:return obj;case 1:return _assoc(path[0],val,obj);default:return _assoc(path[0],_assocPath(_slice(path,1),val,Object(obj[path[0]])),obj)}};var _baseCopy=function _baseCopy(value,refFrom,refTo){var copy=function copy(copiedValue){var len=refFrom.length;var idx=-1;while(++idx<len){if(value===refFrom[idx]){return refTo[idx]}}refFrom[idx+1]=value;refTo[idx+1]=copiedValue;for(var key in value){copiedValue[key]=_baseCopy(value[key],refFrom,refTo)}return copiedValue};switch(type(value)){case"Object":return copy({});case"Array":return copy([]);case"Date":return new Date(value);case"RegExp":return _cloneRegExp(value);default:return value}};var _checkForMethod=function _checkForMethod(methodname,fn){return function(){var length=arguments.length;if(length===0){return fn()}var obj=arguments[length-1];return _isArray(obj)||typeof obj[methodname]!=="function"?fn.apply(this,arguments):obj[methodname].apply(obj,_slice(arguments,0,length-1))}};var _composeP=function _composeP(f,g){return function(){var context=this;var value=g.apply(this,arguments);if(_isThenable(value)){return value.then(function(result){return f.call(context,result)})}else{return f.call(this,value)}}};var _contains=function _contains(a,list){return _indexOf(list,a)>=0};var _createComposer=function _createComposer(composeFunction){return function(){var idx=arguments.length-1;var fn=arguments[idx];var length=fn.length;while(--idx>=0){fn=composeFunction(arguments[idx],fn)}return arity(length,fn)}};var _createMaxMin=function _createMaxMin(comparator,initialVal){return _curry1(function(list){var idx=-1,winner=initialVal,computed;while(++idx<list.length){computed=+list[idx];if(comparator(computed,winner)){winner=computed}}return winner})};var _createPartialApplicator=function _createPartialApplicator(concat){return function(fn){var args=_slice(arguments,1);return arity(Math.max(0,fn.length-args.length),function(){return fn.apply(this,concat(args,arguments))})}};var _dispatchable=function _dispatchable(methodname,xf,fn){return function(){var length=arguments.length;if(length===0){return fn()}var obj=arguments[length-1];if(!_isArray(obj)){var args=_slice(arguments,0,length-1);if(typeof obj[methodname]==="function"){return obj[methodname].apply(obj,args)}if(_isTransformer(obj)){var transducer=xf.apply(null,args);return transducer(obj)}}return fn.apply(this,arguments)}};var _dissocPath=function _dissocPath(path,obj){switch(path.length){case 0:return obj;case 1:return _dissoc(path[0],obj);default:var head=path[0];var tail=_slice(path,1);return obj[head]==null?obj:_assoc(head,_dissocPath(tail,obj[head]),obj)}};var _hasMethod=function _hasMethod(methodName,obj){return obj!=null&&!_isArray(obj)&&typeof obj[methodName]==="function"};var _makeFlat=function _makeFlat(recursive){return function flatt(list){var value,result=[],idx=-1,j,ilen=list.length,jlen;while(++idx<ilen){if(isArrayLike(list[idx])){value=recursive?flatt(list[idx]):list[idx];j=-1;jlen=value.length;while(++j<jlen){result[result.length]=value[j]}}else{result[result.length]=list[idx]}}return result}};var _pluck=function _pluck(p,list){return _map(prop(p),list)};var _reduce=function(){function _arrayReduce(xf,acc,list){var idx=-1,len=list.length;while(++idx<len){acc=xf.step(acc,list[idx]);if(acc&&acc.__transducers_reduced__){acc=acc.value;break}}return xf.result(acc)}function _iterableReduce(xf,acc,iter){var step=iter.next();while(!step.done){acc=xf.step(acc,step.value);if(acc&&acc.__transducers_reduced__){acc=acc.value;break}step=iter.next()}return xf.result(acc)}function _methodReduce(xf,acc,obj){return xf.result(obj.reduce(bind(xf.step,xf),acc))}var symIterator=typeof Symbol!=="undefined"?Symbol.iterator:"@@iterator";return function _reduce(fn,acc,list){if(typeof fn==="function"){fn=_xwrap(fn)}if(isArrayLike(list)){return _arrayReduce(fn,acc,list)}if(typeof list.reduce==="function"){return _methodReduce(fn,acc,list)}if(list[symIterator]!=null){return _iterableReduce(fn,acc,list[symIterator]())}if(typeof list.next==="function"){return _iterableReduce(fn,acc,list)}throw new TypeError("reduce: list must be array or iterable")}}();var _xgroupBy=function(){function XGroupBy(f,xf){this.xf=xf;this.f=f;this.inputs={}}XGroupBy.prototype.init=function(){return this.xf.init()};XGroupBy.prototype.result=function(result){var key;for(key in this.inputs){if(_has(key,this.inputs)){result=this.xf.step(result,this.inputs[key]);if(result.__transducers_reduced__){result=result.value;break}}}return this.xf.result(result)};XGroupBy.prototype.step=function(result,input){var key=this.f(input);this.inputs[key]=this.inputs[key]||[key,[]];this.inputs[key][1]=_append(input,this.inputs[key][1]);return result};return _curry2(function _xgroupBy(f,xf){return new XGroupBy(f,xf)})}();var all=_curry2(_dispatchable("all",_xall,_all));var any=_curry2(_dispatchable("any",_xany,_any));var append=_curry2(_append);var assocPath=_curry3(_assocPath);var binary=_curry1(function binary(fn){return nAry(2,fn)});var clone=_curry1(function clone(value){return _baseCopy(value,[],[])});var compose=_createComposer(_compose);var composeP=_createComposer(_composeP);var concat=_curry2(function(set1,set2){if(_isArray(set2)){return _concat(set1,set2)}else if(_hasMethod("concat",set1)){return set1.concat(set2)}else{throw new TypeError("can't concat "+typeof set1)}});var contains=_curry2(_contains);var converge=curryN(3,function(after){var fns=_slice(arguments,1);return function(){var args=arguments;return after.apply(this,_map(function(fn){return fn.apply(this,args)},fns))}});var curry=_curry1(function curry(fn){return curryN(fn.length,fn); | |
});var difference=_curry2(function difference(first,second){var out=[];var idx=-1;var firstLen=first.length;while(++idx<firstLen){if(!_contains(first[idx],second)&&!_contains(first[idx],out)){out[out.length]=first[idx]}}return out});var dissocPath=_curry2(_dissocPath);var drop=_curry2(_dispatchable("drop",_xdrop,function drop(n,list){return n<list.length?_slice(list,n):[]}));var dropWhile=_curry2(_dispatchable("dropWhile",_xdropWhile,function dropWhile(pred,list){var idx=-1,len=list.length;while(++idx<len&&pred(list[idx])){}return _slice(list,idx)}));var empty=_curry1(function empty(x){return _hasMethod("empty",x)?x.empty():[]});var filter=_curry2(_dispatchable("filter",_xfilter,_filter));var find=_curry2(_dispatchable("find",_xfind,function find(fn,list){var idx=-1;var len=list.length;while(++idx<len){if(fn(list[idx])){return list[idx]}}}));var findIndex=_curry2(_dispatchable("findIndex",_xfindIndex,function findIndex(fn,list){var idx=-1;var len=list.length;while(++idx<len){if(fn(list[idx])){return idx}}return-1}));var findLast=_curry2(_dispatchable("findLast",_xfindLast,function findLast(fn,list){var idx=list.length;while(--idx>=0){if(fn(list[idx])){return list[idx]}}}));var findLastIndex=_curry2(_dispatchable("findLastIndex",_xfindLastIndex,function findLastIndex(fn,list){var idx=list.length;while(--idx>=0){if(fn(list[idx])){return idx}}return-1}));var flatten=_curry1(_makeFlat(true));var flip=_curry1(function flip(fn){return curry(function(a,b){var args=_slice(arguments);args[0]=b;args[1]=a;return fn.apply(this,args)})});var func=curry(function func(funcName,obj){return obj[funcName].apply(obj,_slice(arguments,2))});var functionsIn=_curry1(_functionsWith(keysIn));var groupBy=_curry2(_dispatchable("groupBy",_xgroupBy,function groupBy(fn,list){return _reduce(function(acc,elt){var key=fn(elt);acc[key]=_append(elt,acc[key]||(acc[key]=[]));return acc},{},list)}));var head=nth(0);var insert=_curry3(function insert(idx,elt,list){idx=idx<list.length&&idx>=0?idx:list.length;return _concat(_append(elt,_slice(list,0,idx)),_slice(list,idx))});var intersectionWith=_curry3(function intersectionWith(pred,list1,list2){var results=[],idx=-1;while(++idx<list1.length){if(_containsWith(pred,list1[idx],list2)){results[results.length]=list1[idx]}}return uniqWith(pred,results)});var invoke=curry(function invoke(methodName,args,obj){return obj[methodName].apply(obj,args)});var invoker=curry(function invoker(arity,method){var initialArgs=_slice(arguments,2);var len=arity-initialArgs.length;return curryN(len+1,function(){var target=arguments[len];var args=initialArgs.concat(_slice(arguments,0,len));return target[method].apply(target,args)})});var join=invoker(1,"join");var keys=function(){var hasEnumBug=!{toString:null}.propertyIsEnumerable("toString");var nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];return _curry1(function keys(obj){if(Object(obj)!==obj){return[]}if(Object.keys){return Object.keys(obj)}var prop,ks=[],nIdx;for(prop in obj){if(_has(prop,obj)){ks[ks.length]=prop}}if(hasEnumBug){nIdx=nonEnumerableProps.length;while(--nIdx>=0){prop=nonEnumerableProps[nIdx];if(_has(prop,obj)&&!_contains(prop,ks)){ks[ks.length]=prop}}}return ks})}();var last=nth(-1);var map=_curry2(_dispatchable("map",_xmap,_map));var mapObj=_curry2(function mapObject(fn,obj){return _reduce(function(acc,key){acc[key]=fn(obj[key]);return acc},{},keys(obj))});var mapObjIndexed=_curry2(function mapObjectIndexed(fn,obj){return _reduce(function(acc,key){acc[key]=fn(obj[key],key,obj);return acc},{},keys(obj))});var match=invoker(1,"match");var max=_createMaxMin(_gt,-Infinity);var min=_createMaxMin(_lt,Infinity);var none=_curry2(_complement(_dispatchable("any",_xany,_any)));var partial=curry(_createPartialApplicator(_concat));var partialRight=curry(_createPartialApplicator(flip(_concat)));var partition=_curry2(function partition(pred,list){return _reduce(function(acc,elt){var xs=acc[pred(elt)?0:1];xs[xs.length]=elt;return acc},[[],[]],list)});var pipe=function pipe(){return compose.apply(this,reverse(arguments))};var pipeP=function pipeP(){return composeP.apply(this,reverse(arguments))};var pluck=_curry2(_pluck);var reduce=_curry3(_reduce);var reject=_curry2(function reject(fn,list){return filter(_complement(fn),list)});var repeat=_curry2(function repeat(value,n){return times(always(value),n)});var slice=_curry3(_checkForMethod("slice",function slice(fromIndex,toIndex,xs){return Array.prototype.slice.call(xs,fromIndex,toIndex)}));var sort=_curry2(function sort(comparator,list){return clone(list).sort(comparator)});var split=invoker(1,"split");var substring=slice;var substringFrom=substring(__,Infinity);var substringTo=substring(0);var sum=reduce(_add,0);var tail=_checkForMethod("tail",function(list){return _slice(list,1)});var take=_curry2(_dispatchable("take",_xtake,function take(n,list){return _slice(list,0,Math.min(n,list.length))}));var takeWhile=_curry2(_dispatchable("takeWhile",_xtakeWhile,function takeWhile(fn,list){var idx=-1,len=list.length;while(++idx<len&&fn(list[idx])){}return _slice(list,0,idx)}));var toLower=invoker(0,"toLowerCase");var toUpper=invoker(0,"toUpperCase");var transduce=curryN(4,function(xf,fn,acc,list){return _reduce(xf(typeof fn==="function"?_xwrap(fn):fn),acc,list)});var unionWith=_curry3(function unionWith(pred,list1,list2){return uniqWith(pred,_concat(list1,list2))});var uniq=_curry1(function uniq(list){var idx=-1,len=list.length;var result=[],item;while(++idx<len){item=list[idx];if(!_contains(item,result)){result[result.length]=item}}return result});var unnest=_curry1(_makeFlat(false));var useWith=curry(function useWith(fn){var transformers=_slice(arguments,1);var tlen=transformers.length;return curry(arity(tlen,function(){var args=[],idx=-1;while(++idx<tlen){args[idx]=transformers[idx](arguments[idx])}return fn.apply(this,args.concat(_slice(arguments,tlen)))}))});var values=_curry1(function values(obj){var props=keys(obj);var len=props.length;var vals=[];var idx=-1;while(++idx<len){vals[idx]=obj[props[idx]]}return vals});var where=_curry2(function where(spec,testObj){var parsedSpec=groupBy(function(key){return typeof spec[key]==="function"?"fn":"obj"},keys(spec));return _satisfiesSpec(spec,parsedSpec,testObj)});var _eqDeep=function _eqDeep(a,b,stackA,stackB){var typeA=type(a);if(typeA!==type(b)){return false}if(eq(a,b)){return true}if(typeA=="RegExp"){return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline&&a.sticky===b.sticky&&a.unicode===b.unicode}if(Object(a)===a){if(typeA==="Date"&&a.getTime()!=b.getTime()){return false}var keysA=keys(a);if(keysA.length!==keys(b).length){return false}var idx=stackA.length;while(--idx>=0){if(stackA[idx]===a){return stackB[idx]===b}}stackA[stackA.length]=a;stackB[stackB.length]=b;idx=keysA.length;while(--idx>=0){var key=keysA[idx];if(!_has(key,b)||!_eqDeep(b[key],a[key],stackA,stackB)){return false}}stackA.pop();stackB.pop();return true}return false};var _extend=function _extend(destination,other){var props=keys(other);var idx=-1,length=props.length;while(++idx<length){destination[props[idx]]=other[props[idx]]}return destination};var _predicateWrap=function _predicateWrap(predPicker){return function(preds){var predIterator=function(){var args=arguments;return predPicker(function(predicate){return predicate.apply(null,args)},preds)};return arguments.length>1?predIterator.apply(null,_slice(arguments,1)):arity(max(_pluck("length",preds)),predIterator)}};var allPass=curry(_predicateWrap(_all));var anyPass=curry(_predicateWrap(_any));var ap=_curry2(function ap(fns,vs){return _hasMethod("ap",fns)?fns.ap(vs):_reduce(function(acc,fn){return _concat(acc,map(fn,vs))},[],fns)});var call=curry(function call(fn){return fn.apply(this,_slice(arguments,1))});var chain=_curry2(_checkForMethod("chain",function chain(f,list){return unnest(_map(f,list))}));var charAt=invoker(1,"charAt");var charCodeAt=invoker(1,"charCodeAt");var commuteMap=_curry3(function commuteMap(fn,of,list){function consF(acc,ftor){return ap(map(append,fn(ftor)),acc)}return _reduce(consF,of([]),list)});var constructN=_curry2(function constructN(n,Fn){if(n>10){throw new Error("Constructor with greater than ten arguments")}if(n===0){return function(){return new Fn}}return curry(nAry(n,function($0,$1,$2,$3,$4,$5,$6,$7,$8,$9){switch(arguments.length){case 1:return new Fn($0);case 2:return new Fn($0,$1);case 3:return new Fn($0,$1,$2);case 4:return new Fn($0,$1,$2,$3);case 5:return new Fn($0,$1,$2,$3,$4);case 6:return new Fn($0,$1,$2,$3,$4,$5);case 7:return new Fn($0,$1,$2,$3,$4,$5,$6);case 8:return new Fn($0,$1,$2,$3,$4,$5,$6,$7);case 9:return new Fn($0,$1,$2,$3,$4,$5,$6,$7,$8);case 10:return new Fn($0,$1,$2,$3,$4,$5,$6,$7,$8,$9)}}))});var eqDeep=_curry2(function eqDeep(a,b){return _eqDeep(a,b,[],[])});var evolve=_curry2(function evolve(transformations,object){return _extend(_extend({},object),mapObjIndexed(function(fn,key){return fn(object[key])},transformations))});var functions=_curry1(_functionsWith(keys));var init=slice(0,-1);var intersection=_curry2(function intersection(list1,list2){return uniq(_filter(flip(_contains)(list1),list2))});var invert=_curry1(function invert(obj){var props=keys(obj);var len=props.length;var idx=-1;var out={};while(++idx<len){var key=props[idx];var val=obj[key];var list=_has(val,out)?out[val]:out[val]=[];list[list.length]=key}return out});var invertObj=_curry1(function invertObj(obj){var props=keys(obj);var len=props.length;var idx=-1;var out={};while(++idx<len){var key=props[idx];out[obj[key]]=key}return out});var liftN=_curry2(function liftN(arity,fn){var lifted=curryN(arity,fn);return curryN(arity,function(){return _reduce(ap,map(lifted,arguments[0]),_slice(arguments,1))})});var merge=_curry2(function merge(a,b){return _extend(_extend({},a),b)});var mergeAll=_curry1(function mergeAll(list){return reduce(merge,{},list)});var product=reduce(_multiply,1);var project=useWith(_map,pickAll,identity);var union=_curry2(compose(uniq,_concat));var _stepCat=function(){var _stepCatArray={init:Array,step:function(xs,x){return _concat(xs,[x])},result:_identity};var _stepCatString={init:String,step:_add,result:_identity};var _stepCatObject={init:Object,step:function(result,input){return merge(result,isArrayLike(input)?_createMapEntry(input[0],input[1]):input)},result:_identity};return function _stepCat(obj){if(_isTransformer(obj)){return obj}if(isArrayLike(obj)){return _stepCatArray}if(typeof obj==="string"){return _stepCatString}if(typeof obj==="object"){return _stepCatObject}throw new Error("Cannot create transformer for "+obj)}}();var commute=commuteMap(map(identity));var construct=_curry1(function construct(Fn){return constructN(Fn.length,Fn)});var into=_curry3(function into(acc,xf,list){return _isTransformer(acc)?_reduce(xf(acc),acc.init(),list):_reduce(xf(_stepCat(acc)),acc,list)});var lift=_curry1(function lift(fn){return liftN(fn.length,fn)});var R={F:F,T:T,__:__,add:add,all:all,allPass:allPass,always:always,and:and,any:any,anyPass:anyPass,ap:ap,aperture:aperture,append:append,apply:apply,arity:arity,assoc:assoc,assocPath:assocPath,binary:binary,bind:bind,both:both,call:call,chain:chain,charAt:charAt,charCodeAt:charCodeAt,clone:clone,commute:commute,commuteMap:commuteMap,comparator:comparator,complement:complement,compose:compose,composeP:composeP,concat:concat,cond:cond,construct:construct,constructN:constructN,contains:contains,containsWith:containsWith,converge:converge,countBy:countBy,createMapEntry:createMapEntry,curry:curry,curryN:curryN,dec:dec,defaultTo:defaultTo,difference:difference,differenceWith:differenceWith,dissoc:dissoc,dissocPath:dissocPath,divide:divide,drop:drop,dropWhile:dropWhile,either:either,empty:empty,eq:eq,eqDeep:eqDeep,eqProps:eqProps,evolve:evolve,filter:filter,filterIndexed:filterIndexed,find:find,findIndex:findIndex,findLast:findLast,findLastIndex:findLastIndex,flatten:flatten,flip:flip,forEach:forEach,forEachIndexed:forEachIndexed,fromPairs:fromPairs,func:func,functions:functions,functionsIn:functionsIn,groupBy:groupBy,gt:gt,gte:gte,has:has,hasIn:hasIn,head:head,identity:identity,ifElse:ifElse,inc:inc,indexOf:indexOf,init:init,insert:insert,insertAll:insertAll,intersection:intersection,intersectionWith:intersectionWith,into:into,invert:invert,invertObj:invertObj,invoke:invoke,invoker:invoker,is:is,isArrayLike:isArrayLike,isEmpty:isEmpty,isNaN:isNaN,isNil:isNil,isSet:isSet,join:join,keys:keys,keysIn:keysIn,last:last,lastIndexOf:lastIndexOf,length:length,lens:lens,lensOn:lensOn,lift:lift,liftN:liftN,lt:lt,lte:lte,map:map,mapAccum:mapAccum,mapAccumRight:mapAccumRight,mapIndexed:mapIndexed,mapObj:mapObj,mapObjIndexed:mapObjIndexed,match:match,mathMod:mathMod,max:max,maxBy:maxBy,memoize:memoize,merge:merge,mergeAll:mergeAll,min:min,minBy:minBy,modulo:modulo,multiply:multiply,nAry:nAry,negate:negate,none:none,not:not,nth:nth,nthArg:nthArg,nthChar:nthChar,nthCharCode:nthCharCode,of:of,omit:omit,once:once,or:or,partial:partial,partialRight:partialRight,partition:partition,path:path,pathEq:pathEq,pick:pick,pickAll:pickAll,pickBy:pickBy,pipe:pipe,pipeP:pipeP,pluck:pluck,prepend:prepend,product:product,project:project,prop:prop,propEq:propEq,propOr:propOr,props:props,range:range,reduce:reduce,reduceIndexed:reduceIndexed,reduceRight:reduceRight,reduceRightIndexed:reduceRightIndexed,reject:reject,rejectIndexed:rejectIndexed,remove:remove,repeat:repeat,replace:replace,reverse:reverse,scan:scan,slice:slice,sort:sort,sortBy:sortBy,split:split,strIndexOf:strIndexOf,strLastIndexOf:strLastIndexOf,substring:substring,substringFrom:substringFrom,substringTo:substringTo,subtract:subtract,sum:sum,tail:tail,take:take,takeWhile:takeWhile,tap:tap,test:test,times:times,toLower:toLower,toPairs:toPairs,toPairsIn:toPairsIn,toUpper:toUpper,transduce:transduce,trim:trim,type:type,unapply:unapply,unary:unary,unfold:unfold,union:union,unionWith:unionWith,uniq:uniq,uniqWith:uniqWith,unnest:unnest,useWith:useWith,values:values,valuesIn:valuesIn,where:where,wrap:wrap,xprod:xprod,zip:zip,zipObj:zipObj,zipWith:zipWith};if(typeof exports==="object"){module.exports=R}else if(typeof define==="function"&&define.amd){define(function(){return R})}else{this.R=R}}).call(this)},{}]},{},[]);require=function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({lodash:[function(require,module,exports){(function(global){(function(){var undefined;var VERSION="3.6.0";var BIND_FLAG=1,BIND_KEY_FLAG=2,CURRY_BOUND_FLAG=4,CURRY_FLAG=8,CURRY_RIGHT_FLAG=16,PARTIAL_FLAG=32,PARTIAL_RIGHT_FLAG=64,ARY_FLAG=128,REARG_FLAG=256;var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION="...";var HOT_COUNT=150,HOT_SPAN=16;var LAZY_DROP_WHILE_FLAG=0,LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2;var FUNC_ERROR_TEXT="Expected a function";var PLACEHOLDER="__lodash_placeholder__";var argsTag="[object Arguments]",arrayTag="[object Array]",boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",funcTag="[object Function]",mapTag="[object Map]",numberTag="[object Number]",objectTag="[object Object]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",weakMapTag="[object WeakMap]";var arrayBufferTag="[object ArrayBuffer]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEscapedHtml=/&(?:amp|lt|gt|quot|#39|#96);/g,reUnescapedHtml=/[&<>"'`]/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;var reComboMarks=/[\u0300-\u036f\ufe20-\ufe23]/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reHexPrefix=/^0[xX]/;var reHostCtor=/^\[object .+?Constructor\]$/;var reLatin1=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;var reNoMatch=/($^)/;var reRegExpChars=/[.*+?^${}()|[\]\/\\]/g,reHasRegExpChars=RegExp(reRegExpChars.source);var reUnescapedString=/['\n\r\u2028\u2029\\]/g;var reWords=function(){var upper="[A-Z\\xc0-\\xd6\\xd8-\\xde]",lower="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(upper+"+(?="+upper+lower+")|"+upper+"?"+lower+"|"+upper+"+|[0-9]+","g")}();var whitespace=" \f \ufeff"+"\n\r\u2028\u2029"+" ";var contextProps=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","window"];var templateCounter=-1;var typedArrayTags={};typedArrayTags[float32Tag]=typedArrayTags[float64Tag]=typedArrayTags[int8Tag]=typedArrayTags[int16Tag]=typedArrayTags[int32Tag]=typedArrayTags[uint8Tag]=typedArrayTags[uint8ClampedTag]=typedArrayTags[uint16Tag]=typedArrayTags[uint32Tag]=true;typedArrayTags[argsTag]=typedArrayTags[arrayTag]=typedArrayTags[arrayBufferTag]=typedArrayTags[boolTag]=typedArrayTags[dateTag]=typedArrayTags[errorTag]=typedArrayTags[funcTag]=typedArrayTags[mapTag]=typedArrayTags[numberTag]=typedArrayTags[objectTag]=typedArrayTags[regexpTag]=typedArrayTags[setTag]=typedArrayTags[stringTag]=typedArrayTags[weakMapTag]=false;var cloneableTags={};cloneableTags[argsTag]=cloneableTags[arrayTag]=cloneableTags[arrayBufferTag]=cloneableTags[boolTag]=cloneableTags[dateTag]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[numberTag]=cloneableTags[objectTag]=cloneableTags[regexpTag]=cloneableTags[stringTag]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=true;cloneableTags[errorTag]=cloneableTags[funcTag]=cloneableTags[mapTag]=cloneableTags[setTag]=cloneableTags[weakMapTag]=false;var debounceOptions={leading:false,maxWait:0,trailing:false};var deburredLetters={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"};var htmlEscapes={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"};var htmlUnescapes={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"};var objectTypes={"function":true,object:true};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var freeGlobal=freeExports&&freeModule&&typeof global=="object"&&global;var freeSelf=objectTypes[typeof self]&&self&&self.Object&&self;var freeWindow=objectTypes[typeof window]&&window&&window.Object&&window;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var root=freeGlobal||freeWindow!==(this&&this.window)&&freeWindow||freeSelf||this;function baseCompareAscending(value,other){if(value!==other){var valIsReflexive=value===value,othIsReflexive=other===other;if(value>other||!valIsReflexive||typeof value=="undefined"&&othIsReflexive){return 1}if(value<other||!othIsReflexive||typeof other=="undefined"&&valIsReflexive){return-1}}return 0}function baseFindIndex(array,predicate,fromRight){var length=array.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){if(predicate(array[index],index,array)){return index}}return-1}function baseIndexOf(array,value,fromIndex){if(value!==value){return indexOfNaN(array,fromIndex)}var index=fromIndex-1,length=array.length;while(++index<length){if(array[index]===value){return index}}return-1}function baseIsFunction(value){return typeof value=="function"||false}function baseToString(value){if(typeof value=="string"){return value}return value==null?"":value+""}function charAtCallback(string){return string.charCodeAt(0)}function charsLeftIndex(string,chars){var index=-1,length=string.length;while(++index<length&&chars.indexOf(string.charAt(index))>-1){}return index}function charsRightIndex(string,chars){var index=string.length;while(index--&&chars.indexOf(string.charAt(index))>-1){}return index}function compareAscending(object,other){return baseCompareAscending(object.criteria,other.criteria)||object.index-other.index}function compareMultiple(object,other,orders){var index=-1,objCriteria=object.criteria,othCriteria=other.criteria,length=objCriteria.length,ordersLength=orders.length;while(++index<length){var result=baseCompareAscending(objCriteria[index],othCriteria[index]);if(result){if(index>=ordersLength){return result}return result*(orders[index]?1:-1)}}return object.index-other.index}function deburrLetter(letter){return deburredLetters[letter]}function escapeHtmlChar(chr){return htmlEscapes[chr]}function escapeStringChar(chr){return"\\"+stringEscapes[chr]}function indexOfNaN(array,fromIndex,fromRight){var length=array.length,index=fromIndex+(fromRight?0:-1);while(fromRight?index--:++index<length){var other=array[index];if(other!==other){return index}}return-1}function isObjectLike(value){return!!value&&typeof value=="object"}function isSpace(charCode){return charCode<=160&&(charCode>=9&&charCode<=13)||charCode==32||charCode==160||charCode==5760||charCode==6158||charCode>=8192&&(charCode<=8202||charCode==8232||charCode==8233||charCode==8239||charCode==8287||charCode==12288||charCode==65279)}function replaceHolders(array,placeholder){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){if(array[index]===placeholder){array[index]=PLACEHOLDER;result[++resIndex]=index}}return result}function sortedUniq(array,iteratee){var seen,index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(!index||seen!==computed){seen=computed;result[++resIndex]=value}}return result}function trimmedLeftIndex(string){var index=-1,length=string.length;while(++index<length&&isSpace(string.charCodeAt(index))){}return index}function trimmedRightIndex(string){var index=string.length;while(index--&&isSpace(string.charCodeAt(index))){}return index}function unescapeHtmlChar(chr){return htmlUnescapes[chr]}function runInContext(context){context=context?_.defaults(root.Object(),context,_.pick(root,contextProps)):root;var Array=context.Array,Date=context.Date,Error=context.Error,Function=context.Function,Math=context.Math,Number=context.Number,Object=context.Object,RegExp=context.RegExp,String=context.String,TypeError=context.TypeError;var arrayProto=Array.prototype,objectProto=Object.prototype,stringProto=String.prototype;var document=(document=context.window)&&document.document;var fnToString=Function.prototype.toString;var getLength=baseProperty("length");var hasOwnProperty=objectProto.hasOwnProperty;var idCounter=0;var objToString=objectProto.toString;var oldDash=context._;var reNative=RegExp("^"+escapeRegExp(objToString).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ArrayBuffer=isNative(ArrayBuffer=context.ArrayBuffer)&&ArrayBuffer,bufferSlice=isNative(bufferSlice=ArrayBuffer&&new ArrayBuffer(0).slice)&&bufferSlice,ceil=Math.ceil,clearTimeout=context.clearTimeout,floor=Math.floor,getPrototypeOf=isNative(getPrototypeOf=Object.getPrototypeOf)&&getPrototypeOf,push=arrayProto.push,propertyIsEnumerable=objectProto.propertyIsEnumerable,Set=isNative(Set=context.Set)&&Set,setTimeout=context.setTimeout,splice=arrayProto.splice,Uint8Array=isNative(Uint8Array=context.Uint8Array)&&Uint8Array,WeakMap=isNative(WeakMap=context.WeakMap)&&WeakMap;var Float64Array=function(){try{var func=isNative(func=context.Float64Array)&&func,result=new func(new ArrayBuffer(10),0,1)&&func}catch(e){}return result}();var nativeIsArray=isNative(nativeIsArray=Array.isArray)&&nativeIsArray,nativeCreate=isNative(nativeCreate=Object.create)&&nativeCreate,nativeIsFinite=context.isFinite,nativeKeys=isNative(nativeKeys=Object.keys)&&nativeKeys,nativeMax=Math.max,nativeMin=Math.min,nativeNow=isNative(nativeNow=Date.now)&&nativeNow,nativeNumIsFinite=isNative(nativeNumIsFinite=Number.isFinite)&&nativeNumIsFinite,nativeParseInt=context.parseInt,nativeRandom=Math.random;var NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,POSITIVE_INFINITY=Number.POSITIVE_INFINITY;var MAX_ARRAY_LENGTH=Math.pow(2,32)-1,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;var FLOAT64_BYTES_PER_ELEMENT=Float64Array?Float64Array.BYTES_PER_ELEMENT:0;var MAX_SAFE_INTEGER=Math.pow(2,53)-1;var metaMap=WeakMap&&new WeakMap;var realNames={};function lodash(value){if(isObjectLike(value)&&!isArray(value)&&!(value instanceof LazyWrapper)){if(value instanceof LodashWrapper){return value}if(hasOwnProperty.call(value,"__chain__")&&hasOwnProperty.call(value,"__wrapped__")){return wrapperClone(value)}}return new LodashWrapper(value)}function baseLodash(){}function LodashWrapper(value,chainAll,actions){this.__wrapped__=value;this.__actions__=actions||[];this.__chain__=!!chainAll}var support=lodash.support={};(function(x){support.funcDecomp=/\bthis\b/.test(function(){return this});support.funcNames=typeof Function.name=="string";try{support.dom=document.createDocumentFragment().nodeType===11}catch(e){support.dom=false}try{support.nonEnumArgs=!propertyIsEnumerable.call(arguments,1)}catch(e){support.nonEnumArgs=true}})(0,0);lodash.templateSettings={escape:reEscape,evaluate:reEvaluate,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function LazyWrapper(value){this.__wrapped__=value;this.__actions__=null;this.__dir__=1;this.__dropCount__=0;this.__filtered__=false;this.__iteratees__=null;this.__takeCount__=POSITIVE_INFINITY;this.__views__=null}function lazyClone(){var actions=this.__actions__,iteratees=this.__iteratees__,views=this.__views__,result=new LazyWrapper(this.__wrapped__);result.__actions__=actions?arrayCopy(actions):null;result.__dir__=this.__dir__;result.__filtered__=this.__filtered__;result.__iteratees__=iteratees?arrayCopy(iteratees):null;result.__takeCount__=this.__takeCount__;result.__views__=views?arrayCopy(views):null;return result}function lazyReverse(){if(this.__filtered__){var result=new LazyWrapper(this);result.__dir__=-1;result.__filtered__=true}else{result=this.clone();result.__dir__*=-1}return result}function lazyValue(){var array=this.__wrapped__.value();if(!isArray(array)){return baseWrapperValue(array,this.__actions__)}var dir=this.__dir__,isRight=dir<0,view=getView(0,array.length,this.__views__),start=view.start,end=view.end,length=end-start,index=isRight?end:start-1,takeCount=nativeMin(length,this.__takeCount__),iteratees=this.__iteratees__,iterLength=iteratees?iteratees.length:0,resIndex=0,result=[];outer:while(length--&&resIndex<takeCount){index+=dir;var iterIndex=-1,value=array[index];while(++iterIndex<iterLength){var data=iteratees[iterIndex],iteratee=data.iteratee,type=data.type;if(type==LAZY_DROP_WHILE_FLAG){if(data.done&&(isRight?index>data.index:index<data.index)){data.count=0;data.done=false}data.index=index;if(!data.done){var limit=data.limit;if(!(data.done=limit>-1?data.count++>=limit:!iteratee(value))){continue outer}}}else{var computed=iteratee(value);if(type==LAZY_MAP_FLAG){value=computed}else if(!computed){if(type==LAZY_FILTER_FLAG){continue outer}else{break outer}}}}result[resIndex++]=value}return result}function MapCache(){this.__data__={}}function mapDelete(key){return this.has(key)&&delete this.__data__[key]}function mapGet(key){return key=="__proto__"?undefined:this.__data__[key]}function mapHas(key){return key!="__proto__"&&hasOwnProperty.call(this.__data__,key)}function mapSet(key,value){if(key!="__proto__"){this.__data__[key]=value}return this}function SetCache(values){var length=values?values.length:0;this.data={hash:nativeCreate(null),set:new Set};while(length--){this.push(values[length])}}function cacheIndexOf(cache,value){var data=cache.data,result=typeof value=="string"||isObject(value)?data.set.has(value):data.hash[value];return result?0:-1}function cachePush(value){var data=this.data;if(typeof value=="string"||isObject(value)){data.set.add(value)}else{data.hash[value]=true}}function arrayCopy(source,array){var index=-1,length=source.length;array||(array=Array(length));while(++index<length){array[index]=source[index]}return array}function arrayEach(array,iteratee){var index=-1,length=array.length;while(++index<length){if(iteratee(array[index],index,array)===false){break}}return array}function arrayEachRight(array,iteratee){var length=array.length;while(length--){if(iteratee(array[length],length,array)===false){break}}return array}function arrayEvery(array,predicate){var index=-1,length=array.length;while(++index<length){if(!predicate(array[index],index,array)){return false}}return true}function arrayFilter(array,predicate){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index];if(predicate(value,index,array)){result[++resIndex]=value}}return result}function arrayMap(array,iteratee){var index=-1,length=array.length,result=Array(length);while(++index<length){result[index]=iteratee(array[index],index,array)}return result}function arrayMax(array){var index=-1,length=array.length,result=NEGATIVE_INFINITY;while(++index<length){var value=array[index];if(value>result){result=value}}return result}function arrayMin(array){var index=-1,length=array.length,result=POSITIVE_INFINITY;while(++index<length){var value=array[index];if(value<result){result=value}}return result}function arrayReduce(array,iteratee,accumulator,initFromArray){var index=-1,length=array.length;if(initFromArray&&length){accumulator=array[++index]}while(++index<length){accumulator=iteratee(accumulator,array[index],index,array)}return accumulator}function arrayReduceRight(array,iteratee,accumulator,initFromArray){var length=array.length;if(initFromArray&&length){accumulator=array[--length]}while(length--){accumulator=iteratee(accumulator,array[length],length,array)}return accumulator}function arraySome(array,predicate){var index=-1,length=array.length;while(++index<length){if(predicate(array[index],index,array)){return true}}return false}function arraySum(array){var length=array.length,result=0;while(length--){result+=+array[length]||0}return result}function assignDefaults(objectValue,sourceValue){return typeof objectValue=="undefined"?sourceValue:objectValue}function assignOwnDefaults(objectValue,sourceValue,key,object){return typeof objectValue=="undefined"||!hasOwnProperty.call(object,key)?sourceValue:objectValue}function baseAssign(object,source,customizer){var props=keys(source);if(!customizer){return baseCopy(source,object,props)}var index=-1,length=props.length;while(++index<length){var key=props[index],value=object[key],result=customizer(value,source[key],key,object,source);if((result===result?result!==value:value===value)||typeof value=="undefined"&&!(key in object)){object[key]=result}}return object}function baseAt(collection,props){var index=-1,length=collection.length,isArr=isLength(length),propsLength=props.length,result=Array(propsLength); | |
while(++index<propsLength){var key=props[index];if(isArr){key=parseFloat(key);result[index]=isIndex(key,length)?collection[key]:undefined}else{result[index]=collection[key]}}return result}function baseCopy(source,object,props){if(!props){props=object;object={}}var index=-1,length=props.length;while(++index<length){var key=props[index];object[key]=source[key]}return object}function baseCallback(func,thisArg,argCount){var type=typeof func;if(type=="function"){return typeof thisArg=="undefined"?func:bindCallback(func,thisArg,argCount)}if(func==null){return identity}if(type=="object"){return baseMatches(func)}return typeof thisArg=="undefined"?baseProperty(func+""):baseMatchesProperty(func+"",thisArg)}function baseClone(value,isDeep,customizer,key,object,stackA,stackB){var result;if(customizer){result=object?customizer(value,key,object):customizer(value)}if(typeof result!="undefined"){return result}if(!isObject(value)){return value}var isArr=isArray(value);if(isArr){result=initCloneArray(value);if(!isDeep){return arrayCopy(value,result)}}else{var tag=objToString.call(value),isFunc=tag==funcTag;if(tag==objectTag||tag==argsTag||isFunc&&!object){result=initCloneObject(isFunc?{}:value);if(!isDeep){return baseCopy(value,result,keys(value))}}else{return cloneableTags[tag]?initCloneByTag(value,tag,isDeep):object?value:{}}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}stackA.push(value);stackB.push(result);(isArr?arrayEach:baseForOwn)(value,function(subValue,key){result[key]=baseClone(subValue,isDeep,customizer,key,value,stackA,stackB)});return result}var baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}();function baseDelay(func,wait,args){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return setTimeout(function(){func.apply(undefined,args)},wait)}function baseDifference(array,values){var length=array?array.length:0,result=[];if(!length){return result}var index=-1,indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf,cache=isCommon&&values.length>=200?createCache(values):null,valuesLength=values.length;if(cache){indexOf=cacheIndexOf;isCommon=false;values=cache}outer:while(++index<length){var value=array[index];if(isCommon&&value===value){var valuesIndex=valuesLength;while(valuesIndex--){if(values[valuesIndex]===value){continue outer}}result.push(value)}else if(indexOf(values,value,0)<0){result.push(value)}}return result}var baseEach=createBaseEach(baseForOwn);var baseEachRight=createBaseEach(baseForOwnRight,true);function baseEvery(collection,predicate){var result=true;baseEach(collection,function(value,index,collection){result=!!predicate(value,index,collection);return result});return result}function baseFill(array,value,start,end){var length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=typeof end=="undefined"||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end>>>0;start>>>=0;while(start<length){array[start++]=value}return array}function baseFilter(collection,predicate){var result=[];baseEach(collection,function(value,index,collection){if(predicate(value,index,collection)){result.push(value)}});return result}function baseFind(collection,predicate,eachFunc,retKey){var result;eachFunc(collection,function(value,key,collection){if(predicate(value,key,collection)){result=retKey?key:value;return false}});return result}function baseFlatten(array,isDeep,isStrict){var index=-1,length=array.length,resIndex=-1,result=[];while(++index<length){var value=array[index];if(isObjectLike(value)&&isLength(value.length)&&(isArray(value)||isArguments(value))){if(isDeep){value=baseFlatten(value,isDeep,isStrict)}var valIndex=-1,valLength=value.length;result.length+=valLength;while(++valIndex<valLength){result[++resIndex]=value[valIndex]}}else if(!isStrict){result[++resIndex]=value}}return result}var baseFor=createBaseFor();var baseForRight=createBaseFor(true);function baseForIn(object,iteratee){return baseFor(object,iteratee,keysIn)}function baseForOwn(object,iteratee){return baseFor(object,iteratee,keys)}function baseForOwnRight(object,iteratee){return baseForRight(object,iteratee,keys)}function baseFunctions(object,props){var index=-1,length=props.length,resIndex=-1,result=[];while(++index<length){var key=props[index];if(isFunction(object[key])){result[++resIndex]=key}}return result}function baseIsEqual(value,other,customizer,isLoose,stackA,stackB){if(value===other){return value!==0||1/value==1/other}var valType=typeof value,othType=typeof other;if(valType!="function"&&valType!="object"&&othType!="function"&&othType!="object"||value==null||other==null){return value!==value&&other!==other}return baseIsEqualDeep(value,other,baseIsEqual,customizer,isLoose,stackA,stackB)}function baseIsEqualDeep(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objIsArr=isArray(object),othIsArr=isArray(other),objTag=arrayTag,othTag=arrayTag;if(!objIsArr){objTag=objToString.call(object);if(objTag==argsTag){objTag=objectTag}else if(objTag!=objectTag){objIsArr=isTypedArray(object)}}if(!othIsArr){othTag=objToString.call(other);if(othTag==argsTag){othTag=objectTag}else if(othTag!=objectTag){othIsArr=isTypedArray(other)}}var objIsObj=objTag==objectTag||isLoose&&objTag==funcTag,othIsObj=othTag==objectTag||isLoose&&othTag==funcTag,isSameTag=objTag==othTag;if(isSameTag&&!(objIsArr||objIsObj)){return equalByTag(object,other,objTag)}if(isLoose){if(!isSameTag&&!(objIsObj&&othIsObj)){return false}}else{var valWrapped=objIsObj&&hasOwnProperty.call(object,"__wrapped__"),othWrapped=othIsObj&&hasOwnProperty.call(other,"__wrapped__");if(valWrapped||othWrapped){return equalFunc(valWrapped?object.value():object,othWrapped?other.value():other,customizer,isLoose,stackA,stackB)}if(!isSameTag){return false}}stackA||(stackA=[]);stackB||(stackB=[]);var length=stackA.length;while(length--){if(stackA[length]==object){return stackB[length]==other}}stackA.push(object);stackB.push(other);var result=(objIsArr?equalArrays:equalObjects)(object,other,equalFunc,customizer,isLoose,stackA,stackB);stackA.pop();stackB.pop();return result}function baseIsMatch(object,props,values,strictCompareFlags,customizer){var index=-1,length=props.length,noCustomizer=!customizer;while(++index<length){if(noCustomizer&&strictCompareFlags[index]?values[index]!==object[props[index]]:!(props[index]in object)){return false}}index=-1;while(++index<length){var key=props[index],objValue=object[key],srcValue=values[index];if(noCustomizer&&strictCompareFlags[index]){var result=typeof objValue!="undefined"||key in object}else{result=customizer?customizer(objValue,srcValue,key):undefined;if(typeof result=="undefined"){result=baseIsEqual(srcValue,objValue,customizer,true)}}if(!result){return false}}return true}function baseMap(collection,iteratee){var result=[];baseEach(collection,function(value,key,collection){result.push(iteratee(value,key,collection))});return result}function baseMatches(source){var props=keys(source),length=props.length;if(!length){return constant(true)}if(length==1){var key=props[0],value=source[key];if(isStrictComparable(value)){return function(object){return object!=null&&object[key]===value&&(typeof value!="undefined"||key in toObject(object))}}}var values=Array(length),strictCompareFlags=Array(length);while(length--){value=source[props[length]];values[length]=value;strictCompareFlags[length]=isStrictComparable(value)}return function(object){return object!=null&&baseIsMatch(toObject(object),props,values,strictCompareFlags)}}function baseMatchesProperty(key,value){if(isStrictComparable(value)){return function(object){return object!=null&&object[key]===value&&(typeof value!="undefined"||key in toObject(object))}}return function(object){return object!=null&&baseIsEqual(value,object[key],null,true)}}function baseMerge(object,source,customizer,stackA,stackB){if(!isObject(object)){return object}var isSrcArr=isLength(source.length)&&(isArray(source)||isTypedArray(source));(isSrcArr?arrayEach:baseForOwn)(source,function(srcValue,key,source){if(isObjectLike(srcValue)){stackA||(stackA=[]);stackB||(stackB=[]);return baseMergeDeep(object,source,key,baseMerge,customizer,stackA,stackB)}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=typeof result=="undefined";if(isCommon){result=srcValue}if((isSrcArr||typeof result!="undefined")&&(isCommon||(result===result?result!==value:value===value))){object[key]=result}});return object}function baseMergeDeep(object,source,key,mergeFunc,customizer,stackA,stackB){var length=stackA.length,srcValue=source[key];while(length--){if(stackA[length]==srcValue){object[key]=stackB[length];return}}var value=object[key],result=customizer?customizer(value,srcValue,key,object,source):undefined,isCommon=typeof result=="undefined";if(isCommon){result=srcValue;if(isLength(srcValue.length)&&(isArray(srcValue)||isTypedArray(srcValue))){result=isArray(value)?value:value&&value.length?arrayCopy(value):[]}else if(isPlainObject(srcValue)||isArguments(srcValue)){result=isArguments(value)?toPlainObject(value):isPlainObject(value)?value:{}}else{isCommon=false}}stackA.push(srcValue);stackB.push(result);if(isCommon){object[key]=mergeFunc(result,srcValue,customizer,stackA,stackB)}else if(result===result?result!==value:value===value){object[key]=result}}function baseProperty(key){return function(object){return object==null?undefined:object[key]}}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseReduce(collection,iteratee,accumulator,initFromCollection,eachFunc){eachFunc(collection,function(value,index,collection){accumulator=initFromCollection?(initFromCollection=false,value):iteratee(accumulator,value,index,collection)});return accumulator}var baseSetData=!metaMap?identity:function(func,data){metaMap.set(func,data);return func};function baseSlice(array,start,end){var index=-1,length=array.length;start=start==null?0:+start||0;if(start<0){start=-start>length?0:length+start}end=typeof end=="undefined"||end>length?length:+end||0;if(end<0){end+=length}length=start>end?0:end-start>>>0;start>>>=0;var result=Array(length);while(++index<length){result[index]=array[index+start]}return result}function baseSome(collection,predicate){var result;baseEach(collection,function(value,index,collection){result=predicate(value,index,collection);return!result});return!!result}function baseSortBy(array,comparer){var length=array.length;array.sort(comparer);while(length--){array[length]=array[length].value}return array}function baseSortByOrder(collection,props,orders){var index=-1,length=collection.length,result=isLength(length)?Array(length):[];baseEach(collection,function(value){var length=props.length,criteria=Array(length);while(length--){criteria[length]=value==null?undefined:value[props[length]]}result[++index]={criteria:criteria,index:index,value:value}});return baseSortBy(result,function(object,other){return compareMultiple(object,other,orders)})}function baseSum(collection,iteratee){var result=0;baseEach(collection,function(value,index,collection){result+=+iteratee(value,index,collection)||0});return result}function baseUniq(array,iteratee){var index=-1,indexOf=getIndexOf(),length=array.length,isCommon=indexOf==baseIndexOf,isLarge=isCommon&&length>=200,seen=isLarge?createCache():null,result=[];if(seen){indexOf=cacheIndexOf;isCommon=false}else{isLarge=false;seen=iteratee?[]:result}outer:while(++index<length){var value=array[index],computed=iteratee?iteratee(value,index,array):value;if(isCommon&&value===value){var seenIndex=seen.length;while(seenIndex--){if(seen[seenIndex]===computed){continue outer}}if(iteratee){seen.push(computed)}result.push(value)}else if(indexOf(seen,computed,0)<0){if(iteratee||isLarge){seen.push(computed)}result.push(value)}}return result}function baseValues(object,props){var index=-1,length=props.length,result=Array(length);while(++index<length){result[index]=object[props[index]]}return result}function baseWhile(array,predicate,isDrop,fromRight){var length=array.length,index=fromRight?length:-1;while((fromRight?index--:++index<length)&&predicate(array[index],index,array)){}return isDrop?baseSlice(array,fromRight?0:index,fromRight?index+1:length):baseSlice(array,fromRight?index+1:0,fromRight?length:index)}function baseWrapperValue(value,actions){var result=value;if(result instanceof LazyWrapper){result=result.value()}var index=-1,length=actions.length;while(++index<length){var args=[result],action=actions[index];push.apply(args,action.args);result=action.func.apply(action.thisArg,args)}return result}function binaryIndex(array,value,retHighest){var low=0,high=array?array.length:low;if(typeof value=="number"&&value===value&&high<=HALF_MAX_ARRAY_LENGTH){while(low<high){var mid=low+high>>>1,computed=array[mid];if(retHighest?computed<=value:computed<value){low=mid+1}else{high=mid}}return high}return binaryIndexBy(array,value,identity,retHighest)}function binaryIndexBy(array,value,iteratee,retHighest){value=iteratee(value);var low=0,high=array?array.length:0,valIsNaN=value!==value,valIsUndef=typeof value=="undefined";while(low<high){var mid=floor((low+high)/2),computed=iteratee(array[mid]),isReflexive=computed===computed;if(valIsNaN){var setLow=isReflexive||retHighest}else if(valIsUndef){setLow=isReflexive&&(retHighest||typeof computed!="undefined")}else{setLow=retHighest?computed<=value:computed<value}if(setLow){low=mid+1}else{high=mid}}return nativeMin(high,MAX_ARRAY_INDEX)}function bindCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)};case 5:return function(value,other,key,object,source){return func.call(thisArg,value,other,key,object,source)}}return function(){return func.apply(thisArg,arguments)}}function bufferClone(buffer){return bufferSlice.call(buffer,0)}if(!bufferSlice){bufferClone=!(ArrayBuffer&&Uint8Array)?constant(null):function(buffer){var byteLength=buffer.byteLength,floatLength=Float64Array?floor(byteLength/FLOAT64_BYTES_PER_ELEMENT):0,offset=floatLength*FLOAT64_BYTES_PER_ELEMENT,result=new ArrayBuffer(byteLength);if(floatLength){var view=new Float64Array(result,0,floatLength);view.set(new Float64Array(buffer,0,floatLength))}if(byteLength!=offset){view=new Uint8Array(result,offset);view.set(new Uint8Array(buffer,offset))}return result}}function composeArgs(args,partials,holders){var holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),leftIndex=-1,leftLength=partials.length,result=Array(argsLength+leftLength);while(++leftIndex<leftLength){result[leftIndex]=partials[leftIndex]}while(++argsIndex<holdersLength){result[holders[argsIndex]]=args[argsIndex]}while(argsLength--){result[leftIndex++]=args[argsIndex++]}return result}function composeArgsRight(args,partials,holders){var holdersIndex=-1,holdersLength=holders.length,argsIndex=-1,argsLength=nativeMax(args.length-holdersLength,0),rightIndex=-1,rightLength=partials.length,result=Array(argsLength+rightLength);while(++argsIndex<argsLength){result[argsIndex]=args[argsIndex]}var pad=argsIndex;while(++rightIndex<rightLength){result[pad+rightIndex]=partials[rightIndex]}while(++holdersIndex<holdersLength){result[pad+holders[holdersIndex]]=args[argsIndex++]}return result}function createAggregator(setter,initializer){return function(collection,iteratee,thisArg){var result=initializer?initializer():{};iteratee=getCallback(iteratee,thisArg,3);if(isArray(collection)){var index=-1,length=collection.length;while(++index<length){var value=collection[index];setter(result,value,iteratee(value,index,collection),collection)}}else{baseEach(collection,function(value,key,collection){setter(result,value,iteratee(value,key,collection),collection)})}return result}}function createAssigner(assigner){return function(){var args=arguments,length=args.length,object=args[0];if(length<2||object==null){return object}var customizer=args[length-2],thisArg=args[length-1],guard=args[3];if(length>3&&typeof customizer=="function"){customizer=bindCallback(customizer,thisArg,5);length-=2}else{customizer=length>2&&typeof thisArg=="function"?thisArg:null;length-=customizer?1:0}if(guard&&isIterateeCall(args[1],args[2],guard)){customizer=length==3?null:customizer;length=2}var index=0;while(++index<length){var source=args[index];if(source){assigner(object,source,customizer)}}return object}}function createBaseEach(eachFunc,fromRight){return function(collection,iteratee){var length=collection?collection.length:0;if(!isLength(length)){return eachFunc(collection,iteratee)}var index=fromRight?length:-1,iterable=toObject(collection);while(fromRight?index--:++index<length){if(iteratee(iterable[index],index,iterable)===false){break}}return collection}}function createBaseFor(fromRight){return function(object,iteratee,keysFunc){var iterable=toObject(object),props=keysFunc(object),length=props.length,index=fromRight?length:-1;while(fromRight?index--:++index<length){var key=props[index];if(iteratee(iterable[key],key,iterable)===false){break}}return object}}function createBindWrapper(func,thisArg){var Ctor=createCtorWrapper(func);function wrapper(){var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(thisArg,arguments)}return wrapper}var createCache=!(nativeCreate&&Set)?constant(null):function(values){return new SetCache(values)};function createCompounder(callback){return function(string){var index=-1,array=words(deburr(string)),length=array.length,result="";while(++index<length){result=callback(result,array[index],index)}return result}}function createCtorWrapper(Ctor){return function(){var thisBinding=baseCreate(Ctor.prototype),result=Ctor.apply(thisBinding,arguments);return isObject(result)?result:thisBinding}}function createCurry(flag){function curryFunc(func,arity,guard){if(guard&&isIterateeCall(func,arity,guard)){arity=null}var result=createWrapper(func,flag,null,null,null,null,null,arity);result.placeholder=curryFunc.placeholder;return result}return curryFunc}function createExtremum(arrayFunc,isMin){return function(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}var func=getCallback(),noIteratee=iteratee==null;if(!(func===baseCallback&&noIteratee)){noIteratee=false;iteratee=func(iteratee,thisArg,3)}if(noIteratee){var isArr=isArray(collection);if(!isArr&&isString(collection)){iteratee=charAtCallback}else{return arrayFunc(isArr?collection:toIterable(collection))}}return extremumBy(collection,iteratee,isMin)}}function createFind(eachFunc,fromRight){return function(collection,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);if(isArray(collection)){var index=baseFindIndex(collection,predicate,fromRight);return index>-1?collection[index]:undefined}return baseFind(collection,predicate,eachFunc)}}function createFindIndex(fromRight){return function(array,predicate,thisArg){if(!(array&&array.length)){return-1}predicate=getCallback(predicate,thisArg,3);return baseFindIndex(array,predicate,fromRight)}}function createFindKey(objectFunc){return function(object,predicate,thisArg){predicate=getCallback(predicate,thisArg,3);return baseFind(object,predicate,objectFunc,true)}}function createFlow(fromRight){return function(){var length=arguments.length;if(!length){return function(){return arguments[0]}}var wrapper,index=fromRight?length:-1,leftIndex=0,funcs=Array(length);while(fromRight?index--:++index<length){var func=funcs[leftIndex++]=arguments[index];if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var funcName=wrapper?"":getFuncName(func);wrapper=funcName=="wrapper"?new LodashWrapper([]):wrapper}index=wrapper?-1:length;while(++index<length){func=funcs[index];funcName=getFuncName(func);var data=funcName=="wrapper"?getData(func):null;if(data&&isLaziable(data[0])){wrapper=wrapper[getFuncName(data[0])].apply(wrapper,data[3])}else{wrapper=func.length==1&&isLaziable(func)?wrapper[funcName]():wrapper.thru(func)}}return function(){var args=arguments;if(wrapper&&args.length==1&&isArray(args[0])){return wrapper.plant(args[0]).value()}var index=0,result=funcs[index].apply(this,args);while(++index<length){result=funcs[index].call(this,result)}return result}}}function createForEach(arrayFunc,eachFunc){return function(collection,iteratee,thisArg){return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayFunc(collection,iteratee):eachFunc(collection,bindCallback(iteratee,thisArg,3))}}function createForIn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||typeof thisArg!="undefined"){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee,keysIn)}}function createForOwn(objectFunc){return function(object,iteratee,thisArg){if(typeof iteratee!="function"||typeof thisArg!="undefined"){iteratee=bindCallback(iteratee,thisArg,3)}return objectFunc(object,iteratee)}}function createPadDir(fromRight){return function(string,length,chars){string=baseToString(string);return string&&(fromRight?string:"")+createPadding(string,length,chars)+(fromRight?"":string)}}function createPartial(flag){var partialFunc=restParam(function(func,partials){var holders=replaceHolders(partials,partialFunc.placeholder);return createWrapper(func,flag,null,partials,holders)});return partialFunc}function createReduce(arrayFunc,eachFunc){return function(collection,iteratee,accumulator,thisArg){var initFromArray=arguments.length<3;return typeof iteratee=="function"&&typeof thisArg=="undefined"&&isArray(collection)?arrayFunc(collection,iteratee,accumulator,initFromArray):baseReduce(collection,getCallback(iteratee,thisArg,4),accumulator,initFromArray,eachFunc)}}function createHybridWrapper(func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity){var isAry=bitmask&ARY_FLAG,isBind=bitmask&BIND_FLAG,isBindKey=bitmask&BIND_KEY_FLAG,isCurry=bitmask&CURRY_FLAG,isCurryBound=bitmask&CURRY_BOUND_FLAG,isCurryRight=bitmask&CURRY_RIGHT_FLAG;var Ctor=!isBindKey&&createCtorWrapper(func),key=func;function wrapper(){var length=arguments.length,index=length,args=Array(length);while(index--){args[index]=arguments[index]}if(partials){args=composeArgs(args,partials,holders)}if(partialsRight){args=composeArgsRight(args,partialsRight,holdersRight)}if(isCurry||isCurryRight){var placeholder=wrapper.placeholder,argsHolders=replaceHolders(args,placeholder);length-=argsHolders.length;if(length<arity){var newArgPos=argPos?arrayCopy(argPos):null,newArity=nativeMax(arity-length,0),newsHolders=isCurry?argsHolders:null,newHoldersRight=isCurry?null:argsHolders,newPartials=isCurry?args:null,newPartialsRight=isCurry?null:args;bitmask|=isCurry?PARTIAL_FLAG:PARTIAL_RIGHT_FLAG;bitmask&=~(isCurry?PARTIAL_RIGHT_FLAG:PARTIAL_FLAG);if(!isCurryBound){bitmask&=~(BIND_FLAG|BIND_KEY_FLAG)}var newData=[func,bitmask,thisArg,newPartials,newsHolders,newPartialsRight,newHoldersRight,newArgPos,ary,newArity],result=createHybridWrapper.apply(undefined,newData);if(isLaziable(func)){setData(result,newData)}result.placeholder=placeholder;return result}}var thisBinding=isBind?thisArg:this;if(isBindKey){func=thisBinding[key]}if(argPos){args=reorder(args,argPos)}if(isAry&&ary<args.length){args.length=ary}var fn=this&&this!==root&&this instanceof wrapper?Ctor||createCtorWrapper(func):func;return fn.apply(thisBinding,args)}return wrapper}function createPadding(string,length,chars){var strLength=string.length;length=+length;if(strLength>=length||!nativeIsFinite(length)){return""}var padLength=length-strLength;chars=chars==null?" ":chars+"";return repeat(chars,ceil(padLength/chars.length)).slice(0,padLength)}function createPartialWrapper(func,bitmask,thisArg,partials){var isBind=bitmask&BIND_FLAG,Ctor=createCtorWrapper(func);function wrapper(){var argsIndex=-1,argsLength=arguments.length,leftIndex=-1,leftLength=partials.length,args=Array(argsLength+leftLength);while(++leftIndex<leftLength){args[leftIndex]=partials[leftIndex]}while(argsLength--){args[leftIndex++]=arguments[++argsIndex]}var fn=this&&this!==root&&this instanceof wrapper?Ctor:func;return fn.apply(isBind?thisArg:this,args)}return wrapper}function createSortedIndex(retHighest){return function(array,value,iteratee,thisArg){var func=getCallback(iteratee);return func===baseCallback&&iteratee==null?binaryIndex(array,value,retHighest):binaryIndexBy(array,value,func(iteratee,thisArg,1),retHighest)}}function createWrapper(func,bitmask,thisArg,partials,holders,argPos,ary,arity){var isBindKey=bitmask&BIND_KEY_FLAG;if(!isBindKey&&typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var length=partials?partials.length:0;if(!length){bitmask&=~(PARTIAL_FLAG|PARTIAL_RIGHT_FLAG);partials=holders=null}length-=holders?holders.length:0;if(bitmask&PARTIAL_RIGHT_FLAG){var partialsRight=partials,holdersRight=holders;partials=holders=null}var data=isBindKey?null:getData(func),newData=[func,bitmask,thisArg,partials,holders,partialsRight,holdersRight,argPos,ary,arity];if(data){mergeData(newData,data);bitmask=newData[1];arity=newData[9]}newData[9]=arity==null?isBindKey?0:func.length:nativeMax(arity-length,0)||0;if(bitmask==BIND_FLAG){var result=createBindWrapper(newData[0],newData[2])}else if((bitmask==PARTIAL_FLAG||bitmask==(BIND_FLAG|PARTIAL_FLAG))&&!newData[4].length){result=createPartialWrapper.apply(undefined,newData)}else{result=createHybridWrapper.apply(undefined,newData)}var setter=data?baseSetData:setData;return setter(result,newData)}function equalArrays(array,other,equalFunc,customizer,isLoose,stackA,stackB){var index=-1,arrLength=array.length,othLength=other.length,result=true;if(arrLength!=othLength&&!(isLoose&&othLength>arrLength)){return false}while(result&&++index<arrLength){var arrValue=array[index],othValue=other[index];result=undefined;if(customizer){result=isLoose?customizer(othValue,arrValue,index):customizer(arrValue,othValue,index)}if(typeof result=="undefined"){if(isLoose){var othIndex=othLength;while(othIndex--){othValue=other[othIndex];result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB);if(result){break}}}else{result=arrValue&&arrValue===othValue||equalFunc(arrValue,othValue,customizer,isLoose,stackA,stackB)}}}return!!result}function equalByTag(object,other,tag){switch(tag){case boolTag:case dateTag:return+object==+other;case errorTag:return object.name==other.name&&object.message==other.message;case numberTag:return object!=+object?other!=+other:object==0?1/object==1/other:object==+other;case regexpTag:case stringTag:return object==other+""}return false}function equalObjects(object,other,equalFunc,customizer,isLoose,stackA,stackB){var objProps=keys(object),objLength=objProps.length,othProps=keys(other),othLength=othProps.length;if(objLength!=othLength&&!isLoose){return false}var skipCtor=isLoose,index=-1;while(++index<objLength){var key=objProps[index],result=isLoose?key in other:hasOwnProperty.call(other,key);if(result){var objValue=object[key],othValue=other[key];result=undefined;if(customizer){result=isLoose?customizer(othValue,objValue,key):customizer(objValue,othValue,key)}if(typeof result=="undefined"){result=objValue&&objValue===othValue||equalFunc(objValue,othValue,customizer,isLoose,stackA,stackB)}}if(!result){return false}skipCtor||(skipCtor=key=="constructor")}if(!skipCtor){var objCtor=object.constructor,othCtor=other.constructor;if(objCtor!=othCtor&&("constructor"in object&&"constructor"in other)&&!(typeof objCtor=="function"&&objCtor instanceof objCtor&&typeof othCtor=="function"&&othCtor instanceof othCtor)){return false}}return true}function extremumBy(collection,iteratee,isMin){var exValue=isMin?POSITIVE_INFINITY:NEGATIVE_INFINITY,computed=exValue,result=computed;baseEach(collection,function(value,index,collection){var current=iteratee(value,index,collection);if((isMin?current<computed:current>computed)||current===exValue&¤t===result){computed=current;result=value}});return result}function getCallback(func,thisArg,argCount){var result=lodash.callback||callback;result=result===callback?baseCallback:result;return argCount?result(func,thisArg,argCount):result}var getData=!metaMap?noop:function(func){return metaMap.get(func)};var getFuncName=function(){if(!support.funcNames){return constant("")}if(constant.name=="constant"){return baseProperty("name")}return function(func){var result=func.name,array=realNames[result],length=array?array.length:0;while(length--){var data=array[length],otherFunc=data.func;if(otherFunc==null||otherFunc==func){return data.name}}return result}}();function getIndexOf(collection,target,fromIndex){var result=lodash.indexOf||indexOf;result=result===indexOf?baseIndexOf:result;return collection?result(collection,target,fromIndex):result}function getView(start,end,transforms){var index=-1,length=transforms?transforms.length:0;while(++index<length){var data=transforms[index],size=data.size;switch(data.type){case"drop":start+=size;break;case"dropRight":end-=size;break;case"take":end=nativeMin(end,start+size);break;case"takeRight":start=nativeMax(start,end-size);break}}return{start:start,end:end}}function initCloneArray(array){var length=array.length,result=new array.constructor(length);if(length&&typeof array[0]=="string"&&hasOwnProperty.call(array,"index")){result.index=array.index;result.input=array.input}return result}function initCloneObject(object){var Ctor=object.constructor;if(!(typeof Ctor=="function"&&Ctor instanceof Ctor)){Ctor=Object}return new Ctor}function initCloneByTag(object,tag,isDeep){var Ctor=object.constructor;switch(tag){case arrayBufferTag:return bufferClone(object);case boolTag:case dateTag:return new Ctor(+object);case float32Tag:case float64Tag:case int8Tag:case int16Tag:case int32Tag:case uint8Tag:case uint8ClampedTag:case uint16Tag:case uint32Tag:var buffer=object.buffer;return new Ctor(isDeep?bufferClone(buffer):buffer,object.byteOffset,object.length);case numberTag:case stringTag:return new Ctor(object);case regexpTag:var result=new Ctor(object.source,reFlags.exec(object));result.lastIndex=object.lastIndex}return result}function isIndex(value,length){value=+value;length=length==null?MAX_SAFE_INTEGER:length;return value>-1&&value%1==0&&value<length}function isIterateeCall(value,index,object){if(!isObject(object)){return false}var type=typeof index;if(type=="number"){var length=object.length,prereq=isLength(length)&&isIndex(index,length)}else{prereq=type=="string"&&index in object}if(prereq){var other=object[index];return value===value?value===other:other!==other}return false}function isLaziable(func){var funcName=getFuncName(func);return!!funcName&&func===lodash[funcName]&&funcName in LazyWrapper.prototype}function isLength(value){return typeof value=="number"&&value>-1&&value%1==0&&value<=MAX_SAFE_INTEGER}function isStrictComparable(value){return value===value&&(value===0?1/value>0:!isObject(value))}function mergeData(data,source){var bitmask=data[1],srcBitmask=source[1],newBitmask=bitmask|srcBitmask,isCommon=newBitmask<ARY_FLAG;var isCombo=srcBitmask==ARY_FLAG&&bitmask==CURRY_FLAG||srcBitmask==ARY_FLAG&&bitmask==REARG_FLAG&&data[7].length<=source[8]||srcBitmask==(ARY_FLAG|REARG_FLAG)&&bitmask==CURRY_FLAG;if(!(isCommon||isCombo)){return data}if(srcBitmask&BIND_FLAG){data[2]=source[2];newBitmask|=bitmask&BIND_FLAG?0:CURRY_BOUND_FLAG}var value=source[3];if(value){var partials=data[3];data[3]=partials?composeArgs(partials,value,source[4]):arrayCopy(value);data[4]=partials?replaceHolders(data[3],PLACEHOLDER):arrayCopy(source[4])}value=source[5];if(value){partials=data[5];data[5]=partials?composeArgsRight(partials,value,source[6]):arrayCopy(value); | |
data[6]=partials?replaceHolders(data[5],PLACEHOLDER):arrayCopy(source[6])}value=source[7];if(value){data[7]=arrayCopy(value)}if(srcBitmask&ARY_FLAG){data[8]=data[8]==null?source[8]:nativeMin(data[8],source[8])}if(data[9]==null){data[9]=source[9]}data[0]=source[0];data[1]=newBitmask;return data}function pickByArray(object,props){object=toObject(object);var index=-1,length=props.length,result={};while(++index<length){var key=props[index];if(key in object){result[key]=object[key]}}return result}function pickByCallback(object,predicate){var result={};baseForIn(object,function(value,key,object){if(predicate(value,key,object)){result[key]=value}});return result}function reorder(array,indexes){var arrLength=array.length,length=nativeMin(indexes.length,arrLength),oldArray=arrayCopy(array);while(length--){var index=indexes[length];array[length]=isIndex(index,arrLength)?oldArray[index]:undefined}return array}var setData=function(){var count=0,lastCalled=0;return function(key,value){var stamp=now(),remaining=HOT_SPAN-(stamp-lastCalled);lastCalled=stamp;if(remaining>0){if(++count>=HOT_COUNT){return key}}else{count=0}return baseSetData(key,value)}}();function shimIsPlainObject(value){var Ctor,support=lodash.support;if(!(isObjectLike(value)&&objToString.call(value)==objectTag)||!hasOwnProperty.call(value,"constructor")&&(Ctor=value.constructor,typeof Ctor=="function"&&!(Ctor instanceof Ctor))){return false}var result;baseForIn(value,function(subValue,key){result=key});return typeof result=="undefined"||hasOwnProperty.call(value,result)}function shimKeys(object){var props=keysIn(object),propsLength=props.length,length=propsLength&&object.length,support=lodash.support;var allowIndexes=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object));var index=-1,result=[];while(++index<propsLength){var key=props[index];if(allowIndexes&&isIndex(key,length)||hasOwnProperty.call(object,key)){result.push(key)}}return result}function toIterable(value){if(value==null){return[]}if(!isLength(value.length)){return values(value)}return isObject(value)?value:Object(value)}function toObject(value){return isObject(value)?value:Object(value)}function wrapperClone(wrapper){return wrapper instanceof LazyWrapper?wrapper.clone():new LodashWrapper(wrapper.__wrapped__,wrapper.__chain__,arrayCopy(wrapper.__actions__))}function chunk(array,size,guard){if(guard?isIterateeCall(array,size,guard):size==null){size=1}else{size=nativeMax(+size||1,1)}var index=0,length=array?array.length:0,resIndex=-1,result=Array(ceil(length/size));while(index<length){result[++resIndex]=baseSlice(array,index,index+=size)}return result}function compact(array){var index=-1,length=array?array.length:0,resIndex=-1,result=[];while(++index<length){var value=array[index];if(value){result[++resIndex]=value}}return result}var difference=restParam(function(array,values){return isArray(array)||isArguments(array)?baseDifference(array,baseFlatten(values,false,true)):[]});function drop(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,n<0?0:n)}function dropRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,0,n<0?0:n)}function dropRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true,true):[]}function dropWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),true):[]}function fill(array,value,start,end){var length=array?array.length:0;if(!length){return[]}if(start&&typeof start!="number"&&isIterateeCall(array,value,start)){start=0;end=length}return baseFill(array,value,start,end)}var findIndex=createFindIndex();var findLastIndex=createFindIndex(true);function first(array){return array?array[0]:undefined}function flatten(array,isDeep,guard){var length=array?array.length:0;if(guard&&isIterateeCall(array,isDeep,guard)){isDeep=false}return length?baseFlatten(array,isDeep):[]}function flattenDeep(array){var length=array?array.length:0;return length?baseFlatten(array,true):[]}function indexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}if(typeof fromIndex=="number"){fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex}else if(fromIndex){var index=binaryIndex(array,value),other=array[index];if(value===value?value===other:other!==other){return index}return-1}return baseIndexOf(array,value,fromIndex||0)}function initial(array){return dropRight(array,1)}function intersection(){var args=[],argsIndex=-1,argsLength=arguments.length,caches=[],indexOf=getIndexOf(),isCommon=indexOf==baseIndexOf;while(++argsIndex<argsLength){var value=arguments[argsIndex];if(isArray(value)||isArguments(value)){args.push(value);caches.push(isCommon&&value.length>=120?createCache(argsIndex&&value):null)}}argsLength=args.length;var array=args[0],index=-1,length=array?array.length:0,result=[],seen=caches[0];outer:while(++index<length){value=array[index];if((seen?cacheIndexOf(seen,value):indexOf(result,value,0))<0){argsIndex=argsLength;while(--argsIndex){var cache=caches[argsIndex];if((cache?cacheIndexOf(cache,value):indexOf(args[argsIndex],value,0))<0){continue outer}}if(seen){seen.push(value)}result.push(value)}}return result}function last(array){var length=array?array.length:0;return length?array[length-1]:undefined}function lastIndexOf(array,value,fromIndex){var length=array?array.length:0;if(!length){return-1}var index=length;if(typeof fromIndex=="number"){index=(fromIndex<0?nativeMax(length+fromIndex,0):nativeMin(fromIndex||0,length-1))+1}else if(fromIndex){index=binaryIndex(array,value,true)-1;var other=array[index];if(value===value?value===other:other!==other){return index}return-1}if(value!==value){return indexOfNaN(array,index,true)}while(index--){if(array[index]===value){return index}}return-1}function pull(){var args=arguments,array=args[0];if(!(array&&array.length)){return array}var index=0,indexOf=getIndexOf(),length=args.length;while(++index<length){var fromIndex=0,value=args[index];while((fromIndex=indexOf(array,value,fromIndex))>-1){splice.call(array,fromIndex,1)}}return array}var pullAt=restParam(function(array,indexes){array||(array=[]);indexes=baseFlatten(indexes);var length=indexes.length,result=baseAt(array,indexes);indexes.sort(baseCompareAscending);while(length--){var index=parseFloat(indexes[length]);if(index!=previous&&isIndex(index)){var previous=index;splice.call(array,index,1)}}return result});function remove(array,predicate,thisArg){var index=-1,length=array?array.length:0,result=[];predicate=getCallback(predicate,thisArg,3);while(++index<length){var value=array[index];if(predicate(value,index,array)){result.push(value);splice.call(array,index--,1);length--}}return result}function rest(array){return drop(array,1)}function slice(array,start,end){var length=array?array.length:0;if(!length){return[]}if(end&&typeof end!="number"&&isIterateeCall(array,start,end)){start=0;end=length}return baseSlice(array,start,end)}var sortedIndex=createSortedIndex();var sortedLastIndex=createSortedIndex(true);function take(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}return baseSlice(array,0,n<0?0:n)}function takeRight(array,n,guard){var length=array?array.length:0;if(!length){return[]}if(guard?isIterateeCall(array,n,guard):n==null){n=1}n=length-(+n||0);return baseSlice(array,n<0?0:n)}function takeRightWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3),false,true):[]}function takeWhile(array,predicate,thisArg){return array&&array.length?baseWhile(array,getCallback(predicate,thisArg,3)):[]}var union=restParam(function(arrays){return baseUniq(baseFlatten(arrays,false,true))});function uniq(array,isSorted,iteratee,thisArg){var length=array?array.length:0;if(!length){return[]}if(isSorted!=null&&typeof isSorted!="boolean"){thisArg=iteratee;iteratee=isIterateeCall(array,isSorted,thisArg)?null:isSorted;isSorted=false}var func=getCallback();if(!(func===baseCallback&&iteratee==null)){iteratee=func(iteratee,thisArg,3)}return isSorted&&getIndexOf()==baseIndexOf?sortedUniq(array,iteratee):baseUniq(array,iteratee)}function unzip(array){var index=-1,length=(array&&array.length&&arrayMax(arrayMap(array,getLength)))>>>0,result=Array(length);while(++index<length){result[index]=arrayMap(array,baseProperty(index))}return result}var without=restParam(function(array,values){return isArray(array)||isArguments(array)?baseDifference(array,values):[]});function xor(){var index=-1,length=arguments.length;while(++index<length){var array=arguments[index];if(isArray(array)||isArguments(array)){var result=result?baseDifference(result,array).concat(baseDifference(array,result)):array}}return result?baseUniq(result):[]}var zip=restParam(unzip);function zipObject(props,values){var index=-1,length=props?props.length:0,result={};if(length&&!values&&!isArray(props[0])){values=[]}while(++index<length){var key=props[index];if(values){result[key]=values[index]}else if(key){result[key[0]]=key[1]}}return result}function chain(value){var result=lodash(value);result.__chain__=true;return result}function tap(value,interceptor,thisArg){interceptor.call(thisArg,value);return value}function thru(value,interceptor,thisArg){return interceptor.call(thisArg,value)}function wrapperChain(){return chain(this)}function wrapperCommit(){return new LodashWrapper(this.value(),this.__chain__)}function wrapperPlant(value){var result,parent=this;while(parent instanceof baseLodash){var clone=wrapperClone(parent);if(result){previous.__wrapped__=clone}else{result=clone}var previous=clone;parent=parent.__wrapped__}previous.__wrapped__=value;return result}function wrapperReverse(){var value=this.__wrapped__;if(value instanceof LazyWrapper){if(this.__actions__.length){value=new LazyWrapper(this)}return new LodashWrapper(value.reverse(),this.__chain__)}return this.thru(function(value){return value.reverse()})}function wrapperToString(){return this.value()+""}function wrapperValue(){return baseWrapperValue(this.__wrapped__,this.__actions__)}var at=restParam(function(collection,props){var length=collection?collection.length:0;if(isLength(length)){collection=toIterable(collection)}return baseAt(collection,baseFlatten(props))});var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?++result[key]:result[key]=1});function every(collection,predicate,thisArg){var func=isArray(collection)?arrayEvery:baseEvery;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function filter(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,predicate)}var find=createFind(baseEach);var findLast=createFind(baseEachRight,true);function findWhere(collection,source){return find(collection,baseMatches(source))}var forEach=createForEach(arrayEach,baseEach);var forEachRight=createForEach(arrayEachRight,baseEachRight);var groupBy=createAggregator(function(result,value,key){if(hasOwnProperty.call(result,key)){result[key].push(value)}else{result[key]=[value]}});function includes(collection,target,fromIndex,guard){var length=collection?collection.length:0;if(!isLength(length)){collection=values(collection);length=collection.length}if(!length){return false}if(typeof fromIndex!="number"||guard&&isIterateeCall(target,fromIndex,guard)){fromIndex=0}else{fromIndex=fromIndex<0?nativeMax(length+fromIndex,0):fromIndex||0}return typeof collection=="string"||!isArray(collection)&&isString(collection)?fromIndex<length&&collection.indexOf(target,fromIndex)>-1:getIndexOf(collection,target,fromIndex)>-1}var indexBy=createAggregator(function(result,value,key){result[key]=value});var invoke=restParam(function(collection,methodName,args){var index=-1,isFunc=typeof methodName=="function",length=collection?collection.length:0,result=isLength(length)?Array(length):[];baseEach(collection,function(value){var func=isFunc?methodName:value!=null&&value[methodName];result[++index]=func?func.apply(value,args):undefined});return result});function map(collection,iteratee,thisArg){var func=isArray(collection)?arrayMap:baseMap;iteratee=getCallback(iteratee,thisArg,3);return func(collection,iteratee)}var partition=createAggregator(function(result,value,key){result[key?0:1].push(value)},function(){return[[],[]]});function pluck(collection,key){return map(collection,baseProperty(key))}var reduce=createReduce(arrayReduce,baseEach);var reduceRight=createReduce(arrayReduceRight,baseEachRight);function reject(collection,predicate,thisArg){var func=isArray(collection)?arrayFilter:baseFilter;predicate=getCallback(predicate,thisArg,3);return func(collection,function(value,index,collection){return!predicate(value,index,collection)})}function sample(collection,n,guard){if(guard?isIterateeCall(collection,n,guard):n==null){collection=toIterable(collection);var length=collection.length;return length>0?collection[baseRandom(0,length-1)]:undefined}var result=shuffle(collection);result.length=nativeMin(n<0?0:+n||0,result.length);return result}function shuffle(collection){collection=toIterable(collection);var index=-1,length=collection.length,result=Array(length);while(++index<length){var rand=baseRandom(0,index);if(index!=rand){result[index]=result[rand]}result[rand]=collection[index]}return result}function size(collection){var length=collection?collection.length:0;return isLength(length)?length:keys(collection).length}function some(collection,predicate,thisArg){var func=isArray(collection)?arraySome:baseSome;if(thisArg&&isIterateeCall(collection,predicate,thisArg)){predicate=null}if(typeof predicate!="function"||typeof thisArg!="undefined"){predicate=getCallback(predicate,thisArg,3)}return func(collection,predicate)}function sortBy(collection,iteratee,thisArg){if(collection==null){return[]}var index=-1,length=collection.length,result=isLength(length)?Array(length):[];if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}iteratee=getCallback(iteratee,thisArg,3);baseEach(collection,function(value,key,collection){result[++index]={criteria:iteratee(value,key,collection),index:index,value:value}});return baseSortBy(result,compareAscending)}function sortByAll(){var args=arguments,collection=args[0],guard=args[3],index=0,length=args.length-1;if(collection==null){return[]}var props=Array(length);while(index<length){props[index]=args[++index]}if(guard&&isIterateeCall(args[1],args[2],guard)){props=args[1]}return baseSortByOrder(collection,baseFlatten(props),[])}function sortByOrder(collection,props,orders,guard){if(collection==null){return[]}if(guard&&isIterateeCall(props,orders,guard)){orders=null}if(!isArray(props)){props=props==null?[]:[props]}if(!isArray(orders)){orders=orders==null?[]:[orders]}return baseSortByOrder(collection,props,orders)}function where(collection,source){return filter(collection,baseMatches(source))}var now=nativeNow||function(){return(new Date).getTime()};function after(n,func){if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}n=nativeIsFinite(n=+n)?n:0;return function(){if(--n<1){return func.apply(this,arguments)}}}function ary(func,n,guard){if(guard&&isIterateeCall(func,n,guard)){n=null}n=func&&n==null?func.length:nativeMax(+n||0,0);return createWrapper(func,ARY_FLAG,null,null,null,null,n)}function before(n,func){var result;if(typeof func!="function"){if(typeof n=="function"){var temp=n;n=func;func=temp}else{throw new TypeError(FUNC_ERROR_TEXT)}}return function(){if(--n>0){result=func.apply(this,arguments)}else{func=null}return result}}var bind=restParam(function(func,thisArg,partials){var bitmask=BIND_FLAG;if(partials.length){var holders=replaceHolders(partials,bind.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(func,bitmask,thisArg,partials,holders)});var bindAll=restParam(function(object,methodNames){methodNames=methodNames.length?baseFlatten(methodNames):functions(object);var index=-1,length=methodNames.length;while(++index<length){var key=methodNames[index];object[key]=createWrapper(object[key],BIND_FLAG,object)}return object});var bindKey=restParam(function(object,key,partials){var bitmask=BIND_FLAG|BIND_KEY_FLAG;if(partials.length){var holders=replaceHolders(partials,bindKey.placeholder);bitmask|=PARTIAL_FLAG}return createWrapper(key,bitmask,object,partials,holders)});var curry=createCurry(CURRY_FLAG);var curryRight=createCurry(CURRY_RIGHT_FLAG);function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}wait=wait<0?0:+wait||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&nativeMax(+options.maxWait||0,wait);trailing="trailing"in options?options.trailing:trailing}function cancel(){if(timeoutId){clearTimeout(timeoutId)}if(maxTimeoutId){clearTimeout(maxTimeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined}function delayed(){var remaining=wait-(now()-stamp);if(remaining<=0||remaining>wait){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}}function maxDelayed(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}function debounced(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0||remaining>maxWait;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}debounced.cancel=cancel;return debounced}var defer=restParam(function(func,args){return baseDelay(func,1,args)});var delay=restParam(function(func,wait,args){return baseDelay(func,wait,args)});var flow=createFlow();var flowRight=createFlow(true);function memoize(func,resolver){if(typeof func!="function"||resolver&&typeof resolver!="function"){throw new TypeError(FUNC_ERROR_TEXT)}var memoized=function(){var args=arguments,cache=memoized.cache,key=resolver?resolver.apply(this,args):args[0];if(cache.has(key)){return cache.get(key)}var result=func.apply(this,args);cache.set(key,result);return result};memoized.cache=new memoize.Cache;return memoized}function negate(predicate){if(typeof predicate!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(){return!predicate.apply(this,arguments)}}function once(func){return before(func,2)}var partial=createPartial(PARTIAL_FLAG);var partialRight=createPartial(PARTIAL_RIGHT_FLAG);var rearg=restParam(function(func,indexes){return createWrapper(func,REARG_FLAG,null,null,null,baseFlatten(indexes))});function restParam(func,start){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}start=nativeMax(typeof start=="undefined"?func.length-1:+start||0,0);return function(){var args=arguments,index=-1,length=nativeMax(args.length-start,0),rest=Array(length);while(++index<length){rest[index]=args[start+index]}switch(start){case 0:return func.call(this,rest);case 1:return func.call(this,args[0],rest);case 2:return func.call(this,args[0],args[1],rest)}var otherArgs=Array(start+1);index=-1;while(++index<start){otherArgs[index]=args[index]}otherArgs[start]=rest;return func.apply(this,otherArgs)}}function spread(func){if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}return function(array){return func.apply(this,array)}}function throttle(func,wait,options){var leading=true,trailing=true;if(typeof func!="function"){throw new TypeError(FUNC_ERROR_TEXT)}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?!!options.leading:leading;trailing="trailing"in options?!!options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=+wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){wrapper=wrapper==null?identity:wrapper;return createWrapper(wrapper,PARTIAL_FLAG,null,[value],[])}function clone(value,isDeep,customizer,thisArg){if(isDeep&&typeof isDeep!="boolean"&&isIterateeCall(value,isDeep,customizer)){isDeep=false}else if(typeof isDeep=="function"){thisArg=customizer;customizer=isDeep;isDeep=false}customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,isDeep,customizer)}function cloneDeep(value,customizer,thisArg){customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,1);return baseClone(value,true,customizer)}function isArguments(value){var length=isObjectLike(value)?value.length:undefined;return isLength(length)&&objToString.call(value)==argsTag}var isArray=nativeIsArray||function(value){return isObjectLike(value)&&isLength(value.length)&&objToString.call(value)==arrayTag};function isBoolean(value){return value===true||value===false||isObjectLike(value)&&objToString.call(value)==boolTag}function isDate(value){return isObjectLike(value)&&objToString.call(value)==dateTag}function isElement(value){return!!value&&value.nodeType===1&&isObjectLike(value)&&objToString.call(value).indexOf("Element")>-1}if(!support.dom){isElement=function(value){return!!value&&value.nodeType===1&&isObjectLike(value)&&!isPlainObject(value)}}function isEmpty(value){if(value==null){return true}var length=value.length;if(isLength(length)&&(isArray(value)||isString(value)||isArguments(value)||isObjectLike(value)&&isFunction(value.splice))){return!length}return!keys(value).length}function isEqual(value,other,customizer,thisArg){customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,3);if(!customizer&&isStrictComparable(value)&&isStrictComparable(other)){return value===other}var result=customizer?customizer(value,other):undefined;return typeof result=="undefined"?baseIsEqual(value,other,customizer):!!result}function isError(value){return isObjectLike(value)&&typeof value.message=="string"&&objToString.call(value)==errorTag}var isFinite=nativeNumIsFinite||function(value){return typeof value=="number"&&nativeIsFinite(value)};var isFunction=!(baseIsFunction(/x/)||Uint8Array&&!baseIsFunction(Uint8Array))?baseIsFunction:function(value){return objToString.call(value)==funcTag};function isObject(value){var type=typeof value;return type=="function"||!!value&&type=="object"}function isMatch(object,source,customizer,thisArg){var props=keys(source),length=props.length;if(!length){return true}if(object==null){return false}customizer=typeof customizer=="function"&&bindCallback(customizer,thisArg,3);if(!customizer&&length==1){var key=props[0],value=source[key];if(isStrictComparable(value)){return value===object[key]&&(typeof value!="undefined"||key in toObject(object))}}var values=Array(length),strictCompareFlags=Array(length);while(length--){value=values[length]=source[props[length]];strictCompareFlags[length]=isStrictComparable(value)}return baseIsMatch(toObject(object),props,values,strictCompareFlags,customizer)}function isNaN(value){return isNumber(value)&&value!=+value}function isNative(value){if(value==null){return false}if(objToString.call(value)==funcTag){return reNative.test(fnToString.call(value))}return isObjectLike(value)&&reHostCtor.test(value)}function isNull(value){return value===null}function isNumber(value){return typeof value=="number"||isObjectLike(value)&&objToString.call(value)==numberTag}var isPlainObject=!getPrototypeOf?shimIsPlainObject:function(value){if(!(value&&objToString.call(value)==objectTag)){return false}var valueOf=value.valueOf,objProto=isNative(valueOf)&&(objProto=getPrototypeOf(valueOf))&&getPrototypeOf(objProto);return objProto?value==objProto||getPrototypeOf(value)==objProto:shimIsPlainObject(value)};function isRegExp(value){return isObjectLike(value)&&objToString.call(value)==regexpTag||false}function isString(value){return typeof value=="string"||isObjectLike(value)&&objToString.call(value)==stringTag}function isTypedArray(value){return isObjectLike(value)&&isLength(value.length)&&!!typedArrayTags[objToString.call(value)]}function isUndefined(value){return typeof value=="undefined"}function toArray(value){var length=value?value.length:0;if(!isLength(length)){return values(value)}if(!length){return[]}return arrayCopy(value)}function toPlainObject(value){return baseCopy(value,keysIn(value))}var assign=createAssigner(baseAssign);function create(prototype,properties,guard){var result=baseCreate(prototype);if(guard&&isIterateeCall(prototype,properties,guard)){properties=null}return properties?baseCopy(properties,result,keys(properties)):result}var defaults=restParam(function(args){var object=args[0];if(object==null){return object}args.push(assignDefaults);return assign.apply(undefined,args)});var findKey=createFindKey(baseForOwn);var findLastKey=createFindKey(baseForOwnRight);var forIn=createForIn(baseFor);var forInRight=createForIn(baseForRight);var forOwn=createForOwn(baseForOwn);var forOwnRight=createForOwn(baseForOwnRight);function functions(object){return baseFunctions(object,keysIn(object))}function has(object,key){return object?hasOwnProperty.call(object,key):false}function invert(object,multiValue,guard){if(guard&&isIterateeCall(object,multiValue,guard)){multiValue=null}var index=-1,props=keys(object),length=props.length,result={};while(++index<length){var key=props[index],value=object[key];if(multiValue){if(hasOwnProperty.call(result,value)){result[value].push(key)}else{result[value]=[key]}}else{result[value]=key}}return result}var keys=!nativeKeys?shimKeys:function(object){if(object){var Ctor=object.constructor,length=object.length}if(typeof Ctor=="function"&&Ctor.prototype===object||typeof object!="function"&&(length&&isLength(length))){return shimKeys(object)}return isObject(object)?nativeKeys(object):[]};function keysIn(object){if(object==null){return[]}if(!isObject(object)){object=Object(object)}var length=object.length;length=length&&isLength(length)&&(isArray(object)||support.nonEnumArgs&&isArguments(object))&&length||0;var Ctor=object.constructor,index=-1,isProto=typeof Ctor=="function"&&Ctor.prototype===object,result=Array(length),skipIndexes=length>0;while(++index<length){result[index]=index+""}for(var key in object){if(!(skipIndexes&&isIndex(key,length))&&!(key=="constructor"&&(isProto||!hasOwnProperty.call(object,key)))){result.push(key)}}return result}function mapValues(object,iteratee,thisArg){var result={};iteratee=getCallback(iteratee,thisArg,3);baseForOwn(object,function(value,key,object){result[key]=iteratee(value,key,object)});return result}var merge=createAssigner(baseMerge);var omit=restParam(function(object,props){if(object==null){return{}}if(typeof props[0]!="function"){var props=arrayMap(baseFlatten(props),String);return pickByArray(object,baseDifference(keysIn(object),props))}var predicate=bindCallback(props[0],props[1],3);return pickByCallback(object,function(value,key,object){return!predicate(value,key,object)})});function pairs(object){var index=-1,props=keys(object),length=props.length,result=Array(length);while(++index<length){var key=props[index];result[index]=[key,object[key]]}return result}var pick=restParam(function(object,props){if(object==null){return{}}return typeof props[0]=="function"?pickByCallback(object,bindCallback(props[0],props[1],3)):pickByArray(object,baseFlatten(props))});function result(object,key,defaultValue){var value=object==null?undefined:object[key];if(typeof value=="undefined"){value=defaultValue}return isFunction(value)?value.call(object):value}function transform(object,iteratee,accumulator,thisArg){var isArr=isArray(object)||isTypedArray(object);iteratee=getCallback(iteratee,thisArg,4);if(accumulator==null){if(isArr||isObject(object)){var Ctor=object.constructor;if(isArr){accumulator=isArray(object)?new Ctor:[]}else{accumulator=baseCreate(isFunction(Ctor)&&Ctor.prototype)}}else{accumulator={}}}(isArr?arrayEach:baseForOwn)(object,function(value,index,object){return iteratee(accumulator,value,index,object)});return accumulator}function values(object){return baseValues(object,keys(object))}function valuesIn(object){return baseValues(object,keysIn(object))}function inRange(value,start,end){start=+start||0;if(typeof end==="undefined"){end=start;start=0}else{end=+end||0}return value>=start&&value<end}function random(min,max,floating){if(floating&&isIterateeCall(min,max,floating)){max=floating=null}var noMin=min==null,noMax=max==null;if(floating==null){if(noMax&&typeof min=="boolean"){floating=min;min=1}else if(typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1;noMax=false}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}var camelCase=createCompounder(function(result,word,index){word=word.toLowerCase();return result+(index?word.charAt(0).toUpperCase()+word.slice(1):word)});function capitalize(string){string=baseToString(string);return string&&string.charAt(0).toUpperCase()+string.slice(1)}function deburr(string){string=baseToString(string);return string&&string.replace(reLatin1,deburrLetter).replace(reComboMarks,"")}function endsWith(string,target,position){string=baseToString(string);target=target+"";var length=string.length;position=typeof position=="undefined"?length:nativeMin(position<0?0:+position||0,length);position-=target.length;return position>=0&&string.indexOf(target,position)==position}function escape(string){string=baseToString(string);return string&&reHasUnescapedHtml.test(string)?string.replace(reUnescapedHtml,escapeHtmlChar):string}function escapeRegExp(string){string=baseToString(string);return string&&reHasRegExpChars.test(string)?string.replace(reRegExpChars,"\\$&"):string}var kebabCase=createCompounder(function(result,word,index){return result+(index?"-":"")+word.toLowerCase()});function pad(string,length,chars){string=baseToString(string);length=+length;var strLength=string.length;if(strLength>=length||!nativeIsFinite(length)){return string}var mid=(length-strLength)/2,leftLength=floor(mid),rightLength=ceil(mid);chars=createPadding("",rightLength,chars);return chars.slice(0,leftLength)+string+chars}var padLeft=createPadDir();var padRight=createPadDir(true);function parseInt(string,radix,guard){if(guard&&isIterateeCall(string,radix,guard)){radix=0}return nativeParseInt(string,radix)}if(nativeParseInt(whitespace+"08")!=8){parseInt=function(string,radix,guard){if(guard?isIterateeCall(string,radix,guard):radix==null){radix=0}else if(radix){radix=+radix}string=trim(string);return nativeParseInt(string,radix||(reHexPrefix.test(string)?16:10))}}function repeat(string,n){var result="";string=baseToString(string);n=+n;if(n<1||!string||!nativeIsFinite(n)){return result}do{if(n%2){result+=string}n=floor(n/2);string+=string}while(n);return result}var snakeCase=createCompounder(function(result,word,index){ | |
return result+(index?"_":"")+word.toLowerCase()});var startCase=createCompounder(function(result,word,index){return result+(index?" ":"")+(word.charAt(0).toUpperCase()+word.slice(1))});function startsWith(string,target,position){string=baseToString(string);position=position==null?0:nativeMin(position<0?0:+position||0,string.length);return string.lastIndexOf(target,position)==position}function template(string,options,otherOptions){var settings=lodash.templateSettings;if(otherOptions&&isIterateeCall(string,options,otherOptions)){options=otherOptions=null}string=baseToString(string);options=baseAssign(baseAssign({},otherOptions||options),settings,assignOwnDefaults);var imports=baseAssign(baseAssign({},options.imports),settings.imports,assignOwnDefaults),importsKeys=keys(imports),importsValues=baseValues(imports,importsKeys);var isEscaping,isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");var sourceURL="//# sourceURL="+("sourceURL"in options?options.sourceURL:"lodash.templateSources["+ ++templateCounter+"]")+"\n";string.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=string.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){isEscaping=true;source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable;if(!variable){source="with (obj) {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+(variable||"obj")+") {\n"+(variable?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(isEscaping?", __e = _.escape":"")+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var result=attempt(function(){return Function(importsKeys,sourceURL+"return "+source).apply(undefined,importsValues)});result.source=source;if(isError(result)){throw result}return result}function trim(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string),trimmedRightIndex(string)+1)}chars=chars+"";return string.slice(charsLeftIndex(string,chars),charsRightIndex(string,chars)+1)}function trimLeft(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(trimmedLeftIndex(string))}return string.slice(charsLeftIndex(string,chars+""))}function trimRight(string,chars,guard){var value=string;string=baseToString(string);if(!string){return string}if(guard?isIterateeCall(value,chars,guard):chars==null){return string.slice(0,trimmedRightIndex(string)+1)}return string.slice(0,charsRightIndex(string,chars+"")+1)}function trunc(string,options,guard){if(guard&&isIterateeCall(string,options,guard)){options=null}var length=DEFAULT_TRUNC_LENGTH,omission=DEFAULT_TRUNC_OMISSION;if(options!=null){if(isObject(options)){var separator="separator"in options?options.separator:separator;length="length"in options?+options.length||0:length;omission="omission"in options?baseToString(options.omission):omission}else{length=+options||0}}string=baseToString(string);if(length>=string.length){return string}var end=length-omission.length;if(end<1){return omission}var result=string.slice(0,end);if(separator==null){return result+omission}if(isRegExp(separator)){if(string.slice(end).search(separator)){var match,newEnd,substring=string.slice(0,end);if(!separator.global){separator=RegExp(separator.source,(reFlags.exec(separator)||"")+"g")}separator.lastIndex=0;while(match=separator.exec(substring)){newEnd=match.index}result=result.slice(0,newEnd==null?end:newEnd)}}else if(string.indexOf(separator,end)!=end){var index=result.lastIndexOf(separator);if(index>-1){result=result.slice(0,index)}}return result+omission}function unescape(string){string=baseToString(string);return string&&reHasEscapedHtml.test(string)?string.replace(reEscapedHtml,unescapeHtmlChar):string}function words(string,pattern,guard){if(guard&&isIterateeCall(string,pattern,guard)){pattern=null}string=baseToString(string);return string.match(pattern||reWords)||[]}var attempt=restParam(function(func,args){try{return func.apply(undefined,args)}catch(e){return isError(e)?e:new Error(e)}});function callback(func,thisArg,guard){if(guard&&isIterateeCall(func,thisArg,guard)){thisArg=null}return isObjectLike(func)?matches(func):baseCallback(func,thisArg)}function constant(value){return function(){return value}}function identity(value){return value}function matches(source){return baseMatches(baseClone(source,true))}function matchesProperty(key,value){return baseMatchesProperty(key+"",baseClone(value,true))}function mixin(object,source,options){if(options==null){var isObj=isObject(source),props=isObj&&keys(source),methodNames=props&&props.length&&baseFunctions(source,props);if(!(methodNames?methodNames.length:isObj)){methodNames=false;options=source;source=object;object=this}}if(!methodNames){methodNames=baseFunctions(source,keys(source))}var chain=true,index=-1,isFunc=isFunction(object),length=methodNames.length;if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}while(++index<length){var methodName=methodNames[index],func=source[methodName];object[methodName]=func;if(isFunc){object.prototype[methodName]=function(func){return function(){var chainAll=this.__chain__;if(chain||chainAll){var result=object(this.__wrapped__),actions=result.__actions__=arrayCopy(this.__actions__);actions.push({func:func,args:arguments,thisArg:object});result.__chain__=chainAll;return result}var args=[this.value()];push.apply(args,arguments);return func.apply(object,args)}}(func)}}return object}function noConflict(){context._=oldDash;return this}function noop(){}function property(key){return baseProperty(key+"")}function propertyOf(object){return function(key){return object==null?undefined:object[key]}}function range(start,end,step){if(step&&isIterateeCall(start,end,step)){end=step=null}start=+start||0;step=step==null?1:+step||0;if(end==null){end=start;start=0}else{end=+end||0}var index=-1,length=nativeMax(ceil((end-start)/(step||1)),0),result=Array(length);while(++index<length){result[index]=start;start+=step}return result}function times(n,iteratee,thisArg){n=+n;if(n<1||!nativeIsFinite(n)){return[]}var index=-1,result=Array(nativeMin(n,MAX_ARRAY_LENGTH));iteratee=bindCallback(iteratee,thisArg,1);while(++index<n){if(index<MAX_ARRAY_LENGTH){result[index]=iteratee(index)}else{iteratee(index)}}return result}function uniqueId(prefix){var id=++idCounter;return baseToString(prefix)+id}function add(augend,addend){return augend+addend}var max=createExtremum(arrayMax);var min=createExtremum(arrayMin,true);function sum(collection,iteratee,thisArg){if(thisArg&&isIterateeCall(collection,iteratee,thisArg)){iteratee=null}var func=getCallback(),noIteratee=iteratee==null;if(!(func===baseCallback&&noIteratee)){noIteratee=false;iteratee=func(iteratee,thisArg,3)}return noIteratee?arraySum(isArray(collection)?collection:toIterable(collection)):baseSum(collection,iteratee)}lodash.prototype=baseLodash.prototype;LodashWrapper.prototype=baseCreate(baseLodash.prototype);LodashWrapper.prototype.constructor=LodashWrapper;LazyWrapper.prototype=baseCreate(baseLodash.prototype);LazyWrapper.prototype.constructor=LazyWrapper;MapCache.prototype["delete"]=mapDelete;MapCache.prototype.get=mapGet;MapCache.prototype.has=mapHas;MapCache.prototype.set=mapSet;SetCache.prototype.push=cachePush;memoize.Cache=MapCache;lodash.after=after;lodash.ary=ary;lodash.assign=assign;lodash.at=at;lodash.before=before;lodash.bind=bind;lodash.bindAll=bindAll;lodash.bindKey=bindKey;lodash.callback=callback;lodash.chain=chain;lodash.chunk=chunk;lodash.compact=compact;lodash.constant=constant;lodash.countBy=countBy;lodash.create=create;lodash.curry=curry;lodash.curryRight=curryRight;lodash.debounce=debounce;lodash.defaults=defaults;lodash.defer=defer;lodash.delay=delay;lodash.difference=difference;lodash.drop=drop;lodash.dropRight=dropRight;lodash.dropRightWhile=dropRightWhile;lodash.dropWhile=dropWhile;lodash.fill=fill;lodash.filter=filter;lodash.flatten=flatten;lodash.flattenDeep=flattenDeep;lodash.flow=flow;lodash.flowRight=flowRight;lodash.forEach=forEach;lodash.forEachRight=forEachRight;lodash.forIn=forIn;lodash.forInRight=forInRight;lodash.forOwn=forOwn;lodash.forOwnRight=forOwnRight;lodash.functions=functions;lodash.groupBy=groupBy;lodash.indexBy=indexBy;lodash.initial=initial;lodash.intersection=intersection;lodash.invert=invert;lodash.invoke=invoke;lodash.keys=keys;lodash.keysIn=keysIn;lodash.map=map;lodash.mapValues=mapValues;lodash.matches=matches;lodash.matchesProperty=matchesProperty;lodash.memoize=memoize;lodash.merge=merge;lodash.mixin=mixin;lodash.negate=negate;lodash.omit=omit;lodash.once=once;lodash.pairs=pairs;lodash.partial=partial;lodash.partialRight=partialRight;lodash.partition=partition;lodash.pick=pick;lodash.pluck=pluck;lodash.property=property;lodash.propertyOf=propertyOf;lodash.pull=pull;lodash.pullAt=pullAt;lodash.range=range;lodash.rearg=rearg;lodash.reject=reject;lodash.remove=remove;lodash.rest=rest;lodash.restParam=restParam;lodash.shuffle=shuffle;lodash.slice=slice;lodash.sortBy=sortBy;lodash.sortByAll=sortByAll;lodash.sortByOrder=sortByOrder;lodash.spread=spread;lodash.take=take;lodash.takeRight=takeRight;lodash.takeRightWhile=takeRightWhile;lodash.takeWhile=takeWhile;lodash.tap=tap;lodash.throttle=throttle;lodash.thru=thru;lodash.times=times;lodash.toArray=toArray;lodash.toPlainObject=toPlainObject;lodash.transform=transform;lodash.union=union;lodash.uniq=uniq;lodash.unzip=unzip;lodash.values=values;lodash.valuesIn=valuesIn;lodash.where=where;lodash.without=without;lodash.wrap=wrap;lodash.xor=xor;lodash.zip=zip;lodash.zipObject=zipObject;lodash.backflow=flowRight;lodash.collect=map;lodash.compose=flowRight;lodash.each=forEach;lodash.eachRight=forEachRight;lodash.extend=assign;lodash.iteratee=callback;lodash.methods=functions;lodash.object=zipObject;lodash.select=filter;lodash.tail=rest;lodash.unique=uniq;mixin(lodash,lodash);lodash.add=add;lodash.attempt=attempt;lodash.camelCase=camelCase;lodash.capitalize=capitalize;lodash.clone=clone;lodash.cloneDeep=cloneDeep;lodash.deburr=deburr;lodash.endsWith=endsWith;lodash.escape=escape;lodash.escapeRegExp=escapeRegExp;lodash.every=every;lodash.find=find;lodash.findIndex=findIndex;lodash.findKey=findKey;lodash.findLast=findLast;lodash.findLastIndex=findLastIndex;lodash.findLastKey=findLastKey;lodash.findWhere=findWhere;lodash.first=first;lodash.has=has;lodash.identity=identity;lodash.includes=includes;lodash.indexOf=indexOf;lodash.inRange=inRange;lodash.isArguments=isArguments;lodash.isArray=isArray;lodash.isBoolean=isBoolean;lodash.isDate=isDate;lodash.isElement=isElement;lodash.isEmpty=isEmpty;lodash.isEqual=isEqual;lodash.isError=isError;lodash.isFinite=isFinite;lodash.isFunction=isFunction;lodash.isMatch=isMatch;lodash.isNaN=isNaN;lodash.isNative=isNative;lodash.isNull=isNull;lodash.isNumber=isNumber;lodash.isObject=isObject;lodash.isPlainObject=isPlainObject;lodash.isRegExp=isRegExp;lodash.isString=isString;lodash.isTypedArray=isTypedArray;lodash.isUndefined=isUndefined;lodash.kebabCase=kebabCase;lodash.last=last;lodash.lastIndexOf=lastIndexOf;lodash.max=max;lodash.min=min;lodash.noConflict=noConflict;lodash.noop=noop;lodash.now=now;lodash.pad=pad;lodash.padLeft=padLeft;lodash.padRight=padRight;lodash.parseInt=parseInt;lodash.random=random;lodash.reduce=reduce;lodash.reduceRight=reduceRight;lodash.repeat=repeat;lodash.result=result;lodash.runInContext=runInContext;lodash.size=size;lodash.snakeCase=snakeCase;lodash.some=some;lodash.sortedIndex=sortedIndex;lodash.sortedLastIndex=sortedLastIndex;lodash.startCase=startCase;lodash.startsWith=startsWith;lodash.sum=sum;lodash.template=template;lodash.trim=trim;lodash.trimLeft=trimLeft;lodash.trimRight=trimRight;lodash.trunc=trunc;lodash.unescape=unescape;lodash.uniqueId=uniqueId;lodash.words=words;lodash.all=every;lodash.any=some;lodash.contains=includes;lodash.detect=find;lodash.foldl=reduce;lodash.foldr=reduceRight;lodash.head=first;lodash.include=includes;lodash.inject=reduce;mixin(lodash,function(){var source={};baseForOwn(lodash,function(func,methodName){if(!lodash.prototype[methodName]){source[methodName]=func}});return source}(),false);lodash.sample=sample;lodash.prototype.sample=function(n){if(!this.__chain__&&n==null){return sample(this.value())}return this.thru(function(value){return sample(value,n)})};lodash.VERSION=VERSION;arrayEach(["bind","bindKey","curry","curryRight","partial","partialRight"],function(methodName){lodash[methodName].placeholder=lodash});arrayEach(["dropWhile","filter","map","takeWhile"],function(methodName,type){var isFilter=type!=LAZY_MAP_FLAG,isDropWhile=type==LAZY_DROP_WHILE_FLAG;LazyWrapper.prototype[methodName]=function(iteratee,thisArg){var filtered=this.__filtered__,result=filtered&&isDropWhile?new LazyWrapper(this):this.clone(),iteratees=result.__iteratees__||(result.__iteratees__=[]);iteratees.push({done:false,count:0,index:0,iteratee:getCallback(iteratee,thisArg,1),limit:-1,type:type});result.__filtered__=filtered||isFilter;return result}});arrayEach(["drop","take"],function(methodName,index){var whileName=methodName+"While";LazyWrapper.prototype[methodName]=function(n){var filtered=this.__filtered__,result=filtered&&!index?this.dropWhile():this.clone();n=n==null?1:nativeMax(floor(n)||0,0);if(filtered){if(index){result.__takeCount__=nativeMin(result.__takeCount__,n)}else{last(result.__iteratees__).limit=n}}else{var views=result.__views__||(result.__views__=[]);views.push({size:n,type:methodName+(result.__dir__<0?"Right":"")})}return result};LazyWrapper.prototype[methodName+"Right"]=function(n){return this.reverse()[methodName](n).reverse()};LazyWrapper.prototype[methodName+"RightWhile"]=function(predicate,thisArg){return this.reverse()[whileName](predicate,thisArg).reverse()}});arrayEach(["first","last"],function(methodName,index){var takeName="take"+(index?"Right":"");LazyWrapper.prototype[methodName]=function(){return this[takeName](1).value()[0]}});arrayEach(["initial","rest"],function(methodName,index){var dropName="drop"+(index?"":"Right");LazyWrapper.prototype[methodName]=function(){return this[dropName](1)}});arrayEach(["pluck","where"],function(methodName,index){var operationName=index?"filter":"map",createCallback=index?baseMatches:baseProperty;LazyWrapper.prototype[methodName]=function(value){return this[operationName](createCallback(value))}});LazyWrapper.prototype.compact=function(){return this.filter(identity)};LazyWrapper.prototype.reject=function(predicate,thisArg){predicate=getCallback(predicate,thisArg,1);return this.filter(function(value){return!predicate(value)})};LazyWrapper.prototype.slice=function(start,end){start=start==null?0:+start||0;var result=start<0?this.takeRight(-start):this.drop(start);if(typeof end!="undefined"){end=+end||0;result=end<0?result.dropRight(-end):result.take(end-start)}return result};LazyWrapper.prototype.toArray=function(){return this.drop(0)};baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(!lodashFunc){return}var checkIteratee=/^(?:filter|map|reject)|While$/.test(methodName),retUnwrapped=/^(?:first|last)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments,length=args.length,chainAll=this.__chain__,value=this.__wrapped__,isHybrid=!!this.__actions__.length,isLazy=value instanceof LazyWrapper,iteratee=args[0],useLazy=isLazy||isArray(value);if(useLazy&&checkIteratee&&typeof iteratee=="function"&&iteratee.length!=1){isLazy=useLazy=false}var onlyLazy=isLazy&&!isHybrid;if(retUnwrapped&&!chainAll){return onlyLazy?func.call(value):lodashFunc.call(lodash,this.value())}var interceptor=function(value){var otherArgs=[value];push.apply(otherArgs,args);return lodashFunc.apply(lodash,otherArgs)};if(useLazy){var wrapper=onlyLazy?value:new LazyWrapper(this),result=func.apply(wrapper,args);if(!retUnwrapped&&(isHybrid||result.__actions__)){var actions=result.__actions__||(result.__actions__=[]);actions.push({func:thru,args:[interceptor],thisArg:lodash})}return new LodashWrapper(result,chainAll)}return this.thru(interceptor)}});arrayEach(["concat","join","pop","push","replace","shift","sort","splice","split","unshift"],function(methodName){var func=(/^(?:replace|split)$/.test(methodName)?stringProto:arrayProto)[methodName],chainName=/^(?:push|sort|unshift)$/.test(methodName)?"tap":"thru",retUnwrapped=/^(?:join|pop|replace|shift)$/.test(methodName);lodash.prototype[methodName]=function(){var args=arguments;if(retUnwrapped&&!this.__chain__){return func.apply(this.value(),args)}return this[chainName](function(value){return func.apply(value,args)})}});baseForOwn(LazyWrapper.prototype,function(func,methodName){var lodashFunc=lodash[methodName];if(lodashFunc){var key=lodashFunc.name,names=realNames[key]||(realNames[key]=[]);names.push({name:methodName,func:lodashFunc})}});realNames[createHybridWrapper(null,BIND_KEY_FLAG).name]=[{name:"wrapper",func:null}];LazyWrapper.prototype.clone=lazyClone;LazyWrapper.prototype.reverse=lazyReverse;LazyWrapper.prototype.value=lazyValue;lodash.prototype.chain=wrapperChain;lodash.prototype.commit=wrapperCommit;lodash.prototype.plant=wrapperPlant;lodash.prototype.reverse=wrapperReverse;lodash.prototype.toString=wrapperToString;lodash.prototype.run=lodash.prototype.toJSON=lodash.prototype.valueOf=lodash.prototype.value=wrapperValue;lodash.prototype.collect=lodash.prototype.map;lodash.prototype.head=lodash.prototype.first;lodash.prototype.select=lodash.prototype.filter;lodash.prototype.tail=lodash.prototype.rest;return lodash}var _=runInContext();if(typeof define=="function"&&typeof define.amd=="object"&&define.amd){root._=_;define(function(){return _})}else if(freeExports&&freeModule){if(moduleExports){(freeModule.exports=_)._=_}else{freeExports._=_}}else{root._=_}}).call(this)}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{})},{}]},{},[]);var curry=require("ramda").curry;var _=require("lodash");var map=curry(function(f,xs){return xs.map(f)});var split=curry(function(what,x){return x.split(what)});var match=curry(function(what,x){return x.match(what)});var filter=curry(function(f,xs){return xs.filter(f)});var reduce=curry(function(f,a,xs){return xs.reduce(f,a)});var words=split(" ");var sentences=map(words);console.log(sentences(["yo","whats","up"]));var filterQs=filter(match(/q/i));console.log(filterQs(["queen","quick","up"]));var _keepHighest=function(x,y){return x>=y?x:y};var max=reduce(_keepHighest,0);console.log(max([30,10,18,31,2]));var slice=_.curry(function(start,end,xs){return xs.slice(start,end)});var take=slice(1,2);console.log(take(["1",2,"foo"])); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "requirebin-sketch", | |
"version": "1.0.0", | |
"dependencies": { | |
"ramda": "0.13.0", | |
"lodash": "3.6.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- contents of this file will be placed inside the <body> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- contents of this file will be placed inside the <head> --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment