fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
862 KiB

{"version":3,"sources":["utils.js"],"names":["_global","window","global","self","this","BI","prepares","apply","func","thisArg","args","length","call","arrayAggregator","array","setter","iteratee","accumulator","index","value","arrayEach","arrayEvery","predicate","arrayFilter","resIndex","result","arrayIncludes","baseIndexOf","arrayIncludesWith","comparator","arrayMap","Array","arrayPush","values","offset","arrayReduce","initAccum","arraySome","asciiToArray","string","split","baseFindKey","collection","eachFunc","key","baseFindIndex","fromIndex","fromRight","strictIndexOf","baseIsNaN","baseProperty","object","undefined","basePropertyOf","baseReduce","baseSortBy","comparer","sort","baseTimes","n","baseUnary","baseValues","props","cacheHas","cache","has","charsStartIndex","strSymbols","chrSymbols","charsEndIndex","countHolders","placeholder","getValue","hasUnicode","reHasUnicode","test","iteratorToArray","iterator","data","next","done","push","mapToArray","map","size","forEach","overArg","transform","arg","replaceHolders","PLACEHOLDER","safeGet","setToArray","set","stringSize","unicodeSize","asciiSize","stringToArray","unicodeToArray","reUnicode","lastIndex","match","lodash","isObjectLike","isArray","LazyWrapper","LodashWrapper","hasOwnProperty","wrapperClone","baseLodash","chainAll","__wrapped__","__actions__","__chain__","__index__","__values__","__dir__","__filtered__","__iteratees__","__takeCount__","MAX_ARRAY_LENGTH","__views__","lazyClone","copyArray","lazyReverse","clone","lazyValue","dir","isArr","isRight","arrLength","view","getView","start","end","iteratees","iterLength","takeCount","nativeMin","baseWrapperValue","outer","iterIndex","type","computed","LAZY_MAP_FLAG","LAZY_FILTER_FLAG","Hash","entries","clear","entry","hashClear","__data__","nativeCreate","hashDelete","hashGet","HASH_UNDEFINED","hashHas","hashSet","ListCache","listCacheClear","listCacheDelete","assocIndexOf","pop","splice","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","hash","Map","mapCacheDelete","getMapData","mapCacheGet","get","mapCacheHas","mapCacheSet","SetCache","add","setCacheAdd","setCacheHas","Stack","stackClear","stackDelete","stackGet","stackHas","stackSet","pairs","LARGE_ARRAY_SIZE","arrayLikeKeys","inherited","isArg","isArguments","isBuff","isBuffer","isType","isTypedArray","skipIndexes","String","isIndex","assignMergeValue","eq","baseAssignValue","assignValue","objValue","baseAggregator","baseEach","baseAssign","source","copyObject","keys","baseAssignIn","keysIn","defineProperty","configurable","enumerable","writable","baseAt","paths","skip","baseClamp","number","lower","upper","baseClone","bitmask","customizer","stack","isDeep","CLONE_DEEP_FLAG","isFlat","CLONE_FLAT_FLAG","isFull","CLONE_SYMBOLS_FLAG","isObject","initCloneArray","tag","getTag","isFunc","funcTag","genTag","cloneBuffer","objectTag","argsTag","initCloneObject","copySymbolsIn","copySymbols","cloneableTags","initCloneByTag","stacked","isSet","subValue","isMap","keysFunc","getAllKeysIn","getAllKeys","baseDelay","wait","TypeError","FUNC_ERROR_TEXT","setTimeout","baseDifference","includes","isCommon","valuesLength","valuesIndex","baseEvery","baseExtremum","current","isSymbol","baseFilter","baseFlatten","depth","isStrict","isFlattenable","baseForOwn","baseFor","baseForOwnRight","baseForRight","baseFunctions","isFunction","baseGet","path","castPath","toKey","baseGetAllKeys","symbolsFunc","baseGetTag","undefinedTag","nullTag","symToStringTag","Object","getRawTag","objectToString","baseGt","other","baseHas","baseHasIn","baseIntersection","arrays","othLength","othIndex","caches","maxLength","Infinity","seen","baseInverter","baseInvoke","parent","last","baseIsArguments","baseIsDate","dateTag","baseIsEqual","baseIsEqualDeep","equalFunc","objIsArr","othIsArr","objTag","arrayTag","othTag","objIsObj","othIsObj","isSameTag","equalArrays","equalByTag","COMPARE_PARTIAL_FLAG","objIsWrapped","othIsWrapped","objUnwrapped","othUnwrapped","equalObjects","baseIsMap","mapTag","baseIsMatch","matchData","noCustomizer","srcValue","COMPARE_UNORDERED_FLAG","baseIsNative","isMasked","pattern","reIsNative","reIsHostCtor","toSource","baseIsRegExp","regexpTag","baseIsSet","setTag","baseIsTypedArray","isLength","typedArrayTags","baseIteratee","identity","baseMatchesProperty","baseMatches","property","baseKeys","isPrototype","nativeKeys","baseKeysIn","nativeKeysIn","isProto","baseLt","baseMap","isArrayLike","getMatchData","matchesStrictComparable","isKey","isStrictComparable","hasIn","baseMerge","srcIndex","baseMergeDeep","newValue","mergeFunc","isTyped","isArrayLikeObject","cloneTypedArray","isPlainObject","toPlainObject","baseOrderBy","orders","criteria","compareMultiple","basePick","basePickBy","baseSet","basePropertyDeep","baseRandom","nativeFloor","nativeRandom","baseRange","step","nativeMax","nativeCeil","baseRest","setToString","overRest","nested","baseSlice","baseSome","baseToString","symbolToString","INFINITY","baseUniq","createSet","seenIndex","baseUnset","actions","action","baseZipObject","assignFunc","valsLength","castArrayLikeObject","stringToPath","toString","castSlice","buffer","slice","allocUnsafe","constructor","copy","cloneArrayBuffer","arrayBuffer","byteLength","Uint8Array","cloneDataView","dataView","byteOffset","cloneRegExp","regexp","reFlags","exec","cloneSymbol","symbol","symbolValueOf","typedArray","compareAscending","valIsDefined","valIsNull","valIsReflexive","valIsSymbol","othIsDefined","othIsNull","othIsReflexive","othIsSymbol","objCriteria","othCriteria","ordersLength","order","composeArgs","partials","holders","isCurried","argsIndex","argsLength","holdersLength","leftIndex","leftLength","rangeLength","isUncurried","composeArgsRight","holdersIndex","rightIndex","rightLength","isNew","getSymbols","getSymbolsIn","createAggregator","initializer","createAssigner","assigner","sources","guard","isIterateeCall","createBaseEach","iterable","createBaseFor","createBind","wrapper","fn","root","Ctor","isBind","arguments","WRAP_BIND_FLAG","createCtor","thisBinding","baseCreate","prototype","createCurry","arity","getHolder","createRecurry","createHybrid","createFind","findIndexFunc","partialsRight","holdersRight","argPos","ary","holdersCount","newHolders","isBindKey","reorder","isFlip","reverse","isAry","WRAP_ARY_FLAG","WRAP_BIND_KEY_FLAG","WRAP_CURRY_FLAG","WRAP_CURRY_RIGHT_FLAG","WRAP_FLIP_FLAG","createInverter","toIteratee","createPartial","createRange","toFinite","wrapFunc","isCurry","newHoldersRight","newPartials","newPartialsRight","WRAP_PARTIAL_FLAG","WRAP_PARTIAL_RIGHT_FLAG","WRAP_CURRY_BOUND_FLAG","newData","isLaziable","setData","setWrapToString","createWrap","toInteger","getData","mergeData","baseSetData","customDefaultsMerge","customOmitClone","isPartial","arrValue","othValue","compared","dataViewTag","arrayBufferTag","boolTag","numberTag","errorTag","name","message","stringTag","convert","symbolTag","objProps","objLength","othProps","skipCtor","objCtor","othCtor","flatRest","flatten","getFuncName","realNames","otherFunc","isKeyable","getNative","isOwn","unmasked","e","nativeObjectToString","transforms","getWrapDetails","reWrapDetails","reSplitDetails","hasPath","hasFunc","input","getPrototype","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","insertWrapDetails","details","join","replace","reWrapComment","spreadableSymbol","MAX_SAFE_INTEGER","reIsUint","reIsPlainProp","reIsDeepProp","funcName","maskSrcKey","proto","objectProto","memoizeCapped","memoize","MAX_MEMOIZE_SIZE","srcBitmask","newBitmask","isCombo","WRAP_REARG_FLAG","otherArgs","indexes","oldArray","reference","updateWrapDetails","shortOut","count","lastCalled","stamp","nativeNow","remaining","HOT_SPAN","HOT_COUNT","funcToString","wrapFlags","pair","compact","concat","drop","findIndex","findLastIndex","flattenDeep","head","indexOf","initial","nativeReverse","take","takeRight","uniq","uniqBy","unzip","group","zipObject","chain","tap","interceptor","thru","wrapperChain","wrapperCommit","wrapperNext","toArray","wrapperToIterator","wrapperPlant","previous","wrapperReverse","wrapped","wrapperValue","every","filter","reduce","reject","negate","isString","some","after","before","debounce","options","invokeFunc","time","lastArgs","lastThis","lastInvokeTime","leadingEdge","timerId","timerExpired","leading","remainingWait","timeSinceLastCall","lastCallTime","timeSinceLastInvoke","timeWaiting","maxing","maxWait","shouldInvoke","now","trailingEdge","trailing","cancel","clearTimeout","flush","debounced","isInvoking","toNumber","resolver","memoized","Cache","once","rest","throttle","cloneDeep","isBoolean","isEmpty","isEqual","isFinite","nativeIsFinite","asyncTag","proxyTag","isNaN","isNumber","isNull","objectCtorString","isUndefined","symIterator","sign","MAX_INTEGER","remainder","NAN","valueOf","reTrim","isBinary","reIsBinary","reIsOctal","freeParseInt","reIsBadHex","create","properties","findKey","findLastKey","defaultValue","omitBy","pickBy","prop","clamp","random","floating","temp","rand","freeParseFloat","escape","reHasUnescapedHtml","reUnescapedHtml","escapeHtmlChar","trim","chars","constant","matches","mixin","methodNames","methodName","noConflict","_","oldDash","noop","stubArray","stubFalse","uniqueId","prefix","id","idCounter","max","min","VERSION","LAZY_WHILE_FLAG","promiseTag","weakMapTag","RegExp","rePropName","reRegExpChar","reEscapeChar","rsAstralRange","rsComboMarksRange","reComboHalfMarksRange","rsComboSymbolsRange","rsComboRange","rsVarRange","rsAstral","rsCombo","rsFitz","rsModifier","rsNonAstral","rsRegional","rsSurrPair","rsZWJ","reOptMod","rsOptVar","rsOptJoin","rsSeq","rsSymbol","htmlEscapes","&","<",">","\"","'","parseFloat","parseInt","freeGlobal","freeSelf","Function","freeExports","exports","nodeType","freeModule","module","moduleExports","freeProcess","process","nodeUtil","binding","nodeIsDate","isDate","nodeIsMap","nodeIsRegExp","isRegExp","nodeIsSet","nodeIsTypedArray","arrayProto","funcProto","coreJsData","uid","IE_PROTO","Buffer","Symbol","getPrototypeOf","objectCreate","propertyIsEnumerable","isConcatSpreadable","toStringTag","Math","ceil","floor","nativeGetSymbols","getOwnPropertySymbols","nativeIsBuffer","Date","DataView","Promise","Set","WeakMap","metaMap","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","symbolProto","baseSetToString","ArrayBuffer","resolve","ctorString","charCodeAt","quote","subString","difference","intersection","mapped","union","without","zip","wrapperAt","countBy","find","groupBy","sortBy","bind","defer","delay","assignIn","defaults","propsIndex","propsLength","defaultsDeep","mergeWith","invert","invertBy","merge","omit","pick","range","extend","each","first","isFilter","getIteratee","takeName","dropName","findLast","invokeMap","dropRight","takeRightWhile","takeWhile","checkIteratee","isTaker","lodashFunc","retUnwrapped","isLazy","useLazy","isHybrid","isUnwrapped","onlyLazy","chainName","names","define","amd","MAX","MIN","EVENT_RESPONSE_TIME","zIndex_layer","zIndex_popover","zIndex_popup","zIndex_masker","zIndex_tip","emptyStr","emptyFn","empty","Key","48","49","50","51","52","53","54","55","56","57","65","66","67","68","69","70","71","72","73","74","75","76","77","78","79","80","81","82","83","84","85","86","87","88","89","90","96","97","98","99","100","101","102","103","104","105","106","107","109","110","111","KeyCode","BACKSPACE","COMMA","DELETE","DOWN","END","ENTER","ESCAPE","HOME","LEFT","NUMPAD_ADD","NUMPAD_DECIMAL","NUMPAD_DIVIDE","NUMPAD_ENTER","NUMPAD_MULTIPLY","NUMPAD_SUBTRACT","PAGE_DOWN","PAGE_UP","PERIOD","RIGHT","SPACE","TAB","UP","Status","SUCCESS","WRONG","START","WAITING","READY","RUNNING","OUTOFBOUNDS","NULL","Direction","Top","Bottom","Left","Right","Custom","Axis","Vertical","Horizontal","Selection","Default","None","Single","Multi","All","HorizontalAlign","Center","Stretch","VerticalAlign","Middle","StartOfWeek","pushArray","sArray","i","pushDistinct","obj","contains","pushDistinctArray","len","num","accAdd","arg1","arg2","r1","r2","m","c","abs","pow","cm","Number","sub","accSub","toFixed","mul","accMul","s1","s2","div","digitLength","eSplit","float2Fixed","dLen","times","num1","num2","others","_i","num1Changed","num2Changed","baseNum","leftValue","accDivide","startWith","str","startTag","substr","endWith","endTag","substring","getQuery","reg","r","unescape","appendQuery","paras","src","replaceAll","perfectStart","allIndexOf","location","loc","SECOND","MINUTE","HOUR","DAY","WEEK","getTimezone","date","getMonthDays","month","year","getFullYear","getMonth","_MD","getLastDateOfMonth","getDate","getDayOfYear","then","getWeekNumber","d","week","getDay","startOfWeek","middleDay","offsetWeekStartCount","offsetWeekMiddleCount","setDate","ms","setMonth","getQuarter","getOffsetDate","getTime","getHours","getMinutes","getSeconds","getOffsetQuarter","dt","day","monthDay","getQuarterStartMonth","quarterStartMonth","nowMonth","getQuarterStartDate","getQuarterEndDate","quarterEndMonth","getOffsetMonth","getWeekStartDate","w","_OFFSET","getWeekEndDate","print","y","yWith4number","wn","qr","s","hr","pm","ir","dy","sec","_SDN","_DN","_SMN","_MN","re","isKhtml","navigator","userAgent","par","a","tmp","Func","createDistinctName","idx","item","getGBWidth","getSearchResult","items","keyword","param","deepClone","t","text","py","toUpperCase","matched","stripEL","val","isNotNull","makeFirstPY","splitChar","pidx","beforeFunc","sFunc","__self","afterFunc","ret","traverse","context","_apply","_applyFunc","assert","v","is","Error","deepContains","warn","console","UUID","f","isWidget","widget","Widget","View","createWidgets","createWidget","createItems","innerAttr","outerAttr","makeArray","shift","el","packageItems","layouts","k","it","formatEL","trans2Element","widgets","wi","element","from","to","inverse","firstKey","res","any","lastKey","firstObject","lastObject","obj1","obj2","backEach","backAny","backEvery","backFindKey","backFind","remove","target","removeAt","string2Array","array2String","abc2Int","charAt","int2Abc","DIGITS","makeObject","makeArrayByArray","callee","isSorted","inherit","sb","sp","overrides","F","spp","superclass","init","initialized","freeze","isCapitalEqual","b","toLowerCase","isWidthOrHeight","isEmptyArray","arr","isNotEmptyArray","isEmptyObject","isNotEmptyObject","isEmptyString","isNotEmptyString","isWindow","deepExtend","isDeepMatch","attrs","deepIndexOf","deepRemove","deepWithout","deepUnique","deepDiff","used","nextTick","nextTickHandler","pending","copies","callbacks","timerFunc","p","MutationObserver","counter","observer","textNode","document","createTextNode","observe","characterData","setImmediate","queueNextTick","cb","_resolve","error","performance","webkitNow","radix","parseSafeInt","isNaturalNumber","isPositiveInteger","isNegativeInteger","isInteger","isNumeric","isFloat","isOdd","isEven","sum","average","toLocaleUpperCase","toLocaleLowerCase","isEndWithBlank","isLiteral","exp","literalValueRE","stripQuotes","camelize","character","hyphenate","encrypt","CRYPT_TYPE","AES","aesEncrypt","decrypt","aesDecrypt","leftPad","ch","format","isLeapYear","checkDateVoid","YY","MM","DD","minDate","maxDate","back","checkDateLegal","ar","MD","parseDateTime","fmt","today","yearlength","otherlength","j","search","timeZone","localTime","localOffset","getTimezoneOffset","utc","OB","config","_constructor","destroyed","_initProps","_init","_initRef","_defaultConfig","_initListeners","listeners","lis","eventName","ref","_purgeRef","_getEvents","events","on","fns","proxy","un","newFns","ifn","purgeListeners","fireEvent","destroy","isInvalidDate","_eFormat","eFormat","neg","magnitudeNeg","magnitude","log","integerLen","getInteger","precision","getPrecision","isValueCarry","isValueCarried","round","formatExponential","isAllZero","formatLeft","valueLeftLen","roundNum","_dealNumberPrecision","fright","_numberFormat","numMod","fp","fleft","tp","tleft","tright","paddingZero","right","_dealWithRight","leftPlus","left","_dealWithLeft","rll","numReg","orilen","newnum","combo","com","tll","newstr","lres","cjkEncode","newText","code","cjkDecode","rightIdx","subText","fromCharCode","eval","SPECIAL_TAGS","htmlEncode","htmlDecode","cjkEncodeDO","o","jsonEncode","useHasOwn","\b","\t","\n","\f","\r","\\","encodeString","encodeArray","l","__time__","jsonDecode","_hasDateInJson","json","jo","$","parseJSON","JSON","parse","getEncodeURL","urlTemplate","ori","encodeURIComponent","url","specialCharsMap","decodeURIComponent","reserveSpecialCharsMap","initialChar","encodeChar","contentFormat","cv","needTrim","date2Str","parseFmt","str2Date","compileJFmt","jfmt","hour","flagch","char","object2Number","object2Date","object2Time","moduleInjection","xtype","cls","constantInjection","modelInjection","model","storeInjection","store","serviceInjection","service","providerInjection","provider","configFunctions","configFn","providers","providerInstance","Plugin","configWidget","queue","globalAction","actionFn","points","point","pointFn","Modules","getModule","getAllModules","Constants","getConstant","callPoint","inst","types","bfns","aspect","afns","Models","getModel","mixins","stores","Stores","getStore","services","Services","getService","Providers","getProvider","$get","Actions","runAction","event","act","runGlobalAction","getContext","i18nStore","addI18n","i18n","i18nText","localeText","CryptoJS","C","C_lib","lib","Base","subtype","mixIn","$super","instance","propertyName","WordArray","words","sigBytes","encoder","Hex","stringify","wordArray","thisWords","thatWords","thisSigBytes","thatSigBytes","thatByte","nBytes","C_enc","enc","hexChars","bite","hexStr","hexStrLength","Latin1","latin1Chars","latin1Str","latin1StrLength","Utf8","utf8Str","BufferedBlockAlgorithm","reset","_data","_nDataBytes","_append","_process","doFlush","dataWords","dataSigBytes","blockSize","blockSizeBytes","nBlocksReady","_minBufferSize","nWordsReady","nBytesReady","_doProcessBlock","processedWords","Hasher","cfg","_doReset","update","messageUpdate","finalize","_doFinalize","_createHelper","hasher","_createHmacHelper","C_algo","HMAC","algo","Base64","_map","base64Chars","byte1","byte2","byte3","triplet","paddingChar","base64Str","base64StrLength","paddingIndex","bits1","bits2","FF","x","GG","HH","II","T","sin","MD5","_hash","M","offset_i","M_offset_i","H","M_offset_0","M_offset_1","M_offset_2","M_offset_3","M_offset_4","M_offset_5","M_offset_6","M_offset_7","M_offset_8","M_offset_9","M_offset_10","M_offset_11","M_offset_12","M_offset_13","M_offset_14","M_offset_15","nBitsTotal","nBitsLeft","nBitsTotalH","nBitsTotalL","H_i","HmacMD5","EvpKDF","keySize","iterations","compute","password","salt","derivedKey","derivedKeyWords","block","Cipher","createEncryptor","_ENC_XFORM_MODE","createDecryptor","_DEC_XFORM_MODE","xformMode","_xformMode","_key","dataUpdate","finalProcessedData","ivSize","selectCipherStrategy","PasswordBasedCipher","SerializableCipher","cipher","ciphertext","StreamCipher","finalProcessedBlocks","C_mode","mode","BlockCipherMode","iv","Encryptor","Decryptor","_cipher","_iv","CBC","xorBlock","_prevBlock","processBlock","encryptBlock","thisBlock","decryptBlock","C_pad","pad","Pkcs7","nPaddingBytes","paddingWord","paddingWords","padding","unpad","BlockCipher","modeCreator","_mode","CipherParams","cipherParams","formatter","C_format","OpenSSLFormatter","OpenSSL","openSSLStr","ciphertextWords","encryptor","cipherCfg","algorithm","_parse","plaintext","C_kdf","kdf","OpenSSLKdf","execute","derivedParams","ECB","SBOX","INV_SBOX","SUB_MIX_0","SUB_MIX_1","SUB_MIX_2","SUB_MIX_3","INV_SUB_MIX_0","INV_SUB_MIX_1","INV_SUB_MIX_2","INV_SUB_MIX_3","xi","sx","x2","x4","x8","RCON","keyWords","nRounds","_nRounds","ksRows","keySchedule","_keySchedule","ksRow","invKeySchedule","_invKeySchedule","invKsRow","_doCryptBlock","s0","s3","t0","t1","t2","t3","base64Cipher","decipher","advice","exist","dispatcher","beforeArr","rs","method","afterArr","ii","aspectArr","_index","_keyStr","_utf8_encode","utftext","_utf8_decode","c3","c2","encode","output","chr1","chr2","chr3","enc1","enc2","enc3","enc4","decode","_prefix","setUsername","username","localStorage","setItem","getUsername","getItem","_getKeyPrefix","_generateKey","removeItem","addCookie","expiresHours","cookieString","setTime","toUTCString","cookie","getCookie","deleteCookie","CellSizeAndPositionManager","cellCount","cellSizeGetter","estimatedCellSize","_cellSizeGetter","_cellCount","_estimatedCellSize","_cellSizeAndPositionData","_lastMeasuredIndex","configure","getCellCount","getEstimatedCellSize","getLastMeasuredIndex","getSizeAndPositionOfCell","lastMeasuredCellSizeAndPosition","getSizeAndPositionOfLastMeasuredCell","getTotalSize","getUpdatedOffsetForIndex","align","containerSize","currentOffset","targetIndex","datum","maxOffset","minOffset","idealOffset","totalSize","getVisibleCellRange","_findNearestCell","stop","resetCell","_binarySearch","high","low","middle","_exponentialSearch","interval","lastMeasuredIndex","ScalingCellSizeAndPositionManager","maxScrollSize","_cellSizeAndPositionManager","_maxScrollSize","getOffsetAdjustment","safeTotalSize","offsetPercentage","_getOffsetPercentage","_safeOffsetToOffset","_offsetToSafeOffset","_ChineseFirstPY","oMultiDiff","19969","19975","19988","20048","20056","20060","20094","20127","20167","20193","20250","20256","20282","20285","20291","20314","20315","20340","20375","20389","20391","20415","20446","20447","20504","20608","20854","20857","20911","20985","21032","21048","21049","21089","21119","21242","21273","21305","21306","21330","21333","21345","21378","21397","21414","21442","21477","21480","21484","21494","21505","21512","21523","21537","21542","21549","21571","21574","21588","21589","21618","21621","21632","21654","21679","21683","21710","21719","21734","21769","21780","21804","21834","21899","21903","21908","21939","21956","21964","21970","22003","22031","22040","22060","22066","22079","22129","22179","22237","22244","22280","22300","22313","22331","22343","22351","22395","22412","22484","22500","22534","22549","22561","22612","22771","22831","22841","22855","22865","23013","23081","23487","23558","23561","23586","23614","23615","23631","23646","23663","23673","23762","23769","23780","23884","24055","24113","24162","24191","24273","24324","24377","24378","24439","24554","24683","24694","24733","24925","25094","25100","25103","25153","25170","25179","25203","25240","25282","25303","25324","25341","25373","25375","25384","25457","25528","25530","25552","25774","25874","26044","26080","26292","26333","26355","26366","26397","26399","26415","26451","26526","26552","26561","26588","26597","26629","26638","26646","26653","26657","26727","26894","26937","26946","26999","27099","27449","27481","27542","27663","27748","27784","27788","27795","27812","27850","27852","27895","27898","27973","27981","27986","27994","28044","28065","28177","28267","28291","28337","28463","28548","28601","28689","28805","28820","28846","28952","28975","29100","29325","29575","29602","30010","30044","30058","30091","30111","30229","30427","30465","30631","30655","30684","30707","30729","30796","30917","31074","31085","31109","31181","31192","31293","31400","31584","31896","31909","31995","32321","32327","32418","32420","32421","32438","32473","32488","32521","32527","32562","32564","32735","32793","33071","33098","33100","33152","33261","33324","33333","33406","33426","33432","33445","33486","33493","33507","33540","33544","33564","33617","33632","33636","33637","33694","33705","33728","33882","34067","34074","34121","34255","34259","34425","34430","34485","34503","34532","34552","34558","34593","34660","34892","34928","34999","35048","35059","35098","35203","35265","35299","35782","35828","35830","35843","35895","35977","36158","36228","36426","36466","36710","36711","36767","36866","36951","37034","37063","37218","37325","38063","38079","38085","38107","38116","38123","38224","38241","38271","38415","38426","38461","38463","38466","38477","38518","38551","38585","38704","38739","38761","38808","39048","39049","39052","39076","39271","39534","39552","39584","39647","39730","39748","40109","40479","40516","40536","40583","40765","40784","40840","40863","_checkPYCh","uni","_mkPYRslt","ignoreMulti","arrRslt","multiLen","strlen","tmpStr","tmpArr","arrResult","defaultComparator","Heap","_items","_size","_comparator","_heapify","elt","lastElt","_sinkDown","_bubbleUp","peek","parentIndex","parentElt","leftChildIndex","rightChildIndex","swapIndex","leftChild","rightChild","LinkHashMap","scope","LRU","limit","tail","_keymap","put","removed","newer","older","returnEntry","node","Int32Array","xs","ceilLog2","PrefixIntervalTree","_half","_heap","getSize","sumUntil","sumTo","inclusiveEnd","begin","greatestLowerBound","leftSum","greatestStrictLowerBound","leastUpperBound","leastStrictUpperBound","uniform","initialValue","Queue","capacity","getElementByIndex","unshift","fromArray","Section","height","width","_indexMap","_indices","addCellIndex","getCellIndices","SECTION_SIZE","SectionManager","sectionSize","_sectionSize","_cellMetadata","_sections","indices","getSections","section","getCellMetadata","sectionXStart","sectionXStop","sectionYStart","sectionYStop","sections","sectionX","sectionY","getTotalSectionCount","registerCell","cellMetadatum","Tree","Node","addNode","newNode","addChild","isRoot","getRoot","initTree","nodes","children","child","_toJSON","getChildren","toJSON","_toJSONWithNode","toJSONWithNode","_traverse","callback","_recursion","route","recursion","inOrderTraverse","_inOrderTraverse","getLeft","getRight","nrInOrderTraverse","preOrderTraverse","_preOrderTraverse","nrPreOrderTraverse","postOrderTraverse","_postOrderTraverse","nrPostOrderTraverse","preNode","isLeaf","getChildrenLength","getFirstChild","getLastChild","setLeft","setRight","setParent","getParent","getChild","getChildIndex","removeChild","removeChildByIndex","behind","removeAllChilds","cur","equals","transformToArrayFormat","pId","newNodes","arrayFormat","transformToTreeFormat","sNodes","tmpMap","treeFormat","traversal","Vector","cross","sqrt","Region","h","isIntersects","isPointInside","vector1","vector2","vector3","getPosition","pos","BI-Multi_Date_Quarter_End","BI-Multi_Date_Month_Begin","BI-Multi_Date_YMD","BI-Custom_Color","BI-Numerical_Interval_Input_Data","BI-Please_Input_Natural_Number","BI-No_More_Data","BI-Basic_Altogether","BI-Basic_Sunday","BI-Widget_Background_Colour","BI-Color_Picker_Error_Text","BI-Multi_Date_Month","BI-No_Selected_Item","BI-Multi_Date_Year_Begin","BI-Quarter_1","BI-Quarter_2","BI-Quarter_3","BI-Quarter_4","BI-Multi_Date_Year_Next","BI-Multi_Date_Month_Prev","BI-Month_Trigger_Error_Text","BI-Less_And_Equal","BI-Year_Trigger_Invalid_Text","BI-Multi_Date_Week_Next","BI-Font_Size","BI-Basic_Total","BI-Already_Selected","BI-Formula_Insert","BI-Select_All","BI-Basic_Tuesday","BI-Multi_Date_Month_End","BI-Load_More","BI-Basic_September","BI-Current_Is_Last_Page","BI-Basic_Auto","BI-Basic_Count","BI-Basic_Value","BI-Basic_Unrestricted","BI-Quarter_Trigger_Error_Text","BI-Basic_More","BI-Basic_Wednesday","BI-Basic_Bold","BI-Basic_Simple_Saturday","BI-Multi_Date_Month_Next","BI-Basic_March","BI-Current_Is_First_Page","BI-Basic_Thursday","BI-Basic_Prompt","BI-Multi_Date_Today","BI-Multi_Date_Quarter_Prev","BI-Row_Header","BI-Date_Trigger_Error_Text","BI-Basic_Cancel","BI-Basic_January","BI-Basic_June","BI-Basic_July","BI-Basic_April","BI-Multi_Date_Quarter_Begin","BI-Multi_Date_Week","BI-Click_Blank_To_Select","BI-Basic_August","BI-Word_Align_Left","BI-Basic_November","BI-Font_Colour","BI-Multi_Date_Day_Prev","BI-Select_Part","BI-Multi_Date_Day_Next","BI-Less_Than","BI-Basic_February","BI-Multi_Date_Year","BI-Number_Index","BI-Multi_Date_Week_Prev","BI-Next_Page","BI-Right_Page","BI-Numerical_Interval_Signal_Value","BI-Basic_December","BI-Basic_Saturday","BI-Basic_Simple_Wednesday","BI-Multi_Date_Quarter_Next","BI-Basic_October","BI-Basic_Simple_Friday","BI-Basic_Save","BI-Numerical_Interval_Number_Value","BI-Previous_Page","BI-No_Select","BI-Basic_Clears","BI-Created_By_Me","BI-Basic_Simple_Tuesday","BI-Word_Align_Right","BI-Summary_Values","BI-Basic_Clear","BI-Upload_File_Size_Error","BI-Up_Page","BI-Basic_Simple_Sunday","BI-Multi_Date_Relative_Current_Time","BI-Selected_Data","BI-Multi_Date_Quarter","BI-Check_Selected","BI-Basic_Search","BI-Basic_May","BI-Continue_Select","BI-Please_Input_Positive_Integer","BI-Upload_File_Type_Error","BI-Upload_File_Error","BI-Basic_Friday","BI-Down_Page","BI-Basic_Monday","BI-Left_Page","BI-Transparent_Color","BI-Basic_Simple_Monday","BI-Multi_Date_Year_End","BI-Time_Interval_Error_Text","BI-Basic_Time","BI-Basic_OK","BI-Basic_Sure","BI-Basic_Simple_Thursday","BI-Multi_Date_Year_Prev","BI-Tiao_Data","BI-Basic_Italic","BI-Basic_Dynamic_Title","BI-Basic_Year","BI-Basic_Single_Quarter","BI-Basic_Month","BI-Basic_Week","BI-Basic_Day","BI-Basic_Work_Day","BI-Basic_Front","BI-Basic_Behind","BI-Basic_Empty","BI-Basic_Month_End","BI-Basic_Month_Begin","BI-Basic_Year_End","BI-Basic_Year_Begin","BI-Basic_Quarter_End","BI-Basic_Quarter_Begin","BI-Basic_Week_End","BI-Basic_Week_Begin","BI-Basic_Current_Day","BI-Basic_Begin_Start","BI-Basic_End_Stop","BI-Basic_Current_Year","BI-Basic_Year_Fen","BI-Basic_Current_Month","BI-Basic_Current_Quarter","BI-Basic_Year_Month","BI-Basic_Year_Quarter","BI-Basic_Input_Can_Not_Null","BI-Basic_Date_Time_Error_Text","BI-Basic_Input_From_To_Number","BI-Basic_Or","BI-Basic_And","BI-Conf_Add_Formula","BI-Conf_Add_Condition","BI-Conf_Formula_And","BI-Conf_Formula_Or","BI-Conf_Condition_And","BI-Conf_Condition_Or","BI-Microsoft_YaHei","BI-Apple_Light","BI-Font_Family","BI-Basic_Please_Input_Content","BI-Word_Align_Center","BI-Basic_Please_Enter_Number_Between","BI-More_Than","BI-More_And_Equal","BI-Please_Enter_SQL","BI-Basic_Click_To_Add_Text","BI-Basic_Please_Select","BI-Basic_Font_Color","BI-Basic_Background_Color","BI-Basic_Underline","BI-Basic_Param_Month","BI-Basic_Param_Day","BI-Basic_Param_Quarter","BI-Basic_Param_Week_Count","BI-Basic_Param_Hour","BI-Basic_Param_Minute","BI-Basic_Param_Second","BI-Basic_Param_Year","BI-Basic_Date_Day","BI-Basic_Hour_Sin","BI-Basic_Seconds","BI-Basic_Minute","BI-Basic_Wan","BI-Basic_Million","BI-Basic_Billion","BI-Basic_Quarter","BI-Basic_No_Select","BI-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ACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,IACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,KACPC,MAAO,MACPC,MAAO,KACPC,MAAO,KACPC,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AO,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,GAAI,IAG3D9jC,GAAG2zB,KAAKsS,SAAW,qBAMnB,WACI,GAAInT,WACAktD,MAAO,CAEXhgF,IAAGigF,YACC9T,IAAK,SAAUrqD,KAAMne,OACjB,GAAI3D,GAAG0oC,UAAU5V,OAAOhR,OACpB,KAAM,IAAI4nB,OAAM,mCAEpB5W,QAAOhR,MAAQne,OAGnB8G,IAAK,SAAUqX,MACX,MAAOgR,QAAOhR,WAQ1B,WACI,GAAIo+D,WACJlgF,IAAGmgF,aACCD,QAASA,QACT/T,IAAK,SAAUrqD,KAAMs+D,QACjBF,QAAQp+D,MAAQs+D,QAGpBC,IAAK,WAGD,IAAK,GAFDhgF,MAAOqB,MAAM2c,UAAUvE,MAAMvZ,KAAKyd,UAAW,GAC7C/D,KAAOimE,QACF3gD,EAAI,EAAGA,EAAIl/B,KAAKC,OAAQi/B,IAC7BtlB,KAAOA,MAAQA,KAAK5Z,KAAKk/B,GAE7B,OAAOtlB,OAGXxP,IAAK,WACD,MAAOzK,IAAGkoC,UAAUnoC,KAAKsgF,IAAIngF,MAAMH,KAAMie,aAG7CquB,OAAQ,SAAU9pC,WACP29E,SAAQ39E,UAGtBvC,GAAGsgF","file":"utils.min.js","sourcesContent":["/**\r\n * Created by richie on 15/7/8.\r\n */\r\n/**\r\n * 初始化BI对象\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (_global.BI == null) {\r\n _global.BI = {prepares: []};\r\n}\r\nif(_global.BI.prepares == null) {\r\n _global.BI.prepares = [];\r\n}/**\r\n * @license\r\n * Lodash (Custom Build) <https://lodash.com/>\r\n * Build: `lodash core plus=\"debounce,throttle,get,set,findIndex,findLastIndex,findKey,findLastKey,isArrayLike,invert,invertBy,uniq,uniqBy,omit,omitBy,zip,unzip,rest,range,random,reject,intersection,drop,countBy,union,zipObject,initial,cloneDeep,clamp,isPlainObject,take,takeRight,without,difference,defaultsDeep,trim,merge,groupBy,uniqBy,before,after\"`\r\n * Copyright JS Foundation and other contributors <https://js.foundation/>\r\n * Released under MIT license <https://lodash.com/license>\r\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\r\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\r\n */\r\n;(function() {\r\n\r\n /** Used as a safe reference for `undefined` in pre-ES5 environments. */\r\n var undefined;\r\n\r\n /** Used as the semantic version number. */\r\n var VERSION = '4.17.5';\r\n\r\n /** Used as the size to enable large array optimizations. */\r\n var LARGE_ARRAY_SIZE = 200;\r\n\r\n /** Error message constants. */\r\n var FUNC_ERROR_TEXT = 'Expected a function';\r\n\r\n /** Used to stand-in for `undefined` hash values. */\r\n var HASH_UNDEFINED = '__lodash_hash_undefined__';\r\n\r\n /** Used as the maximum memoize cache size. */\r\n var MAX_MEMOIZE_SIZE = 500;\r\n\r\n /** Used as the internal argument placeholder. */\r\n var PLACEHOLDER = '__lodash_placeholder__';\r\n\r\n /** Used to compose bitmasks for cloning. */\r\n var CLONE_DEEP_FLAG = 1,\r\n CLONE_FLAT_FLAG = 2,\r\n CLONE_SYMBOLS_FLAG = 4;\r\n\r\n /** Used to compose bitmasks for value comparisons. */\r\n var COMPARE_PARTIAL_FLAG = 1,\r\n COMPARE_UNORDERED_FLAG = 2;\r\n\r\n /** Used to compose bitmasks for function metadata. */\r\n var WRAP_BIND_FLAG = 1,\r\n WRAP_BIND_KEY_FLAG = 2,\r\n WRAP_CURRY_BOUND_FLAG = 4,\r\n WRAP_CURRY_FLAG = 8,\r\n WRAP_CURRY_RIGHT_FLAG = 16,\r\n WRAP_PARTIAL_FLAG = 32,\r\n WRAP_PARTIAL_RIGHT_FLAG = 64,\r\n WRAP_ARY_FLAG = 128,\r\n WRAP_REARG_FLAG = 256,\r\n WRAP_FLIP_FLAG = 512;\r\n\r\n /** Used to detect hot functions by number of calls within a span of milliseconds. */\r\n var HOT_COUNT = 800,\r\n HOT_SPAN = 16;\r\n\r\n /** Used to indicate the type of lazy iteratees. */\r\n var LAZY_FILTER_FLAG = 1,\r\n LAZY_MAP_FLAG = 2,\r\n LAZY_WHILE_FLAG = 3;\r\n\r\n /** Used as references for various `Number` constants. */\r\n var INFINITY = 1 / 0,\r\n MAX_SAFE_INTEGER = 9007199254740991,\r\n MAX_INTEGER = 1.7976931348623157e+308,\r\n NAN = 0 / 0;\r\n\r\n /** Used as references for the maximum length and index of an array. */\r\n var MAX_ARRAY_LENGTH = 4294967295;\r\n\r\n /** Used to associate wrap methods with their bit flags. */\r\n var wrapFlags = [\r\n ['ary', WRAP_ARY_FLAG],\r\n ['bind', WRAP_BIND_FLAG],\r\n ['bindKey', WRAP_BIND_KEY_FLAG],\r\n ['curry', WRAP_CURRY_FLAG],\r\n ['curryRight', WRAP_CURRY_RIGHT_FLAG],\r\n ['flip', WRAP_FLIP_FLAG],\r\n ['partial', WRAP_PARTIAL_FLAG],\r\n ['partialRight', WRAP_PARTIAL_RIGHT_FLAG],\r\n ['rearg', WRAP_REARG_FLAG]\r\n ];\r\n\r\n /** `Object#toString` result references. */\r\n var argsTag = '[object Arguments]',\r\n arrayTag = '[object Array]',\r\n asyncTag = '[object AsyncFunction]',\r\n boolTag = '[object Boolean]',\r\n dateTag = '[object Date]',\r\n errorTag = '[object Error]',\r\n funcTag = '[object Function]',\r\n genTag = '[object GeneratorFunction]',\r\n mapTag = '[object Map]',\r\n numberTag = '[object Number]',\r\n nullTag = '[object Null]',\r\n objectTag = '[object Object]',\r\n promiseTag = '[object Promise]',\r\n proxyTag = '[object Proxy]',\r\n regexpTag = '[object RegExp]',\r\n setTag = '[object Set]',\r\n stringTag = '[object String]',\r\n symbolTag = '[object Symbol]',\r\n undefinedTag = '[object Undefined]',\r\n weakMapTag = '[object WeakMap]';\r\n\r\n var arrayBufferTag = '[object ArrayBuffer]',\r\n dataViewTag = '[object DataView]',\r\n float32Tag = '[object Float32Array]',\r\n float64Tag = '[object Float64Array]',\r\n int8Tag = '[object Int8Array]',\r\n int16Tag = '[object Int16Array]',\r\n int32Tag = '[object Int32Array]',\r\n uint8Tag = '[object Uint8Array]',\r\n uint8ClampedTag = '[object Uint8ClampedArray]',\r\n uint16Tag = '[object Uint16Array]',\r\n uint32Tag = '[object Uint32Array]';\r\n\r\n /** Used to match HTML entities and HTML characters. */\r\n var reUnescapedHtml = /[&<>\"']/g,\r\n reHasUnescapedHtml = RegExp(reUnescapedHtml.source);\r\n\r\n /** Used to match property names within property paths. */\r\n var reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\r\n reIsPlainProp = /^\\w*$/,\r\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\r\n\r\n /**\r\n * Used to match `RegExp`\r\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\r\n */\r\n var reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\r\n\r\n /** Used to match leading and trailing whitespace. */\r\n var reTrim = /^\\s+|\\s+$/g;\r\n\r\n /** Used to match wrap detail comments. */\r\n var reWrapComment = /\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,\r\n reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\r\n reSplitDetails = /,? & /;\r\n\r\n /** Used to match backslashes in property paths. */\r\n var reEscapeChar = /\\\\(\\\\)?/g;\r\n\r\n /** Used to match `RegExp` flags from their coerced string values. */\r\n var reFlags = /\\w*$/;\r\n\r\n /** Used to detect bad signed hexadecimal string values. */\r\n var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\r\n\r\n /** Used to detect binary string values. */\r\n var reIsBinary = /^0b[01]+$/i;\r\n\r\n /** Used to detect host constructors (Safari). */\r\n var reIsHostCtor = /^\\[object .+?Constructor\\]$/;\r\n\r\n /** Used to detect octal string values. */\r\n var reIsOctal = /^0o[0-7]+$/i;\r\n\r\n /** Used to detect unsigned integer values. */\r\n var reIsUint = /^(?:0|[1-9]\\d*)$/;\r\n\r\n /** Used to compose unicode character classes. */\r\n var rsAstralRange = '\\\\ud800-\\\\udfff',\r\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\r\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\r\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\r\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\r\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\r\n\r\n /** Used to compose unicode capture groups. */\r\n var rsAstral = '[' + rsAstralRange + ']',\r\n rsCombo = '[' + rsComboRange + ']',\r\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\r\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\r\n rsNonAstral = '[^' + rsAstralRange + ']',\r\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\r\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\r\n rsZWJ = '\\\\u200d';\r\n\r\n /** Used to compose unicode regexes. */\r\n var reOptMod = rsModifier + '?',\r\n rsOptVar = '[' + rsVarRange + ']?',\r\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\r\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\r\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\r\n\r\n /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\r\n var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\r\n\r\n /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\r\n var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\r\n\r\n /** Used to identify `toStringTag` values of typed arrays. */\r\n var typedArrayTags = {};\r\n typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r\n typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r\n typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r\n typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r\n typedArrayTags[uint32Tag] = true;\r\n typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r\n typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r\n typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\r\n typedArrayTags[errorTag] = typedArrayTags[funcTag] =\r\n typedArrayTags[mapTag] = typedArrayTags[numberTag] =\r\n typedArrayTags[objectTag] = typedArrayTags[regexpTag] =\r\n typedArrayTags[setTag] = typedArrayTags[stringTag] =\r\n typedArrayTags[weakMapTag] = false;\r\n\r\n /** Used to identify `toStringTag` values supported by `_.clone`. */\r\n var cloneableTags = {};\r\n cloneableTags[argsTag] = cloneableTags[arrayTag] =\r\n cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\r\n cloneableTags[boolTag] = cloneableTags[dateTag] =\r\n cloneableTags[float32Tag] = cloneableTags[float64Tag] =\r\n cloneableTags[int8Tag] = cloneableTags[int16Tag] =\r\n cloneableTags[int32Tag] = cloneableTags[mapTag] =\r\n cloneableTags[numberTag] = cloneableTags[objectTag] =\r\n cloneableTags[regexpTag] = cloneableTags[setTag] =\r\n cloneableTags[stringTag] = cloneableTags[symbolTag] =\r\n cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r\n cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r\n cloneableTags[errorTag] = cloneableTags[funcTag] =\r\n cloneableTags[weakMapTag] = false;\r\n\r\n /** Used to map characters to HTML entities. */\r\n var htmlEscapes = {\r\n '&': '&amp;',\r\n '<': '&lt;',\r\n '>': '&gt;',\r\n '\"': '&quot;',\r\n \"'\": '&#39;'\r\n };\r\n\r\n /** Built-in method references without a dependency on `root`. */\r\n var freeParseFloat = parseFloat,\r\n freeParseInt = parseInt;\r\n\r\n /** Detect free variable `global` from Node.js. */\r\n var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\r\n\r\n /** Detect free variable `self`. */\r\n var freeSelf = typeof self == 'object' && self && self.Object === Object && self;\r\n\r\n /** Used as a reference to the global object. */\r\n var root = freeGlobal || freeSelf || Function('return this')();\r\n\r\n /** Detect free variable `exports`. */\r\n var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\r\n\r\n /** Detect free variable `module`. */\r\n var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\r\n\r\n /** Detect the popular CommonJS extension `module.exports`. */\r\n var moduleExports = freeModule && freeModule.exports === freeExports;\r\n\r\n /** Detect free variable `process` from Node.js. */\r\n var freeProcess = moduleExports && freeGlobal.process;\r\n\r\n /** Used to access faster Node.js helpers. */\r\n var nodeUtil = (function() {\r\n try {\r\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\r\n } catch (e) {}\r\n }());\r\n\r\n /* Node.js helper references. */\r\n var nodeIsDate = nodeUtil && nodeUtil.isDate,\r\n nodeIsMap = nodeUtil && nodeUtil.isMap,\r\n nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,\r\n nodeIsSet = nodeUtil && nodeUtil.isSet,\r\n nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /**\r\n * A faster alternative to `Function#apply`, this function invokes `func`\r\n * with the `this` binding of `thisArg` and the arguments of `args`.\r\n *\r\n * @private\r\n * @param {Function} func The function to invoke.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} args The arguments to invoke `func` with.\r\n * @returns {*} Returns the result of `func`.\r\n */\r\n function apply(func, thisArg, args) {\r\n switch (args.length) {\r\n case 0: return func.call(thisArg);\r\n case 1: return func.call(thisArg, args[0]);\r\n case 2: return func.call(thisArg, args[0], args[1]);\r\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\r\n }\r\n return func.apply(thisArg, args);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseAggregator` for arrays.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function arrayAggregator(array, setter, iteratee, accumulator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n setter(accumulator, value, iteratee(value), array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.forEach` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayEach(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (iteratee(array[index], index, array) === false) {\r\n break;\r\n }\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.every` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n */\r\n function arrayEvery(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (!predicate(array[index], index, array)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.filter` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function arrayFilter(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (predicate(value, index, array)) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.includes` for arrays without support for\r\n * specifying an index to search from.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludes(array, value) {\r\n var length = array == null ? 0 : array.length;\r\n return !!length && baseIndexOf(array, value, 0) > -1;\r\n }\r\n\r\n /**\r\n * This function is like `arrayIncludes` except that it accepts a comparator.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to inspect.\r\n * @param {*} target The value to search for.\r\n * @param {Function} comparator The comparator invoked per element.\r\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\r\n */\r\n function arrayIncludesWith(array, value, comparator) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (comparator(value, array[index])) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.map` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function arrayMap(array, iteratee) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n result = Array(length);\r\n\r\n while (++index < length) {\r\n result[index] = iteratee(array[index], index, array);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Appends the elements of `values` to `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {Array} values The values to append.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function arrayPush(array, values) {\r\n var index = -1,\r\n length = values.length,\r\n offset = array.length;\r\n\r\n while (++index < length) {\r\n array[offset + index] = values[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.reduce` for arrays without support for\r\n * iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @param {boolean} [initAccum] Specify using the first element of `array` as\r\n * the initial value.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function arrayReduce(array, iteratee, accumulator, initAccum) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n if (initAccum && length) {\r\n accumulator = array[++index];\r\n }\r\n while (++index < length) {\r\n accumulator = iteratee(accumulator, array[index], index, array);\r\n }\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.some` for arrays without support for iteratee\r\n * shorthands.\r\n *\r\n * @private\r\n * @param {Array} [array] The array to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function arraySome(array, predicate) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length;\r\n\r\n while (++index < length) {\r\n if (predicate(array[index], index, array)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Gets the size of an ASCII `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n var asciiSize = baseProperty('length');\r\n\r\n /**\r\n * Converts an ASCII `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function asciiToArray(string) {\r\n return string.split('');\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.findKey` and `_.findLastKey`,\r\n * without support for iteratee shorthands, which iterates over `collection`\r\n * using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the found element or its key, else `undefined`.\r\n */\r\n function baseFindKey(collection, predicate, eachFunc) {\r\n var result;\r\n eachFunc(collection, function(value, key, collection) {\r\n if (predicate(value, key, collection)) {\r\n result = key;\r\n return false;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\r\n * support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @param {number} fromIndex The index to search from.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseFindIndex(array, predicate, fromIndex, fromRight) {\r\n var length = array.length,\r\n index = fromIndex + (fromRight ? 1 : -1);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (predicate(array[index], index, array)) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function baseIndexOf(array, value, fromIndex) {\r\n return value === value\r\n ? strictIndexOf(array, value, fromIndex)\r\n : baseFindIndex(array, baseIsNaN, fromIndex);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNaN` without support for number objects.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n */\r\n function baseIsNaN(value) {\r\n return value !== value;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.property` without support for deep paths.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function baseProperty(key) {\r\n return function(object) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.propertyOf` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyOf(object) {\r\n return function(key) {\r\n return object == null ? undefined : object[key];\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.reduce` and `_.reduceRight`, without support\r\n * for iteratee shorthands, which iterates over `collection` using `eachFunc`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {*} accumulator The initial value.\r\n * @param {boolean} initAccum Specify using the first or last element of\r\n * `collection` as the initial value.\r\n * @param {Function} eachFunc The function to iterate over `collection`.\r\n * @returns {*} Returns the accumulated value.\r\n */\r\n function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {\r\n eachFunc(collection, function(value, index, collection) {\r\n accumulator = initAccum\r\n ? (initAccum = false, value)\r\n : iteratee(accumulator, value, index, collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.sortBy` which uses `comparer` to define the\r\n * sort order of `array` and replaces criteria objects with their corresponding\r\n * values.\r\n *\r\n * @private\r\n * @param {Array} array The array to sort.\r\n * @param {Function} comparer The function to define sort order.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function baseSortBy(array, comparer) {\r\n var length = array.length;\r\n\r\n array.sort(comparer);\r\n while (length--) {\r\n array[length] = array[length].value;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.times` without support for iteratee shorthands\r\n * or max array length checks.\r\n *\r\n * @private\r\n * @param {number} n The number of times to invoke `iteratee`.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the array of results.\r\n */\r\n function baseTimes(n, iteratee) {\r\n var index = -1,\r\n result = Array(n);\r\n\r\n while (++index < n) {\r\n result[index] = iteratee(index);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unary` without support for storing metadata.\r\n *\r\n * @private\r\n * @param {Function} func The function to cap arguments for.\r\n * @returns {Function} Returns the new capped function.\r\n */\r\n function baseUnary(func) {\r\n return function(value) {\r\n return func(value);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.values` and `_.valuesIn` which creates an\r\n * array of `object` property values corresponding to the property names\r\n * of `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} props The property names to get values for.\r\n * @returns {Object} Returns the array of property values.\r\n */\r\n function baseValues(object, props) {\r\n return arrayMap(props, function(key) {\r\n return object[key];\r\n });\r\n }\r\n\r\n /**\r\n * Checks if a `cache` value for `key` exists.\r\n *\r\n * @private\r\n * @param {Object} cache The cache to query.\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function cacheHas(cache, key) {\r\n return cache.has(key);\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the first unmatched string symbol.\r\n */\r\n function charsStartIndex(strSymbols, chrSymbols) {\r\n var index = -1,\r\n length = strSymbols.length;\r\n\r\n while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol\r\n * that is not found in the character symbols.\r\n *\r\n * @private\r\n * @param {Array} strSymbols The string symbols to inspect.\r\n * @param {Array} chrSymbols The character symbols to find.\r\n * @returns {number} Returns the index of the last unmatched string symbol.\r\n */\r\n function charsEndIndex(strSymbols, chrSymbols) {\r\n var index = strSymbols.length;\r\n\r\n while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}\r\n return index;\r\n }\r\n\r\n /**\r\n * Gets the number of `placeholder` occurrences in `array`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} placeholder The placeholder to search for.\r\n * @returns {number} Returns the placeholder count.\r\n */\r\n function countHolders(array, placeholder) {\r\n var length = array.length,\r\n result = 0;\r\n\r\n while (length--) {\r\n if (array[length] === placeholder) {\r\n ++result;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Used by `_.escape` to convert characters to HTML entities.\r\n *\r\n * @private\r\n * @param {string} chr The matched character to escape.\r\n * @returns {string} Returns the escaped character.\r\n */\r\n var escapeHtmlChar = basePropertyOf(htmlEscapes);\r\n\r\n /**\r\n * Gets the value at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function getValue(object, key) {\r\n return object == null ? undefined : object[key];\r\n }\r\n\r\n /**\r\n * Checks if `string` contains Unicode symbols.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\r\n */\r\n function hasUnicode(string) {\r\n return reHasUnicode.test(string);\r\n }\r\n\r\n /**\r\n * Converts `iterator` to an array.\r\n *\r\n * @private\r\n * @param {Object} iterator The iterator to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function iteratorToArray(iterator) {\r\n var data,\r\n result = [];\r\n\r\n while (!(data = iterator.next()).done) {\r\n result.push(data.value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `map` to its key-value pairs.\r\n *\r\n * @private\r\n * @param {Object} map The map to convert.\r\n * @returns {Array} Returns the key-value pairs.\r\n */\r\n function mapToArray(map) {\r\n var index = -1,\r\n result = Array(map.size);\r\n\r\n map.forEach(function(value, key) {\r\n result[++index] = [key, value];\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a unary function that invokes `func` with its argument transformed.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {Function} transform The argument transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overArg(func, transform) {\r\n return function(arg) {\r\n return func(transform(arg));\r\n };\r\n }\r\n\r\n /**\r\n * Replaces all `placeholder` elements in `array` with an internal placeholder\r\n * and returns an array of their indexes.\r\n *\r\n * @private\r\n * @param {Array} array The array to modify.\r\n * @param {*} placeholder The placeholder to replace.\r\n * @returns {Array} Returns the new array of placeholder indexes.\r\n */\r\n function replaceHolders(array, placeholder) {\r\n var index = -1,\r\n length = array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value === placeholder || value === PLACEHOLDER) {\r\n array[index] = PLACEHOLDER;\r\n result[resIndex++] = index;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the value at `key`, unless `key` is \"__proto__\".\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the property to get.\r\n * @returns {*} Returns the property value.\r\n */\r\n function safeGet(object, key) {\r\n return key == '__proto__'\r\n ? undefined\r\n : object[key];\r\n }\r\n\r\n /**\r\n * Converts `set` to an array of its values.\r\n *\r\n * @private\r\n * @param {Object} set The set to convert.\r\n * @returns {Array} Returns the values.\r\n */\r\n function setToArray(set) {\r\n var index = -1,\r\n result = Array(set.size);\r\n\r\n set.forEach(function(value) {\r\n result[++index] = value;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `_.indexOf` which performs strict equality\r\n * comparisons of values, i.e. `===`.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} fromIndex The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function strictIndexOf(array, value, fromIndex) {\r\n var index = fromIndex - 1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n if (array[index] === value) {\r\n return index;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Gets the number of symbols in `string`.\r\n *\r\n * @private\r\n * @param {string} string The string to inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function stringSize(string) {\r\n return hasUnicode(string)\r\n ? unicodeSize(string)\r\n : asciiSize(string);\r\n }\r\n\r\n /**\r\n * Converts `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function stringToArray(string) {\r\n return hasUnicode(string)\r\n ? unicodeToArray(string)\r\n : asciiToArray(string);\r\n }\r\n\r\n /**\r\n * Gets the size of a Unicode `string`.\r\n *\r\n * @private\r\n * @param {string} string The string inspect.\r\n * @returns {number} Returns the string size.\r\n */\r\n function unicodeSize(string) {\r\n var result = reUnicode.lastIndex = 0;\r\n while (reUnicode.test(string)) {\r\n ++result;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts a Unicode `string` to an array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the converted array.\r\n */\r\n function unicodeToArray(string) {\r\n return string.match(reUnicode) || [];\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n /** Used for built-in method references. */\r\n var arrayProto = Array.prototype,\r\n funcProto = Function.prototype,\r\n objectProto = Object.prototype;\r\n\r\n /** Used to detect overreaching core-js shims. */\r\n var coreJsData = root['__core-js_shared__'];\r\n\r\n /** Used to resolve the decompiled source of functions. */\r\n var funcToString = funcProto.toString;\r\n\r\n /** Used to check objects for own properties. */\r\n var hasOwnProperty = objectProto.hasOwnProperty;\r\n\r\n /** Used to generate unique IDs. */\r\n var idCounter = 0;\r\n\r\n /** Used to detect methods masquerading as native. */\r\n var maskSrcKey = (function() {\r\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\r\n return uid ? ('Symbol(src)_1.' + uid) : '';\r\n }());\r\n\r\n /**\r\n * Used to resolve the\r\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\r\n * of values.\r\n */\r\n var nativeObjectToString = objectProto.toString;\r\n\r\n /** Used to infer the `Object` constructor. */\r\n var objectCtorString = funcToString.call(Object);\r\n\r\n /** Used to restore the original `_` reference in `_.noConflict`. */\r\n var oldDash = root._;\r\n\r\n /** Used to detect if a method is native. */\r\n var reIsNative = RegExp('^' +\r\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\r\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\r\n );\r\n\r\n /** Built-in value references. */\r\n var Buffer = moduleExports ? root.Buffer : undefined,\r\n Symbol = root.Symbol,\r\n Uint8Array = root.Uint8Array,\r\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\r\n getPrototype = overArg(Object.getPrototypeOf, Object),\r\n objectCreate = Object.create,\r\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\r\n splice = arrayProto.splice,\r\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,\r\n symIterator = Symbol ? Symbol.iterator : undefined,\r\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\r\n\r\n var defineProperty = (function() {\r\n try {\r\n var func = getNative(Object, 'defineProperty');\r\n func({}, '', {});\r\n return func;\r\n } catch (e) {}\r\n }());\r\n\r\n /* Built-in method references for those with the same name as other `lodash` methods. */\r\n var nativeCeil = Math.ceil,\r\n nativeFloor = Math.floor,\r\n nativeGetSymbols = Object.getOwnPropertySymbols,\r\n nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\r\n nativeIsFinite = root.isFinite,\r\n nativeKeys = overArg(Object.keys, Object),\r\n nativeMax = Math.max,\r\n nativeMin = Math.min,\r\n nativeNow = Date.now,\r\n nativeRandom = Math.random,\r\n nativeReverse = arrayProto.reverse;\r\n\r\n /* Built-in method references that are verified to be native. */\r\n var DataView = getNative(root, 'DataView'),\r\n Map = getNative(root, 'Map'),\r\n Promise = getNative(root, 'Promise'),\r\n Set = getNative(root, 'Set'),\r\n WeakMap = getNative(root, 'WeakMap'),\r\n nativeCreate = getNative(Object, 'create');\r\n\r\n /** Used to store function metadata. */\r\n var metaMap = WeakMap && new WeakMap;\r\n\r\n /** Used to lookup unminified function names. */\r\n var realNames = {};\r\n\r\n /** Used to detect maps, sets, and weakmaps. */\r\n var dataViewCtorString = toSource(DataView),\r\n mapCtorString = toSource(Map),\r\n promiseCtorString = toSource(Promise),\r\n setCtorString = toSource(Set),\r\n weakMapCtorString = toSource(WeakMap);\r\n\r\n /** Used to convert symbols to primitives and strings. */\r\n var symbolProto = Symbol ? Symbol.prototype : undefined,\r\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,\r\n symbolToString = symbolProto ? symbolProto.toString : undefined;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` object which wraps `value` to enable implicit method\r\n * chain sequences. Methods that operate on and return arrays, collections,\r\n * and functions can be chained together. Methods that retrieve a single value\r\n * or may return a primitive value will automatically end the chain sequence\r\n * and return the unwrapped value. Otherwise, the value must be unwrapped\r\n * with `_#value`.\r\n *\r\n * Explicit chain sequences, which must be unwrapped with `_#value`, may be\r\n * enabled using `_.chain`.\r\n *\r\n * The execution of chained methods is lazy, that is, it's deferred until\r\n * `_#value` is implicitly or explicitly called.\r\n *\r\n * Lazy evaluation allows several methods to support shortcut fusion.\r\n * Shortcut fusion is an optimization to merge iteratee calls; this avoids\r\n * the creation of intermediate arrays and can greatly reduce the number of\r\n * iteratee executions. Sections of a chain sequence qualify for shortcut\r\n * fusion if the section is applied to an array and iteratees accept only\r\n * one argument. The heuristic for whether a section qualifies for shortcut\r\n * fusion is subject to change.\r\n *\r\n * Chaining is supported in custom builds as long as the `_#value` method is\r\n * directly or indirectly included in the build.\r\n *\r\n * In addition to lodash methods, wrappers have `Array` and `String` methods.\r\n *\r\n * The wrapper `Array` methods are:\r\n * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`\r\n *\r\n * The wrapper `String` methods are:\r\n * `replace` and `split`\r\n *\r\n * The wrapper methods that support shortcut fusion are:\r\n * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,\r\n * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,\r\n * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`\r\n *\r\n * The chainable wrapper methods are:\r\n * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,\r\n * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,\r\n * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,\r\n * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,\r\n * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,\r\n * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,\r\n * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,\r\n * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,\r\n * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,\r\n * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,\r\n * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,\r\n * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,\r\n * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,\r\n * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,\r\n * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,\r\n * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,\r\n * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,\r\n * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,\r\n * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,\r\n * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,\r\n * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,\r\n * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,\r\n * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,\r\n * `zipObject`, `zipObjectDeep`, and `zipWith`\r\n *\r\n * The wrapper methods that are **not** chainable by default are:\r\n * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,\r\n * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,\r\n * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,\r\n * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,\r\n * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,\r\n * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,\r\n * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,\r\n * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,\r\n * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,\r\n * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,\r\n * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,\r\n * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,\r\n * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,\r\n * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,\r\n * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,\r\n * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,\r\n * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,\r\n * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,\r\n * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,\r\n * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,\r\n * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,\r\n * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,\r\n * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,\r\n * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,\r\n * `upperFirst`, `value`, and `words`\r\n *\r\n * @name _\r\n * @constructor\r\n * @category Seq\r\n * @param {*} value The value to wrap in a `lodash` instance.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2, 3]);\r\n *\r\n * // Returns an unwrapped value.\r\n * wrapped.reduce(_.add);\r\n * // => 6\r\n *\r\n * // Returns a wrapped value.\r\n * var squares = wrapped.map(square);\r\n *\r\n * _.isArray(squares);\r\n * // => false\r\n *\r\n * _.isArray(squares.value());\r\n * // => true\r\n */\r\n function lodash(value) {\r\n if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r\n if (value instanceof LodashWrapper) {\r\n return value;\r\n }\r\n if (hasOwnProperty.call(value, '__wrapped__')) {\r\n return wrapperClone(value);\r\n }\r\n }\r\n return new LodashWrapper(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.create` without support for assigning\r\n * properties to the created object.\r\n *\r\n * @private\r\n * @param {Object} proto The object to inherit from.\r\n * @returns {Object} Returns the new object.\r\n */\r\n var baseCreate = (function() {\r\n function object() {}\r\n return function(proto) {\r\n if (!isObject(proto)) {\r\n return {};\r\n }\r\n if (objectCreate) {\r\n return objectCreate(proto);\r\n }\r\n object.prototype = proto;\r\n var result = new object;\r\n object.prototype = undefined;\r\n return result;\r\n };\r\n }());\r\n\r\n /**\r\n * The function whose prototype chain sequence wrappers inherit from.\r\n *\r\n * @private\r\n */\r\n function baseLodash() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * The base constructor for creating `lodash` wrapper objects.\r\n *\r\n * @private\r\n * @param {*} value The value to wrap.\r\n * @param {boolean} [chainAll] Enable explicit method chain sequences.\r\n */\r\n function LodashWrapper(value, chainAll) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__chain__ = !!chainAll;\r\n this.__index__ = 0;\r\n this.__values__ = undefined;\r\n }\r\n\r\n // Ensure wrappers are instances of `baseLodash`.\r\n lodash.prototype = baseLodash.prototype;\r\n lodash.prototype.constructor = lodash;\r\n\r\n LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LodashWrapper.prototype.constructor = LodashWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {*} value The value to wrap.\r\n */\r\n function LazyWrapper(value) {\r\n this.__wrapped__ = value;\r\n this.__actions__ = [];\r\n this.__dir__ = 1;\r\n this.__filtered__ = false;\r\n this.__iteratees__ = [];\r\n this.__takeCount__ = MAX_ARRAY_LENGTH;\r\n this.__views__ = [];\r\n }\r\n\r\n /**\r\n * Creates a clone of the lazy wrapper object.\r\n *\r\n * @private\r\n * @name clone\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the cloned `LazyWrapper` object.\r\n */\r\n function lazyClone() {\r\n var result = new LazyWrapper(this.__wrapped__);\r\n result.__actions__ = copyArray(this.__actions__);\r\n result.__dir__ = this.__dir__;\r\n result.__filtered__ = this.__filtered__;\r\n result.__iteratees__ = copyArray(this.__iteratees__);\r\n result.__takeCount__ = this.__takeCount__;\r\n result.__views__ = copyArray(this.__views__);\r\n return result;\r\n }\r\n\r\n /**\r\n * Reverses the direction of lazy iteration.\r\n *\r\n * @private\r\n * @name reverse\r\n * @memberOf LazyWrapper\r\n * @returns {Object} Returns the new reversed `LazyWrapper` object.\r\n */\r\n function lazyReverse() {\r\n if (this.__filtered__) {\r\n var result = new LazyWrapper(this);\r\n result.__dir__ = -1;\r\n result.__filtered__ = true;\r\n } else {\r\n result = this.clone();\r\n result.__dir__ *= -1;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Extracts the unwrapped value from its lazy wrapper.\r\n *\r\n * @private\r\n * @name value\r\n * @memberOf LazyWrapper\r\n * @returns {*} Returns the unwrapped value.\r\n */\r\n function lazyValue() {\r\n var array = this.__wrapped__.value(),\r\n dir = this.__dir__,\r\n isArr = isArray(array),\r\n isRight = dir < 0,\r\n arrLength = isArr ? array.length : 0,\r\n view = getView(0, arrLength, this.__views__),\r\n start = view.start,\r\n end = view.end,\r\n length = end - start,\r\n index = isRight ? end : (start - 1),\r\n iteratees = this.__iteratees__,\r\n iterLength = iteratees.length,\r\n resIndex = 0,\r\n takeCount = nativeMin(length, this.__takeCount__);\r\n\r\n if (!isArr || (!isRight && arrLength == length && takeCount == length)) {\r\n return baseWrapperValue(array, this.__actions__);\r\n }\r\n var result = [];\r\n\r\n outer:\r\n while (length-- && resIndex < takeCount) {\r\n index += dir;\r\n\r\n var iterIndex = -1,\r\n value = array[index];\r\n\r\n while (++iterIndex < iterLength) {\r\n var data = iteratees[iterIndex],\r\n iteratee = data.iteratee,\r\n type = data.type,\r\n computed = iteratee(value);\r\n\r\n if (type == LAZY_MAP_FLAG) {\r\n value = computed;\r\n } else if (!computed) {\r\n if (type == LAZY_FILTER_FLAG) {\r\n continue outer;\r\n } else {\r\n break outer;\r\n }\r\n }\r\n }\r\n result[resIndex++] = value;\r\n }\r\n return result;\r\n }\r\n\r\n // Ensure `LazyWrapper` is an instance of `baseLodash`.\r\n LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r\n LazyWrapper.prototype.constructor = LazyWrapper;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a hash object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Hash(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the hash.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Hash\r\n */\r\n function hashClear() {\r\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the hash.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Hash\r\n * @param {Object} hash The hash to modify.\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function hashDelete(key) {\r\n var result = this.has(key) && delete this.__data__[key];\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the hash value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function hashGet(key) {\r\n var data = this.__data__;\r\n if (nativeCreate) {\r\n var result = data[key];\r\n return result === HASH_UNDEFINED ? undefined : result;\r\n }\r\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\r\n }\r\n\r\n /**\r\n * Checks if a hash value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Hash\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function hashHas(key) {\r\n var data = this.__data__;\r\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\r\n }\r\n\r\n /**\r\n * Sets the hash `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Hash\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the hash instance.\r\n */\r\n function hashSet(key, value) {\r\n var data = this.__data__;\r\n this.size += this.has(key) ? 0 : 1;\r\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\r\n return this;\r\n }\r\n\r\n // Add methods to `Hash`.\r\n Hash.prototype.clear = hashClear;\r\n Hash.prototype['delete'] = hashDelete;\r\n Hash.prototype.get = hashGet;\r\n Hash.prototype.has = hashHas;\r\n Hash.prototype.set = hashSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an list cache object.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function ListCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the list cache.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf ListCache\r\n */\r\n function listCacheClear() {\r\n this.__data__ = [];\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the list cache.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function listCacheDelete(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n return false;\r\n }\r\n var lastIndex = data.length - 1;\r\n if (index == lastIndex) {\r\n data.pop();\r\n } else {\r\n splice.call(data, index, 1);\r\n }\r\n --this.size;\r\n return true;\r\n }\r\n\r\n /**\r\n * Gets the list cache value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function listCacheGet(key) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n return index < 0 ? undefined : data[index][1];\r\n }\r\n\r\n /**\r\n * Checks if a list cache value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf ListCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function listCacheHas(key) {\r\n return assocIndexOf(this.__data__, key) > -1;\r\n }\r\n\r\n /**\r\n * Sets the list cache `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf ListCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the list cache instance.\r\n */\r\n function listCacheSet(key, value) {\r\n var data = this.__data__,\r\n index = assocIndexOf(data, key);\r\n\r\n if (index < 0) {\r\n ++this.size;\r\n data.push([key, value]);\r\n } else {\r\n data[index][1] = value;\r\n }\r\n return this;\r\n }\r\n\r\n // Add methods to `ListCache`.\r\n ListCache.prototype.clear = listCacheClear;\r\n ListCache.prototype['delete'] = listCacheDelete;\r\n ListCache.prototype.get = listCacheGet;\r\n ListCache.prototype.has = listCacheHas;\r\n ListCache.prototype.set = listCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a map cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function MapCache(entries) {\r\n var index = -1,\r\n length = entries == null ? 0 : entries.length;\r\n\r\n this.clear();\r\n while (++index < length) {\r\n var entry = entries[index];\r\n this.set(entry[0], entry[1]);\r\n }\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the map.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf MapCache\r\n */\r\n function mapCacheClear() {\r\n this.size = 0;\r\n this.__data__ = {\r\n 'hash': new Hash,\r\n 'map': new (Map || ListCache),\r\n 'string': new Hash\r\n };\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the map.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function mapCacheDelete(key) {\r\n var result = getMapData(this, key)['delete'](key);\r\n this.size -= result ? 1 : 0;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the map value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function mapCacheGet(key) {\r\n return getMapData(this, key).get(key);\r\n }\r\n\r\n /**\r\n * Checks if a map value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf MapCache\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function mapCacheHas(key) {\r\n return getMapData(this, key).has(key);\r\n }\r\n\r\n /**\r\n * Sets the map `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf MapCache\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the map cache instance.\r\n */\r\n function mapCacheSet(key, value) {\r\n var data = getMapData(this, key),\r\n size = data.size;\r\n\r\n data.set(key, value);\r\n this.size += data.size == size ? 0 : 1;\r\n return this;\r\n }\r\n\r\n // Add methods to `MapCache`.\r\n MapCache.prototype.clear = mapCacheClear;\r\n MapCache.prototype['delete'] = mapCacheDelete;\r\n MapCache.prototype.get = mapCacheGet;\r\n MapCache.prototype.has = mapCacheHas;\r\n MapCache.prototype.set = mapCacheSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n *\r\n * Creates an array cache object to store unique values.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [values] The values to cache.\r\n */\r\n function SetCache(values) {\r\n var index = -1,\r\n length = values == null ? 0 : values.length;\r\n\r\n this.__data__ = new MapCache;\r\n while (++index < length) {\r\n this.add(values[index]);\r\n }\r\n }\r\n\r\n /**\r\n * Adds `value` to the array cache.\r\n *\r\n * @private\r\n * @name add\r\n * @memberOf SetCache\r\n * @alias push\r\n * @param {*} value The value to cache.\r\n * @returns {Object} Returns the cache instance.\r\n */\r\n function setCacheAdd(value) {\r\n this.__data__.set(value, HASH_UNDEFINED);\r\n return this;\r\n }\r\n\r\n /**\r\n * Checks if `value` is in the array cache.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf SetCache\r\n * @param {*} value The value to search for.\r\n * @returns {number} Returns `true` if `value` is found, else `false`.\r\n */\r\n function setCacheHas(value) {\r\n return this.__data__.has(value);\r\n }\r\n\r\n // Add methods to `SetCache`.\r\n SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\r\n SetCache.prototype.has = setCacheHas;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a stack cache object to store key-value pairs.\r\n *\r\n * @private\r\n * @constructor\r\n * @param {Array} [entries] The key-value pairs to cache.\r\n */\r\n function Stack(entries) {\r\n var data = this.__data__ = new ListCache(entries);\r\n this.size = data.size;\r\n }\r\n\r\n /**\r\n * Removes all key-value entries from the stack.\r\n *\r\n * @private\r\n * @name clear\r\n * @memberOf Stack\r\n */\r\n function stackClear() {\r\n this.__data__ = new ListCache;\r\n this.size = 0;\r\n }\r\n\r\n /**\r\n * Removes `key` and its value from the stack.\r\n *\r\n * @private\r\n * @name delete\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to remove.\r\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\r\n */\r\n function stackDelete(key) {\r\n var data = this.__data__,\r\n result = data['delete'](key);\r\n\r\n this.size = data.size;\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the stack value for `key`.\r\n *\r\n * @private\r\n * @name get\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to get.\r\n * @returns {*} Returns the entry value.\r\n */\r\n function stackGet(key) {\r\n return this.__data__.get(key);\r\n }\r\n\r\n /**\r\n * Checks if a stack value for `key` exists.\r\n *\r\n * @private\r\n * @name has\r\n * @memberOf Stack\r\n * @param {string} key The key of the entry to check.\r\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\r\n */\r\n function stackHas(key) {\r\n return this.__data__.has(key);\r\n }\r\n\r\n /**\r\n * Sets the stack `key` to `value`.\r\n *\r\n * @private\r\n * @name set\r\n * @memberOf Stack\r\n * @param {string} key The key of the value to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns the stack cache instance.\r\n */\r\n function stackSet(key, value) {\r\n var data = this.__data__;\r\n if (data instanceof ListCache) {\r\n var pairs = data.__data__;\r\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\r\n pairs.push([key, value]);\r\n this.size = ++data.size;\r\n return this;\r\n }\r\n data = this.__data__ = new MapCache(pairs);\r\n }\r\n data.set(key, value);\r\n this.size = data.size;\r\n return this;\r\n }\r\n\r\n // Add methods to `Stack`.\r\n Stack.prototype.clear = stackClear;\r\n Stack.prototype['delete'] = stackDelete;\r\n Stack.prototype.get = stackGet;\r\n Stack.prototype.has = stackHas;\r\n Stack.prototype.set = stackSet;\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array of the enumerable property names of the array-like `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @param {boolean} inherited Specify returning inherited property names.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function arrayLikeKeys(value, inherited) {\r\n var isArr = isArray(value),\r\n isArg = !isArr && isArguments(value),\r\n isBuff = !isArr && !isArg && isBuffer(value),\r\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\r\n skipIndexes = isArr || isArg || isBuff || isType,\r\n result = skipIndexes ? baseTimes(value.length, String) : [],\r\n length = result.length;\r\n\r\n for (var key in value) {\r\n if ((inherited || hasOwnProperty.call(value, key)) &&\r\n !(skipIndexes && (\r\n // Safari 9 has enumerable `arguments.length` in strict mode.\r\n key == 'length' ||\r\n // Node.js 0.10 has enumerable non-index properties on buffers.\r\n (isBuff && (key == 'offset' || key == 'parent')) ||\r\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\r\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\r\n // Skip index properties.\r\n isIndex(key, length)\r\n ))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `assignValue` except that it doesn't assign\r\n * `undefined` values.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignMergeValue(object, key, value) {\r\n if ((value !== undefined && !eq(object[key], value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function assignValue(object, key, value) {\r\n var objValue = object[key];\r\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\r\n (value === undefined && !(key in object))) {\r\n baseAssignValue(object, key, value);\r\n }\r\n }\r\n\r\n /**\r\n * Gets the index at which the `key` is found in `array` of key-value pairs.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {*} key The key to search for.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n */\r\n function assocIndexOf(array, key) {\r\n var length = array.length;\r\n while (length--) {\r\n if (eq(array[length][0], key)) {\r\n return length;\r\n }\r\n }\r\n return -1;\r\n }\r\n\r\n /**\r\n * Aggregates elements of `collection` on `accumulator` with keys transformed\r\n * by `iteratee` and values set by `setter`.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform keys.\r\n * @param {Object} accumulator The initial aggregated object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseAggregator(collection, setter, iteratee, accumulator) {\r\n baseEach(collection, function(value, key, collection) {\r\n setter(accumulator, value, iteratee(value), collection);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assign` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssign(object, source) {\r\n return object && copyObject(source, keys(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.assignIn` without support for multiple sources\r\n * or `customizer` functions.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseAssignIn(object, source) {\r\n return object && copyObject(source, keysIn(source), object);\r\n }\r\n\r\n /**\r\n * The base implementation of `assignValue` and `assignMergeValue` without\r\n * value checks.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {string} key The key of the property to assign.\r\n * @param {*} value The value to assign.\r\n */\r\n function baseAssignValue(object, key, value) {\r\n if (key == '__proto__' && defineProperty) {\r\n defineProperty(object, key, {\r\n 'configurable': true,\r\n 'enumerable': true,\r\n 'value': value,\r\n 'writable': true\r\n });\r\n } else {\r\n object[key] = value;\r\n }\r\n }\r\n\r\n /**\r\n * The base implementation of `_.at` without support for individual paths.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Array} Returns the picked elements.\r\n */\r\n function baseAt(object, paths) {\r\n var index = -1,\r\n length = paths.length,\r\n result = Array(length),\r\n skip = object == null;\r\n\r\n while (++index < length) {\r\n result[index] = skip ? undefined : get(object, paths[index]);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clamp` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n */\r\n function baseClamp(number, lower, upper) {\r\n if (number === number) {\r\n if (upper !== undefined) {\r\n number = number <= upper ? number : upper;\r\n }\r\n if (lower !== undefined) {\r\n number = number >= lower ? number : lower;\r\n }\r\n }\r\n return number;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\r\n * traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to clone.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Deep clone\r\n * 2 - Flatten inherited properties\r\n * 4 - Clone symbols\r\n * @param {Function} [customizer] The function to customize cloning.\r\n * @param {string} [key] The key of `value`.\r\n * @param {Object} [object] The parent object of `value`.\r\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\r\n * @returns {*} Returns the cloned value.\r\n */\r\n function baseClone(value, bitmask, customizer, key, object, stack) {\r\n var result,\r\n isDeep = bitmask & CLONE_DEEP_FLAG,\r\n isFlat = bitmask & CLONE_FLAT_FLAG,\r\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\r\n\r\n if (customizer) {\r\n result = object ? customizer(value, key, object, stack) : customizer(value);\r\n }\r\n if (result !== undefined) {\r\n return result;\r\n }\r\n if (!isObject(value)) {\r\n return value;\r\n }\r\n var isArr = isArray(value);\r\n if (isArr) {\r\n result = initCloneArray(value);\r\n if (!isDeep) {\r\n return copyArray(value, result);\r\n }\r\n } else {\r\n var tag = getTag(value),\r\n isFunc = tag == funcTag || tag == genTag;\r\n\r\n if (isBuffer(value)) {\r\n return cloneBuffer(value, isDeep);\r\n }\r\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\r\n if (!isDeep) {\r\n return isFlat\r\n ? copySymbolsIn(value, baseAssignIn(result, value))\r\n : copySymbols(value, baseAssign(result, value));\r\n }\r\n } else {\r\n if (!cloneableTags[tag]) {\r\n return object ? value : {};\r\n }\r\n result = initCloneByTag(value, tag, isDeep);\r\n }\r\n }\r\n // Check for circular references and return its corresponding clone.\r\n stack || (stack = new Stack);\r\n var stacked = stack.get(value);\r\n if (stacked) {\r\n return stacked;\r\n }\r\n stack.set(value, result);\r\n\r\n if (isSet(value)) {\r\n value.forEach(function(subValue) {\r\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n if (isMap(value)) {\r\n value.forEach(function(subValue, key) {\r\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n\r\n return result;\r\n }\r\n\r\n var keysFunc = isFull\r\n ? (isFlat ? getAllKeysIn : getAllKeys)\r\n : (isFlat ? keysIn : keys);\r\n\r\n var props = isArr ? undefined : keysFunc(value);\r\n arrayEach(props || value, function(subValue, key) {\r\n if (props) {\r\n key = subValue;\r\n subValue = value[key];\r\n }\r\n // Recursively populate clone (susceptible to call stack limits).\r\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.delay` and `_.defer` which accepts `args`\r\n * to provide to `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {Array} args The arguments to provide to `func`.\r\n * @returns {number|Object} Returns the timer id or timeout object.\r\n */\r\n function baseDelay(func, wait, args) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return setTimeout(function() { func.apply(undefined, args); }, wait);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.difference` without support\r\n * for excluding multiple arrays or iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Array} values The values to exclude.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of filtered values.\r\n */\r\n function baseDifference(array, values, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n isCommon = true,\r\n length = array.length,\r\n result = [],\r\n valuesLength = values.length;\r\n\r\n if (!length) {\r\n return result;\r\n }\r\n if (iteratee) {\r\n values = arrayMap(values, baseUnary(iteratee));\r\n }\r\n if (comparator) {\r\n includes = arrayIncludesWith;\r\n isCommon = false;\r\n }\r\n else if (values.length >= LARGE_ARRAY_SIZE) {\r\n includes = cacheHas;\r\n isCommon = false;\r\n values = new SetCache(values);\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee == null ? value : iteratee(value);\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var valuesIndex = valuesLength;\r\n while (valuesIndex--) {\r\n if (values[valuesIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(values, computed, comparator)) {\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forEach` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n */\r\n var baseEach = createBaseEach(baseForOwn);\r\n\r\n /**\r\n * The base implementation of `_.every` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`\r\n */\r\n function baseEvery(collection, predicate) {\r\n var result = true;\r\n baseEach(collection, function(value, index, collection) {\r\n result = !!predicate(value, index, collection);\r\n return result;\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.max` and `_.min` which accepts a\r\n * `comparator` to determine the extremum value.\r\n *\r\n * @private\r\n * @param {Array} array The array to iterate over.\r\n * @param {Function} iteratee The iteratee invoked per iteration.\r\n * @param {Function} comparator The comparator used to compare values.\r\n * @returns {*} Returns the extremum value.\r\n */\r\n function baseExtremum(array, iteratee, comparator) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n while (++index < length) {\r\n var value = array[index],\r\n current = iteratee(value);\r\n\r\n if (current != null && (computed === undefined\r\n ? (current === current && !isSymbol(current))\r\n : comparator(current, computed)\r\n )) {\r\n var computed = current,\r\n result = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.filter` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n */\r\n function baseFilter(collection, predicate) {\r\n var result = [];\r\n baseEach(collection, function(value, index, collection) {\r\n if (predicate(value, index, collection)) {\r\n result.push(value);\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.flatten` with support for restricting flattening.\r\n *\r\n * @private\r\n * @param {Array} array The array to flatten.\r\n * @param {number} depth The maximum recursion depth.\r\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\r\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\r\n * @param {Array} [result=[]] The initial result value.\r\n * @returns {Array} Returns the new flattened array.\r\n */\r\n function baseFlatten(array, depth, predicate, isStrict, result) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n predicate || (predicate = isFlattenable);\r\n result || (result = []);\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (depth > 0 && predicate(value)) {\r\n if (depth > 1) {\r\n // Recursively flatten arrays (susceptible to call stack limits).\r\n baseFlatten(value, depth - 1, predicate, isStrict, result);\r\n } else {\r\n arrayPush(result, value);\r\n }\r\n } else if (!isStrict) {\r\n result[result.length] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `baseForOwn` which iterates over `object`\r\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseFor = createBaseFor();\r\n\r\n /**\r\n * This function is like `baseFor` except that it iterates over properties\r\n * in the opposite order.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @returns {Object} Returns `object`.\r\n */\r\n var baseForRight = createBaseFor(true);\r\n\r\n /**\r\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwn(object, iteratee) {\r\n return object && baseFor(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.forOwnRight` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseForOwnRight(object, iteratee) {\r\n return object && baseForRight(object, iteratee, keys);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.functions` which creates an array of\r\n * `object` function property names filtered from `props`.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Array} props The property names to filter.\r\n * @returns {Array} Returns the function names.\r\n */\r\n function baseFunctions(object, props) {\r\n return arrayFilter(props, function(key) {\r\n return isFunction(object[key]);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.get` without support for default values.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseGet(object, path) {\r\n path = castPath(path, object);\r\n\r\n var index = 0,\r\n length = path.length;\r\n\r\n while (object != null && index < length) {\r\n object = object[toKey(path[index++])];\r\n }\r\n return (index && index == length) ? object : undefined;\r\n }\r\n\r\n /**\r\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\r\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Function} keysFunc The function to get the keys of `object`.\r\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function baseGetAllKeys(object, keysFunc, symbolsFunc) {\r\n var result = keysFunc(object);\r\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\r\n }\r\n\r\n /**\r\n * The base implementation of `getTag` without fallbacks for buggy environments.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n function baseGetTag(value) {\r\n if (value == null) {\r\n return value === undefined ? undefinedTag : nullTag;\r\n }\r\n return (symToStringTag && symToStringTag in Object(value))\r\n ? getRawTag(value)\r\n : objectToString(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.gt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\r\n * else `false`.\r\n */\r\n function baseGt(value, other) {\r\n return value > other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.has` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHas(object, key) {\r\n return object != null && hasOwnProperty.call(object, key);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.hasIn` without support for deep paths.\r\n *\r\n * @private\r\n * @param {Object} [object] The object to query.\r\n * @param {Array|string} key The key to check.\r\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\r\n */\r\n function baseHasIn(object, key) {\r\n return object != null && key in Object(object);\r\n }\r\n\r\n /**\r\n * The base implementation of methods like `_.intersection`, without support\r\n * for iteratee shorthands, that accepts an array of arrays to inspect.\r\n *\r\n * @private\r\n * @param {Array} arrays The arrays to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new array of shared values.\r\n */\r\n function baseIntersection(arrays, iteratee, comparator) {\r\n var includes = comparator ? arrayIncludesWith : arrayIncludes,\r\n length = arrays[0].length,\r\n othLength = arrays.length,\r\n othIndex = othLength,\r\n caches = Array(othLength),\r\n maxLength = Infinity,\r\n result = [];\r\n\r\n while (othIndex--) {\r\n var array = arrays[othIndex];\r\n if (othIndex && iteratee) {\r\n array = arrayMap(array, baseUnary(iteratee));\r\n }\r\n maxLength = nativeMin(array.length, maxLength);\r\n caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))\r\n ? new SetCache(othIndex && array)\r\n : undefined;\r\n }\r\n array = arrays[0];\r\n\r\n var index = -1,\r\n seen = caches[0];\r\n\r\n outer:\r\n while (++index < length && result.length < maxLength) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (!(seen\r\n ? cacheHas(seen, computed)\r\n : includes(result, computed, comparator)\r\n )) {\r\n othIndex = othLength;\r\n while (--othIndex) {\r\n var cache = caches[othIndex];\r\n if (!(cache\r\n ? cacheHas(cache, computed)\r\n : includes(arrays[othIndex], computed, comparator))\r\n ) {\r\n continue outer;\r\n }\r\n }\r\n if (seen) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invert` and `_.invertBy` which inverts\r\n * `object` with values transformed by `iteratee` and set by `setter`.\r\n *\r\n * @private\r\n * @param {Object} object The object to iterate over.\r\n * @param {Function} setter The function to set `accumulator` values.\r\n * @param {Function} iteratee The iteratee to transform values.\r\n * @param {Object} accumulator The initial inverted object.\r\n * @returns {Function} Returns `accumulator`.\r\n */\r\n function baseInverter(object, setter, iteratee, accumulator) {\r\n baseForOwn(object, function(value, key, object) {\r\n setter(accumulator, iteratee(value), key, object);\r\n });\r\n return accumulator;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.invoke` without support for individual\r\n * method arguments.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the method to invoke.\r\n * @param {Array} args The arguments to invoke the method with.\r\n * @returns {*} Returns the result of the invoked method.\r\n */\r\n function baseInvoke(object, path, args) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n var func = object == null ? object : object[toKey(last(path))];\r\n return func == null ? undefined : apply(func, object, args);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isArguments`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n */\r\n function baseIsArguments(value) {\r\n return isObjectLike(value) && baseGetTag(value) == argsTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isDate` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n */\r\n function baseIsDate(value) {\r\n return isObjectLike(value) && baseGetTag(value) == dateTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isEqual` which supports partial comparisons\r\n * and tracks traversed objects.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @param {boolean} bitmask The bitmask flags.\r\n * 1 - Unordered comparison\r\n * 2 - Partial comparison\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n */\r\n function baseIsEqual(value, other, bitmask, customizer, stack) {\r\n if (value === other) {\r\n return true;\r\n }\r\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\r\n return value !== value && other !== other;\r\n }\r\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqual` for arrays and objects which performs\r\n * deep comparisons and tracks traversed objects enabling objects with circular\r\n * references to be compared.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\r\n var objIsArr = isArray(object),\r\n othIsArr = isArray(other),\r\n objTag = objIsArr ? arrayTag : getTag(object),\r\n othTag = othIsArr ? arrayTag : getTag(other);\r\n\r\n objTag = objTag == argsTag ? objectTag : objTag;\r\n othTag = othTag == argsTag ? objectTag : othTag;\r\n\r\n var objIsObj = objTag == objectTag,\r\n othIsObj = othTag == objectTag,\r\n isSameTag = objTag == othTag;\r\n\r\n if (isSameTag && isBuffer(object)) {\r\n if (!isBuffer(other)) {\r\n return false;\r\n }\r\n objIsArr = true;\r\n objIsObj = false;\r\n }\r\n if (isSameTag && !objIsObj) {\r\n stack || (stack = new Stack);\r\n return (objIsArr || isTypedArray(object))\r\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\r\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\r\n }\r\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\r\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r\n\r\n if (objIsWrapped || othIsWrapped) {\r\n var objUnwrapped = objIsWrapped ? object.value() : object,\r\n othUnwrapped = othIsWrapped ? other.value() : other;\r\n\r\n stack || (stack = new Stack);\r\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\r\n }\r\n }\r\n if (!isSameTag) {\r\n return false;\r\n }\r\n stack || (stack = new Stack);\r\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMap` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n */\r\n function baseIsMap(value) {\r\n return isObjectLike(value) && getTag(value) == mapTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The object to inspect.\r\n * @param {Object} source The object of property values to match.\r\n * @param {Array} matchData The property names, values, and compare flags to match.\r\n * @param {Function} [customizer] The function to customize comparisons.\r\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r\n */\r\n function baseIsMatch(object, source, matchData, customizer) {\r\n var index = matchData.length,\r\n length = index,\r\n noCustomizer = !customizer;\r\n\r\n if (object == null) {\r\n return !length;\r\n }\r\n object = Object(object);\r\n while (index--) {\r\n var data = matchData[index];\r\n if ((noCustomizer && data[2])\r\n ? data[1] !== object[data[0]]\r\n : !(data[0] in object)\r\n ) {\r\n return false;\r\n }\r\n }\r\n while (++index < length) {\r\n data = matchData[index];\r\n var key = data[0],\r\n objValue = object[key],\r\n srcValue = data[1];\r\n\r\n if (noCustomizer && data[2]) {\r\n if (objValue === undefined && !(key in object)) {\r\n return false;\r\n }\r\n } else {\r\n var stack = new Stack;\r\n if (customizer) {\r\n var result = customizer(objValue, srcValue, key, object, source, stack);\r\n }\r\n if (!(result === undefined\r\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\r\n : result\r\n )) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isNative` without bad shim checks.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a native function,\r\n * else `false`.\r\n */\r\n function baseIsNative(value) {\r\n if (!isObject(value) || isMasked(value)) {\r\n return false;\r\n }\r\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\r\n return pattern.test(toSource(value));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isRegExp` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n */\r\n function baseIsRegExp(value) {\r\n return isObjectLike(value) && baseGetTag(value) == regexpTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isSet` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n */\r\n function baseIsSet(value) {\r\n return isObjectLike(value) && getTag(value) == setTag;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n */\r\n function baseIsTypedArray(value) {\r\n return isObjectLike(value) &&\r\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\r\n }\r\n\r\n /**\r\n * The base implementation of `_.iteratee`.\r\n *\r\n * @private\r\n * @param {*} [value=_.identity] The value to convert to an iteratee.\r\n * @returns {Function} Returns the iteratee.\r\n */\r\n function baseIteratee(value) {\r\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\r\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\r\n if (typeof value == 'function') {\r\n return value;\r\n }\r\n if (value == null) {\r\n return identity;\r\n }\r\n if (typeof value == 'object') {\r\n return isArray(value)\r\n ? baseMatchesProperty(value[0], value[1])\r\n : baseMatches(value);\r\n }\r\n return property(value);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeys(object) {\r\n if (!isPrototype(object)) {\r\n return nativeKeys(object);\r\n }\r\n var result = [];\r\n for (var key in Object(object)) {\r\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function baseKeysIn(object) {\r\n if (!isObject(object)) {\r\n return nativeKeysIn(object);\r\n }\r\n var isProto = isPrototype(object),\r\n result = [];\r\n\r\n for (var key in object) {\r\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.lt` which doesn't coerce arguments.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if `value` is less than `other`,\r\n * else `false`.\r\n */\r\n function baseLt(value, other) {\r\n return value < other;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.map` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} iteratee The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n */\r\n function baseMap(collection, iteratee) {\r\n var index = -1,\r\n result = isArrayLike(collection) ? Array(collection.length) : [];\r\n\r\n baseEach(collection, function(value, key, collection) {\r\n result[++index] = iteratee(value, key, collection);\r\n });\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matches` which doesn't clone `source`.\r\n *\r\n * @private\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatches(source) {\r\n var matchData = getMatchData(source);\r\n if (matchData.length == 1 && matchData[0][2]) {\r\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\r\n }\r\n return function(object) {\r\n return object === source || baseIsMatch(object, source, matchData);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.\r\n *\r\n * @private\r\n * @param {string} path The path of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function baseMatchesProperty(path, srcValue) {\r\n if (isKey(path) && isStrictComparable(srcValue)) {\r\n return matchesStrictComparable(toKey(path), srcValue);\r\n }\r\n return function(object) {\r\n var objValue = get(object, path);\r\n return (objValue === undefined && objValue === srcValue)\r\n ? hasIn(object, path)\r\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.merge` without support for multiple sources.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} [customizer] The function to customize merged values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMerge(object, source, srcIndex, customizer, stack) {\r\n if (object === source) {\r\n return;\r\n }\r\n baseFor(source, function(srcValue, key) {\r\n if (isObject(srcValue)) {\r\n stack || (stack = new Stack);\r\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\r\n }\r\n else {\r\n var newValue = customizer\r\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = srcValue;\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n }, keysIn);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseMerge` for arrays and objects which performs\r\n * deep merges and tracks traversed objects enabling objects with circular\r\n * references to be merged.\r\n *\r\n * @private\r\n * @param {Object} object The destination object.\r\n * @param {Object} source The source object.\r\n * @param {string} key The key of the value to merge.\r\n * @param {number} srcIndex The index of `source`.\r\n * @param {Function} mergeFunc The function to merge values.\r\n * @param {Function} [customizer] The function to customize assigned values.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n */\r\n function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\r\n var objValue = safeGet(object, key),\r\n srcValue = safeGet(source, key),\r\n stacked = stack.get(srcValue);\r\n\r\n if (stacked) {\r\n assignMergeValue(object, key, stacked);\r\n return;\r\n }\r\n var newValue = customizer\r\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\r\n : undefined;\r\n\r\n var isCommon = newValue === undefined;\r\n\r\n if (isCommon) {\r\n var isArr = isArray(srcValue),\r\n isBuff = !isArr && isBuffer(srcValue),\r\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\r\n\r\n newValue = srcValue;\r\n if (isArr || isBuff || isTyped) {\r\n if (isArray(objValue)) {\r\n newValue = objValue;\r\n }\r\n else if (isArrayLikeObject(objValue)) {\r\n newValue = copyArray(objValue);\r\n }\r\n else if (isBuff) {\r\n isCommon = false;\r\n newValue = cloneBuffer(srcValue, true);\r\n }\r\n else if (isTyped) {\r\n isCommon = false;\r\n newValue = cloneTypedArray(srcValue, true);\r\n }\r\n else {\r\n newValue = [];\r\n }\r\n }\r\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\r\n newValue = objValue;\r\n if (isArguments(objValue)) {\r\n newValue = toPlainObject(objValue);\r\n }\r\n else if (!isObject(objValue) || (srcIndex && isFunction(objValue))) {\r\n newValue = initCloneObject(srcValue);\r\n }\r\n }\r\n else {\r\n isCommon = false;\r\n }\r\n }\r\n if (isCommon) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, newValue);\r\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\r\n stack['delete'](srcValue);\r\n }\r\n assignMergeValue(object, key, newValue);\r\n }\r\n\r\n /**\r\n * The base implementation of `_.orderBy` without param guards.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\r\n * @param {string[]} orders The sort orders of `iteratees`.\r\n * @returns {Array} Returns the new sorted array.\r\n */\r\n function baseOrderBy(collection, iteratees, orders) {\r\n var index = -1;\r\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\r\n\r\n var result = baseMap(collection, function(value, key, collection) {\r\n var criteria = arrayMap(iteratees, function(iteratee) {\r\n return iteratee(value);\r\n });\r\n return { 'criteria': criteria, 'index': ++index, 'value': value };\r\n });\r\n\r\n return baseSortBy(result, function(object, other) {\r\n return compareMultiple(object, other, orders);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pick` without support for individual\r\n * property identifiers.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePick(object, paths) {\r\n return basePickBy(object, paths, function(value, path) {\r\n return hasIn(object, path);\r\n });\r\n }\r\n\r\n /**\r\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Object} object The source object.\r\n * @param {string[]} paths The property paths to pick.\r\n * @param {Function} predicate The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function basePickBy(object, paths, predicate) {\r\n var index = -1,\r\n length = paths.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var path = paths[index],\r\n value = baseGet(object, path);\r\n\r\n if (predicate(value, path)) {\r\n baseSet(result, castPath(path, object), value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseProperty` which supports deep paths.\r\n *\r\n * @private\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n */\r\n function basePropertyDeep(path) {\r\n return function(object) {\r\n return baseGet(object, path);\r\n };\r\n }\r\n\r\n /**\r\n * The base implementation of `_.random` without support for returning\r\n * floating-point numbers.\r\n *\r\n * @private\r\n * @param {number} lower The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the random number.\r\n */\r\n function baseRandom(lower, upper) {\r\n return lower + nativeFloor(nativeRandom() * (upper - lower + 1));\r\n }\r\n\r\n /**\r\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\r\n * coerce arguments.\r\n *\r\n * @private\r\n * @param {number} start The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} step The value to increment or decrement by.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Array} Returns the range of numbers.\r\n */\r\n function baseRange(start, end, step, fromRight) {\r\n var index = -1,\r\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\r\n result = Array(length);\r\n\r\n while (length--) {\r\n result[fromRight ? length : ++index] = start;\r\n start += step;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function baseRest(func, start) {\r\n return setToString(overRest(func, start, identity), func + '');\r\n }\r\n\r\n /**\r\n * The base implementation of `_.set`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @param {Function} [customizer] The function to customize path creation.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function baseSet(object, path, value, customizer) {\r\n if (!isObject(object)) {\r\n return object;\r\n }\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n lastIndex = length - 1,\r\n nested = object;\r\n\r\n while (nested != null && ++index < length) {\r\n var key = toKey(path[index]),\r\n newValue = value;\r\n\r\n if (index != lastIndex) {\r\n var objValue = nested[key];\r\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\r\n if (newValue === undefined) {\r\n newValue = isObject(objValue)\r\n ? objValue\r\n : (isIndex(path[index + 1]) ? [] : {});\r\n }\r\n }\r\n assignValue(nested, key, newValue);\r\n nested = nested[key];\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * The base implementation of `setData` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetData = !metaMap ? identity : function(func, data) {\r\n metaMap.set(func, data);\r\n return func;\r\n };\r\n\r\n /**\r\n * The base implementation of `setToString` without support for hot loop shorting.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var baseSetToString = !defineProperty ? identity : function(func, string) {\r\n return defineProperty(func, 'toString', {\r\n 'configurable': true,\r\n 'enumerable': false,\r\n 'value': constant(string),\r\n 'writable': true\r\n });\r\n };\r\n\r\n /**\r\n * The base implementation of `_.slice` without an iteratee call guard.\r\n *\r\n * @private\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function baseSlice(array, start, end) {\r\n var index = -1,\r\n length = array.length;\r\n\r\n if (start < 0) {\r\n start = -start > length ? 0 : (length + start);\r\n }\r\n end = end > length ? length : end;\r\n if (end < 0) {\r\n end += length;\r\n }\r\n length = start > end ? 0 : ((end - start) >>> 0);\r\n start >>>= 0;\r\n\r\n var result = Array(length);\r\n while (++index < length) {\r\n result[index] = array[index + start];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.some` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} predicate The function invoked per iteration.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n */\r\n function baseSome(collection, predicate) {\r\n var result;\r\n\r\n baseEach(collection, function(value, index, collection) {\r\n result = predicate(value, index, collection);\r\n return !result;\r\n });\r\n return !!result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.toString` which doesn't convert nullish\r\n * values to empty strings.\r\n *\r\n * @private\r\n * @param {*} value The value to process.\r\n * @returns {string} Returns the string.\r\n */\r\n function baseToString(value) {\r\n // Exit early for strings to avoid a performance hit in some environments.\r\n if (typeof value == 'string') {\r\n return value;\r\n }\r\n if (isArray(value)) {\r\n // Recursively convert values (susceptible to call stack limits).\r\n return arrayMap(value, baseToString) + '';\r\n }\r\n if (isSymbol(value)) {\r\n return symbolToString ? symbolToString.call(value) : '';\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee] The iteratee invoked per element.\r\n * @param {Function} [comparator] The comparator invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n */\r\n function baseUniq(array, iteratee, comparator) {\r\n var index = -1,\r\n includes = arrayIncludes,\r\n length = array.length,\r\n isCommon = true,\r\n result = [],\r\n seen = result;\r\n\r\n if (comparator) {\r\n isCommon = false;\r\n includes = arrayIncludesWith;\r\n }\r\n else if (length >= LARGE_ARRAY_SIZE) {\r\n var set = iteratee ? null : createSet(array);\r\n if (set) {\r\n return setToArray(set);\r\n }\r\n isCommon = false;\r\n includes = cacheHas;\r\n seen = new SetCache;\r\n }\r\n else {\r\n seen = iteratee ? [] : result;\r\n }\r\n outer:\r\n while (++index < length) {\r\n var value = array[index],\r\n computed = iteratee ? iteratee(value) : value;\r\n\r\n value = (comparator || value !== 0) ? value : 0;\r\n if (isCommon && computed === computed) {\r\n var seenIndex = seen.length;\r\n while (seenIndex--) {\r\n if (seen[seenIndex] === computed) {\r\n continue outer;\r\n }\r\n }\r\n if (iteratee) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n else if (!includes(seen, computed, comparator)) {\r\n if (seen !== result) {\r\n seen.push(computed);\r\n }\r\n result.push(value);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * The base implementation of `_.unset`.\r\n *\r\n * @private\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The property path to unset.\r\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\r\n */\r\n function baseUnset(object, path) {\r\n path = castPath(path, object);\r\n object = parent(object, path);\r\n return object == null || delete object[toKey(last(path))];\r\n }\r\n\r\n /**\r\n * The base implementation of `wrapperValue` which returns the result of\r\n * performing a sequence of actions on the unwrapped `value`, where each\r\n * successive action is supplied the return value of the previous.\r\n *\r\n * @private\r\n * @param {*} value The unwrapped value.\r\n * @param {Array} actions Actions to perform to resolve the unwrapped value.\r\n * @returns {*} Returns the resolved value.\r\n */\r\n function baseWrapperValue(value, actions) {\r\n var result = value;\r\n if (result instanceof LazyWrapper) {\r\n result = result.value();\r\n }\r\n return arrayReduce(actions, function(result, action) {\r\n return action.func.apply(action.thisArg, arrayPush([result], action.args));\r\n }, result);\r\n }\r\n\r\n /**\r\n * This base implementation of `_.zipObject` which assigns values using `assignFunc`.\r\n *\r\n * @private\r\n * @param {Array} props The property identifiers.\r\n * @param {Array} values The property values.\r\n * @param {Function} assignFunc The function to assign values.\r\n * @returns {Object} Returns the new object.\r\n */\r\n function baseZipObject(props, values, assignFunc) {\r\n var index = -1,\r\n length = props.length,\r\n valsLength = values.length,\r\n result = {};\r\n\r\n while (++index < length) {\r\n var value = index < valsLength ? values[index] : undefined;\r\n assignFunc(result, props[index], value);\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Casts `value` to an empty array if it's not an array like object.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {Array|Object} Returns the cast array-like object.\r\n */\r\n function castArrayLikeObject(value) {\r\n return isArrayLikeObject(value) ? value : [];\r\n }\r\n\r\n /**\r\n * Casts `value` to a path array if it's not one.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {Array} Returns the cast property path array.\r\n */\r\n function castPath(value, object) {\r\n if (isArray(value)) {\r\n return value;\r\n }\r\n return isKey(value, object) ? [value] : stringToPath(toString(value));\r\n }\r\n\r\n /**\r\n * Casts `array` to a slice if it's needed.\r\n *\r\n * @private\r\n * @param {Array} array The array to inspect.\r\n * @param {number} start The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the cast slice.\r\n */\r\n function castSlice(array, start, end) {\r\n var length = array.length;\r\n end = end === undefined ? length : end;\r\n return (!start && end >= length) ? array : baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a clone of `buffer`.\r\n *\r\n * @private\r\n * @param {Buffer} buffer The buffer to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Buffer} Returns the cloned buffer.\r\n */\r\n function cloneBuffer(buffer, isDeep) {\r\n if (isDeep) {\r\n return buffer.slice();\r\n }\r\n var length = buffer.length,\r\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\r\n\r\n buffer.copy(result);\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `arrayBuffer`.\r\n *\r\n * @private\r\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\r\n * @returns {ArrayBuffer} Returns the cloned array buffer.\r\n */\r\n function cloneArrayBuffer(arrayBuffer) {\r\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\r\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of `dataView`.\r\n *\r\n * @private\r\n * @param {Object} dataView The data view to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned data view.\r\n */\r\n function cloneDataView(dataView, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\r\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\r\n }\r\n\r\n /**\r\n * Creates a clone of `regexp`.\r\n *\r\n * @private\r\n * @param {Object} regexp The regexp to clone.\r\n * @returns {Object} Returns the cloned regexp.\r\n */\r\n function cloneRegExp(regexp) {\r\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\r\n result.lastIndex = regexp.lastIndex;\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a clone of the `symbol` object.\r\n *\r\n * @private\r\n * @param {Object} symbol The symbol object to clone.\r\n * @returns {Object} Returns the cloned symbol object.\r\n */\r\n function cloneSymbol(symbol) {\r\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\r\n }\r\n\r\n /**\r\n * Creates a clone of `typedArray`.\r\n *\r\n * @private\r\n * @param {Object} typedArray The typed array to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the cloned typed array.\r\n */\r\n function cloneTypedArray(typedArray, isDeep) {\r\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\r\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\r\n }\r\n\r\n /**\r\n * Compares values to sort them in ascending order.\r\n *\r\n * @private\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {number} Returns the sort order indicator for `value`.\r\n */\r\n function compareAscending(value, other) {\r\n if (value !== other) {\r\n var valIsDefined = value !== undefined,\r\n valIsNull = value === null,\r\n valIsReflexive = value === value,\r\n valIsSymbol = isSymbol(value);\r\n\r\n var othIsDefined = other !== undefined,\r\n othIsNull = other === null,\r\n othIsReflexive = other === other,\r\n othIsSymbol = isSymbol(other);\r\n\r\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\r\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\r\n (valIsNull && othIsDefined && othIsReflexive) ||\r\n (!valIsDefined && othIsReflexive) ||\r\n !valIsReflexive) {\r\n return 1;\r\n }\r\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\r\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\r\n (othIsNull && valIsDefined && valIsReflexive) ||\r\n (!othIsDefined && valIsReflexive) ||\r\n !othIsReflexive) {\r\n return -1;\r\n }\r\n }\r\n return 0;\r\n }\r\n\r\n /**\r\n * Used by `_.orderBy` to compare multiple properties of a value to another\r\n * and stable sort them.\r\n *\r\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\r\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\r\n * of corresponding values.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {boolean[]|string[]} orders The order to sort by for each property.\r\n * @returns {number} Returns the sort order indicator for `object`.\r\n */\r\n function compareMultiple(object, other, orders) {\r\n var index = -1,\r\n objCriteria = object.criteria,\r\n othCriteria = other.criteria,\r\n length = objCriteria.length,\r\n ordersLength = orders.length;\r\n\r\n while (++index < length) {\r\n var result = compareAscending(objCriteria[index], othCriteria[index]);\r\n if (result) {\r\n if (index >= ordersLength) {\r\n return result;\r\n }\r\n var order = orders[index];\r\n return result * (order == 'desc' ? -1 : 1);\r\n }\r\n }\r\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\r\n // that causes it, under certain circumstances, to provide the same value for\r\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\r\n // for more details.\r\n //\r\n // This also ensures a stable sort in V8 and other engines.\r\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\r\n return object.index - other.index;\r\n }\r\n\r\n /**\r\n * Creates an array that is the composition of partially applied arguments,\r\n * placeholders, and provided arguments into a single array of arguments.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to prepend to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgs(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersLength = holders.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(leftLength + rangeLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++leftIndex < leftLength) {\r\n result[leftIndex] = partials[leftIndex];\r\n }\r\n while (++argsIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[holders[argsIndex]] = args[argsIndex];\r\n }\r\n }\r\n while (rangeLength--) {\r\n result[leftIndex++] = args[argsIndex++];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * This function is like `composeArgs` except that the arguments composition\r\n * is tailored for `_.partialRight`.\r\n *\r\n * @private\r\n * @param {Array} args The provided arguments.\r\n * @param {Array} partials The arguments to append to those provided.\r\n * @param {Array} holders The `partials` placeholder indexes.\r\n * @params {boolean} [isCurried] Specify composing for a curried function.\r\n * @returns {Array} Returns the new array of composed arguments.\r\n */\r\n function composeArgsRight(args, partials, holders, isCurried) {\r\n var argsIndex = -1,\r\n argsLength = args.length,\r\n holdersIndex = -1,\r\n holdersLength = holders.length,\r\n rightIndex = -1,\r\n rightLength = partials.length,\r\n rangeLength = nativeMax(argsLength - holdersLength, 0),\r\n result = Array(rangeLength + rightLength),\r\n isUncurried = !isCurried;\r\n\r\n while (++argsIndex < rangeLength) {\r\n result[argsIndex] = args[argsIndex];\r\n }\r\n var offset = argsIndex;\r\n while (++rightIndex < rightLength) {\r\n result[offset + rightIndex] = partials[rightIndex];\r\n }\r\n while (++holdersIndex < holdersLength) {\r\n if (isUncurried || argsIndex < argsLength) {\r\n result[offset + holders[holdersIndex]] = args[argsIndex++];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Copies the values of `source` to `array`.\r\n *\r\n * @private\r\n * @param {Array} source The array to copy values from.\r\n * @param {Array} [array=[]] The array to copy values to.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function copyArray(source, array) {\r\n var index = -1,\r\n length = source.length;\r\n\r\n array || (array = Array(length));\r\n while (++index < length) {\r\n array[index] = source[index];\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Copies properties of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy properties from.\r\n * @param {Array} props The property identifiers to copy.\r\n * @param {Object} [object={}] The object to copy properties to.\r\n * @param {Function} [customizer] The function to customize copied values.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copyObject(source, props, object, customizer) {\r\n var isNew = !object;\r\n object || (object = {});\r\n\r\n var index = -1,\r\n length = props.length;\r\n\r\n while (++index < length) {\r\n var key = props[index];\r\n\r\n var newValue = customizer\r\n ? customizer(object[key], source[key], key, object, source)\r\n : undefined;\r\n\r\n if (newValue === undefined) {\r\n newValue = source[key];\r\n }\r\n if (isNew) {\r\n baseAssignValue(object, key, newValue);\r\n } else {\r\n assignValue(object, key, newValue);\r\n }\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Copies own symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbols(source, object) {\r\n return copyObject(source, getSymbols(source), object);\r\n }\r\n\r\n /**\r\n * Copies own and inherited symbols of `source` to `object`.\r\n *\r\n * @private\r\n * @param {Object} source The object to copy symbols from.\r\n * @param {Object} [object={}] The object to copy symbols to.\r\n * @returns {Object} Returns `object`.\r\n */\r\n function copySymbolsIn(source, object) {\r\n return copyObject(source, getSymbolsIn(source), object);\r\n }\r\n\r\n /**\r\n * Creates a function like `_.groupBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} [initializer] The accumulator object initializer.\r\n * @returns {Function} Returns the new aggregator function.\r\n */\r\n function createAggregator(setter, initializer) {\r\n return function(collection, iteratee) {\r\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\r\n accumulator = initializer ? initializer() : {};\r\n\r\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function like `_.assign`.\r\n *\r\n * @private\r\n * @param {Function} assigner The function to assign values.\r\n * @returns {Function} Returns the new assigner function.\r\n */\r\n function createAssigner(assigner) {\r\n return baseRest(function(object, sources) {\r\n var index = -1,\r\n length = sources.length,\r\n customizer = length > 1 ? sources[length - 1] : undefined,\r\n guard = length > 2 ? sources[2] : undefined;\r\n\r\n customizer = (assigner.length > 3 && typeof customizer == 'function')\r\n ? (length--, customizer)\r\n : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n customizer = length < 3 ? undefined : customizer;\r\n length = 1;\r\n }\r\n object = Object(object);\r\n while (++index < length) {\r\n var source = sources[index];\r\n if (source) {\r\n assigner(object, source, index, customizer);\r\n }\r\n }\r\n return object;\r\n });\r\n }\r\n\r\n /**\r\n * Creates a `baseEach` or `baseEachRight` function.\r\n *\r\n * @private\r\n * @param {Function} eachFunc The function to iterate over a collection.\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseEach(eachFunc, fromRight) {\r\n return function(collection, iteratee) {\r\n if (collection == null) {\r\n return collection;\r\n }\r\n if (!isArrayLike(collection)) {\r\n return eachFunc(collection, iteratee);\r\n }\r\n var length = collection.length,\r\n index = fromRight ? length : -1,\r\n iterable = Object(collection);\r\n\r\n while ((fromRight ? index-- : ++index < length)) {\r\n if (iteratee(iterable[index], index, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return collection;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new base function.\r\n */\r\n function createBaseFor(fromRight) {\r\n return function(object, iteratee, keysFunc) {\r\n var index = -1,\r\n iterable = Object(object),\r\n props = keysFunc(object),\r\n length = props.length;\r\n\r\n while (length--) {\r\n var key = props[fromRight ? length : ++index];\r\n if (iteratee(iterable[key], key, iterable) === false) {\r\n break;\r\n }\r\n }\r\n return object;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the optional `this`\r\n * binding of `thisArg`.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createBind(func, bitmask, thisArg) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return fn.apply(isBind ? thisArg : this, arguments);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function that produces an instance of `Ctor` regardless of\r\n * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r\n *\r\n * @private\r\n * @param {Function} Ctor The constructor to wrap.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCtor(Ctor) {\r\n return function() {\r\n // Use a `switch` statement to work with class constructors. See\r\n // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r\n // for more details.\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return new Ctor;\r\n case 1: return new Ctor(args[0]);\r\n case 2: return new Ctor(args[0], args[1]);\r\n case 3: return new Ctor(args[0], args[1], args[2]);\r\n case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r\n case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r\n case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n }\r\n var thisBinding = baseCreate(Ctor.prototype),\r\n result = Ctor.apply(thisBinding, args);\r\n\r\n // Mimic the constructor's `return` behavior.\r\n // See https://es5.github.io/#x13.2.2 for more details.\r\n return isObject(result) ? result : thisBinding;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to enable currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {number} arity The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createCurry(func, bitmask, arity) {\r\n var Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length,\r\n placeholder = getHolder(wrapper);\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\r\n ? []\r\n : replaceHolders(args, placeholder);\r\n\r\n length -= holders.length;\r\n if (length < arity) {\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\r\n args, holders, undefined, undefined, arity - length);\r\n }\r\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n return apply(fn, this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.find` or `_.findLast` function.\r\n *\r\n * @private\r\n * @param {Function} findIndexFunc The function to find the collection index.\r\n * @returns {Function} Returns the new find function.\r\n */\r\n function createFind(findIndexFunc) {\r\n return function(collection, predicate, fromIndex) {\r\n var iterable = Object(collection);\r\n if (!isArrayLike(collection)) {\r\n var iteratee = baseIteratee(predicate, 3);\r\n collection = keys(collection);\r\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\r\n }\r\n var index = findIndexFunc(collection, predicate, fromIndex);\r\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with optional `this`\r\n * binding of `thisArg`, partial application, and currying.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [partialsRight] The arguments to append to those provided\r\n * to the new function.\r\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r\n var isAry = bitmask & WRAP_ARY_FLAG,\r\n isBind = bitmask & WRAP_BIND_FLAG,\r\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\r\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\r\n isFlip = bitmask & WRAP_FLIP_FLAG,\r\n Ctor = isBindKey ? undefined : createCtor(func);\r\n\r\n function wrapper() {\r\n var length = arguments.length,\r\n args = Array(length),\r\n index = length;\r\n\r\n while (index--) {\r\n args[index] = arguments[index];\r\n }\r\n if (isCurried) {\r\n var placeholder = getHolder(wrapper),\r\n holdersCount = countHolders(args, placeholder);\r\n }\r\n if (partials) {\r\n args = composeArgs(args, partials, holders, isCurried);\r\n }\r\n if (partialsRight) {\r\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\r\n }\r\n length -= holdersCount;\r\n if (isCurried && length < arity) {\r\n var newHolders = replaceHolders(args, placeholder);\r\n return createRecurry(\r\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\r\n args, newHolders, argPos, ary, arity - length\r\n );\r\n }\r\n var thisBinding = isBind ? thisArg : this,\r\n fn = isBindKey ? thisBinding[func] : func;\r\n\r\n length = args.length;\r\n if (argPos) {\r\n args = reorder(args, argPos);\r\n } else if (isFlip && length > 1) {\r\n args.reverse();\r\n }\r\n if (isAry && ary < length) {\r\n args.length = ary;\r\n }\r\n if (this && this !== root && this instanceof wrapper) {\r\n fn = Ctor || createCtor(fn);\r\n }\r\n return fn.apply(thisBinding, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a function like `_.invertBy`.\r\n *\r\n * @private\r\n * @param {Function} setter The function to set accumulator values.\r\n * @param {Function} toIteratee The function to resolve iteratees.\r\n * @returns {Function} Returns the new inverter function.\r\n */\r\n function createInverter(setter, toIteratee) {\r\n return function(object, iteratee) {\r\n return baseInverter(object, setter, toIteratee(iteratee), {});\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to invoke it with the `this` binding\r\n * of `thisArg` and `partials` prepended to the arguments it receives.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {Array} partials The arguments to prepend to those provided to\r\n * the new function.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createPartial(func, bitmask, thisArg, partials) {\r\n var isBind = bitmask & WRAP_BIND_FLAG,\r\n Ctor = createCtor(func);\r\n\r\n function wrapper() {\r\n var argsIndex = -1,\r\n argsLength = arguments.length,\r\n leftIndex = -1,\r\n leftLength = partials.length,\r\n args = Array(leftLength + argsLength),\r\n fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\r\n\r\n while (++leftIndex < leftLength) {\r\n args[leftIndex] = partials[leftIndex];\r\n }\r\n while (argsLength--) {\r\n args[leftIndex++] = arguments[++argsIndex];\r\n }\r\n return apply(fn, isBind ? thisArg : this, args);\r\n }\r\n return wrapper;\r\n }\r\n\r\n /**\r\n * Creates a `_.range` or `_.rangeRight` function.\r\n *\r\n * @private\r\n * @param {boolean} [fromRight] Specify iterating from right to left.\r\n * @returns {Function} Returns the new range function.\r\n */\r\n function createRange(fromRight) {\r\n return function(start, end, step) {\r\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\r\n end = step = undefined;\r\n }\r\n // Ensure the sign of `-0` is preserved.\r\n start = toFinite(start);\r\n if (end === undefined) {\r\n end = start;\r\n start = 0;\r\n } else {\r\n end = toFinite(end);\r\n }\r\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\r\n return baseRange(start, end, step, fromRight);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that wraps `func` to continue currying.\r\n *\r\n * @private\r\n * @param {Function} func The function to wrap.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @param {Function} wrapFunc The function to create the `func` wrapper.\r\n * @param {*} placeholder The placeholder value.\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to prepend to those provided to\r\n * the new function.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {\r\n var isCurry = bitmask & WRAP_CURRY_FLAG,\r\n newHolders = isCurry ? holders : undefined,\r\n newHoldersRight = isCurry ? undefined : holders,\r\n newPartials = isCurry ? partials : undefined,\r\n newPartialsRight = isCurry ? undefined : partials;\r\n\r\n bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);\r\n bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);\r\n\r\n if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {\r\n bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);\r\n }\r\n var newData = [\r\n func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,\r\n newHoldersRight, argPos, ary, arity\r\n ];\r\n\r\n var result = wrapFunc.apply(undefined, newData);\r\n if (isLaziable(func)) {\r\n setData(result, newData);\r\n }\r\n result.placeholder = placeholder;\r\n return setWrapToString(result, func, bitmask);\r\n }\r\n\r\n /**\r\n * Creates a set object of `values`.\r\n *\r\n * @private\r\n * @param {Array} values The values to add to the set.\r\n * @returns {Object} Returns the new set.\r\n */\r\n var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\r\n return new Set(values);\r\n };\r\n\r\n /**\r\n * Creates a function that either curries or invokes `func` with optional\r\n * `this` binding and partially applied arguments.\r\n *\r\n * @private\r\n * @param {Function|string} func The function or method name to wrap.\r\n * @param {number} bitmask The bitmask flags.\r\n * 1 - `_.bind`\r\n * 2 - `_.bindKey`\r\n * 4 - `_.curry` or `_.curryRight` of a bound function\r\n * 8 - `_.curry`\r\n * 16 - `_.curryRight`\r\n * 32 - `_.partial`\r\n * 64 - `_.partialRight`\r\n * 128 - `_.rearg`\r\n * 256 - `_.ary`\r\n * 512 - `_.flip`\r\n * @param {*} [thisArg] The `this` binding of `func`.\r\n * @param {Array} [partials] The arguments to be partially applied.\r\n * @param {Array} [holders] The `partials` placeholder indexes.\r\n * @param {Array} [argPos] The argument positions of the new function.\r\n * @param {number} [ary] The arity cap of `func`.\r\n * @param {number} [arity] The arity of `func`.\r\n * @returns {Function} Returns the new wrapped function.\r\n */\r\n function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r\n var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;\r\n if (!isBindKey && typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var length = partials ? partials.length : 0;\r\n if (!length) {\r\n bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);\r\n partials = holders = undefined;\r\n }\r\n ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);\r\n arity = arity === undefined ? arity : toInteger(arity);\r\n length -= holders ? holders.length : 0;\r\n\r\n if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {\r\n var partialsRight = partials,\r\n holdersRight = holders;\r\n\r\n partials = holders = undefined;\r\n }\r\n var data = isBindKey ? undefined : getData(func);\r\n\r\n var newData = [\r\n func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,\r\n argPos, ary, arity\r\n ];\r\n\r\n if (data) {\r\n mergeData(newData, data);\r\n }\r\n func = newData[0];\r\n bitmask = newData[1];\r\n thisArg = newData[2];\r\n partials = newData[3];\r\n holders = newData[4];\r\n arity = newData[9] = newData[9] === undefined\r\n ? (isBindKey ? 0 : func.length)\r\n : nativeMax(newData[9] - length, 0);\r\n\r\n if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {\r\n bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);\r\n }\r\n if (!bitmask || bitmask == WRAP_BIND_FLAG) {\r\n var result = createBind(func, bitmask, thisArg);\r\n } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {\r\n result = createCurry(func, bitmask, arity);\r\n } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {\r\n result = createPartial(func, bitmask, thisArg, partials);\r\n } else {\r\n result = createHybrid.apply(undefined, newData);\r\n }\r\n var setter = data ? baseSetData : setData;\r\n return setWrapToString(setter(result, newData), func, bitmask);\r\n }\r\n\r\n /**\r\n * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source\r\n * objects into destination objects that are passed thru.\r\n *\r\n * @private\r\n * @param {*} objValue The destination value.\r\n * @param {*} srcValue The source value.\r\n * @param {string} key The key of the property to merge.\r\n * @param {Object} object The parent object of `objValue`.\r\n * @param {Object} source The parent object of `srcValue`.\r\n * @param {Object} [stack] Tracks traversed source values and their merged\r\n * counterparts.\r\n * @returns {*} Returns the value to assign.\r\n */\r\n function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {\r\n if (isObject(objValue) && isObject(srcValue)) {\r\n // Recursively merge objects and arrays (susceptible to call stack limits).\r\n stack.set(srcValue, objValue);\r\n baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);\r\n stack['delete'](srcValue);\r\n }\r\n return objValue;\r\n }\r\n\r\n /**\r\n * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain\r\n * objects.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @param {string} key The key of the property to inspect.\r\n * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.\r\n */\r\n function customOmitClone(value) {\r\n return isPlainObject(value) ? undefined : value;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for arrays with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Array} array The array to compare.\r\n * @param {Array} other The other array to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `array` and `other` objects.\r\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r\n */\r\n function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n arrLength = array.length,\r\n othLength = other.length;\r\n\r\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(array);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var index = -1,\r\n result = true,\r\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\r\n\r\n stack.set(array, other);\r\n stack.set(other, array);\r\n\r\n // Ignore non-index properties.\r\n while (++index < arrLength) {\r\n var arrValue = array[index],\r\n othValue = other[index];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, arrValue, index, other, array, stack)\r\n : customizer(arrValue, othValue, index, array, other, stack);\r\n }\r\n if (compared !== undefined) {\r\n if (compared) {\r\n continue;\r\n }\r\n result = false;\r\n break;\r\n }\r\n // Recursively compare arrays (susceptible to call stack limits).\r\n if (seen) {\r\n if (!arraySome(other, function(othValue, othIndex) {\r\n if (!cacheHas(seen, othIndex) &&\r\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\r\n return seen.push(othIndex);\r\n }\r\n })) {\r\n result = false;\r\n break;\r\n }\r\n } else if (!(\r\n arrValue === othValue ||\r\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n }\r\n stack['delete'](array);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for comparing objects of\r\n * the same `toStringTag`.\r\n *\r\n * **Note:** This function only supports comparing values with tags of\r\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {string} tag The `toStringTag` of the objects to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\r\n switch (tag) {\r\n case dataViewTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n (object.byteOffset != other.byteOffset)) {\r\n return false;\r\n }\r\n object = object.buffer;\r\n other = other.buffer;\r\n\r\n case arrayBufferTag:\r\n if ((object.byteLength != other.byteLength) ||\r\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\r\n return false;\r\n }\r\n return true;\r\n\r\n case boolTag:\r\n case dateTag:\r\n case numberTag:\r\n // Coerce booleans to `1` or `0` and dates to milliseconds.\r\n // Invalid dates are coerced to `NaN`.\r\n return eq(+object, +other);\r\n\r\n case errorTag:\r\n return object.name == other.name && object.message == other.message;\r\n\r\n case regexpTag:\r\n case stringTag:\r\n // Coerce regexes to strings and treat strings, primitives and objects,\r\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\r\n // for more details.\r\n return object == (other + '');\r\n\r\n case mapTag:\r\n var convert = mapToArray;\r\n\r\n case setTag:\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\r\n convert || (convert = setToArray);\r\n\r\n if (object.size != other.size && !isPartial) {\r\n return false;\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked) {\r\n return stacked == other;\r\n }\r\n bitmask |= COMPARE_UNORDERED_FLAG;\r\n\r\n // Recursively compare objects (susceptible to call stack limits).\r\n stack.set(object, other);\r\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\r\n stack['delete'](object);\r\n return result;\r\n\r\n case symbolTag:\r\n if (symbolValueOf) {\r\n return symbolValueOf.call(object) == symbolValueOf.call(other);\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseIsEqualDeep` for objects with support for\r\n * partial deep comparisons.\r\n *\r\n * @private\r\n * @param {Object} object The object to compare.\r\n * @param {Object} other The other object to compare.\r\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\r\n * @param {Function} customizer The function to customize comparisons.\r\n * @param {Function} equalFunc The function to determine equivalents of values.\r\n * @param {Object} stack Tracks traversed `object` and `other` objects.\r\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r\n */\r\n function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\r\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\r\n objProps = getAllKeys(object),\r\n objLength = objProps.length,\r\n othProps = getAllKeys(other),\r\n othLength = othProps.length;\r\n\r\n if (objLength != othLength && !isPartial) {\r\n return false;\r\n }\r\n var index = objLength;\r\n while (index--) {\r\n var key = objProps[index];\r\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\r\n return false;\r\n }\r\n }\r\n // Assume cyclic values are equal.\r\n var stacked = stack.get(object);\r\n if (stacked && stack.get(other)) {\r\n return stacked == other;\r\n }\r\n var result = true;\r\n stack.set(object, other);\r\n stack.set(other, object);\r\n\r\n var skipCtor = isPartial;\r\n while (++index < objLength) {\r\n key = objProps[index];\r\n var objValue = object[key],\r\n othValue = other[key];\r\n\r\n if (customizer) {\r\n var compared = isPartial\r\n ? customizer(othValue, objValue, key, other, object, stack)\r\n : customizer(objValue, othValue, key, object, other, stack);\r\n }\r\n // Recursively compare objects (susceptible to call stack limits).\r\n if (!(compared === undefined\r\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\r\n : compared\r\n )) {\r\n result = false;\r\n break;\r\n }\r\n skipCtor || (skipCtor = key == 'constructor');\r\n }\r\n if (result && !skipCtor) {\r\n var objCtor = object.constructor,\r\n othCtor = other.constructor;\r\n\r\n // Non `Object` object instances with different constructors are not equal.\r\n if (objCtor != othCtor &&\r\n ('constructor' in object && 'constructor' in other) &&\r\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r\n result = false;\r\n }\r\n }\r\n stack['delete'](object);\r\n stack['delete'](other);\r\n return result;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which flattens the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function flatRest(func) {\r\n return setToString(overRest(func, undefined, flatten), func + '');\r\n }\r\n\r\n /**\r\n * Creates an array of own enumerable property names and symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeys(object) {\r\n return baseGetAllKeys(object, keys, getSymbols);\r\n }\r\n\r\n /**\r\n * Creates an array of own and inherited enumerable property names and\r\n * symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names and symbols.\r\n */\r\n function getAllKeysIn(object) {\r\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\r\n }\r\n\r\n /**\r\n * Gets metadata for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {*} Returns the metadata for `func`.\r\n */\r\n var getData = !metaMap ? noop : function(func) {\r\n return metaMap.get(func);\r\n };\r\n\r\n /**\r\n * Gets the name of `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to query.\r\n * @returns {string} Returns the function name.\r\n */\r\n function getFuncName(func) {\r\n var result = (func.name + ''),\r\n array = realNames[result],\r\n length = hasOwnProperty.call(realNames, result) ? array.length : 0;\r\n\r\n while (length--) {\r\n var data = array[length],\r\n otherFunc = data.func;\r\n if (otherFunc == null || otherFunc == func) {\r\n return data.name;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the argument placeholder value for `func`.\r\n *\r\n * @private\r\n * @param {Function} func The function to inspect.\r\n * @returns {*} Returns the placeholder value.\r\n */\r\n function getHolder(func) {\r\n var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;\r\n return object.placeholder;\r\n }\r\n\r\n /**\r\n * Gets the data for `map`.\r\n *\r\n * @private\r\n * @param {Object} map The map to query.\r\n * @param {string} key The reference key.\r\n * @returns {*} Returns the map data.\r\n */\r\n function getMapData(map, key) {\r\n var data = map.__data__;\r\n return isKeyable(key)\r\n ? data[typeof key == 'string' ? 'string' : 'hash']\r\n : data.map;\r\n }\r\n\r\n /**\r\n * Gets the property names, values, and compare flags of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the match data of `object`.\r\n */\r\n function getMatchData(object) {\r\n var result = keys(object),\r\n length = result.length;\r\n\r\n while (length--) {\r\n var key = result[length],\r\n value = object[key];\r\n\r\n result[length] = [key, value, isStrictComparable(value)];\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Gets the native function at `key` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {string} key The key of the method to get.\r\n * @returns {*} Returns the function if it's native, else `undefined`.\r\n */\r\n function getNative(object, key) {\r\n var value = getValue(object, key);\r\n return baseIsNative(value) ? value : undefined;\r\n }\r\n\r\n /**\r\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the raw `toStringTag`.\r\n */\r\n function getRawTag(value) {\r\n var isOwn = hasOwnProperty.call(value, symToStringTag),\r\n tag = value[symToStringTag];\r\n\r\n try {\r\n value[symToStringTag] = undefined;\r\n var unmasked = true;\r\n } catch (e) {}\r\n\r\n var result = nativeObjectToString.call(value);\r\n if (unmasked) {\r\n if (isOwn) {\r\n value[symToStringTag] = tag;\r\n } else {\r\n delete value[symToStringTag];\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbols = !nativeGetSymbols ? stubArray : function(object) {\r\n if (object == null) {\r\n return [];\r\n }\r\n object = Object(object);\r\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\r\n return propertyIsEnumerable.call(object, symbol);\r\n });\r\n };\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable symbols of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of symbols.\r\n */\r\n var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\r\n var result = [];\r\n while (object) {\r\n arrayPush(result, getSymbols(object));\r\n object = getPrototype(object);\r\n }\r\n return result;\r\n };\r\n\r\n /**\r\n * Gets the `toStringTag` of `value`.\r\n *\r\n * @private\r\n * @param {*} value The value to query.\r\n * @returns {string} Returns the `toStringTag`.\r\n */\r\n var getTag = baseGetTag;\r\n\r\n // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\r\n if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\r\n (Map && getTag(new Map) != mapTag) ||\r\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\r\n (Set && getTag(new Set) != setTag) ||\r\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\r\n getTag = function(value) {\r\n var result = baseGetTag(value),\r\n Ctor = result == objectTag ? value.constructor : undefined,\r\n ctorString = Ctor ? toSource(Ctor) : '';\r\n\r\n if (ctorString) {\r\n switch (ctorString) {\r\n case dataViewCtorString: return dataViewTag;\r\n case mapCtorString: return mapTag;\r\n case promiseCtorString: return promiseTag;\r\n case setCtorString: return setTag;\r\n case weakMapCtorString: return weakMapTag;\r\n }\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Gets the view, applying any `transforms` to the `start` and `end` positions.\r\n *\r\n * @private\r\n * @param {number} start The start of the view.\r\n * @param {number} end The end of the view.\r\n * @param {Array} transforms The transformations to apply to the view.\r\n * @returns {Object} Returns an object containing the `start` and `end`\r\n * positions of the view.\r\n */\r\n function getView(start, end, transforms) {\r\n var index = -1,\r\n length = transforms.length;\r\n\r\n while (++index < length) {\r\n var data = transforms[index],\r\n size = data.size;\r\n\r\n switch (data.type) {\r\n case 'drop': start += size; break;\r\n case 'dropRight': end -= size; break;\r\n case 'take': end = nativeMin(end, start + size); break;\r\n case 'takeRight': start = nativeMax(start, end - size); break;\r\n }\r\n }\r\n return { 'start': start, 'end': end };\r\n }\r\n\r\n /**\r\n * Extracts wrapper details from the `source` body comment.\r\n *\r\n * @private\r\n * @param {string} source The source to inspect.\r\n * @returns {Array} Returns the wrapper details.\r\n */\r\n function getWrapDetails(source) {\r\n var match = source.match(reWrapDetails);\r\n return match ? match[1].split(reSplitDetails) : [];\r\n }\r\n\r\n /**\r\n * Checks if `path` exists on `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @param {Function} hasFunc The function to check properties.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n */\r\n function hasPath(object, path, hasFunc) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length,\r\n result = false;\r\n\r\n while (++index < length) {\r\n var key = toKey(path[index]);\r\n if (!(result = object != null && hasFunc(object, key))) {\r\n break;\r\n }\r\n object = object[key];\r\n }\r\n if (result || ++index != length) {\r\n return result;\r\n }\r\n length = object == null ? 0 : object.length;\r\n return !!length && isLength(length) && isIndex(key, length) &&\r\n (isArray(object) || isArguments(object));\r\n }\r\n\r\n /**\r\n * Initializes an array clone.\r\n *\r\n * @private\r\n * @param {Array} array The array to clone.\r\n * @returns {Array} Returns the initialized clone.\r\n */\r\n function initCloneArray(array) {\r\n var length = array.length,\r\n result = new array.constructor(length);\r\n\r\n // Add properties assigned by `RegExp#exec`.\r\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r\n result.index = array.index;\r\n result.input = array.input;\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Initializes an object clone.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneObject(object) {\r\n return (typeof object.constructor == 'function' && !isPrototype(object))\r\n ? baseCreate(getPrototype(object))\r\n : {};\r\n }\r\n\r\n /**\r\n * Initializes an object clone based on its `toStringTag`.\r\n *\r\n * **Note:** This function only supports cloning values with tags of\r\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\r\n *\r\n * @private\r\n * @param {Object} object The object to clone.\r\n * @param {string} tag The `toStringTag` of the object to clone.\r\n * @param {boolean} [isDeep] Specify a deep clone.\r\n * @returns {Object} Returns the initialized clone.\r\n */\r\n function initCloneByTag(object, tag, isDeep) {\r\n var Ctor = object.constructor;\r\n switch (tag) {\r\n case arrayBufferTag:\r\n return cloneArrayBuffer(object);\r\n\r\n case boolTag:\r\n case dateTag:\r\n return new Ctor(+object);\r\n\r\n case dataViewTag:\r\n return cloneDataView(object, isDeep);\r\n\r\n case float32Tag: case float64Tag:\r\n case int8Tag: case int16Tag: case int32Tag:\r\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r\n return cloneTypedArray(object, isDeep);\r\n\r\n case mapTag:\r\n return new Ctor;\r\n\r\n case numberTag:\r\n case stringTag:\r\n return new Ctor(object);\r\n\r\n case regexpTag:\r\n return cloneRegExp(object);\r\n\r\n case setTag:\r\n return new Ctor;\r\n\r\n case symbolTag:\r\n return cloneSymbol(object);\r\n }\r\n }\r\n\r\n /**\r\n * Inserts wrapper `details` in a comment at the top of the `source` body.\r\n *\r\n * @private\r\n * @param {string} source The source to modify.\r\n * @returns {Array} details The details to insert.\r\n * @returns {string} Returns the modified source.\r\n */\r\n function insertWrapDetails(source, details) {\r\n var length = details.length;\r\n if (!length) {\r\n return source;\r\n }\r\n var lastIndex = length - 1;\r\n details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];\r\n details = details.join(length > 2 ? ', ' : ' ');\r\n return source.replace(reWrapComment, '{\\n/* [wrapped with ' + details + '] */\\n');\r\n }\r\n\r\n /**\r\n * Checks if `value` is a flattenable `arguments` object or array.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\r\n */\r\n function isFlattenable(value) {\r\n return isArray(value) || isArguments(value) ||\r\n !!(spreadableSymbol && value && value[spreadableSymbol]);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like index.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r\n */\r\n function isIndex(value, length) {\r\n var type = typeof value;\r\n length = length == null ? MAX_SAFE_INTEGER : length;\r\n\r\n return !!length &&\r\n (type == 'number' ||\r\n (type != 'symbol' && reIsUint.test(value))) &&\r\n (value > -1 && value % 1 == 0 && value < length);\r\n }\r\n\r\n /**\r\n * Checks if the given arguments are from an iteratee call.\r\n *\r\n * @private\r\n * @param {*} value The potential iteratee value argument.\r\n * @param {*} index The potential iteratee index or key argument.\r\n * @param {*} object The potential iteratee object argument.\r\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\r\n * else `false`.\r\n */\r\n function isIterateeCall(value, index, object) {\r\n if (!isObject(object)) {\r\n return false;\r\n }\r\n var type = typeof index;\r\n if (type == 'number'\r\n ? (isArrayLike(object) && isIndex(index, object.length))\r\n : (type == 'string' && index in object)\r\n ) {\r\n return eq(object[index], value);\r\n }\r\n return false;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a property name and not a property path.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @param {Object} [object] The object to query keys on.\r\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r\n */\r\n function isKey(value, object) {\r\n if (isArray(value)) {\r\n return false;\r\n }\r\n var type = typeof value;\r\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\r\n value == null || isSymbol(value)) {\r\n return true;\r\n }\r\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\r\n (object != null && value in Object(object));\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for use as unique object key.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\r\n */\r\n function isKeyable(value) {\r\n var type = typeof value;\r\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\r\n ? (value !== '__proto__')\r\n : (value === null);\r\n }\r\n\r\n /**\r\n * Checks if `func` has a lazy counterpart.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` has a lazy counterpart,\r\n * else `false`.\r\n */\r\n function isLaziable(func) {\r\n var funcName = getFuncName(func),\r\n other = lodash[funcName];\r\n\r\n if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r\n return false;\r\n }\r\n if (func === other) {\r\n return true;\r\n }\r\n var data = getData(other);\r\n return !!data && func === data[0];\r\n }\r\n\r\n /**\r\n * Checks if `func` has its source masked.\r\n *\r\n * @private\r\n * @param {Function} func The function to check.\r\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\r\n */\r\n function isMasked(func) {\r\n return !!maskSrcKey && (maskSrcKey in func);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely a prototype object.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\r\n */\r\n function isPrototype(value) {\r\n var Ctor = value && value.constructor,\r\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\r\n\r\n return value === proto;\r\n }\r\n\r\n /**\r\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` if suitable for strict\r\n * equality comparisons, else `false`.\r\n */\r\n function isStrictComparable(value) {\r\n return value === value && !isObject(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `matchesProperty` for source values suitable\r\n * for strict equality comparisons, i.e. `===`.\r\n *\r\n * @private\r\n * @param {string} key The key of the property to get.\r\n * @param {*} srcValue The value to match.\r\n * @returns {Function} Returns the new spec function.\r\n */\r\n function matchesStrictComparable(key, srcValue) {\r\n return function(object) {\r\n if (object == null) {\r\n return false;\r\n }\r\n return object[key] === srcValue &&\r\n (srcValue !== undefined || (key in Object(object)));\r\n };\r\n }\r\n\r\n /**\r\n * A specialized version of `_.memoize` which clears the memoized function's\r\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\r\n *\r\n * @private\r\n * @param {Function} func The function to have its output memoized.\r\n * @returns {Function} Returns the new memoized function.\r\n */\r\n function memoizeCapped(func) {\r\n var result = memoize(func, function(key) {\r\n if (cache.size === MAX_MEMOIZE_SIZE) {\r\n cache.clear();\r\n }\r\n return key;\r\n });\r\n\r\n var cache = result.cache;\r\n return result;\r\n }\r\n\r\n /**\r\n * Merges the function metadata of `source` into `data`.\r\n *\r\n * Merging metadata reduces the number of wrappers used to invoke a function.\r\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r\n * may be applied regardless of execution order. Methods like `_.ary` and\r\n * `_.rearg` modify function arguments, making the order in which they are\r\n * executed important, preventing the merging of metadata. However, we make\r\n * an exception for a safe combined case where curried functions have `_.ary`\r\n * and or `_.rearg` applied.\r\n *\r\n * @private\r\n * @param {Array} data The destination metadata.\r\n * @param {Array} source The source metadata.\r\n * @returns {Array} Returns `data`.\r\n */\r\n function mergeData(data, source) {\r\n var bitmask = data[1],\r\n srcBitmask = source[1],\r\n newBitmask = bitmask | srcBitmask,\r\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\r\n\r\n var isCombo =\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\r\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\r\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\r\n\r\n // Exit early if metadata can't be merged.\r\n if (!(isCommon || isCombo)) {\r\n return data;\r\n }\r\n // Use source `thisArg` if available.\r\n if (srcBitmask & WRAP_BIND_FLAG) {\r\n data[2] = source[2];\r\n // Set when currying a bound function.\r\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\r\n }\r\n // Compose partial arguments.\r\n var value = source[3];\r\n if (value) {\r\n var partials = data[3];\r\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\r\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\r\n }\r\n // Compose partial right arguments.\r\n value = source[5];\r\n if (value) {\r\n partials = data[5];\r\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\r\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\r\n }\r\n // Use source `argPos` if available.\r\n value = source[7];\r\n if (value) {\r\n data[7] = value;\r\n }\r\n // Use source `ary` if it's smaller.\r\n if (srcBitmask & WRAP_ARY_FLAG) {\r\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r\n }\r\n // Use source `arity` if one is not provided.\r\n if (data[9] == null) {\r\n data[9] = source[9];\r\n }\r\n // Use source `func` and merge bitmasks.\r\n data[0] = source[0];\r\n data[1] = newBitmask;\r\n\r\n return data;\r\n }\r\n\r\n /**\r\n * This function is like\r\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * except that it includes inherited enumerable properties.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n */\r\n function nativeKeysIn(object) {\r\n var result = [];\r\n if (object != null) {\r\n for (var key in Object(object)) {\r\n result.push(key);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Converts `value` to a string using `Object.prototype.toString`.\r\n *\r\n * @private\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n */\r\n function objectToString(value) {\r\n return nativeObjectToString.call(value);\r\n }\r\n\r\n /**\r\n * A specialized version of `baseRest` which transforms the rest array.\r\n *\r\n * @private\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @param {Function} transform The rest array transform.\r\n * @returns {Function} Returns the new function.\r\n */\r\n function overRest(func, start, transform) {\r\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\r\n return function() {\r\n var args = arguments,\r\n index = -1,\r\n length = nativeMax(args.length - start, 0),\r\n array = Array(length);\r\n\r\n while (++index < length) {\r\n array[index] = args[start + index];\r\n }\r\n index = -1;\r\n var otherArgs = Array(start + 1);\r\n while (++index < start) {\r\n otherArgs[index] = args[index];\r\n }\r\n otherArgs[start] = transform(array);\r\n return apply(func, this, otherArgs);\r\n };\r\n }\r\n\r\n /**\r\n * Gets the parent value at `path` of `object`.\r\n *\r\n * @private\r\n * @param {Object} object The object to query.\r\n * @param {Array} path The path to get the parent value of.\r\n * @returns {*} Returns the parent value.\r\n */\r\n function parent(object, path) {\r\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\r\n }\r\n\r\n /**\r\n * Reorder `array` according to the specified indexes where the element at\r\n * the first index is assigned as the first element, the element at\r\n * the second index is assigned as the second element, and so on.\r\n *\r\n * @private\r\n * @param {Array} array The array to reorder.\r\n * @param {Array} indexes The arranged array indexes.\r\n * @returns {Array} Returns `array`.\r\n */\r\n function reorder(array, indexes) {\r\n var arrLength = array.length,\r\n length = nativeMin(indexes.length, arrLength),\r\n oldArray = copyArray(array);\r\n\r\n while (length--) {\r\n var index = indexes[length];\r\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r\n }\r\n return array;\r\n }\r\n\r\n /**\r\n * Sets metadata for `func`.\r\n *\r\n * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r\n * period of time, it will trip its breaker and transition to an identity\r\n * function to avoid garbage collection pauses in V8. See\r\n * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)\r\n * for more details.\r\n *\r\n * @private\r\n * @param {Function} func The function to associate metadata with.\r\n * @param {*} data The metadata.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setData = shortOut(baseSetData);\r\n\r\n /**\r\n * Sets the `toString` method of `func` to return `string`.\r\n *\r\n * @private\r\n * @param {Function} func The function to modify.\r\n * @param {Function} string The `toString` result.\r\n * @returns {Function} Returns `func`.\r\n */\r\n var setToString = shortOut(baseSetToString);\r\n\r\n /**\r\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\r\n * with wrapper details in a comment at the top of the source body.\r\n *\r\n * @private\r\n * @param {Function} wrapper The function to modify.\r\n * @param {Function} reference The reference function.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Function} Returns `wrapper`.\r\n */\r\n function setWrapToString(wrapper, reference, bitmask) {\r\n var source = (reference + '');\r\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\r\n }\r\n\r\n /**\r\n * Creates a function that'll short out and invoke `identity` instead\r\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\r\n * milliseconds.\r\n *\r\n * @private\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new shortable function.\r\n */\r\n function shortOut(func) {\r\n var count = 0,\r\n lastCalled = 0;\r\n\r\n return function() {\r\n var stamp = nativeNow(),\r\n remaining = HOT_SPAN - (stamp - lastCalled);\r\n\r\n lastCalled = stamp;\r\n if (remaining > 0) {\r\n if (++count >= HOT_COUNT) {\r\n return arguments[0];\r\n }\r\n } else {\r\n count = 0;\r\n }\r\n return func.apply(undefined, arguments);\r\n };\r\n }\r\n\r\n /**\r\n * Converts `string` to a property path array.\r\n *\r\n * @private\r\n * @param {string} string The string to convert.\r\n * @returns {Array} Returns the property path array.\r\n */\r\n var stringToPath = memoizeCapped(function(string) {\r\n var result = [];\r\n if (string.charCodeAt(0) === 46 /* . */) {\r\n result.push('');\r\n }\r\n string.replace(rePropName, function(match, number, quote, subString) {\r\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\r\n });\r\n return result;\r\n });\r\n\r\n /**\r\n * Converts `value` to a string key if it's not a string or symbol.\r\n *\r\n * @private\r\n * @param {*} value The value to inspect.\r\n * @returns {string|symbol} Returns the key.\r\n */\r\n function toKey(value) {\r\n if (typeof value == 'string' || isSymbol(value)) {\r\n return value;\r\n }\r\n var result = (value + '');\r\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\r\n }\r\n\r\n /**\r\n * Converts `func` to its source code.\r\n *\r\n * @private\r\n * @param {Function} func The function to convert.\r\n * @returns {string} Returns the source code.\r\n */\r\n function toSource(func) {\r\n if (func != null) {\r\n try {\r\n return funcToString.call(func);\r\n } catch (e) {}\r\n try {\r\n return (func + '');\r\n } catch (e) {}\r\n }\r\n return '';\r\n }\r\n\r\n /**\r\n * Updates wrapper `details` based on `bitmask` flags.\r\n *\r\n * @private\r\n * @returns {Array} details The details to modify.\r\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\r\n * @returns {Array} Returns `details`.\r\n */\r\n function updateWrapDetails(details, bitmask) {\r\n arrayEach(wrapFlags, function(pair) {\r\n var value = '_.' + pair[0];\r\n if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {\r\n details.push(value);\r\n }\r\n });\r\n return details.sort();\r\n }\r\n\r\n /**\r\n * Creates a clone of `wrapper`.\r\n *\r\n * @private\r\n * @param {Object} wrapper The wrapper to clone.\r\n * @returns {Object} Returns the cloned wrapper.\r\n */\r\n function wrapperClone(wrapper) {\r\n if (wrapper instanceof LazyWrapper) {\r\n return wrapper.clone();\r\n }\r\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\r\n result.__actions__ = copyArray(wrapper.__actions__);\r\n result.__index__ = wrapper.__index__;\r\n result.__values__ = wrapper.__values__;\r\n return result;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an array with all falsey values removed. The values `false`, `null`,\r\n * `0`, `\"\"`, `undefined`, and `NaN` are falsey.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to compact.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @example\r\n *\r\n * _.compact([0, 1, false, 2, '', 3]);\r\n * // => [1, 2, 3]\r\n */\r\n function compact(array) {\r\n var index = -1,\r\n length = array == null ? 0 : array.length,\r\n resIndex = 0,\r\n result = [];\r\n\r\n while (++index < length) {\r\n var value = array[index];\r\n if (value) {\r\n result[resIndex++] = value;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n /**\r\n * Creates a new array concatenating `array` with any additional arrays\r\n * and/or values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to concatenate.\r\n * @param {...*} [values] The values to concatenate.\r\n * @returns {Array} Returns the new concatenated array.\r\n * @example\r\n *\r\n * var array = [1];\r\n * var other = _.concat(array, 2, [3], [[4]]);\r\n *\r\n * console.log(other);\r\n * // => [1, 2, 3, [4]]\r\n *\r\n * console.log(array);\r\n * // => [1]\r\n */\r\n function concat() {\r\n var length = arguments.length;\r\n if (!length) {\r\n return [];\r\n }\r\n var args = Array(length - 1),\r\n array = arguments[0],\r\n index = length;\r\n\r\n while (index--) {\r\n args[index - 1] = arguments[index];\r\n }\r\n return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));\r\n }\r\n\r\n /**\r\n * Creates an array of `array` values not included in the other given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...Array} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.without, _.xor\r\n * @example\r\n *\r\n * _.difference([2, 1], [2, 3]);\r\n * // => [1]\r\n */\r\n var difference = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements dropped from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to drop.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.drop([1, 2, 3]);\r\n * // => [2, 3]\r\n *\r\n * _.drop([1, 2, 3], 2);\r\n * // => [3]\r\n *\r\n * _.drop([1, 2, 3], 5);\r\n * // => []\r\n *\r\n * _.drop([1, 2, 3], 0);\r\n * // => [1, 2, 3]\r\n */\r\n function drop(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the index of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': false },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': true }\r\n * ];\r\n *\r\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\r\n * // => 0\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findIndex(users, { 'user': 'fred', 'active': false });\r\n * // => 1\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findIndex(users, ['active', false]);\r\n * // => 0\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findIndex(users, 'active');\r\n * // => 2\r\n */\r\n function findIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\r\n }\r\n\r\n /**\r\n * This method is like `_.findIndex` except that it iterates over elements\r\n * of `collection` from right to left.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=array.length-1] The index to search from.\r\n * @returns {number} Returns the index of the found element, else `-1`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false },\r\n * { 'user': 'pebbles', 'active': false }\r\n * ];\r\n *\r\n * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });\r\n * // => 2\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastIndex(users, { 'user': 'barney', 'active': true });\r\n * // => 0\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastIndex(users, ['active', false]);\r\n * // => 2\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastIndex(users, 'active');\r\n * // => 0\r\n */\r\n function findLastIndex(array, predicate, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = length - 1;\r\n if (fromIndex !== undefined) {\r\n index = toInteger(fromIndex);\r\n index = fromIndex < 0\r\n ? nativeMax(length + index, 0)\r\n : nativeMin(index, length - 1);\r\n }\r\n return baseFindIndex(array, baseIteratee(predicate, 3), index, true);\r\n }\r\n\r\n /**\r\n * Flattens `array` a single level deep.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flatten([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, [3, [4]], 5]\r\n */\r\n function flatten(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, 1) : [];\r\n }\r\n\r\n /**\r\n * Recursively flattens `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to flatten.\r\n * @returns {Array} Returns the new flattened array.\r\n * @example\r\n *\r\n * _.flattenDeep([1, [2, [3, [4]], 5]]);\r\n * // => [1, 2, 3, 4, 5]\r\n */\r\n function flattenDeep(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseFlatten(array, INFINITY) : [];\r\n }\r\n\r\n /**\r\n * Gets the first element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias first\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the first element of `array`.\r\n * @example\r\n *\r\n * _.head([1, 2, 3]);\r\n * // => 1\r\n *\r\n * _.head([]);\r\n * // => undefined\r\n */\r\n function head(array) {\r\n return (array && array.length) ? array[0] : undefined;\r\n }\r\n\r\n /**\r\n * Gets the index at which the first occurrence of `value` is found in `array`\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. If `fromIndex` is negative, it's used as the\r\n * offset from the end of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {*} value The value to search for.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {number} Returns the index of the matched value, else `-1`.\r\n * @example\r\n *\r\n * _.indexOf([1, 2, 1, 2], 2);\r\n * // => 1\r\n *\r\n * // Search from the `fromIndex`.\r\n * _.indexOf([1, 2, 1, 2], 2, 2);\r\n * // => 3\r\n */\r\n function indexOf(array, value, fromIndex) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return -1;\r\n }\r\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\r\n if (index < 0) {\r\n index = nativeMax(length + index, 0);\r\n }\r\n return baseIndexOf(array, value, index);\r\n }\r\n\r\n /**\r\n * Gets all but the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.initial([1, 2, 3]);\r\n * // => [1, 2]\r\n */\r\n function initial(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? baseSlice(array, 0, -1) : [];\r\n }\r\n\r\n /**\r\n * Creates an array of unique values that are included in all given arrays\r\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons. The order and references of result values are\r\n * determined by the first array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of intersecting values.\r\n * @example\r\n *\r\n * _.intersection([2, 1], [2, 3]);\r\n * // => [2]\r\n */\r\n var intersection = baseRest(function(arrays) {\r\n var mapped = arrayMap(arrays, castArrayLikeObject);\r\n return (mapped.length && mapped[0] === arrays[0])\r\n ? baseIntersection(mapped)\r\n : [];\r\n });\r\n\r\n /**\r\n * Gets the last element of `array`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {*} Returns the last element of `array`.\r\n * @example\r\n *\r\n * _.last([1, 2, 3]);\r\n * // => 3\r\n */\r\n function last(array) {\r\n var length = array == null ? 0 : array.length;\r\n return length ? array[length - 1] : undefined;\r\n }\r\n\r\n /**\r\n * Reverses `array` so that the first element becomes the last, the second\r\n * element becomes the second to last, and so on.\r\n *\r\n * **Note:** This method mutates `array` and is based on\r\n * [`Array#reverse`](https://mdn.io/Array/reverse).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to modify.\r\n * @returns {Array} Returns `array`.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _.reverse(array);\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function reverse(array) {\r\n return array == null ? array : nativeReverse.call(array);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` from `start` up to, but not including, `end`.\r\n *\r\n * **Note:** This method is used instead of\r\n * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are\r\n * returned.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to slice.\r\n * @param {number} [start=0] The start position.\r\n * @param {number} [end=array.length] The end position.\r\n * @returns {Array} Returns the slice of `array`.\r\n */\r\n function slice(array, start, end) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {\r\n start = 0;\r\n end = length;\r\n }\r\n else {\r\n start = start == null ? 0 : toInteger(start);\r\n end = end === undefined ? length : toInteger(end);\r\n }\r\n return baseSlice(array, start, end);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the beginning.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.take([1, 2, 3]);\r\n * // => [1]\r\n *\r\n * _.take([1, 2, 3], 2);\r\n * // => [1, 2]\r\n *\r\n * _.take([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.take([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function take(array, n, guard) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n return baseSlice(array, 0, n < 0 ? 0 : n);\r\n }\r\n\r\n /**\r\n * Creates a slice of `array` with `n` elements taken from the end.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @param {number} [n=1] The number of elements to take.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * _.takeRight([1, 2, 3]);\r\n * // => [3]\r\n *\r\n * _.takeRight([1, 2, 3], 2);\r\n * // => [2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 5);\r\n * // => [1, 2, 3]\r\n *\r\n * _.takeRight([1, 2, 3], 0);\r\n * // => []\r\n */\r\n function takeRight(array, n, guard) {\r\n var length = array == null ? 0 : array.length;\r\n if (!length) {\r\n return [];\r\n }\r\n n = (guard || n === undefined) ? 1 : toInteger(n);\r\n n = length - n;\r\n return baseSlice(array, n < 0 ? 0 : n, length);\r\n }\r\n\r\n /**\r\n * Creates an array of unique values, in order, from all given arrays using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to inspect.\r\n * @returns {Array} Returns the new array of combined values.\r\n * @example\r\n *\r\n * _.union([2], [1, 2]);\r\n * // => [2, 1]\r\n */\r\n var union = baseRest(function(arrays) {\r\n return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));\r\n });\r\n\r\n /**\r\n * Creates a duplicate-free version of an array, using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons, in which only the first occurrence of each element\r\n * is kept. The order of result values is determined by the order they occur\r\n * in the array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniq([2, 1, 2]);\r\n * // => [2, 1]\r\n */\r\n function uniq(array) {\r\n return (array && array.length) ? baseUniq(array) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.uniq` except that it accepts `iteratee` which is\r\n * invoked for each element in `array` to generate the criterion by which\r\n * uniqueness is computed. The order of result values is determined by the\r\n * order they occur in the array. The iteratee is invoked with one argument:\r\n * (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Array} Returns the new duplicate free array.\r\n * @example\r\n *\r\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\r\n * // => [2.1, 1.2]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\r\n * // => [{ 'x': 1 }, { 'x': 2 }]\r\n */\r\n function uniqBy(array, iteratee) {\r\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\r\n }\r\n\r\n /**\r\n * This method is like `_.zip` except that it accepts an array of grouped\r\n * elements and creates an array regrouping the elements to their pre-zip\r\n * configuration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.2.0\r\n * @category Array\r\n * @param {Array} array The array of grouped elements to process.\r\n * @returns {Array} Returns the new array of regrouped elements.\r\n * @example\r\n *\r\n * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n *\r\n * _.unzip(zipped);\r\n * // => [['a', 'b'], [1, 2], [true, false]]\r\n */\r\n function unzip(array) {\r\n if (!(array && array.length)) {\r\n return [];\r\n }\r\n var length = 0;\r\n array = arrayFilter(array, function(group) {\r\n if (isArrayLikeObject(group)) {\r\n length = nativeMax(group.length, length);\r\n return true;\r\n }\r\n });\r\n return baseTimes(length, function(index) {\r\n return arrayMap(array, baseProperty(index));\r\n });\r\n }\r\n\r\n /**\r\n * Creates an array excluding all given values using\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * for equality comparisons.\r\n *\r\n * **Note:** Unlike `_.pull`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {Array} array The array to inspect.\r\n * @param {...*} [values] The values to exclude.\r\n * @returns {Array} Returns the new array of filtered values.\r\n * @see _.difference, _.xor\r\n * @example\r\n *\r\n * _.without([2, 1, 2, 3], 1, 2);\r\n * // => [3]\r\n */\r\n var without = baseRest(function(array, values) {\r\n return isArrayLikeObject(array)\r\n ? baseDifference(array, values)\r\n : [];\r\n });\r\n\r\n /**\r\n * Creates an array of grouped elements, the first of which contains the\r\n * first elements of the given arrays, the second of which contains the\r\n * second elements of the given arrays, and so on.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Array\r\n * @param {...Array} [arrays] The arrays to process.\r\n * @returns {Array} Returns the new array of grouped elements.\r\n * @example\r\n *\r\n * _.zip(['a', 'b'], [1, 2], [true, false]);\r\n * // => [['a', 1, true], ['b', 2, false]]\r\n */\r\n var zip = baseRest(unzip);\r\n\r\n /**\r\n * This method is like `_.fromPairs` except that it accepts two arrays,\r\n * one of property identifiers and one of corresponding values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.4.0\r\n * @category Array\r\n * @param {Array} [props=[]] The property identifiers.\r\n * @param {Array} [values=[]] The property values.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * _.zipObject(['a', 'b'], [1, 2]);\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n function zipObject(props, values) {\r\n return baseZipObject(props || [], values || [], assignValue);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance that wraps `value` with explicit method\r\n * chain sequences enabled. The result of such sequences must be unwrapped\r\n * with `_#value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.3.0\r\n * @category Seq\r\n * @param {*} value The value to wrap.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'pebbles', 'age': 1 }\r\n * ];\r\n *\r\n * var youngest = _\r\n * .chain(users)\r\n * .sortBy('age')\r\n * .map(function(o) {\r\n * return o.user + ' is ' + o.age;\r\n * })\r\n * .head()\r\n * .value();\r\n * // => 'pebbles is 1'\r\n */\r\n function chain(value) {\r\n var result = lodash(value);\r\n result.__chain__ = true;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method invokes `interceptor` and returns `value`. The interceptor\r\n * is invoked with one argument; (value). The purpose of this method is to\r\n * \"tap into\" a method chain sequence in order to modify intermediate results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * _([1, 2, 3])\r\n * .tap(function(array) {\r\n * // Mutate input array.\r\n * array.pop();\r\n * })\r\n * .reverse()\r\n * .value();\r\n * // => [2, 1]\r\n */\r\n function tap(value, interceptor) {\r\n interceptor(value);\r\n return value;\r\n }\r\n\r\n /**\r\n * This method is like `_.tap` except that it returns the result of `interceptor`.\r\n * The purpose of this method is to \"pass thru\" values replacing intermediate\r\n * results in a method chain sequence.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Seq\r\n * @param {*} value The value to provide to `interceptor`.\r\n * @param {Function} interceptor The function to invoke.\r\n * @returns {*} Returns the result of `interceptor`.\r\n * @example\r\n *\r\n * _(' abc ')\r\n * .chain()\r\n * .trim()\r\n * .thru(function(value) {\r\n * return [value];\r\n * })\r\n * .value();\r\n * // => ['abc']\r\n */\r\n function thru(value, interceptor) {\r\n return interceptor(value);\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.at`.\r\n *\r\n * @name at\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Seq\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };\r\n *\r\n * _(object).at(['a[0].b.c', 'a[1]']).value();\r\n * // => [3, 4]\r\n */\r\n var wrapperAt = flatRest(function(paths) {\r\n var length = paths.length,\r\n start = length ? paths[0] : 0,\r\n value = this.__wrapped__,\r\n interceptor = function(object) { return baseAt(object, paths); };\r\n\r\n if (length > 1 || this.__actions__.length ||\r\n !(value instanceof LazyWrapper) || !isIndex(start)) {\r\n return this.thru(interceptor);\r\n }\r\n value = value.slice(start, +start + (length ? 1 : 0));\r\n value.__actions__.push({\r\n 'func': thru,\r\n 'args': [interceptor],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(value, this.__chain__).thru(function(array) {\r\n if (length && !array.length) {\r\n array.push(undefined);\r\n }\r\n return array;\r\n });\r\n });\r\n\r\n /**\r\n * Creates a `lodash` wrapper instance with explicit method chain sequences enabled.\r\n *\r\n * @name chain\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 }\r\n * ];\r\n *\r\n * // A sequence without explicit chaining.\r\n * _(users).head();\r\n * // => { 'user': 'barney', 'age': 36 }\r\n *\r\n * // A sequence with explicit chaining.\r\n * _(users)\r\n * .chain()\r\n * .head()\r\n * .pick('user')\r\n * .value();\r\n * // => { 'user': 'barney' }\r\n */\r\n function wrapperChain() {\r\n return chain(this);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence and returns the wrapped result.\r\n *\r\n * @name commit\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2];\r\n * var wrapped = _(array).push(3);\r\n *\r\n * console.log(array);\r\n * // => [1, 2]\r\n *\r\n * wrapped = wrapped.commit();\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n *\r\n * wrapped.last();\r\n * // => 3\r\n *\r\n * console.log(array);\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperCommit() {\r\n return new LodashWrapper(this.value(), this.__chain__);\r\n }\r\n\r\n /**\r\n * Gets the next value on a wrapped object following the\r\n * [iterator protocol](https://mdn.io/iteration_protocols#iterator).\r\n *\r\n * @name next\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the next iterator value.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 1 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': false, 'value': 2 }\r\n *\r\n * wrapped.next();\r\n * // => { 'done': true, 'value': undefined }\r\n */\r\n function wrapperNext() {\r\n if (this.__values__ === undefined) {\r\n this.__values__ = toArray(this.value());\r\n }\r\n var done = this.__index__ >= this.__values__.length,\r\n value = done ? undefined : this.__values__[this.__index__++];\r\n\r\n return { 'done': done, 'value': value };\r\n }\r\n\r\n /**\r\n * Enables the wrapper to be iterable.\r\n *\r\n * @name Symbol.iterator\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Seq\r\n * @returns {Object} Returns the wrapper object.\r\n * @example\r\n *\r\n * var wrapped = _([1, 2]);\r\n *\r\n * wrapped[Symbol.iterator]() === wrapped;\r\n * // => true\r\n *\r\n * Array.from(wrapped);\r\n * // => [1, 2]\r\n */\r\n function wrapperToIterator() {\r\n return this;\r\n }\r\n\r\n /**\r\n * Creates a clone of the chain sequence planting `value` as the wrapped value.\r\n *\r\n * @name plant\r\n * @memberOf _\r\n * @since 3.2.0\r\n * @category Seq\r\n * @param {*} value The value to plant.\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * var wrapped = _([1, 2]).map(square);\r\n * var other = wrapped.plant([3, 4]);\r\n *\r\n * other.value();\r\n * // => [9, 16]\r\n *\r\n * wrapped.value();\r\n * // => [1, 4]\r\n */\r\n function wrapperPlant(value) {\r\n var result,\r\n parent = this;\r\n\r\n while (parent instanceof baseLodash) {\r\n var clone = wrapperClone(parent);\r\n clone.__index__ = 0;\r\n clone.__values__ = undefined;\r\n if (result) {\r\n previous.__wrapped__ = clone;\r\n } else {\r\n result = clone;\r\n }\r\n var previous = clone;\r\n parent = parent.__wrapped__;\r\n }\r\n previous.__wrapped__ = value;\r\n return result;\r\n }\r\n\r\n /**\r\n * This method is the wrapper version of `_.reverse`.\r\n *\r\n * **Note:** This method mutates the wrapped array.\r\n *\r\n * @name reverse\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Seq\r\n * @returns {Object} Returns the new `lodash` wrapper instance.\r\n * @example\r\n *\r\n * var array = [1, 2, 3];\r\n *\r\n * _(array).reverse().value()\r\n * // => [3, 2, 1]\r\n *\r\n * console.log(array);\r\n * // => [3, 2, 1]\r\n */\r\n function wrapperReverse() {\r\n var value = this.__wrapped__;\r\n if (value instanceof LazyWrapper) {\r\n var wrapped = value;\r\n if (this.__actions__.length) {\r\n wrapped = new LazyWrapper(this);\r\n }\r\n wrapped = wrapped.reverse();\r\n wrapped.__actions__.push({\r\n 'func': thru,\r\n 'args': [reverse],\r\n 'thisArg': undefined\r\n });\r\n return new LodashWrapper(wrapped, this.__chain__);\r\n }\r\n return this.thru(reverse);\r\n }\r\n\r\n /**\r\n * Executes the chain sequence to resolve the unwrapped value.\r\n *\r\n * @name value\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias toJSON, valueOf\r\n * @category Seq\r\n * @returns {*} Returns the resolved unwrapped value.\r\n * @example\r\n *\r\n * _([1, 2, 3]).value();\r\n * // => [1, 2, 3]\r\n */\r\n function wrapperValue() {\r\n return baseWrapperValue(this.__wrapped__, this.__actions__);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The corresponding value of\r\n * each key is the number of times the key was returned by `iteratee`. The\r\n * iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': 1, '6': 2 }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.countBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': 2, '5': 1 }\r\n */\r\n var countBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n ++result[key];\r\n } else {\r\n baseAssignValue(result, key, 1);\r\n }\r\n });\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\r\n * Iteration is stopped once `predicate` returns falsey. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * **Note:** This method returns `true` for\r\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\r\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\r\n * elements of empty collections.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.every([true, 1, null, 'yes'], Boolean);\r\n * // => false\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.every(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.every(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.every(users, 'active');\r\n * // => false\r\n */\r\n function every(collection, predicate, guard) {\r\n var func = isArray(collection) ? arrayEvery : baseEvery;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning an array of all elements\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * **Note:** Unlike `_.remove`, this method returns a new array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.reject\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * _.filter(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, { 'age': 36, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.filter(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function filter(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Iterates over elements of `collection`, returning the first element\r\n * `predicate` returns truthy for. The predicate is invoked with three\r\n * arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param {number} [fromIndex=0] The index to search from.\r\n * @returns {*} Returns the matched element, else `undefined`.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false },\r\n * { 'user': 'pebbles', 'age': 1, 'active': true }\r\n * ];\r\n *\r\n * _.find(users, function(o) { return o.age < 40; });\r\n * // => object for 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.find(users, { 'age': 1, 'active': true });\r\n * // => object for 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.find(users, ['active', false]);\r\n * // => object for 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.find(users, 'active');\r\n * // => object for 'barney'\r\n */\r\n var find = createFind(findIndex);\r\n\r\n /**\r\n * Iterates over elements of `collection` and invokes `iteratee` for each element.\r\n * The iteratee is invoked with three arguments: (value, index|key, collection).\r\n * Iteratee functions may exit iteration early by explicitly returning `false`.\r\n *\r\n * **Note:** As with other \"Collections\" methods, objects with a \"length\"\r\n * property are iterated like arrays. To avoid this behavior use `_.forIn`\r\n * or `_.forOwn` for object iteration.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @alias each\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array|Object} Returns `collection`.\r\n * @see _.forEachRight\r\n * @example\r\n *\r\n * _.forEach([1, 2], function(value) {\r\n * console.log(value);\r\n * });\r\n * // => Logs `1` then `2`.\r\n *\r\n * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {\r\n * console.log(key);\r\n * });\r\n * // => Logs 'a' then 'b' (iteration order is not guaranteed).\r\n */\r\n function forEach(collection, iteratee) {\r\n var func = isArray(collection) ? arrayEach : baseEach;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Creates an object composed of keys generated from the results of running\r\n * each element of `collection` thru `iteratee`. The order of grouped values\r\n * is determined by the order they occur in `collection`. The corresponding\r\n * value of each key is an array of elements responsible for generating the\r\n * key. The iteratee is invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\r\n * @returns {Object} Returns the composed aggregate object.\r\n * @example\r\n *\r\n * _.groupBy([6.1, 4.2, 6.3], Math.floor);\r\n * // => { '4': [4.2], '6': [6.1, 6.3] }\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.groupBy(['one', 'two', 'three'], 'length');\r\n * // => { '3': ['one', 'two'], '5': ['three'] }\r\n */\r\n var groupBy = createAggregator(function(result, value, key) {\r\n if (hasOwnProperty.call(result, key)) {\r\n result[key].push(value);\r\n } else {\r\n baseAssignValue(result, key, [value]);\r\n }\r\n });\r\n\r\n /**\r\n * Creates an array of values by running each element in `collection` thru\r\n * `iteratee`. The iteratee is invoked with three arguments:\r\n * (value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r\n *\r\n * The guarded methods are:\r\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\r\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\r\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\r\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new mapped array.\r\n * @example\r\n *\r\n * function square(n) {\r\n * return n * n;\r\n * }\r\n *\r\n * _.map([4, 8], square);\r\n * // => [16, 64]\r\n *\r\n * _.map({ 'a': 4, 'b': 8 }, square);\r\n * // => [16, 64] (iteration order is not guaranteed)\r\n *\r\n * var users = [\r\n * { 'user': 'barney' },\r\n * { 'user': 'fred' }\r\n * ];\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, 'user');\r\n * // => ['barney', 'fred']\r\n */\r\n function map(collection, iteratee) {\r\n var func = isArray(collection) ? arrayMap : baseMap;\r\n return func(collection, baseIteratee(iteratee, 3));\r\n }\r\n\r\n /**\r\n * Reduces `collection` to a value which is the accumulated result of running\r\n * each element in `collection` thru `iteratee`, where each successive\r\n * invocation is supplied the return value of the previous. If `accumulator`\r\n * is not given, the first element of `collection` is used as the initial\r\n * value. The iteratee is invoked with four arguments:\r\n * (accumulator, value, index|key, collection).\r\n *\r\n * Many lodash methods are guarded to work as iteratees for methods like\r\n * `_.reduce`, `_.reduceRight`, and `_.transform`.\r\n *\r\n * The guarded methods are:\r\n * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,\r\n * and `sortBy`\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r\n * @param {*} [accumulator] The initial value.\r\n * @returns {*} Returns the accumulated value.\r\n * @see _.reduceRight\r\n * @example\r\n *\r\n * _.reduce([1, 2], function(sum, n) {\r\n * return sum + n;\r\n * }, 0);\r\n * // => 3\r\n *\r\n * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {\r\n * (result[value] || (result[value] = [])).push(key);\r\n * return result;\r\n * }, {});\r\n * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)\r\n */\r\n function reduce(collection, iteratee, accumulator) {\r\n var func = isArray(collection) ? arrayReduce : baseReduce,\r\n initAccum = arguments.length < 3;\r\n\r\n return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);\r\n }\r\n\r\n /**\r\n * The opposite of `_.filter`; this method returns the elements of `collection`\r\n * that `predicate` does **not** return truthy for.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {Array} Returns the new filtered array.\r\n * @see _.filter\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': false },\r\n * { 'user': 'fred', 'age': 40, 'active': true }\r\n * ];\r\n *\r\n * _.reject(users, function(o) { return !o.active; });\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.reject(users, { 'age': 40, 'active': true });\r\n * // => objects for ['barney']\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.reject(users, ['active', false]);\r\n * // => objects for ['fred']\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.reject(users, 'active');\r\n * // => objects for ['barney']\r\n */\r\n function reject(collection, predicate) {\r\n var func = isArray(collection) ? arrayFilter : baseFilter;\r\n return func(collection, negate(baseIteratee(predicate, 3)));\r\n }\r\n\r\n /**\r\n * Gets the size of `collection` by returning its length for array-like\r\n * values or the number of own enumerable string keyed properties for objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object|string} collection The collection to inspect.\r\n * @returns {number} Returns the collection size.\r\n * @example\r\n *\r\n * _.size([1, 2, 3]);\r\n * // => 3\r\n *\r\n * _.size({ 'a': 1, 'b': 2 });\r\n * // => 2\r\n *\r\n * _.size('pebbles');\r\n * // => 7\r\n */\r\n function size(collection) {\r\n if (collection == null) {\r\n return 0;\r\n }\r\n if (isArrayLike(collection)) {\r\n return isString(collection) ? stringSize(collection) : collection.length;\r\n }\r\n var tag = getTag(collection);\r\n if (tag == mapTag || tag == setTag) {\r\n return collection.size;\r\n }\r\n return baseKeys(collection).length;\r\n }\r\n\r\n /**\r\n * Checks if `predicate` returns truthy for **any** element of `collection`.\r\n * Iteration is stopped once `predicate` returns truthy. The predicate is\r\n * invoked with three arguments: (value, index|key, collection).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {boolean} Returns `true` if any element passes the predicate check,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.some([null, 0, 'yes', false], Boolean);\r\n * // => true\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'active': true },\r\n * { 'user': 'fred', 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.some(users, { 'user': 'barney', 'active': false });\r\n * // => false\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.some(users, ['active', false]);\r\n * // => true\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.some(users, 'active');\r\n * // => true\r\n */\r\n function some(collection, predicate, guard) {\r\n var func = isArray(collection) ? arraySome : baseSome;\r\n if (guard && isIterateeCall(collection, predicate, guard)) {\r\n predicate = undefined;\r\n }\r\n return func(collection, baseIteratee(predicate, 3));\r\n }\r\n\r\n /**\r\n * Creates an array of elements, sorted in ascending order by the results of\r\n * running each element in a collection thru each iteratee. This method\r\n * performs a stable sort, that is, it preserves the original sort order of\r\n * equal elements. The iteratees are invoked with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Collection\r\n * @param {Array|Object} collection The collection to iterate over.\r\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\r\n * The iteratees to sort by.\r\n * @returns {Array} Returns the new sorted array.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'fred', 'age': 48 },\r\n * { 'user': 'barney', 'age': 36 },\r\n * { 'user': 'fred', 'age': 40 },\r\n * { 'user': 'barney', 'age': 34 }\r\n * ];\r\n *\r\n * _.sortBy(users, [function(o) { return o.user; }]);\r\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\r\n *\r\n * _.sortBy(users, ['user', 'age']);\r\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\r\n */\r\n var sortBy = baseRest(function(collection, iteratees) {\r\n if (collection == null) {\r\n return [];\r\n }\r\n var length = iteratees.length;\r\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\r\n iteratees = [];\r\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\r\n iteratees = [iteratees[0]];\r\n }\r\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\r\n });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Gets the timestamp of the number of milliseconds that have elapsed since\r\n * the Unix epoch (1 January 1970 00:00:00 UTC).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Date\r\n * @returns {number} Returns the timestamp.\r\n * @example\r\n *\r\n * _.defer(function(stamp) {\r\n * console.log(_.now() - stamp);\r\n * }, _.now());\r\n * // => Logs the number of milliseconds it took for the deferred invocation.\r\n */\r\n var now = function() {\r\n return root.Date.now();\r\n };\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The opposite of `_.before`; this method creates a function that invokes\r\n * `func` once it's called `n` or more times.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {number} n The number of calls before `func` is invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var saves = ['profile', 'settings'];\r\n *\r\n * var done = _.after(saves.length, function() {\r\n * console.log('done saving!');\r\n * });\r\n *\r\n * _.forEach(saves, function(type) {\r\n * asyncSave({ 'type': type, 'complete': done });\r\n * });\r\n * // => Logs 'done saving!' after the two async saves have completed.\r\n */\r\n function after(n, func) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n < 1) {\r\n return func.apply(this, arguments);\r\n }\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func`, with the `this` binding and arguments\r\n * of the created function, while it's called less than `n` times. Subsequent\r\n * calls to the created function return the result of the last `func` invocation.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {number} n The number of calls at which `func` is no longer invoked.\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * jQuery(element).on('click', _.before(5, addContactToList));\r\n * // => Allows adding up to 4 contacts to the list.\r\n */\r\n function before(n, func) {\r\n var result;\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n n = toInteger(n);\r\n return function() {\r\n if (--n > 0) {\r\n result = func.apply(this, arguments);\r\n }\r\n if (n <= 1) {\r\n func = undefined;\r\n }\r\n return result;\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of `thisArg`\r\n * and `partials` prepended to the arguments it receives.\r\n *\r\n * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r\n * may be used as a placeholder for partially applied arguments.\r\n *\r\n * **Note:** Unlike native `Function#bind`, this method doesn't set the \"length\"\r\n * property of bound functions.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to bind.\r\n * @param {*} thisArg The `this` binding of `func`.\r\n * @param {...*} [partials] The arguments to be partially applied.\r\n * @returns {Function} Returns the new bound function.\r\n * @example\r\n *\r\n * function greet(greeting, punctuation) {\r\n * return greeting + ' ' + this.user + punctuation;\r\n * }\r\n *\r\n * var object = { 'user': 'fred' };\r\n *\r\n * var bound = _.bind(greet, object, 'hi');\r\n * bound('!');\r\n * // => 'hi fred!'\r\n *\r\n * // Bound with placeholders.\r\n * var bound = _.bind(greet, object, _, '!');\r\n * bound('hi');\r\n * // => 'hi fred!'\r\n */\r\n var bind = baseRest(function(func, thisArg, partials) {\r\n var bitmask = WRAP_BIND_FLAG;\r\n if (partials.length) {\r\n var holders = replaceHolders(partials, getHolder(bind));\r\n bitmask |= WRAP_PARTIAL_FLAG;\r\n }\r\n return createWrap(func, bitmask, thisArg, partials, holders);\r\n });\r\n\r\n /**\r\n * Creates a debounced function that delays invoking `func` until after `wait`\r\n * milliseconds have elapsed since the last time the debounced function was\r\n * invoked. The debounced function comes with a `cancel` method to cancel\r\n * delayed `func` invocations and a `flush` method to immediately invoke them.\r\n * Provide `options` to indicate whether `func` should be invoked on the\r\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\r\n * with the last arguments provided to the debounced function. Subsequent\r\n * calls to the debounced function return the result of the last `func`\r\n * invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the debounced function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.debounce` and `_.throttle`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to debounce.\r\n * @param {number} [wait=0] The number of milliseconds to delay.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=false]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {number} [options.maxWait]\r\n * The maximum time `func` is allowed to be delayed before it's invoked.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new debounced function.\r\n * @example\r\n *\r\n * // Avoid costly calculations while the window size is in flux.\r\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\r\n *\r\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\r\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\r\n * 'leading': true,\r\n * 'trailing': false\r\n * }));\r\n *\r\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\r\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\r\n * var source = new EventSource('/stream');\r\n * jQuery(source).on('message', debounced);\r\n *\r\n * // Cancel the trailing debounced invocation.\r\n * jQuery(window).on('popstate', debounced.cancel);\r\n */\r\n function debounce(func, wait, options) {\r\n var lastArgs,\r\n lastThis,\r\n maxWait,\r\n result,\r\n timerId,\r\n lastCallTime,\r\n lastInvokeTime = 0,\r\n leading = false,\r\n maxing = false,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n wait = toNumber(wait) || 0;\r\n if (isObject(options)) {\r\n leading = !!options.leading;\r\n maxing = 'maxWait' in options;\r\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n\r\n function invokeFunc(time) {\r\n var args = lastArgs,\r\n thisArg = lastThis;\r\n\r\n lastArgs = lastThis = undefined;\r\n lastInvokeTime = time;\r\n result = func.apply(thisArg, args);\r\n return result;\r\n }\r\n\r\n function leadingEdge(time) {\r\n // Reset any `maxWait` timer.\r\n lastInvokeTime = time;\r\n // Start the timer for the trailing edge.\r\n timerId = setTimeout(timerExpired, wait);\r\n // Invoke the leading edge.\r\n return leading ? invokeFunc(time) : result;\r\n }\r\n\r\n function remainingWait(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime,\r\n timeWaiting = wait - timeSinceLastCall;\r\n\r\n return maxing\r\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\r\n : timeWaiting;\r\n }\r\n\r\n function shouldInvoke(time) {\r\n var timeSinceLastCall = time - lastCallTime,\r\n timeSinceLastInvoke = time - lastInvokeTime;\r\n\r\n // Either this is the first call, activity has stopped and we're at the\r\n // trailing edge, the system time has gone backwards and we're treating\r\n // it as the trailing edge, or we've hit the `maxWait` limit.\r\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\r\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\r\n }\r\n\r\n function timerExpired() {\r\n var time = now();\r\n if (shouldInvoke(time)) {\r\n return trailingEdge(time);\r\n }\r\n // Restart the timer.\r\n timerId = setTimeout(timerExpired, remainingWait(time));\r\n }\r\n\r\n function trailingEdge(time) {\r\n timerId = undefined;\r\n\r\n // Only invoke if we have `lastArgs` which means `func` has been\r\n // debounced at least once.\r\n if (trailing && lastArgs) {\r\n return invokeFunc(time);\r\n }\r\n lastArgs = lastThis = undefined;\r\n return result;\r\n }\r\n\r\n function cancel() {\r\n if (timerId !== undefined) {\r\n clearTimeout(timerId);\r\n }\r\n lastInvokeTime = 0;\r\n lastArgs = lastCallTime = lastThis = timerId = undefined;\r\n }\r\n\r\n function flush() {\r\n return timerId === undefined ? result : trailingEdge(now());\r\n }\r\n\r\n function debounced() {\r\n var time = now(),\r\n isInvoking = shouldInvoke(time);\r\n\r\n lastArgs = arguments;\r\n lastThis = this;\r\n lastCallTime = time;\r\n\r\n if (isInvoking) {\r\n if (timerId === undefined) {\r\n return leadingEdge(lastCallTime);\r\n }\r\n if (maxing) {\r\n // Handle invocations in a tight loop.\r\n timerId = setTimeout(timerExpired, wait);\r\n return invokeFunc(lastCallTime);\r\n }\r\n }\r\n if (timerId === undefined) {\r\n timerId = setTimeout(timerExpired, wait);\r\n }\r\n return result;\r\n }\r\n debounced.cancel = cancel;\r\n debounced.flush = flush;\r\n return debounced;\r\n }\r\n\r\n /**\r\n * Defers invoking the `func` until the current call stack has cleared. Any\r\n * additional arguments are provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to defer.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.defer(function(text) {\r\n * console.log(text);\r\n * }, 'deferred');\r\n * // => Logs 'deferred' after one millisecond.\r\n */\r\n var defer = baseRest(function(func, args) {\r\n return baseDelay(func, 1, args);\r\n });\r\n\r\n /**\r\n * Invokes `func` after `wait` milliseconds. Any additional arguments are\r\n * provided to `func` when it's invoked.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to delay.\r\n * @param {number} wait The number of milliseconds to delay invocation.\r\n * @param {...*} [args] The arguments to invoke `func` with.\r\n * @returns {number} Returns the timer id.\r\n * @example\r\n *\r\n * _.delay(function(text) {\r\n * console.log(text);\r\n * }, 1000, 'later');\r\n * // => Logs 'later' after one second.\r\n */\r\n var delay = baseRest(function(func, wait, args) {\r\n return baseDelay(func, toNumber(wait) || 0, args);\r\n });\r\n\r\n /**\r\n * Creates a function that memoizes the result of `func`. If `resolver` is\r\n * provided, it determines the cache key for storing the result based on the\r\n * arguments provided to the memoized function. By default, the first argument\r\n * provided to the memoized function is used as the map cache key. The `func`\r\n * is invoked with the `this` binding of the memoized function.\r\n *\r\n * **Note:** The cache is exposed as the `cache` property on the memoized\r\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\r\n * constructor with one whose instances implement the\r\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\r\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to have its output memoized.\r\n * @param {Function} [resolver] The function to resolve the cache key.\r\n * @returns {Function} Returns the new memoized function.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2 };\r\n * var other = { 'c': 3, 'd': 4 };\r\n *\r\n * var values = _.memoize(_.values);\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * values(other);\r\n * // => [3, 4]\r\n *\r\n * object.a = 2;\r\n * values(object);\r\n * // => [1, 2]\r\n *\r\n * // Modify the result cache.\r\n * values.cache.set(object, ['a', 'b']);\r\n * values(object);\r\n * // => ['a', 'b']\r\n *\r\n * // Replace `_.memoize.Cache`.\r\n * _.memoize.Cache = WeakMap;\r\n */\r\n function memoize(func, resolver) {\r\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n var memoized = function() {\r\n var args = arguments,\r\n key = resolver ? resolver.apply(this, args) : args[0],\r\n cache = memoized.cache;\r\n\r\n if (cache.has(key)) {\r\n return cache.get(key);\r\n }\r\n var result = func.apply(this, args);\r\n memoized.cache = cache.set(key, result) || cache;\r\n return result;\r\n };\r\n memoized.cache = new (memoize.Cache || MapCache);\r\n return memoized;\r\n }\r\n\r\n // Expose `MapCache`.\r\n memoize.Cache = MapCache;\r\n\r\n /**\r\n * Creates a function that negates the result of the predicate `func`. The\r\n * `func` predicate is invoked with the `this` binding and arguments of the\r\n * created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Function\r\n * @param {Function} predicate The predicate to negate.\r\n * @returns {Function} Returns the new negated function.\r\n * @example\r\n *\r\n * function isEven(n) {\r\n * return n % 2 == 0;\r\n * }\r\n *\r\n * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));\r\n * // => [1, 3, 5]\r\n */\r\n function negate(predicate) {\r\n if (typeof predicate != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n return function() {\r\n var args = arguments;\r\n switch (args.length) {\r\n case 0: return !predicate.call(this);\r\n case 1: return !predicate.call(this, args[0]);\r\n case 2: return !predicate.call(this, args[0], args[1]);\r\n case 3: return !predicate.call(this, args[0], args[1], args[2]);\r\n }\r\n return !predicate.apply(this, args);\r\n };\r\n }\r\n\r\n /**\r\n * Creates a function that is restricted to invoking `func` once. Repeat calls\r\n * to the function return the value of the first invocation. The `func` is\r\n * invoked with the `this` binding and arguments of the created function.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to restrict.\r\n * @returns {Function} Returns the new restricted function.\r\n * @example\r\n *\r\n * var initialize = _.once(createApplication);\r\n * initialize();\r\n * initialize();\r\n * // => `createApplication` is invoked once\r\n */\r\n function once(func) {\r\n return before(2, func);\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the `this` binding of the\r\n * created function and arguments from `start` and beyond provided as\r\n * an array.\r\n *\r\n * **Note:** This method is based on the\r\n * [rest parameter](https://mdn.io/rest_parameters).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Function\r\n * @param {Function} func The function to apply a rest parameter to.\r\n * @param {number} [start=func.length-1] The start position of the rest parameter.\r\n * @returns {Function} Returns the new function.\r\n * @example\r\n *\r\n * var say = _.rest(function(what, names) {\r\n * return what + ' ' + _.initial(names).join(', ') +\r\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r\n * });\r\n *\r\n * say('hello', 'fred', 'barney', 'pebbles');\r\n * // => 'hello fred, barney, & pebbles'\r\n */\r\n function rest(func, start) {\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n start = start === undefined ? start : toInteger(start);\r\n return baseRest(func, start);\r\n }\r\n\r\n /**\r\n * Creates a throttled function that only invokes `func` at most once per\r\n * every `wait` milliseconds. The throttled function comes with a `cancel`\r\n * method to cancel delayed `func` invocations and a `flush` method to\r\n * immediately invoke them. Provide `options` to indicate whether `func`\r\n * should be invoked on the leading and/or trailing edge of the `wait`\r\n * timeout. The `func` is invoked with the last arguments provided to the\r\n * throttled function. Subsequent calls to the throttled function return the\r\n * result of the last `func` invocation.\r\n *\r\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\r\n * invoked on the trailing edge of the timeout only if the throttled function\r\n * is invoked more than once during the `wait` timeout.\r\n *\r\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\r\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\r\n *\r\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\r\n * for details over the differences between `_.throttle` and `_.debounce`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Function\r\n * @param {Function} func The function to throttle.\r\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.leading=true]\r\n * Specify invoking on the leading edge of the timeout.\r\n * @param {boolean} [options.trailing=true]\r\n * Specify invoking on the trailing edge of the timeout.\r\n * @returns {Function} Returns the new throttled function.\r\n * @example\r\n *\r\n * // Avoid excessively updating the position while scrolling.\r\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\r\n *\r\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\r\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\r\n * jQuery(element).on('click', throttled);\r\n *\r\n * // Cancel the trailing throttled invocation.\r\n * jQuery(window).on('popstate', throttled.cancel);\r\n */\r\n function throttle(func, wait, options) {\r\n var leading = true,\r\n trailing = true;\r\n\r\n if (typeof func != 'function') {\r\n throw new TypeError(FUNC_ERROR_TEXT);\r\n }\r\n if (isObject(options)) {\r\n leading = 'leading' in options ? !!options.leading : leading;\r\n trailing = 'trailing' in options ? !!options.trailing : trailing;\r\n }\r\n return debounce(func, wait, {\r\n 'leading': leading,\r\n 'maxWait': wait,\r\n 'trailing': trailing\r\n });\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a shallow clone of `value`.\r\n *\r\n * **Note:** This method is loosely based on the\r\n * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)\r\n * and supports cloning arrays, array buffers, booleans, date objects, maps,\r\n * numbers, `Object` objects, regexes, sets, strings, symbols, and typed\r\n * arrays. The own enumerable properties of `arguments` objects are cloned\r\n * as plain objects. An empty object is returned for uncloneable values such\r\n * as error objects, functions, DOM nodes, and WeakMaps.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to clone.\r\n * @returns {*} Returns the cloned value.\r\n * @see _.cloneDeep\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var shallow = _.clone(objects);\r\n * console.log(shallow[0] === objects[0]);\r\n * // => true\r\n */\r\n function clone(value) {\r\n return baseClone(value, CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * This method is like `_.clone` except that it recursively clones `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.0.0\r\n * @category Lang\r\n * @param {*} value The value to recursively clone.\r\n * @returns {*} Returns the deep cloned value.\r\n * @see _.clone\r\n * @example\r\n *\r\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\r\n *\r\n * var deep = _.cloneDeep(objects);\r\n * console.log(deep[0] === objects[0]);\r\n * // => false\r\n */\r\n function cloneDeep(value) {\r\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\r\n }\r\n\r\n /**\r\n * Performs a\r\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\r\n * comparison between two values to determine if they are equivalent.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.eq(object, object);\r\n * // => true\r\n *\r\n * _.eq(object, other);\r\n * // => false\r\n *\r\n * _.eq('a', 'a');\r\n * // => true\r\n *\r\n * _.eq('a', Object('a'));\r\n * // => false\r\n *\r\n * _.eq(NaN, NaN);\r\n * // => true\r\n */\r\n function eq(value, other) {\r\n return value === other || (value !== value && other !== other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is likely an `arguments` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArguments(function() { return arguments; }());\r\n * // => true\r\n *\r\n * _.isArguments([1, 2, 3]);\r\n * // => false\r\n */\r\n var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\r\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\r\n !propertyIsEnumerable.call(value, 'callee');\r\n };\r\n\r\n /**\r\n * Checks if `value` is classified as an `Array` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\r\n * @example\r\n *\r\n * _.isArray([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArray(document.body.children);\r\n * // => false\r\n *\r\n * _.isArray('abc');\r\n * // => false\r\n *\r\n * _.isArray(_.noop);\r\n * // => false\r\n */\r\n var isArray = Array.isArray;\r\n\r\n /**\r\n * Checks if `value` is array-like. A value is considered array-like if it's\r\n * not a function and has a `value.length` that's an integer greater than or\r\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r\n * @example\r\n *\r\n * _.isArrayLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLike(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLike('abc');\r\n * // => true\r\n *\r\n * _.isArrayLike(_.noop);\r\n * // => false\r\n */\r\n function isArrayLike(value) {\r\n return value != null && isLength(value.length) && !isFunction(value);\r\n }\r\n\r\n /**\r\n * This method is like `_.isArrayLike` except that it also checks if `value`\r\n * is an object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an array-like object,\r\n * else `false`.\r\n * @example\r\n *\r\n * _.isArrayLikeObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject(document.body.children);\r\n * // => true\r\n *\r\n * _.isArrayLikeObject('abc');\r\n * // => false\r\n *\r\n * _.isArrayLikeObject(_.noop);\r\n * // => false\r\n */\r\n function isArrayLikeObject(value) {\r\n return isObjectLike(value) && isArrayLike(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a boolean primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a boolean, else `false`.\r\n * @example\r\n *\r\n * _.isBoolean(false);\r\n * // => true\r\n *\r\n * _.isBoolean(null);\r\n * // => false\r\n */\r\n function isBoolean(value) {\r\n return value === true || value === false ||\r\n (isObjectLike(value) && baseGetTag(value) == boolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a buffer.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\r\n * @example\r\n *\r\n * _.isBuffer(new Buffer(2));\r\n * // => true\r\n *\r\n * _.isBuffer(new Uint8Array(2));\r\n * // => false\r\n */\r\n var isBuffer = nativeIsBuffer || stubFalse;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Date` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\r\n * @example\r\n *\r\n * _.isDate(new Date);\r\n * // => true\r\n *\r\n * _.isDate('Mon April 23 2012');\r\n * // => false\r\n */\r\n var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\r\n\r\n /**\r\n * Checks if `value` is an empty object, collection, map, or set.\r\n *\r\n * Objects are considered empty if they have no own enumerable string keyed\r\n * properties.\r\n *\r\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\r\n * jQuery-like collections are considered empty if they have a `length` of `0`.\r\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r\n * @example\r\n *\r\n * _.isEmpty(null);\r\n * // => true\r\n *\r\n * _.isEmpty(true);\r\n * // => true\r\n *\r\n * _.isEmpty(1);\r\n * // => true\r\n *\r\n * _.isEmpty([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isEmpty({ 'a': 1 });\r\n * // => false\r\n */\r\n function isEmpty(value) {\r\n if (value == null) {\r\n return true;\r\n }\r\n if (isArrayLike(value) &&\r\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\r\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\r\n return !value.length;\r\n }\r\n var tag = getTag(value);\r\n if (tag == mapTag || tag == setTag) {\r\n return !value.size;\r\n }\r\n if (isPrototype(value)) {\r\n return !baseKeys(value).length;\r\n }\r\n for (var key in value) {\r\n if (hasOwnProperty.call(value, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n /**\r\n * Performs a deep comparison between two values to determine if they are\r\n * equivalent.\r\n *\r\n * **Note:** This method supports comparing arrays, array buffers, booleans,\r\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\r\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\r\n * by their own, not inherited, enumerable properties. Functions and DOM\r\n * nodes are compared by strict equality, i.e. `===`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to compare.\r\n * @param {*} other The other value to compare.\r\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n * var other = { 'a': 1 };\r\n *\r\n * _.isEqual(object, other);\r\n * // => true\r\n *\r\n * object === other;\r\n * // => false\r\n */\r\n function isEqual(value, other) {\r\n return baseIsEqual(value, other);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a finite primitive number.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isFinite`](https://mdn.io/Number/isFinite).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a finite number, else `false`.\r\n * @example\r\n *\r\n * _.isFinite(3);\r\n * // => true\r\n *\r\n * _.isFinite(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isFinite(Infinity);\r\n * // => false\r\n *\r\n * _.isFinite('3');\r\n * // => false\r\n */\r\n function isFinite(value) {\r\n return typeof value == 'number' && nativeIsFinite(value);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Function` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\r\n * @example\r\n *\r\n * _.isFunction(_);\r\n * // => true\r\n *\r\n * _.isFunction(/abc/);\r\n * // => false\r\n */\r\n function isFunction(value) {\r\n if (!isObject(value)) {\r\n return false;\r\n }\r\n // The use of `Object#toString` avoids issues with the `typeof` operator\r\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\r\n var tag = baseGetTag(value);\r\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\r\n }\r\n\r\n /**\r\n * Checks if `value` is a valid array-like length.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r\n * @example\r\n *\r\n * _.isLength(3);\r\n * // => true\r\n *\r\n * _.isLength(Number.MIN_VALUE);\r\n * // => false\r\n *\r\n * _.isLength(Infinity);\r\n * // => false\r\n *\r\n * _.isLength('3');\r\n * // => false\r\n */\r\n function isLength(value) {\r\n return typeof value == 'number' &&\r\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r\n }\r\n\r\n /**\r\n * Checks if `value` is the\r\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\r\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r\n * @example\r\n *\r\n * _.isObject({});\r\n * // => true\r\n *\r\n * _.isObject([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObject(_.noop);\r\n * // => true\r\n *\r\n * _.isObject(null);\r\n * // => false\r\n */\r\n function isObject(value) {\r\n var type = typeof value;\r\n return value != null && (type == 'object' || type == 'function');\r\n }\r\n\r\n /**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * _.isObjectLike({});\r\n * // => true\r\n *\r\n * _.isObjectLike([1, 2, 3]);\r\n * // => true\r\n *\r\n * _.isObjectLike(_.noop);\r\n * // => false\r\n *\r\n * _.isObjectLike(null);\r\n * // => false\r\n */\r\n function isObjectLike(value) {\r\n return value != null && typeof value == 'object';\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Map` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\r\n * @example\r\n *\r\n * _.isMap(new Map);\r\n * // => true\r\n *\r\n * _.isMap(new WeakMap);\r\n * // => false\r\n */\r\n var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\r\n\r\n /**\r\n * Checks if `value` is `NaN`.\r\n *\r\n * **Note:** This method is based on\r\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\r\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\r\n * `undefined` and other non-number values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\r\n * @example\r\n *\r\n * _.isNaN(NaN);\r\n * // => true\r\n *\r\n * _.isNaN(new Number(NaN));\r\n * // => true\r\n *\r\n * isNaN(undefined);\r\n * // => true\r\n *\r\n * _.isNaN(undefined);\r\n * // => false\r\n */\r\n function isNaN(value) {\r\n // An `NaN` primitive is the only value that is not equal to itself.\r\n // Perform the `toStringTag` check first to avoid errors with some\r\n // ActiveX objects in IE.\r\n return isNumber(value) && value != +value;\r\n }\r\n\r\n /**\r\n * Checks if `value` is `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `null`, else `false`.\r\n * @example\r\n *\r\n * _.isNull(null);\r\n * // => true\r\n *\r\n * _.isNull(void 0);\r\n * // => false\r\n */\r\n function isNull(value) {\r\n return value === null;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Number` primitive or object.\r\n *\r\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\r\n * classified as numbers, use the `_.isFinite` method.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\r\n * @example\r\n *\r\n * _.isNumber(3);\r\n * // => true\r\n *\r\n * _.isNumber(Number.MIN_VALUE);\r\n * // => true\r\n *\r\n * _.isNumber(Infinity);\r\n * // => true\r\n *\r\n * _.isNumber('3');\r\n * // => false\r\n */\r\n function isNumber(value) {\r\n return typeof value == 'number' ||\r\n (isObjectLike(value) && baseGetTag(value) == numberTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is a plain object, that is, an object created by the\r\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.8.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * _.isPlainObject(new Foo);\r\n * // => false\r\n *\r\n * _.isPlainObject([1, 2, 3]);\r\n * // => false\r\n *\r\n * _.isPlainObject({ 'x': 0, 'y': 0 });\r\n * // => true\r\n *\r\n * _.isPlainObject(Object.create(null));\r\n * // => true\r\n */\r\n function isPlainObject(value) {\r\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\r\n return false;\r\n }\r\n var proto = getPrototype(value);\r\n if (proto === null) {\r\n return true;\r\n }\r\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\r\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\r\n funcToString.call(Ctor) == objectCtorString;\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `RegExp` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.1.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a regexp, else `false`.\r\n * @example\r\n *\r\n * _.isRegExp(/abc/);\r\n * // => true\r\n *\r\n * _.isRegExp('/abc/');\r\n * // => false\r\n */\r\n var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;\r\n\r\n /**\r\n * Checks if `value` is classified as a `Set` object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.3.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\r\n * @example\r\n *\r\n * _.isSet(new Set);\r\n * // => true\r\n *\r\n * _.isSet(new WeakSet);\r\n * // => false\r\n */\r\n var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\r\n\r\n /**\r\n * Checks if `value` is classified as a `String` primitive or object.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\r\n * @example\r\n *\r\n * _.isString('abc');\r\n * // => true\r\n *\r\n * _.isString(1);\r\n * // => false\r\n */\r\n function isString(value) {\r\n return typeof value == 'string' ||\r\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a `Symbol` primitive or object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\r\n * @example\r\n *\r\n * _.isSymbol(Symbol.iterator);\r\n * // => true\r\n *\r\n * _.isSymbol('abc');\r\n * // => false\r\n */\r\n function isSymbol(value) {\r\n return typeof value == 'symbol' ||\r\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\r\n }\r\n\r\n /**\r\n * Checks if `value` is classified as a typed array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\r\n * @example\r\n *\r\n * _.isTypedArray(new Uint8Array);\r\n * // => true\r\n *\r\n * _.isTypedArray([]);\r\n * // => false\r\n */\r\n var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\r\n\r\n /**\r\n * Checks if `value` is `undefined`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r\n * @example\r\n *\r\n * _.isUndefined(void 0);\r\n * // => true\r\n *\r\n * _.isUndefined(null);\r\n * // => false\r\n */\r\n function isUndefined(value) {\r\n return value === undefined;\r\n }\r\n\r\n /**\r\n * Converts `value` to an array.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Array} Returns the converted array.\r\n * @example\r\n *\r\n * _.toArray({ 'a': 1, 'b': 2 });\r\n * // => [1, 2]\r\n *\r\n * _.toArray('abc');\r\n * // => ['a', 'b', 'c']\r\n *\r\n * _.toArray(1);\r\n * // => []\r\n *\r\n * _.toArray(null);\r\n * // => []\r\n */\r\n function toArray(value) {\r\n if (!value) {\r\n return [];\r\n }\r\n if (isArrayLike(value)) {\r\n return isString(value) ? stringToArray(value) : copyArray(value);\r\n }\r\n if (symIterator && value[symIterator]) {\r\n return iteratorToArray(value[symIterator]());\r\n }\r\n var tag = getTag(value),\r\n func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);\r\n\r\n return func(value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a finite number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.12.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted number.\r\n * @example\r\n *\r\n * _.toFinite(3.2);\r\n * // => 3.2\r\n *\r\n * _.toFinite(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toFinite(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toFinite('3.2');\r\n * // => 3.2\r\n */\r\n function toFinite(value) {\r\n if (!value) {\r\n return value === 0 ? value : 0;\r\n }\r\n value = toNumber(value);\r\n if (value === INFINITY || value === -INFINITY) {\r\n var sign = (value < 0 ? -1 : 1);\r\n return sign * MAX_INTEGER;\r\n }\r\n return value === value ? value : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to an integer.\r\n *\r\n * **Note:** This method is loosely based on\r\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {number} Returns the converted integer.\r\n * @example\r\n *\r\n * _.toInteger(3.2);\r\n * // => 3\r\n *\r\n * _.toInteger(Number.MIN_VALUE);\r\n * // => 0\r\n *\r\n * _.toInteger(Infinity);\r\n * // => 1.7976931348623157e+308\r\n *\r\n * _.toInteger('3.2');\r\n * // => 3\r\n */\r\n function toInteger(value) {\r\n var result = toFinite(value),\r\n remainder = result % 1;\r\n\r\n return result === result ? (remainder ? result - remainder : result) : 0;\r\n }\r\n\r\n /**\r\n * Converts `value` to a number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to process.\r\n * @returns {number} Returns the number.\r\n * @example\r\n *\r\n * _.toNumber(3.2);\r\n * // => 3.2\r\n *\r\n * _.toNumber(Number.MIN_VALUE);\r\n * // => 5e-324\r\n *\r\n * _.toNumber(Infinity);\r\n * // => Infinity\r\n *\r\n * _.toNumber('3.2');\r\n * // => 3.2\r\n */\r\n function toNumber(value) {\r\n if (typeof value == 'number') {\r\n return value;\r\n }\r\n if (isSymbol(value)) {\r\n return NAN;\r\n }\r\n if (isObject(value)) {\r\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\r\n value = isObject(other) ? (other + '') : other;\r\n }\r\n if (typeof value != 'string') {\r\n return value === 0 ? value : +value;\r\n }\r\n value = value.replace(reTrim, '');\r\n var isBinary = reIsBinary.test(value);\r\n return (isBinary || reIsOctal.test(value))\r\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\r\n : (reIsBadHex.test(value) ? NAN : +value);\r\n }\r\n\r\n /**\r\n * Converts `value` to a plain object flattening inherited enumerable string\r\n * keyed properties of `value` to own properties of the plain object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {Object} Returns the converted plain object.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.assign({ 'a': 1 }, new Foo);\r\n * // => { 'a': 1, 'b': 2 }\r\n *\r\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\r\n * // => { 'a': 1, 'b': 2, 'c': 3 }\r\n */\r\n function toPlainObject(value) {\r\n return copyObject(value, keysIn(value));\r\n }\r\n\r\n /**\r\n * Converts `value` to a string. An empty string is returned for `null`\r\n * and `undefined` values. The sign of `-0` is preserved.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to convert.\r\n * @returns {string} Returns the converted string.\r\n * @example\r\n *\r\n * _.toString(null);\r\n * // => ''\r\n *\r\n * _.toString(-0);\r\n * // => '-0'\r\n *\r\n * _.toString([1, 2, 3]);\r\n * // => '1,2,3'\r\n */\r\n function toString(value) {\r\n return value == null ? '' : baseToString(value);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * This method is like `_.assign` except that it iterates over own and\r\n * inherited source properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @alias extend\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.assign\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * }\r\n *\r\n * function Bar() {\r\n * this.c = 3;\r\n * }\r\n *\r\n * Foo.prototype.b = 2;\r\n * Bar.prototype.d = 4;\r\n *\r\n * _.assignIn({ 'a': 0 }, new Foo, new Bar);\r\n * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }\r\n */\r\n var assignIn = createAssigner(function(object, source) {\r\n copyObject(source, keysIn(source), object);\r\n });\r\n\r\n /**\r\n * Creates an object that inherits from the `prototype` object. If a\r\n * `properties` object is given, its own enumerable string keyed properties\r\n * are assigned to the created object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Object\r\n * @param {Object} prototype The object to inherit from.\r\n * @param {Object} [properties] The properties to assign to the object.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * function Shape() {\r\n * this.x = 0;\r\n * this.y = 0;\r\n * }\r\n *\r\n * function Circle() {\r\n * Shape.call(this);\r\n * }\r\n *\r\n * Circle.prototype = _.create(Shape.prototype, {\r\n * 'constructor': Circle\r\n * });\r\n *\r\n * var circle = new Circle;\r\n * circle instanceof Circle;\r\n * // => true\r\n *\r\n * circle instanceof Shape;\r\n * // => true\r\n */\r\n function create(prototype, properties) {\r\n var result = baseCreate(prototype);\r\n return properties == null ? result : baseAssign(result, properties);\r\n }\r\n\r\n /**\r\n * Assigns own and inherited enumerable string keyed properties of source\r\n * objects to the destination object for all destination properties that\r\n * resolve to `undefined`. Source objects are applied from left to right.\r\n * Once a property is set, additional values of the same property are ignored.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaultsDeep\r\n * @example\r\n *\r\n * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });\r\n * // => { 'a': 1, 'b': 2 }\r\n */\r\n var defaults = baseRest(function(object, sources) {\r\n object = Object(object);\r\n\r\n var index = -1;\r\n var length = sources.length;\r\n var guard = length > 2 ? sources[2] : undefined;\r\n\r\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\r\n length = 1;\r\n }\r\n\r\n while (++index < length) {\r\n var source = sources[index];\r\n var props = keysIn(source);\r\n var propsIndex = -1;\r\n var propsLength = props.length;\r\n\r\n while (++propsIndex < propsLength) {\r\n var key = props[propsIndex];\r\n var value = object[key];\r\n\r\n if (value === undefined ||\r\n (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {\r\n object[key] = source[key];\r\n }\r\n }\r\n }\r\n\r\n return object;\r\n });\r\n\r\n /**\r\n * This method is like `_.defaults` except that it recursively assigns\r\n * default properties.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.10.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @see _.defaults\r\n * @example\r\n *\r\n * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });\r\n * // => { 'a': { 'b': 2, 'c': 3 } }\r\n */\r\n var defaultsDeep = baseRest(function(args) {\r\n args.push(undefined, customDefaultsMerge);\r\n return apply(mergeWith, undefined, args);\r\n });\r\n\r\n /**\r\n * This method is like `_.find` except that it returns the key of the first\r\n * element `predicate` returns truthy for instead of the element itself.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 1.1.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findKey(users, function(o) { return o.age < 40; });\r\n * // => 'barney' (iteration order is not guaranteed)\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findKey(users, { 'age': 1, 'active': true });\r\n * // => 'pebbles'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findKey(users, 'active');\r\n * // => 'barney'\r\n */\r\n function findKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwn);\r\n }\r\n\r\n /**\r\n * This method is like `_.findKey` except that it iterates over elements of\r\n * a collection in the opposite order.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.0.0\r\n * @category Object\r\n * @param {Object} object The object to inspect.\r\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\r\n * @returns {string|undefined} Returns the key of the matched element,\r\n * else `undefined`.\r\n * @example\r\n *\r\n * var users = {\r\n * 'barney': { 'age': 36, 'active': true },\r\n * 'fred': { 'age': 40, 'active': false },\r\n * 'pebbles': { 'age': 1, 'active': true }\r\n * };\r\n *\r\n * _.findLastKey(users, function(o) { return o.age < 40; });\r\n * // => returns 'pebbles' assuming `_.findKey` returns 'barney'\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.findLastKey(users, { 'age': 36, 'active': true });\r\n * // => 'barney'\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.findLastKey(users, ['active', false]);\r\n * // => 'fred'\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.findLastKey(users, 'active');\r\n * // => 'pebbles'\r\n */\r\n function findLastKey(object, predicate) {\r\n return baseFindKey(object, baseIteratee(predicate, 3), baseForOwnRight);\r\n }\r\n\r\n /**\r\n * Gets the value at `path` of `object`. If the resolved value is\r\n * `undefined`, the `defaultValue` is returned in its place.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to get.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.get(object, 'a[0].b.c');\r\n * // => 3\r\n *\r\n * _.get(object, ['a', '0', 'b', 'c']);\r\n * // => 3\r\n *\r\n * _.get(object, 'a.b.c', 'default');\r\n * // => 'default'\r\n */\r\n function get(object, path, defaultValue) {\r\n var result = object == null ? undefined : baseGet(object, path);\r\n return result === undefined ? defaultValue : result;\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct property of `object`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = { 'a': { 'b': 2 } };\r\n * var other = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.has(object, 'a');\r\n * // => true\r\n *\r\n * _.has(object, 'a.b');\r\n * // => true\r\n *\r\n * _.has(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.has(other, 'a');\r\n * // => false\r\n */\r\n function has(object, path) {\r\n return object != null && hasPath(object, path, baseHas);\r\n }\r\n\r\n /**\r\n * Checks if `path` is a direct or inherited property of `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path to check.\r\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\r\n * @example\r\n *\r\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\r\n *\r\n * _.hasIn(object, 'a');\r\n * // => true\r\n *\r\n * _.hasIn(object, 'a.b');\r\n * // => true\r\n *\r\n * _.hasIn(object, ['a', 'b']);\r\n * // => true\r\n *\r\n * _.hasIn(object, 'b');\r\n * // => false\r\n */\r\n function hasIn(object, path) {\r\n return object != null && hasPath(object, path, baseHasIn);\r\n }\r\n\r\n /**\r\n * Creates an object composed of the inverted keys and values of `object`.\r\n * If `object` contains duplicate values, subsequent values overwrite\r\n * property assignments of previous values.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invert(object);\r\n * // => { '1': 'c', '2': 'b' }\r\n */\r\n var invert = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n result[value] = key;\r\n }, constant(identity));\r\n\r\n /**\r\n * This method is like `_.invert` except that the inverted object is generated\r\n * from the results of running each element of `object` thru `iteratee`. The\r\n * corresponding inverted value of each inverted key is an array of keys\r\n * responsible for generating the inverted value. The iteratee is invoked\r\n * with one argument: (value).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.1.0\r\n * @category Object\r\n * @param {Object} object The object to invert.\r\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\r\n * @returns {Object} Returns the new inverted object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': 2, 'c': 1 };\r\n *\r\n * _.invertBy(object);\r\n * // => { '1': ['a', 'c'], '2': ['b'] }\r\n *\r\n * _.invertBy(object, function(value) {\r\n * return 'group' + value;\r\n * });\r\n * // => { 'group1': ['a', 'c'], 'group2': ['b'] }\r\n */\r\n var invertBy = createInverter(function(result, value, key) {\r\n if (value != null &&\r\n typeof value.toString != 'function') {\r\n value = nativeObjectToString.call(value);\r\n }\r\n\r\n if (hasOwnProperty.call(result, value)) {\r\n result[value].push(key);\r\n } else {\r\n result[value] = [key];\r\n }\r\n }, baseIteratee);\r\n\r\n /**\r\n * Creates an array of the own enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects. See the\r\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\r\n * for more details.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keys(new Foo);\r\n * // => ['a', 'b'] (iteration order is not guaranteed)\r\n *\r\n * _.keys('hi');\r\n * // => ['0', '1']\r\n */\r\n function keys(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\r\n }\r\n\r\n /**\r\n * Creates an array of the own and inherited enumerable property names of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property names.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.keysIn(new Foo);\r\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r\n */\r\n function keysIn(object) {\r\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\r\n }\r\n\r\n /**\r\n * This method is like `_.assign` except that it recursively merges own and\r\n * inherited enumerable string keyed properties of source objects into the\r\n * destination object. Source properties that resolve to `undefined` are\r\n * skipped if a destination value exists. Array and plain object properties\r\n * are merged recursively. Other objects and value types are overridden by\r\n * assignment. Source objects are applied from left to right. Subsequent\r\n * sources overwrite property assignments of previous sources.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.5.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} [sources] The source objects.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = {\r\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\r\n * };\r\n *\r\n * var other = {\r\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\r\n * };\r\n *\r\n * _.merge(object, other);\r\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\r\n */\r\n var merge = createAssigner(function(object, source, srcIndex) {\r\n baseMerge(object, source, srcIndex);\r\n });\r\n\r\n /**\r\n * This method is like `_.merge` except that it accepts `customizer` which\r\n * is invoked to produce the merged values of the destination and source\r\n * properties. If `customizer` returns `undefined`, merging is handled by the\r\n * method instead. The `customizer` is invoked with six arguments:\r\n * (objValue, srcValue, key, object, source, stack).\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The destination object.\r\n * @param {...Object} sources The source objects.\r\n * @param {Function} customizer The function to customize assigned values.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * function customizer(objValue, srcValue) {\r\n * if (_.isArray(objValue)) {\r\n * return objValue.concat(srcValue);\r\n * }\r\n * }\r\n *\r\n * var object = { 'a': [1], 'b': [2] };\r\n * var other = { 'a': [3], 'b': [4] };\r\n *\r\n * _.mergeWith(object, other, customizer);\r\n * // => { 'a': [1, 3], 'b': [2, 4] }\r\n */\r\n var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {\r\n baseMerge(object, source, srcIndex, customizer);\r\n });\r\n\r\n /**\r\n * The opposite of `_.pick`; this method creates an object composed of the\r\n * own and inherited enumerable property paths of `object` that are not omitted.\r\n *\r\n * **Note:** This method is considerably slower than `_.pick`.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to omit.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omit(object, ['a', 'c']);\r\n * // => { 'b': '2' }\r\n */\r\n var omit = flatRest(function(object, paths) {\r\n var result = {};\r\n if (object == null) {\r\n return result;\r\n }\r\n var isDeep = false;\r\n paths = arrayMap(paths, function(path) {\r\n path = castPath(path, object);\r\n isDeep || (isDeep = path.length > 1);\r\n return path;\r\n });\r\n copyObject(object, getAllKeysIn(object), result);\r\n if (isDeep) {\r\n result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);\r\n }\r\n var length = paths.length;\r\n while (length--) {\r\n baseUnset(result, paths[length]);\r\n }\r\n return result;\r\n });\r\n\r\n /**\r\n * The opposite of `_.pickBy`; this method creates an object composed of\r\n * the own and inherited enumerable string keyed properties of `object` that\r\n * `predicate` doesn't return truthy for. The predicate is invoked with two\r\n * arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.omitBy(object, _.isNumber);\r\n * // => { 'b': '2' }\r\n */\r\n function omitBy(object, predicate) {\r\n return pickBy(object, negate(baseIteratee(predicate)));\r\n }\r\n\r\n /**\r\n * Creates an object composed of the picked `object` properties.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {...(string|string[])} [paths] The property paths to pick.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pick(object, ['a', 'c']);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n var pick = flatRest(function(object, paths) {\r\n return object == null ? {} : basePick(object, paths);\r\n });\r\n\r\n /**\r\n * Creates an object composed of the `object` properties `predicate` returns\r\n * truthy for. The predicate is invoked with two arguments: (value, key).\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Object\r\n * @param {Object} object The source object.\r\n * @param {Function} [predicate=_.identity] The function invoked per property.\r\n * @returns {Object} Returns the new object.\r\n * @example\r\n *\r\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\r\n *\r\n * _.pickBy(object, _.isNumber);\r\n * // => { 'a': 1, 'c': 3 }\r\n */\r\n function pickBy(object, predicate) {\r\n if (object == null) {\r\n return {};\r\n }\r\n var props = arrayMap(getAllKeysIn(object), function(prop) {\r\n return [prop];\r\n });\r\n predicate = baseIteratee(predicate);\r\n return basePickBy(object, props, function(value, path) {\r\n return predicate(value, path[0]);\r\n });\r\n }\r\n\r\n /**\r\n * This method is like `_.get` except that if the resolved value is a\r\n * function it's invoked with the `this` binding of its parent object and\r\n * its result is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @param {Array|string} path The path of the property to resolve.\r\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\r\n * @returns {*} Returns the resolved value.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };\r\n *\r\n * _.result(object, 'a[0].b.c1');\r\n * // => 3\r\n *\r\n * _.result(object, 'a[0].b.c2');\r\n * // => 4\r\n *\r\n * _.result(object, 'a[0].b.c3', 'default');\r\n * // => 'default'\r\n *\r\n * _.result(object, 'a[0].b.c3', _.constant('default'));\r\n * // => 'default'\r\n */\r\n function result(object, path, defaultValue) {\r\n path = castPath(path, object);\r\n\r\n var index = -1,\r\n length = path.length;\r\n\r\n // Ensure the loop is entered when path is empty.\r\n if (!length) {\r\n length = 1;\r\n object = undefined;\r\n }\r\n while (++index < length) {\r\n var value = object == null ? undefined : object[toKey(path[index])];\r\n if (value === undefined) {\r\n index = length;\r\n value = defaultValue;\r\n }\r\n object = isFunction(value) ? value.call(object) : value;\r\n }\r\n return object;\r\n }\r\n\r\n /**\r\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\r\n * it's created. Arrays are created for missing index properties while objects\r\n * are created for all other missing properties. Use `_.setWith` to customize\r\n * `path` creation.\r\n *\r\n * **Note:** This method mutates `object`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.7.0\r\n * @category Object\r\n * @param {Object} object The object to modify.\r\n * @param {Array|string} path The path of the property to set.\r\n * @param {*} value The value to set.\r\n * @returns {Object} Returns `object`.\r\n * @example\r\n *\r\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\r\n *\r\n * _.set(object, 'a[0].b.c', 4);\r\n * console.log(object.a[0].b.c);\r\n * // => 4\r\n *\r\n * _.set(object, ['x', '0', 'y', 'z'], 5);\r\n * console.log(object.x[0].y.z);\r\n * // => 5\r\n */\r\n function set(object, path, value) {\r\n return object == null ? object : baseSet(object, path, value);\r\n }\r\n\r\n /**\r\n * Creates an array of the own enumerable string keyed property values of `object`.\r\n *\r\n * **Note:** Non-object values are coerced to objects.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Object\r\n * @param {Object} object The object to query.\r\n * @returns {Array} Returns the array of property values.\r\n * @example\r\n *\r\n * function Foo() {\r\n * this.a = 1;\r\n * this.b = 2;\r\n * }\r\n *\r\n * Foo.prototype.c = 3;\r\n *\r\n * _.values(new Foo);\r\n * // => [1, 2] (iteration order is not guaranteed)\r\n *\r\n * _.values('hi');\r\n * // => ['h', 'i']\r\n */\r\n function values(object) {\r\n return object == null ? [] : baseValues(object, keys(object));\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Clamps `number` within the inclusive `lower` and `upper` bounds.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.0.0\r\n * @category Number\r\n * @param {number} number The number to clamp.\r\n * @param {number} [lower] The lower bound.\r\n * @param {number} upper The upper bound.\r\n * @returns {number} Returns the clamped number.\r\n * @example\r\n *\r\n * _.clamp(-10, -5, 5);\r\n * // => -5\r\n *\r\n * _.clamp(10, -5, 5);\r\n * // => 5\r\n */\r\n function clamp(number, lower, upper) {\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = undefined;\r\n }\r\n if (upper !== undefined) {\r\n upper = toNumber(upper);\r\n upper = upper === upper ? upper : 0;\r\n }\r\n if (lower !== undefined) {\r\n lower = toNumber(lower);\r\n lower = lower === lower ? lower : 0;\r\n }\r\n return baseClamp(toNumber(number), lower, upper);\r\n }\r\n\r\n /**\r\n * Produces a random number between the inclusive `lower` and `upper` bounds.\r\n * If only one argument is provided a number between `0` and the given number\r\n * is returned. If `floating` is `true`, or either `lower` or `upper` are\r\n * floats, a floating-point number is returned instead of an integer.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 0.7.0\r\n * @category Number\r\n * @param {number} [lower=0] The lower bound.\r\n * @param {number} [upper=1] The upper bound.\r\n * @param {boolean} [floating] Specify returning a floating-point number.\r\n * @returns {number} Returns the random number.\r\n * @example\r\n *\r\n * _.random(0, 5);\r\n * // => an integer between 0 and 5\r\n *\r\n * _.random(5);\r\n * // => also an integer between 0 and 5\r\n *\r\n * _.random(5, true);\r\n * // => a floating-point number between 0 and 5\r\n *\r\n * _.random(1.2, 5.2);\r\n * // => a floating-point number between 1.2 and 5.2\r\n */\r\n function random(lower, upper, floating) {\r\n if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {\r\n upper = floating = undefined;\r\n }\r\n if (floating === undefined) {\r\n if (typeof upper == 'boolean') {\r\n floating = upper;\r\n upper = undefined;\r\n }\r\n else if (typeof lower == 'boolean') {\r\n floating = lower;\r\n lower = undefined;\r\n }\r\n }\r\n if (lower === undefined && upper === undefined) {\r\n lower = 0;\r\n upper = 1;\r\n }\r\n else {\r\n lower = toFinite(lower);\r\n if (upper === undefined) {\r\n upper = lower;\r\n lower = 0;\r\n } else {\r\n upper = toFinite(upper);\r\n }\r\n }\r\n if (lower > upper) {\r\n var temp = lower;\r\n lower = upper;\r\n upper = temp;\r\n }\r\n if (floating || lower % 1 || upper % 1) {\r\n var rand = nativeRandom();\r\n return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);\r\n }\r\n return baseRandom(lower, upper);\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Converts the characters \"&\", \"<\", \">\", '\"', and \"'\" in `string` to their\r\n * corresponding HTML entities.\r\n *\r\n * **Note:** No other characters are escaped. To escape additional\r\n * characters use a third-party library like [_he_](https://mths.be/he).\r\n *\r\n * Though the \">\" character is escaped for symmetry, characters like\r\n * \">\" and \"/\" don't need escaping in HTML and have no special meaning\r\n * unless they're part of a tag or unquoted attribute value. See\r\n * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)\r\n * (under \"semi-related fun fact\") for more details.\r\n *\r\n * When working with HTML you should always\r\n * [quote attribute values](http://wonko.com/post/html-escaping) to reduce\r\n * XSS vectors.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category String\r\n * @param {string} [string=''] The string to escape.\r\n * @returns {string} Returns the escaped string.\r\n * @example\r\n *\r\n * _.escape('fred, barney, & pebbles');\r\n * // => 'fred, barney, &amp; pebbles'\r\n */\r\n function escape(string) {\r\n string = toString(string);\r\n return (string && reHasUnescapedHtml.test(string))\r\n ? string.replace(reUnescapedHtml, escapeHtmlChar)\r\n : string;\r\n }\r\n\r\n /**\r\n * Removes leading and trailing whitespace or specified characters from `string`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category String\r\n * @param {string} [string=''] The string to trim.\r\n * @param {string} [chars=whitespace] The characters to trim.\r\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\r\n * @returns {string} Returns the trimmed string.\r\n * @example\r\n *\r\n * _.trim(' abc ');\r\n * // => 'abc'\r\n *\r\n * _.trim('-_-abc-_-', '_-');\r\n * // => 'abc'\r\n *\r\n * _.map([' foo ', ' bar '], _.trim);\r\n * // => ['foo', 'bar']\r\n */\r\n function trim(string, chars, guard) {\r\n string = toString(string);\r\n if (string && (guard || chars === undefined)) {\r\n return string.replace(reTrim, '');\r\n }\r\n if (!string || !(chars = baseToString(chars))) {\r\n return string;\r\n }\r\n var strSymbols = stringToArray(string),\r\n chrSymbols = stringToArray(chars),\r\n start = charsStartIndex(strSymbols, chrSymbols),\r\n end = charsEndIndex(strSymbols, chrSymbols) + 1;\r\n\r\n return castSlice(strSymbols, start, end).join('');\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Creates a function that returns `value`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {*} value The value to return from the new function.\r\n * @returns {Function} Returns the new constant function.\r\n * @example\r\n *\r\n * var objects = _.times(2, _.constant({ 'a': 1 }));\r\n *\r\n * console.log(objects);\r\n * // => [{ 'a': 1 }, { 'a': 1 }]\r\n *\r\n * console.log(objects[0] === objects[1]);\r\n * // => true\r\n */\r\n function constant(value) {\r\n return function() {\r\n return value;\r\n };\r\n }\r\n\r\n /**\r\n * This method returns the first argument it receives.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} value Any value.\r\n * @returns {*} Returns `value`.\r\n * @example\r\n *\r\n * var object = { 'a': 1 };\r\n *\r\n * console.log(_.identity(object) === object);\r\n * // => true\r\n */\r\n function identity(value) {\r\n return value;\r\n }\r\n\r\n /**\r\n * Creates a function that invokes `func` with the arguments of the created\r\n * function. If `func` is a property name, the created function returns the\r\n * property value for a given element. If `func` is an array or object, the\r\n * created function returns `true` for elements that contain the equivalent\r\n * source properties, otherwise it returns `false`.\r\n *\r\n * @static\r\n * @since 4.0.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {*} [func=_.identity] The value to convert to a callback.\r\n * @returns {Function} Returns the callback.\r\n * @example\r\n *\r\n * var users = [\r\n * { 'user': 'barney', 'age': 36, 'active': true },\r\n * { 'user': 'fred', 'age': 40, 'active': false }\r\n * ];\r\n *\r\n * // The `_.matches` iteratee shorthand.\r\n * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));\r\n * // => [{ 'user': 'barney', 'age': 36, 'active': true }]\r\n *\r\n * // The `_.matchesProperty` iteratee shorthand.\r\n * _.filter(users, _.iteratee(['user', 'fred']));\r\n * // => [{ 'user': 'fred', 'age': 40 }]\r\n *\r\n * // The `_.property` iteratee shorthand.\r\n * _.map(users, _.iteratee('user'));\r\n * // => ['barney', 'fred']\r\n *\r\n * // Create custom iteratee shorthands.\r\n * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {\r\n * return !_.isRegExp(func) ? iteratee(func) : function(string) {\r\n * return func.test(string);\r\n * };\r\n * });\r\n *\r\n * _.filter(['abc', 'def'], /ef/);\r\n * // => ['def']\r\n */\r\n function iteratee(func) {\r\n return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Creates a function that performs a partial deep comparison between a given\r\n * object and `source`, returning `true` if the given object has equivalent\r\n * property values, else `false`.\r\n *\r\n * **Note:** The created function is equivalent to `_.isMatch` with `source`\r\n * partially applied.\r\n *\r\n * Partial comparisons will match empty array and empty object `source`\r\n * values against any array or object value, respectively. See `_.isEqual`\r\n * for a list of supported value comparisons.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 3.0.0\r\n * @category Util\r\n * @param {Object} source The object of property values to match.\r\n * @returns {Function} Returns the new spec function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': 1, 'b': 2, 'c': 3 },\r\n * { 'a': 4, 'b': 5, 'c': 6 }\r\n * ];\r\n *\r\n * _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));\r\n * // => [{ 'a': 4, 'b': 5, 'c': 6 }]\r\n */\r\n function matches(source) {\r\n return baseMatches(baseClone(source, CLONE_DEEP_FLAG));\r\n }\r\n\r\n /**\r\n * Adds all own enumerable string keyed function properties of a source\r\n * object to the destination object. If `object` is a function, then methods\r\n * are added to its prototype as well.\r\n *\r\n * **Note:** Use `_.runInContext` to create a pristine `lodash` function to\r\n * avoid conflicts caused by modifying the original.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {Function|Object} [object=lodash] The destination object.\r\n * @param {Object} source The object of functions to add.\r\n * @param {Object} [options={}] The options object.\r\n * @param {boolean} [options.chain=true] Specify whether mixins are chainable.\r\n * @returns {Function|Object} Returns `object`.\r\n * @example\r\n *\r\n * function vowels(string) {\r\n * return _.filter(string, function(v) {\r\n * return /[aeiou]/i.test(v);\r\n * });\r\n * }\r\n *\r\n * _.mixin({ 'vowels': vowels });\r\n * _.vowels('fred');\r\n * // => ['e']\r\n *\r\n * _('fred').vowels().value();\r\n * // => ['e']\r\n *\r\n * _.mixin({ 'vowels': vowels }, { 'chain': false });\r\n * _('fred').vowels();\r\n * // => ['e']\r\n */\r\n function mixin(object, source, options) {\r\n var props = keys(source),\r\n methodNames = baseFunctions(source, props);\r\n\r\n if (options == null &&\r\n !(isObject(source) && (methodNames.length || !props.length))) {\r\n options = source;\r\n source = object;\r\n object = this;\r\n methodNames = baseFunctions(source, keys(source));\r\n }\r\n var chain = !(isObject(options) && 'chain' in options) || !!options.chain,\r\n isFunc = isFunction(object);\r\n\r\n arrayEach(methodNames, function(methodName) {\r\n var func = source[methodName];\r\n object[methodName] = func;\r\n if (isFunc) {\r\n object.prototype[methodName] = function() {\r\n var chainAll = this.__chain__;\r\n if (chain || chainAll) {\r\n var result = object(this.__wrapped__),\r\n actions = result.__actions__ = copyArray(this.__actions__);\r\n\r\n actions.push({ 'func': func, 'args': arguments, 'thisArg': object });\r\n result.__chain__ = chainAll;\r\n return result;\r\n }\r\n return func.apply(object, arrayPush([this.value()], arguments));\r\n };\r\n }\r\n });\r\n\r\n return object;\r\n }\r\n\r\n /**\r\n * Reverts the `_` variable to its previous value and returns a reference to\r\n * the `lodash` function.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @returns {Function} Returns the `lodash` function.\r\n * @example\r\n *\r\n * var lodash = _.noConflict();\r\n */\r\n function noConflict() {\r\n if (root._ === this) {\r\n root._ = oldDash;\r\n }\r\n return this;\r\n }\r\n\r\n /**\r\n * This method returns `undefined`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.3.0\r\n * @category Util\r\n * @example\r\n *\r\n * _.times(2, _.noop);\r\n * // => [undefined, undefined]\r\n */\r\n function noop() {\r\n // No operation performed.\r\n }\r\n\r\n /**\r\n * Creates a function that returns the value at `path` of a given object.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 2.4.0\r\n * @category Util\r\n * @param {Array|string} path The path of the property to get.\r\n * @returns {Function} Returns the new accessor function.\r\n * @example\r\n *\r\n * var objects = [\r\n * { 'a': { 'b': 2 } },\r\n * { 'a': { 'b': 1 } }\r\n * ];\r\n *\r\n * _.map(objects, _.property('a.b'));\r\n * // => [2, 1]\r\n *\r\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\r\n * // => [1, 2]\r\n */\r\n function property(path) {\r\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\r\n }\r\n\r\n /**\r\n * Creates an array of numbers (positive and/or negative) progressing from\r\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\r\n * `start` is specified without an `end` or `step`. If `end` is not specified,\r\n * it's set to `start` with `start` then set to `0`.\r\n *\r\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\r\n * floating-point values which can produce unexpected results.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {number} [start=0] The start of the range.\r\n * @param {number} end The end of the range.\r\n * @param {number} [step=1] The value to increment or decrement by.\r\n * @returns {Array} Returns the range of numbers.\r\n * @see _.inRange, _.rangeRight\r\n * @example\r\n *\r\n * _.range(4);\r\n * // => [0, 1, 2, 3]\r\n *\r\n * _.range(-4);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 5);\r\n * // => [1, 2, 3, 4]\r\n *\r\n * _.range(0, 20, 5);\r\n * // => [0, 5, 10, 15]\r\n *\r\n * _.range(0, -4, -1);\r\n * // => [0, -1, -2, -3]\r\n *\r\n * _.range(1, 4, 0);\r\n * // => [1, 1, 1]\r\n *\r\n * _.range(0);\r\n * // => []\r\n */\r\n var range = createRange();\r\n\r\n /**\r\n * This method returns a new empty array.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {Array} Returns the new empty array.\r\n * @example\r\n *\r\n * var arrays = _.times(2, _.stubArray);\r\n *\r\n * console.log(arrays);\r\n * // => [[], []]\r\n *\r\n * console.log(arrays[0] === arrays[1]);\r\n * // => false\r\n */\r\n function stubArray() {\r\n return [];\r\n }\r\n\r\n /**\r\n * This method returns `false`.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @since 4.13.0\r\n * @category Util\r\n * @returns {boolean} Returns `false`.\r\n * @example\r\n *\r\n * _.times(2, _.stubFalse);\r\n * // => [false, false]\r\n */\r\n function stubFalse() {\r\n return false;\r\n }\r\n\r\n /**\r\n * Generates a unique ID. If `prefix` is given, the ID is appended to it.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Util\r\n * @param {string} [prefix=''] The value to prefix the ID with.\r\n * @returns {string} Returns the unique ID.\r\n * @example\r\n *\r\n * _.uniqueId('contact_');\r\n * // => 'contact_104'\r\n *\r\n * _.uniqueId();\r\n * // => '105'\r\n */\r\n function uniqueId(prefix) {\r\n var id = ++idCounter;\r\n return toString(prefix) + id;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * Computes the maximum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the maximum value.\r\n * @example\r\n *\r\n * _.max([4, 2, 8, 6]);\r\n * // => 8\r\n *\r\n * _.max([]);\r\n * // => undefined\r\n */\r\n function max(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseGt)\r\n : undefined;\r\n }\r\n\r\n /**\r\n * Computes the minimum value of `array`. If `array` is empty or falsey,\r\n * `undefined` is returned.\r\n *\r\n * @static\r\n * @since 0.1.0\r\n * @memberOf _\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {*} Returns the minimum value.\r\n * @example\r\n *\r\n * _.min([4, 2, 8, 6]);\r\n * // => 2\r\n *\r\n * _.min([]);\r\n * // => undefined\r\n */\r\n function min(array) {\r\n return (array && array.length)\r\n ? baseExtremum(array, identity, baseLt)\r\n : undefined;\r\n }\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return wrapped values in chain sequences.\r\n lodash.after = after;\r\n lodash.assignIn = assignIn;\r\n lodash.before = before;\r\n lodash.bind = bind;\r\n lodash.chain = chain;\r\n lodash.compact = compact;\r\n lodash.concat = concat;\r\n lodash.countBy = countBy;\r\n lodash.create = create;\r\n lodash.debounce = debounce;\r\n lodash.defaults = defaults;\r\n lodash.defaultsDeep = defaultsDeep;\r\n lodash.defer = defer;\r\n lodash.delay = delay;\r\n lodash.difference = difference;\r\n lodash.drop = drop;\r\n lodash.filter = filter;\r\n lodash.flatten = flatten;\r\n lodash.flattenDeep = flattenDeep;\r\n lodash.groupBy = groupBy;\r\n lodash.initial = initial;\r\n lodash.intersection = intersection;\r\n lodash.invert = invert;\r\n lodash.invertBy = invertBy;\r\n lodash.iteratee = iteratee;\r\n lodash.keys = keys;\r\n lodash.map = map;\r\n lodash.matches = matches;\r\n lodash.merge = merge;\r\n lodash.mixin = mixin;\r\n lodash.negate = negate;\r\n lodash.omit = omit;\r\n lodash.omitBy = omitBy;\r\n lodash.once = once;\r\n lodash.pick = pick;\r\n lodash.range = range;\r\n lodash.reject = reject;\r\n lodash.rest = rest;\r\n lodash.set = set;\r\n lodash.slice = slice;\r\n lodash.sortBy = sortBy;\r\n lodash.take = take;\r\n lodash.takeRight = takeRight;\r\n lodash.tap = tap;\r\n lodash.throttle = throttle;\r\n lodash.thru = thru;\r\n lodash.toArray = toArray;\r\n lodash.union = union;\r\n lodash.uniq = uniq;\r\n lodash.uniqBy = uniqBy;\r\n lodash.unzip = unzip;\r\n lodash.values = values;\r\n lodash.without = without;\r\n lodash.zip = zip;\r\n lodash.zipObject = zipObject;\r\n\r\n // Add aliases.\r\n lodash.extend = assignIn;\r\n\r\n // Add methods to `lodash.prototype`.\r\n mixin(lodash, lodash);\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n // Add methods that return unwrapped values in chain sequences.\r\n lodash.clamp = clamp;\r\n lodash.clone = clone;\r\n lodash.cloneDeep = cloneDeep;\r\n lodash.escape = escape;\r\n lodash.every = every;\r\n lodash.find = find;\r\n lodash.findIndex = findIndex;\r\n lodash.findKey = findKey;\r\n lodash.findLastIndex = findLastIndex;\r\n lodash.findLastKey = findLastKey;\r\n lodash.forEach = forEach;\r\n lodash.get = get;\r\n lodash.has = has;\r\n lodash.head = head;\r\n lodash.identity = identity;\r\n lodash.indexOf = indexOf;\r\n lodash.isArguments = isArguments;\r\n lodash.isArray = isArray;\r\n lodash.isArrayLike = isArrayLike;\r\n lodash.isBoolean = isBoolean;\r\n lodash.isDate = isDate;\r\n lodash.isEmpty = isEmpty;\r\n lodash.isEqual = isEqual;\r\n lodash.isFinite = isFinite;\r\n lodash.isFunction = isFunction;\r\n lodash.isNaN = isNaN;\r\n lodash.isNull = isNull;\r\n lodash.isNumber = isNumber;\r\n lodash.isObject = isObject;\r\n lodash.isPlainObject = isPlainObject;\r\n lodash.isRegExp = isRegExp;\r\n lodash.isString = isString;\r\n lodash.isUndefined = isUndefined;\r\n lodash.last = last;\r\n lodash.max = max;\r\n lodash.min = min;\r\n lodash.noConflict = noConflict;\r\n lodash.noop = noop;\r\n lodash.random = random;\r\n lodash.reduce = reduce;\r\n lodash.result = result;\r\n lodash.size = size;\r\n lodash.some = some;\r\n lodash.trim = trim;\r\n lodash.uniqueId = uniqueId;\r\n\r\n // Add aliases.\r\n lodash.each = forEach;\r\n lodash.first = head;\r\n\r\n mixin(lodash, (function() {\r\n var source = {};\r\n baseForOwn(lodash, function(func, methodName) {\r\n if (!hasOwnProperty.call(lodash.prototype, methodName)) {\r\n source[methodName] = func;\r\n }\r\n });\r\n return source;\r\n }()), { 'chain': false });\r\n\r\n /*------------------------------------------------------------------------*/\r\n\r\n /**\r\n * The semantic version number.\r\n *\r\n * @static\r\n * @memberOf _\r\n * @type {string}\r\n */\r\n lodash.VERSION = VERSION;\r\n\r\n // Add `LazyWrapper` methods for `_.drop` and `_.take` variants.\r\n arrayEach(['drop', 'take'], function(methodName, index) {\r\n LazyWrapper.prototype[methodName] = function(n) {\r\n n = n === undefined ? 1 : nativeMax(toInteger(n), 0);\r\n\r\n var result = (this.__filtered__ && !index)\r\n ? new LazyWrapper(this)\r\n : this.clone();\r\n\r\n if (result.__filtered__) {\r\n result.__takeCount__ = nativeMin(n, result.__takeCount__);\r\n } else {\r\n result.__views__.push({\r\n 'size': nativeMin(n, MAX_ARRAY_LENGTH),\r\n 'type': methodName + (result.__dir__ < 0 ? 'Right' : '')\r\n });\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype[methodName + 'Right'] = function(n) {\r\n return this.reverse()[methodName](n).reverse();\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods that accept an `iteratee` value.\r\n arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {\r\n var type = index + 1,\r\n isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;\r\n\r\n LazyWrapper.prototype[methodName] = function(iteratee) {\r\n var result = this.clone();\r\n result.__iteratees__.push({\r\n 'iteratee': getIteratee(iteratee, 3),\r\n 'type': type\r\n });\r\n result.__filtered__ = result.__filtered__ || isFilter;\r\n return result;\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.head` and `_.last`.\r\n arrayEach(['head', 'last'], function(methodName, index) {\r\n var takeName = 'take' + (index ? 'Right' : '');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this[takeName](1).value()[0];\r\n };\r\n });\r\n\r\n // Add `LazyWrapper` methods for `_.initial` and `_.tail`.\r\n arrayEach(['initial', 'tail'], function(methodName, index) {\r\n var dropName = 'drop' + (index ? '' : 'Right');\r\n\r\n LazyWrapper.prototype[methodName] = function() {\r\n return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);\r\n };\r\n });\r\n\r\n LazyWrapper.prototype.compact = function() {\r\n return this.filter(identity);\r\n };\r\n\r\n LazyWrapper.prototype.find = function(predicate) {\r\n return this.filter(predicate).head();\r\n };\r\n\r\n LazyWrapper.prototype.findLast = function(predicate) {\r\n return this.reverse().find(predicate);\r\n };\r\n\r\n LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {\r\n if (typeof path == 'function') {\r\n return new LazyWrapper(this);\r\n }\r\n return this.map(function(value) {\r\n return baseInvoke(value, path, args);\r\n });\r\n });\r\n\r\n LazyWrapper.prototype.reject = function(predicate) {\r\n return this.filter(negate(getIteratee(predicate)));\r\n };\r\n\r\n LazyWrapper.prototype.slice = function(start, end) {\r\n start = toInteger(start);\r\n\r\n var result = this;\r\n if (result.__filtered__ && (start > 0 || end < 0)) {\r\n return new LazyWrapper(result);\r\n }\r\n if (start < 0) {\r\n result = result.takeRight(-start);\r\n } else if (start) {\r\n result = result.drop(start);\r\n }\r\n if (end !== undefined) {\r\n end = toInteger(end);\r\n result = end < 0 ? result.dropRight(-end) : result.take(end - start);\r\n }\r\n return result;\r\n };\r\n\r\n LazyWrapper.prototype.takeRightWhile = function(predicate) {\r\n return this.reverse().takeWhile(predicate).reverse();\r\n };\r\n\r\n LazyWrapper.prototype.toArray = function() {\r\n return this.take(MAX_ARRAY_LENGTH);\r\n };\r\n\r\n // Add `LazyWrapper` methods to `lodash.prototype`.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),\r\n isTaker = /^(?:head|last)$/.test(methodName),\r\n lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],\r\n retUnwrapped = isTaker || /^find/.test(methodName);\r\n\r\n if (!lodashFunc) {\r\n return;\r\n }\r\n lodash.prototype[methodName] = function() {\r\n var value = this.__wrapped__,\r\n args = isTaker ? [1] : arguments,\r\n isLazy = value instanceof LazyWrapper,\r\n iteratee = args[0],\r\n useLazy = isLazy || isArray(value);\r\n\r\n var interceptor = function(value) {\r\n var result = lodashFunc.apply(lodash, arrayPush([value], args));\r\n return (isTaker && chainAll) ? result[0] : result;\r\n };\r\n\r\n if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {\r\n // Avoid lazy use if the iteratee has a \"length\" value other than `1`.\r\n isLazy = useLazy = false;\r\n }\r\n var chainAll = this.__chain__,\r\n isHybrid = !!this.__actions__.length,\r\n isUnwrapped = retUnwrapped && !chainAll,\r\n onlyLazy = isLazy && !isHybrid;\r\n\r\n if (!retUnwrapped && useLazy) {\r\n value = onlyLazy ? value : new LazyWrapper(this);\r\n var result = func.apply(value, args);\r\n result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });\r\n return new LodashWrapper(result, chainAll);\r\n }\r\n if (isUnwrapped && onlyLazy) {\r\n return func.apply(this, args);\r\n }\r\n result = this.thru(interceptor);\r\n return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;\r\n };\r\n });\r\n\r\n // Add `Array` methods to `lodash.prototype`.\r\n arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {\r\n var func = arrayProto[methodName],\r\n chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',\r\n retUnwrapped = /^(?:pop|shift)$/.test(methodName);\r\n\r\n lodash.prototype[methodName] = function() {\r\n var args = arguments;\r\n if (retUnwrapped && !this.__chain__) {\r\n var value = this.value();\r\n return func.apply(isArray(value) ? value : [], args);\r\n }\r\n return this[chainName](function(value) {\r\n return func.apply(isArray(value) ? value : [], args);\r\n });\r\n };\r\n });\r\n\r\n // Map minified method names to their real names.\r\n baseForOwn(LazyWrapper.prototype, function(func, methodName) {\r\n var lodashFunc = lodash[methodName];\r\n if (lodashFunc) {\r\n var key = (lodashFunc.name + ''),\r\n names = realNames[key] || (realNames[key] = []);\r\n\r\n names.push({ 'name': methodName, 'func': lodashFunc });\r\n }\r\n });\r\n\r\n realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{\r\n 'name': 'wrapper',\r\n 'func': undefined\r\n }];\r\n\r\n // Add methods to `LazyWrapper`.\r\n LazyWrapper.prototype.clone = lazyClone;\r\n LazyWrapper.prototype.reverse = lazyReverse;\r\n LazyWrapper.prototype.value = lazyValue;\r\n\r\n // Add lazy aliases.\r\n lodash.prototype.first = lodash.prototype.head;\r\n\r\n if (symIterator) {\r\n lodash.prototype[symIterator] = wrapperToIterator;\r\n }\r\n\r\n /*--------------------------------------------------------------------------*/\r\n\r\n // Some AMD build optimizers, like r.js, check for condition patterns like:\r\n if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {\r\n // Expose Lodash on the global object to prevent errors when Lodash is\r\n // loaded by a script tag in the presence of an AMD loader.\r\n // See http://requirejs.org/docs/errors.html#mismatch for more details.\r\n // Use `_.noConflict` to remove Lodash from the global object.\r\n root._ = lodash;\r\n\r\n // Define as an anonymous module so, through path mapping, it can be\r\n // referenced as the \"underscore\" module.\r\n define(function() {\r\n return lodash;\r\n });\r\n }\r\n // Check for `exports` after `define` in case a build optimizer adds it.\r\n else if (freeModule) {\r\n // Export for Node.js.\r\n (freeModule.exports = lodash)._ = lodash;\r\n // Export for CommonJS support.\r\n freeExports._ = lodash;\r\n }\r\n else {\r\n // Export to the global object.\r\n root._ = lodash;\r\n }\r\n}.call(this));\r\n/**\r\n * 常量\r\n */\r\n\r\n_.extend(BI, {\r\n MAX: 0xfffffffffffffff,\r\n MIN: -0xfffffffffffffff,\r\n EVENT_RESPONSE_TIME: 200,\r\n zIndex_layer: 1e5,\r\n zIndex_popover: 1e6,\r\n zIndex_popup: 1e7,\r\n zIndex_masker: 1e8,\r\n zIndex_tip: 1e9,\r\n emptyStr: \"\",\r\n emptyFn: function () {\r\n },\r\n empty: null,\r\n Key: {\r\n 48: \"0\",\r\n 49: \"1\",\r\n 50: \"2\",\r\n 51: \"3\",\r\n 52: \"4\",\r\n 53: \"5\",\r\n 54: \"6\",\r\n 55: \"7\",\r\n 56: \"8\",\r\n 57: \"9\",\r\n 65: \"a\",\r\n 66: \"b\",\r\n 67: \"c\",\r\n 68: \"d\",\r\n 69: \"e\",\r\n 70: \"f\",\r\n 71: \"g\",\r\n 72: \"h\",\r\n 73: \"i\",\r\n 74: \"j\",\r\n 75: \"k\",\r\n 76: \"l\",\r\n 77: \"m\",\r\n 78: \"n\",\r\n 79: \"o\",\r\n 80: \"p\",\r\n 81: \"q\",\r\n 82: \"r\",\r\n 83: \"s\",\r\n 84: \"t\",\r\n 85: \"u\",\r\n 86: \"v\",\r\n 87: \"w\",\r\n 88: \"x\",\r\n 89: \"y\",\r\n 90: \"z\",\r\n 96: \"0\",\r\n 97: \"1\",\r\n 98: \"2\",\r\n 99: \"3\",\r\n 100: \"4\",\r\n 101: \"5\",\r\n 102: \"6\",\r\n 103: \"7\",\r\n 104: \"8\",\r\n 105: \"9\",\r\n 106: \"*\",\r\n 107: \"+\",\r\n 109: \"-\",\r\n 110: \".\",\r\n 111: \"/\"\r\n },\r\n KeyCode: {\r\n BACKSPACE: 8,\r\n COMMA: 188,\r\n DELETE: 46,\r\n DOWN: 40,\r\n END: 35,\r\n ENTER: 13,\r\n ESCAPE: 27,\r\n HOME: 36,\r\n LEFT: 37,\r\n NUMPAD_ADD: 107,\r\n NUMPAD_DECIMAL: 110,\r\n NUMPAD_DIVIDE: 111,\r\n NUMPAD_ENTER: 108,\r\n NUMPAD_MULTIPLY: 106,\r\n NUMPAD_SUBTRACT: 109,\r\n PAGE_DOWN: 34,\r\n PAGE_UP: 33,\r\n PERIOD: 190,\r\n RIGHT: 39,\r\n SPACE: 32,\r\n TAB: 9,\r\n UP: 38\r\n },\r\n Status: {\r\n SUCCESS: 1,\r\n WRONG: 2,\r\n START: 3,\r\n END: 4,\r\n WAITING: 5,\r\n READY: 6,\r\n RUNNING: 7,\r\n OUTOFBOUNDS: 8,\r\n NULL: -1\r\n },\r\n Direction: {\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Left: \"left\",\r\n Right: \"right\",\r\n Custom: \"custom\"\r\n },\r\n Axis: {\r\n Vertical: \"vertical\",\r\n Horizontal: \"horizontal\"\r\n },\r\n Selection: {\r\n Default: -2,\r\n None: -1,\r\n Single: 0,\r\n Multi: 1,\r\n All: 2\r\n },\r\n HorizontalAlign: {\r\n Left: \"left\",\r\n Right: \"right\",\r\n Center: \"center\",\r\n Stretch: \"stretch\"\r\n },\r\n VerticalAlign: {\r\n Middle: \"middle\",\r\n Top: \"top\",\r\n Bottom: \"bottom\",\r\n Stretch: \"stretch\"\r\n },\r\n StartOfWeek: 1\r\n});/**\r\n * 对数组对象的扩展\r\n * @class Array\r\n */\r\n_.extend(BI, {\r\n\r\n pushArray: function (sArray, array) {\r\n for (var i = 0; i < array.length; i++) {\r\n sArray.push(array[i]);\r\n }\r\n },\r\n pushDistinct: function (sArray, obj) {\r\n if (!BI.contains(sArray, obj)) {\r\n sArray.push(obj);\r\n }\r\n },\r\n pushDistinctArray: function (sArray, array) {\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n BI.pushDistinct(sArray, array[i]);\r\n }\r\n }\r\n});\r\n_.extend(BI, {\r\n // 给Number类型增加一个add方法,调用起来更加方便。\r\n add: function (num, arg) {\r\n return accAdd(arg, num);\r\n\r\n /**\r\n ** 加法函数,用来得到精确的加法结果\r\n ** 说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。\r\n ** 调用:accAdd(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accAdd (arg1, arg2) {\r\n var r1, r2, m, c;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n c = Math.abs(r1 - r2);\r\n m = Math.pow(10, Math.max(r1, r2));\r\n if (c > 0) {\r\n var cm = Math.pow(10, c);\r\n if (r1 > r2) {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\")) * cm;\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\")) * cm;\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n } else {\r\n arg1 = Number(arg1.toString().replace(\".\", \"\"));\r\n arg2 = Number(arg2.toString().replace(\".\", \"\"));\r\n }\r\n return (arg1 + arg2) / m;\r\n }\r\n },\r\n\r\n // 给Number类型增加一个sub方法,调用起来更加方便。\r\n sub: function (num, arg) {\r\n return accSub(num, arg);\r\n\r\n /**\r\n ** 减法函数,用来得到精确的减法结果\r\n ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。\r\n ** 调用:accSub(arg1,arg2)\r\n ** 返回值:arg1加上arg2的精确结果\r\n **/\r\n function accSub (arg1, arg2) {\r\n var r1, r2, m, n;\r\n try {\r\n r1 = arg1.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r1 = 0;\r\n }\r\n try {\r\n r2 = arg2.toString().split(\".\")[1].length;\r\n } catch (e) {\r\n r2 = 0;\r\n }\r\n m = Math.pow(10, Math.max(r1, r2)); // last modify by deeka //动态控制精度长度\r\n n = (r1 >= r2) ? r1 : r2;\r\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\r\n }\r\n },\r\n\r\n // 给Number类型增加一个mul方法,调用起来更加方便。\r\n mul: function (num, arg) {\r\n return accMul(arg, num);\r\n\r\n /**\r\n ** 乘法函数,用来得到精确的乘法结果\r\n ** 说明:javascript的乘法结果会有误差,在两个浮点数相乘的时候会比较明显。这个函数返回较为精确的乘法结果。\r\n ** 调用:accMul(arg1,arg2)\r\n ** 返回值:arg1乘以 arg2的精确结果\r\n **/\r\n function accMul (arg1, arg2) {\r\n var m = 0, s1 = arg1.toString(), s2 = arg2.toString();\r\n try {\r\n m += s1.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n try {\r\n m += s2.split(\".\")[1].length;\r\n } catch (e) {\r\n }\r\n return Number(s1.replace(\".\", \"\")) * Number(s2.replace(\".\", \"\")) / Math.pow(10, m);\r\n }\r\n },\r\n \r\n // 给Number类型增加一个div方法,调用起来更加方便。\r\n div: function (num, arg) {\r\n return accDivide(num, arg);\r\n\r\n /**\r\n * Return digits length of a number\r\n * @param {*number} num Input number\r\n */\r\n function digitLength (num) {\r\n // Get digit length of e\r\n var eSplit = num.toString().split(/[eE]/);\r\n var len = (eSplit[0].split(\".\")[1] || \"\").length - (+(eSplit[1] || 0));\r\n return len > 0 ? len : 0;\r\n }\r\n /**\r\n * 把小数转成整数,支持科学计数法。如果是小数则放大成整数\r\n * @param {*number} num 输入数\r\n */\r\n function float2Fixed (num) {\r\n if (num.toString().indexOf(\"e\") === -1) {\r\n return Number(num.toString().replace(\".\", \"\"));\r\n }\r\n var dLen = digitLength(num);\r\n return dLen > 0 ? num * Math.pow(10, dLen) : num;\r\n }\r\n\r\n /**\r\n * 精确乘法\r\n */\r\n function times (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return times.apply(void 0, [times(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n var baseNum = digitLength(num1) + digitLength(num2);\r\n var leftValue = num1Changed * num2Changed;\r\n return leftValue / Math.pow(10, baseNum);\r\n }\r\n\r\n /**\r\n * 精确除法\r\n */\r\n function accDivide (num1, num2) {\r\n var others = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n others[_i - 2] = arguments[_i];\r\n }\r\n if (others.length > 0) {\r\n return accDivide.apply(void 0, [accDivide(num1, num2), others[0]].concat(others.slice(1)));\r\n }\r\n var num1Changed = float2Fixed(num1);\r\n var num2Changed = float2Fixed(num2);\r\n return times((num1Changed / num2Changed), Math.pow(10, digitLength(num2) - digitLength(num1)));\r\n }\r\n }\r\n\r\n});/**\r\n * 对字符串对象的扩展\r\n * @class String\r\n */\r\n_.extend(BI, {\r\n\r\n /**\r\n * 判断字符串是否已指定的字符串开始\r\n * @param str source字符串\r\n * @param {String} startTag 指定的开始字符串\r\n * @return {Boolean} 如果字符串以指定字符串开始则返回true,否则返回false\r\n */\r\n startWith: function (str, startTag) {\r\n str = str || \"\";\r\n if (startTag == null || startTag == \"\" || str.length === 0 || startTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substr(0, startTag.length) == startTag;\r\n },\r\n /**\r\n * 判断字符串是否以指定的字符串结束\r\n * @param str source字符串\r\n * @param {String} endTag 指定的字符串\r\n * @return {Boolean} 如果字符串以指定字符串结束则返回true,否则返回false\r\n */\r\n endWith: function (str, endTag) {\r\n if (endTag == null || endTag == \"\" || str.length === 0 || endTag.length > str.length) {\r\n return false;\r\n }\r\n return str.substring(str.length - endTag.length) == endTag;\r\n },\r\n\r\n /**\r\n * 获取url中指定名字的参数\r\n * @param str source字符串\r\n * @param {String} name 参数的名字\r\n * @return {String} 参数的值\r\n */\r\n getQuery: function (str, name) {\r\n var reg = new RegExp(\"(^|&)\" + name + \"=([^&]*)(&|$)\");\r\n var r = str.substr(str.indexOf(\"?\") + 1).match(reg);\r\n if (r) {\r\n return unescape(r[2]);\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * 给url加上给定的参数\r\n * @param str source字符串\r\n * @param {Object} paras 参数对象,是一个键值对对象\r\n * @return {String} 添加了给定参数的url\r\n */\r\n appendQuery: function (str, paras) {\r\n if (!paras) {\r\n return str;\r\n }\r\n var src = str;\r\n // 没有问号说明还没有参数\r\n if (src.indexOf(\"?\") === -1) {\r\n src += \"?\";\r\n }\r\n // 如果以问号结尾,说明没有其他参数\r\n if (BI.endWith(src, \"?\") !== false) {\r\n } else {\r\n src += \"&\";\r\n }\r\n _.each(paras, function (value, name) {\r\n if (typeof(name) === \"string\") {\r\n src += name + \"=\" + value + \"&\";\r\n }\r\n });\r\n src = src.substr(0, src.length - 1);\r\n return src;\r\n },\r\n /**\r\n * 将所有符合第一个字符串所表示的字符串替换成为第二个字符串\r\n * @param str source字符串\r\n * @param {String} s1 要替换的字符串的正则表达式\r\n * @param {String} s2 替换的结果字符串\r\n * @returns {String} 替换后的字符串\r\n */\r\n replaceAll: function (str, s1, s2) {\r\n return BI.isString(str) ? str.replace(new RegExp(s1, \"gm\"), s2) : str;\r\n },\r\n /**\r\n * 总是让字符串以指定的字符开头\r\n * @param str source字符串\r\n * @param {String} start 指定的字符\r\n * @returns {String} 以指定字符开头的字符串\r\n */\r\n perfectStart: function (str, start) {\r\n if (BI.startWith(str, start)) {\r\n return str;\r\n }\r\n return start + str;\r\n\r\n },\r\n\r\n /**\r\n * 获取字符串中某字符串的所有项位置数组\r\n * @param str source字符串\r\n * @param {String} sub 子字符串\r\n * @return {Number[]} 子字符串在父字符串中出现的所有位置组成的数组\r\n */\r\n allIndexOf: function (str, sub) {\r\n if (typeof sub !== \"string\") {\r\n return [];\r\n }\r\n var location = [];\r\n var offset = 0;\r\n while (str.length > 0) {\r\n var loc = str.indexOf(sub);\r\n if (loc === -1) {\r\n break;\r\n }\r\n location.push(offset + loc);\r\n str = str.substring(loc + sub.length, str.length);\r\n offset += loc + sub.length;\r\n }\r\n return location;\r\n }\r\n});/** Constants used for time computations */\r\nBI.Date = BI.Date || {};\r\nBI.Date.SECOND = 1000;\r\nBI.Date.MINUTE = 60 * BI.Date.SECOND;\r\nBI.Date.HOUR = 60 * BI.Date.MINUTE;\r\nBI.Date.DAY = 24 * BI.Date.HOUR;\r\nBI.Date.WEEK = 7 * BI.Date.DAY;\r\n\r\n_.extend(BI, {\r\n /**\r\n * 获取时区\r\n * @returns {String}\r\n */\r\n getTimezone: function (date) {\r\n return date.toString().replace(/^.* (?:\\((.*)\\)|([A-Z]{1,4})(?:[\\-+][0-9]{4})?(?: -?\\d+)?)$/, \"$1$2\").replace(/[^A-Z]/g, \"\");\r\n },\r\n\r\n /** Returns the number of days in the current month */\r\n getMonthDays: function (date, month) {\r\n var year = date.getFullYear();\r\n if (typeof month === \"undefined\") {\r\n month = date.getMonth();\r\n }\r\n if (((0 == (year % 4)) && ((0 != (year % 100)) || (0 == (year % 400)))) && month == 1) {\r\n return 29;\r\n }\r\n return BI.Date._MD[month];\r\n\r\n },\r\n\r\n /**\r\n * 获取每月的最后一天\r\n * @returns {Date}\r\n */\r\n getLastDateOfMonth: function (date) {\r\n return BI.getDate(date.getFullYear(), date.getMonth(), BI.getMonthDays(date));\r\n },\r\n\r\n /** Returns the number of day in the year. */\r\n getDayOfYear: function (date) {\r\n var now = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var then = BI.getDate(date.getFullYear(), 0, 0, 0, 0, 0);\r\n var time = now - then;\r\n return Math.floor(time / BI.Date.DAY);\r\n },\r\n\r\n /** Returns the number of the week in year, as defined in ISO 8601. */\r\n getWeekNumber: function (date) {\r\n var d = BI.getDate(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);\r\n var week = d.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n var middleDay = (startOfWeek + 3) % 7;\r\n middleDay = middleDay || 7;\r\n // 偏移到周周首之前需要多少天\r\n var offsetWeekStartCount = week < startOfWeek ? (7 + week - startOfWeek) : (week - startOfWeek);\r\n var offsetWeekMiddleCount = middleDay < startOfWeek ? (7 + middleDay - startOfWeek) : (middleDay - startOfWeek);\r\n d.setDate(d.getDate() - offsetWeekStartCount + offsetWeekMiddleCount);\r\n var ms = d.valueOf();\r\n d.setMonth(0);\r\n d.setDate(1);\r\n return Math.floor((ms - d.valueOf()) / (7 * 864e5)) + 1;\r\n },\r\n\r\n getQuarter: function (date) {\r\n return Math.floor(date.getMonth() / 3) + 1;\r\n },\r\n\r\n // 离当前时间多少天的时间\r\n getOffsetDate: function (date, offset) {\r\n return BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()) + offset * 864e5);\r\n },\r\n\r\n getOffsetQuarter: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + BI.parseInt(n) * 3, 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n) * 3);\r\n return dt;\r\n },\r\n\r\n // 得到本季度的起始月份\r\n getQuarterStartMonth: function (date) {\r\n var quarterStartMonth = 0;\r\n var nowMonth = date.getMonth();\r\n if (nowMonth < 3) {\r\n quarterStartMonth = 0;\r\n }\r\n if (2 < nowMonth && nowMonth < 6) {\r\n quarterStartMonth = 3;\r\n }\r\n if (5 < nowMonth && nowMonth < 9) {\r\n quarterStartMonth = 6;\r\n }\r\n if (nowMonth > 8) {\r\n quarterStartMonth = 9;\r\n }\r\n return quarterStartMonth;\r\n },\r\n // 获得本季度的起始日期\r\n getQuarterStartDate: function (date) {\r\n return BI.getDate(date.getFullYear(), BI.getQuarterStartMonth(date), 1);\r\n },\r\n // 得到本季度的结束日期\r\n getQuarterEndDate: function (date) {\r\n var quarterEndMonth = BI.getQuarterStartMonth(date) + 2;\r\n return BI.getDate(date.getFullYear(), quarterEndMonth, BI.getMonthDays(date, quarterEndMonth));\r\n },\r\n\r\n // 指定日期n个月之前或之后的日期\r\n getOffsetMonth: function (date, n) {\r\n var dt = BI.getDate(BI.getTime(date.getFullYear(), date.getMonth(), date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()));\r\n var day = dt.getDate();\r\n var monthDay = BI.getMonthDays(BI.getDate(dt.getFullYear(), dt.getMonth() + parseInt(n), 1));\r\n if (day > monthDay) {\r\n day = monthDay;\r\n }\r\n dt.setDate(day);\r\n dt.setMonth(dt.getMonth() + parseInt(n));\r\n return dt;\r\n },\r\n\r\n // 获得本周的起始日期\r\n getWeekStartDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)]);\r\n },\r\n // 得到本周的结束日期\r\n getWeekEndDate: function (date) {\r\n var w = date.getDay();\r\n var startOfWeek = BI.StartOfWeek % 7;\r\n return BI.getOffsetDate(date, BI.Date._OFFSET[w < startOfWeek ? (7 + w - startOfWeek) : (w - startOfWeek)] + 6);\r\n },\r\n\r\n // 格式化打印日期\r\n print: function (date, str) {\r\n var m = date.getMonth();\r\n var d = date.getDate();\r\n var y = date.getFullYear();\r\n var yWith4number = y + \"\";\r\n while (yWith4number.length < 4) {\r\n yWith4number = \"0\" + yWith4number;\r\n }\r\n var wn = BI.getWeekNumber(date);\r\n var qr = BI.getQuarter(date);\r\n var w = date.getDay();\r\n var s = {};\r\n var hr = date.getHours();\r\n var pm = (hr >= 12);\r\n var ir = (pm) ? (hr - 12) : hr;\r\n var dy = BI.getDayOfYear(date);\r\n if (ir == 0) {\r\n ir = 12;\r\n }\r\n var min = date.getMinutes();\r\n var sec = date.getSeconds();\r\n s[\"%a\"] = BI.Date._SDN[w]; // abbreviated weekday name [FIXME: I18N]\r\n s[\"%A\"] = BI.Date._DN[w]; // full weekday name\r\n s[\"%b\"] = BI.Date._SMN[m]; // abbreviated month name [FIXME: I18N]\r\n s[\"%B\"] = BI.Date._MN[m]; // full month name\r\n // FIXME: %c : preferred date and time representation for the current locale\r\n s[\"%C\"] = 1 + Math.floor(y / 100); // the century number\r\n s[\"%d\"] = (d < 10) ? (\"0\" + d) : d; // the day of the month (range 01 to 31)\r\n s[\"%e\"] = d; // the day of the month (range 1 to 31)\r\n // FIXME: %D : american date style: %m/%d/%y\r\n // FIXME: %E, %F, %G, %g, %h (man strftime)\r\n s[\"%H\"] = (hr < 10) ? (\"0\" + hr) : hr; // hour, range 00 to 23 (24h format)\r\n s[\"%I\"] = (ir < 10) ? (\"0\" + ir) : ir; // hour, range 01 to 12 (12h format)\r\n s[\"%j\"] = (dy < 100) ? ((dy < 10) ? (\"00\" + dy) : (\"0\" + dy)) : dy; // day of the year (range 001 to 366)\r\n s[\"%k\"] = hr + \"\";\t\t// hour, range 0 to 23 (24h format)\r\n s[\"%l\"] = ir + \"\";\t\t// hour, range 1 to 12 (12h format)\r\n s[\"%X\"] = (m < 9) ? (\"0\" + (1 + m)) : (1 + m); // month, range 01 to 12\r\n s[\"%x\"] = m + 1; // month, range 1 to 12\r\n s[\"%M\"] = (min < 10) ? (\"0\" + min) : min; // minute, range 00 to 59\r\n s[\"%n\"] = \"\\n\";\t\t// a newline character\r\n s[\"%p\"] = pm ? \"PM\" : \"AM\";\r\n s[\"%P\"] = pm ? \"pm\" : \"am\";\r\n // FIXME: %r : the time in am/pm notation %I:%M:%S %p\r\n // FIXME: %R : the time in 24-hour notation %H:%M\r\n s[\"%s\"] = Math.floor(date.getTime() / 1000);\r\n s[\"%S\"] = (sec < 10) ? (\"0\" + sec) : sec; // seconds, range 00 to 59\r\n s[\"%t\"] = \"\\t\";\t\t// a tab character\r\n // FIXME: %T : the time in 24-hour notation (%H:%M:%S)\r\n s[\"%U\"] = s[\"%W\"] = s[\"%V\"] = (wn < 10) ? (\"0\" + wn) : wn;\r\n s[\"%u\"] = w + 1;\t// the day of the week (range 1 to 7, 1 = MON)\r\n s[\"%w\"] = w;\t\t// the day of the week (range 0 to 6, 0 = SUN)\r\n // FIXME: %x : preferred date representation for the current locale without the time\r\n // FIXME: %X : preferred time representation for the current locale without the date\r\n s[\"%y\"] = yWith4number.substr(2, 2); // year without the century (range 00 to 99)\r\n s[\"%Y\"] = yWith4number;\t\t// year with the century\r\n s[\"%%\"] = \"%\";\t\t// a literal '%' character\r\n s[\"%Q\"] = qr;\r\n\r\n var re = /%./g;\r\n BI.isKhtml = BI.isKhtml || function () {\r\n if(!_global.navigator) {\r\n return false;\r\n }\r\n return /Konqueror|Safari|KHTML/i.test(navigator.userAgent);\r\n };\r\n\r\n // 包含年周的格式化,ISO8601标准周的计数会影响年\r\n if ((str.indexOf(\"%Y\") !== -1 || str.indexOf(\"%y\") !== -1) && (str.indexOf(\"%W\") !== -1 || str.indexOf(\"%U\") !== -1 || str.indexOf(\"%V\") !== -1)) {\r\n switch (wn) {\r\n // 如果周数是1,但是当前却在12月,表示此周数为下一年的\r\n case 1:\r\n if (m === 11) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) + 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) + 1;\r\n }\r\n break;\r\n // 如果周数是53,但是当前却在1月,表示此周数为上一年的\r\n case 53:\r\n if (m === 0) {\r\n s[\"%y\"] = parseInt(s[\"%y\"]) - 1;\r\n s[\"%Y\"] = parseInt(s[\"%Y\"]) - 1;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n if (!BI.isKhtml()) {\r\n return str.replace(re, function (par) {\r\n return s[par] || par;\r\n });\r\n }\r\n var a = str.match(re);\r\n for (var i = 0; i < a.length; i++) {\r\n var tmp = s[a[i]];\r\n if (tmp) {\r\n re = new RegExp(a[i], \"g\");\r\n str = str.replace(re, tmp);\r\n }\r\n }\r\n\r\n return str;\r\n }\r\n});\r\n/**\r\n * 基本的函数\r\n * Created by GUY on 2015/6/24.\r\n */\r\nBI.Func = {};\r\n_.extend(BI.Func, {\r\n /**\r\n * 创建唯一的名字\r\n * @param array\r\n * @param name\r\n * @returns {*}\r\n */\r\n createDistinctName: function (array, name) {\r\n var src = name, idx = 1;\r\n name = name || \"\";\r\n while (true) {\r\n if (BI.every(array, function (i, item) {\r\n return BI.isKey(item) ? item !== name : item.name !== name;\r\n })) {\r\n break;\r\n }\r\n name = src + (idx++);\r\n }\r\n return name;\r\n },\r\n\r\n /**\r\n * 获取字符宽度\r\n * @param str\r\n * @return {number}\r\n */\r\n getGBWidth: function (str) {\r\n str = str + \"\";\r\n str = str.replace(/[^\\x00-\\xff]/g, \"xx\");\r\n return Math.ceil(str.length / 2);\r\n },\r\n\r\n /**\r\n * 获取搜索结果\r\n * @param items\r\n * @param keyword\r\n * @param param 搜索哪个属性\r\n */\r\n getSearchResult: function (items, keyword, param) {\r\n var isArray = BI.isArray(items);\r\n items = isArray ? BI.flatten(items) : items;\r\n param || (param = \"text\");\r\n if (!BI.isKey(keyword)) {\r\n return {\r\n find: BI.deepClone(items),\r\n match: isArray ? [] : {}\r\n };\r\n }\r\n var t, text, py;\r\n keyword = BI.toUpperCase(keyword);\r\n var matched = isArray ? [] : {}, find = isArray ? [] : {};\r\n BI.each(items, function (i, item) {\r\n // 兼容item为null的处理\r\n if (BI.isNull(item)) {\r\n return;\r\n }\r\n item = BI.deepClone(item);\r\n t = BI.stripEL(item);\r\n text = BI.find([t[param], t.text, t.value, t.name, t], function (index, val) {\r\n return BI.isNotNull(val);\r\n });\r\n\r\n if (BI.isNull(text) || BI.isObject(text)) return;\r\n\r\n py = BI.makeFirstPY(text, {\r\n splitChar: \"\\u200b\"\r\n });\r\n text = BI.toUpperCase(text);\r\n py = BI.toUpperCase(py);\r\n var pidx;\r\n if (text.indexOf(keyword) > -1) {\r\n if (text === keyword) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n // BI-56386 这边两个pid / text.length是为了防止截取的首字符串不是完整的,但光这样做还不够,即时错位了,也不能说明就不符合条件\r\n } else if (pidx = py.indexOf(keyword), (pidx > -1)) {\r\n if (text === keyword || keyword.length === text.length) {\r\n isArray ? matched.push(item) : (matched[i] = item);\r\n } else {\r\n isArray ? find.push(item) : (find[i] = item);\r\n }\r\n }\r\n });\r\n return {\r\n match: matched,\r\n find: find\r\n };\r\n }\r\n});\r\n\r\n_.extend(BI, {\r\n beforeFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n if (func.apply(sFunc, arguments) === false) {\r\n return false;\r\n }\r\n return __self.apply(sFunc, arguments);\r\n };\r\n },\r\n\r\n afterFunc: function (sFunc, func) {\r\n var __self = sFunc;\r\n return function () {\r\n var ret = __self.apply(sFunc, arguments);\r\n if (ret === false) {\r\n return false;\r\n }\r\n func.apply(sFunc, arguments);\r\n return ret;\r\n };\r\n }\r\n});/**\r\n * 基本函数\r\n * Create By GUY 2014\\11\\17\r\n *\r\n */\r\nvar _global;\r\nif (typeof window !== \"undefined\") {\r\n _global = window;\r\n} else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n} else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n} else {\r\n _global = this;\r\n}\r\nif (!_global.BI) {\r\n _global.BI = {};\r\n}\r\n\r\n!(function (undefined) {\r\n var traverse = function (func, context) {\r\n return function (value, key, obj) {\r\n return func.call(context, key, value, obj);\r\n };\r\n };\r\n var _apply = function (name) {\r\n return function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n };\r\n var _applyFunc = function (name) {\r\n return function () {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n args[1] = _.isFunction(args[1]) ? traverse(args[1], args[2]) : args[1];\r\n return _[name].apply(_, args);\r\n };\r\n };\r\n\r\n // Utility\r\n _.extend(BI, {\r\n assert: function (v, is) {\r\n if (this.isFunction(is)) {\r\n if (!is(v)) {\r\n throw new Error(v + \" error\");\r\n } else {\r\n return true;\r\n }\r\n }\r\n if (!this.isArray(is)) {\r\n is = [is];\r\n }\r\n if (!this.deepContains(is, v)) {\r\n throw new Error(v + \" error\");\r\n }\r\n return true;\r\n },\r\n\r\n warn: function (message) {\r\n console.warn(message);\r\n },\r\n\r\n UUID: function () {\r\n var f = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\"];\r\n var str = \"\";\r\n for (var i = 0; i < 16; i++) {\r\n var r = parseInt(f.length * Math.random(), 10);\r\n str += f[r];\r\n }\r\n return str;\r\n },\r\n\r\n isWidget: function (widget) {\r\n return widget instanceof BI.Widget || (BI.View && widget instanceof BI.View);\r\n },\r\n\r\n createWidgets: function (items, options, context) {\r\n if (!BI.isArray(items)) {\r\n throw new Error(\"cannot create Widgets\");\r\n }\r\n if (BI.isWidget(options)) {\r\n context = options;\r\n options = {};\r\n } else {\r\n options || (options = {});\r\n }\r\n return BI.map(BI.flatten(items), function (i, item) {\r\n return BI.createWidget(item, BI.deepClone(options));\r\n });\r\n },\r\n\r\n createItems: function (data, innerAttr, outerAttr) {\r\n innerAttr = BI.isArray(innerAttr) ? innerAttr : BI.makeArray(BI.flatten(data).length, innerAttr || {});\r\n outerAttr = BI.isArray(outerAttr) ? outerAttr : BI.makeArray(BI.flatten(data).length, outerAttr || {});\r\n return BI.map(data, function (i, item) {\r\n if (BI.isArray(item)) {\r\n return BI.createItems(item, innerAttr, outerAttr);\r\n }\r\n if (item instanceof BI.Widget) {\r\n return BI.extend({}, innerAttr.shift(), outerAttr.shift(), {\r\n type: null,\r\n el: item\r\n });\r\n }\r\n if (innerAttr[0] instanceof BI.Widget) {\r\n outerAttr.shift();\r\n return BI.extend({}, item, {\r\n el: innerAttr.shift()\r\n });\r\n }\r\n if (item.el instanceof BI.Widget || (BI.View && item.el instanceof BI.View)) {\r\n innerAttr.shift();\r\n return BI.extend({}, outerAttr.shift(), { type: null }, item);\r\n }\r\n if (item.el) {\r\n return BI.extend({}, outerAttr.shift(), item, {\r\n el: BI.extend({}, innerAttr.shift(), item.el)\r\n });\r\n }\r\n return BI.extend({}, outerAttr.shift(), {\r\n el: BI.extend({}, innerAttr.shift(), item)\r\n });\r\n });\r\n },\r\n\r\n // 用容器包装items\r\n packageItems: function (items, layouts) {\r\n for (var i = layouts.length - 1; i >= 0; i--) {\r\n items = BI.map(items, function (k, it) {\r\n return BI.extend({}, layouts[i], {\r\n items: [\r\n BI.extend({}, layouts[i].el, {\r\n el: it\r\n })\r\n ]\r\n });\r\n });\r\n }\r\n return items;\r\n },\r\n\r\n formatEL: function (obj) {\r\n if (obj && !obj.type && obj.el) {\r\n return obj;\r\n }\r\n return {\r\n el: obj\r\n };\r\n },\r\n\r\n // 剥开EL\r\n stripEL: function (obj) {\r\n return obj.type && obj || obj.el || obj;\r\n },\r\n\r\n trans2Element: function (widgets) {\r\n return BI.map(widgets, function (i, wi) {\r\n return wi.element;\r\n });\r\n }\r\n });\r\n\r\n // 集合相关方法\r\n _.each([\"where\", \"findWhere\", \"invoke\", \"pluck\", \"shuffle\", \"sample\", \"toArray\", \"size\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"get\", \"set\", \"each\", \"map\", \"reduce\", \"reduceRight\", \"find\", \"filter\", \"reject\", \"every\", \"all\", \"some\", \"any\", \"max\", \"min\",\r\n \"sortBy\", \"groupBy\", \"indexBy\", \"countBy\", \"partition\", \"clamp\"], function (name) {\r\n if (name === \"any\") {\r\n BI[name] = _applyFunc(\"some\");\r\n } else {\r\n BI[name] = _applyFunc(name);\r\n }\r\n });\r\n _.extend(BI, {\r\n // 数数\r\n count: function (from, to, predicate) {\r\n var t;\r\n if (predicate) {\r\n for (t = from; t < to; t++) {\r\n predicate(t);\r\n }\r\n }\r\n return to - from;\r\n },\r\n\r\n // 倒数\r\n inverse: function (from, to, predicate) {\r\n return BI.count(to, from, predicate);\r\n },\r\n\r\n firstKey: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastKey: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = key;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n firstObject: function (obj) {\r\n var res = undefined;\r\n BI.any(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n lastObject: function (obj) {\r\n var res = undefined;\r\n BI.each(obj, function (key, value) {\r\n res = value;\r\n return true;\r\n });\r\n return res;\r\n },\r\n\r\n concat: function (obj1, obj2) {\r\n if (BI.isKey(obj1)) {\r\n return BI.map([].slice.apply(arguments), function (idx, v) {\r\n return v;\r\n }).join(\"\");\r\n }\r\n if (BI.isArray(obj1)) {\r\n return _.concat.apply([], arguments);\r\n }\r\n if (BI.isObject(obj1)) {\r\n return _.extend.apply({}, arguments);\r\n }\r\n },\r\n\r\n backEach: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n predicate(index, obj[index], obj);\r\n }\r\n return false;\r\n },\r\n\r\n backAny: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (predicate(index, obj[index], obj)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n\r\n backEvery: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n for (var index = obj.length - 1; index >= 0; index--) {\r\n if (!predicate(index, obj[index], obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n backFindKey: function (obj, predicate, context) {\r\n predicate = BI.iteratee(predicate, context);\r\n var keys = _.keys(obj), key;\r\n for (var i = keys.length - 1; i >= 0; i--) {\r\n key = keys[i];\r\n if (predicate(obj[key], key, obj)) {\r\n return key;\r\n }\r\n }\r\n },\r\n\r\n backFind: function (obj, predicate, context) {\r\n var key;\r\n if (BI.isArray(obj)) {\r\n key = BI.findLastIndex(obj, predicate, context);\r\n } else {\r\n key = BI.backFindKey(obj, predicate, context);\r\n }\r\n if (key !== void 0 && key !== -1) {\r\n return obj[key];\r\n }\r\n },\r\n\r\n remove: function (obj, target, context) {\r\n var isFunction = BI.isFunction(target);\r\n target = isFunction || BI.isArray(target) ? target : [target];\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n obj.splice(i--, 1);\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if ((isFunction && target.apply(context, [i, obj[i]]) === true) || (!isFunction && BI.contains(target, obj[i]))) {\r\n delete obj[i];\r\n }\r\n });\r\n }\r\n },\r\n\r\n removeAt: function (obj, index) {\r\n index = BI.isArray(index) ? index : [index];\r\n var isArray = BI.isArray(obj), i;\r\n for (i = 0; i < index.length; i++) {\r\n if (isArray) {\r\n obj[index[i]] = \"$deleteIndex\";\r\n } else {\r\n delete obj[index[i]];\r\n }\r\n }\r\n if (isArray) {\r\n BI.remove(obj, \"$deleteIndex\");\r\n }\r\n },\r\n\r\n string2Array: function (str) {\r\n return str.split(\"&-&\");\r\n },\r\n\r\n array2String: function (array) {\r\n return array.join(\"&-&\");\r\n },\r\n\r\n abc2Int: function (str) {\r\n var idx = 0, start = \"A\", str = str.toUpperCase();\r\n for (var i = 0, len = str.length; i < len; ++i) {\r\n idx = str.charAt(i).charCodeAt(0) - start.charCodeAt(0) + 26 * idx + 1;\r\n if (idx > (2147483646 - str.charAt(i).charCodeAt(0) + start.charCodeAt(0)) / 26) {\r\n return 0;\r\n }\r\n }\r\n return idx;\r\n },\r\n\r\n int2Abc: function (num) {\r\n var DIGITS = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\r\n var idx = num, str = \"\";\r\n if (num === 0) {\r\n return \"\";\r\n }\r\n while (idx !== 0) {\r\n var t = idx % 26;\r\n if (t === 0) {\r\n t = 26;\r\n }\r\n str = DIGITS[t - 1] + str;\r\n idx = (idx - t) / 26;\r\n }\r\n return str;\r\n }\r\n });\r\n\r\n // 数组相关的方法\r\n _.each([\"first\", \"initial\", \"last\", \"rest\", \"compact\", \"flatten\", \"without\", \"union\", \"intersection\",\r\n \"difference\", \"zip\", \"unzip\", \"object\", \"indexOf\", \"lastIndexOf\", \"sortedIndex\", \"range\", \"take\", \"takeRight\", \"uniqBy\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"findIndex\", \"findLastIndex\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n // 构建一个长度为length的数组\r\n makeArray: function (length, value) {\r\n var res = [];\r\n for (var i = 0; i < length; i++) {\r\n if (BI.isNull(value)) {\r\n res.push(i);\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n makeObject: function (array, value) {\r\n var map = {};\r\n for (var i = 0; i < array.length; i++) {\r\n if (BI.isNull(value)) {\r\n map[array[i]] = array[i];\r\n } else {\r\n map[array[i]] = BI.deepClone(value);\r\n }\r\n }\r\n return map;\r\n },\r\n\r\n makeArrayByArray: function (array, value) {\r\n var res = [];\r\n if (!array) {\r\n return res;\r\n }\r\n for (var i = 0, len = array.length; i < len; i++) {\r\n if (BI.isArray(array[i])) {\r\n res.push(arguments.callee(array[i], value));\r\n } else {\r\n res.push(BI.deepClone(value));\r\n }\r\n }\r\n return res;\r\n },\r\n\r\n uniq: function (array, isSorted, iteratee, context) {\r\n if (array == null) {\r\n return [];\r\n }\r\n if (!_.isBoolean(isSorted)) {\r\n context = iteratee;\r\n iteratee = isSorted;\r\n isSorted = false;\r\n }\r\n iteratee && (iteratee = traverse(iteratee, context));\r\n return _.uniq.call(_, array, isSorted, iteratee, context);\r\n }\r\n });\r\n\r\n // 对象相关方法\r\n _.each([\"keys\", \"allKeys\", \"values\", \"pairs\", \"invert\", \"create\", \"functions\", \"extend\", \"extendOwn\",\r\n \"defaults\", \"clone\", \"property\", \"propertyOf\", \"matcher\", \"isEqual\", \"isMatch\", \"isEmpty\",\r\n \"isElement\", \"isNumber\", \"isString\", \"isArray\", \"isObject\", \"isPlainObject\", \"isArguments\", \"isFunction\", \"isFinite\",\r\n \"isBoolean\", \"isDate\", \"isRegExp\", \"isError\", \"isNaN\", \"isUndefined\", \"zipObject\", \"cloneDeep\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.each([\"mapObject\", \"findKey\", \"pick\", \"omit\", \"tap\"], function (name) {\r\n BI[name] = _applyFunc(name);\r\n });\r\n _.extend(BI, {\r\n\r\n inherit: function (sb, sp, overrides) {\r\n if (typeof sp === \"object\") {\r\n overrides = sp;\r\n sp = sb;\r\n sb = function () {\r\n return sp.apply(this, arguments);\r\n };\r\n }\r\n var F = function () {\r\n }, spp = sp.prototype;\r\n F.prototype = spp;\r\n sb.prototype = new F();\r\n sb.superclass = spp;\r\n _.extend(sb.prototype, overrides, {\r\n superclass: sp\r\n });\r\n return sb;\r\n },\r\n\r\n init: function () {\r\n // 先把准备环境准备好\r\n while (BI.prepares && BI.prepares.length > 0) {\r\n BI.prepares.shift()();\r\n }\r\n BI.initialized = true;\r\n },\r\n\r\n has: function (obj, keys) {\r\n if (BI.isArray(keys)) {\r\n if (keys.length === 0) {\r\n return false;\r\n }\r\n return BI.every(keys, function (i, key) {\r\n return _.has(obj, key);\r\n });\r\n }\r\n return _.has.apply(_, arguments);\r\n },\r\n\r\n freeze: function (value) {\r\n // 在ES5中,如果这个方法的参数不是一个对象(一个原始值),那么它会导致 TypeError\r\n // 在ES2015中,非对象参数将被视为要被冻结的普通对象,并被简单地返回\r\n if (Object.freeze && BI.isObject(value)) {\r\n return Object.freeze(value);\r\n }\r\n return value;\r\n },\r\n\r\n // 数字和字符串可以作为key\r\n isKey: function (key) {\r\n return BI.isNumber(key) || (BI.isString(key) && key.length > 0);\r\n },\r\n\r\n // 忽略大小写的等于\r\n isCapitalEqual: function (a, b) {\r\n a = BI.isNull(a) ? a : (\"\" + a).toLowerCase();\r\n b = BI.isNull(b) ? b : (\"\" + b).toLowerCase();\r\n return BI.isEqual(a, b);\r\n },\r\n\r\n isWidthOrHeight: function (w) {\r\n if (typeof w === \"number\") {\r\n return w >= 0;\r\n } else if (typeof w === \"string\") {\r\n return /^\\d{1,3}%$/.exec(w) || w == \"auto\" || /^\\d+px$/.exec(w);\r\n }\r\n },\r\n\r\n isNotNull: function (obj) {\r\n return !BI.isNull(obj);\r\n },\r\n\r\n isNull: function (obj) {\r\n return typeof obj === \"undefined\" || obj === null;\r\n },\r\n\r\n isEmptyArray: function (arr) {\r\n return BI.isArray(arr) && BI.isEmpty(arr);\r\n },\r\n\r\n isNotEmptyArray: function (arr) {\r\n return BI.isArray(arr) && !BI.isEmpty(arr);\r\n },\r\n\r\n isEmptyObject: function (obj) {\r\n return BI.isEqual(obj, {});\r\n },\r\n\r\n isNotEmptyObject: function (obj) {\r\n return BI.isPlainObject(obj) && !BI.isEmptyObject(obj);\r\n },\r\n\r\n isEmptyString: function (obj) {\r\n return BI.isString(obj) && obj.length === 0;\r\n },\r\n\r\n isNotEmptyString: function (obj) {\r\n return BI.isString(obj) && !BI.isEmptyString(obj);\r\n },\r\n\r\n isWindow: function (obj) {\r\n return obj != null && obj == obj.window;\r\n }\r\n });\r\n\r\n // deep方法\r\n _.extend(BI, {\r\n deepClone: _.cloneDeep,\r\n deepExtend: _.merge,\r\n\r\n isDeepMatch: function (object, attrs) {\r\n var keys = BI.keys(attrs), length = keys.length;\r\n if (object == null) {\r\n return !length;\r\n }\r\n var obj = Object(object);\r\n for (var i = 0; i < length; i++) {\r\n var key = keys[i];\r\n if (!BI.isEqual(attrs[key], obj[key]) || !(key in obj)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n contains: function (obj, target, fromIndex) {\r\n if (!_.isArrayLike(obj)) obj = _.values(obj);\r\n return _.indexOf(obj, target, typeof fromIndex === \"number\" && fromIndex) >= 0;\r\n },\r\n\r\n deepContains: function (obj, copy) {\r\n if (BI.isObject(copy)) {\r\n return BI.any(obj, function (i, v) {\r\n if (BI.isEqual(v, copy)) {\r\n return true;\r\n }\r\n });\r\n }\r\n return BI.contains(obj, copy);\r\n },\r\n\r\n deepIndexOf: function (obj, target) {\r\n for (var i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n },\r\n\r\n deepRemove: function (obj, target) {\r\n var done = false;\r\n var i;\r\n if (BI.isArray(obj)) {\r\n for (i = 0; i < obj.length; i++) {\r\n if (BI.isEqual(target, obj[i])) {\r\n obj.splice(i--, 1);\r\n done = true;\r\n }\r\n }\r\n } else {\r\n BI.each(obj, function (i, v) {\r\n if (BI.isEqual(target, obj[i])) {\r\n delete obj[i];\r\n done = true;\r\n }\r\n });\r\n }\r\n return done;\r\n },\r\n\r\n deepWithout: function (obj, target) {\r\n if (BI.isArray(obj)) {\r\n var result = [];\r\n for (var i = 0; i < obj.length; i++) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result.push(obj[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n var result = {};\r\n BI.each(obj, function (i, v) {\r\n if (!BI.isEqual(target, obj[i])) {\r\n result[i] = v;\r\n }\r\n });\r\n return result;\r\n\r\n },\r\n\r\n deepUnique: function (array) {\r\n var result = [];\r\n BI.each(array, function (i, item) {\r\n if (!BI.deepContains(result, item)) {\r\n result.push(item);\r\n }\r\n });\r\n return result;\r\n },\r\n\r\n // 比较两个对象得出不一样的key值\r\n deepDiff: function (object, other) {\r\n object || (object = {});\r\n other || (other = {});\r\n var result = [];\r\n var used = [];\r\n for (var b in object) {\r\n if (this.has(object, b)) {\r\n if (!this.isEqual(object[b], other[b])) {\r\n result.push(b);\r\n }\r\n used.push(b);\r\n }\r\n }\r\n for (var b in other) {\r\n if (this.has(other, b) && !BI.contains(used, b)) {\r\n result.push(b);\r\n }\r\n }\r\n return result;\r\n }\r\n });\r\n\r\n // 通用方法\r\n _.each([\"uniqueId\", \"result\", \"chain\", \"iteratee\", \"escape\", \"unescape\", \"before\", \"after\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n // 事件相关方法\r\n _.each([\"bind\", \"once\", \"partial\", \"debounce\", \"throttle\", \"delay\", \"defer\", \"wrap\"], function (name) {\r\n BI[name] = function () {\r\n return _[name].apply(_, arguments);\r\n };\r\n });\r\n\r\n _.extend(BI, {\r\n nextTick: (function () {\r\n var callbacks = [];\r\n var pending = false;\r\n var timerFunc = void 0;\r\n\r\n function nextTickHandler() {\r\n pending = false;\r\n var copies = callbacks.slice(0);\r\n callbacks.length = 0;\r\n for (var i = 0; i < copies.length; i++) {\r\n copies[i]();\r\n }\r\n }\r\n\r\n if (typeof Promise !== \"undefined\") {\r\n var p = Promise.resolve();\r\n timerFunc = function timerFunc() {\r\n p.then(nextTickHandler);\r\n };\r\n } else if (typeof MutationObserver !== \"undefined\") {\r\n var counter = 1;\r\n var observer = new MutationObserver(nextTickHandler);\r\n var textNode = document.createTextNode(String(counter));\r\n observer.observe(textNode, {\r\n characterData: true\r\n });\r\n timerFunc = function timerFunc() {\r\n counter = (counter + 1) % 2;\r\n textNode.data = String(counter);\r\n };\r\n } else if (typeof setImmediate !== \"undefined\") {\r\n timerFunc = function timerFunc() {\r\n setImmediate(nextTickHandler);\r\n };\r\n } else {\r\n // Fallback to setTimeout.\r\n timerFunc = function timerFunc() {\r\n setTimeout(nextTickHandler, 0);\r\n };\r\n }\r\n\r\n return function queueNextTick(cb) {\r\n var _resolve = void 0;\r\n var args = [].slice.call(arguments, 1);\r\n callbacks.push(function () {\r\n if (cb) {\r\n try {\r\n cb.apply(null, args);\r\n } catch (e) {\r\n console.error(e);\r\n }\r\n } else if (_resolve) {\r\n _resolve.apply(null, args);\r\n }\r\n });\r\n if (!pending) {\r\n pending = true;\r\n timerFunc();\r\n }\r\n // $flow-disable-line\r\n if (!cb && typeof Promise !== 'undefined') {\r\n return new Promise(function (resolve, reject) {\r\n _resolve = resolve;\r\n });\r\n }\r\n };\r\n })()\r\n });\r\n\r\n // 数字相关方法\r\n _.each([\"random\"], function (name) {\r\n BI[name] = _apply(name);\r\n });\r\n _.extend(BI, {\r\n getTime: function () {\r\n if (_global.performance && _global.performance.now) {\r\n return _global.performance.now();\r\n }\r\n if (_global.performance && _global.performance.webkitNow) {\r\n return _global.performance.webkitNow();\r\n }\r\n if (Date.now) {\r\n return Date.now();\r\n }\r\n return BI.getDate().getTime();\r\n\r\n\r\n },\r\n\r\n parseInt: function (number) {\r\n var radix = 10;\r\n if (/^0x/g.test(number)) {\r\n radix = 16;\r\n }\r\n try {\r\n return parseInt(number, radix);\r\n } catch (e) {\r\n throw new Error(number + \"parse int error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n parseSafeInt: function (value) {\r\n var MAX_SAFE_INTEGER = 9007199254740991;\r\n return value\r\n ? this.clamp(this.parseInt(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)\r\n : (value === 0 ? value : 0);\r\n },\r\n\r\n parseFloat: function (number) {\r\n try {\r\n return parseFloat(number);\r\n } catch (e) {\r\n throw new Error(number + \"parse float error\");\r\n return NaN;\r\n }\r\n },\r\n\r\n isNaturalNumber: function (number) {\r\n if (/^\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isPositiveInteger: function (number) {\r\n if (/^\\+?[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNegativeInteger: function (number) {\r\n if (/^\\-[1-9][0-9]*$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isInteger: function (number) {\r\n if (/^\\-?\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isNumeric: function (number) {\r\n return !isNaN(parseFloat(number)) && isFinite(number);\r\n },\r\n\r\n isFloat: function (number) {\r\n if (/^([+-]?)\\d*\\.\\d+$/.test(number)) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n isOdd: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 1;\r\n },\r\n\r\n isEven: function (number) {\r\n if (!BI.isInteger(number)) {\r\n return false;\r\n }\r\n return (number & 1) === 0;\r\n },\r\n\r\n sum: function (array, iteratee, context) {\r\n var sum = 0;\r\n BI.each(array, function (i, item) {\r\n if (iteratee) {\r\n sum += Number(iteratee.apply(context, [i, item]));\r\n } else {\r\n sum += Number(item);\r\n }\r\n });\r\n return sum;\r\n },\r\n\r\n average: function (array, iteratee, context) {\r\n var sum = BI.sum(array, iteratee, context);\r\n return sum / array.length;\r\n }\r\n });\r\n\r\n // 字符串相关方法\r\n _.extend(BI, {\r\n trim: function () {\r\n return _.trim.apply(_, arguments);\r\n },\r\n\r\n toUpperCase: function (string) {\r\n return (string + \"\").toLocaleUpperCase();\r\n },\r\n\r\n toLowerCase: function (string) {\r\n return (string + \"\").toLocaleLowerCase();\r\n },\r\n\r\n isEndWithBlank: function (string) {\r\n return /(\\s|\\u00A0)$/.test(string);\r\n },\r\n\r\n isLiteral: function (exp) {\r\n var literalValueRE = /^\\s?(true|false|-?[\\d\\.]+|'[^']*'|\"[^\"]*\")\\s?$/;\r\n return literalValueRE.test(exp);\r\n },\r\n\r\n stripQuotes: function (str) {\r\n var a = str.charCodeAt(0);\r\n var b = str.charCodeAt(str.length - 1);\r\n return a === b && (a === 0x22 || a === 0x27)\r\n ? str.slice(1, -1)\r\n : str;\r\n },\r\n\r\n // background-color => backgroundColor\r\n camelize: function (str) {\r\n return str.replace(/-(.)/g, function (_, character) {\r\n return character.toUpperCase();\r\n });\r\n },\r\n\r\n // backgroundColor => background-color\r\n hyphenate: function (str) {\r\n return str.replace(/([A-Z])/g, \"-$1\").toLowerCase();\r\n },\r\n\r\n isNotEmptyString: function (str) {\r\n return BI.isString(str) && !BI.isEmpty(str);\r\n },\r\n\r\n isEmptyString: function (str) {\r\n return BI.isString(str) && BI.isEmpty(str);\r\n },\r\n\r\n /**\r\n * 通用加密方法\r\n */\r\n encrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesEncrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 通用解密方法\r\n * @param type 解密方式\r\n * @param text 文本\r\n * @param key 种子\r\n * @return {*}\r\n */\r\n decrypt: function (type, text, key) {\r\n switch (type) {\r\n case BI.CRYPT_TYPE.AES:\r\n default:\r\n return BI.aesDecrypt(text, key);\r\n }\r\n },\r\n\r\n /**\r\n * 对字符串中的'和\\做编码处理\r\n * @static\r\n * @param {String} string 要做编码处理的字符串\r\n * @return {String} 编码后的字符串\r\n */\r\n escape: function (string) {\r\n return string.replace(/('|\\\\)/g, \"\\\\$1\");\r\n },\r\n\r\n /**\r\n * 让字符串通过指定字符做补齐的函数\r\n *\r\n * var s = BI.leftPad('123', 5, '0');//s的值为:'00123'\r\n *\r\n * @static\r\n * @param {String} val 原始值\r\n * @param {Number} size 总共需要的位数\r\n * @param {String} ch 用于补齐的字符\r\n * @return {String} 补齐后的字符串\r\n */\r\n leftPad: function (val, size, ch) {\r\n var result = String(val);\r\n if (!ch) {\r\n ch = \" \";\r\n }\r\n while (result.length < size) {\r\n result = ch + result;\r\n }\r\n return result.toString();\r\n },\r\n\r\n /**\r\n * 对字符串做替换的函数\r\n *\r\n * var cls = 'my-class', text = 'Some text';\r\n * var res = BI.format('<div class=\"{0}\">{1}</div>', cls, text);\r\n * //res的值为:'<div class=\"my-class\">Some text</div>';\r\n *\r\n * @static\r\n * @param {String} format 要做替换的字符串,替换字符串1,替换字符串2...\r\n * @return {String} 做了替换后的字符串\r\n */\r\n format: function (format) {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n return format.replace(/\\{(\\d+)\\}/g, function (m, i) {\r\n return args[i];\r\n });\r\n }\r\n });\r\n\r\n // 日期相关方法\r\n _.extend(BI, {\r\n /**\r\n * 是否是闰年\r\n * @param year\r\n * @returns {boolean}\r\n */\r\n isLeapYear: function (year) {\r\n return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\r\n },\r\n\r\n /**\r\n * 检测是否在有效期\r\n *\r\n * @param YY 年\r\n * @param MM 月\r\n * @param DD 日\r\n * @param minDate '1900-01-01'\r\n * @param maxDate '2099-12-31'\r\n * @returns {Array} 若无效返回无效状态\r\n */\r\n checkDateVoid: function (YY, MM, DD, minDate, maxDate) {\r\n var back = [];\r\n YY = YY | 0;\r\n MM = MM | 0;\r\n DD = DD | 0;\r\n minDate = BI.isString(minDate) ? minDate.match(/\\d+/g) : minDate;\r\n maxDate = BI.isString(maxDate) ? maxDate.match(/\\d+/g) : maxDate;\r\n if (YY < minDate[0]) {\r\n back = [\"y\"];\r\n } else if (YY > maxDate[0]) {\r\n back = [\"y\", 1];\r\n } else if (YY >= minDate[0] && YY <= maxDate[0]) {\r\n if (YY == minDate[0]) {\r\n if (MM < minDate[1]) {\r\n back = [\"m\"];\r\n } else if (MM == minDate[1]) {\r\n if (DD < minDate[2]) {\r\n back = [\"d\"];\r\n }\r\n }\r\n }\r\n if (YY == maxDate[0]) {\r\n if (MM > maxDate[1]) {\r\n back = [\"m\", 1];\r\n } else if (MM == maxDate[1]) {\r\n if (DD > maxDate[2]) {\r\n back = [\"d\", 1];\r\n }\r\n }\r\n }\r\n }\r\n return back;\r\n },\r\n\r\n checkDateLegal: function (str) {\r\n var ar = str.match(/\\d+/g);\r\n var YY = ar[0] | 0, MM = ar[1] | 0, DD = ar[2] | 0;\r\n if (ar.length <= 1) {\r\n return true;\r\n }\r\n if (ar.length <= 2) {\r\n return MM >= 1 && MM <= 12;\r\n }\r\n var MD = BI.Date._MD.slice(0);\r\n MD[1] = BI.isLeapYear(YY) ? 29 : 28;\r\n return MM >= 1 && MM <= 12 && DD <= MD[MM - 1];\r\n },\r\n\r\n parseDateTime: function (str, fmt) {\r\n var today = BI.getDate();\r\n var y = 0;\r\n var m = 0;\r\n var d = 1;\r\n // wei : 对于fmt为‘YYYYMM’或者‘YYYYMMdd’的格式,str的值为类似'201111'的形式,因为年月之间没有分隔符,所以正则表达式分割无效,导致bug7376。\r\n var a = str.split(/\\W+/);\r\n if (fmt.toLowerCase() == \"%y%x\" || fmt.toLowerCase() == \"%y%x%d\") {\r\n var yearlength = 4;\r\n var otherlength = 2;\r\n a[0] = str.substring(0, yearlength);\r\n a[1] = str.substring(yearlength, yearlength + otherlength);\r\n a[2] = str.substring(yearlength + otherlength, yearlength + otherlength * 2);\r\n }\r\n var b = fmt.match(/%./g);\r\n var i = 0, j = 0;\r\n var hr = 0;\r\n var min = 0;\r\n var sec = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n switch (b[i]) {\r\n case \"%d\":\r\n case \"%e\":\r\n d = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%X\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n case \"%x\":\r\n m = parseInt(a[i], 10) - 1;\r\n break;\r\n\r\n case \"%Y\":\r\n case \"%y\":\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n break;\r\n\r\n case \"%b\":\r\n case \"%B\":\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n m = j;\r\n break;\r\n }\r\n }\r\n break;\r\n\r\n case \"%H\":\r\n case \"%I\":\r\n case \"%k\":\r\n case \"%l\":\r\n hr = parseInt(a[i], 10);\r\n break;\r\n\r\n case \"%P\":\r\n case \"%p\":\r\n if (/pm/i.test(a[i]) && hr < 12) {\r\n hr += 12;\r\n } else if (/am/i.test(a[i]) && hr >= 12) {\r\n hr -= 12;\r\n }\r\n break;\r\n\r\n case \"%M\":\r\n min = parseInt(a[i], 10);\r\n case \"%S\":\r\n sec = parseInt(a[i], 10);\r\n break;\r\n }\r\n }\r\n // if (!a[i]) {\r\n // continue;\r\n //\t}\r\n if (isNaN(y)) {\r\n y = today.getFullYear();\r\n }\r\n if (isNaN(m)) {\r\n m = today.getMonth();\r\n }\r\n if (isNaN(d)) {\r\n d = today.getDate();\r\n }\r\n if (isNaN(hr)) {\r\n hr = today.getHours();\r\n }\r\n if (isNaN(min)) {\r\n min = today.getMinutes();\r\n }\r\n if (isNaN(sec)) {\r\n sec = today.getSeconds();\r\n }\r\n if (y != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n y = 0;\r\n m = -1;\r\n d = 0;\r\n for (i = 0; i < a.length; ++i) {\r\n if (a[i].search(/[a-zA-Z]+/) != -1) {\r\n var t = -1;\r\n for (j = 0; j < 12; ++j) {\r\n if (BI.Date._MN[j].substr(0, a[i].length).toLowerCase() == a[i].toLowerCase()) {\r\n t = j;\r\n break;\r\n }\r\n }\r\n if (t != -1) {\r\n if (m != -1) {\r\n d = m + 1;\r\n }\r\n m = t;\r\n }\r\n } else if (parseInt(a[i], 10) <= 12 && m == -1) {\r\n m = a[i] - 1;\r\n } else if (parseInt(a[i], 10) > 31 && y == 0) {\r\n y = parseInt(a[i], 10);\r\n (y < 100) && (y += (y > 29) ? 1900 : 2000);\r\n } else if (d == 0) {\r\n d = a[i];\r\n }\r\n }\r\n if (y == 0) {\r\n y = today.getFullYear();\r\n }\r\n if (m != -1 && d != 0) {\r\n return BI.getDate(y, m, d, hr, min, sec);\r\n }\r\n return today;\r\n },\r\n\r\n getDate: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone) && (arguments.length === 0 || (arguments.length === 1 && BI.isNumber(arguments[0])))) {\r\n var localTime = dt.getTime();\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n var localOffset = dt.getTimezoneOffset() * 60000; // 获得当地时间偏移的毫秒数\r\n var utc = localTime + localOffset; // utc即GMT时间标准时区\r\n return new Date(utc + BI.timeZone);// + Pool.timeZone.offset);\r\n }\r\n return dt;\r\n\r\n },\r\n\r\n getTime: function () {\r\n var length = arguments.length;\r\n var args = arguments;\r\n var dt;\r\n switch (length) {\r\n // new Date()\r\n case 0:\r\n dt = new Date();\r\n break;\r\n // new Date(long)\r\n case 1:\r\n dt = new Date(args[0]);\r\n break;\r\n // new Date(year, month)\r\n case 2:\r\n dt = new Date(args[0], args[1]);\r\n break;\r\n // new Date(year, month, day)\r\n case 3:\r\n dt = new Date(args[0], args[1], args[2]);\r\n break;\r\n // new Date(year, month, day, hour)\r\n case 4:\r\n dt = new Date(args[0], args[1], args[2], args[3]);\r\n break;\r\n // new Date(year, month, day, hour, minute)\r\n case 5:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second)\r\n case 6:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5]);\r\n break;\r\n // new Date(year, month, day, hour, minute, second, millisecond)\r\n case 7:\r\n dt = new Date(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r\n break;\r\n default:\r\n dt = new Date();\r\n break;\r\n }\r\n if (BI.isNotNull(BI.timeZone)) {\r\n // BI-33791 1901年以前的东8区标准是GMT+0805, 统一无论是什么时间,都以整的0800这样的为基准\r\n return dt.getTime() - BI.timeZone - new Date().getTimezoneOffset() * 60000;\r\n }\r\n return dt.getTime();\r\n\r\n }\r\n });\r\n})();\r\n!(function () {\r\n function extend () {\r\n var target = arguments[0] || {}, length = arguments.length, i = 1, options, name, src, copy;\r\n for (; i < length; i++) {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null) {\r\n // Extend the base object\r\n for (name in options) {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy) {\r\n continue;\r\n }\r\n\r\n if (copy !== undefined) {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n return target;\r\n }\r\n\r\n /**\r\n * 客户端观察者,主要处理事件的添加、删除、执行等\r\n * @class BI.OB\r\n * @abstract\r\n */\r\n BI.OB = function (config) {\r\n this._constructor(config);\r\n };\r\n _.extend(BI.OB.prototype, {\r\n props: {},\r\n init: null,\r\n destroyed: null,\r\n\r\n _constructor: function (config) {\r\n this._initProps(config);\r\n this._init();\r\n this._initRef();\r\n },\r\n\r\n _defaultConfig: function (config) {\r\n return {};\r\n },\r\n\r\n _initProps: function (config) {\r\n var props = this.props;\r\n if (BI.isFunction(this.props)) {\r\n props = this.props(config);\r\n }\r\n this.options = extend(this._defaultConfig(config), props, config);\r\n },\r\n\r\n _init: function () {\r\n this._initListeners();\r\n this.init && this.init();\r\n },\r\n\r\n _initListeners: function () {\r\n var self = this;\r\n if (this.options.listeners != null) {\r\n _.each(this.options.listeners, function (lis) {\r\n (lis.target ? lis.target : self)[lis.once ? \"once\" : \"on\"]\r\n (lis.eventName, _.bind(lis.action, self));\r\n });\r\n delete this.options.listeners;\r\n }\r\n },\r\n\r\n // 获得一个当前对象的引用\r\n _initRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(this, this);\r\n }\r\n },\r\n\r\n //释放当前对象\r\n _purgeRef: function () {\r\n if (this.options.ref) {\r\n this.options.ref.call(null);\r\n this.options.ref = null;\r\n }\r\n },\r\n\r\n _getEvents: function () {\r\n if (!_.isArray(this.events)) {\r\n this.events = [];\r\n }\r\n return this.events;\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n on: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (!_.isArray(fns)) {\r\n fns = [];\r\n this._getEvents()[eventName] = fns;\r\n }\r\n fns.push(fn);\r\n },\r\n\r\n /**\r\n * 给观察者绑定一个只执行一次的事件\r\n * @param {String} eventName 事件的名字\r\n * @param {Function} fn 事件对应的执行函数\r\n */\r\n once: function (eventName, fn) {\r\n var proxy = function () {\r\n fn.apply(this, arguments);\r\n this.un(eventName, proxy);\r\n };\r\n this.on(eventName, proxy);\r\n },\r\n /**\r\n * 解除观察者绑定的指定事件\r\n * @param {String} eventName 要解除绑定事件的名字\r\n * @param {Function} fn 事件对应的执行函数,该参数是可选的,没有该参数时,将解除绑定所有同名字的事件\r\n */\r\n un: function (eventName, fn) {\r\n eventName = eventName.toLowerCase();\r\n\r\n /* alex:如果fn是null,就是把eventName上面所有方法都un掉*/\r\n if (fn == null) {\r\n delete this._getEvents()[eventName];\r\n } else {\r\n var fns = this._getEvents()[eventName];\r\n if (_.isArray(fns)) {\r\n var newFns = [];\r\n _.each(fns, function (ifn) {\r\n if (ifn != fn) {\r\n newFns.push(ifn);\r\n }\r\n });\r\n this._getEvents()[eventName] = newFns;\r\n }\r\n }\r\n },\r\n /**\r\n * 清除观察者的所有事件绑定\r\n */\r\n purgeListeners: function () {\r\n /* alex:清空events*/\r\n this.events = [];\r\n },\r\n /**\r\n * 触发绑定过的事件\r\n *\r\n * @param {String} eventName 要触发的事件的名字\r\n * @returns {Boolean} 如果事件函数返回false,则返回false并中断其他同名事件的执行,否则执行所有的同名事件并返回true\r\n */\r\n fireEvent: function () {\r\n var eventName = arguments[0].toLowerCase();\r\n var fns = this._getEvents()[eventName];\r\n if (BI.isArray(fns)) {\r\n if (BI.isArguments(arguments[1])) {\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, arguments[1]) === false) {\r\n return false;\r\n }\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 1);\r\n for (var i = 0; i < fns.length; i++) {\r\n if (fns[i].apply(this, args) === false) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n },\r\n\r\n destroy: function () {\r\n this.destroyed && this.destroyed();\r\n this._purgeRef();\r\n this.purgeListeners();\r\n }\r\n });\r\n})();(function () {\r\n var _global;\r\n if (typeof window !== \"undefined\") {\r\n _global = window;\r\n } else if (typeof global !== \"undefined\") {\r\n _global = global;\r\n } else if (typeof self !== \"undefined\") {\r\n _global = self;\r\n } else {\r\n _global = this;\r\n }\r\n if (!_global.BI) {\r\n _global.BI = {};\r\n }\r\n\r\n function isEmpty (value) {\r\n // 判断是否为空值\r\n var result = value === \"\" || value === null || value === undefined;\r\n return result;\r\n }\r\n\r\n // 判断是否是无效的日期\r\n function isInvalidDate (date) {\r\n return date == \"Invalid Date\" || date == \"NaN\";\r\n }\r\n\r\n /**\r\n * CHART-1400\r\n * 使用数值计算的方式来获取任意数值的科学技术表示值。\r\n * 科学计数格式\r\n */\r\n function _eFormat (text, fmt) {\r\n text = +text;\r\n\r\n return eFormat(text, fmt);\r\n\r\n /**\r\n * 科学计数格式具体计算过程\r\n * @param num\r\n * @param format {String}有两种形式,\r\n * 1、\"0.00E00\"这样的字符串表示正常的科学计数表示,只不过规定了数值精确到百分位,\r\n * 而数量级的绝对值如果是10以下的时候在前面补零。\r\n * 2、 \"##0.0E0\"这样的字符串则规定用科学计数法表示之后的数值的整数部分是三位,精确到十分位,\r\n * 数量级没有规定,因为没见过实数里有用科学计数法表示之后E的后面会小于一位的情况(0无所谓)。\r\n * @returns {*}\r\n */\r\n function eFormat (num, format) {\r\n var neg = num < 0 ? (num *= -1, \"-\") : \"\",\r\n magnitudeNeg = \"\";\r\n\r\n var funcName = num > 0 && num < 1 ? \"floor\" : \"ceil\"; // -0.9999->-1\r\n // 数量级\r\n var magnitude = Math[funcName](Math.log(num) / Math.log(10));\r\n\r\n if (!isFinite(magnitude)) {\r\n return format.replace(/#/ig, \"\").replace(/\\.e/ig, \"E\");\r\n }\r\n\r\n num = num / Math.pow(10, magnitude);\r\n\r\n // 让num转化成[1, 10)区间上的数\r\n if (num > 0 && num < 1) {\r\n num *= 10;\r\n magnitude -= 1;\r\n }\r\n\r\n // 计算出format中需要显示的整数部分的位数,然后更新这个数值,也更新数量级\r\n var integerLen = getInteger(magnitude, format);\r\n integerLen > 1 && (magnitude -= integerLen - 1, num *= Math.pow(10, integerLen - 1));\r\n\r\n magnitude < 0 && (magnitudeNeg = \"-\", magnitude *= -1);\r\n\r\n // 获取科学计数法精确到的位数\r\n var precision = getPrecision(format);\r\n // 判断num经过四舍五入之后是否有进位\r\n var isValueCarry = isValueCarried(num);\r\n\r\n num *= Math.pow(10, precision);\r\n num = Math.round(num);\r\n // 如果出现进位的情况,将num除以10\r\n isValueCarry && (num /= 10, magnitude += magnitudeNeg === \"-\" ? -1 : 1);\r\n num /= Math.pow(10, precision);\r\n\r\n // 小数部分保留precision位\r\n num = num.toFixed(precision);\r\n // 格式化指数的部分\r\n magnitude = formatExponential(format, magnitude, magnitudeNeg);\r\n\r\n return neg + num + \"E\" + magnitude;\r\n }\r\n\r\n // 获取format格式规定的数量级的形式\r\n function formatExponential (format, num, magnitudeNeg) {\r\n num += \"\";\r\n if (!/e/ig.test(format)) {\r\n return num;\r\n }\r\n format = format.split(/e/ig)[1];\r\n\r\n while (num.length < format.length) {\r\n num = \"0\" + num;\r\n }\r\n\r\n // 如果magnitudeNeg是一个\"-\",而且num正好全是0,那么就别显示负号了\r\n var isAllZero = true;\r\n for (var i = 0, len = num.length; i < len; i++) {\r\n if (!isAllZero) {\r\n continue;\r\n }\r\n isAllZero = num.charAt(i) === \"0\";\r\n }\r\n magnitudeNeg = isAllZero ? \"\" : magnitudeNeg;\r\n\r\n return magnitudeNeg + num;\r\n }\r\n\r\n // 获取format规定的科学计数法精确到的位数\r\n function getPrecision (format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n var arr = format.split(/e/ig)[0].split(\".\");\r\n\r\n return arr.length > 1 ? arr[1].length : 0;\r\n }\r\n\r\n // 获取数值科学计数法表示之后整数的位数\r\n // 这边我们还需要考虑#和0的问题\r\n function getInteger (magnitude, format) {\r\n if (!/e/ig.test(format)) {\r\n return 0;\r\n }\r\n // return format.split(/e/ig)[0].split(\".\")[0].length;\r\n\r\n var formatLeft = format.split(/e/ig)[0].split(\".\")[0], i, f, len = formatLeft.length;\r\n var valueLeftLen = 0;\r\n\r\n for (i = 0; i < len; i++) {\r\n f = formatLeft.charAt(i);\r\n // \"#\"所在的位置到末尾长度小于等于值的整数部分长度,那么这个#才可以占位\r\n if (f == 0 || (f == \"#\" && (len - i <= magnitude + 1))) {\r\n valueLeftLen++;\r\n }\r\n }\r\n\r\n return valueLeftLen;\r\n }\r\n\r\n // 判断num通过round函数之后是否有进位\r\n function isValueCarried (num) {\r\n var roundNum = Math.round(num);\r\n num = (num + \"\").split(\".\")[0];\r\n roundNum = (roundNum + \"\").split(\".\")[0];\r\n return num.length !== roundNum.length;\r\n }\r\n }\r\n\r\n //'#.##'之类的格式处理 1.324e-18 这种的科学数字\r\n function _dealNumberPrecision (text, fright) {\r\n if (/[eE]/.test(text)) {\r\n var precision = 0, i = 0, ch;\r\n\r\n if (/[%‰]$/.test(fright)) {\r\n precision = /[%]$/.test(fright) ? 2 : 3;\r\n }\r\n\r\n for (var len = fright.length; i < len; i++) {\r\n if ((ch = fright.charAt(i)) == \"0\" || ch == \"#\") {\r\n precision++;\r\n }\r\n }\r\n return Number(text).toFixed(precision);\r\n }\r\n\r\n return text;\r\n }\r\n\r\n /**\r\n * 数字格式\r\n */\r\n function _numberFormat (text, format) {\r\n var text = text + \"\";\r\n\r\n //在调用数字格式的时候如果text里没有任何数字则不处理\r\n if (!(/[0-9]/.test(text)) || !format) {\r\n return text;\r\n }\r\n\r\n // 数字格式,区分正负数\r\n var numMod = format.indexOf(\";\");\r\n if (numMod > -1) {\r\n if (text >= 0) {\r\n return _numberFormat(text + \"\", format.substring(0, numMod));\r\n }\r\n return _numberFormat((-text) + \"\", format.substr(numMod + 1));\r\n\r\n } else {\r\n // 兼容格式处理负数的情况(copy:fr-jquery.format.js)\r\n if (+text < 0 && format.charAt(0) !== \"-\") {\r\n return _numberFormat((-text) + \"\", \"-\" + format);\r\n }\r\n }\r\n\r\n var fp = format.split(\".\"), fleft = fp[0] || \"\", fright = fp[1] || \"\";\r\n text = _dealNumberPrecision(text, fright);\r\n var tp = text.split(\".\"), tleft = tp[0] || \"\", tright = tp[1] || \"\";\r\n\r\n // 百分比,千分比的小数点移位处理\r\n if (/[%‰]$/.test(format)) {\r\n var paddingZero = /[%]$/.test(format) ? \"00\" : \"000\";\r\n tright += paddingZero;\r\n tleft += tright.substr(0, paddingZero.length);\r\n tleft = tleft.replace(/^0+/gi, \"\");\r\n tright = tright.substr(paddingZero.length).replace(/0+$/gi, \"\");\r\n }\r\n var right = _dealWithRight(tright, fright);\r\n if (right.leftPlus) {\r\n // 小数点后有进位\r\n tleft = parseInt(tleft) + 1 + \"\";\r\n\r\n tleft = isNaN(tleft) ? \"1\" : tleft;\r\n }\r\n right = right.num;\r\n var left = _dealWithLeft(tleft, fleft);\r\n if (!(/[0-9]/.test(left))) {\r\n left = left + \"0\";\r\n }\r\n if (!(/[0-9]/.test(right))) {\r\n return left + right;\r\n } else {\r\n return left + \".\" + right;\r\n }\r\n }\r\n\r\n /**\r\n * 处理小数点右边小数部分\r\n * @param tright 右边内容\r\n * @param fright 右边格式\r\n * @returns {JSON} 返回处理结果和整数部分是否需要进位\r\n * @private\r\n */\r\n function _dealWithRight (tright, fright) {\r\n var right = \"\", j = 0, i = 0;\r\n for (var len = fright.length; i < len; i++) {\r\n var ch = fright.charAt(i);\r\n var c = tright.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n right += c;\r\n j++;\r\n break;\r\n case \"#\":\r\n right += c;\r\n j++;\r\n break;\r\n default :\r\n right += ch;\r\n break;\r\n }\r\n }\r\n var rll = tright.substr(j);\r\n var result = {};\r\n if (!isEmpty(rll) && rll.charAt(0) > 4) {\r\n // 有多余字符,需要四舍五入\r\n result.leftPlus = true;\r\n var numReg = right.match(/^[0-9]+/);\r\n if (numReg) {\r\n var num = numReg[0];\r\n var orilen = num.length;\r\n var newnum = parseInt(num) + 1 + \"\";\r\n // 进位到整数部分\r\n if (newnum.length > orilen) {\r\n newnum = newnum.substr(1);\r\n } else {\r\n newnum = BI.leftPad(newnum, orilen, \"0\");\r\n result.leftPlus = false;\r\n }\r\n right = right.replace(/^[0-9]+/, newnum);\r\n }\r\n }\r\n result.num = right;\r\n return result;\r\n }\r\n\r\n /**\r\n * 处理小数点左边整数部分\r\n * @param tleft 左边内容\r\n * @param fleft 左边格式\r\n * @returns {string} 返回处理结果\r\n * @private\r\n */\r\n function _dealWithLeft (tleft, fleft) {\r\n var left = \"\";\r\n var j = tleft.length - 1;\r\n var combo = -1, last = -1;\r\n var i = fleft.length - 1;\r\n for (; i >= 0; i--) {\r\n var ch = fleft.charAt(i);\r\n var c = tleft.charAt(j);\r\n switch (ch) {\r\n case \"0\":\r\n if (isEmpty(c)) {\r\n c = \"0\";\r\n }\r\n last = -1;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \"#\":\r\n last = i;\r\n left = c + left;\r\n j--;\r\n break;\r\n case \",\":\r\n if (!isEmpty(c)) {\r\n // 计算一个,分隔区间的长度\r\n var com = fleft.match(/,[#0]+/);\r\n if (com) {\r\n combo = com[0].length - 1;\r\n }\r\n left = \",\" + left;\r\n }\r\n break;\r\n default :\r\n left = ch + left;\r\n break;\r\n }\r\n }\r\n if (last > -1) {\r\n // 处理剩余字符\r\n var tll = tleft.substr(0, j + 1);\r\n left = left.substr(0, last) + tll + left.substr(last);\r\n }\r\n if (combo > 0) {\r\n // 处理,分隔区间\r\n var res = left.match(/[0-9]+,/);\r\n if (res) {\r\n res = res[0];\r\n var newstr = \"\", n = res.length - 1 - combo;\r\n for (; n >= 0; n = n - combo) {\r\n newstr = res.substr(n, combo) + \",\" + newstr;\r\n }\r\n var lres = res.substr(0, n + combo);\r\n if (!isEmpty(lres)) {\r\n newstr = lres + \",\" + newstr;\r\n }\r\n }\r\n left = left.replace(/[0-9]+,/, newstr);\r\n }\r\n return left;\r\n }\r\n\r\n\r\n BI.cjkEncode = function (text) {\r\n // alex:如果非字符串,返回其本身(cjkEncode(234) 返回 \"\"是不对的)\r\n if (typeof text !== \"string\") {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var code = text.charCodeAt(i);\r\n if (code >= 128 || code === 91 || code === 93) {// 91 is \"[\", 93 is \"]\".\r\n newText += \"[\" + code.toString(16) + \"]\";\r\n } else {\r\n newText += text.charAt(i);\r\n }\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n /**\r\n * 将cjkEncode处理过的字符串转化为原始字符串\r\n *\r\n * @static\r\n * @param text 需要做解码的字符串\r\n * @return {String} 解码后的字符串\r\n */\r\n BI.cjkDecode = function (text) {\r\n if (text == null) {\r\n return \"\";\r\n }\r\n // 查找没有 \"[\", 直接返回. kunsnat:数字的时候, 不支持indexOf方法, 也是直接返回.\r\n if (!isNaN(text) || text.indexOf(\"[\") == -1) {\r\n return text;\r\n }\r\n\r\n var newText = \"\";\r\n for (var i = 0; i < text.length; i++) {\r\n var ch = text.charAt(i);\r\n if (ch == \"[\") {\r\n var rightIdx = text.indexOf(\"]\", i + 1);\r\n if (rightIdx > i + 1) {\r\n var subText = text.substring(i + 1, rightIdx);\r\n // james:主要是考虑[CDATA[]]这样的值的出现\r\n if (subText.length > 0) {\r\n ch = String.fromCharCode(eval(\"0x\" + subText));\r\n }\r\n\r\n i = rightIdx;\r\n }\r\n }\r\n\r\n newText += ch;\r\n }\r\n\r\n return newText;\r\n };\r\n\r\n // replace the html special tags\r\n var SPECIAL_TAGS = {\r\n \"&\": \"&amp;\",\r\n \"\\\"\": \"&quot;\",\r\n \"<\": \"&lt;\",\r\n \">\": \"&gt;\"\r\n };\r\n BI.htmlEncode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&|\\\"|<|>\", function (v) {\r\n return SPECIAL_TAGS[v] ? SPECIAL_TAGS[v] : \"&nbsp;\";\r\n });\r\n };\r\n // html decode\r\n BI.htmlDecode = function (text) {\r\n return BI.isNull(text) ? \"\" : BI.replaceAll(text + \"\", \"&amp;|&quot;|&lt;|&gt;|&nbsp;\", function (v) {\r\n switch (v) {\r\n case \"&amp;\":\r\n return \"&\";\r\n case \"&quot;\":\r\n return \"\\\"\";\r\n case \"&lt;\":\r\n return \"<\";\r\n case \"&gt;\":\r\n return \">\";\r\n case \"&nbsp;\":\r\n default:\r\n return \" \";\r\n }\r\n });\r\n };\r\n\r\n BI.cjkEncodeDO = function (o) {\r\n if (BI.isPlainObject(o)) {\r\n var result = {};\r\n _.each(o, function (v, k) {\r\n if (!(typeof v === \"string\")) {\r\n v = BI.jsonEncode(v);\r\n }\r\n // wei:bug 43338,如果key是中文,cjkencode后o的长度就加了1,ie9以下版本死循环,所以新建对象result。\r\n k = BI.cjkEncode(k);\r\n result[k] = BI.cjkEncode(v);\r\n });\r\n return result;\r\n }\r\n return o;\r\n };\r\n\r\n BI.jsonEncode = function (o) {\r\n // james:这个Encode是抄的EXT的\r\n var useHasOwn = !!{}.hasOwnProperty;\r\n\r\n // crashes Safari in some instances\r\n // var validRE = /^(\"(\\\\.|[^\"\\\\\\n\\r])*?\"|[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t])+?$/;\r\n\r\n var m = {\r\n \"\\b\": \"\\\\b\",\r\n \"\\t\": \"\\\\t\",\r\n \"\\n\": \"\\\\n\",\r\n \"\\f\": \"\\\\f\",\r\n \"\\r\": \"\\\\r\",\r\n \"\\\"\": \"\\\\\\\"\",\r\n \"\\\\\": \"\\\\\\\\\"\r\n };\r\n\r\n var encodeString = function (s) {\r\n if (/[\"\\\\\\x00-\\x1f]/.test(s)) {\r\n return \"\\\"\" + s.replace(/([\\x00-\\x1f\\\\\"])/g, function (a, b) {\r\n var c = m[b];\r\n if (c) {\r\n return c;\r\n }\r\n c = b.charCodeAt();\r\n return \"\\\\u00\" +\r\n Math.floor(c / 16).toString(16) +\r\n (c % 16).toString(16);\r\n }) + \"\\\"\";\r\n }\r\n return \"\\\"\" + s + \"\\\"\";\r\n };\r\n\r\n var encodeArray = function (o) {\r\n var a = [\"[\"], b, i, l = o.length, v;\r\n for (i = 0; i < l; i += 1) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"function\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n a.push(\"]\");\r\n return a.join(\"\");\r\n };\r\n\r\n if (typeof o === \"undefined\" || o === null) {\r\n return \"null\";\r\n } else if (BI.isArray(o)) {\r\n return encodeArray(o);\r\n } else if (o instanceof Date) {\r\n /*\r\n * alex:原来只是把年月日时分秒简单地拼成一个String,无法decode\r\n * 现在这么处理就可以decode了,但是JS.jsonDecode和Java.JSONObject也要跟着改一下\r\n */\r\n return BI.jsonEncode({\r\n __time__: o.getTime()\r\n });\r\n } else if (typeof o === \"string\") {\r\n return encodeString(o);\r\n } else if (typeof o === \"number\") {\r\n return isFinite(o) ? String(o) : \"null\";\r\n } else if (typeof o === \"boolean\") {\r\n return String(o);\r\n } else if (BI.isFunction(o)) {\r\n return String(o);\r\n }\r\n var a = [\"{\"], b, i, v;\r\n for (i in o) {\r\n if (!useHasOwn || o.hasOwnProperty(i)) {\r\n v = o[i];\r\n switch (typeof v) {\r\n case \"undefined\":\r\n case \"unknown\":\r\n break;\r\n default:\r\n if (b) {\r\n a.push(\",\");\r\n }\r\n a.push(BI.jsonEncode(i), \":\",\r\n v === null ? \"null\" : BI.jsonEncode(v));\r\n b = true;\r\n }\r\n }\r\n }\r\n a.push(\"}\");\r\n return a.join(\"\");\r\n\r\n };\r\n\r\n BI.jsonDecode = function (text) {\r\n\r\n try {\r\n // 注意0啊\r\n // var jo = $.parseJSON(text) || {};\r\n var jo = BI.$ ? BI.$.parseJSON(text) : _global.JSON.parse(text);\r\n if (jo == null) {\r\n jo = {};\r\n }\r\n } catch (e) {\r\n /*\r\n * richie:浏览器只支持标准的JSON字符串转换,而jQuery会默认调用浏览器的window.JSON.parse()函数进行解析\r\n * 比如:var str = \"{'a':'b'}\",这种形式的字符串转换为JSON就会抛异常\r\n */\r\n try {\r\n jo = new Function(\"return \" + text)() || {};\r\n } catch (e) {\r\n // do nothing\r\n }\r\n if (jo == null) {\r\n jo = [];\r\n }\r\n }\r\n if (!_hasDateInJson(text)) {\r\n return jo;\r\n }\r\n\r\n function _hasDateInJson (json) {\r\n if (!json || typeof json !== \"string\") {\r\n return false;\r\n }\r\n return json.indexOf(\"__time__\") != -1;\r\n }\r\n\r\n return (function (o) {\r\n if (typeof o === \"string\") {\r\n return o;\r\n }\r\n if (o && o.__time__ != null) {\r\n return new Date(o.__time__);\r\n }\r\n for (var a in o) {\r\n if (o[a] == o || typeof o[a] === \"object\" || _.isFunction(o[a])) {\r\n break;\r\n }\r\n o[a] = arguments.callee(o[a]);\r\n }\r\n\r\n return o;\r\n })(jo);\r\n };\r\n\r\n /**\r\n * 获取编码后的url\r\n * @param urlTemplate url模板\r\n * @param param 参数\r\n * @returns {*|String}\r\n * @example\r\n * BI.getEncodeURL(\"design/{tableName}/{fieldName}\",{tableName: \"A\", fieldName: \"a\"}) // design/A/a\r\n */\r\n BI.getEncodeURL = function (urlTemplate, param) {\r\n return BI.replaceAll(urlTemplate, \"\\\\{(.*?)\\\\}\", function (ori, str) {\r\n return BI.encodeURIComponent(BI.isObject(param) ? param[str] : param);\r\n });\r\n };\r\n\r\n BI.encodeURIComponent = function (url) {\r\n BI.specialCharsMap = BI.specialCharsMap || {};\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(BI.specialCharsMap || []).join(\"|\"), function (str) {\r\n switch (str) {\r\n case \"\\\\\":\r\n return BI.specialCharsMap[\"\\\\\\\\\"] || str;\r\n default:\r\n return BI.specialCharsMap[str] || str;\r\n }\r\n });\r\n return _global.encodeURIComponent(url);\r\n };\r\n\r\n BI.decodeURIComponent = function (url) {\r\n var reserveSpecialCharsMap = {};\r\n BI.each(BI.specialCharsMap, function (initialChar, encodeChar) {\r\n reserveSpecialCharsMap[encodeChar] = initialChar === \"\\\\\\\\\" ? \"\\\\\" : initialChar;\r\n });\r\n url = url || \"\";\r\n url = BI.replaceAll(url + \"\", BI.keys(reserveSpecialCharsMap || []).join(\"|\"), function (str) {\r\n return reserveSpecialCharsMap[str] || str;\r\n });\r\n return _global.decodeURIComponent(url);\r\n };\r\n\r\n BI.contentFormat = function (cv, fmt) {\r\n if (isEmpty(cv)) {\r\n // 原值为空,返回空字符\r\n return \"\";\r\n }\r\n var text = cv.toString();\r\n if (isEmpty(fmt)) {\r\n // 格式为空,返回原字符\r\n return text;\r\n }\r\n if (fmt.match(/^T/)) {\r\n // T - 文本格式\r\n return text;\r\n } else if (fmt.match(/^D/)) {\r\n // D - 日期(时间)格式\r\n if (!(cv instanceof Date)) {\r\n if (typeof cv === \"number\") {\r\n // 毫秒数类型\r\n cv = new Date(cv);\r\n } else {\r\n //字符串类型转化为date类型\r\n cv = new Date(Date.parse((\"\" + cv).replace(/-|\\./g, \"/\")));\r\n }\r\n }\r\n if (!isInvalidDate(cv) && !BI.isNull(cv)) {\r\n var needTrim = fmt.match(/^DT/);\r\n text = BI.date2Str(cv, fmt.substring(needTrim ? 2 : 1));\r\n }\r\n } else if (fmt.match(/E/)) {\r\n // 科学计数格式\r\n text = _eFormat(text, fmt);\r\n } else {\r\n // 数字格式\r\n text = _numberFormat(text, fmt);\r\n }\r\n // ¤ - 货币格式\r\n text = text.replace(/¤/g, \"¥\");\r\n return text;\r\n };\r\n\r\n /**\r\n * 将Java提供的日期格式字符串装换为JS识别的日期格式字符串\r\n * @class FR.parseFmt\r\n * @param fmt 日期格式\r\n * @returns {String}\r\n */\r\n BI.parseFmt = function (fmt) {\r\n if (!fmt) {\r\n return \"\";\r\n }\r\n //日期\r\n fmt = String(fmt)\r\n //年\r\n .replace(/y{4,}/g, \"%Y\")//yyyy的时候替换为Y\r\n .replace(/y{2}/g, \"%y\")//yy的时候替换为y\r\n //月\r\n .replace(/M{4,}/g, \"%b\")//MMMM的时候替换为b,八\r\n .replace(/M{3}/g, \"%B\")//MMM的时候替换为M,八月\r\n .replace(/M{2}/g, \"%X\")//MM的时候替换为X,08\r\n .replace(/M{1}/g, \"%x\")//M的时候替换为x,8\r\n .replace(/a{1}/g, \"%p\");\r\n //天\r\n if (new RegExp(\"d{2,}\", \"g\").test(fmt)) {\r\n fmt = fmt.replace(/d{2,}/g, \"%d\");//dd的时候替换为d\r\n } else {\r\n fmt = fmt.replace(/d{1}/g, \"%e\");//d的时候替换为j\r\n }\r\n //时\r\n if (new RegExp(\"h{2,}\", \"g\").test(fmt)) {//12小时制\r\n fmt = fmt.replace(/h{2,}/g, \"%I\");\r\n } else {\r\n fmt = fmt.replace(/h{1}/g, \"%I\");\r\n }\r\n if (new RegExp(\"H{2,}\", \"g\").test(fmt)) {//24小时制\r\n fmt = fmt.replace(/H{2,}/g, \"%H\");\r\n } else {\r\n fmt = fmt.replace(/H{1}/g, \"%H\");\r\n }\r\n fmt = fmt.replace(/m{2,}/g, \"%M\")//分\r\n //秒\r\n .replace(/s{2,}/g, \"%S\");\r\n\r\n return fmt;\r\n };\r\n\r\n /**\r\n * 把字符串按照对应的格式转化成日期对象\r\n *\r\n * @example\r\n * var result = BI.str2Date('2013-12-12', 'yyyy-MM-dd');//Thu Dec 12 2013 00:00:00 GMT+0800\r\n *\r\n * @class BI.str2Date\r\n * @param str 字符串\r\n * @param format 日期格式\r\n * @returns {*}\r\n */\r\n BI.str2Date = function (str, format) {\r\n if (typeof str != \"string\" || typeof format != \"string\") {\r\n return null;\r\n }\r\n var fmt = BI.parseFmt(format);\r\n return BI.parseDateTime(str, fmt);\r\n };\r\n\r\n /**\r\n * 把日期对象按照指定格式转化成字符串\r\n *\r\n * @example\r\n * var date = new Date('Thu Dec 12 2013 00:00:00 GMT+0800');\r\n * var result = BI.date2Str(date, 'yyyy-MM-dd');//2013-12-12\r\n *\r\n * @class BI.date2Str\r\n * @param date 日期\r\n * @param format 日期格式\r\n * @returns {String}\r\n */\r\n BI.date2Str = function (date, format) {\r\n if (!date) {\r\n return \"\";\r\n }\r\n // O(len(format))\r\n var len = format.length, result = \"\";\r\n if (len > 0) {\r\n var flagch = format.charAt(0), start = 0, str = flagch;\r\n for (var i = 1; i < len; i++) {\r\n var ch = format.charAt(i);\r\n if (flagch !== ch) {\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: i - start\r\n }, date);\r\n flagch = ch;\r\n start = i;\r\n str = flagch;\r\n } else {\r\n str += ch;\r\n }\r\n }\r\n result += compileJFmt({\r\n char: flagch,\r\n str: str,\r\n len: len - start\r\n }, date);\r\n }\r\n return result;\r\n\r\n function compileJFmt (jfmt, date) {\r\n var str = jfmt.str, len = jfmt.len, ch = jfmt[\"char\"];\r\n switch (ch) {\r\n case \"E\": // 星期\r\n str = BI.Date._DN[date.getDay()];\r\n break;\r\n case \"y\": // 年\r\n if (len <= 3) {\r\n str = (date.getFullYear() + \"\").slice(2, 4);\r\n } else {\r\n str = date.getFullYear();\r\n }\r\n break;\r\n case \"M\": // 月\r\n if (len > 2) {\r\n str = BI.Date._MN[date.getMonth()];\r\n } else if (len < 2) {\r\n str = date.getMonth() + 1;\r\n } else {\r\n str = BI.leftPad(date.getMonth() + 1 + \"\", 2, \"0\");\r\n }\r\n break;\r\n case \"d\": // 日\r\n if (len > 1) {\r\n str = BI.leftPad(date.getDate() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getDate();\r\n }\r\n break;\r\n case \"h\": // 时(12)\r\n var hour = date.getHours() % 12;\r\n if (hour === 0) {\r\n hour = 12;\r\n }\r\n if (len > 1) {\r\n str = BI.leftPad(hour + \"\", 2, \"0\");\r\n } else {\r\n str = hour;\r\n }\r\n break;\r\n case \"H\": // 时(24)\r\n if (len > 1) {\r\n str = BI.leftPad(date.getHours() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getHours();\r\n }\r\n break;\r\n case \"m\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getMinutes() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getMinutes();\r\n }\r\n break;\r\n case \"s\":\r\n if (len > 1) {\r\n str = BI.leftPad(date.getSeconds() + \"\", 2, \"0\");\r\n } else {\r\n str = date.getSeconds();\r\n }\r\n break;\r\n case \"a\":\r\n str = date.getHours() < 12 ? \"am\" : \"pm\";\r\n break;\r\n case \"z\":\r\n str = BI.getTimezone(date);\r\n break;\r\n default:\r\n str = jfmt.str;\r\n break;\r\n }\r\n return str;\r\n }\r\n };\r\n\r\n BI.object2Number = function (value) {\r\n if (value == null) {\r\n return 0;\r\n }\r\n if (typeof value === \"number\") {\r\n return value;\r\n }\r\n var str = value + \"\";\r\n if (str.indexOf(\".\") === -1) {\r\n return parseInt(str);\r\n }\r\n return parseFloat(str);\r\n };\r\n\r\n BI.object2Date = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n } else if (typeof obj === \"number\") {\r\n return new Date(obj);\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n\r\n return new Date();\r\n\r\n };\r\n\r\n BI.object2Time = function (obj) {\r\n if (obj == null) {\r\n return new Date();\r\n }\r\n if (obj instanceof Date) {\r\n return obj;\r\n }\r\n var str = obj + \"\";\r\n str = str.replace(/-/g, \"/\");\r\n var dt = new Date(str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n if (str.indexOf(\"/\") === -1 && str.indexOf(\":\") !== -1) {\r\n dt = new Date(\"1970/01/01 \" + str);\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n }\r\n dt = BI.parseDateTime(str, \"HH:mm:ss\");\r\n if (!isInvalidDate(dt)) {\r\n return dt;\r\n }\r\n return new Date();\r\n\r\n };\r\n})();\r\n(function () {\r\n var moduleInjection = {};\r\n BI.module = function (xtype, cls) {\r\n if (moduleInjection[xtype] != null) {\r\n _global.console && console.error(\"module:[\" + xtype + \"] has been registed\");\r\n }\r\n moduleInjection[xtype] = cls;\r\n };\r\n\r\n var constantInjection = {};\r\n BI.constant = function (xtype, cls) {\r\n if (constantInjection[xtype] != null) {\r\n _global.console && console.error(\"constant:[\" + xtype + \"] has been registed\");\r\n }\r\n constantInjection[xtype] = cls;\r\n };\r\n\r\n var modelInjection = {};\r\n BI.model = function (xtype, cls) {\r\n if (modelInjection[xtype] != null) {\r\n _global.console && console.error(\"model:[\" + xtype + \"] has been registed\");\r\n }\r\n modelInjection[xtype] = cls;\r\n };\r\n\r\n var storeInjection = {};\r\n BI.store = function (xtype, cls) {\r\n if (storeInjection[xtype] != null) {\r\n _global.console && console.error(\"store:[\" + xtype + \"] has been registed\");\r\n }\r\n storeInjection[xtype] = cls;\r\n };\r\n\r\n var serviceInjection = {};\r\n BI.service = function (xtype, cls) {\r\n if (serviceInjection[xtype] != null) {\r\n _global.console && console.error(\"service:[\" + xtype + \"] has been registed\");\r\n }\r\n serviceInjection[xtype] = cls;\r\n };\r\n\r\n var providerInjection = {};\r\n BI.provider = function (xtype, cls) {\r\n if (providerInjection[xtype] != null) {\r\n _global.console && console.error(\"provider:[\" + xtype + \"] has been registed\");\r\n }\r\n providerInjection[xtype] = cls;\r\n };\r\n\r\n var configFunctions = {};\r\n BI.config = function (type, configFn) {\r\n if (BI.initialized) {\r\n if (constantInjection[type]) {\r\n return (constantInjection[type] = configFn(constantInjection[type]));\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n // 如果config被重新配置的话,需要删除掉之前的实例\r\n if (providerInstance[type]) {\r\n delete providerInstance[type];\r\n }\r\n return configFn(providers[type]);\r\n }\r\n return BI.Plugin.configWidget(type, configFn);\r\n }\r\n if (!configFunctions[type]) {\r\n configFunctions[type] = [];\r\n BI.prepares.push(function () {\r\n var queue = configFunctions[type];\r\n for (var i = 0; i < queue.length; i++) {\r\n if (constantInjection[type]) {\r\n constantInjection[type] = queue[i](constantInjection[type]);\r\n continue;\r\n }\r\n if (providerInjection[type]) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (providerInstance[type]) {\r\n delete providerInstance[type];\r\n }\r\n queue[i](providers[type]);\r\n continue;\r\n }\r\n BI.Plugin.configWidget(type, queue[i]);\r\n }\r\n configFunctions[type] = null;\r\n });\r\n }\r\n configFunctions[type].push(configFn);\r\n };\r\n\r\n var actions = {};\r\n var globalAction = [];\r\n BI.action = function (type, actionFn) {\r\n if (BI.isFunction(type)) {\r\n globalAction.push(type);\r\n return function () {\r\n BI.remove(globalAction, function (idx) {\r\n return globalAction.indexOf(actionFn) === idx;\r\n });\r\n };\r\n }\r\n if (!actions[type]) {\r\n actions[type] = [];\r\n }\r\n actions[type].push(actionFn);\r\n return function () {\r\n BI.remove(actions[type], function (idx) {\r\n return actions[type].indexOf(actionFn) === idx;\r\n });\r\n if (actions[type].length === 0) {\r\n delete actions[type];\r\n }\r\n };\r\n };\r\n\r\n var points = {};\r\n BI.point = function (type, action, pointFn, after) {\r\n if (!points[type]) {\r\n points[type] = {};\r\n }\r\n if (!points[type][action]) {\r\n points[type][action] = {};\r\n }\r\n if (!points[type][action][after ? \"after\" : \"before\"]) {\r\n points[type][action][after ? \"after\" : \"before\"] = [];\r\n }\r\n points[type][action][after ? \"after\" : \"before\"].push(pointFn);\r\n };\r\n\r\n BI.Modules = {\r\n getModule: function (type) {\r\n if (!moduleInjection[type]) {\r\n _global.console && console.error(\"module:[\" + type + \"] does not exists\");\r\n return false;\r\n }\r\n return moduleInjection[type];\r\n },\r\n getAllModules: function () {\r\n return moduleInjection;\r\n }\r\n };\r\n\r\n BI.Constants = {\r\n getConstant: function (type) {\r\n return constantInjection[type];\r\n }\r\n };\r\n\r\n var callPoint = function (inst, types) {\r\n types = BI.isArray(types) ? types : [types];\r\n BI.each(types, function (idx, type) {\r\n if (points[type]) {\r\n for (var action in points[type]) {\r\n var bfns = points[type][action].before;\r\n if (bfns) {\r\n BI.aspect.before(inst, action, function (bfns) {\r\n return function () {\r\n for (var i = 0, len = bfns.length; i < len; i++) {\r\n try {\r\n bfns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(bfns));\r\n }\r\n var afns = points[type][action].after;\r\n if (afns) {\r\n BI.aspect.after(inst, action, function (afns) {\r\n return function () {\r\n for (var i = 0, len = afns.length; i < len; i++) {\r\n try {\r\n afns[i].apply(inst, arguments);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n }\r\n };\r\n }(afns));\r\n }\r\n }\r\n }\r\n });\r\n };\r\n\r\n BI.Models = {\r\n getModel: function (type, config) {\r\n var inst = new modelInjection[type](config);\r\n inst._constructor && inst._constructor(config);\r\n inst.mixins && callPoint(inst, inst.mixins);\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var stores = {};\r\n\r\n BI.Stores = {\r\n getStore: function (type, config) {\r\n if (stores[type]) {\r\n return stores[type];\r\n }\r\n var inst = stores[type] = new storeInjection[type](config);\r\n inst._constructor && inst._constructor(config, function () {\r\n delete stores[type];\r\n });\r\n callPoint(inst, type);\r\n return inst;\r\n }\r\n };\r\n\r\n var services = {};\r\n\r\n BI.Services = {\r\n getService: function (type, config) {\r\n if (services[type]) {\r\n return services[type];\r\n }\r\n services[type] = new serviceInjection[type](config);\r\n callPoint(services[type], type);\r\n return services[type];\r\n }\r\n };\r\n\r\n var providers = {},\r\n providerInstance = {};\r\n\r\n BI.Providers = {\r\n getProvider: function (type, config) {\r\n if (!providers[type]) {\r\n providers[type] = new providerInjection[type]();\r\n }\r\n if (!providerInstance[type]) {\r\n providerInstance[type] = new (providers[type].$get())(config);\r\n }\r\n return providerInstance[type];\r\n }\r\n };\r\n\r\n BI.Actions = {\r\n runAction: function (type, event, config) {\r\n BI.each(actions[type], function (i, act) {\r\n try {\r\n act(event, config);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n },\r\n runGlobalAction: function () {\r\n var args = [].slice.call(arguments);\r\n BI.each(globalAction, function (i, act) {\r\n try {\r\n act.apply(null, args);\r\n } catch (e) {\r\n _global.console && console.error(e);\r\n }\r\n });\r\n }\r\n };\r\n\r\n BI.getContext = function (type, config) {\r\n if (constantInjection[type]) {\r\n return BI.Constants.getConstant(type);\r\n }\r\n if (modelInjection[type]) {\r\n return BI.Models.getModel(type, config);\r\n }\r\n if (storeInjection[type]) {\r\n return BI.Stores.getStore(type, config);\r\n }\r\n if (serviceInjection[type]) {\r\n return BI.Services.getService(type, config);\r\n }\r\n if (providerInjection[type]) {\r\n return BI.Providers.getProvider(type, config);\r\n }\r\n };\r\n})();!(function () {\r\n var i18nStore = {};\r\n _.extend(BI, {\r\n addI18n: function (i18n) {\r\n BI.extend(i18nStore, i18n);\r\n },\r\n i18nText: function (key) {\r\n var localeText = i18nStore[key] || (BI.i18n && BI.i18n[key]) || \"\";\r\n if (!localeText) {\r\n localeText = key;\r\n }\r\n var len = arguments.length;\r\n if (len > 1) {\r\n if (localeText.indexOf(\"{R1}\") > -1) {\r\n for (var i = 1; i < len; i++) {\r\n var key = \"{R\" + i + \"}\";\r\n localeText = BI.replaceAll(localeText, key, arguments[i] + \"\");\r\n }\r\n } else {\r\n var args = Array.prototype.slice.call(arguments);\r\n var count = 1;\r\n return BI.replaceAll(localeText, \"\\\\{\\\\s*\\\\}\", function () {\r\n return args[count++] + \"\";\r\n });\r\n }\r\n }\r\n return localeText;\r\n }\r\n });\r\n})();!(function () {\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * CryptoJS core components.\r\n */\r\n BI.CRYPT_TYPE = BI.CRYPT_TYPE || {};\r\n BI.CRYPT_TYPE.AES = \"aes\";\r\n\r\n var CryptoJS = CryptoJS || (function (Math, undefined) {\r\n /**\r\n * CryptoJS namespace.\r\n */\r\n var C = {};\r\n\r\n /**\r\n * Library namespace.\r\n */\r\n var C_lib = C.lib = {};\r\n\r\n /**\r\n * Base object for prototypal inheritance.\r\n */\r\n var Base = C_lib.Base = (function () {\r\n function F () {\r\n }\r\n\r\n return {\r\n /**\r\n * Creates a new object that inherits from this object.\r\n *\r\n * @param {Object} overrides Properties to copy into the new object.\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * field: 'value',\r\n *\r\n * method: function () {\r\n * }\r\n * });\r\n */\r\n extend: function (overrides) {\r\n // Spawn\r\n F.prototype = this;\r\n var subtype = new F();\r\n\r\n // Augment\r\n if (overrides) {\r\n subtype.mixIn(overrides);\r\n }\r\n\r\n // Create default initializer\r\n if (!subtype.hasOwnProperty('init')) {\r\n subtype.init = function () {\r\n subtype.$super.init.apply(this, arguments);\r\n };\r\n }\r\n\r\n // Initializer's prototype is the subtype object\r\n subtype.init.prototype = subtype;\r\n\r\n // Reference supertype\r\n subtype.$super = this;\r\n\r\n return subtype;\r\n },\r\n\r\n /**\r\n * Extends this object and runs the init method.\r\n * Arguments to create() will be passed to init().\r\n *\r\n * @return {Object} The new object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var instance = MyType.create();\r\n */\r\n create: function () {\r\n var instance = this.extend();\r\n instance.init.apply(instance, arguments);\r\n\r\n return instance;\r\n },\r\n\r\n /**\r\n * Initializes a newly created object.\r\n * Override this method to add some logic when your objects are created.\r\n *\r\n * @example\r\n *\r\n * var MyType = CryptoJS.lib.Base.extend({\r\n * init: function () {\r\n * // ...\r\n * }\r\n * });\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n * Copies properties into this object.\r\n *\r\n * @param {Object} properties The properties to mix in.\r\n *\r\n * @example\r\n *\r\n * MyType.mixIn({\r\n * field: 'value'\r\n * });\r\n */\r\n mixIn: function (properties) {\r\n for (var propertyName in properties) {\r\n if (properties.hasOwnProperty(propertyName)) {\r\n this[propertyName] = properties[propertyName];\r\n }\r\n }\r\n\r\n // IE won't copy toString using the loop above\r\n if (properties.hasOwnProperty('toString')) {\r\n this.toString = properties.toString;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = instance.clone();\r\n */\r\n clone: function () {\r\n return this.init.prototype.extend(this);\r\n }\r\n };\r\n }());\r\n\r\n /**\r\n * An array of 32-bit words.\r\n *\r\n * @property {Array} words The array of 32-bit words.\r\n * @property {number} sigBytes The number of significant bytes in this word array.\r\n */\r\n var WordArray = C_lib.WordArray = Base.extend({\r\n /**\r\n * Initializes a newly created word array.\r\n *\r\n * @param {Array} words (Optional) An array of 32-bit words.\r\n * @param {number} sigBytes (Optional) The number of significant bytes in the words.\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.create();\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\r\n * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\r\n */\r\n init: function (words, sigBytes) {\r\n words = this.words = words || [];\r\n\r\n if (sigBytes != undefined) {\r\n this.sigBytes = sigBytes;\r\n } else {\r\n this.sigBytes = words.length * 4;\r\n }\r\n },\r\n\r\n /**\r\n * Converts this word array to a string.\r\n *\r\n * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\r\n *\r\n * @return {string} The stringified word array.\r\n *\r\n * @example\r\n *\r\n * var string = wordArray + '';\r\n * var string = wordArray.toString();\r\n * var string = wordArray.toString(CryptoJS.enc.Utf8);\r\n */\r\n toString: function (encoder) {\r\n return (encoder || Hex).stringify(this);\r\n },\r\n\r\n /**\r\n * Concatenates a word array to this word array.\r\n *\r\n * @param {WordArray} wordArray The word array to append.\r\n *\r\n * @return {WordArray} This word array.\r\n *\r\n * @example\r\n *\r\n * wordArray1.concat(wordArray2);\r\n */\r\n concat: function (wordArray) {\r\n // Shortcuts\r\n var thisWords = this.words;\r\n var thatWords = wordArray.words;\r\n var thisSigBytes = this.sigBytes;\r\n var thatSigBytes = wordArray.sigBytes;\r\n\r\n // Clamp excess bits\r\n this.clamp();\r\n\r\n // Concat\r\n if (thisSigBytes % 4) {\r\n // Copy one byte at a time\r\n for (var i = 0; i < thatSigBytes; i++) {\r\n var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\r\n }\r\n } else if (thatWords.length > 0xffff) {\r\n // Copy one word at a time\r\n for (var i = 0; i < thatSigBytes; i += 4) {\r\n thisWords[(thisSigBytes + i) >>> 2] = thatWords[i >>> 2];\r\n }\r\n } else {\r\n // Copy all words at once\r\n thisWords.push.apply(thisWords, thatWords);\r\n }\r\n this.sigBytes += thatSigBytes;\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes insignificant bits.\r\n *\r\n * @example\r\n *\r\n * wordArray.clamp();\r\n */\r\n clamp: function () {\r\n // Shortcuts\r\n var words = this.words;\r\n var sigBytes = this.sigBytes;\r\n\r\n // Clamp\r\n words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\r\n words.length = Math.ceil(sigBytes / 4);\r\n },\r\n\r\n /**\r\n * Creates a copy of this word array.\r\n *\r\n * @return {WordArray} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = wordArray.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone.words = this.words.slice(0);\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Creates a word array filled with random bytes.\r\n *\r\n * @param {number} nBytes The number of random bytes to generate.\r\n *\r\n * @return {WordArray} The random word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.lib.WordArray.random(16);\r\n */\r\n random: function (nBytes) {\r\n var words = [];\r\n for (var i = 0; i < nBytes; i += 4) {\r\n words.push((Math.random() * 0x100000000) | 0);\r\n }\r\n\r\n return new WordArray.init(words, nBytes);\r\n }\r\n });\r\n\r\n /**\r\n * Encoder namespace.\r\n */\r\n var C_enc = C.enc = {};\r\n\r\n /**\r\n * Hex encoding strategy.\r\n */\r\n var Hex = C_enc.Hex = {\r\n /**\r\n * Converts a word array to a hex string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The hex string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var hexChars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n hexChars.push((bite >>> 4).toString(16));\r\n hexChars.push((bite & 0x0f).toString(16));\r\n }\r\n\r\n return hexChars.join('');\r\n },\r\n\r\n /**\r\n * Converts a hex string to a word array.\r\n *\r\n * @param {string} hexStr The hex string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Hex.parse(hexString);\r\n */\r\n parse: function (hexStr) {\r\n // Shortcut\r\n var hexStrLength = hexStr.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < hexStrLength; i += 2) {\r\n words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\r\n }\r\n\r\n return new WordArray.init(words, hexStrLength / 2);\r\n }\r\n };\r\n\r\n /**\r\n * Latin1 encoding strategy.\r\n */\r\n var Latin1 = C_enc.Latin1 = {\r\n /**\r\n * Converts a word array to a Latin1 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Latin1 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n\r\n // Convert\r\n var latin1Chars = [];\r\n for (var i = 0; i < sigBytes; i++) {\r\n var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n latin1Chars.push(String.fromCharCode(bite));\r\n }\r\n\r\n return latin1Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Latin1 string to a word array.\r\n *\r\n * @param {string} latin1Str The Latin1 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\r\n */\r\n parse: function (latin1Str) {\r\n // Shortcut\r\n var latin1StrLength = latin1Str.length;\r\n\r\n // Convert\r\n var words = [];\r\n for (var i = 0; i < latin1StrLength; i++) {\r\n words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\r\n }\r\n\r\n return new WordArray.init(words, latin1StrLength);\r\n }\r\n };\r\n\r\n /**\r\n * UTF-8 encoding strategy.\r\n */\r\n var Utf8 = C_enc.Utf8 = {\r\n /**\r\n * Converts a word array to a UTF-8 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The UTF-8 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n try {\r\n return decodeURIComponent(escape(Latin1.stringify(wordArray)));\r\n } catch (e) {\r\n throw new Error('Malformed UTF-8 data');\r\n }\r\n },\r\n\r\n /**\r\n * Converts a UTF-8 string to a word array.\r\n *\r\n * @param {string} utf8Str The UTF-8 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\r\n */\r\n parse: function (utf8Str) {\r\n return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\r\n }\r\n };\r\n\r\n /**\r\n * Abstract buffered block algorithm template.\r\n *\r\n * The property blockSize must be implemented in a concrete subtype.\r\n *\r\n * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\r\n */\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\r\n /**\r\n * Resets this block algorithm's data buffer to its initial state.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm.reset();\r\n */\r\n reset: function () {\r\n // Initial values\r\n this._data = new WordArray.init();\r\n this._nDataBytes = 0;\r\n },\r\n\r\n /**\r\n * Adds new data to this block algorithm's buffer.\r\n *\r\n * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\r\n *\r\n * @example\r\n *\r\n * bufferedBlockAlgorithm._append('data');\r\n * bufferedBlockAlgorithm._append(wordArray);\r\n */\r\n _append: function (data) {\r\n // Convert string to WordArray, else assume WordArray already\r\n if (typeof data == 'string') {\r\n data = Utf8.parse(data);\r\n }\r\n\r\n // Append\r\n this._data.concat(data);\r\n this._nDataBytes += data.sigBytes;\r\n },\r\n\r\n /**\r\n * Processes available data blocks.\r\n *\r\n * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\r\n *\r\n * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\r\n *\r\n * @return {WordArray} The processed data.\r\n *\r\n * @example\r\n *\r\n * var processedData = bufferedBlockAlgorithm._process();\r\n * var processedData = bufferedBlockAlgorithm._process(!!'flush');\r\n */\r\n _process: function (doFlush) {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n var dataSigBytes = data.sigBytes;\r\n var blockSize = this.blockSize;\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count blocks ready\r\n var nBlocksReady = dataSigBytes / blockSizeBytes;\r\n if (doFlush) {\r\n // Round up to include partial blocks\r\n nBlocksReady = Math.ceil(nBlocksReady);\r\n } else {\r\n // Round down to include only full blocks,\r\n // less the number of blocks that must remain in the buffer\r\n nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\r\n }\r\n\r\n // Count words ready\r\n var nWordsReady = nBlocksReady * blockSize;\r\n\r\n // Count bytes ready\r\n var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\r\n\r\n // Process blocks\r\n if (nWordsReady) {\r\n for (var offset = 0; offset < nWordsReady; offset += blockSize) {\r\n // Perform concrete-algorithm logic\r\n this._doProcessBlock(dataWords, offset);\r\n }\r\n\r\n // Remove processed words\r\n var processedWords = dataWords.splice(0, nWordsReady);\r\n data.sigBytes -= nBytesReady;\r\n }\r\n\r\n // Return processed words\r\n return new WordArray.init(processedWords, nBytesReady);\r\n },\r\n\r\n /**\r\n * Creates a copy of this object.\r\n *\r\n * @return {Object} The clone.\r\n *\r\n * @example\r\n *\r\n * var clone = bufferedBlockAlgorithm.clone();\r\n */\r\n clone: function () {\r\n var clone = Base.clone.call(this);\r\n clone._data = this._data.clone();\r\n\r\n return clone;\r\n },\r\n\r\n _minBufferSize: 0\r\n });\r\n\r\n /**\r\n * Abstract hasher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\r\n */\r\n var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Initializes a newly created hasher.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\r\n *\r\n * @example\r\n *\r\n * var hasher = CryptoJS.algo.SHA256.create();\r\n */\r\n init: function (cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this hasher to its initial state.\r\n *\r\n * @example\r\n *\r\n * hasher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-hasher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Updates this hasher with a message.\r\n *\r\n * @param {WordArray|string} messageUpdate The message to append.\r\n *\r\n * @return {Hasher} This hasher.\r\n *\r\n * @example\r\n *\r\n * hasher.update('message');\r\n * hasher.update(wordArray);\r\n */\r\n update: function (messageUpdate) {\r\n // Append\r\n this._append(messageUpdate);\r\n\r\n // Update the hash\r\n this._process();\r\n\r\n // Chainable\r\n return this;\r\n },\r\n\r\n /**\r\n * Finalizes the hash computation.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} messageUpdate (Optional) A final message update.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @example\r\n *\r\n * var hash = hasher.finalize();\r\n * var hash = hasher.finalize('message');\r\n * var hash = hasher.finalize(wordArray);\r\n */\r\n finalize: function (messageUpdate) {\r\n // Final message update\r\n if (messageUpdate) {\r\n this._append(messageUpdate);\r\n }\r\n\r\n // Perform concrete-hasher logic\r\n var hash = this._doFinalize();\r\n\r\n return hash;\r\n },\r\n\r\n blockSize: 512 / 32,\r\n\r\n /**\r\n * Creates a shortcut function to a hasher's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to create a helper for.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHelper: function (hasher) {\r\n return function (message, cfg) {\r\n return new hasher.init(cfg).finalize(message);\r\n };\r\n },\r\n\r\n /**\r\n * Creates a shortcut function to the HMAC's object interface.\r\n *\r\n * @param {Hasher} hasher The hasher to use in this HMAC helper.\r\n *\r\n * @return {Function} The shortcut function.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\r\n */\r\n _createHmacHelper: function (hasher) {\r\n return function (message, key) {\r\n return new C_algo.HMAC.init(hasher, key).finalize(message);\r\n };\r\n }\r\n });\r\n\r\n /**\r\n * Algorithm namespace.\r\n */\r\n var C_algo = C.algo = {};\r\n\r\n return C;\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var C_enc = C.enc;\r\n\r\n /**\r\n * Base64 encoding strategy.\r\n */\r\n var Base64 = C_enc.Base64 = {\r\n /**\r\n * Converts a word array to a Base64 string.\r\n *\r\n * @param {WordArray} wordArray The word array.\r\n *\r\n * @return {string} The Base64 string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\r\n */\r\n stringify: function (wordArray) {\r\n // Shortcuts\r\n var words = wordArray.words;\r\n var sigBytes = wordArray.sigBytes;\r\n var map = this._map;\r\n\r\n // Clamp excess bits\r\n wordArray.clamp();\r\n\r\n // Convert\r\n var base64Chars = [];\r\n for (var i = 0; i < sigBytes; i += 3) {\r\n var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\r\n var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\r\n var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\r\n\r\n var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\r\n\r\n for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\r\n base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\r\n }\r\n }\r\n\r\n // Add padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n while (base64Chars.length % 4) {\r\n base64Chars.push(paddingChar);\r\n }\r\n }\r\n\r\n return base64Chars.join('');\r\n },\r\n\r\n /**\r\n * Converts a Base64 string to a word array.\r\n *\r\n * @param {string} base64Str The Base64 string.\r\n *\r\n * @return {WordArray} The word array.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var wordArray = CryptoJS.enc.Base64.parse(base64String);\r\n */\r\n parse: function (base64Str) {\r\n // Shortcuts\r\n var base64StrLength = base64Str.length;\r\n var map = this._map;\r\n\r\n // Ignore padding\r\n var paddingChar = map.charAt(64);\r\n if (paddingChar) {\r\n var paddingIndex = base64Str.indexOf(paddingChar);\r\n if (paddingIndex != -1) {\r\n base64StrLength = paddingIndex;\r\n }\r\n }\r\n\r\n // Convert\r\n var words = [];\r\n var nBytes = 0;\r\n for (var i = 0; i < base64StrLength; i++) {\r\n if (i % 4) {\r\n var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2);\r\n var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2);\r\n words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8);\r\n nBytes++;\r\n }\r\n }\r\n\r\n return WordArray.create(words, nBytes);\r\n },\r\n\r\n _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\r\n };\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function (Math) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var WordArray = C_lib.WordArray;\r\n var Hasher = C_lib.Hasher;\r\n var C_algo = C.algo;\r\n\r\n // Constants table\r\n var T = [];\r\n\r\n // Compute constants\r\n (function () {\r\n for (var i = 0; i < 64; i++) {\r\n T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\r\n }\r\n }());\r\n\r\n /**\r\n * MD5 hash algorithm.\r\n */\r\n var MD5 = C_algo.MD5 = Hasher.extend({\r\n _doReset: function () {\r\n this._hash = new WordArray.init([\r\n 0x67452301, 0xefcdab89,\r\n 0x98badcfe, 0x10325476\r\n ]);\r\n },\r\n\r\n _doProcessBlock: function (M, offset) {\r\n // Swap endian\r\n for (var i = 0; i < 16; i++) {\r\n // Shortcuts\r\n var offset_i = offset + i;\r\n var M_offset_i = M[offset_i];\r\n\r\n M[offset_i] = (\r\n (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\r\n (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\r\n );\r\n }\r\n\r\n // Shortcuts\r\n var H = this._hash.words;\r\n\r\n var M_offset_0 = M[offset + 0];\r\n var M_offset_1 = M[offset + 1];\r\n var M_offset_2 = M[offset + 2];\r\n var M_offset_3 = M[offset + 3];\r\n var M_offset_4 = M[offset + 4];\r\n var M_offset_5 = M[offset + 5];\r\n var M_offset_6 = M[offset + 6];\r\n var M_offset_7 = M[offset + 7];\r\n var M_offset_8 = M[offset + 8];\r\n var M_offset_9 = M[offset + 9];\r\n var M_offset_10 = M[offset + 10];\r\n var M_offset_11 = M[offset + 11];\r\n var M_offset_12 = M[offset + 12];\r\n var M_offset_13 = M[offset + 13];\r\n var M_offset_14 = M[offset + 14];\r\n var M_offset_15 = M[offset + 15];\r\n\r\n // Working varialbes\r\n var a = H[0];\r\n var b = H[1];\r\n var c = H[2];\r\n var d = H[3];\r\n\r\n // Computation\r\n a = FF(a, b, c, d, M_offset_0, 7, T[0]);\r\n d = FF(d, a, b, c, M_offset_1, 12, T[1]);\r\n c = FF(c, d, a, b, M_offset_2, 17, T[2]);\r\n b = FF(b, c, d, a, M_offset_3, 22, T[3]);\r\n a = FF(a, b, c, d, M_offset_4, 7, T[4]);\r\n d = FF(d, a, b, c, M_offset_5, 12, T[5]);\r\n c = FF(c, d, a, b, M_offset_6, 17, T[6]);\r\n b = FF(b, c, d, a, M_offset_7, 22, T[7]);\r\n a = FF(a, b, c, d, M_offset_8, 7, T[8]);\r\n d = FF(d, a, b, c, M_offset_9, 12, T[9]);\r\n c = FF(c, d, a, b, M_offset_10, 17, T[10]);\r\n b = FF(b, c, d, a, M_offset_11, 22, T[11]);\r\n a = FF(a, b, c, d, M_offset_12, 7, T[12]);\r\n d = FF(d, a, b, c, M_offset_13, 12, T[13]);\r\n c = FF(c, d, a, b, M_offset_14, 17, T[14]);\r\n b = FF(b, c, d, a, M_offset_15, 22, T[15]);\r\n\r\n a = GG(a, b, c, d, M_offset_1, 5, T[16]);\r\n d = GG(d, a, b, c, M_offset_6, 9, T[17]);\r\n c = GG(c, d, a, b, M_offset_11, 14, T[18]);\r\n b = GG(b, c, d, a, M_offset_0, 20, T[19]);\r\n a = GG(a, b, c, d, M_offset_5, 5, T[20]);\r\n d = GG(d, a, b, c, M_offset_10, 9, T[21]);\r\n c = GG(c, d, a, b, M_offset_15, 14, T[22]);\r\n b = GG(b, c, d, a, M_offset_4, 20, T[23]);\r\n a = GG(a, b, c, d, M_offset_9, 5, T[24]);\r\n d = GG(d, a, b, c, M_offset_14, 9, T[25]);\r\n c = GG(c, d, a, b, M_offset_3, 14, T[26]);\r\n b = GG(b, c, d, a, M_offset_8, 20, T[27]);\r\n a = GG(a, b, c, d, M_offset_13, 5, T[28]);\r\n d = GG(d, a, b, c, M_offset_2, 9, T[29]);\r\n c = GG(c, d, a, b, M_offset_7, 14, T[30]);\r\n b = GG(b, c, d, a, M_offset_12, 20, T[31]);\r\n\r\n a = HH(a, b, c, d, M_offset_5, 4, T[32]);\r\n d = HH(d, a, b, c, M_offset_8, 11, T[33]);\r\n c = HH(c, d, a, b, M_offset_11, 16, T[34]);\r\n b = HH(b, c, d, a, M_offset_14, 23, T[35]);\r\n a = HH(a, b, c, d, M_offset_1, 4, T[36]);\r\n d = HH(d, a, b, c, M_offset_4, 11, T[37]);\r\n c = HH(c, d, a, b, M_offset_7, 16, T[38]);\r\n b = HH(b, c, d, a, M_offset_10, 23, T[39]);\r\n a = HH(a, b, c, d, M_offset_13, 4, T[40]);\r\n d = HH(d, a, b, c, M_offset_0, 11, T[41]);\r\n c = HH(c, d, a, b, M_offset_3, 16, T[42]);\r\n b = HH(b, c, d, a, M_offset_6, 23, T[43]);\r\n a = HH(a, b, c, d, M_offset_9, 4, T[44]);\r\n d = HH(d, a, b, c, M_offset_12, 11, T[45]);\r\n c = HH(c, d, a, b, M_offset_15, 16, T[46]);\r\n b = HH(b, c, d, a, M_offset_2, 23, T[47]);\r\n\r\n a = II(a, b, c, d, M_offset_0, 6, T[48]);\r\n d = II(d, a, b, c, M_offset_7, 10, T[49]);\r\n c = II(c, d, a, b, M_offset_14, 15, T[50]);\r\n b = II(b, c, d, a, M_offset_5, 21, T[51]);\r\n a = II(a, b, c, d, M_offset_12, 6, T[52]);\r\n d = II(d, a, b, c, M_offset_3, 10, T[53]);\r\n c = II(c, d, a, b, M_offset_10, 15, T[54]);\r\n b = II(b, c, d, a, M_offset_1, 21, T[55]);\r\n a = II(a, b, c, d, M_offset_8, 6, T[56]);\r\n d = II(d, a, b, c, M_offset_15, 10, T[57]);\r\n c = II(c, d, a, b, M_offset_6, 15, T[58]);\r\n b = II(b, c, d, a, M_offset_13, 21, T[59]);\r\n a = II(a, b, c, d, M_offset_4, 6, T[60]);\r\n d = II(d, a, b, c, M_offset_11, 10, T[61]);\r\n c = II(c, d, a, b, M_offset_2, 15, T[62]);\r\n b = II(b, c, d, a, M_offset_9, 21, T[63]);\r\n\r\n // Intermediate hash value\r\n H[0] = (H[0] + a) | 0;\r\n H[1] = (H[1] + b) | 0;\r\n H[2] = (H[2] + c) | 0;\r\n H[3] = (H[3] + d) | 0;\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcuts\r\n var data = this._data;\r\n var dataWords = data.words;\r\n\r\n var nBitsTotal = this._nDataBytes * 8;\r\n var nBitsLeft = data.sigBytes * 8;\r\n\r\n // Add padding\r\n dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\r\n\r\n var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\r\n var nBitsTotalL = nBitsTotal;\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\r\n (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\r\n );\r\n dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\r\n (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\r\n (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\r\n );\r\n\r\n data.sigBytes = (dataWords.length + 1) * 4;\r\n\r\n // Hash final blocks\r\n this._process();\r\n\r\n // Shortcuts\r\n var hash = this._hash;\r\n var H = hash.words;\r\n\r\n // Swap endian\r\n for (var i = 0; i < 4; i++) {\r\n // Shortcut\r\n var H_i = H[i];\r\n\r\n H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\r\n (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\r\n }\r\n\r\n // Return final computed hash\r\n return hash;\r\n },\r\n\r\n clone: function () {\r\n var clone = Hasher.clone.call(this);\r\n clone._hash = this._hash.clone();\r\n\r\n return clone;\r\n }\r\n });\r\n\r\n function FF (a, b, c, d, x, s, t) {\r\n var n = a + ((b & c) | (~b & d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function GG (a, b, c, d, x, s, t) {\r\n var n = a + ((b & d) | (c & ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function HH (a, b, c, d, x, s, t) {\r\n var n = a + (b ^ c ^ d) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n function II (a, b, c, d, x, s, t) {\r\n var n = a + (c ^ (b | ~d)) + x + t;\r\n return ((n << s) | (n >>> (32 - s))) + b;\r\n }\r\n\r\n /**\r\n * Shortcut function to the hasher's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n *\r\n * @return {WordArray} The hash.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hash = CryptoJS.MD5('message');\r\n * var hash = CryptoJS.MD5(wordArray);\r\n */\r\n C.MD5 = Hasher._createHelper(MD5);\r\n\r\n /**\r\n * Shortcut function to the HMAC's object interface.\r\n *\r\n * @param {WordArray|string} message The message to hash.\r\n * @param {WordArray|string} key The secret key.\r\n *\r\n * @return {WordArray} The HMAC.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var hmac = CryptoJS.HmacMD5(message, key);\r\n */\r\n C.HmacMD5 = Hasher._createHmacHelper(MD5);\r\n }(Math));\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var C_algo = C.algo;\r\n var MD5 = C_algo.MD5;\r\n\r\n /**\r\n * This key derivation function is meant to conform with EVP_BytesToKey.\r\n * www.openssl.org/docs/crypto/EVP_BytesToKey.html\r\n */\r\n var EvpKDF = C_algo.EvpKDF = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\r\n * @property {Hasher} hasher The hash algorithm to use. Default: MD5\r\n * @property {number} iterations The number of iterations to perform. Default: 1\r\n */\r\n cfg: Base.extend({\r\n keySize: 128 / 32,\r\n hasher: MD5,\r\n iterations: 1\r\n }),\r\n\r\n /**\r\n * Initializes a newly created key derivation function.\r\n *\r\n * @param {Object} cfg (Optional) The configuration options to use for the derivation.\r\n *\r\n * @example\r\n *\r\n * var kdf = CryptoJS.algo.EvpKDF.create();\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\r\n * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\r\n */\r\n init: function (cfg) {\r\n this.cfg = this.cfg.extend(cfg);\r\n },\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @example\r\n *\r\n * var key = kdf.compute(password, salt);\r\n */\r\n compute: function (password, salt) {\r\n // Shortcut\r\n var cfg = this.cfg;\r\n\r\n // Init hasher\r\n var hasher = cfg.hasher.create();\r\n\r\n // Initial values\r\n var derivedKey = WordArray.create();\r\n\r\n // Shortcuts\r\n var derivedKeyWords = derivedKey.words;\r\n var keySize = cfg.keySize;\r\n var iterations = cfg.iterations;\r\n\r\n // Generate key\r\n while (derivedKeyWords.length < keySize) {\r\n if (block) {\r\n hasher.update(block);\r\n }\r\n var block = hasher.update(password).finalize(salt);\r\n hasher.reset();\r\n\r\n // Iterations\r\n for (var i = 1; i < iterations; i++) {\r\n block = hasher.finalize(block);\r\n hasher.reset();\r\n }\r\n\r\n derivedKey.concat(block);\r\n }\r\n derivedKey.sigBytes = keySize * 4;\r\n\r\n return derivedKey;\r\n }\r\n });\r\n\r\n /**\r\n * Derives a key from a password.\r\n *\r\n * @param {WordArray|string} password The password.\r\n * @param {WordArray|string} salt A salt.\r\n * @param {Object} cfg (Optional) The configuration options to use for this computation.\r\n *\r\n * @return {WordArray} The derived key.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var key = CryptoJS.EvpKDF(password, salt);\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\r\n * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\r\n */\r\n C.EvpKDF = function (password, salt, cfg) {\r\n return EvpKDF.create(cfg).compute(password, salt);\r\n };\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Cipher core components.\r\n */\r\n CryptoJS.lib.Cipher || (function (undefined) {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var Base = C_lib.Base;\r\n var WordArray = C_lib.WordArray;\r\n var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\r\n var C_enc = C.enc;\r\n var Utf8 = C_enc.Utf8;\r\n var Base64 = C_enc.Base64;\r\n var C_algo = C.algo;\r\n var EvpKDF = C_algo.EvpKDF;\r\n\r\n /**\r\n * Abstract base cipher template.\r\n *\r\n * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\r\n * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\r\n * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\r\n * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\r\n */\r\n var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {WordArray} iv The IV to use for this operation.\r\n */\r\n cfg: Base.extend(),\r\n\r\n /**\r\n * Creates this cipher in encryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createEncryptor: function (key, cfg) {\r\n return this.create(this._ENC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Creates this cipher in decryption mode.\r\n *\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {Cipher} A cipher instance.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\r\n */\r\n createDecryptor: function (key, cfg) {\r\n return this.create(this._DEC_XFORM_MODE, key, cfg);\r\n },\r\n\r\n /**\r\n * Initializes a newly created cipher.\r\n *\r\n * @param {number} xformMode Either the encryption or decryption transormation mode constant.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @example\r\n *\r\n * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\r\n */\r\n init: function (xformMode, key, cfg) {\r\n // Apply config defaults\r\n this.cfg = this.cfg.extend(cfg);\r\n\r\n // Store transform mode and key\r\n this._xformMode = xformMode;\r\n this._key = key;\r\n\r\n // Set initial values\r\n this.reset();\r\n },\r\n\r\n /**\r\n * Resets this cipher to its initial state.\r\n *\r\n * @example\r\n *\r\n * cipher.reset();\r\n */\r\n reset: function () {\r\n // Reset data buffer\r\n BufferedBlockAlgorithm.reset.call(this);\r\n\r\n // Perform concrete-cipher logic\r\n this._doReset();\r\n },\r\n\r\n /**\r\n * Adds data to be encrypted or decrypted.\r\n *\r\n * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.process('data');\r\n * var encrypted = cipher.process(wordArray);\r\n */\r\n process: function (dataUpdate) {\r\n // Append\r\n this._append(dataUpdate);\r\n\r\n // Process available blocks\r\n return this._process();\r\n },\r\n\r\n /**\r\n * Finalizes the encryption or decryption process.\r\n * Note that the finalize operation is effectively a destructive, read-once operation.\r\n *\r\n * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\r\n *\r\n * @return {WordArray} The data after final processing.\r\n *\r\n * @example\r\n *\r\n * var encrypted = cipher.finalize();\r\n * var encrypted = cipher.finalize('data');\r\n * var encrypted = cipher.finalize(wordArray);\r\n */\r\n finalize: function (dataUpdate) {\r\n // Final data update\r\n if (dataUpdate) {\r\n this._append(dataUpdate);\r\n }\r\n\r\n // Perform concrete-cipher logic\r\n var finalProcessedData = this._doFinalize();\r\n\r\n return finalProcessedData;\r\n },\r\n\r\n keySize: 128 / 32,\r\n\r\n ivSize: 128 / 32,\r\n\r\n _ENC_XFORM_MODE: 1,\r\n\r\n _DEC_XFORM_MODE: 2,\r\n\r\n /**\r\n * Creates shortcut functions to a cipher's object interface.\r\n *\r\n * @param {Cipher} cipher The cipher to create a helper for.\r\n *\r\n * @return {Object} An object with encrypt and decrypt shortcut functions.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\r\n */\r\n _createHelper: (function () {\r\n function selectCipherStrategy (key) {\r\n if (typeof key == 'string') {\r\n return PasswordBasedCipher;\r\n } else {\r\n return SerializableCipher;\r\n }\r\n }\r\n\r\n return function (cipher) {\r\n return {\r\n encrypt: function (message, key, cfg) {\r\n return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\r\n },\r\n\r\n decrypt: function (ciphertext, key, cfg) {\r\n return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\r\n }\r\n };\r\n };\r\n }())\r\n });\r\n\r\n /**\r\n * Abstract base stream cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\r\n */\r\n var StreamCipher = C_lib.StreamCipher = Cipher.extend({\r\n _doFinalize: function () {\r\n // Process partial blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 1\r\n });\r\n\r\n /**\r\n * Mode namespace.\r\n */\r\n var C_mode = C.mode = {};\r\n\r\n /**\r\n * Abstract base block cipher mode template.\r\n */\r\n var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\r\n /**\r\n * Creates this mode for encryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\r\n */\r\n createEncryptor: function (cipher, iv) {\r\n return this.Encryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Creates this mode for decryption.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\r\n */\r\n createDecryptor: function (cipher, iv) {\r\n return this.Decryptor.create(cipher, iv);\r\n },\r\n\r\n /**\r\n * Initializes a newly created mode.\r\n *\r\n * @param {Cipher} cipher A block cipher instance.\r\n * @param {Array} iv The IV words.\r\n *\r\n * @example\r\n *\r\n * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\r\n */\r\n init: function (cipher, iv) {\r\n this._cipher = cipher;\r\n this._iv = iv;\r\n }\r\n });\r\n\r\n /**\r\n * Cipher Block Chaining mode.\r\n */\r\n var CBC = C_mode.CBC = (function () {\r\n /**\r\n * Abstract base CBC mode.\r\n */\r\n var CBC = BlockCipherMode.extend();\r\n\r\n /**\r\n * CBC encryptor.\r\n */\r\n CBC.Encryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // XOR and encrypt\r\n xorBlock.call(this, words, offset, blockSize);\r\n cipher.encryptBlock(words, offset);\r\n\r\n // Remember this block to use with next block\r\n this._prevBlock = words.slice(offset, offset + blockSize);\r\n }\r\n });\r\n\r\n /**\r\n * CBC decryptor.\r\n */\r\n CBC.Decryptor = CBC.extend({\r\n /**\r\n * Processes the data block at offset.\r\n *\r\n * @param {Array} words The data words to operate on.\r\n * @param {number} offset The offset where the block starts.\r\n *\r\n * @example\r\n *\r\n * mode.processBlock(data.words, offset);\r\n */\r\n processBlock: function (words, offset) {\r\n // Shortcuts\r\n var cipher = this._cipher;\r\n var blockSize = cipher.blockSize;\r\n\r\n // Remember this block to use with next block\r\n var thisBlock = words.slice(offset, offset + blockSize);\r\n\r\n // Decrypt and XOR\r\n cipher.decryptBlock(words, offset);\r\n xorBlock.call(this, words, offset, blockSize);\r\n\r\n // This block becomes the previous block\r\n this._prevBlock = thisBlock;\r\n }\r\n });\r\n\r\n function xorBlock (words, offset, blockSize) {\r\n // Shortcut\r\n var iv = this._iv;\r\n\r\n // Choose mixing block\r\n if (iv) {\r\n var block = iv;\r\n\r\n // Remove IV for subsequent blocks\r\n this._iv = undefined;\r\n } else {\r\n var block = this._prevBlock;\r\n }\r\n\r\n // XOR blocks\r\n for (var i = 0; i < blockSize; i++) {\r\n words[offset + i] ^= block[i];\r\n }\r\n }\r\n\r\n return CBC;\r\n }());\r\n\r\n /**\r\n * Padding namespace.\r\n */\r\n var C_pad = C.pad = {};\r\n\r\n /**\r\n * PKCS #5/7 padding strategy.\r\n */\r\n var Pkcs7 = C_pad.Pkcs7 = {\r\n /**\r\n * Pads data using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to pad.\r\n * @param {number} blockSize The multiple that the data should be padded to.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\r\n */\r\n pad: function (data, blockSize) {\r\n // Shortcut\r\n var blockSizeBytes = blockSize * 4;\r\n\r\n // Count padding bytes\r\n var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\r\n\r\n // Create padding word\r\n var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\r\n\r\n // Create padding\r\n var paddingWords = [];\r\n for (var i = 0; i < nPaddingBytes; i += 4) {\r\n paddingWords.push(paddingWord);\r\n }\r\n var padding = WordArray.create(paddingWords, nPaddingBytes);\r\n\r\n // Add padding\r\n data.concat(padding);\r\n },\r\n\r\n /**\r\n * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\r\n *\r\n * @param {WordArray} data The data to unpad.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * CryptoJS.pad.Pkcs7.unpad(wordArray);\r\n */\r\n unpad: function (data) {\r\n // Get number of padding bytes from last byte\r\n var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\r\n\r\n // Remove padding\r\n data.sigBytes -= nPaddingBytes;\r\n }\r\n };\r\n\r\n /**\r\n * Abstract base block cipher template.\r\n *\r\n * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\r\n */\r\n var BlockCipher = C_lib.BlockCipher = Cipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Mode} mode The block mode to use. Default: CBC\r\n * @property {Padding} padding The padding strategy to use. Default: Pkcs7\r\n */\r\n cfg: Cipher.cfg.extend({\r\n mode: CBC,\r\n padding: Pkcs7\r\n }),\r\n\r\n reset: function () {\r\n // Reset cipher\r\n Cipher.reset.call(this);\r\n\r\n // Shortcuts\r\n var cfg = this.cfg;\r\n var iv = cfg.iv;\r\n var mode = cfg.mode;\r\n\r\n // Reset block mode\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n var modeCreator = mode.createEncryptor;\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n var modeCreator = mode.createDecryptor;\r\n\r\n // Keep at least one block in the buffer for unpadding\r\n this._minBufferSize = 1;\r\n }\r\n this._mode = modeCreator.call(mode, this, iv && iv.words);\r\n },\r\n\r\n _doProcessBlock: function (words, offset) {\r\n this._mode.processBlock(words, offset);\r\n },\r\n\r\n _doFinalize: function () {\r\n // Shortcut\r\n var padding = this.cfg.padding;\r\n\r\n // Finalize\r\n if (this._xformMode == this._ENC_XFORM_MODE) {\r\n // Pad data\r\n padding.pad(this._data, this.blockSize);\r\n\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\r\n // Process final blocks\r\n var finalProcessedBlocks = this._process(!!'flush');\r\n\r\n // Unpad data\r\n padding.unpad(finalProcessedBlocks);\r\n }\r\n\r\n return finalProcessedBlocks;\r\n },\r\n\r\n blockSize: 128 / 32\r\n });\r\n\r\n /**\r\n * A collection of cipher parameters.\r\n *\r\n * @property {WordArray} ciphertext The raw ciphertext.\r\n * @property {WordArray} key The key to this ciphertext.\r\n * @property {WordArray} iv The IV used in the ciphering operation.\r\n * @property {WordArray} salt The salt used with a key derivation function.\r\n * @property {Cipher} algorithm The cipher algorithm.\r\n * @property {Mode} mode The block mode used in the ciphering operation.\r\n * @property {Padding} padding The padding scheme used in the ciphering operation.\r\n * @property {number} blockSize The block size of the cipher.\r\n * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\r\n */\r\n var CipherParams = C_lib.CipherParams = Base.extend({\r\n /**\r\n * Initializes a newly created cipher params object.\r\n *\r\n * @param {Object} cipherParams An object with any of the possible cipher parameters.\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.lib.CipherParams.create({\r\n * ciphertext: ciphertextWordArray,\r\n * key: keyWordArray,\r\n * iv: ivWordArray,\r\n * salt: saltWordArray,\r\n * algorithm: CryptoJS.algo.AES,\r\n * mode: CryptoJS.mode.CBC,\r\n * padding: CryptoJS.pad.PKCS7,\r\n * blockSize: 4,\r\n * formatter: CryptoJS.format.OpenSSL\r\n * });\r\n */\r\n init: function (cipherParams) {\r\n this.mixIn(cipherParams);\r\n },\r\n\r\n /**\r\n * Converts this cipher params object to a string.\r\n *\r\n * @param {Format} formatter (Optional) The formatting strategy to use.\r\n *\r\n * @return {string} The stringified cipher params.\r\n *\r\n * @throws Error If neither the formatter nor the default formatter is set.\r\n *\r\n * @example\r\n *\r\n * var string = cipherParams + '';\r\n * var string = cipherParams.toString();\r\n * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\r\n */\r\n toString: function (formatter) {\r\n return (formatter || this.formatter).stringify(this);\r\n }\r\n });\r\n\r\n /**\r\n * Format namespace.\r\n */\r\n var C_format = C.format = {};\r\n\r\n /**\r\n * OpenSSL formatting strategy.\r\n */\r\n var OpenSSLFormatter = C_format.OpenSSL = {\r\n /**\r\n * Converts a cipher params object to an OpenSSL-compatible string.\r\n *\r\n * @param {CipherParams} cipherParams The cipher params object.\r\n *\r\n * @return {string} The OpenSSL-compatible string.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\r\n */\r\n stringify: function (cipherParams) {\r\n // Shortcuts\r\n var ciphertext = cipherParams.ciphertext;\r\n var salt = cipherParams.salt;\r\n\r\n // Format\r\n if (salt) {\r\n var wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\r\n } else {\r\n var wordArray = ciphertext;\r\n }\r\n\r\n return wordArray.toString(Base64);\r\n },\r\n\r\n /**\r\n * Converts an OpenSSL-compatible string to a cipher params object.\r\n *\r\n * @param {string} openSSLStr The OpenSSL-compatible string.\r\n *\r\n * @return {CipherParams} The cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\r\n */\r\n parse: function (openSSLStr) {\r\n // Parse base64\r\n var ciphertext = Base64.parse(openSSLStr);\r\n\r\n // Shortcut\r\n var ciphertextWords = ciphertext.words;\r\n\r\n // Test for salt\r\n if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\r\n // Extract salt\r\n var salt = WordArray.create(ciphertextWords.slice(2, 4));\r\n\r\n // Remove salt from ciphertext\r\n ciphertextWords.splice(0, 4);\r\n ciphertext.sigBytes -= 16;\r\n }\r\n\r\n return CipherParams.create({ciphertext: ciphertext, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A cipher wrapper that returns ciphertext as a serializable cipher params object.\r\n */\r\n var SerializableCipher = C_lib.SerializableCipher = Base.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\r\n */\r\n cfg: Base.extend({\r\n format: OpenSSLFormatter\r\n }),\r\n\r\n /**\r\n * Encrypts a message.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Encrypt\r\n var encryptor = cipher.createEncryptor(key, cfg);\r\n var ciphertext = encryptor.finalize(message);\r\n\r\n // Shortcut\r\n var cipherCfg = encryptor.cfg;\r\n\r\n // Create and return serializable cipher params\r\n return CipherParams.create({\r\n ciphertext: ciphertext,\r\n key: key,\r\n iv: cipherCfg.iv,\r\n algorithm: cipher,\r\n mode: cipherCfg.mode,\r\n padding: cipherCfg.padding,\r\n blockSize: cipher.blockSize,\r\n formatter: cfg.format\r\n });\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {WordArray} key The key.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, key, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Decrypt\r\n var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\r\n\r\n return plaintext;\r\n },\r\n\r\n /**\r\n * Converts serialized ciphertext to CipherParams,\r\n * else assumed CipherParams already and returns ciphertext unchanged.\r\n *\r\n * @param {CipherParams|string} ciphertext The ciphertext.\r\n * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\r\n *\r\n * @return {CipherParams} The unserialized ciphertext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\r\n */\r\n _parse: function (ciphertext, format) {\r\n if (typeof ciphertext == 'string') {\r\n return format.parse(ciphertext, this);\r\n } else {\r\n return ciphertext;\r\n }\r\n }\r\n });\r\n\r\n /**\r\n * Key derivation function namespace.\r\n */\r\n var C_kdf = C.kdf = {};\r\n\r\n /**\r\n * OpenSSL key derivation function.\r\n */\r\n var OpenSSLKdf = C_kdf.OpenSSL = {\r\n /**\r\n * Derives a key and IV from a password.\r\n *\r\n * @param {string} password The password to derive from.\r\n * @param {number} keySize The size in words of the key to generate.\r\n * @param {number} ivSize The size in words of the IV to generate.\r\n * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\r\n *\r\n * @return {CipherParams} A cipher params object with the key, IV, and salt.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\r\n * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\r\n */\r\n execute: function (password, keySize, ivSize, salt) {\r\n // Generate random salt\r\n if (!salt) {\r\n salt = WordArray.random(64 / 8);\r\n }\r\n\r\n // Derive key and IV\r\n var key = EvpKDF.create({keySize: keySize + ivSize}).compute(password, salt);\r\n\r\n // Separate key and IV\r\n var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\r\n key.sigBytes = keySize * 4;\r\n\r\n // Return params\r\n return CipherParams.create({key: key, iv: iv, salt: salt});\r\n }\r\n };\r\n\r\n /**\r\n * A serializable cipher wrapper that derives the key from a password,\r\n * and returns ciphertext as a serializable cipher params object.\r\n */\r\n var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\r\n /**\r\n * Configuration options.\r\n *\r\n * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\r\n */\r\n cfg: SerializableCipher.cfg.extend({\r\n kdf: OpenSSLKdf\r\n }),\r\n\r\n /**\r\n * Encrypts a message using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {WordArray|string} message The message to encrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {CipherParams} A cipher params object.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\r\n * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n encrypt: function (cipher, message, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Encrypt\r\n var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\r\n\r\n // Mix in derived params\r\n ciphertext.mixIn(derivedParams);\r\n\r\n return ciphertext;\r\n },\r\n\r\n /**\r\n * Decrypts serialized ciphertext using a password.\r\n *\r\n * @param {Cipher} cipher The cipher algorithm to use.\r\n * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\r\n * @param {string} password The password.\r\n * @param {Object} cfg (Optional) The configuration options to use for this operation.\r\n *\r\n * @return {WordArray} The plaintext.\r\n *\r\n * @static\r\n *\r\n * @example\r\n *\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\r\n * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\r\n */\r\n decrypt: function (cipher, ciphertext, password, cfg) {\r\n // Apply config defaults\r\n cfg = this.cfg.extend(cfg);\r\n\r\n // Convert string to CipherParams\r\n ciphertext = this._parse(ciphertext, cfg.format);\r\n\r\n // Derive key and other params\r\n var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt);\r\n\r\n // Add IV to config\r\n cfg.iv = derivedParams.iv;\r\n\r\n // Decrypt\r\n var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\r\n\r\n return plaintext;\r\n }\r\n });\r\n }());\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n /**\r\n * Electronic Codebook block mode.\r\n */\r\n CryptoJS.mode.ECB = (function () {\r\n var ECB = CryptoJS.lib.BlockCipherMode.extend();\r\n\r\n ECB.Encryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.encryptBlock(words, offset);\r\n }\r\n });\r\n\r\n ECB.Decryptor = ECB.extend({\r\n processBlock: function (words, offset) {\r\n this._cipher.decryptBlock(words, offset);\r\n }\r\n });\r\n\r\n return ECB;\r\n }());\r\n\r\n\r\n /*\r\n CryptoJS v3.1.2\r\n code.google.com/p/crypto-js\r\n (c) 2009-2013 by Jeff Mott. All rights reserved.\r\n code.google.com/p/crypto-js/wiki/License\r\n */\r\n (function () {\r\n // Shortcuts\r\n var C = CryptoJS;\r\n var C_lib = C.lib;\r\n var BlockCipher = C_lib.BlockCipher;\r\n var C_algo = C.algo;\r\n\r\n // Lookup tables\r\n var SBOX = [];\r\n var INV_SBOX = [];\r\n var SUB_MIX_0 = [];\r\n var SUB_MIX_1 = [];\r\n var SUB_MIX_2 = [];\r\n var SUB_MIX_3 = [];\r\n var INV_SUB_MIX_0 = [];\r\n var INV_SUB_MIX_1 = [];\r\n var INV_SUB_MIX_2 = [];\r\n var INV_SUB_MIX_3 = [];\r\n\r\n // Compute lookup tables\r\n (function () {\r\n // Compute double table\r\n var d = [];\r\n for (var i = 0; i < 256; i++) {\r\n if (i < 128) {\r\n d[i] = i << 1;\r\n } else {\r\n d[i] = (i << 1) ^ 0x11b;\r\n }\r\n }\r\n\r\n // Walk GF(2^8)\r\n var x = 0;\r\n var xi = 0;\r\n for (var i = 0; i < 256; i++) {\r\n // Compute sbox\r\n var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\r\n sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\r\n SBOX[x] = sx;\r\n INV_SBOX[sx] = x;\r\n\r\n // Compute multiplication\r\n var x2 = d[x];\r\n var x4 = d[x2];\r\n var x8 = d[x4];\r\n\r\n // Compute sub bytes, mix columns tables\r\n var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\r\n SUB_MIX_0[x] = (t << 24) | (t >>> 8);\r\n SUB_MIX_1[x] = (t << 16) | (t >>> 16);\r\n SUB_MIX_2[x] = (t << 8) | (t >>> 24);\r\n SUB_MIX_3[x] = t;\r\n\r\n // Compute inv sub bytes, inv mix columns tables\r\n var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\r\n INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\r\n INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\r\n INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\r\n INV_SUB_MIX_3[sx] = t;\r\n\r\n // Compute next counter\r\n if (!x) {\r\n x = xi = 1;\r\n } else {\r\n x = x2 ^ d[d[d[x8 ^ x2]]];\r\n xi ^= d[d[xi]];\r\n }\r\n }\r\n }());\r\n\r\n // Precomputed Rcon lookup\r\n var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\r\n\r\n /**\r\n * AES block cipher algorithm.\r\n */\r\n var AES = C_algo.AES = BlockCipher.extend({\r\n _doReset: function () {\r\n // Shortcuts\r\n var key = this._key;\r\n var keyWords = key.words;\r\n var keySize = key.sigBytes / 4;\r\n\r\n // Compute number of rounds\r\n var nRounds = this._nRounds = keySize + 6;\r\n\r\n // Compute number of key schedule rows\r\n var ksRows = (nRounds + 1) * 4;\r\n\r\n // Compute key schedule\r\n var keySchedule = this._keySchedule = [];\r\n for (var ksRow = 0; ksRow < ksRows; ksRow++) {\r\n if (ksRow < keySize) {\r\n keySchedule[ksRow] = keyWords[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 1];\r\n\r\n if (!(ksRow % keySize)) {\r\n // Rot word\r\n t = (t << 8) | (t >>> 24);\r\n\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n\r\n // Mix Rcon\r\n t ^= RCON[(ksRow / keySize) | 0] << 24;\r\n } else if (keySize > 6 && ksRow % keySize == 4) {\r\n // Sub word\r\n t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\r\n }\r\n\r\n keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\r\n }\r\n }\r\n\r\n // Compute inv key schedule\r\n var invKeySchedule = this._invKeySchedule = [];\r\n for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\r\n var ksRow = ksRows - invKsRow;\r\n\r\n if (invKsRow % 4) {\r\n var t = keySchedule[ksRow];\r\n } else {\r\n var t = keySchedule[ksRow - 4];\r\n }\r\n\r\n if (invKsRow < 4 || ksRow <= 4) {\r\n invKeySchedule[invKsRow] = t;\r\n } else {\r\n invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\r\n INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\r\n }\r\n }\r\n },\r\n\r\n encryptBlock: function (M, offset) {\r\n this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\r\n },\r\n\r\n decryptBlock: function (M, offset) {\r\n // Swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n\r\n this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\r\n\r\n // Inv swap 2nd and 4th rows\r\n var t = M[offset + 1];\r\n M[offset + 1] = M[offset + 3];\r\n M[offset + 3] = t;\r\n },\r\n\r\n _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\r\n // Shortcut\r\n var nRounds = this._nRounds;\r\n\r\n // Get input, add round key\r\n var s0 = M[offset] ^ keySchedule[0];\r\n var s1 = M[offset + 1] ^ keySchedule[1];\r\n var s2 = M[offset + 2] ^ keySchedule[2];\r\n var s3 = M[offset + 3] ^ keySchedule[3];\r\n\r\n // Key schedule row counter\r\n var ksRow = 4;\r\n\r\n // Rounds\r\n for (var round = 1; round < nRounds; round++) {\r\n // Shift rows, sub bytes, mix columns, add round key\r\n var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\r\n var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\r\n var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\r\n var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\r\n\r\n // Update state\r\n s0 = t0;\r\n s1 = t1;\r\n s2 = t2;\r\n s3 = t3;\r\n }\r\n\r\n // Shift rows, sub bytes, add round key\r\n var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\r\n var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\r\n var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\r\n var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\r\n\r\n // Set output\r\n M[offset] = t0;\r\n M[offset + 1] = t1;\r\n M[offset + 2] = t2;\r\n M[offset + 3] = t3;\r\n },\r\n\r\n keySize: 256 / 32\r\n });\r\n\r\n /**\r\n * Shortcut functions to the cipher's object interface.\r\n *\r\n * @example\r\n *\r\n * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\r\n * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\r\n */\r\n C.AES = BlockCipher._createHelper(AES);\r\n }());\r\n\r\n\r\n _.extend(BI, {\r\n /**\r\n * aes加密方法\r\n * aes-128-ecb\r\n *\r\n * @example\r\n *\r\n * var ciphertext = BI.aesEncrypt(text, key);\r\n */\r\n aesEncrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var cipher = CryptoJS.AES.encrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n var base64Cipher = cipher.ciphertext.toString(CryptoJS.enc.Base64);\r\n return base64Cipher;\r\n },\r\n\r\n /**\r\n * aes解密方法\r\n * @param {String} text \r\n * @param {String} key \r\n */\r\n aesDecrypt: function (text, key) {\r\n key = CryptoJS.enc.Utf8.parse(key);\r\n var decipher = CryptoJS.AES.decrypt(text, key, {\r\n mode: CryptoJS.mode.ECB,\r\n padding: CryptoJS.pad.Pkcs7\r\n });\r\n\r\n return CryptoJS.enc.Utf8.stringify(decipher);\r\n }\r\n });\r\n}());!(function () {\r\n function aspect (type) {\r\n return function (target, methodName, advice) {\r\n var exist = target[methodName],\r\n dispatcher;\r\n\r\n if (!exist || exist.target != target) {\r\n dispatcher = target[methodName] = function () {\r\n // before methods\r\n var beforeArr = dispatcher.before;\r\n var args = arguments, next;\r\n for (var l = beforeArr.length; l--;) {\r\n next = beforeArr[l].advice.apply(this, args);\r\n if (next === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n // target method\r\n var rs = dispatcher.method.apply(this, args);\r\n // after methods\r\n var afterArr = dispatcher.after;\r\n for (var i = 0, ii = afterArr.length; i < ii; i++) {\r\n next = afterArr[i].advice.call(this, rs, args);\r\n if (rs === false) {\r\n return false;\r\n }\r\n args = next || args;\r\n }\r\n return rs;\r\n };\r\n\r\n dispatcher.before = [];\r\n dispatcher.after = [];\r\n\r\n if (exist) {\r\n dispatcher.method = exist;\r\n }\r\n dispatcher.target = target;\r\n }\r\n\r\n var aspectArr = (dispatcher || exist)[type];\r\n var obj = {\r\n advice: advice,\r\n _index: aspectArr.length,\r\n remove: function () {\r\n aspectArr.splice(this._index, 1);\r\n }\r\n };\r\n aspectArr.push(obj);\r\n\r\n return obj;\r\n };\r\n }\r\n\r\n BI.aspect = {\r\n before: aspect(\"before\"),\r\n after: aspect(\"after\")\r\n };\r\n\r\n return BI.aspect;\r\n\r\n})();\r\n!(function () {\r\n\r\n var _keyStr = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\r\n\r\n\r\n // private method for UTF-8 encoding\r\n var _utf8_encode = function (string) {\r\n string = string.replace(/\\r\\n/g, \"\\n\");\r\n var utftext = \"\";\r\n\r\n for (var n = 0; n < string.length; n++) {\r\n\r\n var c = string.charCodeAt(n);\r\n\r\n if (c < 128) {\r\n utftext += String.fromCharCode(c);\r\n } else if ((c > 127) && (c < 2048)) {\r\n utftext += String.fromCharCode((c >> 6) | 192);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n } else {\r\n utftext += String.fromCharCode((c >> 12) | 224);\r\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\r\n utftext += String.fromCharCode((c & 63) | 128);\r\n }\r\n\r\n }\r\n\r\n return utftext;\r\n };\r\n\r\n // private method for UTF-8 decoding\r\n var _utf8_decode = function (utftext) {\r\n var string = \"\";\r\n var i = 0;\r\n var c = 0, c3 = 0, c2 = 0;\r\n\r\n while (i < utftext.length) {\r\n\r\n c = utftext.charCodeAt(i);\r\n\r\n if (c < 128) {\r\n string += String.fromCharCode(c);\r\n i++;\r\n } else if ((c > 191) && (c < 224)) {\r\n c2 = utftext.charCodeAt(i + 1);\r\n string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));\r\n i += 2;\r\n } else {\r\n c2 = utftext.charCodeAt(i + 1);\r\n c3 = utftext.charCodeAt(i + 2);\r\n string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n i += 3;\r\n }\r\n\r\n }\r\n return string;\r\n };\r\n\r\n _.extend(BI, {\r\n\r\n encode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3, enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = _utf8_encode(input);\r\n\r\n while (i < input.length) {\r\n\r\n chr1 = input.charCodeAt(i++);\r\n chr2 = input.charCodeAt(i++);\r\n chr3 = input.charCodeAt(i++);\r\n\r\n enc1 = chr1 >> 2;\r\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\r\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\r\n enc4 = chr3 & 63;\r\n\r\n if (isNaN(chr2)) {\r\n enc3 = enc4 = 64;\r\n } else if (isNaN(chr3)) {\r\n enc4 = 64;\r\n }\r\n\r\n output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);\r\n\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // public method for decoding\r\n decode: function (input) {\r\n var output = \"\";\r\n var chr1, chr2, chr3;\r\n var enc1, enc2, enc3, enc4;\r\n var i = 0;\r\n\r\n input = input.replace(/[^A-Za-z0-9\\+\\/\\=]/g, \"\");\r\n\r\n while (i < input.length) {\r\n\r\n enc1 = _keyStr.indexOf(input.charAt(i++));\r\n enc2 = _keyStr.indexOf(input.charAt(i++));\r\n enc3 = _keyStr.indexOf(input.charAt(i++));\r\n enc4 = _keyStr.indexOf(input.charAt(i++));\r\n\r\n chr1 = (enc1 << 2) | (enc2 >> 4);\r\n chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);\r\n chr3 = ((enc3 & 3) << 6) | enc4;\r\n\r\n output = output + String.fromCharCode(chr1);\r\n\r\n if (enc3 != 64) {\r\n output = output + String.fromCharCode(chr2);\r\n }\r\n if (enc4 != 64) {\r\n output = output + String.fromCharCode(chr3);\r\n }\r\n\r\n }\r\n\r\n output = _utf8_decode(output);\r\n\r\n return output;\r\n\r\n }\r\n });\r\n})();\r\nBI.Cache = {\r\n _prefix: \"bi\",\r\n setUsername: function (username) {\r\n localStorage.setItem(BI.Cache._prefix + \".username\", (username + \"\" || \"\").toUpperCase());\r\n },\r\n getUsername: function () {\r\n return localStorage.getItem(BI.Cache._prefix + \".username\") || \"\";\r\n },\r\n _getKeyPrefix: function () {\r\n return BI.Cache.getUsername() + \".\" + BI.Cache._prefix + \".\";\r\n },\r\n _generateKey: function (key) {\r\n return BI.Cache._getKeyPrefix() + (key || \"\");\r\n },\r\n getItem: function (key) {\r\n return localStorage.getItem(BI.Cache._generateKey(key));\r\n },\r\n setItem: function (key, value) {\r\n localStorage.setItem(BI.Cache._generateKey(key), value);\r\n },\r\n removeItem: function (key) {\r\n localStorage.removeItem(BI.Cache._generateKey(key));\r\n },\r\n clear: function () {\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n if (key.indexOf(BI.Cache._getKeyPrefix()) === 0) {\r\n localStorage.removeItem(key);\r\n }\r\n }\r\n }\r\n },\r\n keys: function () {\r\n var result = [];\r\n for (var i = localStorage.length; i >= 0; i--) {\r\n var key = localStorage.key(i);\r\n if (key) {\r\n var prefix = BI.Cache._getKeyPrefix();\r\n if (key.indexOf(prefix) === 0) {\r\n result[result.length] = key.substring(prefix.length);\r\n }\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n addCookie: function (name, value, path, expiresHours) {\r\n var cookieString = name + \"=\" + escape(value);\r\n // 判断是否设置过期时间\r\n if (expiresHours && expiresHours > 0) {\r\n var date = new Date();\r\n // expires是标准GMT格式时间,应该使用时间戳作为起始时间\r\n date.setTime(date.getTime() + expiresHours * 3600 * 1000);\r\n cookieString = cookieString + \"; expires=\" + date.toUTCString();\r\n }\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n },\r\n getCookie: function (name) {\r\n var arr, reg = new RegExp(\"(^| )\" + name + \"=([^;]*)(;|$)\");\r\n if (arr = document.cookie.match(reg)) {return unescape(arr[2]);}\r\n return null;\r\n },\r\n deleteCookie: function (name, path) {\r\n var date = new Date();\r\n date.setTime(date.getTime() - 10000);\r\n var cookieString = name + \"=v; expires=\" + date.toUTCString();\r\n if (path) {\r\n cookieString = cookieString + \"; path=\" + path;\r\n }\r\n document.cookie = cookieString;\r\n }\r\n};BI.CellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize) {\r\n this._cellSizeGetter = cellSizeGetter;\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n this._cellSizeAndPositionData = {};\r\n this._lastMeasuredIndex = -1;\r\n};\r\n\r\nBI.CellSizeAndPositionManager.prototype = {\r\n constructor: BI.CellSizeAndPositionManager,\r\n configure: function (cellCount, estimatedCellSize) {\r\n this._cellCount = cellCount;\r\n this._estimatedCellSize = estimatedCellSize;\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellCount;\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._estimatedCellSize;\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._lastMeasuredIndex;\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n if (index < 0 || index >= this._cellCount) {\r\n return;\r\n }\r\n if (index > this._lastMeasuredIndex) {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var offset = lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size;\r\n\r\n for (var i = this._lastMeasuredIndex + 1; i <= index; i++) {\r\n var size = this._cellSizeGetter(i);\r\n\r\n if (size == null || isNaN(size)) {\r\n continue;\r\n }\r\n\r\n this._cellSizeAndPositionData[i] = {\r\n offset: offset,\r\n size: size\r\n };\r\n\r\n offset += size;\r\n }\r\n\r\n this._lastMeasuredIndex = index;\r\n }\r\n return this._cellSizeAndPositionData[index];\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._lastMeasuredIndex >= 0\r\n ? this._cellSizeAndPositionData[this._lastMeasuredIndex]\r\n : {\r\n offset: 0,\r\n size: 0\r\n };\r\n },\r\n\r\n getTotalSize: function () {\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n return lastMeasuredCellSizeAndPosition.offset + lastMeasuredCellSizeAndPosition.size + (this._cellCount - this._lastMeasuredIndex - 1) * this._estimatedCellSize;\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n var datum = this.getSizeAndPositionOfCell(targetIndex);\r\n var maxOffset = datum.offset;\r\n var minOffset = maxOffset - containerSize + datum.size;\r\n\r\n var idealOffset;\r\n\r\n switch (align) {\r\n case \"start\":\r\n idealOffset = maxOffset;\r\n break;\r\n case \"end\":\r\n idealOffset = minOffset;\r\n break;\r\n case \"center\":\r\n idealOffset = maxOffset - ((containerSize - datum.size) / 2);\r\n break;\r\n default:\r\n idealOffset = Math.max(minOffset, Math.min(maxOffset, currentOffset));\r\n break;\r\n }\r\n\r\n var totalSize = this.getTotalSize();\r\n\r\n return Math.max(0, Math.min(totalSize - containerSize, idealOffset));\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n var totalSize = this.getTotalSize();\r\n\r\n if (totalSize === 0) {\r\n return {};\r\n }\r\n\r\n var maxOffset = offset + containerSize;\r\n var start = this._findNearestCell(offset);\r\n\r\n var datum = this.getSizeAndPositionOfCell(start);\r\n offset = datum.offset + datum.size;\r\n\r\n var stop = start;\r\n\r\n while (offset < maxOffset && stop < this._cellCount - 1) {\r\n stop++;\r\n offset += this.getSizeAndPositionOfCell(stop).size;\r\n }\r\n\r\n return {\r\n start: start,\r\n stop: stop\r\n };\r\n },\r\n\r\n resetCell: function (index) {\r\n this._lastMeasuredIndex = Math.min(this._lastMeasuredIndex, index - 1);\r\n },\r\n\r\n _binarySearch: function (high, low, offset) {\r\n var middle;\r\n var currentOffset;\r\n\r\n while (low <= high) {\r\n middle = low + Math.floor((high - low) / 2);\r\n currentOffset = this.getSizeAndPositionOfCell(middle).offset;\r\n\r\n if (currentOffset === offset) {\r\n return middle;\r\n } else if (currentOffset < offset) {\r\n low = middle + 1;\r\n } else if (currentOffset > offset) {\r\n high = middle - 1;\r\n }\r\n }\r\n\r\n if (low > 0) {\r\n return low - 1;\r\n }\r\n },\r\n\r\n _exponentialSearch: function (index, offset) {\r\n var interval = 1;\r\n\r\n while (index < this._cellCount && this.getSizeAndPositionOfCell(index).offset < offset) {\r\n index += interval;\r\n interval *= 2;\r\n }\r\n\r\n return this._binarySearch(Math.min(index, this._cellCount - 1), Math.floor(index / 2), offset);\r\n },\r\n\r\n _findNearestCell: function (offset) {\r\n if (isNaN(offset)) {\r\n return;\r\n }\r\n\r\n offset = Math.max(0, offset);\r\n\r\n var lastMeasuredCellSizeAndPosition = this.getSizeAndPositionOfLastMeasuredCell();\r\n var lastMeasuredIndex = Math.max(0, this._lastMeasuredIndex);\r\n\r\n if (lastMeasuredCellSizeAndPosition.offset >= offset) {\r\n return this._binarySearch(lastMeasuredIndex, 0, offset);\r\n }\r\n return this._exponentialSearch(lastMeasuredIndex, offset);\r\n \r\n }\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager = function (cellCount, cellSizeGetter, estimatedCellSize, maxScrollSize) {\r\n this._cellSizeAndPositionManager = new BI.CellSizeAndPositionManager(cellCount, cellSizeGetter, estimatedCellSize);\r\n this._maxScrollSize = maxScrollSize || 10000000;\r\n};\r\n\r\nBI.ScalingCellSizeAndPositionManager.prototype = {\r\n constructor: BI.ScalingCellSizeAndPositionManager,\r\n\r\n configure: function () {\r\n this._cellSizeAndPositionManager.configure.apply(this._cellSizeAndPositionManager, arguments);\r\n },\r\n\r\n getCellCount: function () {\r\n return this._cellSizeAndPositionManager.getCellCount();\r\n },\r\n\r\n getEstimatedCellSize: function () {\r\n return this._cellSizeAndPositionManager.getEstimatedCellSize();\r\n },\r\n\r\n getLastMeasuredIndex: function () {\r\n return this._cellSizeAndPositionManager.getLastMeasuredIndex();\r\n },\r\n\r\n getOffsetAdjustment: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - totalSize));\r\n },\r\n\r\n getSizeAndPositionOfCell: function (index) {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(index);\r\n },\r\n\r\n getSizeAndPositionOfLastMeasuredCell: function () {\r\n return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell();\r\n },\r\n\r\n getTotalSize: function () {\r\n return Math.min(this._maxScrollSize, this._cellSizeAndPositionManager.getTotalSize());\r\n },\r\n\r\n getUpdatedOffsetForIndex: function (align, containerSize, currentOffset, targetIndex) {\r\n currentOffset = this._safeOffsetToOffset(containerSize, currentOffset);\r\n\r\n var offset = this._cellSizeAndPositionManager.getUpdatedOffsetForIndex(align, containerSize, currentOffset, targetIndex);\r\n\r\n return this._offsetToSafeOffset(containerSize, offset);\r\n },\r\n\r\n getVisibleCellRange: function (containerSize, offset) {\r\n offset = this._safeOffsetToOffset(containerSize, offset);\r\n\r\n return this._cellSizeAndPositionManager.getVisibleCellRange(containerSize, offset);\r\n },\r\n\r\n resetCell: function (index) {\r\n this._cellSizeAndPositionManager.resetCell(index);\r\n },\r\n\r\n _getOffsetPercentage: function (containerSize, offset, totalSize) {\r\n return totalSize <= containerSize\r\n ? 0\r\n : offset / (totalSize - containerSize);\r\n },\r\n\r\n _offsetToSafeOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, totalSize);\r\n\r\n return Math.round(offsetPercentage * (safeTotalSize - containerSize));\r\n \r\n },\r\n\r\n _safeOffsetToOffset: function (containerSize, offset) {\r\n var totalSize = this._cellSizeAndPositionManager.getTotalSize();\r\n var safeTotalSize = this.getTotalSize();\r\n\r\n if (totalSize === safeTotalSize) {\r\n return offset;\r\n }\r\n var offsetPercentage = this._getOffsetPercentage(containerSize, offset, safeTotalSize);\r\n\r\n return Math.round(offsetPercentage * (totalSize - containerSize));\r\n \r\n }\r\n};/**\r\n * 汉字拼音索引\r\n */\r\n\r\n!(function () {\r\n var _ChineseFirstPY = \"YDYQSXMWZSSXJBYMGCCZQPSSQBYCDSCDQLDYLYBSSJGYZZJJFKCCLZDHWDWZJLJPFYYNWJJTMYHZWZHFLZPPQHGSCYYYNJQYXXGJHHSDSJNKKTMOMLCRXYPSNQSECCQZGGLLYJLMYZZSECYKYYHQWJSSGGYXYZYJWWKDJHYCHMYXJTLXJYQBYXZLDWRDJRWYSRLDZJPCBZJJBRCFTLECZSTZFXXZHTRQHYBDLYCZSSYMMRFMYQZPWWJJYFCRWFDFZQPYDDWYXKYJAWJFFXYPSFTZYHHYZYSWCJYXSCLCXXWZZXNBGNNXBXLZSZSBSGPYSYZDHMDZBQBZCWDZZYYTZHBTSYYBZGNTNXQYWQSKBPHHLXGYBFMJEBJHHGQTJCYSXSTKZHLYCKGLYSMZXYALMELDCCXGZYRJXSDLTYZCQKCNNJWHJTZZCQLJSTSTBNXBTYXCEQXGKWJYFLZQLYHYXSPSFXLMPBYSXXXYDJCZYLLLSJXFHJXPJBTFFYABYXBHZZBJYZLWLCZGGBTSSMDTJZXPTHYQTGLJSCQFZKJZJQNLZWLSLHDZBWJNCJZYZSQQYCQYRZCJJWYBRTWPYFTWEXCSKDZCTBZHYZZYYJXZCFFZZMJYXXSDZZOTTBZLQWFCKSZSXFYRLNYJMBDTHJXSQQCCSBXYYTSYFBXDZTGBCNSLCYZZPSAZYZZSCJCSHZQYDXLBPJLLMQXTYDZXSQJTZPXLCGLQTZWJBHCTSYJSFXYEJJTLBGXSXJMYJQQPFZASYJNTYDJXKJCDJSZCBARTDCLYJQMWNQN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SQJYYQZLDQTGJQYZJSUCMRYQTHTEJMFCTYHYPKMHYZWJDQFHYYXWSHCTXRLJHQXHCCYYYJLTKTTYTMXGTCJTZAYYOCZLYLBSZYWJYTSJYHBYSHFJLYGJXXTMZYYLTXXYPZLXYJZYZYYPNHMYMDYYLBLHLSYYQQLLNJJYMSOYQBZGDLYXYLCQYXTSZEGXHZGLHWBLJHEYXTWQMAKBPQCGYSHHEGQCMWYYWLJYJHYYZLLJJYLHZYHMGSLJLJXCJJYCLYCJPCPZJZJMMYLCQLNQLJQJSXYJMLSZLJQLYCMMHCFMMFPQQMFYLQMCFFQMMMMHMZNFHHJGTTHHKHSLNCHHYQDXTMMQDCYZYXYQMYQYLTDCYYYZAZZCYMZYDLZFFFMMYCQZWZZMABTBYZTDMNZZGGDFTYPCGQYTTSSFFWFDTZQSSYSTWXJHXYTSXXYLBYQHWWKXHZXWZNNZZJZJJQJCCCHYYXBZXZCYZTLLCQXYNJYCYYCYNZZQYYYEWYCZDCJYCCHYJLBTZYYCQWMPWPYMLGKDLDLGKQQBGYCHJXY\";\r\n\r\n // 此处收录了375个多音字,数据来自于http://www.51windows.net/pages/pinyin.asp\r\n var oMultiDiff = {\r\n 19969: \"DZ\",\r\n 19975: \"WM\",\r\n 19988: \"QJ\",\r\n 20048: \"YL\",\r\n 20056: \"SC\",\r\n 20060: \"NM\",\r\n 20094: \"QG\",\r\n 20127: \"QJ\",\r\n 20167: \"QC\",\r\n 20193: \"YG\",\r\n 20250: \"KH\",\r\n 20256: \"ZC\",\r\n 20282: \"SC\",\r\n 20285: \"QJG\",\r\n 20291: \"TD\",\r\n 20314: \"YD\",\r\n 20315: \"BF\",\r\n 20340: \"NE\",\r\n 20375: \"TD\",\r\n 20389: \"YJ\",\r\n 20391: \"CZ\",\r\n 20415: \"PB\",\r\n 20446: \"YS\",\r\n 20447: \"SQ\",\r\n 20504: \"TC\",\r\n 20608: \"KG\",\r\n 20854: \"QJ\",\r\n 20857: \"ZC\",\r\n 20911: \"PF\",\r\n 20985: \"AW\",\r\n 21032: \"PB\",\r\n 21048: \"XQ\",\r\n 21049: \"SC\",\r\n 21089: \"YS\",\r\n 21119: \"JC\",\r\n 21242: \"SB\",\r\n 21273: \"SC\",\r\n 21305: \"YP\",\r\n 21306: \"QO\",\r\n 21330: \"ZC\",\r\n 21333: \"SDC\",\r\n 21345: \"QK\",\r\n 21378: \"CA\",\r\n 21397: \"SC\",\r\n 21414: \"XS\",\r\n 21442: \"SC\",\r\n 21477: \"JG\",\r\n 21480: \"TD\",\r\n 21484: \"ZS\",\r\n 21494: \"YX\",\r\n 21505: \"YX\",\r\n 21512: \"HG\",\r\n 21523: \"XH\",\r\n 21537: \"PB\",\r\n 21542: \"PF\",\r\n 21549: \"KH\",\r\n 21571: \"E\",\r\n 21574: \"DA\",\r\n 21588: \"TD\",\r\n 21589: \"O\",\r\n 21618: \"ZC\",\r\n 21621: \"KHA\",\r\n 21632: \"ZJ\",\r\n 21654: \"KG\",\r\n 21679: \"LKG\",\r\n 21683: \"KH\",\r\n 21710: \"A\",\r\n 21719: \"YH\",\r\n 21734: \"WOE\",\r\n 21769: \"A\",\r\n 21780: \"WN\",\r\n 21804: \"XH\",\r\n 21834: \"A\",\r\n 21899: \"ZD\",\r\n 21903: \"RN\",\r\n 21908: \"WO\",\r\n 21939: \"ZC\",\r\n 21956: \"SA\",\r\n 21964: \"YA\",\r\n 21970: \"TD\",\r\n 22003: \"A\",\r\n 22031: \"JG\",\r\n 22040: \"XS\",\r\n 22060: \"ZC\",\r\n 22066: \"ZC\",\r\n 22079: \"MH\",\r\n 22129: \"XJ\",\r\n 22179: \"XA\",\r\n 22237: \"NJ\",\r\n 22244: \"TD\",\r\n 22280: \"JQ\",\r\n 22300: \"YH\",\r\n 22313: \"XW\",\r\n 22331: \"YQ\",\r\n 22343: \"YJ\",\r\n 22351: \"PH\",\r\n 22395: \"DC\",\r\n 22412: \"TD\",\r\n 22484: \"PB\",\r\n 22500: \"PB\",\r\n 22534: \"ZD\",\r\n 22549: \"DH\",\r\n 22561: \"PB\",\r\n 22612: \"TD\",\r\n 22771: \"KQ\",\r\n 22831: \"HB\",\r\n 22841: \"JG\",\r\n 22855: \"QJ\",\r\n 22865: \"XQ\",\r\n 23013: \"ML\",\r\n 23081: \"WM\",\r\n 23487: \"SX\",\r\n 23558: \"QJ\",\r\n 23561: \"YW\",\r\n 23586: \"YW\",\r\n 23614: \"YW\",\r\n 23615: \"SN\",\r\n 23631: \"PB\",\r\n 23646: \"ZS\",\r\n 23663: \"ZT\",\r\n 23673: \"YG\",\r\n 23762: \"TD\",\r\n 23769: \"ZS\",\r\n 23780: \"QJ\",\r\n 23884: \"QK\",\r\n 24055: \"XH\",\r\n 24113: \"DC\",\r\n 24162: \"ZC\",\r\n 24191: \"GA\",\r\n 24273: \"QJ\",\r\n 24324: \"NL\",\r\n 24377: \"TD\",\r\n 24378: \"QJ\",\r\n 24439: \"PF\",\r\n 24554: \"ZS\",\r\n 24683: \"TD\",\r\n 24694: \"WE\",\r\n 24733: \"LK\",\r\n 24925: \"TN\",\r\n 25094: \"ZG\",\r\n 25100: \"XQ\",\r\n 25103: \"XH\",\r\n 25153: \"PB\",\r\n 25170: \"PB\",\r\n 25179: \"KG\",\r\n 25203: \"PB\",\r\n 25240: \"ZS\",\r\n 25282: \"FB\",\r\n 25303: \"NA\",\r\n 25324: \"KG\",\r\n 25341: \"ZY\",\r\n 25373: \"WZ\",\r\n 25375: \"XJ\",\r\n 25384: \"A\",\r\n 25457: \"A\",\r\n 25528: \"SD\",\r\n 25530: \"SC\",\r\n 25552: \"TD\",\r\n 25774: \"ZC\",\r\n 25874: \"ZC\",\r\n 26044: \"YW\",\r\n 26080: \"WM\",\r\n 26292: \"PB\",\r\n 26333: \"PB\",\r\n 26355: \"ZY\",\r\n 26366: \"CZ\",\r\n 26397: \"ZC\",\r\n 26399: \"QJ\",\r\n 26415: \"ZS\",\r\n 26451: \"SB\",\r\n 26526: \"ZC\",\r\n 26552: \"JG\",\r\n 26561: \"TD\",\r\n 26588: \"JG\",\r\n 26597: \"CZ\",\r\n 26629: \"ZS\",\r\n 26638: \"YL\",\r\n 26646: \"XQ\",\r\n 26653: \"KG\",\r\n 26657: \"XJ\",\r\n 26727: \"HG\",\r\n 26894: \"ZC\",\r\n 26937: \"ZS\",\r\n 26946: \"ZC\",\r\n 26999: \"KJ\",\r\n 27099: \"KJ\",\r\n 27449: \"YQ\",\r\n 27481: \"XS\",\r\n 27542: \"ZS\",\r\n 27663: \"ZS\",\r\n 27748: \"TS\",\r\n 27784: \"SC\",\r\n 27788: \"ZD\",\r\n 27795: \"TD\",\r\n 27812: \"O\",\r\n 27850: \"PB\",\r\n 27852: \"MB\",\r\n 27895: \"SL\",\r\n 27898: \"PL\",\r\n 27973: \"QJ\",\r\n 27981: \"KH\",\r\n 27986: \"HX\",\r\n 27994: \"XJ\",\r\n 28044: \"YC\",\r\n 28065: \"WG\",\r\n 28177: \"SM\",\r\n 28267: \"QJ\",\r\n 28291: \"KH\",\r\n 28337: \"ZQ\",\r\n 28463: \"TL\",\r\n 28548: \"DC\",\r\n 28601: \"TD\",\r\n 28689: \"PB\",\r\n 28805: \"JG\",\r\n 28820: \"QG\",\r\n 28846: \"PB\",\r\n 28952: \"TD\",\r\n 28975: \"ZC\",\r\n 29100: \"A\",\r\n 29325: \"QJ\",\r\n 29575: \"SL\",\r\n 29602: \"FB\",\r\n 30010: \"TD\",\r\n 30044: \"CX\",\r\n 30058: \"PF\",\r\n 30091: \"YSP\",\r\n 30111: \"YN\",\r\n 30229: \"XJ\",\r\n 30427: \"SC\",\r\n 30465: \"SX\",\r\n 30631: \"YQ\",\r\n 30655: \"QJ\",\r\n 30684: \"QJG\",\r\n 30707: \"SD\",\r\n 30729: \"XH\",\r\n 30796: \"LG\",\r\n 30917: \"PB\",\r\n 31074: \"NM\",\r\n 31085: \"JZ\",\r\n 31109: \"SC\",\r\n 31181: \"ZC\",\r\n 31192: \"MLB\",\r\n 31293: \"JQ\",\r\n 31400: \"YX\",\r\n 31584: \"YJ\",\r\n 31896: \"ZN\",\r\n 31909: \"ZY\",\r\n 31995: \"XJ\",\r\n 32321: \"PF\",\r\n 32327: \"ZY\",\r\n 32418: \"HG\",\r\n 32420: \"XQ\",\r\n 32421: \"HG\",\r\n 32438: \"LG\",\r\n 32473: \"GJ\",\r\n 32488: \"TD\",\r\n 32521: \"QJ\",\r\n 32527: \"PB\",\r\n 32562: \"ZSQ\",\r\n 32564: \"JZ\",\r\n 32735: \"ZD\",\r\n 32793: \"PB\",\r\n 33071: \"PF\",\r\n 33098: \"XL\",\r\n 33100: \"YA\",\r\n 33152: \"PB\",\r\n 33261: \"CX\",\r\n 33324: \"BP\",\r\n 33333: \"TD\",\r\n 33406: \"YA\",\r\n 33426: \"WM\",\r\n 33432: \"PB\",\r\n 33445: \"JG\",\r\n 33486: \"ZN\",\r\n 33493: \"TS\",\r\n 33507: \"QJ\",\r\n 33540: \"QJ\",\r\n 33544: \"ZC\",\r\n 33564: \"XQ\",\r\n 33617: \"YT\",\r\n 33632: \"QJ\",\r\n 33636: \"XH\",\r\n 33637: \"YX\",\r\n 33694: \"WG\",\r\n 33705: \"PF\",\r\n 33728: \"YW\",\r\n 33882: \"SR\",\r\n 34067: \"WM\",\r\n 34074: \"YW\",\r\n 34121: \"QJ\",\r\n 34255: \"ZC\",\r\n 34259: \"XL\",\r\n 34425: \"JH\",\r\n 34430: \"XH\",\r\n 34485: \"KH\",\r\n 34503: \"YS\",\r\n 34532: \"HG\",\r\n 34552: \"XS\",\r\n 34558: \"YE\",\r\n 34593: \"ZL\",\r\n 34660: \"YQ\",\r\n 34892: \"XH\",\r\n 34928: \"SC\",\r\n 34999: \"QJ\",\r\n 35048: \"PB\",\r\n 35059: \"SC\",\r\n 35098: \"ZC\",\r\n 35203: \"TQ\",\r\n 35265: \"JX\",\r\n 35299: \"JX\",\r\n 35782: \"SZ\",\r\n 35828: \"YS\",\r\n 35830: \"E\",\r\n 35843: \"TD\",\r\n 35895: \"YG\",\r\n 35977: \"MH\",\r\n 36158: \"JG\",\r\n 36228: \"QJ\",\r\n 36426: \"XQ\",\r\n 36466: \"DC\",\r\n 36710: \"CJ\",\r\n 36711: \"ZYG\",\r\n 36767: \"PB\",\r\n 36866: \"SK\",\r\n 36951: \"YW\",\r\n 37034: \"YX\",\r\n 37063: \"XH\",\r\n 37218: \"ZC\",\r\n 37325: \"ZC\",\r\n 38063: \"PB\",\r\n 38079: \"TD\",\r\n 38085: \"QY\",\r\n 38107: \"DC\",\r\n 38116: \"TD\",\r\n 38123: \"YD\",\r\n 38224: \"HG\",\r\n 38241: \"XTC\",\r\n 38271: \"ZC\",\r\n 38415: \"YE\",\r\n 38426: \"KH\",\r\n 38461: \"YD\",\r\n 38463: \"AE\",\r\n 38466: \"PB\",\r\n 38477: \"XJ\",\r\n 38518: \"YT\",\r\n 38551: \"WK\",\r\n 38585: \"ZC\",\r\n 38704: \"XS\",\r\n 38739: \"LJ\",\r\n 38761: \"GJ\",\r\n 38808: \"SQ\",\r\n 39048: \"JG\",\r\n 39049: \"XJ\",\r\n 39052: \"HG\",\r\n 39076: \"CZ\",\r\n 39271: \"XT\",\r\n 39534: \"TD\",\r\n 39552: \"TD\",\r\n 39584: \"PB\",\r\n 39647: \"SB\",\r\n 39730: \"LG\",\r\n 39748: \"TPB\",\r\n 40109: \"ZQ\",\r\n 40479: \"ND\",\r\n 40516: \"HG\",\r\n 40536: \"HG\",\r\n 40583: \"QJ\",\r\n 40765: \"YQ\",\r\n 40784: \"QJ\",\r\n 40840: \"YK\",\r\n 40863: \"QJG\"\r\n };\r\n\r\n var _checkPYCh = function (ch) {\r\n var uni = ch.charCodeAt(0);\r\n // 如果不在汉字处理范围之内,返回原字符,也可以调用自己的处理函数\r\n if (uni > 40869 || uni < 19968) {return ch;} // dealWithOthers(ch);\r\n return (oMultiDiff[uni] ? oMultiDiff[uni] : (_ChineseFirstPY.charAt(uni - 19968)));\r\n };\r\n\r\n var _mkPYRslt = function (arr, options) {\r\n var ignoreMulti = options.ignoreMulti;\r\n var splitChar = options.splitChar;\r\n var arrRslt = [\"\"], k, multiLen = 0;\r\n for (var i = 0, len = arr.length; i < len; i++) {\r\n var str = arr[i];\r\n var strlen = str.length;\r\n // 多音字过多的情况下,指数增长会造成浏览器卡死,超过20完全卡死,18勉强能用,考虑到不同性能最好是16或者14\r\n // 超过14个多音字之后,后面的都用第一个拼音\r\n if (strlen == 1 || multiLen > 14 || ignoreMulti) {\r\n var tmpStr = str.substring(0, 1);\r\n for (k = 0; k < arrRslt.length; k++) {\r\n arrRslt[k] += tmpStr;\r\n }\r\n } else {\r\n var tmpArr = arrRslt.slice(0);\r\n arrRslt = [];\r\n multiLen ++;\r\n for (k = 0; k < strlen; k++) {\r\n // 复制一个相同的arrRslt\r\n var tmp = tmpArr.slice(0);\r\n // 把当前字符str[k]添加到每个元素末尾\r\n for (var j = 0; j < tmp.length; j++) {\r\n tmp[j] += str.charAt(k);\r\n }\r\n // 把复制并修改后的数组连接到arrRslt上\r\n arrRslt = arrRslt.concat(tmp);\r\n }\r\n }\r\n }\r\n // BI-56386 这边直接将所有多音字组合拼接是有风险的,因为丢失了每一组的起始索引信息, 外部使用indexOf等方法会造成错位\r\n // 一旦错位就可能认为不符合条件, 但实际上还是有可能符合条件的,故此处以一个无法搜索的不可见字符作为连接\r\n return arrRslt.join(splitChar || \"\").toLowerCase();\r\n };\r\n\r\n _.extend(BI, {\r\n makeFirstPY: function (str, options) {\r\n options = options || {};\r\n if (typeof (str) !== \"string\") {return \"\" + str;}\r\n var arrResult = []; // 保存中间结果的数组\r\n for (var i = 0, len = str.length; i < len; i++) {\r\n // 获得unicode码\r\n var ch = str.charAt(i);\r\n // 检查该unicode码是否在处理范围之内,在则返回该码对映汉字的拼音首字母,不在则调用其它函数处理\r\n arrResult.push(_checkPYCh(ch));\r\n }\r\n // 处理arrResult,返回所有可能的拼音首字母串数组\r\n return _mkPYRslt(arrResult, options);\r\n }\r\n });\r\n})();\r\n(function () {\r\n function defaultComparator (a, b) {\r\n return a < b;\r\n }\r\n\r\n BI.Heap = function (items, comparator) {\r\n this._items = items || [];\r\n this._size = this._items.length;\r\n this._comparator = comparator || defaultComparator;\r\n this._heapify();\r\n };\r\n\r\n BI.Heap.prototype = {\r\n constructor: BI.Heap,\r\n empty: function () {\r\n return this._size === 0;\r\n },\r\n\r\n pop: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n var elt = this._items[0];\r\n\r\n var lastElt = this._items.pop();\r\n this._size--;\r\n\r\n if (this._size > 0) {\r\n this._items[0] = lastElt;\r\n this._sinkDown(0);\r\n }\r\n\r\n return elt;\r\n },\r\n\r\n push: function (item) {\r\n this._items[this._size++] = item;\r\n this._bubbleUp(this._size - 1);\r\n },\r\n\r\n size: function () {\r\n return this._size;\r\n },\r\n\r\n peek: function () {\r\n if (this._size === 0) {\r\n return;\r\n }\r\n\r\n return this._items[0];\r\n },\r\n\r\n _heapify: function () {\r\n for (var index = Math.floor((this._size + 1) / 2); index >= 0; index--) {\r\n this._sinkDown(index);\r\n }\r\n },\r\n\r\n _bubbleUp: function (index) {\r\n var elt = this._items[index];\r\n while (index > 0) {\r\n var parentIndex = Math.floor((index + 1) / 2) - 1;\r\n var parentElt = this._items[parentIndex];\r\n\r\n // if parentElt < elt, stop\r\n if (this._comparator(parentElt, elt)) {\r\n return;\r\n }\r\n\r\n // swap\r\n this._items[parentIndex] = elt;\r\n this._items[index] = parentElt;\r\n index = parentIndex;\r\n }\r\n },\r\n\r\n _sinkDown: function (index) {\r\n var elt = this._items[index];\r\n\r\n while (true) {\r\n var leftChildIndex = 2 * (index + 1) - 1;\r\n var rightChildIndex = 2 * (index + 1);\r\n var swapIndex = -1;\r\n\r\n if (leftChildIndex < this._size) {\r\n var leftChild = this._items[leftChildIndex];\r\n if (this._comparator(leftChild, elt)) {\r\n swapIndex = leftChildIndex;\r\n }\r\n }\r\n\r\n if (rightChildIndex < this._size) {\r\n var rightChild = this._items[rightChildIndex];\r\n if (this._comparator(rightChild, elt)) {\r\n if (swapIndex === -1 ||\r\n this._comparator(rightChild, this._items[swapIndex])) {\r\n swapIndex = rightChildIndex;\r\n }\r\n }\r\n }\r\n\r\n // if we don't have a swap, stop\r\n if (swapIndex === -1) {\r\n return;\r\n }\r\n\r\n this._items[index] = this._items[swapIndex];\r\n this._items[swapIndex] = elt;\r\n index = swapIndex;\r\n }\r\n }\r\n };\r\n})();\r\n\r\n!(function () {\r\n BI.LinkHashMap = function () {\r\n this.array = [];\r\n this.map = {};\r\n };\r\n BI.LinkHashMap.prototype = {\r\n constructor: BI.LinkHashMap,\r\n has: function (key) {\r\n if (key in this.map) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n\r\n add: function (key, value) {\r\n if (typeof key === \"undefined\") {\r\n return;\r\n }\r\n if (key in this.map) {\r\n this.map[key] = value;\r\n } else {\r\n this.array.push(key);\r\n this.map[key] = value;\r\n }\r\n },\r\n\r\n remove: function (key) {\r\n if (key in this.map) {\r\n delete this.map[key];\r\n for (var i = 0; i < this.array.length; i++) {\r\n if (this.array[i] == key) {\r\n this.array.splice(i, 1);\r\n break;\r\n }\r\n }\r\n }\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var key = this.array[i];\r\n var value = this.map[key];\r\n var re = fn.call(scope, key, value, i, this.array, this.map);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n get: function (key) {\r\n return this.map[key];\r\n },\r\n\r\n toArray: function () {\r\n var array = [];\r\n this.each(function (key, value) {\r\n array.push(value);\r\n });\r\n return array;\r\n }\r\n };\r\n})();\r\n!(function () {\r\n BI.LRU = function (limit) {\r\n this.size = 0;\r\n this.limit = limit;\r\n this.head = this.tail = undefined;\r\n this._keymap = {};\r\n };\r\n\r\n var p = BI.LRU.prototype;\r\n\r\n p.put = function (key, value) {\r\n var removed;\r\n if (this.size === this.limit) {\r\n removed = this.shift();\r\n }\r\n\r\n var entry = this.get(key, true);\r\n if (!entry) {\r\n entry = {\r\n key: key\r\n };\r\n this._keymap[key] = entry;\r\n if (this.tail) {\r\n this.tail.newer = entry;\r\n entry.older = this.tail;\r\n } else {\r\n this.head = entry;\r\n }\r\n this.tail = entry;\r\n this.size++;\r\n }\r\n entry.value = value;\r\n\r\n return removed;\r\n };\r\n\r\n p.shift = function () {\r\n var entry = this.head;\r\n if (entry) {\r\n this.head = this.head.newer;\r\n this.head.older = undefined;\r\n entry.newer = entry.older = undefined;\r\n this._keymap[entry.key] = undefined;\r\n this.size--;\r\n }\r\n return entry;\r\n };\r\n\r\n\r\n p.get = function (key, returnEntry) {\r\n var entry = this._keymap[key];\r\n if (entry === undefined) return;\r\n if (entry === this.tail) {\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n }\r\n // HEAD--------------TAIL\r\n // <.older .newer>\r\n // <--- add direction --\r\n // A B C <D> E\r\n if (entry.newer) {\r\n if (entry === this.head) {\r\n this.head = entry.newer;\r\n }\r\n entry.newer.older = entry.older; // C <-- E.\r\n }\r\n if (entry.older) {\r\n entry.older.newer = entry.newer; // C. --> E\r\n }\r\n entry.newer = undefined; // D --x\r\n entry.older = this.tail; // D. --> E\r\n if (this.tail) {\r\n this.tail.newer = entry; // E. <-- D\r\n }\r\n this.tail = entry;\r\n return returnEntry\r\n ? entry\r\n : entry.value;\r\n };\r\n\r\n p.has = function (key) {\r\n return this._keymap[key] != null;\r\n };\r\n})();// 线段树\r\n(function () {\r\n var parent = function (node) {\r\n return Math.floor(node / 2);\r\n };\r\n\r\n var Int32Array = _global.Int32Array || function (size) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = 0;\r\n }\r\n return xs;\r\n };\r\n\r\n var ceilLog2 = function (x) {\r\n var y = 1;\r\n while (y < x) {\r\n y *= 2;\r\n }\r\n return y;\r\n };\r\n\r\n BI.PrefixIntervalTree = function (xs) {\r\n this._size = xs.length;\r\n this._half = ceilLog2(this._size);\r\n // _heap是一个_size两倍以上的堆\r\n this._heap = new Int32Array(2 * this._half);\r\n\r\n var i;\r\n // 初始化 >= _size 的堆空间, 即叶子节点\r\n for (i = 0; i < this._size; ++i) {\r\n this._heap[this._half + i] = xs[i];\r\n }\r\n // 初始化 < _size 的堆空间, 即非叶子节点,根节点包含整个区间\r\n for (i = this._half - 1; i > 0; --i) {\r\n this._heap[i] = this._heap[2 * i] + this._heap[2 * i + 1];\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.prototype = {\r\n constructor: BI.PrefixIntervalTree,\r\n // 往_half之后的空间set值,需要更新其所有祖先节点的值\r\n set: function (index, value) {\r\n var node = this._half + index;\r\n this._heap[node] = value;\r\n\r\n node = parent(node);\r\n for (; node !== 0; node = parent(node)) {\r\n this._heap[node] =\r\n this._heap[2 * node] + this._heap[2 * node + 1];\r\n }\r\n },\r\n\r\n get: function (index) {\r\n var node = this._half + index;\r\n return this._heap[node];\r\n },\r\n\r\n getSize: function () {\r\n return this._size;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(end - 1).\r\n */\r\n sumUntil: function (end) {\r\n if (end === 0) {\r\n return 0;\r\n }\r\n\r\n var node = this._half + end - 1;\r\n var sum = this._heap[node];\r\n for (; node !== 1; node = parent(node)) {\r\n if (node % 2 === 1) {\r\n sum += this._heap[node - 1];\r\n }\r\n }\r\n\r\n return sum;\r\n },\r\n\r\n /**\r\n * get(0) + get(1) + ... + get(inclusiveEnd).\r\n */\r\n sumTo: function (inclusiveEnd) {\r\n return this.sumUntil(inclusiveEnd + 1);\r\n },\r\n\r\n /**\r\n * sum get(begin) + get(begin + 1) + ... + get(end - 1).\r\n */\r\n sum: function (begin, end) {\r\n return this.sumUntil(end) - this.sumUntil(begin);\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) <= t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestLowerBound: function (t) {\r\n if (t < 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] <= t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t < leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and sumUntil(i) < t, or\r\n * -1 if no such i exists.\r\n */\r\n greatestStrictLowerBound: function (t) {\r\n if (t <= 0) {\r\n return -1;\r\n }\r\n\r\n var node = 1;\r\n if (this._heap[node] < t) {\r\n return this._size;\r\n }\r\n\r\n while (node < this._half) {\r\n var leftSum = this._heap[2 * node];\r\n if (t <= leftSum) {\r\n node = 2 * node;\r\n } else {\r\n node = 2 * node + 1;\r\n t -= leftSum;\r\n }\r\n }\r\n\r\n return node - this._half;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t <= sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastUpperBound: function (t) {\r\n return this.greatestStrictLowerBound(t) + 1;\r\n },\r\n\r\n /**\r\n * Returns the smallest i such that 0 <= i <= size and t < sumUntil(i), or\r\n * size + 1 if no such i exists.\r\n */\r\n leastStrictUpperBound: function (t) {\r\n return this.greatestLowerBound(t) + 1;\r\n }\r\n };\r\n\r\n BI.PrefixIntervalTree.uniform = function (size, initialValue) {\r\n var xs = [];\r\n for (var i = size - 1; i >= 0; --i) {\r\n xs[i] = initialValue;\r\n }\r\n\r\n return new BI.PrefixIntervalTree(xs);\r\n };\r\n\r\n BI.PrefixIntervalTree.empty = function (size) {\r\n return BI.PrefixIntervalTree.uniform(size, 0);\r\n };\r\n\r\n})();\r\n\r\n!(function () {\r\n BI.Queue = function (capacity) {\r\n this.capacity = capacity;\r\n this.array = [];\r\n };\r\n BI.Queue.prototype = {\r\n constructor: BI.Queue,\r\n\r\n contains: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n indexOf: function (v) {\r\n return BI.contains(this.array, v);\r\n },\r\n\r\n getElementByIndex: function (index) {\r\n return this.array[index];\r\n },\r\n\r\n push: function (v) {\r\n this.array.push(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.shift();\r\n }\r\n },\r\n\r\n pop: function () {\r\n this.array.pop();\r\n },\r\n\r\n shift: function () {\r\n this.array.shift();\r\n },\r\n\r\n unshift: function (v) {\r\n this.array.unshift(v);\r\n if (this.capacity && this.array.length > this.capacity) {\r\n this.array.pop();\r\n }\r\n },\r\n\r\n remove: function (v) {\r\n BI.remove(this.array, v);\r\n },\r\n\r\n splice: function () {\r\n this.array.splice.apply(this.array, arguments);\r\n },\r\n\r\n slice: function () {\r\n this.array.slice.apply(this.array, arguments);\r\n },\r\n\r\n size: function () {\r\n return this.array.length;\r\n },\r\n\r\n each: function (fn, scope) {\r\n var scope = scope || window;\r\n var fn = fn || null;\r\n if (fn == null || typeof (fn) !== \"function\") {\r\n return;\r\n }\r\n for (var i = 0; i < this.array.length; i++) {\r\n var re = fn.call(scope, i, this.array[i], this.array);\r\n if (re == false) {\r\n break;\r\n }\r\n }\r\n },\r\n\r\n toArray: function () {\r\n return this.array;\r\n },\r\n\r\n fromArray: function (array) {\r\n var self = this;\r\n BI.each(array, function (i, v) {\r\n self.push(v);\r\n });\r\n },\r\n\r\n clear: function () {\r\n this.array.length = 0;\r\n }\r\n };\r\n})();!(function () {\r\n var Section = function (height, width, x, y) {\r\n this.height = height;\r\n this.width = width;\r\n this.x = x;\r\n this.y = y;\r\n\r\n this._indexMap = {};\r\n this._indices = [];\r\n };\r\n\r\n Section.prototype = {\r\n constructor: Section,\r\n addCellIndex: function (index) {\r\n if (!this._indexMap[index]) {\r\n this._indexMap[index] = true;\r\n this._indices.push(index);\r\n }\r\n },\r\n\r\n getCellIndices: function () {\r\n return this._indices;\r\n }\r\n };\r\n\r\n var SECTION_SIZE = 100;\r\n BI.SectionManager = function (sectionSize) {\r\n this._sectionSize = sectionSize || SECTION_SIZE;\r\n this._cellMetadata = [];\r\n this._sections = {};\r\n };\r\n\r\n BI.SectionManager.prototype = {\r\n constructor: BI.SectionManager,\r\n getCellIndices: function (height, width, x, y) {\r\n var indices = {};\r\n\r\n BI.each(this.getSections(height, width, x, y), function (i, section) {\r\n BI.each(section.getCellIndices(), function (j, index) {\r\n indices[index] = index;\r\n });\r\n });\r\n\r\n return BI.map(BI.keys(indices), function (i, index) {\r\n return indices[index];\r\n });\r\n },\r\n\r\n getCellMetadata: function (index) {\r\n return this._cellMetadata[index];\r\n },\r\n\r\n getSections: function (height, width, x, y) {\r\n var sectionXStart = Math.floor(x / this._sectionSize);\r\n var sectionXStop = Math.floor((x + width - 1) / this._sectionSize);\r\n var sectionYStart = Math.floor(y / this._sectionSize);\r\n var sectionYStop = Math.floor((y + height - 1) / this._sectionSize);\r\n\r\n var sections = [];\r\n\r\n for (var sectionX = sectionXStart; sectionX <= sectionXStop; sectionX++) {\r\n for (var sectionY = sectionYStart; sectionY <= sectionYStop; sectionY++) {\r\n var key = sectionX + \".\" + sectionY;\r\n\r\n if (!this._sections[key]) {\r\n this._sections[key] = new Section(this._sectionSize, this._sectionSize, sectionX * this._sectionSize, sectionY * this._sectionSize);\r\n }\r\n\r\n sections.push(this._sections[key]);\r\n }\r\n }\r\n\r\n return sections;\r\n },\r\n\r\n getTotalSectionCount: function () {\r\n return BI.size(this._sections);\r\n },\r\n\r\n registerCell: function (cellMetadatum, index) {\r\n this._cellMetadata[index] = cellMetadatum;\r\n\r\n BI.each(this.getSections(cellMetadatum.height, cellMetadatum.width, cellMetadatum.x, cellMetadatum.y), function (i, section) {\r\n section.addCellIndex(index);\r\n });\r\n }\r\n };\r\n})();(function () {\r\n BI.Tree = function () {\r\n this.root = new BI.Node(BI.UUID());\r\n };\r\n\r\n BI.Tree.prototype = {\r\n constructor: BI.Tree,\r\n addNode: function (node, newNode, index) {\r\n if (BI.isNull(newNode)) {\r\n this.root.addChild(node, index);\r\n } else if (BI.isNull(node)) {\r\n this.root.addChild(newNode, index);\r\n } else {\r\n node.addChild(newNode, index);\r\n }\r\n },\r\n\r\n isRoot: function (node) {\r\n return node === this.root;\r\n },\r\n\r\n getRoot: function () {\r\n return this.root;\r\n },\r\n\r\n clear: function () {\r\n this.root.clear();\r\n },\r\n\r\n initTree: function (nodes) {\r\n var self = this;\r\n this.clear();\r\n var queue = [];\r\n BI.each(nodes, function (i, node) {\r\n var n = new BI.Node(node);\r\n n.set(\"data\", node);\r\n self.addNode(n);\r\n queue.push(n);\r\n });\r\n while (!BI.isEmpty(queue)) {\r\n var parent = queue.shift();\r\n var node = parent.get(\"data\");\r\n BI.each(node.children, function (i, child) {\r\n var n = new BI.Node(child);\r\n n.set(\"data\", child);\r\n queue.push(n);\r\n self.addNode(parent, n);\r\n });\r\n }\r\n },\r\n\r\n _toJSON: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSON(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSON: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSON(child));\r\n });\r\n return result;\r\n },\r\n\r\n _toJSONWithNode: function (node) {\r\n var self = this;\r\n var children = [];\r\n BI.each(node.getChildren(), function (i, child) {\r\n children.push(self._toJSONWithNode(child));\r\n });\r\n return BI.extend({\r\n id: node.id\r\n }, BI.deepClone(node.get(\"data\")), {\r\n node: node\r\n }, (children.length > 0 ? {\r\n children: children\r\n } : {}));\r\n },\r\n\r\n toJSONWithNode: function (node) {\r\n var self = this, result = [];\r\n BI.each((node || this.root).getChildren(), function (i, child) {\r\n result.push(self._toJSONWithNode(child));\r\n });\r\n return result;\r\n },\r\n\r\n search: function (root, target, param) {\r\n if (!(root instanceof BI.Node)) {\r\n return arguments.callee.apply(this, [this.root, root, target]);\r\n }\r\n var self = this, next = null;\r\n\r\n if (BI.isNull(target)) {\r\n return null;\r\n }\r\n if (BI.isEqual(root[param || \"id\"], target)) {\r\n return root;\r\n }\r\n BI.any(root.getChildren(), function (i, child) {\r\n next = self.search(child, target, param);\r\n if (null !== next) {\r\n return true;\r\n }\r\n });\r\n return next;\r\n },\r\n\r\n _traverse: function (node, callback) {\r\n var queue = [];\r\n queue.push(node);\r\n while (!BI.isEmpty(queue)) {\r\n var temp = queue.shift();\r\n var b = callback && callback(temp);\r\n if (b === false) {\r\n break;\r\n }\r\n if (b === true) {\r\n continue;\r\n }\r\n if (temp != null) {\r\n queue = queue.concat(temp.getChildren());\r\n }\r\n }\r\n },\r\n\r\n traverse: function (callback) {\r\n this._traverse(this.root, callback);\r\n },\r\n\r\n _recursion: function (node, route, callback) {\r\n var self = this;\r\n return BI.every(node.getChildren(), function (i, child) {\r\n var next = BI.clone(route);\r\n next.push(child.id);\r\n var b = callback && callback(child, next);\r\n if (b === false) {\r\n return false;\r\n }\r\n if (b === true) {\r\n return true;\r\n }\r\n return self._recursion(child, next, callback);\r\n });\r\n },\r\n\r\n recursion: function (callback) {\r\n this._recursion(this.root, [], callback);\r\n },\r\n\r\n inOrderTraverse: function (callback) {\r\n this._inOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 中序遍历(递归)\r\n _inOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._inOrderTraverse(node.getLeft());\r\n callback && callback(node);\r\n this._inOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 中序遍历(非递归)\r\n nrInOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n while (node != null || !BI.isEmpty(stack)) {\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n callback && callback(node);\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n preOrderTraverse: function (callback) {\r\n this._preOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 先序遍历(递归)\r\n _preOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n callback && callback(node);\r\n this._preOrderTraverse(node.getLeft());\r\n this._preOrderTraverse(node.getRight());\r\n }\r\n },\r\n\r\n // 先序遍历(非递归)\r\n nrPreOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n callback && callback(node);\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n node = stack.pop();\r\n node = node.getRight();\r\n }\r\n },\r\n\r\n postOrderTraverse: function (callback) {\r\n this._postOrderTraverse(this.root, callback);\r\n },\r\n\r\n // 后序遍历(递归)\r\n _postOrderTraverse: function (node, callback) {\r\n if (node != null) {\r\n this._postOrderTraverse(node.getLeft());\r\n this._postOrderTraverse(node.getRight());\r\n callback && callback(node);\r\n }\r\n },\r\n\r\n // 后续遍历(非递归)\r\n nrPostOrderTraverse: function (callback) {\r\n\r\n var stack = [];\r\n var node = this.root;\r\n var preNode = null;// 表示最近一次访问的节点\r\n\r\n while (node != null || !BI.isEmpty(stack)) {\r\n\r\n while (node != null) {\r\n stack.push(node);\r\n node = node.getLeft();\r\n }\r\n\r\n node = BI.last(stack);\r\n\r\n if (node.getRight() == null || node.getRight() == preNode) {\r\n callback && callback(node);\r\n node = stack.pop();\r\n preNode = node;\r\n node = null;\r\n } else {\r\n node = node.getRight();\r\n }\r\n }\r\n }\r\n };\r\n\r\n BI.Node = function (id) {\r\n if (BI.isObject(id)) {\r\n BI.extend(this, id);\r\n } else {\r\n this.id = id;\r\n }\r\n this.clear.apply(this, arguments);\r\n };\r\n\r\n BI.Node.prototype = {\r\n constructor: BI.Node,\r\n\r\n set: function (key, value) {\r\n if (BI.isObject(key)) {\r\n BI.extend(this, key);\r\n return;\r\n }\r\n this[key] = value;\r\n },\r\n\r\n get: function (key) {\r\n return this[key];\r\n },\r\n\r\n isLeaf: function () {\r\n return BI.isEmpty(this.children);\r\n },\r\n\r\n getChildren: function () {\r\n return this.children;\r\n },\r\n\r\n getChildrenLength: function () {\r\n return this.children.length;\r\n },\r\n\r\n getFirstChild: function () {\r\n return BI.first(this.children);\r\n },\r\n\r\n getLastChild: function () {\r\n return BI.last(this.children);\r\n },\r\n\r\n setLeft: function (left) {\r\n this.left = left;\r\n },\r\n\r\n getLeft: function () {\r\n return this.left;\r\n },\r\n\r\n setRight: function (right) {\r\n this.right = right;\r\n },\r\n\r\n getRight: function () {\r\n return this.right;\r\n },\r\n\r\n setParent: function (parent) {\r\n this.parent = parent;\r\n },\r\n\r\n getParent: function () {\r\n return this.parent;\r\n },\r\n\r\n getChild: function (index) {\r\n return this.children[index];\r\n },\r\n\r\n getChildIndex: function (id) {\r\n return BI.findIndex(this.children, function (i, ch) {\r\n return ch.get(\"id\") === id;\r\n });\r\n },\r\n\r\n removeChild: function (id) {\r\n this.removeChildByIndex(this.getChildIndex(id));\r\n },\r\n\r\n removeChildByIndex: function (index) {\r\n var before = this.getChild(index - 1);\r\n var behind = this.getChild(index + 1);\r\n if (before != null) {\r\n before.setRight(behind || null);\r\n }\r\n if (behind != null) {\r\n behind.setLeft(before || null);\r\n }\r\n this.children.splice(index, 1);\r\n },\r\n\r\n removeAllChilds: function () {\r\n this.children = [];\r\n },\r\n\r\n addChild: function (child, index) {\r\n var cur = null;\r\n if (BI.isUndefined(index)) {\r\n cur = this.children.length - 1;\r\n } else {\r\n cur = index - 1;\r\n }\r\n child.setParent(this);\r\n if (cur >= 0) {\r\n this.getChild(cur) && this.getChild(cur).setRight(child);\r\n child.setLeft(this.getChild(cur));\r\n }\r\n if (BI.isUndefined(index)) {\r\n this.children.push(child);\r\n } else {\r\n this.children.splice(index, 0, child);\r\n }\r\n },\r\n\r\n equals: function (obj) {\r\n return this === obj || this.id === obj.id;\r\n },\r\n\r\n clear: function () {\r\n this.parent = null;\r\n this.left = null;\r\n this.right = null;\r\n this.children = [];\r\n }\r\n };\r\n\r\n BI.extend(BI.Tree, {\r\n transformToArrayFormat: function (nodes, pId) {\r\n if (!nodes) return [];\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = BI.clone(nodes[i]);\r\n node.pId = node.pId == null ? pId : node.pId;\r\n delete node.children;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = BI.clone(nodes);\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n delete newNodes.children;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.transformToArrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n arrayFormat: function (nodes, pId) {\r\n if (!nodes) {\r\n return [];\r\n }\r\n var r = [];\r\n if (BI.isArray(nodes)) {\r\n for (var i = 0, l = nodes.length; i < l; i++) {\r\n var node = nodes[i];\r\n node.pId = node.pId == null ? pId : node.pId;\r\n r.push(node);\r\n if (nodes[i][\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[i][\"children\"], node.id));\r\n }\r\n }\r\n } else {\r\n var newNodes = nodes;\r\n newNodes.pId = newNodes.pId == null ? pId : newNodes.pId;\r\n r.push(newNodes);\r\n if (nodes[\"children\"]) {\r\n r = r.concat(BI.Tree.arrayFormat(nodes[\"children\"], newNodes.id));\r\n }\r\n }\r\n return r;\r\n },\r\n\r\n transformToTreeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = BI.clone(sNodes[i]);\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n delete tmpMap[sNodes[i].id].pId;\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n treeFormat: function (sNodes) {\r\n var i, l;\r\n if (!sNodes) {\r\n return [];\r\n }\r\n\r\n if (BI.isArray(sNodes)) {\r\n var r = [];\r\n var tmpMap = {};\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (BI.isNull(sNodes[i].id)) {\r\n return sNodes;\r\n }\r\n tmpMap[sNodes[i].id] = sNodes[i];\r\n }\r\n for (i = 0, l = sNodes.length; i < l; i++) {\r\n if (tmpMap[sNodes[i].pId] && sNodes[i].id !== sNodes[i].pId) {\r\n if (!tmpMap[sNodes[i].pId].children) {\r\n tmpMap[sNodes[i].pId].children = [];\r\n }\r\n tmpMap[sNodes[i].pId].children.push(tmpMap[sNodes[i].id]);\r\n } else {\r\n r.push(tmpMap[sNodes[i].id]);\r\n }\r\n }\r\n return r;\r\n }\r\n return [sNodes];\r\n \r\n },\r\n\r\n traversal: function (array, callback) {\r\n if (BI.isNull(array)) {\r\n return;\r\n }\r\n var self = this;\r\n BI.some(array, function (i, item) {\r\n if (callback(i, item) === false) {\r\n return true;\r\n }\r\n self.traversal(item.children, callback);\r\n });\r\n }\r\n });\r\n})();// 向量操作\r\nBI.Vector = function (x, y) {\r\n this.x = x;\r\n this.y = y;\r\n};\r\nBI.Vector.prototype = {\r\n constructor: BI.Vector,\r\n cross: function (v) {\r\n return (this.x * v.y - this.y * v.x);\r\n },\r\n length: function (v) {\r\n return (Math.sqrt(this.x * v.x + this.y * v.y));\r\n }\r\n};\r\nBI.Region = function (x, y, w, h) {\r\n this.x = x;\r\n this.y = y;\r\n this.w = w;\r\n this.h = h;\r\n};\r\nBI.Region.prototype = {\r\n constructor: BI.Region,\r\n // 判断两个区域是否相交,若相交,则要么顶点互相包含,要么矩形边界(或对角线)相交\r\n isIntersects: function (obj) {\r\n if (this.isPointInside(obj.x, obj.y) ||\r\n this.isPointInside(obj.x + obj.w, obj.y) ||\r\n this.isPointInside(obj.x, obj.y + obj.h) ||\r\n this.isPointInside(obj.x + obj.w, obj.y + obj.h)) {\r\n return true;\r\n } else if (obj.isPointInside(this.x, this.y) ||\r\n obj.isPointInside(this.x + this.w, this.y) ||\r\n obj.isPointInside(this.x, this.y + this.h) ||\r\n obj.isPointInside(this.x + this.w, this.y + this.h)) {\r\n return true;\r\n } else if (obj.x != null && obj.y != null)// 判断矩形对角线相交 |v1 X v2||v1 X v3| < 0\r\n {\r\n var vector1 = new BI.Vector(this.w, this.h);// 矩形对角线向量\r\n var vector2 = new BI.Vector(obj.x - this.x, obj.y - this.y);\r\n var vector3 = new BI.Vector(vector2.x + obj.w, vector2.y + obj.h);\r\n if ((vector1.cross(vector2) * vector1.cross(vector3)) < 0) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n },\r\n // 判断一个点是否在这个区域内部\r\n isPointInside: function (x, y) {\r\n if (this.x == null || this.y == null) {\r\n return false;\r\n }\r\n if (x >= this.x && x <= this.x + this.w && y >= this.y && y <= this.y + this.h) {\r\n return true;\r\n }\r\n return false;\r\n },\r\n // 返回区域的重心,因为是矩形所以返回中点\r\n getPosition: function () {\r\n var pos = [];\r\n pos.push(this.x + this.w / 2);\r\n pos.push(this.y + this.h / 2);\r\n return pos;\r\n }\r\n};BI.i18n = {\r\n \"BI-Multi_Date_Quarter_End\": \"季度末\",\r\n \"BI-Multi_Date_Month_Begin\": \"月初\",\r\n \"BI-Multi_Date_YMD\": \"年月日\",\r\n \"BI-Custom_Color\": \"自定义颜色\",\r\n \"BI-Numerical_Interval_Input_Data\": \"请输入数值\",\r\n \"BI-Please_Input_Natural_Number\": \"请输入非负整数\",\r\n \"BI-No_More_Data\": \"无更多数据\",\r\n \"BI-Basic_Altogether\": \"共\",\r\n \"BI-Basic_Sunday\": \"星期日\",\r\n \"BI-Widget_Background_Colour\": \"组件背景\",\r\n \"BI-Color_Picker_Error_Text\": \"请输入0~255的正整数\",\r\n \"BI-Multi_Date_Month\": \"月\",\r\n \"BI-No_Selected_Item\": \"没有可选项\",\r\n \"BI-Multi_Date_Year_Begin\": \"年初\",\r\n \"BI-Quarter_1\": \"第1季度\",\r\n \"BI-Quarter_2\": \"第2季度\",\r\n \"BI-Quarter_3\": \"第3季度\",\r\n \"BI-Quarter_4\": \"第4季度\",\r\n \"BI-Multi_Date_Year_Next\": \"年后\",\r\n \"BI-Multi_Date_Month_Prev\": \"个月前\",\r\n \"BI-Month_Trigger_Error_Text\": \"请输入1~12的正整数\",\r\n \"BI-Less_And_Equal\": \"小于等于\",\r\n \"BI-Year_Trigger_Invalid_Text\": \"请输入有效时间\",\r\n \"BI-Multi_Date_Week_Next\": \"周后\",\r\n \"BI-Font_Size\": \"字号\",\r\n \"BI-Basic_Total\": \"共\",\r\n \"BI-Already_Selected\": \"已选择\",\r\n \"BI-Formula_Insert\": \"插入\",\r\n \"BI-Select_All\": \"全选\",\r\n \"BI-Basic_Tuesday\": \"星期二\",\r\n \"BI-Multi_Date_Month_End\": \"月末\",\r\n \"BI-Load_More\": \"点击加载更多数据\",\r\n \"BI-Basic_September\": \"九月\",\r\n \"BI-Current_Is_Last_Page\": \"当前已是最后一页\",\r\n \"BI-Basic_Auto\": \"自动\",\r\n \"BI-Basic_Count\": \"个\",\r\n \"BI-Basic_Value\": \"值\",\r\n \"BI-Basic_Unrestricted\": \"无限制\",\r\n \"BI-Quarter_Trigger_Error_Text\": \"请输入1~4的正整数\",\r\n \"BI-Basic_More\": \"更多\",\r\n \"BI-Basic_Wednesday\": \"星期三\",\r\n \"BI-Basic_Bold\": \"加粗\",\r\n \"BI-Basic_Simple_Saturday\": \"六\",\r\n \"BI-Multi_Date_Month_Next\": \"个月后\",\r\n \"BI-Basic_March\": \"三月\",\r\n \"BI-Current_Is_First_Page\": \"当前已是第一页\",\r\n \"BI-Basic_Thursday\": \"星期四\",\r\n \"BI-Basic_Prompt\": \"提示\",\r\n \"BI-Multi_Date_Today\": \"今天\",\r\n \"BI-Multi_Date_Quarter_Prev\": \"个季度前\",\r\n \"BI-Row_Header\": \"行表头\",\r\n \"BI-Date_Trigger_Error_Text\": \"日期格式示例:2015-3-11\",\r\n \"BI-Basic_Cancel\": \"取消\",\r\n \"BI-Basic_January\": \"一月\",\r\n \"BI-Basic_June\": \"六月\",\r\n \"BI-Basic_July\": \"七月\",\r\n \"BI-Basic_April\": \"四月\",\r\n \"BI-Multi_Date_Quarter_Begin\": \"季度初\",\r\n \"BI-Multi_Date_Week\": \"周\",\r\n \"BI-Click_Blank_To_Select\": \"点击\\\"空格键\\\"选中完全匹配项\",\r\n \"BI-Basic_August\": \"八月\",\r\n \"BI-Word_Align_Left\": \"文字居左\",\r\n \"BI-Basic_November\": \"十一月\",\r\n \"BI-Font_Colour\": \"字体颜色\",\r\n \"BI-Multi_Date_Day_Prev\": \"天前\",\r\n \"BI-Select_Part\": \"部分选择\",\r\n \"BI-Multi_Date_Day_Next\": \"天后\",\r\n \"BI-Less_Than\": \"小于\",\r\n \"BI-Basic_February\": \"二月\",\r\n \"BI-Multi_Date_Year\": \"年\",\r\n \"BI-Number_Index\": \"序号\",\r\n \"BI-Multi_Date_Week_Prev\": \"周前\",\r\n \"BI-Next_Page\": \"下一页\",\r\n \"BI-Right_Page\": \"向右翻页\",\r\n \"BI-Numerical_Interval_Signal_Value\": \"前后值相等,请将操作符改为“≤”\",\r\n \"BI-Basic_December\": \"十二月\",\r\n \"BI-Basic_Saturday\": \"星期六\",\r\n \"BI-Basic_Simple_Wednesday\": \"三\",\r\n \"BI-Multi_Date_Quarter_Next\": \"个季度后\",\r\n \"BI-Basic_October\": \"十月\",\r\n \"BI-Basic_Simple_Friday\": \"五\",\r\n \"BI-Basic_Save\": \"保存\",\r\n \"BI-Numerical_Interval_Number_Value\": \"请保证前面的数值小于/等于后面的数值\",\r\n \"BI-Previous_Page\": \"上一页\",\r\n \"BI-No_Select\": \"搜索结果为空\",\r\n \"BI-Basic_Clears\": \"清空\",\r\n \"BI-Created_By_Me\": \"我创建的\",\r\n \"BI-Basic_Simple_Tuesday\": \"二\",\r\n \"BI-Word_Align_Right\": \"文字居右\",\r\n \"BI-Summary_Values\": \"汇总\",\r\n \"BI-Basic_Clear\": \"清除\",\r\n \"BI-Upload_File_Size_Error\": \"文件大小不支持\",\r\n \"BI-Up_Page\": \"向上翻页\",\r\n \"BI-Basic_Simple_Sunday\": \"日\",\r\n \"BI-Multi_Date_Relative_Current_Time\": \"相对当前时间\",\r\n \"BI-Selected_Data\": \"已选数据:\",\r\n \"BI-Multi_Date_Quarter\": \"季度\",\r\n \"BI-Check_Selected\": \"查看已选\",\r\n \"BI-Basic_Search\": \"搜索\",\r\n \"BI-Basic_May\": \"五月\",\r\n \"BI-Continue_Select\": \"继续选择\",\r\n \"BI-Please_Input_Positive_Integer\": \"请输入正整数\",\r\n \"BI-Upload_File_Type_Error\": \"文件类型不支持\",\r\n \"BI-Upload_File_Error\": \"文件上传失败\",\r\n \"BI-Basic_Friday\": \"星期五\",\r\n \"BI-Down_Page\": \"向下翻页\",\r\n \"BI-Basic_Monday\": \"星期一\",\r\n \"BI-Left_Page\": \"向左翻页\",\r\n \"BI-Transparent_Color\": \"透明\",\r\n \"BI-Basic_Simple_Monday\": \"一\",\r\n \"BI-Multi_Date_Year_End\": \"年末\",\r\n \"BI-Time_Interval_Error_Text\": \"请保证开始时间早于/等于结束时间\",\r\n \"BI-Basic_Time\": \"时间\",\r\n \"BI-Basic_OK\": \"确定\",\r\n \"BI-Basic_Sure\": \"确定\",\r\n \"BI-Basic_Simple_Thursday\": \"四\",\r\n \"BI-Multi_Date_Year_Prev\": \"年前\",\r\n \"BI-Tiao_Data\": \"条数据\",\r\n \"BI-Basic_Italic\": \"斜体\",\r\n \"BI-Basic_Dynamic_Title\": \"动态时间\",\r\n \"BI-Basic_Year\": \"年\",\r\n \"BI-Basic_Single_Quarter\": \"季\",\r\n \"BI-Basic_Month\": \"月\",\r\n \"BI-Basic_Week\": \"周\",\r\n \"BI-Basic_Day\": \"天\",\r\n \"BI-Basic_Work_Day\": \"工作日\",\r\n \"BI-Basic_Front\": \"前\",\r\n \"BI-Basic_Behind\": \"后\",\r\n \"BI-Basic_Empty\": \"空\",\r\n \"BI-Basic_Month_End\": \"月末\",\r\n \"BI-Basic_Month_Begin\": \"月初\",\r\n \"BI-Basic_Year_End\": \"年末\",\r\n \"BI-Basic_Year_Begin\": \"年初\",\r\n \"BI-Basic_Quarter_End\": \"季末\",\r\n \"BI-Basic_Quarter_Begin\": \"季初\",\r\n \"BI-Basic_Week_End\": \"周末\",\r\n \"BI-Basic_Week_Begin\": \"周初\",\r\n \"BI-Basic_Current_Day\": \"当天\",\r\n \"BI-Basic_Begin_Start\": \"初\",\r\n \"BI-Basic_End_Stop\": \"末\",\r\n \"BI-Basic_Current_Year\": \"今年\",\r\n \"BI-Basic_Year_Fen\": \"年份\",\r\n \"BI-Basic_Current_Month\": \"本月\",\r\n \"BI-Basic_Current_Quarter\": \"本季度\",\r\n \"BI-Basic_Year_Month\": \"年月\",\r\n \"BI-Basic_Year_Quarter\": \"年季度\",\r\n \"BI-Basic_Input_Can_Not_Null\": \"输入框不能为空\",\r\n \"BI-Basic_Date_Time_Error_Text\": \"日期格式示例:2015-3-11 00:00:00\",\r\n \"BI-Basic_Input_From_To_Number\": \"请输入{R1}的数值\",\r\n \"BI-Basic_Or\": \"或\",\r\n \"BI-Basic_And\": \"且\",\r\n \"BI-Conf_Add_Formula\": \"添加公式\",\r\n \"BI-Conf_Add_Condition\": \"添加条件\",\r\n \"BI-Conf_Formula_And\": \"且公式条件\",\r\n \"BI-Conf_Formula_Or\": \"或公式条件\",\r\n \"BI-Conf_Condition_And\": \"且条件\",\r\n \"BI-Conf_Condition_Or\": \"或条件\",\r\n \"BI-Microsoft_YaHei\": \"微软雅黑\",\r\n \"BI-Apple_Light\": \"苹方-light\",\r\n \"BI-Font_Family\": \"字体\",\r\n \"BI-Basic_Please_Input_Content\": \"请输入内容\",\r\n \"BI-Word_Align_Center\": \"文字居中\",\r\n \"BI-Basic_Please_Enter_Number_Between\": \"请输入{R1}-{R2}的值\",\r\n \"BI-More_Than\": \"大于\",\r\n \"BI-More_And_Equal\": \"大于等于\",\r\n \"BI-Please_Enter_SQL\": \"请输入SQL\",\r\n \"BI-Basic_Click_To_Add_Text\": \"+点击新增\\\"{R1}\\\"\",\r\n \"BI-Basic_Please_Select\": \"请选择\",\r\n \"BI-Basic_Font_Color\": \"文字颜色\",\r\n \"BI-Basic_Background_Color\": \"背景色\",\r\n \"BI-Basic_Underline\": \"下划线\",\r\n \"BI-Basic_Param_Month\": \"{R1}月\",\r\n \"BI-Basic_Param_Day\": \"{R1}日\",\r\n \"BI-Basic_Param_Quarter\": \"{R1}季度\",\r\n \"BI-Basic_Param_Week_Count\": \"第{R1}周\",\r\n \"BI-Basic_Param_Hour\": \"{R1}时\",\r\n \"BI-Basic_Param_Minute\": \"{R1}分\",\r\n \"BI-Basic_Param_Second\": \"{R1}秒\",\r\n \"BI-Basic_Param_Year\": \"{R1}年\",\r\n \"BI-Basic_Date_Day\": \"日\",\r\n \"BI-Basic_Hour_Sin\": \"时\",\r\n \"BI-Basic_Seconds\": \"秒\",\r\n \"BI-Basic_Minute\": \"分\",\r\n \"BI-Basic_Wan\": \"万\",\r\n \"BI-Basic_Million\": \"百万\",\r\n \"BI-Basic_Billion\": \"亿\",\r\n \"BI-Basic_Quarter\": \"季度\",\r\n \"BI-Basic_No_Select\": \"不选\",\r\n \"BI-Basic_Now\": \"此刻\"\r\n};/**\r\n * Created by astronaut007 on 2018/8/8\r\n */\r\n// 牵扯到国际化这些常量在页面加载后再生效\r\n// full day names\r\nBI.Date = BI.Date || {};\r\nBI.Date._DN = [\"星期日\",\r\n \"星期一\",\r\n \"星期二\",\r\n \"星期三\",\r\n \"星期四\",\r\n \"星期五\",\r\n \"星期六\",\r\n \"星期日\"];\r\n\r\n// short day names\r\nBI.Date._SDN = [\"日\",\r\n \"一\",\r\n \"二\",\r\n \"三\",\r\n \"四\",\r\n \"五\",\r\n \"六\",\r\n \"日\"];\r\n\r\n// Monday first, etc.\r\nBI.Date._FD = 1;\r\n\r\n// full month namesdat\r\nBI.Date._MN = [\r\n \"一月\",\r\n \"二月\",\r\n \"三月\",\r\n \"四月\",\r\n \"五月\",\r\n \"六月\",\r\n \"七月\",\r\n \"八月\",\r\n \"九月\",\r\n \"十月\",\r\n \"十一月\",\r\n \"十二月\"];\r\n\r\n// short month names\r\nBI.Date._SMN = [0,\r\n 1,\r\n 2,\r\n 3,\r\n 4,\r\n 5,\r\n 6,\r\n 7,\r\n 8,\r\n 9,\r\n 10,\r\n 11];\r\n\r\nBI.Date._QN = [\"\", \"第1季度\",\r\n \"第2季度\",\r\n \"第3季度\",\r\n \"第4季度\"];\r\n\r\n/** Adds the number of days array to the Date object. */\r\nBI.Date._MD = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\r\n\r\n// 实际上无论周几作为一周的第一天,周初周末都是在-6-0间做偏移,用一个数组就可以\r\nBI.Date._OFFSET = [0, -1, -2, -3, -4, -5, -6];\r\n/**\r\n * 缓冲池\r\n * @type {{Buffer: {}}}\r\n */\r\n\r\n(function () {\r\n var Buffer = {};\r\n var MODE = false;// 设置缓存模式为关闭\r\n\r\n BI.BufferPool = {\r\n put: function (name, cache) {\r\n if (BI.isNotNull(Buffer[name])) {\r\n throw new Error(\"Buffer Pool has the key already!\");\r\n }\r\n Buffer[name] = cache;\r\n },\r\n\r\n get: function (name) {\r\n return Buffer[name];\r\n }\r\n };\r\n})();/**\r\n * 共享池\r\n * @type {{Shared: {}}}\r\n */\r\n\r\n(function () {\r\n var _Shared = {};\r\n BI.SharingPool = {\r\n _Shared: _Shared,\r\n put: function (name, shared) {\r\n _Shared[name] = shared;\r\n },\r\n\r\n cat: function () {\r\n var args = Array.prototype.slice.call(arguments, 0),\r\n copy = _Shared;\r\n for (var i = 0; i < args.length; i++) {\r\n copy = copy && copy[args[i]];\r\n }\r\n return copy;\r\n },\r\n\r\n get: function () {\r\n return BI.deepClone(this.cat.apply(this, arguments));\r\n },\r\n\r\n remove: function (key) {\r\n delete _Shared[key];\r\n }\r\n };\r\n})();BI.Req = {\r\n\r\n};\r\n\n//# sourceMappingURL=utils.js.map"]}