halo-pc 1.0.7 → 1.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (533) hide show
  1. package/dist/Article-DDHiBRRG.js +199 -0
  2. package/dist/{Autocomplete-BomWDDWr.js → Autocomplete-Bh4HQ3-C.js} +1 -1
  3. package/dist/Autocomplete-BljowPIG.js +56 -0
  4. package/dist/Autocomplete-d0MR8Xx2.js +55 -0
  5. package/dist/{CSharp-Chv8lll5.js → CSharp--lmNVuOo.js} +1 -1
  6. package/dist/{Calender-CcXM5xUM.js → Calender-CvqWvZsn.js} +2 -2
  7. package/dist/Callback-BrvO3W91.js +28 -0
  8. package/dist/Cascader-DIvprKCI.js +88 -0
  9. package/dist/Cascader-OM7zmX3M.js +49 -0
  10. package/dist/{Checkbox-DGJtHqmU.js → Checkbox-BJdqPlkr.js} +1 -1
  11. package/dist/Code-BACLmk2L.js +62 -0
  12. package/dist/Code-DNa70Dop.js +44 -0
  13. package/dist/Code-Du9XlTYj.js +4 -0
  14. package/dist/{Code-UnNJwSVi.js → Code-xVaG8AiI.js} +1 -1
  15. package/dist/Code.vue_vue_type_style_index_0_lang-FEJ6tUQl.js +67 -0
  16. package/dist/Column-DpxOF0y2.js +76 -0
  17. package/dist/Comment-CnA1hoQR.js +106 -0
  18. package/dist/Compare-cMfhy2tY.js +34 -0
  19. package/dist/Compare-i-c4cpHb.js +64 -0
  20. package/dist/Copy-Ccio6WhB.js +51 -0
  21. package/dist/Custom-d7B0U9LW.js +55 -0
  22. package/dist/{DataExport-p-XTQ4Bo.js → DataExport-D9qNEXNc.js} +1 -1
  23. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-DYlu1ZpK.js → DataExport.vue_vue_type_script_setup_true_lang-LIX8EWdw.js} +42 -35
  24. package/dist/{DataImport-CiRRckYq.js → DataImport-IlCpp9MO.js} +1 -1
  25. package/dist/DataImport.vue_vue_type_script_setup_true_lang-ByaDXp9z.js +178 -0
  26. package/dist/{Date-DhXOp3UZ.js → Date-BzTn9eRY.js} +1 -1
  27. package/dist/{DateRange-Dk12_9EG.js → DateRange-TLadnU8z.js} +24 -16
  28. package/dist/{DateTime-Cfp17-qg.js → DateTime-ZXRmiyVk.js} +1 -1
  29. package/dist/{DateTimeRange-DyL2IsZP.js → DateTimeRange-WV8dpf1A.js} +18 -10
  30. package/dist/Daterange-Xx9aigH9.js +65 -0
  31. package/dist/{Decimal-BaFrJUjb.js → Decimal-d9D3AKgJ.js} +1 -1
  32. package/dist/Delete-C1lDzul8.js +63 -0
  33. package/dist/Detail-DwkywBpF.js +77 -0
  34. package/dist/Dictionary-41lPMLYE.js +61 -0
  35. package/dist/{File-Dv9NexiC.js → File-CdfGLpx0.js} +57 -48
  36. package/dist/Image-j_l1rTVS.js +9 -0
  37. package/dist/Index-BJcvZpAZ.js +180 -0
  38. package/dist/Index-CRW3fKQm.js +4 -0
  39. package/dist/{Index-DCPI1-65.js → Index-Cgn9c90j.js} +1 -1
  40. package/dist/Index-DDYN0PN6.js +77 -0
  41. package/dist/{Index-C_HCipwv.js → Index-Dls8FIg_.js} +1 -1
  42. package/dist/Index-DyDnI3Eh.js +4 -0
  43. package/dist/{Index-BVv4l4ck.js → Index-DzobZNQl.js} +1 -1
  44. package/dist/Index-p6jrekIF.js +4 -0
  45. package/dist/{Index.vue_vue_type_script_setup_true_lang-D0QapFN1.js → Index.vue_vue_type_script_setup_true_lang-DEJe_SEU.js} +24 -15
  46. package/dist/{Index.vue_vue_type_script_setup_true_lang-DMLN7fuC.js → Index.vue_vue_type_script_setup_true_lang-yNHjfgMT.js} +24 -15
  47. package/dist/{Index.vue_vue_type_style_index_0_lang-QhW1-B80.js → Index.vue_vue_type_style_index_0_lang-DzZQYPd_.js} +43 -36
  48. package/dist/{Install-B7lphLHl.js → Install-DjEEO5jv.js} +31 -22
  49. package/dist/Int-DCCHJ3Py.js +48 -0
  50. package/dist/List-B0jkK3__.js +80 -0
  51. package/dist/Maintaince-BvSeToFI.js +22 -0
  52. package/dist/{Markdown-B9rSQoSk.js → Markdown-DWztB-nd.js} +1 -1
  53. package/dist/{Month-QXiAbCWq.js → Month-C-O9wmfa.js} +1 -1
  54. package/dist/{Normal-BkJ7zUcf.js → Normal-D0jVbV6S.js} +60 -53
  55. package/dist/Paging-DotrJ4K7.js +100 -0
  56. package/dist/QueryApi-BfzWPAaT.js +22 -0
  57. package/dist/{Racebar-B64iqDpa.js → Racebar-BHxShEk3.js} +47 -40
  58. package/dist/{Radio-DT6DYkMm.js → Radio-2lj7_vnv.js} +1 -1
  59. package/dist/Register-Bc6si8eQ.js +203 -0
  60. package/dist/RichText-GzSKa3TU.js +49 -0
  61. package/dist/{SearchFooter-CJhcsVwS.js → SearchFooter-CljN2rfH.js} +1 -1
  62. package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-4pj5BIPU.js → SearchFooter.vue_vue_type_style_index_0_lang-BY7bRgIA.js} +1 -1
  63. package/dist/{SearchForm-B0Mhg7mY.js → SearchForm-BVZA2l7U.js} +1 -1
  64. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-Cpk8lxSg.js → SearchForm.vue_vue_type_style_index_0_lang-BSs4V4mF.js} +42 -36
  65. package/dist/{Select-DOv6YMyd.js → Select-1KvlCVU4.js} +1 -1
  66. package/dist/{Select-BqGycr7D.js → Select-CocWBLRX.js} +39 -31
  67. package/dist/{Select-C6waLN_p.js → Select-D60XT9o-.js} +26 -18
  68. package/dist/{Single-BsVcYImb.js → Single-sr-BkPGL.js} +90 -83
  69. package/dist/{Statistic-cTv7XwZm.js → Statistic-BYcw_PF8.js} +39 -32
  70. package/dist/{Stock-BmagKP2Z.js → Stock-BKboB1Yy.js} +1 -1
  71. package/dist/{Stock-4ne0C_6C.js → Stock-BfJZJOlp.js} +1 -1
  72. package/dist/{Stock.vue_vue_type_style_index_0_lang-7J7U50Do.js → Stock.vue_vue_type_style_index_0_lang-BvNVV3nm.js} +35 -28
  73. package/dist/{Switch-D2U2T-VY.js → Switch-aJlpDaFn.js} +1 -1
  74. package/dist/{Table-ByVJNMIs.js → Table-C7utV1zP.js} +71 -63
  75. package/dist/{Table-DpGjoJJ8.js → Table-Cb3ebUjd.js} +83 -77
  76. package/dist/{Text-D7hTUYqZ.js → Text-BwvQUh3H.js} +1 -1
  77. package/dist/Text.vue_vue_type_style_index_0_lang-DKTbR_SE.js +60 -0
  78. package/dist/TextLink-C6iV4AMN.js +67 -0
  79. package/dist/{Textarea-DqfHJ-pT.js → Textarea-BMTs6P3r.js} +1 -1
  80. package/dist/Timeline-CbOh5x0N.js +61 -0
  81. package/dist/Tree-BYDeBPz8.js +124 -0
  82. package/dist/{Tree-IdYR7KBj.js → Tree-CJw57RjB.js} +100 -94
  83. package/dist/TreeNode-f5QIDN_8.js +44 -0
  84. package/dist/Update-4MVWAqee.js +72 -0
  85. package/dist/Upload-CZH4eCZj.js +74 -0
  86. package/dist/Upload-DLvv8FP4.js +152 -0
  87. package/dist/UploadApi-BP2K-0bT.js +22 -0
  88. package/dist/{Year-DxuRORBQ.js → Year-MmbPwHcY.js} +1 -1
  89. package/dist/main-Bf4o1iyx.js +8145 -0
  90. package/dist/main.js +106 -103
  91. package/dist/style.css +1 -1
  92. package/dist/vendor-@monaco-editor-DKC4UNw_.js +258 -0
  93. package/dist/vendor-intro.js-DhhZ-dhc.js +1793 -0
  94. package/dist/{vendor-underscore-D6LmOFb9.js → vendor-underscore-B0BCaBxV.js} +60 -57
  95. package/esm/coms/business/HaCrud.vue.d.ts +6 -4
  96. package/esm/coms/business/HaDriver.vue.d.ts +9 -7
  97. package/esm/coms/business/HaForm.vue.d.ts +6 -4
  98. package/esm/coms/commons/HaDebug.vue.d.ts +4 -2
  99. package/esm/coms/commons/HaEditable.vue.d.ts +6 -4
  100. package/esm/coms/commons/HaLoading.vue.d.ts +6 -4
  101. package/esm/coms/commons/HaResizer.vue.d.ts +7 -5
  102. package/esm/coms/commons/HaTable.vue.d.ts +11 -6
  103. package/esm/coms/commons/HaTableColumn.vue.d.ts +8 -6
  104. package/esm/coms/commons/index.d.ts +4 -0
  105. package/esm/coms/controls/Switch.vue.d.ts +2 -2
  106. package/esm/coms/globals/HaHeaderTab.vue.d.ts +6 -4
  107. package/esm/coms/globals/HaHeaderTabs.vue.d.ts +6 -4
  108. package/esm/coms/globals/HaMenu.vue.d.ts +8 -8
  109. package/esm/coms/globals/HaMenuItem.vue.d.ts +8 -8
  110. package/esm/coms/globals/HaMissComponent.vue.d.ts +4 -2
  111. package/esm/coms/globals/HaSideTab.vue.d.ts +6 -4
  112. package/esm/coms/globals/HaSideTabs.vue.d.ts +6 -4
  113. package/esm/coms/globals/HaWindow.vue.d.ts +12 -10
  114. package/esm/coms/pagings/SearchFooter.vue.d.ts +16 -16
  115. package/esm/coms/pagings/SearchForm.vue.d.ts +8 -8
  116. package/esm/coms/panels/HaGroup.vue.d.ts +4 -2
  117. package/esm/coms/panels/HaOperation.vue.d.ts +6 -4
  118. package/esm/coms/panels/HaPanel.vue.d.ts +9 -7
  119. package/esm/coms/panels/HaShrink.vue.d.ts +6 -4
  120. package/esm/coms/partials/ArticleFooter.vue.d.ts +1 -1
  121. package/esm/coms/partials/Detail.vue.d.ts +1 -1
  122. package/esm/coms/partials/PagingHeader.vue.d.ts +1 -1
  123. package/esm/coms/partials/PagingRow.vue.d.ts +1 -1
  124. package/esm/coms/partials/TreeNode.vue.d.ts +1 -1
  125. package/esm/coms/partials/Update.vue.d.ts +1 -1
  126. package/esm/coms/partials/UpdateChild.vue.d.ts +1 -1
  127. package/esm/coms/partials/index.d.ts +1 -135
  128. package/esm/coms/partials/types/DetailProps.d.ts +22 -0
  129. package/esm/coms/partials/types/PagingHeaderProps.d.ts +30 -0
  130. package/esm/{components/controls/index.d.ts → coms/partials/types/PagingRowProps.d.ts} +5 -9
  131. package/esm/coms/partials/types/TreeNodeProps.d.ts +22 -0
  132. package/esm/coms/partials/types/UpdateChildProps.d.ts +22 -0
  133. package/esm/coms/partials/types/UpdateProps.d.ts +22 -0
  134. package/esm/coms/partials/types/index.d.ts +7 -0
  135. package/esm/coms/searches/Autocomplete.vue.d.ts +1 -1
  136. package/esm/coms/searches/Daterange.vue.d.ts +1 -1
  137. package/esm/coms/searches/Index.vue.d.ts +1 -1
  138. package/esm/coms/searches/Int.vue.d.ts +1 -1
  139. package/esm/coms/searches/Month.vue.d.ts +1 -1
  140. package/esm/coms/searches/Select.vue.d.ts +1 -1
  141. package/esm/coms/searches/Text.vue.d.ts +1 -1
  142. package/esm/coms/searches/index.d.ts +3 -7
  143. package/esm/{components/searches/index.d.ts → coms/searches/types/SearchProps.d.ts} +4 -1
  144. package/esm/coms/searches/types/index.d.ts +2 -0
  145. package/esm/coms/texts/Copy.vue.d.ts +7 -5
  146. package/esm/coms/texts/TextLink.vue.d.ts +8 -6
  147. package/esm/svcs/AppSvc.d.ts +16 -3
  148. package/esm/svcs/index.d.ts +6 -2
  149. package/package.json +17 -12
  150. package/dist/Article-Cr0paCOd.js +0 -192
  151. package/dist/Autocomplete-BissS2A3.js +0 -48
  152. package/dist/Autocomplete-_O3g7SYt.js +0 -49
  153. package/dist/Callback-D-HauKTc.js +0 -20
  154. package/dist/Cascader-C_YYvlMe.js +0 -80
  155. package/dist/Cascader-Cjin8BPz.js +0 -41
  156. package/dist/Code-B-kH_AEs.js +0 -4
  157. package/dist/Code-CXhbCjHw.js +0 -54
  158. package/dist/Code-DD8gAydz.js +0 -36
  159. package/dist/Code.vue_vue_type_style_index_0_lang-C1J-SoAM.js +0 -59
  160. package/dist/Column-Ba3n9lah.js +0 -67
  161. package/dist/Comment-DulAeabk.js +0 -98
  162. package/dist/Compare-CmlD1ECo.js +0 -56
  163. package/dist/Compare-PyNusYx3.js +0 -26
  164. package/dist/Copy-DtwoucC7.js +0 -43
  165. package/dist/Custom-BV_EaF7f.js +0 -47
  166. package/dist/DataImport.vue_vue_type_script_setup_true_lang-CVb_SvzU.js +0 -172
  167. package/dist/Daterange-BDtHZQMV.js +0 -57
  168. package/dist/Delete-thdB3rVm.js +0 -55
  169. package/dist/Detail-rwzyud9y.js +0 -68
  170. package/dist/Dictionary-BgfQMBi8.js +0 -55
  171. package/dist/Image-fiCxDDah.js +0 -9
  172. package/dist/Index-BgoXQ1Wl.js +0 -168
  173. package/dist/Index-C6T9VjbG.js +0 -70
  174. package/dist/Index-Ch9KV-2J.js +0 -4
  175. package/dist/Index-auePVeWT.js +0 -4
  176. package/dist/Index-iBPC-KXy.js +0 -4
  177. package/dist/Index.vue_vue_type_script_setup_true_lang-B-sM48XO.js +0 -36
  178. package/dist/Int-B_GYg_-a.js +0 -41
  179. package/dist/List-BMEZrjDr.js +0 -72
  180. package/dist/Maintaince-aqCw0DHb.js +0 -14
  181. package/dist/Paging-C17Ky2Ym.js +0 -93
  182. package/dist/QueryApi-rH-MUOz4.js +0 -13
  183. package/dist/Register-Br4Ho5_h.js +0 -196
  184. package/dist/RichText-B7mZvV3h.js +0 -41
  185. package/dist/Text.vue_vue_type_style_index_0_lang-D3BX2I3_.js +0 -52
  186. package/dist/TextLink-BVdiz7C8.js +0 -59
  187. package/dist/Timeline-BdFiDkbs.js +0 -53
  188. package/dist/Tree-CqO-oS4J.js +0 -117
  189. package/dist/TreeNode-DtiaVE46.js +0 -34
  190. package/dist/Update-BLUslZO8.js +0 -63
  191. package/dist/Upload-BLKrxNpk.js +0 -2519
  192. package/dist/Upload-Dy80NqjS.js +0 -67
  193. package/dist/UploadApi-Cjo168Xz.js +0 -13
  194. package/dist/main-CsvsIylY.js +0 -28890
  195. package/dist/vendor-@monaco-editor-B50UdwzE.js +0 -92
  196. package/dist/vendor-intro.js-CZkClzQO.js +0 -1695
  197. package/esm/App.vue.d.ts +0 -2
  198. package/esm/components/business/HaCondition.vue.d.ts +0 -18
  199. package/esm/components/business/HaCrud.vue.d.ts +0 -29
  200. package/esm/components/business/HaDrawer.vue.d.ts +0 -24
  201. package/esm/components/business/HaDriver.vue.d.ts +0 -52
  202. package/esm/components/business/HaFeedback.vue.d.ts +0 -8
  203. package/esm/components/business/HaForm.vue.d.ts +0 -23
  204. package/esm/components/business/HaSwitch.vue.d.ts +0 -24
  205. package/esm/components/business/HaWelcome.vue.d.ts +0 -8
  206. package/esm/components/business/HoCondition.vue.d.ts +0 -18
  207. package/esm/components/business/HoCrud.vue.d.ts +0 -29
  208. package/esm/components/business/HoDrawer.vue.d.ts +0 -24
  209. package/esm/components/business/HoDriver.vue.d.ts +0 -52
  210. package/esm/components/business/HoFeedback.vue.d.ts +0 -8
  211. package/esm/components/business/HoForm.vue.d.ts +0 -23
  212. package/esm/components/business/HoSwitch.vue.d.ts +0 -24
  213. package/esm/components/business/HoWelcome.vue.d.ts +0 -8
  214. package/esm/components/business/index.d.ts +0 -124
  215. package/esm/components/controls/Autocomplete.vue.d.ts +0 -24
  216. package/esm/components/controls/Cascader.vue.d.ts +0 -24
  217. package/esm/components/controls/Checkbox.vue.d.ts +0 -22
  218. package/esm/components/controls/Code.vue.d.ts +0 -24
  219. package/esm/components/controls/Color.vue.d.ts +0 -24
  220. package/esm/components/controls/Compare.vue.d.ts +0 -24
  221. package/esm/components/controls/Date.vue.d.ts +0 -24
  222. package/esm/components/controls/DateRange.vue.d.ts +0 -24
  223. package/esm/components/controls/DateTime.vue.d.ts +0 -24
  224. package/esm/components/controls/DateTimeRange.vue.d.ts +0 -24
  225. package/esm/components/controls/Decimal.vue.d.ts +0 -24
  226. package/esm/components/controls/Email.vue.d.ts +0 -24
  227. package/esm/components/controls/Image.vue.d.ts +0 -2
  228. package/esm/components/controls/Index.vue.d.ts +0 -22
  229. package/esm/components/controls/Int.vue.d.ts +0 -24
  230. package/esm/components/controls/Markdown.vue.d.ts +0 -24
  231. package/esm/components/controls/Month.vue.d.ts +0 -24
  232. package/esm/components/controls/Password.vue.d.ts +0 -24
  233. package/esm/components/controls/Progress.vue.d.ts +0 -24
  234. package/esm/components/controls/Radio.vue.d.ts +0 -24
  235. package/esm/components/controls/Rate.vue.d.ts +0 -24
  236. package/esm/components/controls/RichText.vue.d.ts +0 -22
  237. package/esm/components/controls/Select.vue.d.ts +0 -24
  238. package/esm/components/controls/Switch.vue.d.ts +0 -24
  239. package/esm/components/controls/Text.vue.d.ts +0 -26
  240. package/esm/components/controls/Textarea.vue.d.ts +0 -24
  241. package/esm/components/controls/Time.vue.d.ts +0 -24
  242. package/esm/components/controls/Upload.vue.d.ts +0 -24
  243. package/esm/components/controls/Year.vue.d.ts +0 -24
  244. package/esm/components/headers/Breadcrumb.vue.d.ts +0 -2
  245. package/esm/components/headers/Debugger.vue.d.ts +0 -2
  246. package/esm/components/headers/Hamburger.vue.d.ts +0 -18
  247. package/esm/components/headers/HeaderRight.vue.d.ts +0 -2
  248. package/esm/components/headers/Index.vue.d.ts +0 -6
  249. package/esm/components/headers/Log.vue.d.ts +0 -2
  250. package/esm/components/headers/Logo.vue.d.ts +0 -6
  251. package/esm/components/headers/Refresh.vue.d.ts +0 -6
  252. package/esm/components/headers/Setting.vue.d.ts +0 -8
  253. package/esm/components/headers/index.d.ts +0 -3
  254. package/esm/components/index.d.ts +0 -8
  255. package/esm/components/layouts/Desktop.vue.d.ts +0 -2
  256. package/esm/components/layouts/Index.vue.d.ts +0 -2
  257. package/esm/components/layouts/Side.vue.d.ts +0 -2
  258. package/esm/components/layouts/Top.vue.d.ts +0 -2
  259. package/esm/components/layouts/index.d.ts +0 -7
  260. package/esm/components/lists/Calender.vue.d.ts +0 -2
  261. package/esm/components/lists/Racebar.vue.d.ts +0 -18
  262. package/esm/components/lists/Statistic.vue.d.ts +0 -18
  263. package/esm/components/lists/Stock.vue.d.ts +0 -12
  264. package/esm/components/lists/Timeline.vue.d.ts +0 -12
  265. package/esm/components/lists/Tree.vue.d.ts +0 -26
  266. package/esm/components/lists/index.d.ts +0 -15
  267. package/esm/components/pages/Column.vue.d.ts +0 -22
  268. package/esm/components/pages/Custom.vue.d.ts +0 -25
  269. package/esm/components/pages/Delete.vue.d.ts +0 -20
  270. package/esm/components/pages/Index.vue.d.ts +0 -2
  271. package/esm/components/pages/List.vue.d.ts +0 -24
  272. package/esm/components/pages/Paging.vue.d.ts +0 -24
  273. package/esm/components/pages/Single.vue.d.ts +0 -28
  274. package/esm/components/pages/index.d.ts +0 -146
  275. package/esm/components/pagings/Article.vue.d.ts +0 -27
  276. package/esm/components/pagings/Code.vue.d.ts +0 -12
  277. package/esm/components/pagings/DataExport.vue.d.ts +0 -33
  278. package/esm/components/pagings/DataImport.vue.d.ts +0 -18
  279. package/esm/components/pagings/File.vue.d.ts +0 -12
  280. package/esm/components/pagings/Index.vue.d.ts +0 -33
  281. package/esm/components/pagings/SearchFooter.vue.d.ts +0 -122
  282. package/esm/components/pagings/SearchForm.vue.d.ts +0 -72
  283. package/esm/components/pagings/Table.vue.d.ts +0 -31
  284. package/esm/components/pagings/index.d.ts +0 -11
  285. package/esm/components/partials/ArticleFooter.vue.d.ts +0 -24
  286. package/esm/components/partials/Detail.vue.d.ts +0 -20
  287. package/esm/components/partials/PagingHeader.vue.d.ts +0 -28
  288. package/esm/components/partials/PagingRow.vue.d.ts +0 -24
  289. package/esm/components/partials/TreeNode.vue.d.ts +0 -12
  290. package/esm/components/partials/Update.vue.d.ts +0 -20
  291. package/esm/components/partials/UpdateChild.vue.d.ts +0 -22
  292. package/esm/components/partials/index.d.ts +0 -135
  293. package/esm/components/searches/Autocomplete.vue.d.ts +0 -24
  294. package/esm/components/searches/Daterange.vue.d.ts +0 -22
  295. package/esm/components/searches/Index.vue.d.ts +0 -18
  296. package/esm/components/searches/Int.vue.d.ts +0 -24
  297. package/esm/components/searches/Month.vue.d.ts +0 -24
  298. package/esm/components/searches/Select.vue.d.ts +0 -24
  299. package/esm/components/searches/Text.vue.d.ts +0 -24
  300. package/esm/components/singles/Code.vue.d.ts +0 -18
  301. package/esm/components/singles/Comment.vue.d.ts +0 -12
  302. package/esm/components/singles/Index.vue.d.ts +0 -25
  303. package/esm/components/singles/Normal.vue.d.ts +0 -21
  304. package/esm/components/singles/Statistic.vue.d.ts +0 -12
  305. package/esm/components/singles/Stock.vue.d.ts +0 -12
  306. package/esm/components/singles/Table.vue.d.ts +0 -22
  307. package/esm/components/singles/Tree.vue.d.ts +0 -14
  308. package/esm/components/singles/Tree_Old.vue.d.ts +0 -2
  309. package/esm/components/singles/index.d.ts +0 -15
  310. package/esm/components/texts/Autocomplete.vue.d.ts +0 -16
  311. package/esm/components/texts/CSharp.vue.d.ts +0 -16
  312. package/esm/components/texts/Cascader.vue.d.ts +0 -22
  313. package/esm/components/texts/Checkbox.vue.d.ts +0 -16
  314. package/esm/components/texts/Code.vue.d.ts +0 -16
  315. package/esm/components/texts/Color.vue.d.ts +0 -16
  316. package/esm/components/texts/Compare.vue.d.ts +0 -16
  317. package/esm/components/texts/Copy.vue.d.ts +0 -24
  318. package/esm/components/texts/Date.vue.d.ts +0 -16
  319. package/esm/components/texts/DateRange.vue.d.ts +0 -16
  320. package/esm/components/texts/DateTime.vue.d.ts +0 -16
  321. package/esm/components/texts/Decimal.vue.d.ts +0 -16
  322. package/esm/components/texts/Dictionary.vue.d.ts +0 -24
  323. package/esm/components/texts/Email.vue.d.ts +0 -16
  324. package/esm/components/texts/Index.vue.d.ts +0 -22
  325. package/esm/components/texts/Int.vue.d.ts +0 -16
  326. package/esm/components/texts/Markdown.vue.d.ts +0 -16
  327. package/esm/components/texts/Month.vue.d.ts +0 -16
  328. package/esm/components/texts/Password.vue.d.ts +0 -16
  329. package/esm/components/texts/Progress.vue.d.ts +0 -16
  330. package/esm/components/texts/Radio.vue.d.ts +0 -16
  331. package/esm/components/texts/Rate.vue.d.ts +0 -24
  332. package/esm/components/texts/RichText.vue.d.ts +0 -16
  333. package/esm/components/texts/Select.vue.d.ts +0 -16
  334. package/esm/components/texts/Switch.vue.d.ts +0 -16
  335. package/esm/components/texts/Text.vue.d.ts +0 -16
  336. package/esm/components/texts/TextLink.vue.d.ts +0 -29
  337. package/esm/components/texts/Textarea.vue.d.ts +0 -16
  338. package/esm/components/texts/Upload.vue.d.ts +0 -16
  339. package/esm/components/texts/Year.vue.d.ts +0 -16
  340. package/esm/drivers/IDriver.d.ts +0 -10
  341. package/esm/drivers/cdns/Cdn.d.ts +0 -14
  342. package/esm/drivers/cdns/CdnFactory.d.ts +0 -11
  343. package/esm/drivers/cdns/ICdn.d.ts +0 -34
  344. package/esm/drivers/cdns/implements/BootCdn.d.ts +0 -12
  345. package/esm/drivers/cdns/implements/JsdelivrCdn.d.ts +0 -13
  346. package/esm/drivers/cdns/implements/LocalCdn.d.ts +0 -12
  347. package/esm/drivers/cdns/implements/StaticFileCdn.d.ts +0 -16
  348. package/esm/drivers/cdns/implements/UnpkgCdn.d.ts +0 -10
  349. package/esm/drivers/cdns/index.d.ts +0 -0
  350. package/esm/drivers/driver-helper.d.ts +0 -46
  351. package/esm/drivers/encoders/Encoder.d.ts +0 -11
  352. package/esm/drivers/encoders/EncoderFactory.d.ts +0 -16
  353. package/esm/drivers/encoders/IEncoder.d.ts +0 -22
  354. package/esm/drivers/encoders/implement/Base64Encoder.d.ts +0 -11
  355. package/esm/drivers/encoders/index.d.ts +0 -0
  356. package/esm/drivers/excels/ExcelFactory.d.ts +0 -11
  357. package/esm/drivers/excels/IExcel.d.ts +0 -18
  358. package/esm/drivers/excels/implements/XlsxExcel.d.ts +0 -10
  359. package/esm/drivers/excels/index.d.ts +0 -2
  360. package/esm/drivers/explainers/Explainer.d.ts +0 -4
  361. package/esm/drivers/explainers/ExplainerFactory.d.ts +0 -1
  362. package/esm/drivers/explainers/IExplainer.d.ts +0 -3
  363. package/esm/drivers/explainers/implement/JsonExplainer.d.ts +0 -4
  364. package/esm/drivers/explainers/index.d.ts +0 -0
  365. package/esm/drivers/features/FeatureFactory.d.ts +0 -11
  366. package/esm/drivers/features/IFeature.d.ts +0 -23
  367. package/esm/drivers/features/implements/ExpressionFeature.d.ts +0 -12
  368. package/esm/drivers/features/implements/I18NFeature.d.ts +0 -12
  369. package/esm/drivers/features/implements/SortFeature.d.ts +0 -13
  370. package/esm/drivers/features/index.d.ts +0 -2
  371. package/esm/drivers/hashers/Hasher.d.ts +0 -10
  372. package/esm/drivers/hashers/HasherFactory.d.ts +0 -13
  373. package/esm/drivers/hashers/IHasher.d.ts +0 -19
  374. package/esm/drivers/hashers/implement/Md5Hasher.d.ts +0 -10
  375. package/esm/drivers/hashers/implement/Sha256Hasher.d.ts +0 -10
  376. package/esm/drivers/hashers/index.d.ts +0 -2
  377. package/esm/drivers/index.d.ts +0 -9
  378. package/esm/drivers/providers/IProvider.d.ts +0 -47
  379. package/esm/drivers/providers/ProviderFactory.d.ts +0 -11
  380. package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +0 -55
  381. package/esm/drivers/providers/index.d.ts +0 -2
  382. package/esm/drivers/requesters/IRequester.d.ts +0 -20
  383. package/esm/drivers/requesters/Requester.d.ts +0 -12
  384. package/esm/drivers/requesters/RequesterFactory.d.ts +0 -18
  385. package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
  386. package/esm/drivers/requesters/entities/HttpResponse.d.ts +0 -19
  387. package/esm/drivers/requesters/implements/DefaultRequester.d.ts +0 -12
  388. package/esm/drivers/requesters/implements/MkRequester.d.ts +0 -40
  389. package/esm/drivers/requesters/index.d.ts +0 -5
  390. package/esm/drivers/signers/ISigner.d.ts +0 -33
  391. package/esm/drivers/signers/SignerFactory.d.ts +0 -11
  392. package/esm/drivers/signers/implements/DefaultSigner.d.ts +0 -18
  393. package/esm/drivers/signers/index.d.ts +0 -2
  394. package/esm/drivers/ssos/ISso.d.ts +0 -41
  395. package/esm/drivers/ssos/SsoFactory.d.ts +0 -11
  396. package/esm/drivers/ssos/implements/AnonymousSso.d.ts +0 -18
  397. package/esm/drivers/ssos/implements/BearerSso.d.ts +0 -22
  398. package/esm/drivers/ssos/implements/NioSso.d.ts +0 -23
  399. package/esm/drivers/ssos/implements/SecretSso.d.ts +0 -18
  400. package/esm/drivers/ssos/implements/WeiXinSso.d.ts +0 -20
  401. package/esm/drivers/ssos/index.d.ts +0 -2
  402. package/esm/plugins/PcMessager.d.ts +0 -35
  403. package/esm/sdks/commons/HaCaptcha.vue.d.ts +0 -14
  404. package/esm/sdks/commons/HaCode.vue.d.ts +0 -40
  405. package/esm/sdks/commons/HaCol.vue.d.ts +0 -9
  406. package/esm/sdks/commons/HaCompare.vue.d.ts +0 -40
  407. package/esm/sdks/commons/HaContainer.vue.d.ts +0 -21
  408. package/esm/sdks/commons/HaDebug.vue.d.ts +0 -9
  409. package/esm/sdks/commons/HaEditable.vue.d.ts +0 -13
  410. package/esm/sdks/commons/HaEmpty.vue.d.ts +0 -24
  411. package/esm/sdks/commons/HaLoading.vue.d.ts +0 -33
  412. package/esm/sdks/commons/HaMouseContext.vue.d.ts +0 -2
  413. package/esm/sdks/commons/HaParticles.vue.d.ts +0 -2
  414. package/esm/sdks/commons/HaProgress.vue.d.ts +0 -8
  415. package/esm/sdks/commons/HaResizer.vue.d.ts +0 -26
  416. package/esm/sdks/commons/HaRow.vue.d.ts +0 -19
  417. package/esm/sdks/commons/HaSpinner.vue.d.ts +0 -20
  418. package/esm/sdks/commons/HaTable.vue.d.ts +0 -34
  419. package/esm/sdks/commons/HaTableColumn.vue.d.ts +0 -31
  420. package/esm/sdks/commons/HoCaptcha.vue.d.ts +0 -14
  421. package/esm/sdks/commons/HoCode.vue.d.ts +0 -39
  422. package/esm/sdks/commons/HoCol.vue.d.ts +0 -9
  423. package/esm/sdks/commons/HoCompare.vue.d.ts +0 -40
  424. package/esm/sdks/commons/HoContainer.vue.d.ts +0 -21
  425. package/esm/sdks/commons/HoDebug.vue.d.ts +0 -9
  426. package/esm/sdks/commons/HoEditable.vue.d.ts +0 -13
  427. package/esm/sdks/commons/HoEmpty.vue.d.ts +0 -24
  428. package/esm/sdks/commons/HoLoading.vue.d.ts +0 -33
  429. package/esm/sdks/commons/HoMouseContext.vue.d.ts +0 -2
  430. package/esm/sdks/commons/HoParticles.vue.d.ts +0 -2
  431. package/esm/sdks/commons/HoProgress.vue.d.ts +0 -8
  432. package/esm/sdks/commons/HoResizer.vue.d.ts +0 -26
  433. package/esm/sdks/commons/HoRow.vue.d.ts +0 -19
  434. package/esm/sdks/commons/HoSpinner.vue.d.ts +0 -20
  435. package/esm/sdks/commons/HoTable.vue.d.ts +0 -34
  436. package/esm/sdks/commons/HoTableColumn.vue.d.ts +0 -31
  437. package/esm/sdks/commons/index.d.ts +0 -90
  438. package/esm/sdks/globals/HaHeaderTab.vue.d.ts +0 -19
  439. package/esm/sdks/globals/HaHeaderTabs.vue.d.ts +0 -17
  440. package/esm/sdks/globals/HaMenu.vue.d.ts +0 -77
  441. package/esm/sdks/globals/HaMenuItem.vue.d.ts +0 -76
  442. package/esm/sdks/globals/HaMissComponent.vue.d.ts +0 -9
  443. package/esm/sdks/globals/HaSideTab.vue.d.ts +0 -21
  444. package/esm/sdks/globals/HaSideTabs.vue.d.ts +0 -17
  445. package/esm/sdks/globals/HaWindow.vue.d.ts +0 -66
  446. package/esm/sdks/globals/HoHeaderTab.vue.d.ts +0 -19
  447. package/esm/sdks/globals/HoHeaderTabs.vue.d.ts +0 -17
  448. package/esm/sdks/globals/HoMenu.vue.d.ts +0 -77
  449. package/esm/sdks/globals/HoMenuItem.vue.d.ts +0 -76
  450. package/esm/sdks/globals/HoMissComponent.vue.d.ts +0 -9
  451. package/esm/sdks/globals/HoSideTab.vue.d.ts +0 -21
  452. package/esm/sdks/globals/HoSideTabs.vue.d.ts +0 -17
  453. package/esm/sdks/globals/HoWindow.vue.d.ts +0 -66
  454. package/esm/sdks/globals/index.d.ts +0 -66
  455. package/esm/sdks/helpers/array-helper.d.ts +0 -97
  456. package/esm/sdks/helpers/component-helper.d.ts +0 -10
  457. package/esm/sdks/helpers/cookie-helper.d.ts +0 -6
  458. package/esm/sdks/helpers/dictionary-helper.d.ts +0 -18
  459. package/esm/sdks/helpers/dom-helper.d.ts +0 -74
  460. package/esm/sdks/helpers/encrypt-helper.d.ts +0 -18
  461. package/esm/sdks/helpers/event-helper.d.ts +0 -30
  462. package/esm/sdks/helpers/file-helper.d.ts +0 -22
  463. package/esm/sdks/helpers/html-helper.d.ts +0 -10
  464. package/esm/sdks/helpers/i18n-helper.d.ts +0 -14
  465. package/esm/sdks/helpers/image-helper.d.ts +0 -10
  466. package/esm/sdks/helpers/index.d.ts +0 -26
  467. package/esm/sdks/helpers/json-helper.d.ts +0 -31
  468. package/esm/sdks/helpers/math-helper.d.ts +0 -42
  469. package/esm/sdks/helpers/micro-helper.d.ts +0 -10
  470. package/esm/sdks/helpers/mount-helper.d.ts +0 -14
  471. package/esm/sdks/helpers/object-helper.d.ts +0 -34
  472. package/esm/sdks/helpers/script-helper.d.ts +0 -31
  473. package/esm/sdks/helpers/scroll-helper.d.ts +0 -14
  474. package/esm/sdks/helpers/sign-helper.d.ts +0 -14
  475. package/esm/sdks/helpers/storage-helper.d.ts +0 -34
  476. package/esm/sdks/helpers/string-helper.d.ts +0 -94
  477. package/esm/sdks/helpers/task-helper.d.ts +0 -26
  478. package/esm/sdks/helpers/time-helper.d.ts +0 -62
  479. package/esm/sdks/helpers/tree-helper.d.ts +0 -54
  480. package/esm/sdks/helpers/type-helper.d.ts +0 -26
  481. package/esm/sdks/helpers/url-helper.d.ts +0 -96
  482. package/esm/sdks/index.d.ts +0 -7
  483. package/esm/sdks/panels/HaGroup.vue.d.ts +0 -9
  484. package/esm/sdks/panels/HaHeader.vue.d.ts +0 -16
  485. package/esm/sdks/panels/HaOperation.vue.d.ts +0 -22
  486. package/esm/sdks/panels/HaPanel.vue.d.ts +0 -30
  487. package/esm/sdks/panels/HaShrink.vue.d.ts +0 -48
  488. package/esm/sdks/panels/HoGroup.vue.d.ts +0 -9
  489. package/esm/sdks/panels/HoHeader.vue.d.ts +0 -16
  490. package/esm/sdks/panels/HoOperation.vue.d.ts +0 -22
  491. package/esm/sdks/panels/HoPanel.vue.d.ts +0 -30
  492. package/esm/sdks/panels/HoShrink.vue.d.ts +0 -48
  493. package/esm/sdks/panels/index.d.ts +0 -13
  494. package/esm/sdks/stores/index.d.ts +0 -2
  495. package/esm/sdks/stores/window.d.ts +0 -25
  496. package/esm/sdks/thirds/index.d.ts +0 -8
  497. package/esm/sdks/utilities/AffixUtility.d.ts +0 -9
  498. package/esm/sdks/utilities/EventUtility.d.ts +0 -30
  499. package/esm/sdks/utilities/KeyboardUtility.d.ts +0 -73
  500. package/esm/sdks/utilities/MouseUtility.d.ts +0 -24
  501. package/esm/sdks/utilities/index.d.ts +0 -4
  502. package/esm/services/ComponentService.d.ts +0 -18
  503. package/esm/services/ControlService.d.ts +0 -42
  504. package/esm/services/HttpService.d.ts +0 -22
  505. package/esm/services/MessageService.d.ts +0 -34
  506. package/esm/services/PageService.d.ts +0 -38
  507. package/esm/services/SettingService.d.ts +0 -5
  508. package/esm/services/StandardService.d.ts +0 -34
  509. package/esm/services/UploadService.d.ts +0 -10
  510. package/esm/services/index.d.ts +0 -9
  511. package/esm/servs/AppServ.d.ts +0 -36
  512. package/esm/servs/ComponentServ.d.ts +0 -35
  513. package/esm/servs/ControlServ.d.ts +0 -42
  514. package/esm/servs/I18nServ.d.ts +0 -79
  515. package/esm/servs/LayoutServ.d.ts +0 -18
  516. package/esm/servs/PageServ.d.ts +0 -38
  517. package/esm/servs/RouterServ.d.ts +0 -23
  518. package/esm/servs/StandardServ.d.ts +0 -34
  519. package/esm/servs/UploadServ.d.ts +0 -10
  520. package/esm/servs/WindowServ.d.ts +0 -27
  521. package/esm/servs/index.d.ts +0 -17
  522. package/esm/stores/app.d.ts +0 -44
  523. package/esm/stores/component.d.ts +0 -30
  524. package/esm/stores/config.d.ts +0 -55
  525. package/esm/stores/driver.d.ts +0 -37
  526. package/esm/stores/i18n.d.ts +0 -67
  527. package/esm/stores/index.d.ts +0 -12
  528. package/esm/stores/layout.d.ts +0 -13
  529. package/esm/stores/log.d.ts +0 -20
  530. package/esm/stores/router.d.ts +0 -20
  531. package/esm/stores/setting.d.ts +0 -43
  532. package/esm/stores/socket.d.ts +0 -27
  533. package/esm/stores/user.d.ts +0 -40
