easy-elplus 1.0.1 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/README.md +2 -1
  2. package/dist/index.full.js +4430 -0
  3. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  4. package/es/index.mjs +35 -0
  5. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.mjs +7 -0
  6. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.mjs +32 -0
  7. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.mjs +32 -0
  8. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.mjs +7 -0
  9. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.mjs +32 -0
  10. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.mjs +7 -0
  11. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.mjs +7 -0
  12. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.mjs +27 -0
  13. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.mjs +6 -0
  14. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.mjs +6 -0
  15. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.mjs +7 -0
  16. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.mjs +21 -0
  17. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.mjs +22 -0
  18. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.mjs +25 -0
  19. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.mjs +42 -0
  20. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.mjs +21 -0
  21. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.mjs +20 -0
  22. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.mjs +28 -0
  23. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.mjs +21 -0
  24. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.mjs +25 -0
  25. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.mjs +140 -0
  26. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.mjs +35 -0
  27. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.mjs +24 -0
  28. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.mjs +20 -0
  29. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.mjs +28 -0
  30. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.mjs +18 -0
  31. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.mjs +18 -0
  32. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.mjs +47 -0
  33. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.mjs +18 -0
  34. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.mjs +60 -0
  35. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.mjs +33 -0
  36. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.mjs +22 -0
  37. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.mjs +31 -0
  38. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.mjs +20 -0
  39. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.mjs +34 -0
  40. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.mjs +14 -0
  41. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.mjs +65 -0
  42. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.mjs +21 -0
  43. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.mjs +16 -0
  44. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.mjs +30 -0
  45. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.mjs +16 -0
  46. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.mjs +17 -0
  47. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.mjs +18 -0
  48. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.mjs +16 -0
  49. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.mjs +38 -0
  50. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.mjs +6 -0
  51. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.mjs +16 -0
  52. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.mjs +11 -0
  53. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.mjs +16 -0
  54. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.mjs +4 -0
  55. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.mjs +17 -0
  56. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.mjs +18 -0
  57. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.mjs +17 -0
  58. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.mjs +6 -0
  59. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.mjs +46 -0
  60. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.mjs +30 -0
  61. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.mjs +25 -0
  62. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.mjs +58 -0
  63. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.mjs +13 -0
  64. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.mjs +15 -0
  65. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.mjs +17 -0
  66. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.mjs +30 -0
  67. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.mjs +23 -0
  68. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.mjs +23 -0
  69. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.mjs +26 -0
  70. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.mjs +77 -0
  71. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.mjs +20 -0
  72. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.mjs +25 -0
  73. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.mjs +29 -0
  74. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.mjs +15 -0
  75. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.mjs +20 -0
  76. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.mjs +18 -0
  77. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.mjs +13 -0
  78. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.mjs +35 -0
  79. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.mjs +19 -0
  80. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.mjs +16 -0
  81. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.mjs +26 -0
  82. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.mjs +21 -0
  83. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.mjs +18 -0
  84. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.mjs +16 -0
  85. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.mjs +16 -0
  86. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.mjs +22 -0
  87. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.mjs +26 -0
  88. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.mjs +6 -0
  89. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.mjs +20 -0
  90. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.mjs +30 -0
  91. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.mjs +22 -0
  92. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.mjs +15 -0
  93. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.mjs +36 -0
  94. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.mjs +16 -0
  95. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.mjs +9 -0
  96. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.mjs +14 -0
  97. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.mjs +37 -0
  98. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.mjs +15 -0
  99. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.mjs +18 -0
  100. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.mjs +14 -0
  101. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.mjs +14 -0
  102. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.mjs +34 -0
  103. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.mjs +27 -0
  104. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.mjs +18 -0
  105. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.mjs +26 -0
  106. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.mjs +26 -0
  107. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.mjs +37 -0
  108. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.mjs +22 -0
  109. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.mjs +21 -0
  110. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.mjs +36 -0
  111. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.mjs +26 -0
  112. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.mjs +33 -0
  113. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.mjs +38 -0
  114. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.mjs +37 -0
  115. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.mjs +35 -0
  116. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.mjs +27 -0
  117. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.mjs +31 -0
  118. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.mjs +29 -0
  119. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.mjs +62 -0
  120. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.mjs +27 -0
  121. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.mjs +29 -0
  122. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.mjs +27 -0
  123. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.mjs +32 -0
  124. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.mjs +20 -0
  125. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.mjs +73 -0
  126. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.mjs +57 -0
  127. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.mjs +23 -0
  128. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.mjs +18 -0
  129. package/es/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.mjs +28 -0
  130. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
  131. package/es/packages/components/FileUpload/index.mjs +6 -0
  132. package/es/packages/components/FileUpload/src/FileUpload.vue.mjs +332 -0
  133. package/es/packages/components/FileUpload/src/FileUpload.vue2.mjs +4 -0
  134. package/es/packages/components/ImageUpload/index.mjs +6 -0
  135. package/es/packages/components/ImageUpload/src/ImageUpload.vue.mjs +258 -0
  136. package/es/packages/components/ImageUpload/src/ImageUpload.vue2.mjs +4 -0
  137. package/es/packages/components/button/index.mjs +10 -0
  138. package/es/packages/components/button/src/button.vue.mjs +42 -0
  139. package/es/packages/components/descriptions/index.mjs +10 -0
  140. package/es/packages/components/descriptions/src/comp.vue.mjs +58 -0
  141. package/es/packages/components/descriptions/src/descriptions.vue.mjs +178 -0
  142. package/es/packages/components/dialog/index.mjs +11 -0
  143. package/{packages/components/dialog/src/useDialog.js → es/packages/components/dialog/src/useDialog.mjs} +53 -50
  144. package/es/packages/components/table/index.mjs +10 -0
  145. package/es/packages/components/table/src/scrollTo.mjs +69 -0
  146. package/es/packages/components/table/src/table.vue.mjs +356 -0
  147. package/es/packages/components/table/src/table.vue2.mjs +4 -0
  148. package/es/packages/constants/event.mjs +3 -0
  149. package/{packages/hooks/src/useDynamicComponent.js → es/packages/hooks/src/useDynamicComponent.mjs} +11 -9
  150. package/es/packages/utils/type.mjs +9 -0
  151. package/{packages/utils/vue/appContext.js → es/packages/utils/vue/appContext.mjs} +6 -4
  152. package/es/packages/utils/vue/install.mjs +22 -0
  153. package/lib/_virtual/_plugin-vue_export-helper.js +13 -0
  154. package/lib/index.js +46 -0
  155. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_DataView.js +11 -0
  156. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Hash.js +36 -0
  157. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_ListCache.js +36 -0
  158. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Map.js +11 -0
  159. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_MapCache.js +36 -0
  160. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Promise.js +11 -0
  161. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Set.js +11 -0
  162. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Stack.js +31 -0
  163. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Symbol.js +10 -0
  164. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_Uint8Array.js +10 -0
  165. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_WeakMap.js +11 -0
  166. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_apply.js +25 -0
  167. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayEach.js +26 -0
  168. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayFilter.js +29 -0
  169. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayLikeKeys.js +46 -0
  170. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayMap.js +25 -0
  171. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_arrayPush.js +24 -0
  172. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assignValue.js +32 -0
  173. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_assocIndexOf.js +25 -0
  174. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseAssignValue.js +29 -0
  175. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseClone.js +144 -0
  176. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseFlatten.js +39 -0
  177. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGet.js +28 -0
  178. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetAllKeys.js +24 -0
  179. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseGetTag.js +32 -0
  180. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsArguments.js +22 -0
  181. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsMap.js +22 -0
  182. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsNative.js +51 -0
  183. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsSet.js +22 -0
  184. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseIsTypedArray.js +64 -0
  185. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseKeysIn.js +37 -0
  186. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSetToString.js +26 -0
  187. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSlice.js +35 -0
  188. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTimes.js +24 -0
  189. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseToString.js +38 -0
  190. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnary.js +18 -0
  191. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseUnset.js +69 -0
  192. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_castPath.js +25 -0
  193. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneArrayBuffer.js +20 -0
  194. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneBuffer.js +34 -0
  195. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneDataView.js +20 -0
  196. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneRegExp.js +21 -0
  197. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneSymbol.js +22 -0
  198. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_cloneTypedArray.js +20 -0
  199. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_copyObject.js +42 -0
  200. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_coreJsData.js +10 -0
  201. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_customOmitClone.js +20 -0
  202. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_defineProperty.js +15 -0
  203. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_flatRest.js +20 -0
  204. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_freeGlobal.js +8 -0
  205. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getAllKeysIn.js +21 -0
  206. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getMapData.js +22 -0
  207. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getNative.js +21 -0
  208. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getPrototype.js +10 -0
  209. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getRawTag.js +50 -0
  210. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbols.js +34 -0
  211. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getSymbolsIn.js +29 -0
  212. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getTag.js +60 -0
  213. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_getValue.js +17 -0
  214. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashClear.js +19 -0
  215. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashDelete.js +21 -0
  216. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashGet.js +34 -0
  217. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashHas.js +27 -0
  218. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_hashSet.js +27 -0
  219. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneArray.js +30 -0
  220. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_initCloneByTag.js +81 -0
  221. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isFlattenable.js +24 -0
  222. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isIndex.js +29 -0
  223. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKey.js +33 -0
  224. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isKeyable.js +19 -0
  225. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isMasked.js +24 -0
  226. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_isPrototype.js +22 -0
  227. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheClear.js +17 -0
  228. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheDelete.js +39 -0
  229. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheGet.js +23 -0
  230. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheHas.js +20 -0
  231. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_listCacheSet.js +30 -0
  232. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheClear.js +25 -0
  233. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheDelete.js +22 -0
  234. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheGet.js +20 -0
  235. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheHas.js +20 -0
  236. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_mapCacheSet.js +26 -0
  237. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_memoizeCapped.js +30 -0
  238. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeCreate.js +10 -0
  239. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nativeKeysIn.js +24 -0
  240. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_nodeUtil.js +34 -0
  241. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_objectToString.js +26 -0
  242. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overArg.js +19 -0
  243. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_overRest.js +40 -0
  244. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_parent.js +20 -0
  245. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_root.js +13 -0
  246. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_setToString.js +18 -0
  247. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_shortOut.js +41 -0
  248. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackClear.js +19 -0
  249. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackDelete.js +22 -0
  250. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackGet.js +18 -0
  251. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackHas.js +18 -0
  252. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stackSet.js +38 -0
  253. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_stringToPath.js +31 -0
  254. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toKey.js +22 -0
  255. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_toSource.js +30 -0
  256. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/constant.js +30 -0
  257. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/eq.js +41 -0
  258. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js +26 -0
  259. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/identity.js +25 -0
  260. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArguments.js +40 -0
  261. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArray.js +30 -0
  262. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isArrayLike.js +37 -0
  263. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isBuffer.js +42 -0
  264. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isFunction.js +41 -0
  265. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isLength.js +39 -0
  266. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isMap.js +31 -0
  267. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObject.js +35 -0
  268. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isObjectLike.js +33 -0
  269. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isPlainObject.js +66 -0
  270. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSet.js +31 -0
  271. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isSymbol.js +33 -0
  272. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isTypedArray.js +31 -0
  273. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/keysIn.js +36 -0
  274. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js +24 -0
  275. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/memoize.js +77 -0
  276. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/omit.js +61 -0
  277. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubArray.js +27 -0
  278. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/stubFalse.js +22 -0
  279. package/lib/node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toString.js +32 -0
  280. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
  281. package/lib/packages/components/FileUpload/index.js +11 -0
  282. package/lib/packages/components/FileUpload/src/FileUpload.vue.js +336 -0
  283. package/lib/packages/components/FileUpload/src/FileUpload.vue2.js +6 -0
  284. package/lib/packages/components/ImageUpload/index.js +11 -0
  285. package/lib/packages/components/ImageUpload/src/ImageUpload.vue.js +262 -0
  286. package/lib/packages/components/ImageUpload/src/ImageUpload.vue2.js +6 -0
  287. package/lib/packages/components/button/index.js +15 -0
  288. package/lib/packages/components/button/src/button.vue.js +46 -0
  289. package/lib/packages/components/descriptions/index.js +15 -0
  290. package/lib/packages/components/descriptions/src/comp.vue.js +62 -0
  291. package/lib/packages/components/descriptions/src/descriptions.vue.js +182 -0
  292. package/{packages → lib/packages}/components/dialog/index.js +7 -7
  293. package/lib/packages/components/dialog/src/useDialog.js +184 -0
  294. package/lib/packages/components/table/index.js +15 -0
  295. package/{packages → lib/packages}/components/table/src/scrollTo.js +26 -27
  296. package/lib/packages/components/table/src/table.vue.js +360 -0
  297. package/lib/packages/components/table/src/table.vue2.js +6 -0
  298. package/lib/packages/constants/event.js +5 -0
  299. package/lib/packages/hooks/src/useDynamicComponent.js +54 -0
  300. package/lib/packages/utils/type.js +15 -0
  301. package/lib/packages/utils/vue/appContext.js +28 -0
  302. package/lib/packages/utils/vue/install.js +24 -0
  303. package/package.json +59 -48
  304. package/.github/workflows/deploy.yml +0 -21
  305. package/.husky/commit-msg +0 -1
  306. package/.husky/pre-commit +0 -1
  307. package/.release-it.cjs +0 -22
  308. package/.vscode/extensions.json +0 -3
  309. package/.vscode/settings.json +0 -7
  310. package/commitlint.config.js +0 -145
  311. package/docs/.vitepress/config.mjs +0 -100
  312. package/docs/.vitepress/sidebar.js +0 -48
  313. package/docs/.vitepress/theme/index.js +0 -23
  314. package/docs/api-examples.md +0 -55
  315. package/docs/components/button.md +0 -53
  316. package/docs/components/descriptions.md +0 -88
  317. package/docs/components/dialog.md +0 -61
  318. package/docs/components/file-upload.md +0 -43
  319. package/docs/components/image-upload.md +0 -43
  320. package/docs/components/table.md +0 -113
  321. package/docs/contact-me/index.md +0 -11
  322. package/docs/demo/DialogFormContent.vue +0 -54
  323. package/docs/demo/button-basic.vue +0 -48
  324. package/docs/demo/descriptions-basic.vue +0 -159
  325. package/docs/demo/dialog-basic.vue +0 -137
  326. package/docs/demo/file-upload-basic.vue +0 -25
  327. package/docs/demo/image-upload-basic.vue +0 -24
  328. package/docs/demo/table-basic.vue +0 -177
  329. package/docs/guide/index.md +0 -52
  330. package/docs/guide/installation.md +0 -86
  331. package/docs/guide/quickstart.md +0 -75
  332. package/docs/index.md +0 -28
  333. package/docs/markdown-examples.md +0 -85
  334. package/docs/package.json +0 -23
  335. package/docs/public/logo.png +0 -0
  336. package/docs/public/qq.jpg +0 -0
  337. package/docs/public/wx.jpg +0 -0
  338. package/eslint.config.js +0 -1
  339. package/internal/build/copyFiles.js +0 -26
  340. package/internal/build/full-bundle.js +0 -48
  341. package/internal/build/gulpfile.js +0 -6
  342. package/internal/build/modules.js +0 -64
  343. package/internal/build/package.json +0 -23
  344. package/internal/eslint-config/index.js +0 -35
  345. package/internal/eslint-config/package.json +0 -21
  346. package/packages/components/FileUpload/index.js +0 -8
  347. package/packages/components/FileUpload/src/FileUpload.vue +0 -308
  348. package/packages/components/ImageUpload/index.js +0 -8
  349. package/packages/components/ImageUpload/src/ImageUpload.vue +0 -221
  350. package/packages/components/button/index.js +0 -11
  351. package/packages/components/button/src/button.vue +0 -32
  352. package/packages/components/descriptions/index.js +0 -11
  353. package/packages/components/descriptions/src/comp.vue +0 -39
  354. package/packages/components/descriptions/src/descriptions.vue +0 -138
  355. package/packages/components/index.js +0 -6
  356. package/packages/components/package.json +0 -20
  357. package/packages/components/table/index.js +0 -11
  358. package/packages/components/table/src/table.vue +0 -300
  359. package/packages/constants/event.js +0 -3
  360. package/packages/constants/index.js +0 -1
  361. package/packages/constants/package.json +0 -13
  362. package/packages/easy-elplus/index.js +0 -36
  363. package/packages/easy-elplus/package.json +0 -62
  364. package/packages/hooks/index.js +0 -1
  365. package/packages/hooks/package.json +0 -13
  366. package/packages/utils/index.js +0 -3
  367. package/packages/utils/package.json +0 -16
  368. package/packages/utils/type.js +0 -6
  369. package/packages/utils/vue/install.js +0 -36
  370. package/play/README.md +0 -5
  371. package/play/index.html +0 -13
  372. package/play/package.json +0 -19
  373. package/play/public/vite.svg +0 -1
  374. package/play/src/App.vue +0 -151
  375. package/play/src/main.js +0 -13
  376. package/play/src/router/index.js +0 -45
  377. package/play/src/testComp/AgeComp.vue +0 -9
  378. package/play/src/testComp/AsyncDemo.vue +0 -43
  379. package/play/src/testComp/CustomFooter.vue +0 -34
  380. package/play/src/testComp/DialogContent.vue +0 -172
  381. package/play/src/testComp/HeaderComp.vue +0 -1
  382. package/play/src/testComp/HtmlContent.vue +0 -8
  383. package/play/src/testComp/NestedDemo.vue +0 -15
  384. package/play/src/views/button.vue +0 -18
  385. package/play/src/views/descriptions.vue +0 -194
  386. package/play/src/views/dialog.vue +0 -283
  387. package/play/src/views/file-upload.vue +0 -170
  388. package/play/src/views/image-upload.vue +0 -100
  389. package/play/src/views/table.vue +0 -185
  390. package/play/test/index.html +0 -31
  391. package/play/vite.config.js +0 -14
  392. package/pnpm-workspace.yaml +0 -11
  393. package/prettier.config.js +0 -39
  394. package/public/qq.jpg +0 -0
