ll-plus 2.4.7 → 2.4.9

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 (335) hide show
  1. package/es/component.mjs +3 -0
  2. package/es/component.mjs.map +1 -1
  3. package/es/components/advanced-filtering/index.d.ts +336 -318
  4. package/es/components/advanced-filtering/src/advanced-filtering.vue.d.ts +170 -161
  5. package/es/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +163 -153
  6. package/es/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +4 -4
  7. package/es/components/api-component/index.d.ts +32 -32
  8. package/es/components/api-component/src/api-component.vue.d.ts +32 -32
  9. package/es/components/api-component/src/components/api-modal.vue.d.ts +6 -6
  10. package/es/components/api-component/src/components/body-component.vue.d.ts +14 -14
  11. package/es/components/api-component/src/components/click-input.vue.d.ts +10 -10
  12. package/es/components/api-component/src/components/params-table-row.vue.d.ts +12 -12
  13. package/es/components/api-component/src/components/params-table.vue.d.ts +14 -14
  14. package/es/components/api-component/src/config/api-modal.d.ts +1 -1
  15. package/es/components/api-component/src/config/click-input.d.ts +1 -1
  16. package/es/components/avatar/index.d.ts +19 -51
  17. package/es/components/avatar/src/avatar.d.ts +8 -38
  18. package/es/components/avatar/src/avatar.vue.d.ts +19 -51
  19. package/es/components/checkbox/index.d.ts +217 -217
  20. package/es/components/checkbox/src/checkbox-group.vue.d.ts +217 -217
  21. package/es/components/checkbox/src/checkbox.d.ts +56 -56
  22. package/es/components/code-editor/index.d.ts +2 -2
  23. package/es/components/code-editor/src/code-editor.vue.d.ts +2 -2
  24. package/es/components/cropper/index.d.ts +1485 -0
  25. package/es/components/cropper/src/cropper-image.d.ts +51 -0
  26. package/es/components/cropper/src/cropper-image.vue.d.ts +93 -0
  27. package/es/components/cropper/src/cropper-modal.vue.d.ts +1391 -0
  28. package/es/components/drawer/index.d.ts +11 -11
  29. package/es/components/drawer/src/components/second-confirmation/index.d.ts +9 -9
  30. package/es/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +9 -9
  31. package/es/components/drawer/src/drawer.vue.d.ts +11 -11
  32. package/es/components/easy-cron/index.d.ts +82 -82
  33. package/es/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +77 -77
  34. package/es/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +77 -77
  35. package/es/components/easy-cron/src/easy-cron.vue.d.ts +82 -82
  36. package/es/components/empty/index.d.ts +4 -0
  37. package/es/components/empty/src/empty.d.ts +1 -0
  38. package/es/components/empty/src/empty.vue.d.ts +4 -0
  39. package/es/components/form/index.d.ts +166 -150
  40. package/es/components/form/src/components/form-component.vue.d.ts +9 -2
  41. package/es/components/form/src/config/form-component.d.ts +4 -1
  42. package/es/components/form/src/config/form.d.ts +63 -57
  43. package/es/components/form/src/form.vue.d.ts +157 -148
  44. package/es/components/index.d.ts +1 -0
  45. package/es/components/input/index.d.ts +31 -31
  46. package/es/components/input/src/input.vue.d.ts +31 -31
  47. package/es/components/key-value/index.d.ts +774 -720
  48. package/es/components/key-value/src/components/key-value-item.vue.d.ts +258 -240
  49. package/es/components/key-value/src/key-value.vue.d.ts +774 -720
  50. package/es/components/modal/index.d.ts +4 -4
  51. package/es/components/modal/src/modal.vue.d.ts +4 -4
  52. package/es/components/rich-text-editor/index.d.ts +1 -1
  53. package/es/components/rich-text-editor/src/rich-text-editor.vue.d.ts +1 -1
  54. package/es/components/select/index.d.ts +11 -11
  55. package/es/components/select/src/select.vue.d.ts +11 -11
  56. package/es/components/select-group/index.d.ts +6 -6
  57. package/es/components/select-group/src/select-group.d.ts +1 -1
  58. package/es/components/select-group/src/select-group.vue.d.ts +6 -6
  59. package/es/components/table/index.d.ts +6 -23
  60. package/es/components/table/src/components/main-table.vue.d.ts +2 -15
  61. package/es/components/table/src/config/main-table.d.ts +0 -10
  62. package/es/components/table/src/config/table.d.ts +2 -4
  63. package/es/components/table/src/table.vue.d.ts +6 -23
  64. package/es/components/textarea/index.d.ts +5 -5
  65. package/es/components/textarea/src/textarea.vue.d.ts +5 -5
  66. package/es/components/tooltip/index.d.ts +4 -4
  67. package/es/components/tooltip/src/tooltip.d.ts +1 -1
  68. package/es/components/tooltip/src/tooltip.vue.d.ts +4 -4
  69. package/es/components/tree-search/index.d.ts +15 -15
  70. package/es/components/tree-search/src/config/tree-search.d.ts +4 -4
  71. package/es/components/tree-search/src/tree-search.vue.d.ts +15 -15
  72. package/es/components/upload-drag/index.d.ts +4 -4
  73. package/es/components/upload-drag/src/upload-drag.vue.d.ts +4 -4
  74. package/es/index.mjs +3 -1
  75. package/es/index.mjs.map +1 -1
  76. package/es/node_modules/.pnpm/@vueuse_shared@10.9.0_vue@3.4.25/node_modules/@vueuse/shared/index.mjs +1576 -0
  77. package/es/node_modules/.pnpm/@vueuse_shared@10.9.0_vue@3.4.25/node_modules/@vueuse/shared/index.mjs.map +1 -0
  78. package/es/node_modules/.pnpm/vue-demi@0.14.7_vue@3.4.25/node_modules/vue-demi/lib/index.mjs +30 -0
  79. package/es/node_modules/.pnpm/vue-demi@0.14.7_vue@3.4.25/node_modules/vue-demi/lib/index.mjs.map +1 -0
  80. package/es/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs +5 -15
  81. package/es/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue2.mjs.map +1 -1
  82. package/es/packages/components/avatar/src/avatar.mjs +2 -15
  83. package/es/packages/components/avatar/src/avatar.mjs.map +1 -1
  84. package/es/packages/components/avatar/src/avatar.vue2.mjs +40 -103
  85. package/es/packages/components/avatar/src/avatar.vue2.mjs.map +1 -1
  86. package/es/packages/components/checkbox/index.mjs.map +1 -1
  87. package/es/packages/components/cropper/index.mjs +12 -0
  88. package/es/packages/components/cropper/index.mjs.map +1 -0
  89. package/es/packages/components/cropper/src/cropper-image.mjs +77 -0
  90. package/es/packages/components/cropper/src/cropper-image.mjs.map +1 -0
  91. package/es/packages/components/cropper/src/cropper-image.vue.mjs +8 -0
  92. package/es/packages/components/cropper/src/cropper-image.vue.mjs.map +1 -0
  93. package/es/packages/components/cropper/src/cropper-image.vue2.mjs +137 -0
  94. package/es/packages/components/cropper/src/cropper-image.vue2.mjs.map +1 -0
  95. package/es/packages/components/cropper/src/cropper-modal.vue.mjs +8 -0
  96. package/es/packages/components/cropper/src/cropper-modal.vue.mjs.map +1 -0
  97. package/es/packages/components/cropper/src/cropper-modal.vue2.mjs +407 -0
  98. package/es/packages/components/cropper/src/cropper-modal.vue2.mjs.map +1 -0
  99. package/es/packages/components/empty/src/empty.mjs +7 -0
  100. package/es/packages/components/empty/src/empty.mjs.map +1 -1
  101. package/es/packages/components/empty/src/empty.vue2.mjs +4 -4
  102. package/es/packages/components/empty/src/empty.vue2.mjs.map +1 -1
  103. package/es/packages/components/form/index.mjs +1 -1
  104. package/es/packages/components/form/src/components/form-component.vue2.mjs +14 -9
  105. package/es/packages/components/form/src/components/form-component.vue2.mjs.map +1 -1
  106. package/es/packages/components/form/src/config/form-component.mjs +4 -1
  107. package/es/packages/components/form/src/config/form-component.mjs.map +1 -1
  108. package/es/packages/components/form/src/config/form.mjs +1 -1
  109. package/es/packages/components/form/src/config/form.mjs.map +1 -1
  110. package/es/packages/components/form/src/config/index.mjs +1 -1
  111. package/es/packages/components/form/src/form.vue2.mjs +12 -15
  112. package/es/packages/components/form/src/form.vue2.mjs.map +1 -1
  113. package/es/packages/components/index.mjs +3 -1
  114. package/es/packages/components/index.mjs.map +1 -1
  115. package/es/packages/components/select-group/src/select-group.mjs.map +1 -1
  116. package/es/packages/components/select-group/src/select-group.vue2.mjs +1 -0
  117. package/es/packages/components/select-group/src/select-group.vue2.mjs.map +1 -1
  118. package/es/packages/components/table/src/components/main-table.vue2.mjs +1 -6
  119. package/es/packages/components/table/src/components/main-table.vue2.mjs.map +1 -1
  120. package/es/packages/components/table/src/config/main-table.mjs +3 -3
  121. package/es/packages/components/table/src/config/main-table.mjs.map +1 -1
  122. package/es/packages/utils/file.mjs +13 -1
  123. package/es/packages/utils/file.mjs.map +1 -1
  124. package/es/packages/utils/index.mjs +1 -1
  125. package/es/utils/file.d.ts +4 -0
  126. package/global.d.ts +2 -0
  127. package/index.full.js +3907 -619
  128. package/index.full.min.js +41 -28
  129. package/index.full.min.js.map +1 -1
  130. package/index.full.min.mjs +40 -27
  131. package/index.full.min.mjs.map +1 -1
  132. package/index.full.mjs +3901 -621
  133. package/lib/component.js +92 -89
  134. package/lib/component.js.map +1 -1
  135. package/lib/components/advanced-filtering/index.d.ts +336 -318
  136. package/lib/components/advanced-filtering/src/advanced-filtering.vue.d.ts +170 -161
  137. package/lib/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +163 -153
  138. package/lib/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +4 -4
  139. package/lib/components/api-component/index.d.ts +32 -32
  140. package/lib/components/api-component/src/api-component.vue.d.ts +32 -32
  141. package/lib/components/api-component/src/components/api-modal.vue.d.ts +6 -6
  142. package/lib/components/api-component/src/components/body-component.vue.d.ts +14 -14
  143. package/lib/components/api-component/src/components/click-input.vue.d.ts +10 -10
  144. package/lib/components/api-component/src/components/params-table-row.vue.d.ts +12 -12
  145. package/lib/components/api-component/src/components/params-table.vue.d.ts +14 -14
  146. package/lib/components/api-component/src/config/api-modal.d.ts +1 -1
  147. package/lib/components/api-component/src/config/click-input.d.ts +1 -1
  148. package/lib/components/avatar/index.d.ts +19 -51
  149. package/lib/components/avatar/src/avatar.d.ts +8 -38
  150. package/lib/components/avatar/src/avatar.vue.d.ts +19 -51
  151. package/lib/components/checkbox/index.d.ts +217 -217
  152. package/lib/components/checkbox/src/checkbox-group.vue.d.ts +217 -217
  153. package/lib/components/checkbox/src/checkbox.d.ts +56 -56
  154. package/lib/components/code-editor/index.d.ts +2 -2
  155. package/lib/components/code-editor/src/code-editor.vue.d.ts +2 -2
  156. package/lib/components/cropper/index.d.ts +1485 -0
  157. package/lib/components/cropper/src/cropper-image.d.ts +51 -0
  158. package/lib/components/cropper/src/cropper-image.vue.d.ts +93 -0
  159. package/lib/components/cropper/src/cropper-modal.vue.d.ts +1391 -0
  160. package/lib/components/drawer/index.d.ts +11 -11
  161. package/lib/components/drawer/src/components/second-confirmation/index.d.ts +9 -9
  162. package/lib/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +9 -9
  163. package/lib/components/drawer/src/drawer.vue.d.ts +11 -11
  164. package/lib/components/easy-cron/index.d.ts +82 -82
  165. package/lib/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +77 -77
  166. package/lib/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +77 -77
  167. package/lib/components/easy-cron/src/easy-cron.vue.d.ts +82 -82
  168. package/lib/components/empty/index.d.ts +4 -0
  169. package/lib/components/empty/src/empty.d.ts +1 -0
  170. package/lib/components/empty/src/empty.vue.d.ts +4 -0
  171. package/lib/components/form/index.d.ts +166 -150
  172. package/lib/components/form/src/components/form-component.vue.d.ts +9 -2
  173. package/lib/components/form/src/config/form-component.d.ts +4 -1
  174. package/lib/components/form/src/config/form.d.ts +63 -57
  175. package/lib/components/form/src/form.vue.d.ts +157 -148
  176. package/lib/components/index.d.ts +1 -0
  177. package/lib/components/input/index.d.ts +31 -31
  178. package/lib/components/input/src/input.vue.d.ts +31 -31
  179. package/lib/components/key-value/index.d.ts +774 -720
  180. package/lib/components/key-value/src/components/key-value-item.vue.d.ts +258 -240
  181. package/lib/components/key-value/src/key-value.vue.d.ts +774 -720
  182. package/lib/components/modal/index.d.ts +4 -4
  183. package/lib/components/modal/src/modal.vue.d.ts +4 -4
  184. package/lib/components/rich-text-editor/index.d.ts +1 -1
  185. package/lib/components/rich-text-editor/src/rich-text-editor.vue.d.ts +1 -1
  186. package/lib/components/select/index.d.ts +11 -11
  187. package/lib/components/select/src/select.vue.d.ts +11 -11
  188. package/lib/components/select-group/index.d.ts +6 -6
  189. package/lib/components/select-group/src/select-group.d.ts +1 -1
  190. package/lib/components/select-group/src/select-group.vue.d.ts +6 -6
  191. package/lib/components/table/index.d.ts +6 -23
  192. package/lib/components/table/src/components/main-table.vue.d.ts +2 -15
  193. package/lib/components/table/src/config/main-table.d.ts +0 -10
  194. package/lib/components/table/src/config/table.d.ts +2 -4
  195. package/lib/components/table/src/table.vue.d.ts +6 -23
  196. package/lib/components/textarea/index.d.ts +5 -5
  197. package/lib/components/textarea/src/textarea.vue.d.ts +5 -5
  198. package/lib/components/tooltip/index.d.ts +4 -4
  199. package/lib/components/tooltip/src/tooltip.d.ts +1 -1
  200. package/lib/components/tooltip/src/tooltip.vue.d.ts +4 -4
  201. package/lib/components/tree-search/index.d.ts +15 -15
  202. package/lib/components/tree-search/src/config/tree-search.d.ts +4 -4
  203. package/lib/components/tree-search/src/tree-search.vue.d.ts +15 -15
  204. package/lib/components/upload-drag/index.d.ts +4 -4
  205. package/lib/components/upload-drag/src/upload-drag.vue.d.ts +4 -4
  206. package/lib/index.js +101 -91
  207. package/lib/index.js.map +1 -1
  208. package/lib/node_modules/.pnpm/@vueuse_shared@10.9.0_vue@3.4.25/node_modules/@vueuse/shared/index.js +1696 -0
  209. package/lib/node_modules/.pnpm/@vueuse_shared@10.9.0_vue@3.4.25/node_modules/@vueuse/shared/index.js.map +1 -0
  210. package/lib/node_modules/.pnpm/vue-demi@0.14.7_vue@3.4.25/node_modules/vue-demi/lib/index.js +61 -0
  211. package/lib/node_modules/.pnpm/vue-demi@0.14.7_vue@3.4.25/node_modules/vue-demi/lib/index.js.map +1 -0
  212. package/lib/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js +5 -15
  213. package/lib/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue2.js.map +1 -1
  214. package/lib/packages/components/avatar/src/avatar.js +2 -15
  215. package/lib/packages/components/avatar/src/avatar.js.map +1 -1
  216. package/lib/packages/components/avatar/src/avatar.vue2.js +39 -102
  217. package/lib/packages/components/avatar/src/avatar.vue2.js.map +1 -1
  218. package/lib/packages/components/checkbox/index.js.map +1 -1
  219. package/lib/packages/components/cropper/index.js +20 -0
  220. package/lib/packages/components/cropper/index.js.map +1 -0
  221. package/lib/packages/components/cropper/src/cropper-image.js +83 -0
  222. package/lib/packages/components/cropper/src/cropper-image.js.map +1 -0
  223. package/lib/packages/components/cropper/src/cropper-image.vue.js +12 -0
  224. package/lib/packages/components/cropper/src/cropper-image.vue.js.map +1 -0
  225. package/lib/packages/components/cropper/src/cropper-image.vue2.js +141 -0
  226. package/lib/packages/components/cropper/src/cropper-image.vue2.js.map +1 -0
  227. package/lib/packages/components/cropper/src/cropper-modal.vue.js +12 -0
  228. package/lib/packages/components/cropper/src/cropper-modal.vue.js.map +1 -0
  229. package/lib/packages/components/cropper/src/cropper-modal.vue2.js +411 -0
  230. package/lib/packages/components/cropper/src/cropper-modal.vue2.js.map +1 -0
  231. package/lib/packages/components/empty/src/empty.js +7 -0
  232. package/lib/packages/components/empty/src/empty.js.map +1 -1
  233. package/lib/packages/components/empty/src/empty.vue2.js +3 -3
  234. package/lib/packages/components/empty/src/empty.vue2.js.map +1 -1
  235. package/lib/packages/components/form/index.js +1 -0
  236. package/lib/packages/components/form/index.js.map +1 -1
  237. package/lib/packages/components/form/src/components/form-component.vue2.js +12 -7
  238. package/lib/packages/components/form/src/components/form-component.vue2.js.map +1 -1
  239. package/lib/packages/components/form/src/config/form-component.js +4 -0
  240. package/lib/packages/components/form/src/config/form-component.js.map +1 -1
  241. package/lib/packages/components/form/src/config/form.js +1 -1
  242. package/lib/packages/components/form/src/config/form.js.map +1 -1
  243. package/lib/packages/components/form/src/config/index.js +1 -0
  244. package/lib/packages/components/form/src/config/index.js.map +1 -1
  245. package/lib/packages/components/form/src/form.vue2.js +12 -15
  246. package/lib/packages/components/form/src/form.vue2.js.map +1 -1
  247. package/lib/packages/components/index.js +101 -91
  248. package/lib/packages/components/index.js.map +1 -1
  249. package/lib/packages/components/select-group/src/select-group.js.map +1 -1
  250. package/lib/packages/components/select-group/src/select-group.vue2.js +1 -0
  251. package/lib/packages/components/select-group/src/select-group.vue2.js.map +1 -1
  252. package/lib/packages/components/table/src/components/main-table.vue2.js +1 -6
  253. package/lib/packages/components/table/src/components/main-table.vue2.js.map +1 -1
  254. package/lib/packages/components/table/src/config/main-table.js +3 -3
  255. package/lib/packages/components/table/src/config/main-table.js.map +1 -1
  256. package/lib/packages/utils/file.js +13 -0
  257. package/lib/packages/utils/file.js.map +1 -1
  258. package/lib/packages/utils/index.js +1 -0
  259. package/lib/packages/utils/index.js.map +1 -1
  260. package/lib/utils/file.d.ts +4 -0
  261. package/package.json +2 -1
  262. package/theme-chalk/css/cropper.css +13 -0
  263. package/theme-chalk/css/index.css +9 -1
  264. package/types/packages/components/advanced-filtering/index.d.ts +336 -318
  265. package/types/packages/components/advanced-filtering/src/advanced-filtering.vue.d.ts +170 -161
  266. package/types/packages/components/advanced-filtering/src/components/advanced-filtering-params.vue.d.ts +163 -153
  267. package/types/packages/components/advanced-filtering/src/components/advanced-filtering-tags.vue.d.ts +4 -4
  268. package/types/packages/components/api-component/index.d.ts +32 -32
  269. package/types/packages/components/api-component/src/api-component.vue.d.ts +32 -32
  270. package/types/packages/components/api-component/src/components/api-modal.vue.d.ts +6 -6
  271. package/types/packages/components/api-component/src/components/body-component.vue.d.ts +14 -14
  272. package/types/packages/components/api-component/src/components/click-input.vue.d.ts +10 -10
  273. package/types/packages/components/api-component/src/components/params-table-row.vue.d.ts +12 -12
  274. package/types/packages/components/api-component/src/components/params-table.vue.d.ts +14 -14
  275. package/types/packages/components/api-component/src/config/api-modal.d.ts +1 -1
  276. package/types/packages/components/api-component/src/config/click-input.d.ts +1 -1
  277. package/types/packages/components/avatar/index.d.ts +19 -51
  278. package/types/packages/components/avatar/src/avatar.d.ts +8 -38
  279. package/types/packages/components/avatar/src/avatar.vue.d.ts +19 -51
  280. package/types/packages/components/checkbox/index.d.ts +217 -217
  281. package/types/packages/components/checkbox/src/checkbox-group.vue.d.ts +217 -217
  282. package/types/packages/components/checkbox/src/checkbox.d.ts +56 -56
  283. package/types/packages/components/code-editor/index.d.ts +2 -2
  284. package/types/packages/components/code-editor/src/code-editor.vue.d.ts +2 -2
  285. package/types/packages/components/cropper/index.d.ts +1485 -0
  286. package/types/packages/components/cropper/src/cropper-image.d.ts +51 -0
  287. package/types/packages/components/cropper/src/cropper-image.vue.d.ts +93 -0
  288. package/types/packages/components/cropper/src/cropper-modal.vue.d.ts +1391 -0
  289. package/types/packages/components/drawer/index.d.ts +11 -11
  290. package/types/packages/components/drawer/src/components/second-confirmation/index.d.ts +9 -9
  291. package/types/packages/components/drawer/src/components/second-confirmation/src/second-confirmation.vue.d.ts +9 -9
  292. package/types/packages/components/drawer/src/drawer.vue.d.ts +11 -11
  293. package/types/packages/components/easy-cron/index.d.ts +82 -82
  294. package/types/packages/components/easy-cron/src/components/easy-cron-inner.vue.d.ts +77 -77
  295. package/types/packages/components/easy-cron/src/components/easy-cron-modal.vue.d.ts +77 -77
  296. package/types/packages/components/easy-cron/src/easy-cron.vue.d.ts +82 -82
  297. package/types/packages/components/empty/index.d.ts +4 -0
  298. package/types/packages/components/empty/src/empty.d.ts +1 -0
  299. package/types/packages/components/empty/src/empty.vue.d.ts +4 -0
  300. package/types/packages/components/form/index.d.ts +166 -150
  301. package/types/packages/components/form/src/components/form-component.vue.d.ts +9 -2
  302. package/types/packages/components/form/src/config/form-component.d.ts +4 -1
  303. package/types/packages/components/form/src/config/form.d.ts +63 -57
  304. package/types/packages/components/form/src/form.vue.d.ts +157 -148
  305. package/types/packages/components/index.d.ts +1 -0
  306. package/types/packages/components/input/index.d.ts +31 -31
  307. package/types/packages/components/input/src/input.vue.d.ts +31 -31
  308. package/types/packages/components/key-value/index.d.ts +774 -720
  309. package/types/packages/components/key-value/src/components/key-value-item.vue.d.ts +258 -240
  310. package/types/packages/components/key-value/src/key-value.vue.d.ts +774 -720
  311. package/types/packages/components/modal/index.d.ts +4 -4
  312. package/types/packages/components/modal/src/modal.vue.d.ts +4 -4
  313. package/types/packages/components/rich-text-editor/index.d.ts +1 -1
  314. package/types/packages/components/rich-text-editor/src/rich-text-editor.vue.d.ts +1 -1
  315. package/types/packages/components/select/index.d.ts +11 -11
  316. package/types/packages/components/select/src/select.vue.d.ts +11 -11
  317. package/types/packages/components/select-group/index.d.ts +6 -6
  318. package/types/packages/components/select-group/src/select-group.d.ts +1 -1
  319. package/types/packages/components/select-group/src/select-group.vue.d.ts +6 -6
  320. package/types/packages/components/table/index.d.ts +6 -23
  321. package/types/packages/components/table/src/components/main-table.vue.d.ts +2 -15
  322. package/types/packages/components/table/src/config/main-table.d.ts +0 -10
  323. package/types/packages/components/table/src/config/table.d.ts +2 -4
  324. package/types/packages/components/table/src/table.vue.d.ts +6 -23
  325. package/types/packages/components/textarea/index.d.ts +5 -5
  326. package/types/packages/components/textarea/src/textarea.vue.d.ts +5 -5
  327. package/types/packages/components/tooltip/index.d.ts +4 -4
  328. package/types/packages/components/tooltip/src/tooltip.d.ts +1 -1
  329. package/types/packages/components/tooltip/src/tooltip.vue.d.ts +4 -4
  330. package/types/packages/components/tree-search/index.d.ts +15 -15
  331. package/types/packages/components/tree-search/src/config/tree-search.d.ts +4 -4
  332. package/types/packages/components/tree-search/src/tree-search.vue.d.ts +15 -15
  333. package/types/packages/components/upload-drag/index.d.ts +4 -4
  334. package/types/packages/components/upload-drag/src/upload-drag.vue.d.ts +4 -4
  335. package/types/packages/utils/file.d.ts +4 -0
