index.js 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253
  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__(1658993502675, 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":1658993502676,"./difference":1658993502678,"./find":1658993502680,"./find-index":1658993502691,"./first-value":1658993502692,"./flatten":1658993502693,"./flatten-deep":1658993502694,"./get-range":1658993502695,"./pull":1658993502696,"./pull-at":1658993502697,"./reduce":1658993502698,"./remove":1658993502699,"./sort-by":1658993502700,"./union":1658993502702,"./uniq":1658993502703,"./values-of-key":1658993502704,"./head":1658993502705,"./last":1658993502706,"./starts-with":1658993502707,"./ends-with":1658993502708,"./filter":1658993502679,"./every":1658993502709,"./some":1658993502710,"./group":1658993502711,"./group-by":1658993502713,"./group-to-map":1658993502712,"./get-wrap-behavior":1658993502714,"./wrap-behavior":1658993502715,"./number2color":1658993502716,"./parse-radius":1658993502717,"./clamp":1658993502718,"./fixed-base":1658993502719,"./is-decimal":1658993502720,"./is-even":1658993502722,"./is-integer":1658993502723,"./is-negative":1658993502724,"./is-number-equal":1658993502725,"./is-odd":1658993502726,"./is-positive":1658993502727,"./max-by":1658993502728,"./min-by":1658993502729,"./mod":1658993502730,"./to-degree":1658993502731,"./to-integer":1658993502732,"./to-radian":1658993502733,"./for-in":1658993502734,"./has":1658993502735,"./has-key":1658993502736,"./has-value":1658993502737,"./keys":1658993502685,"./is-match":1658993502683,"./values":1658993502738,"./lower-case":1658993502739,"./lower-first":1658993502741,"./substitute":1658993502742,"./upper-case":1658993502743,"./upper-first":1658993502744,"./get-type":1658993502745,"./is-arguments":1658993502746,"./is-array":1658993502687,"./is-array-like":1658993502677,"./is-boolean":1658993502747,"./is-date":1658993502748,"./is-error":1658993502749,"./is-function":1658993502681,"./is-finite":1658993502750,"./is-nil":1658993502684,"./is-null":1658993502751,"./is-number":1658993502721,"./is-object":1658993502688,"./is-object-like":1658993502690,"./is-plain-object":1658993502689,"./is-prototype":1658993502752,"./is-reg-exp":1658993502753,"./is-string":1658993502701,"./is-type":1658993502682,"./is-undefined":1658993502754,"./is-element":1658993502755,"./request-animation-frame":1658993502756,"./clear-animation-frame":1658993502757,"./augment":1658993502758,"./clone":1658993502760,"./debounce":1658993502761,"./memoize":1658993502762,"./deep-mix":1658993502763,"./each":1658993502686,"./extend":1658993502764,"./index-of":1658993502765,"./is-empty":1658993502766,"./is-equal":1658993502767,"./is-equal-with":1658993502768,"./map":1658993502769,"./map-values":1658993502770,"./mix":1658993502759,"./get":1658993502771,"./set":1658993502772,"./pick":1658993502773,"./throttle":1658993502774,"./to-array":1658993502775,"./to-string":1658993502740,"./unique-id":1658993502776,"./noop":1658993502777,"./identity":1658993502778,"./size":1658993502779,"./cache":1658993502780}; return __REQUIRE__(map[modId], modId); })
  232. __DEFINE__(1658993502676, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  244. __DEFINE__(1658993502677, 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__(1658993502678, 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":1658993502679,"./contains":1658993502676}; return __REQUIRE__(map[modId], modId); })
  278. __DEFINE__(1658993502679, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  297. __DEFINE__(1658993502680, 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":1658993502681,"./is-match":1658993502683,"./is-array":1658993502687,"./is-plain-object":1658993502689}; return __REQUIRE__(map[modId], modId); })
  325. __DEFINE__(1658993502681, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  338. __DEFINE__(1658993502682, 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__(1658993502683, 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":1658993502684,"./keys":1658993502685}; return __REQUIRE__(map[modId], modId); })
  365. __DEFINE__(1658993502684, 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__(1658993502685, 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":1658993502686,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  394. __DEFINE__(1658993502686, 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":1658993502687,"./is-object":1658993502688}; return __REQUIRE__(map[modId], modId); })
  425. __DEFINE__(1658993502687, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  435. __DEFINE__(1658993502688, 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__(1658993502689, 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":1658993502690,"./is-type":1658993502682}; return __REQUIRE__(map[modId], modId); })
  475. __DEFINE__(1658993502690, 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__(1658993502691, 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__(1658993502692, 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":1658993502684,"./is-array":1658993502687}; return __REQUIRE__(map[modId], modId); })
  528. __DEFINE__(1658993502693, 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":1658993502687}; return __REQUIRE__(map[modId], modId); })
  553. __DEFINE__(1658993502694, 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":1658993502687}; return __REQUIRE__(map[modId], modId); })
  581. __DEFINE__(1658993502695, 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":1658993502687}; return __REQUIRE__(map[modId], modId); })
  610. __DEFINE__(1658993502696, 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__(1658993502697, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  655. __DEFINE__(1658993502698, 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":1658993502686,"./is-array":1658993502687,"./is-plain-object":1658993502689}; return __REQUIRE__(map[modId], modId); })
  673. __DEFINE__(1658993502699, 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":1658993502677,"./pull-at":1658993502697}; return __REQUIRE__(map[modId], modId); })
  704. __DEFINE__(1658993502700, 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":1658993502687,"./is-string":1658993502701,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  741. __DEFINE__(1658993502701, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  749. __DEFINE__(1658993502702, 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":1658993502703}; return __REQUIRE__(map[modId], modId); })
  762. __DEFINE__(1658993502703, 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":1658993502676,"./each":1658993502686}; return __REQUIRE__(map[modId], modId); })
  778. __DEFINE__(1658993502704, 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":1658993502687,"./is-nil":1658993502684}; return __REQUIRE__(map[modId], modId); })
  807. __DEFINE__(1658993502705, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  819. __DEFINE__(1658993502706, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  832. __DEFINE__(1658993502707, 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":1658993502687,"./is-string":1658993502701}; return __REQUIRE__(map[modId], modId); })
  842. __DEFINE__(1658993502708, 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":1658993502687,"./is-string":1658993502701}; return __REQUIRE__(map[modId], modId); })
  852. __DEFINE__(1658993502709, 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__(1658993502710, 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__(1658993502711, 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":1658993502712}; return __REQUIRE__(map[modId], modId); })
  903. __DEFINE__(1658993502712, 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":1658993502687,"./is-function":1658993502681,"./group-by":1658993502713}; return __REQUIRE__(map[modId], modId); })
  930. __DEFINE__(1658993502713, 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":1658993502687,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  958. __DEFINE__(1658993502714, 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__(1658993502715, 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__(1658993502716, 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__(1658993502717, 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":1658993502687}; return __REQUIRE__(map[modId], modId); })
  1052. __DEFINE__(1658993502718, 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__(1658993502719, 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__(1658993502720, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1092. __DEFINE__(1658993502721, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1105. __DEFINE__(1658993502722, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1114. __DEFINE__(1658993502723, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1123. __DEFINE__(1658993502724, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1132. __DEFINE__(1658993502725, 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__(1658993502726, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1152. __DEFINE__(1658993502727, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1161. __DEFINE__(1658993502728, 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":1658993502686,"./is-array":1658993502687,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1209. __DEFINE__(1658993502729, 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":1658993502686,"./is-array":1658993502687,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1257. __DEFINE__(1658993502730, 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__(1658993502731, 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__(1658993502732, 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__(1658993502733, 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__(1658993502734, 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":1658993502686}; return __REQUIRE__(map[modId], modId); })
  1294. __DEFINE__(1658993502735, 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__(1658993502736, 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":1658993502735}; return __REQUIRE__(map[modId], modId); })
  1305. __DEFINE__(1658993502737, 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":1658993502676,"./values":1658993502738}; return __REQUIRE__(map[modId], modId); })
  1312. __DEFINE__(1658993502738, 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":1658993502686,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1329. __DEFINE__(1658993502739, 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":1658993502740}; return __REQUIRE__(map[modId], modId); })
  1338. __DEFINE__(1658993502740, 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":1658993502684}; return __REQUIRE__(map[modId], modId); })
  1348. __DEFINE__(1658993502741, 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":1658993502740}; return __REQUIRE__(map[modId], modId); })
  1358. __DEFINE__(1658993502742, 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__(1658993502743, 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":1658993502740}; return __REQUIRE__(map[modId], modId); })
  1383. __DEFINE__(1658993502744, 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":1658993502740}; return __REQUIRE__(map[modId], modId); })
  1393. __DEFINE__(1658993502745, 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__(1658993502746, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1417. __DEFINE__(1658993502747, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1432. __DEFINE__(1658993502748, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1441. __DEFINE__(1658993502749, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1456. __DEFINE__(1658993502750, 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":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1469. __DEFINE__(1658993502751, 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__(1658993502752, 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__(1658993502753, 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":1658993502682}; return __REQUIRE__(map[modId], modId); })
  1497. __DEFINE__(1658993502754, 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__(1658993502755, 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__(1658993502756, 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__(1658993502757, 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__(1658993502758, 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":1658993502759,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1572. __DEFINE__(1658993502759, 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__(1658993502760, 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":1658993502687}; return __REQUIRE__(map[modId], modId); })
  1629. __DEFINE__(1658993502761, 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__(1658993502762, 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":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1686. __DEFINE__(1658993502763, 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":1658993502687,"./is-plain-object":1658993502689}; return __REQUIRE__(map[modId], modId); })
  1732. __DEFINE__(1658993502764, 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":1658993502759,"./is-function":1658993502681}; return __REQUIRE__(map[modId], modId); })
  1768. __DEFINE__(1658993502765, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  1791. __DEFINE__(1658993502766, 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":1658993502684,"./is-array-like":1658993502677,"./get-type":1658993502745,"./is-prototype":1658993502752}; return __REQUIRE__(map[modId], modId); })
  1831. __DEFINE__(1658993502767, 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":1658993502690,"./is-array-like":1658993502677,"./is-string":1658993502701}; return __REQUIRE__(map[modId], modId); })
  1879. __DEFINE__(1658993502768, 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":1658993502681,"./is-equal":1658993502767}; return __REQUIRE__(map[modId], modId); })
  1913. __DEFINE__(1658993502769, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  1931. __DEFINE__(1658993502770, 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":1658993502684,"./is-object":1658993502688}; return __REQUIRE__(map[modId], modId); })
  1949. __DEFINE__(1658993502771, 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":1658993502701}; return __REQUIRE__(map[modId], modId); })
  1968. __DEFINE__(1658993502772, 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":1658993502688,"./is-string":1658993502701,"./is-number":1658993502721}; return __REQUIRE__(map[modId], modId); })
  1998. __DEFINE__(1658993502773, 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":1658993502686,"./is-plain-object":1658993502689}; return __REQUIRE__(map[modId], modId); })
  2017. __DEFINE__(1658993502774, 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__(1658993502775, 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":1658993502677}; return __REQUIRE__(map[modId], modId); })
  2070. __DEFINE__(1658993502776, 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__(1658993502777, 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__(1658993502778, 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__(1658993502779, 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":1658993502684,"./is-array-like":1658993502677}; return __REQUIRE__(map[modId], modId); })
  2111. __DEFINE__(1658993502780, 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__(1658993502675);
  2145. })()
  2146. //miniprogram-npm-outsideDeps=[]
  2147. //# sourceMappingURL=index.js.map