index.js 82 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252
  1. module.exports = (function() {
  2. var __MODS__ = {};
  3. var __DEFINE__ = function(modId, func, req) { var m = { exports: {}, _tempexports: {} }; __MODS__[modId] = { status: 0, func: func, req: req, m: m }; };
  4. var __REQUIRE__ = function(modId, source) { if(!__MODS__[modId]) return require(source); if(!__MODS__[modId].status) { var m = __MODS__[modId].m; m._exports = m._tempexports; var desp = Object.getOwnPropertyDescriptor(m, "exports"); if (desp && desp.configurable) Object.defineProperty(m, "exports", { set: function (val) { if(typeof val === "object" && val !== m._exports) { m._exports.__proto__ = val.__proto__; Object.keys(val).forEach(function (k) { m._exports[k] = val[k]; }); } m._tempexports = val }, get: function () { return m._tempexports; } }); __MODS__[modId].status = 1; __MODS__[modId].func(__MODS__[modId].req, m, m.exports); } return __MODS__[modId].m.exports; };
  5. var __REQUIRE_WILDCARD__ = function(obj) { if(obj && obj.__esModule) { return obj; } else { var newObj = {}; if(obj != null) { for(var k in obj) { if (Object.prototype.hasOwnProperty.call(obj, k)) newObj[k] = obj[k]; } } newObj.default = obj; return newObj; } };
  6. var __REQUIRE_DEFAULT__ = function(obj) { return obj && obj.__esModule ? obj.default : obj; };
  7. __DEFINE__(1603070659026, function(require, module, exports) {
  8. Object.defineProperty(exports, "__esModule", { value: true });
  9. // array
  10. var contains_1 = require("./contains");
  11. exports.contains = contains_1.default;
  12. exports.includes = contains_1.default;
  13. var difference_1 = require("./difference");
  14. exports.difference = difference_1.default;
  15. var find_1 = require("./find");
  16. exports.find = find_1.default;
  17. var find_index_1 = require("./find-index");
  18. exports.findIndex = find_index_1.default;
  19. var first_value_1 = require("./first-value");
  20. exports.firstValue = first_value_1.default;
  21. var flatten_1 = require("./flatten");
  22. exports.flatten = flatten_1.default;
  23. var flatten_deep_1 = require("./flatten-deep");
  24. exports.flattenDeep = flatten_deep_1.default;
  25. var get_range_1 = require("./get-range");
  26. exports.getRange = get_range_1.default;
  27. var pull_1 = require("./pull");
  28. exports.pull = pull_1.default;
  29. var pull_at_1 = require("./pull-at");
  30. exports.pullAt = pull_at_1.default;
  31. var reduce_1 = require("./reduce");
  32. exports.reduce = reduce_1.default;
  33. var remove_1 = require("./remove");
  34. exports.remove = remove_1.default;
  35. var sort_by_1 = require("./sort-by");
  36. exports.sortBy = sort_by_1.default;
  37. var union_1 = require("./union");
  38. exports.union = union_1.default;
  39. var uniq_1 = require("./uniq");
  40. exports.uniq = uniq_1.default;
  41. var values_of_key_1 = require("./values-of-key");
  42. exports.valuesOfKey = values_of_key_1.default;
  43. var head_1 = require("./head");
  44. exports.head = head_1.default;
  45. var last_1 = require("./last");
  46. exports.last = last_1.default;
  47. var starts_with_1 = require("./starts-with");
  48. exports.startsWith = starts_with_1.default;
  49. var ends_with_1 = require("./ends-with");
  50. exports.endsWith = ends_with_1.default;
  51. var filter_1 = require("./filter");
  52. exports.filter = filter_1.default;
  53. var every_1 = require("./every");
  54. exports.every = every_1.default;
  55. var some_1 = require("./some");
  56. exports.some = some_1.default;
  57. var group_1 = require("./group");
  58. exports.group = group_1.default;
  59. var group_by_1 = require("./group-by");
  60. exports.groupBy = group_by_1.default;
  61. var group_to_map_1 = require("./group-to-map");
  62. exports.groupToMap = group_to_map_1.default;
  63. // event
  64. var get_wrap_behavior_1 = require("./get-wrap-behavior");
  65. exports.getWrapBehavior = get_wrap_behavior_1.default;
  66. var wrap_behavior_1 = require("./wrap-behavior");
  67. exports.wrapBehavior = wrap_behavior_1.default;
  68. // format
  69. var number2color_1 = require("./number2color");
  70. exports.number2color = number2color_1.default;
  71. var parse_radius_1 = require("./parse-radius");
  72. exports.parseRadius = parse_radius_1.default;
  73. // math
  74. var clamp_1 = require("./clamp");
  75. exports.clamp = clamp_1.default;
  76. var fixed_base_1 = require("./fixed-base");
  77. exports.fixedBase = fixed_base_1.default;
  78. var is_decimal_1 = require("./is-decimal");
  79. exports.isDecimal = is_decimal_1.default;
  80. var is_even_1 = require("./is-even");
  81. exports.isEven = is_even_1.default;
  82. var is_integer_1 = require("./is-integer");
  83. exports.isInteger = is_integer_1.default;
  84. var is_negative_1 = require("./is-negative");
  85. exports.isNegative = is_negative_1.default;
  86. var is_number_equal_1 = require("./is-number-equal");
  87. exports.isNumberEqual = is_number_equal_1.default;
  88. var is_odd_1 = require("./is-odd");
  89. exports.isOdd = is_odd_1.default;
  90. var is_positive_1 = require("./is-positive");
  91. exports.isPositive = is_positive_1.default;
  92. var max_by_1 = require("./max-by");
  93. exports.maxBy = max_by_1.default;
  94. var min_by_1 = require("./min-by");
  95. exports.minBy = min_by_1.default;
  96. var mod_1 = require("./mod");
  97. exports.mod = mod_1.default;
  98. var to_degree_1 = require("./to-degree");
  99. exports.toDegree = to_degree_1.default;
  100. var to_integer_1 = require("./to-integer");
  101. exports.toInteger = to_integer_1.default;
  102. var to_radian_1 = require("./to-radian");
  103. exports.toRadian = to_radian_1.default;
  104. // object
  105. var for_in_1 = require("./for-in");
  106. exports.forIn = for_in_1.default;
  107. var has_1 = require("./has");
  108. exports.has = has_1.default;
  109. var has_key_1 = require("./has-key");
  110. exports.hasKey = has_key_1.default;
  111. var has_value_1 = require("./has-value");
  112. exports.hasValue = has_value_1.default;
  113. var keys_1 = require("./keys");
  114. exports.keys = keys_1.default;
  115. var is_match_1 = require("./is-match");
  116. exports.isMatch = is_match_1.default;
  117. var values_1 = require("./values");
  118. exports.values = values_1.default;
  119. // string
  120. var lower_case_1 = require("./lower-case");
  121. exports.lowerCase = lower_case_1.default;
  122. var lower_first_1 = require("./lower-first");
  123. exports.lowerFirst = lower_first_1.default;
  124. var substitute_1 = require("./substitute");
  125. exports.substitute = substitute_1.default;
  126. var upper_case_1 = require("./upper-case");
  127. exports.upperCase = upper_case_1.default;
  128. var upper_first_1 = require("./upper-first");
  129. exports.upperFirst = upper_first_1.default;
  130. // type
  131. var get_type_1 = require("./get-type");
  132. exports.getType = get_type_1.default;
  133. var is_arguments_1 = require("./is-arguments");
  134. exports.isArguments = is_arguments_1.default;
  135. var is_array_1 = require("./is-array");
  136. exports.isArray = is_array_1.default;
  137. var is_array_like_1 = require("./is-array-like");
  138. exports.isArrayLike = is_array_like_1.default;
  139. var is_boolean_1 = require("./is-boolean");
  140. exports.isBoolean = is_boolean_1.default;
  141. var is_date_1 = require("./is-date");
  142. exports.isDate = is_date_1.default;
  143. var is_error_1 = require("./is-error");
  144. exports.isError = is_error_1.default;
  145. var is_function_1 = require("./is-function");
  146. exports.isFunction = is_function_1.default;
  147. var is_finite_1 = require("./is-finite");
  148. exports.isFinite = is_finite_1.default;
  149. var is_nil_1 = require("./is-nil");
  150. exports.isNil = is_nil_1.default;
  151. var is_null_1 = require("./is-null");
  152. exports.isNull = is_null_1.default;
  153. var is_number_1 = require("./is-number");
  154. exports.isNumber = is_number_1.default;
  155. var is_object_1 = require("./is-object");
  156. exports.isObject = is_object_1.default;
  157. var is_object_like_1 = require("./is-object-like");
  158. exports.isObjectLike = is_object_like_1.default;
  159. var is_plain_object_1 = require("./is-plain-object");
  160. exports.isPlainObject = is_plain_object_1.default;
  161. var is_prototype_1 = require("./is-prototype");
  162. exports.isPrototype = is_prototype_1.default;
  163. var is_reg_exp_1 = require("./is-reg-exp");
  164. exports.isRegExp = is_reg_exp_1.default;
  165. var is_string_1 = require("./is-string");
  166. exports.isString = is_string_1.default;
  167. var is_type_1 = require("./is-type");
  168. exports.isType = is_type_1.default;
  169. var is_undefined_1 = require("./is-undefined");
  170. exports.isUndefined = is_undefined_1.default;
  171. var is_element_1 = require("./is-element");
  172. exports.isElement = is_element_1.default;
  173. var request_animation_frame_1 = require("./request-animation-frame");
  174. exports.requestAnimationFrame = request_animation_frame_1.default;
  175. var clear_animation_frame_1 = require("./clear-animation-frame");
  176. exports.clearAnimationFrame = clear_animation_frame_1.default;
  177. // other
  178. var augment_1 = require("./augment");
  179. exports.augment = augment_1.default;
  180. var clone_1 = require("./clone");
  181. exports.clone = clone_1.default;
  182. var debounce_1 = require("./debounce");
  183. exports.debounce = debounce_1.default;
  184. var memoize_1 = require("./memoize");
  185. exports.memoize = memoize_1.default;
  186. var deep_mix_1 = require("./deep-mix");
  187. exports.deepMix = deep_mix_1.default;
  188. var each_1 = require("./each");
  189. exports.each = each_1.default;
  190. var extend_1 = require("./extend");
  191. exports.extend = extend_1.default;
  192. var index_of_1 = require("./index-of");
  193. exports.indexOf = index_of_1.default;
  194. var is_empty_1 = require("./is-empty");
  195. exports.isEmpty = is_empty_1.default;
  196. var is_equal_1 = require("./is-equal");
  197. exports.isEqual = is_equal_1.default;
  198. var is_equal_with_1 = require("./is-equal-with");
  199. exports.isEqualWith = is_equal_with_1.default;
  200. var map_1 = require("./map");
  201. exports.map = map_1.default;
  202. var map_values_1 = require("./map-values");
  203. exports.mapValues = map_values_1.default;
  204. var mix_1 = require("./mix");
  205. exports.mix = mix_1.default;
  206. exports.assign = mix_1.default;
  207. var get_1 = require("./get");
  208. exports.get = get_1.default;
  209. var set_1 = require("./set");
  210. exports.set = set_1.default;
  211. var pick_1 = require("./pick");
  212. exports.pick = pick_1.default;
  213. var throttle_1 = require("./throttle");
  214. exports.throttle = throttle_1.default;
  215. var to_array_1 = require("./to-array");
  216. exports.toArray = to_array_1.default;
  217. var to_string_1 = require("./to-string");
  218. exports.toString = to_string_1.default;
  219. var unique_id_1 = require("./unique-id");
  220. exports.uniqueId = unique_id_1.default;
  221. var noop_1 = require("./noop");
  222. exports.noop = noop_1.default;
  223. var identity_1 = require("./identity");
  224. exports.identity = identity_1.default;
  225. var size_1 = require("./size");
  226. exports.size = size_1.default;
  227. // 不知道为什么,需要把这个 export,不然 ts 会报类型错误
  228. var cache_1 = require("./cache");
  229. exports.Cache = cache_1.default;
  230. //# sourceMappingURL=index.js.map
  231. }, function(modId) {var map = {"./contains":1603070659027,"./difference":1603070659029,"./find":1603070659031,"./find-index":1603070659042,"./first-value":1603070659043,"./flatten":1603070659044,"./flatten-deep":1603070659045,"./get-range":1603070659046,"./pull":1603070659047,"./pull-at":1603070659048,"./reduce":1603070659049,"./remove":1603070659050,"./sort-by":1603070659051,"./union":1603070659053,"./uniq":1603070659054,"./values-of-key":1603070659055,"./head":1603070659056,"./last":1603070659057,"./starts-with":1603070659058,"./ends-with":1603070659059,"./filter":1603070659030,"./every":1603070659060,"./some":1603070659061,"./group":1603070659062,"./group-by":1603070659064,"./group-to-map":1603070659063,"./get-wrap-behavior":1603070659065,"./wrap-behavior":1603070659066,"./number2color":1603070659067,"./parse-radius":1603070659068,"./clamp":1603070659069,"./fixed-base":1603070659070,"./is-decimal":1603070659071,"./is-even":1603070659073,"./is-integer":1603070659074,"./is-negative":1603070659075,"./is-number-equal":1603070659076,"./is-odd":1603070659077,"./is-positive":1603070659078,"./max-by":1603070659079,"./min-by":1603070659080,"./mod":1603070659081,"./to-degree":1603070659082,"./to-integer":1603070659083,"./to-radian":1603070659084,"./for-in":1603070659085,"./has":1603070659086,"./has-key":1603070659087,"./has-value":1603070659088,"./keys":1603070659036,"./is-match":1603070659034,"./values":1603070659089,"./lower-case":1603070659090,"./lower-first":1603070659092,"./substitute":1603070659093,"./upper-case":1603070659094,"./upper-first":1603070659095,"./get-type":1603070659096,"./is-arguments":1603070659097,"./is-array":1603070659038,"./is-array-like":1603070659028,"./is-boolean":1603070659098,"./is-date":1603070659099,"./is-error":1603070659100,"./is-function":1603070659032,"./is-finite":1603070659101,"./is-nil":1603070659035,"./is-null":1603070659102,"./is-number":1603070659072,"./is-object":1603070659039,"./is-object-like":1603070659041,"./is-plain-object":1603070659040,"./is-prototype":1603070659103,"./is-reg-exp":1603070659104,"./is-string":1603070659052,"./is-type":1603070659033,"./is-undefined":1603070659105,"./is-element":1603070659106,"./request-animation-frame":1603070659107,"./clear-animation-frame":1603070659108,"./augment":1603070659109,"./clone":1603070659111,"./debounce":1603070659112,"./memoize":1603070659113,"./deep-mix":1603070659114,"./each":1603070659037,"./extend":1603070659115,"./index-of":1603070659116,"./is-empty":1603070659117,"./is-equal":1603070659118,"./is-equal-with":1603070659119,"./map":1603070659120,"./map-values":1603070659121,"./mix":1603070659110,"./get":1603070659122,"./set":1603070659123,"./pick":1603070659124,"./throttle":1603070659125,"./to-array":1603070659126,"./to-string":1603070659091,"./unique-id":1603070659127,"./noop":1603070659128,"./identity":1603070659129,"./size":1603070659130,"./cache":1603070659131}; return __REQUIRE__(map[modId], modId); })
  232. __DEFINE__(1603070659027, function(require, module, exports) {
  233. Object.defineProperty(exports, "__esModule", { value: true });
  234. var is_array_like_1 = require("./is-array-like");
  235. var contains = function (arr, value) {
  236. if (!is_array_like_1.default(arr)) {
  237. return false;
  238. }
  239. return arr.indexOf(value) > -1;
  240. };
  241. exports.default = contains;
  242. //# sourceMappingURL=contains.js.map
  243. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  244. __DEFINE__(1603070659028, function(require, module, exports) {
  245. Object.defineProperty(exports, "__esModule", { value: true });
  246. var isArrayLike = function (value) {
  247. /**
  248. * isArrayLike([1, 2, 3]) => true
  249. * isArrayLike(document.body.children) => true
  250. * isArrayLike('abc') => true
  251. * isArrayLike(Function) => false
  252. */
  253. return value !== null && typeof value !== 'function' && isFinite(value.length);
  254. };
  255. exports.default = isArrayLike;
  256. //# sourceMappingURL=is-array-like.js.map
  257. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  258. __DEFINE__(1603070659029, function(require, module, exports) {
  259. Object.defineProperty(exports, "__esModule", { value: true });
  260. var filter_1 = require("./filter");
  261. var contains_1 = require("./contains");
  262. /**
  263. * Flattens `array` a single level deep.
  264. *
  265. * @param {Array} arr The array to inspect.
  266. * @param {Array} values The values to exclude.
  267. * @return {Array} Returns the new array of filtered values.
  268. * @example
  269. * difference([2, 1], [2, 3]); // => [1]
  270. */
  271. var difference = function (arr, values) {
  272. if (values === void 0) { values = []; }
  273. return filter_1.default(arr, function (value) { return !contains_1.default(values, value); });
  274. };
  275. exports.default = difference;
  276. //# sourceMappingURL=difference.js.map
  277. }, function(modId) { var map = {"./filter":1603070659030,"./contains":1603070659027}; return __REQUIRE__(map[modId], modId); })
  278. __DEFINE__(1603070659030, function(require, module, exports) {
  279. Object.defineProperty(exports, "__esModule", { value: true });
  280. var is_array_like_1 = require("./is-array-like");
  281. var filter = function (arr, func) {
  282. if (!is_array_like_1.default(arr)) {
  283. return arr;
  284. }
  285. var result = [];
  286. for (var index = 0; index < arr.length; index++) {
  287. var value = arr[index];
  288. if (func(value, index)) {
  289. result.push(value);
  290. }
  291. }
  292. return result;
  293. };
  294. exports.default = filter;
  295. //# sourceMappingURL=filter.js.map
  296. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  297. __DEFINE__(1603070659031, function(require, module, exports) {
  298. Object.defineProperty(exports, "__esModule", { value: true });
  299. var is_function_1 = require("./is-function");
  300. var is_match_1 = require("./is-match");
  301. var is_array_1 = require("./is-array");
  302. var is_plain_object_1 = require("./is-plain-object");
  303. function find(arr, predicate) {
  304. if (!is_array_1.default(arr))
  305. return null;
  306. var _predicate;
  307. if (is_function_1.default(predicate)) {
  308. _predicate = predicate;
  309. }
  310. if (is_plain_object_1.default(predicate)) {
  311. _predicate = function (a) { return is_match_1.default(a, predicate); };
  312. }
  313. if (_predicate) {
  314. for (var i = 0; i < arr.length; i += 1) {
  315. if (_predicate(arr[i])) {
  316. return arr[i];
  317. }
  318. }
  319. }
  320. return null;
  321. }
  322. exports.default = find;
  323. //# sourceMappingURL=find.js.map
  324. }, function(modId) { var map = {"./is-function":1603070659032,"./is-match":1603070659034,"./is-array":1603070659038,"./is-plain-object":1603070659040}; return __REQUIRE__(map[modId], modId); })
  325. __DEFINE__(1603070659032, function(require, module, exports) {
  326. Object.defineProperty(exports, "__esModule", { value: true });
  327. /**
  328. * 是否为函数
  329. * @param {*} fn 对象
  330. * @return {Boolean} 是否函数
  331. */
  332. var is_type_1 = require("./is-type");
  333. exports.default = (function (value) {
  334. return is_type_1.default(value, 'Function');
  335. });
  336. //# sourceMappingURL=is-function.js.map
  337. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  338. __DEFINE__(1603070659033, function(require, module, exports) {
  339. Object.defineProperty(exports, "__esModule", { value: true });
  340. var toString = {}.toString;
  341. var isType = function (value, type) { return toString.call(value) === '[object ' + type + ']'; };
  342. exports.default = isType;
  343. //# sourceMappingURL=is-type.js.map
  344. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  345. __DEFINE__(1603070659034, function(require, module, exports) {
  346. Object.defineProperty(exports, "__esModule", { value: true });
  347. var is_nil_1 = require("./is-nil");
  348. var keys_1 = require("./keys");
  349. function isMatch(obj, attrs) {
  350. var _keys = keys_1.default(attrs);
  351. var length = _keys.length;
  352. if (is_nil_1.default(obj))
  353. return !length;
  354. for (var i = 0; i < length; i += 1) {
  355. var key = _keys[i];
  356. if (attrs[key] !== obj[key] || !(key in obj)) {
  357. return false;
  358. }
  359. }
  360. return true;
  361. }
  362. exports.default = isMatch;
  363. //# sourceMappingURL=is-match.js.map
  364. }, function(modId) { var map = {"./is-nil":1603070659035,"./keys":1603070659036}; return __REQUIRE__(map[modId], modId); })
  365. __DEFINE__(1603070659035, function(require, module, exports) {
  366. Object.defineProperty(exports, "__esModule", { value: true });
  367. // isFinite,
  368. var isNil = function (value) {
  369. /**
  370. * isNil(null) => true
  371. * isNil() => true
  372. */
  373. return value === null || value === undefined;
  374. };
  375. exports.default = isNil;
  376. //# sourceMappingURL=is-nil.js.map
  377. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  378. __DEFINE__(1603070659036, function(require, module, exports) {
  379. Object.defineProperty(exports, "__esModule", { value: true });
  380. var each_1 = require("./each");
  381. var is_function_1 = require("./is-function");
  382. var keys = Object.keys ? function (obj) { return Object.keys(obj); } : function (obj) {
  383. var result = [];
  384. each_1.default(obj, function (value, key) {
  385. if (!(is_function_1.default(obj) && key === 'prototype')) {
  386. result.push(key);
  387. }
  388. });
  389. return result;
  390. };
  391. exports.default = keys;
  392. //# sourceMappingURL=keys.js.map
  393. }, function(modId) { var map = {"./each":1603070659037,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  394. __DEFINE__(1603070659037, function(require, module, exports) {
  395. Object.defineProperty(exports, "__esModule", { value: true });
  396. var is_array_1 = require("./is-array");
  397. var is_object_1 = require("./is-object");
  398. function each(elements, func) {
  399. if (!elements) {
  400. return;
  401. }
  402. var rst;
  403. if (is_array_1.default(elements)) {
  404. for (var i = 0, len = elements.length; i < len; i++) {
  405. rst = func(elements[i], i);
  406. if (rst === false) {
  407. break;
  408. }
  409. }
  410. }
  411. else if (is_object_1.default(elements)) {
  412. for (var k in elements) {
  413. if (elements.hasOwnProperty(k)) {
  414. rst = func(elements[k], k);
  415. if (rst === false) {
  416. break;
  417. }
  418. }
  419. }
  420. }
  421. }
  422. exports.default = each;
  423. //# sourceMappingURL=each.js.map
  424. }, function(modId) { var map = {"./is-array":1603070659038,"./is-object":1603070659039}; return __REQUIRE__(map[modId], modId); })
  425. __DEFINE__(1603070659038, function(require, module, exports) {
  426. Object.defineProperty(exports, "__esModule", { value: true });
  427. var is_type_1 = require("./is-type");
  428. exports.default = (function (value) {
  429. return Array.isArray ?
  430. Array.isArray(value) :
  431. is_type_1.default(value, 'Array');
  432. });
  433. //# sourceMappingURL=is-array.js.map
  434. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  435. __DEFINE__(1603070659039, function(require, module, exports) {
  436. Object.defineProperty(exports, "__esModule", { value: true });
  437. exports.default = (function (value) {
  438. /**
  439. * isObject({}) => true
  440. * isObject([1, 2, 3]) => true
  441. * isObject(Function) => true
  442. * isObject(null) => false
  443. */
  444. var type = typeof value;
  445. return value !== null && type === 'object' || type === 'function';
  446. });
  447. //# sourceMappingURL=is-object.js.map
  448. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  449. __DEFINE__(1603070659040, function(require, module, exports) {
  450. Object.defineProperty(exports, "__esModule", { value: true });
  451. var is_object_like_1 = require("./is-object-like");
  452. var is_type_1 = require("./is-type");
  453. var isPlainObject = function (value) {
  454. /**
  455. * isObjectLike(new Foo) => false
  456. * isObjectLike([1, 2, 3]) => false
  457. * isObjectLike({ x: 0, y: 0 }) => true
  458. * isObjectLike(Object.create(null)) => true
  459. */
  460. if (!is_object_like_1.default(value) || !is_type_1.default(value, 'Object')) {
  461. return false;
  462. }
  463. if (Object.getPrototypeOf(value) === null) {
  464. return true;
  465. }
  466. var proto = value;
  467. while (Object.getPrototypeOf(proto) !== null) {
  468. proto = Object.getPrototypeOf(proto);
  469. }
  470. return Object.getPrototypeOf(value) === proto;
  471. };
  472. exports.default = isPlainObject;
  473. //# sourceMappingURL=is-plain-object.js.map
  474. }, function(modId) { var map = {"./is-object-like":1603070659041,"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  475. __DEFINE__(1603070659041, function(require, module, exports) {
  476. Object.defineProperty(exports, "__esModule", { value: true });
  477. var isObjectLike = function (value) {
  478. /**
  479. * isObjectLike({}) => true
  480. * isObjectLike([1, 2, 3]) => true
  481. * isObjectLike(Function) => false
  482. * isObjectLike(null) => false
  483. */
  484. return typeof value === 'object' && value !== null;
  485. };
  486. exports.default = isObjectLike;
  487. //# sourceMappingURL=is-object-like.js.map
  488. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  489. __DEFINE__(1603070659042, function(require, module, exports) {
  490. Object.defineProperty(exports, "__esModule", { value: true });
  491. function findIndex(arr, predicate, fromIndex) {
  492. if (fromIndex === void 0) { fromIndex = 0; }
  493. for (var i = fromIndex; i < arr.length; i++) {
  494. if (predicate(arr[i], i)) {
  495. // 找到终止循环
  496. return i;
  497. }
  498. }
  499. return -1;
  500. }
  501. exports.default = findIndex;
  502. //# sourceMappingURL=find-index.js.map
  503. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  504. __DEFINE__(1603070659043, function(require, module, exports) {
  505. Object.defineProperty(exports, "__esModule", { value: true });
  506. var is_nil_1 = require("./is-nil");
  507. var is_array_1 = require("./is-array");
  508. var firstValue = function (data, name) {
  509. var rst = null;
  510. for (var i = 0; i < data.length; i++) {
  511. var obj = data[i];
  512. var value = obj[name];
  513. if (!is_nil_1.default(value)) {
  514. if (is_array_1.default(value)) {
  515. rst = value[0]; // todo 这里是否应该使用递归,调用 firstValue @绝云
  516. }
  517. else {
  518. rst = value;
  519. }
  520. break;
  521. }
  522. }
  523. return rst;
  524. };
  525. exports.default = firstValue;
  526. //# sourceMappingURL=first-value.js.map
  527. }, function(modId) { var map = {"./is-nil":1603070659035,"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  528. __DEFINE__(1603070659044, function(require, module, exports) {
  529. Object.defineProperty(exports, "__esModule", { value: true });
  530. var is_array_1 = require("./is-array");
  531. /**
  532. * Flattens `array` a single level deep.
  533. *
  534. * @param {Array} arr The array to flatten.
  535. * @return {Array} Returns the new flattened array.
  536. * @example
  537. *
  538. * flatten([1, [2, [3, [4]], 5]]); // => [1, 2, [3, [4]], 5]
  539. */
  540. var flatten = function (arr) {
  541. if (!is_array_1.default(arr)) {
  542. return [];
  543. }
  544. var rst = [];
  545. for (var i = 0; i < arr.length; i++) {
  546. rst = rst.concat(arr[i]);
  547. }
  548. return rst;
  549. };
  550. exports.default = flatten;
  551. //# sourceMappingURL=flatten.js.map
  552. }, function(modId) { var map = {"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  553. __DEFINE__(1603070659045, function(require, module, exports) {
  554. Object.defineProperty(exports, "__esModule", { value: true });
  555. var is_array_1 = require("./is-array");
  556. /**
  557. * Flattens `array` a single level deep.
  558. *
  559. * @param {Array} arr The array to flatten.
  560. * @param {Array} result The array to return.
  561. * @return {Array} Returns the new flattened array.
  562. * @example
  563. *
  564. * flattenDeep([1, [2, [3, [4]], 5]]); // => [1, 2, 3, 4, 5]
  565. */
  566. var flattenDeep = function (arr, result) {
  567. if (result === void 0) { result = []; }
  568. if (!is_array_1.default(arr)) {
  569. result.push(arr);
  570. }
  571. else {
  572. for (var i = 0; i < arr.length; i += 1) {
  573. flattenDeep(arr[i], result);
  574. }
  575. }
  576. return result;
  577. };
  578. exports.default = flattenDeep;
  579. //# sourceMappingURL=flatten-deep.js.map
  580. }, function(modId) { var map = {"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  581. __DEFINE__(1603070659046, function(require, module, exports) {
  582. Object.defineProperty(exports, "__esModule", { value: true });
  583. var is_array_1 = require("./is-array");
  584. var getRange = function (values) {
  585. // 存在 NaN 时,min,max 判定会出问题
  586. var filterValues = values.filter(function (v) { return !isNaN(v); });
  587. if (!filterValues.length) { // 如果没有数值则直接返回0
  588. return {
  589. min: 0,
  590. max: 0,
  591. };
  592. }
  593. if (is_array_1.default(values[0])) {
  594. var tmp = [];
  595. for (var i = 0; i < values.length; i++) {
  596. tmp = tmp.concat(values[i]);
  597. }
  598. filterValues = tmp;
  599. }
  600. var max = Math.max.apply(null, filterValues);
  601. var min = Math.min.apply(null, filterValues);
  602. return {
  603. min: min,
  604. max: max,
  605. };
  606. };
  607. exports.default = getRange;
  608. //# sourceMappingURL=get-range.js.map
  609. }, function(modId) { var map = {"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  610. __DEFINE__(1603070659047, function(require, module, exports) {
  611. Object.defineProperty(exports, "__esModule", { value: true });
  612. var arrPrototype = Array.prototype;
  613. var splice = arrPrototype.splice;
  614. var indexOf = arrPrototype.indexOf;
  615. var pull = function (arr) {
  616. var values = [];
  617. for (var _i = 1; _i < arguments.length; _i++) {
  618. values[_i - 1] = arguments[_i];
  619. }
  620. for (var i = 0; i < values.length; i++) {
  621. var value = values[i];
  622. var fromIndex = -1;
  623. while ((fromIndex = indexOf.call(arr, value)) > -1) {
  624. splice.call(arr, fromIndex, 1);
  625. }
  626. }
  627. return arr;
  628. };
  629. exports.default = pull;
  630. //# sourceMappingURL=pull.js.map
  631. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  632. __DEFINE__(1603070659048, function(require, module, exports) {
  633. Object.defineProperty(exports, "__esModule", { value: true });
  634. var is_array_like_1 = require("./is-array-like");
  635. var splice = Array.prototype.splice;
  636. var pullAt = function pullAt(arr, indexes) {
  637. if (!is_array_like_1.default(arr)) {
  638. return [];
  639. }
  640. var length = arr ? indexes.length : 0;
  641. var last = length - 1;
  642. while (length--) {
  643. var previous = void 0;
  644. var index = indexes[length];
  645. if (length === last || index !== previous) {
  646. previous = index;
  647. splice.call(arr, index, 1);
  648. }
  649. }
  650. return arr;
  651. };
  652. exports.default = pullAt;
  653. //# sourceMappingURL=pull-at.js.map
  654. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  655. __DEFINE__(1603070659049, function(require, module, exports) {
  656. Object.defineProperty(exports, "__esModule", { value: true });
  657. var each_1 = require("./each");
  658. var is_array_1 = require("./is-array");
  659. var is_plain_object_1 = require("./is-plain-object");
  660. var reduce = function (arr, fn, init) {
  661. if (!is_array_1.default(arr) && !is_plain_object_1.default(arr)) {
  662. return arr;
  663. }
  664. var result = init;
  665. each_1.default(arr, function (data, i) {
  666. result = fn(result, data, i);
  667. });
  668. return result;
  669. };
  670. exports.default = reduce;
  671. //# sourceMappingURL=reduce.js.map
  672. }, function(modId) { var map = {"./each":1603070659037,"./is-array":1603070659038,"./is-plain-object":1603070659040}; return __REQUIRE__(map[modId], modId); })
  673. __DEFINE__(1603070659050, function(require, module, exports) {
  674. Object.defineProperty(exports, "__esModule", { value: true });
  675. var is_array_like_1 = require("./is-array-like");
  676. var pull_at_1 = require("./pull-at");
  677. var remove = function (arr, predicate) {
  678. /**
  679. * const arr = [1, 2, 3, 4]
  680. * const evens = remove(arr, n => n % 2 == 0)
  681. * console.log(arr) // => [1, 3]
  682. * console.log(evens) // => [2, 4]
  683. */
  684. var result = [];
  685. if (!is_array_like_1.default(arr)) {
  686. return result;
  687. }
  688. var i = -1;
  689. var indexes = [];
  690. var length = arr.length;
  691. while (++i < length) {
  692. var value = arr[i];
  693. if (predicate(value, i, arr)) {
  694. result.push(value);
  695. indexes.push(i);
  696. }
  697. }
  698. pull_at_1.default(arr, indexes);
  699. return result;
  700. };
  701. exports.default = remove;
  702. //# sourceMappingURL=remove.js.map
  703. }, function(modId) { var map = {"./is-array-like":1603070659028,"./pull-at":1603070659048}; return __REQUIRE__(map[modId], modId); })
  704. __DEFINE__(1603070659051, function(require, module, exports) {
  705. Object.defineProperty(exports, "__esModule", { value: true });
  706. var is_array_1 = require("./is-array");
  707. var is_string_1 = require("./is-string");
  708. var is_function_1 = require("./is-function");
  709. function sortBy(arr, key) {
  710. var comparer;
  711. if (is_function_1.default(key)) {
  712. comparer = function (a, b) { return key(a) - key(b); };
  713. }
  714. else {
  715. var keys_1 = [];
  716. if (is_string_1.default(key)) {
  717. keys_1.push(key);
  718. }
  719. else if (is_array_1.default(key)) {
  720. keys_1 = key;
  721. }
  722. comparer = function (a, b) {
  723. for (var i = 0; i < keys_1.length; i += 1) {
  724. var prop = keys_1[i];
  725. if (a[prop] > b[prop]) {
  726. return 1;
  727. }
  728. if (a[prop] < b[prop]) {
  729. return -1;
  730. }
  731. }
  732. return 0;
  733. };
  734. }
  735. arr.sort(comparer);
  736. return arr;
  737. }
  738. exports.default = sortBy;
  739. //# sourceMappingURL=sort-by.js.map
  740. }, function(modId) { var map = {"./is-array":1603070659038,"./is-string":1603070659052,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  741. __DEFINE__(1603070659052, function(require, module, exports) {
  742. Object.defineProperty(exports, "__esModule", { value: true });
  743. var is_type_1 = require("./is-type");
  744. exports.default = (function (str) {
  745. return is_type_1.default(str, 'String');
  746. });
  747. //# sourceMappingURL=is-string.js.map
  748. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  749. __DEFINE__(1603070659053, function(require, module, exports) {
  750. Object.defineProperty(exports, "__esModule", { value: true });
  751. var uniq_1 = require("./uniq");
  752. var union = function () {
  753. var sources = [];
  754. for (var _i = 0; _i < arguments.length; _i++) {
  755. sources[_i] = arguments[_i];
  756. }
  757. return uniq_1.default([].concat.apply([], sources));
  758. };
  759. exports.default = union;
  760. //# sourceMappingURL=union.js.map
  761. }, function(modId) { var map = {"./uniq":1603070659054}; return __REQUIRE__(map[modId], modId); })
  762. __DEFINE__(1603070659054, function(require, module, exports) {
  763. Object.defineProperty(exports, "__esModule", { value: true });
  764. var contains_1 = require("./contains");
  765. var each_1 = require("./each");
  766. var uniq = function (arr) {
  767. var resultArr = [];
  768. each_1.default(arr, function (item) {
  769. if (!contains_1.default(resultArr, item)) {
  770. resultArr.push(item);
  771. }
  772. });
  773. return resultArr;
  774. };
  775. exports.default = uniq;
  776. //# sourceMappingURL=uniq.js.map
  777. }, function(modId) { var map = {"./contains":1603070659027,"./each":1603070659037}; return __REQUIRE__(map[modId], modId); })
  778. __DEFINE__(1603070659055, function(require, module, exports) {
  779. Object.defineProperty(exports, "__esModule", { value: true });
  780. var is_array_1 = require("./is-array");
  781. var is_nil_1 = require("./is-nil");
  782. exports.default = (function (data, name) {
  783. var rst = [];
  784. var tmpMap = {};
  785. for (var i = 0; i < data.length; i++) {
  786. var obj = data[i];
  787. var value = obj[name];
  788. if (!is_nil_1.default(value)) {
  789. // flatten
  790. if (!is_array_1.default(value)) {
  791. value = [value];
  792. }
  793. for (var j = 0; j < value.length; j++) {
  794. var val = value[j];
  795. // unique
  796. if (!tmpMap[val]) {
  797. rst.push(val);
  798. tmpMap[val] = true;
  799. }
  800. }
  801. }
  802. }
  803. return rst;
  804. });
  805. //# sourceMappingURL=values-of-key.js.map
  806. }, function(modId) { var map = {"./is-array":1603070659038,"./is-nil":1603070659035}; return __REQUIRE__(map[modId], modId); })
  807. __DEFINE__(1603070659056, function(require, module, exports) {
  808. Object.defineProperty(exports, "__esModule", { value: true });
  809. var is_array_like_1 = require("./is-array-like");
  810. function head(o) {
  811. if (is_array_like_1.default(o)) {
  812. return o[0];
  813. }
  814. return undefined;
  815. }
  816. exports.default = head;
  817. //# sourceMappingURL=head.js.map
  818. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  819. __DEFINE__(1603070659057, function(require, module, exports) {
  820. Object.defineProperty(exports, "__esModule", { value: true });
  821. var is_array_like_1 = require("./is-array-like");
  822. function last(o) {
  823. if (is_array_like_1.default(o)) {
  824. var arr = o;
  825. return arr[arr.length - 1];
  826. }
  827. return undefined;
  828. }
  829. exports.default = last;
  830. //# sourceMappingURL=last.js.map
  831. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  832. __DEFINE__(1603070659058, function(require, module, exports) {
  833. Object.defineProperty(exports, "__esModule", { value: true });
  834. var is_array_1 = require("./is-array");
  835. var is_string_1 = require("./is-string");
  836. function startsWith(arr, e) {
  837. return (is_array_1.default(arr) || is_string_1.default(arr)) ? arr[0] === e : false;
  838. }
  839. exports.default = startsWith;
  840. //# sourceMappingURL=starts-with.js.map
  841. }, function(modId) { var map = {"./is-array":1603070659038,"./is-string":1603070659052}; return __REQUIRE__(map[modId], modId); })
  842. __DEFINE__(1603070659059, function(require, module, exports) {
  843. Object.defineProperty(exports, "__esModule", { value: true });
  844. var is_array_1 = require("./is-array");
  845. var is_string_1 = require("./is-string");
  846. function endsWith(arr, e) {
  847. return (is_array_1.default(arr) || is_string_1.default(arr)) ? arr[arr.length - 1] === e : false;
  848. }
  849. exports.default = endsWith;
  850. //# sourceMappingURL=ends-with.js.map
  851. }, function(modId) { var map = {"./is-array":1603070659038,"./is-string":1603070659052}; return __REQUIRE__(map[modId], modId); })
  852. __DEFINE__(1603070659060, function(require, module, exports) {
  853. Object.defineProperty(exports, "__esModule", { value: true });
  854. /**
  855. * 只要有一个不满足条件就返回 false
  856. * @param arr
  857. * @param func
  858. */
  859. var every = function (arr, func) {
  860. for (var i = 0; i < arr.length; i++) {
  861. if (!func(arr[i], i))
  862. return false;
  863. }
  864. return true;
  865. };
  866. exports.default = every;
  867. //# sourceMappingURL=every.js.map
  868. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  869. __DEFINE__(1603070659061, function(require, module, exports) {
  870. Object.defineProperty(exports, "__esModule", { value: true });
  871. /**
  872. * 只要有一个满足条件就返回 true
  873. * @param arr
  874. * @param func
  875. */
  876. var some = function (arr, func) {
  877. for (var i = 0; i < arr.length; i++) {
  878. if (func(arr[i], i))
  879. return true;
  880. }
  881. return false;
  882. };
  883. exports.default = some;
  884. //# sourceMappingURL=some.js.map
  885. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  886. __DEFINE__(1603070659062, function(require, module, exports) {
  887. Object.defineProperty(exports, "__esModule", { value: true });
  888. var group_to_map_1 = require("./group-to-map");
  889. exports.default = (function (data, condition) {
  890. if (!condition) {
  891. // 没有条件,则自身改成数组
  892. return [data];
  893. }
  894. var groups = group_to_map_1.default(data, condition);
  895. var array = [];
  896. for (var i in groups) {
  897. array.push(groups[i]);
  898. }
  899. return array;
  900. });
  901. //# sourceMappingURL=group.js.map
  902. }, function(modId) { var map = {"./group-to-map":1603070659063}; return __REQUIRE__(map[modId], modId); })
  903. __DEFINE__(1603070659063, function(require, module, exports) {
  904. Object.defineProperty(exports, "__esModule", { value: true });
  905. var is_array_1 = require("./is-array");
  906. var is_function_1 = require("./is-function");
  907. var group_by_1 = require("./group-by");
  908. var groupToMap = function (data, condition) {
  909. if (!condition) {
  910. return {
  911. 0: data,
  912. };
  913. }
  914. if (!is_function_1.default(condition)) {
  915. var paramsCondition_1 = is_array_1.default(condition) ? condition : condition.replace(/\s+/g, '').split('*');
  916. condition = function (row) {
  917. var unique = '_'; // 避免出现数字作为Key的情况,会进行按照数字的排序
  918. for (var i = 0, l = paramsCondition_1.length; i < l; i++) {
  919. unique += row[paramsCondition_1[i]] && row[paramsCondition_1[i]].toString();
  920. }
  921. return unique;
  922. };
  923. }
  924. var groups = group_by_1.default(data, condition);
  925. return groups;
  926. };
  927. exports.default = groupToMap;
  928. //# sourceMappingURL=group-to-map.js.map
  929. }, function(modId) { var map = {"./is-array":1603070659038,"./is-function":1603070659032,"./group-by":1603070659064}; return __REQUIRE__(map[modId], modId); })
  930. __DEFINE__(1603070659064, function(require, module, exports) {
  931. Object.defineProperty(exports, "__esModule", { value: true });
  932. var is_array_1 = require("./is-array");
  933. var is_function_1 = require("./is-function");
  934. var hasOwnProperty = Object.prototype.hasOwnProperty;
  935. function groupBy(data, condition) {
  936. if (!condition || !is_array_1.default(data)) {
  937. return {};
  938. }
  939. var result = {};
  940. // 兼容方法和 字符串的写法
  941. var predicate = is_function_1.default(condition) ? condition : function (item) { return item[condition]; };
  942. var key;
  943. for (var i = 0; i < data.length; i++) {
  944. var item = data[i];
  945. key = predicate(item);
  946. if (hasOwnProperty.call(result, key)) {
  947. result[key].push(item);
  948. }
  949. else {
  950. result[key] = [item];
  951. }
  952. }
  953. return result;
  954. }
  955. exports.default = groupBy;
  956. //# sourceMappingURL=group-by.js.map
  957. }, function(modId) { var map = {"./is-array":1603070659038,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  958. __DEFINE__(1603070659065, function(require, module, exports) {
  959. Object.defineProperty(exports, "__esModule", { value: true });
  960. /**
  961. * 获取封装的事件
  962. * @protected
  963. * @param {Object} obj 对象
  964. * @param {String} action 事件名称
  965. * @return {Function} 返回事件处理函数
  966. */
  967. function getWrapBehavior(obj, action) {
  968. return obj['_wrap_' + action];
  969. }
  970. exports.default = getWrapBehavior;
  971. //# sourceMappingURL=get-wrap-behavior.js.map
  972. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  973. __DEFINE__(1603070659066, function(require, module, exports) {
  974. Object.defineProperty(exports, "__esModule", { value: true });
  975. /**
  976. * 封装事件,便于使用上下文this,和便于解除事件时使用
  977. * @protected
  978. * @param {Object} obj 对象
  979. * @param {String} action 事件名称
  980. * @return {Function} 返回事件处理函数
  981. */
  982. function wrapBehavior(obj, action) {
  983. if (obj['_wrap_' + action]) {
  984. return obj['_wrap_' + action];
  985. }
  986. var method = function (e) {
  987. obj[action](e);
  988. };
  989. obj['_wrap_' + action] = method;
  990. return method;
  991. }
  992. exports.default = wrapBehavior;
  993. //# sourceMappingURL=wrap-behavior.js.map
  994. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  995. __DEFINE__(1603070659067, function(require, module, exports) {
  996. Object.defineProperty(exports, "__esModule", { value: true });
  997. var numColorCache = {};
  998. function numberToColor(num) {
  999. // 增加缓存
  1000. var color = numColorCache[num];
  1001. if (!color) {
  1002. var str = num.toString(16);
  1003. for (var i = str.length; i < 6; i++) {
  1004. str = '0' + str;
  1005. }
  1006. color = '#' + str;
  1007. numColorCache[num] = color;
  1008. }
  1009. return color;
  1010. }
  1011. exports.default = numberToColor;
  1012. //# sourceMappingURL=number2color.js.map
  1013. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1014. __DEFINE__(1603070659068, function(require, module, exports) {
  1015. Object.defineProperty(exports, "__esModule", { value: true });
  1016. var is_array_1 = require("./is-array");
  1017. function parseRadius(radius) {
  1018. var r1 = 0, r2 = 0, r3 = 0, r4 = 0;
  1019. if (is_array_1.default(radius)) {
  1020. if (radius.length === 1) {
  1021. r1 = r2 = r3 = r4 = radius[0];
  1022. }
  1023. else if (radius.length === 2) {
  1024. r1 = r3 = radius[0];
  1025. r2 = r4 = radius[1];
  1026. }
  1027. else if (radius.length === 3) {
  1028. r1 = radius[0];
  1029. r2 = r4 = radius[1];
  1030. r3 = radius[2];
  1031. }
  1032. else {
  1033. r1 = radius[0];
  1034. r2 = radius[1];
  1035. r3 = radius[2];
  1036. r4 = radius[3];
  1037. }
  1038. }
  1039. else {
  1040. r1 = r2 = r3 = r4 = radius;
  1041. }
  1042. return {
  1043. r1: r1,
  1044. r2: r2,
  1045. r3: r3,
  1046. r4: r4
  1047. };
  1048. }
  1049. exports.default = parseRadius;
  1050. //# sourceMappingURL=parse-radius.js.map
  1051. }, function(modId) { var map = {"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  1052. __DEFINE__(1603070659069, function(require, module, exports) {
  1053. Object.defineProperty(exports, "__esModule", { value: true });
  1054. var clamp = function (a, min, max) {
  1055. if (a < min) {
  1056. return min;
  1057. }
  1058. else if (a > max) {
  1059. return max;
  1060. }
  1061. return a;
  1062. };
  1063. exports.default = clamp;
  1064. //# sourceMappingURL=clamp.js.map
  1065. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1066. __DEFINE__(1603070659070, function(require, module, exports) {
  1067. Object.defineProperty(exports, "__esModule", { value: true });
  1068. var fixedBase = function (v, base) {
  1069. var str = base.toString();
  1070. var index = str.indexOf('.');
  1071. if (index === -1) {
  1072. return Math.round(v);
  1073. }
  1074. var length = str.substr(index + 1).length;
  1075. if (length > 20) {
  1076. length = 20;
  1077. }
  1078. return parseFloat(v.toFixed(length));
  1079. };
  1080. exports.default = fixedBase;
  1081. //# sourceMappingURL=fixed-base.js.map
  1082. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1083. __DEFINE__(1603070659071, function(require, module, exports) {
  1084. Object.defineProperty(exports, "__esModule", { value: true });
  1085. var is_number_1 = require("./is-number");
  1086. var isDecimal = function (num) {
  1087. return is_number_1.default(num) && num % 1 !== 0;
  1088. };
  1089. exports.default = isDecimal;
  1090. //# sourceMappingURL=is-decimal.js.map
  1091. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1092. __DEFINE__(1603070659072, function(require, module, exports) {
  1093. Object.defineProperty(exports, "__esModule", { value: true });
  1094. /**
  1095. * 判断是否数字
  1096. * @return {Boolean} 是否数字
  1097. */
  1098. var is_type_1 = require("./is-type");
  1099. var isNumber = function (value) {
  1100. return is_type_1.default(value, 'Number');
  1101. };
  1102. exports.default = isNumber;
  1103. //# sourceMappingURL=is-number.js.map
  1104. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1105. __DEFINE__(1603070659073, function(require, module, exports) {
  1106. Object.defineProperty(exports, "__esModule", { value: true });
  1107. var is_number_1 = require("./is-number");
  1108. var isEven = function (num) {
  1109. return is_number_1.default(num) && num % 2 === 0;
  1110. };
  1111. exports.default = isEven;
  1112. //# sourceMappingURL=is-even.js.map
  1113. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1114. __DEFINE__(1603070659074, function(require, module, exports) {
  1115. Object.defineProperty(exports, "__esModule", { value: true });
  1116. var is_number_1 = require("./is-number");
  1117. var isInteger = Number.isInteger ? Number.isInteger : function (num) {
  1118. return is_number_1.default(num) && num % 1 === 0;
  1119. };
  1120. exports.default = isInteger;
  1121. //# sourceMappingURL=is-integer.js.map
  1122. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1123. __DEFINE__(1603070659075, function(require, module, exports) {
  1124. Object.defineProperty(exports, "__esModule", { value: true });
  1125. var is_number_1 = require("./is-number");
  1126. var isNegative = function (num) {
  1127. return is_number_1.default(num) && num < 0;
  1128. };
  1129. exports.default = isNegative;
  1130. //# sourceMappingURL=is-negative.js.map
  1131. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1132. __DEFINE__(1603070659076, function(require, module, exports) {
  1133. Object.defineProperty(exports, "__esModule", { value: true });
  1134. var PRECISION = 0.00001; // numbers less than this is considered as 0
  1135. function isNumberEqual(a, b, precision) {
  1136. if (precision === void 0) { precision = PRECISION; }
  1137. return Math.abs((a - b)) < precision;
  1138. }
  1139. exports.default = isNumberEqual;
  1140. ;
  1141. //# sourceMappingURL=is-number-equal.js.map
  1142. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1143. __DEFINE__(1603070659077, function(require, module, exports) {
  1144. Object.defineProperty(exports, "__esModule", { value: true });
  1145. var is_number_1 = require("./is-number");
  1146. var isOdd = function (num) {
  1147. return is_number_1.default(num) && num % 2 !== 0;
  1148. };
  1149. exports.default = isOdd;
  1150. //# sourceMappingURL=is-odd.js.map
  1151. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1152. __DEFINE__(1603070659078, function(require, module, exports) {
  1153. Object.defineProperty(exports, "__esModule", { value: true });
  1154. var is_number_1 = require("./is-number");
  1155. var isPositive = function (num) {
  1156. return is_number_1.default(num) && num > 0;
  1157. };
  1158. exports.default = isPositive;
  1159. //# sourceMappingURL=is-positive.js.map
  1160. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1161. __DEFINE__(1603070659079, function(require, module, exports) {
  1162. Object.defineProperty(exports, "__esModule", { value: true });
  1163. var each_1 = require("./each");
  1164. var is_array_1 = require("./is-array");
  1165. var is_function_1 = require("./is-function");
  1166. /**
  1167. * @param {Array} arr The array to iterate over.
  1168. * @param {Function} [fn] The iteratee invoked per element.
  1169. * @return {*} Returns the maximum value.
  1170. * @example
  1171. *
  1172. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  1173. *
  1174. * maxBy(objects, function(o) { return o.n; });
  1175. * // => { 'n': 2 }
  1176. *
  1177. * maxBy(objects, 'n');
  1178. * // => { 'n': 2 }
  1179. */
  1180. exports.default = (function (arr, fn) {
  1181. if (!is_array_1.default(arr)) {
  1182. return undefined;
  1183. }
  1184. var max = arr[0];
  1185. var maxData;
  1186. if (is_function_1.default(fn)) {
  1187. maxData = fn(arr[0]);
  1188. }
  1189. else {
  1190. maxData = arr[0][fn];
  1191. }
  1192. var data;
  1193. each_1.default(arr, function (val) {
  1194. if (is_function_1.default(fn)) {
  1195. data = fn(val);
  1196. }
  1197. else {
  1198. data = val[fn];
  1199. }
  1200. if (data > maxData) {
  1201. max = val;
  1202. maxData = data;
  1203. }
  1204. });
  1205. return max;
  1206. });
  1207. //# sourceMappingURL=max-by.js.map
  1208. }, function(modId) { var map = {"./each":1603070659037,"./is-array":1603070659038,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1209. __DEFINE__(1603070659080, function(require, module, exports) {
  1210. Object.defineProperty(exports, "__esModule", { value: true });
  1211. var each_1 = require("./each");
  1212. var is_array_1 = require("./is-array");
  1213. var is_function_1 = require("./is-function");
  1214. /**
  1215. * @param {Array} arr The array to iterate over.
  1216. * @param {Function} [fn] The iteratee invoked per element.
  1217. * @return {*} Returns the minimum value.
  1218. * @example
  1219. *
  1220. * var objects = [{ 'n': 1 }, { 'n': 2 }];
  1221. *
  1222. * minBy(objects, function(o) { return o.n; });
  1223. * // => { 'n': 1 }
  1224. *
  1225. * minBy(objects, 'n');
  1226. * // => { 'n': 1 }
  1227. */
  1228. exports.default = (function (arr, fn) {
  1229. if (!is_array_1.default(arr)) {
  1230. return undefined;
  1231. }
  1232. var min = arr[0];
  1233. var minData;
  1234. if (is_function_1.default(fn)) {
  1235. minData = fn(arr[0]);
  1236. }
  1237. else {
  1238. minData = arr[0][fn];
  1239. }
  1240. var data;
  1241. each_1.default(arr, function (val) {
  1242. if (is_function_1.default(fn)) {
  1243. data = fn(val);
  1244. }
  1245. else {
  1246. data = val[fn];
  1247. }
  1248. if (data < minData) {
  1249. min = val;
  1250. minData = data;
  1251. }
  1252. });
  1253. return min;
  1254. });
  1255. //# sourceMappingURL=min-by.js.map
  1256. }, function(modId) { var map = {"./each":1603070659037,"./is-array":1603070659038,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1257. __DEFINE__(1603070659081, function(require, module, exports) {
  1258. Object.defineProperty(exports, "__esModule", { value: true });
  1259. var mod = function (n, m) {
  1260. return ((n % m) + m) % m;
  1261. };
  1262. exports.default = mod;
  1263. //# sourceMappingURL=mod.js.map
  1264. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1265. __DEFINE__(1603070659082, function(require, module, exports) {
  1266. Object.defineProperty(exports, "__esModule", { value: true });
  1267. var DEGREE = 180 / Math.PI;
  1268. var toDegree = function (radian) {
  1269. return DEGREE * radian;
  1270. };
  1271. exports.default = toDegree;
  1272. //# sourceMappingURL=to-degree.js.map
  1273. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1274. __DEFINE__(1603070659083, function(require, module, exports) {
  1275. Object.defineProperty(exports, "__esModule", { value: true });
  1276. exports.default = parseInt;
  1277. //# sourceMappingURL=to-integer.js.map
  1278. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1279. __DEFINE__(1603070659084, function(require, module, exports) {
  1280. Object.defineProperty(exports, "__esModule", { value: true });
  1281. var RADIAN = Math.PI / 180;
  1282. var toRadian = function (degree) {
  1283. return RADIAN * degree;
  1284. };
  1285. exports.default = toRadian;
  1286. //# sourceMappingURL=to-radian.js.map
  1287. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1288. __DEFINE__(1603070659085, function(require, module, exports) {
  1289. Object.defineProperty(exports, "__esModule", { value: true });
  1290. var each_1 = require("./each");
  1291. exports.default = each_1.default;
  1292. //# sourceMappingURL=for-in.js.map
  1293. }, function(modId) { var map = {"./each":1603070659037}; return __REQUIRE__(map[modId], modId); })
  1294. __DEFINE__(1603070659086, function(require, module, exports) {
  1295. Object.defineProperty(exports, "__esModule", { value: true });
  1296. exports.default = (function (obj, key) { return obj.hasOwnProperty(key); });
  1297. //# sourceMappingURL=has.js.map
  1298. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1299. __DEFINE__(1603070659087, function(require, module, exports) {
  1300. Object.defineProperty(exports, "__esModule", { value: true });
  1301. var has_1 = require("./has");
  1302. exports.default = has_1.default;
  1303. //# sourceMappingURL=has-key.js.map
  1304. }, function(modId) { var map = {"./has":1603070659086}; return __REQUIRE__(map[modId], modId); })
  1305. __DEFINE__(1603070659088, function(require, module, exports) {
  1306. Object.defineProperty(exports, "__esModule", { value: true });
  1307. var contains_1 = require("./contains");
  1308. var values_1 = require("./values");
  1309. exports.default = (function (obj, value) { return contains_1.default(values_1.default(obj), value); });
  1310. //# sourceMappingURL=has-value.js.map
  1311. }, function(modId) { var map = {"./contains":1603070659027,"./values":1603070659089}; return __REQUIRE__(map[modId], modId); })
  1312. __DEFINE__(1603070659089, function(require, module, exports) {
  1313. Object.defineProperty(exports, "__esModule", { value: true });
  1314. var each_1 = require("./each");
  1315. var is_function_1 = require("./is-function");
  1316. // @ts-ignore
  1317. var values = Object.values ? function (obj) { return Object.values(obj); } : function (obj) {
  1318. var result = [];
  1319. each_1.default(obj, function (value, key) {
  1320. if (!(is_function_1.default(obj) && key === 'prototype')) {
  1321. result.push(value);
  1322. }
  1323. });
  1324. return result;
  1325. };
  1326. exports.default = values;
  1327. //# sourceMappingURL=values.js.map
  1328. }, function(modId) { var map = {"./each":1603070659037,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1329. __DEFINE__(1603070659090, function(require, module, exports) {
  1330. Object.defineProperty(exports, "__esModule", { value: true });
  1331. var to_string_1 = require("./to-string");
  1332. var lowerCase = function (str) {
  1333. return to_string_1.default(str).toLowerCase();
  1334. };
  1335. exports.default = lowerCase;
  1336. //# sourceMappingURL=lower-case.js.map
  1337. }, function(modId) { var map = {"./to-string":1603070659091}; return __REQUIRE__(map[modId], modId); })
  1338. __DEFINE__(1603070659091, function(require, module, exports) {
  1339. Object.defineProperty(exports, "__esModule", { value: true });
  1340. var is_nil_1 = require("./is-nil");
  1341. exports.default = (function (value) {
  1342. if (is_nil_1.default(value))
  1343. return '';
  1344. return value.toString();
  1345. });
  1346. //# sourceMappingURL=to-string.js.map
  1347. }, function(modId) { var map = {"./is-nil":1603070659035}; return __REQUIRE__(map[modId], modId); })
  1348. __DEFINE__(1603070659092, function(require, module, exports) {
  1349. Object.defineProperty(exports, "__esModule", { value: true });
  1350. var to_string_1 = require("./to-string");
  1351. var lowerFirst = function (value) {
  1352. var str = to_string_1.default(value);
  1353. return str.charAt(0).toLowerCase() + str.substring(1);
  1354. };
  1355. exports.default = lowerFirst;
  1356. //# sourceMappingURL=lower-first.js.map
  1357. }, function(modId) { var map = {"./to-string":1603070659091}; return __REQUIRE__(map[modId], modId); })
  1358. __DEFINE__(1603070659093, function(require, module, exports) {
  1359. Object.defineProperty(exports, "__esModule", { value: true });
  1360. function substitute(str, o) {
  1361. if (!str || !o) {
  1362. return str;
  1363. }
  1364. return str.replace(/\\?\{([^{}]+)\}/g, function (match, name) {
  1365. if (match.charAt(0) === '\\') {
  1366. return match.slice(1);
  1367. }
  1368. return (o[name] === undefined) ? '' : o[name];
  1369. });
  1370. }
  1371. exports.default = substitute;
  1372. //# sourceMappingURL=substitute.js.map
  1373. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1374. __DEFINE__(1603070659094, function(require, module, exports) {
  1375. Object.defineProperty(exports, "__esModule", { value: true });
  1376. var to_string_1 = require("./to-string");
  1377. var upperCase = function (str) {
  1378. return to_string_1.default(str).toUpperCase();
  1379. };
  1380. exports.default = upperCase;
  1381. //# sourceMappingURL=upper-case.js.map
  1382. }, function(modId) { var map = {"./to-string":1603070659091}; return __REQUIRE__(map[modId], modId); })
  1383. __DEFINE__(1603070659095, function(require, module, exports) {
  1384. Object.defineProperty(exports, "__esModule", { value: true });
  1385. var to_string_1 = require("./to-string");
  1386. var upperFirst = function (value) {
  1387. var str = to_string_1.default(value);
  1388. return str.charAt(0).toUpperCase() + str.substring(1);
  1389. };
  1390. exports.default = upperFirst;
  1391. //# sourceMappingURL=upper-first.js.map
  1392. }, function(modId) { var map = {"./to-string":1603070659091}; return __REQUIRE__(map[modId], modId); })
  1393. __DEFINE__(1603070659096, function(require, module, exports) {
  1394. Object.defineProperty(exports, "__esModule", { value: true });
  1395. var toString = {}.toString;
  1396. var getType = function (value) {
  1397. return toString.call(value).replace(/^\[object /, '').replace(/]$/, '');
  1398. };
  1399. exports.default = getType;
  1400. //# sourceMappingURL=get-type.js.map
  1401. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1402. __DEFINE__(1603070659097, function(require, module, exports) {
  1403. Object.defineProperty(exports, "__esModule", { value: true });
  1404. /**
  1405. * 是否是参数类型
  1406. *
  1407. * @param {Object} value 测试的值
  1408. * @return {Boolean}
  1409. */
  1410. var is_type_1 = require("./is-type");
  1411. var isArguments = function (value) {
  1412. return is_type_1.default(value, 'Arguments');
  1413. };
  1414. exports.default = isArguments;
  1415. //# sourceMappingURL=is-arguments.js.map
  1416. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1417. __DEFINE__(1603070659098, function(require, module, exports) {
  1418. Object.defineProperty(exports, "__esModule", { value: true });
  1419. /**
  1420. * 是否是布尔类型
  1421. *
  1422. * @param {Object} value 测试的值
  1423. * @return {Boolean}
  1424. */
  1425. var is_type_1 = require("./is-type");
  1426. var isBoolean = function (value) {
  1427. return is_type_1.default(value, 'Boolean');
  1428. };
  1429. exports.default = isBoolean;
  1430. //# sourceMappingURL=is-boolean.js.map
  1431. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1432. __DEFINE__(1603070659099, function(require, module, exports) {
  1433. Object.defineProperty(exports, "__esModule", { value: true });
  1434. var is_type_1 = require("./is-type");
  1435. var isDate = function (value) {
  1436. return is_type_1.default(value, 'Date');
  1437. };
  1438. exports.default = isDate;
  1439. //# sourceMappingURL=is-date.js.map
  1440. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1441. __DEFINE__(1603070659100, function(require, module, exports) {
  1442. Object.defineProperty(exports, "__esModule", { value: true });
  1443. /**
  1444. * 是否是参数类型
  1445. *
  1446. * @param {Object} value 测试的值
  1447. * @return {Boolean}
  1448. */
  1449. var is_type_1 = require("./is-type");
  1450. var isError = function (value) {
  1451. return is_type_1.default(value, 'Error');
  1452. };
  1453. exports.default = isError;
  1454. //# sourceMappingURL=is-error.js.map
  1455. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1456. __DEFINE__(1603070659101, function(require, module, exports) {
  1457. Object.defineProperty(exports, "__esModule", { value: true });
  1458. /**
  1459. * 判断是否为有限数
  1460. * @return {Boolean}
  1461. */
  1462. var is_number_1 = require("./is-number");
  1463. function default_1(value) {
  1464. return is_number_1.default(value) && isFinite(value);
  1465. }
  1466. exports.default = default_1;
  1467. //# sourceMappingURL=is-finite.js.map
  1468. }, function(modId) { var map = {"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1469. __DEFINE__(1603070659102, function(require, module, exports) {
  1470. Object.defineProperty(exports, "__esModule", { value: true });
  1471. var isNull = function (value) {
  1472. return value === null;
  1473. };
  1474. exports.default = isNull;
  1475. //# sourceMappingURL=is-null.js.map
  1476. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1477. __DEFINE__(1603070659103, function(require, module, exports) {
  1478. Object.defineProperty(exports, "__esModule", { value: true });
  1479. var objectProto = Object.prototype;
  1480. var isPrototype = function (value) {
  1481. var Ctor = value && value.constructor;
  1482. var proto = (typeof Ctor === 'function' && Ctor.prototype) || objectProto;
  1483. return value === proto;
  1484. };
  1485. exports.default = isPrototype;
  1486. //# sourceMappingURL=is-prototype.js.map
  1487. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1488. __DEFINE__(1603070659104, function(require, module, exports) {
  1489. Object.defineProperty(exports, "__esModule", { value: true });
  1490. var is_type_1 = require("./is-type");
  1491. var isRegExp = function (str) {
  1492. return is_type_1.default(str, 'RegExp');
  1493. };
  1494. exports.default = isRegExp;
  1495. //# sourceMappingURL=is-reg-exp.js.map
  1496. }, function(modId) { var map = {"./is-type":1603070659033}; return __REQUIRE__(map[modId], modId); })
  1497. __DEFINE__(1603070659105, function(require, module, exports) {
  1498. Object.defineProperty(exports, "__esModule", { value: true });
  1499. var isUndefined = function (value) {
  1500. return value === undefined;
  1501. };
  1502. exports.default = isUndefined;
  1503. //# sourceMappingURL=is-undefined.js.map
  1504. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1505. __DEFINE__(1603070659106, function(require, module, exports) {
  1506. Object.defineProperty(exports, "__esModule", { value: true });
  1507. /**
  1508. * 判断是否HTML元素
  1509. * @return {Boolean} 是否HTML元素
  1510. */
  1511. var isElement = function (o) {
  1512. return o instanceof Element || o instanceof HTMLDocument;
  1513. };
  1514. exports.default = isElement;
  1515. //# sourceMappingURL=is-element.js.map
  1516. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1517. __DEFINE__(1603070659107, function(require, module, exports) {
  1518. Object.defineProperty(exports, "__esModule", { value: true });
  1519. function requestAnimationFrame(fn) {
  1520. var method = window.requestAnimationFrame ||
  1521. window.webkitRequestAnimationFrame ||
  1522. // @ts-ignore
  1523. window.mozRequestAnimationFrame ||
  1524. // @ts-ignore
  1525. window.msRequestAnimationFrame ||
  1526. function (f) {
  1527. return setTimeout(f, 16);
  1528. };
  1529. return method(fn);
  1530. }
  1531. exports.default = requestAnimationFrame;
  1532. ;
  1533. //# sourceMappingURL=request-animation-frame.js.map
  1534. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1535. __DEFINE__(1603070659108, function(require, module, exports) {
  1536. Object.defineProperty(exports, "__esModule", { value: true });
  1537. function cancelAnimationFrame(handler) {
  1538. var method = window.cancelAnimationFrame ||
  1539. window.webkitCancelAnimationFrame ||
  1540. // @ts-ignore
  1541. window.mozCancelAnimationFrame ||
  1542. // @ts-ignore
  1543. window.msCancelAnimationFrame ||
  1544. clearTimeout;
  1545. method(handler);
  1546. }
  1547. exports.default = cancelAnimationFrame;
  1548. ;
  1549. //# sourceMappingURL=clear-animation-frame.js.map
  1550. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1551. __DEFINE__(1603070659109, function(require, module, exports) {
  1552. Object.defineProperty(exports, "__esModule", { value: true });
  1553. var mix_1 = require("./mix");
  1554. var is_function_1 = require("./is-function");
  1555. var augment = function () {
  1556. var args = [];
  1557. for (var _i = 0; _i < arguments.length; _i++) {
  1558. args[_i] = arguments[_i];
  1559. }
  1560. var c = args[0];
  1561. for (var i = 1; i < args.length; i++) {
  1562. var obj = args[i];
  1563. if (is_function_1.default(obj)) {
  1564. obj = obj.prototype;
  1565. }
  1566. mix_1.default(c.prototype, obj);
  1567. }
  1568. };
  1569. exports.default = augment;
  1570. //# sourceMappingURL=augment.js.map
  1571. }, function(modId) { var map = {"./mix":1603070659110,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1572. __DEFINE__(1603070659110, function(require, module, exports) {
  1573. Object.defineProperty(exports, "__esModule", { value: true });
  1574. // FIXME: Mutable param should be forbidden in static lang.
  1575. function _mix(dist, obj) {
  1576. for (var key in obj) {
  1577. if (obj.hasOwnProperty(key) && key !== 'constructor' && obj[key] !== undefined) {
  1578. dist[key] = obj[key];
  1579. }
  1580. }
  1581. }
  1582. function mix(dist, src1, src2, src3) {
  1583. if (src1)
  1584. _mix(dist, src1);
  1585. if (src2)
  1586. _mix(dist, src2);
  1587. if (src3)
  1588. _mix(dist, src3);
  1589. return dist;
  1590. }
  1591. exports.default = mix;
  1592. //# sourceMappingURL=mix.js.map
  1593. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1594. __DEFINE__(1603070659111, function(require, module, exports) {
  1595. Object.defineProperty(exports, "__esModule", { value: true });
  1596. var is_array_1 = require("./is-array");
  1597. var clone = function (obj) {
  1598. if (typeof obj !== 'object' || obj === null) {
  1599. return obj;
  1600. }
  1601. var rst;
  1602. if (is_array_1.default(obj)) {
  1603. rst = [];
  1604. for (var i = 0, l = obj.length; i < l; i++) {
  1605. if (typeof obj[i] === 'object' && obj[i] != null) {
  1606. rst[i] = clone(obj[i]);
  1607. }
  1608. else {
  1609. rst[i] = obj[i];
  1610. }
  1611. }
  1612. }
  1613. else {
  1614. rst = {};
  1615. for (var k in obj) {
  1616. if (typeof obj[k] === 'object' && obj[k] != null) {
  1617. rst[k] = clone(obj[k]);
  1618. }
  1619. else {
  1620. rst[k] = obj[k];
  1621. }
  1622. }
  1623. }
  1624. return rst;
  1625. };
  1626. exports.default = clone;
  1627. //# sourceMappingURL=clone.js.map
  1628. }, function(modId) { var map = {"./is-array":1603070659038}; return __REQUIRE__(map[modId], modId); })
  1629. __DEFINE__(1603070659112, function(require, module, exports) {
  1630. Object.defineProperty(exports, "__esModule", { value: true });
  1631. function debounce(func, wait, immediate) {
  1632. var timeout;
  1633. return function () {
  1634. var context = this, args = arguments;
  1635. var later = function () {
  1636. timeout = null;
  1637. if (!immediate) {
  1638. func.apply(context, args);
  1639. }
  1640. };
  1641. var callNow = immediate && !timeout;
  1642. clearTimeout(timeout);
  1643. timeout = setTimeout(later, wait);
  1644. if (callNow) {
  1645. func.apply(context, args);
  1646. }
  1647. };
  1648. }
  1649. exports.default = debounce;
  1650. //# sourceMappingURL=debounce.js.map
  1651. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  1652. __DEFINE__(1603070659113, function(require, module, exports) {
  1653. Object.defineProperty(exports, "__esModule", { value: true });
  1654. var is_function_1 = require("./is-function");
  1655. /**
  1656. * _.memoize(calColor);
  1657. * _.memoize(calColor, (...args) => args[0]);
  1658. * @param f
  1659. * @param resolver
  1660. */
  1661. exports.default = (function (f, resolver) {
  1662. if (!is_function_1.default(f)) {
  1663. throw new TypeError('Expected a function');
  1664. }
  1665. var memoized = function () {
  1666. var args = [];
  1667. for (var _i = 0; _i < arguments.length; _i++) {
  1668. args[_i] = arguments[_i];
  1669. }
  1670. // 使用方法构造 key,如果不存在 resolver,则直接取第一个参数作为 key
  1671. var key = resolver ? resolver.apply(this, args) : args[0];
  1672. var cache = memoized.cache;
  1673. if (cache.has(key)) {
  1674. return cache.get(key);
  1675. }
  1676. var result = f.apply(this, args);
  1677. // 缓存起来
  1678. cache.set(key, result);
  1679. return result;
  1680. };
  1681. memoized.cache = new Map();
  1682. return memoized;
  1683. });
  1684. //# sourceMappingURL=memoize.js.map
  1685. }, function(modId) { var map = {"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1686. __DEFINE__(1603070659114, function(require, module, exports) {
  1687. Object.defineProperty(exports, "__esModule", { value: true });
  1688. var is_array_1 = require("./is-array");
  1689. var is_plain_object_1 = require("./is-plain-object");
  1690. var MAX_MIX_LEVEL = 5;
  1691. function _deepMix(dist, src, level, maxLevel) {
  1692. level = level || 0;
  1693. maxLevel = maxLevel || MAX_MIX_LEVEL;
  1694. for (var key in src) {
  1695. if (src.hasOwnProperty(key)) {
  1696. var value = src[key];
  1697. if (value !== null && is_plain_object_1.default(value)) {
  1698. if (!is_plain_object_1.default(dist[key])) {
  1699. dist[key] = {};
  1700. }
  1701. if (level < maxLevel) {
  1702. _deepMix(dist[key], value, level + 1, maxLevel);
  1703. }
  1704. else {
  1705. dist[key] = src[key];
  1706. }
  1707. }
  1708. else if (is_array_1.default(value)) {
  1709. dist[key] = [];
  1710. dist[key] = dist[key].concat(value);
  1711. }
  1712. else if (value !== undefined) {
  1713. dist[key] = value;
  1714. }
  1715. }
  1716. }
  1717. }
  1718. // todo 重写
  1719. var deepMix = function (rst) {
  1720. var args = [];
  1721. for (var _i = 1; _i < arguments.length; _i++) {
  1722. args[_i - 1] = arguments[_i];
  1723. }
  1724. for (var i = 0; i < args.length; i += 1) {
  1725. _deepMix(rst, args[i]);
  1726. }
  1727. return rst;
  1728. };
  1729. exports.default = deepMix;
  1730. //# sourceMappingURL=deep-mix.js.map
  1731. }, function(modId) { var map = {"./is-array":1603070659038,"./is-plain-object":1603070659040}; return __REQUIRE__(map[modId], modId); })
  1732. __DEFINE__(1603070659115, function(require, module, exports) {
  1733. Object.defineProperty(exports, "__esModule", { value: true });
  1734. var mix_1 = require("./mix");
  1735. var is_function_1 = require("./is-function");
  1736. var extend = function (subclass, superclass, overrides, staticOverrides) {
  1737. // 如果只提供父类构造函数,则自动生成子类构造函数
  1738. if (!is_function_1.default(superclass)) {
  1739. overrides = superclass;
  1740. superclass = subclass;
  1741. subclass = function () { };
  1742. }
  1743. var create = Object.create ?
  1744. function (proto, c) {
  1745. return Object.create(proto, {
  1746. constructor: {
  1747. value: c
  1748. }
  1749. });
  1750. } :
  1751. function (proto, c) {
  1752. function Tmp() { }
  1753. Tmp.prototype = proto;
  1754. var o = new Tmp();
  1755. o.constructor = c;
  1756. return o;
  1757. };
  1758. var superObj = create(superclass.prototype, subclass); // new superclass(),//实例化父类作为子类的prototype
  1759. subclass.prototype = mix_1.default(superObj, subclass.prototype); // 指定子类的prototype
  1760. subclass.superclass = create(superclass.prototype, superclass);
  1761. mix_1.default(superObj, overrides);
  1762. mix_1.default(subclass, staticOverrides);
  1763. return subclass;
  1764. };
  1765. exports.default = extend;
  1766. //# sourceMappingURL=extend.js.map
  1767. }, function(modId) { var map = {"./mix":1603070659110,"./is-function":1603070659032}; return __REQUIRE__(map[modId], modId); })
  1768. __DEFINE__(1603070659116, function(require, module, exports) {
  1769. Object.defineProperty(exports, "__esModule", { value: true });
  1770. var is_array_like_1 = require("./is-array-like");
  1771. var indexOf = function (arr, obj) {
  1772. if (!is_array_like_1.default(arr)) {
  1773. return -1;
  1774. }
  1775. var m = Array.prototype.indexOf;
  1776. if (m) {
  1777. return m.call(arr, obj);
  1778. }
  1779. var index = -1;
  1780. for (var i = 0; i < arr.length; i++) {
  1781. if (arr[i] === obj) {
  1782. index = i;
  1783. break;
  1784. }
  1785. }
  1786. return index;
  1787. };
  1788. exports.default = indexOf;
  1789. //# sourceMappingURL=index-of.js.map
  1790. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  1791. __DEFINE__(1603070659117, function(require, module, exports) {
  1792. Object.defineProperty(exports, "__esModule", { value: true });
  1793. var is_nil_1 = require("./is-nil");
  1794. var is_array_like_1 = require("./is-array-like");
  1795. var get_type_1 = require("./get-type");
  1796. var is_prototype_1 = require("./is-prototype");
  1797. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1798. function isEmpty(value) {
  1799. /**
  1800. * isEmpty(null) => true
  1801. * isEmpty() => true
  1802. * isEmpty(true) => true
  1803. * isEmpty(1) => true
  1804. * isEmpty([1, 2, 3]) => false
  1805. * isEmpty('abc') => false
  1806. * isEmpty({ a: 1 }) => false
  1807. */
  1808. if (is_nil_1.default(value)) {
  1809. return true;
  1810. }
  1811. if (is_array_like_1.default(value)) {
  1812. return !value.length;
  1813. }
  1814. var type = get_type_1.default(value);
  1815. if (type === 'Map' || type === 'Set') {
  1816. return !value.size;
  1817. }
  1818. if (is_prototype_1.default(value)) {
  1819. return !Object.keys(value).length;
  1820. }
  1821. for (var key in value) {
  1822. if (hasOwnProperty.call(value, key)) {
  1823. return false;
  1824. }
  1825. }
  1826. return true;
  1827. }
  1828. exports.default = isEmpty;
  1829. //# sourceMappingURL=is-empty.js.map
  1830. }, function(modId) { var map = {"./is-nil":1603070659035,"./is-array-like":1603070659028,"./get-type":1603070659096,"./is-prototype":1603070659103}; return __REQUIRE__(map[modId], modId); })
  1831. __DEFINE__(1603070659118, function(require, module, exports) {
  1832. Object.defineProperty(exports, "__esModule", { value: true });
  1833. var is_object_like_1 = require("./is-object-like");
  1834. var is_array_like_1 = require("./is-array-like");
  1835. var is_string_1 = require("./is-string");
  1836. var isEqual = function (value, other) {
  1837. if (value === other) {
  1838. return true;
  1839. }
  1840. if (!value || !other) {
  1841. return false;
  1842. }
  1843. if (is_string_1.default(value) || is_string_1.default(other)) {
  1844. return false;
  1845. }
  1846. if (is_array_like_1.default(value) || is_array_like_1.default(other)) {
  1847. if (value.length !== other.length) {
  1848. return false;
  1849. }
  1850. var rst = true;
  1851. for (var i = 0; i < value.length; i++) {
  1852. rst = isEqual(value[i], other[i]);
  1853. if (!rst) {
  1854. break;
  1855. }
  1856. }
  1857. return rst;
  1858. }
  1859. if (is_object_like_1.default(value) || is_object_like_1.default(other)) {
  1860. var valueKeys = Object.keys(value);
  1861. var otherKeys = Object.keys(other);
  1862. if (valueKeys.length !== otherKeys.length) {
  1863. return false;
  1864. }
  1865. var rst = true;
  1866. for (var i = 0; i < valueKeys.length; i++) {
  1867. rst = isEqual(value[valueKeys[i]], other[valueKeys[i]]);
  1868. if (!rst) {
  1869. break;
  1870. }
  1871. }
  1872. return rst;
  1873. }
  1874. return false;
  1875. };
  1876. exports.default = isEqual;
  1877. //# sourceMappingURL=is-equal.js.map
  1878. }, function(modId) { var map = {"./is-object-like":1603070659041,"./is-array-like":1603070659028,"./is-string":1603070659052}; return __REQUIRE__(map[modId], modId); })
  1879. __DEFINE__(1603070659119, function(require, module, exports) {
  1880. Object.defineProperty(exports, "__esModule", { value: true });
  1881. var is_function_1 = require("./is-function");
  1882. var is_equal_1 = require("./is-equal");
  1883. /**
  1884. * @param {*} value The value to compare.
  1885. * @param {*} other The other value to compare.
  1886. * @param {Function} [fn] The function to customize comparisons.
  1887. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1888. * @example
  1889. *
  1890. * function isGreeting(value) {
  1891. * return /^h(?:i|ello)$/.test(value);
  1892. * }
  1893. *
  1894. * function customizer(objValue, othValue) {
  1895. * if (isGreeting(objValue) && isGreeting(othValue)) {
  1896. * return true;
  1897. * }
  1898. * }
  1899. *
  1900. * var array = ['hello', 'goodbye'];
  1901. * var other = ['hi', 'goodbye'];
  1902. *
  1903. * isEqualWith(array, other, customizer); // => true
  1904. */
  1905. exports.default = (function (value, other, fn) {
  1906. if (!is_function_1.default(fn)) {
  1907. return is_equal_1.default(value, other);
  1908. }
  1909. return !!fn(value, other);
  1910. });
  1911. //# sourceMappingURL=is-equal-with.js.map
  1912. }, function(modId) { var map = {"./is-function":1603070659032,"./is-equal":1603070659118}; return __REQUIRE__(map[modId], modId); })
  1913. __DEFINE__(1603070659120, function(require, module, exports) {
  1914. Object.defineProperty(exports, "__esModule", { value: true });
  1915. var is_array_like_1 = require("./is-array-like");
  1916. var map = function (arr, func) {
  1917. if (!is_array_like_1.default(arr)) {
  1918. // @ts-ignore
  1919. return arr;
  1920. }
  1921. var result = [];
  1922. for (var index = 0; index < arr.length; index++) {
  1923. var value = arr[index];
  1924. result.push(func(value, index));
  1925. }
  1926. return result;
  1927. };
  1928. exports.default = map;
  1929. //# sourceMappingURL=map.js.map
  1930. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  1931. __DEFINE__(1603070659121, function(require, module, exports) {
  1932. Object.defineProperty(exports, "__esModule", { value: true });
  1933. var is_nil_1 = require("./is-nil");
  1934. var is_object_1 = require("./is-object");
  1935. var identity = function (v) { return v; };
  1936. exports.default = (function (object, func) {
  1937. if (func === void 0) { func = identity; }
  1938. var r = {};
  1939. if (is_object_1.default(object) && !is_nil_1.default(object)) {
  1940. Object.keys(object).forEach(function (key) {
  1941. // @ts-ignore
  1942. r[key] = func(object[key], key);
  1943. });
  1944. }
  1945. return r;
  1946. });
  1947. //# sourceMappingURL=map-values.js.map
  1948. }, function(modId) { var map = {"./is-nil":1603070659035,"./is-object":1603070659039}; return __REQUIRE__(map[modId], modId); })
  1949. __DEFINE__(1603070659122, function(require, module, exports) {
  1950. Object.defineProperty(exports, "__esModule", { value: true });
  1951. var is_string_1 = require("./is-string");
  1952. /**
  1953. * https://github.com/developit/dlv/blob/master/index.js
  1954. * @param obj
  1955. * @param key
  1956. * @param defaultValue
  1957. */
  1958. exports.default = (function (obj, key, defaultValue) {
  1959. var p = 0;
  1960. var keyArr = is_string_1.default(key) ? key.split('.') : key;
  1961. while (obj && p < keyArr.length) {
  1962. obj = obj[keyArr[p++]];
  1963. }
  1964. return (obj === undefined || p < keyArr.length) ? defaultValue : obj;
  1965. });
  1966. //# sourceMappingURL=get.js.map
  1967. }, function(modId) { var map = {"./is-string":1603070659052}; return __REQUIRE__(map[modId], modId); })
  1968. __DEFINE__(1603070659123, function(require, module, exports) {
  1969. Object.defineProperty(exports, "__esModule", { value: true });
  1970. var is_object_1 = require("./is-object");
  1971. var is_string_1 = require("./is-string");
  1972. var is_number_1 = require("./is-number");
  1973. /**
  1974. * https://github.com/developit/dlv/blob/master/index.js
  1975. * @param obj
  1976. * @param path
  1977. * @param value
  1978. */
  1979. exports.default = (function (obj, path, value) {
  1980. var o = obj;
  1981. var keyArr = is_string_1.default(path) ? path.split('.') : path;
  1982. keyArr.forEach(function (key, idx) {
  1983. // 不是最后一个
  1984. if (idx < keyArr.length - 1) {
  1985. if (!is_object_1.default(o[key])) {
  1986. o[key] = is_number_1.default(keyArr[idx + 1]) ? [] : {};
  1987. }
  1988. o = o[key];
  1989. }
  1990. else {
  1991. o[key] = value;
  1992. }
  1993. });
  1994. return obj;
  1995. });
  1996. //# sourceMappingURL=set.js.map
  1997. }, function(modId) { var map = {"./is-object":1603070659039,"./is-string":1603070659052,"./is-number":1603070659072}; return __REQUIRE__(map[modId], modId); })
  1998. __DEFINE__(1603070659124, function(require, module, exports) {
  1999. Object.defineProperty(exports, "__esModule", { value: true });
  2000. var each_1 = require("./each");
  2001. var is_plain_object_1 = require("./is-plain-object");
  2002. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2003. exports.default = (function (object, keys) {
  2004. if (object === null || !is_plain_object_1.default(object)) {
  2005. return {};
  2006. }
  2007. var result = {};
  2008. each_1.default(keys, function (key) {
  2009. if (hasOwnProperty.call(object, key)) {
  2010. result[key] = object[key];
  2011. }
  2012. });
  2013. return result;
  2014. });
  2015. //# sourceMappingURL=pick.js.map
  2016. }, function(modId) { var map = {"./each":1603070659037,"./is-plain-object":1603070659040}; return __REQUIRE__(map[modId], modId); })
  2017. __DEFINE__(1603070659125, function(require, module, exports) {
  2018. Object.defineProperty(exports, "__esModule", { value: true });
  2019. exports.default = (function (func, wait, options) {
  2020. var timeout, context, args, result;
  2021. var previous = 0;
  2022. if (!options)
  2023. options = {};
  2024. var later = function () {
  2025. previous = options.leading === false ? 0 : Date.now();
  2026. timeout = null;
  2027. result = func.apply(context, args);
  2028. if (!timeout)
  2029. context = args = null;
  2030. };
  2031. var throttled = function () {
  2032. var now = Date.now();
  2033. if (!previous && options.leading === false)
  2034. previous = now;
  2035. var remaining = wait - (now - previous);
  2036. context = this;
  2037. args = arguments;
  2038. if (remaining <= 0 || remaining > wait) {
  2039. if (timeout) {
  2040. clearTimeout(timeout);
  2041. timeout = null;
  2042. }
  2043. previous = now;
  2044. result = func.apply(context, args);
  2045. if (!timeout)
  2046. context = args = null;
  2047. }
  2048. else if (!timeout && options.trailing !== false) {
  2049. timeout = setTimeout(later, remaining);
  2050. }
  2051. return result;
  2052. };
  2053. throttled.cancel = function () {
  2054. clearTimeout(timeout);
  2055. previous = 0;
  2056. timeout = context = args = null;
  2057. };
  2058. return throttled;
  2059. });
  2060. //# sourceMappingURL=throttle.js.map
  2061. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  2062. __DEFINE__(1603070659126, function(require, module, exports) {
  2063. Object.defineProperty(exports, "__esModule", { value: true });
  2064. var is_array_like_1 = require("./is-array-like");
  2065. exports.default = (function (value) {
  2066. return is_array_like_1.default(value) ? Array.prototype.slice.call(value) : [];
  2067. });
  2068. //# sourceMappingURL=to-array.js.map
  2069. }, function(modId) { var map = {"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  2070. __DEFINE__(1603070659127, function(require, module, exports) {
  2071. Object.defineProperty(exports, "__esModule", { value: true });
  2072. var map = {};
  2073. exports.default = (function (prefix) {
  2074. prefix = prefix || 'g';
  2075. if (!map[prefix]) {
  2076. map[prefix] = 1;
  2077. }
  2078. else {
  2079. map[prefix] += 1;
  2080. }
  2081. return prefix + map[prefix];
  2082. });
  2083. //# sourceMappingURL=unique-id.js.map
  2084. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  2085. __DEFINE__(1603070659128, function(require, module, exports) {
  2086. Object.defineProperty(exports, "__esModule", { value: true });
  2087. exports.default = (function () { });
  2088. //# sourceMappingURL=noop.js.map
  2089. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  2090. __DEFINE__(1603070659129, function(require, module, exports) {
  2091. Object.defineProperty(exports, "__esModule", { value: true });
  2092. exports.default = (function (v) { return v; });
  2093. //# sourceMappingURL=identity.js.map
  2094. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  2095. __DEFINE__(1603070659130, function(require, module, exports) {
  2096. Object.defineProperty(exports, "__esModule", { value: true });
  2097. var is_nil_1 = require("./is-nil");
  2098. var is_array_like_1 = require("./is-array-like");
  2099. function size(o) {
  2100. if (is_nil_1.default(o)) {
  2101. return 0;
  2102. }
  2103. if (is_array_like_1.default(o)) {
  2104. return o.length;
  2105. }
  2106. return Object.keys(o).length;
  2107. }
  2108. exports.default = size;
  2109. //# sourceMappingURL=size.js.map
  2110. }, function(modId) { var map = {"./is-nil":1603070659035,"./is-array-like":1603070659028}; return __REQUIRE__(map[modId], modId); })
  2111. __DEFINE__(1603070659131, function(require, module, exports) {
  2112. Object.defineProperty(exports, "__esModule", { value: true });
  2113. /**
  2114. * k-v 存储
  2115. */
  2116. var default_1 = /** @class */ (function () {
  2117. function default_1() {
  2118. this.map = {};
  2119. }
  2120. default_1.prototype.has = function (key) {
  2121. return this.map[key] !== undefined;
  2122. };
  2123. default_1.prototype.get = function (key, def) {
  2124. var v = this.map[key];
  2125. return v === undefined ? def : v;
  2126. };
  2127. default_1.prototype.set = function (key, value) {
  2128. this.map[key] = value;
  2129. };
  2130. default_1.prototype.clear = function () {
  2131. this.map = {};
  2132. };
  2133. default_1.prototype.delete = function (key) {
  2134. delete this.map[key];
  2135. };
  2136. default_1.prototype.size = function () {
  2137. return Object.keys(this.map).length;
  2138. };
  2139. return default_1;
  2140. }());
  2141. exports.default = default_1;
  2142. //# sourceMappingURL=cache.js.map
  2143. }, function(modId) { var map = {}; return __REQUIRE__(map[modId], modId); })
  2144. return __REQUIRE__(1603070659026);
  2145. })()
  2146. //# sourceMappingURL=index.js.map