@@ -0,0 +1,1696 @@
1
+ 'use strict';
2
+
3
+ var index = require('../../../../vue-demi@0.14.7_vue@3.4.25/node_modules/vue-demi/lib/index.js');
4
+ var vue = require('vue');
5
+
6
+ function computedEager(fn, options) {
7
+ var _a;
8
+ const result = vue.shallowRef();
9
+ vue.watchEffect(() => {
10
+ result.value = fn();
11
+ }, {
12
+ ...options,
13
+ flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync"
14
+ });
15
+ return vue.readonly(result);
16
+ }
17
+
18
+ function computedWithControl(source, fn) {
19
+ let v = void 0;
20
+ let track;
21
+ let trigger;
22
+ const dirty = vue.ref(true);
23
+ const update = () => {
24
+ dirty.value = true;
25
+ trigger();
26
+ };
27
+ vue.watch(source, update, { flush: "sync" });
28
+ const get = typeof fn === "function" ? fn : fn.get;
29
+ const set = typeof fn === "function" ? void 0 : fn.set;
30
+ const result = vue.customRef((_track, _trigger) => {
31
+ track = _track;
32
+ trigger = _trigger;
33
+ return {
34
+ get() {
35
+ if (dirty.value) {
36
+ v = get();
37
+ dirty.value = false;
38
+ }
39
+ track();
40
+ return v;
41
+ },
42
+ set(v2) {
43
+ set == null ? void 0 : set(v2);
44
+ }
45
+ };
46
+ });
47
+ if (Object.isExtensible(result))
48
+ result.trigger = update;
49
+ return result;
50
+ }
51
+
52
+ function tryOnScopeDispose(fn) {
53
+ if (vue.getCurrentScope()) {
54
+ vue.onScopeDispose(fn);
55
+ return true;
56
+ }
57
+ return false;
58
+ }
59
+
60
+ function createEventHook() {
61
+ const fns = /* @__PURE__ */ new Set();
62
+ const off = (fn) => {
63
+ fns.delete(fn);
64
+ };
65
+ const on = (fn) => {
66
+ fns.add(fn);
67
+ const offFn = () => off(fn);
68
+ tryOnScopeDispose(offFn);
69
+ return {
70
+ off: offFn
71
+ };
72
+ };
73
+ const trigger = (...args) => {
74
+ return Promise.all(Array.from(fns).map((fn) => fn(...args)));
75
+ };
76
+ return {
77
+ on,
78
+ off,
79
+ trigger
80
+ };
81
+ }
82
+
83
+ function createGlobalState(stateFactory) {
84
+ let initialized = false;
85
+ let state;
86
+ const scope = vue.effectScope(true);
87
+ return (...args) => {
88
+ if (!initialized) {
89
+ state = scope.run(() => stateFactory(...args));
90
+ initialized = true;
91
+ }
92
+ return state;
93
+ };
94
+ }
95
+
96
+ const localProvidedStateMap = /* @__PURE__ */ new WeakMap();
97
+
98
+ const provideLocal = (key, value) => {
99
+ var _a;
100
+ const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
101
+ if (instance == null)
102
+ throw new Error("provideLocal must be called in setup");
103
+ if (!localProvidedStateMap.has(instance))
104
+ localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));
105
+ const localProvidedState = localProvidedStateMap.get(instance);
106
+ localProvidedState[key] = value;
107
+ vue.provide(key, value);
108
+ };
109
+
110
+ const injectLocal = (...args) => {
111
+ var _a;
112
+ const key = args[0];
113
+ const instance = (_a = vue.getCurrentInstance()) == null ? void 0 : _a.proxy;
114
+ if (instance == null)
115
+ throw new Error("injectLocal must be called in setup");
116
+ if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))
117
+ return localProvidedStateMap.get(instance)[key];
118
+ return vue.inject(...args);
119
+ };
120
+
121
+ function createInjectionState(composable, options) {
122
+ const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
123
+ const useProvidingState = (...args) => {
124
+ const state = composable(...args);
125
+ provideLocal(key, state);
126
+ return state;
127
+ };
128
+ const useInjectedState = () => injectLocal(key);
129
+ return [useProvidingState, useInjectedState];
130
+ }
131
+
132
+ function createSharedComposable(composable) {
133
+ let subscribers = 0;
134
+ let state;
135
+ let scope;
136
+ const dispose = () => {
137
+ subscribers -= 1;
138
+ if (scope && subscribers <= 0) {
139
+ scope.stop();
140
+ state = void 0;
141
+ scope = void 0;
142
+ }
143
+ };
144
+ return (...args) => {
145
+ subscribers += 1;
146
+ if (!state) {
147
+ scope = vue.effectScope(true);
148
+ state = scope.run(() => composable(...args));
149
+ }
150
+ tryOnScopeDispose(dispose);
151
+ return state;
152
+ };
153
+ }
154
+
155
+ function extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {
156
+ if (!index.isVue3 && !vue.version.startsWith("2.7.")) {
157
+ if (process.env.NODE_ENV !== "production")
158
+ throw new Error("[VueUse] extendRef only works in Vue 2.7 or above.");
159
+ return;
160
+ }
161
+ for (const [key, value] of Object.entries(extend)) {
162
+ if (key === "value")
163
+ continue;
164
+ if (vue.isRef(value) && unwrap) {
165
+ Object.defineProperty(ref, key, {
166
+ get() {
167
+ return value.value;
168
+ },
169
+ set(v) {
170
+ value.value = v;
171
+ },
172
+ enumerable
173
+ });
174
+ } else {
175
+ Object.defineProperty(ref, key, { value, enumerable });
176
+ }
177
+ }
178
+ return ref;
179
+ }
180
+
181
+ function get(obj, key) {
182
+ if (key == null)
183
+ return vue.unref(obj);
184
+ return vue.unref(obj)[key];
185
+ }
186
+
187
+ function isDefined(v) {
188
+ return vue.unref(v) != null;
189
+ }
190
+
191
+ function makeDestructurable(obj, arr) {
192
+ if (typeof Symbol !== "undefined") {
193
+ const clone = { ...obj };
194
+ Object.defineProperty(clone, Symbol.iterator, {
195
+ enumerable: false,
196
+ value() {
197
+ let index = 0;
198
+ return {
199
+ next: () => ({
200
+ value: arr[index++],
201
+ done: index > arr.length
202
+ })
203
+ };
204
+ }
205
+ });
206
+ return clone;
207
+ } else {
208
+ return Object.assign([...arr], obj);
209
+ }
210
+ }
211
+
212
+ function toValue(r) {
213
+ return typeof r === "function" ? r() : vue.unref(r);
214
+ }
215
+ const resolveUnref = toValue;
216
+
217
+ function reactify(fn, options) {
218
+ const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? vue.unref : toValue;
219
+ return function(...args) {
220
+ return vue.computed(() => fn.apply(this, args.map((i) => unrefFn(i))));
221
+ };
222
+ }
223
+
224
+ function reactifyObject(obj, optionsOrKeys = {}) {
225
+ let keys = [];
226
+ let options;
227
+ if (Array.isArray(optionsOrKeys)) {
228
+ keys = optionsOrKeys;
229
+ } else {
230
+ options = optionsOrKeys;
231
+ const { includeOwnProperties = true } = optionsOrKeys;
232
+ keys.push(...Object.keys(obj));
233
+ if (includeOwnProperties)
234
+ keys.push(...Object.getOwnPropertyNames(obj));
235
+ }
236
+ return Object.fromEntries(
237
+ keys.map((key) => {
238
+ const value = obj[key];
239
+ return [
240
+ key,
241
+ typeof value === "function" ? reactify(value.bind(obj), options) : value
242
+ ];
243
+ })
244
+ );
245
+ }
246
+
247
+ function toReactive(objectRef) {
248
+ if (!vue.isRef(objectRef))
249
+ return vue.reactive(objectRef);
250
+ const proxy = new Proxy({}, {
251
+ get(_, p, receiver) {
252
+ return vue.unref(Reflect.get(objectRef.value, p, receiver));
253
+ },
254
+ set(_, p, value) {
255
+ if (vue.isRef(objectRef.value[p]) && !vue.isRef(value))
256
+ objectRef.value[p].value = value;
257
+ else
258
+ objectRef.value[p] = value;
259
+ return true;
260
+ },
261
+ deleteProperty(_, p) {
262
+ return Reflect.deleteProperty(objectRef.value, p);
263
+ },
264
+ has(_, p) {
265
+ return Reflect.has(objectRef.value, p);
266
+ },
267
+ ownKeys() {
268
+ return Object.keys(objectRef.value);
269
+ },
270
+ getOwnPropertyDescriptor() {
271
+ return {
272
+ enumerable: true,
273
+ configurable: true
274
+ };
275
+ }
276
+ });
277
+ return vue.reactive(proxy);
278
+ }
279
+
280
+ function reactiveComputed(fn) {
281
+ return toReactive(vue.computed(fn));
282
+ }
283
+
284
+ function reactiveOmit(obj, ...keys) {
285
+ const flatKeys = keys.flat();
286
+ const predicate = flatKeys[0];
287
+ return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vue.toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(vue.toRefs(obj)).filter((e) => !flatKeys.includes(e[0]))));
288
+ }
289
+
290
+ const isClient = typeof window !== "undefined" && typeof document !== "undefined";
291
+ const isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
292
+ const isDef = (val) => typeof val !== "undefined";
293
+ const notNullish = (val) => val != null;
294
+ const assert = (condition, ...infos) => {
295
+ if (!condition)
296
+ console.warn(...infos);
297
+ };
298
+ const toString = Object.prototype.toString;
299
+ const isObject = (val) => toString.call(val) === "[object Object]";
300
+ const now = () => Date.now();
301
+ const timestamp = () => +Date.now();
302
+ const clamp = (n, min, max) => Math.min(max, Math.max(min, n));
303
+ const noop = () => {
304
+ };
305
+ const rand = (min, max) => {
306
+ min = Math.ceil(min);
307
+ max = Math.floor(max);
308
+ return Math.floor(Math.random() * (max - min + 1)) + min;
309
+ };
310
+ const hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);
311
+ const isIOS = /* @__PURE__ */ getIsIOS();
312
+ function getIsIOS() {
313
+ var _a, _b;
314
+ return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));
315
+ }
316
+
317
+ function createFilterWrapper(filter, fn) {
318
+ function wrapper(...args) {
319
+ return new Promise((resolve, reject) => {
320
+ Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);
321
+ });
322
+ }
323
+ return wrapper;
324
+ }
325
+ const bypassFilter = (invoke) => {
326
+ return invoke();
327
+ };
328
+ function debounceFilter(ms, options = {}) {
329
+ let timer;
330
+ let maxTimer;
331
+ let lastRejector = noop;
332
+ const _clearTimeout = (timer2) => {
333
+ clearTimeout(timer2);
334
+ lastRejector();
335
+ lastRejector = noop;
336
+ };
337
+ const filter = (invoke) => {
338
+ const duration = toValue(ms);
339
+ const maxDuration = toValue(options.maxWait);
340
+ if (timer)
341
+ _clearTimeout(timer);
342
+ if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {
343
+ if (maxTimer) {
344
+ _clearTimeout(maxTimer);
345
+ maxTimer = null;
346
+ }
347
+ return Promise.resolve(invoke());
348
+ }
349
+ return new Promise((resolve, reject) => {
350
+ lastRejector = options.rejectOnCancel ? reject : resolve;
351
+ if (maxDuration && !maxTimer) {
352
+ maxTimer = setTimeout(() => {
353
+ if (timer)
354
+ _clearTimeout(timer);
355
+ maxTimer = null;
356
+ resolve(invoke());
357
+ }, maxDuration);
358
+ }
359
+ timer = setTimeout(() => {
360
+ if (maxTimer)
361
+ _clearTimeout(maxTimer);
362
+ maxTimer = null;
363
+ resolve(invoke());
364
+ }, duration);
365
+ });
366
+ };
367
+ return filter;
368
+ }
369
+ function throttleFilter(...args) {
370
+ let lastExec = 0;
371
+ let timer;
372
+ let isLeading = true;
373
+ let lastRejector = noop;
374
+ let lastValue;
375
+ let ms;
376
+ let trailing;
377
+ let leading;
378
+ let rejectOnCancel;
379
+ if (!vue.isRef(args[0]) && typeof args[0] === "object")
380
+ ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);
381
+ else
382
+ [ms, trailing = true, leading = true, rejectOnCancel = false] = args;
383
+ const clear = () => {
384
+ if (timer) {
385
+ clearTimeout(timer);
386
+ timer = void 0;
387
+ lastRejector();
388
+ lastRejector = noop;
389
+ }
390
+ };
391
+ const filter = (_invoke) => {
392
+ const duration = toValue(ms);
393
+ const elapsed = Date.now() - lastExec;
394
+ const invoke = () => {
395
+ return lastValue = _invoke();
396
+ };
397
+ clear();
398
+ if (duration <= 0) {
399
+ lastExec = Date.now();
400
+ return invoke();
401
+ }
402
+ if (elapsed > duration && (leading || !isLeading)) {
403
+ lastExec = Date.now();
404
+ invoke();
405
+ } else if (trailing) {
406
+ lastValue = new Promise((resolve, reject) => {
407
+ lastRejector = rejectOnCancel ? reject : resolve;
408
+ timer = setTimeout(() => {
409
+ lastExec = Date.now();
410
+ isLeading = true;
411
+ resolve(invoke());
412
+ clear();
413
+ }, Math.max(0, duration - elapsed));
414
+ });
415
+ }
416
+ if (!leading && !timer)
417
+ timer = setTimeout(() => isLeading = true, duration);
418
+ isLeading = false;
419
+ return lastValue;
420
+ };
421
+ return filter;
422
+ }
423
+ function pausableFilter(extendFilter = bypassFilter) {
424
+ const isActive = vue.ref(true);
425
+ function pause() {
426
+ isActive.value = false;
427
+ }
428
+ function resume() {
429
+ isActive.value = true;
430
+ }
431
+ const eventFilter = (...args) => {
432
+ if (isActive.value)
433
+ extendFilter(...args);
434
+ };
435
+ return { isActive: vue.readonly(isActive), pause, resume, eventFilter };
436
+ }
437
+
438
+ const directiveHooks = {
439
+ mounted: index.isVue3 ? "mounted" : "inserted",
440
+ updated: index.isVue3 ? "updated" : "componentUpdated",
441
+ unmounted: index.isVue3 ? "unmounted" : "unbind"
442
+ };
443
+
444
+ function cacheStringFunction(fn) {
445
+ const cache = /* @__PURE__ */ Object.create(null);
446
+ return (str) => {
447
+ const hit = cache[str];
448
+ return hit || (cache[str] = fn(str));
449
+ };
450
+ }
451
+ const hyphenateRE = /\B([A-Z])/g;
452
+ const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
453
+ const camelizeRE = /-(\w)/g;
454
+ const camelize = cacheStringFunction((str) => {
455
+ return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
456
+ });
457
+
458
+ function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") {
459
+ return new Promise((resolve, reject) => {
460
+ if (throwOnTimeout)
461
+ setTimeout(() => reject(reason), ms);
462
+ else
463
+ setTimeout(resolve, ms);
464
+ });
465
+ }
466
+ function identity(arg) {
467
+ return arg;
468
+ }
469
+ function createSingletonPromise(fn) {
470
+ let _promise;
471
+ function wrapper() {
472
+ if (!_promise)
473
+ _promise = fn();
474
+ return _promise;
475
+ }
476
+ wrapper.reset = async () => {
477
+ const _prev = _promise;
478
+ _promise = void 0;
479
+ if (_prev)
480
+ await _prev;
481
+ };
482
+ return wrapper;
483
+ }
484
+ function invoke(fn) {
485
+ return fn();
486
+ }
487
+ function containsProp(obj, ...props) {
488
+ return props.some((k) => k in obj);
489
+ }
490
+ function increaseWithUnit(target, delta) {
491
+ var _a;
492
+ if (typeof target === "number")
493
+ return target + delta;
494
+ const value = ((_a = target.match(/^-?[0-9]+\.?[0-9]*/)) == null ? void 0 : _a[0]) || "";
495
+ const unit = target.slice(value.length);
496
+ const result = Number.parseFloat(value) + delta;
497
+ if (Number.isNaN(result))
498
+ return target;
499
+ return result + unit;
500
+ }
501
+ function objectPick(obj, keys, omitUndefined = false) {
502
+ return keys.reduce((n, k) => {
503
+ if (k in obj) {
504
+ if (!omitUndefined || obj[k] !== void 0)
505
+ n[k] = obj[k];
506
+ }
507
+ return n;
508
+ }, {});
509
+ }
510
+ function objectOmit(obj, keys, omitUndefined = false) {
511
+ return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {
512
+ return (!omitUndefined || value !== void 0) && !keys.includes(key);
513
+ }));
514
+ }
515
+ function objectEntries(obj) {
516
+ return Object.entries(obj);
517
+ }
518
+ function getLifeCycleTarget(target) {
519
+ return target || vue.getCurrentInstance();
520
+ }
521
+
522
+ function toRef(...args) {
523
+ if (args.length !== 1)
524
+ return vue.toRef(...args);
525
+ const r = args[0];
526
+ return typeof r === "function" ? vue.readonly(vue.customRef(() => ({ get: r, set: noop }))) : vue.ref(r);
527
+ }
528
+ const resolveRef = toRef;
529
+
530
+ function reactivePick(obj, ...keys) {
531
+ const flatKeys = keys.flat();
532
+ const predicate = flatKeys[0];
533
+ return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(vue.toRefs(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));
534
+ }
535
+
536
+ function refAutoReset(defaultValue, afterMs = 1e4) {
537
+ return vue.customRef((track, trigger) => {
538
+ let value = toValue(defaultValue);
539
+ let timer;
540
+ const resetAfter = () => setTimeout(() => {
541
+ value = toValue(defaultValue);
542
+ trigger();
543
+ }, toValue(afterMs));
544
+ tryOnScopeDispose(() => {
545
+ clearTimeout(timer);
546
+ });
547
+ return {
548
+ get() {
549
+ track();
550
+ return value;
551
+ },
552
+ set(newValue) {
553
+ value = newValue;
554
+ trigger();
555
+ clearTimeout(timer);
556
+ timer = resetAfter();
557
+ }
558
+ };
559
+ });
560
+ }
561
+
562
+ function useDebounceFn(fn, ms = 200, options = {}) {
563
+ return createFilterWrapper(
564
+ debounceFilter(ms, options),
565
+ fn
566
+ );
567
+ }
568
+
569
+ function refDebounced(value, ms = 200, options = {}) {
570
+ const debounced = vue.ref(value.value);
571
+ const updater = useDebounceFn(() => {
572
+ debounced.value = value.value;
573
+ }, ms, options);
574
+ vue.watch(value, () => updater());
575
+ return debounced;
576
+ }
577
+
578
+ function refDefault(source, defaultValue) {
579
+ return vue.computed({
580
+ get() {
581
+ var _a;
582
+ return (_a = source.value) != null ? _a : defaultValue;
583
+ },
584
+ set(value) {
585
+ source.value = value;
586
+ }
587
+ });
588
+ }
589
+
590
+ function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {
591
+ return createFilterWrapper(
592
+ throttleFilter(ms, trailing, leading, rejectOnCancel),
593
+ fn
594
+ );
595
+ }
596
+
597
+ function refThrottled(value, delay = 200, trailing = true, leading = true) {
598
+ if (delay <= 0)
599
+ return value;
600
+ const throttled = vue.ref(value.value);
601
+ const updater = useThrottleFn(() => {
602
+ throttled.value = value.value;
603
+ }, delay, trailing, leading);
604
+ vue.watch(value, () => updater());
605
+ return throttled;
606
+ }
607
+
608
+ function refWithControl(initial, options = {}) {
609
+ let source = initial;
610
+ let track;
611
+ let trigger;
612
+ const ref = vue.customRef((_track, _trigger) => {
613
+ track = _track;
614
+ trigger = _trigger;
615
+ return {
616
+ get() {
617
+ return get();
618
+ },
619
+ set(v) {
620
+ set(v);
621
+ }
622
+ };
623
+ });
624
+ function get(tracking = true) {
625
+ if (tracking)
626
+ track();
627
+ return source;
628
+ }
629
+ function set(value, triggering = true) {
630
+ var _a, _b;
631
+ if (value === source)
632
+ return;
633
+ const old = source;
634
+ if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)
635
+ return;
636
+ source = value;
637
+ (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);
638
+ if (triggering)
639
+ trigger();
640
+ }
641
+ const untrackedGet = () => get(false);
642
+ const silentSet = (v) => set(v, false);
643
+ const peek = () => get(false);
644
+ const lay = (v) => set(v, false);
645
+ return extendRef(
646
+ ref,
647
+ {
648
+ get,
649
+ set,
650
+ untrackedGet,
651
+ silentSet,
652
+ peek,
653
+ lay
654
+ },
655
+ { enumerable: true }
656
+ );
657
+ }
658
+ const controlledRef = refWithControl;
659
+
660
+ function set(...args) {
661
+ if (args.length === 2) {
662
+ const [ref, value] = args;
663
+ ref.value = value;
664
+ }
665
+ if (args.length === 3) {
666
+ if (index.isVue2) {
667
+ index.set(...args);
668
+ } else {
669
+ const [target, key, value] = args;
670
+ target[key] = value;
671
+ }
672
+ }
673
+ }
674
+
675
+ function watchWithFilter(source, cb, options = {}) {
676
+ const {
677
+ eventFilter = bypassFilter,
678
+ ...watchOptions
679
+ } = options;
680
+ return vue.watch(
681
+ source,
682
+ createFilterWrapper(
683
+ eventFilter,
684
+ cb
685
+ ),
686
+ watchOptions
687
+ );
688
+ }
689
+
690
+ function watchPausable(source, cb, options = {}) {
691
+ const {
692
+ eventFilter: filter,
693
+ ...watchOptions
694
+ } = options;
695
+ const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
696
+ const stop = watchWithFilter(
697
+ source,
698
+ cb,
699
+ {
700
+ ...watchOptions,
701
+ eventFilter
702
+ }
703
+ );
704
+ return { stop, pause, resume, isActive };
705
+ }
706
+
707
+ function syncRef(left, right, ...[options]) {
708
+ const {
709
+ flush = "sync",
710
+ deep = false,
711
+ immediate = true,
712
+ direction = "both",
713
+ transform = {}
714
+ } = options || {};
715
+ const watchers = [];
716
+ const transformLTR = "ltr" in transform && transform.ltr || ((v) => v);
717
+ const transformRTL = "rtl" in transform && transform.rtl || ((v) => v);
718
+ if (direction === "both" || direction === "ltr") {
719
+ watchers.push(watchPausable(
720
+ left,
721
+ (newValue) => {
722
+ watchers.forEach((w) => w.pause());
723
+ right.value = transformLTR(newValue);
724
+ watchers.forEach((w) => w.resume());
725
+ },
726
+ { flush, deep, immediate }
727
+ ));
728
+ }
729
+ if (direction === "both" || direction === "rtl") {
730
+ watchers.push(watchPausable(
731
+ right,
732
+ (newValue) => {
733
+ watchers.forEach((w) => w.pause());
734
+ left.value = transformRTL(newValue);
735
+ watchers.forEach((w) => w.resume());
736
+ },
737
+ { flush, deep, immediate }
738
+ ));
739
+ }
740
+ const stop = () => {
741
+ watchers.forEach((w) => w.stop());
742
+ };
743
+ return stop;
744
+ }
745
+
746
+ function syncRefs(source, targets, options = {}) {
747
+ const {
748
+ flush = "sync",
749
+ deep = false,
750
+ immediate = true
751
+ } = options;
752
+ if (!Array.isArray(targets))
753
+ targets = [targets];
754
+ return vue.watch(
755
+ source,
756
+ (newValue) => targets.forEach((target) => target.value = newValue),
757
+ { flush, deep, immediate }
758
+ );
759
+ }
760
+
761
+ function toRefs(objectRef, options = {}) {
762
+ if (!vue.isRef(objectRef))
763
+ return vue.toRefs(objectRef);
764
+ const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};
765
+ for (const key in objectRef.value) {
766
+ result[key] = vue.customRef(() => ({
767
+ get() {
768
+ return objectRef.value[key];
769
+ },
770
+ set(v) {
771
+ var _a;
772
+ const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;
773
+ if (replaceRef) {
774
+ if (Array.isArray(objectRef.value)) {
775
+ const copy = [...objectRef.value];
776
+ copy[key] = v;
777
+ objectRef.value = copy;
778
+ } else {
779
+ const newObject = { ...objectRef.value, [key]: v };
780
+ Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));
781
+ objectRef.value = newObject;
782
+ }
783
+ } else {
784
+ objectRef.value[key] = v;
785
+ }
786
+ }
787
+ }));
788
+ }
789
+ return result;
790
+ }
791
+
792
+ function tryOnBeforeMount(fn, sync = true, target) {
793
+ const instance = getLifeCycleTarget(target);
794
+ if (instance)
795
+ vue.onBeforeMount(fn, target);
796
+ else if (sync)
797
+ fn();
798
+ else
799
+ vue.nextTick(fn);
800
+ }
801
+
802
+ function tryOnBeforeUnmount(fn, target) {
803
+ const instance = getLifeCycleTarget(target);
804
+ if (instance)
805
+ vue.onBeforeUnmount(fn, target);
806
+ }
807
+
808
+ function tryOnMounted(fn, sync = true, target) {
809
+ const instance = getLifeCycleTarget();
810
+ if (instance)
811
+ vue.onMounted(fn, target);
812
+ else if (sync)
813
+ fn();
814
+ else
815
+ vue.nextTick(fn);
816
+ }
817
+
818
+ function tryOnUnmounted(fn, target) {
819
+ const instance = getLifeCycleTarget(target);
820
+ if (instance)
821
+ vue.onUnmounted(fn, target);
822
+ }
823
+
824
+ function createUntil(r, isNot = false) {
825
+ function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) {
826
+ let stop = null;
827
+ const watcher = new Promise((resolve) => {
828
+ stop = vue.watch(
829
+ r,
830
+ (v) => {
831
+ if (condition(v) !== isNot) {
832
+ stop == null ? void 0 : stop();
833
+ resolve(v);
834
+ }
835
+ },
836
+ {
837
+ flush,
838
+ deep,
839
+ immediate: true
840
+ }
841
+ );
842
+ });
843
+ const promises = [watcher];
844
+ if (timeout != null) {
845
+ promises.push(
846
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())
847
+ );
848
+ }
849
+ return Promise.race(promises);
850
+ }
851
+ function toBe(value, options) {
852
+ if (!vue.isRef(value))
853
+ return toMatch((v) => v === value, options);
854
+ const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {};
855
+ let stop = null;
856
+ const watcher = new Promise((resolve) => {
857
+ stop = vue.watch(
858
+ [r, value],
859
+ ([v1, v2]) => {
860
+ if (isNot !== (v1 === v2)) {
861
+ stop == null ? void 0 : stop();
862
+ resolve(v1);
863
+ }
864
+ },
865
+ {
866
+ flush,
867
+ deep,
868
+ immediate: true
869
+ }
870
+ );
871
+ });
872
+ const promises = [watcher];
873
+ if (timeout != null) {
874
+ promises.push(
875
+ promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {
876
+ stop == null ? void 0 : stop();
877
+ return toValue(r);
878
+ })
879
+ );
880
+ }
881
+ return Promise.race(promises);
882
+ }
883
+ function toBeTruthy(options) {
884
+ return toMatch((v) => Boolean(v), options);
885
+ }
886
+ function toBeNull(options) {
887
+ return toBe(null, options);
888
+ }
889
+ function toBeUndefined(options) {
890
+ return toBe(void 0, options);
891
+ }
892
+ function toBeNaN(options) {
893
+ return toMatch(Number.isNaN, options);
894
+ }
895
+ function toContains(value, options) {
896
+ return toMatch((v) => {
897
+ const array = Array.from(v);
898
+ return array.includes(value) || array.includes(toValue(value));
899
+ }, options);
900
+ }
901
+ function changed(options) {
902
+ return changedTimes(1, options);
903
+ }
904
+ function changedTimes(n = 1, options) {
905
+ let count = -1;
906
+ return toMatch(() => {
907
+ count += 1;
908
+ return count >= n;
909
+ }, options);
910
+ }
911
+ if (Array.isArray(toValue(r))) {
912
+ const instance = {
913
+ toMatch,
914
+ toContains,
915
+ changed,
916
+ changedTimes,
917
+ get not() {
918
+ return createUntil(r, !isNot);
919
+ }
920
+ };
921
+ return instance;
922
+ } else {
923
+ const instance = {
924
+ toMatch,
925
+ toBe,
926
+ toBeTruthy,
927
+ toBeNull,
928
+ toBeNaN,
929
+ toBeUndefined,
930
+ changed,
931
+ changedTimes,
932
+ get not() {
933
+ return createUntil(r, !isNot);
934
+ }
935
+ };
936
+ return instance;
937
+ }
938
+ }
939
+ function until(r) {
940
+ return createUntil(r);
941
+ }
942
+
943
+ function defaultComparator(value, othVal) {
944
+ return value === othVal;
945
+ }
946
+ function useArrayDifference(...args) {
947
+ var _a;
948
+ const list = args[0];
949
+ const values = args[1];
950
+ let compareFn = (_a = args[2]) != null ? _a : defaultComparator;
951
+ if (typeof compareFn === "string") {
952
+ const key = compareFn;
953
+ compareFn = (value, othVal) => value[key] === othVal[key];
954
+ }
955
+ return vue.computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));
956
+ }
957
+
958
+ function useArrayEvery(list, fn) {
959
+ return vue.computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));
960
+ }
961
+
962
+ function useArrayFilter(list, fn) {
963
+ return vue.computed(() => toValue(list).map((i) => toValue(i)).filter(fn));
964
+ }
965
+
966
+ function useArrayFind(list, fn) {
967
+ return vue.computed(() => toValue(
968
+ toValue(list).find((element, index, array) => fn(toValue(element), index, array))
969
+ ));
970
+ }
971
+
972
+ function useArrayFindIndex(list, fn) {
973
+ return vue.computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));
974
+ }
975
+
976
+ function findLast(arr, cb) {
977
+ let index = arr.length;
978
+ while (index-- > 0) {
979
+ if (cb(arr[index], index, arr))
980
+ return arr[index];
981
+ }
982
+ return void 0;
983
+ }
984
+ function useArrayFindLast(list, fn) {
985
+ return vue.computed(() => toValue(
986
+ !Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))
987
+ ));
988
+ }
989
+
990
+ function isArrayIncludesOptions(obj) {
991
+ return isObject(obj) && containsProp(obj, "formIndex", "comparator");
992
+ }
993
+ function useArrayIncludes(...args) {
994
+ var _a;
995
+ const list = args[0];
996
+ const value = args[1];
997
+ let comparator = args[2];
998
+ let formIndex = 0;
999
+ if (isArrayIncludesOptions(comparator)) {
1000
+ formIndex = (_a = comparator.fromIndex) != null ? _a : 0;
1001
+ comparator = comparator.comparator;
1002
+ }
1003
+ if (typeof comparator === "string") {
1004
+ const key = comparator;
1005
+ comparator = (element, value2) => element[key] === toValue(value2);
1006
+ }
1007
+ comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);
1008
+ return vue.computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(
1009
+ toValue(element),
1010
+ toValue(value),
1011
+ index,
1012
+ toValue(array)
1013
+ )));
1014
+ }
1015
+
1016
+ function useArrayJoin(list, separator) {
1017
+ return vue.computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));
1018
+ }
1019
+
1020
+ function useArrayMap(list, fn) {
1021
+ return vue.computed(() => toValue(list).map((i) => toValue(i)).map(fn));
1022
+ }
1023
+
1024
+ function useArrayReduce(list, reducer, ...args) {
1025
+ const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);
1026
+ return vue.computed(() => {
1027
+ const resolved = toValue(list);
1028
+ return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);
1029
+ });
1030
+ }
1031
+
1032
+ function useArraySome(list, fn) {
1033
+ return vue.computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));
1034
+ }
1035
+
1036
+ function uniq(array) {
1037
+ return Array.from(new Set(array));
1038
+ }
1039
+ function uniqueElementsBy(array, fn) {
1040
+ return array.reduce((acc, v) => {
1041
+ if (!acc.some((x) => fn(v, x, array)))
1042
+ acc.push(v);
1043
+ return acc;
1044
+ }, []);
1045
+ }
1046
+ function useArrayUnique(list, compareFn) {
1047
+ return vue.computed(() => {
1048
+ const resolvedList = toValue(list).map((element) => toValue(element));
1049
+ return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);
1050
+ });
1051
+ }
1052
+
1053
+ function useCounter(initialValue = 0, options = {}) {
1054
+ let _initialValue = vue.unref(initialValue);
1055
+ const count = vue.ref(initialValue);
1056
+ const {
1057
+ max = Number.POSITIVE_INFINITY,
1058
+ min = Number.NEGATIVE_INFINITY
1059
+ } = options;
1060
+ const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);
1061
+ const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);
1062
+ const get = () => count.value;
1063
+ const set = (val) => count.value = Math.max(min, Math.min(max, val));
1064
+ const reset = (val = _initialValue) => {
1065
+ _initialValue = val;
1066
+ return set(val);
1067
+ };
1068
+ return { count, inc, dec, get, set, reset };
1069
+ }
1070
+
1071
+ const REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
1072
+ const REGEX_FORMAT = /[YMDHhms]o|\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
1073
+ function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {
1074
+ let m = hours < 12 ? "AM" : "PM";
1075
+ if (hasPeriod)
1076
+ m = m.split("").reduce((acc, curr) => acc += `${curr}.`, "");
1077
+ return isLowercase ? m.toLowerCase() : m;
1078
+ }
1079
+ function formatOrdinal(num) {
1080
+ const suffixes = ["th", "st", "nd", "rd"];
1081
+ const v = num % 100;
1082
+ return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);
1083
+ }
1084
+ function formatDate(date, formatStr, options = {}) {
1085
+ var _a;
1086
+ const years = date.getFullYear();
1087
+ const month = date.getMonth();
1088
+ const days = date.getDate();
1089
+ const hours = date.getHours();
1090
+ const minutes = date.getMinutes();
1091
+ const seconds = date.getSeconds();
1092
+ const milliseconds = date.getMilliseconds();
1093
+ const day = date.getDay();
1094
+ const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;
1095
+ const matches = {
1096
+ Yo: () => formatOrdinal(years),
1097
+ YY: () => String(years).slice(-2),
1098
+ YYYY: () => years,
1099
+ M: () => month + 1,
1100
+ Mo: () => formatOrdinal(month + 1),
1101
+ MM: () => `${month + 1}`.padStart(2, "0"),
1102
+ MMM: () => date.toLocaleDateString(options.locales, { month: "short" }),
1103
+ MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }),
1104
+ D: () => String(days),
1105
+ Do: () => formatOrdinal(days),
1106
+ DD: () => `${days}`.padStart(2, "0"),
1107
+ H: () => String(hours),
1108
+ Ho: () => formatOrdinal(hours),
1109
+ HH: () => `${hours}`.padStart(2, "0"),
1110
+ h: () => `${hours % 12 || 12}`.padStart(1, "0"),
1111
+ ho: () => formatOrdinal(hours % 12 || 12),
1112
+ hh: () => `${hours % 12 || 12}`.padStart(2, "0"),
1113
+ m: () => String(minutes),
1114
+ mo: () => formatOrdinal(minutes),
1115
+ mm: () => `${minutes}`.padStart(2, "0"),
1116
+ s: () => String(seconds),
1117
+ so: () => formatOrdinal(seconds),
1118
+ ss: () => `${seconds}`.padStart(2, "0"),
1119
+ SSS: () => `${milliseconds}`.padStart(3, "0"),
1120
+ d: () => day,
1121
+ dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }),
1122
+ ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }),
1123
+ dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }),
1124
+ A: () => meridiem(hours, minutes),
1125
+ AA: () => meridiem(hours, minutes, false, true),
1126
+ a: () => meridiem(hours, minutes, true),
1127
+ aa: () => meridiem(hours, minutes, true, true)
1128
+ };
1129
+ return formatStr.replace(REGEX_FORMAT, (match, $1) => {
1130
+ var _a2, _b;
1131
+ return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;
1132
+ });
1133
+ }
1134
+ function normalizeDate(date) {
1135
+ if (date === null)
1136
+ return new Date(Number.NaN);
1137
+ if (date === void 0)
1138
+ return /* @__PURE__ */ new Date();
1139
+ if (date instanceof Date)
1140
+ return new Date(date);
1141
+ if (typeof date === "string" && !/Z$/i.test(date)) {
1142
+ const d = date.match(REGEX_PARSE);
1143
+ if (d) {
1144
+ const m = d[2] - 1 || 0;
1145
+ const ms = (d[7] || "0").substring(0, 3);
1146
+ return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
1147
+ }
1148
+ }
1149
+ return new Date(date);
1150
+ }
1151
+ function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) {
1152
+ return vue.computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));
1153
+ }
1154
+
1155
+ function useIntervalFn(cb, interval = 1e3, options = {}) {
1156
+ const {
1157
+ immediate = true,
1158
+ immediateCallback = false
1159
+ } = options;
1160
+ let timer = null;
1161
+ const isActive = vue.ref(false);
1162
+ function clean() {
1163
+ if (timer) {
1164
+ clearInterval(timer);
1165
+ timer = null;
1166
+ }
1167
+ }
1168
+ function pause() {
1169
+ isActive.value = false;
1170
+ clean();
1171
+ }
1172
+ function resume() {
1173
+ const intervalValue = toValue(interval);
1174
+ if (intervalValue <= 0)
1175
+ return;
1176
+ isActive.value = true;
1177
+ if (immediateCallback)
1178
+ cb();
1179
+ clean();
1180
+ timer = setInterval(cb, intervalValue);
1181
+ }
1182
+ if (immediate && isClient)
1183
+ resume();
1184
+ if (vue.isRef(interval) || typeof interval === "function") {
1185
+ const stopWatch = vue.watch(interval, () => {
1186
+ if (isActive.value && isClient)
1187
+ resume();
1188
+ });
1189
+ tryOnScopeDispose(stopWatch);
1190
+ }
1191
+ tryOnScopeDispose(pause);
1192
+ return {
1193
+ isActive,
1194
+ pause,
1195
+ resume
1196
+ };
1197
+ }
1198
+
1199
+ function useInterval(interval = 1e3, options = {}) {
1200
+ const {
1201
+ controls: exposeControls = false,
1202
+ immediate = true,
1203
+ callback
1204
+ } = options;
1205
+ const counter = vue.ref(0);
1206
+ const update = () => counter.value += 1;
1207
+ const reset = () => {
1208
+ counter.value = 0;
1209
+ };
1210
+ const controls = useIntervalFn(
1211
+ callback ? () => {
1212
+ update();
1213
+ callback(counter.value);
1214
+ } : update,
1215
+ interval,
1216
+ { immediate }
1217
+ );
1218
+ if (exposeControls) {
1219
+ return {
1220
+ counter,
1221
+ reset,
1222
+ ...controls
1223
+ };
1224
+ } else {
1225
+ return counter;
1226
+ }
1227
+ }
1228
+
1229
+ function useLastChanged(source, options = {}) {
1230
+ var _a;
1231
+ const ms = vue.ref((_a = options.initialValue) != null ? _a : null);
1232
+ vue.watch(
1233
+ source,
1234
+ () => ms.value = timestamp(),
1235
+ options
1236
+ );
1237
+ return ms;
1238
+ }
1239
+
1240
+ function useTimeoutFn(cb, interval, options = {}) {
1241
+ const {
1242
+ immediate = true
1243
+ } = options;
1244
+ const isPending = vue.ref(false);
1245
+ let timer = null;
1246
+ function clear() {
1247
+ if (timer) {
1248
+ clearTimeout(timer);
1249
+ timer = null;
1250
+ }
1251
+ }
1252
+ function stop() {
1253
+ isPending.value = false;
1254
+ clear();
1255
+ }
1256
+ function start(...args) {
1257
+ clear();
1258
+ isPending.value = true;
1259
+ timer = setTimeout(() => {
1260
+ isPending.value = false;
1261
+ timer = null;
1262
+ cb(...args);
1263
+ }, toValue(interval));
1264
+ }
1265
+ if (immediate) {
1266
+ isPending.value = true;
1267
+ if (isClient)
1268
+ start();
1269
+ }
1270
+ tryOnScopeDispose(stop);
1271
+ return {
1272
+ isPending: vue.readonly(isPending),
1273
+ start,
1274
+ stop
1275
+ };
1276
+ }
1277
+
1278
+ function useTimeout(interval = 1e3, options = {}) {
1279
+ const {
1280
+ controls: exposeControls = false,
1281
+ callback
1282
+ } = options;
1283
+ const controls = useTimeoutFn(
1284
+ callback != null ? callback : noop,
1285
+ interval,
1286
+ options
1287
+ );
1288
+ const ready = vue.computed(() => !controls.isPending.value);
1289
+ if (exposeControls) {
1290
+ return {
1291
+ ready,
1292
+ ...controls
1293
+ };
1294
+ } else {
1295
+ return ready;
1296
+ }
1297
+ }
1298
+
1299
+ function useToNumber(value, options = {}) {
1300
+ const {
1301
+ method = "parseFloat",
1302
+ radix,
1303
+ nanToZero
1304
+ } = options;
1305
+ return vue.computed(() => {
1306
+ let resolved = toValue(value);
1307
+ if (typeof resolved === "string")
1308
+ resolved = Number[method](resolved, radix);
1309
+ if (nanToZero && Number.isNaN(resolved))
1310
+ resolved = 0;
1311
+ return resolved;
1312
+ });
1313
+ }
1314
+
1315
+ function useToString(value) {
1316
+ return vue.computed(() => `${toValue(value)}`);
1317
+ }
1318
+
1319
+ function useToggle(initialValue = false, options = {}) {
1320
+ const {
1321
+ truthyValue = true,
1322
+ falsyValue = false
1323
+ } = options;
1324
+ const valueIsRef = vue.isRef(initialValue);
1325
+ const _value = vue.ref(initialValue);
1326
+ function toggle(value) {
1327
+ if (arguments.length) {
1328
+ _value.value = value;
1329
+ return _value.value;
1330
+ } else {
1331
+ const truthy = toValue(truthyValue);
1332
+ _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;
1333
+ return _value.value;
1334
+ }
1335
+ }
1336
+ if (valueIsRef)
1337
+ return toggle;
1338
+ else
1339
+ return [_value, toggle];
1340
+ }
1341
+
1342
+ function watchArray(source, cb, options) {
1343
+ let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];
1344
+ return vue.watch(source, (newList, _, onCleanup) => {
1345
+ const oldListRemains = Array.from({ length: oldList.length });
1346
+ const added = [];
1347
+ for (const obj of newList) {
1348
+ let found = false;
1349
+ for (let i = 0; i < oldList.length; i++) {
1350
+ if (!oldListRemains[i] && obj === oldList[i]) {
1351
+ oldListRemains[i] = true;
1352
+ found = true;
1353
+ break;
1354
+ }
1355
+ }
1356
+ if (!found)
1357
+ added.push(obj);
1358
+ }
1359
+ const removed = oldList.filter((_2, i) => !oldListRemains[i]);
1360
+ cb(newList, oldList, added, removed, onCleanup);
1361
+ oldList = [...newList];
1362
+ }, options);
1363
+ }
1364
+
1365
+ function watchAtMost(source, cb, options) {
1366
+ const {
1367
+ count,
1368
+ ...watchOptions
1369
+ } = options;
1370
+ const current = vue.ref(0);
1371
+ const stop = watchWithFilter(
1372
+ source,
1373
+ (...args) => {
1374
+ current.value += 1;
1375
+ if (current.value >= toValue(count))
1376
+ vue.nextTick(() => stop());
1377
+ cb(...args);
1378
+ },
1379
+ watchOptions
1380
+ );
1381
+ return { count: current, stop };
1382
+ }
1383
+
1384
+ function watchDebounced(source, cb, options = {}) {
1385
+ const {
1386
+ debounce = 0,
1387
+ maxWait = void 0,
1388
+ ...watchOptions
1389
+ } = options;
1390
+ return watchWithFilter(
1391
+ source,
1392
+ cb,
1393
+ {
1394
+ ...watchOptions,
1395
+ eventFilter: debounceFilter(debounce, { maxWait })
1396
+ }
1397
+ );
1398
+ }
1399
+
1400
+ function watchDeep(source, cb, options) {
1401
+ return vue.watch(
1402
+ source,
1403
+ cb,
1404
+ {
1405
+ ...options,
1406
+ deep: true
1407
+ }
1408
+ );
1409
+ }
1410
+
1411
+ function watchIgnorable(source, cb, options = {}) {
1412
+ const {
1413
+ eventFilter = bypassFilter,
1414
+ ...watchOptions
1415
+ } = options;
1416
+ const filteredCb = createFilterWrapper(
1417
+ eventFilter,
1418
+ cb
1419
+ );
1420
+ let ignoreUpdates;
1421
+ let ignorePrevAsyncUpdates;
1422
+ let stop;
1423
+ if (watchOptions.flush === "sync") {
1424
+ const ignore = vue.ref(false);
1425
+ ignorePrevAsyncUpdates = () => {
1426
+ };
1427
+ ignoreUpdates = (updater) => {
1428
+ ignore.value = true;
1429
+ updater();
1430
+ ignore.value = false;
1431
+ };
1432
+ stop = vue.watch(
1433
+ source,
1434
+ (...args) => {
1435
+ if (!ignore.value)
1436
+ filteredCb(...args);
1437
+ },
1438
+ watchOptions
1439
+ );
1440
+ } else {
1441
+ const disposables = [];
1442
+ const ignoreCounter = vue.ref(0);
1443
+ const syncCounter = vue.ref(0);
1444
+ ignorePrevAsyncUpdates = () => {
1445
+ ignoreCounter.value = syncCounter.value;
1446
+ };
1447
+ disposables.push(
1448
+ vue.watch(
1449
+ source,
1450
+ () => {
1451
+ syncCounter.value++;
1452
+ },
1453
+ { ...watchOptions, flush: "sync" }
1454
+ )
1455
+ );
1456
+ ignoreUpdates = (updater) => {
1457
+ const syncCounterPrev = syncCounter.value;
1458
+ updater();
1459
+ ignoreCounter.value += syncCounter.value - syncCounterPrev;
1460
+ };
1461
+ disposables.push(
1462
+ vue.watch(
1463
+ source,
1464
+ (...args) => {
1465
+ const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;
1466
+ ignoreCounter.value = 0;
1467
+ syncCounter.value = 0;
1468
+ if (ignore)
1469
+ return;
1470
+ filteredCb(...args);
1471
+ },
1472
+ watchOptions
1473
+ )
1474
+ );
1475
+ stop = () => {
1476
+ disposables.forEach((fn) => fn());
1477
+ };
1478
+ }
1479
+ return { stop, ignoreUpdates, ignorePrevAsyncUpdates };
1480
+ }
1481
+
1482
+ function watchImmediate(source, cb, options) {
1483
+ return vue.watch(
1484
+ source,
1485
+ cb,
1486
+ {
1487
+ ...options,
1488
+ immediate: true
1489
+ }
1490
+ );
1491
+ }
1492
+
1493
+ function watchOnce(source, cb, options) {
1494
+ const stop = vue.watch(source, (...args) => {
1495
+ vue.nextTick(() => stop());
1496
+ return cb(...args);
1497
+ }, options);
1498
+ return stop;
1499
+ }
1500
+
1501
+ function watchThrottled(source, cb, options = {}) {
1502
+ const {
1503
+ throttle = 0,
1504
+ trailing = true,
1505
+ leading = true,
1506
+ ...watchOptions
1507
+ } = options;
1508
+ return watchWithFilter(
1509
+ source,
1510
+ cb,
1511
+ {
1512
+ ...watchOptions,
1513
+ eventFilter: throttleFilter(throttle, trailing, leading)
1514
+ }
1515
+ );
1516
+ }
1517
+
1518
+ function watchTriggerable(source, cb, options = {}) {
1519
+ let cleanupFn;
1520
+ function onEffect() {
1521
+ if (!cleanupFn)
1522
+ return;
1523
+ const fn = cleanupFn;
1524
+ cleanupFn = void 0;
1525
+ fn();
1526
+ }
1527
+ function onCleanup(callback) {
1528
+ cleanupFn = callback;
1529
+ }
1530
+ const _cb = (value, oldValue) => {
1531
+ onEffect();
1532
+ return cb(value, oldValue, onCleanup);
1533
+ };
1534
+ const res = watchIgnorable(source, _cb, options);
1535
+ const { ignoreUpdates } = res;
1536
+ const trigger = () => {
1537
+ let res2;
1538
+ ignoreUpdates(() => {
1539
+ res2 = _cb(getWatchSources(source), getOldValue(source));
1540
+ });
1541
+ return res2;
1542
+ };
1543
+ return {
1544
+ ...res,
1545
+ trigger
1546
+ };
1547
+ }
1548
+ function getWatchSources(sources) {
1549
+ if (vue.isReactive(sources))
1550
+ return sources;
1551
+ if (Array.isArray(sources))
1552
+ return sources.map((item) => toValue(item));
1553
+ return toValue(sources);
1554
+ }
1555
+ function getOldValue(source) {
1556
+ return Array.isArray(source) ? source.map(() => void 0) : void 0;
1557
+ }
1558
+
1559
+ function whenever(source, cb, options) {
1560
+ const stop = vue.watch(
1561
+ source,
1562
+ (v, ov, onInvalidate) => {
1563
+ if (v) {
1564
+ if (options == null ? void 0 : options.once)
1565
+ vue.nextTick(() => stop());
1566
+ cb(v, ov, onInvalidate);
1567
+ }
1568
+ },
1569
+ {
1570
+ ...options,
1571
+ once: false
1572
+ }
1573
+ );
1574
+ return stop;
1575
+ }
1576
+
1577
+ exports.assert = assert;
1578
+ exports.autoResetRef = refAutoReset;
1579
+ exports.bypassFilter = bypassFilter;
1580
+ exports.camelize = camelize;
1581
+ exports.clamp = clamp;
1582
+ exports.computedEager = computedEager;
1583
+ exports.computedWithControl = computedWithControl;
1584
+ exports.containsProp = containsProp;
1585
+ exports.controlledComputed = computedWithControl;
1586
+ exports.controlledRef = controlledRef;
1587
+ exports.createEventHook = createEventHook;
1588
+ exports.createFilterWrapper = createFilterWrapper;
1589
+ exports.createGlobalState = createGlobalState;
1590
+ exports.createInjectionState = createInjectionState;
1591
+ exports.createReactiveFn = reactify;
1592
+ exports.createSharedComposable = createSharedComposable;
1593
+ exports.createSingletonPromise = createSingletonPromise;
1594
+ exports.debounceFilter = debounceFilter;
1595
+ exports.debouncedRef = refDebounced;
1596
+ exports.debouncedWatch = watchDebounced;
1597
+ exports.directiveHooks = directiveHooks;
1598
+ exports.eagerComputed = computedEager;
1599
+ exports.extendRef = extendRef;
1600
+ exports.formatDate = formatDate;
1601
+ exports.get = get;
1602
+ exports.getLifeCycleTarget = getLifeCycleTarget;
1603
+ exports.hasOwn = hasOwn;
1604
+ exports.hyphenate = hyphenate;
1605
+ exports.identity = identity;
1606
+ exports.ignorableWatch = watchIgnorable;
1607
+ exports.increaseWithUnit = increaseWithUnit;
1608
+ exports.injectLocal = injectLocal;
1609
+ exports.invoke = invoke;
1610
+ exports.isClient = isClient;
1611
+ exports.isDef = isDef;
1612
+ exports.isDefined = isDefined;
1613
+ exports.isIOS = isIOS;
1614
+ exports.isObject = isObject;
1615
+ exports.isWorker = isWorker;
1616
+ exports.makeDestructurable = makeDestructurable;
1617
+ exports.noop = noop;
1618
+ exports.normalizeDate = normalizeDate;
1619
+ exports.notNullish = notNullish;
1620
+ exports.now = now;
1621
+ exports.objectEntries = objectEntries;
1622
+ exports.objectOmit = objectOmit;
1623
+ exports.objectPick = objectPick;
1624
+ exports.pausableFilter = pausableFilter;
1625
+ exports.pausableWatch = watchPausable;
1626
+ exports.promiseTimeout = promiseTimeout;
1627
+ exports.provideLocal = provideLocal;
1628
+ exports.rand = rand;
1629
+ exports.reactify = reactify;
1630
+ exports.reactifyObject = reactifyObject;
1631
+ exports.reactiveComputed = reactiveComputed;
1632
+ exports.reactiveOmit = reactiveOmit;
1633
+ exports.reactivePick = reactivePick;
1634
+ exports.refAutoReset = refAutoReset;
1635
+ exports.refDebounced = refDebounced;
1636
+ exports.refDefault = refDefault;
1637
+ exports.refThrottled = refThrottled;
1638
+ exports.refWithControl = refWithControl;
1639
+ exports.resolveRef = resolveRef;
1640
+ exports.resolveUnref = resolveUnref;
1641
+ exports.set = set;
1642
+ exports.syncRef = syncRef;
1643
+ exports.syncRefs = syncRefs;
1644
+ exports.throttleFilter = throttleFilter;
1645
+ exports.throttledRef = refThrottled;
1646
+ exports.throttledWatch = watchThrottled;
1647
+ exports.timestamp = timestamp;
1648
+ exports.toReactive = toReactive;
1649
+ exports.toRef = toRef;
1650
+ exports.toRefs = toRefs;
1651
+ exports.toValue = toValue;
1652
+ exports.tryOnBeforeMount = tryOnBeforeMount;
1653
+ exports.tryOnBeforeUnmount = tryOnBeforeUnmount;
1654
+ exports.tryOnMounted = tryOnMounted;
1655
+ exports.tryOnScopeDispose = tryOnScopeDispose;
1656
+ exports.tryOnUnmounted = tryOnUnmounted;
1657
+ exports.until = until;
1658
+ exports.useArrayDifference = useArrayDifference;
1659
+ exports.useArrayEvery = useArrayEvery;
1660
+ exports.useArrayFilter = useArrayFilter;
1661
+ exports.useArrayFind = useArrayFind;
1662
+ exports.useArrayFindIndex = useArrayFindIndex;
1663
+ exports.useArrayFindLast = useArrayFindLast;
1664
+ exports.useArrayIncludes = useArrayIncludes;
1665
+ exports.useArrayJoin = useArrayJoin;
1666
+ exports.useArrayMap = useArrayMap;
1667
+ exports.useArrayReduce = useArrayReduce;
1668
+ exports.useArraySome = useArraySome;
1669
+ exports.useArrayUnique = useArrayUnique;
1670
+ exports.useCounter = useCounter;
1671
+ exports.useDateFormat = useDateFormat;
1672
+ exports.useDebounce = refDebounced;
1673
+ exports.useDebounceFn = useDebounceFn;
1674
+ exports.useInterval = useInterval;
1675
+ exports.useIntervalFn = useIntervalFn;
1676
+ exports.useLastChanged = useLastChanged;
1677
+ exports.useThrottle = refThrottled;
1678
+ exports.useThrottleFn = useThrottleFn;
1679
+ exports.useTimeout = useTimeout;
1680
+ exports.useTimeoutFn = useTimeoutFn;
1681
+ exports.useToNumber = useToNumber;
1682
+ exports.useToString = useToString;
1683
+ exports.useToggle = useToggle;
1684
+ exports.watchArray = watchArray;
1685
+ exports.watchAtMost = watchAtMost;
1686
+ exports.watchDebounced = watchDebounced;
1687
+ exports.watchDeep = watchDeep;
1688
+ exports.watchIgnorable = watchIgnorable;
1689
+ exports.watchImmediate = watchImmediate;
1690
+ exports.watchOnce = watchOnce;
1691
+ exports.watchPausable = watchPausable;
1692
+ exports.watchThrottled = watchThrottled;
1693
+ exports.watchTriggerable = watchTriggerable;
1694
+ exports.watchWithFilter = watchWithFilter;
1695
+ exports.whenever = whenever;
1696
+ //# sourceMappingURL=index.js.map