@@ -0,0 +1,4430 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('element-plus'), require('@element-plus/icons-vue')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'vue', 'element-plus', '@element-plus/icons-vue'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.EasyElPlus = {}, global.Vue, global.ElementPlus, global.ElementPlusIconsVue));
5
+ })(this, (function (exports, vue, elementPlus, iconsVue) { 'use strict';
6
+
7
+ const isUndefined = val => typeof val === "undefined";
8
+ const isNumber = val => typeof val === "number" && !Number.isNaN(val);
9
+
10
+ // === vue shared ===
11
+ const isString = val => typeof val === "string";
12
+ const isFunction$1 = val => typeof val === "function";
13
+ const isObject$1 = val => val !== null && typeof val === "object";
14
+
15
+ /**
16
+ * 给组件添加 install 方法,支持主组件 + 附加组件
17
+ * @param {Object} main 主组件
18
+ * @param {Object} [extra] 附加组件集合
19
+ */
20
+ const withInstall = (main, extra) => {
21
+ main.install = app => {
22
+ const components = [main, ...([])];
23
+
24
+ for (const comp of components) {
25
+ if (comp.name) {
26
+ app.component(comp.name, comp);
27
+ } else {
28
+ console.warn("Component missing name:", comp);
29
+ }
30
+ }
31
+ };
32
+
33
+ return main
34
+ };
35
+
36
+ /**
37
+ * 全局应用上下文管理
38
+ * 用于在非组件上下文中访问主应用的配置、插件和全局组件
39
+ */
40
+
41
+ let globalAppContext = null;
42
+
43
+ /**
44
+ * 设置全局应用上下文
45
+ * 应该在主应用初始化时调用(通常在 app.use() 中)
46
+ * @param {AppContext} context - Vue 应用上下文
47
+ */
48
+ function setGlobalAppContext(context) {
49
+ globalAppContext = context;
50
+ }
51
+
52
+ /**
53
+ * 获取全局应用上下文
54
+ * @returns {AppContext | null}
55
+ */
56
+ function getGlobalAppContext() {
57
+ return globalAppContext
58
+ }
59
+
60
+ /** Detect free variable `global` from Node.js. */
61
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
62
+
63
+ /** Detect free variable `self`. */
64
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
65
+
66
+ /** Used as a reference to the global object. */
67
+ var root = freeGlobal || freeSelf || Function('return this')();
68
+
69
+ /** Built-in value references. */
70
+ var Symbol$1 = root.Symbol;
71
+
72
+ /** Used for built-in method references. */
73
+ var objectProto$c = Object.prototype;
74
+
75
+ /** Used to check objects for own properties. */
76
+ var hasOwnProperty$9 = objectProto$c.hasOwnProperty;
77
+
78
+ /**
79
+ * Used to resolve the
80
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
81
+ * of values.
82
+ */
83
+ var nativeObjectToString$1 = objectProto$c.toString;
84
+
85
+ /** Built-in value references. */
86
+ var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
87
+
88
+ /**
89
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
90
+ *
91
+ * @private
92
+ * @param {*} value The value to query.
93
+ * @returns {string} Returns the raw `toStringTag`.
94
+ */
95
+ function getRawTag(value) {
96
+ var isOwn = hasOwnProperty$9.call(value, symToStringTag$1),
97
+ tag = value[symToStringTag$1];
98
+
99
+ try {
100
+ value[symToStringTag$1] = undefined;
101
+ var unmasked = true;
102
+ } catch (e) {}
103
+
104
+ var result = nativeObjectToString$1.call(value);
105
+ if (unmasked) {
106
+ if (isOwn) {
107
+ value[symToStringTag$1] = tag;
108
+ } else {
109
+ delete value[symToStringTag$1];
110
+ }
111
+ }
112
+ return result;
113
+ }
114
+
115
+ /** Used for built-in method references. */
116
+ var objectProto$b = Object.prototype;
117
+
118
+ /**
119
+ * Used to resolve the
120
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
121
+ * of values.
122
+ */
123
+ var nativeObjectToString = objectProto$b.toString;
124
+
125
+ /**
126
+ * Converts `value` to a string using `Object.prototype.toString`.
127
+ *
128
+ * @private
129
+ * @param {*} value The value to convert.
130
+ * @returns {string} Returns the converted string.
131
+ */
132
+ function objectToString(value) {
133
+ return nativeObjectToString.call(value);
134
+ }
135
+
136
+ /** `Object#toString` result references. */
137
+ var nullTag = '[object Null]',
138
+ undefinedTag = '[object Undefined]';
139
+
140
+ /** Built-in value references. */
141
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
142
+
143
+ /**
144
+ * The base implementation of `getTag` without fallbacks for buggy environments.
145
+ *
146
+ * @private
147
+ * @param {*} value The value to query.
148
+ * @returns {string} Returns the `toStringTag`.
149
+ */
150
+ function baseGetTag(value) {
151
+ if (value == null) {
152
+ return value === undefined ? undefinedTag : nullTag;
153
+ }
154
+ return (symToStringTag && symToStringTag in Object(value))
155
+ ? getRawTag(value)
156
+ : objectToString(value);
157
+ }
158
+
159
+ /**
160
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
161
+ * and has a `typeof` result of "object".
162
+ *
163
+ * @static
164
+ * @memberOf _
165
+ * @since 4.0.0
166
+ * @category Lang
167
+ * @param {*} value The value to check.
168
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
169
+ * @example
170
+ *
171
+ * _.isObjectLike({});
172
+ * // => true
173
+ *
174
+ * _.isObjectLike([1, 2, 3]);
175
+ * // => true
176
+ *
177
+ * _.isObjectLike(_.noop);
178
+ * // => false
179
+ *
180
+ * _.isObjectLike(null);
181
+ * // => false
182
+ */
183
+ function isObjectLike(value) {
184
+ return value != null && typeof value == 'object';
185
+ }
186
+
187
+ /** `Object#toString` result references. */
188
+ var symbolTag$2 = '[object Symbol]';
189
+
190
+ /**
191
+ * Checks if `value` is classified as a `Symbol` primitive or object.
192
+ *
193
+ * @static
194
+ * @memberOf _
195
+ * @since 4.0.0
196
+ * @category Lang
197
+ * @param {*} value The value to check.
198
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
199
+ * @example
200
+ *
201
+ * _.isSymbol(Symbol.iterator);
202
+ * // => true
203
+ *
204
+ * _.isSymbol('abc');
205
+ * // => false
206
+ */
207
+ function isSymbol(value) {
208
+ return typeof value == 'symbol' ||
209
+ (isObjectLike(value) && baseGetTag(value) == symbolTag$2);
210
+ }
211
+
212
+ /**
213
+ * A specialized version of `_.map` for arrays without support for iteratee
214
+ * shorthands.
215
+ *
216
+ * @private
217
+ * @param {Array} [array] The array to iterate over.
218
+ * @param {Function} iteratee The function invoked per iteration.
219
+ * @returns {Array} Returns the new mapped array.
220
+ */
221
+ function arrayMap(array, iteratee) {
222
+ var index = -1,
223
+ length = array == null ? 0 : array.length,
224
+ result = Array(length);
225
+
226
+ while (++index < length) {
227
+ result[index] = iteratee(array[index], index, array);
228
+ }
229
+ return result;
230
+ }
231
+
232
+ /**
233
+ * Checks if `value` is classified as an `Array` object.
234
+ *
235
+ * @static
236
+ * @memberOf _
237
+ * @since 0.1.0
238
+ * @category Lang
239
+ * @param {*} value The value to check.
240
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
241
+ * @example
242
+ *
243
+ * _.isArray([1, 2, 3]);
244
+ * // => true
245
+ *
246
+ * _.isArray(document.body.children);
247
+ * // => false
248
+ *
249
+ * _.isArray('abc');
250
+ * // => false
251
+ *
252
+ * _.isArray(_.noop);
253
+ * // => false
254
+ */
255
+ var isArray = Array.isArray;
256
+
257
+ /** Used to convert symbols to primitives and strings. */
258
+ var symbolProto$1 = Symbol$1 ? Symbol$1.prototype : undefined,
259
+ symbolToString = symbolProto$1 ? symbolProto$1.toString : undefined;
260
+
261
+ /**
262
+ * The base implementation of `_.toString` which doesn't convert nullish
263
+ * values to empty strings.
264
+ *
265
+ * @private
266
+ * @param {*} value The value to process.
267
+ * @returns {string} Returns the string.
268
+ */
269
+ function baseToString(value) {
270
+ // Exit early for strings to avoid a performance hit in some environments.
271
+ if (typeof value == 'string') {
272
+ return value;
273
+ }
274
+ if (isArray(value)) {
275
+ // Recursively convert values (susceptible to call stack limits).
276
+ return arrayMap(value, baseToString) + '';
277
+ }
278
+ if (isSymbol(value)) {
279
+ return symbolToString ? symbolToString.call(value) : '';
280
+ }
281
+ var result = (value + '');
282
+ return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
283
+ }
284
+
285
+ /**
286
+ * Checks if `value` is the
287
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
288
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
289
+ *
290
+ * @static
291
+ * @memberOf _
292
+ * @since 0.1.0
293
+ * @category Lang
294
+ * @param {*} value The value to check.
295
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
296
+ * @example
297
+ *
298
+ * _.isObject({});
299
+ * // => true
300
+ *
301
+ * _.isObject([1, 2, 3]);
302
+ * // => true
303
+ *
304
+ * _.isObject(_.noop);
305
+ * // => true
306
+ *
307
+ * _.isObject(null);
308
+ * // => false
309
+ */
310
+ function isObject(value) {
311
+ var type = typeof value;
312
+ return value != null && (type == 'object' || type == 'function');
313
+ }
314
+
315
+ /**
316
+ * This method returns the first argument it receives.
317
+ *
318
+ * @static
319
+ * @since 0.1.0
320
+ * @memberOf _
321
+ * @category Util
322
+ * @param {*} value Any value.
323
+ * @returns {*} Returns `value`.
324
+ * @example
325
+ *
326
+ * var object = { 'a': 1 };
327
+ *
328
+ * console.log(_.identity(object) === object);
329
+ * // => true
330
+ */
331
+ function identity(value) {
332
+ return value;
333
+ }
334
+
335
+ /** `Object#toString` result references. */
336
+ var asyncTag = '[object AsyncFunction]',
337
+ funcTag$2 = '[object Function]',
338
+ genTag$1 = '[object GeneratorFunction]',
339
+ proxyTag = '[object Proxy]';
340
+
341
+ /**
342
+ * Checks if `value` is classified as a `Function` object.
343
+ *
344
+ * @static
345
+ * @memberOf _
346
+ * @since 0.1.0
347
+ * @category Lang
348
+ * @param {*} value The value to check.
349
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
350
+ * @example
351
+ *
352
+ * _.isFunction(_);
353
+ * // => true
354
+ *
355
+ * _.isFunction(/abc/);
356
+ * // => false
357
+ */
358
+ function isFunction(value) {
359
+ if (!isObject(value)) {
360
+ return false;
361
+ }
362
+ // The use of `Object#toString` avoids issues with the `typeof` operator
363
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
364
+ var tag = baseGetTag(value);
365
+ return tag == funcTag$2 || tag == genTag$1 || tag == asyncTag || tag == proxyTag;
366
+ }
367
+
368
+ /** Used to detect overreaching core-js shims. */
369
+ var coreJsData = root['__core-js_shared__'];
370
+
371
+ /** Used to detect methods masquerading as native. */
372
+ var maskSrcKey = (function() {
373
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
374
+ return uid ? ('Symbol(src)_1.' + uid) : '';
375
+ }());
376
+
377
+ /**
378
+ * Checks if `func` has its source masked.
379
+ *
380
+ * @private
381
+ * @param {Function} func The function to check.
382
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
383
+ */
384
+ function isMasked(func) {
385
+ return !!maskSrcKey && (maskSrcKey in func);
386
+ }
387
+
388
+ /** Used for built-in method references. */
389
+ var funcProto$2 = Function.prototype;
390
+
391
+ /** Used to resolve the decompiled source of functions. */
392
+ var funcToString$2 = funcProto$2.toString;
393
+
394
+ /**
395
+ * Converts `func` to its source code.
396
+ *
397
+ * @private
398
+ * @param {Function} func The function to convert.
399
+ * @returns {string} Returns the source code.
400
+ */
401
+ function toSource(func) {
402
+ if (func != null) {
403
+ try {
404
+ return funcToString$2.call(func);
405
+ } catch (e) {}
406
+ try {
407
+ return (func + '');
408
+ } catch (e) {}
409
+ }
410
+ return '';
411
+ }
412
+
413
+ /**
414
+ * Used to match `RegExp`
415
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
416
+ */
417
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
418
+
419
+ /** Used to detect host constructors (Safari). */
420
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
421
+
422
+ /** Used for built-in method references. */
423
+ var funcProto$1 = Function.prototype,
424
+ objectProto$a = Object.prototype;
425
+
426
+ /** Used to resolve the decompiled source of functions. */
427
+ var funcToString$1 = funcProto$1.toString;
428
+
429
+ /** Used to check objects for own properties. */
430
+ var hasOwnProperty$8 = objectProto$a.hasOwnProperty;
431
+
432
+ /** Used to detect if a method is native. */
433
+ var reIsNative = RegExp('^' +
434
+ funcToString$1.call(hasOwnProperty$8).replace(reRegExpChar, '\\$&')
435
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
436
+ );
437
+
438
+ /**
439
+ * The base implementation of `_.isNative` without bad shim checks.
440
+ *
441
+ * @private
442
+ * @param {*} value The value to check.
443
+ * @returns {boolean} Returns `true` if `value` is a native function,
444
+ * else `false`.
445
+ */
446
+ function baseIsNative(value) {
447
+ if (!isObject(value) || isMasked(value)) {
448
+ return false;
449
+ }
450
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
451
+ return pattern.test(toSource(value));
452
+ }
453
+
454
+ /**
455
+ * Gets the value at `key` of `object`.
456
+ *
457
+ * @private
458
+ * @param {Object} [object] The object to query.
459
+ * @param {string} key The key of the property to get.
460
+ * @returns {*} Returns the property value.
461
+ */
462
+ function getValue(object, key) {
463
+ return object == null ? undefined : object[key];
464
+ }
465
+
466
+ /**
467
+ * Gets the native function at `key` of `object`.
468
+ *
469
+ * @private
470
+ * @param {Object} object The object to query.
471
+ * @param {string} key The key of the method to get.
472
+ * @returns {*} Returns the function if it's native, else `undefined`.
473
+ */
474
+ function getNative(object, key) {
475
+ var value = getValue(object, key);
476
+ return baseIsNative(value) ? value : undefined;
477
+ }
478
+
479
+ /* Built-in method references that are verified to be native. */
480
+ var WeakMap = getNative(root, 'WeakMap');
481
+
482
+ /**
483
+ * A faster alternative to `Function#apply`, this function invokes `func`
484
+ * with the `this` binding of `thisArg` and the arguments of `args`.
485
+ *
486
+ * @private
487
+ * @param {Function} func The function to invoke.
488
+ * @param {*} thisArg The `this` binding of `func`.
489
+ * @param {Array} args The arguments to invoke `func` with.
490
+ * @returns {*} Returns the result of `func`.
491
+ */
492
+ function apply(func, thisArg, args) {
493
+ switch (args.length) {
494
+ case 0: return func.call(thisArg);
495
+ case 1: return func.call(thisArg, args[0]);
496
+ case 2: return func.call(thisArg, args[0], args[1]);
497
+ case 3: return func.call(thisArg, args[0], args[1], args[2]);
498
+ }
499
+ return func.apply(thisArg, args);
500
+ }
501
+
502
+ /** Used to detect hot functions by number of calls within a span of milliseconds. */
503
+ var HOT_COUNT = 800,
504
+ HOT_SPAN = 16;
505
+
506
+ /* Built-in method references for those with the same name as other `lodash` methods. */
507
+ var nativeNow = Date.now;
508
+
509
+ /**
510
+ * Creates a function that'll short out and invoke `identity` instead
511
+ * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
512
+ * milliseconds.
513
+ *
514
+ * @private
515
+ * @param {Function} func The function to restrict.
516
+ * @returns {Function} Returns the new shortable function.
517
+ */
518
+ function shortOut(func) {
519
+ var count = 0,
520
+ lastCalled = 0;
521
+
522
+ return function() {
523
+ var stamp = nativeNow(),
524
+ remaining = HOT_SPAN - (stamp - lastCalled);
525
+
526
+ lastCalled = stamp;
527
+ if (remaining > 0) {
528
+ if (++count >= HOT_COUNT) {
529
+ return arguments[0];
530
+ }
531
+ } else {
532
+ count = 0;
533
+ }
534
+ return func.apply(undefined, arguments);
535
+ };
536
+ }
537
+
538
+ /**
539
+ * Creates a function that returns `value`.
540
+ *
541
+ * @static
542
+ * @memberOf _
543
+ * @since 2.4.0
544
+ * @category Util
545
+ * @param {*} value The value to return from the new function.
546
+ * @returns {Function} Returns the new constant function.
547
+ * @example
548
+ *
549
+ * var objects = _.times(2, _.constant({ 'a': 1 }));
550
+ *
551
+ * console.log(objects);
552
+ * // => [{ 'a': 1 }, { 'a': 1 }]
553
+ *
554
+ * console.log(objects[0] === objects[1]);
555
+ * // => true
556
+ */
557
+ function constant(value) {
558
+ return function() {
559
+ return value;
560
+ };
561
+ }
562
+
563
+ var defineProperty = (function() {
564
+ try {
565
+ var func = getNative(Object, 'defineProperty');
566
+ func({}, '', {});
567
+ return func;
568
+ } catch (e) {}
569
+ }());
570
+
571
+ /**
572
+ * The base implementation of `setToString` without support for hot loop shorting.
573
+ *
574
+ * @private
575
+ * @param {Function} func The function to modify.
576
+ * @param {Function} string The `toString` result.
577
+ * @returns {Function} Returns `func`.
578
+ */
579
+ var baseSetToString = !defineProperty ? identity : function(func, string) {
580
+ return defineProperty(func, 'toString', {
581
+ 'configurable': true,
582
+ 'enumerable': false,
583
+ 'value': constant(string),
584
+ 'writable': true
585
+ });
586
+ };
587
+
588
+ /**
589
+ * Sets the `toString` method of `func` to return `string`.
590
+ *
591
+ * @private
592
+ * @param {Function} func The function to modify.
593
+ * @param {Function} string The `toString` result.
594
+ * @returns {Function} Returns `func`.
595
+ */
596
+ var setToString = shortOut(baseSetToString);
597
+
598
+ /**
599
+ * A specialized version of `_.forEach` for arrays without support for
600
+ * iteratee shorthands.
601
+ *
602
+ * @private
603
+ * @param {Array} [array] The array to iterate over.
604
+ * @param {Function} iteratee The function invoked per iteration.
605
+ * @returns {Array} Returns `array`.
606
+ */
607
+ function arrayEach(array, iteratee) {
608
+ var index = -1,
609
+ length = array == null ? 0 : array.length;
610
+
611
+ while (++index < length) {
612
+ if (iteratee(array[index], index, array) === false) {
613
+ break;
614
+ }
615
+ }
616
+ return array;
617
+ }
618
+
619
+ /** Used as references for various `Number` constants. */
620
+ var MAX_SAFE_INTEGER$1 = 9007199254740991;
621
+
622
+ /** Used to detect unsigned integer values. */
623
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
624
+
625
+ /**
626
+ * Checks if `value` is a valid array-like index.
627
+ *
628
+ * @private
629
+ * @param {*} value The value to check.
630
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
631
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
632
+ */
633
+ function isIndex(value, length) {
634
+ var type = typeof value;
635
+ length = length == null ? MAX_SAFE_INTEGER$1 : length;
636
+
637
+ return !!length &&
638
+ (type == 'number' ||
639
+ (type != 'symbol' && reIsUint.test(value))) &&
640
+ (value > -1 && value % 1 == 0 && value < length);
641
+ }
642
+
643
+ /**
644
+ * The base implementation of `assignValue` and `assignMergeValue` without
645
+ * value checks.
646
+ *
647
+ * @private
648
+ * @param {Object} object The object to modify.
649
+ * @param {string} key The key of the property to assign.
650
+ * @param {*} value The value to assign.
651
+ */
652
+ function baseAssignValue(object, key, value) {
653
+ if (key == '__proto__' && defineProperty) {
654
+ defineProperty(object, key, {
655
+ 'configurable': true,
656
+ 'enumerable': true,
657
+ 'value': value,
658
+ 'writable': true
659
+ });
660
+ } else {
661
+ object[key] = value;
662
+ }
663
+ }
664
+
665
+ /**
666
+ * Performs a
667
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
668
+ * comparison between two values to determine if they are equivalent.
669
+ *
670
+ * @static
671
+ * @memberOf _
672
+ * @since 4.0.0
673
+ * @category Lang
674
+ * @param {*} value The value to compare.
675
+ * @param {*} other The other value to compare.
676
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
677
+ * @example
678
+ *
679
+ * var object = { 'a': 1 };
680
+ * var other = { 'a': 1 };
681
+ *
682
+ * _.eq(object, object);
683
+ * // => true
684
+ *
685
+ * _.eq(object, other);
686
+ * // => false
687
+ *
688
+ * _.eq('a', 'a');
689
+ * // => true
690
+ *
691
+ * _.eq('a', Object('a'));
692
+ * // => false
693
+ *
694
+ * _.eq(NaN, NaN);
695
+ * // => true
696
+ */
697
+ function eq(value, other) {
698
+ return value === other || (value !== value && other !== other);
699
+ }
700
+
701
+ /** Used for built-in method references. */
702
+ var objectProto$9 = Object.prototype;
703
+
704
+ /** Used to check objects for own properties. */
705
+ var hasOwnProperty$7 = objectProto$9.hasOwnProperty;
706
+
707
+ /**
708
+ * Assigns `value` to `key` of `object` if the existing value is not equivalent
709
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
710
+ * for equality comparisons.
711
+ *
712
+ * @private
713
+ * @param {Object} object The object to modify.
714
+ * @param {string} key The key of the property to assign.
715
+ * @param {*} value The value to assign.
716
+ */
717
+ function assignValue(object, key, value) {
718
+ var objValue = object[key];
719
+ if (!(hasOwnProperty$7.call(object, key) && eq(objValue, value)) ||
720
+ (value === undefined && !(key in object))) {
721
+ baseAssignValue(object, key, value);
722
+ }
723
+ }
724
+
725
+ /**
726
+ * Copies properties of `source` to `object`.
727
+ *
728
+ * @private
729
+ * @param {Object} source The object to copy properties from.
730
+ * @param {Array} props The property identifiers to copy.
731
+ * @param {Object} [object={}] The object to copy properties to.
732
+ * @param {Function} [customizer] The function to customize copied values.
733
+ * @returns {Object} Returns `object`.
734
+ */
735
+ function copyObject(source, props, object, customizer) {
736
+ var isNew = !object;
737
+ object || (object = {});
738
+
739
+ var index = -1,
740
+ length = props.length;
741
+
742
+ while (++index < length) {
743
+ var key = props[index];
744
+
745
+ var newValue = undefined;
746
+
747
+ if (newValue === undefined) {
748
+ newValue = source[key];
749
+ }
750
+ if (isNew) {
751
+ baseAssignValue(object, key, newValue);
752
+ } else {
753
+ assignValue(object, key, newValue);
754
+ }
755
+ }
756
+ return object;
757
+ }
758
+
759
+ /* Built-in method references for those with the same name as other `lodash` methods. */
760
+ var nativeMax = Math.max;
761
+
762
+ /**
763
+ * A specialized version of `baseRest` which transforms the rest array.
764
+ *
765
+ * @private
766
+ * @param {Function} func The function to apply a rest parameter to.
767
+ * @param {number} [start=func.length-1] The start position of the rest parameter.
768
+ * @param {Function} transform The rest array transform.
769
+ * @returns {Function} Returns the new function.
770
+ */
771
+ function overRest(func, start, transform) {
772
+ start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
773
+ return function() {
774
+ var args = arguments,
775
+ index = -1,
776
+ length = nativeMax(args.length - start, 0),
777
+ array = Array(length);
778
+
779
+ while (++index < length) {
780
+ array[index] = args[start + index];
781
+ }
782
+ index = -1;
783
+ var otherArgs = Array(start + 1);
784
+ while (++index < start) {
785
+ otherArgs[index] = args[index];
786
+ }
787
+ otherArgs[start] = transform(array);
788
+ return apply(func, this, otherArgs);
789
+ };
790
+ }
791
+
792
+ /** Used as references for various `Number` constants. */
793
+ var MAX_SAFE_INTEGER = 9007199254740991;
794
+
795
+ /**
796
+ * Checks if `value` is a valid array-like length.
797
+ *
798
+ * **Note:** This method is loosely based on
799
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
800
+ *
801
+ * @static
802
+ * @memberOf _
803
+ * @since 4.0.0
804
+ * @category Lang
805
+ * @param {*} value The value to check.
806
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
807
+ * @example
808
+ *
809
+ * _.isLength(3);
810
+ * // => true
811
+ *
812
+ * _.isLength(Number.MIN_VALUE);
813
+ * // => false
814
+ *
815
+ * _.isLength(Infinity);
816
+ * // => false
817
+ *
818
+ * _.isLength('3');
819
+ * // => false
820
+ */
821
+ function isLength(value) {
822
+ return typeof value == 'number' &&
823
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
824
+ }
825
+
826
+ /**
827
+ * Checks if `value` is array-like. A value is considered array-like if it's
828
+ * not a function and has a `value.length` that's an integer greater than or
829
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
830
+ *
831
+ * @static
832
+ * @memberOf _
833
+ * @since 4.0.0
834
+ * @category Lang
835
+ * @param {*} value The value to check.
836
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
837
+ * @example
838
+ *
839
+ * _.isArrayLike([1, 2, 3]);
840
+ * // => true
841
+ *
842
+ * _.isArrayLike(document.body.children);
843
+ * // => true
844
+ *
845
+ * _.isArrayLike('abc');
846
+ * // => true
847
+ *
848
+ * _.isArrayLike(_.noop);
849
+ * // => false
850
+ */
851
+ function isArrayLike(value) {
852
+ return value != null && isLength(value.length) && !isFunction(value);
853
+ }
854
+
855
+ /** Used for built-in method references. */
856
+ var objectProto$8 = Object.prototype;
857
+
858
+ /**
859
+ * Checks if `value` is likely a prototype object.
860
+ *
861
+ * @private
862
+ * @param {*} value The value to check.
863
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
864
+ */
865
+ function isPrototype(value) {
866
+ var Ctor = value && value.constructor,
867
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$8;
868
+
869
+ return value === proto;
870
+ }
871
+
872
+ /**
873
+ * The base implementation of `_.times` without support for iteratee shorthands
874
+ * or max array length checks.
875
+ *
876
+ * @private
877
+ * @param {number} n The number of times to invoke `iteratee`.
878
+ * @param {Function} iteratee The function invoked per iteration.
879
+ * @returns {Array} Returns the array of results.
880
+ */
881
+ function baseTimes(n, iteratee) {
882
+ var index = -1,
883
+ result = Array(n);
884
+
885
+ while (++index < n) {
886
+ result[index] = iteratee(index);
887
+ }
888
+ return result;
889
+ }
890
+
891
+ /** `Object#toString` result references. */
892
+ var argsTag$2 = '[object Arguments]';
893
+
894
+ /**
895
+ * The base implementation of `_.isArguments`.
896
+ *
897
+ * @private
898
+ * @param {*} value The value to check.
899
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
900
+ */
901
+ function baseIsArguments(value) {
902
+ return isObjectLike(value) && baseGetTag(value) == argsTag$2;
903
+ }
904
+
905
+ /** Used for built-in method references. */
906
+ var objectProto$7 = Object.prototype;
907
+
908
+ /** Used to check objects for own properties. */
909
+ var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
910
+
911
+ /** Built-in value references. */
912
+ var propertyIsEnumerable$1 = objectProto$7.propertyIsEnumerable;
913
+
914
+ /**
915
+ * Checks if `value` is likely an `arguments` object.
916
+ *
917
+ * @static
918
+ * @memberOf _
919
+ * @since 0.1.0
920
+ * @category Lang
921
+ * @param {*} value The value to check.
922
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
923
+ * else `false`.
924
+ * @example
925
+ *
926
+ * _.isArguments(function() { return arguments; }());
927
+ * // => true
928
+ *
929
+ * _.isArguments([1, 2, 3]);
930
+ * // => false
931
+ */
932
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
933
+ return isObjectLike(value) && hasOwnProperty$6.call(value, 'callee') &&
934
+ !propertyIsEnumerable$1.call(value, 'callee');
935
+ };
936
+
937
+ /**
938
+ * This method returns `false`.
939
+ *
940
+ * @static
941
+ * @memberOf _
942
+ * @since 4.13.0
943
+ * @category Util
944
+ * @returns {boolean} Returns `false`.
945
+ * @example
946
+ *
947
+ * _.times(2, _.stubFalse);
948
+ * // => [false, false]
949
+ */
950
+ function stubFalse() {
951
+ return false;
952
+ }
953
+
954
+ /** Detect free variable `exports`. */
955
+ var freeExports$2 = typeof exports == 'object' && exports && !exports.nodeType && exports;
956
+
957
+ /** Detect free variable `module`. */
958
+ var freeModule$2 = freeExports$2 && typeof module == 'object' && module && !module.nodeType && module;
959
+
960
+ /** Detect the popular CommonJS extension `module.exports`. */
961
+ var moduleExports$2 = freeModule$2 && freeModule$2.exports === freeExports$2;
962
+
963
+ /** Built-in value references. */
964
+ var Buffer$1 = moduleExports$2 ? root.Buffer : undefined;
965
+
966
+ /* Built-in method references for those with the same name as other `lodash` methods. */
967
+ var nativeIsBuffer = Buffer$1 ? Buffer$1.isBuffer : undefined;
968
+
969
+ /**
970
+ * Checks if `value` is a buffer.
971
+ *
972
+ * @static
973
+ * @memberOf _
974
+ * @since 4.3.0
975
+ * @category Lang
976
+ * @param {*} value The value to check.
977
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
978
+ * @example
979
+ *
980
+ * _.isBuffer(new Buffer(2));
981
+ * // => true
982
+ *
983
+ * _.isBuffer(new Uint8Array(2));
984
+ * // => false
985
+ */
986
+ var isBuffer = nativeIsBuffer || stubFalse;
987
+
988
+ /** `Object#toString` result references. */
989
+ var argsTag$1 = '[object Arguments]',
990
+ arrayTag$1 = '[object Array]',
991
+ boolTag$2 = '[object Boolean]',
992
+ dateTag$2 = '[object Date]',
993
+ errorTag$1 = '[object Error]',
994
+ funcTag$1 = '[object Function]',
995
+ mapTag$4 = '[object Map]',
996
+ numberTag$2 = '[object Number]',
997
+ objectTag$3 = '[object Object]',
998
+ regexpTag$2 = '[object RegExp]',
999
+ setTag$4 = '[object Set]',
1000
+ stringTag$2 = '[object String]',
1001
+ weakMapTag$2 = '[object WeakMap]';
1002
+
1003
+ var arrayBufferTag$2 = '[object ArrayBuffer]',
1004
+ dataViewTag$3 = '[object DataView]',
1005
+ float32Tag$2 = '[object Float32Array]',
1006
+ float64Tag$2 = '[object Float64Array]',
1007
+ int8Tag$2 = '[object Int8Array]',
1008
+ int16Tag$2 = '[object Int16Array]',
1009
+ int32Tag$2 = '[object Int32Array]',
1010
+ uint8Tag$2 = '[object Uint8Array]',
1011
+ uint8ClampedTag$2 = '[object Uint8ClampedArray]',
1012
+ uint16Tag$2 = '[object Uint16Array]',
1013
+ uint32Tag$2 = '[object Uint32Array]';
1014
+
1015
+ /** Used to identify `toStringTag` values of typed arrays. */
1016
+ var typedArrayTags = {};
1017
+ typedArrayTags[float32Tag$2] = typedArrayTags[float64Tag$2] =
1018
+ typedArrayTags[int8Tag$2] = typedArrayTags[int16Tag$2] =
1019
+ typedArrayTags[int32Tag$2] = typedArrayTags[uint8Tag$2] =
1020
+ typedArrayTags[uint8ClampedTag$2] = typedArrayTags[uint16Tag$2] =
1021
+ typedArrayTags[uint32Tag$2] = true;
1022
+ typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] =
1023
+ typedArrayTags[arrayBufferTag$2] = typedArrayTags[boolTag$2] =
1024
+ typedArrayTags[dataViewTag$3] = typedArrayTags[dateTag$2] =
1025
+ typedArrayTags[errorTag$1] = typedArrayTags[funcTag$1] =
1026
+ typedArrayTags[mapTag$4] = typedArrayTags[numberTag$2] =
1027
+ typedArrayTags[objectTag$3] = typedArrayTags[regexpTag$2] =
1028
+ typedArrayTags[setTag$4] = typedArrayTags[stringTag$2] =
1029
+ typedArrayTags[weakMapTag$2] = false;
1030
+
1031
+ /**
1032
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1033
+ *
1034
+ * @private
1035
+ * @param {*} value The value to check.
1036
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1037
+ */
1038
+ function baseIsTypedArray(value) {
1039
+ return isObjectLike(value) &&
1040
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1041
+ }
1042
+
1043
+ /**
1044
+ * The base implementation of `_.unary` without support for storing metadata.
1045
+ *
1046
+ * @private
1047
+ * @param {Function} func The function to cap arguments for.
1048
+ * @returns {Function} Returns the new capped function.
1049
+ */
1050
+ function baseUnary(func) {
1051
+ return function(value) {
1052
+ return func(value);
1053
+ };
1054
+ }
1055
+
1056
+ /** Detect free variable `exports`. */
1057
+ var freeExports$1 = typeof exports == 'object' && exports && !exports.nodeType && exports;
1058
+
1059
+ /** Detect free variable `module`. */
1060
+ var freeModule$1 = freeExports$1 && typeof module == 'object' && module && !module.nodeType && module;
1061
+
1062
+ /** Detect the popular CommonJS extension `module.exports`. */
1063
+ var moduleExports$1 = freeModule$1 && freeModule$1.exports === freeExports$1;
1064
+
1065
+ /** Detect free variable `process` from Node.js. */
1066
+ var freeProcess = moduleExports$1 && freeGlobal.process;
1067
+
1068
+ /** Used to access faster Node.js helpers. */
1069
+ var nodeUtil = (function() {
1070
+ try {
1071
+ // Use `util.types` for Node.js 10+.
1072
+ var types = freeModule$1 && freeModule$1.require && freeModule$1.require('util').types;
1073
+
1074
+ if (types) {
1075
+ return types;
1076
+ }
1077
+
1078
+ // Legacy `process.binding('util')` for Node.js < 10.
1079
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1080
+ } catch (e) {}
1081
+ }());
1082
+
1083
+ /* Node.js helper references. */
1084
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1085
+
1086
+ /**
1087
+ * Checks if `value` is classified as a typed array.
1088
+ *
1089
+ * @static
1090
+ * @memberOf _
1091
+ * @since 3.0.0
1092
+ * @category Lang
1093
+ * @param {*} value The value to check.
1094
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1095
+ * @example
1096
+ *
1097
+ * _.isTypedArray(new Uint8Array);
1098
+ * // => true
1099
+ *
1100
+ * _.isTypedArray([]);
1101
+ * // => false
1102
+ */
1103
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
1104
+
1105
+ /**
1106
+ * Creates an array of the enumerable property names of the array-like `value`.
1107
+ *
1108
+ * @private
1109
+ * @param {*} value The value to query.
1110
+ * @param {boolean} inherited Specify returning inherited property names.
1111
+ * @returns {Array} Returns the array of property names.
1112
+ */
1113
+ function arrayLikeKeys(value, inherited) {
1114
+ var isArr = isArray(value),
1115
+ isArg = !isArr && isArguments(value),
1116
+ isBuff = !isArr && !isArg && isBuffer(value),
1117
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1118
+ skipIndexes = isArr || isArg || isBuff || isType,
1119
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1120
+ length = result.length;
1121
+
1122
+ for (var key in value) {
1123
+ if (!(skipIndexes && (
1124
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1125
+ key == 'length' ||
1126
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1127
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1128
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1129
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1130
+ // Skip index properties.
1131
+ isIndex(key, length)
1132
+ ))) {
1133
+ result.push(key);
1134
+ }
1135
+ }
1136
+ return result;
1137
+ }
1138
+
1139
+ /**
1140
+ * Creates a unary function that invokes `func` with its argument transformed.
1141
+ *
1142
+ * @private
1143
+ * @param {Function} func The function to wrap.
1144
+ * @param {Function} transform The argument transform.
1145
+ * @returns {Function} Returns the new function.
1146
+ */
1147
+ function overArg(func, transform) {
1148
+ return function(arg) {
1149
+ return func(transform(arg));
1150
+ };
1151
+ }
1152
+
1153
+ /**
1154
+ * This function is like
1155
+ * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
1156
+ * except that it includes inherited enumerable properties.
1157
+ *
1158
+ * @private
1159
+ * @param {Object} object The object to query.
1160
+ * @returns {Array} Returns the array of property names.
1161
+ */
1162
+ function nativeKeysIn(object) {
1163
+ var result = [];
1164
+ if (object != null) {
1165
+ for (var key in Object(object)) {
1166
+ result.push(key);
1167
+ }
1168
+ }
1169
+ return result;
1170
+ }
1171
+
1172
+ /** Used for built-in method references. */
1173
+ var objectProto$6 = Object.prototype;
1174
+
1175
+ /** Used to check objects for own properties. */
1176
+ var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
1177
+
1178
+ /**
1179
+ * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
1180
+ *
1181
+ * @private
1182
+ * @param {Object} object The object to query.
1183
+ * @returns {Array} Returns the array of property names.
1184
+ */
1185
+ function baseKeysIn(object) {
1186
+ if (!isObject(object)) {
1187
+ return nativeKeysIn(object);
1188
+ }
1189
+ var isProto = isPrototype(object),
1190
+ result = [];
1191
+
1192
+ for (var key in object) {
1193
+ if (!(key == 'constructor' && (isProto || !hasOwnProperty$5.call(object, key)))) {
1194
+ result.push(key);
1195
+ }
1196
+ }
1197
+ return result;
1198
+ }
1199
+
1200
+ /**
1201
+ * Creates an array of the own and inherited enumerable property names of `object`.
1202
+ *
1203
+ * **Note:** Non-object values are coerced to objects.
1204
+ *
1205
+ * @static
1206
+ * @memberOf _
1207
+ * @since 3.0.0
1208
+ * @category Object
1209
+ * @param {Object} object The object to query.
1210
+ * @returns {Array} Returns the array of property names.
1211
+ * @example
1212
+ *
1213
+ * function Foo() {
1214
+ * this.a = 1;
1215
+ * this.b = 2;
1216
+ * }
1217
+ *
1218
+ * Foo.prototype.c = 3;
1219
+ *
1220
+ * _.keysIn(new Foo);
1221
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
1222
+ */
1223
+ function keysIn(object) {
1224
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeysIn(object);
1225
+ }
1226
+
1227
+ /** Used to match property names within property paths. */
1228
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
1229
+ reIsPlainProp = /^\w*$/;
1230
+
1231
+ /**
1232
+ * Checks if `value` is a property name and not a property path.
1233
+ *
1234
+ * @private
1235
+ * @param {*} value The value to check.
1236
+ * @param {Object} [object] The object to query keys on.
1237
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
1238
+ */
1239
+ function isKey(value, object) {
1240
+ if (isArray(value)) {
1241
+ return false;
1242
+ }
1243
+ var type = typeof value;
1244
+ if (type == 'number' || type == 'symbol' || type == 'boolean' ||
1245
+ value == null || isSymbol(value)) {
1246
+ return true;
1247
+ }
1248
+ return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
1249
+ (object != null && value in Object(object));
1250
+ }
1251
+
1252
+ /* Built-in method references that are verified to be native. */
1253
+ var nativeCreate = getNative(Object, 'create');
1254
+
1255
+ /**
1256
+ * Removes all key-value entries from the hash.
1257
+ *
1258
+ * @private
1259
+ * @name clear
1260
+ * @memberOf Hash
1261
+ */
1262
+ function hashClear() {
1263
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
1264
+ this.size = 0;
1265
+ }
1266
+
1267
+ /**
1268
+ * Removes `key` and its value from the hash.
1269
+ *
1270
+ * @private
1271
+ * @name delete
1272
+ * @memberOf Hash
1273
+ * @param {Object} hash The hash to modify.
1274
+ * @param {string} key The key of the value to remove.
1275
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1276
+ */
1277
+ function hashDelete(key) {
1278
+ var result = this.has(key) && delete this.__data__[key];
1279
+ this.size -= result ? 1 : 0;
1280
+ return result;
1281
+ }
1282
+
1283
+ /** Used to stand-in for `undefined` hash values. */
1284
+ var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
1285
+
1286
+ /** Used for built-in method references. */
1287
+ var objectProto$5 = Object.prototype;
1288
+
1289
+ /** Used to check objects for own properties. */
1290
+ var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
1291
+
1292
+ /**
1293
+ * Gets the hash value for `key`.
1294
+ *
1295
+ * @private
1296
+ * @name get
1297
+ * @memberOf Hash
1298
+ * @param {string} key The key of the value to get.
1299
+ * @returns {*} Returns the entry value.
1300
+ */
1301
+ function hashGet(key) {
1302
+ var data = this.__data__;
1303
+ if (nativeCreate) {
1304
+ var result = data[key];
1305
+ return result === HASH_UNDEFINED$1 ? undefined : result;
1306
+ }
1307
+ return hasOwnProperty$4.call(data, key) ? data[key] : undefined;
1308
+ }
1309
+
1310
+ /** Used for built-in method references. */
1311
+ var objectProto$4 = Object.prototype;
1312
+
1313
+ /** Used to check objects for own properties. */
1314
+ var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
1315
+
1316
+ /**
1317
+ * Checks if a hash value for `key` exists.
1318
+ *
1319
+ * @private
1320
+ * @name has
1321
+ * @memberOf Hash
1322
+ * @param {string} key The key of the entry to check.
1323
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1324
+ */
1325
+ function hashHas(key) {
1326
+ var data = this.__data__;
1327
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
1328
+ }
1329
+
1330
+ /** Used to stand-in for `undefined` hash values. */
1331
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
1332
+
1333
+ /**
1334
+ * Sets the hash `key` to `value`.
1335
+ *
1336
+ * @private
1337
+ * @name set
1338
+ * @memberOf Hash
1339
+ * @param {string} key The key of the value to set.
1340
+ * @param {*} value The value to set.
1341
+ * @returns {Object} Returns the hash instance.
1342
+ */
1343
+ function hashSet(key, value) {
1344
+ var data = this.__data__;
1345
+ this.size += this.has(key) ? 0 : 1;
1346
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1347
+ return this;
1348
+ }
1349
+
1350
+ /**
1351
+ * Creates a hash object.
1352
+ *
1353
+ * @private
1354
+ * @constructor
1355
+ * @param {Array} [entries] The key-value pairs to cache.
1356
+ */
1357
+ function Hash(entries) {
1358
+ var index = -1,
1359
+ length = entries == null ? 0 : entries.length;
1360
+
1361
+ this.clear();
1362
+ while (++index < length) {
1363
+ var entry = entries[index];
1364
+ this.set(entry[0], entry[1]);
1365
+ }
1366
+ }
1367
+
1368
+ // Add methods to `Hash`.
1369
+ Hash.prototype.clear = hashClear;
1370
+ Hash.prototype['delete'] = hashDelete;
1371
+ Hash.prototype.get = hashGet;
1372
+ Hash.prototype.has = hashHas;
1373
+ Hash.prototype.set = hashSet;
1374
+
1375
+ /**
1376
+ * Removes all key-value entries from the list cache.
1377
+ *
1378
+ * @private
1379
+ * @name clear
1380
+ * @memberOf ListCache
1381
+ */
1382
+ function listCacheClear() {
1383
+ this.__data__ = [];
1384
+ this.size = 0;
1385
+ }
1386
+
1387
+ /**
1388
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1389
+ *
1390
+ * @private
1391
+ * @param {Array} array The array to inspect.
1392
+ * @param {*} key The key to search for.
1393
+ * @returns {number} Returns the index of the matched value, else `-1`.
1394
+ */
1395
+ function assocIndexOf(array, key) {
1396
+ var length = array.length;
1397
+ while (length--) {
1398
+ if (eq(array[length][0], key)) {
1399
+ return length;
1400
+ }
1401
+ }
1402
+ return -1;
1403
+ }
1404
+
1405
+ /** Used for built-in method references. */
1406
+ var arrayProto = Array.prototype;
1407
+
1408
+ /** Built-in value references. */
1409
+ var splice = arrayProto.splice;
1410
+
1411
+ /**
1412
+ * Removes `key` and its value from the list cache.
1413
+ *
1414
+ * @private
1415
+ * @name delete
1416
+ * @memberOf ListCache
1417
+ * @param {string} key The key of the value to remove.
1418
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1419
+ */
1420
+ function listCacheDelete(key) {
1421
+ var data = this.__data__,
1422
+ index = assocIndexOf(data, key);
1423
+
1424
+ if (index < 0) {
1425
+ return false;
1426
+ }
1427
+ var lastIndex = data.length - 1;
1428
+ if (index == lastIndex) {
1429
+ data.pop();
1430
+ } else {
1431
+ splice.call(data, index, 1);
1432
+ }
1433
+ --this.size;
1434
+ return true;
1435
+ }
1436
+
1437
+ /**
1438
+ * Gets the list cache value for `key`.
1439
+ *
1440
+ * @private
1441
+ * @name get
1442
+ * @memberOf ListCache
1443
+ * @param {string} key The key of the value to get.
1444
+ * @returns {*} Returns the entry value.
1445
+ */
1446
+ function listCacheGet(key) {
1447
+ var data = this.__data__,
1448
+ index = assocIndexOf(data, key);
1449
+
1450
+ return index < 0 ? undefined : data[index][1];
1451
+ }
1452
+
1453
+ /**
1454
+ * Checks if a list cache value for `key` exists.
1455
+ *
1456
+ * @private
1457
+ * @name has
1458
+ * @memberOf ListCache
1459
+ * @param {string} key The key of the entry to check.
1460
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1461
+ */
1462
+ function listCacheHas(key) {
1463
+ return assocIndexOf(this.__data__, key) > -1;
1464
+ }
1465
+
1466
+ /**
1467
+ * Sets the list cache `key` to `value`.
1468
+ *
1469
+ * @private
1470
+ * @name set
1471
+ * @memberOf ListCache
1472
+ * @param {string} key The key of the value to set.
1473
+ * @param {*} value The value to set.
1474
+ * @returns {Object} Returns the list cache instance.
1475
+ */
1476
+ function listCacheSet(key, value) {
1477
+ var data = this.__data__,
1478
+ index = assocIndexOf(data, key);
1479
+
1480
+ if (index < 0) {
1481
+ ++this.size;
1482
+ data.push([key, value]);
1483
+ } else {
1484
+ data[index][1] = value;
1485
+ }
1486
+ return this;
1487
+ }
1488
+
1489
+ /**
1490
+ * Creates an list cache object.
1491
+ *
1492
+ * @private
1493
+ * @constructor
1494
+ * @param {Array} [entries] The key-value pairs to cache.
1495
+ */
1496
+ function ListCache(entries) {
1497
+ var index = -1,
1498
+ length = entries == null ? 0 : entries.length;
1499
+
1500
+ this.clear();
1501
+ while (++index < length) {
1502
+ var entry = entries[index];
1503
+ this.set(entry[0], entry[1]);
1504
+ }
1505
+ }
1506
+
1507
+ // Add methods to `ListCache`.
1508
+ ListCache.prototype.clear = listCacheClear;
1509
+ ListCache.prototype['delete'] = listCacheDelete;
1510
+ ListCache.prototype.get = listCacheGet;
1511
+ ListCache.prototype.has = listCacheHas;
1512
+ ListCache.prototype.set = listCacheSet;
1513
+
1514
+ /* Built-in method references that are verified to be native. */
1515
+ var Map = getNative(root, 'Map');
1516
+
1517
+ /**
1518
+ * Removes all key-value entries from the map.
1519
+ *
1520
+ * @private
1521
+ * @name clear
1522
+ * @memberOf MapCache
1523
+ */
1524
+ function mapCacheClear() {
1525
+ this.size = 0;
1526
+ this.__data__ = {
1527
+ 'hash': new Hash,
1528
+ 'map': new (Map || ListCache),
1529
+ 'string': new Hash
1530
+ };
1531
+ }
1532
+
1533
+ /**
1534
+ * Checks if `value` is suitable for use as unique object key.
1535
+ *
1536
+ * @private
1537
+ * @param {*} value The value to check.
1538
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1539
+ */
1540
+ function isKeyable(value) {
1541
+ var type = typeof value;
1542
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1543
+ ? (value !== '__proto__')
1544
+ : (value === null);
1545
+ }
1546
+
1547
+ /**
1548
+ * Gets the data for `map`.
1549
+ *
1550
+ * @private
1551
+ * @param {Object} map The map to query.
1552
+ * @param {string} key The reference key.
1553
+ * @returns {*} Returns the map data.
1554
+ */
1555
+ function getMapData(map, key) {
1556
+ var data = map.__data__;
1557
+ return isKeyable(key)
1558
+ ? data[typeof key == 'string' ? 'string' : 'hash']
1559
+ : data.map;
1560
+ }
1561
+
1562
+ /**
1563
+ * Removes `key` and its value from the map.
1564
+ *
1565
+ * @private
1566
+ * @name delete
1567
+ * @memberOf MapCache
1568
+ * @param {string} key The key of the value to remove.
1569
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1570
+ */
1571
+ function mapCacheDelete(key) {
1572
+ var result = getMapData(this, key)['delete'](key);
1573
+ this.size -= result ? 1 : 0;
1574
+ return result;
1575
+ }
1576
+
1577
+ /**
1578
+ * Gets the map value for `key`.
1579
+ *
1580
+ * @private
1581
+ * @name get
1582
+ * @memberOf MapCache
1583
+ * @param {string} key The key of the value to get.
1584
+ * @returns {*} Returns the entry value.
1585
+ */
1586
+ function mapCacheGet(key) {
1587
+ return getMapData(this, key).get(key);
1588
+ }
1589
+
1590
+ /**
1591
+ * Checks if a map value for `key` exists.
1592
+ *
1593
+ * @private
1594
+ * @name has
1595
+ * @memberOf MapCache
1596
+ * @param {string} key The key of the entry to check.
1597
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1598
+ */
1599
+ function mapCacheHas(key) {
1600
+ return getMapData(this, key).has(key);
1601
+ }
1602
+
1603
+ /**
1604
+ * Sets the map `key` to `value`.
1605
+ *
1606
+ * @private
1607
+ * @name set
1608
+ * @memberOf MapCache
1609
+ * @param {string} key The key of the value to set.
1610
+ * @param {*} value The value to set.
1611
+ * @returns {Object} Returns the map cache instance.
1612
+ */
1613
+ function mapCacheSet(key, value) {
1614
+ var data = getMapData(this, key),
1615
+ size = data.size;
1616
+
1617
+ data.set(key, value);
1618
+ this.size += data.size == size ? 0 : 1;
1619
+ return this;
1620
+ }
1621
+
1622
+ /**
1623
+ * Creates a map cache object to store key-value pairs.
1624
+ *
1625
+ * @private
1626
+ * @constructor
1627
+ * @param {Array} [entries] The key-value pairs to cache.
1628
+ */
1629
+ function MapCache(entries) {
1630
+ var index = -1,
1631
+ length = entries == null ? 0 : entries.length;
1632
+
1633
+ this.clear();
1634
+ while (++index < length) {
1635
+ var entry = entries[index];
1636
+ this.set(entry[0], entry[1]);
1637
+ }
1638
+ }
1639
+
1640
+ // Add methods to `MapCache`.
1641
+ MapCache.prototype.clear = mapCacheClear;
1642
+ MapCache.prototype['delete'] = mapCacheDelete;
1643
+ MapCache.prototype.get = mapCacheGet;
1644
+ MapCache.prototype.has = mapCacheHas;
1645
+ MapCache.prototype.set = mapCacheSet;
1646
+
1647
+ /** Error message constants. */
1648
+ var FUNC_ERROR_TEXT = 'Expected a function';
1649
+
1650
+ /**
1651
+ * Creates a function that memoizes the result of `func`. If `resolver` is
1652
+ * provided, it determines the cache key for storing the result based on the
1653
+ * arguments provided to the memoized function. By default, the first argument
1654
+ * provided to the memoized function is used as the map cache key. The `func`
1655
+ * is invoked with the `this` binding of the memoized function.
1656
+ *
1657
+ * **Note:** The cache is exposed as the `cache` property on the memoized
1658
+ * function. Its creation may be customized by replacing the `_.memoize.Cache`
1659
+ * constructor with one whose instances implement the
1660
+ * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
1661
+ * method interface of `clear`, `delete`, `get`, `has`, and `set`.
1662
+ *
1663
+ * @static
1664
+ * @memberOf _
1665
+ * @since 0.1.0
1666
+ * @category Function
1667
+ * @param {Function} func The function to have its output memoized.
1668
+ * @param {Function} [resolver] The function to resolve the cache key.
1669
+ * @returns {Function} Returns the new memoized function.
1670
+ * @example
1671
+ *
1672
+ * var object = { 'a': 1, 'b': 2 };
1673
+ * var other = { 'c': 3, 'd': 4 };
1674
+ *
1675
+ * var values = _.memoize(_.values);
1676
+ * values(object);
1677
+ * // => [1, 2]
1678
+ *
1679
+ * values(other);
1680
+ * // => [3, 4]
1681
+ *
1682
+ * object.a = 2;
1683
+ * values(object);
1684
+ * // => [1, 2]
1685
+ *
1686
+ * // Modify the result cache.
1687
+ * values.cache.set(object, ['a', 'b']);
1688
+ * values(object);
1689
+ * // => ['a', 'b']
1690
+ *
1691
+ * // Replace `_.memoize.Cache`.
1692
+ * _.memoize.Cache = WeakMap;
1693
+ */
1694
+ function memoize(func, resolver) {
1695
+ if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
1696
+ throw new TypeError(FUNC_ERROR_TEXT);
1697
+ }
1698
+ var memoized = function() {
1699
+ var args = arguments,
1700
+ key = resolver ? resolver.apply(this, args) : args[0],
1701
+ cache = memoized.cache;
1702
+
1703
+ if (cache.has(key)) {
1704
+ return cache.get(key);
1705
+ }
1706
+ var result = func.apply(this, args);
1707
+ memoized.cache = cache.set(key, result) || cache;
1708
+ return result;
1709
+ };
1710
+ memoized.cache = new (memoize.Cache || MapCache);
1711
+ return memoized;
1712
+ }
1713
+
1714
+ // Expose `MapCache`.
1715
+ memoize.Cache = MapCache;
1716
+
1717
+ /** Used as the maximum memoize cache size. */
1718
+ var MAX_MEMOIZE_SIZE = 500;
1719
+
1720
+ /**
1721
+ * A specialized version of `_.memoize` which clears the memoized function's
1722
+ * cache when it exceeds `MAX_MEMOIZE_SIZE`.
1723
+ *
1724
+ * @private
1725
+ * @param {Function} func The function to have its output memoized.
1726
+ * @returns {Function} Returns the new memoized function.
1727
+ */
1728
+ function memoizeCapped(func) {
1729
+ var result = memoize(func, function(key) {
1730
+ if (cache.size === MAX_MEMOIZE_SIZE) {
1731
+ cache.clear();
1732
+ }
1733
+ return key;
1734
+ });
1735
+
1736
+ var cache = result.cache;
1737
+ return result;
1738
+ }
1739
+
1740
+ /** Used to match property names within property paths. */
1741
+ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
1742
+
1743
+ /** Used to match backslashes in property paths. */
1744
+ var reEscapeChar = /\\(\\)?/g;
1745
+
1746
+ /**
1747
+ * Converts `string` to a property path array.
1748
+ *
1749
+ * @private
1750
+ * @param {string} string The string to convert.
1751
+ * @returns {Array} Returns the property path array.
1752
+ */
1753
+ var stringToPath = memoizeCapped(function(string) {
1754
+ var result = [];
1755
+ if (string.charCodeAt(0) === 46 /* . */) {
1756
+ result.push('');
1757
+ }
1758
+ string.replace(rePropName, function(match, number, quote, subString) {
1759
+ result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
1760
+ });
1761
+ return result;
1762
+ });
1763
+
1764
+ /**
1765
+ * Converts `value` to a string. An empty string is returned for `null`
1766
+ * and `undefined` values. The sign of `-0` is preserved.
1767
+ *
1768
+ * @static
1769
+ * @memberOf _
1770
+ * @since 4.0.0
1771
+ * @category Lang
1772
+ * @param {*} value The value to convert.
1773
+ * @returns {string} Returns the converted string.
1774
+ * @example
1775
+ *
1776
+ * _.toString(null);
1777
+ * // => ''
1778
+ *
1779
+ * _.toString(-0);
1780
+ * // => '-0'
1781
+ *
1782
+ * _.toString([1, 2, 3]);
1783
+ * // => '1,2,3'
1784
+ */
1785
+ function toString(value) {
1786
+ return value == null ? '' : baseToString(value);
1787
+ }
1788
+
1789
+ /**
1790
+ * Casts `value` to a path array if it's not one.
1791
+ *
1792
+ * @private
1793
+ * @param {*} value The value to inspect.
1794
+ * @param {Object} [object] The object to query keys on.
1795
+ * @returns {Array} Returns the cast property path array.
1796
+ */
1797
+ function castPath(value, object) {
1798
+ if (isArray(value)) {
1799
+ return value;
1800
+ }
1801
+ return isKey(value, object) ? [value] : stringToPath(toString(value));
1802
+ }
1803
+
1804
+ /**
1805
+ * Converts `value` to a string key if it's not a string or symbol.
1806
+ *
1807
+ * @private
1808
+ * @param {*} value The value to inspect.
1809
+ * @returns {string|symbol} Returns the key.
1810
+ */
1811
+ function toKey(value) {
1812
+ if (typeof value == 'string' || isSymbol(value)) {
1813
+ return value;
1814
+ }
1815
+ var result = (value + '');
1816
+ return (result == '0' && (1 / value) == -Infinity) ? '-0' : result;
1817
+ }
1818
+
1819
+ /**
1820
+ * The base implementation of `_.get` without support for default values.
1821
+ *
1822
+ * @private
1823
+ * @param {Object} object The object to query.
1824
+ * @param {Array|string} path The path of the property to get.
1825
+ * @returns {*} Returns the resolved value.
1826
+ */
1827
+ function baseGet(object, path) {
1828
+ path = castPath(path, object);
1829
+
1830
+ var index = 0,
1831
+ length = path.length;
1832
+
1833
+ while (object != null && index < length) {
1834
+ object = object[toKey(path[index++])];
1835
+ }
1836
+ return (index && index == length) ? object : undefined;
1837
+ }
1838
+
1839
+ /**
1840
+ * Appends the elements of `values` to `array`.
1841
+ *
1842
+ * @private
1843
+ * @param {Array} array The array to modify.
1844
+ * @param {Array} values The values to append.
1845
+ * @returns {Array} Returns `array`.
1846
+ */
1847
+ function arrayPush(array, values) {
1848
+ var index = -1,
1849
+ length = values.length,
1850
+ offset = array.length;
1851
+
1852
+ while (++index < length) {
1853
+ array[offset + index] = values[index];
1854
+ }
1855
+ return array;
1856
+ }
1857
+
1858
+ /** Built-in value references. */
1859
+ var spreadableSymbol = Symbol$1 ? Symbol$1.isConcatSpreadable : undefined;
1860
+
1861
+ /**
1862
+ * Checks if `value` is a flattenable `arguments` object or array.
1863
+ *
1864
+ * @private
1865
+ * @param {*} value The value to check.
1866
+ * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
1867
+ */
1868
+ function isFlattenable(value) {
1869
+ return isArray(value) || isArguments(value) ||
1870
+ !!(spreadableSymbol && value && value[spreadableSymbol]);
1871
+ }
1872
+
1873
+ /**
1874
+ * The base implementation of `_.flatten` with support for restricting flattening.
1875
+ *
1876
+ * @private
1877
+ * @param {Array} array The array to flatten.
1878
+ * @param {number} depth The maximum recursion depth.
1879
+ * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
1880
+ * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
1881
+ * @param {Array} [result=[]] The initial result value.
1882
+ * @returns {Array} Returns the new flattened array.
1883
+ */
1884
+ function baseFlatten(array, depth, predicate, isStrict, result) {
1885
+ var index = -1,
1886
+ length = array.length;
1887
+
1888
+ predicate || (predicate = isFlattenable);
1889
+ result || (result = []);
1890
+
1891
+ while (++index < length) {
1892
+ var value = array[index];
1893
+ if (predicate(value)) {
1894
+ {
1895
+ arrayPush(result, value);
1896
+ }
1897
+ } else {
1898
+ result[result.length] = value;
1899
+ }
1900
+ }
1901
+ return result;
1902
+ }
1903
+
1904
+ /**
1905
+ * Flattens `array` a single level deep.
1906
+ *
1907
+ * @static
1908
+ * @memberOf _
1909
+ * @since 0.1.0
1910
+ * @category Array
1911
+ * @param {Array} array The array to flatten.
1912
+ * @returns {Array} Returns the new flattened array.
1913
+ * @example
1914
+ *
1915
+ * _.flatten([1, [2, [3, [4]], 5]]);
1916
+ * // => [1, 2, [3, [4]], 5]
1917
+ */
1918
+ function flatten(array) {
1919
+ var length = array == null ? 0 : array.length;
1920
+ return length ? baseFlatten(array) : [];
1921
+ }
1922
+
1923
+ /**
1924
+ * A specialized version of `baseRest` which flattens the rest array.
1925
+ *
1926
+ * @private
1927
+ * @param {Function} func The function to apply a rest parameter to.
1928
+ * @returns {Function} Returns the new function.
1929
+ */
1930
+ function flatRest(func) {
1931
+ return setToString(overRest(func, undefined, flatten), func + '');
1932
+ }
1933
+
1934
+ /** Built-in value references. */
1935
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
1936
+
1937
+ /** `Object#toString` result references. */
1938
+ var objectTag$2 = '[object Object]';
1939
+
1940
+ /** Used for built-in method references. */
1941
+ var funcProto = Function.prototype,
1942
+ objectProto$3 = Object.prototype;
1943
+
1944
+ /** Used to resolve the decompiled source of functions. */
1945
+ var funcToString = funcProto.toString;
1946
+
1947
+ /** Used to check objects for own properties. */
1948
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1949
+
1950
+ /** Used to infer the `Object` constructor. */
1951
+ var objectCtorString = funcToString.call(Object);
1952
+
1953
+ /**
1954
+ * Checks if `value` is a plain object, that is, an object created by the
1955
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
1956
+ *
1957
+ * @static
1958
+ * @memberOf _
1959
+ * @since 0.8.0
1960
+ * @category Lang
1961
+ * @param {*} value The value to check.
1962
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
1963
+ * @example
1964
+ *
1965
+ * function Foo() {
1966
+ * this.a = 1;
1967
+ * }
1968
+ *
1969
+ * _.isPlainObject(new Foo);
1970
+ * // => false
1971
+ *
1972
+ * _.isPlainObject([1, 2, 3]);
1973
+ * // => false
1974
+ *
1975
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
1976
+ * // => true
1977
+ *
1978
+ * _.isPlainObject(Object.create(null));
1979
+ * // => true
1980
+ */
1981
+ function isPlainObject(value) {
1982
+ if (!isObjectLike(value) || baseGetTag(value) != objectTag$2) {
1983
+ return false;
1984
+ }
1985
+ var proto = getPrototype(value);
1986
+ if (proto === null) {
1987
+ return true;
1988
+ }
1989
+ var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
1990
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
1991
+ funcToString.call(Ctor) == objectCtorString;
1992
+ }
1993
+
1994
+ /**
1995
+ * The base implementation of `_.slice` without an iteratee call guard.
1996
+ *
1997
+ * @private
1998
+ * @param {Array} array The array to slice.
1999
+ * @param {number} [start=0] The start position.
2000
+ * @param {number} [end=array.length] The end position.
2001
+ * @returns {Array} Returns the slice of `array`.
2002
+ */
2003
+ function baseSlice(array, start, end) {
2004
+ var index = -1,
2005
+ length = array.length;
2006
+
2007
+ if (start < 0) {
2008
+ start = -start > length ? 0 : (length + start);
2009
+ }
2010
+ end = end > length ? length : end;
2011
+ if (end < 0) {
2012
+ end += length;
2013
+ }
2014
+ length = start > end ? 0 : ((end - start) >>> 0);
2015
+ start >>>= 0;
2016
+
2017
+ var result = Array(length);
2018
+ while (++index < length) {
2019
+ result[index] = array[index + start];
2020
+ }
2021
+ return result;
2022
+ }
2023
+
2024
+ /**
2025
+ * Removes all key-value entries from the stack.
2026
+ *
2027
+ * @private
2028
+ * @name clear
2029
+ * @memberOf Stack
2030
+ */
2031
+ function stackClear() {
2032
+ this.__data__ = new ListCache;
2033
+ this.size = 0;
2034
+ }
2035
+
2036
+ /**
2037
+ * Removes `key` and its value from the stack.
2038
+ *
2039
+ * @private
2040
+ * @name delete
2041
+ * @memberOf Stack
2042
+ * @param {string} key The key of the value to remove.
2043
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
2044
+ */
2045
+ function stackDelete(key) {
2046
+ var data = this.__data__,
2047
+ result = data['delete'](key);
2048
+
2049
+ this.size = data.size;
2050
+ return result;
2051
+ }
2052
+
2053
+ /**
2054
+ * Gets the stack value for `key`.
2055
+ *
2056
+ * @private
2057
+ * @name get
2058
+ * @memberOf Stack
2059
+ * @param {string} key The key of the value to get.
2060
+ * @returns {*} Returns the entry value.
2061
+ */
2062
+ function stackGet(key) {
2063
+ return this.__data__.get(key);
2064
+ }
2065
+
2066
+ /**
2067
+ * Checks if a stack value for `key` exists.
2068
+ *
2069
+ * @private
2070
+ * @name has
2071
+ * @memberOf Stack
2072
+ * @param {string} key The key of the entry to check.
2073
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
2074
+ */
2075
+ function stackHas(key) {
2076
+ return this.__data__.has(key);
2077
+ }
2078
+
2079
+ /** Used as the size to enable large array optimizations. */
2080
+ var LARGE_ARRAY_SIZE = 200;
2081
+
2082
+ /**
2083
+ * Sets the stack `key` to `value`.
2084
+ *
2085
+ * @private
2086
+ * @name set
2087
+ * @memberOf Stack
2088
+ * @param {string} key The key of the value to set.
2089
+ * @param {*} value The value to set.
2090
+ * @returns {Object} Returns the stack cache instance.
2091
+ */
2092
+ function stackSet(key, value) {
2093
+ var data = this.__data__;
2094
+ if (data instanceof ListCache) {
2095
+ var pairs = data.__data__;
2096
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
2097
+ pairs.push([key, value]);
2098
+ this.size = ++data.size;
2099
+ return this;
2100
+ }
2101
+ data = this.__data__ = new MapCache(pairs);
2102
+ }
2103
+ data.set(key, value);
2104
+ this.size = data.size;
2105
+ return this;
2106
+ }
2107
+
2108
+ /**
2109
+ * Creates a stack cache object to store key-value pairs.
2110
+ *
2111
+ * @private
2112
+ * @constructor
2113
+ * @param {Array} [entries] The key-value pairs to cache.
2114
+ */
2115
+ function Stack(entries) {
2116
+ var data = this.__data__ = new ListCache(entries);
2117
+ this.size = data.size;
2118
+ }
2119
+
2120
+ // Add methods to `Stack`.
2121
+ Stack.prototype.clear = stackClear;
2122
+ Stack.prototype['delete'] = stackDelete;
2123
+ Stack.prototype.get = stackGet;
2124
+ Stack.prototype.has = stackHas;
2125
+ Stack.prototype.set = stackSet;
2126
+
2127
+ /** Detect free variable `exports`. */
2128
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
2129
+
2130
+ /** Detect free variable `module`. */
2131
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
2132
+
2133
+ /** Detect the popular CommonJS extension `module.exports`. */
2134
+ var moduleExports = freeModule && freeModule.exports === freeExports;
2135
+
2136
+ /** Built-in value references. */
2137
+ var Buffer = moduleExports ? root.Buffer : undefined;
2138
+ Buffer ? Buffer.allocUnsafe : undefined;
2139
+
2140
+ /**
2141
+ * Creates a clone of `buffer`.
2142
+ *
2143
+ * @private
2144
+ * @param {Buffer} buffer The buffer to clone.
2145
+ * @param {boolean} [isDeep] Specify a deep clone.
2146
+ * @returns {Buffer} Returns the cloned buffer.
2147
+ */
2148
+ function cloneBuffer(buffer, isDeep) {
2149
+ {
2150
+ return buffer.slice();
2151
+ }
2152
+ }
2153
+
2154
+ /**
2155
+ * A specialized version of `_.filter` for arrays without support for
2156
+ * iteratee shorthands.
2157
+ *
2158
+ * @private
2159
+ * @param {Array} [array] The array to iterate over.
2160
+ * @param {Function} predicate The function invoked per iteration.
2161
+ * @returns {Array} Returns the new filtered array.
2162
+ */
2163
+ function arrayFilter(array, predicate) {
2164
+ var index = -1,
2165
+ length = array == null ? 0 : array.length,
2166
+ resIndex = 0,
2167
+ result = [];
2168
+
2169
+ while (++index < length) {
2170
+ var value = array[index];
2171
+ if (predicate(value, index, array)) {
2172
+ result[resIndex++] = value;
2173
+ }
2174
+ }
2175
+ return result;
2176
+ }
2177
+
2178
+ /**
2179
+ * This method returns a new empty array.
2180
+ *
2181
+ * @static
2182
+ * @memberOf _
2183
+ * @since 4.13.0
2184
+ * @category Util
2185
+ * @returns {Array} Returns the new empty array.
2186
+ * @example
2187
+ *
2188
+ * var arrays = _.times(2, _.stubArray);
2189
+ *
2190
+ * console.log(arrays);
2191
+ * // => [[], []]
2192
+ *
2193
+ * console.log(arrays[0] === arrays[1]);
2194
+ * // => false
2195
+ */
2196
+ function stubArray() {
2197
+ return [];
2198
+ }
2199
+
2200
+ /** Used for built-in method references. */
2201
+ var objectProto$2 = Object.prototype;
2202
+
2203
+ /** Built-in value references. */
2204
+ var propertyIsEnumerable = objectProto$2.propertyIsEnumerable;
2205
+
2206
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2207
+ var nativeGetSymbols$1 = Object.getOwnPropertySymbols;
2208
+
2209
+ /**
2210
+ * Creates an array of the own enumerable symbols of `object`.
2211
+ *
2212
+ * @private
2213
+ * @param {Object} object The object to query.
2214
+ * @returns {Array} Returns the array of symbols.
2215
+ */
2216
+ var getSymbols = !nativeGetSymbols$1 ? stubArray : function(object) {
2217
+ if (object == null) {
2218
+ return [];
2219
+ }
2220
+ object = Object(object);
2221
+ return arrayFilter(nativeGetSymbols$1(object), function(symbol) {
2222
+ return propertyIsEnumerable.call(object, symbol);
2223
+ });
2224
+ };
2225
+
2226
+ /* Built-in method references for those with the same name as other `lodash` methods. */
2227
+ var nativeGetSymbols = Object.getOwnPropertySymbols;
2228
+
2229
+ /**
2230
+ * Creates an array of the own and inherited enumerable symbols of `object`.
2231
+ *
2232
+ * @private
2233
+ * @param {Object} object The object to query.
2234
+ * @returns {Array} Returns the array of symbols.
2235
+ */
2236
+ var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
2237
+ var result = [];
2238
+ while (object) {
2239
+ arrayPush(result, getSymbols(object));
2240
+ object = getPrototype(object);
2241
+ }
2242
+ return result;
2243
+ };
2244
+
2245
+ /**
2246
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
2247
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
2248
+ * symbols of `object`.
2249
+ *
2250
+ * @private
2251
+ * @param {Object} object The object to query.
2252
+ * @param {Function} keysFunc The function to get the keys of `object`.
2253
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
2254
+ * @returns {Array} Returns the array of property names and symbols.
2255
+ */
2256
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
2257
+ var result = keysFunc(object);
2258
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
2259
+ }
2260
+
2261
+ /**
2262
+ * Creates an array of own and inherited enumerable property names and
2263
+ * symbols of `object`.
2264
+ *
2265
+ * @private
2266
+ * @param {Object} object The object to query.
2267
+ * @returns {Array} Returns the array of property names and symbols.
2268
+ */
2269
+ function getAllKeysIn(object) {
2270
+ return baseGetAllKeys(object, keysIn, getSymbolsIn);
2271
+ }
2272
+
2273
+ /* Built-in method references that are verified to be native. */
2274
+ var DataView = getNative(root, 'DataView');
2275
+
2276
+ /* Built-in method references that are verified to be native. */
2277
+ var Promise$1 = getNative(root, 'Promise');
2278
+
2279
+ /* Built-in method references that are verified to be native. */
2280
+ var Set = getNative(root, 'Set');
2281
+
2282
+ /** `Object#toString` result references. */
2283
+ var mapTag$3 = '[object Map]',
2284
+ objectTag$1 = '[object Object]',
2285
+ promiseTag = '[object Promise]',
2286
+ setTag$3 = '[object Set]',
2287
+ weakMapTag$1 = '[object WeakMap]';
2288
+
2289
+ var dataViewTag$2 = '[object DataView]';
2290
+
2291
+ /** Used to detect maps, sets, and weakmaps. */
2292
+ var dataViewCtorString = toSource(DataView),
2293
+ mapCtorString = toSource(Map),
2294
+ promiseCtorString = toSource(Promise$1),
2295
+ setCtorString = toSource(Set),
2296
+ weakMapCtorString = toSource(WeakMap);
2297
+
2298
+ /**
2299
+ * Gets the `toStringTag` of `value`.
2300
+ *
2301
+ * @private
2302
+ * @param {*} value The value to query.
2303
+ * @returns {string} Returns the `toStringTag`.
2304
+ */
2305
+ var getTag = baseGetTag;
2306
+
2307
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2308
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag$2) ||
2309
+ (Map && getTag(new Map) != mapTag$3) ||
2310
+ (Promise$1 && getTag(Promise$1.resolve()) != promiseTag) ||
2311
+ (Set && getTag(new Set) != setTag$3) ||
2312
+ (WeakMap && getTag(new WeakMap) != weakMapTag$1)) {
2313
+ getTag = function(value) {
2314
+ var result = baseGetTag(value),
2315
+ Ctor = result == objectTag$1 ? value.constructor : undefined,
2316
+ ctorString = Ctor ? toSource(Ctor) : '';
2317
+
2318
+ if (ctorString) {
2319
+ switch (ctorString) {
2320
+ case dataViewCtorString: return dataViewTag$2;
2321
+ case mapCtorString: return mapTag$3;
2322
+ case promiseCtorString: return promiseTag;
2323
+ case setCtorString: return setTag$3;
2324
+ case weakMapCtorString: return weakMapTag$1;
2325
+ }
2326
+ }
2327
+ return result;
2328
+ };
2329
+ }
2330
+
2331
+ /** Used for built-in method references. */
2332
+ var objectProto$1 = Object.prototype;
2333
+
2334
+ /** Used to check objects for own properties. */
2335
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
2336
+
2337
+ /**
2338
+ * Initializes an array clone.
2339
+ *
2340
+ * @private
2341
+ * @param {Array} array The array to clone.
2342
+ * @returns {Array} Returns the initialized clone.
2343
+ */
2344
+ function initCloneArray(array) {
2345
+ var length = array.length,
2346
+ result = new array.constructor(length);
2347
+
2348
+ // Add properties assigned by `RegExp#exec`.
2349
+ if (length && typeof array[0] == 'string' && hasOwnProperty$1.call(array, 'index')) {
2350
+ result.index = array.index;
2351
+ result.input = array.input;
2352
+ }
2353
+ return result;
2354
+ }
2355
+
2356
+ /** Built-in value references. */
2357
+ var Uint8Array = root.Uint8Array;
2358
+
2359
+ /**
2360
+ * Creates a clone of `arrayBuffer`.
2361
+ *
2362
+ * @private
2363
+ * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
2364
+ * @returns {ArrayBuffer} Returns the cloned array buffer.
2365
+ */
2366
+ function cloneArrayBuffer(arrayBuffer) {
2367
+ var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
2368
+ new Uint8Array(result).set(new Uint8Array(arrayBuffer));
2369
+ return result;
2370
+ }
2371
+
2372
+ /**
2373
+ * Creates a clone of `dataView`.
2374
+ *
2375
+ * @private
2376
+ * @param {Object} dataView The data view to clone.
2377
+ * @param {boolean} [isDeep] Specify a deep clone.
2378
+ * @returns {Object} Returns the cloned data view.
2379
+ */
2380
+ function cloneDataView(dataView, isDeep) {
2381
+ var buffer = cloneArrayBuffer(dataView.buffer) ;
2382
+ return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
2383
+ }
2384
+
2385
+ /** Used to match `RegExp` flags from their coerced string values. */
2386
+ var reFlags = /\w*$/;
2387
+
2388
+ /**
2389
+ * Creates a clone of `regexp`.
2390
+ *
2391
+ * @private
2392
+ * @param {Object} regexp The regexp to clone.
2393
+ * @returns {Object} Returns the cloned regexp.
2394
+ */
2395
+ function cloneRegExp(regexp) {
2396
+ var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
2397
+ result.lastIndex = regexp.lastIndex;
2398
+ return result;
2399
+ }
2400
+
2401
+ /** Used to convert symbols to primitives and strings. */
2402
+ var symbolProto = Symbol$1 ? Symbol$1.prototype : undefined,
2403
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
2404
+
2405
+ /**
2406
+ * Creates a clone of the `symbol` object.
2407
+ *
2408
+ * @private
2409
+ * @param {Object} symbol The symbol object to clone.
2410
+ * @returns {Object} Returns the cloned symbol object.
2411
+ */
2412
+ function cloneSymbol(symbol) {
2413
+ return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
2414
+ }
2415
+
2416
+ /**
2417
+ * Creates a clone of `typedArray`.
2418
+ *
2419
+ * @private
2420
+ * @param {Object} typedArray The typed array to clone.
2421
+ * @param {boolean} [isDeep] Specify a deep clone.
2422
+ * @returns {Object} Returns the cloned typed array.
2423
+ */
2424
+ function cloneTypedArray(typedArray, isDeep) {
2425
+ var buffer = cloneArrayBuffer(typedArray.buffer) ;
2426
+ return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
2427
+ }
2428
+
2429
+ /** `Object#toString` result references. */
2430
+ var boolTag$1 = '[object Boolean]',
2431
+ dateTag$1 = '[object Date]',
2432
+ mapTag$2 = '[object Map]',
2433
+ numberTag$1 = '[object Number]',
2434
+ regexpTag$1 = '[object RegExp]',
2435
+ setTag$2 = '[object Set]',
2436
+ stringTag$1 = '[object String]',
2437
+ symbolTag$1 = '[object Symbol]';
2438
+
2439
+ var arrayBufferTag$1 = '[object ArrayBuffer]',
2440
+ dataViewTag$1 = '[object DataView]',
2441
+ float32Tag$1 = '[object Float32Array]',
2442
+ float64Tag$1 = '[object Float64Array]',
2443
+ int8Tag$1 = '[object Int8Array]',
2444
+ int16Tag$1 = '[object Int16Array]',
2445
+ int32Tag$1 = '[object Int32Array]',
2446
+ uint8Tag$1 = '[object Uint8Array]',
2447
+ uint8ClampedTag$1 = '[object Uint8ClampedArray]',
2448
+ uint16Tag$1 = '[object Uint16Array]',
2449
+ uint32Tag$1 = '[object Uint32Array]';
2450
+
2451
+ /**
2452
+ * Initializes an object clone based on its `toStringTag`.
2453
+ *
2454
+ * **Note:** This function only supports cloning values with tags of
2455
+ * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
2456
+ *
2457
+ * @private
2458
+ * @param {Object} object The object to clone.
2459
+ * @param {string} tag The `toStringTag` of the object to clone.
2460
+ * @param {boolean} [isDeep] Specify a deep clone.
2461
+ * @returns {Object} Returns the initialized clone.
2462
+ */
2463
+ function initCloneByTag(object, tag, isDeep) {
2464
+ var Ctor = object.constructor;
2465
+ switch (tag) {
2466
+ case arrayBufferTag$1:
2467
+ return cloneArrayBuffer(object);
2468
+
2469
+ case boolTag$1:
2470
+ case dateTag$1:
2471
+ return new Ctor(+object);
2472
+
2473
+ case dataViewTag$1:
2474
+ return cloneDataView(object);
2475
+
2476
+ case float32Tag$1: case float64Tag$1:
2477
+ case int8Tag$1: case int16Tag$1: case int32Tag$1:
2478
+ case uint8Tag$1: case uint8ClampedTag$1: case uint16Tag$1: case uint32Tag$1:
2479
+ return cloneTypedArray(object);
2480
+
2481
+ case mapTag$2:
2482
+ return new Ctor;
2483
+
2484
+ case numberTag$1:
2485
+ case stringTag$1:
2486
+ return new Ctor(object);
2487
+
2488
+ case regexpTag$1:
2489
+ return cloneRegExp(object);
2490
+
2491
+ case setTag$2:
2492
+ return new Ctor;
2493
+
2494
+ case symbolTag$1:
2495
+ return cloneSymbol(object);
2496
+ }
2497
+ }
2498
+
2499
+ /** `Object#toString` result references. */
2500
+ var mapTag$1 = '[object Map]';
2501
+
2502
+ /**
2503
+ * The base implementation of `_.isMap` without Node.js optimizations.
2504
+ *
2505
+ * @private
2506
+ * @param {*} value The value to check.
2507
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2508
+ */
2509
+ function baseIsMap(value) {
2510
+ return isObjectLike(value) && getTag(value) == mapTag$1;
2511
+ }
2512
+
2513
+ /* Node.js helper references. */
2514
+ var nodeIsMap = nodeUtil && nodeUtil.isMap;
2515
+
2516
+ /**
2517
+ * Checks if `value` is classified as a `Map` object.
2518
+ *
2519
+ * @static
2520
+ * @memberOf _
2521
+ * @since 4.3.0
2522
+ * @category Lang
2523
+ * @param {*} value The value to check.
2524
+ * @returns {boolean} Returns `true` if `value` is a map, else `false`.
2525
+ * @example
2526
+ *
2527
+ * _.isMap(new Map);
2528
+ * // => true
2529
+ *
2530
+ * _.isMap(new WeakMap);
2531
+ * // => false
2532
+ */
2533
+ var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
2534
+
2535
+ /** `Object#toString` result references. */
2536
+ var setTag$1 = '[object Set]';
2537
+
2538
+ /**
2539
+ * The base implementation of `_.isSet` without Node.js optimizations.
2540
+ *
2541
+ * @private
2542
+ * @param {*} value The value to check.
2543
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2544
+ */
2545
+ function baseIsSet(value) {
2546
+ return isObjectLike(value) && getTag(value) == setTag$1;
2547
+ }
2548
+
2549
+ /* Node.js helper references. */
2550
+ var nodeIsSet = nodeUtil && nodeUtil.isSet;
2551
+
2552
+ /**
2553
+ * Checks if `value` is classified as a `Set` object.
2554
+ *
2555
+ * @static
2556
+ * @memberOf _
2557
+ * @since 4.3.0
2558
+ * @category Lang
2559
+ * @param {*} value The value to check.
2560
+ * @returns {boolean} Returns `true` if `value` is a set, else `false`.
2561
+ * @example
2562
+ *
2563
+ * _.isSet(new Set);
2564
+ * // => true
2565
+ *
2566
+ * _.isSet(new WeakSet);
2567
+ * // => false
2568
+ */
2569
+ var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
2570
+
2571
+ /** `Object#toString` result references. */
2572
+ var argsTag = '[object Arguments]',
2573
+ arrayTag = '[object Array]',
2574
+ boolTag = '[object Boolean]',
2575
+ dateTag = '[object Date]',
2576
+ errorTag = '[object Error]',
2577
+ funcTag = '[object Function]',
2578
+ genTag = '[object GeneratorFunction]',
2579
+ mapTag = '[object Map]',
2580
+ numberTag = '[object Number]',
2581
+ objectTag = '[object Object]',
2582
+ regexpTag = '[object RegExp]',
2583
+ setTag = '[object Set]',
2584
+ stringTag = '[object String]',
2585
+ symbolTag = '[object Symbol]',
2586
+ weakMapTag = '[object WeakMap]';
2587
+
2588
+ var arrayBufferTag = '[object ArrayBuffer]',
2589
+ dataViewTag = '[object DataView]',
2590
+ float32Tag = '[object Float32Array]',
2591
+ float64Tag = '[object Float64Array]',
2592
+ int8Tag = '[object Int8Array]',
2593
+ int16Tag = '[object Int16Array]',
2594
+ int32Tag = '[object Int32Array]',
2595
+ uint8Tag = '[object Uint8Array]',
2596
+ uint8ClampedTag = '[object Uint8ClampedArray]',
2597
+ uint16Tag = '[object Uint16Array]',
2598
+ uint32Tag = '[object Uint32Array]';
2599
+
2600
+ /** Used to identify `toStringTag` values supported by `_.clone`. */
2601
+ var cloneableTags = {};
2602
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
2603
+ cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
2604
+ cloneableTags[boolTag] = cloneableTags[dateTag] =
2605
+ cloneableTags[float32Tag] = cloneableTags[float64Tag] =
2606
+ cloneableTags[int8Tag] = cloneableTags[int16Tag] =
2607
+ cloneableTags[int32Tag] = cloneableTags[mapTag] =
2608
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
2609
+ cloneableTags[regexpTag] = cloneableTags[setTag] =
2610
+ cloneableTags[stringTag] = cloneableTags[symbolTag] =
2611
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
2612
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
2613
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
2614
+ cloneableTags[weakMapTag] = false;
2615
+
2616
+ /**
2617
+ * The base implementation of `_.clone` and `_.cloneDeep` which tracks
2618
+ * traversed objects.
2619
+ *
2620
+ * @private
2621
+ * @param {*} value The value to clone.
2622
+ * @param {boolean} bitmask The bitmask flags.
2623
+ * 1 - Deep clone
2624
+ * 2 - Flatten inherited properties
2625
+ * 4 - Clone symbols
2626
+ * @param {Function} [customizer] The function to customize cloning.
2627
+ * @param {string} [key] The key of `value`.
2628
+ * @param {Object} [object] The parent object of `value`.
2629
+ * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
2630
+ * @returns {*} Returns the cloned value.
2631
+ */
2632
+ function baseClone(value, bitmask, customizer, key, object, stack) {
2633
+ var result;
2634
+
2635
+ if (customizer) {
2636
+ result = object ? customizer(value, key, object, stack) : customizer(value);
2637
+ }
2638
+ if (result !== undefined) {
2639
+ return result;
2640
+ }
2641
+ if (!isObject(value)) {
2642
+ return value;
2643
+ }
2644
+ var isArr = isArray(value);
2645
+ if (isArr) {
2646
+ result = initCloneArray(value);
2647
+ } else {
2648
+ var tag = getTag(value),
2649
+ isFunc = tag == funcTag || tag == genTag;
2650
+
2651
+ if (isBuffer(value)) {
2652
+ return cloneBuffer(value);
2653
+ }
2654
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
2655
+ result = {} ;
2656
+ } else {
2657
+ if (!cloneableTags[tag]) {
2658
+ return object ? value : {};
2659
+ }
2660
+ result = initCloneByTag(value, tag);
2661
+ }
2662
+ }
2663
+ // Check for circular references and return its corresponding clone.
2664
+ stack || (stack = new Stack);
2665
+ var stacked = stack.get(value);
2666
+ if (stacked) {
2667
+ return stacked;
2668
+ }
2669
+ stack.set(value, result);
2670
+
2671
+ if (isSet(value)) {
2672
+ value.forEach(function(subValue) {
2673
+ result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
2674
+ });
2675
+ } else if (isMap(value)) {
2676
+ value.forEach(function(subValue, key) {
2677
+ result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
2678
+ });
2679
+ }
2680
+
2681
+ var keysFunc = (getAllKeysIn )
2682
+ ;
2683
+
2684
+ var props = isArr ? undefined : keysFunc(value);
2685
+ arrayEach(props || value, function(subValue, key) {
2686
+ if (props) {
2687
+ key = subValue;
2688
+ subValue = value[key];
2689
+ }
2690
+ // Recursively populate clone (susceptible to call stack limits).
2691
+ assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
2692
+ });
2693
+ return result;
2694
+ }
2695
+
2696
+ /**
2697
+ * Gets the last element of `array`.
2698
+ *
2699
+ * @static
2700
+ * @memberOf _
2701
+ * @since 0.1.0
2702
+ * @category Array
2703
+ * @param {Array} array The array to query.
2704
+ * @returns {*} Returns the last element of `array`.
2705
+ * @example
2706
+ *
2707
+ * _.last([1, 2, 3]);
2708
+ * // => 3
2709
+ */
2710
+ function last(array) {
2711
+ var length = array == null ? 0 : array.length;
2712
+ return length ? array[length - 1] : undefined;
2713
+ }
2714
+
2715
+ /**
2716
+ * Gets the parent value at `path` of `object`.
2717
+ *
2718
+ * @private
2719
+ * @param {Object} object The object to query.
2720
+ * @param {Array} path The path to get the parent value of.
2721
+ * @returns {*} Returns the parent value.
2722
+ */
2723
+ function parent(object, path) {
2724
+ return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
2725
+ }
2726
+
2727
+ /** Used for built-in method references. */
2728
+ var objectProto = Object.prototype;
2729
+
2730
+ /** Used to check objects for own properties. */
2731
+ var hasOwnProperty = objectProto.hasOwnProperty;
2732
+
2733
+ /**
2734
+ * The base implementation of `_.unset`.
2735
+ *
2736
+ * @private
2737
+ * @param {Object} object The object to modify.
2738
+ * @param {Array|string} path The property path to unset.
2739
+ * @returns {boolean} Returns `true` if the property is deleted, else `false`.
2740
+ */
2741
+ function baseUnset(object, path) {
2742
+ path = castPath(path, object);
2743
+
2744
+ // Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
2745
+ var index = -1,
2746
+ length = path.length;
2747
+
2748
+ if (!length) {
2749
+ return true;
2750
+ }
2751
+
2752
+ var isRootPrimitive = object == null || (typeof object !== 'object' && typeof object !== 'function');
2753
+
2754
+ while (++index < length) {
2755
+ var key = path[index];
2756
+
2757
+ // skip non-string keys (e.g., Symbols, numbers)
2758
+ if (typeof key !== 'string') {
2759
+ continue;
2760
+ }
2761
+
2762
+ // Always block "__proto__" anywhere in the path if it's not expected
2763
+ if (key === '__proto__' && !hasOwnProperty.call(object, '__proto__')) {
2764
+ return false;
2765
+ }
2766
+
2767
+ // Block "constructor.prototype" chains
2768
+ if (key === 'constructor' &&
2769
+ (index + 1) < length &&
2770
+ typeof path[index + 1] === 'string' &&
2771
+ path[index + 1] === 'prototype') {
2772
+
2773
+ // Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
2774
+ if (isRootPrimitive && index === 0) {
2775
+ continue;
2776
+ }
2777
+
2778
+ return false;
2779
+ }
2780
+ }
2781
+
2782
+ var obj = parent(object, path);
2783
+ return obj == null || delete obj[toKey(last(path))];
2784
+ }
2785
+
2786
+ /**
2787
+ * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
2788
+ * objects.
2789
+ *
2790
+ * @private
2791
+ * @param {*} value The value to inspect.
2792
+ * @param {string} key The key of the property to inspect.
2793
+ * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
2794
+ */
2795
+ function customOmitClone(value) {
2796
+ return isPlainObject(value) ? undefined : value;
2797
+ }
2798
+
2799
+ /** Used to compose bitmasks for cloning. */
2800
+ var CLONE_DEEP_FLAG = 1,
2801
+ CLONE_FLAT_FLAG = 2,
2802
+ CLONE_SYMBOLS_FLAG = 4;
2803
+
2804
+ /**
2805
+ * The opposite of `_.pick`; this method creates an object composed of the
2806
+ * own and inherited enumerable property paths of `object` that are not omitted.
2807
+ *
2808
+ * **Note:** This method is considerably slower than `_.pick`.
2809
+ *
2810
+ * @static
2811
+ * @since 0.1.0
2812
+ * @memberOf _
2813
+ * @category Object
2814
+ * @param {Object} object The source object.
2815
+ * @param {...(string|string[])} [paths] The property paths to omit.
2816
+ * @returns {Object} Returns the new object.
2817
+ * @example
2818
+ *
2819
+ * var object = { 'a': 1, 'b': '2', 'c': 3 };
2820
+ *
2821
+ * _.omit(object, ['a', 'c']);
2822
+ * // => { 'b': '2' }
2823
+ */
2824
+ var omit = flatRest(function(object, paths) {
2825
+ var result = {};
2826
+ if (object == null) {
2827
+ return result;
2828
+ }
2829
+ var isDeep = false;
2830
+ paths = arrayMap(paths, function(path) {
2831
+ path = castPath(path, object);
2832
+ isDeep || (isDeep = path.length > 1);
2833
+ return path;
2834
+ });
2835
+ copyObject(object, getAllKeysIn(object), result);
2836
+ if (isDeep) {
2837
+ result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
2838
+ }
2839
+ var length = paths.length;
2840
+ while (length--) {
2841
+ baseUnset(result, paths[length]);
2842
+ }
2843
+ return result;
2844
+ });
2845
+
2846
+ const _sfc_main$5 = /*@__PURE__*/Object.assign({
2847
+ inheritAttrs: false,
2848
+ name: "EasyButton"
2849
+ }, {
2850
+ __name: 'button',
2851
+ setup(__props) {
2852
+
2853
+
2854
+
2855
+ const loading = vue.ref(false);
2856
+
2857
+ const attrs = vue.useAttrs();
2858
+ const onClick = async () => {
2859
+ try {
2860
+ loading.value = true;
2861
+
2862
+ if (isFunction$1(attrs.onClick)) {
2863
+ await attrs.onClick();
2864
+ }
2865
+ } finally {
2866
+ loading.value = false;
2867
+ }
2868
+ };
2869
+
2870
+ return (_ctx, _cache) => {
2871
+ return (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElButton), vue.mergeProps({ loading: loading.value }, vue.unref(omit)(vue.unref(attrs), 'onClick'), { onClick: onClick }), {
2872
+ default: vue.withCtx(() => [
2873
+ vue.renderSlot(_ctx.$slots, "default")
2874
+ ]),
2875
+ _: 3 /* FORWARDED */
2876
+ }, 16 /* FULL_PROPS */, ["loading"]))
2877
+ }
2878
+ }
2879
+
2880
+ });
2881
+
2882
+ // 用来整合组件的,最终实现导出组件
2883
+
2884
+
2885
+ // 通过 withInstall 方法给 button 添加了一个 Vue3 插件所需的 install 方法
2886
+ const EasyButton = withInstall(_sfc_main$5);
2887
+
2888
+ function useDynamicComponent() {
2889
+ /**
2890
+ *
2891
+ * @param {string | number | Component | Function} type 组件名称
2892
+ * @param {Object} scope 作用域
2893
+ * @returns {Component}
2894
+ */
2895
+ const getComponent = (type, scope) => {
2896
+ // 非 string / number,说明是组件对象或渲染函数
2897
+ if (type && !isString(type) && !isNumber(type)) {
2898
+ return isFunction$1(type) ? type(scope) : type
2899
+ }
2900
+
2901
+ const componentKey = type;
2902
+ let dynamicComponent;
2903
+
2904
+ // 只解析 el- 前缀的组件
2905
+ if (isString(componentKey) && componentKey.startsWith("el-")) {
2906
+ dynamicComponent = vue.resolveComponent(componentKey);
2907
+ }
2908
+
2909
+ // 成功解析到组件(resolveComponent 失败会返回字符串)
2910
+ if (dynamicComponent && !isString(dynamicComponent)) {
2911
+ return dynamicComponent
2912
+ }
2913
+
2914
+ // fallback:文本组件
2915
+ return {
2916
+ name: "DynamicText",
2917
+ props: ["modelValue"],
2918
+ render() {
2919
+ if (!scope) {
2920
+ return vue.h("span", {}, componentKey)
2921
+ }
2922
+
2923
+ // 否则是 value,判断是否为空(null 或空字符串)
2924
+ const isEmpty = this.modelValue === null || this.modelValue === "" || this.modelValue === undefined;
2925
+ const displayValue = isEmpty ? "--" : this.modelValue;
2926
+ return vue.h("span", {}, displayValue)
2927
+ }
2928
+ }
2929
+ };
2930
+
2931
+ return {
2932
+ getComponent
2933
+ }
2934
+ }
2935
+
2936
+ const _sfc_main$4 = /*@__PURE__*/Object.assign({
2937
+ name: "EasyDescriptionsComp"
2938
+ }, {
2939
+ __name: 'comp',
2940
+ props: /*@__PURE__*/vue.mergeModels({
2941
+ id: {
2942
+ type: String,
2943
+ default: ""
2944
+ },
2945
+ components: {
2946
+ type: [String, Number, Function, Object],
2947
+ default: ""
2948
+ },
2949
+ props: {
2950
+ type: Object,
2951
+ default: () => ({})
2952
+ }
2953
+ }, {
2954
+ "modelValue": {},
2955
+ "modelModifiers": {},
2956
+ }),
2957
+ emits: ["update:modelValue"],
2958
+ setup(__props) {
2959
+
2960
+
2961
+
2962
+ const componentProps = __props;
2963
+
2964
+ const descriptionsData = vue.useModel(__props, "modelValue");
2965
+ const { getComponent } = useDynamicComponent();
2966
+
2967
+ // 1. 动态计算要渲染的组件
2968
+ const currentComponent = vue.computed(() => {
2969
+ return componentProps.id
2970
+ ? getComponent(componentProps.components, descriptionsData.value)
2971
+ : getComponent(componentProps.components)
2972
+ });
2973
+
2974
+ // 2. 动态构建 Model 绑定 (仅在有 id 时绑定)
2975
+ const dynamicModel = vue.computed(() => {
2976
+ return componentProps.id ? { modelValue: descriptionsData.value[componentProps.id] } : {}
2977
+ });
2978
+
2979
+ return (_ctx, _cache) => {
2980
+ return vue.renderSlot(_ctx.$slots, __props.components, {}, () => [
2981
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(currentComponent.value), vue.mergeProps({ ...dynamicModel.value, ...__props.props }, {
2982
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = val => __props.id && (descriptionsData.value[__props.id] = val))
2983
+ }), null, 16 /* FULL_PROPS */))
2984
+ ])
2985
+ }
2986
+ }
2987
+
2988
+ });
2989
+
2990
+ const _hoisted_1$3 = { class: "epl-descriptions" };
2991
+
2992
+
2993
+ const _sfc_main$3 = /*@__PURE__*/Object.assign({
2994
+ name: "EasyDescriptions"
2995
+ }, {
2996
+ __name: 'descriptions',
2997
+ props: /*@__PURE__*/vue.mergeModels({
2998
+ items: {
2999
+ type: Array,
3000
+ default: () => []
3001
+ }
3002
+ }, {
3003
+ "modelValue": {},
3004
+ "modelModifiers": {},
3005
+ }),
3006
+ emits: ["update:modelValue"],
3007
+ setup(__props, { expose: __expose }) {
3008
+
3009
+
3010
+
3011
+ const props = __props;
3012
+
3013
+ const descriptionsData = vue.useModel(__props, "modelValue");
3014
+
3015
+ // 内部处理单个列表的函数
3016
+ const normalizeItems = list => {
3017
+ return list.reduce((prev, item) => {
3018
+ const isHidden = isFunction$1(item.hidden) ? item.hidden(descriptionsData.value) : item.hidden;
3019
+
3020
+ if (isHidden) return prev
3021
+
3022
+ prev.push({
3023
+ ...item,
3024
+ label: isObject$1(item.label)
3025
+ ? item.label
3026
+ : {
3027
+ components: item.label
3028
+ },
3029
+ value: isObject$1(item.value)
3030
+ ? item.value
3031
+ : {
3032
+ id: item.value,
3033
+ components: item.value
3034
+ }
3035
+ });
3036
+
3037
+ return prev
3038
+ }, [])
3039
+ };
3040
+
3041
+ const renderList = vue.computed(() => {
3042
+ if (!props.items || props.items.length === 0) return []
3043
+
3044
+ // 判断是否为分组模式:第一项包含 items 字段且是一个数组
3045
+ // 为了兼容性更好,这里假设如果 item 内部有 items 属性,则认为是分组
3046
+ const isGroup = props.items.some(item => item.items && Array.isArray(item.items));
3047
+
3048
+ if (isGroup) {
3049
+ // 分组模式
3050
+ return props.items
3051
+ .filter(group => {
3052
+ const isHidden = isFunction$1(group.hidden) ? group.hidden(descriptionsData.value) : group.hidden;
3053
+ return !isHidden
3054
+ })
3055
+ .map(group => {
3056
+ // 分离出内部使用的属性,其他的属性放入 bindProps 透传给 el-descriptions
3057
+ // eslint-disable-next-line no-unused-vars
3058
+ const { extra, items, hidden, ...rest } = group;
3059
+ return {
3060
+ ...group,
3061
+ rows: normalizeItems(group.items),
3062
+ bindProps: rest
3063
+ }
3064
+ })
3065
+ } else {
3066
+ // 单组模式:包装成一个默认分组
3067
+ return [
3068
+ {
3069
+ rows: normalizeItems(props.items),
3070
+ bindProps: {}
3071
+ }
3072
+ ]
3073
+ }
3074
+ });
3075
+
3076
+ __expose({});
3077
+
3078
+ return (_ctx, _cache) => {
3079
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, [
3080
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(renderList.value, (group, index) => {
3081
+ return (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDescriptions), vue.mergeProps({
3082
+ key: index,
3083
+ ref_for: true
3084
+ }, { ..._ctx.$attrs, ...group.bindProps }, { style: {"margin-bottom":"20px"} }), vue.createSlots({
3085
+ default: vue.withCtx(() => [
3086
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(group.rows, (item) => {
3087
+ return (vue.openBlock(), vue.createBlock(vue.unref(elementPlus.ElDescriptionsItem), vue.mergeProps({
3088
+ key: item.label
3089
+ }, { ref_for: true }, item), {
3090
+ label: vue.withCtx(() => [
3091
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
3092
+ vue.h(
3093
+ _sfc_main$4,
3094
+ {
3095
+ modelValue: descriptionsData.value,
3096
+ ...item.label
3097
+ },
3098
+ _ctx.$slots
3099
+ )
3100
+ )))
3101
+ ]),
3102
+ default: vue.withCtx(() => [
3103
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(
3104
+ vue.h(
3105
+ _sfc_main$4,
3106
+ {
3107
+ modelValue: descriptionsData.value,
3108
+ ...item.value
3109
+ },
3110
+ _ctx.$slots
3111
+ )
3112
+ )))
3113
+ ]),
3114
+ _: 2 /* DYNAMIC */
3115
+ }, 1040 /* FULL_PROPS, DYNAMIC_SLOTS */))
3116
+ }), 128 /* KEYED_FRAGMENT */))
3117
+ ]),
3118
+ _: 2 /* DYNAMIC */
3119
+ }, [
3120
+ (group.title || _ctx.$slots.title)
3121
+ ? {
3122
+ name: "title",
3123
+ fn: vue.withCtx(() => [
3124
+ (group.title)
3125
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3126
+ vue.createTextVNode(vue.toDisplayString(group.title), 1 /* TEXT */)
3127
+ ], 64 /* STABLE_FRAGMENT */))
3128
+ : vue.renderSlot(_ctx.$slots, "title", {
3129
+ key: 1,
3130
+ group: group,
3131
+ index: index
3132
+ })
3133
+ ]),
3134
+ key: "0"
3135
+ }
3136
+ : undefined,
3137
+ (group.extra || _ctx.$slots.extra)
3138
+ ? {
3139
+ name: "extra",
3140
+ fn: vue.withCtx(() => [
3141
+ (group.extra)
3142
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3143
+ vue.createTextVNode(vue.toDisplayString(group.extra), 1 /* TEXT */)
3144
+ ], 64 /* STABLE_FRAGMENT */))
3145
+ : vue.renderSlot(_ctx.$slots, "extra", {
3146
+ key: 1,
3147
+ group: group,
3148
+ index: index
3149
+ })
3150
+ ]),
3151
+ key: "1"
3152
+ }
3153
+ : undefined
3154
+ ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */))
3155
+ }), 128 /* KEYED_FRAGMENT */))
3156
+ ]))
3157
+ }
3158
+ }
3159
+
3160
+ });
3161
+
3162
+ // 用来整合组件的,最终实现导出组件
3163
+
3164
+
3165
+ // 通过 withInstall 方法给 button 添加了一个 Vue3 插件所需的 install 方法
3166
+ const EasyDescriptions = withInstall(_sfc_main$3);
3167
+
3168
+ Math.easeInOutQuad = function (t, b, c, d) {
3169
+ t /= d / 2;
3170
+ if (t < 1) {
3171
+ return (c / 2) * t * t + b
3172
+ }
3173
+ t--;
3174
+ return (-c / 2) * (t * (t - 2) - 1) + b
3175
+ };
3176
+
3177
+ // requestAnimationFrame for Smart Animating http://goo.gl/sx5sts
3178
+ var requestAnimFrame = (function () {
3179
+ if (typeof window === "undefined") {
3180
+ return function (callback) {
3181
+ setTimeout(callback, 1000 / 60);
3182
+ }
3183
+ }
3184
+ return (
3185
+ window.requestAnimationFrame ||
3186
+ window.webkitRequestAnimationFrame ||
3187
+ window.mozRequestAnimationFrame ||
3188
+ function (callback) {
3189
+ window.setTimeout(callback, 1000 / 60);
3190
+ }
3191
+ )
3192
+ })();
3193
+
3194
+ /**
3195
+ * Because it's so fucking difficult to detect the scrolling element, just move them all
3196
+ * @param {number} amount
3197
+ */
3198
+ function move(amount) {
3199
+ document.documentElement.scrollTop = amount;
3200
+ document.body.parentNode.scrollTop = amount;
3201
+ document.body.scrollTop = amount;
3202
+ }
3203
+
3204
+ function position() {
3205
+ return document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop
3206
+ }
3207
+
3208
+ /**
3209
+ * @param {number} to
3210
+ * @param {number} duration
3211
+ * @param {Function} callback
3212
+ */
3213
+ function scrollTo(to, duration, callback) {
3214
+ const start = position();
3215
+ const change = to - start;
3216
+ const increment = 20;
3217
+ let currentTime = 0;
3218
+ duration = isUndefined(duration) ? 500 : duration;
3219
+ var animateScroll = function () {
3220
+ // increment the time
3221
+ currentTime += increment;
3222
+ // find the value with the quadratic in-out easing function
3223
+ var val = Math.easeInOutQuad(currentTime, start, change, duration);
3224
+ // move the document.body
3225
+ move(val);
3226
+ // do the animation unless its over
3227
+ if (currentTime < duration) {
3228
+ requestAnimFrame(animateScroll);
3229
+ }
3230
+ };
3231
+ animateScroll();
3232
+ }
3233
+
3234
+ function styleInject(css, ref) {
3235
+ if ( ref === void 0 ) ref = {};
3236
+ var insertAt = ref.insertAt;
3237
+
3238
+ if (!css || typeof document === 'undefined') { return; }
3239
+
3240
+ var head = document.head || document.getElementsByTagName('head')[0];
3241
+ var style = document.createElement('style');
3242
+ style.type = 'text/css';
3243
+
3244
+ if (insertAt === 'top') {
3245
+ if (head.firstChild) {
3246
+ head.insertBefore(style, head.firstChild);
3247
+ } else {
3248
+ head.appendChild(style);
3249
+ }
3250
+ } else {
3251
+ head.appendChild(style);
3252
+ }
3253
+
3254
+ if (style.styleSheet) {
3255
+ style.styleSheet.cssText = css;
3256
+ } else {
3257
+ style.appendChild(document.createTextNode(css));
3258
+ }
3259
+ }
3260
+
3261
+ var css_248z$2 = ".table-container[data-v-d1947650] {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 400px;\n}\n.table-container .table[data-v-d1947650] {\n flex: 1;\n position: relative;\n}\n.table-container .table [data-v-d1947650] .el-table {\n position: absolute;\n height: 100%;\n}\n\n.pagination-container[data-v-d1947650] {\n padding: 16px 0;\n display: flex;\n}\n\n.operate-group[data-v-d1947650] {\n display: flex;\n align-items: center;\n}\n.operate-group .el-button + .el-button[data-v-d1947650],\n.operate-group .el-button + .custom-dropdown[data-v-d1947650] {\n margin-left: 16px;\n position: relative;\n}\n.operate-group .el-button + .el-button[data-v-d1947650]::before,\n.operate-group .el-button + .custom-dropdown[data-v-d1947650]::before {\n content: \"\";\n position: absolute;\n left: -8px;\n top: 50%;\n transform: translateY(-50%);\n width: 1px;\n height: 12px;\n background-color: #dcdfe6;\n}\n.operate-group [data-v-d1947650] .custom-text {\n color: #606266;\n padding: 0;\n}\n.operate-group [data-v-d1947650] .custom-text:hover {\n color: #409eff;\n}";
3262
+ styleInject(css_248z$2);
3263
+
3264
+ var _export_sfc = (sfc, props) => {
3265
+ const target = sfc.__vccOpts || sfc;
3266
+ for (const [key, val] of props) {
3267
+ target[key] = val;
3268
+ }
3269
+ return target;
3270
+ };
3271
+
3272
+ const _hoisted_1$2 = { class: "table-container" };
3273
+ const _hoisted_2$2 = { class: "table" };
3274
+ const _hoisted_3$2 = { key: 0 };
3275
+ const _hoisted_4$2 = ["innerHTML"];
3276
+ const _hoisted_5$2 = ["innerHTML"];
3277
+ const _hoisted_6 = { class: "operate-group" };
3278
+
3279
+
3280
+ const _sfc_main$2 = /*@__PURE__*/Object.assign({ name: "EasyTable" }, {
3281
+ __name: 'table',
3282
+ props: {
3283
+ columns: { type: Array, default: () => [] },
3284
+ tableData: { type: Array, default: () => [] },
3285
+ total: { type: Number, default: 0 },
3286
+ page: { type: Number, default: 1 },
3287
+ options: {
3288
+ type: Object,
3289
+ default: () => ({ stripe: false, highlightCurrentRow: false, border: true })
3290
+ },
3291
+ limit: { type: Number, default: 20 },
3292
+ pageSizes: { type: Array, default: () => [10, 20, 30, 50] },
3293
+ pagerCount: {
3294
+ type: Number,
3295
+ default: () => (typeof document !== "undefined" && document.body.clientWidth < 992 ? 5 : 7)
3296
+ },
3297
+ layout: { type: String, default: "total, sizes, prev, pager, next, jumper" },
3298
+ background: { type: Boolean, default: true },
3299
+ autoScroll: { type: Boolean, default: true },
3300
+ hidden: { type: Boolean, default: false },
3301
+ operates: { type: Object, default: () => ({ list: [] }) },
3302
+ paginationPosition: { type: String, default: "right" }
3303
+ },
3304
+ emits: ["update:page", "update:limit", "pagination", "sortChange", "handleSelectionChange"],
3305
+ setup(__props, { expose: __expose, emit: __emit }) {
3306
+
3307
+
3308
+
3309
+ const props = __props;
3310
+
3311
+ const emit = __emit;
3312
+
3313
+ const slots = vue.useSlots();
3314
+ const iTableRef = vue.ref(null);
3315
+ const processedHeaders = vue.ref([]);
3316
+
3317
+ /** 1. 逻辑优化:使用 watch 监听 columns 变化,避免在 onBeforeUpdate 中过度计算 **/
3318
+ vue.watch(
3319
+ () => [props.columns, slots],
3320
+ () => {
3321
+ processedHeaders.value = props.columns.map(column => {
3322
+ const col = { ...column };
3323
+ if (!col.key) col.key = col.prop;
3324
+
3325
+ // 匹配插槽逻辑保持不变
3326
+ Object.keys(slots).forEach(key => {
3327
+ const res = key.match(/^(\S+)-(\S+)/);
3328
+
3329
+ if (res && res[2] === col.key) {
3330
+ col.slot = { ...col.slot, [res[1]]: res[0] };
3331
+ }
3332
+ });
3333
+
3334
+ return col
3335
+ });
3336
+ },
3337
+ { immediate: true, deep: true }
3338
+ );
3339
+
3340
+ /** 2. 工具函数 **/
3341
+
3342
+ // 计算表头宽度
3343
+ const headSpanFit = column => {
3344
+ const labelLen = column?.label?.length || 0;
3345
+ return Math.max(labelLen * 20, 100)
3346
+ };
3347
+
3348
+ // 判断列是否显示
3349
+ const isColumnVisible = column => {
3350
+ if (isFunction$1(column.show)) return column.show()
3351
+ return column.show !== false
3352
+ };
3353
+
3354
+ // 获取渲染内容
3355
+ const getRenderContent = (column, scope) => {
3356
+ return isFunction$1(column.render) ? column.render(scope) : column.render
3357
+ };
3358
+
3359
+ // 获取可见按钮
3360
+ const getVisibleButtons = row => {
3361
+ const list = (props.operates?.list || []).filter(item => {
3362
+ return isFunction$1(item.show) ? item.show(row) : item.show !== false
3363
+ });
3364
+ return list.length > 3
3365
+ ? {
3366
+ outside: list.slice(0, 2),
3367
+ inside: list.slice(2)
3368
+ }
3369
+ : {
3370
+ outside: list,
3371
+ inside: []
3372
+ }
3373
+ };
3374
+
3375
+ /** 3. 分页计算属性 **/
3376
+ // 当前页码
3377
+ const currentPage = vue.computed({
3378
+ get: () => props.page,
3379
+ set: val => emit("update:page", val)
3380
+ });
3381
+
3382
+ // 每页条数
3383
+ const pageSize = vue.computed({
3384
+ get: () => props.limit,
3385
+ set: val => emit("update:limit", val)
3386
+ });
3387
+
3388
+ // 分页对齐方式
3389
+ const paginationJustify = vue.computed(() => {
3390
+ const map = { left: "flex-start", center: "center", right: "flex-end" };
3391
+ return map[props.paginationPosition] || "flex-end"
3392
+ });
3393
+
3394
+ /** 4. 事件处理 **/
3395
+ // 改变每页条数
3396
+ const handleSizeChange = val => {
3397
+ if (currentPage.value * val > props.total) currentPage.value = 1;
3398
+ emit("pagination", { page: currentPage.value, limit: val });
3399
+ if (props.autoScroll) scrollTo(0, 800);
3400
+ };
3401
+
3402
+ // 改变当前页
3403
+ const handleCurrentChange = val => {
3404
+ emit("pagination", { page: val, limit: pageSize.value });
3405
+ if (props.autoScroll) scrollTo(0, 800);
3406
+ };
3407
+
3408
+ // 改变排序
3409
+ const sortChange = args => emit("sortChange", args);
3410
+
3411
+ // 改变选择
3412
+ const handleSelectionChange = val => emit("handleSelectionChange", val);
3413
+
3414
+ __expose({ iTableRef });
3415
+
3416
+ return (_ctx, _cache) => {
3417
+ const _component_el_table_column = vue.resolveComponent("el-table-column");
3418
+ const _component_el_icon = vue.resolveComponent("el-icon");
3419
+ const _component_el_button = vue.resolveComponent("el-button");
3420
+ const _component_el_dropdown_item = vue.resolveComponent("el-dropdown-item");
3421
+ const _component_el_dropdown_menu = vue.resolveComponent("el-dropdown-menu");
3422
+ const _component_el_dropdown = vue.resolveComponent("el-dropdown");
3423
+ const _component_el_table = vue.resolveComponent("el-table");
3424
+ const _component_el_pagination = vue.resolveComponent("el-pagination");
3425
+
3426
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, [
3427
+ vue.createElementVNode("div", _hoisted_2$2, [
3428
+ vue.createVNode(_component_el_table, vue.mergeProps({
3429
+ id: "iTable",
3430
+ ref_key: "iTableRef",
3431
+ ref: iTableRef,
3432
+ data: __props.tableData
3433
+ }, __props.options, {
3434
+ height: "100%",
3435
+ style: {"width":"100%"},
3436
+ onSortChange: sortChange,
3437
+ onSelectionChange: handleSelectionChange
3438
+ }), {
3439
+ default: vue.withCtx(() => [
3440
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(processedHeaders.value, (column, index) => {
3441
+ return (vue.openBlock(), vue.createElementBlock(vue.Fragment, {
3442
+ key: index + (column.prop || '')
3443
+ }, [
3444
+ (isColumnVisible(column))
3445
+ ? (vue.openBlock(), vue.createBlock(_component_el_table_column, vue.mergeProps({
3446
+ key: 0,
3447
+ "min-width": headSpanFit(column)
3448
+ }, { ref_for: true }, column), vue.createSlots({ _: 2 /* DYNAMIC */ }, [
3449
+ vue.renderList(column.slot, (value, key) => {
3450
+ return {
3451
+ name: key,
3452
+ fn: vue.withCtx((scope) => [
3453
+ vue.renderSlot(_ctx.$slots, value, vue.mergeProps({ ref_for: true }, scope), undefined, true)
3454
+ ])
3455
+ }
3456
+ }),
3457
+ (!column.slot)
3458
+ ? {
3459
+ name: "default",
3460
+ fn: vue.withCtx((scope) => [
3461
+ vue.createCommentVNode(" 渲染render "),
3462
+ (column.render)
3463
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3464
+ vue.createCommentVNode(" 如果render返回的是字符串 "),
3465
+ (vue.unref(isString)(getRenderContent(column, scope)))
3466
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$2, [
3467
+ vue.createElementVNode("div", {
3468
+ innerHTML: getRenderContent(column, scope)
3469
+ }, null, 8 /* PROPS */, _hoisted_4$2)
3470
+ ]))
3471
+ : (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3472
+ vue.createCommentVNode(" 如果render返回的是组件 "),
3473
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(column.render), vue.mergeProps({ ref_for: true }, scope, {
3474
+ row: scope.row,
3475
+ index: scope.$index
3476
+ }), null, 16 /* FULL_PROPS */, ["row", "index"]))
3477
+ ], 2112 /* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */))
3478
+ ], 64 /* STABLE_FRAGMENT */))
3479
+ : (column.formatter)
3480
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3481
+ vue.createCommentVNode(" 渲染formatter "),
3482
+ vue.createElementVNode("span", {
3483
+ innerHTML: column.formatter(scope.row, column)
3484
+ }, null, 8 /* PROPS */, _hoisted_5$2)
3485
+ ], 64 /* STABLE_FRAGMENT */))
3486
+ : (!column.type)
3487
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 2 }, [
3488
+ vue.createCommentVNode(" 渲染默认内容 "),
3489
+ vue.createElementVNode("span", null, vue.toDisplayString(scope.row[column.prop] ?? "--"), 1 /* TEXT */)
3490
+ ], 64 /* STABLE_FRAGMENT */))
3491
+ : vue.createCommentVNode("v-if", true)
3492
+ ]),
3493
+ key: "0"
3494
+ }
3495
+ : undefined
3496
+ ]), 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["min-width"]))
3497
+ : vue.createCommentVNode("v-if", true)
3498
+ ], 64 /* STABLE_FRAGMENT */))
3499
+ }), 128 /* KEYED_FRAGMENT */)),
3500
+ vue.createCommentVNode(" 操作列 "),
3501
+ (__props.operates.list?.length)
3502
+ ? (vue.openBlock(), vue.createBlock(_component_el_table_column, {
3503
+ key: 0,
3504
+ label: "操作",
3505
+ align: "left",
3506
+ width: __props.operates.width,
3507
+ fixed: __props.operates.fixed
3508
+ }, {
3509
+ default: vue.withCtx((scope) => [
3510
+ vue.createElementVNode("div", _hoisted_6, [
3511
+ vue.createCommentVNode(" 渲染外部按钮 "),
3512
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getVisibleButtons(scope.row).outside, (item, idx) => {
3513
+ return (vue.openBlock(), vue.createBlock(_component_el_button, vue.mergeProps({
3514
+ key: idx,
3515
+ ref_for: true
3516
+ }, item, {
3517
+ type: item.type || 'primary',
3518
+ size: item.size || 'small',
3519
+ onClick: vue.withModifiers($event => (item.method(scope.row, scope.$index)), ["stop"])
3520
+ }), {
3521
+ default: vue.withCtx(() => [
3522
+ vue.createTextVNode(vue.toDisplayString(item.label) + " ", 1 /* TEXT */),
3523
+ (item.icon)
3524
+ ? (vue.openBlock(), vue.createBlock(_component_el_icon, {
3525
+ key: 0,
3526
+ class: "el-icon--right"
3527
+ }, {
3528
+ default: vue.withCtx(() => [
3529
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(item.icon)))
3530
+ ]),
3531
+ _: 2 /* DYNAMIC */
3532
+ }, 1024 /* DYNAMIC_SLOTS */))
3533
+ : vue.createCommentVNode("v-if", true)
3534
+ ]),
3535
+ _: 2 /* DYNAMIC */
3536
+ }, 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["type", "size", "onClick"]))
3537
+ }), 128 /* KEYED_FRAGMENT */)),
3538
+ vue.createCommentVNode(" 渲染下拉按钮 "),
3539
+ (getVisibleButtons(scope.row).inside.length)
3540
+ ? (vue.openBlock(), vue.createBlock(_component_el_dropdown, {
3541
+ key: 0,
3542
+ class: "custom-dropdown",
3543
+ trigger: "click"
3544
+ }, {
3545
+ dropdown: vue.withCtx(() => [
3546
+ vue.createVNode(_component_el_dropdown_menu, null, {
3547
+ default: vue.withCtx(() => [
3548
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(getVisibleButtons(scope.row).inside, (item, idx) => {
3549
+ return (vue.openBlock(), vue.createBlock(_component_el_dropdown_item, vue.mergeProps({ key: idx }, { ref_for: true }, item, {
3550
+ onClick: $event => (item.method(scope.row, scope.$index))
3551
+ }), {
3552
+ default: vue.withCtx(() => [
3553
+ vue.createTextVNode(vue.toDisplayString(item.label), 1 /* TEXT */)
3554
+ ]),
3555
+ _: 2 /* DYNAMIC */
3556
+ }, 1040 /* FULL_PROPS, DYNAMIC_SLOTS */, ["onClick"]))
3557
+ }), 128 /* KEYED_FRAGMENT */))
3558
+ ]),
3559
+ _: 2 /* DYNAMIC */
3560
+ }, 1024 /* DYNAMIC_SLOTS */)
3561
+ ]),
3562
+ default: vue.withCtx(() => [
3563
+ vue.createVNode(_component_el_button, {
3564
+ link: "",
3565
+ size: "small",
3566
+ class: "custom-text"
3567
+ }, {
3568
+ default: vue.withCtx(() => [
3569
+ vue.createVNode(_component_el_icon, { size: 18 }, {
3570
+ default: vue.withCtx(() => [
3571
+ vue.createVNode(vue.unref(iconsVue.MoreFilled))
3572
+ ]),
3573
+ _: 1 /* STABLE */
3574
+ })
3575
+ ]),
3576
+ _: 1 /* STABLE */
3577
+ })
3578
+ ]),
3579
+ _: 2 /* DYNAMIC */
3580
+ }, 1024 /* DYNAMIC_SLOTS */))
3581
+ : vue.createCommentVNode("v-if", true)
3582
+ ])
3583
+ ]),
3584
+ _: 1 /* STABLE */
3585
+ }, 8 /* PROPS */, ["width", "fixed"]))
3586
+ : vue.createCommentVNode("v-if", true)
3587
+ ]),
3588
+ _: 3 /* FORWARDED */
3589
+ }, 16 /* FULL_PROPS */, ["data"])
3590
+ ]),
3591
+ vue.createCommentVNode(" 分页 "),
3592
+ (!__props.hidden)
3593
+ ? (vue.openBlock(), vue.createElementBlock("div", {
3594
+ key: 0,
3595
+ class: "pagination-container",
3596
+ style: vue.normalizeStyle({ justifyContent: paginationJustify.value })
3597
+ }, [
3598
+ vue.createVNode(_component_el_pagination, {
3599
+ "current-page": currentPage.value,
3600
+ "onUpdate:currentPage": _cache[0] || (_cache[0] = $event => ((currentPage).value = $event)),
3601
+ "page-size": pageSize.value,
3602
+ "onUpdate:pageSize": _cache[1] || (_cache[1] = $event => ((pageSize).value = $event)),
3603
+ background: __props.background,
3604
+ layout: __props.layout,
3605
+ "page-sizes": __props.pageSizes,
3606
+ "pager-count": __props.pagerCount,
3607
+ total: __props.total,
3608
+ onSizeChange: handleSizeChange,
3609
+ onCurrentChange: handleCurrentChange
3610
+ }, null, 8 /* PROPS */, ["current-page", "page-size", "background", "layout", "page-sizes", "pager-count", "total"])
3611
+ ], 4 /* STYLE */))
3612
+ : vue.createCommentVNode("v-if", true)
3613
+ ]))
3614
+ }
3615
+ }
3616
+
3617
+ });
3618
+ var table = /*#__PURE__*/_export_sfc(_sfc_main$2, [['__scopeId',"data-v-d1947650"]]);
3619
+
3620
+ // 用来整合组件的,最终实现导出组件
3621
+
3622
+
3623
+ // 通过 withInstall 方法给 button 添加了一个 Vue3 插件所需的 install 方法
3624
+ const EasyTable = withInstall(table);
3625
+
3626
+ const UPDATE_MODEL_EVENT = "update:modelValue";
3627
+
3628
+ var css_248z$1 = "\n/* 保持原有样式 */\n.component-upload-image[data-v-9ac7dd1b] .el-upload--picture-card {\n width: 100px;\n height: 100px;\n line-height: 110px;\n}\n.component-upload-image[data-v-9ac7dd1b] .el-upload-list--picture-card .el-upload-list__item {\n width: 100px;\n height: 100px;\n}\n.component-upload-image[data-v-9ac7dd1b] .hide .el-upload--picture-card {\n display: none;\n}\n";
3629
+ styleInject(css_248z$1);
3630
+
3631
+ const _hoisted_1$1 = { class: "component-upload-image" };
3632
+ const _hoisted_2$1 = {
3633
+ key: 0,
3634
+ class: "el-upload__tip"
3635
+ };
3636
+ const _hoisted_3$1 = { style: {"color":"#f56c6c"} };
3637
+ const _hoisted_4$1 = { style: {"color":"#f56c6c"} };
3638
+ const _hoisted_5$1 = ["src"];
3639
+
3640
+
3641
+ const _sfc_main$1 = /*@__PURE__*/Object.assign({ name: "EasyImageUpload" }, {
3642
+ __name: 'ImageUpload',
3643
+ props: {
3644
+ modelValue: [String, Object, Array],
3645
+ limit: { type: Number, default: 5 },
3646
+ fileSize: { type: Number, default: 5 },
3647
+ fileType: { type: Array, default: () => ["png", "jpg", "jpeg"] },
3648
+ isShowTip: { type: Boolean, default: true },
3649
+ action: { type: String, required: true },
3650
+ headers: { type: Object, default: () => ({}) },
3651
+ baseUrl: { type: String, default: "" },
3652
+
3653
+ checkSuccess: {
3654
+ type: Function,
3655
+ default: res => res.code === 200 || res.success === true
3656
+ },
3657
+ // 自定义提取图片地址的路径,支持 "data.url" 这种深层嵌套
3658
+ responsePath: {
3659
+ type: String,
3660
+ default: "data"
3661
+ },
3662
+ // 错误消息提取字段
3663
+ errorField: {
3664
+ type: String,
3665
+ default: "msg"
3666
+ }
3667
+ },
3668
+ emits: [UPDATE_MODEL_EVENT],
3669
+ setup(__props, { emit: __emit }) {
3670
+
3671
+
3672
+
3673
+ const props = __props;
3674
+
3675
+ const emit = __emit;
3676
+
3677
+ const number = vue.ref(0);
3678
+ const uploadList = vue.ref([]);
3679
+ const dialogImageUrl = vue.ref("");
3680
+ const dialogVisible = vue.ref(false);
3681
+ const fileList = vue.ref([]);
3682
+ const imageUploadRef = vue.ref(null);
3683
+
3684
+ const showTip = vue.computed(() => props.isShowTip && (props.fileType || props.fileSize));
3685
+
3686
+ // 深度解析对象属性 (例如把 res["data.imgUrl"] 转为 res.data.imgUrl)
3687
+ const getDeepValue = (obj, path) => {
3688
+ if (!path) return obj
3689
+ return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
3690
+ };
3691
+
3692
+ vue.watch(
3693
+ () => props.modelValue,
3694
+ val => {
3695
+ if (val) {
3696
+ const list = Array.isArray(val) ? val : val.split(",");
3697
+ fileList.value = list.map(item => {
3698
+ if (isString(item)) {
3699
+ let url = item;
3700
+ if (!/^https?:\/\//.test(url) && props.baseUrl) {
3701
+ url = props.baseUrl + item;
3702
+ }
3703
+ item = { name: getFileName(item), url: url };
3704
+ }
3705
+ return item
3706
+ });
3707
+ } else {
3708
+ fileList.value = [];
3709
+ }
3710
+ },
3711
+ { deep: true, immediate: true }
3712
+ );
3713
+
3714
+ function handleBeforeUpload(file) {
3715
+ let isImg = false;
3716
+ if (props.fileType.length) {
3717
+ const fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1).toLowerCase();
3718
+ isImg = props.fileType.map(t => t.toLowerCase()).includes(fileExtension);
3719
+ } else {
3720
+ isImg = file.type.indexOf("image") > -1;
3721
+ }
3722
+
3723
+ if (!isImg) {
3724
+ elementPlus.ElMessage.error(`格式不正确, 请上传${props.fileType.join("/")}图片!`);
3725
+ return false
3726
+ }
3727
+ if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
3728
+ elementPlus.ElMessage.error(`大小不能超过 ${props.fileSize} MB!`);
3729
+ return false
3730
+ }
3731
+ number.value++;
3732
+ return true
3733
+ }
3734
+
3735
+ function handleExceed() {
3736
+ elementPlus.ElMessage.error(`上传数量不能超过 ${props.limit} 个!`);
3737
+ }
3738
+
3739
+ // 修改后的核心逻辑
3740
+ function handleUploadSuccess(res, file) {
3741
+ // 1. 使用传入的校验函数
3742
+ if (props.checkSuccess(res)) {
3743
+ // 2. 动态提取 URL
3744
+ const url = getDeepValue(res, props.responsePath);
3745
+
3746
+ if (url) {
3747
+ uploadList.value.push({ name: getFileName(url), url: url });
3748
+ uploadedSuccessfully();
3749
+ } else {
3750
+ handleUploadError(`无法从响应中解析图片路径: ${props.responsePath}`);
3751
+ }
3752
+ } else {
3753
+ number.value--;
3754
+ const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
3755
+ elementPlus.ElMessage.error(errorMsg);
3756
+ imageUploadRef.value.handleRemove(file);
3757
+ uploadedSuccessfully();
3758
+ }
3759
+ }
3760
+
3761
+ function handleRemove(file) {
3762
+ const findex = fileList.value.findIndex(f => f.name === file.name);
3763
+ if (findex > -1) {
3764
+ fileList.value.splice(findex, 1);
3765
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
3766
+ }
3767
+ }
3768
+
3769
+ function uploadedSuccessfully() {
3770
+ if (number.value > 0 && uploadList.value.length === number.value) {
3771
+ fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
3772
+ uploadList.value = [];
3773
+ number.value = 0;
3774
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
3775
+ }
3776
+ }
3777
+
3778
+ function handleUploadError(msg) {
3779
+ elementPlus.ElMessage.error(isString(msg) ? msg : "上传图片失败");
3780
+ number.value--;
3781
+ }
3782
+
3783
+ function handlePictureCardPreview(file) {
3784
+ dialogImageUrl.value = file.url;
3785
+ dialogVisible.value = true;
3786
+ }
3787
+
3788
+ function getFileName(name) {
3789
+ if (!isString(name)) return ""
3790
+ return name.slice(name.lastIndexOf("/") + 1)
3791
+ }
3792
+
3793
+ function listToString(list, separator = ",") {
3794
+ return list
3795
+ .filter(item => item.url && item.url.indexOf("blob:") !== 0)
3796
+ .map(item => {
3797
+ let url = item.url;
3798
+ if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
3799
+ url = url.replace(props.baseUrl, "");
3800
+ }
3801
+ return url
3802
+ })
3803
+ .join(separator)
3804
+ }
3805
+
3806
+ return (_ctx, _cache) => {
3807
+ const _component_el_icon = vue.resolveComponent("el-icon");
3808
+ const _component_el_upload = vue.resolveComponent("el-upload");
3809
+ const _component_el_dialog = vue.resolveComponent("el-dialog");
3810
+
3811
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
3812
+ vue.createVNode(_component_el_upload, {
3813
+ ref_key: "imageUploadRef",
3814
+ ref: imageUploadRef,
3815
+ multiple: "",
3816
+ action: __props.action,
3817
+ "list-type": "picture-card",
3818
+ "on-success": handleUploadSuccess,
3819
+ "before-upload": handleBeforeUpload,
3820
+ limit: __props.limit,
3821
+ "on-error": handleUploadError,
3822
+ "on-exceed": handleExceed,
3823
+ "on-remove": handleRemove,
3824
+ "show-file-list": true,
3825
+ headers: __props.headers,
3826
+ "file-list": fileList.value,
3827
+ "on-preview": handlePictureCardPreview,
3828
+ class: vue.normalizeClass({ hide: fileList.value.length >= __props.limit })
3829
+ }, {
3830
+ default: vue.withCtx(() => [
3831
+ vue.createVNode(_component_el_icon, { class: "avatar-uploader-icon" }, {
3832
+ default: vue.withCtx(() => [
3833
+ vue.createVNode(vue.unref(iconsVue.Plus))
3834
+ ]),
3835
+ _: 1 /* STABLE */
3836
+ })
3837
+ ]),
3838
+ _: 1 /* STABLE */
3839
+ }, 8 /* PROPS */, ["action", "limit", "headers", "file-list", "class"]),
3840
+ (showTip.value)
3841
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$1, [
3842
+ _cache[3] || (_cache[3] = vue.createTextVNode(" 请上传 ", -1 /* CACHED */)),
3843
+ (__props.fileSize)
3844
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
3845
+ _cache[1] || (_cache[1] = vue.createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
3846
+ vue.createElementVNode("b", _hoisted_3$1, vue.toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
3847
+ ], 64 /* STABLE_FRAGMENT */))
3848
+ : vue.createCommentVNode("v-if", true),
3849
+ (__props.fileType)
3850
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
3851
+ _cache[2] || (_cache[2] = vue.createTextVNode(" 格式为 ", -1 /* CACHED */)),
3852
+ vue.createElementVNode("b", _hoisted_4$1, vue.toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
3853
+ ], 64 /* STABLE_FRAGMENT */))
3854
+ : vue.createCommentVNode("v-if", true),
3855
+ _cache[4] || (_cache[4] = vue.createTextVNode(" 的文件 ", -1 /* CACHED */))
3856
+ ]))
3857
+ : vue.createCommentVNode("v-if", true),
3858
+ vue.createVNode(_component_el_dialog, {
3859
+ modelValue: dialogVisible.value,
3860
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((dialogVisible).value = $event)),
3861
+ title: "预览",
3862
+ width: "800px",
3863
+ "append-to-body": ""
3864
+ }, {
3865
+ default: vue.withCtx(() => [
3866
+ vue.createElementVNode("img", {
3867
+ src: dialogImageUrl.value,
3868
+ style: {"display":"block","max-width":"100%","margin":"0 auto"}
3869
+ }, null, 8 /* PROPS */, _hoisted_5$1)
3870
+ ]),
3871
+ _: 1 /* STABLE */
3872
+ }, 8 /* PROPS */, ["modelValue"])
3873
+ ]))
3874
+ }
3875
+ }
3876
+
3877
+ });
3878
+ var ImageUpload = /*#__PURE__*/_export_sfc(_sfc_main$1, [['__scopeId',"data-v-9ac7dd1b"]]);
3879
+
3880
+ const EasyImageUpload = withInstall(ImageUpload);
3881
+
3882
+ var css_248z = ".component-upload-file .upload-file-uploader[data-v-cc8b9b13] {\n margin-bottom: 5px;\n}\n.component-upload-file .el-upload__tip[data-v-cc8b9b13] {\n font-size: 12px;\n color: #606266;\n margin-top: 7px;\n}\n.component-upload-file .upload-file-list[data-v-cc8b9b13] {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n.component-upload-file .upload-file-list .el-upload-list__item[data-v-cc8b9b13] {\n border: 1px solid #e4e7ed;\n line-height: 2;\n margin-bottom: 10px;\n position: relative;\n border-radius: 4px;\n padding: 8px 10px;\n transition: all 0.3s;\n}\n.component-upload-file .upload-file-list .el-upload-list__item[data-v-cc8b9b13]:hover {\n background-color: #f5f7fa;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content[data-v-cc8b9b13] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n color: inherit;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content .el-link[data-v-cc8b9b13] {\n flex: 1;\n margin-right: 10px;\n}\n.component-upload-file .upload-file-list .ele-upload-list__item-content-action .el-link[data-v-cc8b9b13] {\n margin-right: 10px;\n}";
3883
+ styleInject(css_248z);
3884
+
3885
+ const _hoisted_1 = { class: "component-upload-file" };
3886
+ const _hoisted_2 = {
3887
+ key: 0,
3888
+ class: "el-upload__tip"
3889
+ };
3890
+ const _hoisted_3 = { style: {"color":"#f56c6c"} };
3891
+ const _hoisted_4 = { style: {"color":"#f56c6c"} };
3892
+ const _hoisted_5 = { class: "ele-upload-list__item-content-action" };
3893
+
3894
+
3895
+ const _sfc_main = /*@__PURE__*/Object.assign({ name: "EasyFileUpload" }, {
3896
+ __name: 'FileUpload',
3897
+ props: {
3898
+ modelValue: [String, Object, Array],
3899
+ // 数量限制
3900
+ limit: {
3901
+ type: Number,
3902
+ default: 5
3903
+ },
3904
+ // 大小限制(MB)
3905
+ fileSize: {
3906
+ type: Number,
3907
+ default: 5
3908
+ },
3909
+ // 文件类型, 例如['doc', 'xls', 'ppt', 'txt', 'pdf']
3910
+ fileType: {
3911
+ type: Array,
3912
+ default: () => ["doc", "xls", "ppt", "txt", "pdf"]
3913
+ },
3914
+ // 是否显示提示
3915
+ isShowTip: {
3916
+ type: Boolean,
3917
+ default: true
3918
+ },
3919
+ // 上传地址
3920
+ action: {
3921
+ type: String,
3922
+ required: true
3923
+ },
3924
+ // 请求头
3925
+ headers: {
3926
+ type: Object,
3927
+ default: () => ({})
3928
+ },
3929
+ // 基础路径
3930
+ baseUrl: {
3931
+ type: String,
3932
+ default: ""
3933
+ },
3934
+ // 自定义成功校验函数
3935
+ checkSuccess: {
3936
+ type: Function,
3937
+ default: res => res.code === 200 || res.success === true
3938
+ },
3939
+ // 自定义提取文件地址的路径,支持 "data.url" 这种深层嵌套
3940
+ responsePath: {
3941
+ type: String,
3942
+ default: "data"
3943
+ },
3944
+ // 错误消息提取字段
3945
+ errorField: {
3946
+ type: String,
3947
+ default: "msg"
3948
+ }
3949
+ },
3950
+ emits: [UPDATE_MODEL_EVENT],
3951
+ setup(__props, { emit: __emit }) {
3952
+
3953
+
3954
+
3955
+ const props = __props;
3956
+
3957
+ const emit = __emit;
3958
+
3959
+ const number = vue.ref(0);
3960
+ const uploadList = vue.ref([]);
3961
+ const fileList = vue.ref([]);
3962
+ const fileUploadRef = vue.ref(null);
3963
+
3964
+ const showTip = vue.computed(() => props.isShowTip && (props.fileType || props.fileSize));
3965
+
3966
+ // 深度解析对象属性 (例如把 res["data.url"] 转为 res.data.url)
3967
+ const getDeepValue = (obj, path) => {
3968
+ if (!path) return obj
3969
+ return path.split(".").reduce((acc, key) => (acc && acc[key] !== undefined ? acc[key] : undefined), obj)
3970
+ };
3971
+
3972
+ vue.watch(
3973
+ () => props.modelValue,
3974
+ val => {
3975
+ if (val) {
3976
+ const list = Array.isArray(val) ? val : val.split(",");
3977
+ fileList.value = list.map((item, index) => {
3978
+ if (isString(item)) {
3979
+ item = { name: getFileName(item), url: item, uid: new Date().getTime() + index };
3980
+ }
3981
+ return item
3982
+ });
3983
+ } else {
3984
+ fileList.value = [];
3985
+ }
3986
+ },
3987
+ { deep: true, immediate: true }
3988
+ );
3989
+
3990
+ // 上传前校检格式和大小
3991
+ function handleBeforeUpload(file) {
3992
+ // 校检文件类型
3993
+ if (props.fileType && props.fileType.length) {
3994
+ const fileName = file.name.split(".");
3995
+ const fileExt = fileName[fileName.length - 1].toLowerCase();
3996
+ const isTypeOk = props.fileType.map(t => t.toLowerCase()).includes(fileExt);
3997
+ if (!isTypeOk) {
3998
+ elementPlus.ElMessage.error(`文件格式不正确, 请上传${props.fileType.join("/")}格式文件!`);
3999
+ return false
4000
+ }
4001
+ }
4002
+ // 校检文件大小
4003
+ if (props.fileSize && file.size / 1024 / 1024 > props.fileSize) {
4004
+ elementPlus.ElMessage.error(`上传文件大小不能超过 ${props.fileSize} MB!`);
4005
+ return false
4006
+ }
4007
+ number.value++;
4008
+ return true
4009
+ }
4010
+
4011
+ // 文件个数超出
4012
+ function handleExceed() {
4013
+ elementPlus.ElMessage.error(`上传文件数量不能超过 ${props.limit} 个!`);
4014
+ }
4015
+
4016
+ // 上传失败
4017
+ function handleUploadError(err) {
4018
+ number.value--;
4019
+ elementPlus.ElMessage.error(isString(err) ? err : "上传文件失败");
4020
+ }
4021
+
4022
+ // 上传成功回调
4023
+ function handleUploadSuccess(res, file) {
4024
+ // 使用传入的校验函数
4025
+ if (props.checkSuccess(res)) {
4026
+ // 动态提取 URL
4027
+ const url = getDeepValue(res, props.responsePath);
4028
+
4029
+ if (url) {
4030
+ uploadList.value.push({ name: getFileName(url), url: url, uid: file.uid });
4031
+ uploadedSuccessfully();
4032
+ } else {
4033
+ handleUploadError(`无法从响应中解析文件路径: ${props.responsePath}`);
4034
+ }
4035
+ } else {
4036
+ number.value--;
4037
+ const errorMsg = getDeepValue(res, props.errorField) || "上传失败";
4038
+ elementPlus.ElMessage.error(errorMsg);
4039
+ fileUploadRef.value?.handleRemove(file);
4040
+ uploadedSuccessfully();
4041
+ }
4042
+ }
4043
+
4044
+ // 删除文件
4045
+ function handleDelete(index) {
4046
+ fileList.value.splice(index, 1);
4047
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
4048
+ }
4049
+
4050
+ // 移除文件
4051
+ function handleRemove(file) {
4052
+ const findex = fileList.value.findIndex(f => f.uid === file.uid);
4053
+ if (findex > -1) {
4054
+ fileList.value.splice(findex, 1);
4055
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
4056
+ }
4057
+ }
4058
+
4059
+ // 上传结束处理
4060
+ function uploadedSuccessfully() {
4061
+ if (number.value > 0 && uploadList.value.length === number.value) {
4062
+ fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
4063
+ uploadList.value = [];
4064
+ number.value = 0;
4065
+ emit(UPDATE_MODEL_EVENT, listToString(fileList.value));
4066
+ }
4067
+ }
4068
+
4069
+ // 获取文件名称
4070
+ function getFileName(name) {
4071
+ if (!isString(name)) return ""
4072
+ return name.slice(name.lastIndexOf("/") + 1)
4073
+ }
4074
+
4075
+ // 获取文件完整 URL
4076
+ function getFileUrl(url) {
4077
+ if (!url) return ""
4078
+ if (/^https?:\/\//.test(url)) return url
4079
+ return props.baseUrl ? props.baseUrl + url : url
4080
+ }
4081
+
4082
+ // 对象转成指定字符串分隔
4083
+ function listToString(list, separator = ",") {
4084
+ return list
4085
+ .filter(item => item.url && item.url.indexOf("blob:") !== 0)
4086
+ .map(item => {
4087
+ let url = item.url;
4088
+ // 如果设置了 baseUrl,保存时去除它
4089
+ if (props.baseUrl && url.indexOf(props.baseUrl) === 0) {
4090
+ url = url.replace(props.baseUrl, "");
4091
+ }
4092
+ return url
4093
+ })
4094
+ .join(separator)
4095
+ }
4096
+
4097
+ return (_ctx, _cache) => {
4098
+ const _component_el_icon = vue.resolveComponent("el-icon");
4099
+ const _component_el_button = vue.resolveComponent("el-button");
4100
+ const _component_el_upload = vue.resolveComponent("el-upload");
4101
+ const _component_el_link = vue.resolveComponent("el-link");
4102
+
4103
+ return (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
4104
+ vue.createVNode(_component_el_upload, {
4105
+ ref_key: "fileUploadRef",
4106
+ ref: fileUploadRef,
4107
+ multiple: "",
4108
+ action: __props.action,
4109
+ "before-upload": handleBeforeUpload,
4110
+ "file-list": fileList.value,
4111
+ limit: __props.limit,
4112
+ "on-error": handleUploadError,
4113
+ "on-exceed": handleExceed,
4114
+ "on-success": handleUploadSuccess,
4115
+ "on-remove": handleRemove,
4116
+ "show-file-list": false,
4117
+ headers: __props.headers,
4118
+ class: "upload-file-uploader"
4119
+ }, {
4120
+ default: vue.withCtx(() => [
4121
+ vue.createCommentVNode(" 上传按钮 "),
4122
+ vue.createVNode(_component_el_button, { type: "primary" }, {
4123
+ default: vue.withCtx(() => [
4124
+ vue.createVNode(_component_el_icon, { class: "el-icon--left" }, {
4125
+ default: vue.withCtx(() => [
4126
+ vue.createVNode(vue.unref(iconsVue.Upload))
4127
+ ]),
4128
+ _: 1 /* STABLE */
4129
+ }),
4130
+ _cache[0] || (_cache[0] = vue.createTextVNode(" 选取文件 ", -1 /* CACHED */))
4131
+ ]),
4132
+ _: 1 /* STABLE */
4133
+ })
4134
+ ]),
4135
+ _: 1 /* STABLE */
4136
+ }, 8 /* PROPS */, ["action", "file-list", "limit", "headers"]),
4137
+ vue.createCommentVNode(" 上传提示 "),
4138
+ (showTip.value)
4139
+ ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
4140
+ _cache[3] || (_cache[3] = vue.createTextVNode(" 请上传 ", -1 /* CACHED */)),
4141
+ (__props.fileSize)
4142
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 0 }, [
4143
+ _cache[1] || (_cache[1] = vue.createTextVNode(" 大小不超过 ", -1 /* CACHED */)),
4144
+ vue.createElementVNode("b", _hoisted_3, vue.toDisplayString(__props.fileSize) + "MB", 1 /* TEXT */)
4145
+ ], 64 /* STABLE_FRAGMENT */))
4146
+ : vue.createCommentVNode("v-if", true),
4147
+ (__props.fileType && __props.fileType.length)
4148
+ ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
4149
+ _cache[2] || (_cache[2] = vue.createTextVNode(" 格式为 ", -1 /* CACHED */)),
4150
+ vue.createElementVNode("b", _hoisted_4, vue.toDisplayString(__props.fileType.join("/")), 1 /* TEXT */)
4151
+ ], 64 /* STABLE_FRAGMENT */))
4152
+ : vue.createCommentVNode("v-if", true),
4153
+ _cache[4] || (_cache[4] = vue.createTextVNode(" 的文件 ", -1 /* CACHED */))
4154
+ ]))
4155
+ : vue.createCommentVNode("v-if", true),
4156
+ vue.createCommentVNode(" 文件列表 "),
4157
+ vue.createVNode(vue.TransitionGroup, {
4158
+ class: "upload-file-list el-upload-list el-upload-list--text",
4159
+ name: "el-fade-in-linear",
4160
+ tag: "ul"
4161
+ }, {
4162
+ default: vue.withCtx(() => [
4163
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(fileList.value, (file, index) => {
4164
+ return (vue.openBlock(), vue.createElementBlock("li", {
4165
+ key: file.uid || index,
4166
+ class: "el-upload-list__item ele-upload-list__item-content"
4167
+ }, [
4168
+ vue.createVNode(_component_el_link, {
4169
+ href: getFileUrl(file.url),
4170
+ underline: "never",
4171
+ target: "_blank"
4172
+ }, {
4173
+ default: vue.withCtx(() => [
4174
+ vue.createVNode(_component_el_icon, { class: "el-icon--left" }, {
4175
+ default: vue.withCtx(() => [
4176
+ vue.createVNode(vue.unref(iconsVue.Document))
4177
+ ]),
4178
+ _: 1 /* STABLE */
4179
+ }),
4180
+ vue.createElementVNode("span", null, vue.toDisplayString(getFileName(file.name)), 1 /* TEXT */)
4181
+ ]),
4182
+ _: 2 /* DYNAMIC */
4183
+ }, 1032 /* PROPS, DYNAMIC_SLOTS */, ["href"]),
4184
+ vue.createElementVNode("div", _hoisted_5, [
4185
+ vue.createVNode(_component_el_link, {
4186
+ underline: "never",
4187
+ onClick: $event => (handleDelete(index)),
4188
+ type: "danger"
4189
+ }, {
4190
+ default: vue.withCtx(() => [...(_cache[5] || (_cache[5] = [
4191
+ vue.createTextVNode("删除", -1 /* CACHED */)
4192
+ ]))]),
4193
+ _: 1 /* STABLE */
4194
+ }, 8 /* PROPS */, ["onClick"])
4195
+ ])
4196
+ ]))
4197
+ }), 128 /* KEYED_FRAGMENT */))
4198
+ ]),
4199
+ _: 1 /* STABLE */
4200
+ })
4201
+ ]))
4202
+ }
4203
+ }
4204
+
4205
+ });
4206
+ var FileUpload = /*#__PURE__*/_export_sfc(_sfc_main, [['__scopeId',"data-v-cc8b9b13"]]);
4207
+
4208
+ const EasyFileUpload = withInstall(FileUpload);
4209
+
4210
+ /**
4211
+ *
4212
+ * @param {*} component 组件
4213
+ * @param {*} componentProps 组件属性
4214
+ * @param {*} modalProps 对话框属性
4215
+ * @param {*} context 上下文
4216
+ * @returns Promise
4217
+ */
4218
+ const useDialog = (component, componentProps = {}, modalProps = {}, context = null) => {
4219
+ // 如果 component 是字符串,转换为渲染函数
4220
+ const contentComponent = isString(component) ? { render: () => vue.h("div", component) } : vue.markRaw(component);
4221
+
4222
+ const {
4223
+ title = "提示",
4224
+ confirmButtonText = "确 认",
4225
+ cancelButtonText = "取 消",
4226
+ showConfirmButton = true,
4227
+ showCancelButton = true,
4228
+ methodKey = "submit",
4229
+ beforeClose,
4230
+ onConfirm,
4231
+ onCancel,
4232
+ footer,
4233
+ draggable = true,
4234
+ ...dialogProps
4235
+ } = modalProps;
4236
+
4237
+ const visible = vue.ref(true);
4238
+ const loading = vue.ref(false);
4239
+ const componentRef = vue.ref(null);
4240
+
4241
+ const appContext = context || getGlobalAppContext();
4242
+
4243
+ const div = document.createElement("div");
4244
+ document.body.appendChild(div);
4245
+
4246
+ return new Promise((resolve, reject) => {
4247
+ let app = null;
4248
+ let isSettled = false; // 标记 Promise 是否已完成,防止重复触发
4249
+
4250
+ // 销毁
4251
+ const destroy = () => {
4252
+ if (app) {
4253
+ app.unmount();
4254
+ app = null;
4255
+ }
4256
+ if (div.parentNode) {
4257
+ div.parentNode.removeChild(div);
4258
+ }
4259
+ };
4260
+
4261
+ // 关闭
4262
+ const close = () => {
4263
+ visible.value = false;
4264
+ };
4265
+
4266
+ // 统一处理 Promise 结束逻辑
4267
+ const handleAction = async (action, data) => {
4268
+ if (isSettled) return
4269
+ isSettled = true;
4270
+ if (action === "resolve") resolve(data);
4271
+ else reject(data);
4272
+ close();
4273
+ };
4274
+
4275
+ // 确认
4276
+ const handleConfirm = async () => {
4277
+ loading.value = true;
4278
+ try {
4279
+ const target = componentRef.value;
4280
+ // 调用组件方法
4281
+ if (target && methodKey && isFunction$1(target[methodKey])) {
4282
+ await target[methodKey]();
4283
+ }
4284
+ // 调用 onConfirm
4285
+ if (isFunction$1(onConfirm)) {
4286
+ await onConfirm(target);
4287
+ }
4288
+ // 返回 resolve
4289
+ await handleAction("resolve", target);
4290
+ } catch (e) {
4291
+ isSettled = false; // 失败时不沉淀状态,允许用户修正后重试
4292
+ reject(e);
4293
+ } finally {
4294
+ loading.value = false;
4295
+ }
4296
+ };
4297
+
4298
+ // 取消
4299
+ const handleCancel = () => {
4300
+ if (isFunction$1(onCancel)) onCancel();
4301
+ handleAction("reject", "closed");
4302
+ };
4303
+
4304
+ // DialogApp
4305
+ const DialogApp = {
4306
+ setup() {
4307
+ return () =>
4308
+ vue.h(
4309
+ elementPlus.ElDialog,
4310
+ {
4311
+ ...dialogProps,
4312
+ modelValue: visible.value,
4313
+ "onUpdate:modelValue": val => {
4314
+ visible.value = val;
4315
+ if (!val && !isSettled) handleAction("reject", "closed");
4316
+ },
4317
+ title,
4318
+ draggable,
4319
+ destroyOnClose: true,
4320
+ onClosed: destroy, // 动画结束后彻底回收
4321
+ // 拦截右上角 X 和遮罩层点击
4322
+ beforeClose: done => {
4323
+ if (beforeClose) {
4324
+ beforeClose(() => {
4325
+ if (!isSettled) handleAction("reject", "closed");
4326
+ done();
4327
+ });
4328
+ } else {
4329
+ if (!isSettled) handleAction("reject", "closed");
4330
+ done();
4331
+ }
4332
+ }
4333
+ },
4334
+ {
4335
+ // 默认内容 渲染组件
4336
+ default: () => vue.h(contentComponent, { ...componentProps, ref: componentRef }),
4337
+
4338
+ // 底部内容
4339
+ footer: () => {
4340
+ // 自定义 footer
4341
+ if (footer) {
4342
+ return isFunction$1(footer)
4343
+ ? footer({ close: handleCancel, confirm: handleConfirm, loading: loading.value })
4344
+ : footer
4345
+ }
4346
+ return vue.h("div", { class: "dialog-footer" }, [
4347
+ // 取消按钮
4348
+ showCancelButton && vue.h(elementPlus.ElButton, { onClick: handleCancel }, () => cancelButtonText),
4349
+ // 确认按钮
4350
+ showConfirmButton &&
4351
+ vue.h(
4352
+ elementPlus.ElButton,
4353
+ {
4354
+ type: "primary",
4355
+ loading: loading.value,
4356
+ onClick: handleConfirm
4357
+ },
4358
+ () => confirmButtonText
4359
+ )
4360
+ ])
4361
+ }
4362
+ }
4363
+ )
4364
+ }
4365
+ };
4366
+
4367
+ app = vue.createApp(DialogApp);
4368
+
4369
+ // 优化:上下文继承
4370
+ if (appContext) {
4371
+ // 核心插件继承 (避免直接操作 _context 私有属性的风险)
4372
+ // 如果你的 getGlobalAppContext 已经拿到了真实的 context,可以这样同步
4373
+ Object.assign(app._context, {
4374
+ ...appContext,
4375
+ reload: app._context.reload // 保留新应用的 reload 方法
4376
+ });
4377
+
4378
+ // 必须手动同步 provides 以确保 inject 可用
4379
+ app._context.provides = { ...(appContext.provides || {}), ...app._context.provides };
4380
+ }
4381
+
4382
+ app.mount(div);
4383
+ })
4384
+ };
4385
+
4386
+ // Dialog 是一个命令式 API(函数式调用),而非 Vue 组件
4387
+ // 用法: const dialog = useDialog(component, props, options)
4388
+ // 或者: import { EasyDialog } from "@easy-elplus"; EasyDialog(...)
4389
+
4390
+
4391
+ // 导出命名函数,保持与其他组件命名一致性
4392
+ const EasyDialog = useDialog;
4393
+
4394
+ // 组件列表
4395
+ const components = [EasyButton, EasyDescriptions, EasyTable, EasyImageUpload, EasyFileUpload];
4396
+
4397
+ // 是否已安装标识(防止重复 install)
4398
+ const INSTALLED_KEY = Symbol("INSTALLED_KEY");
4399
+
4400
+ // 组件库插件
4401
+ const EasyElementPlus = {
4402
+ install(app) {
4403
+ // 防止重复安装
4404
+ if (app[INSTALLED_KEY]) return
4405
+
4406
+ app[INSTALLED_KEY] = true;
4407
+
4408
+ // 保存全局应用上下文,供 EasyDialog 等工具使用
4409
+ // 这样即使在非组件上下文中调用,也能访问到主应用的插件和全局组件
4410
+ setGlobalAppContext(app._context);
4411
+
4412
+ // 逐个安装组件
4413
+ components.forEach(component => {
4414
+ app.use(component);
4415
+ });
4416
+ }
4417
+ };
4418
+
4419
+ exports.EasyButton = EasyButton;
4420
+ exports.EasyDescriptions = EasyDescriptions;
4421
+ exports.EasyDialog = EasyDialog;
4422
+ exports.EasyFileUpload = EasyFileUpload;
4423
+ exports.EasyImageUpload = EasyImageUpload;
4424
+ exports.EasyTable = EasyTable;
4425
+ exports.default = EasyElementPlus;
4426
+ exports.useDialog = useDialog;
4427
+
4428
+ Object.defineProperty(exports, '__esModule', { value: true });
4429
+
4430
+ }));