@@ -1,2519 +0,0 @@
1
- var Ve = Object.defineProperty;
2
- var Me = (u, e, t) => e in u ? Ve(u, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : u[e] = t;
3
- var n = (u, e, t) => Me(u, typeof e != "symbol" ? e + "" : e, t);
4
- import { reactive as ze, defineComponent as Je, toRefs as We, ref as z, onMounted as Qe, computed as ce, watch as Ye, resolveComponent as de, openBlock as ge, createElementBlock as Ae, normalizeClass as Ke, unref as x, createVNode as Oe, withCtx as pe, createBlock as Xe, createTextVNode as Ge, toDisplayString as Ze, isRef as He, createElementVNode as _e } from "vue";
5
- import { k as he, N as fe, w as et, x as B, f as je, j as me, U as Ce, l as Ie, $ as tt } from "./main-CsvsIylY.js";
6
- import "./QueryApi-rH-MUOz4.js";
7
- import { U as st } from "./UploadApi-Cjo168Xz.js";
8
- import { _ as rt } from "./vendor-underscore.string-BEHfJwHl.js";
9
- import { c as lt } from "./vendor-clone-BPtCWdXG.js";
10
- import "./vendor-underscore-D6LmOFb9.js";
11
- import { F as nt } from "./vendor-file-saver-CytTIJ-3.js";
12
- import "./vendor-@monaco-editor-B50UdwzE.js";
13
- import { h as P } from "./vendor-moment-h96o7c8I.js";
14
- import { C as W } from "./vendor-crypto-js-YOeWQTUw.js";
15
- import { x as H } from "./vendor-xlsx-js-style-DIFxrP6P.js";
16
- class k {
17
- }
18
- /**
19
- * 判断输入类型是否是字符串类型 null -> false
20
- */
21
- n(k, "isString", (e) => Object.prototype.toString.call(e) == "[object String]"), /**
22
- * 判断输入类型是否是Object类型
23
- */
24
- n(k, "isObject", (e) => Object.prototype.toString.call(e) == "[object Object]"), /**
25
- * 判断输入类型是否是Array类型
26
- */
27
- n(k, "isArray", (e) => Object.prototype.toString.call(e) == "[object Array]"), /**
28
- * 判断输入类型是否是Number类型,null -> false
29
- */
30
- n(k, "isNumber", (e) => {
31
- let t = Object.prototype.toString.call(e);
32
- return t == "[object Number]" || t == "[object BigInt]";
33
- }), /**
34
- * 判断输入类型是否是isBoolean类型
35
- */
36
- n(k, "isBoolean", (e) => Object.prototype.toString.call(e) == "[object Boolean]");
37
- const p = class p {
38
- /**
39
- * 根据字符串或数组,自动返回数组
40
- */
41
- static getArray(e) {
42
- return k.isString(e) ? [e.toString()] : e instanceof Array ? e : [];
43
- }
44
- /**
45
- * 忽略大小写比较
46
- */
47
- static equalsIgnoreCase(e, t) {
48
- let s = e.toUpperCase(), r = t.toUpperCase();
49
- return s == r;
50
- }
51
- };
52
- /**
53
- * 生成唯一字符串
54
- */
55
- n(p, "getUniqueId", () => {
56
- let e = Date.now().toString(36);
57
- return e += Math.random().toString(36).substring(2), e;
58
- }), /**
59
- * 填充字符串到指定长度,使用pad填充
60
- */
61
- n(p, "padLeft", (e, t, s) => rt.pad(e, t, s)), /**
62
- * 去掉头部字符串
63
- */
64
- n(p, "trimStart", (e, t) => {
65
- if (t == null)
66
- return e;
67
- let s = e.indexOf(t);
68
- return e.substring(s + t.length);
69
- }), /**
70
- * 去掉尾部字符串
71
- */
72
- n(p, "trimEnd", (e, t) => {
73
- if (t == null)
74
- return e;
75
- let s = e.lastIndexOf(t);
76
- return e.substring(0, s);
77
- }), /**
78
- * 去掉头尾字符串
79
- */
80
- n(p, "trim", (e, t, s) => {
81
- let r = p.trimStart(e, t);
82
- return p.trimEnd(r, s);
83
- }), /**
84
- * 获取中划线命名法
85
- */
86
- n(p, "getDashName", (e) => {
87
- if (!e)
88
- return null;
89
- let t = "";
90
- for (let s = 0; s < e.length; s++) {
91
- let r = e[s];
92
- r == "/" ? t += "-" : r >= "A" && r <= "Z" ? (s > 0 && e[s - 1] != "/" && (t += "-"), t += r.toLowerCase()) : t += r;
93
- }
94
- return t;
95
- }), /**
96
- * 忽略大小写包含判断,支持从数组中搜索关键词
97
- */
98
- n(p, "containsIgnoreCase", (e, t) => {
99
- if (!e)
100
- return !0;
101
- let s = t instanceof Array ? t : [t];
102
- for (let r = 0; r < s.length; r++) {
103
- let l = s[r];
104
- if (!l)
105
- return !1;
106
- if (l.toString().toUpperCase().includes(e.toUpperCase()))
107
- return !0;
108
- }
109
- return !1;
110
- }), /**
111
- * 从html中提取纯文本
112
- */
113
- n(p, "getTextFromHtml", (e) => {
114
- if (!e)
115
- return null;
116
- let t = new RegExp("<.+?>", "g");
117
- return e.replace(t, "");
118
- }), /**
119
- * 判断是否是数字类型,这样支持0
120
- */
121
- n(p, "isNumber", (e) => e != null && !isNaN(e)), /**
122
- * 验证是否是邮箱格式
123
- */
124
- n(p, "isEmail", (e) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)), /**
125
- * 判断是否是json
126
- */
127
- n(p, "isJson", (e) => {
128
- try {
129
- if (!e)
130
- return !1;
131
- let t = JSON.parse(e);
132
- return k.isObject(t);
133
- } catch {
134
- return !1;
135
- }
136
- }), /**
137
- * 判断是否是isJsonp
138
- */
139
- n(p, "isJsonp", (e) => {
140
- if (!e)
141
- return !1;
142
- let t = e.indexOf("("), s = e.lastIndexOf(")"), r = e.substring(t + 1, s);
143
- return !!p.isJson(r);
144
- }), /**
145
- * 判断是否是html
146
- */
147
- n(p, "isHtml", (e) => {
148
- if (!e)
149
- return !1;
150
- let t = document.createElement("div");
151
- t.innerHTML = e;
152
- for (let s = t.childNodes, r = s.length; r--; )
153
- if (s[r].nodeType == 1)
154
- return !0;
155
- return !1;
156
- }), /**
157
- * 获取内容类型
158
- */
159
- n(p, "getContentType", (e) => p.isJson(e) || p.isJsonp(e) ? "json" : p.isHtml(e) ? "html" : "text"), /**
160
- * 判断字符串是否为空或空串
161
- */
162
- n(p, "isNullOrEmpty", (e) => e == null || p.isEmpty(e)), /**
163
- * 判断字符串是否为空或空串
164
- */
165
- n(p, "isEmpty", (e) => e == ""), /**
166
- * 判断是否符合密码要求
167
- */
168
- n(p, "isPassword", (e) => !0), /**
169
- * 获取数据值或者空
170
- */
171
- n(p, "getNumberOrNull", (e) => e == null || isNaN(e) ? 0 : parseFloat(e)), /**
172
- * 格式化成留指定位数的小数
173
- */
174
- n(p, "format", (e, t) => {
175
- let s = parseFloat(e), r;
176
- return t ? r = s.toFixed(t).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") : r = s.toLocaleString(), r;
177
- }), /**
178
- * 获取两个字符串之间的字符串
179
- */
180
- n(p, "getBetween", (e, t, s) => {
181
- let r = e.indexOf(t);
182
- if (r == -1)
183
- return null;
184
- let l = r + t.length, a = e.substring(l), i = a.indexOf(s);
185
- return i == -1 ? null : a.substring(0, i);
186
- });
187
- let D = p;
188
- const L = class L {
189
- /**
190
- * 净化对象,返回不带默认属性的对象
191
- */
192
- static pure(e) {
193
- let t = {}, s = Object.keys(e);
194
- for (let r = 0; r < s.length; r++) {
195
- let l = s[r], a = e[l];
196
- a != null && (k.isObject(a) ? t[l] = this.pure(a) : t[l] = e[l]);
197
- }
198
- return t;
199
- }
200
- /**
201
- * 过滤key,并输出新对象
202
- */
203
- static filter(e, t, s) {
204
- let r = [];
205
- return Object.keys(e).forEach((l) => {
206
- let a = { key: l, value: e[l] };
207
- t(a) && r.push(s(a));
208
- }), r;
209
- }
210
- /**
211
- * 把数组转换成对象
212
- */
213
- static toObject(e, t, s) {
214
- let r = {};
215
- for (let l = 0; l < e.length; l++) {
216
- let a = e[l];
217
- r[t(a)] = s(a);
218
- }
219
- return r;
220
- }
221
- /**
222
- * 获取对象不区分大小写的key
223
- */
224
- static getKey(e, t) {
225
- if (e == null)
226
- return null;
227
- let s = Object.keys(e);
228
- for (let r = 0; r < s.length; r++) {
229
- let l = s[r];
230
- if (l.toLowerCase() == t.toLowerCase())
231
- return l;
232
- }
233
- return null;
234
- }
235
- };
236
- /**
237
- * 手动复制,并对字段执行指定自定义处理
238
- */
239
- n(L, "copy", (e, t = null) => {
240
- let s = [];
241
- k.isObject(e) && s.push(e);
242
- let r = [];
243
- for (let l = 0; l < s.length; l++) {
244
- let a = s[l], i = {};
245
- Object.keys(a).forEach((c) => {
246
- let o = a[c];
247
- t && t[c] ? i[c] = t[c]() : i[c] = o;
248
- }), r.push(i);
249
- }
250
- return k.isObject(e) ? r[0] : r;
251
- }), /**
252
- * 对对象进行深度克隆,同时可以移除Proxy对象
253
- */
254
- n(L, "clone", (e, t = null) => {
255
- let s = lt(e, !0);
256
- if (t == null)
257
- return s;
258
- if (k.isArray(e))
259
- for (let r = 0; r < s.length; r++)
260
- t(s[r]);
261
- else k.isObject(e) && t(s);
262
- return s;
263
- }), /**
264
- * 合并来源对象到目标对象上
265
- */
266
- n(L, "mergeTo", (e, t) => e == null ? t : t == null ? e : k.isArray(t) ? t.slice() : (Object.keys(t).forEach((r) => {
267
- let l = t[r];
268
- typeof l == "object" ? e[r] = L.mergeTo(e[r], l) : e[r] = l;
269
- }), e)), /**
270
- * 给对象添加属性集合,并赋值
271
- */
272
- n(L, "addProperties", (e, t, s) => {
273
- let r = e;
274
- for (let l = 0; l < t.length; l++) {
275
- let a = t[l];
276
- l == t.length - 1 ? r[a] = s : (r[a] || (r[a] = {}), r = r[a]);
277
- }
278
- });
279
- let V = L;
280
- class se {
281
- /**
282
- * 从指定字典中提取忽略大小写的key的值
283
- */
284
- static getValueIgnoreCase(e, t) {
285
- let s = Object.keys(t);
286
- for (let r = 0; r < s.length; r++) {
287
- let l = s[r];
288
- if (l.toUpperCase() == e.toUpperCase())
289
- return t[l];
290
- }
291
- return null;
292
- }
293
- /**
294
- * 对字典进行排序,并得到新字典
295
- */
296
- static sort(e) {
297
- let t = {}, r = Object.keys(e).sort();
298
- for (let l of r)
299
- t[l] = e[l];
300
- return t;
301
- }
302
- // #region 连接
303
- /**
304
- * 连接字典
305
- */
306
- static join(e, t = null, s = null, r = null) {
307
- let l = "";
308
- if (e == null)
309
- return l;
310
- let a = Object.keys(e);
311
- for (let i = 0; i < a.length; i++) {
312
- let c = a[i], o = t == null ? e[c] : t(e[c]);
313
- l = l.concat(c).concat(s).concat(o), i != a.length - 1 && (l += r);
314
- }
315
- return l;
316
- }
317
- // #endregion
318
- }
319
- const v = class v {
320
- /**
321
- * 获取指定地址路由对象
322
- */
323
- static getToRoute(e, t = !0) {
324
- if (!e)
325
- return null;
326
- let s = this.getToUrl(e, t);
327
- return this.getRoute(s);
328
- }
329
- /**
330
- * 获取要跳转的Url地址信息,自动涵盖后退地址
331
- */
332
- static getToUrl(e, t = !0) {
333
- let s = {};
334
- if (!this.getRoute(e).query.m) {
335
- let a = this.getQueryParam(location.search, "m");
336
- a && (s.m = a);
337
- }
338
- if (t) {
339
- let a = location.pathname + location.search;
340
- a && (s.return_url = a);
341
- }
342
- return this.getUrl(e, s);
343
- }
344
- /**
345
- * 获取菜单参数
346
- */
347
- static getM(e) {
348
- let t = this.getQueryParam(e, "m");
349
- if (!t)
350
- return {};
351
- let s = t.split(";"), r = {};
352
- return s.length > 0 && (r.m = s[0]), s.length > 1 && (r.max = s[1] == "max", r.min = s[1] == "min"), r;
353
- }
354
- //endregion
355
- //region 后退地址
356
- /**
357
- * 获取后退地址路由
358
- */
359
- static getBackRoute() {
360
- let e = this.getBackUrl();
361
- return this.getRoute(e);
362
- }
363
- /**
364
- * 获取要后退的地址URL
365
- */
366
- static getBackUrl() {
367
- let e = this.getQueryParam(location.search, "return_url");
368
- if (!e)
369
- return null;
370
- let t = e.split(";");
371
- return t[t.length - 1];
372
- }
373
- //endregion
374
- /**
375
- * 获取指定地址的路由对象,自动合并qs,并解码
376
- */
377
- static getRoute(e, t = null) {
378
- let s = this.getUrl(e, t);
379
- if (!s)
380
- return null;
381
- let r = {}, l = s.split("?");
382
- return r.path = l[0], l.length > 1 ? r.query = this.deserializeQs(l[1]) : r.query = {}, r;
383
- }
384
- /**
385
- * 处理实体,得到url query参数形式
386
- * 如:app=Tool&compare[language]=json&compare[sql]=App%3D%27Tool%27+and+[Table]+like+%27Ctl_%25%27+order+by+[Table],+Name
387
- */
388
- static getQuery(e) {
389
- if (e == null)
390
- return null;
391
- let t = "", s = Object.keys(e);
392
- for (let l of s) {
393
- let a = [l], i = this.handleQueryValue(e[l], a);
394
- t += i;
395
- }
396
- return t.substring(1);
397
- }
398
- /**
399
- * 从Url中提取路径
400
- */
401
- static getPath(e) {
402
- return e ? e.split("?")[0] : null;
403
- }
404
- /**
405
- * 获取path中最后一个片段信息
406
- */
407
- static getLastSegment(e) {
408
- if (!e)
409
- return null;
410
- let s = this.getPath(e).split("/").filter((l) => l);
411
- return s[s.length - 1];
412
- }
413
- /**
414
- * 获取地址中的查询参数
415
- */
416
- static getQueryParam(e, t) {
417
- if (!e)
418
- return null;
419
- let s = e.split("?")[1];
420
- return new URLSearchParams(s).get(t);
421
- }
422
- //region 序列化和反序列化
423
- /**
424
- * 从Url中提取查询对象
425
- */
426
- static deserialize(e) {
427
- if (!e)
428
- return null;
429
- let t = e.split("?");
430
- return t.length == 1 ? null : this.deserializeQs(t[1]);
431
- }
432
- /**
433
- * 把查询字符串转换成对象(自动解码成源数据)
434
- */
435
- static deserializeQs(e, t = !0) {
436
- let s = {}, r = e.split("&");
437
- for (let l = 0; l < r.length; l++) {
438
- let a = r[l], i = a.indexOf("="), c = a.substring(0, i), o = a.substring(i + 1);
439
- s[c] = t ? decodeURIComponent(o) : o;
440
- }
441
- return s;
442
- }
443
- /**
444
- * 把对象转换成查询字符串,自动编码
445
- */
446
- static serialize(e, t = !0) {
447
- let s = (l) => t ? encodeURIComponent(l) : l;
448
- return se.join(e, s, "=", "&");
449
- }
450
- //endregion
451
- //region 编码和解码
452
- /**
453
- * URL编码
454
- */
455
- static encode(e) {
456
- return e == null ? null : encodeURIComponent(e);
457
- }
458
- //endregion
459
- /**
460
- * 是否是http或https开头的地址
461
- */
462
- static httpOrHttps(e) {
463
- return e ? e.indexOf("http://") > -1 || e.indexOf("https://") > -1 : !1;
464
- }
465
- };
466
- /**
467
- * 处理键值对的值
468
- */
469
- n(v, "handleQueryValue", (e, t) => {
470
- let s = "";
471
- if (e == null)
472
- return s;
473
- if (e instanceof Array) {
474
- if (e.length > 0)
475
- for (let r = 0; r < e.length; r++) {
476
- let l = V.clone(t);
477
- l.push(""), s += v.handleQueryValue(e[r], l);
478
- }
479
- } else if (e instanceof Object) {
480
- let r = Object.keys(e);
481
- for (let l of r) {
482
- let a = V.clone(t);
483
- a.push(l), s += v.handleQueryValue(e[l], a);
484
- }
485
- } else {
486
- let r = "";
487
- for (let a = 0; a < t.length; a++)
488
- a > 0 && (r += "["), r += t[a], a > 0 && (r += "]");
489
- let l = encodeURIComponent(e);
490
- l = l.replace(/'/g, "%27"), l = l.replace(/%20/g, "+"), l = l.replace(/%5B/g, "["), l = l.replace(/%5D/g, "]"), l = l.replace(/%2C/g, ","), l = l.replace(/%3A/g, ":"), l = l.replace(/%24/g, "$"), s += `&${r}=${l}`;
491
- }
492
- return s;
493
- }), /**
494
- * 自动根据后面路径,决定是否要合并Url
495
- */
496
- n(v, "concatUrl", (e, t) => v.httpOrHttps(t) ? t : e + t), /**
497
- * 合并路径和查询对象(自动编码,并支持覆盖现有参数),得到完整URL地址,并会省略默认值
498
- * ? 对url参数不编码,只对 queryObj 参数编码,防止用户的参数被改成编码形式
499
- * ? 目前,对Url参数对象和目标对象都编码,因为源对象属性是经过解码的
500
- */
501
- n(v, "getUrl", (e, t = null) => {
502
- if (e == null)
503
- return null;
504
- if (t == null)
505
- return e;
506
- let s = v.deserialize(e), r = V.mergeTo(s, t);
507
- return v.getPath(e) + "?" + v.getQuery(r);
508
- }), /**
509
- * 获取超链接配置对象
510
- */
511
- n(v, "getAnchor", (e, t = null) => {
512
- let s = { href: null, target: null };
513
- return v.httpOrHttps(e) ? (s.href = e, s.target = "_blank", s) : (s.href = v.getUrl(e, t), s);
514
- });
515
- let O = v;
516
- class ee {
517
- /**
518
- * 根据字符串Ascii码得到固定颜色字典
519
- */
520
- static getColors(e) {
521
- let t = {}, s = 0;
522
- for (let r = 0; r < e.length; r++) {
523
- let l = e[r], a = 0;
524
- for (let i = 0; i < l.length; i++)
525
- a += l.charCodeAt(i);
526
- a > s && (s = a);
527
- }
528
- for (let r = 0; r < e.length; r++) {
529
- let l = e[r], a = 0;
530
- for (let g = 0; g < l.length; g++)
531
- a += l.charCodeAt(g);
532
- let i = a / s, c = 255 * i, o = 255 * (1 - i), d = 255 * (1 - i);
533
- t[l] = `rgb(${c}, ${o}, ${d})`;
534
- }
535
- return t;
536
- }
537
- //#region 类
538
- /**
539
- * 获取样式名
540
- */
541
- static getClass(...e) {
542
- if (e.length == 0)
543
- return null;
544
- let t = "";
545
- for (let s = 0; s < e.length; s++) {
546
- let r = e[s];
547
- D.isNullOrEmpty(r) || (t += r, s != e.length - 1 && (t += " "));
548
- }
549
- return t;
550
- }
551
- //#endregion
552
- //#region 样式
553
- /**
554
- * 根据计算后的样式进行DOM过滤
555
- */
556
- static filterStyle(e, t) {
557
- let s = [];
558
- return e.forEach((r) => {
559
- let l = getComputedStyle(r, null);
560
- t(l) && s.push(r);
561
- }), s;
562
- }
563
- /**
564
- * 添加样式
565
- */
566
- static addStyle(e, t, s) {
567
- e.style[t] = s;
568
- }
569
- //#endregion
570
- //#region 查找
571
- /**
572
- * 查找兄弟节点
573
- */
574
- static siblings(e) {
575
- let s = e.parentNode.children, r = [];
576
- for (let l = 0; l < s.length; l++) {
577
- let a = s[l];
578
- a != e && r.push(a);
579
- }
580
- return r;
581
- }
582
- /**
583
- * 查找指定父节点
584
- */
585
- static parentUntil(e, t) {
586
- if (!e)
587
- return null;
588
- let s = e.parentNode;
589
- for (; s != null; ) {
590
- let r = t.substring(1);
591
- if (s.classList.contains(r))
592
- return s;
593
- s = s.parentNode;
594
- }
595
- return null;
596
- }
597
- /**
598
- * 查找第一个绝对定位的元素或backdrop元素,否则使用html元素
599
- */
600
- static parentAbsolute(e) {
601
- if (!e)
602
- return null;
603
- let t = e.parentNode;
604
- for (; t != null; ) {
605
- if (t.nodeName == "HTML")
606
- return t;
607
- let s = getComputedStyle(t, null);
608
- if (s.getPropertyValue("backdrop-filter") != "none")
609
- return t;
610
- let l = s.getPropertyValue("position");
611
- if (l == "absolute" || l == "fixed")
612
- return t;
613
- t = t.parentNode;
614
- }
615
- return null;
616
- }
617
- /**
618
- * 查找孩子节点
619
- */
620
- static find(e, t) {
621
- return e.querySelector(t);
622
- }
623
- /**
624
- * 统计所有控件宽度,含外边距
625
- */
626
- static getWidth(e) {
627
- return this.getWidthOrHeight(e, "width", (s) => {
628
- let r = getComputedStyle(s);
629
- return parseFloat(r.marginLeft) + parseFloat(r.marginRight);
630
- });
631
- }
632
- /**
633
- * 获取元素可用宽度(移除内填充)
634
- */
635
- static getAvailableWidth(e) {
636
- return this.getWidthOrHeight(e, "height", (s) => {
637
- let r = getComputedStyle(s);
638
- return -(parseFloat(r.paddingLeft) + parseFloat(r.paddingRight));
639
- });
640
- }
641
- /**
642
- * 统计所有非固定定位控件高度,含内填充和外边距
643
- */
644
- static getHeight(e) {
645
- return this.getWidthOrHeight(e, "height", (s) => {
646
- let r = getComputedStyle(s);
647
- return parseFloat(r.marginTop) + parseFloat(r.marginBottom);
648
- });
649
- }
650
- /**
651
- * 获取元素可用高度(移除内填充)
652
- */
653
- static getAvailableHeight(e) {
654
- return this.getWidthOrHeight(e, "height", (s) => {
655
- let r = getComputedStyle(s), l = parseFloat(r.paddingTop) + parseFloat(r.paddingBottom), a = parseFloat(r.borderTopWidth) + parseFloat(r.borderBottomWidth);
656
- return -(l + a);
657
- });
658
- }
659
- //#endregion
660
- /**
661
- * 获取指定元素在视口内的位置
662
- */
663
- static getViewportStyle(e, t, s, r, l) {
664
- let a = e.querySelector(s);
665
- if (!a)
666
- return null;
667
- let i = {}, c = e.getBoundingClientRect(), o = r.getBoundingClientRect(), g = e.querySelector(t).getBoundingClientRect(), h = a.getBoundingClientRect(), I = o.height - g.top;
668
- if (l == "right") {
669
- i.left = `${c.left + c.width}px`;
670
- let A;
671
- h.height > o.height ? A = o.height : A = h.height, i.height = `${A}px`, A + g.top > o.height ? (i.top = "initial", i.bottom = "0px") : i.top = `${c.top}px`;
672
- } else if (l == "bottom")
673
- I -= g.height, i.left = `${c.left}px`, i.top = `${c.top + c.height}px`, I < h.height ? i.height = `${I}px` : i.height = `${h.height}px`;
674
- else
675
- throw new Error(`暂未支持的position:${l}`);
676
- return i;
677
- }
678
- /**
679
- * 获取指定选择器最大的索引
680
- */
681
- static getMaxIndex(e) {
682
- let t = document.querySelectorAll(e);
683
- if (t.length == 0)
684
- return 0;
685
- let s = [];
686
- for (let l = 0; l < t.length; l++) {
687
- let a = t[l], i = getComputedStyle(a), c = i.zIndex == "auto" ? 0 : i.zIndex;
688
- s.push(c);
689
- }
690
- return Math.max(...s);
691
- }
692
- /**
693
- * 判断当前鼠标位置是否在指定范围之内
694
- */
695
- static inRange(e, t, s, r, l) {
696
- let a = e.x >= t && e.x <= t + r, i = e.y >= s && e.y <= s + l;
697
- return a && i;
698
- }
699
- //#region 创建
700
- /**
701
- * 创建指定标签的dom,并设置内容
702
- */
703
- static create(e, t = null, s = null) {
704
- let r = document.createElement(e);
705
- if (t != null) {
706
- let l = t.substring(1);
707
- r.classList.add(l);
708
- }
709
- return s != null && (r.innerHTML = s), r;
710
- }
711
- /**
712
- * 不存在时创建dom,并自动追加到文档
713
- */
714
- static createIfAbsent(e, t, s = null) {
715
- let r = document.querySelector(t);
716
- if (r)
717
- return r;
718
- let l = this.create(e, t, s);
719
- return document.body.append(l), l;
720
- }
721
- //#endregion
722
- //#region 文本
723
- /**
724
- * 获取文本宽度
725
- */
726
- static getTextWidth(e) {
727
- let t = this.createIfAbsent("div", ".ha-measure"), s = this.create("span", null, e);
728
- t.append(s);
729
- let r = s.offsetWidth;
730
- return s.remove(), r;
731
- }
732
- //#endregion
733
- }
734
- /**
735
- * 添加类
736
- */
737
- n(ee, "addClass", (e, t, s = null) => {
738
- let r;
739
- if (t == null || t == "") {
740
- if (s == null || s == "")
741
- return;
742
- r = s;
743
- } else
744
- r = t;
745
- e.classList.add(r);
746
- }), /**
747
- * 删除类
748
- */
749
- n(ee, "removeClass", (e, t, s = null) => {
750
- if (t == null || t == "")
751
- return;
752
- let r = [];
753
- if (typeof e == "string") {
754
- let l = Array.from(document.querySelectorAll(e));
755
- r.push(...l);
756
- } else
757
- r.push(e);
758
- for (let l = 0; l < r.length; l++) {
759
- let a = r[l];
760
- s != a && a.classList.remove(t);
761
- }
762
- }), //#endregion
763
- //#region 宽高
764
- /**
765
- * 获取dom宽度或高度
766
- */
767
- n(ee, "getWidthOrHeight", (e, t, s = null) => {
768
- let r = 0, l = [];
769
- e instanceof Array && l.push(...e), e instanceof HTMLCollection ? l.push(...e) : l.push(e);
770
- for (let a = 0; a < l.length; a++) {
771
- let i = l[a];
772
- if (!i || !i.getBoundingClientRect)
773
- continue;
774
- let c = i.getBoundingClientRect();
775
- r += c[t], s && (r += s(i));
776
- }
777
- return r;
778
- });
779
- const F = class F {
780
- };
781
- /**
782
- * 保存文件
783
- */
784
- n(F, "save", (e, t) => {
785
- let s = window.atob(e), r = s.length, l = new Uint8Array(r);
786
- for (; r--; )
787
- l[r] = s.charCodeAt(r);
788
- let a = new Blob([l]);
789
- nt.saveAs(a, t);
790
- }), /**
791
- * 获取文件扩展名
792
- */
793
- n(F, "getExtension", (e) => {
794
- let t = e.lastIndexOf(".");
795
- return t == -1 ? "" : e.substring(t).split("?")[0];
796
- }), /**
797
- * 判断当前文件名是否是excel文件
798
- */
799
- n(F, "isExcel", (e) => {
800
- let t = F.getExtension(e);
801
- return [".xls", ".xlsx"].indexOf(t) > -1;
802
- }), /**
803
- * 判断当前文件是否是图片文件
804
- */
805
- n(F, "isImage", (e) => {
806
- let t = F.getExtension(e);
807
- return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(t) > -1;
808
- });
809
- let re = F;
810
- const Q = class Q {
811
- };
812
- /**
813
- * 激发主框架事件
814
- */
815
- n(Q, "emit", (e, t) => {
816
- Q.emits({ [e]: t });
817
- }), /**
818
- * 批量激发主框架事件
819
- */
820
- n(Q, "emits", (e) => {
821
- var s, r;
822
- let t = (r = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : r.emit;
823
- t && Object.keys(e).forEach((l) => {
824
- t(l, e[l]);
825
- });
826
- });
827
- let be = Q;
828
- const U = class U {
829
- };
830
- /**
831
- * 异步加载脚本/样式内容,把内容处理为行内html
832
- * 这种方式,依赖的内部资源,会从当前站点加载
833
- */
834
- n(U, "loadContentAsync", async (e) => {
835
- let t = e instanceof Array ? e : [e], s = [];
836
- for (let r = 0; r < t.length; r++) {
837
- let l = t[r], a = new Promise((i, c) => {
838
- let o = new XMLHttpRequest();
839
- o.open("GET", l, !1), o.onreadystatechange = () => {
840
- if (o.readyState == 4) {
841
- let d = U.getInnerTagByUrl(l);
842
- d.appendChild(document.createTextNode(o.responseText)), document.head.appendChild(d), i();
843
- }
844
- }, o.onerror = () => {
845
- c();
846
- }, o.send(null);
847
- });
848
- s.push(a);
849
- }
850
- return Promise.all(s);
851
- }), /**
852
- * 异步加载单个路径下的多个文件
853
- */
854
- n(U, "loadPathAsync", async (e, t) => {
855
- let s = [];
856
- for (let r = 0; r < t.length; r++)
857
- s.push(e + t[r]);
858
- await U.loadAsync(s);
859
- }), /**
860
- * 通过注入DOM标签异步加载脚本或样式表
861
- */
862
- n(U, "loadAsync", async (e) => {
863
- let t = D.getArray(e), s = [];
864
- for (let r = 0; r < t.length; r++) {
865
- let l = new Promise((a, i) => {
866
- let c = t[r], o = U.getOuterTagByUrl(c);
867
- document.head.appendChild(o), o.onload = (d) => {
868
- a(d);
869
- }, o.onerror = (d) => {
870
- i(d);
871
- };
872
- });
873
- s.push(l);
874
- }
875
- return new Promise((r, l) => {
876
- Promise.all(s).then(() => {
877
- r();
878
- }).catch(() => {
879
- l();
880
- });
881
- });
882
- }), /**
883
- * 注意:箭头函数没有参数
884
- */
885
- n(U, "loadAll", (...e) => Promise.all(e)), /**
886
- * 根据路径获取标签(无src)
887
- */
888
- n(U, "getInnerTagByUrl", (e) => re.getExtension(e).substring(1) == "css" ? document.createElement("style") : document.createElement("script")), /**
889
- * 根据路径获取待加载的元素,同时包含Url
890
- */
891
- n(U, "getOuterTagByUrl", (e) => {
892
- if (re.getExtension(e).substring(1) == "css") {
893
- let r = document.createElement("link");
894
- return r.rel = "stylesheet", r.href = e, r;
895
- }
896
- let s = document.createElement("script");
897
- return s.src = e, s;
898
- });
899
- let le = U, _ = {};
900
- const f = class f {
901
- };
902
- /**
903
- * 获取相对于1970年1月1日的时间戳(ms),不同时区结果相同
904
- */
905
- n(f, "getTimestamp", (e = null) => (e ? new Date(e) : /* @__PURE__ */ new Date()).getTime()), /**
906
- * 根据字符串获取可对比的时间
907
- */
908
- n(f, "getTime", (e = null) => e ? new Date(e) : /* @__PURE__ */ new Date()), /**
909
- * 格式化时间
910
- */
911
- n(f, "format", (e, t) => P(e).format(t)), /**
912
- * 获取当前日期时间的字符串
913
- */
914
- n(f, "getDateTimeString", () => f.formatSecondTime(/* @__PURE__ */ new Date())), /**
915
- * 获取当前时间的字符串
916
- */
917
- n(f, "getDateString", () => f.formatDate(/* @__PURE__ */ new Date())), /**
918
- * 获取当前时间的字符串
919
- */
920
- n(f, "getTimeString", () => f.formatTime(/* @__PURE__ */ new Date())), /**
921
- * 对时间值进行时间格式化
922
- */
923
- n(f, "formatSecondTime", (e) => P(e).format("YYYY-MM-DD HH:mm:ss")), /**
924
- * 对时间值进行时间格式化
925
- */
926
- n(f, "formatMillisecondTime", (e) => e ? P(e).format("YYYY-MM-DD HH:mm:ss SSS") : null), /**
927
- * 格式化成24小时时间格式
928
- */
929
- n(f, "formatTime", (e) => e ? P(e).format("HH:mm:ss SSS") : null), /**
930
- * 对时间值进行日期格式化
931
- */
932
- n(f, "formatDate", (e) => e ? P(e).format("YYYY-MM-DD") : null), /**
933
- * 添加天数
934
- */
935
- n(f, "addDays", (e, t) => e ? P(e).add(t, "days").toDate() : null), /**
936
- * 添加月份
937
- */
938
- n(f, "addMonths", (e, t) => e ? P(e).add(t, "months").toDate() : null), /**
939
- * 添加小时
940
- */
941
- n(f, "addHours", (e, t) => e ? P(e).add(t, "hours").toDate() : null), /**
942
- * 判断指定时间是否是周末
943
- */
944
- n(f, "isWeekend", (e) => {
945
- if (!e)
946
- return !1;
947
- let t = P(e).format("d");
948
- return t == "6" || t == "0";
949
- }), /**
950
- * 把中国时间,转换为当地时间
951
- */
952
- n(f, "localeTime", (e) => {
953
- if (!e)
954
- return null;
955
- let s = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
956
- return P(e).add(s, "minutes").toDate();
957
- });
958
- let K = f;
959
- const N = class N {
960
- };
961
- /**
962
- * 获取本地存储
963
- */
964
- n(N, "get", (e, t = null) => localStorage.getItem(e) ?? t), /**
965
- * 设置本地存储
966
- */
967
- n(N, "set", (e, t) => localStorage.setItem(e, t)), /**
968
- * 获取本地存储
969
- */
970
- n(N, "getObject", (e) => JSON.parse(localStorage.getItem(e))), /**
971
- * 设置本地存储
972
- */
973
- n(N, "setObject", (e, t) => localStorage.setItem(e, JSON.stringify(t))), /**
974
- * 移除存储数据
975
- */
976
- n(N, "remove", (e) => localStorage.removeItem(e)), /**
977
- * 以5M为基准,获取剩余可用容量(KB)
978
- */
979
- n(N, "getLeftStorage", () => {
980
- let e = 0;
981
- return Object.keys(localStorage).forEach((s) => {
982
- e += localStorage.getItem(s).length;
983
- }), 1e-4 * 1024 - e / 1024;
984
- }), /**
985
- * 判断指定值是否能够存储到storage中
986
- */
987
- n(N, "canStorage", (e) => {
988
- let t = JSON.stringify(e).length / 1024;
989
- return N.getLeftStorage() > t;
990
- });
991
- let j = N;
992
- class M {
993
- /**
994
- * 把字符串格式化为Json字符串
995
- */
996
- static stringify(e) {
997
- return e == null ? null : JSON.stringify(e, null, 2);
998
- }
999
- /**
1000
- * 对非字符串进行序列化
1001
- */
1002
- static stringifyWithString(e) {
1003
- return typeof e == "string" ? e : M.stringify(e);
1004
- }
1005
- /**
1006
- * 把字符串格式化为Json字符串
1007
- */
1008
- static stringifyString(e) {
1009
- if (!e)
1010
- return null;
1011
- let t;
1012
- try {
1013
- t = JSON.parse(e);
1014
- } catch {
1015
- return e;
1016
- }
1017
- return JSON.stringify(t, null, 2);
1018
- }
1019
- /**
1020
- * 反序列化成json对象
1021
- */
1022
- static parse(e) {
1023
- return JSON.parse(e);
1024
- }
1025
- /**
1026
- * 根据props中的.自动分割得到属性值
1027
- */
1028
- static getValue(e, t) {
1029
- if (!t)
1030
- return null;
1031
- let s = t.split("."), r = e;
1032
- for (let l of s) {
1033
- let a = r[l];
1034
- if (!a)
1035
- return null;
1036
- r = a;
1037
- }
1038
- return r;
1039
- }
1040
- /**
1041
- * 把json字符串合并到目标对象上
1042
- */
1043
- static mergeTo(e, t) {
1044
- if (D.isNullOrEmpty(t))
1045
- return;
1046
- let s = JSON.parse(t);
1047
- Object.keys(s).forEach((l) => {
1048
- let a = s[l];
1049
- e[l] = a;
1050
- });
1051
- }
1052
- /**
1053
- * 从树集合构建出Json对象
1054
- */
1055
- static buildObject(e, t, s) {
1056
- return we(e, t, 1, s);
1057
- }
1058
- }
1059
- function we(u, e, t, s) {
1060
- if (!u || u.length == 0)
1061
- return "{}";
1062
- let r = `{
1063
- `;
1064
- for (let l = 0; l < u.length; l++) {
1065
- let a = u[l], i = s(a);
1066
- i.type == "array" ? (i.remark && (r += te(2 * t) + "//" + i.remark + `
1067
- `), r += ye(2 * t, i.key) + "[", r += we(a[e], e, t + 1, s), r += "]", l != u.length - 1 && (r += ",")) : i.type == "object" ? (i.remark && (r += te(2 * t) + "//" + i.remark + `
1068
- `), r += ye(2 * t, i.key), r += we(a[e], e, t + 1, s), l != u.length - 1 && (r += ",")) : (r += ye(2 * t, i.key), i.type == "string" ? r += '""' : i.type == "date" ? r += `"${K.getDateTimeString()}"` : i.type == "int" || i.type == "number" ? r += "0" : i.type == "boolean" ? r += "false" : r += null, l != u.length - 1 && (r += ","), i.remark && (r += " //" + i.remark)), r += `
1069
- `;
1070
- }
1071
- return r += te(2 * (t - 1)), r += "}", r;
1072
- }
1073
- function te(u) {
1074
- let e = "";
1075
- for (let t = 0; t < u; t++)
1076
- e += " ";
1077
- return e;
1078
- }
1079
- function ye(u, e) {
1080
- let t = te(u);
1081
- return t += '"' + e + '": ', t;
1082
- }
1083
- class at {
1084
- /**
1085
- * 清空对象中的空值
1086
- */
1087
- static clean(e) {
1088
- let t = Object.keys(e);
1089
- for (let s of t)
1090
- e[s] == null && delete e[s];
1091
- }
1092
- /**
1093
- * 签名字典
1094
- */
1095
- static signDictionary(e, t = !0) {
1096
- return this.clean(e), O.serialize(e, t);
1097
- }
1098
- }
1099
- class Z {
1100
- constructor() {
1101
- n(this, "type");
1102
- n(this, "baseUrl");
1103
- n(this, "mappings");
1104
- }
1105
- getPath(e) {
1106
- let t = se.getValueIgnoreCase(e, this.mappings);
1107
- return O.httpOrHttps(t) ? t : this.baseUrl + t;
1108
- }
1109
- async loadPathAsync(e, t) {
1110
- let s = this.baseUrl + e;
1111
- await le.loadPathAsync(s, t);
1112
- }
1113
- async loadAsync(e) {
1114
- let t = D.getArray(e), s = [];
1115
- for (let r = 0; r < t.length; r++) {
1116
- let l = this.getPath(t[r]);
1117
- s.push(l);
1118
- }
1119
- await le.loadAsync(s);
1120
- }
1121
- }
1122
- class it extends Z {
1123
- constructor() {
1124
- super(...arguments);
1125
- n(this, "type", "Jsdelivr");
1126
- n(this, "mappings", {
1127
- "monaco-editor": "/npm/monaco-editor@0.49.0/min/vs"
1128
- });
1129
- }
1130
- open(t) {
1131
- this.baseUrl = "https://cdn.jsdelivr.net";
1132
- }
1133
- }
1134
- class ot extends Z {
1135
- constructor() {
1136
- super(...arguments);
1137
- n(this, "type", "StaticFile");
1138
- n(this, "mappings", {
1139
- //通过cdn引入样式文件,并且打包文件中不会包括样式文件
1140
- "element-plus": "/element-plus/2.7.5/index.css",
1141
- // 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
1142
- //首次加载4.11s
1143
- //不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
1144
- "monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs",
1145
- quill: "/quill/2.0.2/quill.snow.min.css",
1146
- "fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
1147
- });
1148
- }
1149
- open(t) {
1150
- this.baseUrl = "https://cdn.staticfile.net";
1151
- }
1152
- }
1153
- class ut extends Z {
1154
- constructor() {
1155
- super(...arguments);
1156
- n(this, "type", "BootCdn");
1157
- n(this, "mappings", {
1158
- "element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
1159
- "monaco-editor": "/ajax/libs/monaco-editor/0.45.0/min/vs",
1160
- quill: "/ajax/libs/quill/1.3.7/quill.snow.min.css"
1161
- });
1162
- }
1163
- open(t) {
1164
- this.baseUrl = "https://cdn.bootcdn.net";
1165
- }
1166
- }
1167
- class ct extends Z {
1168
- constructor() {
1169
- super(...arguments);
1170
- n(this, "type", "Local");
1171
- n(this, "mappings", {
1172
- //引入本地样式文件,会导致始终打包进打包文件
1173
- //后续可以改进为:发包后,单独存放静态样式文件,框架加载时,自动通过异步方式加载样式文件
1174
- //为了同时让下游同时支持CDN引入和本地引入样式表文件,所以需要把element-plus的样式文件,独立打包到一个文件中,让下游:
1175
- //1. 启用CDN时,能够使用CDN加载,而不加载本地element-plus的样式文件
1176
- //2. 不启用CDN时,采用本地打包方式,支持载入本地element-plus样式表文件
1177
- //所以,上游包,必须同时包含独立的element-plus样式表文件
1178
- //复制包内的样式表文件,方便cdn方式不加载样式表 和 未启用cdn方式加载 样式表
1179
- "element-plus": "element-plus/dist/index.css",
1180
- quill: "quill/dist/quill.snow.css",
1181
- "fort-awesome": "@fortawesome/fontawesome-free/css/all.min.css"
1182
- });
1183
- }
1184
- open(t) {
1185
- this.baseUrl = t;
1186
- }
1187
- }
1188
- class dt extends Z {
1189
- constructor() {
1190
- super(...arguments);
1191
- n(this, "type", "Unpkg");
1192
- n(this, "mappings", {
1193
- //首次加载很不稳定: 30s+, 稳定后: 首次加载2.5s(使用https加载,可以防止本地http访问外部http资源时的请求警告)
1194
- "monaco-editor": ["/monaco-editor@0.49.0/min/vs"]
1195
- });
1196
- }
1197
- open(t) {
1198
- this.baseUrl = "https://unpkg.com";
1199
- }
1200
- }
1201
- class $ {
1202
- constructor() {
1203
- /**
1204
- * 实例集合
1205
- * 或者使用:Record<string, string>
1206
- */
1207
- n(this, "instances", {});
1208
- }
1209
- /**
1210
- * 创建指定类型驱动
1211
- */
1212
- async create(e, t) {
1213
- if (!e)
1214
- throw new Error("驱动类型不能为空");
1215
- let r = this.getInstances().find((l) => l.type.toLowerCase() == e.toLowerCase());
1216
- if (r == null)
1217
- throw new Error(`未实现的驱动类型:${e}`);
1218
- return r;
1219
- }
1220
- /**
1221
- * 从缓存中获取指定名称的驱动,不存在则创建并执行初始化
1222
- */
1223
- async createIfAbsent(e, t = null, s = null) {
1224
- t == null && (t = e);
1225
- let r = this.instances[e];
1226
- return r != null || (r = await this.create(t), s != null && s(r), this.instances[e] = r), Promise.resolve(r);
1227
- }
1228
- }
1229
- class gt extends $ {
1230
- getInstances() {
1231
- return [new it(), new ot(), new ut(), new ct(), new dt()];
1232
- }
1233
- /**
1234
- * 获取指定CDN实例
1235
- */
1236
- async create(e, t) {
1237
- let s = await super.create(e);
1238
- return s.open(t), s;
1239
- }
1240
- }
1241
- class pt {
1242
- constructor() {
1243
- n(this, "type");
1244
- }
1245
- encode(e) {
1246
- let t;
1247
- return typeof e == "object" ? t = JSON.stringify(e) : t = e, this.encodeString(t);
1248
- }
1249
- decodeObj(e) {
1250
- let t = this.decode(e);
1251
- return JSON.parse(t);
1252
- }
1253
- }
1254
- class ht extends pt {
1255
- constructor() {
1256
- super(...arguments);
1257
- n(this, "type", "Base64");
1258
- }
1259
- open(t) {
1260
- }
1261
- encodeString(t) {
1262
- let s = W.enc.Utf8.parse(t);
1263
- return W.enc.Base64.stringify(s);
1264
- }
1265
- decode(t) {
1266
- let s = W.enc.Base64.parse(t);
1267
- return W.enc.Utf8.stringify(s);
1268
- }
1269
- }
1270
- class ft extends $ {
1271
- getInstances() {
1272
- return [new ht()];
1273
- }
1274
- /**
1275
- * 创建执行类型的Hash实例
1276
- */
1277
- async create(e, t) {
1278
- let s = await super.create(e);
1279
- return s.open(null), s;
1280
- }
1281
- /**
1282
- * 获取Base64 编码器对象
1283
- */
1284
- async getBase64() {
1285
- return await this.createIfAbsent("Base64");
1286
- }
1287
- }
1288
- class mt {
1289
- constructor() {
1290
- n(this, "type", "xlsx");
1291
- }
1292
- open(e) {
1293
- }
1294
- export(e, t) {
1295
- if (!t)
1296
- throw new Error("Excel名称不能为空");
1297
- e || (e = []);
1298
- let s;
1299
- e.length > 0 ? s = Object.keys(e[0]) : s = [];
1300
- let r = [], l = [];
1301
- if (s.forEach((d) => {
1302
- l.push(d);
1303
- }), r.push(l), e.length > 0)
1304
- for (let d = 0; d < e.length; d++) {
1305
- let g = e[d], h = [];
1306
- Object.keys(g).forEach((I) => {
1307
- h.push(g[I]);
1308
- }), r.push(h);
1309
- }
1310
- let a = H.utils.book_new(), i = H.utils.json_to_sheet(r, { skipHeader: !0 });
1311
- H.utils.book_append_sheet(a, i, "abc");
1312
- let c = 65;
1313
- for (let d = 0; d < s.length; d++) {
1314
- let h = `${String.fromCharCode(c + d)}1`;
1315
- i[h].s = {
1316
- alignment: { horizontal: "center" },
1317
- font: { bold: !0, color: { rgb: "000000" } },
1318
- fill: { fgColor: { rgb: "409eff" } }
1319
- };
1320
- }
1321
- let o = [];
1322
- s.forEach((d) => {
1323
- let g = e[0][d], h = { wpx: 50 };
1324
- typeof g == "string" && (h.wpx = 100), o.push(h);
1325
- }), i["!cols"] = o, H.writeFile(a, t);
1326
- }
1327
- }
1328
- class yt extends $ {
1329
- getInstances() {
1330
- return [new mt()];
1331
- }
1332
- /**
1333
- * 获取Excel实例
1334
- */
1335
- async create(e, t) {
1336
- let s = await super.create(e);
1337
- return s.open(t), s;
1338
- }
1339
- }
1340
- class bt {
1341
- constructor() {
1342
- n(this, "type", "Json");
1343
- }
1344
- }
1345
- class wt extends bt {
1346
- }
1347
- class xt extends $ {
1348
- getInstances() {
1349
- return [new wt()];
1350
- }
1351
- }
1352
- class Ee {
1353
- constructor() {
1354
- /**
1355
- * 实体数据
1356
- */
1357
- n(this, "data");
1358
- /**
1359
- * 数据体
1360
- */
1361
- n(this, "body");
1362
- /**
1363
- * 请求头
1364
- */
1365
- n(this, "headers", {});
1366
- /**
1367
- * 内容类型
1368
- */
1369
- n(this, "contentType");
1370
- }
1371
- /**
1372
- * 获取指定Key的值
1373
- */
1374
- getHeader(e) {
1375
- if (this.headers == null)
1376
- return null;
1377
- let t = V.getKey(this.headers, e);
1378
- return t ? this.headers[t] : null;
1379
- }
1380
- /**
1381
- * 添加请求头
1382
- */
1383
- addHeaders(e) {
1384
- if (e != null)
1385
- for (let t in e)
1386
- this.headers[t] = e[t];
1387
- }
1388
- }
1389
- class Pe extends Ee {
1390
- constructor() {
1391
- super(...arguments);
1392
- /**
1393
- * 请求路径
1394
- */
1395
- n(this, "path");
1396
- /**
1397
- * 请求方法
1398
- */
1399
- n(this, "method");
1400
- /**
1401
- * 实际请求地址
1402
- */
1403
- n(this, "url");
1404
- }
1405
- }
1406
- class ve {
1407
- constructor() {
1408
- n(this, "type");
1409
- n(this, "onRequest");
1410
- n(this, "onResponse");
1411
- }
1412
- //#endregion
1413
- async get(e, t) {
1414
- return (await this.sendGet(e, t)).data;
1415
- }
1416
- async sendGet(e, t) {
1417
- let s = O.getUrl(e, t), r = this.getRequest("GET", s);
1418
- return await this.send(r);
1419
- }
1420
- async post(e, t) {
1421
- return (await this.sendPost(e, t)).data;
1422
- }
1423
- async sendPost(e, t) {
1424
- let s = this.getRequest("POST", e, t);
1425
- return await this.send(s);
1426
- }
1427
- async patch(e) {
1428
- return (await this.sendPatch(e)).data;
1429
- }
1430
- async sendPatch(e, t) {
1431
- let s = this.getRequest("PATCH", e);
1432
- return await this.send(s);
1433
- }
1434
- /**
1435
- * 获取请求消息
1436
- */
1437
- getRequest(e, t, s = null) {
1438
- let r = new Pe();
1439
- return r.path = t, r.method = e, r.body = M.stringifyWithString(s), r;
1440
- }
1441
- }
1442
- class Ue extends Ee {
1443
- constructor() {
1444
- super(...arguments);
1445
- /**
1446
- * 是否成功
1447
- */
1448
- n(this, "success");
1449
- /**
1450
- * 错误消息
1451
- */
1452
- n(this, "message");
1453
- /**
1454
- * 请求耗时(ms)
1455
- */
1456
- n(this, "elapsed");
1457
- /**
1458
- * 响应状态码
1459
- */
1460
- n(this, "status");
1461
- /**
1462
- * 对应的请求信息
1463
- */
1464
- n(this, "request");
1465
- }
1466
- }
1467
- class St extends ve {
1468
- constructor() {
1469
- super(...arguments);
1470
- n(this, "type", "Default");
1471
- n(this, "baseUrl");
1472
- }
1473
- async open(t) {
1474
- M.mergeTo(this, t);
1475
- }
1476
- send(t) {
1477
- return D.isNullOrEmpty(t.url) && (t.url = this.baseUrl + t.path), new Promise(async (s, r) => {
1478
- var i;
1479
- await ((i = this.onRequest) == null ? void 0 : i.call(this, t));
1480
- let l = (/* @__PURE__ */ new Date()).getTime(), a = new XMLHttpRequest();
1481
- if (a.open(t.method, t.url), t.headers != null)
1482
- for (let c in t.headers) {
1483
- let o = t.headers[c];
1484
- a.setRequestHeader(c, o);
1485
- }
1486
- t.contentType != null && a.setRequestHeader("content-type", t.contentType), a.onreadystatechange = async () => {
1487
- var c;
1488
- if (a.readyState == 4) {
1489
- let o = new Ue();
1490
- o.success = !0, o.elapsed = (/* @__PURE__ */ new Date()).getTime() - l, o.status = a.status, o.body = a.responseText, o.request = t;
1491
- let d = a.getAllResponseHeaders().split(`\r
1492
- `), g = {};
1493
- for (let I = 0; I < d.length; I++) {
1494
- let A = d[I].split(": "), T = A.shift();
1495
- T == null || T == "" || (g[T] = A.join(": "));
1496
- }
1497
- o.headers = g;
1498
- let h = o.getHeader("content-type");
1499
- h != null && (o.contentType = h, h.indexOf("application/json") > -1 && (o.data = M.parse(o.body))), await ((c = this.onResponse) == null ? void 0 : c.call(this, o)), s(o);
1500
- }
1501
- }, a.onerror = async (c) => {
1502
- var d;
1503
- let o = new Ue();
1504
- o.success = !1, o.message = c.type, o.elapsed = (/* @__PURE__ */ new Date()).getTime() - l, o.body = a.responseText, o.request = t, await ((d = this.onResponse) == null ? void 0 : d.call(this, o)), r(o);
1505
- }, a.send(t.body);
1506
- });
1507
- }
1508
- }
1509
- class vt extends ve {
1510
- constructor() {
1511
- super(...arguments);
1512
- //#region 属性
1513
- n(this, "type", "Mk");
1514
- /**
1515
- * 基准地址
1516
- */
1517
- n(this, "baseUrl");
1518
- /**
1519
- * AppId
1520
- */
1521
- n(this, "appId", "");
1522
- /**
1523
- * AppSecret
1524
- */
1525
- n(this, "appSecret", "");
1526
- /**
1527
- * 默认请求器
1528
- */
1529
- n(this, "requester");
1530
- /**
1531
- * Hash计算器
1532
- */
1533
- n(this, "hasher");
1534
- }
1535
- /**
1536
- * 危险操作,会暴露敏感信息
1537
- */
1538
- async open(t) {
1539
- M.mergeTo(this, t), this.requester = await Kt.getDefault(), this.hasher = await Yt.create("Sha256");
1540
- }
1541
- //#endregion
1542
- /**
1543
- * 危险操作,会暴露敏感信息
1544
- */
1545
- async send(t) {
1546
- let s = K.getTimestamp(), r = {
1547
- app_id: this.appId,
1548
- hash_type: "sha256",
1549
- timestamp: parseInt((s / 1e3).toString())
1550
- };
1551
- D.isNullOrEmpty(t.body) || (r.jsonBody = t.body);
1552
- let l = O.deserialize(t.path);
1553
- for (let h in l)
1554
- r[h] = l[h];
1555
- let a = O.getPath(t.path);
1556
- r = se.sort(r);
1557
- let i = at.signDictionary(r, !1), c = `POST${a}?${i}${this.appSecret}`, o = await this.hasher.compute(c);
1558
- r.sign = o.toLowerCase(), delete r.jsonBody, r = se.sort(r);
1559
- let d = O.serialize(r);
1560
- return t.url = O.concatUrl(this.baseUrl, a + "?" + d), await this.requester.send(t);
1561
- }
1562
- }
1563
- class kt extends ve {
1564
- constructor() {
1565
- super(...arguments);
1566
- //#region 属性
1567
- n(this, "type", "Halo");
1568
- /**
1569
- * 基准地址
1570
- */
1571
- n(this, "baseUrl", null);
1572
- /**
1573
- * 当前用户信息
1574
- */
1575
- n(this, "user");
1576
- /**
1577
- * 请求语言
1578
- */
1579
- n(this, "language");
1580
- /**
1581
- * 当前环境
1582
- */
1583
- n(this, "env");
1584
- /**
1585
- * 当前终端
1586
- */
1587
- n(this, "platform");
1588
- /**
1589
- * 默认请求器
1590
- */
1591
- n(this, "http");
1592
- /**
1593
- * 单点登录配置
1594
- */
1595
- n(this, "sso");
1596
- /**
1597
- * 单点登录配置
1598
- */
1599
- n(this, "signer");
1600
- }
1601
- //#endregion
1602
- //#region 开启
1603
- /**
1604
- * 开启
1605
- */
1606
- async open(t) {
1607
- M.mergeTo(this, t), this.http = await C.getHttp().getDefault(), this.user != null && (this.sso = await Gt.create(this.user.type)), this.signer = await Xt.createIfAbsent("default"), this.onRequest == null && (this.onRequest = this.beforeRequest);
1608
- }
1609
- //#endregion
1610
- /**
1611
- * 发送请求
1612
- */
1613
- async send(t) {
1614
- t.url = O.concatUrl(this.baseUrl, t.path), await this.onRequest(t);
1615
- let s = await this.http.send(t);
1616
- if (s.status != 200) {
1617
- let l;
1618
- return s.status == 0 ? l = `网络异常,请检查接口访问是否正常: ${t.method} ${t.url}` : l = `接口加载异常: ${t.method}(${s.status}) ${t.url}`, _.warning(l), Promise.reject(l);
1619
- }
1620
- let r = s.data;
1621
- return r.code == "Ok" ? s : (_.error(r.message), Promise.reject(r));
1622
- }
1623
- /**
1624
- * 请求预处理
1625
- */
1626
- async beforeRequest(t) {
1627
- if (O.httpOrHttps(t.path))
1628
- return Promise.resolve();
1629
- let s = this.user, r;
1630
- if (s == null)
1631
- r = this.platform;
1632
- else {
1633
- let a = K.getTimestamp(), i = await this.signer.getSign(s.userId, t.url, t.body, a, s.secret);
1634
- r = this.sso.getAuth(s.identity.token, a, i, this.platform, this.env);
1635
- }
1636
- let l = {};
1637
- l.Authorization = r, t.getHeader("Accept-Language") || (l["Accept-Language"] = this.language), t.addHeaders(l);
1638
- }
1639
- /**
1640
- * 处理网络错误和响应错误场景
1641
- */
1642
- handleError(t) {
1643
- if (t instanceof Object) {
1644
- let s = t.message;
1645
- t.message == "Network Error" && (O.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), _.error(s);
1646
- } else
1647
- _.error(t.message);
1648
- return Promise.reject(t);
1649
- }
1650
- }
1651
- class At extends $ {
1652
- getInstances() {
1653
- return [new St(), new vt(), new kt()];
1654
- }
1655
- /**
1656
- * 获取默认请求器
1657
- */
1658
- async getDefault() {
1659
- return await this.createIfAbsent("Default");
1660
- }
1661
- /**
1662
- * 获取本地请求实例
1663
- * 获取完毕后,下游第一行代码就要配置消息服务
1664
- */
1665
- async getHalo() {
1666
- return await this.createIfAbsent("Halo");
1667
- }
1668
- }
1669
- class Ot {
1670
- constructor() {
1671
- n(this, "type");
1672
- }
1673
- }
1674
- class jt extends Ot {
1675
- constructor() {
1676
- super(...arguments);
1677
- n(this, "type", "Default");
1678
- }
1679
- async open(t) {
1680
- }
1681
- callback(t) {
1682
- }
1683
- async getSign(t, s, r, l, a) {
1684
- let c = `${t}.${s}.${r ?? ""}.${l}.${a}`;
1685
- return (await Zt.compute(c)).toUpperCase();
1686
- }
1687
- loginUrl(t) {
1688
- return "";
1689
- }
1690
- dispose() {
1691
- }
1692
- }
1693
- class Ct extends $ {
1694
- getInstances() {
1695
- return [new jt()];
1696
- }
1697
- /**
1698
- * 获取指定签名实例
1699
- */
1700
- async create(e, t) {
1701
- let s = await super.create(e);
1702
- return await s.open(null), s;
1703
- }
1704
- }
1705
- const ne = class ne {
1706
- constructor() {
1707
- //#region 属性
1708
- n(this, "type", "Bearer");
1709
- }
1710
- open(e) {
1711
- }
1712
- //#endregion
1713
- async login(e) {
1714
- return G.post(`/user/login?type=${this.type}`, e).then(async (t) => (await (await C.getProvider().getDefault("user")).saveAsync("sso", t.data), Promise.resolve(t)));
1715
- }
1716
- loginUrl(e) {
1717
- return "";
1718
- }
1719
- getUser() {
1720
- let e = j.getObject("sso");
1721
- return { userId: e.userId, token: e.token, secret: e.userSecret };
1722
- }
1723
- getAuth(e, t, s, r = "", l = "") {
1724
- let a = `${this.type} ${e} ${t} ${s} ${r}`;
1725
- return l && (a += " " + l), a;
1726
- }
1727
- logout() {
1728
- j.remove(ne.loginKey), j.remove("sso");
1729
- }
1730
- };
1731
- n(ne, "loginKey", "user");
1732
- let X = ne;
1733
- class It {
1734
- constructor() {
1735
- n(this, "type", "Nio");
1736
- n(this, "url");
1737
- n(this, "app_id");
1738
- }
1739
- open(e) {
1740
- this.url = e.url, this.app_id = e.app_id;
1741
- }
1742
- async login(e) {
1743
- j.setObject("sso", e);
1744
- }
1745
- loginUrl(e) {
1746
- let t = encodeURIComponent(e);
1747
- return `${this.url}/oauth2/authorize?client_id=${this.app_id}&redirect_uri=${t}&response_type=code`;
1748
- }
1749
- getUser() {
1750
- return j.getObject(X.loginKey);
1751
- }
1752
- getAuth(e, t, s, r) {
1753
- return `${this.type} ${e} ${t} ${s} pc`;
1754
- }
1755
- logout() {
1756
- j.remove("sso");
1757
- }
1758
- }
1759
- class Ut {
1760
- constructor() {
1761
- n(this, "type", "WeiXin");
1762
- }
1763
- open(e) {
1764
- }
1765
- async login(e) {
1766
- }
1767
- loginUrl(e) {
1768
- return "";
1769
- }
1770
- getUser() {
1771
- return { userId: "", token: "", secret: "" };
1772
- }
1773
- getAuth(e, t, s, r) {
1774
- return "";
1775
- }
1776
- logout() {
1777
- }
1778
- }
1779
- class Et {
1780
- constructor() {
1781
- n(this, "type", "Anonymous");
1782
- }
1783
- open(e) {
1784
- }
1785
- async login(e) {
1786
- }
1787
- loginUrl(e) {
1788
- return "";
1789
- }
1790
- getUser() {
1791
- let e = j.get("anonymous");
1792
- if (!e) {
1793
- let t = D.getUniqueId();
1794
- j.set("anonymous", t), e = t;
1795
- }
1796
- return { userId: "", token: e, secret: "" };
1797
- }
1798
- getAuth(e, t, s, r) {
1799
- return `Anonymous ${e} pc`;
1800
- }
1801
- logout() {
1802
- }
1803
- }
1804
- class Pt {
1805
- constructor() {
1806
- n(this, "type", "Secret");
1807
- n(this, "http");
1808
- }
1809
- open(e) {
1810
- }
1811
- async login(e) {
1812
- return G.post(`/user/login?type=${this.type}`, e).then((t) => {
1813
- let s = t.data;
1814
- return j.setObject("sso", s), Promise.resolve(t);
1815
- });
1816
- }
1817
- loginUrl(e) {
1818
- return "";
1819
- }
1820
- getUser() {
1821
- let e = j.getObject(X.loginKey);
1822
- return { userId: e.userId, token: e.token, secret: e.userSecret };
1823
- }
1824
- getAuth(e, t, s, r) {
1825
- return `${this.type} ${e} ${t} ${s} pc`;
1826
- }
1827
- logout() {
1828
- }
1829
- }
1830
- class Nt {
1831
- constructor() {
1832
- let e = window._setting ?? window.setting;
1833
- for (let t in e)
1834
- this[t] = e[t];
1835
- }
1836
- }
1837
- let $t = new Nt();
1838
- class Rt {
1839
- constructor() {
1840
- //#region 属性
1841
- n(this, "loaded", !1);
1842
- n(this, "particles", !1);
1843
- n(this, "home", "/");
1844
- n(this, "background", null);
1845
- //前端默认背景
1846
- n(this, "font", "Consolas");
1847
- //前端默认字体
1848
- n(this, "language", navigator.language.toLowerCase());
1849
- //前端默认语言
1850
- n(this, "layout", "side");
1851
- //前端默认布局
1852
- n(this, "theme", "dark");
1853
- //前端默认主题
1854
- n(this, "themes", []);
1855
- n(this, "layouts", []);
1856
- n(this, "backgrounds", []);
1857
- n(this, "locales", []);
1858
- //本地化语言集合
1859
- n(this, "fonts", null);
1860
- n(this, "ssos", []);
1861
- //SSO信息
1862
- n(this, "size", "default");
1863
- //前端默认尺寸
1864
- n(this, "watermark", null);
1865
- n(this, "app");
1866
- n(this, "env");
1867
- /**
1868
- * 中心库
1869
- */
1870
- n(this, "central");
1871
- /**
1872
- * 业务库
1873
- */
1874
- n(this, "business");
1875
- n(this, "upload", null);
1876
- n(this, "version", null);
1877
- }
1878
- //#endregion
1879
- /**
1880
- * 系统初始化
1881
- */
1882
- async init() {
1883
- this.loaded || (await this.load(), this.loaded = !0);
1884
- }
1885
- /**
1886
- * 加载设置
1887
- */
1888
- async load() {
1889
- return G.get("/app/setting").then(({ data: e }) => (Object.keys(e).forEach((t) => {
1890
- let s = e[t];
1891
- s && (this[t] = s);
1892
- }), ee.addClass(document.documentElement, this.theme, $t.web.theme), be.emits({ theme: this.theme }), Promise.resolve(e))).catch((e) => Promise.reject(e));
1893
- }
1894
- }
1895
- class Dt {
1896
- constructor() {
1897
- //#region 属性
1898
- /**
1899
- * 加载完毕状态记录
1900
- */
1901
- n(this, "loaded", {
1902
- apps: !1,
1903
- envs: !1
1904
- });
1905
- /**
1906
- * 是否加载中状态,用于并发场景 防止重复拉取接口
1907
- */
1908
- n(this, "loading", {
1909
- apps: !1,
1910
- envs: !1
1911
- });
1912
- /**
1913
- * 应用集合,存储到Store中,防止每一个Driver实例重复加载
1914
- */
1915
- n(this, "apps", []);
1916
- /**
1917
- * 环境集合,存储到Store中,防止每一个Driver实例重复加载
1918
- */
1919
- n(this, "envs", []);
1920
- }
1921
- //#endregion
1922
- /**
1923
- * 加载应用选项
1924
- */
1925
- async loadApps(e = !1) {
1926
- if (!this.loading.apps && !(!e && this.loaded.apps))
1927
- return this.loading.apps = !0, G.post("/app/options").then((t) => {
1928
- this.apps = t.data, this.loaded.apps = !0;
1929
- }).finally(() => {
1930
- this.loading.apps = !1;
1931
- });
1932
- }
1933
- /**
1934
- * 加载环境选项
1935
- */
1936
- async loadEnvs(e = !1) {
1937
- if (!this.loading.envs && (this.loading.envs = !0, !(!e && this.loaded.envs)))
1938
- return G.post("/env/options").then((t) => {
1939
- this.envs = t.data, this.loaded.envs = !0;
1940
- }).finally(() => {
1941
- this.loading.envs = !1;
1942
- });
1943
- }
1944
- }
1945
- ze(new Dt());
1946
- let Ft = new Rt();
1947
- class Tt extends $ {
1948
- /**
1949
- * @extends {getInstances}
1950
- */
1951
- getInstances() {
1952
- return [new Pt(), new It(), new Ut(), new X(), new Et()];
1953
- }
1954
- /**
1955
- * 获取指定SSO实例
1956
- */
1957
- async create(e, t) {
1958
- let s = Ft.ssos.find((a) => a.type.toUpperCase() == e.toUpperCase()), r = { url: s == null ? void 0 : s.url, app_id: s == null ? void 0 : s.appId }, l = await super.create(e);
1959
- return l.open(r), l;
1960
- }
1961
- }
1962
- class Bt {
1963
- constructor() {
1964
- n(this, "type", "Sort");
1965
- }
1966
- open(e) {
1967
- }
1968
- add(e, t, s, r) {
1969
- this.resort(e, t, s);
1970
- }
1971
- insert(e, t, s, r, l) {
1972
- this.resort(e, t, s);
1973
- }
1974
- //复制时,自动往后排序
1975
- copy(e, t, s) {
1976
- this.resort(e, t, s);
1977
- }
1978
- //重新排序
1979
- resort(e, t, s) {
1980
- let r = s[e.name];
1981
- for (let l = 0; l < r.length; l++) {
1982
- let a = r[l];
1983
- a[t.name] = (l + 1) * 10;
1984
- }
1985
- }
1986
- }
1987
- class Lt {
1988
- constructor() {
1989
- n(this, "type", "I18N");
1990
- }
1991
- open(e) {
1992
- }
1993
- add(e, t, s, r) {
1994
- }
1995
- insert(e, t, s, r, l) {
1996
- }
1997
- copy(e, t, s) {
1998
- }
1999
- }
2000
- class qt {
2001
- constructor() {
2002
- n(this, "type", "Expression");
2003
- }
2004
- open(e) {
2005
- }
2006
- add(e, t, s, r) {
2007
- }
2008
- insert(e, t, s, r, l) {
2009
- }
2010
- copy(e, t, s) {
2011
- }
2012
- }
2013
- class Vt extends $ {
2014
- getInstances() {
2015
- return [new Bt(), new Lt(), new qt()];
2016
- }
2017
- /**
2018
- * 获取指定特征实例
2019
- */
2020
- async create(e, t) {
2021
- let s = await super.create(e);
2022
- return s.open(null), s;
2023
- }
2024
- }
2025
- class Ne {
2026
- constructor() {
2027
- n(this, "type");
2028
- }
2029
- }
2030
- class Mt extends Ne {
2031
- constructor() {
2032
- super(...arguments);
2033
- n(this, "type", "Sha256");
2034
- }
2035
- open(t) {
2036
- }
2037
- async compute(t) {
2038
- let r = new TextEncoder().encode(t), l = await crypto.subtle.digest("SHA-256", r);
2039
- return Array.from(new Uint8Array(l)).map((c) => c.toString(16).padStart(2, "0")).join("");
2040
- }
2041
- }
2042
- class zt extends Ne {
2043
- constructor() {
2044
- super(...arguments);
2045
- n(this, "type", "Md5");
2046
- }
2047
- open(t) {
2048
- }
2049
- compute(t) {
2050
- let s = W.MD5(t).toString();
2051
- return Promise.resolve(s);
2052
- }
2053
- }
2054
- class Jt extends $ {
2055
- getInstances() {
2056
- return [new Mt(), new zt()];
2057
- }
2058
- async create(e, t) {
2059
- let s = await super.create(e);
2060
- return s.open(null), s;
2061
- }
2062
- /**
2063
- * 获取MD5 Hash对象
2064
- */
2065
- async getMd5() {
2066
- return await this.createIfAbsent("Md5");
2067
- }
2068
- }
2069
- class Wt {
2070
- constructor() {
2071
- n(this, "type");
2072
- }
2073
- createAsync(e) {
2074
- return Promise.resolve(void 0);
2075
- }
2076
- deleteAsync(e) {
2077
- return Promise.resolve(void 0);
2078
- }
2079
- getAsync(e) {
2080
- return Promise.resolve(void 0);
2081
- }
2082
- insertAsync(e, t) {
2083
- return Promise.resolve(void 0);
2084
- }
2085
- openAsync(e) {
2086
- return Promise.resolve(0);
2087
- }
2088
- saveAsync(e, t) {
2089
- return Promise.resolve(void 0);
2090
- }
2091
- updateAsync(e, t) {
2092
- return Promise.resolve(void 0);
2093
- }
2094
- commit() {
2095
- }
2096
- dispose() {
2097
- }
2098
- }
2099
- const q = class q extends Wt {
2100
- constructor() {
2101
- super(...arguments);
2102
- n(this, "type", "IndexedDb");
2103
- n(this, "database", null);
2104
- n(this, "store", null);
2105
- n(this, "objectStoreNames", null);
2106
- }
2107
- /**
2108
- * 进行数据库初始化 或 从现有数据库中得到最新版本号(数据库首次初始化和open是版本号升级时,会触发升级事件)
2109
- */
2110
- async openAsync(t) {
2111
- return this.database = t, new Promise((s, r) => {
2112
- let l = indexedDB.open(t);
2113
- l.onsuccess = (a) => {
2114
- let i = a.target.result;
2115
- q.version = i.version, this.objectStoreNames = i.objectStoreNames, s(q.version);
2116
- }, l.onerror = (a) => {
2117
- r(a.target);
2118
- };
2119
- });
2120
- }
2121
- /**
2122
- * 保证创建存储Store
2123
- */
2124
- async createAsync(t) {
2125
- return this.store = t, this.objectStoreNames.contains(t) ? Promise.resolve(!0) : new Promise((s, r) => {
2126
- let l = indexedDB.open(this.database, ++q.version);
2127
- l.onupgradeneeded = (a) => {
2128
- let i = a.target.result;
2129
- i.objectStoreNames.contains(this.store) || i.createObjectStore(this.store);
2130
- }, l.onsuccess = (a) => {
2131
- s(a);
2132
- }, l.onerror = (a) => {
2133
- r(a);
2134
- };
2135
- });
2136
- }
2137
- /**
2138
- * 打开数据库(不升级,用于执行命令)
2139
- */
2140
- async openDbAsync() {
2141
- return new Promise((t, s) => {
2142
- let r = indexedDB.open(this.database, q.version);
2143
- r.onsuccess = (l) => {
2144
- let a = l.target.result;
2145
- t(a);
2146
- }, r.onerror = (l) => {
2147
- s(l.target);
2148
- };
2149
- });
2150
- }
2151
- /**
2152
- * 查询数据
2153
- */
2154
- async getAsync(t) {
2155
- let s = await this.openDbAsync();
2156
- return new Promise((r, l) => {
2157
- if (t == null) {
2158
- r(null);
2159
- return;
2160
- }
2161
- let a = s.transaction(this.store, "readonly");
2162
- a.oncomplete = (o) => {
2163
- s.close();
2164
- }, a.onerror = (o) => {
2165
- l(o);
2166
- };
2167
- let c = a.objectStore(this.store).get(t);
2168
- c.onsuccess = (o) => {
2169
- let d = o.target.result;
2170
- r(d);
2171
- }, c.onerror = (o) => {
2172
- l(o.target);
2173
- };
2174
- });
2175
- }
2176
- /**
2177
- * 添加数据
2178
- */
2179
- async insertAsync(t, s) {
2180
- if (t == null || Object.is(t, NaN))
2181
- return;
2182
- let r = await this.openDbAsync();
2183
- return new Promise((l, a) => {
2184
- let i = r.transaction(this.store, "readwrite");
2185
- i.oncomplete = (d) => {
2186
- r.close();
2187
- }, i.onerror = (d) => {
2188
- a(d);
2189
- };
2190
- let o = i.objectStore(this.store).add(s, t);
2191
- o.onsuccess = (d) => {
2192
- let g = d.target.result;
2193
- l(g);
2194
- }, o.onerror = (d) => {
2195
- let g = d.target.error;
2196
- a(g.message);
2197
- };
2198
- });
2199
- }
2200
- /**
2201
- * 修改数据
2202
- */
2203
- async updateAsync(t, s) {
2204
- }
2205
- /**
2206
- * 保存数据,支持代理对象保存
2207
- */
2208
- async saveAsync(t, s) {
2209
- if (t == null || Object.is(t, NaN))
2210
- return;
2211
- let r = await this.openDbAsync();
2212
- return new Promise((l, a) => {
2213
- let i = r.transaction(this.store, "readwrite");
2214
- i.oncomplete = (g) => {
2215
- r.close();
2216
- }, i.onerror = (g) => {
2217
- a(g);
2218
- };
2219
- let c = V.clone(s), d = i.objectStore(this.store).put(c, t);
2220
- d.onsuccess = (g) => {
2221
- let h = g.target.result;
2222
- l(h);
2223
- }, d.onerror = (g) => {
2224
- let h = g.target.error;
2225
- a(h.message);
2226
- };
2227
- });
2228
- }
2229
- /**
2230
- * 删除数据
2231
- */
2232
- async deleteAsync(t) {
2233
- if (t == null || Object.is(t, NaN))
2234
- return;
2235
- let s = await this.openDbAsync();
2236
- return new Promise((r, l) => {
2237
- let a = s.transaction(this.store, "readwrite");
2238
- a.oncomplete = (o) => {
2239
- s.close();
2240
- }, a.onerror = (o) => {
2241
- l(o);
2242
- };
2243
- let c = a.objectStore(this.store).delete(t);
2244
- c.onsuccess = (o) => {
2245
- let d = o.target.result;
2246
- r(d);
2247
- }, c.onerror = (o) => {
2248
- let d = o.target.error.message;
2249
- l(d);
2250
- };
2251
- });
2252
- }
2253
- /**
2254
- * 提交事务
2255
- */
2256
- commit() {
2257
- }
2258
- /**
2259
- * 关闭连接
2260
- */
2261
- dispose() {
2262
- }
2263
- };
2264
- /**
2265
- * 静态版本,保证所有数据库实例拿到最新版本信息
2266
- */
2267
- n(q, "version", null);
2268
- let xe = q;
2269
- class Qt extends $ {
2270
- constructor() {
2271
- super(...arguments);
2272
- n(this, "_default");
2273
- }
2274
- getInstances() {
2275
- return [new xe()];
2276
- }
2277
- /**
2278
- * 获取指定类型的提供程序
2279
- */
2280
- async create(t, s) {
2281
- let r = await super.create(t);
2282
- return await r.openAsync(s), r;
2283
- }
2284
- /**
2285
- * 获取并开启默认驱动程序
2286
- */
2287
- async getDefault(t) {
2288
- return this._default != null ? this._default : (this._default = await this.create("IndexedDb", "halo"), t != null && await this._default.createAsync(t), this._default);
2289
- }
2290
- }
2291
- const Y = class Y {
2292
- /**
2293
- * 获取并缓存工厂实例
2294
- */
2295
- static create(e, t) {
2296
- let s = Y.mappings[e];
2297
- return s || (s = new t(), Y.mappings[e] = s), s;
2298
- }
2299
- //#endregion
2300
- //#region 工厂实例
2301
- /**
2302
- *获取CDN工厂
2303
- */
2304
- static getCdn() {
2305
- return this.create("CdnFactory", gt);
2306
- }
2307
- /**
2308
- *获取编码器工厂
2309
- */
2310
- static getEncoder() {
2311
- return this.create("EncoderFactory", ft);
2312
- }
2313
- /**
2314
- *获取Excel工厂
2315
- */
2316
- static getExcel() {
2317
- return this.create("ExcelFactory", yt);
2318
- }
2319
- /**
2320
- *获取Explainer工厂
2321
- */
2322
- static getExplainer() {
2323
- return this.create("ExplainerFactory", xt);
2324
- }
2325
- /**
2326
- *获取特征工厂
2327
- */
2328
- static getFeature() {
2329
- return this.create("FeatureFactory", Vt);
2330
- }
2331
- /**
2332
- *获取哈希工厂
2333
- */
2334
- static getHasher() {
2335
- return this.create("HasherFactory", Jt);
2336
- }
2337
- /**
2338
- *获取提供程序工厂
2339
- */
2340
- static getProvider() {
2341
- return this.create("ProviderFactory", Qt);
2342
- }
2343
- /**
2344
- *获取Http请求工厂
2345
- */
2346
- static getHttp() {
2347
- return this.create("HttpFactory", At);
2348
- }
2349
- /**
2350
- *获取签名工厂
2351
- */
2352
- static getSigner() {
2353
- return this.create("SignerFactory", Ct);
2354
- }
2355
- /**
2356
- *获取SSO工厂
2357
- */
2358
- static getSso() {
2359
- return this.create("SsoFactory", Tt);
2360
- }
2361
- //#endregion
2362
- };
2363
- //#region 缓存
2364
- /**
2365
- * 工厂缓存
2366
- */
2367
- n(Y, "mappings", {});
2368
- let Se = Y;
2369
- const C = Se;
2370
- C.getCdn();
2371
- C.getEncoder();
2372
- C.getExcel();
2373
- C.getExplainer();
2374
- C.getFeature();
2375
- let Yt = C.getHasher(), Kt = C.getHttp();
2376
- C.getProvider();
2377
- let Xt = C.getSigner(), Gt = C.getSso(), G = {}, Zt = {};
2378
- const Ht = {
2379
- key: 0,
2380
- class: "fa fa-upload"
2381
- }, _t = ["src"], ps = /* @__PURE__ */ Je({
2382
- __name: "Upload",
2383
- props: {
2384
- schema: {},
2385
- table: {},
2386
- field: {},
2387
- set: {},
2388
- row: {},
2389
- modelValue: {}
2390
- },
2391
- emits: ["submit", "change", "update:modelValue"],
2392
- setup(u, { emit: e }) {
2393
- let t = e, s = u, { table: r, field: l, row: a, set: i, modelValue: c } = We(s), o = z(!1), d = z({}), g = z([]), h = z(), I = z(), A = !0, T = z({ action: "", data: null }), $e = (m) => {
2394
- let y = st.getUploadToken();
2395
- m.forEach((w) => {
2396
- let b = `${me.upload.address}/api/objects/download?slug=${w[0]}&token=${y}`;
2397
- g.value.push({ name: w[1], url: b });
2398
- });
2399
- }, Re = async (m) => {
2400
- A = !1;
2401
- let y = `/upload?table=${r.value.name}&field=${l.value.name}`;
2402
- T.value.action = he.api.url + y;
2403
- let w = new Pe();
2404
- w.path = y, w.method = "POST", await fe.onRequest(w);
2405
- let b = w.getHeader("Authorization");
2406
- return d.value.Authorization = b, l.value.control.fileType == "Image" ? m.type.indexOf("image") == 0 ? Promise.resolve() : (et.error("请上传正确的图片文件"), Promise.reject()) : Promise.resolve();
2407
- }, De = (m, y) => {
2408
- A = !1;
2409
- let b = [m.name.replace(he.api.url, "")];
2410
- return fe.post("/upload/delete", { files: b }).then(({ data: S }) => {
2411
- let E = y.indexOf(m), ae = B.removeIndex(R.value, E, ",");
2412
- if (t("update:modelValue", ae), l.value.control.name) {
2413
- let J = r.value.fields.find((ue) => ue.name == l.value.control.name), ie = je.getValue(S.value, E, r.value, J), oe = B.removeIndex(ie, E, ",");
2414
- je.setValue(oe, S.value, r.value, E, J);
2415
- }
2416
- return Promise.resolve();
2417
- }).catch(() => Promise.reject());
2418
- }, Fe = (m) => {
2419
- o.value = !0, h.value = m.url;
2420
- }, Te = (m, y, w) => {
2421
- }, Be = (m, y) => {
2422
- fe.handleResponseBody(m).then((w) => {
2423
- let { name: b, url: S } = w.data[0];
2424
- me.upload.method == "box" || Ce.isImage(S) || (y.url = Ie.getFileIcon(S));
2425
- let ae = B.split(R.value, ",", S).join(",");
2426
- if (R.value = ae, l.value.control.name) {
2427
- let J = r.value.fields.find((ue) => ue.name == l.value.control.name), ie = a.value[J.value], oe = B.split(ie, ",", b);
2428
- a.value[J.value] = oe.join(",");
2429
- }
2430
- }).catch(() => {
2431
- g.value = [];
2432
- }).finally(() => {
2433
- A = !0;
2434
- });
2435
- }, ke = () => {
2436
- if (g.value = [], !R.value)
2437
- return;
2438
- let m = B.split(R.value, ","), y = [];
2439
- if (l.value.control.name) {
2440
- let b = r.value.fields.find((E) => E.name == l.value.control.name), S = a.value[b.name];
2441
- y = B.split(S, ",");
2442
- }
2443
- let w = B.combine(m, y);
2444
- if (me.upload.method == "box")
2445
- $e(w);
2446
- else {
2447
- let b = tt.httpOrHttps(R.value) ? R.value : he.api.url + R.value, S = { name: b, url: null };
2448
- Ce.isImage(b) ? S.url = b : S.url = Ie.getFileIcon(b), g.value.push(S);
2449
- }
2450
- };
2451
- Qe(() => {
2452
- ke();
2453
- });
2454
- let R = ce({
2455
- get() {
2456
- return c.value;
2457
- },
2458
- set(m) {
2459
- t("update:modelValue", m), t("change", m);
2460
- }
2461
- }), Le = ce(() => l.value.control.preview ? "picture-card" : null), qe = ce(() => qe);
2462
- return Ye(() => R.value, (m, y) => {
2463
- A && ke();
2464
- }), (m, y) => {
2465
- const w = de("el-button"), b = de("el-upload"), S = de("el-dialog");
2466
- return ge(), Ae("div", {
2467
- class: Ke(x(l).control.preview ? "control-file-preview" : "control-file")
2468
- }, [
2469
- Oe(b, {
2470
- ref_key: "uploadRef",
2471
- ref: I,
2472
- "list-type": x(Le),
2473
- action: x(T).action,
2474
- headers: x(d),
2475
- data: x(T).data,
2476
- "file-list": x(g),
2477
- "before-upload": x(Re),
2478
- "before-remove": x(De),
2479
- "on-preview": x(Fe),
2480
- "on-success": x(Be),
2481
- "on-progress": x(Te),
2482
- disabled: x(l).readonly
2483
- }, {
2484
- default: pe(() => [
2485
- x(l).control.preview ? (ge(), Ae("i", Ht)) : (ge(), Xe(w, {
2486
- key: 1,
2487
- icon: "el-icon-upload",
2488
- type: "primary"
2489
- }, {
2490
- default: pe(() => [
2491
- Ge(Ze(m.t("common.click_upload")), 1)
2492
- ]),
2493
- _: 1
2494
- }))
2495
- ]),
2496
- _: 1
2497
- }, 8, ["list-type", "action", "headers", "data", "file-list", "before-upload", "before-remove", "on-preview", "on-success", "on-progress", "disabled"]),
2498
- Oe(S, {
2499
- draggable: "",
2500
- "append-to-body": "",
2501
- modelValue: x(o),
2502
- "onUpdate:modelValue": y[0] || (y[0] = (E) => He(o) ? o.value = E : o = E)
2503
- }, {
2504
- default: pe(() => [
2505
- _e("img", {
2506
- width: "100%",
2507
- src: x(h),
2508
- alt: ""
2509
- }, null, 8, _t)
2510
- ]),
2511
- _: 1
2512
- }, 8, ["modelValue"])
2513
- ], 2);
2514
- };
2515
- }
2516
- });
2517
- export {
2518
- ps as default
2519
- };