foucui 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +43 -0
  2. package/components/QiuAffix/index.vue +186 -0
  3. package/components/QiuAlert/index.vue +208 -0
  4. package/components/QiuAnchor/context.ts +18 -0
  5. package/components/QiuAnchor/index.vue +180 -0
  6. package/components/QiuAnchorLink/index.vue +67 -0
  7. package/components/QiuApp/index.vue +9 -0
  8. package/components/QiuAutocomplete/index.vue +408 -0
  9. package/components/QiuAvatar/index.vue +140 -0
  10. package/components/QiuBacktop/index.vue +121 -0
  11. package/components/QiuBadge/api/index.ts +389 -0
  12. package/components/QiuBadge/components/BadgeImagePickerDialog.vue +243 -0
  13. package/components/QiuBadge/components/BadgeLibraryManagerDialog.vue +30 -0
  14. package/components/QiuBadge/components/BadgeLibraryPanel.vue +182 -0
  15. package/components/QiuBadge/composables/useTableHostHeight.ts +53 -0
  16. package/components/QiuBadge/index.ts +18 -0
  17. package/components/QiuBadge/shared/BadgeTemplateRenderer.vue +32 -0
  18. package/components/QiuBadge/shared/assetUrl.ts +26 -0
  19. package/components/QiuBadge/shared/badgeTemplate.ts +309 -0
  20. package/components/QiuBadge/utils/chinaAreaData.ts +44 -0
  21. package/components/QiuBadge/utils/hostRegion.ts +22 -0
  22. package/components/QiuBadge/utils/pca-code.json +1 -0
  23. package/components/QiuBadge/utils/pdfFromElement.ts +348 -0
  24. package/components/QiuBadge/views/BadgeLibraryView.vue +32 -0
  25. package/components/QiuBadge/views/BadgeManageView.vue +1364 -0
  26. package/components/QiuBadge/views/BadgeTemplateEditorView.vue +10 -0
  27. package/components/QiuBadge/views/BadgeTemplateListView.vue +229 -0
  28. package/components/QiuBadge/views/DeskLabelTemplateListView.vue +227 -0
  29. package/components/QiuBadge/views/DeskLabelView.vue +683 -0
  30. package/components/QiuBadgeDot/index.vue +87 -0
  31. package/components/QiuButton/index.vue +247 -0
  32. package/components/QiuButtonGroup/index.vue +63 -0
  33. package/components/QiuCanvasKit/QiuCanvasEditor.vue +5503 -0
  34. package/components/QiuCanvasKit/QiuCanvasRenderer.vue +348 -0
  35. package/components/QiuCanvasKit/assetUrl.ts +11 -0
  36. package/components/QiuCanvasKit/components/DataModulesPanel.vue +352 -0
  37. package/components/QiuCanvasKit/export/html.ts +132 -0
  38. package/components/QiuCanvasKit/export/pdf.ts +48 -0
  39. package/components/QiuCanvasKit/export/png.ts +50 -0
  40. package/components/QiuCanvasKit/index.ts +20 -0
  41. package/components/QiuCanvasKit/modules/badgeCompat.ts +84 -0
  42. package/components/QiuCanvasKit/modules/dataRegistry.ts +207 -0
  43. package/components/QiuCanvasKit/modules/merge.ts +71 -0
  44. package/components/QiuCanvasKit/presets/badge.ts +67 -0
  45. package/components/QiuCanvasKit/presets/banner.ts +79 -0
  46. package/components/QiuCanvasKit/types.ts +138 -0
  47. package/components/QiuCard/index.vue +104 -0
  48. package/components/QiuCarousel/context.ts +16 -0
  49. package/components/QiuCarousel/index.vue +343 -0
  50. package/components/QiuCarouselItem/index.vue +47 -0
  51. package/components/QiuCascader/index.vue +879 -0
  52. package/components/QiuCascader/types.ts +48 -0
  53. package/components/QiuCheckbox/QiuCheckboxGroup.vue +78 -0
  54. package/components/QiuCheckbox/index.vue +231 -0
  55. package/components/QiuCheckbox/types.ts +8 -0
  56. package/components/QiuCode/index.vue +64 -0
  57. package/components/QiuCol/col.scss +55 -0
  58. package/components/QiuCol/index.vue +64 -0
  59. package/components/QiuCollapse/context.ts +10 -0
  60. package/components/QiuCollapse/index.vue +70 -0
  61. package/components/QiuCollapseItem/index.vue +167 -0
  62. package/components/QiuColorField/index.vue +296 -0
  63. package/components/QiuColorPicker/README.md +118 -0
  64. package/components/QiuColorPicker/index.vue +60 -0
  65. package/components/QiuColorfulCard/index.vue +101 -0
  66. package/components/QiuCombobox/index.vue +277 -0
  67. package/components/QiuConfigProvider/index.vue +31 -0
  68. package/components/QiuContextMenu/index.vue +209 -0
  69. package/components/QiuDate/index.vue +1134 -0
  70. package/components/QiuDescriptions/context.ts +20 -0
  71. package/components/QiuDescriptions/index.vue +115 -0
  72. package/components/QiuDescriptionsItem/index.vue +103 -0
  73. package/components/QiuDialog/index.vue +828 -0
  74. package/components/QiuDigitalCard/index.vue +159 -0
  75. package/components/QiuDivider/index.vue +185 -0
  76. package/components/QiuDot/index.vue +83 -0
  77. package/components/QiuDrawer/index.vue +350 -0
  78. package/components/QiuDropdown/QiuDropdownItem.vue +74 -0
  79. package/components/QiuDropdown/QiuDropdownMenu.vue +22 -0
  80. package/components/QiuDropdown/context.ts +9 -0
  81. package/components/QiuDropdown/index.vue +189 -0
  82. package/components/QiuEmpty/index.vue +73 -0
  83. package/components/QiuForm/index.vue +172 -0
  84. package/components/QiuForm/types.ts +39 -0
  85. package/components/QiuFormItem/index.vue +276 -0
  86. package/components/QiuFullscreen/index.vue +11 -0
  87. package/components/QiuGrid/index.vue +408 -0
  88. package/components/QiuHoverCard/index.vue +192 -0
  89. package/components/QiuIcon/index.vue +117 -0
  90. package/components/QiuIconPicker/iconify.libraries.ts +182 -0
  91. package/components/QiuIconPicker/icons.catalog.ts +3072 -0
  92. package/components/QiuIconPicker/index.vue +488 -0
  93. package/components/QiuImage/index.vue +177 -0
  94. package/components/QiuInput/index.vue +328 -0
  95. package/components/QiuInputNumber/index.vue +295 -0
  96. package/components/QiuInputOtp/index.vue +190 -0
  97. package/components/QiuKbd/index.vue +57 -0
  98. package/components/QiuLayoutContainer/index.vue +50 -0
  99. package/components/QiuLinkPreview/index.vue +224 -0
  100. package/components/QiuLoading/index.ts +176 -0
  101. package/components/QiuLoading/spinner.vue +820 -0
  102. package/components/QiuLoading/types.ts +44 -0
  103. package/components/QiuMention/index.vue +299 -0
  104. package/components/QiuMenu/QiuMenuRoot.vue +241 -0
  105. package/components/QiuMenu/components/QiuMenuItem.vue +340 -0
  106. package/components/QiuMenu/components/QiuSubMenu.vue +504 -0
  107. package/components/QiuMenu/context.ts +21 -0
  108. package/components/QiuMenu/index.vue +43 -0
  109. package/components/QiuMenuNav/QiuMenuNavItem.vue +100 -0
  110. package/components/QiuMenuNav/QiuMenuNavSub.vue +120 -0
  111. package/components/QiuMenuNav/context.ts +14 -0
  112. package/components/QiuMenuNav/index.vue +148 -0
  113. package/components/QiuMsg/QiuMsgItem.vue +180 -0
  114. package/components/QiuMsg/index.ts +158 -0
  115. package/components/QiuMsg/types.ts +23 -0
  116. package/components/QiuMsgBox/index.ts +147 -0
  117. package/components/QiuNotification/QiuNotificationItem.vue +168 -0
  118. package/components/QiuNotification/index.ts +155 -0
  119. package/components/QiuNotification/types.ts +14 -0
  120. package/components/QiuPage/index.vue +12 -0
  121. package/components/QiuPageHeader/index.vue +115 -0
  122. package/components/QiuPageMain/index.vue +78 -0
  123. package/components/QiuPagination/index.vue +421 -0
  124. package/components/QiuPasswordStrength/index.vue +101 -0
  125. package/components/QiuPopconfirm/index.vue +196 -0
  126. package/components/QiuPopover/index.vue +277 -0
  127. package/components/QiuProgress/index.vue +235 -0
  128. package/components/QiuQrcode/index.vue +302 -0
  129. package/components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue +13 -0
  130. package/components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue +37 -0
  131. package/components/QiuQueryForm/components/QiuQueryFormRightPanel.vue +37 -0
  132. package/components/QiuQueryForm/components/QiuQueryFormTopPanel.vue +13 -0
  133. package/components/QiuQueryForm/index.vue +117 -0
  134. package/components/QiuRadio/QiuRadioGroup.vue +75 -0
  135. package/components/QiuRadio/index.vue +191 -0
  136. package/components/QiuRadio/types.ts +9 -0
  137. package/components/QiuRate/index.vue +184 -0
  138. package/components/QiuRefresh/index.vue +32 -0
  139. package/components/QiuResult/index.vue +103 -0
  140. package/components/QiuRow/index.vue +60 -0
  141. package/components/QiuRow/types.ts +5 -0
  142. package/components/QiuScrollbar/index.vue +107 -0
  143. package/components/QiuSearchBar/index.vue +154 -0
  144. package/components/QiuSegmented/index.vue +120 -0
  145. package/components/QiuSelect/QiuOption.vue +93 -0
  146. package/components/QiuSelect/index.vue +452 -0
  147. package/components/QiuSelect/types.ts +15 -0
  148. package/components/QiuSkeleton/index.vue +78 -0
  149. package/components/QiuSlider/index.vue +266 -0
  150. package/components/QiuSpace/index.vue +95 -0
  151. package/components/QiuSparkline/index.vue +92 -0
  152. package/components/QiuStatistic/index.vue +4 -0
  153. package/components/QiuStatistics/index.vue +123 -0
  154. package/components/QiuStep/index.vue +220 -0
  155. package/components/QiuSteps/context.ts +25 -0
  156. package/components/QiuSteps/index.vue +84 -0
  157. package/components/QiuSwitch/index.vue +145 -0
  158. package/components/QiuTabBar/index.vue +218 -0
  159. package/components/QiuTabBar/types.ts +19 -0
  160. package/components/QiuTabPane/index.vue +82 -0
  161. package/components/QiuTable/columns.ts +16 -0
  162. package/components/QiuTable/export.ts +102 -0
  163. package/components/QiuTable/index.ts +24 -0
  164. package/components/QiuTable/index.vue +3503 -0
  165. package/components/QiuTable/registry.ts +75 -0
  166. package/components/QiuTable/styles/table.scss +1230 -0
  167. package/components/QiuTable/types.ts +413 -0
  168. package/components/QiuTable/useArea.ts +202 -0
  169. package/components/QiuTable/useColumns.ts +325 -0
  170. package/components/QiuTable/useEdit.ts +136 -0
  171. package/components/QiuTable/useExtras.ts +115 -0
  172. package/components/QiuTable/useHistory.ts +77 -0
  173. package/components/QiuTable/useMerge.ts +105 -0
  174. package/components/QiuTable/useResize.ts +86 -0
  175. package/components/QiuTable/useScrollSync.ts +152 -0
  176. package/components/QiuTable/useVirtual.ts +97 -0
  177. package/components/QiuTable/utils.ts +165 -0
  178. package/components/QiuTableColumn/index.vue +101 -0
  179. package/components/QiuTag/index.vue +143 -0
  180. package/components/QiuText/index.vue +99 -0
  181. package/components/QiuTime/index.vue +548 -0
  182. package/components/QiuTimeAgo/index.vue +103 -0
  183. package/components/QiuTimeline/index.vue +54 -0
  184. package/components/QiuTimelineItem/index.vue +140 -0
  185. package/components/QiuTips/index.vue +323 -0
  186. package/components/QiuTooltip/index.vue +237 -0
  187. package/components/QiuTransfer/index.vue +277 -0
  188. package/components/QiuTree/QiuTreeNode.vue +146 -0
  189. package/components/QiuTree/index.vue +143 -0
  190. package/components/QiuTree/types.ts +30 -0
  191. package/components/QiuTreeSelect/index.vue +259 -0
  192. package/components/QiuTrend/index.vue +92 -0
  193. package/components/QiuUpload/index.vue +628 -0
  194. package/components/QiuUploadCrop/index.vue +1267 -0
  195. package/components/QiuWatermark/index.vue +121 -0
  196. package/components/useBodyScrollLock.ts +28 -0
  197. package/dist/components/QiuAnchor/context.d.ts +15 -0
  198. package/dist/components/QiuAnchorLink/index.vue.d.ts +23 -0
  199. package/dist/components/QiuBadge/api/index.d.ts +110 -0
  200. package/dist/components/QiuBadge/components/BadgeImagePickerDialog.vue.d.ts +16 -0
  201. package/dist/components/QiuBadge/components/BadgeLibraryManagerDialog.vue.d.ts +9 -0
  202. package/dist/components/QiuBadge/components/BadgeLibraryPanel.vue.d.ts +5 -0
  203. package/dist/components/QiuBadge/composables/useTableHostHeight.d.ts +7 -0
  204. package/dist/components/QiuBadge/index.d.ts +18 -0
  205. package/dist/components/QiuBadge/shared/BadgeTemplateRenderer.vue.d.ts +14 -0
  206. package/dist/components/QiuBadge/shared/assetUrl.d.ts +1 -0
  207. package/dist/components/QiuBadge/shared/badgeTemplate.d.ts +132 -0
  208. package/dist/components/QiuBadge/utils/chinaAreaData.d.ts +9 -0
  209. package/dist/components/QiuBadge/utils/hostRegion.d.ts +3 -0
  210. package/dist/components/QiuBadge/utils/pca-code.json.d.ts +3 -0
  211. package/dist/components/QiuBadge/utils/pdfFromElement.d.ts +14 -0
  212. package/dist/components/QiuBadge/views/BadgeLibraryView.vue.d.ts +2 -0
  213. package/dist/components/QiuBadge/views/BadgeManageView.vue.d.ts +7 -0
  214. package/dist/components/QiuBadge/views/BadgeTemplateListView.vue.d.ts +4 -0
  215. package/dist/components/QiuBadge/views/DeskLabelTemplateListView.vue.d.ts +4 -0
  216. package/dist/components/QiuBadge/views/DeskLabelView.vue.d.ts +4 -0
  217. package/dist/components/QiuButton/index.vue.d.ts +52 -0
  218. package/dist/components/QiuCanvasKit/QiuCanvasEditor.vue.d.ts +24 -0
  219. package/dist/components/QiuCanvasKit/QiuCanvasRenderer.vue.d.ts +13 -0
  220. package/dist/components/QiuCanvasKit/assetUrl.d.ts +7 -0
  221. package/dist/components/QiuCanvasKit/components/DataModulesPanel.vue.d.ts +23 -0
  222. package/dist/components/QiuCanvasKit/export/html.d.ts +12 -0
  223. package/dist/components/QiuCanvasKit/export/pdf.d.ts +9 -0
  224. package/dist/components/QiuCanvasKit/export/png.d.ts +8 -0
  225. package/dist/components/QiuCanvasKit/index.d.ts +19 -0
  226. package/dist/components/QiuCanvasKit/modules/badgeCompat.d.ts +8 -0
  227. package/dist/components/QiuCanvasKit/modules/dataRegistry.d.ts +23 -0
  228. package/dist/components/QiuCanvasKit/modules/merge.d.ts +12 -0
  229. package/dist/components/QiuCanvasKit/presets/badge.d.ts +12 -0
  230. package/dist/components/QiuCanvasKit/presets/banner.d.ts +4 -0
  231. package/dist/components/QiuCanvasKit/types.d.ts +119 -0
  232. package/dist/components/QiuCarousel/context.d.ts +13 -0
  233. package/dist/components/QiuCarouselItem/index.vue.d.ts +20 -0
  234. package/dist/components/QiuCascader/types.d.ts +25 -0
  235. package/dist/components/QiuCheckbox/QiuCheckboxGroup.vue.d.ts +33 -0
  236. package/dist/components/QiuCheckbox/index.vue.d.ts +38 -0
  237. package/dist/components/QiuCheckbox/types.d.ts +7 -0
  238. package/dist/components/QiuCode/index.vue.d.ts +15 -0
  239. package/dist/components/QiuCollapse/context.d.ts +8 -0
  240. package/dist/components/QiuCollapseItem/index.vue.d.ts +30 -0
  241. package/dist/components/QiuColorField/index.vue.d.ts +23 -0
  242. package/dist/components/QiuColorPicker/index.vue.d.ts +21 -0
  243. package/dist/components/QiuCombobox/index.vue.d.ts +54 -0
  244. package/dist/components/QiuContextMenu/index.vue.d.ts +46 -0
  245. package/dist/components/QiuDescriptions/context.d.ts +16 -0
  246. package/dist/components/QiuDescriptionsItem/index.vue.d.ts +25 -0
  247. package/dist/components/QiuDigitalCard/index.vue.d.ts +45 -0
  248. package/dist/components/QiuDropdown/QiuDropdownItem.vue.d.ts +30 -0
  249. package/dist/components/QiuDropdown/QiuDropdownMenu.vue.d.ts +17 -0
  250. package/dist/components/QiuDropdown/context.d.ts +7 -0
  251. package/dist/components/QiuDropdown/index.vue.d.ts +46 -0
  252. package/dist/components/QiuForm/types.d.ts +31 -0
  253. package/dist/components/QiuHoverCard/index.vue.d.ts +44 -0
  254. package/dist/components/QiuIcon/index.vue.d.ts +18 -0
  255. package/dist/components/QiuIconPicker/iconify.libraries.d.ts +18 -0
  256. package/dist/components/QiuIconPicker/icons.catalog.d.ts +12 -0
  257. package/dist/components/QiuInput/index.vue.d.ts +71 -0
  258. package/dist/components/QiuInputNumber/index.vue.d.ts +38 -0
  259. package/dist/components/QiuInputOtp/index.vue.d.ts +28 -0
  260. package/dist/components/QiuKbd/index.vue.d.ts +22 -0
  261. package/dist/components/QiuLayoutContainer/index.vue.d.ts +29 -0
  262. package/dist/components/QiuLinkPreview/index.vue.d.ts +43 -0
  263. package/dist/components/QiuLoading/index.d.ts +26 -0
  264. package/dist/components/QiuLoading/spinner.vue.d.ts +14 -0
  265. package/dist/components/QiuLoading/types.d.ts +2 -0
  266. package/dist/components/QiuMention/index.vue.d.ts +35 -0
  267. package/dist/components/QiuMenu/QiuMenuRoot.vue.d.ts +36 -0
  268. package/dist/components/QiuMenu/context.d.ts +19 -0
  269. package/dist/components/QiuMenuNav/QiuMenuNavItem.vue.d.ts +26 -0
  270. package/dist/components/QiuMenuNav/QiuMenuNavSub.vue.d.ts +25 -0
  271. package/dist/components/QiuMenuNav/context.d.ts +12 -0
  272. package/dist/components/QiuMenuNav/index.vue.d.ts +35 -0
  273. package/dist/components/QiuMsg/QiuMsgItem.vue.d.ts +15 -0
  274. package/dist/components/QiuMsg/index.d.ts +30 -0
  275. package/dist/components/QiuMsg/types.d.ts +12 -0
  276. package/dist/components/QiuMsgBox/index.d.ts +14 -0
  277. package/dist/components/QiuNotification/QiuNotificationItem.vue.d.ts +16 -0
  278. package/dist/components/QiuNotification/index.d.ts +30 -0
  279. package/dist/components/QiuNotification/types.d.ts +12 -0
  280. package/dist/components/QiuPageMain/index.vue.d.ts +27 -0
  281. package/dist/components/QiuPagination/index.vue.d.ts +44 -0
  282. package/dist/components/QiuPasswordStrength/index.vue.d.ts +9 -0
  283. package/dist/components/QiuQrcode/index.vue.d.ts +20 -0
  284. package/dist/components/QiuRadio/QiuRadioGroup.vue.d.ts +33 -0
  285. package/dist/components/QiuRadio/types.d.ts +8 -0
  286. package/dist/components/QiuRow/types.d.ts +4 -0
  287. package/dist/components/QiuSearchBar/index.vue.d.ts +38 -0
  288. package/dist/components/QiuSelect/QiuOption.vue.d.ts +24 -0
  289. package/dist/components/QiuSelect/index.vue.d.ts +52 -0
  290. package/dist/components/QiuSelect/types.d.ts +13 -0
  291. package/dist/components/QiuSparkline/index.vue.d.ts +18 -0
  292. package/dist/components/QiuStep/index.vue.d.ts +31 -0
  293. package/dist/components/QiuSteps/context.d.ts +21 -0
  294. package/dist/components/QiuSwitch/index.vue.d.ts +25 -0
  295. package/dist/components/QiuTabBar/index.vue.d.ts +32 -0
  296. package/dist/components/QiuTabBar/types.d.ts +16 -0
  297. package/dist/components/QiuTabPane/index.vue.d.ts +25 -0
  298. package/dist/components/QiuTable/columns.d.ts +1 -0
  299. package/dist/components/QiuTable/export.d.ts +18 -0
  300. package/dist/components/QiuTable/index.d.ts +3 -0
  301. package/dist/components/QiuTable/index.vue.d.ts +322 -0
  302. package/dist/components/QiuTable/registry.d.ts +39 -0
  303. package/dist/components/QiuTable/types.d.ts +353 -0
  304. package/dist/components/QiuTable/useArea.d.ts +51 -0
  305. package/dist/components/QiuTable/useColumns.d.ts +67 -0
  306. package/dist/components/QiuTable/useEdit.d.ts +36 -0
  307. package/dist/components/QiuTable/useExtras.d.ts +38 -0
  308. package/dist/components/QiuTable/useHistory.d.ts +44 -0
  309. package/dist/components/QiuTable/useMerge.d.ts +28 -0
  310. package/dist/components/QiuTable/useResize.d.ts +19 -0
  311. package/dist/components/QiuTable/useScrollSync.d.ts +25 -0
  312. package/dist/components/QiuTable/useVirtual.d.ts +30 -0
  313. package/dist/components/QiuTable/utils.d.ts +54 -0
  314. package/dist/components/QiuTime/index.vue.d.ts +43 -0
  315. package/dist/components/QiuTimeAgo/index.vue.d.ts +35 -0
  316. package/dist/components/QiuTimelineItem/index.vue.d.ts +35 -0
  317. package/dist/components/QiuTooltip/index.vue.d.ts +38 -0
  318. package/dist/components/QiuTree/types.d.ts +13 -0
  319. package/dist/components/QiuTrend/index.vue.d.ts +34 -0
  320. package/dist/components/QiuUpload/index.vue.d.ts +86 -0
  321. package/dist/components/QiuUploadCrop/index.vue.d.ts +136 -0
  322. package/dist/components/useBodyScrollLock.d.ts +4 -0
  323. package/dist/foucui.css +1 -0
  324. package/dist/foucui.js +26509 -0
  325. package/dist/foucui.umd.cjs +125 -0
  326. package/dist/index.d.ts +46 -0
  327. package/dist/src/bridge/@/api/media.d.ts +7 -0
  328. package/dist/src/bridge/@/api/notice.d.ts +5 -0
  329. package/dist/src/bridge/@/config/index.d.ts +29 -0
  330. package/dist/src/bridge/@/config/media.config.d.ts +15 -0
  331. package/dist/src/bridge/@/config/security.config.d.ts +7 -0
  332. package/dist/src/bridge/@/i18n/index.d.ts +7 -0
  333. package/dist/src/bridge/@/store/modules/bing.d.ts +3 -0
  334. package/dist/src/bridge/@/store/modules/errorLog.d.ts +3 -0
  335. package/dist/src/bridge/@/store/modules/media.d.ts +4 -0
  336. package/dist/src/bridge/@/store/modules/routes.d.ts +3 -0
  337. package/dist/src/bridge/@/store/modules/settings.d.ts +3 -0
  338. package/dist/src/bridge/@/store/modules/tabs.d.ts +3 -0
  339. package/dist/src/bridge/@/store/modules/user.d.ts +3 -0
  340. package/dist/src/bridge/@/utils/convertToCamelCase.d.ts +2 -0
  341. package/dist/src/bridge/@/utils/index.d.ts +5 -0
  342. package/dist/src/bridge/@/utils/pageTitle.d.ts +1 -0
  343. package/dist/src/bridge/@/utils/routes.d.ts +11 -0
  344. package/dist/src/bridge/@/utils/validate.d.ts +13 -0
  345. package/dist/src/bridge/@qiu/plugins/shortcuts.d.ts +2 -0
  346. package/dist/src/i18n.d.ts +2 -0
  347. package/package.json +83 -0
  348. package/plugins/qiu.ts +83 -0
  349. package/plugins/shortcuts.ts +69 -0
  350. package/src/bridge/@/api/media.ts +8 -0
  351. package/src/bridge/@/api/notice.ts +5 -0
  352. package/src/bridge/@/config/index.ts +38 -0
  353. package/src/bridge/@/config/media.config.ts +37 -0
  354. package/src/bridge/@/config/security.config.ts +8 -0
  355. package/src/bridge/@/i18n/index.ts +6 -0
  356. package/src/bridge/@/store/modules/bing.ts +9 -0
  357. package/src/bridge/@/store/modules/errorLog.ts +9 -0
  358. package/src/bridge/@/store/modules/media.ts +10 -0
  359. package/src/bridge/@/store/modules/routes.ts +10 -0
  360. package/src/bridge/@/store/modules/settings.ts +9 -0
  361. package/src/bridge/@/store/modules/tabs.ts +9 -0
  362. package/src/bridge/@/store/modules/user.ts +9 -0
  363. package/src/bridge/@/utils/convertToCamelCase.ts +11 -0
  364. package/src/bridge/@/utils/index.ts +9 -0
  365. package/src/bridge/@/utils/pageTitle.ts +4 -0
  366. package/src/bridge/@/utils/routes.ts +14 -0
  367. package/src/bridge/@/utils/validate.ts +17 -0
  368. package/src/bridge/@qiu/plugins/shortcuts.ts +3 -0
  369. package/src/i18n.ts +8 -0
  370. package/src/icons/qiu-logo.svg +1 -0
  371. package/styles/dark.scss +194 -0
  372. package/styles/normalize.css +349 -0
  373. package/styles/plain.scss +423 -0
  374. package/styles/qiu-tokens.scss +40 -0
  375. package/styles/qiu.scss +1149 -0
  376. package/styles/technology.scss +452 -0
  377. package/styles/var.scss +382 -0
  378. package/styles/variables.scss +77 -0
@@ -0,0 +1,125 @@
1
+ (function(Ie,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@iconify/vue"),require("@vueuse/core"),require("sortablejs"),require("lunar-javascript"),require("vue-router"),require("html2canvas"),require("jspdf"),require("pinia"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","@iconify/vue","@vueuse/core","sortablejs","lunar-javascript","vue-router","html2canvas","jspdf","pinia","lodash-es"],e):(Ie=typeof globalThis<"u"?globalThis:Ie||self,e(Ie.Foucui={},Ie.Vue,Ie.IconifyVue,Ie.VueUse,Ie.Sortable,Ie.lunarJavascript,Ie.VueRouter,Ie.html2canvas,Ie.jspdf,Ie.Pinia,Ie.lodashEs))})(this,(function(Ie,e,wr,na,xr,ad,Cn,Vr,Cr,id,ti){"use strict";const Nr=Object.freeze(Object.defineProperty({__proto__:null,get default(){return vk}},Symbol.toStringTag,{value:"Module"})),rd=e.defineComponent({name:"QiuAffix",__name:"index",props:{offset:{default:0},position:{default:"top"},zIndex:{default:100},target:{default:""}},emits:["change","scroll"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.ref(null),f=e.ref(!1),u=e.ref(0),h=e.computed(()=>!!o.target),p=()=>o.target&&document.querySelector(o.target)||window,_=()=>{if(h.value)return;const M=c.value,V=d.value;if(!M||!V)return;const E=p(),x=M.getBoundingClientRect();u.value=V.offsetHeight;let m=!1;if(o.position==="top")if(E===window)m=x.top<=o.offset;else{const S=E.getBoundingClientRect().top;m=x.top<=S+o.offset}else if(E===window)m=x.bottom>=window.innerHeight-o.offset;else{const S=E.getBoundingClientRect().bottom;m=x.bottom>=S-o.offset}m!==f.value&&(f.value=m,r("change",m));const w=E===window?window.scrollY||document.documentElement.scrollTop:E.scrollTop;r("scroll",{scrollTop:w,fixed:f.value})},B=e.computed(()=>{var E;if(h.value)return{position:"sticky",zIndex:String(o.zIndex),...o.position==="top"?{top:`${o.offset}px`}:{bottom:`${o.offset}px`}};if(!f.value)return;const M=p(),V={position:"fixed",zIndex:String(o.zIndex),width:`${((E=c.value)==null?void 0:E.offsetWidth)??0}px`};if(o.position==="top"){const x=M===window?o.offset:M.getBoundingClientRect().top+o.offset;V.top=`${x}px`}else{const x=M===window?o.offset:window.innerHeight-M.getBoundingClientRect().bottom+o.offset;V.bottom=`${x}px`}if(M!==window){const x=M.getBoundingClientRect();V.left=`${x.left}px`,V.width=`${x.width}px`}else c.value&&(V.left=`${c.value.getBoundingClientRect().left}px`);return V});let $=window;const b=()=>_(),C=()=>_(),k=()=>{$.removeEventListener("scroll",b),window.removeEventListener("resize",C),!h.value&&($=p(),$.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",C,{passive:!0}),_())};return e.onMounted(()=>{e.nextTick(k)}),e.onBeforeUnmount(()=>{$.removeEventListener("scroll",b),window.removeEventListener("resize",C)}),e.watch(()=>[o.target,o.offset,o.position],()=>e.nextTick(k)),a({update:_}),(M,V)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:c,class:"qiu-affix"},[e.unref(f)&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-affix__placeholder",style:e.normalizeStyle({height:`${e.unref(u)}px`})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"affixRef",ref:d,class:e.normalizeClass(["qiu-affix__content",{"is-fixed":e.unref(f)&&!e.unref(h),"is-sticky":e.unref(h)}]),style:e.normalizeStyle(e.unref(B))},[e.renderSlot(M.$slots,"default",{},void 0,!0)],6)],512))}}),de=(t,a)=>{const n=t.__vccOpts||t;for(const[o,r]of a)n[o]=r;return n},cd=Object.freeze(Object.defineProperty({__proto__:null,default:de(rd,[["__scopeId","data-v-4f930bf1"]])},Symbol.toStringTag,{value:"Module"})),sd=["viewBox"],dd=["href","xlink:href"],_t=de(e.defineComponent({name:"QiuIcon",__name:"index",props:{icon:{default:""},isCustomSvg:{type:Boolean,default:!1},keepColor:{type:Boolean,default:!1},viewBox:{default:""}},emits:["click"],setup(t,{emit:a}){const n=t,o=a,r=e.computed(()=>String(n.icon||"").trim()),c=e.computed(()=>{const p=r.value;return!!p&&p.includes(":")&&!p.startsWith("http")&&!n.isCustomSvg}),d=e.computed(()=>r.value),f=e.computed(()=>{const p=r.value;return p?p.startsWith("ri-")?p:`ri-${p}`:""}),u=e.computed(()=>`#qiu-icon-${r.value}`),h=p=>o("click",p);return(p,_)=>e.unref(c)?(e.openBlock(),e.createElementBlock("span",{key:0,"aria-hidden":"true",class:"qiu-icon qiu-icon--iconify",onClick:h},[e.createVNode(e.unref(wr.Icon),{icon:e.unref(d),width:"1em",height:"1em"},null,8,["icon"])])):t.isCustomSvg?(e.openBlock(),e.createElementBlock("svg",{key:1,"aria-hidden":"true",class:e.normalizeClass(["qiu-icon qiu-icon--svg",{"is-keep-color":t.keepColor}]),viewBox:t.viewBox||void 0,onClick:h},[e.createElementVNode("use",{href:e.unref(u),"xlink:href":e.unref(u)},null,8,dd)],10,sd)):(e.openBlock(),e.createElementBlock("i",{key:2,"aria-hidden":"true",class:e.normalizeClass(["qiu-icon",e.unref(f)]),onClick:h},null,2))}}),[["__scopeId","data-v-8741443d"]]),md=Object.freeze(Object.defineProperty({__proto__:null,default:_t},Symbol.toStringTag,{value:"Module"})),ud={class:"qiu-alert__content"},fd={key:0,class:"qiu-alert__title"},pd={key:1,class:"qiu-alert__description"},hd=["aria-label"],gd={key:0},_d=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuAlert",__name:"index",props:{title:{type:String,default:""},description:{type:String,default:""},type:{type:String,default:"info"},closable:{type:Boolean,default:!1},closeText:{type:String,default:""},showIcon:{type:Boolean,default:!1},center:{type:Boolean,default:!1},effect:{type:String,default:"light"}},emits:["close"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(!0),c=e.computed(()=>n.type==="danger"?"error":n.type),d=e.computed(()=>{const u={success:"checkbox-circle-line",warning:"error-warning-line",info:"information-line",error:"close-circle-line"};return u[c.value]||u.info}),f=()=>{r.value=!1,o("close")};return(u,h)=>{const p=_t;return e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["qiu-alert",[`qiu-alert--${e.unref(c)}`,`qiu-alert--${t.effect}`,{"is-center":t.center}]],role:"alert"},u.$attrs),[t.showIcon?(e.openBlock(),e.createBlock(p,{key:0,class:"qiu-alert__icon",icon:e.unref(d)},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("div",ud,[t.title||u.$slots.title?(e.openBlock(),e.createElementBlock("div",fd,[e.renderSlot(u.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),u.$slots.default||t.description?(e.openBlock(),e.createElementBlock("div",pd,[e.renderSlot(u.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0)]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-alert__close","aria-label":t.closeText||"Close",onClick:f},[t.closeText?(e.openBlock(),e.createElementBlock("span",gd,e.toDisplayString(t.closeText),1)):(e.openBlock(),e.createBlock(p,{key:1,icon:"close-line"}))],8,hd)):e.createCommentVNode("",!0)],16)),[[e.vShow,e.unref(r)]])}}}),[["__scopeId","data-v-20669d7e"]])},Symbol.toStringTag,{value:"Module"})),Br=Symbol("QiuAnchor"),bd={class:"qiu-anchor"},yd=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuAnchor",__name:"index",props:{offset:{default:0},bound:{default:""}},setup(t){const a=t,n=e.ref([]),o=e.ref(""),r=k=>{const M=window.getComputedStyle(k);return/(auto|scroll)/.test(M.overflow+M.overflowY+M.overflowX)},c=k=>{let M=k.parentElement;for(;M;){if(r(M))return M;M=M.parentElement}return window},d=k=>a.bound?document.querySelector(a.bound)||window:k?c(k):window,f=k=>k===window?window.scrollY||document.documentElement.scrollTop:k.scrollTop,u=k=>{const M=k.replace(/^#/,""),V=document.getElementById(M);if(!V)return;const E=d(V);if(E===window){const x=V.getBoundingClientRect().top+f(window)-a.offset;window.scrollTo({top:x,behavior:"smooth"})}else{const x=E,m=x.getBoundingClientRect(),S=V.getBoundingClientRect().top-m.top+x.scrollTop-a.offset;x.scrollTo({top:S,behavior:"smooth"})}o.value=k},h=k=>{const M=n.value.findIndex(V=>V.href===k.href);M>=0?n.value[M]=k:n.value.push(k),n.value.sort((V,E)=>{const x=document.querySelector(V.href),m=document.querySelector(E.href);return!x||!m?0:x.getBoundingClientRect().top-m.getBoundingClientRect().top})},p=k=>{n.value=n.value.filter(M=>M.href!==k)},_=()=>{if(a.bound)return document.querySelector(a.bound)||window;for(const k of n.value){const M=document.querySelector(k.href);if(M)return c(M)}return window},B=()=>{const k=_(),M=f(k),V=k===window?0:k.getBoundingClientRect().top;let E="";for(const x of n.value){const m=x.href.replace(/^#/,""),w=document.getElementById(m);if(!w)continue;(k===window?w.getBoundingClientRect().top+M:w.getBoundingClientRect().top-V+M)-a.offset<=M+1&&(E=x.href)}E&&(o.value=E)};e.provide(Br,{offset:e.toRef(a,"offset"),bound:e.toRef(a,"bound"),activeLink:o,registerLink:h,unregisterLink:p,scrollToLink:u});let $=window;const b=()=>B(),C=()=>{const k=_();k!==$&&($.removeEventListener("scroll",b),$=k,$.addEventListener("scroll",b,{passive:!0}))};return e.onMounted(()=>{$=_(),$.addEventListener("scroll",b,{passive:!0}),B()}),e.onBeforeUnmount(()=>{$.removeEventListener("scroll",b)}),e.watch(()=>a.bound,()=>{C(),B()}),e.watch(()=>n.value.map(k=>k.href).join(","),()=>{C(),B()},{flush:"post"}),(k,M)=>(e.openBlock(),e.createElementBlock("div",bd,[e.renderSlot(k.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-875ff820"]])},Symbol.toStringTag,{value:"Module"})),kd=["href"],$r=de(e.defineComponent({name:"QiuAnchorLink",__name:"index",props:{href:{},title:{default:""}},setup(t){const a=t,n=e.inject(Br,null),o=e.ref(null),r=e.computed(()=>(n==null?void 0:n.activeLink.value)===a.href),c=()=>{n==null||n.scrollToLink(a.href)};return e.onMounted(()=>{n==null||n.registerLink({href:a.href,title:a.title,el:o.value})}),e.onBeforeUnmount(()=>{n==null||n.unregisterLink(a.href)}),(d,f)=>(e.openBlock(),e.createElementBlock("a",{class:e.normalizeClass(["qiu-anchor-link",{"is-active":e.unref(r)}]),href:t.href,onClick:e.withModifiers(c,["prevent"])},[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)],10,kd))}}),[["__scopeId","data-v-830341e4"]]),wd=Object.freeze(Object.defineProperty({__proto__:null,default:$r},Symbol.toStringTag,{value:"Module"})),xd=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuApp",__name:"index",setup(t){return(a,n)=>{const o=e.resolveComponent("router-view");return e.openBlock(),e.createBlock(o)}}})},Symbol.toStringTag,{value:"Module"})),Vd=["autofocus","disabled","placeholder","readonly","required","type","value","onKeydown"],Cd={class:"qiu-autocomplete-suffix"},Nd={key:0,class:"qiu-autocomplete-list"},Bd=["title","onClick","onMouseenter"],$d={class:"qiu-ellipsis"},Ed={key:0,class:"qiu-autocomplete-empty"},Sd=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuAutocomplete",__name:"index",props:{value:{default:""},modelValue:{type:[String,Boolean],default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},autofocus:{type:Boolean,default:!1},required:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},type:{default:"text"},maxlength:{default:0},minlength:{default:1},width:{default:"100%"},height:{default:"32px"},list:{default:()=>[]},searchekey:{default:()=>["value"]},showkey:{default:()=>["value"]},showline:{default:" - "},valueKey:{default:"value"}},emits:["update:modelValue","change","itemclick"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(!1),c=e.ref(!1),d=e.ref(null),f=e.ref([...n.list]),u=e.ref(-1),h=e.computed(()=>n.modelValue!==""&&n.modelValue!==void 0&&n.modelValue!==null?String(n.modelValue):n.value||""),p=e.computed(()=>h.value.length>0);e.watch(()=>n.list,m=>{f.value=[...m]},{deep:!0});const _=m=>n.showkey.map(w=>Reflect.has(m,w)?String(m[w]??""):"").filter(Boolean).join(n.showline),B=(m,w,S)=>{const N=[];if(!Array.isArray(m)||typeof w!="string")return f.value=N,N;const D=Array.isArray(S)?S:["value"],T=w.toLowerCase();for(const L of m)for(const U of D)if(Reflect.has(L,U)&&String(L[U]).toLowerCase().includes(T)){N.push(L);break}return f.value=N,u.value=N.length?0:-1,N},$=m=>{const w=m.target;e.nextTick(()=>{d.value&&(w.value.length>0?(r.value=!0,B(n.list,w.value,n.searchekey)):(r.value=!1,f.value=[...n.list]))}),o("update:modelValue",w.value),o("change",w.value)},b=m=>{const w=String(m[n.valueKey]??m.value??"");d.value&&(d.value.value=w),o("change",w),o("update:modelValue",w),o("itemclick",m),r.value=!1},C=()=>{var m,w;if(!(n.disabled||n.readonly)&&(r.value=!r.value,r.value)){(m=d.value)==null||m.focus();const S=((w=d.value)==null?void 0:w.value)||"";S?B(n.list,S,n.searchekey):f.value=[...n.list]}},k=()=>{var m;if(c.value=!0,!n.disabled&&!n.readonly){r.value=!0;const w=((m=d.value)==null?void 0:m.value)||"";w?B(n.list,w,n.searchekey):f.value=[...n.list]}},M=()=>{var m;d.value&&(d.value.value=""),r.value=!1,f.value=[...n.list],o("change",""),o("update:modelValue",""),(m=d.value)==null||m.focus()},V=m=>{if(!r.value||!f.value.length)return;const w=f.value.length;u.value=(u.value+m+w)%w},E=()=>{u.value>=0&&f.value[u.value]&&b(f.value[u.value])},x=m=>{var N,D,T;const w=(D=(N=m.target)==null?void 0:N.closest)==null?void 0:D.call(N,".qiu-autocomplete"),S=(T=d.value)==null?void 0:T.closest(".qiu-autocomplete");S&&w!==S&&(r.value=!1)};return e.onMounted(()=>document.addEventListener("mousedown",x)),e.onUnmounted(()=>document.removeEventListener("mousedown",x)),(m,w)=>{const S=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-autocomplete",{"is-disabled":n.disabled,"is-focused":e.unref(c),"is-clearable":n.clearable,"has-value":e.unref(p)}]),style:e.normalizeStyle({width:n.width})},[e.createElementVNode("input",{ref_key:"inputRef",ref:d,autofocus:n.autofocus,class:"qiu-autocomplete-input",disabled:n.disabled,placeholder:n.placeholder,readonly:n.readonly,required:n.required,style:e.normalizeStyle({height:n.height}),type:n.type,value:e.unref(h),onChange:$,onInput:$,onFocus:k,onBlur:w[0]||(w[0]=N=>c.value=!1),onKeydown:[w[1]||(w[1]=e.withKeys(e.withModifiers(N=>V(1),["prevent"]),["down"])),w[2]||(w[2]=e.withKeys(e.withModifiers(N=>V(-1),["prevent"]),["up"])),e.withKeys(e.withModifiers(E,["prevent"]),["enter"]),w[3]||(w[3]=e.withKeys(N=>r.value=!1,["esc"]))]},null,44,Vd),e.createElementVNode("div",Cd,[e.withDirectives(e.createElementVNode("button",{type:"button",class:"qiu-autocomplete-clear",tabindex:"-1",title:"清空",onMousedown:w[4]||(w[4]=e.withModifiers(()=>{},["prevent"])),onClick:M},[e.createVNode(S,{icon:"close-circle-fill"})],544),[[e.vShow,n.clearable&&e.unref(p)]]),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["qiu-autocomplete-caret",{"is-open":e.unref(r)}]),tabindex:"-1",onMousedown:w[5]||(w[5]=e.withModifiers(()=>{},["prevent"])),onClick:C},[e.createVNode(S,{icon:"arrow-down-s-line"})],34)]),e.unref(r)?(e.openBlock(),e.createElementBlock("div",Nd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),(N,D)=>(e.openBlock(),e.createElementBlock("div",{key:D,class:e.normalizeClass(["qiu-autocomplete-list-item",{"is-active":D===e.unref(u)}]),title:_(N),onMousedown:w[6]||(w[6]=e.withModifiers(()=>{},["prevent"])),onClick:T=>b(N),onMouseenter:T=>u.value=D},[e.createElementVNode("span",$d,e.toDisplayString(_(N)),1)],42,Bd))),128)),e.unref(f).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ed,"无匹配数据"))])):e.createCommentVNode("",!0)],6)}}}),[["__scopeId","data-v-3cb8dd98"]])},Symbol.toStringTag,{value:"Module"})),Md=["src","alt"],qd={key:1,class:"qiu-avatar__slot"},zd={key:2,class:"qiu-avatar__text"},Td=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuAvatar",__name:"index",props:{src:{},alt:{default:""},size:{default:"default"},shape:{default:"circle"},fit:{default:"cover"},text:{default:""},icon:{}},emits:["error"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(!1);e.watch(()=>n.src,()=>{r.value=!1});const c=e.computed(()=>typeof n.size=="number"?"custom":n.size),d=e.computed(()=>{if(typeof n.size!="number")return;const h=`${n.size}px`;return{width:h,height:h,fontSize:`${Math.max(12,n.size*.4)}px`}}),f=e.computed(()=>n.text?n.text.slice(0,2):"?"),u=h=>{r.value=!0,o("error",h)};return(h,p)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["qiu-avatar",[`qiu-avatar--${t.shape}`,`qiu-avatar--${e.unref(c)}`,{"is-image":!!t.src&&!e.unref(r)}]]),style:e.normalizeStyle(e.unref(d))},[t.src&&!e.unref(r)?(e.openBlock(),e.createElementBlock("img",{key:0,class:"qiu-avatar__img",src:t.src,alt:t.alt,style:e.normalizeStyle({objectFit:t.fit}),onError:u},null,44,Md)):h.$slots.default?(e.openBlock(),e.createElementBlock("span",qd,[e.renderSlot(h.$slots,"default",{},void 0,!0)])):(e.openBlock(),e.createElementBlock("span",zd,e.toDisplayString(e.unref(f)),1))],6))}}),[["__scopeId","data-v-2381a5d3"]])},Symbol.toStringTag,{value:"Module"})),Id=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuBacktop",__name:"index",props:{scrollVisibilityHeight:{default:200},right:{default:40},bottom:{default:40},zIndex:{default:100},target:{default:""}},setup(t){const a=t,n=e.ref(!1),o=()=>a.target&&document.querySelector(a.target)||window,r=h=>h===window?window.scrollY||document.documentElement.scrollTop:h.scrollTop,c=e.computed(()=>({right:`${a.right}px`,bottom:`${a.bottom}px`,zIndex:String(a.zIndex)})),d=()=>{const h=o();n.value=r(h)>=a.scrollVisibilityHeight},f=()=>{const h=o();h===window?window.scrollTo({top:0,behavior:"smooth"}):h.scrollTo({top:0,behavior:"smooth"})};let u=window;return e.onMounted(()=>{u=o(),u.addEventListener("scroll",d,{passive:!0}),d()}),e.onBeforeUnmount(()=>{u.removeEventListener("scroll",d)}),(h,p)=>{const _=_t;return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-backtop-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("button",{type:"button",class:"qiu-backtop",style:e.normalizeStyle(e.unref(c)),"aria-label":"回到顶部",onClick:f},[e.renderSlot(h.$slots,"default",{},()=>[e.createVNode(_,{icon:"arrow-up-line"})],!0)],4),[[e.vShow,e.unref(n)]])]),_:3})])}}}),[["__scopeId","data-v-c475770d"]])},Symbol.toStringTag,{value:"Module"}));let Dd=t=>t;const Xe=(t,...a)=>Dd(t,...a);let wl=0,ni="";function Er(){return{lock:()=>{wl===0&&(ni=document.body.style.overflow,document.body.style.overflow="hidden"),wl+=1},unlock:()=>{wl!==0&&(wl-=1,wl===0&&(document.body.style.overflow=ni,ni=""))}}}const Rd={class:"qiu-dialog__title"},Ld=["title"],Pd=["title"],Od=["title"],jd={key:0,class:"qiu-dialog__loading"},Fd={key:0,class:"qiu-dialog__loading-text"},Ad={key:0,class:"qiu-dialog__footer"},Qd=["onMousedown"],Nn=de(e.defineComponent({name:"QiuDialog",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:""},width:{default:"520px"},top:{default:"15vh"},alignCenter:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalClass:{default:""},appendToBody:{type:Boolean,default:!0},appendTo:{},lockScroll:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!1},closeOnPressEscape:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},beforeClose:{},showFullscreen:{type:Boolean,default:!0},showMinimize:{type:Boolean,default:!0},maximizable:{type:Boolean,default:void 0},minimizable:{type:Boolean,default:void 0},showClose:{type:Boolean,default:!0},fullscreen:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{},animated:{type:Boolean,default:!0},theme:{default:"default"},draggable:{type:Boolean,default:!0},dragBound:{type:[Boolean,String],default:"viewport"},resizable:{type:Boolean,default:!0},openInTab:{type:Boolean,default:!1},minWidth:{default:320},minHeight:{default:180},zIndex:{default:2e3}},emits:["update:modelValue","open","opened","close","closed","minimize","maximize","restore"],setup(t,{emit:a}){const n=t,o=a,r=e.useAttrs(),c=e.computed(()=>{const{class:Q,style:F,...Be}=r;return Be}),d=na.useVModel(n,"modelValue",o),f=e.ref(null),u=e.ref(!1),h=e.ref(!1),p=e.ref(null),_=e.ref(null),B=e.ref(!1),$=e.ref(!1),b=e.ref(!1),C=e.ref(0),k=e.ref(!0),M=["n","s","e","w","ne","nw","se","sw"],V=e.computed(()=>typeof n.appendTo=="string"||n.appendTo instanceof HTMLElement?n.appendTo:"body"),E=e.computed(()=>n.appendToBody!==!1),x=e.computed(()=>n.maximizable??n.showFullscreen),m=e.computed(()=>n.minimizable??n.showMinimize),w=e.computed(()=>n.draggable&&!u.value&&!h.value),S=e.computed(()=>!!p.value),N=e.computed(()=>{const Q=n.dragBound;return Q===!0||Q==="viewport"||Q===void 0}),D=e.computed(()=>({"is-open-in-tab":n.openInTab,"is-minimized-root":h.value})),T=e.computed(()=>({[`qiu-dialog--${n.theme}`]:!0,"qiu-dialog--minimized":h.value,"qiu-dialog--fullscreen":u.value,"qiu-dialog--centered":!S.value&&!u.value&&!h.value&&n.alignCenter,"qiu-dialog--topped":!S.value&&!u.value&&!h.value&&!n.alignCenter,"qiu-dialog--fixed-box":S.value&&!u.value&&!h.value,"qiu-dialog--unbounded":!N.value&&S.value&&!u.value&&!h.value,"qiu-dialog--dragging":B.value,"qiu-dialog--resizing":$.value,"qiu-dialog--animated":n.animated&&!B.value&&!$.value&&!b.value})),L=e.computed(()=>{const Q={zIndex:String(n.zIndex+C.value+(h.value?100:0))};return h.value?(Object.assign(Q,{left:"16px",bottom:"16px",top:"auto",width:"240px",height:"48px",transform:"none"}),Q):u.value?(Object.assign(Q,{left:"0",top:"0",width:"100vw",height:"100vh",transform:"none",borderRadius:"0"}),Q):p.value?(Object.assign(Q,{left:`${p.value.left}px`,top:`${p.value.top}px`,width:`${p.value.width}px`,height:`${p.value.height}px`,transform:"none"}),Q):(Q.width=typeof n.width=="number"?`${n.width}px`:String(n.width||"520px"),n.alignCenter||(Q.top=n.top||"15vh",Q.left="50%",Q.transform="translateX(-50%)"),Q)}),U=(Q,F="resize")=>{const Be=window.innerWidth,qe=window.innerHeight,K=Math.max(n.minWidth,Q.width),X=Math.max(n.minHeight,Q.height);if(!N.value)return{left:Q.left,top:Q.top,width:F==="resize"?K:Math.max(n.minWidth,Q.width),height:F==="resize"?X:Math.max(n.minHeight,Q.height)};const le=Math.max(n.minWidth,Be-8),ye=Math.max(n.minHeight,qe-8),Pe=Math.min(K,le),Qe=Math.min(X,ye),Bt=Math.min(Math.max(0,Q.left),Math.max(0,Be-Pe)),wt=Math.min(Math.max(0,Q.top),Math.max(0,qe-Qe));return{left:Bt,top:wt,width:Pe,height:Qe}},oe=()=>{const Q=f.value;if(!Q)return null;const F=Q.getBoundingClientRect(),Be=U({left:F.left,top:F.top,width:F.width,height:Math.max(F.height,n.minHeight)});return p.value=Be,Be},H=()=>p.value||oe(),{lock:Ve,unlock:Z}=Er(),z=Q=>{n.lockScroll&&(Q?Ve():Z())},fe=()=>{b.value=!0,o("close"),d.value=!1},he=()=>{if(n.beforeClose){n.beforeClose(()=>fe());return}fe()},se=()=>{n.closeOnClickModal&&he()},te=()=>{C.value+=1},re=()=>{if(h.value){De();return}u.value?(u.value=!1,_.value&&(p.value={..._.value}),o("restore")):(H(),p.value&&(_.value={...p.value}),u.value=!0,o("maximize"))},Ne=()=>{u.value&&(u.value=!1),H(),p.value&&(_.value={...p.value}),h.value=!0,o("minimize")},De=()=>{h.value=!1,_.value&&(p.value={..._.value}),o("restore")},$e=()=>{h.value&&De()},Ge=()=>{h.value?De():re()},st=Q=>{if(!w.value||Q.target.closest(".qiu-dialog__actions"))return;Q.preventDefault();const F=H();if(!F)return;B.value=!0;const Be=Q.clientX,qe=Q.clientY,K=le=>{p.value=U({...F,left:F.left+le.clientX-Be,top:F.top+le.clientY-qe},"drag")},X=()=>{B.value=!1,document.removeEventListener("mousemove",K),document.removeEventListener("mouseup",X)};document.addEventListener("mousemove",K),document.addEventListener("mouseup",X)},ht=(Q,F)=>{const Be=H();if(!Be)return;$.value=!0;const qe=Q.clientX,K=Q.clientY,X=ye=>{const Pe=ye.clientX-qe,Qe=ye.clientY-K;let{left:Bt,top:wt,width:xt,height:pt}=Be;F.includes("e")&&(xt=Be.width+Pe),F.includes("s")&&(pt=Be.height+Qe),F.includes("w")&&(xt=Be.width-Pe,Bt=Be.left+Pe,xt<n.minWidth&&(xt=n.minWidth,Bt=Be.left+Be.width-n.minWidth)),F.includes("n")&&(pt=Be.height-Qe,wt=Be.top+Qe,pt<n.minHeight&&(pt=n.minHeight,wt=Be.top+Be.height-n.minHeight)),p.value=U({left:Bt,top:wt,width:xt,height:pt},"resize")},le=()=>{$.value=!1,document.removeEventListener("mousemove",X),document.removeEventListener("mouseup",le)};document.addEventListener("mousemove",X),document.addEventListener("mouseup",le)},He=Q=>{!d.value||h.value||n.closeOnPressEscape&&Q.key==="Escape"&&he()},ct=()=>{h.value=!1,u.value=!!n.fullscreen,p.value=null,_.value=null,b.value=!1,B.value=!1,$.value=!1};return e.watch(()=>n.fullscreen,Q=>{u.value=!!Q},{immediate:!0}),e.watch(d,async Q=>{Q?(b.value=!1,n.destroyOnClose&&(k.value=!0),z(!0),o("open"),await e.nextTick(),!n.alignCenter&&!p.value&&f.value,o("opened")):(z(!1),o("closed"),ct(),n.destroyOnClose&&(k.value=!1))}),e.onMounted(()=>{document.addEventListener("keydown",He),d.value&&z(!0)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",He),z(!1)}),(Q,F)=>{const Be=_t;return e.openBlock(),e.createBlock(e.Teleport,{to:e.unref(V),disabled:!e.unref(E)},[!n.destroyOnClose||e.unref(k)||e.unref(d)?e.withDirectives((e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,class:["qiu-dialog-root",[e.unref(D),e.unref(r).class]]},e.unref(c),{style:{zIndex:n.zIndex}}),[t.modal&&!e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qiu-dialog__mask",t.modalClass]),onMousedown:e.withModifiers(se,["self"])},null,34)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"panelRef",ref:f,class:e.normalizeClass(["qiu-dialog",e.unref(T)]),style:e.normalizeStyle(e.unref(L)),role:"dialog","aria-modal":"true",onMousedown:te},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-dialog__header",{"is-movable":e.unref(w),"is-minimized-bar":e.unref(h)}]),onMousedown:st,onDblclick:Ge,onClick:$e},[e.createElementVNode("div",Rd,e.toDisplayString(t.title),1),e.createElementVNode("div",{class:"qiu-dialog__actions",onMousedown:F[1]||(F[1]=e.withModifiers(()=>{},["stop"])),onClick:F[2]||(F[2]=e.withModifiers(()=>{},["stop"]))},[e.unref(m)&&!e.unref(h)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-dialog__btn",title:e.unref(Xe)("最小化"),onClick:e.withModifiers(Ne,["stop"])},[e.createVNode(Be,{icon:"subtract-line"})],8,Ld)):e.createCommentVNode("",!0),e.unref(x)?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-dialog__btn",title:e.unref(Xe)(e.unref(h)||e.unref(u)?"还原":"最大化"),onClick:F[0]||(F[0]=e.withModifiers(qe=>e.unref(h)?De():re(),["stop"]))},[e.createVNode(Be,{icon:e.unref(h)?"picture-in-picture-2-line":e.unref(u)?"fullscreen-exit-line":"fullscreen-line"},null,8,["icon"])],8,Pd)):e.createCommentVNode("",!0),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"qiu-dialog__btn",title:e.unref(Xe)("关闭"),onClick:e.withModifiers(he,["stop"])},[e.createVNode(Be,{icon:"close-line"})],8,Od)):e.createCommentVNode("",!0)],32)],34),e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qiu-dialog__body",{"is-loading":t.loading}])},[t.loading?(e.openBlock(),e.createElementBlock("div",jd,[F[3]||(F[3]=e.createElementVNode("span",{class:"qiu-dialog__spinner"},null,-1)),t.loadingText?(e.openBlock(),e.createElementBlock("span",Fd,e.toDisplayString(t.loadingText),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(Q.$slots,"default",{},void 0,!0)],2),[[e.vShow,!e.unref(h)]]),!e.unref(h)&&Q.$slots.footer?(e.openBlock(),e.createElementBlock("div",Ad,[e.renderSlot(Q.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0),t.resizable&&!e.unref(u)&&!e.unref(h)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},e.renderList(M,qe=>e.createElementVNode("div",{key:qe,class:e.normalizeClass(["qiu-dialog__resize",`qiu-dialog__resize--${qe}`]),onMousedown:e.withModifiers(K=>ht(K,qe),["prevent","stop"])},null,42,Qd)),64)):e.createCommentVNode("",!0)],38)],16)),[[e.vShow,e.unref(d)]]):e.createCommentVNode("",!0)],8,["to","disabled"])}}}),[["__scopeId","data-v-9953b683"]]),Ud=Object.freeze(Object.defineProperty({__proto__:null,default:Nn},Symbol.toStringTag,{value:"Module"})),Sr=Symbol("QiuTabBar"),Wd={class:"qiu-tab-bar__header",role:"tablist"},Hd=["aria-selected","onClick"],Yd={class:"qiu-tab-bar__content"},oa=de(e.defineComponent({name:"QiuTabBar",__name:"index",props:{modelValue:{},type:{default:"default"},stretch:{type:Boolean,default:!1}},emits:["update:modelValue","tabClick"],setup(t,{emit:a}){const n=t,o=a,r=e.ref([]),c=e.computed({get(){var B;return n.modelValue!==void 0&&n.modelValue!==null?n.modelValue:(B=r.value[0])==null?void 0:B.name},set(B){o("update:modelValue",B)}}),d=e.computed(()=>[...r.value]),f=B=>{const $=r.value.findIndex(b=>b.uid===B.uid);$>=0?r.value[$]=B:r.value.push(B),n.modelValue===void 0&&r.value.length===1&&(c.value=B.name)},u=B=>{r.value=r.value.filter($=>$.uid!==B)},h=(B,$)=>{const b=r.value.findIndex(C=>C.uid===B);b>=0&&(r.value[b]={...r.value[b],...$})},p=e.computed(()=>c.value);e.provide(Sr,{activeName:p,registerPane:f,unregisterPane:u,updatePane:h});const _=B=>{c.value=B;const $=r.value.find(b=>b.name===B);$&&o("tabClick",$)};return(B,$)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-tab-bar",[`qiu-tab-bar--${t.type}`,{"is-stretch":t.stretch}]])},[e.createElementVNode("div",Wd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(d),b=>(e.openBlock(),e.createElementBlock("button",{key:String(b.name),type:"button",class:e.normalizeClass(["qiu-tab-bar__item",{"is-active":b.name===e.unref(c)}]),role:"tab","aria-selected":b.name===e.unref(c),onClick:C=>_(b.name)},[e.renderSlot(B.$slots,`label-${b.name}`,{},()=>[e.createTextVNode(e.toDisplayString(b.label),1)],!0)],10,Hd))),128))]),e.createElementVNode("div",Yd,[e.renderSlot(B.$slots,"default",{},void 0,!0)])],2))}}),[["__scopeId","data-v-4c245e6f"]]),Kd=Object.freeze(Object.defineProperty({__proto__:null,default:oa},Symbol.toStringTag,{value:"Module"})),vd=["aria-hidden"],la=de(e.defineComponent({name:"QiuTabPane",__name:"index",props:{name:{},label:{default:""},lazy:{type:Boolean,default:!1}},setup(t){var h;const a=t,n=e.useSlots(),o=e.inject(Sr,null),r=((h=e.getCurrentInstance())==null?void 0:h.uid)??Math.random(),c=e.ref(!a.lazy),d=e.computed(()=>(o==null?void 0:o.activeName.value)===a.name),f=e.computed(()=>a.lazy?c.value||d.value:!0);e.watch(d,p=>{p&&a.lazy&&(c.value=!0)});const u=()=>a.label||String(a.name);return e.onMounted(()=>{o==null||o.registerPane({uid:r,name:a.name,label:u(),lazy:a.lazy,loaded:c.value,render:()=>{var p;return((p=n.default)==null?void 0:p.call(n))??[]}})}),e.onUnmounted(()=>{o==null||o.unregisterPane(r)}),e.watch(()=>[a.name,a.label,a.lazy],()=>{o==null||o.updatePane(r,{name:a.name,label:u(),lazy:a.lazy,loaded:c.value})}),(p,_)=>e.unref(f)?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-tab-pane",role:"tabpanel","aria-hidden":!e.unref(d)},[e.renderSlot(p.$slots,"default",{},void 0,!0)],8,vd)),[[e.vShow,e.unref(d)]]):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-96699c53"]]),Xd=Object.freeze(Object.defineProperty({__proto__:null,default:la},Symbol.toStringTag,{value:"Module"})),Gd={class:"qiu-empty"},Jd={class:"qiu-empty__image"},Zd={key:0,class:"qiu-empty__description"},em={key:1,class:"qiu-empty__actions"},Vo=de(e.defineComponent({name:"QiuEmpty",__name:"index",props:{description:{default:"暂无数据"}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",Gd,[e.createElementVNode("div",Jd,[e.renderSlot(a.$slots,"image",{},()=>[n[0]||(n[0]=e.createStaticVNode('<svg class="qiu-empty__svg" viewBox="0 0 120 80" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" data-v-77eb829d><rect x="10" y="20" width="100" height="50" rx="4" fill="var(--qiu-fill-color, var(--qiu-fill-color, #f0f2f5))" data-v-77eb829d></rect><rect x="20" y="30" width="40" height="6" rx="2" fill="var(--qiu-border-color, var(--qiu-border-color, #dcdfe6))" data-v-77eb829d></rect><rect x="20" y="42" width="60" height="6" rx="2" fill="var(--qiu-border-color-lighter, var(--qiu-border-color-lighter, #ebeef5))" data-v-77eb829d></rect><rect x="20" y="54" width="30" height="6" rx="2" fill="var(--qiu-border-color-lighter, var(--qiu-border-color-lighter, #ebeef5))" data-v-77eb829d></rect></svg>',1))],!0)]),t.description||a.$slots.description?(e.openBlock(),e.createElementBlock("p",Zd,[e.renderSlot(a.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createElementBlock("div",em,[e.renderSlot(a.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-77eb829d"]]),tm=Object.freeze(Object.defineProperty({__proto__:null,default:Vo},Symbol.toStringTag,{value:"Module"})),nm={key:0,class:"qiu-button__loading","aria-hidden":"true"},om={key:1,class:"qiu-button__icon"},lm={key:2,class:"qiu-button__label"},am={key:3,class:"qiu-button__icon-right"},nn=de(e.defineComponent({name:"QiuButton",inheritAttrs:!1,__name:"index",props:{type:{default:"default"},color:{},size:{},plain:{type:Boolean,default:!1},text:{type:Boolean,default:!1},link:{type:Boolean,default:!1},round:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},nativeType:{default:"button"},tag:{default:"button"},icon:{},iconRight:{}},emits:["click"],setup(t,{emit:a}){const n={primary:"var(--qiu-color-primary, var(--qiu-color-primary, #0f766e))",success:"var(--qiu-color-success, var(--qiu-color-success, #67c23a))",warning:"var(--qiu-color-warning, var(--qiu-color-warning, #e6a23c))",danger:"var(--qiu-color-danger, var(--qiu-color-danger, #f56c6c))",info:"var(--qiu-color-info, var(--qiu-color-info, #909399))",cyan:"#0ea5e9",orange:"#f97316",pink:"#ec4899",teal:"#14b8a6",gray:"#64748b",magenta:"#d946ef",lime:"#84cc16",brown:"#a16207"},o=t,r=a,c=e.inject("qiuButtonGroupSize",null),d=e.computed(()=>o.size||(c==null?void 0:c.value)||"default"),f=e.computed(()=>o.color?o.color:o.type&&o.type!=="default"&&n[o.type]?n[o.type]:""),u=e.computed(()=>{if(f.value)return{"--qiu-btn-color":f.value}}),h=e.computed(()=>[`qiu-button--${d.value}`,{"qiu-button--default":o.type==="default"&&!o.color,"qiu-button--colored":!!f.value,"qiu-button--plain":o.plain,"qiu-button--text":o.text,"qiu-button--link":o.link,"qiu-button--round":o.round,"qiu-button--circle":o.circle,"is-disabled":o.disabled||o.loading,"is-loading":o.loading}]),p=_=>{if(o.disabled||o.loading){_.preventDefault();return}r("click",_)};return(_,B)=>{const $=_t;return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),e.mergeProps({class:["qiu-button",e.unref(h)],type:t.tag==="button"?t.nativeType:void 0,disabled:t.disabled||t.loading,style:e.unref(u)},_.$attrs,{onClick:p}),{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock("span",nm)):e.createCommentVNode("",!0),!t.loading&&(t.icon||_.$slots.icon)?(e.openBlock(),e.createElementBlock("span",om,[e.renderSlot(_.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createBlock($,{key:0,icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),_.$slots.default?(e.openBlock(),e.createElementBlock("span",lm,[e.renderSlot(_.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0),t.iconRight||_.$slots.iconRight?(e.openBlock(),e.createElementBlock("span",am,[e.renderSlot(_.$slots,"iconRight",{},()=>[t.iconRight?(e.openBlock(),e.createBlock($,{key:0,icon:t.iconRight},null,8,["icon"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)]),_:3},16,["class","type","disabled","style"])}}}),[["__scopeId","data-v-72557e8b"]]),im=Object.freeze(Object.defineProperty({__proto__:null,default:nn},Symbol.toStringTag,{value:"Module"})),rm={class:"qiu-msg__content"},cm={key:0},Mr=e.defineComponent({name:"QiuMsgItem",__name:"QiuMsgItem",props:{id:{},type:{},position:{},message:{},showClose:{type:Boolean},visible:{type:Boolean}},emits:["close"],setup(t){const a=t,n=e.computed(()=>({success:"ri-checkbox-circle-line",warning:"ri-alert-line",info:"ri-information-line",error:"ri-close-circle-line"})[a.type]);return(o,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"qiu-msg-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qiu-msg",[`qiu-msg--${t.type}`,`qiu-msg--${t.position}`]])},[e.createElementVNode("i",{class:e.normalizeClass(["qiu-msg__icon",n.value])},null,2),e.createElementVNode("div",rm,[typeof t.message=="string"?(e.openBlock(),e.createElementBlock("span",cm,e.toDisplayString(t.message),1)):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.message),{key:1}))]),t.showClose?(e.openBlock(),e.createElementBlock("i",{key:0,class:"qiu-msg__close ri-close-line",onClick:r[0]||(r[0]=c=>o.$emit("close"))})):e.createCommentVNode("",!0)],2),[[e.vShow,t.visible]])]),_:1}))}}),sm=Object.freeze(Object.defineProperty({__proto__:null,default:Mr},Symbol.toStringTag,{value:"Module"})),Co={center:[],"left-top":[],"left-center":[],"left-bottom":[],"top-center":[],"bottom-center":[],"right-top":[],"right-center":[],"right-bottom":[]};let dm=0;const mm=(t,a=20)=>{const n=`qiu-msg-host-${t}`;let o=document.getElementById(n);return o||(o=document.createElement("div"),o.id=n,o.className=`qiu-msg-host qiu-msg-host--${t}`,document.body.appendChild(o)),o.style.setProperty("--qiu-msg-offset",`${a}px`),o},qr=t=>{Co[t].forEach((a,n)=>{a.el.style.setProperty("--qiu-msg-index",String(n))})},aa=t=>{Object.keys(Co).forEach(a=>{const n=Co[a].findIndex(o=>o.id===t);if(n>=0){const[o]=Co[a].splice(n,1);o.timer&&clearTimeout(o.timer),o.app.unmount(),o.el.remove(),qr(a)}})},ke=Object.assign(t=>{const a=typeof t=="string"?{message:t}:{...t},n=a.position||"center",o=a.type||"info",r=a.duration??3e3,c=a.id||`qiu-msg-${++dm}`,d=a.offset??20;aa(c);const f=mm(n,d),u=document.createElement("div");u.className="qiu-msg-wrap",f.appendChild(u);const h=e.ref(!0),p={id:c,app:null,el:u,position:n},_=()=>{p.timer&&(clearTimeout(p.timer),p.timer=void 0),h.value=!1,setTimeout(()=>{var $;aa(c),($=a.onClose)==null||$.call(a)},200)},B=e.createApp({setup(){return()=>e.h(Mr,{id:c,type:o,position:n,message:a.message,showClose:a.showClose??!0,visible:h.value,onClose:_})}});return r>0&&(p.timer=setTimeout(_,r)),B.mount(u),p.app=B,Co[n].push(p),qr(n),{close:()=>aa(c),id:c}},{success(t,a){return ke(typeof t=="string"?{message:t,type:"success",position:a}:{...t,type:"success"})},warning(t,a){return ke(typeof t=="string"?{message:t,type:"warning",position:a}:{...t,type:"warning"})},info(t,a){return ke(typeof t=="string"?{message:t,type:"info",position:a}:{...t,type:"info"})},error(t,a){return ke(typeof t=="string"?{message:t,type:"error",position:a}:{...t,type:"error"})},closeAll:t=>{(t?[t]:Object.keys(Co)).forEach(n=>{[...Co[n]].forEach(o=>aa(o.id))})}}),um={install(t){t.config.globalProperties.$qiuMsg=ke,t.provide("$qiuMsg",ke)}},zr="qiu-badge-templates",Tr="qiu-badge-desk-templates",xl="qiu-badge-library",Ir="qiu-badge-competitions",St=t=>({code:0,data:t}),Vl=(t,a)=>{try{const n=localStorage.getItem(t);return n?JSON.parse(n):a}catch{return a}},ia=(t,a)=>{localStorage.setItem(t,JSON.stringify(a))},Cl=()=>{const t=new Date,a=n=>String(n).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}:${a(t.getSeconds())}`},Dr=()=>{let t=Vl(Ir,[]);return t.length||(t=[{id:1,name:"演示比赛 A",area_code:"A01",host_region:"110000",start_date:"2026-08-01",status:1},{id:2,name:"演示比赛 B",area_code:"B02",host_region:"310000",start_date:"2026-09-01",status:2}],ia(Ir,t)),t},rn=t=>Vl(t==="badge"?zr:Tr,[]),eo=(t,a)=>ia(t==="badge"?zr:Tr,a),Rr=t=>t.reduce((a,n)=>Math.max(a,Number(n.id)||0),0)+1,Fo=(t,a=90,n=54)=>({version:1,canvas:{widthMm:a,heightMm:n,background:"#ffffff"},elements:[],guides:[],regions:[]}),oi=async t=>{const a=Dr(),n=Number((t==null?void 0:t.page)||1),o=Number((t==null?void 0:t.page_size)||(t==null?void 0:t.pageSize)||20),r=String((t==null?void 0:t.keyword)||(t==null?void 0:t.q)||"").trim();let c=a;r&&(c=c.filter(f=>`${f.name}${f.area_code}`.includes(r)));const d=(n-1)*o;return St({list:c.slice(d,d+o),total:c.length,page:n,page_size:o})},Lr=async t=>{const a=Dr().find(n=>n.id===Number(t));return St(a||{id:t,name:`比赛 ${t}`,status:1})},Pr=async t=>{const a=rn("badge").filter(n=>n.competition_id===Number(t));return St({list:a})},fm=async(t,a)=>{const n=rn("badge"),r={id:Rr(n),competition_id:Number(t),name:a.name||"未命名模板",width_mm:90,height_mm:54,is_default:n.filter(c=>c.competition_id===Number(t)).length===0,update_time:Cl(),doc:Fo(),kind:"badge"};return n.push(r),eo("badge",n),St(r)},li=async(t,a)=>{const n=rn("badge").find(o=>o.id===Number(a)&&o.competition_id===Number(t));return St(n?{...n,template_json:n.doc||Fo(n.name,n.width_mm,n.height_mm),doc:n.doc||Fo(n.name,n.width_mm,n.height_mm),default_test_json:n.default_test_json||{}}:null)},pm=async t=>{const a=rn("badge").filter(o=>o.competition_id===Number(t)),n=a.find(o=>o.is_default)||a[0];return n?li(t,n.id):St(null)},hm=async(t,a,n)=>{var h,p;const o=rn("badge"),r=o.findIndex(_=>_.id===Number(a)&&_.competition_id===Number(t));if(r<0)return St(null);const c=n.doc||n.template_json||n.template||o[r].doc,d=String(n.name),f=Number(((h=c==null?void 0:c.canvas)==null?void 0:h.widthMm)||n.width_mm||o[r].width_mm),u=Number(((p=c==null?void 0:c.canvas)==null?void 0:p.heightMm)||n.height_mm||o[r].height_mm);return o[r]={...o[r],name:d,width_mm:f,height_mm:u,doc:c,default_test_json:n.default_test_json??o[r].default_test_json??{},update_time:Cl()},eo("badge",o),St(o[r])},gm=async(t,a)=>{const n=rn("badge").filter(o=>!(o.id===Number(a)&&o.competition_id===Number(t)));return eo("badge",n),St(!0)},_m=async(t,a)=>{const n=rn("badge").map(o=>o.competition_id===Number(t)?{...o,is_default:o.id===Number(a)}:o);return eo("badge",n),St(!0)},Or=async t=>{const a=rn("desk").filter(n=>n.competition_id===Number(t));return St({list:a})},bm=async(t,a)=>{const n=rn("desk"),r={id:Rr(n),competition_id:Number(t),name:a.name||"未命名桌签",width_mm:150,height_mm:50,is_default:n.filter(c=>c.competition_id===Number(t)).length===0,update_time:Cl(),doc:Fo(a.name||"未命名桌签",150,50),kind:"desk"};return n.push(r),eo("desk",n),St(r)},ra=async(t,a)=>{const n=rn("desk").find(o=>o.id===Number(a)&&o.competition_id===Number(t));return St(n?{...n,template_json:n.doc||Fo(n.name,n.width_mm,n.height_mm),doc:n.doc||Fo(n.name,n.width_mm,n.height_mm),default_test_json:n.default_test_json||{}}:null)},jr=async t=>{const a=rn("desk").filter(o=>o.competition_id===Number(t)),n=a.find(o=>o.is_default)||a[0];return n?ra(t,n.id):St(null)},ym=async(t,a,n)=>{var h,p;const o=rn("desk"),r=o.findIndex(_=>_.id===Number(a)&&_.competition_id===Number(t));if(r<0)return St(null);const c=n.doc||n.template_json||n.template||o[r].doc,d=String(n.name),f=Number(((h=c==null?void 0:c.canvas)==null?void 0:h.widthMm)||n.width_mm||o[r].width_mm),u=Number(((p=c==null?void 0:c.canvas)==null?void 0:p.heightMm)||n.height_mm||o[r].height_mm);return o[r]={...o[r],name:d,width_mm:f,height_mm:u,doc:c,default_test_json:n.default_test_json??o[r].default_test_json??{},update_time:Cl()},eo("desk",o),St(o[r])},km=async(t,a)=>{const n=rn("desk").filter(o=>!(o.id===Number(a)&&o.competition_id===Number(t)));return eo("desk",n),St(!0)},wm=async(t,a)=>{const n=rn("desk").map(o=>o.competition_id===Number(t)?{...o,is_default:o.id===Number(a)}:o);return eo("desk",n),St(!0)},Fr=async t=>{const a=Vl(xl,[]),n=Number((t==null?void 0:t.page)||1),o=Number((t==null?void 0:t.page_size)||40),r=(n-1)*o;return St({list:a.slice(r,r+o),total:a.length,page:n,page_size:o})},ai=async t=>{const a=await new Promise((c,d)=>{const f=new FileReader;f.onload=()=>c(String(f.result||"")),f.onerror=()=>d(new Error("read failed")),f.readAsDataURL(t)}),n=Vl(xl,[]),r={id:n.reduce((c,d)=>Math.max(c,d.id),0)+1,url:a,name:t.name,create_time:Cl()};return n.unshift(r),ia(xl,n),St(r)},ca=async t=>{const a=Vl(xl,[]).filter(n=>n.id!==Number(t));return ia(xl,a),St(!0)},xm=async t=>St([{id:1,name:"演示学校一",short_name:"校一"},{id:2,name:"演示学校二",short_name:"校二"}]),Vm=async(t,a)=>St({list:[{id:1,student_name:"张三",competition_no:"A001",school_name:"演示学校一",age_group:"小学组",competition_room:"101",seat_no:"01"},{id:2,student_name:"李四",competition_no:"A002",school_name:"演示学校一",age_group:"小学组",competition_room:"101",seat_no:"02"}],total:2}),Cm=async(t,a)=>St({list:[],total:0}),Nm=async(t,a)=>St(!0),Bm=async t=>St([{id:1,competition_room:"101",seat_no:"01",student_name:"张三",school_name:"演示学校一"}]);function Ao(t){const a=String(t||"").trim();if(!a)return"";if(/^data:/i.test(a)||/^blob:/i.test(a))return a;if(/^(https?:)?\/\//i.test(a)){try{const n=new URL(a,window.location.origin);if(n.pathname.startsWith("/uploads/"))return`${n.pathname}${n.search}${n.hash}`}catch{}return a}return a.startsWith("/uploads/")||a.startsWith("/")?a:`/${a}`}const $m={class:"lib-grid"},Em=["onDblclick"],Sm=["src"],Mm=["title"],Ar=8,sa=de(e.defineComponent({__name:"BadgeImagePickerDialog",props:{modelValue:{type:Boolean},defaultTab:{default:"lib"}},emits:["update:modelValue","pick"],setup(t,{emit:a}){const n=t,o=a,r=e.computed({get:()=>n.modelValue,set:E=>o("update:modelValue",E)}),c=e.ref("lib"),d=e.ref(!1),f=e.ref([]),u=e.ref(null),h=e.ref(!1),p=e.ref(null);function _(E){return Ao(E)}async function B(){var E;d.value=!0;try{const x=await Fr({page:1,page_size:120});f.value=((E=x.data)==null?void 0:E.list)??[]}catch{f.value=[]}finally{d.value=!1}}e.watch(()=>n.modelValue,E=>{E&&(c.value=n.defaultTab)});function $(E){E!=null&&E.url&&(o("pick",Ao(E.url)),r.value=!1)}function b(E){p.value=E,h.value=!0}async function C(){const E=p.value;if(E){h.value=!1;try{await ca(Number(E.id)),ke.success("已删除"),await B()}catch{}}}async function k(E){var x;for(const m of Array.from(E)){if(m.size/1048576>Ar){ke.error(`「${m.name}」超过 ${Ar}MB,已跳过`);continue}try{const S=await ai(m),N=(x=S==null?void 0:S.data)==null?void 0:x.url;if(!N){ke.error(`「${m.name}」上传失败`);continue}o("pick",Ao(N)),await B()}catch{}}}function M(E){var m;const x=E.target;(m=x.files)!=null&&m.length&&k(x.files),x.value=""}function V(E){var x,m;(m=(x=E.dataTransfer)==null?void 0:x.files)!=null&&m.length&&k(E.dataTransfer.files)}return(E,x)=>{const m=nn,w=Vo,S=la,N=_t,D=oa,T=Nn,L=e.resolveDirective("qiu-loading");return e.openBlock(),e.createBlock(T,{modelValue:r.value,"onUpdate:modelValue":x[5]||(x[5]=U=>r.value=U),title:"添加图片",width:"720px","destroy-on-close":"",class:"badge-img-picker-dlg",onOpened:B},{default:e.withCtx(()=>[e.createVNode(D,{modelValue:c.value,"onUpdate:modelValue":x[2]||(x[2]=U=>c.value=U)},{default:e.withCtx(()=>[e.createVNode(S,{label:"图片库",name:"lib"},{default:e.withCtx(()=>[x[7]||(x[7]=e.createElementVNode("p",{class:"dlg-hint"},"双击缩略图插入到画布;删除后模板里若仍引用该地址将无法显示。",-1)),e.withDirectives((e.openBlock(),e.createElementBlock("div",$m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,U=>(e.openBlock(),e.createElementBlock("div",{key:U.id,class:"lib-cell",onDblclick:oe=>$(U)},[e.createElementVNode("img",{src:_(U.url),alt:"",class:"thumb",loading:"lazy"},null,8,Sm),e.createElementVNode("div",{class:"meta",title:U.orig_name},e.toDisplayString(U.orig_name||"未命名"),9,Mm),e.createVNode(m,{type:"danger",link:"",size:"small",class:"del",onClick:e.withModifiers(oe=>b(U),["stop"])},{default:e.withCtx(()=>[...x[6]||(x[6]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])],40,Em))),128))])),[[L,d.value]]),!d.value&&!f.value.length?(e.openBlock(),e.createBlock(w,{key:0,description:"暂无图片,可到「上传本地文件」添加"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(S,{label:"上传本地文件",name:"up"},{default:e.withCtx(()=>[x[10]||(x[10]=e.createElementVNode("p",{class:"dlg-hint"},"上传后会写入图片库,并自动插入当前画布;可多选文件或一次拖拽多张。",-1)),e.createElementVNode("div",{class:"upload-drop",onDragover:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"])),onDrop:e.withModifiers(V,["prevent"]),onClick:x[1]||(x[1]=U=>{var oe;return(oe=u.value)==null?void 0:oe.click()})},[e.createVNode(N,{icon:"upload-cloud-2-line",class:"upload-ico"}),x[8]||(x[8]=e.createElementVNode("div",{class:"upload-text"},[e.createTextVNode("拖到此处,或 "),e.createElementVNode("em",null,"点击选择多个文件")],-1)),x[9]||(x[9]=e.createElementVNode("div",{class:"upload-sub"},"支持 JPG / PNG / GIF / WebP / BMP,单文件不超过 8MB",-1)),e.createElementVNode("input",{ref_key:"fileInputRef",ref:u,type:"file",multiple:"",accept:"image/jpeg,image/png,image/gif,image/webp,image/bmp",class:"upload-input",onChange:M},null,544)],32)]),_:1})]),_:1},8,["modelValue"]),e.createVNode(T,{modelValue:h.value,"onUpdate:modelValue":x[4]||(x[4]=U=>h.value=U),title:"删除确认",width:"400px","append-to-body":""},{footer:e.withCtx(()=>[e.createVNode(m,{onClick:x[3]||(x[3]=U=>h.value=!1)},{default:e.withCtx(()=>[...x[11]||(x[11]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(m,{type:"danger",onClick:C},{default:e.withCtx(()=>[...x[12]||(x[12]=[e.createTextVNode("删除",-1)])]),_:1})]),default:e.withCtx(()=>{var U;return[e.createElementVNode("p",null,"确定删除「"+e.toDisplayString(((U=p.value)==null?void 0:U.orig_name)||"该图片")+"」?",1)]}),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}}),[["__scopeId","data-v-5071e6a3"]]),qm=Object.freeze(Object.defineProperty({__proto__:null,default:sa},Symbol.toStringTag,{value:"Module"})),zm={key:0,class:"qiu-pagination__total"},Tm={key:1,class:"qiu-pagination__sizes"},Im=["disabled","value"],Dm=["value"],Rm=["disabled"],Lm={key:3,class:"qiu-pagination__pager"},Pm=["disabled","onClick"],Om={key:1,class:"qiu-pagination__ellipsis"},jm=["disabled"],Fm={key:5,class:"qiu-pagination__jumper"},Am=["disabled"],Qo=de(e.defineComponent({name:"QiuPagination",__name:"index",props:{total:{default:0},currentPage:{default:1},pageSize:{default:10},pageSizes:{default:()=>[10,20,50,100]},layout:{default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},hideOnSinglePage:{type:Boolean,default:!1},small:{type:Boolean,default:!1},pagerCount:{default:7},type:{default:"primary"},color:{},variant:{default:"default"}},emits:["update:current-page","update:page-size","current-change","size-change"],setup(t,{emit:a}){const n={primary:"var(--qiu-color-primary, #0f766e)",success:"var(--qiu-color-success, #67c23a)",warning:"var(--qiu-color-warning, #e6a23c)",danger:"var(--qiu-color-danger, #f56c6c)",info:"var(--qiu-color-info, #909399)",cyan:"#0ea5e9",orange:"#f97316",pink:"#ec4899",teal:"#14b8a6"},o=t,r=a,c=e.ref(""),d=e.computed(()=>({"--qiu-page-color":o.color||n[o.type]||n.primary})),f=e.computed(()=>o.layout.split(",").map(S=>S.trim()).filter(Boolean)),u=e.computed(()=>f.value.includes("total")),h=e.computed(()=>f.value.includes("sizes")),p=e.computed(()=>f.value.includes("prev")),_=e.computed(()=>f.value.includes("pager")),B=e.computed(()=>f.value.includes("next")),$=e.computed(()=>f.value.includes("jumper")),b=e.computed(()=>Math.max(1,Math.ceil(o.total/o.pageSize))),C=e.computed(()=>{const S=b.value,N=o.currentPage,D=o.pagerCount,T=Math.floor(D/2);if(S<=D)return Array.from({length:S},(H,Ve)=>({key:`p-${Ve+1}`,number:Ve+1}));const L=[];L.push({key:"p-1",number:1});let U=Math.max(2,N-T),oe=Math.min(S-1,N+T);N<=T+1?oe=D-2:N>=S-T&&(U=S-D+2),U>2&&L.push({key:"e-start",ellipsis:!0});for(let H=U;H<=oe;H++)L.push({key:`p-${H}`,number:H});return oe<S-1&&L.push({key:"e-end",ellipsis:!0}),L.push({key:`p-${S}`,number:S}),L}),k=S=>{const N=Math.min(Math.max(1,S),b.value);N!==o.currentPage&&(r("update:current-page",N),r("current-change",N))},M=S=>{if(S===o.pageSize)return;r("update:page-size",S),r("size-change",S);const N=Math.max(1,Math.ceil(o.total/S));o.currentPage>N&&k(N)},V=()=>k(o.currentPage-1),E=()=>k(o.currentPage+1),x=S=>k(S),m=S=>{const N=Number(S.target.value);Number.isNaN(N)||M(N)},w=()=>{const S=parseInt(c.value,10);Number.isNaN(S)||(k(S),c.value="")};return(S,N)=>!t.hideOnSinglePage||e.unref(b)>1?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qiu-pagination",[`qiu-pagination--${t.type}`,`qiu-pagination--${t.variant}`,{"is-background":t.background,"is-small":t.small,"is-disabled":t.disabled}]]),style:e.normalizeStyle(e.unref(d))},[e.unref(u)?(e.openBlock(),e.createElementBlock("span",zm," 共 "+e.toDisplayString(t.total)+" 条 ",1)):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("div",Tm,[e.createElementVNode("select",{class:"qiu-pagination__select",disabled:t.disabled,value:t.pageSize,onChange:m},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pageSizes,D=>(e.openBlock(),e.createElementBlock("option",{key:D,value:D},e.toDisplayString(D)+" 条/页 ",9,Dm))),128))],40,Im)])):e.createCommentVNode("",!0),e.unref(p)?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"qiu-pagination__btn qiu-pagination__prev",disabled:t.disabled||t.currentPage<=1,onClick:V}," ‹ ",8,Rm)):e.createCommentVNode("",!0),e.unref(_)?(e.openBlock(),e.createElementBlock("ul",Lm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(C),D=>(e.openBlock(),e.createElementBlock("li",{key:D.key,class:e.normalizeClass(["qiu-pagination__page",{"is-active":D.number===t.currentPage,"is-ellipsis":D.ellipsis}])},[D.ellipsis?(e.openBlock(),e.createElementBlock("span",Om,"…")):(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-pagination__page-btn",disabled:t.disabled,onClick:T=>x(D.number)},e.toDisplayString(D.number),9,Pm))],2))),128))])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",class:"qiu-pagination__btn qiu-pagination__next",disabled:t.disabled||t.currentPage>=e.unref(b),onClick:E}," › ",8,jm)):e.createCommentVNode("",!0),e.unref($)?(e.openBlock(),e.createElementBlock("div",Fm,[N[1]||(N[1]=e.createElementVNode("span",null,"前往",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":N[0]||(N[0]=D=>e.isRef(c)?c.value=D:null),class:"qiu-pagination__jumper-input",type:"text",disabled:t.disabled,onKeydown:e.withKeys(w,["enter"])},null,40,Am),[[e.vModelText,e.unref(c)]]),N[2]||(N[2]=e.createElementVNode("span",null,"页",-1))])):e.createCommentVNode("",!0)],6)):e.createCommentVNode("",!0)}}),[["__scopeId","data-v-46339f52"]]),Qm=Object.freeze(Object.defineProperty({__proto__:null,default:Qo},Symbol.toStringTag,{value:"Module"})),Qr=de(e.defineComponent({name:"QiuSkeleton",__name:"index",props:{rows:{default:3},animated:{type:Boolean,default:!0},loading:{type:Boolean,default:!0},lastRowWidth:{default:60}},setup(t){const a=t,n=o=>o===a.rows?{width:`${a.lastRowWidth}%`}:{};return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-skeleton",{"is-loading":t.loading}])},[t.loading?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.rows,c=>(e.openBlock(),e.createElementBlock("div",{key:c,class:e.normalizeClass(["qiu-skeleton__row",{"is-animated":t.animated}]),style:e.normalizeStyle(n(c))},null,6))),128)):e.renderSlot(o.$slots,"default",{},void 0,!0,1)],2))}}),[["__scopeId","data-v-db348154"]]),Um=Object.freeze(Object.defineProperty({__proto__:null,default:Qr},Symbol.toStringTag,{value:"Module"})),Wm={key:0,class:"qiu-card__header"},Hm={key:1,class:"qiu-card__footer"},No=de(e.defineComponent({name:"QiuCard",__name:"index",props:{bodyClass:{type:String,default:""},bodyStyle:{type:[Object,String],default:()=>({})},shadow:{type:String,default:"never"},skeleton:{type:Boolean,default:!1},skeletonRows:{type:Number,default:5},title:{type:String,default:""}},setup(t){const a=e.ref(!0),n=setTimeout(()=>{a.value=!1},500);return e.onBeforeUnmount(()=>{clearTimeout(n)}),(o,r)=>{const c=Qr;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-card",[`qiu-card--shadow-${t.shadow}`]])},[o.$slots.header||t.title?(e.openBlock(),e.createElementBlock("div",Wm,[o.$slots.header?e.renderSlot(o.$slots,"header",{},void 0,!0,0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(t.title),1)],64))])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["qiu-card__body",t.bodyClass]),style:e.normalizeStyle(t.bodyStyle)},[t.skeleton?(e.openBlock(),e.createBlock(c,{key:0,animated:"",loading:e.unref(a),rows:t.skeletonRows},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"default",{},void 0,!0)]),_:3},8,["loading","rows"])):e.renderSlot(o.$slots,"default",{},void 0,!0,1)],6),o.$slots.footer?(e.openBlock(),e.createElementBlock("div",Hm,[e.renderSlot(o.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-8fc82bfd"]]),Ym=Object.freeze(Object.defineProperty({__proto__:null,default:No},Symbol.toStringTag,{value:"Module"})),Km={class:"badge-library-panel"},vm={class:"upload-btn"},Xm={class:"lib-grid"},Gm=["src"],Jm=["title"],Zm={class:"sub"},eu={key:1,class:"pager"},ii=de(e.defineComponent({__name:"BadgeLibraryPanel",setup(t,{expose:a}){const n=e.ref(!1),o=e.ref([]),r=e.ref(0),c=e.ref(1),d=e.ref(40),f=e.ref(!1),u=e.ref(null);function h(C){return Ao(C)}function p(C){const k=Number(C)||0;return k<1024?`${k} B`:k<1024*1024?`${(k/1024).toFixed(1)} KB`:`${(k/1024/1024).toFixed(2)} MB`}async function _(){var C,k;n.value=!0;try{const M=await Fr({page:c.value,page_size:d.value});o.value=((C=M.data)==null?void 0:C.list)??[],r.value=Number(((k=M.data)==null?void 0:k.total)??0)}catch{o.value=[],r.value=0}finally{n.value=!1}}async function B(C){var V;const k=C.target,M=(V=k.files)==null?void 0:V[0];if(k.value="",!!M)try{await ai(M),ke.success("已上传"),c.value=1,await _()}catch{}}function $(C){u.value=C,f.value=!0}async function b(){const C=u.value;if(C){f.value=!1;try{await ca(Number(C.id)),ke.success("已删除"),await _()}catch{}}}return e.onMounted(()=>_()),a({load:_}),(C,k)=>{const M=nn,V=No,E=Vo,x=Qo,m=Nn,w=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",Km,[e.createVNode(V,{shadow:"never",class:"toolbar-card"},{default:e.withCtx(()=>[e.createElementVNode("label",vm,[e.createElementVNode("input",{type:"file",accept:"image/jpeg,image/png,image/gif,image/webp,image/bmp",class:"upload-input",onChange:B},null,32),e.createVNode(M,{type:"primary",tag:"span"},{default:e.withCtx(()=>[...k[3]||(k[3]=[e.createTextVNode("上传图片",-1)])]),_:1})]),k[4]||(k[4]=e.createElementVNode("span",{class:"hint"},"上传后可在模板编辑器的「图片库」中选用。",-1))]),_:1}),e.withDirectives((e.openBlock(),e.createBlock(V,{shadow:"never"},{default:e.withCtx(()=>[e.createElementVNode("div",Xm,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,S=>(e.openBlock(),e.createElementBlock("div",{key:S.id,class:"lib-cell"},[e.createElementVNode("img",{src:h(S.url),alt:"",class:"thumb",loading:"lazy"},null,8,Gm),e.createElementVNode("div",{class:"meta",title:S.orig_name},e.toDisplayString(S.orig_name||"未命名"),9,Jm),e.createElementVNode("div",Zm,e.toDisplayString(p(S.size))+" · "+e.toDisplayString(S.create_time),1),e.createVNode(M,{type:"danger",link:"",size:"small",onClick:N=>$(S)},{default:e.withCtx(()=>[...k[5]||(k[5]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]))),128))]),!n.value&&!o.value.length?(e.openBlock(),e.createBlock(E,{key:0,description:"暂无图片"})):e.createCommentVNode("",!0),r.value>d.value?(e.openBlock(),e.createElementBlock("div",eu,[e.createVNode(x,{"current-page":c.value,"onUpdate:currentPage":k[0]||(k[0]=S=>c.value=S),"page-size":d.value,layout:"total, prev, pager, next",total:r.value,onCurrentChange:_},null,8,["current-page","page-size","total"])])):e.createCommentVNode("",!0)]),_:1})),[[w,n.value]]),e.createVNode(m,{modelValue:f.value,"onUpdate:modelValue":k[2]||(k[2]=S=>f.value=S),title:"删除确认",width:"400px"},{footer:e.withCtx(()=>[e.createVNode(M,{onClick:k[1]||(k[1]=S=>f.value=!1)},{default:e.withCtx(()=>[...k[6]||(k[6]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(M,{type:"danger",onClick:b},{default:e.withCtx(()=>[...k[7]||(k[7]=[e.createTextVNode("删除",-1)])]),_:1})]),default:e.withCtx(()=>{var S;return[e.createElementVNode("p",null,"确定删除「"+e.toDisplayString(((S=u.value)==null?void 0:S.orig_name)||"该图片")+"」?",1)]}),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-2e8319ad"]]),tu=Object.freeze(Object.defineProperty({__proto__:null,default:ii},Symbol.toStringTag,{value:"Module"})),ri=de(e.defineComponent({__name:"BadgeLibraryManagerDialog",props:{modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(a,n)=>{const o=Nn;return e.openBlock(),e.createBlock(o,{"model-value":t.modelValue,title:"证件图片库",width:"min(920px, 94vw)",class:"badge-library-manager-dialog","append-to-body":"","destroy-on-close":"","onUpdate:modelValue":n[0]||(n[0]=r=>a.$emit("update:modelValue",r))},{default:e.withCtx(()=>[n[1]||(n[1]=e.createElementVNode("p",{class:"dlg-tip"},"管理模板编辑中上传的图片;删除后已保存模板里若仍引用该地址将无法显示。",-1)),t.modelValue?(e.openBlock(),e.createBlock(ii,{key:0})):e.createCommentVNode("",!0)]),_:1},8,["model-value"])}}}),[["__scopeId","data-v-2dc9d861"]]),nu=Object.freeze(Object.defineProperty({__proto__:null,default:ri},Symbol.toStringTag,{value:"Module"})),ci={competition_name:"competition.name",student_name:"student.name",competition_no:"student.competition_no",school_name:"school.name",school_short_name:"school.short_name",age_group:"student.age_group",competition_room:"classroom.name",seat_no:"classroom.seat_no",floor:"classroom.floor",teacher_name:"teacher.name",date:"competition.date",session:"competition.session",enroll_teacher_name:"teacher.enroll_name",teacher_phone:"teacher.phone",signup_teacher_name:"teacher.signup_name",signup_teacher_phone:"teacher.signup_phone",signup_teacher_department:"teacher.signup_department",signup_teacher_position:"teacher.signup_position",signup_teacher_id_card:"teacher.signup_id_card",signup_teacher_email:"teacher.signup_email",signup_teacher_username:"teacher.signup_username",venue_name:"classroom.venue_name",venue_address:"classroom.venue_address",competition_daily_start:"competition.daily_start",competition_daily_end:"competition.daily_end"},Ur=[{id:"student",label:"学生",builtin:!0,enabled:!0,fields:[{key:"name",label:"姓名"},{key:"competition_no",label:"参赛编号"},{key:"age_group",label:"年龄段"}],sample:{name:"张三",competition_no:"A001",age_group:"中班"}},{id:"teacher",label:"教师",builtin:!0,enabled:!0,fields:[{key:"name",label:"监考教师"},{key:"phone",label:"手机"},{key:"enroll_name",label:"带队教师"},{key:"signup_name",label:"报名教师"},{key:"signup_phone",label:"报名教师手机"},{key:"signup_department",label:"报名教师部门"},{key:"signup_position",label:"报名教师职务"},{key:"signup_id_card",label:"报名教师身份证"},{key:"signup_email",label:"报名教师邮箱"},{key:"signup_username",label:"报名教师账号"}],sample:{name:"李老师",phone:"13800000000",signup_name:"王老师"}},{id:"classroom",label:"教室",builtin:!0,enabled:!0,fields:[{key:"name",label:"考场/教室"},{key:"seat_no",label:"座位号"},{key:"floor",label:"楼层"},{key:"venue_name",label:"场地名称"},{key:"venue_address",label:"场地地址"}],sample:{name:"301 教室",seat_no:"12",floor:"3F"}},{id:"school",label:"学校",builtin:!0,enabled:!0,fields:[{key:"name",label:"学校全称"},{key:"short_name",label:"学校简称"}],sample:{name:"示范幼儿园",short_name:"示范园"}},{id:"competition",label:"比赛",builtin:!0,enabled:!0,fields:[{key:"name",label:"比赛名称"},{key:"date",label:"比赛日期"},{key:"session",label:"场次"},{key:"daily_start",label:"当天开始"},{key:"daily_end",label:"当天结束"}],sample:{name:"示例比赛",date:"2026-08-16",session:"上午场"}}];function da(){return Ur.map(t=>({...t,fields:t.fields.map(a=>({...a})),sample:t.sample?{...t.sample}:void 0}))}function Tn(t,a){var o,r;const n=new Map;for(const c of da())n.set(c.id,c);for(const c of t||[]){const d=n.get(c.id);n.set(c.id,d?{...d,...c,fields:(o=c.fields)!=null&&o.length?c.fields:d.fields}:{...c})}for(const c of a||[]){const d=n.get(c.id);n.set(c.id,d?{...d,...c,fields:(r=c.fields)!=null&&r.length?c.fields:d.fields}:{...c})}return[...n.values()].filter(c=>c.enabled!==!1)}function ou(t,a){return`{{${t}.${a}}}`}function Wr(t){const a=[];for(const n of t)for(const o of n.fields)a.push({moduleId:n.id,moduleLabel:n.label,key:o.key,label:o.label,token:ou(n.id,o.key)});return a}function ma(t){const a={};for(const n of t)a[n.id]={...n.sample||{}};return a}function lu(t,a){const n={};for(const[r,c]of Object.entries(t))c!=null&&(n[r]=String(c));!n.competition_name&&a&&(n.competition_name=a);const o={...n};for(const[r,c]of Object.entries(ci)){const[d,f]=c.split("."),u=n[r]??"";(!o[d]||typeof o[d]=="string")&&(o[d]={}),o[d][f]=u}return o}function Hr(t,a){return{id:`custom_${Date.now().toString(36)}`,label:t||"自定义模块",builtin:!1,enabled:!0,fields:a!=null&&a.length?a:[{key:"name",label:"名称"},{key:"value",label:"值"}],sample:{name:"示例",value:"123"}}}function Yr(t,a){const n=a.split(".").filter(Boolean);if(n.length===1){const o=t[n[0]];return o==null?"":typeof o=="string"?o:""}if(n.length>=2){const o=t[n[0]];if(o&&typeof o=="object"){const r=o[n[1]];return r!=null&&r!==""?String(r):""}}return""}function au(t,a){const n=String(a||"").trim();if(!n)return"";if(n.includes(".")){const c=Yr(t,n);if(c)return c}const o=t[n];if(typeof o=="string"&&o!=="")return o;const r=ci[n];if(r){const c=Yr(t,r);if(c)return c}return""}function Uo(t,a){if(!t)return"";const n=a;return t.replace(/\{\{\s*([a-zA-Z0-9_.]+)\s*\}\}/g,(o,r)=>au(n,r))}function iu(t,a){return Uo(t,a)}function Kr(t){return[...t].sort((a,n)=>(a.zIndex??0)-(n.zIndex??0))}function si(t){return t?(/^(https?:|data:|blob:|\/\/)/i.test(t),t):""}const ru=["src"],cu=["src"],su={class:"qiu-canvas-shape-svg",viewBox:"0 0 100 100",preserveAspectRatio:"none"},du=["stroke","stroke-width"],mu=["fill","stroke","stroke-width"],uu=["fill","stroke","stroke-width"],fu=["fill","stroke","stroke-width"],pu=["points","fill","stroke","stroke-width"],Wo=96/25.4,di=de(e.defineComponent({name:"QiuCanvasRenderer",__name:"QiuCanvasRenderer",props:{doc:{},mergeData:{default:()=>({})},screenScale:{default:1},enableLinks:{type:Boolean,default:!0}},setup(t){const a=t,n=e.computed(()=>{var V,E;return(E=(V=a.doc)==null?void 0:V.elements)!=null&&E.length?Kr(a.doc.elements):[]}),o=e.computed(()=>{const V=a.doc;if(!(V!=null&&V.canvas))return{};const E=V.canvas.showBorder!==!1&&V.mode!=="banner",x=V.canvas.borderColor||"#334155",m=Number(V.canvas.borderWidthMm),w=Number.isFinite(m)&&m>0?m:.35,S=V.canvas.unit==="px"||V.mode==="banner"&&!!V.canvas.widthPx;return{width:S?`${V.canvas.widthPx??Math.round(V.canvas.widthMm*Wo)}px`:`${V.canvas.widthMm}mm`,height:S?`${V.canvas.heightPx??Math.round(V.canvas.heightMm*Wo)}px`:`${V.canvas.heightMm}mm`,position:"relative",boxSizing:"border-box",overflow:"hidden",backgroundColor:V.canvas.background||"transparent",border:E?`${w}mm solid ${x}`:"0 solid transparent"}}),r=e.computed(()=>{var E,x;const V=(x=(E=a.doc)==null?void 0:E.canvas)==null?void 0:x.backgroundImage;return V?si(V):""}),c=e.computed(()=>({transform:`scale(${a.screenScale})`,transformOrigin:"top left"})),d=e.computed(()=>{var w,S;const V=(w=a.doc)==null?void 0:w.canvas;if(!V)return{};const E=V.unit==="px"||((S=a.doc)==null?void 0:S.mode)==="banner"&&!!V.widthPx,x=E?(V.widthPx??V.widthMm*Wo)*a.screenScale:V.widthMm*Wo*a.screenScale,m=E?(V.heightPx??V.heightMm*Wo)*a.screenScale:V.heightMm*Wo*a.screenScale;return{width:`${x}px`,height:`${m}px`,overflow:"hidden",lineHeight:0,display:"inline-block",verticalAlign:"top"}});function f(V){return Uo(V.text,a.mergeData||{})}function u(V){var E;return(E=V.link)!=null&&E.href?Uo(V.link.href,a.mergeData||{}):""}function h(V){switch(V){case"center":return{justifyContent:"center",alignItems:"center",textAlign:"center"};case"top-center":return{justifyContent:"center",alignItems:"flex-start",textAlign:"center"};case"bottom-center":return{justifyContent:"center",alignItems:"flex-end",textAlign:"center"};case"middle-left":return{justifyContent:"flex-start",alignItems:"center",textAlign:"left"};case"middle-right":return{justifyContent:"flex-end",alignItems:"center",textAlign:"right"};default:return{justifyContent:"flex-start",alignItems:"flex-start",textAlign:"left"}}}function p(V){var x;const E=[];return V.rotation&&E.push(`rotate(${V.rotation}deg)`),V.flipX&&E.push("scaleX(-1)"),V.flipY&&E.push("scaleY(-1)"),{position:"absolute",left:`${V.xMm}mm`,top:`${V.yMm}mm`,width:`${V.wMm}mm`,height:`${V.hMm}mm`,zIndex:V.zIndex??1,transform:E.join(" ")||void 0,transformOrigin:"center center",pointerEvents:a.enableLinks&&((x=V.link)!=null&&x.href)?"auto":"none",textDecoration:"none",color:void 0}}function _(V){const E=h(V.align),x=V.textDirection==="vertical";return{...p(V),display:"flex",...E,fontSize:`${V.fontSize}pt`,fontFamily:V.fontFamily,color:V.color,lineHeight:1.25,whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"hidden",writingMode:x?"vertical-rl":"horizontal-tb",textOrientation:x?"upright":"mixed"}}function B(V){return V.type!=="image"&&V.type!=="seal"?{}:{...p(V),display:"flex",justifyContent:"center",alignItems:"center",padding:"0.5mm",boxSizing:"border-box"}}function $(V){return{...p(V),boxSizing:"border-box",opacity:V.opacity!=null?String(V.opacity):void 0}}function b(V){return V.showStroke===!1?"none":V.strokeColor||"#606266"}function C(V){return Math.max(0,Number(V.strokeWidthMm??.6))}function k(V){return V.background||"transparent"}function M(V){const E=Math.max(3,Math.min(12,Math.round(Number(V.polygonSides??5)))),x=[];for(let m=0;m<E;m++){const w=-Math.PI/2+Math.PI*2*m/E;x.push(`${50+Math.cos(w)*44},${50+Math.sin(w)*44}`)}return x.join(" ")}return(V,E)=>{var x;return(x=t.doc)!=null&&x.canvas?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qck-layout-clip",style:e.normalizeStyle(d.value)},[e.createElementVNode("div",{class:"qck-screen-wrap",style:e.normalizeStyle(c.value)},[e.createElementVNode("div",{class:"qiu-canvas-root qck-print-root",style:e.normalizeStyle(o.value)},[r.value?(e.openBlock(),e.createElementBlock("img",{key:0,class:"qiu-canvas-bg",src:r.value,alt:"",crossorigin:"anonymous"},null,8,ru)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.doc.regions||[],m=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"qiu-canvas-region",style:e.normalizeStyle({left:`${m.xMm}mm`,top:`${m.yMm}mm`,width:`${m.wMm}mm`,height:`${m.hMm}mm`,backgroundColor:m.background||"transparent",backgroundImage:m.backgroundImage?`url(${e.unref(si)(m.backgroundImage)})`:void 0,backgroundSize:m.backgroundImage?"cover":void 0,backgroundPosition:m.backgroundImage?"center":void 0})},null,4))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,m=>{var w,S,N,D,T,L;return e.openBlock(),e.createElementBlock(e.Fragment,{key:m.id},[m.type==="text"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.enableLinks&&u(m)?"a":"div"),{key:0,href:t.enableLinks&&u(m)?u(m):void 0,target:((w=m.link)==null?void 0:w.target)||"_blank",rel:((S=m.link)==null?void 0:S.target)==="_self"?void 0:"noopener noreferrer",style:e.normalizeStyle(_(m))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f(m)),1)]),_:2},1032,["href","target","rel","style"])):m.type==="image"||m.type==="seal"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.enableLinks&&u(m)?"a":"div"),{key:1,href:t.enableLinks&&u(m)?u(m):void 0,target:((N=m.link)==null?void 0:N.target)||"_blank",rel:((D=m.link)==null?void 0:D.target)==="_self"?void 0:"noopener noreferrer",style:e.normalizeStyle(B(m))},{default:e.withCtx(()=>[e.createElementVNode("img",{src:e.unref(si)(m.src),alt:"",style:{"max-width":"100%","max-height":"100%","object-fit":"contain"}},null,8,cu)]),_:2},1032,["href","target","rel","style"])):m.type==="shape"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.enableLinks&&u(m)?"a":"div"),{key:2,href:t.enableLinks&&u(m)?u(m):void 0,target:((T=m.link)==null?void 0:T.target)||"_blank",rel:((L=m.link)==null?void 0:L.target)==="_self"?void 0:"noopener noreferrer",style:e.normalizeStyle($(m))},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("svg",su,[m.shape==="line"?(e.openBlock(),e.createElementBlock("line",{key:0,x1:"4",y1:"50",x2:"96",y2:"50",stroke:b(m),"stroke-width":Math.max(C(m)*3.2,1),"stroke-linecap":"round"},null,8,du)):m.shape==="rect"?(e.openBlock(),e.createElementBlock("rect",{key:1,x:"4",y:"4",width:"92",height:"92",fill:k(m),stroke:b(m),"stroke-width":C(m)*3.2},null,8,mu)):m.shape==="circle"?(e.openBlock(),e.createElementBlock("ellipse",{key:2,cx:"50",cy:"50",rx:"46",ry:"46",fill:k(m),stroke:b(m),"stroke-width":C(m)*3.2},null,8,uu)):m.shape==="triangle"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:"50,4 96,96 4,96",fill:k(m),stroke:b(m),"stroke-width":C(m)*3.2,"stroke-linejoin":"round"},null,8,fu)):(e.openBlock(),e.createElementBlock("polygon",{key:4,points:M(m),fill:k(m),stroke:b(m),"stroke-width":C(m)*3.2,"stroke-linejoin":"round"},null,8,pu))]))]),_:2},1032,["href","target","rel","style"])):e.createCommentVNode("",!0)],64)}),128))],4)],4)],4)):e.createCommentVNode("",!0)}}}),[["__scopeId","data-v-d3f37938"]]),hu=Object.freeze(Object.defineProperty({__proto__:null,default:di},Symbol.toStringTag,{value:"Module"})),Ho=e.defineComponent({name:"QiuBadgeTemplateRenderer",__name:"BadgeTemplateRenderer",props:{doc:{},mergeData:{default:()=>({})},screenScale:{default:1},enableLinks:{type:Boolean,default:!1}},setup(t){return(a,n)=>(e.openBlock(),e.createBlock(di,{doc:t.doc,"merge-data":t.mergeData,"screen-scale":t.screenScale,"enable-links":t.enableLinks},null,8,["doc","merge-data","screen-scale","enable-links"]))}}),gu=Object.freeze(Object.defineProperty({__proto__:null,default:Ho},Symbol.toStringTag,{value:"Module"})),_u={class:"page-container badge-library-page"},bu=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({__name:"BadgeLibraryView",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",_u,[n[0]||(n[0]=e.createElementVNode("div",{class:"page-head"},[e.createElementVNode("h2",{class:"page-h2"},"证件图片库"),e.createElementVNode("p",{class:"page-desc"},"管理模板编辑中上传的图片,可删除不再使用的文件;删除后已保存模板里若仍引用该地址将无法显示。")],-1)),e.createVNode(ii)]))}}),[["__scopeId","data-v-05d15698"]])},Symbol.toStringTag,{value:"Module"})),yu=["disabled"],ku=["value","disabled","readonly","onKeydown"],wu=["disabled"],xu=["disabled"],Nl=de(e.defineComponent({name:"QiuInputNumber",__name:"index",props:{modelValue:{default:null},min:{default:-1/0},max:{default:1/0},step:{default:1},stepStrictly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},controls:{type:Boolean,default:!0},controlsPosition:{default:""},size:{default:"default"},precision:{}},emits:["update:modelValue","change","blur"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.computed(()=>o.size||"default"),f=E=>Math.min(o.max,Math.max(o.min,E)),u=E=>{if(!o.stepStrictly)return E;const x=Math.round((E-o.min)/o.step);return f(o.min+x*o.step)},h=E=>{if(E==null||Number.isNaN(E))return null;let x=u(E);return x=f(x),o.precision!==void 0&&(x=Number(x.toFixed(o.precision))),x},p=e.computed(()=>o.modelValue===null||o.modelValue===void 0?"":String(o.modelValue)),_=e.computed(()=>o.modelValue!==null&&o.modelValue<=o.min),B=e.computed(()=>o.modelValue!==null&&o.modelValue>=o.max),$=E=>{r("update:modelValue",E),r("change",E)},b=()=>o.modelValue??(o.min===-1/0?0:o.min),C=()=>{o.disabled||$(h(b()+o.step))},k=()=>{o.disabled||$(h(b()-o.step))},M=E=>{const x=E.target.value;if(x===""||x==="-"){r("update:modelValue",null);return}const m=Number(x);Number.isNaN(m)||r("update:modelValue",m)},V=E=>{const x=h(o.modelValue??null);x!==o.modelValue&&$(x),r("blur",E)};return a({focus:()=>{var E;return(E=c.value)==null?void 0:E.focus()}}),(E,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-input-number",[`qiu-input-number--${e.unref(d)}`,{"is-disabled":t.disabled,"is-controls-right":t.controlsPosition==="right","is-without-controls":!t.controls}]])},[t.controls&&t.controlsPosition!=="right"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-input-number__decrease",disabled:t.disabled||e.unref(_),tabindex:"-1",onMousedown:x[0]||(x[0]=e.withModifiers(()=>{},["prevent"])),onClick:k}," − ",40,yu)):e.createCommentVNode("",!0),e.createElementVNode("input",{ref_key:"inputRef",ref:c,class:"qiu-input-number__inner",type:"text",value:e.unref(p),disabled:t.disabled,readonly:t.readonly,onInput:M,onBlur:V,onKeydown:[e.withKeys(e.withModifiers(C,["prevent"]),["up"]),e.withKeys(e.withModifiers(k,["prevent"]),["down"])]},null,40,ku),t.controls?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-input-number__increase",disabled:t.disabled||e.unref(B),tabindex:"-1",onMousedown:x[1]||(x[1]=e.withModifiers(()=>{},["prevent"])),onClick:C}," + ",40,wu)):e.createCommentVNode("",!0),t.controls&&t.controlsPosition==="right"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"qiu-input-number__decrease qiu-input-number__decrease--right",disabled:t.disabled||e.unref(_),tabindex:"-1",onMousedown:x[2]||(x[2]=e.withModifiers(()=>{},["prevent"])),onClick:k}," − ",40,xu)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-753e88c3"]]),Vu=Object.freeze(Object.defineProperty({__proto__:null,default:Nl},Symbol.toStringTag,{value:"Module"})),vr=Symbol("qiuForm"),Cu=Symbol("qiuFormItem"),Yo=de(e.defineComponent({name:"QiuForm",__name:"index",props:{model:{},rules:{},labelWidth:{default:""},labelPosition:{default:"right"},inline:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},hideRequiredAsterisk:{type:Boolean,default:!1},requireAsteriskPosition:{default:"left"},validateOnRuleChange:{type:Boolean,default:!0}},emits:["validate"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.computed(()=>!o.labelWidth&&o.labelWidth!==0?"":typeof o.labelWidth=="number"?`${o.labelWidth}px`:o.labelWidth),d=e.computed(()=>{if(c.value)return{"--qiu-form-label-width":c.value}}),f=e.ref([]),u=C=>{f.value.find(k=>k.uid===C.uid)||f.value.push(C)},h=C=>{f.value=f.value.filter(k=>k.uid!==C.uid)},p=C=>{const k=f.value.filter(M=>M.prop);return Promise.all(k.map(M=>M.validate(""))).then(M=>{const V=M.every(Boolean);return C==null||C(V),V}).catch(()=>(C==null||C(!1),!1))},_=async C=>{const k=Array.isArray(C)?C:[C],M=f.value.filter(E=>E.prop&&k.includes(E.prop));return(await Promise.all(M.map(E=>E.validate("")))).every(Boolean)},B=()=>{f.value.forEach(C=>C.resetField())},$=C=>{const k=C?Array.isArray(C)?C:[C]:null;f.value.forEach(M=>{(!k||M.prop&&k.includes(M.prop))&&M.clearValidate()})},b={model:e.computed(()=>o.model),rules:e.computed(()=>o.rules),labelWidth:c,labelPosition:e.computed(()=>o.labelPosition),disabled:e.computed(()=>o.disabled),hideRequiredAsterisk:e.computed(()=>o.hideRequiredAsterisk),addField:u,removeField:h,emitValidate:(C,k,M)=>r("validate",C,k,M)};return e.provide(vr,b),e.provide("qiuFormLabelWidth",c),e.provide("qiuFormLabelPosition",e.computed(()=>o.labelPosition)),e.watch(()=>o.rules,()=>{o.validateOnRuleChange&&p()},{deep:!0}),a({validate:p,validateField:_,resetFields:B,clearValidate:$}),(C,k)=>(e.openBlock(),e.createElementBlock("form",{class:e.normalizeClass(["qiu-form",[`qiu-form--label-${t.labelPosition}`,{"qiu-form--inline":t.inline}]]),style:e.normalizeStyle(e.unref(d)),onSubmit:k[0]||(k[0]=e.withModifiers(()=>{},["prevent"]))},[e.renderSlot(C.$slots,"default",{},void 0,!0)],38))}}),[["__scopeId","data-v-c11d002d"]]),Nu=Object.freeze(Object.defineProperty({__proto__:null,default:Yo},Symbol.toStringTag,{value:"Module"})),Bu=["aria-checked","aria-disabled"],$u={key:0,class:"qiu-switch__label"},Eu={key:0,class:"qiu-switch__label--left"},Su={key:1,class:"qiu-switch__label--right"},Bl=de(e.defineComponent({name:"QiuSwitch",__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:!1},size:{default:"default"},activeText:{default:""},inactiveText:{default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.computed(()=>n.modelValue===n.activeValue||n.modelValue===!0),c=()=>{if(n.disabled)return;const d=r.value?n.inactiveValue:n.activeValue;o("update:modelValue",d),o("change",d)};return(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-switch",[`qiu-switch--${t.size}`,{"is-checked":e.unref(r),"is-disabled":t.disabled}]]),role:"switch","aria-checked":e.unref(r),"aria-disabled":t.disabled,onClick:c},[f[0]||(f[0]=e.createElementVNode("span",{class:"qiu-switch__core"},[e.createElementVNode("span",{class:"qiu-switch__action"})],-1)),t.inactiveText||t.activeText?(e.openBlock(),e.createElementBlock("span",$u,[!e.unref(r)&&t.inactiveText?(e.openBlock(),e.createElementBlock("span",Eu,e.toDisplayString(t.inactiveText),1)):e.createCommentVNode("",!0),e.unref(r)&&t.activeText?(e.openBlock(),e.createElementBlock("span",Su,e.toDisplayString(t.activeText),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],10,Bu))}}),[["__scopeId","data-v-4bdcf3ff"]]),Mu=Object.freeze(Object.defineProperty({__proto__:null,default:Bl},Symbol.toStringTag,{value:"Module"})),ua=de(e.defineComponent({name:"QiuCheckboxGroup",__name:"QiuCheckboxGroup",props:{modelValue:{default:()=>[]},disabled:{type:Boolean,default:!1},type:{default:"default"}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.computed(()=>n.modelValue),c=e.computed(()=>n.disabled),d=(f,u)=>{const h=[...n.modelValue],p=h.indexOf(f);u&&p<0?h.push(f):!u&&p>=0&&h.splice(p,1),o("update:modelValue",h),o("change",h)};return e.provide("qiuCheckboxGroup",{modelValue:r,disabled:c,type:e.computed(()=>n.type),toggleOption:d}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-checkbox-group",[{"is-disabled":t.disabled},`qiu-checkbox-group--${t.type}`]]),role:"group"},[e.renderSlot(f.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-6ab2fa8d"]]),qu=Object.freeze(Object.defineProperty({__proto__:null,default:ua},Symbol.toStringTag,{value:"Module"})),zu={class:"qiu-checkbox__input"},Tu=["checked","disabled","value"],Iu={key:0,class:"qiu-checkbox__label"},Bo=de(e.defineComponent({name:"QiuCheckbox",__name:"index",props:{modelValue:{type:[Boolean,String,Number],default:!1},label:{},disabled:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},trueLabel:{},falseLabel:{},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.useSlots(),c=e.inject("qiuCheckboxGroup",null),d=e.computed(()=>n.disabled||(c==null?void 0:c.disabled.value)),f=e.computed(()=>{var _;return((_=c==null?void 0:c.type)==null?void 0:_.value)==="button"}),u=e.computed(()=>r.default?!0:n.label===void 0||n.label===null?!1:String(n.label).length>0),h=e.computed(()=>c?c.modelValue.value.includes(n.label):n.trueLabel!==void 0||n.falseLabel!==void 0?n.modelValue===n.trueLabel:!!n.modelValue),p=_=>{if(d.value)return;const B=_.target.checked;if(c&&n.label!==void 0){c.toggleOption(n.label,B);return}let $=B;(n.trueLabel!==void 0||n.falseLabel!==void 0)&&($=B?n.trueLabel??!0:n.falseLabel??!1),o("update:modelValue",$),o("change",$)};return(_,B)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["qiu-checkbox",{"is-checked":e.unref(h),"is-disabled":e.unref(d),"is-indeterminate":t.indeterminate,"is-button":e.unref(f),"is-border":t.border}])},[e.createElementVNode("span",zu,[e.createElementVNode("input",{type:"checkbox",class:"qiu-checkbox__original",checked:e.unref(h),disabled:e.unref(d),value:t.label,onChange:p},null,40,Tu),B[0]||(B[0]=e.createElementVNode("span",{class:"qiu-checkbox__inner"},null,-1))]),e.unref(u)?(e.openBlock(),e.createElementBlock("span",Iu,[e.renderSlot(_.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-8498f310"]]),Du=Object.freeze(Object.defineProperty({__proto__:null,default:Bo},Symbol.toStringTag,{value:"Module"})),$l=de(e.defineComponent({name:"QiuRadioGroup",__name:"QiuRadioGroup",props:{modelValue:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},name:{default:""},type:{default:"default"}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.computed(()=>n.name||`qiu-radio-group-${Math.random().toString(36).slice(2,9)}`),c=e.computed(()=>n.modelValue),d=e.computed(()=>n.disabled),f=u=>{o("update:modelValue",u),o("change",u)};return e.provide("qiuRadioGroup",{modelValue:c,disabled:d,name:r,type:e.computed(()=>n.type),changeEvent:f}),(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-radio-group",[{"is-disabled":t.disabled},`qiu-radio-group--${t.type}`]]),role:"radiogroup"},[e.renderSlot(u.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-793fb480"]]),Ru=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"})),Lu={class:"qiu-radio__input"},Pu=["checked","disabled","name","value"],Ou={key:0,class:"qiu-radio__label"},fa=de(e.defineComponent({name:"QiuRadio",__name:"index",props:{modelValue:{type:[String,Number,Boolean]},label:{type:[String,Number,Boolean]},disabled:{type:Boolean,default:!1},border:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.inject("qiuRadioGroup",null),c=`qiu-radio-${Math.random().toString(36).slice(2,9)}`,d=e.computed(()=>n.disabled||(r==null?void 0:r.disabled.value)),f=e.computed(()=>{var _;return((_=r==null?void 0:r.type)==null?void 0:_.value)==="button"}),u=e.computed(()=>(r?r.modelValue.value:n.modelValue)===n.label),h=e.computed(()=>(r==null?void 0:r.name.value)||c),p=()=>{d.value||n.label===void 0||(r?r.changeEvent(n.label):(o("update:modelValue",n.label),o("change",n.label)))};return(_,B)=>(e.openBlock(),e.createElementBlock("label",{class:e.normalizeClass(["qiu-radio",{"is-checked":e.unref(u),"is-disabled":e.unref(d),"is-button":e.unref(f),"is-border":t.border}])},[e.createElementVNode("span",Lu,[e.createElementVNode("input",{type:"radio",class:"qiu-radio__original",checked:e.unref(u),disabled:e.unref(d),name:e.unref(h),value:t.label,onChange:p},null,40,Pu),B[0]||(B[0]=e.createElementVNode("span",{class:"qiu-radio__inner"},null,-1))]),_.$slots.default||t.label!==void 0?(e.openBlock(),e.createElementBlock("span",Ou,[e.renderSlot(_.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-22d0e6cd"]]),ju=Object.freeze(Object.defineProperty({__proto__:null,default:fa},Symbol.toStringTag,{value:"Module"})),Fu=["onKeydown"],Au={class:"qiu-select__suffix"},Qu=["onClick"],Uu={key:2,class:"qiu-select__empty"},El=de(e.defineComponent({name:"QiuSelect",inheritAttrs:!1,__name:"index",props:{modelValue:{type:[String,Number,Boolean,null],default:null},options:{default:void 0},placeholder:{default:"请选择"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:"default"},fit:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear","visibleChange"],setup(t,{emit:a}){const n=t,o=a,r=e.useAttrs(),c=e.useSlots(),d=e.ref(null),f=e.ref(null),u=e.ref(!1),h=e.ref([]),p=e.ref(new Map),_=e.ref({position:"fixed",top:"-9999px",left:"-9999px",zIndex:3100,minWidth:"120px"}),B=e.computed(()=>n.size||"default"),$=e.computed(()=>r.style||void 0),b=e.computed(()=>n.modelValue!==null&&n.modelValue!==void 0&&n.modelValue!==""),C=e.computed(()=>!!c.default),k=e.computed(()=>{var H;return(H=n.options)!=null&&H.length?n.options:h.value}),M=e.computed(()=>{if(!b.value)return"";const H=k.value.find(Ve=>Ve.value===n.modelValue);return H?H.label:p.value.get(n.modelValue)??String(n.modelValue)}),V=e.computed(()=>n.modelValue),E=(H,Ve)=>{p.value.set(H,Ve),o("update:modelValue",H),o("change",H),D()},x=H=>{},m=H=>{const Ve=h.value.findIndex(Z=>Z.value===H.value);Ve>=0?h.value[Ve]=H:h.value.push(H),p.value.set(H.value,H.label)},w=H=>{h.value=h.value.filter(Ve=>Ve.value!==H)};e.provide("qiuSelect",{modelValue:V,selectOption:E,setHoverOption:x,registerOption:m,unregisterOption:w});const S=()=>{const H=d.value,Ve=f.value;if(!H||!Ve)return;const Z=H.getBoundingClientRect(),z=Ve.getBoundingClientRect(),fe=4,he=window.innerWidth,se=window.innerHeight;let te=Z.bottom+fe,re=Z.left;const Ne=Math.max(Z.width,120);te+z.height>se-4&&(te=Z.top-z.height-fe),te<4&&(te=4),re+Ne>he-4&&(re=he-Ne-4),re<4&&(re=4),_.value={position:"fixed",top:`${Math.round(te)}px`,left:`${Math.round(re)}px`,zIndex:3100,minWidth:`${Math.round(Ne)}px`}},N=async()=>{n.disabled||(u.value=!0,o("visibleChange",!0),await e.nextTick(),S(),requestAnimationFrame(()=>S()))},D=()=>{u.value&&(u.value=!1,o("visibleChange",!1))},T=()=>{n.disabled||(u.value?D():N())},L=()=>{o("update:modelValue",null),o("change",null),o("clear")},U=H=>{var Z,z;if(!u.value)return;const Ve=H.target;(Z=d.value)!=null&&Z.contains(Ve)||(z=f.value)!=null&&z.contains(Ve)||D()},oe=()=>{u.value&&S()};return e.watch(u,H=>{H?(document.addEventListener("mousedown",U,!0),window.addEventListener("scroll",oe,!0),window.addEventListener("resize",oe)):(document.removeEventListener("mousedown",U,!0),window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe))}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",U,!0),window.removeEventListener("scroll",oe,!0),window.removeEventListener("resize",oe)}),(H,Ve)=>{const Z=_t;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:d,class:e.normalizeClass(["qiu-select",[`qiu-select--${e.unref(B)}`,e.unref(r).class,{"is-disabled":t.disabled,"is-focused":e.unref(u),"is-clearable":t.clearable,"is-fit":t.fit}]]),style:e.normalizeStyle(e.unref($))},[e.createElementVNode("div",{class:"qiu-select__wrapper",tabindex:"0",onClick:T,onKeydown:[e.withKeys(e.withModifiers(T,["prevent"]),["enter"]),e.withKeys(e.withModifiers(T,["prevent"]),["space"]),e.withKeys(D,["esc"]),e.withKeys(e.withModifiers(N,["prevent"]),["down"])]},[e.createElementVNode("span",{class:e.normalizeClass(["qiu-select__selected",{"is-placeholder":!e.unref(M)}])},e.toDisplayString(e.unref(M)||t.placeholder),3),e.createElementVNode("span",Au,[t.clearable&&e.unref(b)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-select__clear",tabindex:"-1",onMousedown:Ve[0]||(Ve[0]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(L,["stop"])}," × ",32)):e.createCommentVNode("",!0),e.createVNode(Z,{class:e.normalizeClass(["qiu-select__caret",{"is-open":e.unref(u)}]),icon:"arrow-down-s-line"},null,8,["class"])])],40,Fu),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-select-fade"},{default:e.withCtx(()=>[e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:f,class:"qiu-select__dropdown",style:e.normalizeStyle(e.unref(_)),onClick:Ve[1]||(Ve[1]=e.withModifiers(()=>{},["stop"]))},[e.unref(k).length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(k),z=>(e.openBlock(),e.createElementBlock("div",{key:String(z.value),class:e.normalizeClass(["qiu-option qiu-select__option",{"is-selected":t.modelValue===z.value,"is-disabled":z.disabled}]),onClick:fe=>!z.disabled&&E(z.value,z.label)},e.toDisplayString(z.label),11,Qu))),128)):e.renderSlot(H.$slots,"default",{},void 0,!0,1),!e.unref(k).length&&!e.unref(C)?(e.openBlock(),e.createElementBlock("div",Uu," 无数据 ")):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)]),_:3})]))],6)}}}),[["__scopeId","data-v-4deb16c0"]]),Wu=Object.freeze(Object.defineProperty({__proto__:null,default:El},Symbol.toStringTag,{value:"Module"})),Hu={class:"qiu-form-item__content"},Yu={key:0,class:"qiu-form-item__error"},Ko=de(e.defineComponent({name:"QiuFormItem",__name:"index",props:{label:{},labelWidth:{},required:{type:Boolean,default:void 0},prop:{},error:{},rules:{}},setup(t,{expose:a}){var x;const n=t,o=e.inject(vr,null),r=e.inject("qiuFormLabelWidth",e.ref("")),c=e.inject("qiuFormLabelPosition",e.ref("right")),d=((x=e.getCurrentInstance())==null?void 0:x.uid)??Math.random(),f=e.ref(""),u=e.ref(""),h=e.ref(void 0),p=e.computed(()=>n.labelWidth!==void 0&&n.labelWidth!==""?typeof n.labelWidth=="number"?`${n.labelWidth}px`:n.labelWidth:(o==null?void 0:o.labelWidth.value)||r.value),_=e.computed(()=>{if(((o==null?void 0:o.labelPosition.value)||c.value)!=="top"&&p.value)return{width:p.value}}),B=e.computed(()=>{if(!(!n.prop||!(o!=null&&o.model.value)))return o.model.value[n.prop]}),$=e.computed(()=>{var w;const m=[];if(n.rules&&m.push(...Array.isArray(n.rules)?n.rules:[n.rules]),n.prop&&((w=o==null?void 0:o.rules.value)!=null&&w[n.prop])){const S=o.rules.value[n.prop];m.push(...Array.isArray(S)?S:[S])}return m}),b=e.computed(()=>o!=null&&o.hideRequiredAsterisk.value?!1:n.required===!0?!0:n.required===!1?!1:$.value.some(m=>m.required)),C=(m,w)=>new Promise(S=>{if(m.required&&(w==null||w===""||Array.isArray(w)&&!w.length)){S(m.message||"必填项");return}if(m.min!=null||m.max!=null){const N=typeof w=="number"?w:String(w??"").length;if(m.min!=null&&N<m.min){S(m.message||`长度不能少于 ${m.min}`);return}if(m.max!=null&&N>m.max){S(m.message||`长度不能超过 ${m.max}`);return}}if(m.pattern&&w!=null&&w!==""&&!m.pattern.test(String(w))){S(m.message||"格式不正确");return}if(m.validator){m.validator(m,w,N=>{S(N?typeof N=="string"?N:N.message||"校验失败":"")});return}S("")}),k=async m=>{if(n.error)return f.value="error",u.value=n.error,!1;const w=$.value.filter(N=>{if(!m)return!0;const D=N.trigger;return D?(Array.isArray(D)?D:[D]).includes(m):!0});w.length;const S=m?w:$.value;if(!S.length)return f.value="",u.value="",!0;f.value="validating";for(const N of S){const D=await C(N,B.value);if(D)return f.value="error",u.value=D,n.prop&&(o==null||o.emitValidate(n.prop,!1,D)),!1}return f.value="success",u.value="",n.prop&&(o==null||o.emitValidate(n.prop,!0,"")),!0},M=()=>{n.prop&&(o!=null&&o.model.value)&&(o.model.value[n.prop]=h.value),V()},V=()=>{f.value="",u.value=""},E={uid:d,prop:n.prop,validate:k,resetField:M,clearValidate:V};return e.provide(Cu,{validate:k,prop:e.computed(()=>n.prop)}),e.onMounted(()=>{h.value=B.value,o==null||o.addField(E)}),e.onBeforeUnmount(()=>{o==null||o.removeField(E)}),e.watch(()=>n.error,m=>{m&&(f.value="error",u.value=m)}),e.watch(B,()=>{(f.value==="error"||$.value.some(m=>{const w=m.trigger;return w?(Array.isArray(w)?w:[w]).includes("change"):!0}))&&k("change")}),a({validate:k,resetField:M,clearValidate:V,validateState:f,validateMessage:u}),(m,w)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-form-item",{"is-required":e.unref(b),"is-error":e.unref(f)==="error"}])},[t.label||m.$slots.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"qiu-form-item__label",style:e.normalizeStyle(e.unref(_))},[e.renderSlot(m.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",Hu,[e.renderSlot(m.$slots,"default",{},void 0,!0),e.unref(u)&&e.unref(f)==="error"?(e.openBlock(),e.createElementBlock("div",Yu,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-7c367a37"]]),Ku=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),vu={key:0,class:"qiu-input__prepend"},Xu={class:"qiu-input__wrapper"},Gu={key:0,class:"qiu-input__prefix"},Ju=["value","placeholder","disabled","readonly","rows","maxlength"],Zu=["type","value","placeholder","disabled","readonly","maxlength"],ef={key:3,class:"qiu-input__suffix"},tf={key:1,class:"qiu-input__append"},Wn=de(e.defineComponent({name:"QiuInput",inheritAttrs:!1,__name:"index",props:{modelValue:{default:""},type:{default:"text"},placeholder:{default:""},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},size:{default:"default"},showPassword:{type:Boolean,default:!1},prefixIcon:{},suffixIcon:{},rows:{default:3},maxlength:{}},emits:["update:modelValue","input","change","focus","blur","clear","keyup"],setup(t,{expose:a,emit:n}){const o=t,r=e.useAttrs(),c=e.computed(()=>{const{class:m,style:w,...S}=r;return S}),d=n,f=e.ref(null),u=e.ref(null),h=e.ref(!1),p=e.ref(!1),_=e.computed(()=>o.size||"default"),B=e.computed(()=>o.type==="textarea"),$=e.computed(()=>o.showPassword?p.value?"text":"password":o.type||"text"),b=e.computed(()=>{const m=o.modelValue;return m!==""&&m!==void 0&&m!==null}),C=m=>{const w=m.target.value;d("update:modelValue",w),d("input",w)},k=m=>{h.value=!0,d("focus",m)},M=m=>{h.value=!1,d("blur",m)},V=()=>{d("update:modelValue",""),d("input",""),d("clear"),d("change","")};return a({focus:()=>{var m;(m=f.value||u.value)==null||m.focus()},blur:()=>{var m;(m=f.value||u.value)==null||m.blur()},inputRef:f,textareaRef:u}),(m,w)=>{const S=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-input",[`qiu-input--${e.unref(_)}`,{"is-disabled":t.disabled,"is-focused":e.unref(h),"is-clearable":t.clearable,"has-value":e.unref(b),"has-prefix":m.$slots.prefix||t.prefixIcon,"has-suffix":m.$slots.suffix||t.suffixIcon||t.clearable||t.showPassword,"is-textarea":e.unref(B)}]])},[m.$slots.prepend?(e.openBlock(),e.createElementBlock("div",vu,[e.renderSlot(m.$slots,"prepend",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Xu,[m.$slots.prefix||t.prefixIcon?(e.openBlock(),e.createElementBlock("span",Gu,[e.renderSlot(m.$slots,"prefix",{},()=>[t.prefixIcon?(e.openBlock(),e.createBlock(S,{key:0,icon:t.prefixIcon},null,8,["icon"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),e.unref(B)?(e.openBlock(),e.createElementBlock("textarea",e.mergeProps({key:1,ref_key:"textareaRef",ref:u,class:"qiu-input__inner qiu-input__textarea",value:t.modelValue??"",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,rows:t.rows,maxlength:t.maxlength},e.unref(c),{onInput:C,onFocus:k,onBlur:M,onChange:w[0]||(w[0]=N=>d("change",N.target.value))}),null,16,Ju)):(e.openBlock(),e.createElementBlock("input",e.mergeProps({key:2,ref_key:"inputRef",ref:f,class:"qiu-input__inner",type:e.unref($),value:t.modelValue??"",placeholder:t.placeholder,disabled:t.disabled,readonly:t.readonly,maxlength:t.maxlength},e.unref(c),{onInput:C,onFocus:k,onBlur:M,onChange:w[1]||(w[1]=N=>d("change",N.target.value)),onKeyup:w[2]||(w[2]=e.withKeys(N=>d("keyup",N),["enter"]))}),null,16,Zu)),m.$slots.suffix||t.suffixIcon||t.clearable&&e.unref(b)||t.showPassword?(e.openBlock(),e.createElementBlock("span",ef,[t.clearable&&e.unref(b)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-input__clear",tabindex:"-1",onMousedown:w[3]||(w[3]=e.withModifiers(()=>{},["prevent"])),onClick:V}," × ",32)):e.createCommentVNode("",!0),t.showPassword?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-input__password",tabindex:"-1",onMousedown:w[4]||(w[4]=e.withModifiers(()=>{},["prevent"])),onClick:w[5]||(w[5]=N=>p.value=!e.unref(p))},[e.createVNode(S,{icon:e.unref(p)?"eye-line":"eye-off-line"},null,8,["icon"])],32)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"suffix",{},()=>[t.suffixIcon?(e.openBlock(),e.createBlock(S,{key:0,icon:t.suffixIcon},null,8,["icon"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0)]),m.$slots.append?(e.openBlock(),e.createElementBlock("div",tf,[e.renderSlot(m.$slots,"append",{},void 0,!0)])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-4ea547be"]]),nf=Object.freeze(Object.defineProperty({__proto__:null,default:Wn},Symbol.toStringTag,{value:"Module"})),of={class:"qiu-loading__content"},lf={key:0,class:"qiu-loading__spinner"},af={key:1,class:"qiu-loading__dual-ring","aria-hidden":"true"},rf={key:2,class:"qiu-loading__crescent","aria-hidden":"true"},cf={key:3,class:"qiu-loading__gradient","aria-hidden":"true"},sf={key:4,class:"qiu-loading__dash","aria-hidden":"true"},df={key:5,class:"qiu-loading__dots","aria-hidden":"true"},mf={key:6,class:"qiu-loading__wave","aria-hidden":"true"},uf={key:7,class:"qiu-loading__bounce","aria-hidden":"true"},ff={key:8,class:"qiu-loading__bars","aria-hidden":"true"},pf={key:9,class:"qiu-loading__bricks","aria-hidden":"true"},hf={key:10,class:"qiu-loading__square","aria-hidden":"true"},gf={key:11,class:"qiu-loading__flip","aria-hidden":"true"},_f={key:12,class:"qiu-loading__pulse","aria-hidden":"true"},bf={key:13,class:"qiu-loading__ripple","aria-hidden":"true"},yf={key:14,class:"qiu-loading__orbit","aria-hidden":"true"},kf={key:15,class:"qiu-loading__radar","aria-hidden":"true"},wf={key:16,class:"qiu-loading__spiral","aria-hidden":"true"},xf={key:17,class:"qiu-loading__infinity","aria-hidden":"true"},Vf={key:18,class:"qiu-loading__hourglass","aria-hidden":"true"},Cf={key:19,class:"qiu-loading__skeleton","aria-hidden":"true"},Nf={key:20,class:"qiu-loading__spinner"},Bf={key:21,class:"qiu-loading__text"},pa=e.defineComponent({name:"QiuLoading",__name:"spinner",props:{text:{default:""},fullscreen:{type:Boolean,default:!1},transparent:{type:Boolean,default:!1},effect:{default:"spinner"}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-loading",[`qiu-loading--${t.effect}`,{"is-fullscreen":t.fullscreen,"is-transparent":t.transparent}]])},[n[13]||(n[13]=e.createElementVNode("div",{class:"qiu-loading__mask"},null,-1)),e.createElementVNode("div",of,[t.effect==="spinner"?(e.openBlock(),e.createElementBlock("span",lf)):t.effect==="dual-ring"?(e.openBlock(),e.createElementBlock("span",af)):t.effect==="crescent"?(e.openBlock(),e.createElementBlock("span",rf)):t.effect==="gradient"?(e.openBlock(),e.createElementBlock("span",cf)):t.effect==="dash"?(e.openBlock(),e.createElementBlock("span",sf)):t.effect==="dots"?(e.openBlock(),e.createElementBlock("span",df,[...n[0]||(n[0]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="wave"?(e.openBlock(),e.createElementBlock("span",mf,[...n[1]||(n[1]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="bounce"?(e.openBlock(),e.createElementBlock("span",uf,[...n[2]||(n[2]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="bars"?(e.openBlock(),e.createElementBlock("span",ff,[...n[3]||(n[3]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="bricks"?(e.openBlock(),e.createElementBlock("span",pf,[...n[4]||(n[4]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="square"?(e.openBlock(),e.createElementBlock("span",hf)):t.effect==="flip"?(e.openBlock(),e.createElementBlock("span",gf,[...n[5]||(n[5]=[e.createElementVNode("i",null,null,-1)])])):t.effect==="pulse"?(e.openBlock(),e.createElementBlock("span",_f,[...n[6]||(n[6]=[e.createElementVNode("i",null,null,-1)])])):t.effect==="ripple"?(e.openBlock(),e.createElementBlock("span",bf,[...n[7]||(n[7]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="orbit"?(e.openBlock(),e.createElementBlock("span",yf,[...n[8]||(n[8]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="radar"?(e.openBlock(),e.createElementBlock("span",kf,[...n[9]||(n[9]=[e.createElementVNode("i",null,null,-1)])])):t.effect==="spiral"?(e.openBlock(),e.createElementBlock("span",wf,[...n[10]||(n[10]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):t.effect==="infinity"?(e.openBlock(),e.createElementBlock("span",xf,[...n[11]||(n[11]=[e.createElementVNode("i",null,null,-1)])])):t.effect==="hourglass"?(e.openBlock(),e.createElementBlock("span",Vf)):t.effect==="skeleton"?(e.openBlock(),e.createElementBlock("span",Cf,[...n[12]||(n[12]=[e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1),e.createElementVNode("i",null,null,-1)])])):(e.openBlock(),e.createElementBlock("span",Nf)),t.text?(e.openBlock(),e.createElementBlock("p",Bf,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0)])],2))}}),$f=Object.freeze(Object.defineProperty({__proto__:null,default:pa},Symbol.toStringTag,{value:"Module"})),Ef=["onKeydown"],Sf={class:"qiu-time-panel__body"},Mf={class:"qiu-time-panel__spinner"},qf=["onClick"],zf={class:"qiu-time-panel__spinner"},Tf=["onClick"],If={key:0,class:"qiu-time-panel__spinner"},Df=["onClick"],Xr=de(e.defineComponent({name:"QiuTime",inheritAttrs:!1,__name:"index",props:{modelValue:{default:null},format:{default:"HH:mm:ss"},placeholder:{default:"选择时间"},clearable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},size:{default:"default"},fit:{type:Boolean,default:!1},hourStep:{default:1},minuteStep:{default:1},secondStep:{default:1}},emits:["update:modelValue","change","clear","visible-change"],setup(t,{emit:a}){const n=t,o=a,r=e.useAttrs(),c=e.ref(null),d=e.ref(null),f=e.ref(null),u=e.ref(null),h=e.ref(null),p=e.ref(!1),_=e.ref({position:"fixed",top:"-9999px",left:"-9999px",zIndex:3100}),B=e.reactive({hour:0,minute:0,second:0}),$=e.computed(()=>n.size||"default"),b=e.computed(()=>n.format!=="HH:mm"),C=e.computed(()=>n.modelValue!=null&&n.modelValue!==""),k=re=>String(re).padStart(2,"0"),M=(re,Ne)=>{const De=Math.max(1,Math.floor(Ne||1)),$e=[];for(let Ge=0;Ge<=re;Ge+=De)$e.push(Ge);return $e[$e.length-1]!==re&&re%De,$e},V=e.computed(()=>M(23,n.hourStep)),E=e.computed(()=>M(59,n.minuteStep)),x=e.computed(()=>M(59,n.secondStep)),m=re=>{if(!re)return null;const Ne=String(re).trim().match(/^(\d{1,2}):(\d{1,2})(?::(\d{1,2}))?$/);if(!Ne)return null;const De=Math.min(23,Math.max(0,Number(Ne[1]))),$e=Math.min(59,Math.max(0,Number(Ne[2]))),Ge=Math.min(59,Math.max(0,Number(Ne[3]??0)));return{hour:De,minute:$e,second:Ge}},w=re=>b.value?`${k(re.hour)}:${k(re.minute)}:${k(re.second)}`:`${k(re.hour)}:${k(re.minute)}`,S=e.computed(()=>{const re=m(n.modelValue);return re?w(re):""}),N=()=>{const re=m(n.modelValue)||{hour:0,minute:0,second:0};B.hour=re.hour,B.minute=re.minute,B.second=re.second},D=async()=>{await e.nextTick();const re=(Ne,De)=>{if(!Ne)return;const $e=Ne.querySelector(".qiu-time-panel__item.is-active");if($e){Ne.scrollTop=Math.max(0,$e.offsetTop-Ne.clientHeight/2+$e.clientHeight/2);return}const Ge=Array.from(Ne.children).findIndex(st=>Number(st.textContent)===De);if(Ge>=0){const st=Ne.children[Ge];Ne.scrollTop=Math.max(0,st.offsetTop-Ne.clientHeight/2+st.clientHeight/2)}};re(f.value,B.hour),re(u.value,B.minute),b.value&&re(h.value,B.second)},T=()=>{const re=c.value,Ne=d.value;if(!re||!Ne)return;const De=re.getBoundingClientRect(),$e=Ne.getBoundingClientRect(),Ge=4,st=window.innerWidth,ht=window.innerHeight;let He=De.bottom+Ge,ct=De.left;He+$e.height>ht-4&&(He=De.top-$e.height-Ge),He<4&&(He=4),ct+$e.width>st-4&&(ct=st-$e.width-4),ct<4&&(ct=4),_.value={position:"fixed",top:`${Math.round(He)}px`,left:`${Math.round(ct)}px`,zIndex:3100}},L=async()=>{n.disabled||(N(),p.value=!0,o("visible-change",!0),await e.nextTick(),T(),await D(),requestAnimationFrame(()=>T()))},U=()=>{p.value&&(p.value=!1,o("visible-change",!1))},oe=()=>{n.disabled||(p.value?U():L())},H=(re,Ne)=>{B[re]=Ne},Ve=re=>{o("update:modelValue",re),o("change",re)},Z=()=>{Ve(w({...B})),U()},z=()=>{U()},fe=()=>{const re=new Date;B.hour=re.getHours(),B.minute=re.getMinutes(),B.second=re.getSeconds(),Ve(w({...B})),U()},he=()=>{Ve(null),o("clear")},se=re=>{var De,$e;if(!p.value)return;const Ne=re.target;(De=c.value)!=null&&De.contains(Ne)||($e=d.value)!=null&&$e.contains(Ne)||U()},te=()=>{p.value&&T()};return e.watch(p,re=>{re?(document.addEventListener("mousedown",se,!0),window.addEventListener("scroll",te,!0),window.addEventListener("resize",te)):(document.removeEventListener("mousedown",se,!0),window.removeEventListener("scroll",te,!0),window.removeEventListener("resize",te))}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",se,!0),window.removeEventListener("scroll",te,!0),window.removeEventListener("resize",te)}),(re,Ne)=>{const De=_t;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:c,class:e.normalizeClass(["qiu-time",[`qiu-time--${e.unref($)}`,e.unref(r).class,{"is-disabled":t.disabled,"is-focused":e.unref(p),"is-fit":t.fit}]]),style:e.normalizeStyle(e.unref(r).style)},[e.createElementVNode("div",{class:"qiu-time__editor",tabindex:"0",onClick:oe,onKeydown:e.withKeys(e.withModifiers(oe,["prevent"]),["enter"])},[e.createElementVNode("span",{class:e.normalizeClass(["qiu-time__value",{"is-placeholder":!e.unref(S)}])},e.toDisplayString(e.unref(S)||t.placeholder),3),t.clearable&&e.unref(C)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-time__clear",tabindex:"-1",onMousedown:Ne[0]||(Ne[0]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(he,["stop"])}," × ",32)):e.createCommentVNode("",!0),e.createVNode(De,{icon:"time-line",class:"qiu-time__icon"})],40,Ef),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-time-fade"},{default:e.withCtx(()=>[e.unref(p)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:d,class:"qiu-time-panel",style:e.normalizeStyle(e.unref(_)),onMousedown:Ne[1]||(Ne[1]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",Sf,[e.createElementVNode("div",Mf,[e.createElementVNode("ul",{ref_key:"hourListRef",ref:f,class:"qiu-time-panel__list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),$e=>(e.openBlock(),e.createElementBlock("li",{key:`h-${$e}`,class:e.normalizeClass(["qiu-time-panel__item",{"is-active":e.unref(B).hour===$e}]),onClick:Ge=>H("hour",$e)},e.toDisplayString(k($e)),11,qf))),128))],512)]),e.createElementVNode("div",zf,[e.createElementVNode("ul",{ref_key:"minuteListRef",ref:u,class:"qiu-time-panel__list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(E),$e=>(e.openBlock(),e.createElementBlock("li",{key:`m-${$e}`,class:e.normalizeClass(["qiu-time-panel__item",{"is-active":e.unref(B).minute===$e}]),onClick:Ge=>H("minute",$e)},e.toDisplayString(k($e)),11,Tf))),128))],512)]),e.unref(b)?(e.openBlock(),e.createElementBlock("div",If,[e.createElementVNode("ul",{ref_key:"secondListRef",ref:h,class:"qiu-time-panel__list"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),$e=>(e.openBlock(),e.createElementBlock("li",{key:`s-${$e}`,class:e.normalizeClass(["qiu-time-panel__item",{"is-active":e.unref(B).second===$e}]),onClick:Ge=>H("second",$e)},e.toDisplayString(k($e)),11,Df))),128))],512)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"qiu-time-panel__footer"},[e.createElementVNode("button",{type:"button",class:"qiu-time-panel__btn is-text",onClick:fe},"此刻"),e.createElementVNode("div",{class:"qiu-time-panel__actions"},[e.createElementVNode("button",{type:"button",class:"qiu-time-panel__btn",onClick:z},"取消"),e.createElementVNode("button",{type:"button",class:"qiu-time-panel__btn is-primary",onClick:Z}," 确定 ")])])],36)):e.createCommentVNode("",!0)]),_:1})]))],6)}}}),[["__scopeId","data-v-ef36373c"]]),Rf=Object.freeze(Object.defineProperty({__proto__:null,default:Xr},Symbol.toStringTag,{value:"Module"})),Lf={class:"qiu-tooltip__content"},mi=de(e.defineComponent({name:"QiuTooltip",inheritAttrs:!1,__name:"index",props:{content:{default:""},placement:{default:"top"},showAfter:{default:0},hideAfter:{default:100}},setup(t){const a=e.useAttrs(),n=t,o=e.ref(null),r=e.ref(null),c=e.ref(!1),d=e.ref({});let f,u,h=!1;const p=()=>{const V=o.value,E=r.value;if(!V||!E)return;const x=V.getBoundingClientRect(),m=E.getBoundingClientRect(),w=8;let S=0,N=0;switch(n.placement){case"bottom":S=x.bottom+w,N=x.left+x.width/2-m.width/2;break;case"left":S=x.top+x.height/2-m.height/2,N=x.left-m.width-w;break;case"right":S=x.top+x.height/2-m.height/2,N=x.right+w;break;default:S=x.top-m.height-w,N=x.left+x.width/2-m.width/2}const D=window.innerWidth,T=window.innerHeight;N=Math.min(Math.max(4,N),D-m.width-4),S=Math.min(Math.max(4,S),T-m.height-4),d.value={position:"fixed",top:`${S}px`,left:`${N}px`,zIndex:"3000"}},_=()=>{f&&clearTimeout(f),u&&clearTimeout(u),f=void 0,u=void 0},B=async()=>{_(),f=setTimeout(async()=>{c.value=!0,await e.nextTick(),p()},n.showAfter)},$=()=>{_(),u=setTimeout(()=>{h||(c.value=!1)},n.hideAfter)},b=()=>{h=!1,B()},C=()=>$(),k=()=>{h=!0,_()},M=()=>{c.value&&p()};return e.watch(c,V=>{V?(window.addEventListener("scroll",M,!0),window.addEventListener("resize",M)):(window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M))}),e.onBeforeUnmount(()=>{_(),window.removeEventListener("scroll",M,!0),window.removeEventListener("resize",M)}),(V,E)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:"qiu-tooltip-host"},e.unref(a)),[e.createElementVNode("span",{ref_key:"triggerRef",ref:o,class:"qiu-tooltip__trigger",onMouseenter:b,onMouseleave:C},[e.renderSlot(V.$slots,"default",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-tooltip-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:r,class:e.normalizeClass(["qiu-tooltip",[`qiu-tooltip--${t.placement}`]]),style:e.normalizeStyle(e.unref(d)),role:"tooltip",onMouseenter:k,onMouseleave:C},[e.createElementVNode("div",Lf,[e.renderSlot(V.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)]),E[0]||(E[0]=e.createElementVNode("span",{class:"qiu-tooltip__arrow"},null,-1))],38),[[e.vShow,e.unref(c)]])]),_:3})]))],16))}}),[["__scopeId","data-v-fcfcc5d7"]]),Pf=Object.freeze(Object.defineProperty({__proto__:null,default:mi},Symbol.toStringTag,{value:"Module"})),ui=new Map,fi=new Map,pi=new Map,ha={add(t,a){ui.set(t,a)},get(t){return ui.get(t)},has(t){return ui.has(t)}},Gr={add(t,a){fi.set(t,a)},get(t){return fi.get(t)},has(t){return fi.has(t)}},Jr={add(t,a){pi.set(t,a)},get(t){return pi.get(t)},has(t){return pi.has(t)}};ha.add("money",({cellValue:t})=>{const a=Number(t);return Number.isNaN(a)?String(t??""):`¥ ${a.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`}),ha.add("yesno",({cellValue:t})=>t?"是":"否");function Of(t){return t?t.isHover!==void 0?t.isHover!==!1:t.highlightHoverRow!==void 0?!!t.highlightHoverRow:!0:!0}function hi(t){return t?t.isCurrent!==void 0?t.isCurrent!==!1:t.highlightCurrentRow!==void 0?!!t.highlightCurrentRow:!0:!0}function gi(t){if(t.editRender)return typeof t.editRender=="string"?{name:t.editRender,props:t.editorProps,options:t.options}:{...t.editRender,props:{...t.editorProps||{},...t.editRender.props||{}},options:t.editRender.options||t.options};const a=t.editor||(t.type&&ec.has(t.type)?t.type:void 0);if(a)return{name:a,props:t.editorProps,options:t.options}}const Zr=Symbol("qiuTableRegister"),ec=new Set(["switch","select","input","number","date","datetime","time","text"]),jf=new Set(["selection","checkbox","index","seq","radio","expand"]);function Ff(t){const a=gi(t);if((a==null?void 0:a.enabled)!==!1&&a!=null&&a.name)return ec.has(a.name),a.name}function Hn(t){return t.prop||t.field}const tc=Symbol("QiuDropdown"),Sl=de(e.defineComponent({name:"QiuDropdown",__name:"index",props:{disabled:{type:Boolean,default:!1},placement:{default:"bottom-start"},popperClass:{default:""}},emits:["command","visibleChange"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.ref(null),f=e.ref(!1),u=e.ref({position:"fixed",top:"-9999px",left:"-9999px",zIndex:"3000"}),h=()=>{f.value&&(f.value=!1,r("visibleChange",!1))},p=async()=>{o.disabled||(f.value=!0,r("visibleChange",!0),await e.nextTick(),$(),requestAnimationFrame(()=>$()))},_=()=>{o.disabled||(f.value?h():p())},B=k=>{r("command",k),h()};e.provide(tc,{visible:f,close:h,emitCommand:B});const $=()=>{const k=c.value,M=d.value;if(!k||!M)return;const V=k.getBoundingClientRect(),E=M.getBoundingClientRect(),x=4,m=window.innerWidth,w=window.innerHeight,S=o.placement;let N=S.startsWith("top")?V.top-E.height-x:V.bottom+x,D=V.left;S.endsWith("end")?D=V.right-E.width:(S==="bottom"||S==="top")&&(D=V.left+(V.width-E.width)/2),D+E.width>m-4&&(D=m-E.width-4),D<4&&(D=4),N+E.height>w-4&&(N=V.top-E.height-x),N<4&&(N=4),u.value={position:"fixed",top:`${Math.round(N)}px`,left:`${Math.round(D)}px`,zIndex:"3000"}},b=k=>{var V,E;if(!f.value)return;const M=k.target;(V=c.value)!=null&&V.contains(M)||(E=d.value)!=null&&E.contains(M)||h()},C=()=>{f.value&&$()};return e.watch(f,k=>{k?(document.addEventListener("click",b,!0),window.addEventListener("scroll",C,!0),window.addEventListener("resize",C)):(document.removeEventListener("click",b,!0),window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C))}),e.onBeforeUnmount(()=>{document.removeEventListener("click",b,!0),window.removeEventListener("scroll",C,!0),window.removeEventListener("resize",C)}),a({open:p,close:h,toggle:_}),(k,M)=>(e.openBlock(),e.createElementBlock("span",{ref_key:"triggerRef",ref:c,class:"qiu-dropdown"},[e.createElementVNode("span",{class:"qiu-dropdown__trigger",onClick:e.withModifiers(_,["stop"])},[e.renderSlot(k.$slots,"default",{},void 0,!0)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-dropdown-fade"},{default:e.withCtx(()=>[e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuHostRef",ref:d,class:e.normalizeClass(["qiu-dropdown__popper",t.popperClass]),style:e.normalizeStyle(e.unref(u)),onClick:M[0]||(M[0]=e.withModifiers(()=>{},["stop"]))},[e.renderSlot(k.$slots,"dropdown",{},void 0,!0)],6)):e.createCommentVNode("",!0)]),_:3})]))],512))}}),[["__scopeId","data-v-645b1e29"]]),Af=Object.freeze(Object.defineProperty({__proto__:null,default:Sl},Symbol.toStringTag,{value:"Module"})),Qf={class:"qiu-dropdown-menu",role:"menu"},vo=de(e.defineComponent({name:"QiuDropdownMenu",__name:"QiuDropdownMenu",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("ul",Qf,[e.renderSlot(a.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-4123498b"]]),Uf=Object.freeze(Object.defineProperty({__proto__:null,default:vo},Symbol.toStringTag,{value:"Module"})),Yn=de(e.defineComponent({name:"QiuDropdownItem",__name:"QiuDropdownItem",props:{command:{default:""},disabled:{type:Boolean,default:!1},divided:{type:Boolean,default:!1}},emits:["click"],setup(t,{emit:a}){const n=t,o=a,r=e.inject(tc,null),c=d=>{n.disabled||(o("click",d),r==null||r.emitCommand(n.command))};return(d,f)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["qiu-dropdown-item",{"is-disabled":t.disabled,"is-divided":t.divided}]),role:"menuitem",onClick:c},[e.renderSlot(d.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-29d01189"]]),Wf=Object.freeze(Object.defineProperty({__proto__:null,default:Yn},Symbol.toStringTag,{value:"Module"}));function Kn(t,a=0){if(t==null||t==="")return 0;if(typeof t=="number")return Number.isFinite(t)?t:0;const n=String(t).trim();if(!n||n==="auto")return 0;if(n.endsWith("%")){const o=parseFloat(n);return!Number.isFinite(o)||a<=0?0:a*o/100}return parseFloat(n)||0}function Xo(t,a=0,n){const o=(n==null?void 0:n.minWidth)??80,r=(n==null?void 0:n.maxWidth)??Number.POSITIVE_INFINITY,c=Kn(t.width,a),d=Math.max(Kn(t.minWidth,a)||(c?0:o),48),f=Kn(t.maxWidth,a),u=f>0?f:r;return{fixedWidth:c,minWidth:c?Math.min(d||c,c)||48:d,maxWidth:Math.max(u,d||48),isFlex:c<=0}}function Hf(t,a){const{containerWidth:n,showSelection:o,showIndex:r,showRadio:c,showExpand:d,fit:f=!0,resized:u={},defaults:h}=a;let p=0;d&&(p+=48),c&&(p+=48),o&&(p+=48),r&&(p+=55);const _={},B=[];let $=0;for(const b of t){const C=u[b._key];if(C!=null&&C>0){_[b._key]=C,$+=C;continue}const k=Xo(b,n,h);if(k.isFlex)B.push(b._key),_[b._key]=k.minWidth,$+=k.minWidth;else{const M=Math.min(Math.max(k.fixedWidth,k.minWidth),k.maxWidth);_[b._key]=M,$+=M}}if(f&&B.length&&n>0){let b=n-p-$;if(b>0){const C=B.map(V=>{const E=t.find(x=>x._key===V);return Xo(E,n,h).minWidth}),k=C.reduce((V,E)=>V+E,0)||B.length;let M=0;B.forEach((V,E)=>{const x=t.find(N=>N._key===V),m=Xo(x,n,h),w=E===B.length-1?b-M:Math.floor(b*C[E]/k);M+=w;const S=Math.min(Math.max(m.minWidth+w,m.minWidth),m.maxWidth);_[V]=S})}}return _}function Yf(t,a,n,o){let r=0;a.showExpand&&(r+=48),a.showRadio&&(r+=48),a.showSelection&&(r+=48),a.showIndex&&(r+=55);for(const c of t){const d=n==null?void 0:n(c);if(d!=null&&d>0){r+=d;continue}const f=Xo(c,0,o);r+=f.isFlex?f.minWidth:f.fixedWidth||f.minWidth||100}return r}function nc(t,a,n,o){let r=0;n.showExpand&&(r+=48),n.showRadio&&(r+=48),n.showSelection&&(r+=48),n.showIndex&&(r+=55);for(const c of t){if(c._key===a)break;(c.fixed==="left"||c.fixed===!0)&&(r+=(o==null?void 0:o(c))||Kn(c.width)||Kn(c.minWidth)||120)}return r}function oc(t,a,n){let o=0;for(let r=t.length-1;r>=0;r--){const c=t[r];if(c._key===a)break;c.fixed==="right"&&(o+=(n==null?void 0:n(c))||Kn(c.width)||Kn(c.minWidth)||120)}return o}function Kf(t,a){const n=t.filter(o=>o.fixed==="left"||o.fixed===!0);return n.length>0&&n[n.length-1]._key===a}function vf(t,a){const n=t.filter(o=>o.fixed==="right");return n.length>0&&n[0]._key===a}function _i(t,a,n=""){const o=t.prop||t.field||t.slot||t.type||"col";return n?`${n}.${o}#${a}`:`${o}#${a}`}function lc(t,a=""){const n=[];return t.forEach((o,r)=>{var d;const c=_i(o,r,a);if((d=o.children)!=null&&d.length){n.push(...lc(o.children,c));return}o.type&&jf.has(o.type)&&!o.prop&&!o.field&&o.editor,n.push({...o,_key:c})}),n}function ac(t){var a;return(a=t.children)!=null&&a.length?1+Math.max(...t.children.map(ac)):1}function ic(t){var a;return(a=t.children)!=null&&a.length?t.children.reduce((n,o)=>n+ic(o),0):1}function rc(t,a=""){if(!t.length)return[[]];const n=Math.max(...t.map(ac),1),o=Array.from({length:n},()=>[]),r=(c,d,f,u)=>{let h=f;return c.forEach((p,_)=>{var k;const B=_i(p,_,u),$=ic(p),b=!((k=p.children)!=null&&k.length),C=b?n-d:1;o[d].push({column:{...p,_key:B},label:p.label||p.title||"",colspan:$,rowspan:C,isLeaf:b,colIndex:h}),!b&&p.children&&r(p.children,d+1,h,B),h+=$}),h};return r(t,0,0,a),o}function Xf(t){const a=e.ref(null),n=e.ref(null),o=()=>t.getColumns().map(b=>Hn(b)).filter(Boolean),r=(b,C)=>{const k=t.getRows(),M=o(),V=k.findIndex(x=>t.getRowId(x)===b),E=M.indexOf(C);return V<0||E<0?null:{rowId:b,prop:C,rowIndex:V,colIndex:E}},c=(b,C,k=!1)=>{const M=Hn(C);if(!M)return;const V=r(t.getRowId(b),M);V&&(k&&a.value?n.value=V:(a.value=V,n.value=null))},d=()=>{a.value=null,n.value=null},f=e.computed(()=>{const b=a.value;if(!b)return null;const C=n.value||b;return{r0:Math.min(b.rowIndex,C.rowIndex),r1:Math.max(b.rowIndex,C.rowIndex),c0:Math.min(b.colIndex,C.colIndex),c1:Math.max(b.colIndex,C.colIndex)}});return{activeCell:a,areaEnd:n,areaBounds:f,setActive:c,clearArea:d,isCellInArea:(b,C)=>{const k=f.value;if(!k){const m=a.value;return m?t.getRowId(b)===m.rowId&&Hn(C)===m.prop:!1}const M=t.getRows(),V=o(),E=M.findIndex(m=>t.getRowId(m)===t.getRowId(b)),x=V.indexOf(Hn(C)||"");return E<0||x<0?!1:E>=k.r0&&E<=k.r1&&x>=k.c0&&x<=k.c1},isActiveCell:(b,C)=>{const k=a.value;return k?t.getRowId(b)===k.rowId&&Hn(C)===k.prop:!1},moveActive:(b,C,k=!1)=>{const M=t.getRows(),V=o();if(!M.length||!V.length)return null;const E=(k?n.value:null)||a.value;let x=(E==null?void 0:E.rowIndex)??0,m=(E==null?void 0:E.colIndex)??0;E?(x=Math.max(0,Math.min(M.length-1,x+b)),m=Math.max(0,Math.min(V.length-1,m+C))):(x=b<0?M.length-1:0,m=C<0?V.length-1:0);const w=M[x],S=V[m],N={rowId:t.getRowId(w),prop:S,rowIndex:x,colIndex:m};return k&&a.value?n.value=N:(a.value=N,n.value=null),{row:w,prop:S,pos:N}},buildTsv:b=>{const C=f.value,k=t.getRows(),M=o();if(!C){const E=a.value;return E?b(k[E.rowIndex],E.prop):""}const V=[];for(let E=C.r0;E<=C.r1;E++){const x=[];for(let m=C.c0;m<=C.c1;m++){const w=b(k[E],M[m]);x.push(String(w??"").replace(/\t/g," ").replace(/\r?\n/g," "))}V.push(x.join(" "))}return V.join(`
2
+ `)},pasteTsv:(b,C)=>{const k=a.value;if(!k)return;const M=t.getRows(),V=o(),E=b.replace(/\r\n/g,`
3
+ `).replace(/\r/g,`
4
+ `).split(`
5
+ `).filter((x,m,w)=>!(m===w.length-1&&x==="")).map(x=>x.split(" "));for(let x=0;x<E.length;x++){const m=M[k.rowIndex+x];if(!m)break;for(let w=0;w<E[x].length;w++){const S=V[k.colIndex+w];if(!S)break;C(m,S,E[x][w])}}},clearAreaValues:b=>{const C=f.value,k=t.getRows(),M=o();if(!C){const V=a.value;if(!V)return;b(k[V.rowIndex],V.prop,"");return}for(let V=C.r0;V<=C.r1;V++)for(let E=C.c0;E<=C.c1;E++)b(k[V],M[E],"")},findPos:r}}function Gf(t){const a=e.ref(null);let n=0;const o=()=>Date.now()<n,r=()=>typeof t.editable=="function"?t.editable():t.editable.value,c=()=>typeof t.editConfig=="function"?t.editConfig():t.editConfig.value,d=()=>{const m=c();return m!=null&&m.trigger?m.trigger:typeof t.editTrigger=="function"?t.editTrigger():t.editTrigger.value},f=()=>{var m;return((m=c())==null?void 0:m.mode)||"cell"},u=()=>{var m;return((m=c())==null?void 0:m.autoClear)!==!1},h=()=>{const m=c();return(m==null?void 0:m.showIcon)===!1?!1:(m==null?void 0:m.showIcon)===!0?!0:r()},p=m=>Ff(m),_=m=>gi(m),B=m=>Hn(m),$=m=>{if(!r())return!1;const w=_(m);return(w==null?void 0:w.enabled)===!1?!1:!!p(m)&&m.editable!==!1&&!!B(m)},b=m=>$(m)?d()==="always"?!0:p(m)==="switch":!1,C=m=>p(m)==="input",k=(m,w)=>$(w)?b(w)?!0:!a.value||!(a.value.rowId===t.getRowId(m))?!1:f()==="row"?!0:a.value.prop===B(w):!1;return{editing:a,getColEditor:p,getEditRender:_,getProp:B,canEditCol:$,hasAlwaysEditor:b,isInputEditor:C,isEditing:k,isInputFill:(m,w)=>k(m,w)&&C(w),startEdit:(m,w,S)=>{var T,L;if(!$(w)||b(w))return;const N=B(w),D=t.getRowId(m);((T=a.value)==null?void 0:T.rowId)===D&&((L=a.value)==null?void 0:L.prop)===N||(n=Date.now()+120,a.value={rowId:D,prop:N},t.emit("cell-edit-start",{row:m,column:w}),e.nextTick(()=>{var H;const U=S,oe=(U==null?void 0:U.querySelector(".qiu-table__cell.is-editing .qiu-input__inner"))||(U==null?void 0:U.querySelector(".qiu-table__cell.is-editing input"))||(U==null?void 0:U.querySelector(".qiu-table__cell.is-editing .qiu-table__date-input"));(H=oe==null?void 0:oe.focus)==null||H.call(oe,{preventScroll:!0})}))},clearEdit:()=>{a.value=null},commitEdit:(m,w,S)=>{var D,T;if(o())return;const N=B(w);N!=null&&m[N]!==S&&(m[N]=S),f()==="cell"&&!b(w)&&((D=a.value)==null?void 0:D.rowId)===t.getRowId(m)&&((T=a.value)==null?void 0:T.prop)===N&&(a.value=null),t.emit("cell-edit-end",{row:m,column:w,value:S}),t.emit("edit",{row:m,column:w,value:S})},inEditGuard:o,getTrigger:d,getMode:f,getAutoClear:u,getShowIcon:h}}function Jf(t){const a=e.ref(new Set);return{expanded:a,isRowExpand:d=>a.value.has(t.getRowId(d)),toggleRowExpand:d=>{const f=t.getRowId(d),u=new Set(a.value);u.has(f)?u.delete(f):u.add(f),a.value=u},setRowExpand:(d,f)=>{const u=new Set(a.value);d.forEach(h=>{const p=t.getRowId(h);f?u.add(p):u.delete(p)}),a.value=u},clearRowExpand:()=>{a.value=new Set}}}function Zf(t){const a=e.ref(null);return{radioRowId:a,isRadioChecked:c=>a.value===t.getRowId(c),setRadioRow:c=>{a.value=c?t.getRowId(c):null},clearRadioRow:()=>{a.value=null}}}function ep(t){const a=e.reactive({}),n=()=>typeof t.data=="function"?t.data():t.data.value,o=()=>{if(t.enabled()){Object.keys(a).forEach(u=>delete a[u]);for(const u of n()||[]){const h=t.getRowId(u);h&&(a[h]=JSON.stringify(u))}}},r=u=>{if(!t.enabled())return!1;const h=t.getRowId(u),p=a[h];return p==null?!1:p!==JSON.stringify(u)};return{snapshot:o,isUpdateByRow:r,getUpdateRecords:()=>t.enabled()?(n()||[]).filter(u=>r(u)):[],getInsertRecords:()=>t.enabled()?(n()||[]).filter(u=>{const h=t.getRowId(u);return h&&a[h]==null}):[],reloadRow:u=>{const h=t.getRowId(u),p=a[h];p&&Object.assign(u,JSON.parse(p))},sourceMap:a}}function tp(t,a,n){for(const o of n){if(!o.order)continue;const r=t[o.prop],c=a[o.prop];if(r===c)continue;if(r==null)return 1;if(c==null)return-1;const d=r>c?1:-1;return o.order==="asc"?d:-d}return 0}function np(t){const a=e.ref([]),n=e.ref([]),o=()=>{var h;return Math.max(1,((h=t.size)==null?void 0:h.call(t))??50)},r=h=>{t.enabled()&&h.oldValue!==h.newValue&&(a.value.push(h),a.value.length>o()&&a.value.shift(),n.value=[])},c=(h,p,_)=>{var $;const B=t.findRow(h.rowId);return B?(B[h.prop]=p,($=t.onApply)==null||$.call(t,h,_),!0):!1};return{undoStack:a,redoStack:n,push:r,undo:()=>{if(!t.enabled())return!1;const h=a.value.pop();return h&&c(h,h.oldValue,"undo")?(n.value.push(h),!0):!1},redo:()=>{if(!t.enabled())return!1;const h=n.value.pop();return h&&c(h,h.newValue,"redo")?(a.value.push(h),!0):!1},clear:()=>{a.value=[],n.value=[]},canUndo:()=>a.value.length>0,canRedo:()=>n.value.length>0}}function op(t){var r,c;const a=`${t.rowIndex}:${t.columnIndex}`;if((r=t.covered)!=null&&r.has(a))return{rowspan:0,colspan:0,visible:!1};let n=1,o=1;if((c=t.mergeCells)!=null&&c.length){const d=t.mergeCells.find(f=>f.row===t.rowIndex&&f.col===t.columnIndex);d&&(n=d.rowspan,o=d.colspan)}if(t.spanMethod){const d=t.spanMethod({row:t.row,column:t.column,rowIndex:t.rowIndex,columnIndex:t.columnIndex,data:t.data});Array.isArray(d)?(n=Number(d[0]??1),o=Number(d[1]??1)):d&&typeof d=="object"&&(n=Number(d.rowspan??1),o=Number(d.colspan??1))}return n===0||o===0?{rowspan:0,colspan:0,visible:!1}:{rowspan:n,colspan:o,visible:!0}}function cc(t){const a=new Set;if(!(t!=null&&t.length))return a;for(const n of t)for(let o=n.row;o<n.row+n.rowspan;o++)for(let r=n.col;r<n.col+n.colspan;r++)o===n.row&&r===n.col||a.add(`${o}:${r}`);return a}function lp(t,a){if(!(a!=null&&a.length)||!t.length)return t;const n=cc(a);return t.map((o,r)=>{const c=[];for(const d of o){const f=`${r}:${d.colIndex}`;if(n.has(f))continue;const u=a.find(h=>h.row===r&&h.col===d.colIndex);u?c.push({...d,rowspan:u.rowspan,colspan:u.colspan}):c.push(d)}return c})}function ap(t){const a=e.reactive({}),n=48,o=Number.POSITIVE_INFINITY;let r=null;const c=(p,_)=>{if(a[p]!=null)return a[p];if(_!=null)return typeof _=="number"?_:parseFloat(String(_))||void 0},d=(p,_,B,$)=>{B.preventDefault(),B.stopPropagation();const b=Math.max(($==null?void 0:$.minWidth)??n,48),C=Math.max(($==null?void 0:$.maxWidth)??o,b);r={key:p,startX:B.clientX,startW:_||100,min:b,max:C},document.addEventListener("mousemove",f),document.addEventListener("mouseup",u),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},f=p=>{if(!r)return;const _=p.clientX-r.startX,B=r.startW+_;a[r.key]=Math.min(r.max,Math.max(r.min,B))},u=()=>{r=null,document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",u),document.body.style.cursor="",document.body.style.userSelect=""},h=(p,_)=>{a[p]=Math.max(48,_)};return e.onBeforeUnmount(()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",u)}),{columnWidths:a,getWidth:c,onResizeStart:d,setColumnWidth:h}}function ip(t){const a=n=>{if(!t.enabled())return;const o=t.rootRef.value;o&&(o.contains(n.target)||t.clearEdit())};e.onMounted(()=>document.addEventListener("mousedown",a,!0)),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",a,!0))}let ga=0;function rp(){if(typeof document>"u")return 0;if(ga>0)return ga;const t=document.createElement("div");return t.style.cssText="position:absolute;top:-9999px;width:100px;height:100px;overflow:scroll;visibility:hidden",document.body.appendChild(t),ga=Math.max(0,t.offsetWidth-t.clientWidth),document.body.removeChild(t),ga}function cp(t){const a=e.ref(0);let n=!1,o=null,r=0;const c=_=>{let B=Math.max(0,_.offsetWidth-_.clientWidth);return B<=0&&_.scrollHeight>_.clientHeight+1&&(B=rp()),B},d=(_,B)=>{const $=_.querySelector("tbody tr.qiu-table__row:not(.qiu-table__virtual-pad):not(.qiu-table__row--empty)"),b=B.querySelectorAll(":scope > colgroup > col");if($){const M=[...$.children],V=Math.min(M.length,b.length);for(let E=0;E<V;E++){const x=M[E].getBoundingClientRect().width;if(x>0){const m=b[E];m.style.width=`${x}px`,m.style.minWidth=`${x}px`}}return}const C=_.querySelectorAll(":scope > colgroup > col"),k=Math.min(C.length,b.length);for(let M=0;M<k;M++){const V=C[M].getBoundingClientRect().width;if(V>0){const E=b[M];E.style.width=`${V}px`,E.style.minWidth=`${V}px`}}},f=(_,B,$)=>{if(!_)return;_.style.paddingRight=`${$}px`,_.style.boxSizing="border-box";const b=_.querySelector(":scope > table");if(!b)return;const C=Math.round(B.getBoundingClientRect().width);C>0&&(b.style.width=`${C}px`,b.style.minWidth=`${C}px`),d(B,b)},u=()=>{const _=t.bodyWrapRef.value;if(!_)return;const B=c(_);a.value!==B&&(a.value=B);const $=_.querySelector(":scope > table");$&&(f(t.headerWrapRef.value,$,B),f(t.footerWrapRef.value,$,B))},h=()=>{if(n)return;const _=t.bodyWrapRef.value;if(!_)return;n=!0;const B=_.scrollLeft;t.headerWrapRef.value&&(t.headerWrapRef.value.scrollLeft=B),t.footerWrapRef.value&&(t.footerWrapRef.value.scrollLeft=B),u(),requestAnimationFrame(()=>{n=!1})},p=()=>{r&&cancelAnimationFrame(r),r=requestAnimationFrame(()=>{var _;r=0,u(),h(),(_=t.onLayoutChange)==null||_.call(t)})};return e.onMounted(()=>{u(),requestAnimationFrame(()=>u()),setTimeout(()=>u(),50),window.addEventListener("resize",p);const _=t.bodyWrapRef.value;_&&typeof ResizeObserver<"u"&&(o=new ResizeObserver(()=>p()),o.observe(_))}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",p),o==null||o.disconnect(),o=null,r&&cancelAnimationFrame(r)}),{scrollbarSize:a,measureScrollbar:u,syncFromBody:h,scheduleLayout:p}}function sp(t){const a=e.ref(0),n=e.ref(0),o=e.computed(()=>{const B=typeof t.config=="function"?t.config():t.config.value;return B===!0?{enabled:!0}:B&&typeof B=="object"?{enabled:B.enabled!==!1,...B}:{enabled:!1}}),r=()=>typeof t.rows=="function"?t.rows():t.rows.value,c=e.computed(()=>r().length),d=e.computed(()=>o.value.rowHeight||t.defaultRowHeight||48),f=e.computed(()=>o.value.oSize??6),u=e.computed(()=>{if(!o.value.enabled)return!1;const B=o.value.gt??0;return c.value>B}),h=e.computed(()=>{if(!u.value)return{start:0,end:c.value,padTop:0,padBottom:0};const B=Math.max(1,d.value),$=Math.max(n.value||0,B*10),b=Math.max(0,Math.floor(a.value/B)-f.value),C=Math.ceil($/B)+f.value*2,k=Math.min(c.value,b+Math.max(C,1));return{start:b,end:k,padTop:b*B,padBottom:Math.max(0,(c.value-k)*B)}}),p=()=>{const B=t.bodyWrapRef.value;if(!B)return;const $=B.clientHeight;$>0&&(n.value=$)},_=()=>{const B=t.bodyWrapRef.value;B&&(a.value=B.scrollTop,B.clientHeight>0&&(n.value=B.clientHeight))};return e.watch(()=>t.bodyWrapRef.value,(B,$,b)=>{if(p(),!B||typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>p());C.observe(B),b(()=>C.disconnect())},{immediate:!0,flush:"post"}),e.watch(()=>[u.value,c.value,d.value],()=>{requestAnimationFrame(()=>p())}),{enabled:u,range:h,rowHeight:d,onScroll:_,measure:p,scrollTop:a,viewportHeight:n}}async function dp(t){const a=t.rules?Array.isArray(t.rules)?t.rules:[t.rules]:[];for(const n of a){const o=t.cellValue;if(n.required&&(o==null||o===""))return n.message||"必填";if(n.min!=null&&typeof o=="number"&&o<n.min)return n.message||`不能小于 ${n.min}`;if(n.max!=null&&typeof o=="number"&&o>n.max)return n.message||`不能大于 ${n.max}`;if(n.pattern){const r=typeof n.pattern=="string"?new RegExp(n.pattern):n.pattern;if(o!=null&&o!==""&&!r.test(String(o)))return n.message||"格式不正确"}if(n.validator)try{const r=await n.validator({cellValue:o,row:t.row,column:t.column});if(r instanceof Error)return r.message;if(typeof r=="string"&&r)return r;if(r===!1)return n.message||"校验失败"}catch(r){return(r==null?void 0:r.message)||n.message||"校验失败"}}return null}function mp(t){const a=[];let n=[],o="",r=!1;const c=()=>{n.push(o),o=""},d=()=>{c(),n.some(f=>f!=="")&&a.push(n),n=[]};for(let f=0;f<t.length;f++){const u=t[f];if(r){u==='"'?t[f+1]==='"'?(o+='"',f++):r=!1:o+=u;continue}if(u==='"'){r=!0;continue}if(u===","){c();continue}if(u===`
6
+ `){d();continue}u!=="\r"&&(o+=u)}return(o||n.length)&&d(),a}function up(t,a){if(!t.length)return[];const n=t[0].map(d=>String(d??"").trim()),o=a.filter(d=>d.prop||d.field),r=o.map(d=>{const f=String(d.prop||d.field||""),u=String(d.label||"").trim();let h=n.findIndex(p=>p===f);return h<0&&u&&(h=n.findIndex(p=>p===u)),h}),c=r.every(d=>d<0);return t.slice(1).map(d=>{const f={};return o.forEach((u,h)=>{const p=String(u.prop||u.field||""),_=c?h:r[h]>=0?r[h]:h;f[p]=d[_]??""}),f})}function sc(t,a){const n=document.createElement("a");n.href=URL.createObjectURL(t),n.download=a,n.click(),URL.revokeObjectURL(n.href)}function fp(t){return`"${String(t??"").replace(/"/g,'""')}"`}function pp(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function dc(t,a,n){const o=t.map(c=>c.label||Hn(c)||""),r=a.map(c=>t.map(d=>n(c,d)??""));return[o,...r]}function hp(t,a){const n=t.map(r=>r.map(fp).join(",")),o=new Blob(["\uFEFF"+n.join(`
7
+ `)],{type:"text/csv;charset=utf-8;"});sc(o,a.endsWith(".csv")?a:`${a}.csv`)}function gp(t,a){const o=`<!DOCTYPE html><html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="UTF-8" /></head><body><table border="1">${t.map(c=>`<tr>${c.map(d=>`<td>${pp(d)}</td>`).join("")}</tr>`).join("")}</table></body></html>`,r=new Blob([o],{type:"application/vnd.ms-excel;charset=utf-8;"});sc(r,a.endsWith(".xls")?a:`${a}.xls`)}async function _p(t,a){const n=await import("xlsx"),o=n.utils.aoa_to_sheet(t),r=n.utils.book_new();n.utils.book_append_sheet(r,o,"Sheet1");const c=a.endsWith(".xlsx")?a:`${a}.xlsx`;n.writeFile(r,c)}async function mc(t){const{format:a,filename:n,matrix:o}=t;a==="csv"?hp(o,n):a==="xls"?gp(o,n):await _p(o,n)}async function bp(t){const a=t.name.toLowerCase();if(a.endsWith(".xlsx")||a.endsWith(".xls")){const o=await import("xlsx"),r=await t.arrayBuffer(),c=o.read(r,{type:"array"}),d=c.SheetNames[0],f=c.Sheets[d];return o.utils.sheet_to_json(f,{header:1,defval:""}).map(h=>h.map(p=>String(p??"")))}const n=await t.text();return mp(n)}const yp={key:0,class:"qiu-table__toolbar"},kp={class:"qiu-table__toolbar-left"},wp={key:0,class:"qiu-table__toolbar-builtin"},xp=["title","onClick"],Vp=["title"],Cp={class:"qiu-table__toolbar-center"},Np={key:0,class:"qiu-table__toolbar-builtin"},Bp=["title","onClick"],$p=["title"],Ep={class:"qiu-table__toolbar-right"},Sp={key:0,class:"qiu-table__toolbar-builtin"},Mp=["title","onClick"],qp=["title"],zp={key:1,class:"qiu-table__custom-panel"},Tp=["checked","onChange"],Ip={class:"qiu-table__export-dialog"},Dp={class:"qiu-table__export-section"},Rp={class:"qiu-table__export-label"},Lp={class:"qiu-table__export-fields"},Pp={class:"qiu-table__export-field"},Op=["checked",".indeterminate"],jp=["checked","onChange"],Fp={class:"qiu-table__export-section"},Ap={class:"qiu-table__export-label"},Qp={class:"qiu-table__export-formats"},Up=["value"],Wp={class:"qiu-table__export-section"},Hp={class:"qiu-table__export-label"},Yp={class:"qiu-table__export-modes"},Kp=["value"],vp={key:0,class:"qiu-table__export-range"},Xp=["max"],Gp=["min","max"],Jp={key:0,style:{width:"48px"}},Zp={key:1,style:{width:"48px"}},e1={key:2,style:{width:"48px"}},t1={key:3,style:{width:"55px"}},n1=["rowspan"],o1=["rowspan"],l1=["rowspan"],a1=["rowspan"],i1=["rowspan"],r1=["colspan","rowspan","data-col-key","onClick"],c1={class:"qiu-table__th"},s1={class:"qiu-table__label"},d1={key:0,class:"qiu-table__sort-num"},m1=["onClick"],u1=["onMousedown"],f1=["rowspan"],p1={key:0,style:{width:"48px"}},h1={key:1,style:{width:"48px"}},g1={key:2,style:{width:"48px"}},_1={key:3,style:{width:"55px"}},b1={key:0,class:"qiu-table__virtual-pad","aria-hidden":"true"},y1=["colspan"],k1=["data-row-key","onClick"],w1=["onClick"],x1={class:"qiu-table__cell-inner"},V1={type:"button",class:"qiu-table__tree-toggle"},C1=["onClick"],N1={class:"qiu-table__cell-inner"},B1=["checked","onChange"],$1={class:"qiu-table__cell-inner"},E1={class:"qiu-table__cell-inner"},S1={key:4,class:"qiu-table__cell"},M1=["title","rowspan","colspan","onClick","onDblclick"],q1={key:0,class:"qiu-table__drag-handle"},z1=["onClick"],T1={key:1,class:"qiu-table__tree-placeholder"},I1={key:5,class:"qiu-table__cell"},D1={key:0,class:"qiu-table__expand-row"},R1=["colspan"],L1={class:"qiu-table__expand-content"},P1={class:"qiu-table__expand-json"},O1={key:1,class:"qiu-table__virtual-pad","aria-hidden":"true"},j1=["colspan"],F1={key:2,class:"qiu-table__row qiu-table__row--empty"},A1=["colspan"],Q1={key:0,style:{width:"48px"}},U1={key:1,style:{width:"48px"}},W1={key:2,style:{width:"48px"}},H1={key:3,style:{width:"55px"}},Y1={class:"qiu-table__cell-inner"},K1={key:2,class:"qiu-table__pager"},v1={class:"qiu-table__filter-head"},X1={class:"qiu-table__filter-title"},G1={key:0,class:"qiu-table__filter-checkall"},J1={class:"qiu-table__filter-list"},Z1={key:0,class:"qiu-table__filter-empty"},eh={class:"qiu-table__filter-actions"},th={key:0,class:"qiu-table__ctx-divider"},nh=["disabled","onClick"],Ml=e.defineComponent({name:"QiuTable",__name:"index",props:{data:{},columns:{default:()=>[]},editable:{type:Boolean,default:!1},editTrigger:{default:"click"},editConfig:{},keyboardConfig:{},clipboardConfig:{},tooltipConfig:{},exportConfig:{},historyConfig:{type:[Object,Boolean]},sortConfig:{},filterConfig:{},rowConfig:{},columnConfig:{},spanMethod:{},mergeCells:{default:()=>[]},mergeHeaderCells:{default:()=>[]},border:{type:[Boolean,String],default:!0},stripe:{type:Boolean,default:!1},round:{type:Boolean,default:!1},height:{},maxHeight:{},rowKey:{},showIndex:{type:Boolean,default:!1},showSelection:{type:Boolean,default:!1},showRadio:{type:Boolean,default:!1},showExpand:{type:Boolean,default:!1},radioConfig:{},expandConfig:{},columnDragConfig:{},keepSource:{type:Boolean,default:!1},virtualXConfig:{type:[Boolean,Object]},tree:{type:Boolean,default:!1},treeProps:{default:()=>({children:"children",hasChildren:"hasChildren"})},virtualY:{type:Boolean,default:!1},showToolbar:{type:Boolean,default:!1},showRefresh:{type:Boolean,default:!0},showExport:{type:Boolean,default:!1},showImport:{type:Boolean,default:!1},showPrint:{type:Boolean,default:!1},showCopy:{type:Boolean,default:!1},showFullscreen:{type:Boolean,default:!0},toolbarConfig:{type:[Object,Boolean]},showFooter:{type:Boolean,default:!1},footerMethod:{},footerData:{},pagerConfig:{type:[Object,Boolean]},gridOptions:{},dragSort:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},size:{},emptyText:{},loading:{type:Boolean,default:!1},loadingText:{default:""},loadingEffect:{default:"spinner"},loadingTransparent:{type:Boolean,default:!1},fit:{type:Boolean,default:!0},align:{},headerAlign:{},footerAlign:{},minHeight:{},rowClassName:{},cellClassName:{},customConfig:{},menuConfig:{},editRules:{},validConfig:{},virtualYConfig:{type:[Boolean,Object]}},emits:["edit","cell-edit-start","cell-edit-end","row-dragend","checkbox-change","checkbox-all","selection-change","filter-change","sort-change","page-change","current-change","resizable-change","menu-click","import-data","radio-change","toggle-row-expand","column-dragend","refresh"],setup(t,{expose:a,emit:n}){var Jl;const o=t,r=n,c=e.ref(null),d=e.ref(null),f=e.ref(null),u=e.ref(null),h=e.ref(null),p=e.ref(null),_=e.ref([]),B=e.ref([]),$=e.ref(new Set),b=e.ref({prop:"",order:null}),C=e.ref([]),k=e.ref([]),M=e.ref(0),V=e.ref(!1),E=()=>{const s=h.value;V.value=!!s&&s.scrollWidth>s.clientWidth},x=`qiu-table-radio-${Math.random().toString(36).slice(2,8)}`,m=e.reactive({}),w=e.reactive({}),S=e.ref(null),N=e.ref(null),D=e.ref(!1),T=e.ref(1),L=e.ref(10),U=e.ref(null),oe=e.ref(!1),H=e.ref(!1),Ve=e.ref("xlsx"),Z=e.ref([]),z=e.ref("all"),fe=e.ref(1),he=e.ref(1),se=[{value:"xlsx",label:"Excel (.xlsx)"},{value:"xls",label:"Excel (.xls)"},{value:"csv",label:"CSV (.csv)"}],te=[{value:"all",label:Xe("全部数据")},{value:"current",label:Xe("当前页")},{value:"selected",label:Xe("选中行")},{value:"range",label:Xe("指定页码范围")}],re=e.reactive({}),Ne=e.ref(null),De=e.reactive({}),$e=e.reactive({visible:!1,x:0,y:0,options:[]});let Ge=null,st=!1;const ht=e.ref(0),{scrollbarSize:He,syncFromBody:ct,scheduleLayout:Q}=cp({headerWrapRef:u,bodyWrapRef:h,footerWrapRef:p,onLayoutChange:()=>{ht.value++,E()}}),{columnWidths:F,getWidth:Be,onResizeStart:qe,setColumnWidth:K}=ap(),X=e.computed(()=>{var s,g;return{minWidth:((s=o.columnConfig)==null?void 0:s.minWidth)??80,maxWidth:((g=o.columnConfig)==null?void 0:g.maxWidth)??Number.POSITIVE_INFINITY}});let le=0;const ye=new WeakMap,Pe=s=>{let g=ye.get(s);return g||(g=`__qiu_row_${++le}`,ye.set(s,g)),g},Qe=s=>{var g;if(s==null)return"";if(typeof o.rowKey=="function"){const q=o.rowKey(s);if(q!=null&&String(q)!=="")return String(q)}else{const q=((g=o.rowConfig)==null?void 0:g.keyField)||(typeof o.rowKey=="string"&&o.rowKey?o.rowKey:"")||"id",j=s==null?void 0:s[q];if(j!=null&&String(j)!=="")return String(j)}return typeof s=="object"?Pe(s):String(s)},{isRowExpand:Bt,toggleRowExpand:wt,setRowExpand:xt,clearRowExpand:pt}=Jf({getRowId:Qe}),J=s=>{var q;(q=o.expandConfig)!=null&&q.accordion&&pt();const g=Bt(s);wt(s),r("toggle-row-expand",{row:s,expanded:!g})},{isRadioChecked:G,setRadioRow:me,clearRadioRow:pe,radioRowId:ze}=Zf({getRowId:Qe}),we=e.computed(()=>!!o.keepSource),{snapshot:Se,isUpdateByRow:We,getUpdateRecords:Je,getInsertRecords:Ze,reloadRow:tt}=ep({enabled:()=>we.value,getRowId:Qe,data:()=>o.data}),Ye=s=>{var g;me(s),r("radio-change",{row:s}),((g=o.radioConfig)==null?void 0:g.highlight)!==!1&&(U.value=Qe(s))},{editing:rt,getColEditor:ot,getEditRender:Mt,getProp:lt,canEditCol:dt,hasAlwaysEditor:yt,isEditing:Ot,isInputFill:ut,startEdit:$n,clearEdit:v,commitEdit:xe,inEditGuard:Le,getTrigger:be,getShowIcon:ft,getAutoClear:zt}=Gf({editable:()=>o.editable,editTrigger:()=>o.editTrigger,editConfig:()=>o.editConfig,getRowId:Qe,emit:(s,g)=>r(s,g)}),Tt=()=>{const s=o.historyConfig;return s===!0?!0:s&&typeof s=="object"?s.enabled!==!1:!1},{push:gt,undo:En,redo:dn,clear:no,canUndo:Dn,canRedo:oo}=np({enabled:Tt,size:()=>{var s;return typeof o.historyConfig=="object"&&((s=o.historyConfig)!=null&&s.size)?o.historyConfig.size:50},findRow:s=>wo(o.data,s)}),{setActive:Rt,clearArea:mn,isCellInArea:$t,isActiveCell:Re,moveActive:un,buildTsv:ne,pasteTsv:R,clearAreaValues:Te,activeCell:je,areaBounds:Ue}=Xf({getRows:()=>Zt.value.map(s=>s.row),getColumns:()=>mt.value,getRowId:Qe}),et=()=>o.keyboardConfig||{},qt=()=>o.clipboardConfig||{},It=s=>{var g;return!(s.showOverflowTooltip===!1||((g=o.tooltipConfig)==null?void 0:g.showAll)===!1)},kt=(s,g)=>{var j;const q=lt(g)!=null?s==null?void 0:s[lt(g)]:void 0;if((j=o.tooltipConfig)!=null&&j.contentMethod){const ee=o.tooltipConfig.contentMethod({row:s,column:g,cellValue:q});if(ee===null)return"";if(ee!==void 0)return ee}return wn(s,g)},bn=async(s,g,q)=>{var ee;if(Le())return;const j=lt(g);if(j&&((ee=o.editRules)!=null&&ee[j])){const Ce=await dp({rules:o.editRules[j],cellValue:q,row:s,column:g}),Ee=`${Qe(s)}:${j}`;if(Ce){De[Ee]=Ce;return}delete De[Ee]}if(j!=null){const Ce=s[j];Ce!==q&&gt({rowId:Qe(s),prop:j,oldValue:Ce,newValue:q})}xe(s,g,q)},el=(s,g)=>{const q=lt(g);return q&&De[`${Qe(s)}:${q}`]||""};ip({rootRef:c,enabled:()=>o.editable&&zt(),clearEdit:v}),e.watch(()=>{var s;return(s=o.sortConfig)==null?void 0:s.defaultSort},s=>{if(!s)return;const q=(Array.isArray(s)?s:[s]).map(j=>({prop:j.prop||j.field||"",order:j.order||"asc"})).filter(j=>j.prop);C.value=q,q[0]&&(b.value={prop:q[0].prop,order:q[0].order})},{immediate:!0}),e.watch(()=>o.data,()=>Se(),{deep:!0,immediate:!0}),e.watch(()=>{var s;return(s=o.expandConfig)==null?void 0:s.expandAll},s=>{s&&jt.value&&xt(o.data||[],!0)},{immediate:!0}),e.watch(()=>{var s;return(s=o.radioConfig)==null?void 0:s.checkRowKey},s=>{if(s==null)return;const g=(o.data||[]).find(q=>Qe(q)===String(s));g&&me(g)},{immediate:!0});const Rn=s=>{if(typeof s=="number"&&Number.isFinite(s))return`${s}px`;const g=String(s??"").trim();return g&&(/^\d+(\.\d+)?$/.test(g)?`${g}px`:g)},Ht=e.computed(()=>{var s,g;return{children:((s=o.treeProps)==null?void 0:s.children)||"children",hasChildren:((g=o.treeProps)==null?void 0:g.hasChildren)||"hasChildren"}}),fn=e.computed(()=>{const s=g=>g.map(q=>{var j;return{...q,label:q.label||q.title,align:q.align||o.align||"left",headerAlign:q.headerAlign||o.headerAlign||q.align||o.align||"left",footerAlign:q.footerAlign||o.footerAlign||q.align||o.align||"left",children:(j=q.children)!=null&&j.length?s(q.children):void 0}});return s(o.columns||[])}),tl=e.computed(()=>B.value.map((s,g)=>{const q=s.props,j=q.fixed===!0?"left":q.fixed||void 0;return{label:q.label||q.title||"",title:q.title,prop:q.prop,field:q.field,width:q.width,minWidth:q.minWidth,maxWidth:q.maxWidth,fixed:j,sortable:q.sortable,filterable:q.filterable,align:q.align||o.align||"left",headerAlign:q.headerAlign||o.headerAlign,footerAlign:q.footerAlign||o.footerAlign,editor:q.editor,editorProps:q.editorProps,options:q.options,formatter:q.formatter,editable:q.editable,filters:q.filters,filterMethod:q.filterMethod,type:q.type,treeNode:q.treeNode,dragSort:q.dragSort,showOverflowTooltip:q.showOverflowTooltip,className:q.className,headerClassName:q.headerClassName||q.labelClassName,children:q.children,aggFunc:q.aggFunc,_key:q.columnKey||q.prop||q.field||`slot-col-${g}`,_defaultSlot:s.slots.default,_headerSlot:s.slots.header}})),At=e.computed(()=>{const s=tl.value.filter(g=>g.type!=="selection"&&g.type!=="index"&&g.type!=="seq");return[...fn.value,...s]}),yn=e.computed(()=>lc(At.value).filter(g=>g.type!=="selection"&&g.type!=="checkbox"&&g.type!=="index"&&g.type!=="seq"&&g.type!=="radio"&&g.type!=="expand")),mt=e.computed(()=>{const s=k.value;let g=yn.value.filter(q=>!(q.visible===!1||re[q._key]===!1));if(s.length){const q=new Map(g.map(ee=>[ee._key,ee])),j=[];s.forEach(ee=>{const Ce=q.get(ee);Ce&&(j.push(Ce),q.delete(ee))}),q.forEach(ee=>j.push(ee)),g=j}return g});e.watch(yn,s=>{const g=s.map(j=>j._key);if(!k.value.length){k.value=g;return}const q=new Set(k.value);g.forEach(j=>{q.has(j)||k.value.push(j)}),k.value=k.value.filter(j=>g.includes(j))},{immediate:!0});const nl=e.computed(()=>yn.value.filter(s=>{var g;return(g=o.customConfig)!=null&&g.checkMethod?o.customConfig.checkMethod(s):!0})),vn=e.computed(()=>{var s;return((s=o.customConfig)==null?void 0:s.enabled)===!0}),on=e.computed(()=>{if(o.toolbarConfig===!1)return{enabled:!1,refresh:!1,export:!1,import:!1,print:!1,custom:!1,zoom:!1,copy:!1,toolsPlacement:"right",customTools:[]};const s=o.toolbarConfig&&typeof o.toolbarConfig=="object"?o.toolbarConfig:{};return{enabled:s.enabled!==!1,refresh:s.refresh!==!1,export:s.export!==!1,import:s.import!==!1,print:s.print!==!1,custom:s.custom!==!1,zoom:s.zoom!==!1,copy:s.copy===!0,toolsPlacement:s.toolsPlacement||"right",customTools:s.customTools||[]}}),pn=e.useSlots(),Mo=e.computed(()=>on.value.refresh&&o.showRefresh!==!1),Ln=e.computed(()=>on.value.export&&o.showExport!==!1),ge=e.computed(()=>on.value.import&&o.showImport===!0),Lt=e.computed(()=>on.value.print&&o.showPrint===!0),ln=e.computed(()=>on.value.zoom&&o.showFullscreen!==!1),kn=e.computed(()=>on.value.copy||o.showCopy===!0&&o.toolbarConfig!==!1),lo=e.computed(()=>!!pn.toolbar||!!pn["toolbar-left"]||!!pn["toolbar-center"]||!!pn["toolbar-right"]||on.value.customTools.length>0),ol=e.computed(()=>Mo.value||Ln.value||ge.value||Lt.value||kn.value||ln.value||vn.value||lo.value),Rl=e.computed(()=>o.showToolbar!==!1&&(o.showToolbar===!0||ol.value)),ao=e.computed(()=>on.value.toolsPlacement),io=s=>on.value.customTools.filter(g=>(g.position||"right")===s).sort((g,q)=>(g.order||0)-(q.order||0)),Pi=(s,g)=>{re[s]=g},Ll=e.computed(()=>{var s;return((s=o.columnDragConfig)==null?void 0:s.enabled)===!0});let an=null;const qo=()=>{an==null||an.destroy(),an=null,Ll.value&&e.nextTick(()=>{var g;const s=(g=u.value)==null?void 0:g.querySelector("thead tr:last-child");s&&(an=xr.create(s,{draggable:"th.qiu-table__cell--col-drag",animation:150,onEnd:q=>{const j=Array.from(s.querySelectorAll("th[data-col-key]")).map(ee=>ee.getAttribute("data-col-key")||"").filter(Boolean);j.length&&(k.value=j,r("column-dragend",{oldIndex:q.oldIndex??0,newIndex:q.newIndex??0,columnKeys:j}))}}))})};e.watch(()=>[Ll.value,mt.value.map(s=>s._key).join(",")],()=>qo());const Yt=e.computed(()=>o.showRadio||At.value.some(s=>s.type==="radio")),jt=e.computed(()=>o.showExpand||At.value.some(s=>s.type==="expand")),cn=s=>{let g=0;return jt.value&&(g+=48),s==="radio"||(Yt.value&&(g+=48),s==="selection")||Kt.value&&(g+=48),g},ll=e.computed(()=>mt.value.some(s=>s.fixed==="left"||s.fixed===!0)),Oi=e.computed(()=>ll.value?null:Xt.value?"index":Kt.value?"selection":Yt.value?"radio":jt.value?"expand":null),sn=s=>({"qiu-table__cell--fixed-left-last":Oi.value===s}),$a=e.computed(()=>{const s=new Set(mt.value.map(q=>q._key)),g=(q,j="")=>{const ee=[];return q.forEach((Ce,Ee)=>{var O;if(Ce.type==="selection"||Ce.type==="checkbox"||Ce.type==="index"||Ce.type==="seq")return;const Me=_i(Ce,Ee,j);if((O=Ce.children)!=null&&O.length){const ae=g(Ce.children,Me);ae.length&&ee.push({...Ce,children:ae});return}s.has(Me)&&ee.push(Ce)}),ee};return g(At.value)}),Xn=e.computed(()=>{if(Gt.value)return[ro.value.map((q,j)=>({column:q,label:q.label||"",colspan:1,rowspan:1,isLeaf:!0,colIndex:j}))];const s=rc($a.value),g=s.length?s:[[]];return lp(g,o.mergeHeaderCells)}),Kt=e.computed(()=>o.showSelection||At.value.some(s=>s.type==="selection"||s.type==="checkbox")),Xt=e.computed(()=>o.showIndex||At.value.some(s=>s.type==="index"||s.type==="seq")),Ea=e.computed(()=>{var g;ht.value;for(const q of Object.keys(F))F[q];const s=((g=h.value)==null?void 0:g.clientWidth)||0;return Hf(mt.value,{containerWidth:s,showSelection:Kt.value,showIndex:Xt.value,showRadio:Yt.value,showExpand:jt.value,fit:o.fit!==!1,resized:F,defaults:X.value})}),Pt=e.computed(()=>{ht.value;for(const g of Object.keys(F))F[g];return{width:"100%",minWidth:`${Math.max(1,Yf(mt.value,{showSelection:Kt.value,showIndex:Xt.value,showRadio:Yt.value,showExpand:jt.value},g=>Ea.value[g._key]||Be(g._key),X.value))}px`}}),ji=e.computed(()=>{var g;const s={};return o.height!=null&&(s.height=Rn(o.height),s.minHeight="0"),o.maxHeight!=null&&(s.maxHeight=Rn(o.maxHeight),s.minHeight="0"),o.minHeight!=null&&(s.minHeight=Rn(o.minHeight)),((g=o.rowConfig)==null?void 0:g.height)!=null&&(s["--qiu-table-row-height"]=`${o.rowConfig.height}px`),s}),Fi=e.computed(()=>({...ji.value,"--qiu-table-v-scrollbar":`${He.value}px`})),Ai=e.computed(()=>{var g;const s={};return((g=o.rowConfig)==null?void 0:g.height)!=null&&(s["--qiu-table-row-height"]=`${o.rowConfig.height}px`),s}),Gt=e.computed(()=>{const s=o.virtualXConfig;return s===!0?!0:s&&typeof s=="object"?s.enabled!==!1:!1}),hn=s=>Ea.value[s._key]||Be(s._key)||Kn(s.width)||Kn(s.minWidth)||X.value.minWidth||100,Qt=e.computed(()=>{var ae;if(ht.value,!Gt.value)return{left:0,right:0,start:0,end:mt.value.length};const s=mt.value,g=((ae=h.value)==null?void 0:ae.clientWidth)||800;let q=0,j=0;const ee=Math.max(0,M.value);for(let ce=0;ce<s.length;ce++){const at=hn(s[ce]);if(q+at>=ee-120){j=ce;break}q+=at,j=ce+1}let Ce=j,Ee=0;for(let ce=j;ce<s.length&&(Ee+=hn(s[ce]),Ce=ce+1,!(Ee>g+240));ce++);let Me=0;for(let ce=0;ce<j;ce++)Me+=hn(s[ce]);let O=0;for(let ce=Ce;ce<s.length;ce++)O+=hn(s[ce]);return{left:Me,right:O,start:j,end:Ce}}),ro=e.computed(()=>Gt.value?mt.value.slice(Qt.value.start,Qt.value.end):mt.value),zo=s=>mt.value.findIndex(g=>g._key===s._key),co=e.computed(()=>{let s=ro.value.length;return jt.value&&(s+=1),Yt.value&&(s+=1),Kt.value&&(s+=1),Xt.value&&(s+=1),Gt.value&&Qt.value.left>0&&(s+=1),Gt.value&&Qt.value.right>0&&(s+=1),Math.max(s,1)}),Sa=e.computed(()=>o.pagerConfig===!0?!0:o.pagerConfig&&typeof o.pagerConfig=="object"?o.pagerConfig.enabled!==!1:!1),Pn=e.computed(()=>typeof o.pagerConfig=="object"?o.pagerConfig:void 0);e.watch(()=>Pn.value,s=>{s!=null&&s.currentPage&&(T.value=s.currentPage),s!=null&&s.pageSize&&(L.value=s.pageSize)},{immediate:!0});const Ma=e.computed(()=>{var s,g;return o.dragSort||!!((g=(s=o.gridOptions)==null?void 0:s.rowConfig)!=null&&g.drag)||mt.value.some(q=>q.dragSort)}),qa=s=>(s==null?void 0:s[Ht.value.children])||[],To=s=>qa(s).length?!0:!!(s!=null&&s[Ht.value.hasChildren]),al=(s,g)=>{var j;const q=Ht.value.children;for(const ee of s||[])g(ee),(j=ee==null?void 0:ee[q])!=null&&j.length&&al(ee[q],g)},Qi=()=>{if(!o.tree)return;const s=new Set;o.defaultExpandAll&&al(o.data,g=>{To(g)&&s.add(Qe(g))}),$.value=s,st=!0},Pl=s=>$.value.has(Qe(s)),za=s=>{const g=Qe(s),q=new Set($.value);q.has(g)?q.delete(g):q.add(g),$.value=q},so=(s,g=0,q=[])=>{for(const j of s||[]){const ee=To(j),Ce=Pl(j);q.push({row:j,level:g,hasChildren:ee,expanded:Ce,flatIndex:q.length}),ee&&Ce&&so(qa(j),g+1,q)}return q},Ol=e.computed(()=>o.tree?so(o.data):(o.data||[]).map((s,g)=>({row:s,level:0,hasChildren:!1,expanded:!1,flatIndex:g}))),wn=(s,g)=>{const q=Hn(g),j=q!=null?s==null?void 0:s[q]:void 0;if(g.formatter)return String(g.formatter(s,g,j)??"");if(g.format&&ha.has(g.format))return ha.get(g.format)({cellValue:j,row:s,column:g});const ee=Mt(g),Ce=(ee==null?void 0:ee.options)||g.options;if(((ee==null?void 0:ee.name)||ot(g))==="select"&&(Ce!=null&&Ce.length)){const Me=Ce.find(O=>O.value===j);return String((Me==null?void 0:Me.label)??j??"")}return j==null?"":String(j)},jl=s=>!!s.filterable||!!(s.filters&&s.filters.length),Ui=s=>{var ee;if((ee=s.filters)!=null&&ee.length)return s.filters;const g=lt(s);if(!g||!s.filterable)return[];const q=new Set,j=[];for(const{row:Ce}of Ol.value){const Ee=Ce==null?void 0:Ce[g],Me=String(Ee);q.has(Me)||(q.add(Me),j.push({text:wn(Ce,s)||Me,value:Ee}))}return j},Wi=s=>{var g;return(((g=m[s._key])==null?void 0:g.length)??0)>0},On=e.computed(()=>{const s=S.value;if(!s)return[];const g=mt.value.find(q=>q._key===s);return g?Ui(g):[]}),Hi=s=>{var q;if((q=o.filterConfig)!=null&&q.remote)return s;const g=mt.value.filter(j=>{var ee;return(((ee=m[j._key])==null?void 0:ee.length)??0)>0});return g.length?s.filter(({row:j})=>g.every(ee=>{const Ce=m[ee._key]||[];if(ee.filterMethod)return Ce.some(Me=>ee.filterMethod(Me,j,ee));const Ee=lt(ee);return Ee?Ce.some(Me=>j[Ee]===Me):!0})):s},Ta=s=>{var j,ee;if((j=o.sortConfig)!=null&&j.remote)return s;const g=(ee=o.sortConfig)!=null&&ee.multiple&&C.value.length?C.value:b.value.prop&&b.value.order?[{prop:b.value.prop,order:b.value.order}]:[];if(!g.length)return s;const q=[...s];return q.sort((Ce,Ee)=>tp(Ce.row,Ee.row,g)),q.map((Ce,Ee)=>({...Ce,flatIndex:Ee}))},Sn=e.computed(()=>Ta(Hi(Ol.value))),mo=e.computed(()=>{var s;return((s=Pn.value)==null?void 0:s.total)??Sn.value.length}),Mn=e.computed(()=>Math.max(1,Math.ceil(mo.value/L.value))),Zt=e.computed(()=>{var g;if(!Sa.value)return Sn.value;if(((g=Pn.value)==null?void 0:g.total)!=null)return Sn.value.map((q,j)=>({...q,flatIndex:j}));const s=(T.value-1)*L.value;return Sn.value.slice(s,s+L.value).map((q,j)=>({...q,flatIndex:s+j}))}),Yi=e.computed(()=>o.virtualYConfig!=null?o.virtualYConfig:!!o.virtualY),{enabled:il,range:uo,onScroll:Ki,measure:fo}=sp({bodyWrapRef:h,rows:()=>Zt.value,config:()=>Yi.value,defaultRowHeight:((Jl=o.rowConfig)==null?void 0:Jl.height)||48}),Ia=e.computed(()=>{const s=Zt.value;if(!il.value)return s.map((j,ee)=>({flat:j,rowIndex:ee}));const{start:g,end:q}=uo.value;return s.slice(g,q).map((j,ee)=>({flat:j,rowIndex:g+ee}))}),Da=()=>{var s;ct(),Ki(),M.value=((s=h.value)==null?void 0:s.scrollLeft)||0,E()},vi=()=>{const s=Zt.value.map(j=>j.row),g=[],q=[];return mt.value.forEach((j,ee)=>{const Ce=lt(j);if(ee===0){g.push(Xe("合计")),q.push(Xe("平均"));return}const Ee=s.map(O=>Number(Ce!=null?O[Ce]:NaN)).filter(O=>!Number.isNaN(O)),Me=O=>`¥ ${O.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2})}`;if(j.aggFunc==="count"){g.push(String(s.length)),q.push("");return}if(j.aggFunc==="sum"||j.aggFunc==="avg"||Ee.length>0&&Ee.length===s.length){const O=Ee.reduce((at,Fe)=>at+Fe,0),ae=Ee.length?O/Ee.length:0,ce=j.aggFunc!=null||Ce==="jan"||Ce==="feb";if(j.aggFunc==="avg"){g.push(""),q.push(ce?Me(ae):ae.toFixed(2));return}g.push(ce?Me(O):String(Number.isInteger(O)?O:Number(O.toFixed(2)))),q.push(ce?Me(ae):ae.toFixed(2));return}g.push(""),q.push("")}),[g,q]},rl=e.computed(()=>{var g;if(!o.showFooter)return[];if((g=o.footerData)!=null&&g.length)return o.footerData;const s=Zt.value.map(q=>q.row);return o.footerMethod?o.footerMethod({columns:mt.value,data:s}):vi()}),Fl=(s,g,q,j=0)=>({row:s,column:g,$index:q,cellValue:lt(g)!=null?s==null?void 0:s[lt(g)]:void 0,level:j}),po=e.computed(()=>o.size||"small"),cl=(s,g)=>{if(!s)return"";const q=String(s);return g?q.replace(" ","T").slice(0,16):q.slice(0,10)},Xi=(s,g)=>{const q=lt(g),j=s[q],ee=Fe=>bn(s,g,Fe),Ce=Fe=>{requestAnimationFrame(()=>{Le()||Ot(s,g)&&ee(Fe)})},Ee=Mt(g)||gi(g),Me=(Ee==null?void 0:Ee.name)||ot(g),O={...g.editorProps||{},...(Ee==null?void 0:Ee.props)||{},...(Ee==null?void 0:Ee.attrs)||{}},ae=(Ee==null?void 0:Ee.options)||g.options||[],ce=Fe=>{const Dt=Ee==null?void 0:Ee.events;if(!Dt)return Fe;const vt={...Fe};return Object.keys(Dt).forEach(qn=>{const bt=Dt[qn],tn=vt[qn];vt[qn]=(...Ut)=>{bt==null||bt(...Ut),typeof tn=="function"&&tn(...Ut)}}),vt},at=Me==="input";if(Me&&Jr.has(Me)){const Fe=Jr.get(Me)({cellValue:j,row:s,column:g,editRender:Ee,commit:ee,update:Dt=>{s[q]=Dt}});if(Fe)return Fe}return Me==="switch"?e.h(Bl,ce({modelValue:!!j,size:po.value==="large"?"default":"small",...O,"onUpdate:modelValue":ee,onChange:ee})):Me==="select"?e.h(El,ce({modelValue:j,options:ae,size:po.value,fit:!0,...O,"onUpdate:modelValue":Fe=>{s[q]=Fe},onChange:ee,onVisibleChange:Fe=>{Fe||ee(s[q])}})):Me==="number"?e.h(Nl,ce({modelValue:j,size:po.value,controlsPosition:"right",style:{width:"110px",maxWidth:"100%"},...O,"onUpdate:modelValue":Fe=>{s[q]=Fe},onChange:ee,onBlur:()=>Ce(s[q])})):Me==="date"||Me==="datetime"?e.h("input",ce({class:"qiu-table__date-input",type:Me==="datetime"?"datetime-local":"date",value:cl(j,Me==="datetime"),...O,onChange:Fe=>ee(Fe.target.value),onKeydown:Fe=>{Fe.key==="Enter"&&(Fe.preventDefault(),Fe.stopPropagation(),ee(Fe.target.value))},onBlur:Fe=>Ce(Fe.target.value)})):Me==="time"?e.h(Xr,ce({modelValue:j??null,size:po.value,fit:!0,format:(O==null?void 0:O.format)||"HH:mm:ss",...O,"onUpdate:modelValue":Fe=>{s[q]=Fe},onChange:ee,onVisibleChange:Fe=>{!Fe&&s[q]!=null&&ee(s[q])}})):e.h(Wn,ce({modelValue:j??"",size:at?void 0:po.value,class:at?"qiu-table__input-fill":void 0,style:at?{width:"100%",height:"100%",borderRadius:"0"}:{width:"100%"},...O,"onUpdate:modelValue":Fe=>{s[q]=Fe},onKeydown:Fe=>{Fe.key==="Enter"?(Fe.preventDefault(),Fe.stopPropagation(),ee(s[q])):Fe.key==="Escape"&&(Fe.preventDefault(),Fe.stopPropagation(),v())},onBlur:()=>Ce(s[q])}))},ho=(s,g,q)=>{if(Rt(s,g,!!(q!=null&&q.shiftKey)),sl(s),!o.editable)return;be()==="click"&&$n(s,g,h.value)},Ra=(s,g)=>{if(Rt(s,g),!o.editable)return;be()==="dblclick"&&$n(s,g,h.value)},go=s=>_.value.some(g=>Qe(g)===Qe(s)),Jt=(s,g)=>{const q=Qe(s);let j=_.value.slice();g?j.some(ee=>Qe(ee)===q)||j.push(s):j=j.filter(ee=>Qe(ee)!==q),_.value=j,r("selection-change",j),r("checkbox-change",{records:j,row:s,checked:g})},Gi=e.computed(()=>{const s=Zt.value.map(g=>g.row);return s.length>0&&s.every(g=>go(g))}),Io=e.computed(()=>{const s=Zt.value.map(q=>q.row),g=s.filter(q=>go(q)).length;return g>0&&g<s.length}),Ji=s=>{const g=Zt.value.map(q=>q.row);_.value=s?g.slice():[],r("selection-change",_.value),r("checkbox-all",{records:_.value,checked:s})},Zi=(s,g)=>{var ee;if(!s.sortable||s.sortable==="custom")return;const q=lt(s);if(!q)return;if(!!((ee=o.sortConfig)!=null&&ee.multiple)&&!!(g!=null&&g.shiftKey||g!=null&&g.ctrlKey||g!=null&&g.metaKey)){const Ce=C.value.findIndex(Me=>Me.prop===q);if(Ce<0)C.value=[...C.value,{prop:q,order:"asc"}];else if(C.value[Ce].order==="asc"){const Me=C.value.slice();Me[Ce]={prop:q,order:"desc"},C.value=Me}else C.value=C.value.filter(Me=>Me.prop!==q);const Ee=C.value[C.value.length-1];b.value=Ee?{prop:Ee.prop,order:Ee.order}:{prop:"",order:null},r("sort-change",{prop:b.value.prop,order:b.value.order,sorts:C.value.slice()});return}C.value=[],b.value.prop!==q?b.value={prop:q,order:"asc"}:b.value.order==="asc"?b.value={prop:q,order:"desc"}:b.value={prop:"",order:null},b.value.prop&&b.value.order&&(C.value=[{prop:b.value.prop,order:b.value.order}]),r("sort-change",{...b.value,sorts:C.value.slice()})},La=s=>{var j;if(!((j=o.sortConfig)!=null&&j.multiple)||C.value.length<2)return 0;const g=lt(s),q=C.value.findIndex(ee=>ee.prop===g);return q>=0?q+1:0},Al=s=>{var q;const g=lt(s);if((q=o.sortConfig)!=null&&q.multiple&&C.value.length){const j=C.value.find(ee=>ee.prop===g);return j?j.order==="asc"?"is-asc":"is-desc":""}return b.value.prop!==g?"":b.value.order==="asc"?"is-asc":"is-desc"},sl=s=>{hi(o.rowConfig)&&(U.value=Qe(s),r("current-change",{row:s}))},er=e.computed(()=>cc(o.mergeCells)),dl=(s,g,q,j)=>op({row:s.row,column:q,rowIndex:g,columnIndex:j,data:Zt.value.map(ee=>ee.row),spanMethod:o.spanMethod,mergeCells:o.mergeCells,covered:er.value}),tr=s=>{var g;return s.resizable===!1?!1:s.resizable===!0?!0:!!((g=o.columnConfig)!=null&&g.resizable)},jn=s=>{var j;F[s._key];const g=hn(s),q=Xo(s,((j=h.value)==null?void 0:j.clientWidth)||0,X.value);return{width:`${g}px`,minWidth:`${q.isFlex?q.minWidth:g}px`,...q.maxWidth<Number.POSITIVE_INFINITY?{maxWidth:`${q.maxWidth}px`}:{}}},Ql=(s,g)=>{var Ce;const q=hn(s),j=Xo(s,((Ce=h.value)==null?void 0:Ce.clientWidth)||0,X.value);qe(s._key,q,g,{minWidth:j.minWidth,maxWidth:j.maxWidth<Number.POSITIVE_INFINITY?j.maxWidth:void 0});const ee=()=>{r("resizable-change",{column:s,width:F[s._key]||q}),document.removeEventListener("mouseup",ee)};document.addEventListener("mouseup",ee)},xn=(s,g)=>{if(S.value===s._key){Do();return}w[s._key]=[...m[s._key]||[]],S.value=s._key;const q=g.currentTarget.getBoundingClientRect();N.value={left:Math.min(q.left,window.innerWidth-220),top:q.bottom+6}},Do=()=>{S.value=null,N.value=null},Ro=(s,g)=>(w[s]||[]).some(q=>q===g),Pa=(s,g,q)=>{const j=[...w[s]||[]],ee=j.findIndex(Ce=>Ce===g);q&&ee<0&&j.push(g),!q&&ee>=0&&j.splice(ee,1),w[s]=j},Oa=e.computed(()=>{const s=S.value;return!s||!On.value.length?!1:On.value.every(g=>Ro(s,g.value))}),nr=e.computed(()=>{const s=S.value;if(!s||!On.value.length)return!1;const g=(w[s]||[]).length;return g>0&&g<On.value.length}),or=s=>{const g=S.value;g&&(w[g]=s?On.value.map(q=>q.value):[])},lr=()=>{const s=S.value;s&&(m[s]=[...w[s]||[]],r("filter-change",{...m})),Do()},Ul=()=>{const s=S.value;s&&(w[s]=[],m[s]=[],r("filter-change",{...m})),Do()},ar=s=>{const g=s.column,q=s.isLeaf?{}:{};return s.isLeaf&&((g.fixed==="left"||g.fixed===!0)&&(q.left=`${nc(mt.value,g._key,{showSelection:Kt.value,showIndex:Xt.value,showRadio:Yt.value,showExpand:jt.value},hn)}px`),g.fixed==="right"&&(q.right=`${oc(mt.value,g._key,hn)}px`)),q},ja=s=>{if(!s)return{};const g={};return(s.fixed==="left"||s.fixed===!0)&&(g.left=`${nc(mt.value,s._key,{showSelection:Kt.value,showIndex:Xt.value,showRadio:Yt.value,showExpand:jt.value},hn)}px`),s.fixed==="right"&&(g.right=`${oc(mt.value,s._key,hn)}px`),g},Wl=s=>{if(!s)return{};const g=s.fixed==="left"||s.fixed===!0,q=s.fixed==="right";return{"qiu-table__cell--fixed-left":g,"qiu-table__cell--fixed-right":q,"qiu-table__cell--fixed-left-last":g&&Kf(mt.value,s._key),"qiu-table__cell--fixed-right-first":q&&vf(mt.value,s._key)}},ir=async()=>{D.value=!D.value,await e.nextTick(),Q()},_o=s=>{T.value=s,r("page-change",{currentPage:s,pageSize:L.value})},Lo=s=>{L.value=s,T.value=1,r("page-change",{currentPage:1,pageSize:s})},Gn=s=>{const g=new Set;s&&al(o.data,q=>{To(q)&&g.add(Qe(q))}),$.value=g},ml=()=>_.value.slice(),Fn=e.computed(()=>mt.value.filter(s=>lt(s)&&!s.dragSort&&s.type!=="selection"&&s.type!=="index"&&s.type!=="seq"&&s.type!=="radio"&&s.type!=="expand")),Fa=e.computed(()=>Fn.value.length>0&&Fn.value.every(s=>Z.value.includes(s._key))),rr=e.computed(()=>{const s=Z.value.length;return s>0&&s<Fn.value.length}),Aa=()=>{const s=o.exportConfig,g=Fn.value.filter(q=>s!=null&&s.columnFilterMethod?s.columnFilterMethod({column:q})!==!1:!0);Z.value=g.map(q=>q._key),Ve.value=(s==null?void 0:s.type)||"xlsx",z.value=(s==null?void 0:s.mode)||"all",fe.value=Math.max(1,(s==null?void 0:s.startPage)??T.value),he.value=Math.max(fe.value,Math.min(Mn.value,(s==null?void 0:s.endPage)??Mn.value)),H.value=!0},cr=s=>{Z.value=s?Fn.value.map(g=>g._key):[]},sr=(s,g)=>{g?Z.value.includes(s)||(Z.value=[...Z.value,s]):Z.value=Z.value.filter(q=>q!==s)},Qa=s=>{if(s==="selected")return _.value.slice();if(s==="current")return Zt.value.map(q=>q.row);if(s==="range"){const q=Math.max(0,(fe.value-1)*L.value),j=he.value*L.value;return Sn.value.slice(q,j).map(ee=>ee.row)}const g=[];return al(o.data,q=>g.push(q)),g},An=async()=>{var Ce;const s={...o.exportConfig||{}};if(s.type=Ve.value,s.beforeExportMethod&&await s.beforeExportMethod({options:s})===!1)return;const g=Fn.value.filter(Ee=>Z.value.includes(Ee._key));if(!g.length)return;s.mode=z.value||"all",s.startPage=fe.value,s.endPage=he.value;const q=Qa(s.mode),j=dc(g,q,(Ee,Me)=>wn(Ee,Me)),ee=s.filename||"export";await mc({format:Ve.value,filename:ee,matrix:j}),H.value=!1,(Ce=s.afterExportMethod)==null||Ce.call(s,{options:s})},Po=async s=>{var Me,O;const g={...o.exportConfig||{},...s};if(g.beforeExportMethod&&await g.beforeExportMethod({options:g})===!1)return;const q=Fn.value.filter(ae=>g.columnFilterMethod?g.columnFilterMethod({column:ae})!==!1:!0),j=(Me=s==null?void 0:s.columns)!=null&&Me.length?q.filter(ae=>s.columns.includes(ae._key)||s.columns.includes(lt(ae)||"")):q;if(!j.length){Aa();return}const ee=(s==null?void 0:s.mode)||g.mode||"all";ee==="range"&&(fe.value=Math.max(1,(s==null?void 0:s.startPage)??g.startPage??T.value),he.value=Math.max(fe.value,Math.min(Mn.value,(s==null?void 0:s.endPage)??g.endPage??Mn.value)));const Ce=Qa(ee),Ee=dc(j,Ce,(ae,ce)=>wn(ae,ce));await mc({format:(s==null?void 0:s.format)||g.type||"xlsx",filename:(s==null?void 0:s.filename)||g.filename||"export",matrix:Ee}),(O=g.afterExportMethod)==null||O.call(g,{options:g})},ul=()=>{var s;return(s=Ne.value)==null?void 0:s.click()},dr=async s=>{var q;const g=(q=s.target.files)==null?void 0:q[0];if(s.target.value="",!!g)try{const j=await bp(g),ee=up(j,mt.value);r("import-data",{rows:ee})}catch(j){console.error(j)}},bo=s=>String(s??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),yo=()=>{const s=mt.value,g=Sn.value,j=rc($a.value).filter(ce=>ce.length),ee=Math.max(j.length,1),Ce=(ce="")=>`<th class="qiu-print-special" rowspan="${ee}">${bo(ce)}</th>`;let Ee="<thead>";j.length?j.forEach((ce,at)=>{Ee+="<tr>",at===0&&(jt.value&&(Ee+=Ce("")),Yt.value&&(Ee+=Ce("")),Kt.value&&(Ee+=Ce("")),Xt.value&&(Ee+=Ce(Xe("序号")))),ce.forEach(Fe=>{Ee+=`<th colspan="${Fe.colspan||1}" rowspan="${Fe.rowspan||1}">${bo(Fe.label)}</th>`}),Ee+="</tr>"}):(Ee+="<tr>",jt.value&&(Ee+=Ce("")),Yt.value&&(Ee+=Ce("")),Kt.value&&(Ee+=Ce("")),Xt.value&&(Ee+=Ce(Xe("序号"))),s.forEach(ce=>{Ee+=`<th>${bo(ce.label||"")}</th>`}),Ee+="</tr>"),Ee+="</thead>";let Me="<tbody>";g.forEach((ce,at)=>{Me+="<tr>",jt.value&&(Me+="<td></td>"),Yt.value&&(Me+="<td></td>"),Kt.value&&(Me+="<td></td>"),Xt.value&&(Me+=`<td>${ce.flatIndex+1}</td>`),s.forEach(Fe=>{const Dt=Fe.align||"left";Me+=`<td style="text-align:${Dt}">${bo(wn(ce.row,Fe))}</td>`}),Me+="</tr>"}),Me+="</tbody>";let O="";o.showFooter&&rl.value.length&&(O="<tfoot>",rl.value.forEach(ce=>{O+="<tr>",jt.value&&(O+="<td></td>"),Yt.value&&(O+="<td></td>"),Kt.value&&(O+="<td></td>"),Xt.value&&(O+="<td></td>"),ce.forEach((at,Fe)=>{var vt;const Dt=((vt=s[Fe])==null?void 0:vt.align)||"left";O+=`<td style="text-align:${Dt}">${bo(at)}</td>`}),O+="</tr>"}),O+="</tfoot>");const ae=window.open("","_blank");ae&&(ae.document.write(`<!DOCTYPE html><html><head><meta charset="utf-8"/><title>${bo(Xe("打印"))}</title>
8
+ <style>
9
+ @page { margin: 12mm; }
10
+ * { box-sizing: border-box; }
11
+ body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; color: #303133; }
12
+ table.qiu-print-table {
13
+ width: 100%;
14
+ border-collapse: collapse;
15
+ table-layout: auto;
16
+ font-size: 12px;
17
+ }
18
+ .qiu-print-table th,
19
+ .qiu-print-table td {
20
+ border: 1px solid #dcdfe6;
21
+ padding: 6px 8px;
22
+ vertical-align: middle;
23
+ word-break: break-word;
24
+ }
25
+ .qiu-print-table thead {
26
+ display: table-header-group; /* 每一打印页重复表头 */
27
+ }
28
+ .qiu-print-table tfoot {
29
+ display: table-footer-group;
30
+ }
31
+ .qiu-print-table tr {
32
+ page-break-inside: avoid;
33
+ }
34
+ .qiu-print-table th {
35
+ background: #f5f7fa !important;
36
+ font-weight: 600;
37
+ text-align: left;
38
+ -webkit-print-color-adjust: exact;
39
+ print-color-adjust: exact;
40
+ }
41
+ .qiu-print-table tfoot td {
42
+ background: #fafafa !important;
43
+ font-weight: 600;
44
+ -webkit-print-color-adjust: exact;
45
+ print-color-adjust: exact;
46
+ }
47
+ @media print {
48
+ .qiu-print-table thead { display: table-header-group; }
49
+ .qiu-print-table tfoot { display: table-footer-group; }
50
+ }
51
+ </style></head><body>
52
+ <table class="qiu-print-table">${Ee}${Me}${O}</table>
53
+ </body></html>`),ae.document.close(),ae.focus(),setTimeout(()=>{ae.print()},50))},Hl=e.computed(()=>[{name:"refresh",show:Mo.value,title:Xe("刷新"),icon:"refresh-line",onClick:()=>r("refresh")},{name:"zoom",show:ln.value,title:Xe(D.value?"退出全屏":"全屏"),icon:D.value?"fullscreen-exit-line":"fullscreen-line",onClick:ir},{name:"import",show:ge.value,title:Xe("导入"),icon:"upload-2-line",onClick:ul},{name:"print",show:Lt.value,title:Xe("打印"),icon:"printer-line",onClick:yo},{name:"custom",show:vn.value,title:Xe("列设置"),icon:"settings-3-line",onClick:()=>oe.value=!oe.value},{name:"export",show:Ln.value||!!o.exportConfig,title:Xe("导出"),icon:"download-2-line",onClick:Aa}]),mr=s=>{var g,q;return s.editor==="switch"||s.type==="switch"||((g=s.editRender)==null?void 0:g.name)==="switch"||((q=s.cellRender)==null?void 0:q.name)==="switch"},ur=async s=>{if(navigator.clipboard&&window.isSecureContext){await navigator.clipboard.writeText(s);return}const g=document.createElement("textarea");g.value=s,g.style.position="fixed",g.style.opacity="0",document.body.appendChild(g),g.select();try{document.execCommand("copy")}finally{g.remove()}},Qn=async(s,g="selected")=>{let q=mt.value,j=Sn.value.map(ae=>ae.row);const ee=Ue.value;if(g==="selected"&&ee&&(q=q.slice(ee.c0,ee.c1+1),j=j.slice(ee.r0,ee.r1+1)),!q.length||!j.length){ke.warning(Xe("没有可复制的数据"));return}if(s==="horizontal"&&q.some(mr)){ke.warning(Xe("横向复制暂不支持包含开关/自定义渲染的列"));return}const Ce=ae=>String(ae??"").replace(/\t/g," ").replace(/\r?\n/g," "),Ee=(ae,ce)=>Ce(wn(ae,ce)),Me=ae=>Ce(ae.label||ae.title||ae.field||ae._key);let O="";if(s==="vertical"){const ae=[q.map(Me).join(" ")];j.forEach(ce=>ae.push(q.map(at=>Ee(ce,at)).join(" "))),O=ae.join(`
54
+ `)}else{const ae=[];ae.push([""].concat(j.map((ce,at)=>String(at+1)))),q.forEach(ce=>{ae.push([Me(ce)].concat(j.map(at=>Ee(at,ce))))}),O=ae.map(ce=>ce.join(" ")).join(`
55
+ `)}try{await ur(O),ke.success(Xe("已复制到剪贴板"))}catch{ke.error(Xe("复制失败,请检查浏览器剪贴板权限"))}},Yl=()=>{$e.visible=!1},fr=s=>{var Ce,Ee,Me,O;if(((Ce=o.menuConfig)==null?void 0:Ce.enabled)===!1)return;const g=(Me=(Ee=o.menuConfig)==null?void 0:Ee.body)==null?void 0:Me.options;if(!(g!=null&&g.length))return;const q=s.target.closest("tr"),j=(q==null?void 0:q.getAttribute("data-row-key"))||"",ee=j?wo(o.data,j):void 0;(O=o.menuConfig)!=null&&O.visibleMethod&&o.menuConfig.visibleMethod({type:"body",row:ee,options:g})===!1||($e.visible=!0,$e.x=s.clientX,$e.y=s.clientY,$e.options=g,$e.row=ee)},Kl=s=>{s.code==="copy"||s.code==="COPY"?ko():s.code==="cut"||s.code==="CUT"?Oo():(s.code==="paste"||s.code==="PASTE")&&vl(),r("menu-click",{menu:s,row:$e.row,column:$e.column}),Yl()},ko=async()=>{if(qt().isCopy===!1)return;const s=ne((g,q)=>{const j=mt.value.find(ee=>lt(ee)===q);return j?wn(g,j):String((g==null?void 0:g[q])??"")});if(s)try{await navigator.clipboard.writeText(s)}catch{}},Ua=(s,g,q)=>{const j=mt.value.find(ee=>lt(ee)===g);if(!j||!dt(j)){s[g]=q;return}bn(s,j,q)},Oo=async()=>{qt().isCut!==!1&&(await ko(),Te((s,g,q)=>Ua(s,g,q)))},vl=async()=>{if(qt().isPaste!==!1)try{const s=await navigator.clipboard.readText();R(s,(g,q,j)=>Ua(g,q,j))}catch{}},en=s=>{sl(s),e.nextTick(()=>va(s))},Xl=s=>{var vt,qn;const g=hi(o.rowConfig),q=et().isArrow!==!1,j=et().isEnter!==!1,ee=et().isEsc!==!1,Ce=et().isTab===!0,Ee=et().isUndo!==!1&&Tt();if(!o.editable&&!g&&!Ee)return;const Me=s.target,O=Me==null?void 0:Me.tagName,ae=O==="INPUT"||O==="TEXTAREA"||O==="SELECT"||!!(Me!=null&&Me.isContentEditable)||!!((vt=Me==null?void 0:Me.closest)!=null&&vt.call(Me,".qiu-input, .qiu-select, .qiu-input-number, .qiu-time, .qiu-time-panel")),ce=s.ctrlKey||s.metaKey;if(ce&&(s.key==="z"||s.key==="Z")&&Ee&&!s.shiftKey){s.preventDefault(),En();return}if(ce&&(s.key==="y"||s.key==="Y"||(s.key==="z"||s.key==="Z")&&s.shiftKey)&&Ee){s.preventDefault(),dn();return}if(ce&&(s.key==="c"||s.key==="C")&&qt().isCopy!==!1){ae||(s.preventDefault(),ko());return}if(ce&&(s.key==="x"||s.key==="X")&&qt().isCut!==!1){ae||(s.preventDefault(),Oo());return}if(ce&&(s.key==="v"||s.key==="V")&&qt().isPaste!==!1){ae||(s.preventDefault(),vl());return}if(ae&&et().isEdit!==!0)return;const at=Zt.value.map(bt=>bt.row);if(!at.length)return;const Fe=U.value?at.findIndex(bt=>Qe(bt)===U.value):-1,Dt=s.shiftKey;if(q&&s.key==="ArrowDown"){s.preventDefault();const bt=un(1,0,Dt);if(bt)en(bt.row);else if(g){const tn=at[Math.min(at.length-1,Math.max(0,Fe+1))];tn&&en(tn)}}else if(q&&s.key==="ArrowUp"){s.preventDefault();const bt=un(-1,0,Dt);if(bt)en(bt.row);else if(g){const tn=at[Math.max(0,Fe<=0?0:Fe-1)];tn&&en(tn)}}else if(q&&s.key==="ArrowLeft"){s.preventDefault();const bt=un(0,-1,Dt);bt&&en(bt.row)}else if(q&&s.key==="ArrowRight"){s.preventDefault();const bt=un(0,1,Dt);bt&&en(bt.row)}else if(Ce&&s.key==="Tab"){s.preventDefault();const bt=un(0,s.shiftKey?-1:1,!1);bt&&en(bt.row)}else if(j&&s.key==="Enter"&&Fe>=0&&o.editable){if(rt.value)return;s.preventDefault();const bt=at[Fe],tn=(qn=je.value)==null?void 0:qn.prop,Ut=tn&&mt.value.find(Jn=>lt(Jn)===tn&&dt(Jn))||mt.value.find(Jn=>dt(Jn)&&ot(Jn)!=="switch");bt&&Ut&&$n(bt,Ut,h.value)}else ee&&s.key==="Escape"&&(v(),mn(),Yl())},fl=()=>({getTableData:()=>({fullData:o.data}),getCheckboxRecords:ml,clearEdit:v,exportData:Po,setAllTreeExpand:Gn,importData:ul,print:yo}),wo=(s,g)=>{var j;const q=Ht.value.children;for(const ee of s||[]){if(Qe(ee)===g)return ee;if((j=ee==null?void 0:ee[q])!=null&&j.length){const Ce=wo(ee[q],g);if(Ce)return Ce}}return null},Wa=()=>{Ge==null||Ge.destroy(),Ge=null,Ma.value&&e.nextTick(()=>{const s=f.value;s&&(Ge=xr.create(s,{handle:".qiu-table__drag-handle",animation:150,draggable:".qiu-table__row:not(.qiu-table__row--empty)",onEnd:g=>{var j;const q=((j=g.item)==null?void 0:j.getAttribute("data-row-key"))||"";r("row-dragend",{dragRow:wo(o.data,q),oldIndex:g.oldIndex,newIndex:g.newIndex})}}))})},Ha={register(s){B.value=[...B.value.filter(g=>g.id!==s.id),s]},unregister(s){B.value=B.value.filter(g=>g.id!==s)},update(s){const g=B.value.findIndex(q=>q.id===s.id);if(g>=0){const q=B.value.slice();q[g]=s,B.value=q}else Ha.register(s)}};e.provide(Zr,Ha),e.watch(()=>[o.tree,o.defaultExpandAll,o.data],()=>{(!st||o.defaultExpandAll)&&Qi()},{deep:!0,immediate:!0}),e.watch(()=>[Ma.value,o.data.length,Zt.value.length],()=>Wa()),e.watch(()=>[Zt.value.length,o.height,o.maxHeight,mt.value.length],()=>e.nextTick(Q)),e.onMounted(()=>{Wa(),e.nextTick(()=>{Q(),fo(),E()})}),e.onBeforeUnmount(()=>{Ge==null||Ge.destroy(),Ge=null,an==null||an.destroy(),an=null});const Ya=e.defineComponent({name:"QiuTableCellContent",props:{row:{type:Object,required:!0},col:{type:Object,required:!0},index:{type:Number,required:!0}},setup(s){return()=>{var at,Fe,Dt,vt,qn;const g=s.row,q=s.col,j=s.index,ee=ot(q),Ce=lt(q),Ee=Ce!=null?g[Ce]:void 0;if(yt(q)||Ot(g,q))return Xi(g,q);const Me=typeof q.cellRender=="string"?q.cellRender:(at=q.cellRender)==null?void 0:at.name;if(Me&&Gr.has(Me)){const bt=Gr.get(Me)({cellValue:Ee,row:g,column:q,$index:j});return bt==null?null:typeof bt=="string"?e.h("span",{class:"qiu-table__text"},bt):bt}let O="";if(ee==="select"&&((Fe=q.options)!=null&&Fe.length)){const bt=q.options.find(tn=>tn.value===Ee);O=(bt==null?void 0:bt.label)??wn(g,q)}else O=wn(g,q);const ae=kt(g,q);return It(q)&&ae&&!Ot(g,q)&&((Dt=o.tooltipConfig)==null?void 0:Dt.showAll)!==!1?e.h(mi,{content:ae,placement:"top",showAfter:((vt=o.tooltipConfig)==null?void 0:vt.enterDelay)??200,hideAfter:((qn=o.tooltipConfig)==null?void 0:qn.leaveDelay)??100},{default:()=>e.h("span",{class:"qiu-table__text"},O)}):e.h("span",{class:"qiu-table__text"},O)}}}),pr=(s,g)=>{const q=o.rowClassName;return q?typeof q=="function"?q({row:s,rowIndex:g}):q:""},hr=(s,g,q,j)=>{const ee=o.cellClassName;return ee?typeof ee=="function"?ee({row:s,column:g,rowIndex:q,columnIndex:j}):ee:""},gr=s=>{if(s==null){U.value=null,r("current-change",{row:null});return}hi(o.rowConfig)&&(U.value=Qe(s),r("current-change",{row:s}))},_r=()=>{U.value=null,mn(),r("current-change",{row:null})},pl=()=>{b.value={prop:"",order:null},C.value=[],r("sort-change",{prop:"",order:null,sorts:[]})},Gl=s=>{if(s){const g=mt.value.find(j=>lt(j)===s||j._key===s),q=g==null?void 0:g._key;q&&(m[q]=[],w[q]=[])}else Object.keys(m).forEach(g=>{m[g]=[],w[g]=[]});r("filter-change",{...m})},Ka=s=>{const g=h.value;g&&(s.top!=null&&(g.scrollTop=s.top),s.left!=null&&(g.scrollLeft=s.left))},va=s=>{var j;const g=Qe(s),q=(j=h.value)==null?void 0:j.querySelector(`[data-row-key="${String(g).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`);q instanceof HTMLElement&&q.scrollIntoView({block:"nearest"})};return a({tableRef:d,gridRef:d,getGrid:fl,clearEdit:v,exportData:Po,getCheckboxRecords:ml,setAllTreeExpand:Gn,importData:ul,print:yo,getRadioRecord:()=>ze.value?wo(o.data,ze.value):null,clearRadioRow:pe,setRowExpand:xt,clearRowExpand:pt,getUpdateRecords:Je,getInsertRecords:Ze,isUpdateByRow:We,reloadRow:tt,reloadColumn:()=>{ht.value++},setCurrentRow:gr,clearCurrentRow:_r,clearSort:pl,clearFilter:Gl,scrollTo:Ka,scrollToRow:va,getColumnWidth:s=>{const g=mt.value.find(q=>q._key===s||lt(q)===s);return g?hn(g):void 0},setColumnWidth:(s,g)=>{const q=mt.value.find(j=>j._key===s||lt(j)===s);q&&K(q._key,g)},recalculate:()=>{ht.value++,e.nextTick(Q)},getColumns:()=>mt.value.slice(),undo:En,redo:dn,clearHistory:no,canUndo:Dn,canRedo:oo,copy:ko,cut:Oo,paste:vl,copyData:Qn}),(s,g)=>{var Ce,Ee,Me;const q=_t,j=nn,ee=Nn;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:c,class:e.normalizeClass(["qiu-table",[{"qiu-table--border":t.border===!0||t.border==="full"||t.border==="default","qiu-table--border-full":t.border==="full"||t.border===!0,"qiu-table--border-outer":t.border==="outer","qiu-table--border-inner":t.border==="inner","qiu-table--border-none":t.border==="none"||t.border===!1,"qiu-table--stripe":t.stripe,"qiu-table--round":t.round,"qiu-table--fullscreen":e.unref(D),"qiu-table--toolbar":e.unref(Rl),"qiu-table--hover":e.unref(Of)(t.rowConfig),"qiu-table--fixed-height":t.height!=null||t.maxHeight!=null,"qiu-table--scroll-x":e.unref(V),"qiu-table--scroll-y":e.unref(He)>0},t.size?`qiu-table--${t.size}`:""]]),tabindex:"0",style:e.normalizeStyle(e.unref(Fi)),onKeydown:Xl},[e.unref(Rl)?(e.openBlock(),e.createElementBlock("div",yp,[e.createElementVNode("div",kp,[e.renderSlot(s.$slots,"toolbar-left"),e.renderSlot(s.$slots,"toolbar"),e.unref(ao)==="left"?(e.openBlock(),e.createElementBlock("div",wp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Hl),O=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:O.name},[O.show?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-table__toolbar-icon",title:O.title,onClick:O.onClick},[e.createVNode(q,{icon:O.icon},null,8,["icon"])],8,xp)):e.createCommentVNode("",!0)],64))),128)),e.unref(kn)?(e.openBlock(),e.createBlock(Sl,{key:0,class:"qiu-table__toolbar-dropdown"},{dropdown:e.withCtx(()=>[e.createVNode(vo,null,{default:e.withCtx(()=>[e.createVNode(Yn,{onClick:g[0]||(g[0]=O=>Qn("vertical"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("纵向复制")),1)]),_:1}),e.createVNode(Yn,{onClick:g[1]||(g[1]=O=>Qn("horizontal"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("横向复制")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"qiu-table__toolbar-icon",title:e.unref(Xe)("复制")},[e.createVNode(q,{icon:"file-copy-line"})],8,Vp)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(io("left"),O=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.component),e.mergeProps({key:O.name},{ref_for:!0},O.props),null,16))),128))]),e.createElementVNode("div",Cp,[e.renderSlot(s.$slots,"toolbar-center"),e.unref(ao)==="center"?(e.openBlock(),e.createElementBlock("div",Np,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Hl),O=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:O.name},[O.show?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-table__toolbar-icon",title:O.title,onClick:O.onClick},[e.createVNode(q,{icon:O.icon},null,8,["icon"])],8,Bp)):e.createCommentVNode("",!0)],64))),128)),e.unref(kn)?(e.openBlock(),e.createBlock(Sl,{key:0,class:"qiu-table__toolbar-dropdown"},{dropdown:e.withCtx(()=>[e.createVNode(vo,null,{default:e.withCtx(()=>[e.createVNode(Yn,{onClick:g[2]||(g[2]=O=>Qn("vertical"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("纵向复制")),1)]),_:1}),e.createVNode(Yn,{onClick:g[3]||(g[3]=O=>Qn("horizontal"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("横向复制")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"qiu-table__toolbar-icon",title:e.unref(Xe)("复制")},[e.createVNode(q,{icon:"file-copy-line"})],8,$p)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(io("center"),O=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.component),e.mergeProps({key:O.name},{ref_for:!0},O.props),null,16))),128))]),e.createElementVNode("div",Ep,[e.renderSlot(s.$slots,"toolbar-tools"),e.renderSlot(s.$slots,"toolbar-right"),e.unref(ao)==="right"?(e.openBlock(),e.createElementBlock("div",Sp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Hl),O=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:O.name},[O.show?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-table__toolbar-icon",title:O.title,onClick:O.onClick},[e.createVNode(q,{icon:O.icon},null,8,["icon"])],8,Mp)):e.createCommentVNode("",!0)],64))),128)),e.unref(kn)?(e.openBlock(),e.createBlock(Sl,{key:0,class:"qiu-table__toolbar-dropdown"},{dropdown:e.withCtx(()=>[e.createVNode(vo,null,{default:e.withCtx(()=>[e.createVNode(Yn,{onClick:g[4]||(g[4]=O=>Qn("vertical"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("纵向复制")),1)]),_:1}),e.createVNode(Yn,{onClick:g[5]||(g[5]=O=>Qn("horizontal"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("横向复制")),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("button",{type:"button",class:"qiu-table__toolbar-icon",title:e.unref(Xe)("复制")},[e.createVNode(q,{icon:"file-copy-line"})],8,qp)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(io("right"),O=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O.component),e.mergeProps({key:O.name},{ref_for:!0},O.props),null,16))),128))])])):e.createCommentVNode("",!0),e.unref(oe)?(e.openBlock(),e.createElementBlock("div",zp,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(nl),O=>(e.openBlock(),e.createElementBlock("label",{key:O._key,class:"qiu-table__custom-item"},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(re)[O._key]!==!1,onChange:ae=>Pi(O._key,ae.target.checked)},null,40,Tp),e.createElementVNode("span",null,e.toDisplayString(O.label||O._key),1)]))),128))])):e.createCommentVNode("",!0),e.createVNode(ee,{modelValue:e.unref(H),"onUpdate:modelValue":g[12]||(g[12]=O=>e.isRef(H)?H.value=O:null),title:e.unref(Xe)("导出数据"),width:"480px","align-center":"","show-minimize":!1,"show-fullscreen":!1},{footer:e.withCtx(()=>[e.createVNode(j,{onClick:g[11]||(g[11]=O=>H.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("取消")),1)]),_:1}),e.createVNode(j,{type:"primary",disabled:!e.unref(Z).length,onClick:An},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("下载")),1)]),_:1},8,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",Ip,[e.createElementVNode("div",Dp,[e.createElementVNode("div",Rp,e.toDisplayString(e.unref(Xe)("导出字段")),1),e.createElementVNode("div",Lp,[e.createElementVNode("label",Pp,[e.createElementVNode("input",{type:"checkbox",checked:e.unref(Fa),".indeterminate":e.unref(rr),onChange:g[6]||(g[6]=O=>cr(O.target.checked))},null,40,Op),e.createElementVNode("span",null,e.toDisplayString(e.unref(Xe)("全选")),1)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Fn),O=>(e.openBlock(),e.createElementBlock("label",{key:O._key,class:"qiu-table__export-field"},[e.createElementVNode("input",{type:"checkbox",checked:e.unref(Z).includes(O._key),onChange:ae=>sr(O._key,ae.target.checked)},null,40,jp),e.createElementVNode("span",null,e.toDisplayString(O.label||e.unref(Hn)(O)||O._key),1)]))),128))])]),e.createElementVNode("div",Fp,[e.createElementVNode("div",Ap,e.toDisplayString(e.unref(Xe)("文件格式")),1),e.createElementVNode("div",Qp,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(se,O=>e.createElementVNode("label",{key:O.value,class:e.normalizeClass(["qiu-table__export-format",{"is-active":e.unref(Ve)===O.value}])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[7]||(g[7]=ae=>e.isRef(Ve)?Ve.value=ae:null),type:"radio",value:O.value},null,8,Up),[[e.vModelRadio,e.unref(Ve)]]),e.createElementVNode("span",null,e.toDisplayString(O.label),1)],2)),64))])]),e.createElementVNode("div",Wp,[e.createElementVNode("div",Hp,e.toDisplayString(e.unref(Xe)("导出范围")),1),e.createElementVNode("div",Yp,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(te,O=>e.createElementVNode("label",{key:O.value,class:e.normalizeClass(["qiu-table__export-mode",{"is-active":e.unref(z)===O.value}])},[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[8]||(g[8]=ae=>e.isRef(z)?z.value=ae:null),type:"radio",value:O.value},null,8,Kp),[[e.vModelRadio,e.unref(z)]]),e.createElementVNode("span",null,e.toDisplayString(O.label),1)],2)),64))]),e.unref(z)==="range"?(e.openBlock(),e.createElementBlock("div",vp,[e.createElementVNode("span",null,e.toDisplayString(e.unref(Xe)("页码")),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[9]||(g[9]=O=>e.isRef(fe)?fe.value=O:null),type:"number",min:1,max:e.unref(Mn),class:"qiu-table__export-range-input"},null,8,Xp),[[e.vModelText,e.unref(fe),void 0,{number:!0}]]),g[20]||(g[20]=e.createElementVNode("span",null,"-",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":g[10]||(g[10]=O=>e.isRef(he)?he.value=O:null),type:"number",min:e.unref(fe),max:e.unref(Mn),class:"qiu-table__export-range-input"},null,8,Gp),[[e.vModelText,e.unref(he),void 0,{number:!0}]]),e.createElementVNode("span",null,e.toDisplayString(e.unref(Xe)("(共"))+" "+e.toDisplayString(e.unref(Mn))+" "+e.toDisplayString(e.unref(Xe)("页)")),1)])):e.createCommentVNode("",!0)])])]),_:1},8,["modelValue","title"]),e.createElementVNode("input",{ref_key:"importInputRef",ref:Ne,type:"file",accept:".csv,.xls,.xlsx,text/csv,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",class:"qiu-table__import-input",onChange:dr},null,544),e.createElementVNode("div",{class:"qiu-table__main",style:e.normalizeStyle(e.unref(Ai))},[t.loading?(e.openBlock(),e.createBlock(pa,{key:0,class:"qiu-table__loading",text:t.loadingText||`${e.unref(Xe)("加载中")}...`,effect:t.loadingEffect,transparent:t.loadingTransparent},null,8,["text","effect","transparent"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"headerWrapRef",ref:u,class:"qiu-table__header-wrap"},[e.createElementVNode("table",{class:"qiu-table__inner qiu-table__header-table",style:e.normalizeStyle(e.unref(Pt))},[e.createElementVNode("colgroup",null,[e.unref(jt)?(e.openBlock(),e.createElementBlock("col",Jp)):e.createCommentVNode("",!0),e.unref(Yt)?(e.openBlock(),e.createElementBlock("col",Zp)):e.createCommentVNode("",!0),e.unref(Kt)?(e.openBlock(),e.createElementBlock("col",e1)):e.createCommentVNode("",!0),e.unref(Xt)?(e.openBlock(),e.createElementBlock("col",t1)):e.createCommentVNode("",!0),e.unref(Gt)&&e.unref(Qt).left>0?(e.openBlock(),e.createElementBlock("col",{key:4,style:e.normalizeStyle({width:`${e.unref(Qt).left}px`})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ro),O=>(e.openBlock(),e.createElementBlock("col",{key:`hcol-${O._key}`,style:e.normalizeStyle(jn(O))},null,4))),128)),e.unref(Gt)&&e.unref(Qt).right>0?(e.openBlock(),e.createElementBlock("col",{key:5,style:e.normalizeStyle({width:`${e.unref(Qt).right}px`})},null,4)):e.createCommentVNode("",!0)]),e.createElementVNode("thead",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Xn),(O,ae)=>(e.openBlock(),e.createElementBlock("tr",{key:`hr-${ae}`},[e.unref(jt)&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:0,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--header qiu-table__cell--expand qiu-table__cell--fixed-left",sn("expand")]),style:{left:"0px"},rowspan:e.unref(Xn).length},null,10,n1)):e.createCommentVNode("",!0),e.unref(Yt)&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:1,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--header qiu-table__cell--radio qiu-table__cell--fixed-left",sn("radio")]),style:e.normalizeStyle({left:`${cn("radio")}px`}),rowspan:e.unref(Xn).length},null,14,o1)):e.createCommentVNode("",!0),e.unref(Kt)&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:2,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--header qiu-table__cell--selection qiu-table__cell--fixed-left",sn("selection")]),style:e.normalizeStyle({left:`${cn("selection")}px`}),rowspan:e.unref(Xn).length},[e.createVNode(Bo,{"model-value":e.unref(Gi),indeterminate:e.unref(Io),onChange:g[13]||(g[13]=ce=>Ji(!!ce))},null,8,["model-value","indeterminate"])],14,l1)):e.createCommentVNode("",!0),e.unref(Xt)&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:3,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--header qiu-table__cell--index qiu-table__cell--fixed-left",sn("index")]),style:e.normalizeStyle({left:`${cn("index")}px`}),rowspan:e.unref(Xn).length},e.toDisplayString(e.unref(Xe)("序号")),15,a1)):e.createCommentVNode("",!0),e.unref(Gt)&&e.unref(Qt).left>0&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:4,rowspan:e.unref(Xn).length,class:"qiu-table__cell qiu-table__cell--header"},null,8,i1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O,(ce,at)=>(e.openBlock(),e.createElementBlock("th",{key:`th-${ae}-${at}-${ce.column._key}`,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--header",[ce.column.className,ce.column.headerClassName,ce.column.headerAlign?`is-align-${ce.column.headerAlign}`:`is-align-${ce.column.align||t.headerAlign||t.align||"left"}`,{"qiu-table__cell--sortable":ce.isLeaf&&!!ce.column.sortable,"qiu-table__cell--col-drag":ce.isLeaf&&e.unref(Ll),...ce.isLeaf?Wl(ce.column):{}}]]),colspan:ce.colspan,rowspan:ce.rowspan,style:e.normalizeStyle(ar(ce)),"data-col-key":ce.isLeaf?ce.column._key:void 0,onClick:Fe=>ce.isLeaf&&Zi(ce.column,Fe)},[e.createElementVNode("div",c1,[ce.isLeaf&&e.unref(ft)()&&e.unref(dt)(ce.column)?(e.openBlock(),e.createBlock(q,{key:0,icon:"edit-line",class:"qiu-table__edit-icon",title:"edit"})):e.createCommentVNode("",!0),e.createElementVNode("span",s1,e.toDisplayString(ce.label),1),ce.isLeaf&&ce.column.sortable?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["qiu-table__sort",Al(ce.column)])},[g[21]||(g[21]=e.createElementVNode("i",{class:"qiu-table__caret qiu-table__caret--up"},null,-1)),g[22]||(g[22]=e.createElementVNode("i",{class:"qiu-table__caret qiu-table__caret--down"},null,-1)),La(ce.column)?(e.openBlock(),e.createElementBlock("em",d1,e.toDisplayString(La(ce.column)),1)):e.createCommentVNode("",!0)],2)):e.createCommentVNode("",!0),ce.isLeaf&&jl(ce.column)?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:e.normalizeClass(["qiu-table__filter-btn",{"is-active":Wi(ce.column)||e.unref(S)===ce.column._key}]),onClick:e.withModifiers(Fe=>xn(ce.column,Fe),["stop"])},[...g[23]||(g[23]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",width:"12",height:"12"},[e.createElementVNode("path",{fill:"currentColor",d:"M128 192h768l-288 352v256l-192 64V544L128 192z"})],-1)])],10,m1)):e.createCommentVNode("",!0),ce.isLeaf&&tr(ce.column)?(e.openBlock(),e.createElementBlock("span",{key:3,class:"qiu-table__resizer",onMousedown:Fe=>Ql(ce.column,Fe)},null,40,u1)):e.createCommentVNode("",!0)])],14,r1))),128)),e.unref(Gt)&&e.unref(Qt).right>0&&ae===0?(e.openBlock(),e.createElementBlock("th",{key:5,rowspan:e.unref(Xn).length,class:"qiu-table__cell qiu-table__cell--header"},null,8,f1)):e.createCommentVNode("",!0)]))),128))])],4)],512),e.createElementVNode("div",{ref_key:"bodyWrapRef",ref:h,class:"qiu-table__body-wrap",onScroll:Da,onContextmenu:e.withModifiers(fr,["prevent"])},[e.createElementVNode("table",{ref_key:"tableRef",ref:d,class:"qiu-table__inner qiu-table__body-table",style:e.normalizeStyle(e.unref(Pt))},[e.createElementVNode("colgroup",null,[e.unref(jt)?(e.openBlock(),e.createElementBlock("col",p1)):e.createCommentVNode("",!0),e.unref(Yt)?(e.openBlock(),e.createElementBlock("col",h1)):e.createCommentVNode("",!0),e.unref(Kt)?(e.openBlock(),e.createElementBlock("col",g1)):e.createCommentVNode("",!0),e.unref(Xt)?(e.openBlock(),e.createElementBlock("col",_1)):e.createCommentVNode("",!0),e.unref(Gt)&&e.unref(Qt).left>0?(e.openBlock(),e.createElementBlock("col",{key:4,style:e.normalizeStyle({width:`${e.unref(Qt).left}px`})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ro),O=>(e.openBlock(),e.createElementBlock("col",{key:`bcol-${O._key}`,style:e.normalizeStyle(jn(O))},null,4))),128)),e.unref(Gt)&&e.unref(Qt).right>0?(e.openBlock(),e.createElementBlock("col",{key:5,style:e.normalizeStyle({width:`${e.unref(Qt).right}px`})},null,4)):e.createCommentVNode("",!0)]),e.createElementVNode("tbody",{ref_key:"tbodyRef",ref:f,class:"qiu-table__body"},[e.unref(il)&&e.unref(uo).padTop>0?(e.openBlock(),e.createElementBlock("tr",b1,[e.createElementVNode("td",{colspan:e.unref(co)},[e.createElementVNode("div",{class:"qiu-table__virtual-pad-space",style:e.normalizeStyle({height:`${e.unref(uo).padTop}px`})},null,4)],8,y1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ia),O=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:Qe(O.flat.row)||O.flat.flatIndex},[e.createElementVNode("tr",{class:e.normalizeClass(["qiu-table__row",[{"qiu-table__row--striped":t.stripe&&O.flat.flatIndex%2===1,"is-selected":go(O.flat.row),"is-current":e.unref(U)===Qe(O.flat.row),"is-radio-checked":e.unref(G)(O.flat.row),"is-dirty":e.unref(we)&&e.unref(We)(O.flat.row)},pr(O.flat.row,O.rowIndex)]]),"data-row-key":Qe(O.flat.row),onClick:ae=>sl(O.flat.row)},[e.unref(jt)?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--expand qiu-table__cell--fixed-left",sn("expand")]),style:{left:"0px"},onClick:e.withModifiers(ae=>J(O.flat.row),["stop"])},[e.createElementVNode("div",x1,[e.createElementVNode("button",V1,[e.createVNode(q,{icon:e.unref(Bt)(O.flat.row)?"arrow-down-s-fill":"arrow-right-s-fill"},null,8,["icon"])])])],10,w1)):e.createCommentVNode("",!0),e.unref(Yt)?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--radio qiu-table__cell--fixed-left",sn("radio")]),style:e.normalizeStyle({left:`${cn("radio")}px`}),onClick:e.withModifiers(ae=>Ye(O.flat.row),["stop"])},[e.createElementVNode("div",N1,[e.createElementVNode("input",{type:"radio",class:"qiu-table__radio",checked:e.unref(G)(O.flat.row),name:x,onChange:ae=>Ye(O.flat.row)},null,40,B1)])],14,C1)):e.createCommentVNode("",!0),e.unref(Kt)?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--selection qiu-table__cell--fixed-left",sn("selection")]),style:e.normalizeStyle({left:`${cn("selection")}px`}),onClick:g[14]||(g[14]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",$1,[e.createVNode(Bo,{"model-value":go(O.flat.row),onChange:ae=>Jt(O.flat.row,!!ae)},null,8,["model-value","onChange"])])],6)):e.createCommentVNode("",!0),e.unref(Xt)?(e.openBlock(),e.createElementBlock("td",{key:3,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--index qiu-table__cell--fixed-left",sn("index")]),style:e.normalizeStyle({left:`${cn("index")}px`})},[e.createElementVNode("div",E1,e.toDisplayString(O.flat.flatIndex+1),1)],6)):e.createCommentVNode("",!0),e.unref(Gt)&&e.unref(Qt).left>0?(e.openBlock(),e.createElementBlock("td",S1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ro),(ae,ce)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:`td-${ae._key}-${Qe(O.flat.row)}`},[dl(O.flat,O.rowIndex,ae,zo(ae)).visible?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["qiu-table__cell",[ae.className,hr(O.flat.row,ae,O.rowIndex,zo(ae)),`is-align-${ae.align||t.align||"left"}`,{"qiu-table__cell--ellipsis":It(ae),"is-editing":e.unref(Ot)(O.flat.row,ae),"is-input-fill":e.unref(ut)(O.flat.row,ae),"is-editable":e.unref(dt)(ae),"is-valid-error":!!el(O.flat.row,ae),"is-active-cell":e.unref(Re)(O.flat.row,ae),"is-area-cell":e.unref($t)(O.flat.row,ae),...Wl(ae)}]]),style:e.normalizeStyle(ja(ae)),title:el(O.flat.row,ae)||void 0,rowspan:dl(O.flat,O.rowIndex,ae,zo(ae)).rowspan,colspan:dl(O.flat,O.rowIndex,ae,zo(ae)).colspan,onClick:at=>ho(O.flat.row,ae,at),onDblclick:at=>Ra(O.flat.row,ae)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-table__cell-inner",{"qiu-table__cell-inner--input-fill":e.unref(ut)(O.flat.row,ae)}])},[ae.dragSort?(e.openBlock(),e.createElementBlock("span",q1,[e.createVNode(q,{icon:"drag-move-2-line"})])):t.tree&&ae.treeNode?(e.openBlock(),e.createElementBlock("span",{key:1,class:"qiu-table__tree-cell",style:e.normalizeStyle({paddingLeft:`${O.flat.level*18}px`})},[O.flat.hasChildren?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-table__tree-toggle",onClick:e.withModifiers(at=>za(O.flat.row),["stop"])},[e.createVNode(q,{icon:O.flat.expanded?"arrow-down-s-fill":"arrow-right-s-fill"},null,8,["icon"])],8,z1)):(e.openBlock(),e.createElementBlock("span",T1)),e.createVNode(e.unref(Ya),{row:O.flat.row,col:ae,index:O.flat.flatIndex},null,8,["row","col","index"])],4)):ae.slot&&s.$slots[ae.slot]?e.renderSlot(s.$slots,ae.slot,e.mergeProps({ref_for:!0},Fl(O.flat.row,ae,O.flat.flatIndex,O.flat.level)),void 0,void 0,2):ae._defaultSlot?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(ae._defaultSlot),e.mergeProps({key:3,ref_for:!0},Fl(O.flat.row,ae,O.flat.flatIndex,O.flat.level)),null,16)):(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(["qiu-table__editor-host",{"qiu-table__editor-host--input-fill":e.unref(ut)(O.flat.row,ae)}])},[e.createVNode(e.unref(Ya),{row:O.flat.row,col:ae,index:O.flat.flatIndex},null,8,["row","col","index"])],2))],2)],46,M1)):e.createCommentVNode("",!0)],64))),128)),e.unref(Gt)&&e.unref(Qt).right>0?(e.openBlock(),e.createElementBlock("td",I1)):e.createCommentVNode("",!0)],10,k1),e.unref(jt)&&e.unref(Bt)(O.flat.row)?(e.openBlock(),e.createElementBlock("tr",D1,[e.createElementVNode("td",{colspan:e.unref(co),class:"qiu-table__cell qiu-table__cell--expand-content"},[e.createElementVNode("div",L1,[e.renderSlot(s.$slots,"expand",{row:O.flat.row,$index:O.flat.flatIndex},()=>[e.createElementVNode("pre",P1,e.toDisplayString(JSON.stringify(O.flat.row,null,2)),1)])])],8,R1)])):e.createCommentVNode("",!0)],64))),128)),e.unref(il)&&e.unref(uo).padBottom>0?(e.openBlock(),e.createElementBlock("tr",O1,[e.createElementVNode("td",{colspan:e.unref(co)},[e.createElementVNode("div",{class:"qiu-table__virtual-pad-space",style:e.normalizeStyle({height:`${e.unref(uo).padBottom}px`})},null,4)],8,j1)])):e.createCommentVNode("",!0),e.unref(Zt).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",F1,[e.createElementVNode("td",{class:"qiu-table__cell qiu-table__cell--empty",colspan:e.unref(co)},[e.renderSlot(s.$slots,"empty",{},()=>[e.createTextVNode(e.toDisplayString(t.emptyText||e.unref(Xe)("暂无数据")),1)])],8,A1)]))],512)],4)],544),t.showFooter&&e.unref(rl).length?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"footerWrapRef",ref:p,class:"qiu-table__footer-wrap"},[e.createElementVNode("table",{class:"qiu-table__inner qiu-table__footer-table",style:e.normalizeStyle(e.unref(Pt))},[e.createElementVNode("colgroup",null,[e.unref(jt)?(e.openBlock(),e.createElementBlock("col",Q1)):e.createCommentVNode("",!0),e.unref(Yt)?(e.openBlock(),e.createElementBlock("col",U1)):e.createCommentVNode("",!0),e.unref(Kt)?(e.openBlock(),e.createElementBlock("col",W1)):e.createCommentVNode("",!0),e.unref(Xt)?(e.openBlock(),e.createElementBlock("col",H1)):e.createCommentVNode("",!0),e.unref(Gt)&&e.unref(Qt).left>0?(e.openBlock(),e.createElementBlock("col",{key:4,style:e.normalizeStyle({width:`${e.unref(Qt).left}px`})},null,4)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ro),O=>(e.openBlock(),e.createElementBlock("col",{key:`fcol-${O._key}`,style:e.normalizeStyle(jn(O))},null,4))),128)),e.unref(Gt)&&e.unref(Qt).right>0?(e.openBlock(),e.createElementBlock("col",{key:5,style:e.normalizeStyle({width:`${e.unref(Qt).right}px`})},null,4)):e.createCommentVNode("",!0)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(rl),(O,ae)=>(e.openBlock(),e.createElementBlock("tr",{key:`fr-${ae}`,class:"qiu-table__row"},[e.unref(jt)?(e.openBlock(),e.createElementBlock("td",{key:0,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--footer qiu-table__cell--fixed-left",sn("expand")]),style:{left:"0px"}},[...g[24]||(g[24]=[e.createElementVNode("div",{class:"qiu-table__cell-inner"},null,-1)])],2)):e.createCommentVNode("",!0),e.unref(Yt)?(e.openBlock(),e.createElementBlock("td",{key:1,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--footer qiu-table__cell--fixed-left",sn("radio")]),style:e.normalizeStyle({left:`${cn("radio")}px`})},[...g[25]||(g[25]=[e.createElementVNode("div",{class:"qiu-table__cell-inner"},null,-1)])],6)):e.createCommentVNode("",!0),e.unref(Kt)?(e.openBlock(),e.createElementBlock("td",{key:2,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--footer qiu-table__cell--selection qiu-table__cell--fixed-left",sn("selection")]),style:e.normalizeStyle({left:`${cn("selection")}px`})},[...g[26]||(g[26]=[e.createElementVNode("div",{class:"qiu-table__cell-inner"},null,-1)])],6)):e.createCommentVNode("",!0),e.unref(Xt)?(e.openBlock(),e.createElementBlock("td",{key:3,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--footer qiu-table__cell--index qiu-table__cell--fixed-left",sn("index")]),style:e.normalizeStyle({left:`${cn("index")}px`})},[...g[27]||(g[27]=[e.createElementVNode("div",{class:"qiu-table__cell-inner"},null,-1)])],6)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O,(ce,at)=>{var Fe,Dt,vt;return e.openBlock(),e.createElementBlock("td",{key:`fd-${ae}-${at}`,class:e.normalizeClass(["qiu-table__cell qiu-table__cell--footer",[`is-align-${((Fe=e.unref(mt)[at])==null?void 0:Fe.footerAlign)||((Dt=e.unref(mt)[at])==null?void 0:Dt.align)||t.footerAlign||t.align||"left"}`,(vt=e.unref(mt)[at])==null?void 0:vt.footerClassName,Wl(e.unref(mt)[at])]]),style:e.normalizeStyle(ja(e.unref(mt)[at]))},[e.createElementVNode("div",Y1,e.toDisplayString(ce),1)],6)}),128))]))),128))])],4)],512)):e.createCommentVNode("",!0)],4),e.unref(Sa)?(e.openBlock(),e.createElementBlock("div",K1,[e.createVNode(Qo,{"current-page":e.unref(T),"onUpdate:currentPage":g[15]||(g[15]=O=>e.isRef(T)?T.value=O:null),"page-size":e.unref(L),"onUpdate:pageSize":g[16]||(g[16]=O=>e.isRef(L)?L.value=O:null),total:e.unref(mo),"page-sizes":((Ce=e.unref(Pn))==null?void 0:Ce.pageSizes)||[10,20,50,100],background:((Ee=e.unref(Pn))==null?void 0:Ee.background)!==!1,small:(Me=e.unref(Pn))==null?void 0:Me.small,layout:"total, sizes, prev, pager, next, jumper",onCurrentChange:_o,onSizeChange:Lo},null,8,["current-page","page-size","total","page-sizes","background","small"])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(S)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-table__filter-mask",onMousedown:Do},null,32)):e.createCommentVNode("",!0),e.unref(S)&&e.unref(N)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"qiu-table__filter-panel",style:e.normalizeStyle({left:`${e.unref(N).left}px`,top:`${e.unref(N).top}px`}),onMousedown:g[18]||(g[18]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",v1,[e.createElementVNode("span",X1,e.toDisplayString(e.unref(Xe)("筛选")),1),e.unref(On).length?(e.openBlock(),e.createElementBlock("div",G1,[e.createVNode(Bo,{"model-value":e.unref(Oa),indeterminate:e.unref(nr),onChange:g[17]||(g[17]=O=>or(!!O))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("全选")),1)]),_:1},8,["model-value","indeterminate"])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",J1,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(On),O=>(e.openBlock(),e.createElementBlock("div",{key:String(O.value),class:"qiu-table__filter-item"},[e.createVNode(Bo,{"model-value":Ro(e.unref(S),O.value),onChange:ae=>Pa(e.unref(S),O.value,!!ae)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(O.text),1)]),_:2},1032,["model-value","onChange"])]))),128)),e.unref(On).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Z1,e.toDisplayString(e.unref(Xe)("无筛选项")),1))]),e.createElementVNode("div",eh,[e.createElementVNode("button",{type:"button",class:"qiu-table__filter-action is-plain",onClick:Ul},e.toDisplayString(e.unref(Xe)("重置")),1),e.createElementVNode("button",{type:"button",class:"qiu-table__filter-action",onClick:lr},e.toDisplayString(e.unref(Xe)("确定")),1)])],36)):e.createCommentVNode("",!0),e.unref($e).visible?(e.openBlock(),e.createElementBlock("div",{key:2,class:"qiu-table__filter-mask",onMousedown:Yl},null,32)):e.createCommentVNode("",!0),e.unref($e).visible?(e.openBlock(),e.createElementBlock("div",{key:3,class:"qiu-table__ctx-menu",style:e.normalizeStyle({left:`${e.unref($e).x}px`,top:`${e.unref($e).y}px`}),onMousedown:g[19]||(g[19]=e.withModifiers(()=>{},["stop"]))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($e).options,(O,ae)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:ae},[ae>0?(e.openBlock(),e.createElementBlock("div",th)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(O,ce=>(e.openBlock(),e.createElementBlock("button",{key:ce.code,type:"button",class:"qiu-table__ctx-item",disabled:ce.disabled,onClick:at=>Kl(ce)},e.toDisplayString(ce.name),9,nh))),128))],64))),128))],36)):e.createCommentVNode("",!0)])),e.renderSlot(s.$slots,"default")],38)}}}),oh=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"})),_a=e.defineComponent({name:"QiuTableColumn",__name:"index",props:{label:{},title:{},prop:{},width:{},minWidth:{},maxWidth:{},fixed:{type:[Boolean,String]},sortable:{type:[Boolean,String]},filterable:{type:Boolean},children:{},aggFunc:{},align:{default:"left"},headerAlign:{},showOverflowTooltip:{type:Boolean,default:!0},resizable:{type:Boolean,default:!0},className:{},headerClassName:{},labelClassName:{},type:{},index:{},columnKey:{},filters:{},filterMethod:{},filteredValue:{},filterPlacement:{},filterMultiple:{type:Boolean},treeNode:{type:Boolean},dragSort:{type:Boolean},editor:{},editorProps:{},options:{},editable:{type:Boolean},formatter:{}},setup(t){const a=t,n=e.useSlots(),o=e.inject(Zr,null),r=Symbol("qiuTableColumn"),c=()=>({id:r,props:{...a},slots:{default:n.default,header:n.header}});return o&&(e.onMounted(()=>{o.register(c())}),e.watch(()=>({...a}),()=>{o.update(c())},{deep:!0}),e.onBeforeUnmount(()=>{o.unregister(r)})),(d,f)=>null}}),lh=Object.freeze(Object.defineProperty({__proto__:null,default:_a},Symbol.toStringTag,{value:"Module"})),ah={class:"qiu-tag__content"},$o=de(e.defineComponent({name:"QiuTag",__name:"index",props:{type:{default:"primary"},effect:{default:"light"},size:{default:"default"},closable:{type:Boolean,default:!1}},emits:["close"],setup(t,{emit:a}){const n=a,o=r=>{r.stopPropagation(),n("close",r)};return(r,c)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["qiu-tag",[`qiu-tag--${t.type}`,`qiu-tag--${t.effect}`,`qiu-tag--${t.size}`,{"is-closable":t.closable}]])},[e.createElementVNode("span",ah,[e.renderSlot(r.$slots,"default",{},void 0,!0)]),t.closable?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-tag__close","aria-label":"close",onClick:o}," × ")):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-f1828e21"]]),ih=Object.freeze(Object.defineProperty({__proto__:null,default:$o},Symbol.toStringTag,{value:"Module"})),rh=["value","placeholder","disabled"],ch={class:"qiu-date__separator"},sh=["value","placeholder","disabled"],dh=["value","placeholder","disabled"],mh={class:"qiu-date-panel__side"},uh={class:"qiu-date-panel__header"},fh={class:"qiu-date-panel__title"},ph={class:"qiu-date-panel__weeks"},hh={class:"qiu-date-panel__grid qiu-date-panel__grid--day"},gh=["disabled","onClick"],_h={class:"qiu-date__solar"},bh={key:1,class:"qiu-date-panel__grid qiu-date-panel__grid--month"},yh=["disabled","onClick"],kh={class:"qiu-date__solar"},wh={key:2,class:"qiu-date-panel__grid qiu-date-panel__grid--year"},xh=["disabled","onClick"],Vh={class:"qiu-date__solar"},Ch={key:0,class:"qiu-date-panel__side"},Nh={class:"qiu-date-panel__header"},Bh={class:"qiu-date-panel__title"},$h={class:"qiu-date-panel__weeks"},Eh={class:"qiu-date-panel__grid qiu-date-panel__grid--day"},Sh=["disabled","onClick"],Mh={class:"qiu-date__solar"},qh={key:1,class:"qiu-date-panel__grid qiu-date-panel__grid--month"},zh=["disabled","onClick"],Th={class:"qiu-date__solar"},Ih={key:2,class:"qiu-date-panel__grid qiu-date-panel__grid--year"},Dh=["disabled","onClick"],Rh={class:"qiu-date__solar"},Lh={key:0,class:"qiu-date-panel__footer"},Ph=["disabled"],uc=e.defineComponent({name:"QiuDate",__name:"index",props:{modelValue:{},showLunar:{type:Boolean,default:!0},type:{default:"date"},placeholder:{},startPlaceholder:{},endPlaceholder:{},format:{},valueFormat:{},disabled:{type:Boolean},clearable:{type:Boolean,default:!0},size:{},editable:{type:Boolean,default:!0},readonly:{type:Boolean},rangeSeparator:{default:"至"},disabledDate:{},shortcuts:{},teleported:{type:Boolean},popperClass:{}},emits:["update:modelValue","change","calendar-change","visible-change","panel-change"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref({}),u=e.ref(new Date().getFullYear()),h=e.ref(new Date().getMonth()),p=e.ref(new Date().getFullYear()),_=e.ref(new Date().getMonth()),B=e.ref(Math.floor(new Date().getFullYear()/10)*10),$=e.ref(Math.floor(new Date().getFullYear()/10)*10+10),b=e.ref(null),C=e.ref(null),k=["日","一","二","三","四","五","六"],M=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],V=e.computed(()=>{const v=n.type||"date";return v==="year"||v==="yearrange"?"year":v==="month"||v==="monthrange"?"month":"date"}),E=e.computed(()=>["daterange","datetimerange","monthrange","yearrange"].includes(n.type||"")),x=v=>{switch(v){case"datetime":case"datetimerange":return{format:"YYYY-MM-DD HH:mm:ss",valueFormat:"YYYY-MM-DD HH:mm:ss"};case"month":case"monthrange":return{format:"YYYY-MM",valueFormat:"YYYY-MM"};case"year":case"yearrange":return{format:"YYYY",valueFormat:"YYYY"};default:return{format:"YYYY-MM-DD",valueFormat:"YYYY-MM-DD"}}},m=e.computed(()=>n.valueFormat||x(n.type||"date").valueFormat),w=e.computed(()=>n.format||x(n.type||"date").format),S=e.computed(()=>V.value==="year"?"开始年份":V.value==="month"?"开始月份":"开始日期"),N=e.computed(()=>V.value==="year"?"结束年份":V.value==="month"?"结束月份":"结束日期"),D=e.computed(()=>V.value==="year"?"选择年份":V.value==="month"?"选择月份":"选择日期"),T=v=>String(v).padStart(2,"0"),L=(v,xe)=>v?xe.replace("YYYY",String(v.getFullYear())).replace("MM",T(v.getMonth()+1)).replace("DD",T(v.getDate())):"",U=v=>{if(!v&&v!==0)return null;if(v instanceof Date)return Number.isNaN(v.getTime())?null:v;const xe=String(v).trim();if(!xe)return null;let Le=xe.match(/^(\d{4})-(\d{2})-(\d{2})/);return Le?new Date(Number(Le[1]),Number(Le[2])-1,Number(Le[3])):(Le=xe.match(/^(\d{4})-(\d{2})$/),Le?new Date(Number(Le[1]),Number(Le[2])-1,1):(Le=xe.match(/^(\d{4})$/),Le?new Date(Number(Le[1]),0,1):null))},oe=v=>Array.isArray(v)?[U(v[0]),U(v[1])]:[null,null],H=v=>L(v,m.value),Ve=v=>new Date(v.getFullYear(),v.getMonth(),v.getDate()),Z=v=>new Date(v.getFullYear(),v.getMonth(),1),z=v=>new Date(v.getFullYear(),0,1),fe=v=>V.value==="year"?z(v):V.value==="month"?Z(v):Ve(v),he=v=>fe(v).getTime(),se=(v,xe)=>!!v&&!!xe&&he(v)===he(xe),te=(v,xe)=>{const Le=new Date(v.getFullYear(),v.getMonth()+xe,1);if(V.value==="date"){const be=v.getDate(),ft=new Date(Le.getFullYear(),Le.getMonth()+1,0).getDate();Le.setDate(Math.min(be,ft))}return fe(Le)},re=(v,xe)=>{const Le=new Date(v);return Le.setFullYear(v.getFullYear()+xe),fe(Le)},Ne=v=>V.value==="year"?re(v,1):te(v,1),De=v=>V.value==="year"?re(v,-1):te(v,-1),$e=e.computed(()=>E.value?null:U(n.modelValue)),Ge=e.computed(()=>E.value?oe(n.modelValue):[null,null]),st=e.computed(()=>d.value&&E.value?b.value:Ge.value[0]),ht=e.computed(()=>d.value&&E.value?C.value:Ge.value[1]),He=e.computed(()=>L($e.value,w.value)),ct=e.computed(()=>L(d.value?b.value:Ge.value[0],w.value)),Q=e.computed(()=>L(d.value?C.value:Ge.value[1],w.value)),F=e.computed(()=>E.value?!!(Ge.value[0]||Ge.value[1]):!!$e.value),Be=e.computed(()=>!!(b.value&&C.value)),qe=e.computed(()=>V.value==="year"?`${B.value}年 - ${B.value+9}年`:V.value==="month"?`${u.value}年`:`${u.value}年 ${h.value+1}月`),K=e.computed(()=>V.value==="year"?`${$.value}年 - ${$.value+9}年`:V.value==="month"?`${p.value}年`:`${p.value}年 ${_.value+1}月`),X=new Map,le=v=>{try{const xe=`${v.getFullYear()}-${v.getMonth()+1}-${v.getDate()}`;if(X.has(xe))return X.get(xe);const Le=ad.Solar.fromYmd(v.getFullYear(),v.getMonth()+1,v.getDate()),be=Le.getLunar(),ft=[...be.getFestivals(),...Le.getFestivals()],zt=be.getJieQi();let Tt=be.getDayInChinese(),gt="";ft.length?(gt=ft[0],Tt=gt):zt?(gt=zt,Tt=zt):be.getDay()===1&&(Tt=be.getMonthInChinese()+"月");const En={label:Tt,festival:gt||void 0};return X.set(xe,En),En}catch{return{label:""}}},ye=v=>{const xe=new Date;return v.getFullYear()===xe.getFullYear()&&v.getMonth()===xe.getMonth()&&v.getDate()===xe.getDate()},Pe=(v,xe,Le)=>{if(!xe||!Le)return!1;const be=he(v),ft=he(xe),zt=he(Le),Tt=Math.min(ft,zt),gt=Math.max(ft,zt);return be>=Tt&&be<=gt},Qe=v=>{const xe=E.value?st.value:null,Le=E.value?ht.value:null;return E.value?se(v,xe)&&se(v,Le)?"start-date end-date":se(v,xe)?"start-date":se(v,Le)?"end-date":Pe(v,xe,Le)?"in-range":"":""},Bt=(v,xe)=>{const be=new Date(v,xe,1).getDay(),ft=new Date(v,xe+1,0).getDate(),zt=[],Tt=(gt,En)=>{var Dn;const dn=((Dn=n.disabledDate)==null?void 0:Dn.call(n,gt))??!1,no=E.value?se(gt,st.value)||se(gt,ht.value):se(gt,$e.value);zt.push({key:`${gt.getFullYear()}-${gt.getMonth()}-${gt.getDate()}`,date:fe(gt),day:gt.getDate(),label:String(gt.getDate()),inMonth:En,disabled:dn,selected:no,rangeState:Qe(gt),isToday:ye(gt),lunar:le(gt)})};for(let gt=0;gt<be;gt++)Tt(new Date(v,xe,-be+gt+1),!1);for(let gt=1;gt<=ft;gt++)Tt(new Date(v,xe,gt),!0);for(;zt.length%7!==0;){const gt=zt[zt.length-1].date;Tt(new Date(gt.getFullYear(),gt.getMonth(),gt.getDate()+1),!1)}return zt},wt=v=>M.map((xe,Le)=>{var Tt;const be=new Date(v,Le,1),ft=((Tt=n.disabledDate)==null?void 0:Tt.call(n,be))??!1,zt=E.value?se(be,st.value)||se(be,ht.value):se(be,$e.value);return{key:`${v}-${Le}`,date:fe(be),label:xe,day:Le+1,inMonth:!0,disabled:ft,selected:zt,rangeState:Qe(be),isToday:!1,lunar:{label:""}}}),xt=v=>Array.from({length:10},(xe,Le)=>{var gt;const be=v+Le,ft=new Date(be,0,1),zt=((gt=n.disabledDate)==null?void 0:gt.call(n,ft))??!1,Tt=E.value?se(ft,st.value)||se(ft,ht.value):se(ft,$e.value);return{key:`y-${be}`,date:fe(ft),label:String(be),day:be,inMonth:!0,disabled:zt,selected:Tt,rangeState:Qe(ft),isToday:!1,lunar:{label:""}}}),pt=e.computed(()=>Bt(u.value,h.value)),J=e.computed(()=>Bt(p.value,_.value)),G=e.computed(()=>wt(u.value)),me=e.computed(()=>wt(p.value)),pe=e.computed(()=>xt(B.value)),ze=e.computed(()=>xt($.value)),we=v=>{const xe=String(v.rangeState||"");return{"is-other-month":!v.inMonth,"is-disabled":v.disabled,"is-selected":v.selected,"is-today":v.isToday,"in-range":xe.includes("in-range"),"start-date":xe.includes("start-date"),"end-date":xe.includes("end-date")}},Se=()=>{if(V.value==="date"){let v=u.value,xe=h.value+1;xe>11&&(xe=0,v+=1),p.value=v,_.value=xe}else V.value==="month"?p.value=u.value+1:$.value=B.value+10},We=v=>{u.value=v.getFullYear(),h.value=v.getMonth(),B.value=Math.floor(v.getFullYear()/10)*10},Je=v=>{p.value=v.getFullYear(),_.value=v.getMonth(),$.value=Math.floor(v.getFullYear()/10)*10},Ze=()=>{const v=r.value,xe=c.value;if(!v)return;const Le=v.getBoundingClientRect(),be=(xe==null?void 0:xe.offsetWidth)||(E.value?640:322),ft=(xe==null?void 0:xe.offsetHeight)||360;let zt=Le.bottom+4,Tt=Le.left;Tt+be>window.innerWidth-8&&(Tt=Math.max(8,window.innerWidth-be-8)),zt+ft>window.innerHeight-8&&(zt=Math.max(8,Le.top-ft-4)),f.value={position:"fixed",top:`${Math.max(8,zt)}px`,left:`${Math.max(8,Tt)}px`,zIndex:"4000"}},tt=async()=>{if(!n.disabled){if(Ze(),d.value=!0,o("visible-change",!0),E.value){const[v,xe]=Ge.value;b.value=v?fe(v):null,C.value=xe?fe(xe):null;const Le=b.value||new Date,be=C.value||Ne(fe(Le));if(We(Le),Je(be),V.value==="date"){const ft=u.value*12+h.value;p.value*12+_.value<=ft&&Se()}else V.value==="month"?p.value<=u.value&&(p.value=u.value+1):$.value<=B.value&&($.value=B.value+10)}else{const v=$e.value||new Date;We(v)}await e.nextTick(),requestAnimationFrame(()=>{Ze(),requestAnimationFrame(()=>Ze())}),o("panel-change",[u.value,h.value])}},Ye=()=>{d.value&&(d.value=!1,b.value=null,C.value=null,o("visible-change",!1))},rt=()=>{d.value?Ye():tt()},ot=v=>{if(V.value==="date"){let xe=h.value+v,Le=u.value;xe<0?(xe=11,Le-=1):xe>11&&(xe=0,Le+=1),u.value=Le,h.value=xe}else V.value==="month"?u.value+=v:B.value+=v*10;o("panel-change",[u.value,h.value])},Mt=v=>{if(V.value==="date"){let xe=_.value+v,Le=p.value;xe<0?(xe=11,Le-=1):xe>11&&(xe=0,Le+=1),p.value=Le,_.value=xe}else V.value==="month"?p.value+=v:$.value+=v*10;o("panel-change",[p.value,_.value])},lt=v=>{o("update:modelValue",v),o("change",v),o("calendar-change",v)},dt=(v,xe)=>{if(xe.disabled)return;const Le=fe(xe.date);if(!E.value){lt(H(Le)),Ye();return}v==="start"?(b.value=Le,C.value&&he(Le)>he(C.value)&&(C.value=Ne(Le),Je(C.value))):(C.value=Le,b.value&&he(Le)<he(b.value)&&(b.value=De(Le),We(b.value)))},yt=()=>{if(!b.value||!C.value)return;let v=b.value,xe=C.value;he(v)>he(xe)&&(xe=Ne(v)),lt([H(v),H(xe)]),Ye()},Ot=()=>{b.value=null,C.value=null,lt([]),Ye()},ut=()=>{lt(E.value?[]:"")},$n=v=>{var Le,be;if(!d.value)return;const xe=v.target;(Le=r.value)!=null&&Le.contains(xe)||(be=c.value)!=null&&be.contains(xe)||Ye()};return e.watch(d,v=>{v?(document.addEventListener("click",$n,!0),window.addEventListener("scroll",Ze,!0),window.addEventListener("resize",Ze)):(document.removeEventListener("click",$n,!0),window.removeEventListener("scroll",Ze,!0),window.removeEventListener("resize",Ze))}),e.onBeforeUnmount(()=>{document.removeEventListener("click",$n,!0),window.removeEventListener("scroll",Ze,!0),window.removeEventListener("resize",Ze)}),(v,xe)=>{const Le=_t;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["qiu-date",[`qiu-date--${t.type}`,{"is-disabled":t.disabled,"is-focused":e.unref(d)}]])},[e.createElementVNode("div",{class:"qiu-date__editor",onClick:rt},[e.unref(E)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("input",{class:"qiu-date__input",value:e.unref(ct),placeholder:t.startPlaceholder||e.unref(S),readonly:"",disabled:t.disabled},null,8,rh),e.createElementVNode("span",ch,e.toDisplayString(t.rangeSeparator),1),e.createElementVNode("input",{class:"qiu-date__input",value:e.unref(Q),placeholder:t.endPlaceholder||e.unref(N),readonly:"",disabled:t.disabled},null,8,sh)],64)):(e.openBlock(),e.createElementBlock("input",{key:1,class:"qiu-date__input qiu-date__input--single",value:e.unref(He),placeholder:t.placeholder||e.unref(D),readonly:"",disabled:t.disabled},null,8,dh)),t.clearable&&e.unref(F)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"qiu-date__clear",onClick:e.withModifiers(ut,["stop"])}," × ")):e.createCommentVNode("",!0),e.createVNode(Le,{icon:"calendar-line",class:"qiu-date__icon"})]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-date-fade"},{default:e.withCtx(()=>[e.unref(d)?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:c,class:e.normalizeClass(["qiu-date-panel",[t.popperClass,{"qiu-date-panel--lunar":t.showLunar&&e.unref(V)==="date","qiu-date-panel--range":e.unref(E),[`qiu-date-panel--${e.unref(V)}`]:!0}]]),style:e.normalizeStyle(e.unref(f)),onMousedown:xe[4]||(xe[4]=e.withModifiers(()=>{},["prevent"]))},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date-panel__body",{"is-range":e.unref(E)}])},[e.createElementVNode("div",mh,[e.createElementVNode("div",uh,[e.createElementVNode("button",{type:"button",class:"qiu-date-panel__nav",onClick:xe[0]||(xe[0]=be=>ot(-1))},"‹"),e.createElementVNode("span",fh,e.toDisplayString(e.unref(qe)),1),e.createElementVNode("button",{type:"button",class:"qiu-date-panel__nav",onClick:xe[1]||(xe[1]=be=>ot(1))},"›")]),e.unref(V)==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",ph,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,be=>e.createElementVNode("span",{key:be,class:"qiu-date-panel__week"},e.toDisplayString(be),1)),64))]),e.createElementVNode("div",hh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pt),be=>(e.openBlock(),e.createElementBlock("button",{key:`l-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell",we(be)]),disabled:be.disabled,onClick:ft=>dt("start",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected,"is-today":be.isToday}])},[e.createElementVNode("span",_h,e.toDisplayString(be.day),1),t.showLunar?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["qiu-date__lunar",{"is-festival":be.lunar.festival}])},e.toDisplayString(be.lunar.label),3)):e.createCommentVNode("",!0)],2)],10,gh))),128))])],64)):e.unref(V)==="month"?(e.openBlock(),e.createElementBlock("div",bh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(G),be=>(e.openBlock(),e.createElementBlock("button",{key:`lm-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell qiu-date-panel__cell--month",we(be)]),disabled:be.disabled,onClick:ft=>dt("start",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected}])},[e.createElementVNode("span",kh,e.toDisplayString(be.label),1)],2)],10,yh))),128))])):(e.openBlock(),e.createElementBlock("div",wh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(pe),be=>(e.openBlock(),e.createElementBlock("button",{key:`ly-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell qiu-date-panel__cell--year",we(be)]),disabled:be.disabled,onClick:ft=>dt("start",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected}])},[e.createElementVNode("span",Vh,e.toDisplayString(be.label),1)],2)],10,xh))),128))]))]),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Ch,[e.createElementVNode("div",Nh,[e.createElementVNode("button",{type:"button",class:"qiu-date-panel__nav",onClick:xe[2]||(xe[2]=be=>Mt(-1))},"‹"),e.createElementVNode("span",Bh,e.toDisplayString(e.unref(K)),1),e.createElementVNode("button",{type:"button",class:"qiu-date-panel__nav",onClick:xe[3]||(xe[3]=be=>Mt(1))},"›")]),e.unref(V)==="date"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",$h,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(k,be=>e.createElementVNode("span",{key:`r-${be}`,class:"qiu-date-panel__week"},e.toDisplayString(be),1)),64))]),e.createElementVNode("div",Eh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(J),be=>(e.openBlock(),e.createElementBlock("button",{key:`r-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell",we(be)]),disabled:be.disabled,onClick:ft=>dt("end",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected,"is-today":be.isToday}])},[e.createElementVNode("span",Mh,e.toDisplayString(be.day),1),t.showLunar?(e.openBlock(),e.createElementBlock("span",{key:0,class:e.normalizeClass(["qiu-date__lunar",{"is-festival":be.lunar.festival}])},e.toDisplayString(be.lunar.label),3)):e.createCommentVNode("",!0)],2)],10,Sh))),128))])],64)):e.unref(V)==="month"?(e.openBlock(),e.createElementBlock("div",qh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(me),be=>(e.openBlock(),e.createElementBlock("button",{key:`rm-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell qiu-date-panel__cell--month",we(be)]),disabled:be.disabled,onClick:ft=>dt("end",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected}])},[e.createElementVNode("span",Th,e.toDisplayString(be.label),1)],2)],10,zh))),128))])):(e.openBlock(),e.createElementBlock("div",Ih,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(ze),be=>(e.openBlock(),e.createElementBlock("button",{key:`ry-${be.key}`,type:"button",class:e.normalizeClass(["qiu-date-panel__cell qiu-date-panel__cell--year",we(be)]),disabled:be.disabled,onClick:ft=>dt("end",be)},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-date__cell",{"is-selected":be.selected}])},[e.createElementVNode("span",Rh,e.toDisplayString(be.label),1)],2)],10,Dh))),128))]))])):e.createCommentVNode("",!0)],2),e.unref(E)?(e.openBlock(),e.createElementBlock("div",Lh,[e.createElementVNode("button",{type:"button",class:"qiu-date-panel__btn qiu-date-panel__btn--text",onClick:Ot}," 取消 "),e.createElementVNode("button",{type:"button",class:"qiu-date-panel__btn qiu-date-panel__btn--primary",disabled:!e.unref(Be),onClick:yt}," 确定 ",8,Ph)])):e.createCommentVNode("",!0)],38)):e.createCommentVNode("",!0)]),_:1})]))],2)}}}),Oh=Object.freeze(Object.defineProperty({__proto__:null,default:uc},Symbol.toStringTag,{value:"Module"})),jh={class:"qiu-scrollbar__view"},fc=de(e.defineComponent({name:"QiuScrollbar",__name:"index",props:{maxHeight:{},height:{},native:{type:Boolean,default:!0},wrapClass:{}},emits:["scroll"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=_=>{if(!(_==null||_===""))return typeof _=="number"?`${_}px`:String(_)},f=e.computed(()=>{const _={},B=d(o.maxHeight),$=d(o.height);return B&&(_.maxHeight=B),$&&(_.height=$),_}),u=_=>{const B=_.target;r("scroll",{scrollTop:B.scrollTop,scrollLeft:B.scrollLeft})};return a({wrapRef:c,$el:c,setScrollTop:_=>{c.value&&(c.value.scrollTop=_)},setScrollLeft:_=>{c.value&&(c.value.scrollLeft=_)}}),(_,B)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:c,class:e.normalizeClass(["qiu-scrollbar",[t.wrapClass,{"qiu-scrollbar--native":t.native}]]),style:e.normalizeStyle(e.unref(f)),onScroll:u},[e.createElementVNode("div",jh,[e.renderSlot(_.$slots,"default",{},void 0,!0)])],38))}}),[["__scopeId","data-v-55701219"]]),Fh=Object.freeze(Object.defineProperty({__proto__:null,default:fc},Symbol.toStringTag,{value:"Module"})),Ah={label:"label",children:"children",value:"value"};function Eo(t,a){return t[a.value??"value"]??t[a.label??"label"]}function ba(t,a){return String(t[a.label??"label"]??"")}function ya(t,a){const n=t[a.children??"children"];return Array.isArray(n)?n:[]}const Qh={class:"qiu-tree-node",role:"treeitem"},Uh={key:1,class:"qiu-tree-node__expand is-leaf"},Wh={class:"qiu-tree-node__label"},Hh={key:0,class:"qiu-tree-node__children"},pc=de(e.defineComponent({name:"QiuTreeNode",__name:"QiuTreeNode",props:{node:{},level:{},propsConfig:{},expandedKeys:{},currentKey:{},filterText:{},filterNodeMethod:{type:Function},highlightCurrent:{type:Boolean}},emits:["toggle","node-click"],setup(t,{emit:a}){const n=t,o=a,r=e.computed(()=>Eo(n.node,n.propsConfig)),c=e.computed(()=>ba(n.node,n.propsConfig)),d=e.computed(()=>ya(n.node,n.propsConfig)),f=e.computed(()=>d.value.length>0),u=e.computed(()=>n.expandedKeys.has(r.value)),h=e.computed(()=>n.highlightCurrent&&n.currentKey===r.value),p=b=>Eo(b,n.propsConfig),_=b=>n.filterText?n.filterNodeMethod?n.filterNodeMethod(n.filterText,b,b):ba(b,n.propsConfig).toLowerCase().includes(n.filterText.toLowerCase()):!0,B=b=>_(b)?!0:ya(b,n.propsConfig).some(C=>B(C)),$=e.computed(()=>d.value.filter(b=>B(b)));return(b,C)=>{const k=e.resolveComponent("QiuTreeNode",!0);return e.openBlock(),e.createElementBlock("li",Qh,[e.createElementVNode("div",{class:e.normalizeClass(["qiu-tree-node__content",{"is-current":e.unref(h),"is-expanded":e.unref(u)}]),style:e.normalizeStyle({paddingLeft:`${t.level*18+8}px`}),onClick:C[1]||(C[1]=M=>o("node-click",t.node))},[e.unref(f)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-tree-node__expand",onClick:C[0]||(C[0]=e.withModifiers(M=>o("toggle",e.unref(r)),["stop"]))},e.toDisplayString(e.unref(u)?"▾":"▸"),1)):(e.openBlock(),e.createElementBlock("span",Uh)),e.createElementVNode("span",Wh,e.toDisplayString(e.unref(c)),1)],6),e.unref(f)&&e.unref(u)?(e.openBlock(),e.createElementBlock("ul",Hh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref($),M=>(e.openBlock(),e.createBlock(k,{key:String(p(M)),node:M,level:t.level+1,"props-config":t.propsConfig,"expanded-keys":t.expandedKeys,"current-key":t.currentKey,"filter-text":t.filterText,"filter-node-method":t.filterNodeMethod,"highlight-current":t.highlightCurrent,onToggle:C[2]||(C[2]=V=>o("toggle",V)),onNodeClick:C[3]||(C[3]=V=>o("node-click",V))},null,8,["node","level","props-config","expanded-keys","current-key","filter-text","filter-node-method","highlight-current"]))),128))])):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-87a9aa1c"]]),Yh=Object.freeze(Object.defineProperty({__proto__:null,default:pc},Symbol.toStringTag,{value:"Module"})),Kh={class:"qiu-tree",role:"tree"},vh={key:0,class:"qiu-tree__list"},Xh={key:1,class:"qiu-tree__empty"},bi=de(e.defineComponent({name:"QiuTree",__name:"index",props:{data:{default:()=>[]},props:{default:()=>({})},highlightCurrent:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!1},defaultExpandedKeys:{default:()=>[]},filterNodeMethod:{type:Function,default:void 0}},emits:["node-click"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.ref(new Set),f=e.ref(""),u=e.computed(()=>({...Ah,...o.props})),h=()=>{var M;if(o.defaultExpandAll){const V=new Set,E=x=>{x.forEach(m=>{V.add(Eo(m,u.value)),E(ya(m,u.value))})};E(o.data),d.value=V;return}(M=o.defaultExpandedKeys)!=null&&M.length&&(d.value=new Set(o.defaultExpandedKeys))};e.watch(()=>o.data,h,{immediate:!0,deep:!0});const p=M=>f.value?o.filterNodeMethod?o.filterNodeMethod(f.value,M,M):ba(M,u.value).toLowerCase().includes(f.value.toLowerCase()):!0,_=M=>p(M)?!0:ya(M,u.value).some(V=>_(V)),B=e.computed(()=>o.data.filter(M=>_(M))),$=M=>{const V=new Set(d.value);V.has(M)?V.delete(M):V.add(M),d.value=V},b=M=>{o.highlightCurrent&&(c.value=Eo(M,u.value)),r("node-click",M,M)};return a({filter:M=>{f.value=M},setCurrentKey:M=>{c.value=M}}),(M,V)=>(e.openBlock(),e.createElementBlock("div",Kh,[e.unref(B).length?(e.openBlock(),e.createElementBlock("ul",vh,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(B),E=>(e.openBlock(),e.createBlock(pc,{key:String(e.unref(Eo)(E,e.unref(u))),node:E,level:0,"props-config":e.unref(u),"expanded-keys":e.unref(d),"current-key":e.unref(c),"filter-text":e.unref(f),"filter-node-method":t.filterNodeMethod,"highlight-current":t.highlightCurrent,onToggle:$,onNodeClick:b},null,8,["node","props-config","expanded-keys","current-key","filter-text","filter-node-method","highlight-current"]))),128))])):(e.openBlock(),e.createElementBlock("div",Xh,"无数据"))]))}}),[["__scopeId","data-v-935d1fb5"]]),Gh=Object.freeze(Object.defineProperty({__proto__:null,default:bi},Symbol.toStringTag,{value:"Module"})),yi=t=>new Promise(a=>{const n=document.createElement("div");document.body.appendChild(n);const o=e.reactive({title:t.title||"温馨提示",message:t.message,showCancel:!!t.showCancel,confirmText:t.confirmButtonText||"确定",cancelText:t.cancelButtonText||"取消",html:!!t.dangerouslyUseHTMLString}),r=d=>{c.unmount(),n.remove(),a(d)},c=e.createApp({setup(){return()=>e.h("div",{class:"qiu-msgbox-root"},[e.h("div",{class:"qiu-msgbox-mask",onClick:()=>o.showCancel&&r("cancel")}),e.h("div",{class:"qiu-msgbox",role:"dialog"},[e.h("div",{class:"qiu-msgbox__title"},o.title),o.html?e.h("div",{class:"qiu-msgbox__body",innerHTML:String(o.message??"")}):e.h("div",{class:"qiu-msgbox__body"},o.message),e.h("div",{class:"qiu-msgbox__footer"},[o.showCancel?e.h("button",{type:"button",class:"qiu-msgbox__btn",onClick:()=>r("cancel")},o.cancelText):null,e.h("button",{type:"button",class:"qiu-msgbox__btn qiu-msgbox__btn--primary",onClick:()=>r("confirm")},o.confirmText)])])])}});if(!document.getElementById("qiu-msgbox-style")){const d=document.createElement("style");d.id="qiu-msgbox-style",d.textContent=`
56
+ .qiu-msgbox-root{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center}
57
+ .qiu-msgbox-mask{position:absolute;inset:0;background:rgba(0,0,0,.45)}
58
+ .qiu-msgbox{position:relative;z-index:1;width:min(420px,92vw);padding:16px 18px;border-radius:8px;background:var(--qiu-bg-color,#fff);box-shadow:0 12px 32px rgba(0,0,0,.18);color:var(--qiu-text-color,#303133)}
59
+ .qiu-msgbox__title{font-size:16px;font-weight:600;margin-bottom:10px}
60
+ .qiu-msgbox__body{font-size:14px;line-height:1.6;color:var(--qiu-text-color-regular,#606266);max-height:50vh;overflow:auto}
61
+ .qiu-msgbox__footer{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
62
+ .qiu-msgbox__btn{height:32px;padding:0 14px;border-radius:4px;border:1px solid var(--qiu-border-color,#dcdfe6);background:#fff;cursor:pointer}
63
+ .qiu-msgbox__btn--primary{color:#fff;background:var(--qiu-color-primary,#0f766e);border-color:var(--qiu-color-primary,#0f766e)}
64
+ `,document.head.appendChild(d)}c.mount(n)}),ql=async(t,a="温馨提示",n)=>{a&&typeof a=="function"&&(n=a,a="温馨提示"),await yi({title:String(a),message:t,dangerouslyUseHTMLString:!0,showCancel:!1}),n==null||n()},hc=(t,a="温馨提示",n,o,r="确定",c="取消")=>yi({title:a,message:t,showCancel:!0,confirmButtonText:r,cancelButtonText:c,dangerouslyUseHTMLString:typeof t=="string"&&t.includes("<")}).then(d=>{d==="confirm"?n==null||n():o==null||o()}),Jh=(t,a="温馨提示",n)=>yi({title:a,message:t,showCancel:!0,confirmButtonText:(n==null?void 0:n.confirmButtonText)||"确定",cancelButtonText:(n==null?void 0:n.cancelButtonText)||"取消",dangerouslyUseHTMLString:(n==null?void 0:n.dangerouslyUseHTMLString)??(typeof t=="string"&&t.includes("<"))}),Zh=JSON.parse('[{"code":"11","name":"北京市","children":[{"code":"1101","name":"市辖区","children":[{"code":"110101","name":"东城区"},{"code":"110102","name":"西城区"},{"code":"110105","name":"朝阳区"},{"code":"110106","name":"丰台区"},{"code":"110107","name":"石景山区"},{"code":"110108","name":"海淀区"},{"code":"110109","name":"门头沟区"},{"code":"110111","name":"房山区"},{"code":"110112","name":"通州区"},{"code":"110113","name":"顺义区"},{"code":"110114","name":"昌平区"},{"code":"110115","name":"大兴区"},{"code":"110116","name":"怀柔区"},{"code":"110117","name":"平谷区"},{"code":"110118","name":"密云区"},{"code":"110119","name":"延庆区"}]}]},{"code":"12","name":"天津市","children":[{"code":"1201","name":"市辖区","children":[{"code":"120101","name":"和平区"},{"code":"120102","name":"河东区"},{"code":"120103","name":"河西区"},{"code":"120104","name":"南开区"},{"code":"120105","name":"河北区"},{"code":"120106","name":"红桥区"},{"code":"120110","name":"东丽区"},{"code":"120111","name":"西青区"},{"code":"120112","name":"津南区"},{"code":"120113","name":"北辰区"},{"code":"120114","name":"武清区"},{"code":"120115","name":"宝坻区"},{"code":"120116","name":"滨海新区"},{"code":"120117","name":"宁河区"},{"code":"120118","name":"静海区"},{"code":"120119","name":"蓟州区"}]}]},{"code":"13","name":"河北省","children":[{"code":"1301","name":"石家庄市","children":[{"code":"130102","name":"长安区"},{"code":"130104","name":"桥西区"},{"code":"130105","name":"新华区"},{"code":"130107","name":"井陉矿区"},{"code":"130108","name":"裕华区"},{"code":"130109","name":"藁城区"},{"code":"130110","name":"鹿泉区"},{"code":"130111","name":"栾城区"},{"code":"130121","name":"井陉县"},{"code":"130123","name":"正定县"},{"code":"130125","name":"行唐县"},{"code":"130126","name":"灵寿县"},{"code":"130127","name":"高邑县"},{"code":"130128","name":"深泽县"},{"code":"130129","name":"赞皇县"},{"code":"130130","name":"无极县"},{"code":"130131","name":"平山县"},{"code":"130132","name":"元氏县"},{"code":"130133","name":"赵县"},{"code":"130171","name":"石家庄高新技术产业开发区"},{"code":"130172","name":"石家庄循环化工园区"},{"code":"130181","name":"辛集市"},{"code":"130183","name":"晋州市"},{"code":"130184","name":"新乐市"}]},{"code":"1302","name":"唐山市","children":[{"code":"130202","name":"路南区"},{"code":"130203","name":"路北区"},{"code":"130204","name":"古冶区"},{"code":"130205","name":"开平区"},{"code":"130207","name":"丰南区"},{"code":"130208","name":"丰润区"},{"code":"130209","name":"曹妃甸区"},{"code":"130224","name":"滦南县"},{"code":"130225","name":"乐亭县"},{"code":"130227","name":"迁西县"},{"code":"130229","name":"玉田县"},{"code":"130271","name":"河北唐山芦台经济开发区"},{"code":"130272","name":"唐山市汉沽管理区"},{"code":"130273","name":"唐山高新技术产业开发区"},{"code":"130274","name":"河北唐山海港经济开发区"},{"code":"130281","name":"遵化市"},{"code":"130283","name":"迁安市"},{"code":"130284","name":"滦州市"}]},{"code":"1303","name":"秦皇岛市","children":[{"code":"130302","name":"海港区"},{"code":"130303","name":"山海关区"},{"code":"130304","name":"北戴河区"},{"code":"130306","name":"抚宁区"},{"code":"130321","name":"青龙满族自治县"},{"code":"130322","name":"昌黎县"},{"code":"130324","name":"卢龙县"},{"code":"130371","name":"秦皇岛市经济技术开发区"},{"code":"130372","name":"北戴河新区"}]},{"code":"1304","name":"邯郸市","children":[{"code":"130402","name":"邯山区"},{"code":"130403","name":"丛台区"},{"code":"130404","name":"复兴区"},{"code":"130406","name":"峰峰矿区"},{"code":"130407","name":"肥乡区"},{"code":"130408","name":"永年区"},{"code":"130423","name":"临漳县"},{"code":"130424","name":"成安县"},{"code":"130425","name":"大名县"},{"code":"130426","name":"涉县"},{"code":"130427","name":"磁县"},{"code":"130430","name":"邱县"},{"code":"130431","name":"鸡泽县"},{"code":"130432","name":"广平县"},{"code":"130433","name":"馆陶县"},{"code":"130434","name":"魏县"},{"code":"130435","name":"曲周县"},{"code":"130471","name":"邯郸经济技术开发区"},{"code":"130473","name":"邯郸冀南新区"},{"code":"130481","name":"武安市"}]},{"code":"1305","name":"邢台市","children":[{"code":"130502","name":"襄都区"},{"code":"130503","name":"信都区"},{"code":"130505","name":"任泽区"},{"code":"130506","name":"南和区"},{"code":"130522","name":"临城县"},{"code":"130523","name":"内丘县"},{"code":"130524","name":"柏乡县"},{"code":"130525","name":"隆尧县"},{"code":"130528","name":"宁晋县"},{"code":"130529","name":"巨鹿县"},{"code":"130530","name":"新河县"},{"code":"130531","name":"广宗县"},{"code":"130532","name":"平乡县"},{"code":"130533","name":"威县"},{"code":"130534","name":"清河县"},{"code":"130535","name":"临西县"},{"code":"130571","name":"河北邢台经济开发区"},{"code":"130581","name":"南宫市"},{"code":"130582","name":"沙河市"}]},{"code":"1306","name":"保定市","children":[{"code":"130602","name":"竞秀区"},{"code":"130606","name":"莲池区"},{"code":"130607","name":"满城区"},{"code":"130608","name":"清苑区"},{"code":"130609","name":"徐水区"},{"code":"130623","name":"涞水县"},{"code":"130624","name":"阜平县"},{"code":"130626","name":"定兴县"},{"code":"130627","name":"唐县"},{"code":"130628","name":"高阳县"},{"code":"130629","name":"容城县"},{"code":"130630","name":"涞源县"},{"code":"130631","name":"望都县"},{"code":"130632","name":"安新县"},{"code":"130633","name":"易县"},{"code":"130634","name":"曲阳县"},{"code":"130635","name":"蠡县"},{"code":"130636","name":"顺平县"},{"code":"130637","name":"博野县"},{"code":"130638","name":"雄县"},{"code":"130671","name":"保定高新技术产业开发区"},{"code":"130672","name":"保定白沟新城"},{"code":"130681","name":"涿州市"},{"code":"130682","name":"定州市"},{"code":"130683","name":"安国市"},{"code":"130684","name":"高碑店市"}]},{"code":"1307","name":"张家口市","children":[{"code":"130702","name":"桥东区"},{"code":"130703","name":"桥西区"},{"code":"130705","name":"宣化区"},{"code":"130706","name":"下花园区"},{"code":"130708","name":"万全区"},{"code":"130709","name":"崇礼区"},{"code":"130722","name":"张北县"},{"code":"130723","name":"康保县"},{"code":"130724","name":"沽源县"},{"code":"130725","name":"尚义县"},{"code":"130726","name":"蔚县"},{"code":"130727","name":"阳原县"},{"code":"130728","name":"怀安县"},{"code":"130730","name":"怀来县"},{"code":"130731","name":"涿鹿县"},{"code":"130732","name":"赤城县"},{"code":"130771","name":"张家口经济开发区"},{"code":"130772","name":"张家口市察北管理区"},{"code":"130773","name":"张家口市塞北管理区"}]},{"code":"1308","name":"承德市","children":[{"code":"130802","name":"双桥区"},{"code":"130803","name":"双滦区"},{"code":"130804","name":"鹰手营子矿区"},{"code":"130821","name":"承德县"},{"code":"130822","name":"兴隆县"},{"code":"130824","name":"滦平县"},{"code":"130825","name":"隆化县"},{"code":"130826","name":"丰宁满族自治县"},{"code":"130827","name":"宽城满族自治县"},{"code":"130828","name":"围场满族蒙古族自治县"},{"code":"130871","name":"承德高新技术产业开发区"},{"code":"130881","name":"平泉市"}]},{"code":"1309","name":"沧州市","children":[{"code":"130902","name":"新华区"},{"code":"130903","name":"运河区"},{"code":"130921","name":"沧县"},{"code":"130922","name":"青县"},{"code":"130923","name":"东光县"},{"code":"130924","name":"海兴县"},{"code":"130925","name":"盐山县"},{"code":"130926","name":"肃宁县"},{"code":"130927","name":"南皮县"},{"code":"130928","name":"吴桥县"},{"code":"130929","name":"献县"},{"code":"130930","name":"孟村回族自治县"},{"code":"130971","name":"河北沧州经济开发区"},{"code":"130972","name":"沧州高新技术产业开发区"},{"code":"130973","name":"沧州渤海新区"},{"code":"130981","name":"泊头市"},{"code":"130982","name":"任丘市"},{"code":"130983","name":"黄骅市"},{"code":"130984","name":"河间市"}]},{"code":"1310","name":"廊坊市","children":[{"code":"131002","name":"安次区"},{"code":"131003","name":"广阳区"},{"code":"131022","name":"固安县"},{"code":"131023","name":"永清县"},{"code":"131024","name":"香河县"},{"code":"131025","name":"大城县"},{"code":"131026","name":"文安县"},{"code":"131028","name":"大厂回族自治县"},{"code":"131071","name":"廊坊经济技术开发区"},{"code":"131081","name":"霸州市"},{"code":"131082","name":"三河市"}]},{"code":"1311","name":"衡水市","children":[{"code":"131102","name":"桃城区"},{"code":"131103","name":"冀州区"},{"code":"131121","name":"枣强县"},{"code":"131122","name":"武邑县"},{"code":"131123","name":"武强县"},{"code":"131124","name":"饶阳县"},{"code":"131125","name":"安平县"},{"code":"131126","name":"故城县"},{"code":"131127","name":"景县"},{"code":"131128","name":"阜城县"},{"code":"131171","name":"河北衡水高新技术产业开发区"},{"code":"131172","name":"衡水滨湖新区"},{"code":"131182","name":"深州市"}]}]},{"code":"14","name":"山西省","children":[{"code":"1401","name":"太原市","children":[{"code":"140105","name":"小店区"},{"code":"140106","name":"迎泽区"},{"code":"140107","name":"杏花岭区"},{"code":"140108","name":"尖草坪区"},{"code":"140109","name":"万柏林区"},{"code":"140110","name":"晋源区"},{"code":"140121","name":"清徐县"},{"code":"140122","name":"阳曲县"},{"code":"140123","name":"娄烦县"},{"code":"140171","name":"山西转型综合改革示范区"},{"code":"140181","name":"古交市"}]},{"code":"1402","name":"大同市","children":[{"code":"140212","name":"新荣区"},{"code":"140213","name":"平城区"},{"code":"140214","name":"云冈区"},{"code":"140215","name":"云州区"},{"code":"140221","name":"阳高县"},{"code":"140222","name":"天镇县"},{"code":"140223","name":"广灵县"},{"code":"140224","name":"灵丘县"},{"code":"140225","name":"浑源县"},{"code":"140226","name":"左云县"},{"code":"140271","name":"山西大同经济开发区"}]},{"code":"1403","name":"阳泉市","children":[{"code":"140302","name":"城区"},{"code":"140303","name":"矿区"},{"code":"140311","name":"郊区"},{"code":"140321","name":"平定县"},{"code":"140322","name":"盂县"}]},{"code":"1404","name":"长治市","children":[{"code":"140403","name":"潞州区"},{"code":"140404","name":"上党区"},{"code":"140405","name":"屯留区"},{"code":"140406","name":"潞城区"},{"code":"140423","name":"襄垣县"},{"code":"140425","name":"平顺县"},{"code":"140426","name":"黎城县"},{"code":"140427","name":"壶关县"},{"code":"140428","name":"长子县"},{"code":"140429","name":"武乡县"},{"code":"140430","name":"沁县"},{"code":"140431","name":"沁源县"}]},{"code":"1405","name":"晋城市","children":[{"code":"140502","name":"城区"},{"code":"140521","name":"沁水县"},{"code":"140522","name":"阳城县"},{"code":"140524","name":"陵川县"},{"code":"140525","name":"泽州县"},{"code":"140581","name":"高平市"}]},{"code":"1406","name":"朔州市","children":[{"code":"140602","name":"朔城区"},{"code":"140603","name":"平鲁区"},{"code":"140621","name":"山阴县"},{"code":"140622","name":"应县"},{"code":"140623","name":"右玉县"},{"code":"140671","name":"山西朔州经济开发区"},{"code":"140681","name":"怀仁市"}]},{"code":"1407","name":"晋中市","children":[{"code":"140702","name":"榆次区"},{"code":"140703","name":"太谷区"},{"code":"140721","name":"榆社县"},{"code":"140722","name":"左权县"},{"code":"140723","name":"和顺县"},{"code":"140724","name":"昔阳县"},{"code":"140725","name":"寿阳县"},{"code":"140727","name":"祁县"},{"code":"140728","name":"平遥县"},{"code":"140729","name":"灵石县"},{"code":"140781","name":"介休市"}]},{"code":"1408","name":"运城市","children":[{"code":"140802","name":"盐湖区"},{"code":"140821","name":"临猗县"},{"code":"140822","name":"万荣县"},{"code":"140823","name":"闻喜县"},{"code":"140824","name":"稷山县"},{"code":"140825","name":"新绛县"},{"code":"140826","name":"绛县"},{"code":"140827","name":"垣曲县"},{"code":"140828","name":"夏县"},{"code":"140829","name":"平陆县"},{"code":"140830","name":"芮城县"},{"code":"140881","name":"永济市"},{"code":"140882","name":"河津市"}]},{"code":"1409","name":"忻州市","children":[{"code":"140902","name":"忻府区"},{"code":"140921","name":"定襄县"},{"code":"140922","name":"五台县"},{"code":"140923","name":"代县"},{"code":"140924","name":"繁峙县"},{"code":"140925","name":"宁武县"},{"code":"140926","name":"静乐县"},{"code":"140927","name":"神池县"},{"code":"140928","name":"五寨县"},{"code":"140929","name":"岢岚县"},{"code":"140930","name":"河曲县"},{"code":"140931","name":"保德县"},{"code":"140932","name":"偏关县"},{"code":"140971","name":"五台山风景名胜区"},{"code":"140981","name":"原平市"}]},{"code":"1410","name":"临汾市","children":[{"code":"141002","name":"尧都区"},{"code":"141021","name":"曲沃县"},{"code":"141022","name":"翼城县"},{"code":"141023","name":"襄汾县"},{"code":"141024","name":"洪洞县"},{"code":"141025","name":"古县"},{"code":"141026","name":"安泽县"},{"code":"141027","name":"浮山县"},{"code":"141028","name":"吉县"},{"code":"141029","name":"乡宁县"},{"code":"141030","name":"大宁县"},{"code":"141031","name":"隰县"},{"code":"141032","name":"永和县"},{"code":"141033","name":"蒲县"},{"code":"141034","name":"汾西县"},{"code":"141081","name":"侯马市"},{"code":"141082","name":"霍州市"}]},{"code":"1411","name":"吕梁市","children":[{"code":"141102","name":"离石区"},{"code":"141121","name":"文水县"},{"code":"141122","name":"交城县"},{"code":"141123","name":"兴县"},{"code":"141124","name":"临县"},{"code":"141125","name":"柳林县"},{"code":"141126","name":"石楼县"},{"code":"141127","name":"岚县"},{"code":"141128","name":"方山县"},{"code":"141129","name":"中阳县"},{"code":"141130","name":"交口县"},{"code":"141181","name":"孝义市"},{"code":"141182","name":"汾阳市"}]}]},{"code":"15","name":"内蒙古自治区","children":[{"code":"1501","name":"呼和浩特市","children":[{"code":"150102","name":"新城区"},{"code":"150103","name":"回民区"},{"code":"150104","name":"玉泉区"},{"code":"150105","name":"赛罕区"},{"code":"150121","name":"土默特左旗"},{"code":"150122","name":"托克托县"},{"code":"150123","name":"和林格尔县"},{"code":"150124","name":"清水河县"},{"code":"150125","name":"武川县"},{"code":"150172","name":"呼和浩特经济技术开发区"}]},{"code":"1502","name":"包头市","children":[{"code":"150202","name":"东河区"},{"code":"150203","name":"昆都仑区"},{"code":"150204","name":"青山区"},{"code":"150205","name":"石拐区"},{"code":"150206","name":"白云鄂博矿区"},{"code":"150207","name":"九原区"},{"code":"150221","name":"土默特右旗"},{"code":"150222","name":"固阳县"},{"code":"150223","name":"达尔罕茂明安联合旗"},{"code":"150271","name":"包头稀土高新技术产业开发区"}]},{"code":"1503","name":"乌海市","children":[{"code":"150302","name":"海勃湾区"},{"code":"150303","name":"海南区"},{"code":"150304","name":"乌达区"}]},{"code":"1504","name":"赤峰市","children":[{"code":"150402","name":"红山区"},{"code":"150403","name":"元宝山区"},{"code":"150404","name":"松山区"},{"code":"150421","name":"阿鲁科尔沁旗"},{"code":"150422","name":"巴林左旗"},{"code":"150423","name":"巴林右旗"},{"code":"150424","name":"林西县"},{"code":"150425","name":"克什克腾旗"},{"code":"150426","name":"翁牛特旗"},{"code":"150428","name":"喀喇沁旗"},{"code":"150429","name":"宁城县"},{"code":"150430","name":"敖汉旗"}]},{"code":"1505","name":"通辽市","children":[{"code":"150502","name":"科尔沁区"},{"code":"150521","name":"科尔沁左翼中旗"},{"code":"150522","name":"科尔沁左翼后旗"},{"code":"150523","name":"开鲁县"},{"code":"150524","name":"库伦旗"},{"code":"150525","name":"奈曼旗"},{"code":"150526","name":"扎鲁特旗"},{"code":"150571","name":"通辽经济技术开发区"},{"code":"150581","name":"霍林郭勒市"}]},{"code":"1506","name":"鄂尔多斯市","children":[{"code":"150602","name":"东胜区"},{"code":"150603","name":"康巴什区"},{"code":"150621","name":"达拉特旗"},{"code":"150622","name":"准格尔旗"},{"code":"150623","name":"鄂托克前旗"},{"code":"150624","name":"鄂托克旗"},{"code":"150625","name":"杭锦旗"},{"code":"150626","name":"乌审旗"},{"code":"150627","name":"伊金霍洛旗"}]},{"code":"1507","name":"呼伦贝尔市","children":[{"code":"150702","name":"海拉尔区"},{"code":"150703","name":"扎赉诺尔区"},{"code":"150721","name":"阿荣旗"},{"code":"150722","name":"莫力达瓦达斡尔族自治旗"},{"code":"150723","name":"鄂伦春自治旗"},{"code":"150724","name":"鄂温克族自治旗"},{"code":"150725","name":"陈巴尔虎旗"},{"code":"150726","name":"新巴尔虎左旗"},{"code":"150727","name":"新巴尔虎右旗"},{"code":"150781","name":"满洲里市"},{"code":"150782","name":"牙克石市"},{"code":"150783","name":"扎兰屯市"},{"code":"150784","name":"额尔古纳市"},{"code":"150785","name":"根河市"}]},{"code":"1508","name":"巴彦淖尔市","children":[{"code":"150802","name":"临河区"},{"code":"150821","name":"五原县"},{"code":"150822","name":"磴口县"},{"code":"150823","name":"乌拉特前旗"},{"code":"150824","name":"乌拉特中旗"},{"code":"150825","name":"乌拉特后旗"},{"code":"150826","name":"杭锦后旗"}]},{"code":"1509","name":"乌兰察布市","children":[{"code":"150902","name":"集宁区"},{"code":"150921","name":"卓资县"},{"code":"150922","name":"化德县"},{"code":"150923","name":"商都县"},{"code":"150924","name":"兴和县"},{"code":"150925","name":"凉城县"},{"code":"150926","name":"察哈尔右翼前旗"},{"code":"150927","name":"察哈尔右翼中旗"},{"code":"150928","name":"察哈尔右翼后旗"},{"code":"150929","name":"四子王旗"},{"code":"150981","name":"丰镇市"}]},{"code":"1522","name":"兴安盟","children":[{"code":"152201","name":"乌兰浩特市"},{"code":"152202","name":"阿尔山市"},{"code":"152221","name":"科尔沁右翼前旗"},{"code":"152222","name":"科尔沁右翼中旗"},{"code":"152223","name":"扎赉特旗"},{"code":"152224","name":"突泉县"}]},{"code":"1525","name":"锡林郭勒盟","children":[{"code":"152501","name":"二连浩特市"},{"code":"152502","name":"锡林浩特市"},{"code":"152522","name":"阿巴嘎旗"},{"code":"152523","name":"苏尼特左旗"},{"code":"152524","name":"苏尼特右旗"},{"code":"152525","name":"东乌珠穆沁旗"},{"code":"152526","name":"西乌珠穆沁旗"},{"code":"152527","name":"太仆寺旗"},{"code":"152528","name":"镶黄旗"},{"code":"152529","name":"正镶白旗"},{"code":"152530","name":"正蓝旗"},{"code":"152531","name":"多伦县"},{"code":"152571","name":"乌拉盖管理区管委会"}]},{"code":"1529","name":"阿拉善盟","children":[{"code":"152921","name":"阿拉善左旗"},{"code":"152922","name":"阿拉善右旗"},{"code":"152923","name":"额济纳旗"},{"code":"152971","name":"内蒙古阿拉善高新技术产业开发区"}]}]},{"code":"21","name":"辽宁省","children":[{"code":"2101","name":"沈阳市","children":[{"code":"210102","name":"和平区"},{"code":"210103","name":"沈河区"},{"code":"210104","name":"大东区"},{"code":"210105","name":"皇姑区"},{"code":"210106","name":"铁西区"},{"code":"210111","name":"苏家屯区"},{"code":"210112","name":"浑南区"},{"code":"210113","name":"沈北新区"},{"code":"210114","name":"于洪区"},{"code":"210115","name":"辽中区"},{"code":"210123","name":"康平县"},{"code":"210124","name":"法库县"},{"code":"210181","name":"新民市"}]},{"code":"2102","name":"大连市","children":[{"code":"210202","name":"中山区"},{"code":"210203","name":"西岗区"},{"code":"210204","name":"沙河口区"},{"code":"210211","name":"甘井子区"},{"code":"210212","name":"旅顺口区"},{"code":"210213","name":"金州区"},{"code":"210214","name":"普兰店区"},{"code":"210224","name":"长海县"},{"code":"210281","name":"瓦房店市"},{"code":"210283","name":"庄河市"}]},{"code":"2103","name":"鞍山市","children":[{"code":"210302","name":"铁东区"},{"code":"210303","name":"铁西区"},{"code":"210304","name":"立山区"},{"code":"210311","name":"千山区"},{"code":"210321","name":"台安县"},{"code":"210323","name":"岫岩满族自治县"},{"code":"210381","name":"海城市"}]},{"code":"2104","name":"抚顺市","children":[{"code":"210402","name":"新抚区"},{"code":"210403","name":"东洲区"},{"code":"210404","name":"望花区"},{"code":"210411","name":"顺城区"},{"code":"210421","name":"抚顺县"},{"code":"210422","name":"新宾满族自治县"},{"code":"210423","name":"清原满族自治县"}]},{"code":"2105","name":"本溪市","children":[{"code":"210502","name":"平山区"},{"code":"210503","name":"溪湖区"},{"code":"210504","name":"明山区"},{"code":"210505","name":"南芬区"},{"code":"210521","name":"本溪满族自治县"},{"code":"210522","name":"桓仁满族自治县"}]},{"code":"2106","name":"丹东市","children":[{"code":"210602","name":"元宝区"},{"code":"210603","name":"振兴区"},{"code":"210604","name":"振安区"},{"code":"210624","name":"宽甸满族自治县"},{"code":"210681","name":"东港市"},{"code":"210682","name":"凤城市"}]},{"code":"2107","name":"锦州市","children":[{"code":"210702","name":"古塔区"},{"code":"210703","name":"凌河区"},{"code":"210711","name":"太和区"},{"code":"210726","name":"黑山县"},{"code":"210727","name":"义县"},{"code":"210781","name":"凌海市"},{"code":"210782","name":"北镇市"}]},{"code":"2108","name":"营口市","children":[{"code":"210802","name":"站前区"},{"code":"210803","name":"西市区"},{"code":"210804","name":"鲅鱼圈区"},{"code":"210811","name":"老边区"},{"code":"210881","name":"盖州市"},{"code":"210882","name":"大石桥市"}]},{"code":"2109","name":"阜新市","children":[{"code":"210902","name":"海州区"},{"code":"210903","name":"新邱区"},{"code":"210904","name":"太平区"},{"code":"210905","name":"清河门区"},{"code":"210911","name":"细河区"},{"code":"210921","name":"阜新蒙古族自治县"},{"code":"210922","name":"彰武县"}]},{"code":"2110","name":"辽阳市","children":[{"code":"211002","name":"白塔区"},{"code":"211003","name":"文圣区"},{"code":"211004","name":"宏伟区"},{"code":"211005","name":"弓长岭区"},{"code":"211011","name":"太子河区"},{"code":"211021","name":"辽阳县"},{"code":"211081","name":"灯塔市"}]},{"code":"2111","name":"盘锦市","children":[{"code":"211102","name":"双台子区"},{"code":"211103","name":"兴隆台区"},{"code":"211104","name":"大洼区"},{"code":"211122","name":"盘山县"}]},{"code":"2112","name":"铁岭市","children":[{"code":"211202","name":"银州区"},{"code":"211204","name":"清河区"},{"code":"211221","name":"铁岭县"},{"code":"211223","name":"西丰县"},{"code":"211224","name":"昌图县"},{"code":"211281","name":"调兵山市"},{"code":"211282","name":"开原市"}]},{"code":"2113","name":"朝阳市","children":[{"code":"211302","name":"双塔区"},{"code":"211303","name":"龙城区"},{"code":"211321","name":"朝阳县"},{"code":"211322","name":"建平县"},{"code":"211324","name":"喀喇沁左翼蒙古族自治县"},{"code":"211381","name":"北票市"},{"code":"211382","name":"凌源市"}]},{"code":"2114","name":"葫芦岛市","children":[{"code":"211402","name":"连山区"},{"code":"211403","name":"龙港区"},{"code":"211404","name":"南票区"},{"code":"211421","name":"绥中县"},{"code":"211422","name":"建昌县"},{"code":"211481","name":"兴城市"}]}]},{"code":"22","name":"吉林省","children":[{"code":"2201","name":"长春市","children":[{"code":"220102","name":"南关区"},{"code":"220103","name":"宽城区"},{"code":"220104","name":"朝阳区"},{"code":"220105","name":"二道区"},{"code":"220106","name":"绿园区"},{"code":"220112","name":"双阳区"},{"code":"220113","name":"九台区"},{"code":"220122","name":"农安县"},{"code":"220171","name":"长春经济技术开发区"},{"code":"220172","name":"长春净月高新技术产业开发区"},{"code":"220173","name":"长春高新技术产业开发区"},{"code":"220174","name":"长春汽车经济技术开发区"},{"code":"220182","name":"榆树市"},{"code":"220183","name":"德惠市"},{"code":"220184","name":"公主岭市"}]},{"code":"2202","name":"吉林市","children":[{"code":"220202","name":"昌邑区"},{"code":"220203","name":"龙潭区"},{"code":"220204","name":"船营区"},{"code":"220211","name":"丰满区"},{"code":"220221","name":"永吉县"},{"code":"220271","name":"吉林经济开发区"},{"code":"220272","name":"吉林高新技术产业开发区"},{"code":"220273","name":"吉林中国新加坡食品区"},{"code":"220281","name":"蛟河市"},{"code":"220282","name":"桦甸市"},{"code":"220283","name":"舒兰市"},{"code":"220284","name":"磐石市"}]},{"code":"2203","name":"四平市","children":[{"code":"220302","name":"铁西区"},{"code":"220303","name":"铁东区"},{"code":"220322","name":"梨树县"},{"code":"220323","name":"伊通满族自治县"},{"code":"220382","name":"双辽市"}]},{"code":"2204","name":"辽源市","children":[{"code":"220402","name":"龙山区"},{"code":"220403","name":"西安区"},{"code":"220421","name":"东丰县"},{"code":"220422","name":"东辽县"}]},{"code":"2205","name":"通化市","children":[{"code":"220502","name":"东昌区"},{"code":"220503","name":"二道江区"},{"code":"220521","name":"通化县"},{"code":"220523","name":"辉南县"},{"code":"220524","name":"柳河县"},{"code":"220581","name":"梅河口市"},{"code":"220582","name":"集安市"}]},{"code":"2206","name":"白山市","children":[{"code":"220602","name":"浑江区"},{"code":"220605","name":"江源区"},{"code":"220621","name":"抚松县"},{"code":"220622","name":"靖宇县"},{"code":"220623","name":"长白朝鲜族自治县"},{"code":"220681","name":"临江市"}]},{"code":"2207","name":"松原市","children":[{"code":"220702","name":"宁江区"},{"code":"220721","name":"前郭尔罗斯蒙古族自治县"},{"code":"220722","name":"长岭县"},{"code":"220723","name":"乾安县"},{"code":"220771","name":"吉林松原经济开发区"},{"code":"220781","name":"扶余市"}]},{"code":"2208","name":"白城市","children":[{"code":"220802","name":"洮北区"},{"code":"220821","name":"镇赉县"},{"code":"220822","name":"通榆县"},{"code":"220871","name":"吉林白城经济开发区"},{"code":"220881","name":"洮南市"},{"code":"220882","name":"大安市"}]},{"code":"2224","name":"延边朝鲜族自治州","children":[{"code":"222401","name":"延吉市"},{"code":"222402","name":"图们市"},{"code":"222403","name":"敦化市"},{"code":"222404","name":"珲春市"},{"code":"222405","name":"龙井市"},{"code":"222406","name":"和龙市"},{"code":"222424","name":"汪清县"},{"code":"222426","name":"安图县"}]}]},{"code":"23","name":"黑龙江省","children":[{"code":"2301","name":"哈尔滨市","children":[{"code":"230102","name":"道里区"},{"code":"230103","name":"南岗区"},{"code":"230104","name":"道外区"},{"code":"230108","name":"平房区"},{"code":"230109","name":"松北区"},{"code":"230110","name":"香坊区"},{"code":"230111","name":"呼兰区"},{"code":"230112","name":"阿城区"},{"code":"230113","name":"双城区"},{"code":"230123","name":"依兰县"},{"code":"230124","name":"方正县"},{"code":"230125","name":"宾县"},{"code":"230126","name":"巴彦县"},{"code":"230127","name":"木兰县"},{"code":"230128","name":"通河县"},{"code":"230129","name":"延寿县"},{"code":"230183","name":"尚志市"},{"code":"230184","name":"五常市"}]},{"code":"2302","name":"齐齐哈尔市","children":[{"code":"230202","name":"龙沙区"},{"code":"230203","name":"建华区"},{"code":"230204","name":"铁锋区"},{"code":"230205","name":"昂昂溪区"},{"code":"230206","name":"富拉尔基区"},{"code":"230207","name":"碾子山区"},{"code":"230208","name":"梅里斯达斡尔族区"},{"code":"230221","name":"龙江县"},{"code":"230223","name":"依安县"},{"code":"230224","name":"泰来县"},{"code":"230225","name":"甘南县"},{"code":"230227","name":"富裕县"},{"code":"230229","name":"克山县"},{"code":"230230","name":"克东县"},{"code":"230231","name":"拜泉县"},{"code":"230281","name":"讷河市"}]},{"code":"2303","name":"鸡西市","children":[{"code":"230302","name":"鸡冠区"},{"code":"230303","name":"恒山区"},{"code":"230304","name":"滴道区"},{"code":"230305","name":"梨树区"},{"code":"230306","name":"城子河区"},{"code":"230307","name":"麻山区"},{"code":"230321","name":"鸡东县"},{"code":"230381","name":"虎林市"},{"code":"230382","name":"密山市"}]},{"code":"2304","name":"鹤岗市","children":[{"code":"230402","name":"向阳区"},{"code":"230403","name":"工农区"},{"code":"230404","name":"南山区"},{"code":"230405","name":"兴安区"},{"code":"230406","name":"东山区"},{"code":"230407","name":"兴山区"},{"code":"230421","name":"萝北县"},{"code":"230422","name":"绥滨县"}]},{"code":"2305","name":"双鸭山市","children":[{"code":"230502","name":"尖山区"},{"code":"230503","name":"岭东区"},{"code":"230505","name":"四方台区"},{"code":"230506","name":"宝山区"},{"code":"230521","name":"集贤县"},{"code":"230522","name":"友谊县"},{"code":"230523","name":"宝清县"},{"code":"230524","name":"饶河县"}]},{"code":"2306","name":"大庆市","children":[{"code":"230602","name":"萨尔图区"},{"code":"230603","name":"龙凤区"},{"code":"230604","name":"让胡路区"},{"code":"230605","name":"红岗区"},{"code":"230606","name":"大同区"},{"code":"230621","name":"肇州县"},{"code":"230622","name":"肇源县"},{"code":"230623","name":"林甸县"},{"code":"230624","name":"杜尔伯特蒙古族自治县"},{"code":"230671","name":"大庆高新技术产业开发区"}]},{"code":"2307","name":"伊春市","children":[{"code":"230717","name":"伊美区"},{"code":"230718","name":"乌翠区"},{"code":"230719","name":"友好区"},{"code":"230722","name":"嘉荫县"},{"code":"230723","name":"汤旺县"},{"code":"230724","name":"丰林县"},{"code":"230725","name":"大箐山县"},{"code":"230726","name":"南岔县"},{"code":"230751","name":"金林区"},{"code":"230781","name":"铁力市"}]},{"code":"2308","name":"佳木斯市","children":[{"code":"230803","name":"向阳区"},{"code":"230804","name":"前进区"},{"code":"230805","name":"东风区"},{"code":"230811","name":"郊区"},{"code":"230822","name":"桦南县"},{"code":"230826","name":"桦川县"},{"code":"230828","name":"汤原县"},{"code":"230881","name":"同江市"},{"code":"230882","name":"富锦市"},{"code":"230883","name":"抚远市"}]},{"code":"2309","name":"七台河市","children":[{"code":"230902","name":"新兴区"},{"code":"230903","name":"桃山区"},{"code":"230904","name":"茄子河区"},{"code":"230921","name":"勃利县"}]},{"code":"2310","name":"牡丹江市","children":[{"code":"231002","name":"东安区"},{"code":"231003","name":"阳明区"},{"code":"231004","name":"爱民区"},{"code":"231005","name":"西安区"},{"code":"231025","name":"林口县"},{"code":"231081","name":"绥芬河市"},{"code":"231083","name":"海林市"},{"code":"231084","name":"宁安市"},{"code":"231085","name":"穆棱市"},{"code":"231086","name":"东宁市"}]},{"code":"2311","name":"黑河市","children":[{"code":"231102","name":"爱辉区"},{"code":"231123","name":"逊克县"},{"code":"231124","name":"孙吴县"},{"code":"231181","name":"北安市"},{"code":"231182","name":"五大连池市"},{"code":"231183","name":"嫩江市"}]},{"code":"2312","name":"绥化市","children":[{"code":"231202","name":"北林区"},{"code":"231221","name":"望奎县"},{"code":"231222","name":"兰西县"},{"code":"231223","name":"青冈县"},{"code":"231224","name":"庆安县"},{"code":"231225","name":"明水县"},{"code":"231226","name":"绥棱县"},{"code":"231281","name":"安达市"},{"code":"231282","name":"肇东市"},{"code":"231283","name":"海伦市"}]},{"code":"2327","name":"大兴安岭地区","children":[{"code":"232701","name":"漠河市"},{"code":"232721","name":"呼玛县"},{"code":"232722","name":"塔河县"},{"code":"232761","name":"加格达奇区"},{"code":"232762","name":"松岭区"},{"code":"232763","name":"新林区"},{"code":"232764","name":"呼中区"}]}]},{"code":"31","name":"上海市","children":[{"code":"3101","name":"市辖区","children":[{"code":"310101","name":"黄浦区"},{"code":"310104","name":"徐汇区"},{"code":"310105","name":"长宁区"},{"code":"310106","name":"静安区"},{"code":"310107","name":"普陀区"},{"code":"310109","name":"虹口区"},{"code":"310110","name":"杨浦区"},{"code":"310112","name":"闵行区"},{"code":"310113","name":"宝山区"},{"code":"310114","name":"嘉定区"},{"code":"310115","name":"浦东新区"},{"code":"310116","name":"金山区"},{"code":"310117","name":"松江区"},{"code":"310118","name":"青浦区"},{"code":"310120","name":"奉贤区"},{"code":"310151","name":"崇明区"}]}]},{"code":"32","name":"江苏省","children":[{"code":"3201","name":"南京市","children":[{"code":"320102","name":"玄武区"},{"code":"320104","name":"秦淮区"},{"code":"320105","name":"建邺区"},{"code":"320106","name":"鼓楼区"},{"code":"320111","name":"浦口区"},{"code":"320113","name":"栖霞区"},{"code":"320114","name":"雨花台区"},{"code":"320115","name":"江宁区"},{"code":"320116","name":"六合区"},{"code":"320117","name":"溧水区"},{"code":"320118","name":"高淳区"}]},{"code":"3202","name":"无锡市","children":[{"code":"320205","name":"锡山区"},{"code":"320206","name":"惠山区"},{"code":"320211","name":"滨湖区"},{"code":"320213","name":"梁溪区"},{"code":"320214","name":"新吴区"},{"code":"320281","name":"江阴市"},{"code":"320282","name":"宜兴市"}]},{"code":"3203","name":"徐州市","children":[{"code":"320302","name":"鼓楼区"},{"code":"320303","name":"云龙区"},{"code":"320305","name":"贾汪区"},{"code":"320311","name":"泉山区"},{"code":"320312","name":"铜山区"},{"code":"320321","name":"丰县"},{"code":"320322","name":"沛县"},{"code":"320324","name":"睢宁县"},{"code":"320371","name":"徐州经济技术开发区"},{"code":"320381","name":"新沂市"},{"code":"320382","name":"邳州市"}]},{"code":"3204","name":"常州市","children":[{"code":"320402","name":"天宁区"},{"code":"320404","name":"钟楼区"},{"code":"320411","name":"新北区"},{"code":"320412","name":"武进区"},{"code":"320413","name":"金坛区"},{"code":"320481","name":"溧阳市"}]},{"code":"3205","name":"苏州市","children":[{"code":"320505","name":"虎丘区"},{"code":"320506","name":"吴中区"},{"code":"320507","name":"相城区"},{"code":"320508","name":"姑苏区"},{"code":"320509","name":"吴江区"},{"code":"320576","name":"苏州工业园区"},{"code":"320581","name":"常熟市"},{"code":"320582","name":"张家港市"},{"code":"320583","name":"昆山市"},{"code":"320585","name":"太仓市"}]},{"code":"3206","name":"南通市","children":[{"code":"320612","name":"通州区"},{"code":"320613","name":"崇川区"},{"code":"320614","name":"海门区"},{"code":"320623","name":"如东县"},{"code":"320671","name":"南通经济技术开发区"},{"code":"320681","name":"启东市"},{"code":"320682","name":"如皋市"},{"code":"320685","name":"海安市"}]},{"code":"3207","name":"连云港市","children":[{"code":"320703","name":"连云区"},{"code":"320706","name":"海州区"},{"code":"320707","name":"赣榆区"},{"code":"320722","name":"东海县"},{"code":"320723","name":"灌云县"},{"code":"320724","name":"灌南县"},{"code":"320771","name":"连云港经济技术开发区"}]},{"code":"3208","name":"淮安市","children":[{"code":"320803","name":"淮安区"},{"code":"320804","name":"淮阴区"},{"code":"320812","name":"清江浦区"},{"code":"320813","name":"洪泽区"},{"code":"320826","name":"涟水县"},{"code":"320830","name":"盱眙县"},{"code":"320831","name":"金湖县"},{"code":"320871","name":"淮安经济技术开发区"}]},{"code":"3209","name":"盐城市","children":[{"code":"320902","name":"亭湖区"},{"code":"320903","name":"盐都区"},{"code":"320904","name":"大丰区"},{"code":"320921","name":"响水县"},{"code":"320922","name":"滨海县"},{"code":"320923","name":"阜宁县"},{"code":"320924","name":"射阳县"},{"code":"320925","name":"建湖县"},{"code":"320971","name":"盐城经济技术开发区"},{"code":"320981","name":"东台市"}]},{"code":"3210","name":"扬州市","children":[{"code":"321002","name":"广陵区"},{"code":"321003","name":"邗江区"},{"code":"321012","name":"江都区"},{"code":"321023","name":"宝应县"},{"code":"321071","name":"扬州经济技术开发区"},{"code":"321081","name":"仪征市"},{"code":"321084","name":"高邮市"}]},{"code":"3211","name":"镇江市","children":[{"code":"321102","name":"京口区"},{"code":"321111","name":"润州区"},{"code":"321112","name":"丹徒区"},{"code":"321171","name":"镇江新区"},{"code":"321181","name":"丹阳市"},{"code":"321182","name":"扬中市"},{"code":"321183","name":"句容市"}]},{"code":"3212","name":"泰州市","children":[{"code":"321202","name":"海陵区"},{"code":"321203","name":"高港区"},{"code":"321204","name":"姜堰区"},{"code":"321281","name":"兴化市"},{"code":"321282","name":"靖江市"},{"code":"321283","name":"泰兴市"}]},{"code":"3213","name":"宿迁市","children":[{"code":"321302","name":"宿城区"},{"code":"321311","name":"宿豫区"},{"code":"321322","name":"沭阳县"},{"code":"321323","name":"泗阳县"},{"code":"321324","name":"泗洪县"},{"code":"321371","name":"宿迁经济技术开发区"}]}]},{"code":"33","name":"浙江省","children":[{"code":"3301","name":"杭州市","children":[{"code":"330102","name":"上城区"},{"code":"330105","name":"拱墅区"},{"code":"330106","name":"西湖区"},{"code":"330108","name":"滨江区"},{"code":"330109","name":"萧山区"},{"code":"330110","name":"余杭区"},{"code":"330111","name":"富阳区"},{"code":"330112","name":"临安区"},{"code":"330113","name":"临平区"},{"code":"330114","name":"钱塘区"},{"code":"330122","name":"桐庐县"},{"code":"330127","name":"淳安县"},{"code":"330182","name":"建德市"}]},{"code":"3302","name":"宁波市","children":[{"code":"330203","name":"海曙区"},{"code":"330205","name":"江北区"},{"code":"330206","name":"北仑区"},{"code":"330211","name":"镇海区"},{"code":"330212","name":"鄞州区"},{"code":"330213","name":"奉化区"},{"code":"330225","name":"象山县"},{"code":"330226","name":"宁海县"},{"code":"330281","name":"余姚市"},{"code":"330282","name":"慈溪市"}]},{"code":"3303","name":"温州市","children":[{"code":"330302","name":"鹿城区"},{"code":"330303","name":"龙湾区"},{"code":"330304","name":"瓯海区"},{"code":"330305","name":"洞头区"},{"code":"330324","name":"永嘉县"},{"code":"330326","name":"平阳县"},{"code":"330327","name":"苍南县"},{"code":"330328","name":"文成县"},{"code":"330329","name":"泰顺县"},{"code":"330381","name":"瑞安市"},{"code":"330382","name":"乐清市"},{"code":"330383","name":"龙港市"}]},{"code":"3304","name":"嘉兴市","children":[{"code":"330402","name":"南湖区"},{"code":"330411","name":"秀洲区"},{"code":"330421","name":"嘉善县"},{"code":"330424","name":"海盐县"},{"code":"330481","name":"海宁市"},{"code":"330482","name":"平湖市"},{"code":"330483","name":"桐乡市"}]},{"code":"3305","name":"湖州市","children":[{"code":"330502","name":"吴兴区"},{"code":"330503","name":"南浔区"},{"code":"330521","name":"德清县"},{"code":"330522","name":"长兴县"},{"code":"330523","name":"安吉县"}]},{"code":"3306","name":"绍兴市","children":[{"code":"330602","name":"越城区"},{"code":"330603","name":"柯桥区"},{"code":"330604","name":"上虞区"},{"code":"330624","name":"新昌县"},{"code":"330681","name":"诸暨市"},{"code":"330683","name":"嵊州市"}]},{"code":"3307","name":"金华市","children":[{"code":"330702","name":"婺城区"},{"code":"330703","name":"金东区"},{"code":"330723","name":"武义县"},{"code":"330726","name":"浦江县"},{"code":"330727","name":"磐安县"},{"code":"330781","name":"兰溪市"},{"code":"330782","name":"义乌市"},{"code":"330783","name":"东阳市"},{"code":"330784","name":"永康市"}]},{"code":"3308","name":"衢州市","children":[{"code":"330802","name":"柯城区"},{"code":"330803","name":"衢江区"},{"code":"330822","name":"常山县"},{"code":"330824","name":"开化县"},{"code":"330825","name":"龙游县"},{"code":"330881","name":"江山市"}]},{"code":"3309","name":"舟山市","children":[{"code":"330902","name":"定海区"},{"code":"330903","name":"普陀区"},{"code":"330921","name":"岱山县"},{"code":"330922","name":"嵊泗县"}]},{"code":"3310","name":"台州市","children":[{"code":"331002","name":"椒江区"},{"code":"331003","name":"黄岩区"},{"code":"331004","name":"路桥区"},{"code":"331022","name":"三门县"},{"code":"331023","name":"天台县"},{"code":"331024","name":"仙居县"},{"code":"331081","name":"温岭市"},{"code":"331082","name":"临海市"},{"code":"331083","name":"玉环市"}]},{"code":"3311","name":"丽水市","children":[{"code":"331102","name":"莲都区"},{"code":"331121","name":"青田县"},{"code":"331122","name":"缙云县"},{"code":"331123","name":"遂昌县"},{"code":"331124","name":"松阳县"},{"code":"331125","name":"云和县"},{"code":"331126","name":"庆元县"},{"code":"331127","name":"景宁畲族自治县"},{"code":"331181","name":"龙泉市"}]}]},{"code":"34","name":"安徽省","children":[{"code":"3401","name":"合肥市","children":[{"code":"340102","name":"瑶海区"},{"code":"340103","name":"庐阳区"},{"code":"340104","name":"蜀山区"},{"code":"340111","name":"包河区"},{"code":"340121","name":"长丰县"},{"code":"340122","name":"肥东县"},{"code":"340123","name":"肥西县"},{"code":"340124","name":"庐江县"},{"code":"340176","name":"合肥高新技术产业开发区"},{"code":"340177","name":"合肥经济技术开发区"},{"code":"340178","name":"合肥新站高新技术产业开发区"},{"code":"340181","name":"巢湖市"}]},{"code":"3402","name":"芜湖市","children":[{"code":"340202","name":"镜湖区"},{"code":"340207","name":"鸠江区"},{"code":"340209","name":"弋江区"},{"code":"340210","name":"湾沚区"},{"code":"340212","name":"繁昌区"},{"code":"340223","name":"南陵县"},{"code":"340271","name":"芜湖经济技术开发区"},{"code":"340272","name":"安徽芜湖三山经济开发区"},{"code":"340281","name":"无为市"}]},{"code":"3403","name":"蚌埠市","children":[{"code":"340302","name":"龙子湖区"},{"code":"340303","name":"蚌山区"},{"code":"340304","name":"禹会区"},{"code":"340311","name":"淮上区"},{"code":"340321","name":"怀远县"},{"code":"340322","name":"五河县"},{"code":"340323","name":"固镇县"},{"code":"340371","name":"蚌埠市高新技术开发区"},{"code":"340372","name":"蚌埠市经济开发区"}]},{"code":"3404","name":"淮南市","children":[{"code":"340402","name":"大通区"},{"code":"340403","name":"田家庵区"},{"code":"340404","name":"谢家集区"},{"code":"340405","name":"八公山区"},{"code":"340406","name":"潘集区"},{"code":"340421","name":"凤台县"},{"code":"340422","name":"寿县"}]},{"code":"3405","name":"马鞍山市","children":[{"code":"340503","name":"花山区"},{"code":"340504","name":"雨山区"},{"code":"340506","name":"博望区"},{"code":"340521","name":"当涂县"},{"code":"340522","name":"含山县"},{"code":"340523","name":"和县"}]},{"code":"3406","name":"淮北市","children":[{"code":"340602","name":"杜集区"},{"code":"340603","name":"相山区"},{"code":"340604","name":"烈山区"},{"code":"340621","name":"濉溪县"}]},{"code":"3407","name":"铜陵市","children":[{"code":"340705","name":"铜官区"},{"code":"340706","name":"义安区"},{"code":"340711","name":"郊区"},{"code":"340722","name":"枞阳县"}]},{"code":"3408","name":"安庆市","children":[{"code":"340802","name":"迎江区"},{"code":"340803","name":"大观区"},{"code":"340811","name":"宜秀区"},{"code":"340822","name":"怀宁县"},{"code":"340825","name":"太湖县"},{"code":"340826","name":"宿松县"},{"code":"340827","name":"望江县"},{"code":"340828","name":"岳西县"},{"code":"340871","name":"安徽安庆经济开发区"},{"code":"340881","name":"桐城市"},{"code":"340882","name":"潜山市"}]},{"code":"3410","name":"黄山市","children":[{"code":"341002","name":"屯溪区"},{"code":"341003","name":"黄山区"},{"code":"341004","name":"徽州区"},{"code":"341021","name":"歙县"},{"code":"341022","name":"休宁县"},{"code":"341023","name":"黟县"},{"code":"341024","name":"祁门县"}]},{"code":"3411","name":"滁州市","children":[{"code":"341102","name":"琅琊区"},{"code":"341103","name":"南谯区"},{"code":"341122","name":"来安县"},{"code":"341124","name":"全椒县"},{"code":"341125","name":"定远县"},{"code":"341126","name":"凤阳县"},{"code":"341171","name":"中新苏滁高新技术产业开发区"},{"code":"341172","name":"滁州经济技术开发区"},{"code":"341181","name":"天长市"},{"code":"341182","name":"明光市"}]},{"code":"3412","name":"阜阳市","children":[{"code":"341202","name":"颍州区"},{"code":"341203","name":"颍东区"},{"code":"341204","name":"颍泉区"},{"code":"341221","name":"临泉县"},{"code":"341222","name":"太和县"},{"code":"341225","name":"阜南县"},{"code":"341226","name":"颍上县"},{"code":"341271","name":"阜阳合肥现代产业园区"},{"code":"341272","name":"阜阳经济技术开发区"},{"code":"341282","name":"界首市"}]},{"code":"3413","name":"宿州市","children":[{"code":"341302","name":"埇桥区"},{"code":"341321","name":"砀山县"},{"code":"341322","name":"萧县"},{"code":"341323","name":"灵璧县"},{"code":"341324","name":"泗县"},{"code":"341371","name":"宿州马鞍山现代产业园区"},{"code":"341372","name":"宿州经济技术开发区"}]},{"code":"3415","name":"六安市","children":[{"code":"341502","name":"金安区"},{"code":"341503","name":"裕安区"},{"code":"341504","name":"叶集区"},{"code":"341522","name":"霍邱县"},{"code":"341523","name":"舒城县"},{"code":"341524","name":"金寨县"},{"code":"341525","name":"霍山县"}]},{"code":"3416","name":"亳州市","children":[{"code":"341602","name":"谯城区"},{"code":"341621","name":"涡阳县"},{"code":"341622","name":"蒙城县"},{"code":"341623","name":"利辛县"}]},{"code":"3417","name":"池州市","children":[{"code":"341702","name":"贵池区"},{"code":"341721","name":"东至县"},{"code":"341722","name":"石台县"},{"code":"341723","name":"青阳县"}]},{"code":"3418","name":"宣城市","children":[{"code":"341802","name":"宣州区"},{"code":"341821","name":"郎溪县"},{"code":"341823","name":"泾县"},{"code":"341824","name":"绩溪县"},{"code":"341825","name":"旌德县"},{"code":"341871","name":"宣城市经济开发区"},{"code":"341881","name":"宁国市"},{"code":"341882","name":"广德市"}]}]},{"code":"35","name":"福建省","children":[{"code":"3501","name":"福州市","children":[{"code":"350102","name":"鼓楼区"},{"code":"350103","name":"台江区"},{"code":"350104","name":"仓山区"},{"code":"350105","name":"马尾区"},{"code":"350111","name":"晋安区"},{"code":"350112","name":"长乐区"},{"code":"350121","name":"闽侯县"},{"code":"350122","name":"连江县"},{"code":"350123","name":"罗源县"},{"code":"350124","name":"闽清县"},{"code":"350125","name":"永泰县"},{"code":"350128","name":"平潭县"},{"code":"350181","name":"福清市"}]},{"code":"3502","name":"厦门市","children":[{"code":"350203","name":"思明区"},{"code":"350205","name":"海沧区"},{"code":"350206","name":"湖里区"},{"code":"350211","name":"集美区"},{"code":"350212","name":"同安区"},{"code":"350213","name":"翔安区"}]},{"code":"3503","name":"莆田市","children":[{"code":"350302","name":"城厢区"},{"code":"350303","name":"涵江区"},{"code":"350304","name":"荔城区"},{"code":"350305","name":"秀屿区"},{"code":"350322","name":"仙游县"}]},{"code":"3504","name":"三明市","children":[{"code":"350404","name":"三元区"},{"code":"350405","name":"沙县区"},{"code":"350421","name":"明溪县"},{"code":"350423","name":"清流县"},{"code":"350424","name":"宁化县"},{"code":"350425","name":"大田县"},{"code":"350426","name":"尤溪县"},{"code":"350428","name":"将乐县"},{"code":"350429","name":"泰宁县"},{"code":"350430","name":"建宁县"},{"code":"350481","name":"永安市"}]},{"code":"3505","name":"泉州市","children":[{"code":"350502","name":"鲤城区"},{"code":"350503","name":"丰泽区"},{"code":"350504","name":"洛江区"},{"code":"350505","name":"泉港区"},{"code":"350521","name":"惠安县"},{"code":"350524","name":"安溪县"},{"code":"350525","name":"永春县"},{"code":"350526","name":"德化县"},{"code":"350527","name":"金门县"},{"code":"350581","name":"石狮市"},{"code":"350582","name":"晋江市"},{"code":"350583","name":"南安市"}]},{"code":"3506","name":"漳州市","children":[{"code":"350602","name":"芗城区"},{"code":"350603","name":"龙文区"},{"code":"350604","name":"龙海区"},{"code":"350605","name":"长泰区"},{"code":"350622","name":"云霄县"},{"code":"350623","name":"漳浦县"},{"code":"350624","name":"诏安县"},{"code":"350626","name":"东山县"},{"code":"350627","name":"南靖县"},{"code":"350628","name":"平和县"},{"code":"350629","name":"华安县"}]},{"code":"3507","name":"南平市","children":[{"code":"350702","name":"延平区"},{"code":"350703","name":"建阳区"},{"code":"350721","name":"顺昌县"},{"code":"350722","name":"浦城县"},{"code":"350723","name":"光泽县"},{"code":"350724","name":"松溪县"},{"code":"350725","name":"政和县"},{"code":"350781","name":"邵武市"},{"code":"350782","name":"武夷山市"},{"code":"350783","name":"建瓯市"}]},{"code":"3508","name":"龙岩市","children":[{"code":"350802","name":"新罗区"},{"code":"350803","name":"永定区"},{"code":"350821","name":"长汀县"},{"code":"350823","name":"上杭县"},{"code":"350824","name":"武平县"},{"code":"350825","name":"连城县"},{"code":"350881","name":"漳平市"}]},{"code":"3509","name":"宁德市","children":[{"code":"350902","name":"蕉城区"},{"code":"350921","name":"霞浦县"},{"code":"350922","name":"古田县"},{"code":"350923","name":"屏南县"},{"code":"350924","name":"寿宁县"},{"code":"350925","name":"周宁县"},{"code":"350926","name":"柘荣县"},{"code":"350981","name":"福安市"},{"code":"350982","name":"福鼎市"}]}]},{"code":"36","name":"江西省","children":[{"code":"3601","name":"南昌市","children":[{"code":"360102","name":"东湖区"},{"code":"360103","name":"西湖区"},{"code":"360104","name":"青云谱区"},{"code":"360111","name":"青山湖区"},{"code":"360112","name":"新建区"},{"code":"360113","name":"红谷滩区"},{"code":"360121","name":"南昌县"},{"code":"360123","name":"安义县"},{"code":"360124","name":"进贤县"}]},{"code":"3602","name":"景德镇市","children":[{"code":"360202","name":"昌江区"},{"code":"360203","name":"珠山区"},{"code":"360222","name":"浮梁县"},{"code":"360281","name":"乐平市"}]},{"code":"3603","name":"萍乡市","children":[{"code":"360302","name":"安源区"},{"code":"360313","name":"湘东区"},{"code":"360321","name":"莲花县"},{"code":"360322","name":"上栗县"},{"code":"360323","name":"芦溪县"}]},{"code":"3604","name":"九江市","children":[{"code":"360402","name":"濂溪区"},{"code":"360403","name":"浔阳区"},{"code":"360404","name":"柴桑区"},{"code":"360423","name":"武宁县"},{"code":"360424","name":"修水县"},{"code":"360425","name":"永修县"},{"code":"360426","name":"德安县"},{"code":"360428","name":"都昌县"},{"code":"360429","name":"湖口县"},{"code":"360430","name":"彭泽县"},{"code":"360481","name":"瑞昌市"},{"code":"360482","name":"共青城市"},{"code":"360483","name":"庐山市"}]},{"code":"3605","name":"新余市","children":[{"code":"360502","name":"渝水区"},{"code":"360521","name":"分宜县"}]},{"code":"3606","name":"鹰潭市","children":[{"code":"360602","name":"月湖区"},{"code":"360603","name":"余江区"},{"code":"360681","name":"贵溪市"}]},{"code":"3607","name":"赣州市","children":[{"code":"360702","name":"章贡区"},{"code":"360703","name":"南康区"},{"code":"360704","name":"赣县区"},{"code":"360722","name":"信丰县"},{"code":"360723","name":"大余县"},{"code":"360724","name":"上犹县"},{"code":"360725","name":"崇义县"},{"code":"360726","name":"安远县"},{"code":"360728","name":"定南县"},{"code":"360729","name":"全南县"},{"code":"360730","name":"宁都县"},{"code":"360731","name":"于都县"},{"code":"360732","name":"兴国县"},{"code":"360733","name":"会昌县"},{"code":"360734","name":"寻乌县"},{"code":"360735","name":"石城县"},{"code":"360781","name":"瑞金市"},{"code":"360783","name":"龙南市"}]},{"code":"3608","name":"吉安市","children":[{"code":"360802","name":"吉州区"},{"code":"360803","name":"青原区"},{"code":"360821","name":"吉安县"},{"code":"360822","name":"吉水县"},{"code":"360823","name":"峡江县"},{"code":"360824","name":"新干县"},{"code":"360825","name":"永丰县"},{"code":"360826","name":"泰和县"},{"code":"360827","name":"遂川县"},{"code":"360828","name":"万安县"},{"code":"360829","name":"安福县"},{"code":"360830","name":"永新县"},{"code":"360881","name":"井冈山市"}]},{"code":"3609","name":"宜春市","children":[{"code":"360902","name":"袁州区"},{"code":"360921","name":"奉新县"},{"code":"360922","name":"万载县"},{"code":"360923","name":"上高县"},{"code":"360924","name":"宜丰县"},{"code":"360925","name":"靖安县"},{"code":"360926","name":"铜鼓县"},{"code":"360981","name":"丰城市"},{"code":"360982","name":"樟树市"},{"code":"360983","name":"高安市"}]},{"code":"3610","name":"抚州市","children":[{"code":"361002","name":"临川区"},{"code":"361003","name":"东乡区"},{"code":"361021","name":"南城县"},{"code":"361022","name":"黎川县"},{"code":"361023","name":"南丰县"},{"code":"361024","name":"崇仁县"},{"code":"361025","name":"乐安县"},{"code":"361026","name":"宜黄县"},{"code":"361027","name":"金溪县"},{"code":"361028","name":"资溪县"},{"code":"361030","name":"广昌县"}]},{"code":"3611","name":"上饶市","children":[{"code":"361102","name":"信州区"},{"code":"361103","name":"广丰区"},{"code":"361104","name":"广信区"},{"code":"361123","name":"玉山县"},{"code":"361124","name":"铅山县"},{"code":"361125","name":"横峰县"},{"code":"361126","name":"弋阳县"},{"code":"361127","name":"余干县"},{"code":"361128","name":"鄱阳县"},{"code":"361129","name":"万年县"},{"code":"361130","name":"婺源县"},{"code":"361181","name":"德兴市"}]}]},{"code":"37","name":"山东省","children":[{"code":"3701","name":"济南市","children":[{"code":"370102","name":"历下区"},{"code":"370103","name":"市中区"},{"code":"370104","name":"槐荫区"},{"code":"370105","name":"天桥区"},{"code":"370112","name":"历城区"},{"code":"370113","name":"长清区"},{"code":"370114","name":"章丘区"},{"code":"370115","name":"济阳区"},{"code":"370116","name":"莱芜区"},{"code":"370117","name":"钢城区"},{"code":"370124","name":"平阴县"},{"code":"370126","name":"商河县"},{"code":"370176","name":"济南高新技术产业开发区"}]},{"code":"3702","name":"青岛市","children":[{"code":"370202","name":"市南区"},{"code":"370203","name":"市北区"},{"code":"370211","name":"黄岛区"},{"code":"370212","name":"崂山区"},{"code":"370213","name":"李沧区"},{"code":"370214","name":"城阳区"},{"code":"370215","name":"即墨区"},{"code":"370281","name":"胶州市"},{"code":"370283","name":"平度市"},{"code":"370285","name":"莱西市"}]},{"code":"3703","name":"淄博市","children":[{"code":"370302","name":"淄川区"},{"code":"370303","name":"张店区"},{"code":"370304","name":"博山区"},{"code":"370305","name":"临淄区"},{"code":"370306","name":"周村区"},{"code":"370321","name":"桓台县"},{"code":"370322","name":"高青县"},{"code":"370323","name":"沂源县"}]},{"code":"3704","name":"枣庄市","children":[{"code":"370402","name":"市中区"},{"code":"370403","name":"薛城区"},{"code":"370404","name":"峄城区"},{"code":"370405","name":"台儿庄区"},{"code":"370406","name":"山亭区"},{"code":"370481","name":"滕州市"}]},{"code":"3705","name":"东营市","children":[{"code":"370502","name":"东营区"},{"code":"370503","name":"河口区"},{"code":"370505","name":"垦利区"},{"code":"370522","name":"利津县"},{"code":"370523","name":"广饶县"},{"code":"370571","name":"东营经济技术开发区"},{"code":"370572","name":"东营港经济开发区"}]},{"code":"3706","name":"烟台市","children":[{"code":"370602","name":"芝罘区"},{"code":"370611","name":"福山区"},{"code":"370612","name":"牟平区"},{"code":"370613","name":"莱山区"},{"code":"370614","name":"蓬莱区"},{"code":"370671","name":"烟台高新技术产业开发区"},{"code":"370676","name":"烟台经济技术开发区"},{"code":"370681","name":"龙口市"},{"code":"370682","name":"莱阳市"},{"code":"370683","name":"莱州市"},{"code":"370685","name":"招远市"},{"code":"370686","name":"栖霞市"},{"code":"370687","name":"海阳市"}]},{"code":"3707","name":"潍坊市","children":[{"code":"370702","name":"潍城区"},{"code":"370703","name":"寒亭区"},{"code":"370704","name":"坊子区"},{"code":"370705","name":"奎文区"},{"code":"370724","name":"临朐县"},{"code":"370725","name":"昌乐县"},{"code":"370772","name":"潍坊滨海经济技术开发区"},{"code":"370781","name":"青州市"},{"code":"370782","name":"诸城市"},{"code":"370783","name":"寿光市"},{"code":"370784","name":"安丘市"},{"code":"370785","name":"高密市"},{"code":"370786","name":"昌邑市"}]},{"code":"3708","name":"济宁市","children":[{"code":"370811","name":"任城区"},{"code":"370812","name":"兖州区"},{"code":"370826","name":"微山县"},{"code":"370827","name":"鱼台县"},{"code":"370828","name":"金乡县"},{"code":"370829","name":"嘉祥县"},{"code":"370830","name":"汶上县"},{"code":"370831","name":"泗水县"},{"code":"370832","name":"梁山县"},{"code":"370871","name":"济宁高新技术产业开发区"},{"code":"370881","name":"曲阜市"},{"code":"370883","name":"邹城市"}]},{"code":"3709","name":"泰安市","children":[{"code":"370902","name":"泰山区"},{"code":"370911","name":"岱岳区"},{"code":"370921","name":"宁阳县"},{"code":"370923","name":"东平县"},{"code":"370982","name":"新泰市"},{"code":"370983","name":"肥城市"}]},{"code":"3710","name":"威海市","children":[{"code":"371002","name":"环翠区"},{"code":"371003","name":"文登区"},{"code":"371071","name":"威海火炬高技术产业开发区"},{"code":"371072","name":"威海经济技术开发区"},{"code":"371073","name":"威海临港经济技术开发区"},{"code":"371082","name":"荣成市"},{"code":"371083","name":"乳山市"}]},{"code":"3711","name":"日照市","children":[{"code":"371102","name":"东港区"},{"code":"371103","name":"岚山区"},{"code":"371121","name":"五莲县"},{"code":"371122","name":"莒县"},{"code":"371171","name":"日照经济技术开发区"}]},{"code":"3713","name":"临沂市","children":[{"code":"371302","name":"兰山区"},{"code":"371311","name":"罗庄区"},{"code":"371312","name":"河东区"},{"code":"371321","name":"沂南县"},{"code":"371322","name":"郯城县"},{"code":"371323","name":"沂水县"},{"code":"371324","name":"兰陵县"},{"code":"371325","name":"费县"},{"code":"371326","name":"平邑县"},{"code":"371327","name":"莒南县"},{"code":"371328","name":"蒙阴县"},{"code":"371329","name":"临沭县"},{"code":"371371","name":"临沂高新技术产业开发区"}]},{"code":"3714","name":"德州市","children":[{"code":"371402","name":"德城区"},{"code":"371403","name":"陵城区"},{"code":"371422","name":"宁津县"},{"code":"371423","name":"庆云县"},{"code":"371424","name":"临邑县"},{"code":"371425","name":"齐河县"},{"code":"371426","name":"平原县"},{"code":"371427","name":"夏津县"},{"code":"371428","name":"武城县"},{"code":"371471","name":"德州天衢新区"},{"code":"371481","name":"乐陵市"},{"code":"371482","name":"禹城市"}]},{"code":"3715","name":"聊城市","children":[{"code":"371502","name":"东昌府区"},{"code":"371503","name":"茌平区"},{"code":"371521","name":"阳谷县"},{"code":"371522","name":"莘县"},{"code":"371524","name":"东阿县"},{"code":"371525","name":"冠县"},{"code":"371526","name":"高唐县"},{"code":"371581","name":"临清市"}]},{"code":"3716","name":"滨州市","children":[{"code":"371602","name":"滨城区"},{"code":"371603","name":"沾化区"},{"code":"371621","name":"惠民县"},{"code":"371622","name":"阳信县"},{"code":"371623","name":"无棣县"},{"code":"371625","name":"博兴县"},{"code":"371681","name":"邹平市"}]},{"code":"3717","name":"菏泽市","children":[{"code":"371702","name":"牡丹区"},{"code":"371703","name":"定陶区"},{"code":"371721","name":"曹县"},{"code":"371722","name":"单县"},{"code":"371723","name":"成武县"},{"code":"371724","name":"巨野县"},{"code":"371725","name":"郓城县"},{"code":"371726","name":"鄄城县"},{"code":"371728","name":"东明县"},{"code":"371771","name":"菏泽经济技术开发区"},{"code":"371772","name":"菏泽高新技术开发区"}]}]},{"code":"41","name":"河南省","children":[{"code":"4101","name":"郑州市","children":[{"code":"410102","name":"中原区"},{"code":"410103","name":"二七区"},{"code":"410104","name":"管城回族区"},{"code":"410105","name":"金水区"},{"code":"410106","name":"上街区"},{"code":"410108","name":"惠济区"},{"code":"410122","name":"中牟县"},{"code":"410171","name":"郑州经济技术开发区"},{"code":"410172","name":"郑州高新技术产业开发区"},{"code":"410173","name":"郑州航空港经济综合实验区"},{"code":"410181","name":"巩义市"},{"code":"410182","name":"荥阳市"},{"code":"410183","name":"新密市"},{"code":"410184","name":"新郑市"},{"code":"410185","name":"登封市"}]},{"code":"4102","name":"开封市","children":[{"code":"410202","name":"龙亭区"},{"code":"410203","name":"顺河回族区"},{"code":"410204","name":"鼓楼区"},{"code":"410205","name":"禹王台区"},{"code":"410212","name":"祥符区"},{"code":"410221","name":"杞县"},{"code":"410222","name":"通许县"},{"code":"410223","name":"尉氏县"},{"code":"410225","name":"兰考县"}]},{"code":"4103","name":"洛阳市","children":[{"code":"410302","name":"老城区"},{"code":"410303","name":"西工区"},{"code":"410304","name":"瀍河回族区"},{"code":"410305","name":"涧西区"},{"code":"410307","name":"偃师区"},{"code":"410308","name":"孟津区"},{"code":"410311","name":"洛龙区"},{"code":"410323","name":"新安县"},{"code":"410324","name":"栾川县"},{"code":"410325","name":"嵩县"},{"code":"410326","name":"汝阳县"},{"code":"410327","name":"宜阳县"},{"code":"410328","name":"洛宁县"},{"code":"410329","name":"伊川县"},{"code":"410371","name":"洛阳高新技术产业开发区"}]},{"code":"4104","name":"平顶山市","children":[{"code":"410402","name":"新华区"},{"code":"410403","name":"卫东区"},{"code":"410404","name":"石龙区"},{"code":"410411","name":"湛河区"},{"code":"410421","name":"宝丰县"},{"code":"410422","name":"叶县"},{"code":"410423","name":"鲁山县"},{"code":"410425","name":"郏县"},{"code":"410471","name":"平顶山高新技术产业开发区"},{"code":"410472","name":"平顶山市城乡一体化示范区"},{"code":"410481","name":"舞钢市"},{"code":"410482","name":"汝州市"}]},{"code":"4105","name":"安阳市","children":[{"code":"410502","name":"文峰区"},{"code":"410503","name":"北关区"},{"code":"410505","name":"殷都区"},{"code":"410506","name":"龙安区"},{"code":"410522","name":"安阳县"},{"code":"410523","name":"汤阴县"},{"code":"410526","name":"滑县"},{"code":"410527","name":"内黄县"},{"code":"410571","name":"安阳高新技术产业开发区"},{"code":"410581","name":"林州市"}]},{"code":"4106","name":"鹤壁市","children":[{"code":"410602","name":"鹤山区"},{"code":"410603","name":"山城区"},{"code":"410611","name":"淇滨区"},{"code":"410621","name":"浚县"},{"code":"410622","name":"淇县"},{"code":"410671","name":"鹤壁经济技术开发区"}]},{"code":"4107","name":"新乡市","children":[{"code":"410702","name":"红旗区"},{"code":"410703","name":"卫滨区"},{"code":"410704","name":"凤泉区"},{"code":"410711","name":"牧野区"},{"code":"410721","name":"新乡县"},{"code":"410724","name":"获嘉县"},{"code":"410725","name":"原阳县"},{"code":"410726","name":"延津县"},{"code":"410727","name":"封丘县"},{"code":"410771","name":"新乡高新技术产业开发区"},{"code":"410772","name":"新乡经济技术开发区"},{"code":"410773","name":"新乡市平原城乡一体化示范区"},{"code":"410781","name":"卫辉市"},{"code":"410782","name":"辉县市"},{"code":"410783","name":"长垣市"}]},{"code":"4108","name":"焦作市","children":[{"code":"410802","name":"解放区"},{"code":"410803","name":"中站区"},{"code":"410804","name":"马村区"},{"code":"410811","name":"山阳区"},{"code":"410821","name":"修武县"},{"code":"410822","name":"博爱县"},{"code":"410823","name":"武陟县"},{"code":"410825","name":"温县"},{"code":"410871","name":"焦作城乡一体化示范区"},{"code":"410882","name":"沁阳市"},{"code":"410883","name":"孟州市"}]},{"code":"4109","name":"濮阳市","children":[{"code":"410902","name":"华龙区"},{"code":"410922","name":"清丰县"},{"code":"410923","name":"南乐县"},{"code":"410926","name":"范县"},{"code":"410927","name":"台前县"},{"code":"410928","name":"濮阳县"},{"code":"410971","name":"河南濮阳工业园区"},{"code":"410972","name":"濮阳经济技术开发区"}]},{"code":"4110","name":"许昌市","children":[{"code":"411002","name":"魏都区"},{"code":"411003","name":"建安区"},{"code":"411024","name":"鄢陵县"},{"code":"411025","name":"襄城县"},{"code":"411071","name":"许昌经济技术开发区"},{"code":"411081","name":"禹州市"},{"code":"411082","name":"长葛市"}]},{"code":"4111","name":"漯河市","children":[{"code":"411102","name":"源汇区"},{"code":"411103","name":"郾城区"},{"code":"411104","name":"召陵区"},{"code":"411121","name":"舞阳县"},{"code":"411122","name":"临颍县"},{"code":"411171","name":"漯河经济技术开发区"}]},{"code":"4112","name":"三门峡市","children":[{"code":"411202","name":"湖滨区"},{"code":"411203","name":"陕州区"},{"code":"411221","name":"渑池县"},{"code":"411224","name":"卢氏县"},{"code":"411271","name":"河南三门峡经济开发区"},{"code":"411281","name":"义马市"},{"code":"411282","name":"灵宝市"}]},{"code":"4113","name":"南阳市","children":[{"code":"411302","name":"宛城区"},{"code":"411303","name":"卧龙区"},{"code":"411321","name":"南召县"},{"code":"411322","name":"方城县"},{"code":"411323","name":"西峡县"},{"code":"411324","name":"镇平县"},{"code":"411325","name":"内乡县"},{"code":"411326","name":"淅川县"},{"code":"411327","name":"社旗县"},{"code":"411328","name":"唐河县"},{"code":"411329","name":"新野县"},{"code":"411330","name":"桐柏县"},{"code":"411371","name":"南阳高新技术产业开发区"},{"code":"411372","name":"南阳市城乡一体化示范区"},{"code":"411381","name":"邓州市"}]},{"code":"4114","name":"商丘市","children":[{"code":"411402","name":"梁园区"},{"code":"411403","name":"睢阳区"},{"code":"411421","name":"民权县"},{"code":"411422","name":"睢县"},{"code":"411423","name":"宁陵县"},{"code":"411424","name":"柘城县"},{"code":"411425","name":"虞城县"},{"code":"411426","name":"夏邑县"},{"code":"411471","name":"豫东综合物流产业聚集区"},{"code":"411472","name":"河南商丘经济开发区"},{"code":"411481","name":"永城市"}]},{"code":"4115","name":"信阳市","children":[{"code":"411502","name":"浉河区"},{"code":"411503","name":"平桥区"},{"code":"411521","name":"罗山县"},{"code":"411522","name":"光山县"},{"code":"411523","name":"新县"},{"code":"411524","name":"商城县"},{"code":"411525","name":"固始县"},{"code":"411526","name":"潢川县"},{"code":"411527","name":"淮滨县"},{"code":"411528","name":"息县"},{"code":"411571","name":"信阳高新技术产业开发区"}]},{"code":"4116","name":"周口市","children":[{"code":"411602","name":"川汇区"},{"code":"411603","name":"淮阳区"},{"code":"411621","name":"扶沟县"},{"code":"411622","name":"西华县"},{"code":"411623","name":"商水县"},{"code":"411624","name":"沈丘县"},{"code":"411625","name":"郸城县"},{"code":"411627","name":"太康县"},{"code":"411628","name":"鹿邑县"},{"code":"411671","name":"周口临港开发区"},{"code":"411681","name":"项城市"}]},{"code":"4117","name":"驻马店市","children":[{"code":"411702","name":"驿城区"},{"code":"411721","name":"西平县"},{"code":"411722","name":"上蔡县"},{"code":"411723","name":"平舆县"},{"code":"411724","name":"正阳县"},{"code":"411725","name":"确山县"},{"code":"411726","name":"泌阳县"},{"code":"411727","name":"汝南县"},{"code":"411728","name":"遂平县"},{"code":"411729","name":"新蔡县"},{"code":"411771","name":"河南驻马店经济开发区"}]},{"code":"4190","name":"省直辖县级行政区划","children":[{"code":"419001","name":"济源市"}]}]},{"code":"42","name":"湖北省","children":[{"code":"4201","name":"武汉市","children":[{"code":"420102","name":"江岸区"},{"code":"420103","name":"江汉区"},{"code":"420104","name":"硚口区"},{"code":"420105","name":"汉阳区"},{"code":"420106","name":"武昌区"},{"code":"420107","name":"青山区"},{"code":"420111","name":"洪山区"},{"code":"420112","name":"东西湖区"},{"code":"420113","name":"汉南区"},{"code":"420114","name":"蔡甸区"},{"code":"420115","name":"江夏区"},{"code":"420116","name":"黄陂区"},{"code":"420117","name":"新洲区"}]},{"code":"4202","name":"黄石市","children":[{"code":"420202","name":"黄石港区"},{"code":"420203","name":"西塞山区"},{"code":"420204","name":"下陆区"},{"code":"420205","name":"铁山区"},{"code":"420222","name":"阳新县"},{"code":"420281","name":"大冶市"}]},{"code":"4203","name":"十堰市","children":[{"code":"420302","name":"茅箭区"},{"code":"420303","name":"张湾区"},{"code":"420304","name":"郧阳区"},{"code":"420322","name":"郧西县"},{"code":"420323","name":"竹山县"},{"code":"420324","name":"竹溪县"},{"code":"420325","name":"房县"},{"code":"420381","name":"丹江口市"}]},{"code":"4205","name":"宜昌市","children":[{"code":"420502","name":"西陵区"},{"code":"420503","name":"伍家岗区"},{"code":"420504","name":"点军区"},{"code":"420505","name":"猇亭区"},{"code":"420506","name":"夷陵区"},{"code":"420525","name":"远安县"},{"code":"420526","name":"兴山县"},{"code":"420527","name":"秭归县"},{"code":"420528","name":"长阳土家族自治县"},{"code":"420529","name":"五峰土家族自治县"},{"code":"420581","name":"宜都市"},{"code":"420582","name":"当阳市"},{"code":"420583","name":"枝江市"}]},{"code":"4206","name":"襄阳市","children":[{"code":"420602","name":"襄城区"},{"code":"420606","name":"樊城区"},{"code":"420607","name":"襄州区"},{"code":"420624","name":"南漳县"},{"code":"420625","name":"谷城县"},{"code":"420626","name":"保康县"},{"code":"420682","name":"老河口市"},{"code":"420683","name":"枣阳市"},{"code":"420684","name":"宜城市"}]},{"code":"4207","name":"鄂州市","children":[{"code":"420702","name":"梁子湖区"},{"code":"420703","name":"华容区"},{"code":"420704","name":"鄂城区"}]},{"code":"4208","name":"荆门市","children":[{"code":"420802","name":"东宝区"},{"code":"420804","name":"掇刀区"},{"code":"420822","name":"沙洋县"},{"code":"420881","name":"钟祥市"},{"code":"420882","name":"京山市"}]},{"code":"4209","name":"孝感市","children":[{"code":"420902","name":"孝南区"},{"code":"420921","name":"孝昌县"},{"code":"420922","name":"大悟县"},{"code":"420923","name":"云梦县"},{"code":"420981","name":"应城市"},{"code":"420982","name":"安陆市"},{"code":"420984","name":"汉川市"}]},{"code":"4210","name":"荆州市","children":[{"code":"421002","name":"沙市区"},{"code":"421003","name":"荆州区"},{"code":"421022","name":"公安县"},{"code":"421024","name":"江陵县"},{"code":"421071","name":"荆州经济技术开发区"},{"code":"421081","name":"石首市"},{"code":"421083","name":"洪湖市"},{"code":"421087","name":"松滋市"},{"code":"421088","name":"监利市"}]},{"code":"4211","name":"黄冈市","children":[{"code":"421102","name":"黄州区"},{"code":"421121","name":"团风县"},{"code":"421122","name":"红安县"},{"code":"421123","name":"罗田县"},{"code":"421124","name":"英山县"},{"code":"421125","name":"浠水县"},{"code":"421126","name":"蕲春县"},{"code":"421127","name":"黄梅县"},{"code":"421171","name":"龙感湖管理区"},{"code":"421181","name":"麻城市"},{"code":"421182","name":"武穴市"}]},{"code":"4212","name":"咸宁市","children":[{"code":"421202","name":"咸安区"},{"code":"421221","name":"嘉鱼县"},{"code":"421222","name":"通城县"},{"code":"421223","name":"崇阳县"},{"code":"421224","name":"通山县"},{"code":"421281","name":"赤壁市"}]},{"code":"4213","name":"随州市","children":[{"code":"421303","name":"曾都区"},{"code":"421321","name":"随县"},{"code":"421381","name":"广水市"}]},{"code":"4228","name":"恩施土家族苗族自治州","children":[{"code":"422801","name":"恩施市"},{"code":"422802","name":"利川市"},{"code":"422822","name":"建始县"},{"code":"422823","name":"巴东县"},{"code":"422825","name":"宣恩县"},{"code":"422826","name":"咸丰县"},{"code":"422827","name":"来凤县"},{"code":"422828","name":"鹤峰县"}]},{"code":"4290","name":"省直辖县级行政区划","children":[{"code":"429004","name":"仙桃市"},{"code":"429005","name":"潜江市"},{"code":"429006","name":"天门市"},{"code":"429021","name":"神农架林区"}]}]},{"code":"43","name":"湖南省","children":[{"code":"4301","name":"长沙市","children":[{"code":"430102","name":"芙蓉区"},{"code":"430103","name":"天心区"},{"code":"430104","name":"岳麓区"},{"code":"430105","name":"开福区"},{"code":"430111","name":"雨花区"},{"code":"430112","name":"望城区"},{"code":"430121","name":"长沙县"},{"code":"430181","name":"浏阳市"},{"code":"430182","name":"宁乡市"}]},{"code":"4302","name":"株洲市","children":[{"code":"430202","name":"荷塘区"},{"code":"430203","name":"芦淞区"},{"code":"430204","name":"石峰区"},{"code":"430211","name":"天元区"},{"code":"430212","name":"渌口区"},{"code":"430223","name":"攸县"},{"code":"430224","name":"茶陵县"},{"code":"430225","name":"炎陵县"},{"code":"430281","name":"醴陵市"}]},{"code":"4303","name":"湘潭市","children":[{"code":"430302","name":"雨湖区"},{"code":"430304","name":"岳塘区"},{"code":"430321","name":"湘潭县"},{"code":"430371","name":"湖南湘潭高新技术产业园区"},{"code":"430372","name":"湘潭昭山示范区"},{"code":"430373","name":"湘潭九华示范区"},{"code":"430381","name":"湘乡市"},{"code":"430382","name":"韶山市"}]},{"code":"4304","name":"衡阳市","children":[{"code":"430405","name":"珠晖区"},{"code":"430406","name":"雁峰区"},{"code":"430407","name":"石鼓区"},{"code":"430408","name":"蒸湘区"},{"code":"430412","name":"南岳区"},{"code":"430421","name":"衡阳县"},{"code":"430422","name":"衡南县"},{"code":"430423","name":"衡山县"},{"code":"430424","name":"衡东县"},{"code":"430426","name":"祁东县"},{"code":"430473","name":"湖南衡阳松木经济开发区"},{"code":"430476","name":"湖南衡阳高新技术产业园区"},{"code":"430481","name":"耒阳市"},{"code":"430482","name":"常宁市"}]},{"code":"4305","name":"邵阳市","children":[{"code":"430502","name":"双清区"},{"code":"430503","name":"大祥区"},{"code":"430511","name":"北塔区"},{"code":"430522","name":"新邵县"},{"code":"430523","name":"邵阳县"},{"code":"430524","name":"隆回县"},{"code":"430525","name":"洞口县"},{"code":"430527","name":"绥宁县"},{"code":"430528","name":"新宁县"},{"code":"430529","name":"城步苗族自治县"},{"code":"430581","name":"武冈市"},{"code":"430582","name":"邵东市"}]},{"code":"4306","name":"岳阳市","children":[{"code":"430602","name":"岳阳楼区"},{"code":"430603","name":"云溪区"},{"code":"430611","name":"君山区"},{"code":"430621","name":"岳阳县"},{"code":"430623","name":"华容县"},{"code":"430624","name":"湘阴县"},{"code":"430626","name":"平江县"},{"code":"430671","name":"岳阳市屈原管理区"},{"code":"430681","name":"汨罗市"},{"code":"430682","name":"临湘市"}]},{"code":"4307","name":"常德市","children":[{"code":"430702","name":"武陵区"},{"code":"430703","name":"鼎城区"},{"code":"430721","name":"安乡县"},{"code":"430722","name":"汉寿县"},{"code":"430723","name":"澧县"},{"code":"430724","name":"临澧县"},{"code":"430725","name":"桃源县"},{"code":"430726","name":"石门县"},{"code":"430771","name":"常德市西洞庭管理区"},{"code":"430781","name":"津市市"}]},{"code":"4308","name":"张家界市","children":[{"code":"430802","name":"永定区"},{"code":"430811","name":"武陵源区"},{"code":"430821","name":"慈利县"},{"code":"430822","name":"桑植县"}]},{"code":"4309","name":"益阳市","children":[{"code":"430902","name":"资阳区"},{"code":"430903","name":"赫山区"},{"code":"430921","name":"南县"},{"code":"430922","name":"桃江县"},{"code":"430923","name":"安化县"},{"code":"430971","name":"益阳市大通湖管理区"},{"code":"430972","name":"湖南益阳高新技术产业园区"},{"code":"430981","name":"沅江市"}]},{"code":"4310","name":"郴州市","children":[{"code":"431002","name":"北湖区"},{"code":"431003","name":"苏仙区"},{"code":"431021","name":"桂阳县"},{"code":"431022","name":"宜章县"},{"code":"431023","name":"永兴县"},{"code":"431024","name":"嘉禾县"},{"code":"431025","name":"临武县"},{"code":"431026","name":"汝城县"},{"code":"431027","name":"桂东县"},{"code":"431028","name":"安仁县"},{"code":"431081","name":"资兴市"}]},{"code":"4311","name":"永州市","children":[{"code":"431102","name":"零陵区"},{"code":"431103","name":"冷水滩区"},{"code":"431122","name":"东安县"},{"code":"431123","name":"双牌县"},{"code":"431124","name":"道县"},{"code":"431125","name":"江永县"},{"code":"431126","name":"宁远县"},{"code":"431127","name":"蓝山县"},{"code":"431128","name":"新田县"},{"code":"431129","name":"江华瑶族自治县"},{"code":"431171","name":"永州经济技术开发区"},{"code":"431173","name":"永州市回龙圩管理区"},{"code":"431181","name":"祁阳市"}]},{"code":"4312","name":"怀化市","children":[{"code":"431202","name":"鹤城区"},{"code":"431221","name":"中方县"},{"code":"431222","name":"沅陵县"},{"code":"431223","name":"辰溪县"},{"code":"431224","name":"溆浦县"},{"code":"431225","name":"会同县"},{"code":"431226","name":"麻阳苗族自治县"},{"code":"431227","name":"新晃侗族自治县"},{"code":"431228","name":"芷江侗族自治县"},{"code":"431229","name":"靖州苗族侗族自治县"},{"code":"431230","name":"通道侗族自治县"},{"code":"431271","name":"怀化市洪江管理区"},{"code":"431281","name":"洪江市"}]},{"code":"4313","name":"娄底市","children":[{"code":"431302","name":"娄星区"},{"code":"431321","name":"双峰县"},{"code":"431322","name":"新化县"},{"code":"431381","name":"冷水江市"},{"code":"431382","name":"涟源市"}]},{"code":"4331","name":"湘西土家族苗族自治州","children":[{"code":"433101","name":"吉首市"},{"code":"433122","name":"泸溪县"},{"code":"433123","name":"凤凰县"},{"code":"433124","name":"花垣县"},{"code":"433125","name":"保靖县"},{"code":"433126","name":"古丈县"},{"code":"433127","name":"永顺县"},{"code":"433130","name":"龙山县"}]}]},{"code":"44","name":"广东省","children":[{"code":"4401","name":"广州市","children":[{"code":"440103","name":"荔湾区"},{"code":"440104","name":"越秀区"},{"code":"440105","name":"海珠区"},{"code":"440106","name":"天河区"},{"code":"440111","name":"白云区"},{"code":"440112","name":"黄埔区"},{"code":"440113","name":"番禺区"},{"code":"440114","name":"花都区"},{"code":"440115","name":"南沙区"},{"code":"440117","name":"从化区"},{"code":"440118","name":"增城区"}]},{"code":"4402","name":"韶关市","children":[{"code":"440203","name":"武江区"},{"code":"440204","name":"浈江区"},{"code":"440205","name":"曲江区"},{"code":"440222","name":"始兴县"},{"code":"440224","name":"仁化县"},{"code":"440229","name":"翁源县"},{"code":"440232","name":"乳源瑶族自治县"},{"code":"440233","name":"新丰县"},{"code":"440281","name":"乐昌市"},{"code":"440282","name":"南雄市"}]},{"code":"4403","name":"深圳市","children":[{"code":"440303","name":"罗湖区"},{"code":"440304","name":"福田区"},{"code":"440305","name":"南山区"},{"code":"440306","name":"宝安区"},{"code":"440307","name":"龙岗区"},{"code":"440308","name":"盐田区"},{"code":"440309","name":"龙华区"},{"code":"440310","name":"坪山区"},{"code":"440311","name":"光明区"}]},{"code":"4404","name":"珠海市","children":[{"code":"440402","name":"香洲区"},{"code":"440403","name":"斗门区"},{"code":"440404","name":"金湾区"}]},{"code":"4405","name":"汕头市","children":[{"code":"440507","name":"龙湖区"},{"code":"440511","name":"金平区"},{"code":"440512","name":"濠江区"},{"code":"440513","name":"潮阳区"},{"code":"440514","name":"潮南区"},{"code":"440515","name":"澄海区"},{"code":"440523","name":"南澳县"}]},{"code":"4406","name":"佛山市","children":[{"code":"440604","name":"禅城区"},{"code":"440605","name":"南海区"},{"code":"440606","name":"顺德区"},{"code":"440607","name":"三水区"},{"code":"440608","name":"高明区"}]},{"code":"4407","name":"江门市","children":[{"code":"440703","name":"蓬江区"},{"code":"440704","name":"江海区"},{"code":"440705","name":"新会区"},{"code":"440781","name":"台山市"},{"code":"440783","name":"开平市"},{"code":"440784","name":"鹤山市"},{"code":"440785","name":"恩平市"}]},{"code":"4408","name":"湛江市","children":[{"code":"440802","name":"赤坎区"},{"code":"440803","name":"霞山区"},{"code":"440804","name":"坡头区"},{"code":"440811","name":"麻章区"},{"code":"440823","name":"遂溪县"},{"code":"440825","name":"徐闻县"},{"code":"440881","name":"廉江市"},{"code":"440882","name":"雷州市"},{"code":"440883","name":"吴川市"}]},{"code":"4409","name":"茂名市","children":[{"code":"440902","name":"茂南区"},{"code":"440904","name":"电白区"},{"code":"440981","name":"高州市"},{"code":"440982","name":"化州市"},{"code":"440983","name":"信宜市"}]},{"code":"4412","name":"肇庆市","children":[{"code":"441202","name":"端州区"},{"code":"441203","name":"鼎湖区"},{"code":"441204","name":"高要区"},{"code":"441223","name":"广宁县"},{"code":"441224","name":"怀集县"},{"code":"441225","name":"封开县"},{"code":"441226","name":"德庆县"},{"code":"441284","name":"四会市"}]},{"code":"4413","name":"惠州市","children":[{"code":"441302","name":"惠城区"},{"code":"441303","name":"惠阳区"},{"code":"441322","name":"博罗县"},{"code":"441323","name":"惠东县"},{"code":"441324","name":"龙门县"}]},{"code":"4414","name":"梅州市","children":[{"code":"441402","name":"梅江区"},{"code":"441403","name":"梅县区"},{"code":"441422","name":"大埔县"},{"code":"441423","name":"丰顺县"},{"code":"441424","name":"五华县"},{"code":"441426","name":"平远县"},{"code":"441427","name":"蕉岭县"},{"code":"441481","name":"兴宁市"}]},{"code":"4415","name":"汕尾市","children":[{"code":"441502","name":"城区"},{"code":"441521","name":"海丰县"},{"code":"441523","name":"陆河县"},{"code":"441581","name":"陆丰市"}]},{"code":"4416","name":"河源市","children":[{"code":"441602","name":"源城区"},{"code":"441621","name":"紫金县"},{"code":"441622","name":"龙川县"},{"code":"441623","name":"连平县"},{"code":"441624","name":"和平县"},{"code":"441625","name":"东源县"}]},{"code":"4417","name":"阳江市","children":[{"code":"441702","name":"江城区"},{"code":"441704","name":"阳东区"},{"code":"441721","name":"阳西县"},{"code":"441781","name":"阳春市"}]},{"code":"4418","name":"清远市","children":[{"code":"441802","name":"清城区"},{"code":"441803","name":"清新区"},{"code":"441821","name":"佛冈县"},{"code":"441823","name":"阳山县"},{"code":"441825","name":"连山壮族瑶族自治县"},{"code":"441826","name":"连南瑶族自治县"},{"code":"441881","name":"英德市"},{"code":"441882","name":"连州市"}]},{"code":"4419","name":"东莞市","children":[{"code":"441900003","name":"东城街道"},{"code":"441900004","name":"南城街道"},{"code":"441900005","name":"万江街道"},{"code":"441900006","name":"莞城街道"},{"code":"441900101","name":"石碣镇"},{"code":"441900102","name":"石龙镇"},{"code":"441900103","name":"茶山镇"},{"code":"441900104","name":"石排镇"},{"code":"441900105","name":"企石镇"},{"code":"441900106","name":"横沥镇"},{"code":"441900107","name":"桥头镇"},{"code":"441900108","name":"谢岗镇"},{"code":"441900109","name":"东坑镇"},{"code":"441900110","name":"常平镇"},{"code":"441900111","name":"寮步镇"},{"code":"441900112","name":"樟木头镇"},{"code":"441900113","name":"大朗镇"},{"code":"441900114","name":"黄江镇"},{"code":"441900115","name":"清溪镇"},{"code":"441900116","name":"塘厦镇"},{"code":"441900117","name":"凤岗镇"},{"code":"441900118","name":"大岭山镇"},{"code":"441900119","name":"长安镇"},{"code":"441900121","name":"虎门镇"},{"code":"441900122","name":"厚街镇"},{"code":"441900123","name":"沙田镇"},{"code":"441900124","name":"道滘镇"},{"code":"441900125","name":"洪梅镇"},{"code":"441900126","name":"麻涌镇"},{"code":"441900127","name":"望牛墩镇"},{"code":"441900128","name":"中堂镇"},{"code":"441900129","name":"高埗镇"},{"code":"441900401","name":"松山湖"},{"code":"441900402","name":"东莞港"},{"code":"441900403","name":"东莞生态园"},{"code":"441900404","name":"东莞滨海湾新区"}]},{"code":"4420","name":"中山市","children":[{"code":"442000001","name":"石岐街道"},{"code":"442000002","name":"东区街道"},{"code":"442000003","name":"中山港街道"},{"code":"442000004","name":"西区街道"},{"code":"442000005","name":"南区街道"},{"code":"442000006","name":"五桂山街道"},{"code":"442000007","name":"民众街道"},{"code":"442000008","name":"南朗街道"},{"code":"442000101","name":"黄圃镇"},{"code":"442000103","name":"东凤镇"},{"code":"442000105","name":"古镇镇"},{"code":"442000106","name":"沙溪镇"},{"code":"442000107","name":"坦洲镇"},{"code":"442000108","name":"港口镇"},{"code":"442000109","name":"三角镇"},{"code":"442000110","name":"横栏镇"},{"code":"442000111","name":"南头镇"},{"code":"442000112","name":"阜沙镇"},{"code":"442000114","name":"三乡镇"},{"code":"442000115","name":"板芙镇"},{"code":"442000116","name":"大涌镇"},{"code":"442000117","name":"神湾镇"},{"code":"442000118","name":"小榄镇"}]},{"code":"4451","name":"潮州市","children":[{"code":"445102","name":"湘桥区"},{"code":"445103","name":"潮安区"},{"code":"445122","name":"饶平县"}]},{"code":"4452","name":"揭阳市","children":[{"code":"445202","name":"榕城区"},{"code":"445203","name":"揭东区"},{"code":"445222","name":"揭西县"},{"code":"445224","name":"惠来县"},{"code":"445281","name":"普宁市"}]},{"code":"4453","name":"云浮市","children":[{"code":"445302","name":"云城区"},{"code":"445303","name":"云安区"},{"code":"445321","name":"新兴县"},{"code":"445322","name":"郁南县"},{"code":"445381","name":"罗定市"}]}]},{"code":"45","name":"广西壮族自治区","children":[{"code":"4501","name":"南宁市","children":[{"code":"450102","name":"兴宁区"},{"code":"450103","name":"青秀区"},{"code":"450105","name":"江南区"},{"code":"450107","name":"西乡塘区"},{"code":"450108","name":"良庆区"},{"code":"450109","name":"邕宁区"},{"code":"450110","name":"武鸣区"},{"code":"450123","name":"隆安县"},{"code":"450124","name":"马山县"},{"code":"450125","name":"上林县"},{"code":"450126","name":"宾阳县"},{"code":"450181","name":"横州市"}]},{"code":"4502","name":"柳州市","children":[{"code":"450202","name":"城中区"},{"code":"450203","name":"鱼峰区"},{"code":"450204","name":"柳南区"},{"code":"450205","name":"柳北区"},{"code":"450206","name":"柳江区"},{"code":"450222","name":"柳城县"},{"code":"450223","name":"鹿寨县"},{"code":"450224","name":"融安县"},{"code":"450225","name":"融水苗族自治县"},{"code":"450226","name":"三江侗族自治县"}]},{"code":"4503","name":"桂林市","children":[{"code":"450302","name":"秀峰区"},{"code":"450303","name":"叠彩区"},{"code":"450304","name":"象山区"},{"code":"450305","name":"七星区"},{"code":"450311","name":"雁山区"},{"code":"450312","name":"临桂区"},{"code":"450321","name":"阳朔县"},{"code":"450323","name":"灵川县"},{"code":"450324","name":"全州县"},{"code":"450325","name":"兴安县"},{"code":"450326","name":"永福县"},{"code":"450327","name":"灌阳县"},{"code":"450328","name":"龙胜各族自治县"},{"code":"450329","name":"资源县"},{"code":"450330","name":"平乐县"},{"code":"450332","name":"恭城瑶族自治县"},{"code":"450381","name":"荔浦市"}]},{"code":"4504","name":"梧州市","children":[{"code":"450403","name":"万秀区"},{"code":"450405","name":"长洲区"},{"code":"450406","name":"龙圩区"},{"code":"450421","name":"苍梧县"},{"code":"450422","name":"藤县"},{"code":"450423","name":"蒙山县"},{"code":"450481","name":"岑溪市"}]},{"code":"4505","name":"北海市","children":[{"code":"450502","name":"海城区"},{"code":"450503","name":"银海区"},{"code":"450512","name":"铁山港区"},{"code":"450521","name":"合浦县"}]},{"code":"4506","name":"防城港市","children":[{"code":"450602","name":"港口区"},{"code":"450603","name":"防城区"},{"code":"450621","name":"上思县"},{"code":"450681","name":"东兴市"}]},{"code":"4507","name":"钦州市","children":[{"code":"450702","name":"钦南区"},{"code":"450703","name":"钦北区"},{"code":"450721","name":"灵山县"},{"code":"450722","name":"浦北县"}]},{"code":"4508","name":"贵港市","children":[{"code":"450802","name":"港北区"},{"code":"450803","name":"港南区"},{"code":"450804","name":"覃塘区"},{"code":"450821","name":"平南县"},{"code":"450881","name":"桂平市"}]},{"code":"4509","name":"玉林市","children":[{"code":"450902","name":"玉州区"},{"code":"450903","name":"福绵区"},{"code":"450921","name":"容县"},{"code":"450922","name":"陆川县"},{"code":"450923","name":"博白县"},{"code":"450924","name":"兴业县"},{"code":"450981","name":"北流市"}]},{"code":"4510","name":"百色市","children":[{"code":"451002","name":"右江区"},{"code":"451003","name":"田阳区"},{"code":"451022","name":"田东县"},{"code":"451024","name":"德保县"},{"code":"451026","name":"那坡县"},{"code":"451027","name":"凌云县"},{"code":"451028","name":"乐业县"},{"code":"451029","name":"田林县"},{"code":"451030","name":"西林县"},{"code":"451031","name":"隆林各族自治县"},{"code":"451081","name":"靖西市"},{"code":"451082","name":"平果市"}]},{"code":"4511","name":"贺州市","children":[{"code":"451102","name":"八步区"},{"code":"451103","name":"平桂区"},{"code":"451121","name":"昭平县"},{"code":"451122","name":"钟山县"},{"code":"451123","name":"富川瑶族自治县"}]},{"code":"4512","name":"河池市","children":[{"code":"451202","name":"金城江区"},{"code":"451203","name":"宜州区"},{"code":"451221","name":"南丹县"},{"code":"451222","name":"天峨县"},{"code":"451223","name":"凤山县"},{"code":"451224","name":"东兰县"},{"code":"451225","name":"罗城仫佬族自治县"},{"code":"451226","name":"环江毛南族自治县"},{"code":"451227","name":"巴马瑶族自治县"},{"code":"451228","name":"都安瑶族自治县"},{"code":"451229","name":"大化瑶族自治县"}]},{"code":"4513","name":"来宾市","children":[{"code":"451302","name":"兴宾区"},{"code":"451321","name":"忻城县"},{"code":"451322","name":"象州县"},{"code":"451323","name":"武宣县"},{"code":"451324","name":"金秀瑶族自治县"},{"code":"451381","name":"合山市"}]},{"code":"4514","name":"崇左市","children":[{"code":"451402","name":"江州区"},{"code":"451421","name":"扶绥县"},{"code":"451422","name":"宁明县"},{"code":"451423","name":"龙州县"},{"code":"451424","name":"大新县"},{"code":"451425","name":"天等县"},{"code":"451481","name":"凭祥市"}]}]},{"code":"46","name":"海南省","children":[{"code":"4601","name":"海口市","children":[{"code":"460105","name":"秀英区"},{"code":"460106","name":"龙华区"},{"code":"460107","name":"琼山区"},{"code":"460108","name":"美兰区"}]},{"code":"4602","name":"三亚市","children":[{"code":"460202","name":"海棠区"},{"code":"460203","name":"吉阳区"},{"code":"460204","name":"天涯区"},{"code":"460205","name":"崖州区"}]},{"code":"4603","name":"三沙市","children":[{"code":"460321","name":"西沙群岛"},{"code":"460322","name":"南沙群岛"},{"code":"460323","name":"中沙群岛的岛礁及其海域"}]},{"code":"4604","name":"儋州市","children":[{"code":"460400100","name":"那大镇"},{"code":"460400101","name":"和庆镇"},{"code":"460400102","name":"南丰镇"},{"code":"460400103","name":"大成镇"},{"code":"460400104","name":"雅星镇"},{"code":"460400105","name":"兰洋镇"},{"code":"460400106","name":"光村镇"},{"code":"460400107","name":"木棠镇"},{"code":"460400108","name":"海头镇"},{"code":"460400109","name":"峨蔓镇"},{"code":"460400111","name":"王五镇"},{"code":"460400112","name":"白马井镇"},{"code":"460400113","name":"中和镇"},{"code":"460400114","name":"排浦镇"},{"code":"460400115","name":"东成镇"},{"code":"460400116","name":"新州镇"},{"code":"460400499","name":"洋浦经济开发区"},{"code":"460400500","name":"华南热作学院"}]},{"code":"4690","name":"省直辖县级行政区划","children":[{"code":"469001","name":"五指山市"},{"code":"469002","name":"琼海市"},{"code":"469005","name":"文昌市"},{"code":"469006","name":"万宁市"},{"code":"469007","name":"东方市"},{"code":"469021","name":"定安县"},{"code":"469022","name":"屯昌县"},{"code":"469023","name":"澄迈县"},{"code":"469024","name":"临高县"},{"code":"469025","name":"白沙黎族自治县"},{"code":"469026","name":"昌江黎族自治县"},{"code":"469027","name":"乐东黎族自治县"},{"code":"469028","name":"陵水黎族自治县"},{"code":"469029","name":"保亭黎族苗族自治县"},{"code":"469030","name":"琼中黎族苗族自治县"}]}]},{"code":"50","name":"重庆市","children":[{"code":"5001","name":"市辖区","children":[{"code":"500101","name":"万州区"},{"code":"500102","name":"涪陵区"},{"code":"500103","name":"渝中区"},{"code":"500104","name":"大渡口区"},{"code":"500105","name":"江北区"},{"code":"500106","name":"沙坪坝区"},{"code":"500107","name":"九龙坡区"},{"code":"500108","name":"南岸区"},{"code":"500109","name":"北碚区"},{"code":"500110","name":"綦江区"},{"code":"500111","name":"大足区"},{"code":"500112","name":"渝北区"},{"code":"500113","name":"巴南区"},{"code":"500114","name":"黔江区"},{"code":"500115","name":"长寿区"},{"code":"500116","name":"江津区"},{"code":"500117","name":"合川区"},{"code":"500118","name":"永川区"},{"code":"500119","name":"南川区"},{"code":"500120","name":"璧山区"},{"code":"500151","name":"铜梁区"},{"code":"500152","name":"潼南区"},{"code":"500153","name":"荣昌区"},{"code":"500154","name":"开州区"},{"code":"500155","name":"梁平区"},{"code":"500156","name":"武隆区"}]},{"code":"5002","name":"县","children":[{"code":"500229","name":"城口县"},{"code":"500230","name":"丰都县"},{"code":"500231","name":"垫江县"},{"code":"500233","name":"忠县"},{"code":"500235","name":"云阳县"},{"code":"500236","name":"奉节县"},{"code":"500237","name":"巫山县"},{"code":"500238","name":"巫溪县"},{"code":"500240","name":"石柱土家族自治县"},{"code":"500241","name":"秀山土家族苗族自治县"},{"code":"500242","name":"酉阳土家族苗族自治县"},{"code":"500243","name":"彭水苗族土家族自治县"}]}]},{"code":"51","name":"四川省","children":[{"code":"5101","name":"成都市","children":[{"code":"510104","name":"锦江区"},{"code":"510105","name":"青羊区"},{"code":"510106","name":"金牛区"},{"code":"510107","name":"武侯区"},{"code":"510108","name":"成华区"},{"code":"510112","name":"龙泉驿区"},{"code":"510113","name":"青白江区"},{"code":"510114","name":"新都区"},{"code":"510115","name":"温江区"},{"code":"510116","name":"双流区"},{"code":"510117","name":"郫都区"},{"code":"510118","name":"新津区"},{"code":"510121","name":"金堂县"},{"code":"510129","name":"大邑县"},{"code":"510131","name":"蒲江县"},{"code":"510181","name":"都江堰市"},{"code":"510182","name":"彭州市"},{"code":"510183","name":"邛崃市"},{"code":"510184","name":"崇州市"},{"code":"510185","name":"简阳市"}]},{"code":"5103","name":"自贡市","children":[{"code":"510302","name":"自流井区"},{"code":"510303","name":"贡井区"},{"code":"510304","name":"大安区"},{"code":"510311","name":"沿滩区"},{"code":"510321","name":"荣县"},{"code":"510322","name":"富顺县"}]},{"code":"5104","name":"攀枝花市","children":[{"code":"510402","name":"东区"},{"code":"510403","name":"西区"},{"code":"510411","name":"仁和区"},{"code":"510421","name":"米易县"},{"code":"510422","name":"盐边县"}]},{"code":"5105","name":"泸州市","children":[{"code":"510502","name":"江阳区"},{"code":"510503","name":"纳溪区"},{"code":"510504","name":"龙马潭区"},{"code":"510521","name":"泸县"},{"code":"510522","name":"合江县"},{"code":"510524","name":"叙永县"},{"code":"510525","name":"古蔺县"}]},{"code":"5106","name":"德阳市","children":[{"code":"510603","name":"旌阳区"},{"code":"510604","name":"罗江区"},{"code":"510623","name":"中江县"},{"code":"510681","name":"广汉市"},{"code":"510682","name":"什邡市"},{"code":"510683","name":"绵竹市"}]},{"code":"5107","name":"绵阳市","children":[{"code":"510703","name":"涪城区"},{"code":"510704","name":"游仙区"},{"code":"510705","name":"安州区"},{"code":"510722","name":"三台县"},{"code":"510723","name":"盐亭县"},{"code":"510725","name":"梓潼县"},{"code":"510726","name":"北川羌族自治县"},{"code":"510727","name":"平武县"},{"code":"510781","name":"江油市"}]},{"code":"5108","name":"广元市","children":[{"code":"510802","name":"利州区"},{"code":"510811","name":"昭化区"},{"code":"510812","name":"朝天区"},{"code":"510821","name":"旺苍县"},{"code":"510822","name":"青川县"},{"code":"510823","name":"剑阁县"},{"code":"510824","name":"苍溪县"}]},{"code":"5109","name":"遂宁市","children":[{"code":"510903","name":"船山区"},{"code":"510904","name":"安居区"},{"code":"510921","name":"蓬溪县"},{"code":"510923","name":"大英县"},{"code":"510981","name":"射洪市"}]},{"code":"5110","name":"内江市","children":[{"code":"511002","name":"市中区"},{"code":"511011","name":"东兴区"},{"code":"511024","name":"威远县"},{"code":"511025","name":"资中县"},{"code":"511083","name":"隆昌市"}]},{"code":"5111","name":"乐山市","children":[{"code":"511102","name":"市中区"},{"code":"511111","name":"沙湾区"},{"code":"511112","name":"五通桥区"},{"code":"511113","name":"金口河区"},{"code":"511123","name":"犍为县"},{"code":"511124","name":"井研县"},{"code":"511126","name":"夹江县"},{"code":"511129","name":"沐川县"},{"code":"511132","name":"峨边彝族自治县"},{"code":"511133","name":"马边彝族自治县"},{"code":"511181","name":"峨眉山市"}]},{"code":"5113","name":"南充市","children":[{"code":"511302","name":"顺庆区"},{"code":"511303","name":"高坪区"},{"code":"511304","name":"嘉陵区"},{"code":"511321","name":"南部县"},{"code":"511322","name":"营山县"},{"code":"511323","name":"蓬安县"},{"code":"511324","name":"仪陇县"},{"code":"511325","name":"西充县"},{"code":"511381","name":"阆中市"}]},{"code":"5114","name":"眉山市","children":[{"code":"511402","name":"东坡区"},{"code":"511403","name":"彭山区"},{"code":"511421","name":"仁寿县"},{"code":"511423","name":"洪雅县"},{"code":"511424","name":"丹棱县"},{"code":"511425","name":"青神县"}]},{"code":"5115","name":"宜宾市","children":[{"code":"511502","name":"翠屏区"},{"code":"511503","name":"南溪区"},{"code":"511504","name":"叙州区"},{"code":"511523","name":"江安县"},{"code":"511524","name":"长宁县"},{"code":"511525","name":"高县"},{"code":"511526","name":"珙县"},{"code":"511527","name":"筠连县"},{"code":"511528","name":"兴文县"},{"code":"511529","name":"屏山县"}]},{"code":"5116","name":"广安市","children":[{"code":"511602","name":"广安区"},{"code":"511603","name":"前锋区"},{"code":"511621","name":"岳池县"},{"code":"511622","name":"武胜县"},{"code":"511623","name":"邻水县"},{"code":"511681","name":"华蓥市"}]},{"code":"5117","name":"达州市","children":[{"code":"511702","name":"通川区"},{"code":"511703","name":"达川区"},{"code":"511722","name":"宣汉县"},{"code":"511723","name":"开江县"},{"code":"511724","name":"大竹县"},{"code":"511725","name":"渠县"},{"code":"511781","name":"万源市"}]},{"code":"5118","name":"雅安市","children":[{"code":"511802","name":"雨城区"},{"code":"511803","name":"名山区"},{"code":"511822","name":"荥经县"},{"code":"511823","name":"汉源县"},{"code":"511824","name":"石棉县"},{"code":"511825","name":"天全县"},{"code":"511826","name":"芦山县"},{"code":"511827","name":"宝兴县"}]},{"code":"5119","name":"巴中市","children":[{"code":"511902","name":"巴州区"},{"code":"511903","name":"恩阳区"},{"code":"511921","name":"通江县"},{"code":"511922","name":"南江县"},{"code":"511923","name":"平昌县"}]},{"code":"5120","name":"资阳市","children":[{"code":"512002","name":"雁江区"},{"code":"512021","name":"安岳县"},{"code":"512022","name":"乐至县"}]},{"code":"5132","name":"阿坝藏族羌族自治州","children":[{"code":"513201","name":"马尔康市"},{"code":"513221","name":"汶川县"},{"code":"513222","name":"理县"},{"code":"513223","name":"茂县"},{"code":"513224","name":"松潘县"},{"code":"513225","name":"九寨沟县"},{"code":"513226","name":"金川县"},{"code":"513227","name":"小金县"},{"code":"513228","name":"黑水县"},{"code":"513230","name":"壤塘县"},{"code":"513231","name":"阿坝县"},{"code":"513232","name":"若尔盖县"},{"code":"513233","name":"红原县"}]},{"code":"5133","name":"甘孜藏族自治州","children":[{"code":"513301","name":"康定市"},{"code":"513322","name":"泸定县"},{"code":"513323","name":"丹巴县"},{"code":"513324","name":"九龙县"},{"code":"513325","name":"雅江县"},{"code":"513326","name":"道孚县"},{"code":"513327","name":"炉霍县"},{"code":"513328","name":"甘孜县"},{"code":"513329","name":"新龙县"},{"code":"513330","name":"德格县"},{"code":"513331","name":"白玉县"},{"code":"513332","name":"石渠县"},{"code":"513333","name":"色达县"},{"code":"513334","name":"理塘县"},{"code":"513335","name":"巴塘县"},{"code":"513336","name":"乡城县"},{"code":"513337","name":"稻城县"},{"code":"513338","name":"得荣县"}]},{"code":"5134","name":"凉山彝族自治州","children":[{"code":"513401","name":"西昌市"},{"code":"513402","name":"会理市"},{"code":"513422","name":"木里藏族自治县"},{"code":"513423","name":"盐源县"},{"code":"513424","name":"德昌县"},{"code":"513426","name":"会东县"},{"code":"513427","name":"宁南县"},{"code":"513428","name":"普格县"},{"code":"513429","name":"布拖县"},{"code":"513430","name":"金阳县"},{"code":"513431","name":"昭觉县"},{"code":"513432","name":"喜德县"},{"code":"513433","name":"冕宁县"},{"code":"513434","name":"越西县"},{"code":"513435","name":"甘洛县"},{"code":"513436","name":"美姑县"},{"code":"513437","name":"雷波县"}]}]},{"code":"52","name":"贵州省","children":[{"code":"5201","name":"贵阳市","children":[{"code":"520102","name":"南明区"},{"code":"520103","name":"云岩区"},{"code":"520111","name":"花溪区"},{"code":"520112","name":"乌当区"},{"code":"520113","name":"白云区"},{"code":"520115","name":"观山湖区"},{"code":"520121","name":"开阳县"},{"code":"520122","name":"息烽县"},{"code":"520123","name":"修文县"},{"code":"520181","name":"清镇市"}]},{"code":"5202","name":"六盘水市","children":[{"code":"520201","name":"钟山区"},{"code":"520203","name":"六枝特区"},{"code":"520204","name":"水城区"},{"code":"520281","name":"盘州市"}]},{"code":"5203","name":"遵义市","children":[{"code":"520302","name":"红花岗区"},{"code":"520303","name":"汇川区"},{"code":"520304","name":"播州区"},{"code":"520322","name":"桐梓县"},{"code":"520323","name":"绥阳县"},{"code":"520324","name":"正安县"},{"code":"520325","name":"道真仡佬族苗族自治县"},{"code":"520326","name":"务川仡佬族苗族自治县"},{"code":"520327","name":"凤冈县"},{"code":"520328","name":"湄潭县"},{"code":"520329","name":"余庆县"},{"code":"520330","name":"习水县"},{"code":"520381","name":"赤水市"},{"code":"520382","name":"仁怀市"}]},{"code":"5204","name":"安顺市","children":[{"code":"520402","name":"西秀区"},{"code":"520403","name":"平坝区"},{"code":"520422","name":"普定县"},{"code":"520423","name":"镇宁布依族苗族自治县"},{"code":"520424","name":"关岭布依族苗族自治县"},{"code":"520425","name":"紫云苗族布依族自治县"}]},{"code":"5205","name":"毕节市","children":[{"code":"520502","name":"七星关区"},{"code":"520521","name":"大方县"},{"code":"520523","name":"金沙县"},{"code":"520524","name":"织金县"},{"code":"520525","name":"纳雍县"},{"code":"520526","name":"威宁彝族回族苗族自治县"},{"code":"520527","name":"赫章县"},{"code":"520581","name":"黔西市"}]},{"code":"5206","name":"铜仁市","children":[{"code":"520602","name":"碧江区"},{"code":"520603","name":"万山区"},{"code":"520621","name":"江口县"},{"code":"520622","name":"玉屏侗族自治县"},{"code":"520623","name":"石阡县"},{"code":"520624","name":"思南县"},{"code":"520625","name":"印江土家族苗族自治县"},{"code":"520626","name":"德江县"},{"code":"520627","name":"沿河土家族自治县"},{"code":"520628","name":"松桃苗族自治县"}]},{"code":"5223","name":"黔西南布依族苗族自治州","children":[{"code":"522301","name":"兴义市"},{"code":"522302","name":"兴仁市"},{"code":"522323","name":"普安县"},{"code":"522324","name":"晴隆县"},{"code":"522325","name":"贞丰县"},{"code":"522326","name":"望谟县"},{"code":"522327","name":"册亨县"},{"code":"522328","name":"安龙县"}]},{"code":"5226","name":"黔东南苗族侗族自治州","children":[{"code":"522601","name":"凯里市"},{"code":"522622","name":"黄平县"},{"code":"522623","name":"施秉县"},{"code":"522624","name":"三穗县"},{"code":"522625","name":"镇远县"},{"code":"522626","name":"岑巩县"},{"code":"522627","name":"天柱县"},{"code":"522628","name":"锦屏县"},{"code":"522629","name":"剑河县"},{"code":"522630","name":"台江县"},{"code":"522631","name":"黎平县"},{"code":"522632","name":"榕江县"},{"code":"522633","name":"从江县"},{"code":"522634","name":"雷山县"},{"code":"522635","name":"麻江县"},{"code":"522636","name":"丹寨县"}]},{"code":"5227","name":"黔南布依族苗族自治州","children":[{"code":"522701","name":"都匀市"},{"code":"522702","name":"福泉市"},{"code":"522722","name":"荔波县"},{"code":"522723","name":"贵定县"},{"code":"522725","name":"瓮安县"},{"code":"522726","name":"独山县"},{"code":"522727","name":"平塘县"},{"code":"522728","name":"罗甸县"},{"code":"522729","name":"长顺县"},{"code":"522730","name":"龙里县"},{"code":"522731","name":"惠水县"},{"code":"522732","name":"三都水族自治县"}]}]},{"code":"53","name":"云南省","children":[{"code":"5301","name":"昆明市","children":[{"code":"530102","name":"五华区"},{"code":"530103","name":"盘龙区"},{"code":"530111","name":"官渡区"},{"code":"530112","name":"西山区"},{"code":"530113","name":"东川区"},{"code":"530114","name":"呈贡区"},{"code":"530115","name":"晋宁区"},{"code":"530124","name":"富民县"},{"code":"530125","name":"宜良县"},{"code":"530126","name":"石林彝族自治县"},{"code":"530127","name":"嵩明县"},{"code":"530128","name":"禄劝彝族苗族自治县"},{"code":"530129","name":"寻甸回族彝族自治县"},{"code":"530181","name":"安宁市"}]},{"code":"5303","name":"曲靖市","children":[{"code":"530302","name":"麒麟区"},{"code":"530303","name":"沾益区"},{"code":"530304","name":"马龙区"},{"code":"530322","name":"陆良县"},{"code":"530323","name":"师宗县"},{"code":"530324","name":"罗平县"},{"code":"530325","name":"富源县"},{"code":"530326","name":"会泽县"},{"code":"530381","name":"宣威市"}]},{"code":"5304","name":"玉溪市","children":[{"code":"530402","name":"红塔区"},{"code":"530403","name":"江川区"},{"code":"530423","name":"通海县"},{"code":"530424","name":"华宁县"},{"code":"530425","name":"易门县"},{"code":"530426","name":"峨山彝族自治县"},{"code":"530427","name":"新平彝族傣族自治县"},{"code":"530428","name":"元江哈尼族彝族傣族自治县"},{"code":"530481","name":"澄江市"}]},{"code":"5305","name":"保山市","children":[{"code":"530502","name":"隆阳区"},{"code":"530521","name":"施甸县"},{"code":"530523","name":"龙陵县"},{"code":"530524","name":"昌宁县"},{"code":"530581","name":"腾冲市"}]},{"code":"5306","name":"昭通市","children":[{"code":"530602","name":"昭阳区"},{"code":"530621","name":"鲁甸县"},{"code":"530622","name":"巧家县"},{"code":"530623","name":"盐津县"},{"code":"530624","name":"大关县"},{"code":"530625","name":"永善县"},{"code":"530626","name":"绥江县"},{"code":"530627","name":"镇雄县"},{"code":"530628","name":"彝良县"},{"code":"530629","name":"威信县"},{"code":"530681","name":"水富市"}]},{"code":"5307","name":"丽江市","children":[{"code":"530702","name":"古城区"},{"code":"530721","name":"玉龙纳西族自治县"},{"code":"530722","name":"永胜县"},{"code":"530723","name":"华坪县"},{"code":"530724","name":"宁蒗彝族自治县"}]},{"code":"5308","name":"普洱市","children":[{"code":"530802","name":"思茅区"},{"code":"530821","name":"宁洱哈尼族彝族自治县"},{"code":"530822","name":"墨江哈尼族自治县"},{"code":"530823","name":"景东彝族自治县"},{"code":"530824","name":"景谷傣族彝族自治县"},{"code":"530825","name":"镇沅彝族哈尼族拉祜族自治县"},{"code":"530826","name":"江城哈尼族彝族自治县"},{"code":"530827","name":"孟连傣族拉祜族佤族自治县"},{"code":"530828","name":"澜沧拉祜族自治县"},{"code":"530829","name":"西盟佤族自治县"}]},{"code":"5309","name":"临沧市","children":[{"code":"530902","name":"临翔区"},{"code":"530921","name":"凤庆县"},{"code":"530922","name":"云县"},{"code":"530923","name":"永德县"},{"code":"530924","name":"镇康县"},{"code":"530925","name":"双江拉祜族佤族布朗族傣族自治县"},{"code":"530926","name":"耿马傣族佤族自治县"},{"code":"530927","name":"沧源佤族自治县"}]},{"code":"5323","name":"楚雄彝族自治州","children":[{"code":"532301","name":"楚雄市"},{"code":"532302","name":"禄丰市"},{"code":"532322","name":"双柏县"},{"code":"532323","name":"牟定县"},{"code":"532324","name":"南华县"},{"code":"532325","name":"姚安县"},{"code":"532326","name":"大姚县"},{"code":"532327","name":"永仁县"},{"code":"532328","name":"元谋县"},{"code":"532329","name":"武定县"}]},{"code":"5325","name":"红河哈尼族彝族自治州","children":[{"code":"532501","name":"个旧市"},{"code":"532502","name":"开远市"},{"code":"532503","name":"蒙自市"},{"code":"532504","name":"弥勒市"},{"code":"532523","name":"屏边苗族自治县"},{"code":"532524","name":"建水县"},{"code":"532525","name":"石屏县"},{"code":"532527","name":"泸西县"},{"code":"532528","name":"元阳县"},{"code":"532529","name":"红河县"},{"code":"532530","name":"金平苗族瑶族傣族自治县"},{"code":"532531","name":"绿春县"},{"code":"532532","name":"河口瑶族自治县"}]},{"code":"5326","name":"文山壮族苗族自治州","children":[{"code":"532601","name":"文山市"},{"code":"532622","name":"砚山县"},{"code":"532623","name":"西畴县"},{"code":"532624","name":"麻栗坡县"},{"code":"532625","name":"马关县"},{"code":"532626","name":"丘北县"},{"code":"532627","name":"广南县"},{"code":"532628","name":"富宁县"}]},{"code":"5328","name":"西双版纳傣族自治州","children":[{"code":"532801","name":"景洪市"},{"code":"532822","name":"勐海县"},{"code":"532823","name":"勐腊县"}]},{"code":"5329","name":"大理白族自治州","children":[{"code":"532901","name":"大理市"},{"code":"532922","name":"漾濞彝族自治县"},{"code":"532923","name":"祥云县"},{"code":"532924","name":"宾川县"},{"code":"532925","name":"弥渡县"},{"code":"532926","name":"南涧彝族自治县"},{"code":"532927","name":"巍山彝族回族自治县"},{"code":"532928","name":"永平县"},{"code":"532929","name":"云龙县"},{"code":"532930","name":"洱源县"},{"code":"532931","name":"剑川县"},{"code":"532932","name":"鹤庆县"}]},{"code":"5331","name":"德宏傣族景颇族自治州","children":[{"code":"533102","name":"瑞丽市"},{"code":"533103","name":"芒市"},{"code":"533122","name":"梁河县"},{"code":"533123","name":"盈江县"},{"code":"533124","name":"陇川县"}]},{"code":"5333","name":"怒江傈僳族自治州","children":[{"code":"533301","name":"泸水市"},{"code":"533323","name":"福贡县"},{"code":"533324","name":"贡山独龙族怒族自治县"},{"code":"533325","name":"兰坪白族普米族自治县"}]},{"code":"5334","name":"迪庆藏族自治州","children":[{"code":"533401","name":"香格里拉市"},{"code":"533422","name":"德钦县"},{"code":"533423","name":"维西傈僳族自治县"}]}]},{"code":"54","name":"西藏自治区","children":[{"code":"5401","name":"拉萨市","children":[{"code":"540102","name":"城关区"},{"code":"540103","name":"堆龙德庆区"},{"code":"540104","name":"达孜区"},{"code":"540121","name":"林周县"},{"code":"540122","name":"当雄县"},{"code":"540123","name":"尼木县"},{"code":"540124","name":"曲水县"},{"code":"540127","name":"墨竹工卡县"},{"code":"540171","name":"格尔木藏青工业园区"},{"code":"540172","name":"拉萨经济技术开发区"},{"code":"540173","name":"西藏文化旅游创意园区"},{"code":"540174","name":"达孜工业园区"}]},{"code":"5402","name":"日喀则市","children":[{"code":"540202","name":"桑珠孜区"},{"code":"540221","name":"南木林县"},{"code":"540222","name":"江孜县"},{"code":"540223","name":"定日县"},{"code":"540224","name":"萨迦县"},{"code":"540225","name":"拉孜县"},{"code":"540226","name":"昂仁县"},{"code":"540227","name":"谢通门县"},{"code":"540228","name":"白朗县"},{"code":"540229","name":"仁布县"},{"code":"540230","name":"康马县"},{"code":"540231","name":"定结县"},{"code":"540232","name":"仲巴县"},{"code":"540233","name":"亚东县"},{"code":"540234","name":"吉隆县"},{"code":"540235","name":"聂拉木县"},{"code":"540236","name":"萨嘎县"},{"code":"540237","name":"岗巴县"}]},{"code":"5403","name":"昌都市","children":[{"code":"540302","name":"卡若区"},{"code":"540321","name":"江达县"},{"code":"540322","name":"贡觉县"},{"code":"540323","name":"类乌齐县"},{"code":"540324","name":"丁青县"},{"code":"540325","name":"察雅县"},{"code":"540326","name":"八宿县"},{"code":"540327","name":"左贡县"},{"code":"540328","name":"芒康县"},{"code":"540329","name":"洛隆县"},{"code":"540330","name":"边坝县"}]},{"code":"5404","name":"林芝市","children":[{"code":"540402","name":"巴宜区"},{"code":"540421","name":"工布江达县"},{"code":"540423","name":"墨脱县"},{"code":"540424","name":"波密县"},{"code":"540425","name":"察隅县"},{"code":"540426","name":"朗县"},{"code":"540481","name":"米林市"}]},{"code":"5405","name":"山南市","children":[{"code":"540502","name":"乃东区"},{"code":"540521","name":"扎囊县"},{"code":"540522","name":"贡嘎县"},{"code":"540523","name":"桑日县"},{"code":"540524","name":"琼结县"},{"code":"540525","name":"曲松县"},{"code":"540526","name":"措美县"},{"code":"540527","name":"洛扎县"},{"code":"540528","name":"加查县"},{"code":"540529","name":"隆子县"},{"code":"540531","name":"浪卡子县"},{"code":"540581","name":"错那市"}]},{"code":"5406","name":"那曲市","children":[{"code":"540602","name":"色尼区"},{"code":"540621","name":"嘉黎县"},{"code":"540622","name":"比如县"},{"code":"540623","name":"聂荣县"},{"code":"540624","name":"安多县"},{"code":"540625","name":"申扎县"},{"code":"540626","name":"索县"},{"code":"540627","name":"班戈县"},{"code":"540628","name":"巴青县"},{"code":"540629","name":"尼玛县"},{"code":"540630","name":"双湖县"}]},{"code":"5425","name":"阿里地区","children":[{"code":"542521","name":"普兰县"},{"code":"542522","name":"札达县"},{"code":"542523","name":"噶尔县"},{"code":"542524","name":"日土县"},{"code":"542525","name":"革吉县"},{"code":"542526","name":"改则县"},{"code":"542527","name":"措勤县"}]}]},{"code":"61","name":"陕西省","children":[{"code":"6101","name":"西安市","children":[{"code":"610102","name":"新城区"},{"code":"610103","name":"碑林区"},{"code":"610104","name":"莲湖区"},{"code":"610111","name":"灞桥区"},{"code":"610112","name":"未央区"},{"code":"610113","name":"雁塔区"},{"code":"610114","name":"阎良区"},{"code":"610115","name":"临潼区"},{"code":"610116","name":"长安区"},{"code":"610117","name":"高陵区"},{"code":"610118","name":"鄠邑区"},{"code":"610122","name":"蓝田县"},{"code":"610124","name":"周至县"}]},{"code":"6102","name":"铜川市","children":[{"code":"610202","name":"王益区"},{"code":"610203","name":"印台区"},{"code":"610204","name":"耀州区"},{"code":"610222","name":"宜君县"}]},{"code":"6103","name":"宝鸡市","children":[{"code":"610302","name":"渭滨区"},{"code":"610303","name":"金台区"},{"code":"610304","name":"陈仓区"},{"code":"610305","name":"凤翔区"},{"code":"610323","name":"岐山县"},{"code":"610324","name":"扶风县"},{"code":"610326","name":"眉县"},{"code":"610327","name":"陇县"},{"code":"610328","name":"千阳县"},{"code":"610329","name":"麟游县"},{"code":"610330","name":"凤县"},{"code":"610331","name":"太白县"}]},{"code":"6104","name":"咸阳市","children":[{"code":"610402","name":"秦都区"},{"code":"610403","name":"杨陵区"},{"code":"610404","name":"渭城区"},{"code":"610422","name":"三原县"},{"code":"610423","name":"泾阳县"},{"code":"610424","name":"乾县"},{"code":"610425","name":"礼泉县"},{"code":"610426","name":"永寿县"},{"code":"610428","name":"长武县"},{"code":"610429","name":"旬邑县"},{"code":"610430","name":"淳化县"},{"code":"610431","name":"武功县"},{"code":"610481","name":"兴平市"},{"code":"610482","name":"彬州市"}]},{"code":"6105","name":"渭南市","children":[{"code":"610502","name":"临渭区"},{"code":"610503","name":"华州区"},{"code":"610522","name":"潼关县"},{"code":"610523","name":"大荔县"},{"code":"610524","name":"合阳县"},{"code":"610525","name":"澄城县"},{"code":"610526","name":"蒲城县"},{"code":"610527","name":"白水县"},{"code":"610528","name":"富平县"},{"code":"610581","name":"韩城市"},{"code":"610582","name":"华阴市"}]},{"code":"6106","name":"延安市","children":[{"code":"610602","name":"宝塔区"},{"code":"610603","name":"安塞区"},{"code":"610621","name":"延长县"},{"code":"610622","name":"延川县"},{"code":"610625","name":"志丹县"},{"code":"610626","name":"吴起县"},{"code":"610627","name":"甘泉县"},{"code":"610628","name":"富县"},{"code":"610629","name":"洛川县"},{"code":"610630","name":"宜川县"},{"code":"610631","name":"黄龙县"},{"code":"610632","name":"黄陵县"},{"code":"610681","name":"子长市"}]},{"code":"6107","name":"汉中市","children":[{"code":"610702","name":"汉台区"},{"code":"610703","name":"南郑区"},{"code":"610722","name":"城固县"},{"code":"610723","name":"洋县"},{"code":"610724","name":"西乡县"},{"code":"610725","name":"勉县"},{"code":"610726","name":"宁强县"},{"code":"610727","name":"略阳县"},{"code":"610728","name":"镇巴县"},{"code":"610729","name":"留坝县"},{"code":"610730","name":"佛坪县"}]},{"code":"6108","name":"榆林市","children":[{"code":"610802","name":"榆阳区"},{"code":"610803","name":"横山区"},{"code":"610822","name":"府谷县"},{"code":"610824","name":"靖边县"},{"code":"610825","name":"定边县"},{"code":"610826","name":"绥德县"},{"code":"610827","name":"米脂县"},{"code":"610828","name":"佳县"},{"code":"610829","name":"吴堡县"},{"code":"610830","name":"清涧县"},{"code":"610831","name":"子洲县"},{"code":"610881","name":"神木市"}]},{"code":"6109","name":"安康市","children":[{"code":"610902","name":"汉滨区"},{"code":"610921","name":"汉阴县"},{"code":"610922","name":"石泉县"},{"code":"610923","name":"宁陕县"},{"code":"610924","name":"紫阳县"},{"code":"610925","name":"岚皋县"},{"code":"610926","name":"平利县"},{"code":"610927","name":"镇坪县"},{"code":"610929","name":"白河县"},{"code":"610981","name":"旬阳市"}]},{"code":"6110","name":"商洛市","children":[{"code":"611002","name":"商州区"},{"code":"611021","name":"洛南县"},{"code":"611022","name":"丹凤县"},{"code":"611023","name":"商南县"},{"code":"611024","name":"山阳县"},{"code":"611025","name":"镇安县"},{"code":"611026","name":"柞水县"}]}]},{"code":"62","name":"甘肃省","children":[{"code":"6201","name":"兰州市","children":[{"code":"620102","name":"城关区"},{"code":"620103","name":"七里河区"},{"code":"620104","name":"西固区"},{"code":"620105","name":"安宁区"},{"code":"620111","name":"红古区"},{"code":"620121","name":"永登县"},{"code":"620122","name":"皋兰县"},{"code":"620123","name":"榆中县"},{"code":"620171","name":"兰州新区"}]},{"code":"6202","name":"嘉峪关市","children":[{"code":"620201001","name":"雄关街道"},{"code":"620201002","name":"钢城街道"},{"code":"620201100","name":"新城镇"},{"code":"620201101","name":"峪泉镇"},{"code":"620201102","name":"文殊镇"}]},{"code":"6203","name":"金昌市","children":[{"code":"620302","name":"金川区"},{"code":"620321","name":"永昌县"}]},{"code":"6204","name":"白银市","children":[{"code":"620402","name":"白银区"},{"code":"620403","name":"平川区"},{"code":"620421","name":"靖远县"},{"code":"620422","name":"会宁县"},{"code":"620423","name":"景泰县"}]},{"code":"6205","name":"天水市","children":[{"code":"620502","name":"秦州区"},{"code":"620503","name":"麦积区"},{"code":"620521","name":"清水县"},{"code":"620522","name":"秦安县"},{"code":"620523","name":"甘谷县"},{"code":"620524","name":"武山县"},{"code":"620525","name":"张家川回族自治县"}]},{"code":"6206","name":"武威市","children":[{"code":"620602","name":"凉州区"},{"code":"620621","name":"民勤县"},{"code":"620622","name":"古浪县"},{"code":"620623","name":"天祝藏族自治县"}]},{"code":"6207","name":"张掖市","children":[{"code":"620702","name":"甘州区"},{"code":"620721","name":"肃南裕固族自治县"},{"code":"620722","name":"民乐县"},{"code":"620723","name":"临泽县"},{"code":"620724","name":"高台县"},{"code":"620725","name":"山丹县"}]},{"code":"6208","name":"平凉市","children":[{"code":"620802","name":"崆峒区"},{"code":"620821","name":"泾川县"},{"code":"620822","name":"灵台县"},{"code":"620823","name":"崇信县"},{"code":"620825","name":"庄浪县"},{"code":"620826","name":"静宁县"},{"code":"620881","name":"华亭市"}]},{"code":"6209","name":"酒泉市","children":[{"code":"620902","name":"肃州区"},{"code":"620921","name":"金塔县"},{"code":"620922","name":"瓜州县"},{"code":"620923","name":"肃北蒙古族自治县"},{"code":"620924","name":"阿克塞哈萨克族自治县"},{"code":"620981","name":"玉门市"},{"code":"620982","name":"敦煌市"}]},{"code":"6210","name":"庆阳市","children":[{"code":"621002","name":"西峰区"},{"code":"621021","name":"庆城县"},{"code":"621022","name":"环县"},{"code":"621023","name":"华池县"},{"code":"621024","name":"合水县"},{"code":"621025","name":"正宁县"},{"code":"621026","name":"宁县"},{"code":"621027","name":"镇原县"}]},{"code":"6211","name":"定西市","children":[{"code":"621102","name":"安定区"},{"code":"621121","name":"通渭县"},{"code":"621122","name":"陇西县"},{"code":"621123","name":"渭源县"},{"code":"621124","name":"临洮县"},{"code":"621125","name":"漳县"},{"code":"621126","name":"岷县"}]},{"code":"6212","name":"陇南市","children":[{"code":"621202","name":"武都区"},{"code":"621221","name":"成县"},{"code":"621222","name":"文县"},{"code":"621223","name":"宕昌县"},{"code":"621224","name":"康县"},{"code":"621225","name":"西和县"},{"code":"621226","name":"礼县"},{"code":"621227","name":"徽县"},{"code":"621228","name":"两当县"}]},{"code":"6229","name":"临夏回族自治州","children":[{"code":"622901","name":"临夏市"},{"code":"622921","name":"临夏县"},{"code":"622922","name":"康乐县"},{"code":"622923","name":"永靖县"},{"code":"622924","name":"广河县"},{"code":"622925","name":"和政县"},{"code":"622926","name":"东乡族自治县"},{"code":"622927","name":"积石山保安族东乡族撒拉族自治县"}]},{"code":"6230","name":"甘南藏族自治州","children":[{"code":"623001","name":"合作市"},{"code":"623021","name":"临潭县"},{"code":"623022","name":"卓尼县"},{"code":"623023","name":"舟曲县"},{"code":"623024","name":"迭部县"},{"code":"623025","name":"玛曲县"},{"code":"623026","name":"碌曲县"},{"code":"623027","name":"夏河县"}]}]},{"code":"63","name":"青海省","children":[{"code":"6301","name":"西宁市","children":[{"code":"630102","name":"城东区"},{"code":"630103","name":"城中区"},{"code":"630104","name":"城西区"},{"code":"630105","name":"城北区"},{"code":"630106","name":"湟中区"},{"code":"630121","name":"大通回族土族自治县"},{"code":"630123","name":"湟源县"}]},{"code":"6302","name":"海东市","children":[{"code":"630202","name":"乐都区"},{"code":"630203","name":"平安区"},{"code":"630222","name":"民和回族土族自治县"},{"code":"630223","name":"互助土族自治县"},{"code":"630224","name":"化隆回族自治县"},{"code":"630225","name":"循化撒拉族自治县"}]},{"code":"6322","name":"海北藏族自治州","children":[{"code":"632221","name":"门源回族自治县"},{"code":"632222","name":"祁连县"},{"code":"632223","name":"海晏县"},{"code":"632224","name":"刚察县"}]},{"code":"6323","name":"黄南藏族自治州","children":[{"code":"632301","name":"同仁市"},{"code":"632322","name":"尖扎县"},{"code":"632323","name":"泽库县"},{"code":"632324","name":"河南蒙古族自治县"}]},{"code":"6325","name":"海南藏族自治州","children":[{"code":"632521","name":"共和县"},{"code":"632522","name":"同德县"},{"code":"632523","name":"贵德县"},{"code":"632524","name":"兴海县"},{"code":"632525","name":"贵南县"}]},{"code":"6326","name":"果洛藏族自治州","children":[{"code":"632621","name":"玛沁县"},{"code":"632622","name":"班玛县"},{"code":"632623","name":"甘德县"},{"code":"632624","name":"达日县"},{"code":"632625","name":"久治县"},{"code":"632626","name":"玛多县"}]},{"code":"6327","name":"玉树藏族自治州","children":[{"code":"632701","name":"玉树市"},{"code":"632722","name":"杂多县"},{"code":"632723","name":"称多县"},{"code":"632724","name":"治多县"},{"code":"632725","name":"囊谦县"},{"code":"632726","name":"曲麻莱县"}]},{"code":"6328","name":"海西蒙古族藏族自治州","children":[{"code":"632801","name":"格尔木市"},{"code":"632802","name":"德令哈市"},{"code":"632803","name":"茫崖市"},{"code":"632821","name":"乌兰县"},{"code":"632822","name":"都兰县"},{"code":"632823","name":"天峻县"},{"code":"632857","name":"大柴旦行政委员会"}]}]},{"code":"64","name":"宁夏回族自治区","children":[{"code":"6401","name":"银川市","children":[{"code":"640104","name":"兴庆区"},{"code":"640105","name":"西夏区"},{"code":"640106","name":"金凤区"},{"code":"640121","name":"永宁县"},{"code":"640122","name":"贺兰县"},{"code":"640181","name":"灵武市"}]},{"code":"6402","name":"石嘴山市","children":[{"code":"640202","name":"大武口区"},{"code":"640205","name":"惠农区"},{"code":"640221","name":"平罗县"}]},{"code":"6403","name":"吴忠市","children":[{"code":"640302","name":"利通区"},{"code":"640303","name":"红寺堡区"},{"code":"640323","name":"盐池县"},{"code":"640324","name":"同心县"},{"code":"640381","name":"青铜峡市"}]},{"code":"6404","name":"固原市","children":[{"code":"640402","name":"原州区"},{"code":"640422","name":"西吉县"},{"code":"640423","name":"隆德县"},{"code":"640424","name":"泾源县"},{"code":"640425","name":"彭阳县"}]},{"code":"6405","name":"中卫市","children":[{"code":"640502","name":"沙坡头区"},{"code":"640521","name":"中宁县"},{"code":"640522","name":"海原县"}]}]},{"code":"65","name":"新疆维吾尔自治区","children":[{"code":"6501","name":"乌鲁木齐市","children":[{"code":"650102","name":"天山区"},{"code":"650103","name":"沙依巴克区"},{"code":"650104","name":"新市区"},{"code":"650105","name":"水磨沟区"},{"code":"650106","name":"头屯河区"},{"code":"650107","name":"达坂城区"},{"code":"650109","name":"米东区"},{"code":"650121","name":"乌鲁木齐县"}]},{"code":"6502","name":"克拉玛依市","children":[{"code":"650202","name":"独山子区"},{"code":"650203","name":"克拉玛依区"},{"code":"650204","name":"白碱滩区"},{"code":"650205","name":"乌尔禾区"}]},{"code":"6504","name":"吐鲁番市","children":[{"code":"650402","name":"高昌区"},{"code":"650421","name":"鄯善县"},{"code":"650422","name":"托克逊县"}]},{"code":"6505","name":"哈密市","children":[{"code":"650502","name":"伊州区"},{"code":"650521","name":"巴里坤哈萨克自治县"},{"code":"650522","name":"伊吾县"}]},{"code":"6523","name":"昌吉回族自治州","children":[{"code":"652301","name":"昌吉市"},{"code":"652302","name":"阜康市"},{"code":"652323","name":"呼图壁县"},{"code":"652324","name":"玛纳斯县"},{"code":"652325","name":"奇台县"},{"code":"652327","name":"吉木萨尔县"},{"code":"652328","name":"木垒哈萨克自治县"}]},{"code":"6527","name":"博尔塔拉蒙古自治州","children":[{"code":"652701","name":"博乐市"},{"code":"652702","name":"阿拉山口市"},{"code":"652722","name":"精河县"},{"code":"652723","name":"温泉县"}]},{"code":"6528","name":"巴音郭楞蒙古自治州","children":[{"code":"652801","name":"库尔勒市"},{"code":"652822","name":"轮台县"},{"code":"652823","name":"尉犁县"},{"code":"652824","name":"若羌县"},{"code":"652825","name":"且末县"},{"code":"652826","name":"焉耆回族自治县"},{"code":"652827","name":"和静县"},{"code":"652828","name":"和硕县"},{"code":"652829","name":"博湖县"}]},{"code":"6529","name":"阿克苏地区","children":[{"code":"652901","name":"阿克苏市"},{"code":"652902","name":"库车市"},{"code":"652922","name":"温宿县"},{"code":"652924","name":"沙雅县"},{"code":"652925","name":"新和县"},{"code":"652926","name":"拜城县"},{"code":"652927","name":"乌什县"},{"code":"652928","name":"阿瓦提县"},{"code":"652929","name":"柯坪县"}]},{"code":"6530","name":"克孜勒苏柯尔克孜自治州","children":[{"code":"653001","name":"阿图什市"},{"code":"653022","name":"阿克陶县"},{"code":"653023","name":"阿合奇县"},{"code":"653024","name":"乌恰县"}]},{"code":"6531","name":"喀什地区","children":[{"code":"653101","name":"喀什市"},{"code":"653121","name":"疏附县"},{"code":"653122","name":"疏勒县"},{"code":"653123","name":"英吉沙县"},{"code":"653124","name":"泽普县"},{"code":"653125","name":"莎车县"},{"code":"653126","name":"叶城县"},{"code":"653127","name":"麦盖提县"},{"code":"653128","name":"岳普湖县"},{"code":"653129","name":"伽师县"},{"code":"653130","name":"巴楚县"},{"code":"653131","name":"塔什库尔干塔吉克自治县"}]},{"code":"6532","name":"和田地区","children":[{"code":"653201","name":"和田市"},{"code":"653221","name":"和田县"},{"code":"653222","name":"墨玉县"},{"code":"653223","name":"皮山县"},{"code":"653224","name":"洛浦县"},{"code":"653225","name":"策勒县"},{"code":"653226","name":"于田县"},{"code":"653227","name":"民丰县"}]},{"code":"6540","name":"伊犁哈萨克自治州","children":[{"code":"654002","name":"伊宁市"},{"code":"654003","name":"奎屯市"},{"code":"654004","name":"霍尔果斯市"},{"code":"654021","name":"伊宁县"},{"code":"654022","name":"察布查尔锡伯自治县"},{"code":"654023","name":"霍城县"},{"code":"654024","name":"巩留县"},{"code":"654025","name":"新源县"},{"code":"654026","name":"昭苏县"},{"code":"654027","name":"特克斯县"},{"code":"654028","name":"尼勒克县"}]},{"code":"6542","name":"塔城地区","children":[{"code":"654201","name":"塔城市"},{"code":"654202","name":"乌苏市"},{"code":"654203","name":"沙湾市"},{"code":"654221","name":"额敏县"},{"code":"654224","name":"托里县"},{"code":"654225","name":"裕民县"},{"code":"654226","name":"和布克赛尔蒙古自治县"}]},{"code":"6543","name":"阿勒泰地区","children":[{"code":"654301","name":"阿勒泰市"},{"code":"654321","name":"布尔津县"},{"code":"654322","name":"富蕴县"},{"code":"654323","name":"福海县"},{"code":"654324","name":"哈巴河县"},{"code":"654325","name":"青河县"},{"code":"654326","name":"吉木乃县"}]},{"code":"6590","name":"自治区直辖县级行政区划","children":[{"code":"659001","name":"石河子市"},{"code":"659002","name":"阿拉尔市"},{"code":"659003","name":"图木舒克市"},{"code":"659004","name":"五家渠市"},{"code":"659005","name":"北屯市"},{"code":"659006","name":"铁门关市"},{"code":"659007","name":"双河市"},{"code":"659008","name":"可克达拉市"},{"code":"659009","name":"昆玉市"},{"code":"659010","name":"胡杨河市"},{"code":"659011","name":"新星市"},{"code":"659012","name":"白杨市"}]}]}]');function gc(t){var a;return{value:String(t.code),label:String(t.name||""),children:(a=t.children)!=null&&a.length?t.children.map(gc):void 0}}const _c=Zh.map(gc),ki={};function bc(t){var a;for(const n of t)ki[n.value]=n.label,(a=n.children)!=null&&a.length&&bc(n.children)}bc(_c);const yc=["competition_name","student_name","competition_no","school_name","school_short_name","age_group","competition_room","seat_no","floor","teacher_name","date","session","enroll_teacher_name","teacher_phone","signup_teacher_name","signup_teacher_phone","signup_teacher_department","signup_teacher_position","signup_teacher_id_card","signup_teacher_email","signup_teacher_username","venue_name","venue_address","competition_daily_start","competition_daily_end"],kc={competition_name:"比赛名称",student_name:"学生姓名",competition_no:"参赛编号",school_name:"学校",school_short_name:"学校简称",age_group:"年龄段",competition_room:"考场/教室",seat_no:"座位号",floor:"楼层",teacher_name:"监考教师",date:"比赛日期",session:"场次",enroll_teacher_name:"报名/带队教师(扩展)",teacher_phone:"教师手机(扩展)",signup_teacher_name:"报名教师姓名",signup_teacher_phone:"报名教师手机",signup_teacher_department:"报名教师部门",signup_teacher_position:"报名教师职务",signup_teacher_id_card:"报名教师身份证",signup_teacher_email:"报名教师邮箱",signup_teacher_username:"报名教师账号",venue_name:"场地名称",venue_address:"场地地址",competition_daily_start:"比赛当天开始时间",competition_daily_end:"比赛当天结束时间"};function e0(t,a){return t.replace(/\{\{\s*([a-zA-Z0-9_.]+)\s*\}\}/g,(n,o)=>{if(o.includes(".")){const[c,d]=o.split("."),f=a[c];if(f&&typeof f=="object"){const u=f[d];if(u!=null&&u!=="")return String(u)}}const r=a[o];return r!=null&&r!==""?String(r):""})}function wc(t,a){const n=(t.competition_name!=null?String(t.competition_name):"")||(a??""),o=String(t.school_name??""),r=String(t.school_short_name??t.school_name_short??"").trim()||xc(o);return{competition_name:n,student_name:String(t.student_name??""),competition_no:String(t.competition_no??""),school_name:o,school_short_name:r,age_group:String(t.age_group??""),competition_room:String(t.competition_room??""),seat_no:String(t.seat_no??""),floor:String(t.floor??""),teacher_name:String(t.teacher_name??""),date:String(t.date??t.competition_date??""),session:String(t.session??t.competition_session??""),enroll_teacher_name:String(t.enroll_teacher_name??""),teacher_phone:String(t.teacher_phone??""),signup_teacher_name:String(t.signup_teacher_name??""),signup_teacher_phone:String(t.signup_teacher_phone??""),signup_teacher_department:String(t.signup_teacher_department??""),signup_teacher_position:String(t.signup_teacher_position??""),signup_teacher_id_card:String(t.signup_teacher_id_card??""),signup_teacher_email:String(t.signup_teacher_email??""),signup_teacher_username:String(t.signup_teacher_username??""),venue_name:String(t.venue_name??""),venue_address:String(t.venue_address??""),competition_daily_start:String(t.competition_daily_start??""),competition_daily_end:String(t.competition_daily_end??"")}}function xc(t){let a=String(t??"").trim();if(!a)return"";a=a.replace(/\s+/g,""),a=a.replace(/^[中国中华人民共和國共和国]+/,"");const n=/^(?:[^省特别行政区]+省|内蒙古自治区|广西壮族自治区|宁夏回族自治区|新疆维吾尔自治区|西藏自治区|北京市|天津市|上海市|重庆市|香港特别行政区|澳门特别行政区|台湾省|[^市]+市|[^区县旗]+区|[^区县旗]+县|[^区县旗]+旗|[^镇乡街道]+镇|[^镇乡街道]+乡|[^镇乡街道]+街道)/;let o=!0;for(;o&&a;){o=!1;const r=a.replace(n,"");r!==a&&(a=r,o=!0)}return a||t.trim()}function t0(t){return[...t].sort((a,n)=>(a.zIndex??0)-(n.zIndex??0))}const n0=yc,o0=kc;function wi(t,a){const n=(t.competition_name!=null?String(t.competition_name):"")||(a??""),o=String(t.school_name??""),r=String(t.school_short_name??t.school_name_short??"").trim()||xc(o);return{competition_name:n,student_name:String(t.student_name??""),competition_no:String(t.competition_no??""),school_name:o,school_short_name:r,age_group:String(t.age_group??""),competition_room:String(t.competition_room??""),seat_no:String(t.seat_no??""),floor:String(t.floor??""),teacher_name:String(t.teacher_name??""),date:String(t.date??t.competition_date??""),session:String(t.session??t.competition_session??""),enroll_teacher_name:String(t.enroll_teacher_name??""),teacher_phone:String(t.teacher_phone??""),signup_teacher_name:String(t.signup_teacher_name??""),signup_teacher_phone:String(t.signup_teacher_phone??""),signup_teacher_department:String(t.signup_teacher_department??""),signup_teacher_position:String(t.signup_teacher_position??""),signup_teacher_id_card:String(t.signup_teacher_id_card??""),signup_teacher_email:String(t.signup_teacher_email??""),signup_teacher_username:String(t.signup_teacher_username??""),venue_name:String(t.venue_name??""),venue_address:String(t.venue_address??""),competition_daily_start:String(t.competition_daily_start??""),competition_daily_end:String(t.competition_daily_end??"")}}const l0=["spinner","dual-ring","crescent","gradient","dash","dots","wave","bounce","bars","bricks","square","flip","pulse","ripple","orbit","radar","spiral","infinity","hourglass","skeleton"],zl=new WeakMap,a0=t=>{if(t instanceof HTMLElement)return t;if(typeof t=="string"){const a=document.querySelector(t);if(a instanceof HTMLElement)return a}return document.body},i0=t=>{const a=getComputedStyle(t).position;(a==="static"||!a)&&(t.dataset.qiuLoadingPrevPosition=t.style.position||"",t.style.position="relative")},r0=t=>{"qiuLoadingPrevPosition"in t.dataset&&(t.style.position=t.dataset.qiuLoadingPrevPosition||"",delete t.dataset.qiuLoadingPrevPosition)},Vc=t=>typeof t.value=="object"&&t.value!==null?{...t.value}:{loading:!!t.value},Cc=t=>typeof t.value=="object"&&t.value!==null?t.value.loading===void 0?!0:!!t.value.loading:!!t.value,xi=(t,a)=>{const n=a.text||"",o=a.effect||"spinner",r=!!a.transparent,c=zl.get(t);if(c&&c.text===n&&c.effect===o&&c.transparent===r)return c;c&&(c.app.unmount(),c.el.remove(),zl.delete(t));const d=a.fullscreen??t===document.body;d||i0(t);const f=document.createElement("div");f.className="qiu-loading-host",t.appendChild(f);const u=e.createApp({setup(){return()=>e.h(pa,{text:n,fullscreen:d,transparent:r,effect:o})}});u.mount(f);const h={app:u,el:f,host:t,text:n,effect:o,transparent:r};return zl.set(t,h),h},Vi=t=>{const a=zl.get(t);a&&(a.app.unmount(),a.el.remove(),zl.delete(t),t!==document.body&&r0(t))},c0={mounted(t,a){if(Cc(a)){const n=Vc(a);xi(t,{...n})}},updated(t,a){const n=Vc(a);Cc(a)?xi(t,{...n}):Vi(t)},unmounted(t){Vi(t)}},ka={service(t={}){const a=a0(t.target),n=a===document.body;return xi(a,{...t,fullscreen:t.fullscreen??n}),{close:()=>Vi(a)}}},Nc={install(t){t.directive("qiu-loading",c0)}};function Bc(t){return typeof t=="string"?{size:t,orientation:"portrait"}:{size:t.size,orientation:t.orientation??"portrait",widthMm:Number(t.widthMm||0)||void 0,heightMm:Number(t.heightMm||0)||void 0}}function s0(t){const a=t.size==="custom";return new Cr.jsPDF({unit:"mm",format:a?[Math.max(1,Number(t.widthMm||0)),Math.max(1,Number(t.heightMm||0))]:t.size==="a4"?"a4":"a3",orientation:a?"p":t.orientation==="landscape"?"l":"p",compress:!0})}function d0(t){return t.size==="custom"?`${Math.max(1,Number(t.widthMm||0))}mm ${Math.max(1,Number(t.heightMm||0))}mm`:`${t.size.toUpperCase()} ${t.orientation}`}async function $c(t,a,n){if(!t.length)return;const o=u0();try{const r=await m0(t,n,{onProgress:c=>void 0});t.length,t.length,r.save(a)}finally{f0(o)}}async function Ec(t,a,n){if(!t.length)return;const o=ka.service({fullscreen:!0,text:"正在准备打印预览"}),r=Bc(n),c=Array.from(document.querySelectorAll("style")).map(B=>B.outerHTML).join(`
65
+ `),d=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).map(B=>B.outerHTML).join(`
66
+ `),f=d0(r),u=t.map(B=>`<section class="print-page">${B.outerHTML}</section>`).join(`
67
+ `),h=document.createElement("iframe");h.setAttribute("aria-hidden","true"),h.style.position="fixed",h.style.left="-10000px",h.style.top="0",h.style.width="1px",h.style.height="1px",h.style.border="0",h.style.opacity="0",h.style.pointerEvents="none",document.body.appendChild(h);const p=h.contentDocument,_=h.contentWindow;if(!p||!_)throw h.remove(),o.close(),new Error("打印环境初始化失败");h.title=a,h.srcdoc=`<!doctype html>
68
+ <html lang="zh-CN">
69
+ <head>
70
+ <meta charset="utf-8" />
71
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
72
+ <title>${p0(a)}</title>
73
+ ${d}
74
+ ${c}
75
+ <style>
76
+ @page { size: ${f}; margin: 0; }
77
+ html, body {
78
+ margin: 0;
79
+ padding: 0;
80
+ background: #fff;
81
+ }
82
+ body {
83
+ -webkit-print-color-adjust: exact;
84
+ print-color-adjust: exact;
85
+ }
86
+ .print-page {
87
+ break-after: page;
88
+ page-break-after: always;
89
+ }
90
+ .print-page:last-child {
91
+ break-after: auto;
92
+ page-break-after: auto;
93
+ }
94
+ .pdf-page {
95
+ margin: 0 !important;
96
+ box-shadow: none !important;
97
+ }
98
+ </style>
99
+ </head>
100
+ <body>
101
+ ${u}
102
+ </body>
103
+ </html>`;try{await h0(_),o.close(),_.focus(),await new Promise(B=>window.setTimeout(B,180)),_.print()}finally{window.setTimeout(()=>o.close(),120)}_.addEventListener("afterprint",()=>{window.setTimeout(()=>{h.remove()},300)},{once:!0}),window.setTimeout(()=>{h.remove()},4e3)}async function m0(t,a,n={}){var f;const o=Bc(a),r=s0(o),c=r.internal.pageSize.getWidth(),d=r.internal.pageSize.getHeight();for(let u=0;u<t.length;u++){u>0&&r.addPage(),(f=n.onProgress)==null||f.call(n,{phase:"render",current:u+1,total:t.length,percent:Math.min(95,Math.round((u+1)/t.length*90)),text:`正在渲染第 ${u+1} / ${t.length} 页`});const p=(await Vr(t[u],{scale:2,useCORS:!0,logging:!1,backgroundColor:"#ffffff",scrollX:0,scrollY:-window.scrollY,windowWidth:t[u].scrollWidth,windowHeight:t[u].scrollHeight})).toDataURL("image/png",.92);r.addImage(p,"PNG",0,0,c,d)}return r}function u0(){return ka.service({fullscreen:!0,text:"正在生成 PDF 0%"})}function LV(t,a){}function f0(t){window.setTimeout(()=>t.close(),120)}function p0(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}async function h0(t){await new Promise(n=>{if(t.document.readyState==="complete"){n();return}t.addEventListener("load",()=>n(),{once:!0}),setTimeout(()=>n(),1200)});const a=Array.from(t.document.images);await Promise.all(a.map(n=>new Promise(o=>{if(n.complete){o();return}n.addEventListener("load",()=>o(),{once:!0}),n.addEventListener("error",()=>o(),{once:!0}),setTimeout(()=>o(),1200)})))}function wa(t=160){const a=e.ref(null),n=e.ref(Math.max(t,200));let o=0,r=null,c=null;const d=()=>{const u=a.value;u&&(cancelAnimationFrame(o),o=requestAnimationFrame(()=>{const h=Math.floor(u.getBoundingClientRect().height),p=Math.max(t,h);Math.abs(p-n.value)>1&&(n.value=p)}))},f=()=>{c==null||c(),c=null,r==null||r.disconnect(),r=null};return e.watch(a,u=>{if(f(),!u)return;e.nextTick(()=>d());const h=()=>d();window.addEventListener("resize",h,{passive:!0}),c=()=>window.removeEventListener("resize",h),r=new ResizeObserver(()=>d()),r.observe(u)},{flush:"post"}),e.onUnmounted(()=>{f(),cancelAnimationFrame(o)}),{hostRef:a,tableHeight:n,recalcTableHeight:d}}function g0(t){if(t==null)return[];const a=String(t).trim();if(!a)return[];try{const n=JSON.parse(a);if(Array.isArray(n))return n.map(String).filter(Boolean)}catch{}return[]}function _0(t,a){const n=g0(t);return n.length?n.map(o=>a[o]||o).filter(Boolean).join(" / "):String(t??"").trim()}const b0={class:"page-container badge-manage"},y0={class:"tpl-list-layout"},k0={class:"tpl-region-aside"},w0={class:"tpl-list-main"},x0={class:"hint tpl-hint tpl-hint-shrink"},V0={class:"tpl-filter-bar"},C0={class:"pagination-wrapper tpl-pagination"},N0={class:"toolbar"},B0={key:0},$0={key:1},E0={key:0},S0={key:1},M0={class:"preview-head"},q0={class:"preview-head-actions"},z0={key:1,class:"badge-grid"},T0={class:"badge-name"},I0={class:"badge-school"},D0={class:"badge-no"},R0={class:"badge-room"},L0={key:0,class:"checkbox-empty"},P0={class:"inline-stack"},O0={class:"paper-config"},j0={class:"paper-config-block"},F0={class:"paper-config-block"},A0={key:0,class:"paper-config-desc"},Q0={class:"paper-config-block"},U0={class:"paper-inline-row"},W0={class:"paper-config-desc"},H0={class:"pdf-dialog-body"},Y0={class:"sb-name"},K0={class:"sb-school"},v0={class:"sb-no"},X0={class:"sb-room"},Sc="zhihui_admin_badge_tasks",Ci=8,G0=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({__name:"BadgeManageView",setup(t){const{hostRef:a,tableHeight:n,recalcTableHeight:o}=wa(140),{hostRef:r,tableHeight:c,recalcTableHeight:d}=wa(160),f=Cn.useRouter(),u=e.ref(!1),h=e.ref(!1);function p(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2,11)}`}const _=e.ref([]),B=e.ref([]),$=e.ref([]),b=e.ref(""),C=e.ref([]),k=e.ref({page:1,pageSize:10,total:0}),M=e.ref(null),V=e.ref(""),E=e.ref(""),x=e.ref(!1),m=e.ref(""),w=e.ref(void 0),S=e.ref(void 0),N=e.ref(!0),D=e.ref([]),T=e.ref(!1),L=e.ref([]),U=e.ref("sequence"),oe=e.ref([]),H=e.ref([]),Ve=e.ref([]),Z=e.ref(""),z=e.ref(""),fe=e.ref([]),he=e.ref([]),se=e.ref(""),te=e.ref(!1),re=e.ref("a4"),Ne=e.ref("portrait"),De=e.ref(2),$e=e.ref(2),Ge=e.ref(null),st=e.ref(!1),ht=e.ref(!1),He=e.ref(!1),ct=e.ref(null),Q=e.ref(null),F=e.ref([]),Be=e.ref([]),qe=e.ref(""),K={a4:{w:210,h:297},a3:{w:297,h:420}},X=e.computed(()=>re.value==="custom"),le=e.computed(()=>{var R,Te,je,Ue;if(X.value)return{w:Number(((Te=(R=Q.value)==null?void 0:R.canvas)==null?void 0:Te.widthMm)??90),h:Number(((Ue=(je=Q.value)==null?void 0:je.canvas)==null?void 0:Ue.heightMm)??130)};const ne=K[re.value==="a3"?"a3":"a4"];return Ne.value==="landscape"?{w:ne.h,h:ne.w}:ne}),ye=e.computed(()=>{var ne,R,Te,je;return{w:Number(((R=(ne=Q.value)==null?void 0:ne.canvas)==null?void 0:R.widthMm)??90),h:Number(((je=(Te=Q.value)==null?void 0:Te.canvas)==null?void 0:je.heightMm)??130)}}),Pe=e.computed(()=>{const ne=le.value,R=ye.value;if(X.value)return{requestedCols:1,maxCols:1,cols:1,rows:1,perPage:1,blockW:R.w,blockH:R.h};const Te=Math.max(1,ne.w-Ci*2),je=Math.max(1,ne.h-Ci*2),Ue=Math.max(1,Math.floor(Te/R.w)),et=Math.max(1,Number($e.value||1)),qt=Math.min(et,Ue),It=Math.max(1,Math.floor(je/R.h)),kt=Math.max(1,qt*It);return{requestedCols:et,maxCols:Ue,cols:qt,rows:It,perPage:kt,blockW:qt*R.w,blockH:It*R.h}}),Qe=e.computed(()=>{const ne=Pe.value.perPage,R=[];for(let Te=0;Te<F.value.length;Te+=ne)R.push(F.value.slice(Te,Te+ne));return R}),Bt=e.computed(()=>({width:`${le.value.w}mm`})),wt=e.computed(()=>({width:`${le.value.w}mm`,height:`${le.value.h}mm`,padding:`${X.value?0:Ci}mm`}));function xt(ne){const R=Math.max(1,Math.min(Pe.value.cols,ne||1)),Te=Math.max(1,Math.ceil((ne||1)/Math.max(1,Pe.value.cols)));return{width:`${R*ye.value.w}mm`,minHeight:`${Te*ye.value.h}mm`,gridTemplateColumns:`repeat(${R}, ${ye.value.w}mm)`,gridAutoRows:`${ye.value.h}mm`}}const pt=e.computed(()=>({width:`${ye.value.w}mm`,height:`${ye.value.h}mm`})),J=e.computed(()=>Ve.value.map(ne=>{const R=String(ne.seat_no??"").trim(),Te=!R;return{value:ne.id,label:`${ne.student_name}(座位:${R||"无"})`,disabled:Te}})),G=e.computed(()=>B.value.map(ne=>({label:ne.name,value:ne.id}))),me=e.computed(()=>H.value.map(ne=>({label:`${ne.name||"未命名模板"}${ne.is_default?"(默认)":""}`,value:ne.id}))),pe=e.computed(()=>{const ne=Z.value.trim().toLowerCase();return ne?oe.value.filter(R=>`${R.school_name}`.toLowerCase().includes(ne)):oe.value}),ze=e.computed(()=>{const ne=z.value.trim().toLowerCase();return ne?J.value.filter(R=>R.label.toLowerCase().includes(ne)):J.value}),we=ne=>{if(!ne)return"";const R=new Date(ne);return Number.isNaN(R.getTime())?ne:R.toLocaleString()},Se=ne=>Array.isArray(ne)?ne.map(R=>({id:`r-${R.value}`,label:R.label,code:String(R.value||""),children:Se(R.children||[])})):[],We=e.computed(()=>[{id:"all",label:"全国",code:"",children:Se(_c)}]),Je=e.computed(()=>E.value?ki[E.value]||E.value:""),Ze=(ne,R)=>{const Te=ne.trim();return Te?R.label.includes(Te):!0},tt=ne=>{E.value=ne.code||"",k.value.page=1,yt()},Ye=()=>{var ne;E.value="",(ne=M.value)==null||ne.setCurrentKey("all"),k.value.page=1,yt()},rt=()=>{k.value.page=1,yt()},ot=()=>{var ne;b.value="",C.value=[],E.value="",V.value="",(ne=M.value)==null||ne.setCurrentKey("all"),k.value.page=1,yt()},Mt=ne=>(k.value.page-1)*k.value.pageSize+ne+1,lt=()=>{try{localStorage.setItem(Sc,JSON.stringify($.value))}catch{}},dt=()=>{try{const ne=localStorage.getItem(Sc);if(!ne)return;const R=JSON.parse(ne);Array.isArray(R)&&($.value=R.map(Te=>({id:String(Te.id||p()),title:String(Te.title||"证件任务"),competitionId:Number(Te.competitionId||0),competitionName:String(Te.competitionName||""),templateId:Te.templateId?Number(Te.templateId):void 0,templateName:Te.templateName?String(Te.templateName):void 0,scopeAllSchools:!!(Te.scopeAllSchools??!0),schoolIds:Array.isArray(Te.schoolIds)?Te.schoolIds.map(je=>Number(je)):[],studentIds:Array.isArray(Te.studentIds)?Te.studentIds.map(je=>Number(je)):null,generateMode:Te.generateMode==="school"?"school":"sequence",createdAt:String(Te.createdAt||new Date().toISOString())})))}catch{}},yt=async()=>{var ne,R;h.value=!0;try{const Te={page:k.value.page,page_size:k.value.pageSize},je=b.value.trim();je&&(Te.keyword=je),C.value.length===2&&(Te.start_date=C.value[0],Te.end_date=C.value[1]),E.value&&(Te.host_region_code=E.value);const Ue=await oi(Te);_.value=((ne=Ue.data)==null?void 0:ne.data)||[],k.value.total=((R=Ue.data)==null?void 0:R.total)||0}catch{_.value=[],k.value.total=0}finally{h.value=!1,e.nextTick(()=>o())}},Ot=async()=>{var ne;try{const R=await oi({page:1,page_size:500});B.value=((ne=R.data)==null?void 0:ne.data)||[]}catch{B.value=[]}},ut=ne=>{f.push(`/qiuui/badge/competition/${ne}/badge-templates`)},$n=ne=>{f.push(`/qiuui/badge/competition/${ne}`)},v=()=>{u.value=!0},xe=()=>{Le(),x.value=!0},Le=()=>{m.value="",w.value=void 0,S.value=void 0,N.value=!0,D.value=[],T.value=!1,L.value=[],U.value="sequence",oe.value=[],H.value=[],Ve.value=[],Z.value="",z.value=""},be=async ne=>{var R,Te,je;if(D.value=[],S.value=void 0,L.value=[],oe.value=[],H.value=[],Ve.value=[],!!ne){try{const Ue=await Pr(ne);H.value=((R=Ue.data)==null?void 0:R.list)??[];const et=H.value[0];et!=null&&et.id&&(S.value=Number(et.id))}catch{H.value=[]}try{const Ue=await xm(ne);oe.value=((Te=Ue.data)==null?void 0:Te.schools)??[]}catch{oe.value=[]}try{const Ue=await Cm(ne,{page:1,page_size:5e3});Ve.value=((je=Ue.data)==null?void 0:je.data)??Ue.data??[]}catch{Ve.value=[]}}},ft=()=>{const ne=w.value;if(!ne){ke.warning("请选择比赛");return}if(!S.value){ke.warning("请选择证件模板");return}if(!N.value&&!D.value.length){ke.warning("请选择至少一所学校,或改为「全部学校」");return}if(T.value&&!L.value.length){ke.warning("请勾选指定学生,或关闭「指定学生」");return}const R=B.value.find(Ue=>Ue.id===ne)||_.value.find(Ue=>Ue.id===ne),Te=H.value.find(Ue=>Number(Ue.id)===Number(S.value)),je={id:p(),title:m.value.trim()||`证件任务 ${$.value.length+1}`,competitionId:ne,competitionName:(R==null?void 0:R.name)??`#${ne}`,templateId:Number(S.value),templateName:(Te==null?void 0:Te.name)||"未命名模板",scopeAllSchools:N.value,schoolIds:N.value?[]:[...D.value],studentIds:T.value&&L.value.length?[...L.value]:null,generateMode:U.value,createdAt:new Date().toISOString()};$.value=[je,...$.value],lt(),x.value=!1,ke.success("任务已保存")},zt=ne=>{Ge.value=ne,re.value="a4",Ne.value="portrait",De.value=2,$e.value=2,te.value=!0},Tt=async ne=>{Ge.value=ne,re.value="a4",Ne.value="portrait",De.value=2,$e.value=2,await gt()},gt=async()=>{var Te,je,Ue,et;const ne=Ge.value;if(!ne){te.value=!1;return}te.value=!1,se.value=ne.title,qe.value=ne.title,fe.value=[],he.value=[],Q.value=null,F.value=[],Be.value=[];const R={};!ne.scopeAllSchools&&ne.schoolIds.length&&(R.school_ids=ne.schoolIds.join(",")),(Te=ne.studentIds)!=null&&Te.length&&(R.student_ids=ne.studentIds.join(",")),ht.value=!0,st.value=!0;try{const qt=await Vm(ne.competitionId,R);if(fe.value=mn(((je=qt.data)==null?void 0:je.badges)??[],ne.generateMode),he.value=$t(((Ue=qt.data)==null?void 0:Ue.skipped_no_seat)??[],ne.generateMode),Be.value=he.value,!fe.value.length&&!he.value.length){st.value=!1,ql("没有可生成的证件(请检查是否已按赛事场次上传学生、已添加教室并自动编排座位号)","提示");return}F.value=fe.value.map(It=>wc(It));try{const kt=(et=(ne.templateId?await li(ne.competitionId,ne.templateId):await pm(ne.competitionId)).data)==null?void 0:et.template_json;if(kt&&typeof kt=="object"&&Array.isArray(kt.elements)&&kt.elements.length&&(Q.value=kt,await e.nextTick(),Pe.value.requestedCols>Pe.value.maxCols)){st.value=!1,ke.warning(`${re.value.toUpperCase()}${Ne.value==="landscape"?"横向":"纵向"} 最多每行显示 ${Pe.value.maxCols} 个证件,请调整后重试`);return}}catch{Q.value=null}}catch{st.value=!1}finally{ht.value=!1}},En=()=>{fe.value=[],he.value=[],se.value=""},dn=()=>{Ge.value&&(st.value=!0)},no=async ne=>{const R=Ge.value;if(R!=null&&R.competitionId)try{await Nm(R.competitionId,{source:ne})}catch{ke.warning("参赛证已输出,但定档状态写入失败,请刷新后重试")}},Dn=async()=>{const ne=ct.value;if(!(!ne||!F.value.length)){He.value=!0;try{await e.nextTick(),await new Promise(je=>setTimeout(je,200));const R=(qe.value||"export").replace(/[/\\?%*:|"<>]/g,"_"),Te=Array.from(ne.querySelectorAll(".pdf-page"));await $c(Te,`证件_${R}.pdf`,{size:re.value,orientation:Ne.value,widthMm:le.value.w,heightMm:le.value.h}),await no("badge_pdf")}finally{He.value=!1}}},oo=async()=>{const ne=ct.value;if(!(!ne||!F.value.length))try{await e.nextTick(),await new Promise(je=>setTimeout(je,200));const R=Array.from(ne.querySelectorAll(".pdf-page")),Te=(qe.value||"证件预览").replace(/[/\\?%*:|"<>]/g,"_");await Ec(R,`证件_${Te}`,{size:re.value,orientation:Ne.value,widthMm:le.value.w,heightMm:le.value.h}),await no("badge_print")}catch(R){ke.error(R instanceof Error?R.message:"打印失败")}},Rt=ne=>{$.value=$.value.filter(R=>R.id!==ne),lt()};e.onMounted(async()=>{dt(),await Promise.all([yt(),Ot()]),e.nextTick(()=>{o(),d()})}),e.watch(V,ne=>{var R;(R=M.value)==null||R.filter(ne)}),e.watch(()=>$.value.length,()=>e.nextTick(()=>d())),e.onActivated(()=>e.nextTick(()=>{o(),d()})),e.watch(De,ne=>{X.value||ne>0&&($e.value=ne)}),e.watch($e,ne=>{if(X.value){$e.value!==1&&($e.value=1),De.value!==1&&(De.value=1);return}const R=Math.max(1,Number(ne||1));if(R!==ne){$e.value=R;return}De.value=[1,2,3].includes(R)?R:0}),e.watch(re,ne=>{ne==="custom"&&(Ne.value="portrait",De.value=1,$e.value=1)});function mn(ne,R){const Te=Array.isArray(ne)?[...ne]:[];return R==="school"?(Te.sort((je,Ue)=>{const et=Re(je==null?void 0:je.school_name,Ue==null?void 0:Ue.school_name);if(et!==0)return et;const qt=Re(je==null?void 0:je.competition_room,Ue==null?void 0:Ue.competition_room);if(qt!==0)return qt;const It=un(je==null?void 0:je.seat_no,Ue==null?void 0:Ue.seat_no);return It!==0?It:Re(je==null?void 0:je.student_name,Ue==null?void 0:Ue.student_name)}),Te):(Te.sort((je,Ue)=>{const et=Re(je==null?void 0:je.competition_room,Ue==null?void 0:Ue.competition_room);if(et!==0)return et;const qt=un(je==null?void 0:je.seat_no,Ue==null?void 0:Ue.seat_no);if(qt!==0)return qt;const It=Re(je==null?void 0:je.competition_no,Ue==null?void 0:Ue.competition_no);return It!==0?It:Re(je==null?void 0:je.student_name,Ue==null?void 0:Ue.student_name)}),Te)}function $t(ne,R){const Te=Array.isArray(ne)?[...ne]:[];return Te.sort((je,Ue)=>{if(R==="school"){const et=Re(je==null?void 0:je.school_name,Ue==null?void 0:Ue.school_name);if(et!==0)return et}return Re(je==null?void 0:je.student_name,Ue==null?void 0:Ue.student_name)}),Te}function Re(ne,R){return String(ne||"").localeCompare(String(R||""),"zh-CN")}function un(ne,R){const Te=String(ne||"").trim(),je=String(R||"").trim(),Ue=Number(Te),et=Number(je),qt=Te!==""&&!Number.isNaN(Ue),It=je!==""&&!Number.isNaN(et);return qt&&It&&Ue!==et?Ue-et:Te.localeCompare(je,"zh-CN",{numeric:!0})}return(ne,R)=>{const Te=Wn,je=bi,Ue=fc,et=nn,qt=uc,It=$o,kt=_a,bn=Ml,el=Qo,Rn=No,Ht=Vo,fn=Ko,tl=El,At=fa,yn=$l,mt=Bo,nl=ua,vn=Bl,on=Yo,pn=Nn,Mo=Nl,Ln=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",b0,[e.createVNode(Rn,{shadow:"never",class:"tpl-entry-card tpl-fill-card"},{header:e.withCtx(()=>[...R[27]||(R[27]=[e.createElementVNode("div",{class:"card-head"},[e.createElementVNode("span",{class:"toolbar-title"},"证件模板"),e.createElementVNode("span",{class:"card-head-desc"},"按比赛设计版面;保存后学校端按模板套打。")],-1)])]),default:e.withCtx(()=>[e.createElementVNode("div",y0,[e.createElementVNode("aside",k0,[R[28]||(R[28]=e.createElementVNode("div",{class:"tree-title"},"赛区分类",-1)),e.createVNode(Te,{modelValue:V.value,"onUpdate:modelValue":R[0]||(R[0]=ge=>V.value=ge),class:"tree-filter",clearable:"",size:"small",placeholder:"筛选赛区"},null,8,["modelValue"]),e.createVNode(Ue,{class:"tpl-region-scroll"},{default:e.withCtx(()=>[e.createVNode(je,{ref_key:"treeRef",ref:M,data:We.value,"highlight-current":"","default-expanded-keys":["all"],props:{label:"label",children:"children",value:"id"},"filter-node-method":Ze,onNodeClick:tt},null,8,["data"])]),_:1})]),e.createElementVNode("section",w0,[e.createElementVNode("p",x0,[R[30]||(R[30]=e.createTextVNode(" 在列表中选择比赛进入",-1)),R[31]||(R[31]=e.createElementVNode("strong",null,"管理模板",-1)),R[32]||(R[32]=e.createTextVNode(",或与下方「证件生成任务」配合:先选比赛制作模板,再用任务生成预览。 ",-1)),e.createVNode(et,{link:"",type:"primary",onClick:v},{default:e.withCtx(()=>[...R[29]||(R[29]=[e.createTextVNode("证件图片库",-1)])]),_:1})]),e.createElementVNode("div",V0,[e.createVNode(Te,{modelValue:b.value,"onUpdate:modelValue":R[1]||(R[1]=ge=>b.value=ge),clearable:"",placeholder:"关键字:比赛名称/赛区码/场地",style:{width:"240px"},onKeyup:e.withKeys(rt,["enter"])},null,8,["modelValue"]),e.createVNode(qt,{modelValue:C.value,"onUpdate:modelValue":R[2]||(R[2]=ge=>C.value=ge),type:"daterange","value-format":"YYYY-MM-DD","start-placeholder":"开始日期","end-placeholder":"结束日期","range-separator":"至",style:{width:"260px"}},null,8,["modelValue"]),e.createVNode(et,{type:"primary",onClick:rt},{default:e.withCtx(()=>[...R[33]||(R[33]=[e.createTextVNode("查询",-1)])]),_:1}),e.createVNode(et,{onClick:ot},{default:e.withCtx(()=>[...R[34]||(R[34]=[e.createTextVNode("重置",-1)])]),_:1}),Je.value?(e.openBlock(),e.createBlock(It,{key:0,type:"info",closable:"",onClose:Ye},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Je.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",{ref_key:"tplHostRef",ref:a,class:"table-host"},[e.withDirectives((e.openBlock(),e.createBlock(bn,{data:_.value,stripe:"",height:e.unref(n),"empty-text":"暂无比赛数据",size:"small",class:"tpl-table"},{default:e.withCtx(()=>[e.createVNode(kt,{type:"index",label:"#",width:"52",align:"center",index:Mt}),e.createVNode(kt,{prop:"name",label:"比赛名称","min-width":"200","show-overflow-tooltip":""}),e.createVNode(kt,{prop:"area_code",label:"赛区码",width:"82"}),e.createVNode(kt,{label:"举办地","min-width":"150","show-overflow-tooltip":""},{default:e.withCtx(({row:ge})=>[e.createTextVNode(e.toDisplayString(e.unref(_0)(ge.host_region,e.unref(ki))||"—"),1)]),_:1}),e.createVNode(kt,{prop:"start_date",label:"开始日期",width:"118"}),e.createVNode(kt,{label:"状态",width:"96"},{default:e.withCtx(({row:ge})=>[e.createVNode(It,{size:"small",type:["info","success","primary","danger"][Number(ge.status)]??"info"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(["草稿","报名中","进行中","已结束"][Number(ge.status)]??"—"),1)]),_:2},1032,["type"])]),_:1}),e.createVNode(kt,{label:"模板",width:"220",fixed:"right"},{default:e.withCtx(({row:ge})=>[e.createVNode(et,{link:"",type:"primary",onClick:Lt=>ut(ge.id)},{default:e.withCtx(()=>[...R[35]||(R[35]=[e.createTextVNode("管理模板",-1)])]),_:1},8,["onClick"]),e.createVNode(et,{link:"",type:"primary",onClick:Lt=>$n(ge.id)},{default:e.withCtx(()=>[...R[36]||(R[36]=[e.createTextVNode("比赛详情",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","height"])),[[Ln,h.value]])],512),e.createElementVNode("div",C0,[e.createVNode(el,{"current-page":k.value.page,"onUpdate:currentPage":R[3]||(R[3]=ge=>k.value.page=ge),"page-size":k.value.pageSize,"onUpdate:pageSize":R[4]||(R[4]=ge=>k.value.pageSize=ge),total:k.value.total,"page-sizes":[10,20,50],layout:"total, sizes, prev, pager, next",onChange:yt},null,8,["current-page","page-size","total"])])])])]),_:1}),e.createVNode(Rn,{shadow:"never",class:"task-fill-card"},{default:e.withCtx(()=>[e.createElementVNode("div",N0,[R[38]||(R[38]=e.createElementVNode("span",{class:"toolbar-title"},"证件生成任务",-1)),e.createVNode(et,{type:"primary",onClick:xe},{default:e.withCtx(()=>[...R[37]||(R[37]=[e.createTextVNode("添加任务",-1)])]),_:1})]),R[43]||(R[43]=e.createElementVNode("p",{class:"hint task-hint-shrink"},"任务保存在本浏览器;点击「生成预览」将先选择 A4/A3 纸张,再打开整版预览并可下载 PDF(无座位号的学生会被跳过或禁止)。",-1)),e.createElementVNode("div",{ref_key:"taskHostRef",ref:r,class:"table-host"},[e.createVNode(bn,{data:$.value,stripe:"","empty-text":"暂无任务,请点击添加",height:e.unref(c)},{default:e.withCtx(()=>[e.createVNode(kt,{prop:"title",label:"任务名称","min-width":"140"}),e.createVNode(kt,{prop:"competitionName",label:"比赛","min-width":"160","show-overflow-tooltip":""}),e.createVNode(kt,{label:"模板","min-width":"140","show-overflow-tooltip":""},{default:e.withCtx(({row:ge})=>[e.createTextVNode(e.toDisplayString(ge.templateName||"默认模板"),1)]),_:1}),e.createVNode(kt,{label:"学校范围",width:"140"},{default:e.withCtx(({row:ge})=>[ge.scopeAllSchools?(e.openBlock(),e.createElementBlock("span",B0,"全部学校")):(e.openBlock(),e.createElementBlock("span",$0,e.toDisplayString(ge.schoolIds.length)+" 所学校",1))]),_:1}),e.createVNode(kt,{label:"学生范围",width:"120"},{default:e.withCtx(({row:ge})=>{var Lt;return[(Lt=ge.studentIds)!=null&&Lt.length?(e.openBlock(),e.createElementBlock("span",S0,"指定 "+e.toDisplayString(ge.studentIds.length)+" 人",1)):(e.openBlock(),e.createElementBlock("span",E0,"范围内全部(无座位号跳过)"))]}),_:1}),e.createVNode(kt,{label:"生成方式",width:"120",align:"center"},{default:e.withCtx(({row:ge})=>[e.createElementVNode("span",null,e.toDisplayString(ge.generateMode==="school"?"按学校":"按顺序"),1)]),_:1}),e.createVNode(kt,{label:"创建时间",width:"175"},{default:e.withCtx(({row:ge})=>[e.createTextVNode(e.toDisplayString(we(ge.createdAt)),1)]),_:1}),e.createVNode(kt,{label:"操作",width:"360",fixed:"right"},{default:e.withCtx(({row:ge})=>[e.createVNode(et,{link:"",type:"primary",onClick:Lt=>ut(ge.competitionId)},{default:e.withCtx(()=>[...R[39]||(R[39]=[e.createTextVNode("编辑模板",-1)])]),_:1},8,["onClick"]),e.createVNode(et,{link:"",type:"success",onClick:Lt=>Tt(ge)},{default:e.withCtx(()=>[...R[40]||(R[40]=[e.createTextVNode("立即生成证件",-1)])]),_:1},8,["onClick"]),e.createVNode(et,{link:"",type:"primary",onClick:Lt=>zt(ge)},{default:e.withCtx(()=>[...R[41]||(R[41]=[e.createTextVNode("生成预览",-1)])]),_:1},8,["onClick"]),e.createVNode(et,{link:"",type:"danger",onClick:Lt=>Rt(ge.id)},{default:e.withCtx(()=>[...R[42]||(R[42]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","height"])],512)]),_:1}),fe.value.length||he.value.length?(e.openBlock(),e.createBlock(Rn,{key:0,class:"preview-card",shadow:"never"},{header:e.withCtx(()=>[e.createElementVNode("div",M0,[e.createElementVNode("span",null,"预览"+e.toDisplayString(se.value?` — ${se.value}`:""),1),e.createElementVNode("div",q0,[Ge.value&&(fe.value.length||he.value.length)?(e.openBlock(),e.createBlock(et,{key:0,link:"",type:"primary",onClick:dn},{default:e.withCtx(()=>[...R[44]||(R[44]=[e.createTextVNode(" 返回整版预览 ",-1)])]),_:1})):e.createCommentVNode("",!0),e.createVNode(et,{link:"",type:"danger",onClick:En},{default:e.withCtx(()=>[...R[45]||(R[45]=[e.createTextVNode("关闭预览",-1)])]),_:1})])])]),default:e.withCtx(()=>[he.value.length?(e.openBlock(),e.createBlock(e.unref(ql),{key:0,type:"warning","show-icon":"",closable:!1,title:`已跳过 ${he.value.length} 名学生(未编排座位号,无法制作证件)`,style:{"margin-bottom":"12px"}},null,8,["title"])):e.createCommentVNode("",!0),fe.value.length?(e.openBlock(),e.createElementBlock("div",z0,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(fe.value,ge=>(e.openBlock(),e.createElementBlock("div",{class:"badge-card",key:`${ge.competition_no}-${ge.seat_no}`},[R[46]||(R[46]=e.createElementVNode("div",{class:"badge-header"},"智慧奇乐",-1)),e.createElementVNode("div",T0,e.toDisplayString(ge.student_name),1),e.createElementVNode("div",I0,e.toDisplayString(ge.school_name),1),e.createElementVNode("div",D0,"参赛编号:"+e.toDisplayString(ge.competition_no),1),e.createElementVNode("div",R0,e.toDisplayString(ge.competition_room)+" "+e.toDisplayString(ge.seat_no)+"号",1)]))),128))])):he.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ht,{key:2,description:"无符合条件的证件数据"}))]),_:1})):e.createCommentVNode("",!0),e.createVNode(pn,{modelValue:x.value,"onUpdate:modelValue":R[17]||(R[17]=ge=>x.value=ge),title:"添加证件任务",width:"580px","align-center":"",draggable:"","destroy-on-close":"",onClosed:Le},{footer:e.withCtx(()=>[e.createVNode(et,{onClick:R[16]||(R[16]=ge=>x.value=!1)},{default:e.withCtx(()=>[...R[53]||(R[53]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(et,{type:"primary",onClick:ft},{default:e.withCtx(()=>[...R[54]||(R[54]=[e.createTextVNode("保存任务",-1)])]),_:1})]),default:e.withCtx(()=>[e.createVNode(on,{"label-width":"108px"},{default:e.withCtx(()=>[e.createVNode(fn,{label:"任务名称"},{default:e.withCtx(()=>[e.createVNode(Te,{modelValue:m.value,"onUpdate:modelValue":R[5]||(R[5]=ge=>m.value=ge),placeholder:"可选,便于区分",clearable:""},null,8,["modelValue"])]),_:1}),e.createVNode(fn,{label:"比赛",required:""},{default:e.withCtx(()=>[e.createVNode(tl,{modelValue:w.value,"onUpdate:modelValue":R[6]||(R[6]=ge=>w.value=ge),placeholder:"选择比赛",style:{width:"100%"},options:G.value,onChange:be},null,8,["modelValue","options"])]),_:1}),e.createVNode(fn,{label:"学校范围"},{default:e.withCtx(()=>[e.createVNode(yn,{modelValue:N.value,"onUpdate:modelValue":R[7]||(R[7]=ge=>N.value=ge)},{default:e.withCtx(()=>[e.createVNode(At,{label:!0},{default:e.withCtx(()=>[...R[47]||(R[47]=[e.createTextVNode("全部学校",-1)])]),_:1}),e.createVNode(At,{label:!1},{default:e.withCtx(()=>[...R[48]||(R[48]=[e.createTextVNode("指定学校",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),N.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(fn,{key:0,label:"选择学校"},{default:e.withCtx(()=>[e.createVNode(Te,{modelValue:Z.value,"onUpdate:modelValue":R[8]||(R[8]=ge=>Z.value=ge),clearable:"",size:"small",placeholder:"筛选学校",disabled:!w.value,style:{width:"100%","margin-bottom":"8px"}},null,8,["modelValue","disabled"]),e.createElementVNode("div",{class:e.normalizeClass(["checkbox-scroll",{"is-disabled":!w.value}])},[e.createVNode(nl,{modelValue:D.value,"onUpdate:modelValue":R[9]||(R[9]=ge=>D.value=ge),disabled:!w.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pe.value,ge=>(e.openBlock(),e.createBlock(mt,{key:ge.id,label:ge.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ge.school_name)+"("+e.toDisplayString(ge.student_count)+"人) ",1)]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","disabled"]),pe.value.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",L0,"请先选择比赛"))],2)]),_:1})),w.value?(e.openBlock(),e.createBlock(fn,{key:1,label:"模板"},{default:e.withCtx(()=>[e.createVNode(tl,{modelValue:S.value,"onUpdate:modelValue":R[10]||(R[10]=ge=>S.value=ge),placeholder:"请选择证件模板",style:{width:"100%"},options:me.value},null,8,["modelValue","options"]),e.createVNode(et,{link:"",type:"primary",onClick:R[11]||(R[11]=ge=>ut(w.value))},{default:e.withCtx(()=>[...R[49]||(R[49]=[e.createTextVNode("编辑该比赛的证件模板",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(fn,{label:"指定学生"},{default:e.withCtx(()=>[e.createElementVNode("div",P0,[e.createVNode(vn,{modelValue:T.value,"onUpdate:modelValue":R[12]||(R[12]=ge=>T.value=ge),"active-text":"仅所选学生","inactive-text":"范围内全部"},null,8,["modelValue"])]),T.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(Te,{modelValue:z.value,"onUpdate:modelValue":R[13]||(R[13]=ge=>z.value=ge),clearable:"",size:"small",placeholder:"筛选学生",disabled:!w.value,style:{width:"100%","margin-top":"8px"}},null,8,["modelValue","disabled"]),e.createElementVNode("div",{class:e.normalizeClass(["checkbox-scroll",{"is-disabled":!w.value}]),style:{"margin-top":"8px"}},[e.createVNode(nl,{modelValue:L.value,"onUpdate:modelValue":R[14]||(R[14]=ge=>L.value=ge),disabled:!w.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ze.value,ge=>(e.openBlock(),e.createBlock(mt,{key:ge.value,label:ge.value,disabled:ge.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ge.label),1)]),_:2},1032,["label","disabled"]))),128))]),_:1},8,["modelValue","disabled"])],2)],64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(fn,{label:"生成方式"},{default:e.withCtx(()=>[e.createVNode(yn,{modelValue:U.value,"onUpdate:modelValue":R[15]||(R[15]=ge=>U.value=ge)},{default:e.withCtx(()=>[e.createVNode(At,{label:"sequence"},{default:e.withCtx(()=>[...R[50]||(R[50]=[e.createTextVNode("按顺序生成",-1)])]),_:1}),e.createVNode(At,{label:"school"},{default:e.withCtx(()=>[...R[51]||(R[51]=[e.createTextVNode("按学校生成",-1)])]),_:1})]),_:1},8,["modelValue"]),R[52]||(R[52]=e.createElementVNode("div",{class:"dialog-tip"},"预览、打印和下载 PDF 都会按这个顺序输出。",-1))]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createVNode(ri,{modelValue:u.value,"onUpdate:modelValue":R[18]||(R[18]=ge=>u.value=ge)},null,8,["modelValue"]),e.createVNode(pn,{modelValue:te.value,"onUpdate:modelValue":R[24]||(R[24]=ge=>te.value=ge),title:"预览排版设置",width:"520px","destroy-on-close":"","align-center":""},{footer:e.withCtx(()=>[e.createVNode(et,{onClick:R[23]||(R[23]=ge=>te.value=!1)},{default:e.withCtx(()=>[...R[67]||(R[67]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(et,{type:"primary",onClick:gt},{default:e.withCtx(()=>[...R[68]||(R[68]=[e.createTextVNode("下一步:整版预览",-1)])]),_:1})]),default:e.withCtx(()=>[R[69]||(R[69]=e.createElementVNode("p",{class:"paper-tip"},"生成整版证件预览前,请选择纸张模式。可按 A4/A3 排版,也可直接按模板实际尺寸生成。预览、下载 PDF、打印都会使用这套排版设置。",-1)),e.createElementVNode("div",O0,[e.createElementVNode("div",j0,[R[58]||(R[58]=e.createElementVNode("div",{class:"paper-config-title"},"纸张尺寸",-1)),e.createVNode(yn,{modelValue:re.value,"onUpdate:modelValue":R[19]||(R[19]=ge=>re.value=ge)},{default:e.withCtx(()=>[e.createVNode(At,{label:"a4"},{default:e.withCtx(()=>[...R[55]||(R[55]=[e.createTextVNode("A4",-1)])]),_:1}),e.createVNode(At,{label:"a3"},{default:e.withCtx(()=>[...R[56]||(R[56]=[e.createTextVNode("A3",-1)])]),_:1}),e.createVNode(At,{label:"custom"},{default:e.withCtx(()=>[...R[57]||(R[57]=[e.createTextVNode("按模板尺寸",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",F0,[R[61]||(R[61]=e.createElementVNode("div",{class:"paper-config-title"},"打印方向",-1)),e.createVNode(yn,{modelValue:Ne.value,"onUpdate:modelValue":R[20]||(R[20]=ge=>Ne.value=ge),disabled:X.value},{default:e.withCtx(()=>[e.createVNode(At,{label:"portrait"},{default:e.withCtx(()=>[...R[59]||(R[59]=[e.createTextVNode("纵向",-1)])]),_:1}),e.createVNode(At,{label:"landscape"},{default:e.withCtx(()=>[...R[60]||(R[60]=[e.createTextVNode("横向",-1)])]),_:1})]),_:1},8,["modelValue","disabled"]),X.value?(e.openBlock(),e.createElementBlock("div",A0,"按模板尺寸生成时,页面宽高直接取模板设置,方向无需单独选择。")):e.createCommentVNode("",!0)]),e.createElementVNode("div",Q0,[R[66]||(R[66]=e.createElementVNode("div",{class:"paper-config-title"},"每行显示",-1)),e.createElementVNode("div",U0,[e.createVNode(yn,{modelValue:De.value,"onUpdate:modelValue":R[21]||(R[21]=ge=>De.value=ge),disabled:X.value},{default:e.withCtx(()=>[e.createVNode(At,{label:1},{default:e.withCtx(()=>[...R[62]||(R[62]=[e.createTextVNode("1个",-1)])]),_:1}),e.createVNode(At,{label:2},{default:e.withCtx(()=>[...R[63]||(R[63]=[e.createTextVNode("2个",-1)])]),_:1}),e.createVNode(At,{label:3},{default:e.withCtx(()=>[...R[64]||(R[64]=[e.createTextVNode("3个",-1)])]),_:1}),e.createVNode(At,{label:0},{default:e.withCtx(()=>[...R[65]||(R[65]=[e.createTextVNode("自定义",-1)])]),_:1})]),_:1},8,["modelValue","disabled"]),e.createVNode(Mo,{modelValue:$e.value,"onUpdate:modelValue":R[22]||(R[22]=ge=>$e.value=ge),min:1,max:12,"controls-position":"right",style:{width:"120px"},disabled:X.value},null,8,["modelValue","disabled"])]),e.createElementVNode("div",W0,e.toDisplayString(X.value?"按模板尺寸生成时固定为每页 1 个证件。":"按当前模板尺寸自动计算每页行数;只控制每行显示几个证件。"),1)])])]),_:1},8,["modelValue"]),e.createVNode(pn,{modelValue:st.value,"onUpdate:modelValue":R[26]||(R[26]=ge=>st.value=ge),title:`证件整版预览 — ${qe.value}`,width:"96%",top:"2vh","destroy-on-close":"",class:"pdf-preview-dialog"},{footer:e.withCtx(()=>[e.createVNode(et,{disabled:!F.value.length,onClick:oo},{default:e.withCtx(()=>[...R[71]||(R[71]=[e.createTextVNode("打印整版",-1)])]),_:1},8,["disabled"]),e.createVNode(et,{onClick:R[25]||(R[25]=ge=>st.value=!1)},{default:e.withCtx(()=>[...R[72]||(R[72]=[e.createTextVNode("关闭",-1)])]),_:1}),e.createVNode(et,{type:"primary",loading:He.value,disabled:!F.value.length,onClick:Dn},{default:e.withCtx(()=>[...R[73]||(R[73]=[e.createTextVNode(" 下载 PDF ",-1)])]),_:1},8,["loading","disabled"])]),default:e.withCtx(()=>{var ge;return[Be.value.length?(e.openBlock(),e.createBlock(e.unref(ql),{key:0,type:"warning","show-icon":"",closable:!1,title:`已跳过 ${Be.value.length} 名学生(未编排座位号)`,style:{"margin-bottom":"12px"}},null,8,["title"])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createElementBlock("div",H0,[e.createElementVNode("div",{ref_key:"pdfExportRoot",ref:ct,class:"pdf-export-root",style:e.normalizeStyle(Bt.value)},[(ge=Q.value)!=null&&ge.canvas&&F.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(Qe.value,(Lt,ln)=>(e.openBlock(),e.createElementBlock("div",{key:ln,class:"pdf-page",style:e.normalizeStyle(wt.value)},[e.createElementVNode("div",{class:"pdf-page-grid",style:e.normalizeStyle(xt(Lt.length))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Lt,(kn,lo)=>(e.openBlock(),e.createElementBlock("div",{key:`${ln}-${lo}`,class:"pdf-cell",style:e.normalizeStyle(pt.value)},[e.createVNode(Ho,{doc:Q.value,"merge-data":kn,"screen-scale":1},null,8,["doc","merge-data"])],4))),128))],4)],4))),128)):F.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(fe.value,(Lt,ln)=>(e.openBlock(),e.createElementBlock("div",{key:ln,class:"pdf-cell simple-badge"},[R[70]||(R[70]=e.createElementVNode("div",{class:"sb-h"},"智慧奇乐",-1)),e.createElementVNode("div",Y0,e.toDisplayString(Lt.student_name),1),e.createElementVNode("div",K0,e.toDisplayString(Lt.school_name),1),e.createElementVNode("div",v0,"参赛编号:"+e.toDisplayString(Lt.competition_no),1),e.createElementVNode("div",X0,e.toDisplayString(Lt.competition_room)+" "+e.toDisplayString(Lt.seat_no)+"号",1)]))),128)):e.createCommentVNode("",!0)],4)])),[[Ln,ht.value]])]}),_:1},8,["modelValue","title"])])}}}),[["__scopeId","data-v-f366db19"]])},Symbol.toStringTag,{value:"Module"})),J0=["aria-valuemin","aria-valuemax","aria-valuenow","aria-disabled"],Z0={key:0,class:"qiu-slider__tooltip"},eg=["min","max","step","value","disabled"],Mc=de(e.defineComponent({name:"QiuSlider",__name:"index",props:{modelValue:{default:0},min:{default:0},max:{default:100},step:{default:1},disabled:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0}},emits:["update:modelValue","change","input"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref(!1),u=e.computed(()=>{const k=n.modelValue??n.min;return Math.min(n.max,Math.max(n.min,k))}),h=e.computed(()=>{const k=n.max-n.min;return k<=0?0:(u.value-n.min)/k*100}),p=(k,M=!0)=>{const V=Math.min(n.max,Math.max(n.min,k)),E=Math.round((V-n.min)/n.step)*n.step+n.min,x=Number(E.toFixed(10));o("update:modelValue",x),o("input",x),M&&o("change",x)},_=k=>{const M=r.value;if(!M)return u.value;const V=M.getBoundingClientRect(),E=Math.min(1,Math.max(0,(k-V.left)/V.width));return n.min+E*(n.max-n.min)},B=k=>{n.disabled||p(_(k.clientX))},$=()=>{if(n.disabled)return;d.value=!0,f.value=n.showTooltip;const k=V=>{d.value&&p(_(V.clientX),!1)},M=V=>{d.value=!1,f.value=!1,p(_(V.clientX)),document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",M)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",M)},b=k=>{n.disabled||p(u.value+k)},C=k=>{p(Number(k.target.value),!1)};return(k,M)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-slider",{"is-disabled":t.disabled}])},[e.createElementVNode("div",{ref_key:"trackRef",ref:r,class:"qiu-slider__runway",onMousedown:B},[e.createElementVNode("div",{class:"qiu-slider__bar",style:e.normalizeStyle({width:`${e.unref(h)}%`})},null,4),e.createElementVNode("div",{ref_key:"thumbRef",ref:c,class:"qiu-slider__button-wrapper",style:e.normalizeStyle({left:`${e.unref(h)}%`}),tabindex:"0",role:"slider","aria-valuemin":t.min,"aria-valuemax":t.max,"aria-valuenow":e.unref(u),"aria-disabled":t.disabled,onMousedown:e.withModifiers($,["stop"]),onKeydown:[M[0]||(M[0]=e.withKeys(e.withModifiers(V=>b(-t.step),["prevent"]),["left"])),M[1]||(M[1]=e.withKeys(e.withModifiers(V=>b(t.step),["prevent"]),["right"])),M[2]||(M[2]=e.withKeys(e.withModifiers(V=>b(-t.step),["prevent"]),["down"])),M[3]||(M[3]=e.withKeys(e.withModifiers(V=>b(t.step),["prevent"]),["up"]))],onMouseenter:M[4]||(M[4]=V=>f.value=t.showTooltip),onMouseleave:M[5]||(M[5]=V=>f.value=!1)},[M[6]||(M[6]=e.createElementVNode("div",{class:"qiu-slider__button"},null,-1)),e.createVNode(e.Transition,{name:"qiu-slider-tip"},{default:e.withCtx(()=>[e.unref(f)&&t.showTooltip?(e.openBlock(),e.createElementBlock("div",Z0,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)]),_:1})],44,J0)],544),e.createElementVNode("input",{type:"range",class:"qiu-slider__native",min:t.min,max:t.max,step:t.step,value:e.unref(u),disabled:t.disabled,tabindex:"-1",onInput:C},null,40,eg)],2))}}),[["__scopeId","data-v-b66cfefc"]]),tg=Object.freeze(Object.defineProperty({__proto__:null,default:Mc},Symbol.toStringTag,{value:"Module"})),ng={class:"qiu-color-field__main"},og=["title"],lg=["value","disabled"],ag=["placeholder","disabled"],ig={key:0,class:"qiu-color-field__presets"},rg=["title","disabled","onClick"],Ni=de(e.defineComponent({name:"QiuColorField",__name:"index",props:{modelValue:{default:""},presets:{default:()=>["#409eff","#67c23a","#e6a23c","#f56c6c","#909399","#1e90ff","#4e6ef2","#0052d9","#3fb884","#6954f0"]},placeholder:{default:"#000000"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(!1),c=e.ref(""),d=e.computed(()=>!!n.modelValue),f=C=>{const k=C.trim();if(!k)return"";const M=k.startsWith("#")?k:`#${k}`;if(/^#[0-9a-fA-F]{6}$/.test(M))return M.toLowerCase();if(/^#[0-9a-fA-F]{3}$/.test(M)){const V=M[1],E=M[2],x=M[3];return`#${V}${V}${E}${E}${x}${x}`.toLowerCase()}return""},u=e.computed(()=>f(n.modelValue)||"#000000"),h=e.computed(()=>f(n.modelValue));e.watch(()=>n.modelValue,C=>{c.value=f(C)||C},{immediate:!0});const p=C=>{o("update:modelValue",C),o("change",C)},_=C=>{const k=C.target.value;c.value=k,p(k)},B=()=>{r.value=!1;const C=f(c.value);C?(c.value=C,p(C)):c.value=h.value},$=C=>{c.value=C,p(C)},b=()=>{c.value="",o("update:modelValue",""),o("change",""),o("clear")};return(C,k)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-color-field",{"is-disabled":t.disabled,"is-focused":e.unref(r)}])},[e.createElementVNode("div",ng,[e.createElementVNode("label",{class:"qiu-color-field__native-wrap",title:e.unref(h)},[e.createElementVNode("input",{class:"qiu-color-field__native",type:"color",value:e.unref(u),disabled:t.disabled,onInput:_,onFocus:k[0]||(k[0]=M=>r.value=!0),onBlur:k[1]||(k[1]=M=>r.value=!1)},null,40,lg),e.createElementVNode("span",{class:"qiu-color-field__preview",style:e.normalizeStyle({background:e.unref(h)||"transparent"})},null,4)],8,og),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":k[2]||(k[2]=M=>e.isRef(c)?c.value=M:null),class:"qiu-color-field__hex",type:"text",maxlength:"7",placeholder:t.placeholder,disabled:t.disabled,spellcheck:"false",onFocus:k[3]||(k[3]=M=>r.value=!0),onBlur:B,onKeydown:e.withKeys(B,["enter"])},null,40,ag),[[e.vModelText,e.unref(c)]]),t.clearable&&e.unref(d)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-color-field__clear",tabindex:"-1",onClick:b}," × ")):e.createCommentVNode("",!0)]),t.presets.length?(e.openBlock(),e.createElementBlock("div",ig,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.presets,M=>(e.openBlock(),e.createElementBlock("button",{key:M,type:"button",class:e.normalizeClass(["qiu-color-field__swatch",{"is-active":e.unref(u).toLowerCase()===M.toLowerCase()}]),style:e.normalizeStyle({background:M}),title:M,disabled:t.disabled,onClick:V=>$(M)},null,14,rg))),128))])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-5d695d12"]]),cg=Object.freeze(Object.defineProperty({__proto__:null,default:Ni},Symbol.toStringTag,{value:"Module"})),sg={key:1,class:"qiu-fieldset"},dg={key:0,class:"qiu-divider__text"},qc=de(e.defineComponent({name:"QiuDivider",__name:"index",props:{direction:{type:String,default:"horizontal"},contentPosition:{type:String,default:"center"},borderStyle:{type:String,default:"solid"},blockquote:{type:Boolean,default:!1},fieldset:{type:Boolean,default:!1},type:{type:String,default:"primary"},isBorder:{type:Boolean,default:!1},title:{type:String,default:""}},setup(t){return(a,n)=>t.blockquote?(e.openBlock(),e.createElementBlock("blockquote",{key:0,class:e.normalizeClass(["qiu-blockquote",t.isBorder?`qiu-blockquote-${t.type} is-border`:`qiu-blockquote-${t.type}`])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2)):t.fieldset?(e.openBlock(),e.createElementBlock("fieldset",sg,[e.createElementVNode("legend",null,e.toDisplayString(t.title),1),e.renderSlot(a.$slots,"default",{},void 0,!0)])):(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(["qiu-divider",[`qiu-divider--${t.direction}`,`qiu-divider--${t.contentPosition}`,`qiu-divider--${t.borderStyle}`]]),role:"separator"},[a.$slots.default?(e.openBlock(),e.createElementBlock("span",dg,[e.renderSlot(a.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-65de3fee"]]),mg=Object.freeze(Object.defineProperty({__proto__:null,default:qc},Symbol.toStringTag,{value:"Module"})),zc=de(e.defineComponent({name:"QiuButtonGroup",__name:"index",props:{size:{default:"default"},vertical:{type:Boolean,default:!1}},setup(t){const a=t,n=e.computed(()=>({"qiu-button-group--vertical":a.vertical,[`qiu-button-group--${a.size}`]:!0}));return e.provide("qiuButtonGroupSize",e.toRef(a,"size")),(o,r)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["qiu-button-group",e.unref(n)],role:"group"},o.$attrs),[e.renderSlot(o.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-5764a035"]]),ug=Object.freeze(Object.defineProperty({__proto__:null,default:zc},Symbol.toStringTag,{value:"Module"})),fg={class:"qck-data-modules"},pg={class:"qck-dm-head"},hg={class:"qck-dm-list"},gg=["onClick"],_g={class:"qck-dm-row"},bg={class:"qck-dm-fields"},yg={class:"qck-dm-field-head"},kg={class:"qck-dm-insert"},wg={class:"qck-dm-row"},xg={class:"qck-dm-quick"},Vg={class:"qck-dm-preview"},Cg={class:"qck-dm-field-head"},Bi=de(e.defineComponent({name:"QiuCanvasDataModulesPanel",__name:"DataModulesPanel",props:{modelValue:{},extraModules:{}},emits:["update:modelValue","insert","preview-context"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(""),c=e.ref(""),d=e.ref(!0),f=e.computed({get:()=>Tn(n.extraModules,n.modelValue),set:x=>o("update:modelValue",x)});e.watch(f,x=>{var m;!r.value&&x[0]&&(r.value=x[0].id),r.value&&!x.find(w=>w.id===r.value)&&(r.value=((m=x[0])==null?void 0:m.id)||"")},{immediate:!0,deep:!0});const u=e.computed(()=>f.value.find(x=>x.id===r.value)||null),h=e.computed(()=>Wr(f.value));function p(x){o("update:modelValue",x)}function _(x,m){var N;const w=(N=n.modelValue)!=null&&N.length?[...n.modelValue]:Tn(n.extraModules),S=w.findIndex(D=>D.id===x.id);S>=0?w[S]={...w[S],enabled:m}:w.push({...x,enabled:m}),p(w)}function B(){var w;const x=Hr("自定义模块"),m=(w=n.modelValue)!=null&&w.length?[...n.modelValue]:Tn(n.extraModules);m.push(x),p(m),r.value=x.id}function $(x){if(x.builtin)return;const m=(n.modelValue||[]).filter(w=>w.id!==x.id);p(m)}function b(){var S;if(!u.value)return;const x=(S=n.modelValue)!=null&&S.length?[...n.modelValue]:Tn(n.extraModules);let m=x.findIndex(N=>N.id===u.value.id);m<0&&(x.push({...u.value}),m=x.length-1);const w=`field_${Date.now().toString(36).slice(-4)}`;x[m]={...x[m],fields:[...x[m].fields,{key:w,label:"新字段",type:"string"}],sample:{...x[m].sample||{},[w]:"样例"}},p(x)}function C(x,m){var D;if(!u.value)return;const w=(D=n.modelValue)!=null&&D.length?[...n.modelValue]:Tn(n.extraModules);let S=w.findIndex(T=>T.id===u.value.id);S<0&&(w.push({...u.value}),S=w.length-1);const N=w[S].fields.map((T,L)=>L===x?{...T,...m}:T);w[S]={...w[S],fields:N},p(w)}function k(x,m){var N;if(!u.value)return;const w=(N=n.modelValue)!=null&&N.length?[...n.modelValue]:Tn(n.extraModules);let S=w.findIndex(D=>D.id===u.value.id);S<0&&(w.push({...u.value}),S=w.length-1),w[S]={...w[S],sample:{...w[S].sample||{},[x]:m}},p(w)}function M(x){const m=d.value?`${x.label}:${x.token}`:x.token;o("insert",m,{moduleId:x.moduleId,key:x.key,label:x.label})}function V(){let x=ma(f.value);if(c.value.trim())try{const m=JSON.parse(c.value);x={...x,...m}}catch{}o("preview-context",x)}function E(x){var S;if(!u.value)return;const m=(S=n.modelValue)!=null&&S.length?[...n.modelValue]:Tn(n.extraModules);let w=m.findIndex(N=>N.id===u.value.id);w<0?m.push({...u.value,label:x}):m[w]={...m[w],label:x},p(m)}return(x,m)=>{const w=nn,S=Bl,N=Wn;return e.openBlock(),e.createElementBlock("div",fg,[e.createElementVNode("div",pg,[m[5]||(m[5]=e.createElementVNode("span",{class:"qck-dm-title"},"数据模块",-1)),e.createVNode(w,{size:"small",type:"primary",plain:"",onClick:B},{default:e.withCtx(()=>[...m[4]||(m[4]=[e.createTextVNode("添加模块",-1)])]),_:1})]),e.createElementVNode("div",hg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,D=>(e.openBlock(),e.createElementBlock("button",{key:D.id,type:"button",class:e.normalizeClass(["qck-dm-chip",{active:D.id===r.value,off:D.enabled===!1}]),onClick:T=>r.value=D.id},[e.createVNode(S,{"model-value":D.enabled!==!1,size:"small",onClick:m[0]||(m[0]=e.withModifiers(()=>{},["stop"])),"onUpdate:modelValue":T=>_(D,T)},null,8,["model-value","onUpdate:modelValue"]),e.createElementVNode("span",null,e.toDisplayString(D.label),1)],10,gg))),128))]),u.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",_g,[m[7]||(m[7]=e.createElementVNode("span",{class:"label"},"模块名",-1)),e.createVNode(N,{"model-value":u.value.label,size:"small",disabled:!!u.value.builtin,"onUpdate:modelValue":E},null,8,["model-value","disabled"]),u.value.builtin?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(w,{key:0,size:"small",type:"danger",link:"",onClick:m[1]||(m[1]=D=>$(u.value))},{default:e.withCtx(()=>[...m[6]||(m[6]=[e.createTextVNode(" 删除 ",-1)])]),_:1}))]),e.createElementVNode("div",bg,[e.createElementVNode("div",yg,[m[9]||(m[9]=e.createElementVNode("span",null,"字段",-1)),e.createVNode(w,{size:"small",onClick:b},{default:e.withCtx(()=>[...m[8]||(m[8]=[e.createTextVNode("增字段",-1)])]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.fields,(D,T)=>{var L;return e.openBlock(),e.createElementBlock("div",{key:`${u.value.id}-${T}-${D.key}`,class:"qck-dm-field"},[e.createVNode(N,{"model-value":D.key,size:"small",placeholder:"key","onUpdate:modelValue":U=>C(T,{key:U})},null,8,["model-value","onUpdate:modelValue"]),e.createVNode(N,{"model-value":D.label,size:"small",placeholder:"标签","onUpdate:modelValue":U=>C(T,{label:U})},null,8,["model-value","onUpdate:modelValue"]),e.createVNode(N,{"model-value":((L=u.value.sample)==null?void 0:L[D.key])||"",size:"small",placeholder:"样例","onUpdate:modelValue":U=>k(D.key,U)},null,8,["model-value","onUpdate:modelValue"]),e.createVNode(w,{size:"small",type:"primary",link:"",onClick:U=>M({moduleId:u.value.id,key:D.key,label:D.label,token:`{{${u.value.id}.${D.key}}}`})},{default:e.withCtx(()=>[...m[10]||(m[10]=[e.createTextVNode(" 插入 ",-1)])]),_:1},8,["onClick"])])}),128))])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",kg,[e.createElementVNode("div",wg,[m[11]||(m[11]=e.createElementVNode("span",{class:"label"},"插入带标签",-1)),e.createVNode(S,{modelValue:d.value,"onUpdate:modelValue":m[2]||(m[2]=D=>d.value=D),size:"small"},null,8,["modelValue"])]),e.createElementVNode("div",xg,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.slice(0,12),D=>(e.openBlock(),e.createBlock(w,{key:D.token,size:"small",onClick:T=>M(D)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(D.moduleLabel)+"."+e.toDisplayString(D.label),1)]),_:2},1032,["onClick"]))),128))])]),e.createElementVNode("div",Vg,[e.createElementVNode("div",Cg,[m[13]||(m[13]=e.createElementVNode("span",null,"预览数据(JSON)",-1)),e.createVNode(w,{size:"small",type:"primary",onClick:V},{default:e.withCtx(()=>[...m[12]||(m[12]=[e.createTextVNode("应用到画布",-1)])]),_:1})]),e.createVNode(N,{modelValue:c.value,"onUpdate:modelValue":m[3]||(m[3]=D=>c.value=D),type:"textarea",rows:4,placeholder:'{"student":{"name":"李四"},"classroom":{"name":"教室A"}}'},null,8,["modelValue"])])])}}}),[["__scopeId","data-v-c6788703"]]),Ng=Object.freeze(Object.defineProperty({__proto__:null,default:Bi},Symbol.toStringTag,{value:"Module"}));async function Tc(t,a={}){const n=await Vr(t,{scale:a.scale??2,backgroundColor:a.backgroundColor===void 0?"#ffffff":a.backgroundColor,useCORS:!0,logging:!1});return new Promise((o,r)=>{n.toBlob(c=>{c?o(c):r(new Error("PNG export failed"))},"image/png",1)})}function $i(t,a){const n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=a,o.click(),URL.revokeObjectURL(n)}async function Ic(t,a={}){const n=await Tc(t,a);return $i(n,a.fileName||`canvas-${Date.now()}.png`),n}const Go=96/25.4;function Bg(t,a){const n=t.canvas;if(a==="px"){const o=n.widthPx??Math.round(n.widthMm*Go),r=n.heightPx??Math.round(n.heightMm*Go);return{w:o,h:r,unit:"px"}}return{w:n.widthMm,h:n.heightMm,unit:"mm"}}function In(t){return String(t||"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function $g(t){return t||""}function Eg(t,a){const n=a==="px"?`${Math.round(t.xMm*Go)}px`:`${t.xMm}mm`,o=a==="px"?`${Math.round(t.yMm*Go)}px`:`${t.yMm}mm`,r=a==="px"?`${Math.round(t.wMm*Go)}px`:`${t.wMm}mm`,c=a==="px"?`${Math.round(t.hMm*Go)}px`:`${t.hMm}mm`,d=[];return t.rotation&&d.push(`rotate(${t.rotation}deg)`),t.flipX&&d.push("scaleX(-1)"),t.flipY&&d.push("scaleY(-1)"),`position:absolute;left:${n};top:${o};width:${r};height:${c};z-index:${t.zIndex??1};box-sizing:border-box;${d.length?`transform:${d.join(" ")};transform-origin:center center;`:""}`}function Sg(t,a,n){var c;const o=Eg(t,n);let r="";if(t.type==="text"){const d=In(Uo(t.text,a)),f=t.textDirection==="vertical";r=`<div style="${o}display:flex;align-items:center;justify-content:flex-start;font-size:${t.fontSize}pt;font-family:${In(t.fontFamily)};color:${In(t.color)};white-space:pre-wrap;word-break:break-word;overflow:hidden;${f?"writing-mode:vertical-rl;text-orientation:upright;":""}">${d}</div>`}else if(t.type==="image"||t.type==="seal"){const d=In($g(t.src));r=`<div style="${o}display:flex;align-items:center;justify-content:center;"><img src="${d}" alt="" style="max-width:100%;max-height:100%;object-fit:contain"/></div>`}else if(t.type==="shape"){const d=In(t.background||"transparent"),f=t.opacity!=null?`opacity:${t.opacity};`:"";r=`<div style="${o}${f}background:${d};border-radius:${t.shape==="circle"?"50%":"0"};"></div>`}else return"";if((c=t.link)!=null&&c.href){const d=In(Uo(t.link.href,a)),f=t.link.target==="_self"?"_self":"_blank";return`<a href="${d}" target="${f}" rel="${(f==="_blank"?" noopener noreferrer":"").trim()}" style="display:contents;text-decoration:none;color:inherit;">${r}</a>`}return r}function Dc(t,a={}){const n=a.context||{},o=a.forceUnit||t.canvas.unit||(t.mode==="banner"?"px":"mm"),r=Bg(t,o),d=t.canvas.showBorder!==!1&&t.mode!=="banner"?`border:${t.canvas.borderWidthMm||.35}mm solid ${In(t.canvas.borderColor||"#334155")};`:"border:none;",f=t.canvas.backgroundImage?`background-image:url(${In(t.canvas.backgroundImage)});background-size:cover;background-position:center;`:`background:${In(t.canvas.background||"transparent")};`,u=Kr(t.elements||[]).map(p=>Sg(p,n,o)).join(`
104
+ `);return`<!DOCTYPE html>
105
+ <html lang="zh-CN">
106
+ <head>
107
+ <meta charset="utf-8"/>
108
+ <meta name="viewport" content="width=device-width,initial-scale=1"/>
109
+ <title>${In(a.title||"Banner")}</title>
110
+ <style>
111
+ html,body{margin:0;padding:0;background:#f8fafc;}
112
+ .qiu-canvas-banner{position:relative;overflow:hidden;margin:0 auto;${d}${f}
113
+ width:${r.w}${r.unit};height:${r.h}${r.unit};}
114
+ a{color:inherit;}
115
+ </style>
116
+ </head>
117
+ <body>
118
+ <div class="qiu-canvas-banner">
119
+ ${u}
120
+ </div>
121
+ </body>
122
+ </html>`}function Rc(t,a={}){const n=Dc(t,a),o=new Blob([n],{type:"text/html;charset=utf-8"});return $i(o,a.fileName||`banner-${Date.now()}.html`),o}async function Mg(t,a={}){const n=await Tc(t,{scale:a.scale??2}),o=await qg(n),r=a.widthMm??210,c=a.heightMm??297,d=new Cr.jsPDF({orientation:r>c?"landscape":"portrait",unit:"mm",format:[r,c]});return d.addImage(o,"PNG",0,0,r,c),d.output("blob")}async function Lc(t,a={}){const n=await Mg(t,a);return $i(n,a.fileName||`canvas-${Date.now()}.pdf`),n}function qg(t){return new Promise((a,n)=>{const o=new FileReader;o.onload=()=>a(String(o.result||"")),o.onerror=()=>n(o.error),o.readAsDataURL(t)})}const zg={class:"badge-editor-header page-header"},Tg={class:"badge-editor-header__extra"},Ig={class:"tools-card-inner"},Dg={class:"tools-scroll"},Rg={class:"tools-accordion"},Lg=["hidden"],Pg={class:"tool-row"},Og={class:"tool-row"},jg={class:"tool-row"},Fg={class:"divider-title-with-help"},Ag={class:"tool-row"},Qg={class:"tool-row"},Ug={class:"canvas-bg-color-row"},Wg={class:"tool-row"},Hg={class:"divider-title-with-help"},Yg={class:"tool-row"},Kg={key:1,class:"tool-row"},vg={class:"canvas-bg-color-row"},Xg={class:"tool-row tool-row-actions tool-action-grid tool-action-grid--canvas-bg"},Gg={class:"tools-tip tools-tip--compact"},Jg={class:"divider-title-with-help"},Zg={class:"tool-row tool-row-actions"},e2={key:3,class:"guide-list"},t2=["onClick","onContextmenu"],n2=["hidden"],o2={class:"divider-title-with-help"},l2={class:"tool-row tool-row-actions"},a2={class:"tool-row tool-row-actions"},i2={class:"divider-title-with-help"},r2={class:"tool-row tool-row-actions tool-action-grid tool-action-grid--actions"},c2={class:"tool-row"},s2={class:"tool-row"},d2={class:"tool-row tool-row-actions tool-action-grid tool-action-grid--regions"},m2={key:0,class:"guide-list"},u2=["onClick"],f2={class:"guide-mm"},p2={class:"tool-row"},h2=["hidden"],g2={class:"tool-row align-row"},_2={class:"tool-row align-row"},b2={key:0,class:"layer-list"},y2=["onClick"],k2={class:"layer-label"},w2={class:"layer-z"},x2={key:1,class:"muted-text"},V2={class:"tools-footer"},C2={class:"tool-row save-row"},N2={key:0,class:"hint"},B2={class:"canvas-card-header"},$2={class:"canvas-card-header__actions"},E2={key:0,class:"ruler-corner"},S2={key:1,class:"ruler ruler-x"},M2={key:0,class:"ruler-label"},q2={key:2,class:"ruler ruler-y"},z2={key:0,class:"ruler-label"},T2=["onPointerdown","onContextmenu"],I2=["onPointerdown","onContextmenu"],D2={class:"canvas-region__label"},R2=["onPointerdown"],L2=["onPointerdown"],P2=["onPointerdown"],O2=["stroke","stroke-width"],j2=["fill","stroke","stroke-width"],F2=["fill","stroke","stroke-width"],A2=["fill","stroke","stroke-width"],Q2=["points","fill","stroke","stroke-width"],U2=["points","fill","stroke","stroke-width"],W2=["onPointerdown"],H2=["onPointerdown"],Y2=["src"],K2={key:0,class:"clipboard-image-badge"},v2=["onPointerdown"],X2=["disabled"],G2=["disabled"],J2=["disabled"],Z2=["disabled"],e_=["disabled"],t_=["disabled"],n_=["disabled"],o_=["disabled"],l_=["disabled"],a_=["disabled"],i_=["disabled"],r_=["disabled"],c_={class:"side-inner"},s_={class:"side-props-scroll"},d_={key:0,class:"props"},m_={class:"form-lbl-ico"},u_={class:"form-lbl-ico"},f_={class:"pair-inputs"},p_={class:"flip-actions"},h_={key:1,class:"props"},g_={class:"pair-inputs"},__={class:"flip-actions"},b_={key:2,class:"props"},y_={class:"pair-inputs"},k_={key:3,class:"props"},w_={class:"canvas-bg-color-row"},x_={class:"region-bg-actions"},V_={class:"pair-inputs pair-inputs--wrap"},C_={class:"divider-title-with-help"},N_={class:"tool-row tool-row-actions tool-action-grid tool-action-grid--region-ops"},B_={key:4,class:"props multi-props"},$_={class:"multi-props-summary"},E_={class:"tool-row tool-row-actions tool-action-grid tool-action-grid--actions"},S_={class:"divider-title-with-help"},M_={class:"form-lbl-ico"},q_={class:"multi-style-inputs"},z_={class:"form-lbl-ico"},T_={class:"multi-style-inputs multi-style-inputs--color"},I_={class:"divider-title-with-help"},D_={class:"tool-row align-row side-align-row"},R_={class:"tool-row align-row side-align-row"},L_={class:"divider-title-with-help"},P_={class:"tool-row align-row side-align-row"},O_={class:"side-preview-block"},j_={class:"preview-wrap"},F_={class:"dlg-preview-scroll"},A_={style:{display:"flex","flex-direction":"column",gap:"12px"}},Pc="qiu-badge-editor-panel-widths",Oc=220,jc=480,Fc=200,Ac=420,Ei=360,Ft=96/25.4,So=24,Q_=320,U_=240,xa=20,W_=50,Si=de(e.defineComponent({name:"QiuCanvasEditor",__name:"QiuCanvasEditor",props:{mode:{default:void 0},embedded:{type:Boolean,default:!1}},emits:["save","update:modelValue"],setup(t,{emit:a}){const n=t,o=Cn.useRoute(),r=Cn.useRouter(),c=Number(o.params.id),d=Number(o.params.tid),f=e.computed(()=>n.mode==="desk"||o.name==="DeskLabelTemplateEditor"||o.name==="QiuDeskLabelEditor"||String(o.path).includes("desk-label-template"));e.computed(()=>n.mode==="banner");const u=e.computed(()=>f.value?[...n0]:[...yc]);e.computed(()=>u.value.map(i=>({label:ro(i),value:i})));const h=[{label:"矩形",value:"rect"},{label:"圆形",value:"circle"},{label:"三角形",value:"triangle"},{label:"线条",value:"line"},{label:"多边形",value:"polygon"},{label:"梯形",value:"trapezoid"}],p=e.ref(!1),_=e.ref(!1),B=e.ref(""),$=e.ref("_blank"),b=e.ref(null),C=e.ref(0);let k=null;function M(i){p.value=!1,k==null||k(i),k=null}const V=e.ref("");e.ref(!0);const E=e.ref("insert"),x=e.ref([]),m=e.ref({}),w=e.ref("rect");function S(i){m.value=i}function N(i){x.value=i,z.value&&(z.value.dataModules=i),m.value=ma(Tn(void 0,i))}function D(i){if(!z.value)return;const l=Un().filter(I=>I.type==="text"),y=l.length?l[l.length-1]:null;y?y.text=String(y.text||"")+i:T(i)}function T(i){if(!z.value)return;const l=`t_${Date.now().toString(36)}`,y={id:l,type:"text",zIndex:(z.value.elements.length||0)+1,xMm:10,yMm:10,wMm:40,hMm:12,text:i,fontSize:14,fontFamily:"Microsoft YaHei, sans-serif",color:"#111827"};z.value.elements.push(y),te.value=[l]}async function L(){const i=document.querySelector(".badge-editor .editor-scale-inner .badge-canvas, .badge-editor .host-inner"),l=document.querySelector(".badge-editor .editor-clip")||i;if(!l){ke.warning("未找到画布节点");return}await Ic(l,{fileName:`canvas-${Date.now()}.png`}),ke.success("已导出 PNG")}async function U(){const i=document.querySelector(".badge-editor .editor-clip");!i||!z.value||(await Lc(i,{fileName:`canvas-${Date.now()}.pdf`,widthMm:z.value.canvas.widthMm,heightMm:z.value.canvas.heightMm}),ke.success("已导出 PDF"))}function oe(){z.value&&(Rc(z.value,{fileName:`banner-${Date.now()}.html`,context:m.value,title:V.value||"Banner"}),ke.success("已导出网页"))}const H=e.ref(!0),Ve=e.ref(!1),Z=e.ref(""),z=e.ref(null),fe=e.ref(90),he=e.ref(130),se=e.ref({}),te=e.ref([]),re=e.ref(null),Ne=e.ref(null);e.ref(),e.watch(()=>z.value,i=>{if(!i)return;const l=Tn(void 0,i.dataModules);x.value=l,m.value=ma(l)},{immediate:!0});const De=e.ref(null),$e=e.ref(null),Ge=e.ref(null),st=e.ref(null),ht=e.ref(!1),He=e.ref(!1),Q=(()=>{try{const i=localStorage.getItem(Pc);if(!i)return null;const l=JSON.parse(i);return{left:Number(l.left),right:Number(l.right)}}catch{return null}})(),F=e.ref(Number.isFinite(Q==null?void 0:Q.left)?Math.min(jc,Math.max(Oc,Q.left)):292),Be=e.ref(Number.isFinite(Q==null?void 0:Q.right)?Math.min(Ac,Math.max(Fc,Q.right)):260),qe=e.ref(null),K=e.computed(()=>({gridTemplateColumns:`${F.value}px 8px minmax(${Ei}px, 1fr) 8px ${Be.value}px`})),X=()=>{try{localStorage.setItem(Pc,JSON.stringify({left:F.value,right:Be.value}))}catch{}};let le=0,ye=0,Pe=0;const Qe=i=>{var I;if(!qe.value)return;const l=i.clientX-le,y=((I=Ge.value)==null?void 0:I.clientWidth)||0;if(qe.value==="left"){let W=ye+l;const Y=y-Be.value-8-8-Ei;W=Math.min(jc,Math.max(Oc,W),Y),F.value=Math.round(W)}else{let W=Pe-l;const Y=y-F.value-8-8-Ei;W=Math.min(Ac,Math.max(Fc,W),Y),Be.value=Math.round(W)}},Bt=()=>{qe.value&&(qe.value=null,window.removeEventListener("pointermove",Qe),window.removeEventListener("pointerup",Bt),document.body.style.cursor="",document.body.style.userSelect="",X(),e.nextTick(()=>{ei(),lt.value==null&&yl(!1)}))},wt=(i,l)=>{l.preventDefault(),l.stopPropagation(),qe.value=i,le=l.clientX,ye=F.value,Pe=Be.value,document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("pointermove",Qe),window.addEventListener("pointerup",Bt)},xt=e.ref(null),pt=e.ref(null),J=e.ref(null);let G=!1;const me=e.ref(420),pe=e.ref(420),ze=e.ref(!1),we=e.ref(!1),Se=e.ref("lib"),We=e.ref(!1),Je=e.ref("lib"),Ze=e.ref(!1),tt=e.ref(!1),Ye=e.ref(!0),rt=e.ref(!1),ot=e.ref(!1),Mt=e.ref(!1),lt=e.ref(null),dt=e.ref([]),yt=e.ref(null),Ot=e.ref(null),ut=e.ref({visible:!1,x:0,y:0,clientX:0,clientY:0,anchorMm:null,target:"blank",regionId:null,guideId:null}),$n=e.ref(!1),v=new Map;let xe=0;const Le=e.ref(2),be=e.ref(2),ft=e.ref("color");e.ref("center");const zt=e.ref(2),Tt=()=>{Ze.value=!0};function gt(){f.value?r.push(`/qiuui/badge/competition/${c}/desk-label-templates`):r.push(`/qiuui/badge/competition/${c}/badge-templates`)}const En=e.computed(()=>z.value?t0(z.value.elements):[]),dn=e.computed(()=>{var i;return((i=z.value)==null?void 0:i.regions)??[]}),no=e.computed(()=>{var i;return(i=z.value)!=null&&i.elements?[...z.value.elements].sort((l,y)=>(y.zIndex??0)-(l.zIndex??0)):[]}),Dn=e.computed(()=>te.value.length===1?te.value[0]:null);function oo(i){return te.value.includes(i)}const Rt=e.computed(()=>{var I;const i=Dn.value,l=z.value;if(!i||!((I=l==null?void 0:l.elements)!=null&&I.length))return null;const y=l.elements.find(W=>W.id===i);return!y||y.type!=="text"?null:y}),mn=e.computed(()=>{var I;const i=Dn.value,l=z.value;if(!i||!((I=l==null?void 0:l.elements)!=null&&I.length))return null;const y=l.elements.find(W=>W.id===i);return!y||y.type!=="image"&&y.type!=="seal"?null:y}),$t=e.computed(()=>{var I;const i=Dn.value,l=z.value;if(!i||!((I=l==null?void 0:l.elements)!=null&&I.length))return null;const y=l.elements.find(W=>W.id===i);return!y||y.type!=="shape"?null:y}),Re=e.computed(()=>dn.value.find(i=>i.id===re.value)||null),un=e.computed(()=>Rt.value||mn.value||$t.value),ne=e.computed({get(){var i;return Math.round((((i=$t.value)==null?void 0:i.opacity)??1)*100)},set(i){const l=$t.value;l&&(l.opacity=Math.max(0,Math.min(1,i/100)))}}),R=e.computed({get(){var i;return((i=$t.value)==null?void 0:i.showStroke)!==!1},set(i){const l=$t.value;l&&(l.showStroke=i)}}),Te=e.computed({get(){var i;return!!((i=$t.value)!=null&&i.lockAspectRatio)},set(i){const l=$t.value;l&&(l.lockAspectRatio=i)}}),je=e.computed({get(){var l;const i=(l=mn.value)==null?void 0:l.rotation;return i!=null&&Number.isFinite(i)?Number(i):0},set(i){const l=mn.value;if(!l)return;const y=i==null?0:Number(i);!Number.isFinite(y)||y===0?delete l.rotation:l.rotation=Math.round(y*100)/100}}),Ue=e.computed({get(){var l;const i=(l=Rt.value)==null?void 0:l.rotation;return i!=null&&Number.isFinite(i)?Number(i):0},set(i){const l=Rt.value;if(!l)return;const y=i==null?0:Number(i);!Number.isFinite(y)||y===0?delete l.rotation:l.rotation=Math.round(y*100)/100}}),et=e.computed({get(){var i;return!!((i=un.value)!=null&&i.flipX)},set(i){const l=un.value;l&&(i?l.flipX=!0:delete l.flipX)}}),qt=e.computed({get(){var i;return!!((i=un.value)!=null&&i.flipY)},set(i){const l=un.value;l&&(i?l.flipY=!0:delete l.flipY)}}),It=e.computed(()=>{var i;return((i=z.value)==null?void 0:i.guides)??[]}),kt=e.computed(()=>dt.value.length>0),bn=e.computed(()=>{var i,l;return!!((l=(i=yt.value)==null?void 0:i.regions)!=null&&l.length)}),el=e.computed(()=>kt.value||bn.value),Rn=e.computed(()=>Un().some(i=>!!i.groupId)),Ht=e.computed(()=>dn.value.find(i=>i.id===ut.value.regionId)||null),fn=e.computed(()=>It.value.find(i=>i.id===ut.value.guideId)||null),tl=e.computed(()=>({left:`${ut.value.x}px`,top:`${ut.value.y}px`})),At=e.computed(()=>{const i=J.value;if(!i)return{};const l=Math.min(i.x0,i.x1),y=Math.min(i.y0,i.y1),I=Math.abs(i.x1-i.x0),W=Math.abs(i.y1-i.y0);return{position:"absolute",left:`${l}px`,top:`${y}px`,width:`${I}px`,height:`${W}px`,zIndex:9999,pointerEvents:"none",border:"1px dashed #409eff",background:"rgba(64, 158, 255, 0.12)",boxSizing:"border-box"}}),yn=e.computed({get(){var i;return((i=Rt.value)==null?void 0:i.text)??""},set(i){const l=Rt.value;l&&(l.text=i)}}),mt=e.computed({get(){var i;return((i=Rt.value)==null?void 0:i.textDirection)==="vertical"?"vertical":"horizontal"},set(i){const l=Rt.value;l&&(i==="vertical"?l.textDirection="vertical":delete l.textDirection)}});e.watch(Rt,i=>{i&&(i.color||(i.color="#303133"),i.align||(i.align="top-left"))}),e.watch($t,i=>{i&&(i.showStroke==null&&(i.showStroke=!0),i.lockAspectRatio==null&&(i.lockAspectRatio=ml(i.shape)),i.shape==="polygon"&&(!Number.isFinite(i.polygonSides)||Number(i.polygonSides)<3)&&(i.polygonSides=5))}),e.watch(()=>{var i,l,y,I;return[((l=(i=z.value)==null?void 0:i.canvas)==null?void 0:l.background)??"",((I=(y=z.value)==null?void 0:y.canvas)==null?void 0:I.backgroundImage)??""]},()=>{co()},{immediate:!0}),e.watch(we,i=>{var l,y;!i&&ft.value==="image"&&!((y=(l=z.value)==null?void 0:l.canvas)!=null&&y.backgroundImage)&&co()});const nl=[{value:"top-left",label:"左上"},{value:"top-center",label:"上中"},{value:"top-right",label:"右上"},{value:"middle-left",label:"左中"},{value:"center",label:"居中"},{value:"middle-right",label:"右中"},{value:"bottom-left",label:"左下"},{value:"bottom-center",label:"下中"},{value:"bottom-right",label:"右下"}],vn=e.computed({get(){var i,l;return((l=(i=z.value)==null?void 0:i.canvas)==null?void 0:l.background)||"rgba(255, 255, 255, 1)"},set(i){var l;(l=z.value)!=null&&l.canvas&&(z.value.canvas.background=String(i||"").trim(),z.value.canvas.background&&(ft.value="color"))}}),on=e.computed({get(){var i,l;return((l=(i=z.value)==null?void 0:i.canvas)==null?void 0:l.showBorder)!==!1},set(i){var l;(l=z.value)!=null&&l.canvas&&(z.value.canvas.showBorder=!!i)}}),pn=e.computed({get(){var i,l;return((l=(i=z.value)==null?void 0:i.canvas)==null?void 0:l.borderColor)||"#334155"},set(i){var l;(l=z.value)!=null&&l.canvas&&(z.value.canvas.borderColor=String(i||"").trim()||"#334155",z.value.canvas.showBorder==null&&(z.value.canvas.showBorder=!0))}}),Mo=e.computed({get(){var l,y;const i=Number((y=(l=z.value)==null?void 0:l.canvas)==null?void 0:y.borderWidthMm);return Number.isFinite(i)&&i>0?i:.35},set(i){var y;if(!((y=z.value)!=null&&y.canvas))return;const l=Number(i);z.value.canvas.borderWidthMm=Number.isFinite(l)?Math.max(.1,Math.min(8,l)):.35,z.value.canvas.showBorder==null&&(z.value.canvas.showBorder=!0)}}),Ln=e.computed({get(){var i,l;return(i=Re.value)!=null&&i.backgroundImage?"image":(((l=Re.value)==null?void 0:l.background)||"").trim()?"color":"transparent"},set(i){const l=Re.value;if(l){if(i==="transparent"){delete l.backgroundImage,l.background="";return}if(i==="color"){delete l.backgroundImage,String(l.background||"").trim()||(l.background="#ffffff");return}l.backgroundImage||To("lib")}}}),ge=e.computed({get(){var i;return((i=Re.value)==null?void 0:i.background)||"rgba(255, 255, 255, 1)"},set(i){const l=Re.value;l&&(l.background=String(i||"").trim(),l.background&&delete l.backgroundImage)}}),Lt=e.computed(()=>m.value&&Object.keys(m.value).length?m.value:wc({})),ln=e.computed(()=>{var i,l;return(l=(i=z.value)==null?void 0:i.canvas)!=null&&l.widthMm?z.value.canvas.widthMm*Ft:0}),kn=e.computed(()=>{var i,l;return(l=(i=z.value)==null?void 0:i.canvas)!=null&&l.heightMm?z.value.canvas.heightMm*Ft:0}),lo=e.computed(()=>ln.value*Pt.value),ol=e.computed(()=>kn.value*Pt.value),Rl=e.computed(()=>Ft*Pt.value),ao=e.computed(()=>Math.max(me.value-(Ye.value?So:0),120)),io=e.computed(()=>Math.max(pe.value-(Ye.value?So:0),120)),Pi=e.computed(()=>Math.max(Q_,ao.value)),Ll=e.computed(()=>Math.max(U_,io.value)),an=e.computed(()=>Math.max(0,lo.value+Pi.value*2)),qo=e.computed(()=>Math.max(0,ol.value+Ll.value*2)),Yt=e.computed(()=>Math.max(0,Math.round((an.value-lo.value)/2))),jt=e.computed(()=>Math.max(0,Math.round((qo.value-ol.value)/2))),cn=e.computed(()=>(Ye.value?So:0)+Yt.value),ll=e.computed(()=>(Ye.value?So:0)+jt.value),Oi=e.computed(()=>{const i=Ye.value?So:0;return{"--ruler-size":`${i}px`,width:`${an.value+i}px`,height:`${qo.value+i}px`}}),sn=e.computed(()=>({width:`${an.value}px`,height:`${qo.value}px`})),$a=e.computed(()=>({width:`${an.value}px`})),Xn=e.computed(()=>({height:`${qo.value}px`})),Kt=e.computed(()=>za(Yt.value,an.value,Rl.value)),Xt=e.computed(()=>za(jt.value,qo.value,Rl.value)),Ea=e.computed(()=>{const i=ln.value,l=kn.value;if(i<=0||l<=0)return 1;const y=Math.max(ao.value-xa*2,60),I=Math.max(io.value-xa*2,60),W=Math.min(y/i,I/l);return Math.max(.06,Math.min(3,W))}),Pt=e.computed(()=>{const i=lt.value;return i!=null&&Number.isFinite(i)?Math.max(.06,Math.min(3,i)):Ea.value}),ji=e.computed(()=>`${Math.round(Pt.value*100)}%`),Fi=e.computed(()=>({width:`${lo.value}px`,height:`${ol.value}px`,overflow:"hidden",left:`${Yt.value}px`,top:`${jt.value}px`,position:"absolute",flexShrink:0})),Ai=e.computed(()=>({width:`${ln.value}px`,height:`${kn.value}px`,transform:`scale(${Pt.value})`,transformOrigin:"top left"})),Gt=e.computed(()=>{if(!z.value)return{};const i=10*Ft,l=`
123
+ linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
124
+ linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px)
125
+ `.trim().replace(/\s+/g," "),y=z.value.canvas.backgroundImage?`, url(${Pl(z.value.canvas.backgroundImage)})`:"",I=z.value.canvas.backgroundImage?`${i}px ${i}px, ${i}px ${i}px, cover`:`${i}px ${i}px`,W=z.value.canvas.backgroundImage?"0 0, 0 0, center":"0 0",Y=z.value.canvas.showBorder!==!1,A=z.value.canvas.borderColor||"#334155",ue=Number(z.value.canvas.borderWidthMm),ie=Number.isFinite(ue)&&ue>0?ue:.35;return{width:"100%",height:"100%",position:"relative",boxSizing:"border-box",backgroundColor:z.value.canvas.backgroundImage?void 0:z.value.canvas.background||"transparent",backgroundImage:z.value.canvas.backgroundImage?`${l}${y}`:l,backgroundSize:I,backgroundPosition:W,border:Y?`${ie}mm solid ${A}`:"0 solid transparent",borderRadius:"2px",boxShadow:Y?"0 1px 4px rgba(0,0,0,0.1)":"inset 0 0 0 1px rgba(148, 163, 184, 0.35), 0 1px 3px rgba(0,0,0,0.06)"}}),hn=e.computed(()=>{var l,y;if(!((y=(l=z.value)==null?void 0:l.canvas)!=null&&y.widthMm))return .35;const i=z.value.canvas.widthMm*Ft;return Math.min(220/i,.65)}),Qt=e.computed(()=>{var l,y;if(!((y=(l=z.value)==null?void 0:l.canvas)!=null&&y.widthMm))return .55;const i=z.value.canvas.widthMm*Ft;return Math.min(520/i,1)});function ro(i){return(f.value?o0:kc)[i]||i}function zo(){var i;(i=z.value)!=null&&i.canvas&&(z.value.canvas.widthMm=fe.value,z.value.canvas.heightMm=he.value)}function co(){var i,l,y,I;(l=(i=z.value)==null?void 0:i.canvas)!=null&&l.backgroundImage?ft.value="image":(((I=(y=z.value)==null?void 0:y.canvas)==null?void 0:I.background)||"").trim()?ft.value="color":ft.value="transparent"}function Sa(i){var l;if((l=z.value)!=null&&l.canvas){if(i==="transparent"){delete z.value.canvas.backgroundImage,z.value.canvas.background="";return}if(i==="color"){delete z.value.canvas.backgroundImage,String(z.value.canvas.background||"").trim()||(z.value.canvas.background="#ffffff");return}z.value.canvas.backgroundImage||Pn("lib")}}function Pn(i){Se.value=i,we.value=!0}function Ma(i){var l;!((l=z.value)!=null&&l.canvas)||!i||(z.value.canvas.backgroundImage=i,z.value.canvas.background="",ft.value="image")}function qa(){var i,l;(l=(i=z.value)==null?void 0:i.canvas)!=null&&l.backgroundImage&&(delete z.value.canvas.backgroundImage,co())}function To(i){Je.value=i,We.value=!0}function al(i){!Re.value||!i||(Re.value.backgroundImage=i,Re.value.background="")}function Qi(){var i;(i=Re.value)!=null&&i.backgroundImage&&delete Re.value.backgroundImage}function Pl(i){return Ao(i)}function za(i,l,y){if(!(l>0)||!(y>0)||!Number.isFinite(y)||!Number.isFinite(l))return[];const I=[1,2,5,10,20,25,50,100,200,250,500,1e3,2e3,5e3],W=10,Y=52;let A=I[I.length-1];for(const it of I)if(it*y>=W){A=it;break}let ue=A;for(const it of I)if(!(it<A||it%A!==0)&&(ue=it,it*y>=Y))break;const ie=ue/2,_e=Math.floor(-i/y/A)*A,Ae=Math.ceil((l-i)/y/A)*A;if(!Number.isFinite(_e)||!Number.isFinite(Ae)||Ae<_e)return[];const nt=[];for(let it=_e;it<=Ae;it+=A){const Nt=(it%ue+ue)%ue===0,Wt=!Nt&&ie>=A&&(it%ie+ie)%ie===0;nt.push({mm:it,major:Nt,mid:Wt,label:Nt?`${it}`:"",offsetPx:Math.round((i+it*y)*100)/100})}return nt}function so(i){return JSON.parse(JSON.stringify(i))}function Ol(i){return JSON.parse(JSON.stringify(i))}function wn(){xe+=1;const i=4*xe;return{dx:i,dy:i}}function jl(i,l){const y=i.xMm+i.wMm,I=i.yMm+i.hMm;return y>l.xMm&&i.xMm<l.xMm+l.wMm&&I>l.yMm&&i.yMm<l.yMm+l.hMm}function Ui(i){const l=Math.min(...i.map(Y=>Y.xMm)),y=Math.min(...i.map(Y=>Y.yMm)),I=Math.max(...i.map(Y=>Y.xMm+Y.wMm)),W=Math.max(...i.map(Y=>Y.yMm+Y.hMm));return{minX:l,minY:y,maxR:I,maxB:W,width:Ke(I-l),height:Ke(W-y)}}function Wi(i){const l=Math.min(...i.map(Y=>Y.xMm)),y=Math.min(...i.map(Y=>Y.yMm)),I=Math.max(...i.map(Y=>Y.xMm+Y.wMm)),W=Math.max(...i.map(Y=>Y.yMm+Y.hMm));return{minX:l,minY:y,maxR:I,maxB:W,width:Ke(I-l),height:Ke(W-y)}}function On(i){return{xMm:Ke(i.xMm+2),yMm:Ke(i.yMm+2)}}function Hi(i,l,y){const I=Math.max(0,Number(zt.value)||0),W=Math.max(0,i.wMm-l.width),Y=Math.max(0,i.hMm-l.height),A=y.endsWith("left")?0:y.endsWith("right")?1:.5,ue=y.startsWith("top")?0:y.startsWith("bottom")?1:.5,ie=Math.min(I,W),_e=Math.min(I,Y),Ae=Math.max(0,W-ie*2),nt=Math.max(0,Y-_e*2);return{xMm:Ke(i.xMm+ie+Ae*A),yMm:Ke(i.yMm+_e+nt*ue)}}function Ta(i,l,y){let I=i.xMm,W=i.yMm,Y=!!i.flipX,A=!!i.flipY;return y==="x"?(I=Ke(l.minX+l.maxR-(i.xMm+i.wMm)),Y=!Y):y==="y"&&(W=Ke(l.minY+l.maxB-(i.yMm+i.hMm)),A=!A),{xMm:I,yMm:W,flipX:Y||void 0,flipY:A||void 0}}function Sn(i){if(!z.value||!i.length)return;const l=i.map(y=>z.value.elements.find(I=>I.id===y)).filter(y=>y!=null);l.length&&(dt.value=l.map(y=>so(y)),Ot.value="elements",xe=0,ke.success(l.length>1?`已复制 ${l.length} 个元素`:"已复制元素"))}function mo(i){var l,y;return(y=(l=z.value)==null?void 0:l.elements)!=null&&y.length?z.value.elements.filter(I=>I.regionId===i.id?!0:jl(I,i)):[]}function Mn(i,l,y){if(!i.length){ke.info("请先选中要复制的分块");return}yt.value={regions:i.map(I=>Ol(I)),elements:l.map(I=>so(I))},Ot.value="regions",xe=0,ke.success(y)}function Zt(){if(!Re.value){ke.info("请先选中一个分块");return}Mn([Re.value],[],`已复制分块「${Re.value.name}」`)}function Yi(){if(!Re.value||!z.value)return;const i=mo(Re.value);if(!i.length){ke.info("当前分区内没有可复制的元素");return}Sn(i.map(l=>l.id))}function il(){if(!Re.value){ke.info("请先选中一个分块");return}const i=mo(Re.value);Mn([Re.value],i,i.length?`已复制分块和 ${i.length} 个元素`:`已复制分块「${Re.value.name}」`)}function uo(){if(!Re.value){ke.info("请先选中一个分块");return}const i=Un();Mn([Re.value],i,i.length?`已复制分块和 ${i.length} 个选中元素`:`已复制分块「${Re.value.name}」`)}function Ki(i){const l=te.value.length?[...te.value]:[];if(!l.length){ke.info("请先选中要复制的元素");return}Sn(l)}function fo(i,l){if(!z.value||!dt.value.length){ke.info("剪贴板里还没有可粘贴的元素");return}const y=dt.value.map(it=>so(it)),I=new Map,W=Ui(y),Y=wn(),A=(l==null?void 0:l.targetRegion)??null,ue=A?l!=null&&l.align?Hi(A,W,l.align):On(A):i,ie=ue?ue.xMm-W.minX:Y.dx,_e=ue?ue.yMm-W.minY:Y.dy,Ae=z.value.elements.reduce((it,Nt)=>Math.max(it,Nt.zIndex??0),0),nt=y.map((it,Nt)=>{const Wt=Ta(it,W,l==null?void 0:l.flipAxis);return{...it,id:An(),groupId:it.groupId?I.get(it.groupId)||(I.set(it.groupId,Po()),I.get(it.groupId)):void 0,regionId:(A==null?void 0:A.id)||it.regionId,xMm:Ke(Wt.xMm+ie),yMm:Ke(Wt.yMm+_e),flipX:Wt.flipX,flipY:Wt.flipY,zIndex:Ae+Nt+1}});Et(),z.value.elements.push(...nt),A&&(re.value=A.id),te.value=nt.map(it=>it.id),ke.success(nt.length>1?`已粘贴 ${nt.length} 个元素`:"已粘贴元素")}function Ia(i){return{x:i.xMm+i.wMm/2,y:i.yMm+i.hMm/2}}function Da(i,l,y,I){return Math.max(0,Math.min(l,I)-Math.max(i,y))}function vi(i,l){var ue,ie;if(!((ie=(ue=z.value)==null?void 0:ue.regions)!=null&&ie.length))return null;const y=Ia(i),I=fe.value-y.x,W=he.value-y.y,Y=z.value.regions.filter(_e=>_e.id!==i.id);if(!Y.length)return null;let A=null;for(const _e of Y){const Ae=Ia(_e),nt=l==="x"?Da(i.yMm,i.yMm+i.hMm,_e.yMm,_e.yMm+_e.hMm):Da(i.xMm,i.xMm+i.wMm,_e.xMm,_e.xMm+_e.wMm),it=l==="x"?Math.abs(Ae.x-I)*4+Math.abs(Ae.y-y.y)-nt*.25:Math.abs(Ae.y-W)*4+Math.abs(Ae.x-y.x)-nt*.25;(!A||it<A.score)&&(A={region:_e,score:it})}return(A==null?void 0:A.region)||null}function rl(i){const l=Un().filter(y=>y.regionId===i.id||jl(y,i));return l.length?l:mo(i)}function Fl(i){if(!Re.value){ke.info("请先选中一个分区");return}Ql(i,Re.value)}function po(i){if(!z.value||!Re.value){ke.info("请先选中一个分区");return}const l=Re.value,y=vi(l,i);if(!y){ke.warning(i==="x"?"未找到左右对侧分区":"未找到上下对侧分区");return}const I=rl(l).map(_e=>so(_e));if(!I.length){ke.info("当前分区内没有可镜像的内容");return}const W=Math.max(.001,y.wMm/Math.max(l.wMm,.001)),Y=Math.max(.001,y.hMm/Math.max(l.hMm,.001)),A=new Map,ue=z.value.elements.reduce((_e,Ae)=>Math.max(_e,Ae.zIndex??0),0),ie=I.map((_e,Ae)=>{const nt=_e.xMm-l.xMm,it=_e.yMm-l.yMm,Nt=Ke(_e.wMm*W),Wt=Ke(_e.hMm*Y),gn=Ke(i==="x"?(l.wMm-(nt+_e.wMm))*W:nt*W),ve=Ke(i==="y"?(l.hMm-(it+_e.hMm))*Y:it*Y);return{..._e,id:An(),groupId:_e.groupId?A.get(_e.groupId)||(A.set(_e.groupId,Po()),A.get(_e.groupId)):void 0,regionId:y.id,xMm:Ke(y.xMm+gn),yMm:Ke(y.yMm+ve),wMm:Nt,hMm:Wt,flipX:i==="x"?!_e.flipX||void 0:_e.flipX,flipY:i==="y"?!_e.flipY||void 0:_e.flipY,zIndex:ue+Ae+1}});Et(),z.value.elements.push(...ie),re.value=y.id,te.value=ie.map(_e=>_e.id),ke.success(i==="x"?`已镜像复制到横向对侧分区「${y.name}」`:`已镜像复制到纵向对侧分区「${y.name}」`)}function cl(i){var it,Nt,Wt,gn;if(!z.value||!((Nt=(it=yt.value)==null?void 0:it.regions)!=null&&Nt.length)){ke.info("剪贴板里还没有可粘贴的分块");return}const l=yt.value.regions.map(ve=>Ol(ve)),y=yt.value.elements.map(ve=>so(ve)),I=Wi(l),W=wn(),Y=i?i.xMm-I.minX:W.dx,A=i?i.yMm-I.minY:W.dy,ue=new Map,ie=new Map,_e=l.map((ve,zn)=>{const Vn=ul();return ue.set(ve.id,Vn),{...ve,id:Vn,name:l.length>1?`${ve.name} ${zn+1}`:`${ve.name} 副本`,xMm:Ke(ve.xMm+Y),yMm:Ke(ve.yMm+A)}}),Ae=z.value.elements.reduce((ve,zn)=>Math.max(ve,zn.zIndex??0),0),nt=y.map((ve,zn)=>{let Vn=ve.regionId&&ue.get(ve.regionId)||void 0;if(!Vn){const Vt=l.find(jo=>jl(ve,jo));Vt&&(Vn=ue.get(Vt.id)||void 0)}return{...ve,id:An(),groupId:ve.groupId?ie.get(ve.groupId)||(ie.set(ve.groupId,Po()),ie.get(ve.groupId)):void 0,regionId:Vn,xMm:Ke(ve.xMm+Y),yMm:Ke(ve.yMm+A),zIndex:Ae+zn+1}});Et(),(Wt=z.value).regions||(Wt.regions=[]),z.value.regions.push(..._e),z.value.elements.push(...nt),re.value=((gn=_e[0])==null?void 0:gn.id)||null,te.value=nt.map(ve=>ve.id),ke.success(nt.length?`已粘贴 ${_e.length} 个分块和 ${nt.length} 个元素`:`已粘贴 ${_e.length} 个分块`)}function Xi(){return`clip_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function ho(i){return!!i&&(i.type==="image"||i.type==="seal")&&i.clipboardSource==="clipboard"}function Ra(i){return ho(i)?i.clipboardUploadState==="pending"?"粘贴待上传":"粘贴图片":""}function go(i){const l=i!=null&&i.length?i:Array.from(v.keys());for(const y of l){const I=v.get(y);I!=null&&I.objectUrl&&URL.revokeObjectURL(I.objectUrl),v.delete(y)}}function Jt(i){const l=i==null?void 0:i.target;l instanceof HTMLElement&&l.closest(".canvas-context-menu")||(ut.value.visible=!1,ut.value.anchorMm=null,ut.value.target="blank",ut.value.regionId=null,ut.value.guideId=null)}function Gi(i,l){return{x:Math.max(8,Math.min(i,window.innerWidth-144-8)),y:Math.max(8,Math.min(l,window.innerHeight-320-8))}}function Io(i,l,y,I="blank",W=null,Y=null){const A=Gi(i,l);ut.value={visible:!0,x:A.x,y:A.y,clientX:i,clientY:l,anchorMm:y??null,target:I,regionId:W,guideId:Y}}function Ji(i){Io(i.clientX,i.clientY,null)}function Zi(i){if(!xt.value){Io(i.clientX,i.clientY,null);return}const l=xt.value.getBoundingClientRect(),y=Pt.value,I=Ke((i.clientX-l.left)/y/Ft),W=Ke((i.clientY-l.top)/y/Ft);Io(i.clientX,i.clientY,{xMm:I,yMm:W})}function La(i,l){Ne.value=null,re.value=l.id,Io(i.clientX,i.clientY,{xMm:l.xMm,yMm:l.yMm},"region",l.id)}function Al(i){Ne.value=i,i&&(te.value=[],re.value=null)}function sl(i,l){Al(l.id),Io(i.clientX,i.clientY,l.axis==="horizontal"?{xMm:0,yMm:l.offsetMm}:{xMm:l.offsetMm,yMm:0},"guide",null,l.id)}function er(i){fn.value&&O(fn.value.id),Jt()}function dl(){const i=De.value;if(!i||!z.value)return null;const l=(i.scrollLeft-cn.value)/Pt.value,y=(i.scrollTop-ll.value)/Pt.value,I=ao.value/Pt.value,W=io.value/Pt.value,Y=Math.min(Math.max(l+I/2,0),ln.value),A=Math.min(Math.max(y+W/2,0),kn.value);return{xMm:Ke(Y/Ft),yMm:Ke(A/Ft)}}function tr(i,l){if(!z.value)return;const y=Xi(),I=URL.createObjectURL(i);v.set(y,{file:i,objectUrl:I,origName:i.name||"粘贴图片"}),Ka(I,l??dl()??void 0,{clipboardSource:"clipboard",clipboardUploadState:"pending",clipboardUploadKey:y,clipboardOrigName:i.name||"粘贴图片"}),ke.success("已粘贴图片,保存模板时才上传")}function jn(i){i==="paste"&&kt.value?fo(ut.value.anchorMm??void 0):i==="paste_region"&&bn.value?cl(ut.value.anchorMm??void 0):i==="delete"&&te.value.length?ko([...te.value]):i==="zoom_in"?Ro(Pt.value+.1,{clientX:ut.value.clientX,clientY:ut.value.clientY}):i==="zoom_out"?Ro(Pt.value-.1,{clientX:ut.value.clientX,clientY:ut.value.clientY}):i==="fit"&&Pa(),Jt()}function Ql(i,l){if(!z.value)return;const y=mo(l);if(!y.length){ke.info("当前分块内没有可翻转的内容");return}Et();const I={minX:l.xMm,minY:l.yMm,maxR:Ke(l.xMm+l.wMm),maxB:Ke(l.yMm+l.hMm)};for(const W of y){const Y=Ta(W,I,i);W.xMm=Y.xMm,W.yMm=Y.yMm,W.flipX=Y.flipX,W.flipY=Y.flipY}te.value=y.map(W=>W.id),re.value=l.id,ke.success(i==="x"?"已左右翻转当前分块内容":"已上下翻转当前分块内容")}function xn(i){if(!Ht.value){Jt();return}re.value=Ht.value.id,i==="copy_region"?Zt():i==="copy_region_contents"?il():i==="copy_region_selection"?uo():i==="paste_region"?cl({xMm:Ht.value.xMm+4,yMm:Ht.value.yMm+4}):i==="paste_elements"?fo(void 0,{targetRegion:Ht.value}):i==="paste_elements_flip_x"?fo(void 0,{targetRegion:Ht.value,flipAxis:"x"}):i==="paste_elements_flip_y"?fo(void 0,{targetRegion:Ht.value,flipAxis:"y"}):i==="flip_contents_x"?Ql("x",Ht.value):i==="flip_contents_y"?Ql("y",Ht.value):i==="delete_region"&&Jl(Ht.value.id),Jt()}function Do(i){return Math.max(.06,Math.min(3,Math.round(i*100)/100))}async function Ro(i,l){const y=De.value,I=pt.value;if(!y||!I){lt.value=Do(i);return}const W=Pt.value,Y=Do(i);if(Math.abs(Y-W)<.001)return;const A=y.getBoundingClientRect(),ue=l?l.clientX-A.left:y.clientWidth/2,ie=l?l.clientY-A.top:y.clientHeight/2,_e=cn.value,Ae=ll.value,nt=(y.scrollLeft+ue-_e)/W,it=(y.scrollTop+ie-Ae)/W;lt.value=Y,await e.nextTick();const Nt=pt.value,Wt=De.value;if(!Nt||!Wt)return;const gn=cn.value,ve=ll.value;Wt.scrollLeft=Math.max(0,gn+nt*Y-ue),Wt.scrollTop=Math.max(0,ve+it*Y-ie)}function Pa(){lt.value=null,e.nextTick(()=>yl(!0))}function Oa(i){const l=Pt.value;Ro(l+i*.1)}function nr(i){if(!z.value||ln.value<=0)return;const l=i.deltaY>0?-.1:.1;Ro(Pt.value+l,{clientX:i.clientX,clientY:i.clientY})}function or(i){const l=[];return i.rotation&&l.push(`rotate(${i.rotation}deg)`),i.flipX&&l.push("scaleX(-1)"),i.flipY&&l.push("scaleY(-1)"),l.join(" ")}function lr(i){return e0(i.text,Lt.value)}function Ul(i){const l=Ft,y=or(i);return{position:"absolute",left:`${i.xMm*l}px`,top:`${i.yMm*l}px`,width:`${i.wMm*l}px`,height:`${i.hMm*l}px`,zIndex:i.zIndex??1,...y?{transform:y}:{},transformOrigin:"center center"}}function ar(i){const l=Ft,y=i.offsetMm*l;return i.axis==="horizontal"?{top:`${y}px`,left:"0",width:`${ln.value}px`,height:"0"}:{left:`${y}px`,top:"0",width:"0",height:`${kn.value}px`}}function ja(i){const l=Ft,y=i.offsetMm*l;return i.axis==="horizontal"?{left:"6px",top:`${y}px`}:{top:"6px",left:`${y}px`}}function Wl(i){let l;switch(i.align){case"center":l={justifyContent:"center",alignItems:"center",textAlign:"center"};break;case"top-center":l={justifyContent:"center",alignItems:"flex-start",textAlign:"center"};break;case"bottom-center":l={justifyContent:"center",alignItems:"flex-end",textAlign:"center"};break;case"middle-left":l={justifyContent:"flex-start",alignItems:"center",textAlign:"left"};break;case"middle-right":l={justifyContent:"flex-end",alignItems:"center",textAlign:"right"};break;case"top-right":l={justifyContent:"flex-end",alignItems:"flex-start",textAlign:"right"};break;case"bottom-left":l={justifyContent:"flex-start",alignItems:"flex-end",textAlign:"left"};break;case"bottom-right":l={justifyContent:"flex-end",alignItems:"flex-end",textAlign:"right"};break;default:l={justifyContent:"flex-start",alignItems:"flex-start",textAlign:"left"}}const y=i.textDirection==="vertical";return{width:"100%",height:"100%",display:"flex",...l,fontFamily:i.fontFamily,fontSize:`${i.fontSize}pt`,color:i.color,lineHeight:1.25,whiteSpace:"pre-wrap",wordBreak:"break-word",overflow:"hidden",writingMode:y?"vertical-rl":"horizontal-tb",textOrientation:y?"upright":"mixed"}}function ir(i){return{width:"100%",height:"100%",display:"block",opacity:String(i.opacity??1)}}function _o(i){return i.showStroke===!1?"none":i.strokeColor||"#409eff"}function Lo(i){return i.background||"transparent"}function Gn(i){return Math.max(0,Number(i.strokeWidthMm??.6))*3.2}function ml(i){return i==="circle"||i==="triangle"||i==="polygon"||i==="trapezoid"}function Fn(i){const l=Math.max(.01,Number(i.hMm)||.01);return Math.max(.01,Number(i.wMm)||.01)/l}function Fa(i,l,y){const I=Math.max(1,Number(y)||1);if(!i.lockAspectRatio){l==="width"?i.wMm=Ke(I):i.hMm=Ke(I);return}const W=Fn(i);l==="width"?(i.wMm=Ke(I),i.hMm=Ke(Math.max(1,I/W))):(i.hMm=Ke(I),i.wMm=Ke(Math.max(1,I*W)))}function rr(i){const l=$t.value;l&&Fa(l,"width",i)}function Aa(i){const l=$t.value;l&&Fa(l,"height",i)}function cr(i){const l=Math.max(3,Math.min(12,Math.round(Number(i.polygonSides??5)))),y=[];for(let I=0;I<l;I++){const W=-Math.PI/2+Math.PI*2*I/l;y.push(`${50+Math.cos(W)*44},${50+Math.sin(W)*44}`)}return y.join(" ")}function sr(){return"18,6 82,6 96,94 4,94"}function Qa(i){return{left:`${i.xMm*Ft}px`,top:`${i.yMm*Ft}px`,width:`${i.wMm*Ft}px`,height:`${i.hMm*Ft}px`,backgroundColor:i.background||"rgba(64, 158, 255, 0.06)",backgroundImage:i.backgroundImage?`url(${Pl(i.backgroundImage)})`:void 0,backgroundSize:i.backgroundImage?"cover":void 0,backgroundPosition:i.backgroundImage?"center":void 0,backgroundRepeat:i.backgroundImage?"no-repeat":void 0}}function An(){return`el_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function Po(){return`grp_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function ul(){return`region_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}function dr(i,l,y){const W={id:An(),type:"text",fontFamily:"Microsoft YaHei,sans-serif"},Y=[{xMm:6,yMm:8,wMm:l-12,hMm:10,align:"top-center",text:"{{competition_name}}",fontSize:11,color:"#606266"},{xMm:6,yMm:y*.34,wMm:l-12,hMm:20,align:"center",text:"{{student_name}}",fontSize:22,color:"#303133"},{xMm:6,yMm:y*.56,wMm:l-12,hMm:10,align:"top-left",text:"编号 {{competition_no}}",fontSize:12,color:"#409eff"},{xMm:6,yMm:y*.68,wMm:(l-18)/2,hMm:9,align:"top-left",text:"{{school_name}}",fontSize:10,color:"#606266"},{xMm:6+(l-18)/2+6,yMm:y*.68,wMm:(l-18)/2,hMm:9,align:"top-right",text:"{{age_group}}",fontSize:10,color:"#606266"},{xMm:6,yMm:y*.78,wMm:l-12,hMm:12,align:"top-left",text:"{{competition_room}} {{seat_no}}号",fontSize:11,color:"#303133"}];if(i<Y.length)return{...W,zIndex:1,...Y[i]};const A=2,ue=(l-12-5)/A,ie=11,_e=i-Y.length,Ae=Math.floor(_e/A),nt=_e%A;let it=Math.min(y*.88+Ae*(ie+4),y-6-ie);return{...W,zIndex:1,xMm:6+nt*(ue+5),yMm:it,wMm:ue,hMm:ie,align:"top-left",text:"{{session}}",fontSize:10,color:"#909399"}}function bo(i){if(i.type==="text"){const l=i.text.replace(/\s+/g," ").trim();return`${(l.length>16?`${l.slice(0,16)}…`:l)||"文字"}${i.groupId?" [组]":""}`}return i.type==="shape"?`${i.shape==="rect"?"矩形":i.shape==="circle"?"圆形":i.shape==="triangle"?"三角形":i.shape==="polygon"?`${Math.max(3,Math.round(Number(i.polygonSides??5)))}边形`:i.shape==="trapezoid"?"梯形":"线条"}${i.groupId?" [组]":""}`:`图片${i.groupId?" [组]":""}`}function yo(i,l){if(!z.value)return;const y=[...z.value.elements].sort((_e,Ae)=>(_e.zIndex??0)-(Ae.zIndex??0)),I=y.findIndex(_e=>_e.id===i.id),W=l===1?I+1:I-1;if(W<0||W>=y.length)return;const Y=y[I],A=y[W],ue=Y.zIndex??1,ie=A.zIndex??1;Y.zIndex=ie,A.zIndex=ue}function Hl(){var l,y;if(!((y=(l=z.value)==null?void 0:l.elements)!=null&&y.length))return;[...z.value.elements].sort((I,W)=>(I.zIndex??0)-(W.zIndex??0)).forEach((I,W)=>{I.zIndex=W+1})}function mr(i){if(!z.value)return;const l=z.value.elements.reduce((y,I)=>Math.max(y,I.zIndex??0),0);i.zIndex=l+1}function ur(i){if(!z.value)return;const l=z.value.elements.reduce((y,I)=>Math.min(y,I.zIndex??0),1/0);i.zIndex=(Number.isFinite(l)?l:1)-1,Hl()}function Qn(i,l){switch(Et(),i){case"forward":yo(l,1);break;case"backward":yo(l,-1);break;case"front":mr(l);break;case"back":ur(l);break}}function Yl(i){var l,y;te.value=[i.id],b.value=i.id,B.value=((l=i.link)==null?void 0:l.href)||"",$.value=((y=i.link)==null?void 0:y.target)||"_blank",_.value=!0}function fr(){if(!z.value||!b.value)return;const i=z.value.elements.find(y=>y.id===b.value);if(!i)return;const l=B.value.trim();l?i.link={href:l,target:$.value||"_blank"}:delete i.link,_.value=!1,ke.success(l?"已设置链接":"已清除链接")}function Kl(i,l){if(Jt(),i==="copy"){const y=te.value.includes(l.id)?[...te.value]:g(l);Sn(y);return}if(i==="paste"){fo({xMm:l.xMm+2,yMm:l.yMm+2});return}if(i==="set-link"){Yl(l);return}if(i==="clear-link"){te.value=[l.id],l.link&&delete l.link,ke.success("已清除链接");return}i==="delete"&&ko(te.value.includes(l.id)?[...te.value]:g(l))}async function ko(i){if(!z.value||!i.length)return;const l=new Set(i),y=new Map;for(const Y of i){const A=z.value.elements.find(ie=>ie.id===Y);if(!ho(A)||A.clipboardUploadState!=="uploaded"||!A.clipboardImageId)continue;z.value.elements.some(ie=>!l.has(ie.id)&&ho(ie)&&ie.clipboardImageId===A.clipboardImageId)||y.set(A.clipboardImageId,A.clipboardOrigName||`图片${A.clipboardImageId}`)}let I=!1;if(y.size){const Y=await new Promise(A=>{C.value=y.size,k=A,p.value=!0});if(Y===null)return;I=Y}Et();const W=new Set(i);if(z.value.elements=z.value.elements.filter(Y=>!W.has(Y.id)),te.value=te.value.filter(Y=>!W.has(Y)),I){const A=(await Promise.allSettled(Array.from(y.keys()).map(ue=>ca(ue)))).filter(ue=>ue.status==="rejected").length;A?ke.warning(`已删除画布元素,但有 ${A} 张服务器图片删除失败`):ke.success("已删除画布元素和服务器图片")}}function Ua(i){if(i.button!==0||!xt.value||!z.value)return;i.preventDefault(),Ne.value=null,G=i.shiftKey;const l=xt.value.getBoundingClientRect(),y=Pt.value,I=(i.clientX-l.left)/y,W=(i.clientY-l.top)/y;J.value={x0:I,y0:W,x1:I,y1:W},window.addEventListener("pointermove",Oo),window.addEventListener("pointerup",vl,{once:!0})}function Oo(i){if(!J.value||!xt.value)return;const l=xt.value.getBoundingClientRect(),y=Pt.value;J.value.x1=(i.clientX-l.left)/y,J.value.y1=(i.clientY-l.top)/y}function vl(i){window.removeEventListener("pointermove",Oo);const l=J.value;if(J.value=null,!l||!z.value||!xt.value)return;const y=4;if(Math.abs(l.x1-l.x0)<y&&Math.abs(l.y1-l.y0)<y)return;const I=Ft,W=Math.min(l.x0,l.x1)/I,Y=Math.min(l.y0,l.y1)/I,A=Math.max(l.x0,l.x1)/I,ue=Math.max(l.y0,l.y1)/I,ie=[];for(const Ae of z.value.elements){const nt=Ae.xMm+Ae.wMm,it=Ae.yMm+Ae.hMm;nt>W&&Ae.xMm<A&&it>Y&&Ae.yMm<ue&&ie.push(Ae.id)}const _e=i.shiftKey||G;G=!1,_e?te.value=Array.from(new Set([...te.value,...ie])):te.value=ie}let en=null;function Xl(i){var y;if(i.button!==0&&i.button!==1||!De.value)return;i.preventDefault(),Jt(),rt.value=!0,en={startX:i.clientX,startY:i.clientY,startScrollLeft:De.value.scrollLeft,startScrollTop:De.value.scrollTop};const l=i.currentTarget||De.value;(y=l.setPointerCapture)==null||y.call(l,i.pointerId),window.addEventListener("pointermove",fl),window.addEventListener("pointerup",wo,{once:!0})}function fl(i){if(!en||!De.value)return;const l=De.value,y=en.startScrollLeft-(i.clientX-en.startX),I=en.startScrollTop-(i.clientY-en.startY),W=Math.max(0,l.scrollWidth-l.clientWidth),Y=Math.max(0,l.scrollHeight-l.clientHeight);l.scrollLeft=Math.min(W,Math.max(0,y)),l.scrollTop=Math.min(Y,Math.max(0,I))}function wo(){en=null,rt.value=!1,window.removeEventListener("pointermove",fl)}function Wa(){Mt.value=!0}function Ha(){Mt.value=!1,rt.value||(ot.value=!1)}function Ya(i){var l;Mt.value=!0,(l=De.value)==null||l.focus(),i.button===1&&Xl(i)}function pr(i){if(Ne.value=null,re.value=null,i.button===1||ot.value){Xl(i);return}Ua(i)}function hr(i){if(i.button===0||i.button===1||ot.value){Ne.value=null,re.value=null,i.button===0&&!i.shiftKey&&(te.value=[]),Xl(i);return}}function gr(){var W;if(!z.value)return;Et();const i=z.value.canvas.widthMm,l=z.value.canvas.heightMm,y=z.value.elements.filter(Y=>Y.type==="text").length,I=dr(y,i,l);Re.value&&(I.xMm=Ke(Re.value.xMm+4),I.yMm=Ke(Re.value.yMm+4),I.wMm=Ke(Math.max(10,Re.value.wMm-8)),I.regionId=Re.value.id),I.zIndex=(((W=z.value.elements)==null?void 0:W.length)??0)+1,z.value.elements.push(I),te.value=[I.id]}function _r(i){var ue;if(!z.value)return;Et();const l=Re.value,y=i==="line"?36:24,I=i==="line"?4:18,W=Ke(l?l.xMm+Math.max(2,(l.wMm-y)/2):Math.max(4,fe.value*.2)),Y=Ke(l?l.yMm+Math.max(2,(l.hMm-I)/2):Math.max(4,he.value*.2)),A={id:An(),type:"shape",shape:i,zIndex:(((ue=z.value.elements)==null?void 0:ue.length)??0)+1,xMm:W,yMm:Y,wMm:y,hMm:I,background:i==="line"?"transparent":"rgba(64, 158, 255, 0.18)",lockAspectRatio:ml(i),showStroke:!0,strokeColor:"#409eff",strokeWidthMm:.6,opacity:1,polygonSides:i==="polygon"?5:void 0,regionId:l==null?void 0:l.id};z.value.elements.push(A),te.value=[A.id]}let pl=null,Gl=0;function Ka(i,l,y){var Wt,gn;if(!z.value||!i)return;Et();const I=z.value.canvas.widthMm,W=z.value.canvas.heightMm,Y=8,A=z.value.elements.filter(ve=>ve.type==="image"||ve.type==="seal").length,ue=32,ie=20,_e=Y+A%2*34,Ae=Math.max(Y,W-28-Math.floor(A/2)*16),nt=l?Math.min(Math.max(Ke(l.xMm-ue/2),0),Math.max(0,I-ue)):Re.value?Math.min(Math.max(Ke(Re.value.xMm+(Re.value.wMm-ue)/2),0),Math.max(0,I-ue)):_e,it=l?Math.min(Math.max(Ke(l.yMm-ie/2),0),Math.max(0,W-ie)):Re.value?Math.min(Math.max(Ke(Re.value.yMm+(Re.value.hMm-ie)/2),0),Math.max(0,W-ie)):Ae,Nt={id:An(),type:"image",zIndex:(((Wt=z.value.elements)==null?void 0:Wt.length)??0)+1,xMm:nt,yMm:it,wMm:ue,hMm:ie,src:i,regionId:(gn=Re.value)==null?void 0:gn.id,...y};z.value.elements.push(Nt),te.value=[Nt.id],Gl+=1,pl&&clearTimeout(pl),pl=setTimeout(()=>{pl=null;const ve=Gl;Gl=0,ke.success(ve>1?`已插入 ${ve} 张图片`:"已插入图片")},350)}function va(i){i.canvas||(i.canvas={widthMm:fe.value,heightMm:he.value,background:"#ffffff"}),i.canvas.showBorder==null&&(i.canvas.showBorder=!0),i.canvas.borderColor||(i.canvas.borderColor="#334155");const l=Number(i.canvas.borderWidthMm);i.canvas.borderWidthMm=Number.isFinite(l)&&l>0?Math.min(8,l):.35,i.guides||(i.guides=[]),i.guides=i.guides.filter(y=>y&&(y.axis==="horizontal"||y.axis==="vertical")).map((y,I)=>({id:y.id||`guide_${I+1}`,axis:y.axis,offsetMm:Math.max(0,Number(y.offsetMm)||0)})),i.regions||(i.regions=[]),i.regions=i.regions.filter(y=>y&&Number(y.wMm)>0&&Number(y.hMm)>0).map((y,I)=>({id:y.id||`region_${I+1}`,name:String(y.name||`画布${I+1}`),xMm:Math.max(0,Number(y.xMm)||0),yMm:Math.max(0,Number(y.yMm)||0),wMm:Math.max(1,Number(y.wMm)||1),hMm:Math.max(1,Number(y.hMm)||1),background:String(y.background||""),backgroundImage:String(y.backgroundImage||"")})),i.elements=(i.elements||[]).map(y=>{const I={...y,id:String((y==null?void 0:y.id)||An()),zIndex:Number(y==null?void 0:y.zIndex)||1,xMm:Number(y==null?void 0:y.xMm)||0,yMm:Number(y==null?void 0:y.yMm)||0,wMm:Math.max(1,Number(y==null?void 0:y.wMm)||1),hMm:Math.max(1,Number(y==null?void 0:y.hMm)||1)};return I.type==="shape"&&(I.shape=["rect","circle","triangle","line","polygon","trapezoid"].includes(I.shape)?I.shape:"rect",I.background||(I.background="rgba(64, 158, 255, 0.2)"),I.lockAspectRatio=I.lockAspectRatio==null?ml(I.shape):!!I.lockAspectRatio,I.showStroke=I.showStroke!==!1,I.strokeColor||(I.strokeColor="#409eff"),I.strokeWidthMm=Math.max(0,Number(I.strokeWidthMm??.6)),I.opacity=Math.max(0,Math.min(1,Number(I.opacity??1))),I.polygonSides=Math.max(3,Math.min(12,Math.round(Number(I.polygonSides??5))))),I})}function Xa(i,l,y,I,W,Y){return{id:ul(),name:i||`画布${Y+1}`,xMm:Ke(l),yMm:Ke(y),wMm:Ke(I),hMm:Ke(W),background:"",backgroundImage:""}}function Ga(i){var A;if(!z.value)return;const l=Math.max(1,Math.round(be.value||1)),y=Math.max(1,Math.round(Le.value||1)),I=fe.value,W=he.value,Y=[];if(i==="horizontal"){const ue=I/y;for(let ie=0;ie<y;ie++)Y.push(Xa(`画布${ie+1}`,ie*ue,0,ue,W,ie))}else if(i==="vertical"){const ue=W/l;for(let ie=0;ie<l;ie++)Y.push(Xa(`画布${ie+1}`,0,ie*ue,I,ue,ie))}else{const ue=I/y,ie=W/l;for(let _e=0;_e<l;_e++)for(let Ae=0;Ae<y;Ae++){const nt=_e*y+Ae;Y.push(Xa(`画布${nt+1}`,Ae*ue,_e*ie,ue,ie,nt))}}Et(),z.value.regions=Y,re.value=((A=Y[0])==null?void 0:A.id)||null}function Ds(){var i,l;(l=(i=z.value)==null?void 0:i.regions)!=null&&l.length&&(Et(),z.value.regions=[],re.value=null)}function Jl(i){var l,y,I;if((y=(l=z.value)==null?void 0:l.regions)!=null&&y.length){Et(),z.value.regions=z.value.regions.filter(W=>W.id!==i);for(const W of z.value.elements)W.regionId===i&&delete W.regionId;re.value===i&&(re.value=((I=z.value.regions[0])==null?void 0:I.id)||null)}}function s(i,l){var I,W;if(i.button!==0||(i.preventDefault(),Ne.value=null,re.value=l.id,i.shiftKey||(te.value=[]),!z.value))return;const y=mo(l);Et(),ce={regions:[l],els:y,startX:i.clientX,startY:i.clientY,regionOrigins:[{id:l.id,x:l.xMm,y:l.yMm}],origins:y.map(Y=>({id:Y.id,x:Y.xMm,y:Y.yMm}))},(W=(I=i.currentTarget)==null?void 0:I.setPointerCapture)==null||W.call(I,i.pointerId),window.addEventListener("pointermove",Dt),window.addEventListener("pointerup",vt,{once:!0})}function g(i){return z.value?i.groupId?z.value.elements.filter(l=>l.groupId===i.groupId).map(l=>l.id):[i.id]:[i.id]}function q(i){re.value=null,te.value=g(i)}function j(){if(!z.value||te.value.length<2){ke.info("至少选中两个元素才能组合");return}Et();const i=Po();for(const l of Un())l.groupId=i;ke.success("已组合选中元素")}function ee(){const i=Un();if(!(!z.value||!i.length)){Et();for(const l of i)delete l.groupId;ke.success("已打散组合")}}function Ce(i){const l=Un();if(l.length<2){ke.info("至少选中两个元素才能整体翻转");return}Et();const y=Math.min(...l.map(A=>A.xMm)),I=Math.max(...l.map(A=>A.xMm+A.wMm)),W=Math.min(...l.map(A=>A.yMm)),Y=Math.max(...l.map(A=>A.yMm+A.hMm));for(const A of l)i==="x"?(A.xMm=Ke(y+I-(A.xMm+A.wMm)),A.flipX=!A.flipX):(A.yMm=Ke(W+Y-(A.yMm+A.hMm)),A.flipY=!A.flipY);ke.success(i==="x"?"已左右翻转选中元素":"已上下翻转选中元素")}function Ee(){if(!(!Re.value||!z.value||!te.value.length)){Et();for(const i of Un())i.regionId=Re.value.id;ke.success(`已归入 ${Re.value.name}`)}}function Me(i){var y;if(!z.value)return;Et();const l=Number(i==="horizontal"?(he.value/2).toFixed(2):(fe.value/2).toFixed(2));(y=z.value).guides||(y.guides=[]),z.value.guides.push({id:An(),axis:i,offsetMm:l})}function O(i){var l,y;(y=(l=z.value)==null?void 0:l.guides)!=null&&y.length&&(Et(),z.value.guides=z.value.guides.filter(I=>I.id!==i),Ne.value===i&&(Ne.value=null))}function ae(){var i,l;(l=(i=z.value)==null?void 0:i.guides)!=null&&l.length&&(Et(),z.value.guides=[],Ne.value=null)}let ce=null,at=null;function Fe(i,l){var W,Y;Ne.value=null,re.value=null;const y=g(l);if(i.shiftKey){y.every(ue=>te.value.includes(ue))?te.value=te.value.filter(ue=>!y.includes(ue)):te.value=Array.from(new Set([...te.value,...y]));return}if(y.every(A=>te.value.includes(A))||(te.value=[...y]),!z.value)return;const I=z.value.elements.filter(A=>te.value.includes(A.id));I.length&&(Et(),ce={regions:[],els:I,startX:i.clientX,startY:i.clientY,regionOrigins:[],origins:I.map(A=>({id:A.id,x:A.xMm,y:A.yMm}))},(Y=(W=i.target).setPointerCapture)==null||Y.call(W,i.pointerId),window.addEventListener("pointermove",Dt),window.addEventListener("pointerup",vt,{once:!0}))}function Dt(i){if(!ce||!z.value)return;const l=i.clientX-ce.startX,y=i.clientY-ce.startY,I=Pt.value,W=Ft;for(const Y of ce.regions){const A=ce.regionOrigins.find(ue=>ue.id===Y.id);A&&(Y.xMm=Math.round((A.x+l/I/W)*100)/100,Y.yMm=Math.round((A.y+y/I/W)*100)/100)}for(const Y of ce.els){const A=ce.origins.find(ue=>ue.id===Y.id);A&&(Y.xMm=Math.round((A.x+l/I/W)*100)/100,Y.yMm=Math.round((A.y+y/I/W)*100)/100)}}function vt(){ce=null,window.removeEventListener("pointermove",Dt)}function qn(i,l){var I;i.preventDefault(),Al(l.id),Et(),at={guide:l,startClient:l.axis==="horizontal"?i.clientY:i.clientX,startOffsetMm:l.offsetMm};const y=i.currentTarget;(I=y.setPointerCapture)==null||I.call(y,i.pointerId),window.addEventListener("pointermove",bt),window.addEventListener("pointerup",tn,{once:!0})}function bt(i){if(!at||!z.value)return;const y=(at.guide.axis==="horizontal"?i.clientY:i.clientX)-at.startClient,I=Pt.value,W=Ft,Y=at.guide.axis==="horizontal"?he.value:fe.value,A=at.startOffsetMm+y/I/W;at.guide.offsetMm=Math.max(0,Math.min(Y,Math.round(A*100)/100))}function tn(){at=null,window.removeEventListener("pointermove",bt)}let Ut=null;function Jn(i,l){var I;i.preventDefault(),te.value=[l.id],Et(),Ut={el:l,startX:i.clientX,startY:i.clientY,startWMm:l.wMm,startHMm:l.hMm,aspectRatio:Math.max(.01,Number(l.wMm)||.01)/Math.max(.01,Number(l.hMm)||.01),lockAspectRatio:l.type==="shape"?!!l.lockAspectRatio:!1};const y=i.currentTarget;(I=y.setPointerCapture)==null||I.call(y,i.pointerId),window.addEventListener("pointermove",Ja),window.addEventListener("pointerup",Rs,{once:!0})}function Ja(i){if(!Ut)return;const l=i.clientX-Ut.startX,y=i.clientY-Ut.startY,I=Pt.value,W=Ft,Y=Math.max(1,Math.round((Ut.startWMm+l/I/W)*100)/100),A=Math.max(1,Math.round((Ut.startHMm+y/I/W)*100)/100);if(Ut.lockAspectRatio||i.shiftKey){const ue=Math.max(.01,Ut.aspectRatio||1);Math.abs(l)>=Math.abs(y)?(Ut.el.wMm=Y,Ut.el.hMm=Math.max(1,Math.round(Y/ue*100)/100)):(Ut.el.hMm=A,Ut.el.wMm=Math.max(1,Math.round(A*ue*100)/100));return}Ut.el.wMm=Y,Ut.el.hMm=A}function Rs(){Ut=null,window.removeEventListener("pointermove",Ja)}const xo=e.ref([]),hl=e.ref([]);let Zl=!1;function Za(i){return JSON.parse(JSON.stringify(i))}function Ls(){xo.value=[],hl.value=[]}const $4=e.computed(()=>xo.value.length>0&&!!z.value),E4=e.computed(()=>hl.value.length>0&&!!z.value);function S4(){ce=null,Ut=null,at=null,en=null,rt.value=!1,window.removeEventListener("pointermove",Dt),window.removeEventListener("pointerup",vt),window.removeEventListener("pointermove",bt),window.removeEventListener("pointerup",tn),window.removeEventListener("pointermove",Ja),window.removeEventListener("pointerup",Rs),window.removeEventListener("pointermove",fl),window.removeEventListener("pointerup",wo)}function Et(){Zl||!z.value||(xo.value.push(Za(z.value)),xo.value.length>W_&&xo.value.shift(),hl.value=[])}function Ps(i){Zl=!0;try{S4(),z.value=Za(i);const l=new Set((z.value.elements??[]).map(W=>W.id));te.value=te.value.filter(W=>l.has(W));const y=new Set((z.value.regions??[]).map(W=>W.id));(!re.value||!y.has(re.value))&&(re.value=null);const I=new Set((z.value.guides??[]).map(W=>W.id));(!Ne.value||!I.has(Ne.value))&&(Ne.value=null)}finally{e.nextTick(()=>{Zl=!1})}}function Os(){if(!z.value||xo.value.length===0||Zl)return;hl.value.unshift(Za(z.value));const i=xo.value.pop();i&&Ps(i)}function js(){if(!z.value||hl.value.length===0||Zl)return;xo.value.push(Za(z.value));const i=hl.value.shift();i&&Ps(i)}function Fs(){Et(),zo()}function As(){const i=document.activeElement;if(!i)return!1;const l=i.tagName;return!!(l==="INPUT"||l==="TEXTAREA"||l==="SELECT"||i instanceof HTMLElement&&i.isContentEditable)}function Qs(i){return!i||!(i instanceof HTMLElement)?!1:!!i.closest('.qiu-input, .qiu-input-number, input, textarea, select, [contenteditable="true"]')}function Us(i){if(Qs(i.target)||As())return;if(i.code==="Space"){const ue=De.value,ie=document.activeElement;if(!(!!ue&&(Mt.value||ue===ie||!!ie&&ue.contains(ie)||ut.value.visible)))return;i.preventDefault(),i.stopPropagation(),ot.value=!0;return}const l=i.ctrlKey||i.metaKey,y=i.key.toLowerCase();if(i.key==="Escape"&&Jt(),l&&y==="c"){i.preventDefault(),i.stopPropagation(),Re.value&&te.value.length?uo():Re.value?il():te.value.length?Ki():ke.info("请先选中元素或分块");return}if(l&&y==="z"&&!i.shiftKey){i.preventDefault(),i.stopPropagation(),Os();return}if(l&&(y==="y"||y==="z"&&i.shiftKey)){i.preventDefault(),i.stopPropagation(),js();return}if(i.key==="Delete"||i.key==="Backspace"){if(Ne.value){i.preventDefault(),i.stopPropagation(),O(Ne.value),Jt();return}if(!te.value.length)return;i.preventDefault(),i.stopPropagation(),ko([...te.value]);return}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(i.key)||!te.value.length||!z.value)return;i.preventDefault(),i.stopPropagation(),Et();const I=1,W=Ft,Y=i.key==="ArrowLeft"?-I:i.key==="ArrowRight"?I:0,A=i.key==="ArrowUp"?-I:i.key==="ArrowDown"?I:0;for(const ue of te.value){const ie=z.value.elements.find(_e=>_e.id===ue);ie&&(ie.xMm=Math.round((ie.xMm+Y/W)*100)/100,ie.yMm=Math.round((ie.yMm+A/W)*100)/100)}}function Ws(i){i.code==="Space"&&(ot.value=!1)}function Hs(){ot.value=!1,Mt.value=!1}async function Ys(i){var ie;if(!z.value||$n.value||Qs(i.target)||As())return;const l=De.value,y=document.activeElement,I=i.target;if(!(!!l&&(l===y||!!y&&l.contains(y)||!!I&&l.contains(I)||ut.value.visible)))return;const A=Array.from(((ie=i.clipboardData)==null?void 0:ie.items)??[]).find(_e=>_e.kind==="file"&&_e.type.startsWith("image/"));if(A){const _e=A.getAsFile();if(!_e)return;i.preventDefault(),i.stopPropagation(),Jt(),tr(_e,ut.value.anchorMm??dl());return}if(!el.value)return;i.preventDefault(),i.stopPropagation();const ue=ut.value.target==="region"?Ht.value:Re.value;Ot.value==="regions"&&bn.value?cl(ut.value.anchorMm??void 0):kt.value?fo(ue?void 0:ut.value.anchorMm??void 0,ue?{targetRegion:ue}:void 0):bn.value&&cl(ut.value.anchorMm??void 0),Jt()}async function M4(){var W,Y;if(!z.value)return{uploadedIds:[],cleanupKeys:[]};const i=new Map;for(const A of z.value.elements){if(!ho(A)||A.clipboardUploadState!=="pending"||!A.clipboardUploadKey)continue;const ue=i.get(A.clipboardUploadKey)||[];ue.push(A),i.set(A.clipboardUploadKey,ue)}const l=new Map,y=[],I=[];try{for(const[A,ue]of i.entries()){const ie=v.get(A);if(!ie)throw new Error("存在未上传的粘贴图片,请重新粘贴后再保存");const _e=await ai(ie.file),Ae=Number(((W=_e==null?void 0:_e.data)==null?void 0:W.id)??0),nt=String(((Y=_e==null?void 0:_e.data)==null?void 0:Y.url)??"").trim();if(!Ae||!nt)throw new Error(`图片「${ie.origName||"未命名"}」上传失败`);const it=Ao(nt);y.push(Ae),I.push(A);for(const Nt of ue)l.set(Nt.id,{src:Nt.src,clipboardUploadState:Nt.clipboardUploadState,clipboardImageId:Nt.clipboardImageId}),Nt.src=it,Nt.clipboardUploadState="uploaded",Nt.clipboardImageId=Ae,Nt.clipboardOrigName=ie.origName||Nt.clipboardOrigName}return{uploadedIds:y,cleanupKeys:I}}catch(A){for(const ue of z.value.elements){const ie=l.get(ue.id);!ie||!ho(ue)||(ue.src=ie.src,ue.clipboardUploadState=ie.clipboardUploadState,ue.clipboardImageId=ie.clipboardImageId)}throw A}}function Ke(i){return Math.round(i*100)/100}function Un(){var l;const i=z.value;return(l=i==null?void 0:i.elements)!=null&&l.length?te.value.map(y=>i.elements.find(I=>I.id===y)).filter(y=>y!=null):[]}function ea(){var y;const i=z.value;if(!((y=i==null?void 0:i.elements)!=null&&y.length))return[];const l=[];for(const I of te.value){const W=i.elements.find(Y=>Y.id===I);(W==null?void 0:W.type)==="text"&&l.push(W)}return l}const q4=e.computed(()=>ea().length),z4=e.computed(()=>{const i=ea();if(!i.length)return;const l=i[0].fontSize;return i.every(y=>y.fontSize===l)?l:void 0}),T4=e.computed(()=>{var l;return((l=ea()[0])==null?void 0:l.color)||"#303133"}),ta=e.ref(void 0),gl=e.ref("#303133");e.watch(z4,i=>{ta.value=i},{immediate:!0}),e.watch(T4,i=>{gl.value=i||"#303133"},{immediate:!0});function Ks(i){if(i==null||!Number.isFinite(i)||!z.value)return;const l=ea();if(l.length){Et();for(const y of l)y.fontSize=i}}function I4(){Ks(ta.value)}function D4(i){ta.value=i,Ks(i)}function vs(i){if(i==null||i===""||!z.value)return;const l=ea();if(l.length){Et();for(const y of l)y.color=i}}function Xs(){vs((gl.value||"").trim())}function R4(i){i!=null&&(gl.value=i),vs(i)}function _l(i){var W;if(!((W=z.value)!=null&&W.canvas))return;const l=te.value;if(!l.length){ke.info("请先选中元素");return}Et();const y=z.value.canvas.widthMm,I=z.value.canvas.heightMm;for(const Y of l){const A=z.value.elements.find(ue=>ue.id===Y);if(A)switch(i){case"left":A.xMm=0;break;case"right":A.xMm=Math.max(0,y-A.wMm);break;case"h-center":A.xMm=Math.max(0,(y-A.wMm)/2);break;case"top":A.yMm=0;break;case"bottom":A.yMm=Math.max(0,I-A.hMm);break;case"v-center":A.yMm=Math.max(0,(I-A.hMm)/2);break}}}function bl(i){const l=Un();if(!l.length){ke.info("请先选中元素");return}if(l.length===1)return;Et();const y=Math.min(...l.map(ie=>ie.xMm)),I=Math.max(...l.map(ie=>ie.xMm+ie.wMm)),W=Math.min(...l.map(ie=>ie.yMm)),Y=Math.max(...l.map(ie=>ie.yMm+ie.hMm)),A=(y+I)/2,ue=(W+Y)/2;for(const ie of l)switch(i){case"sel-left":ie.xMm=Ke(y);break;case"sel-right":ie.xMm=Ke(I-ie.wMm);break;case"sel-top":ie.yMm=Ke(W);break;case"sel-bottom":ie.yMm=Ke(Y-ie.hMm);break;case"sel-h-center":ie.xMm=Ke(A-ie.wMm/2);break;case"sel-v-center":ie.yMm=Ke(ue-ie.hMm/2);break}}function Gs(i){const l=Un();if(l.length<2){ke.info("分布需要至少选中两个元素");return}if(Et(),i==="h"){const y=[...l].sort((Ae,nt)=>Ae.xMm-nt.xMm||Ae.id.localeCompare(nt.id)),I=y[0].xMm,W=y[y.length-1],Y=W.xMm+W.wMm,A=y.reduce((Ae,nt)=>Ae+nt.wMm,0),ie=(Y-I-A)/(y.length-1);let _e=I;for(const Ae of y)Ae.xMm=Ke(_e),_e+=Ae.wMm+ie}else{const y=[...l].sort((Ae,nt)=>Ae.yMm-nt.yMm||Ae.id.localeCompare(nt.id)),I=y[0].yMm,W=y[y.length-1],Y=W.yMm+W.hMm,A=y.reduce((Ae,nt)=>Ae+nt.hMm,0),ie=(Y-I-A)/(y.length-1);let _e=I;for(const Ae of y)Ae.yMm=Ke(_e),_e+=Ae.hMm+ie}}async function Js(){H.value=!0,te.value=[],lt.value=null,go();try{const l=(f.value?await ra(c,d):await li(c,d)).data;V.value=String(l.name||"").trim()||"未命名",fe.value=Number(l.width_mm)||90,he.value=Number(l.height_mm)||130;const y=l.template_json;y&&typeof y=="object"&&Array.isArray(y.elements)?(z.value=y,z.value.canvas=z.value.canvas||{widthMm:fe.value,heightMm:he.value,background:"#ffffff"},z.value.canvas.widthMm=fe.value,z.value.canvas.heightMm=he.value,va(z.value)):z.value={version:1,canvas:{widthMm:fe.value,heightMm:he.value,background:"#ffffff",showBorder:!0,borderColor:"#334155",borderWidthMm:.35},elements:[],guides:[],regions:[]};const I=l.default_test_json;se.value=I&&typeof I=="object"?{...I}:{},Ls(),await e.nextTick(),yl(!0)}catch{z.value=null,Ls(),ke.error("加载模板失败")}finally{H.value=!1}}async function L4(){var y,I;if(!z.value)return;zo(),Ve.value=!0,Z.value="";let i=[],l=[];try{const W=await M4();i=W.uploadedIds,l=W.cleanupKeys;const Y={name:V.value.trim()||"未命名",width_mm:fe.value,height_mm:he.value,template_json:z.value,default_test_json:se.value};f.value?await ym(c,d,Y):await hm(c,d,Y),go(l),Z.value="已保存",ke.success("保存成功"),await Js()}catch(W){if(i.length){await Promise.allSettled(i.map(Y=>ca(Y)));for(const Y of z.value.elements){if(!ho(Y)||Y.clipboardUploadState!=="uploaded"||!Y.clipboardUploadKey||!l.includes(Y.clipboardUploadKey))continue;const A=v.get(Y.clipboardUploadKey);A&&(Y.src=A.objectUrl,Y.clipboardUploadState="pending",delete Y.clipboardImageId)}}ke.error(((I=(y=W==null?void 0:W.response)==null?void 0:y.data)==null?void 0:I.message)||"保存失败")}finally{Ve.value=!1}}function ei(){const i=$e.value||De.value;if(!i)return;const l=Math.max(i.clientWidth||420,280),y=Math.max(i.clientHeight||420,240);Math.abs(l-me.value)>8&&(me.value=l),Math.abs(y-pe.value)>8&&(pe.value=y)}async function br(){await e.nextTick(),ei(),lt.value==null&&yl(!0)}async function P4(){ht.value=!ht.value,document.body.classList.toggle("badge-editor-window-fill-lock",ht.value),await br()}async function O4(){var l,y;const i=st.value;if(i)try{if(document.fullscreenElement)await document.exitFullscreen();else{const I=((l=i.requestFullscreen)==null?void 0:l.bind(i))||((y=i.webkitRequestFullscreen)==null?void 0:y.bind(i));if(!I){ke.warning("当前浏览器不支持全屏");return}await I()}}catch{ke.warning("无法进入全屏,请检查浏览器权限")}}function Zs(){const i=st.value;He.value=!!i&&document.fullscreenElement===i,br()}function ed(i){i.key==="Escape"&&(!ht.value||document.fullscreenElement||(ht.value=!1,document.body.classList.remove("badge-editor-window-fill-lock"),br()))}function yl(i=!1){const l=De.value,y=pt.value;if(!l||!y)return;const I=lo.value,W=ol.value,Y=Math.max(ao.value,120),A=Math.max(io.value,120),ue=Math.max(xa,Math.round((Y-I)/2)),ie=Math.max(xa,Math.round((A-W)/2)),_e=Math.max(0,cn.value-(Ye.value?So:0)-ue),Ae=Math.max(0,ll.value-(Ye.value?So:0)-ie);(i||l.scrollLeft===0&&l.scrollTop===0||Math.abs(l.scrollLeft-_e)>8||Math.abs(l.scrollTop-Ae)>8)&&(l.scrollLeft=_e,l.scrollTop=Ae)}let kl=null,yr=0;return e.onMounted(async()=>{if(n.embedded||n.mode==="banner"||!Number.isFinite(c)||c<=0||!Number.isFinite(d)||d<=0){if(!z.value){const{createBannerDoc:l,createBadgeDoc:y}=await Promise.resolve().then(()=>V4);z.value=n.mode==="banner"?l():y({mode:n.mode||(f.value?"desk":"badge")}),V.value=V.value||(n.mode==="banner"?"Banner 草稿":"模板草稿"),fe.value=z.value.canvas.widthMm,he.value=z.value.canvas.heightMm,H.value=!1}}else await Js();await e.nextTick(),ei(),yl(!0),kl=new ResizeObserver(()=>{cancelAnimationFrame(yr),yr=requestAnimationFrame(()=>{const l=me.value,y=pe.value;ei(),lt.value==null&&(Math.abs(l-me.value)>8||Math.abs(y-pe.value)>8)&&yl(!0)})}),$e.value?kl.observe($e.value):De.value&&kl.observe(De.value),window.addEventListener("keydown",Us,!0),window.addEventListener("keyup",Ws,!0),window.addEventListener("blur",Hs),window.addEventListener("paste",Ys,!0),window.addEventListener("pointerdown",Jt,!0),window.addEventListener("scroll",Jt,!0),document.addEventListener("fullscreenchange",Zs),window.addEventListener("keydown",ed,!0)}),e.onUnmounted(()=>{var i;kl==null||kl.disconnect(),cancelAnimationFrame(yr),go(),document.body.classList.remove("badge-editor-window-fill-lock"),document.fullscreenElement===st.value&&((i=document.exitFullscreen)==null||i.call(document)),window.removeEventListener("pointermove",Qe),window.removeEventListener("pointerup",Bt),document.body.style.cursor="",document.body.style.userSelect="",window.removeEventListener("keydown",Us,!0),window.removeEventListener("keyup",Ws,!0),window.removeEventListener("blur",Hs),window.removeEventListener("paste",Ys,!0),window.removeEventListener("pointerdown",Jt,!0),window.removeEventListener("scroll",Jt,!0),document.removeEventListener("fullscreenchange",Zs),window.removeEventListener("keydown",ed,!0),window.removeEventListener("pointermove",Dt),window.removeEventListener("pointermove",bt),window.removeEventListener("pointermove",Ja),window.removeEventListener("pointermove",Oo),window.removeEventListener("pointermove",fl)}),(i,l)=>{const y=_t,I=nn,W=zc,Y=Wn,A=Nl,ue=Bl,ie=mi,_e=qc,Ae=Ni,nt=fa,it=$l,Nt=$o,Wt=El,gn=No,ve=Yn,zn=vo,Vn=Sl,Vt=Ko,jo=Yo,j4=Mc,F4=Vo,kr=Nn,A4=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",{ref_key:"editorRootRef",ref:st,class:e.normalizeClass(["page-container badge-editor",{"is-window-fill":ht.value,"is-native-fullscreen":He.value}])},[e.createElementVNode("div",zg,[e.createVNode(I,{link:"",onClick:gt},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-left-line"}),e.createTextVNode(" "+e.toDisplayString(`${f.value?"桌面贴模板":"证件模板"}:${V.value||"未命名"}`),1)]),_:1}),e.createElementVNode("div",Tg,[e.createVNode(W,{size:"small",class:"header-undo-group"},{default:e.withCtx(()=>[e.createVNode(I,{disabled:!$4.value,title:"撤销 (Ctrl+Z)",onClick:Os},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-go-back-line"}),l[121]||(l[121]=e.createTextVNode(" 撤销 ",-1))]),_:1},8,["disabled"]),e.createVNode(I,{disabled:!E4.value,title:"重做 (Ctrl+Y / Ctrl+Shift+Z)",onClick:js},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-go-forward-line"}),l[122]||(l[122]=e.createTextVNode(" 重做 ",-1))]),_:1},8,["disabled"])]),_:1}),e.createVNode(I,{size:"small",type:ht.value?"primary":"default",plain:"",title:"撑满当前浏览器可视区域",onClick:P4},{default:e.withCtx(()=>[e.createVNode(y,{icon:ht.value?"fullscreen-exit-line":"aspect-ratio-line"},null,8,["icon"]),e.createTextVNode(" "+e.toDisplayString(ht.value?"退出满屏":"满屏"),1)]),_:1},8,["type"]),e.createVNode(I,{size:"small",type:He.value?"primary":"default",plain:"",title:"撑满整个电脑屏幕",onClick:O4},{default:e.withCtx(()=>[e.createVNode(y,{icon:He.value?"fullscreen-exit-line":"fullscreen-line"},null,8,["icon"]),e.createTextVNode(" "+e.toDisplayString(He.value?"退出全屏":"全屏"),1)]),_:1},8,["type"]),e.createVNode(I,{type:"primary",plain:"",disabled:!z.value,onClick:l[0]||(l[0]=P=>tt.value=!0)},{default:e.withCtx(()=>[e.createVNode(y,{icon:"eye-line"}),l[123]||(l[123]=e.createTextVNode(" 预览 ",-1))]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!z.value,onClick:L},{default:e.withCtx(()=>[...l[124]||(l[124]=[e.createTextVNode("导出图片",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!z.value,onClick:U},{default:e.withCtx(()=>[...l[125]||(l[125]=[e.createTextVNode("导出 PDF",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",type:"primary",plain:"",disabled:!z.value,onClick:oe},{default:e.withCtx(()=>[...l[126]||(l[126]=[e.createTextVNode("导出网页",-1)])]),_:1},8,["disabled"])])]),e.withDirectives((e.openBlock(),e.createElementBlock("div",{ref_key:"layoutRef",ref:Ge,class:e.normalizeClass(["layout",{"is-resizing":!!qe.value}]),style:e.normalizeStyle(K.value)},[e.createVNode(gn,{class:"tools",shadow:"never"},{default:e.withCtx(()=>{var P,Ct,td,nd,od,ld;return[e.createElementVNode("div",Ig,[e.createElementVNode("div",Dg,[e.createElementVNode("div",Rg,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tools-accordion__btn",{"is-active":E.value==="canvas"}]),onClick:l[1]||(l[1]=Oe=>E.value="canvas")},"画布",2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tools-accordion__btn",{"is-active":E.value==="insert"}]),onClick:l[2]||(l[2]=Oe=>E.value="insert")},"插入",2),e.createElementVNode("button",{type:"button",class:e.normalizeClass(["tools-accordion__btn",{"is-active":E.value==="arrange"}]),onClick:l[3]||(l[3]=Oe=>E.value="arrange")},"编排",2)]),e.createElementVNode("div",{class:"tools-pane",hidden:E.value!=="canvas"},[l[153]||(l[153]=e.createElementVNode("div",{class:"tools-section-title"},"模板名称",-1)),e.createElementVNode("div",Pg,[e.createVNode(Y,{modelValue:V.value,"onUpdate:modelValue":l[4]||(l[4]=Oe=>V.value=Oe),maxlength:"120","show-word-limit":"",placeholder:"模板名称",size:"small"},null,8,["modelValue"])]),l[154]||(l[154]=e.createElementVNode("div",{class:"tools-section-title"},"画布",-1)),e.createElementVNode("div",Og,[e.createElementVNode("div",null,[l[127]||(l[127]=e.createElementVNode("span",{class:"label"},"宽:",-1)),e.createVNode(A,{modelValue:fe.value,"onUpdate:modelValue":l[5]||(l[5]=Oe=>fe.value=Oe),min:40,max:300,size:"small","controls-position":"right",onChange:Fs},null,8,["modelValue"]),l[128]||(l[128]=e.createTextVNode("mm ",-1))]),e.createElementVNode("div",null,[l[129]||(l[129]=e.createElementVNode("span",{class:"label"},"高:",-1)),e.createVNode(A,{modelValue:he.value,"onUpdate:modelValue":l[6]||(l[6]=Oe=>he.value=Oe),min:40,max:400,size:"small","controls-position":"right",onChange:Fs},null,8,["modelValue"]),l[130]||(l[130]=e.createTextVNode("mm ",-1))])]),e.createElementVNode("div",jg,[l[131]||(l[131]=e.createElementVNode("span",{class:"label"},"显示标尺",-1)),e.createVNode(ue,{modelValue:Ye.value,"onUpdate:modelValue":l[7]||(l[7]=Oe=>Ye.value=Oe),size:"small"},null,8,["modelValue"])]),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",Fg,[l[133]||(l[133]=e.createElementVNode("span",null,"画布边框",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[132]||(l[132]=[e.createElementVNode("div",{class:"help-popover"},"控制白纸边缘描边;预览与打印会同步生效。滚轮缩放仅改变视图,不改模板毫米尺寸。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",Ag,[l[134]||(l[134]=e.createElementVNode("span",{class:"label"},"显示边框",-1)),e.createVNode(ue,{modelValue:on.value,"onUpdate:modelValue":l[8]||(l[8]=Oe=>on.value=Oe),size:"small"},null,8,["modelValue"])]),on.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",Qg,[l[135]||(l[135]=e.createElementVNode("span",{class:"label"},"边框色",-1)),e.createElementVNode("div",Ug,[e.createVNode(Ae,{modelValue:pn.value,"onUpdate:modelValue":l[9]||(l[9]=Oe=>pn.value=Oe)},null,8,["modelValue"]),e.createVNode(Y,{modelValue:pn.value,"onUpdate:modelValue":l[10]||(l[10]=Oe=>pn.value=Oe),size:"small",placeholder:"#94a3b8"},null,8,["modelValue"])])]),e.createElementVNode("div",Wg,[l[136]||(l[136]=e.createElementVNode("span",{class:"label"},"边框 mm",-1)),e.createVNode(A,{modelValue:Mo.value,"onUpdate:modelValue":l[11]||(l[11]=Oe=>Mo.value=Oe),min:.1,max:8,step:.1,precision:1,size:"small","controls-position":"right",style:{width:"120px"}},null,8,["modelValue"])])],64)):e.createCommentVNode("",!0),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",Hg,[l[138]||(l[138]=e.createElementVNode("span",null,"画布背景",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[137]||(l[137]=[e.createElementVNode("div",{class:"help-popover"},"支持透明、纯色和背景图。背景图可从图片库选择,也可直接上传。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",Yg,[e.createVNode(it,{modelValue:ft.value,"onUpdate:modelValue":l[12]||(l[12]=Oe=>ft.value=Oe),size:"small",onChange:Sa},{default:e.withCtx(()=>[e.createVNode(nt,{label:"transparent"},{default:e.withCtx(()=>[...l[139]||(l[139]=[e.createTextVNode("透明",-1)])]),_:1}),e.createVNode(nt,{label:"color"},{default:e.withCtx(()=>[...l[140]||(l[140]=[e.createTextVNode("色块",-1)])]),_:1}),e.createVNode(nt,{label:"image"},{default:e.withCtx(()=>[...l[141]||(l[141]=[e.createTextVNode("图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),ft.value==="color"?(e.openBlock(),e.createElementBlock("div",Kg,[l[142]||(l[142]=e.createElementVNode("span",{class:"label"},"背景色",-1)),e.createElementVNode("div",vg,[e.createVNode(Ae,{modelValue:vn.value,"onUpdate:modelValue":l[13]||(l[13]=Oe=>vn.value=Oe),"show-alpha":""},null,8,["modelValue"]),e.createVNode(Y,{modelValue:vn.value,"onUpdate:modelValue":l[14]||(l[14]=Oe=>vn.value=Oe),size:"small",placeholder:"#ffffff / rgba(...)"},null,8,["modelValue"])])])):ft.value==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",Xg,[e.createVNode(I,{size:"small",onClick:l[15]||(l[15]=Oe=>Pn("lib"))},{default:e.withCtx(()=>[...l[143]||(l[143]=[e.createTextVNode("选择图片",-1)])]),_:1}),e.createVNode(I,{size:"small",onClick:l[16]||(l[16]=Oe=>Pn("up"))},{default:e.withCtx(()=>[...l[144]||(l[144]=[e.createTextVNode("上传图片",-1)])]),_:1}),e.createVNode(I,{size:"small",link:"",type:"danger",disabled:!((Ct=(P=z.value)==null?void 0:P.canvas)!=null&&Ct.backgroundImage),onClick:qa},{default:e.withCtx(()=>[...l[145]||(l[145]=[e.createTextVNode(" 清除背景图 ",-1)])]),_:1},8,["disabled"])]),e.createElementVNode("p",Gg,e.toDisplayString((nd=(td=z.value)==null?void 0:td.canvas)!=null&&nd.backgroundImage?"当前已设置背景图,预览与打印会一起生效。":"尚未选择背景图,可从图片库选择或直接上传。"),1)],64)):e.createCommentVNode("",!0),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",Jg,[l[147]||(l[147]=e.createElementVNode("span",null,"标尺与参考线",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[146]||(l[146]=[e.createElementVNode("div",{class:"help-popover"},"支持像 Photoshop 一样显示标尺,并为模板保存水平/垂直参考线。参考线可拖动、手输位置,也会随模板一起生效。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",Zg,[e.createVNode(I,{size:"small",onClick:l[17]||(l[17]=Oe=>Me("horizontal"))},{default:e.withCtx(()=>[...l[148]||(l[148]=[e.createTextVNode("添加横线",-1)])]),_:1}),e.createVNode(I,{size:"small",onClick:l[18]||(l[18]=Oe=>Me("vertical"))},{default:e.withCtx(()=>[...l[149]||(l[149]=[e.createTextVNode("添加竖线",-1)])]),_:1}),e.createVNode(I,{size:"small",link:"",type:"danger",disabled:!It.value.length,onClick:ae},{default:e.withCtx(()=>[...l[150]||(l[150]=[e.createTextVNode("清空参考线",-1)])]),_:1},8,["disabled"])]),It.value.length?(e.openBlock(),e.createElementBlock("div",e2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,Oe=>(e.openBlock(),e.createElementBlock("div",{key:Oe.id,class:e.normalizeClass(["guide-row",{active:Ne.value===Oe.id}]),onClick:Zn=>Al(Oe.id),onContextmenu:e.withModifiers(Zn=>sl(Zn,Oe),["prevent","stop"])},[e.createVNode(Nt,{size:"small",type:Oe.axis==="horizontal"?"success":"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Oe.axis==="horizontal"?"横线":"竖线"),1)]),_:2},1032,["type"]),e.createVNode(A,{modelValue:Oe.offsetMm,"onUpdate:modelValue":Zn=>Oe.offsetMm=Zn,min:0,max:Oe.axis==="horizontal"?he.value:fe.value,step:.5,"controls-position":"right",size:"small"},null,8,["modelValue","onUpdate:modelValue","max"]),l[152]||(l[152]=e.createElementVNode("span",{class:"guide-mm"},"mm",-1)),e.createVNode(I,{link:"",type:"danger",onClick:Zn=>O(Oe.id)},{default:e.withCtx(()=>[...l[151]||(l[151]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])],42,t2))),128))])):e.createCommentVNode("",!0)],8,Lg),e.createElementVNode("div",{class:"tools-pane",hidden:E.value!=="insert"},[e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",o2,[l[156]||(l[156]=e.createElementVNode("span",null,"元素",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[155]||(l[155]=[e.createElementVNode("div",{class:"help-popover"},"新文字会按版心自动排位。图片可从图片库选用或本地上传,便于后续复用。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",l2,[e.createVNode(I,{size:"small",type:"primary",onClick:gr},{default:e.withCtx(()=>[e.createVNode(y,{icon:"edit-line"}),l[157]||(l[157]=e.createTextVNode(" 文字 ",-1))]),_:1}),e.createVNode(I,{size:"small",type:"primary",plain:"",onClick:l[19]||(l[19]=Oe=>ze.value=!0)},{default:e.withCtx(()=>[e.createVNode(y,{icon:"image-line"}),l[158]||(l[158]=e.createTextVNode(" 图片 ",-1))]),_:1}),e.createVNode(I,{size:"small",link:"",type:"primary",onClick:Tt},{default:e.withCtx(()=>[e.createVNode(y,{icon:"folder-open-line"}),l[159]||(l[159]=e.createTextVNode(" 图片库管理 ",-1))]),_:1})]),e.createElementVNode("div",a2,[e.createVNode(Wt,{modelValue:w.value,"onUpdate:modelValue":l[20]||(l[20]=Oe=>w.value=Oe),size:"small",style:{width:"120px"},options:h},null,8,["modelValue"]),e.createVNode(I,{size:"small",type:"primary",plain:"",onClick:l[21]||(l[21]=Oe=>_r(w.value))},{default:e.withCtx(()=>[...l[160]||(l[160]=[e.createTextVNode("添加形状",-1)])]),_:1})]),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",i2,[l[162]||(l[162]=e.createElementVNode("span",null,"组合与分区",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[161]||(l[161]=[e.createElementVNode("div",{class:"help-popover"},"支持把多个元素组合/打散,也可把画布拆成多个分区,用于复制分区内容、给分区设置背景色和归类元素。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",r2,[e.createVNode(I,{size:"small",disabled:te.value.length<2,onClick:j},{default:e.withCtx(()=>[...l[163]||(l[163]=[e.createTextVNode("组合",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!Rn.value,onClick:ee},{default:e.withCtx(()=>[...l[164]||(l[164]=[e.createTextVNode("打散",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!Re.value,onClick:Yi},{default:e.withCtx(()=>[...l[165]||(l[165]=[e.createTextVNode("复制分区内容",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!te.value.length||!Re.value,onClick:Ee},{default:e.withCtx(()=>[...l[166]||(l[166]=[e.createTextVNode("归入当前分区",-1)])]),_:1},8,["disabled"])]),e.createElementVNode("div",c2,[l[167]||(l[167]=e.createElementVNode("span",{class:"label"},"横向分块",-1)),e.createVNode(A,{modelValue:Le.value,"onUpdate:modelValue":l[22]||(l[22]=Oe=>Le.value=Oe),min:1,max:12,size:"small","controls-position":"right"},null,8,["modelValue"])]),e.createElementVNode("div",s2,[l[168]||(l[168]=e.createElementVNode("span",{class:"label"},"纵向分块",-1)),e.createVNode(A,{modelValue:be.value,"onUpdate:modelValue":l[23]||(l[23]=Oe=>be.value=Oe),min:1,max:12,size:"small","controls-position":"right"},null,8,["modelValue"])]),e.createElementVNode("div",d2,[e.createVNode(I,{size:"small",onClick:l[24]||(l[24]=Oe=>Ga("horizontal"))},{default:e.withCtx(()=>[...l[169]||(l[169]=[e.createTextVNode("横向分块",-1)])]),_:1}),e.createVNode(I,{size:"small",onClick:l[25]||(l[25]=Oe=>Ga("vertical"))},{default:e.withCtx(()=>[...l[170]||(l[170]=[e.createTextVNode("纵向分块",-1)])]),_:1}),e.createVNode(I,{size:"small",onClick:l[26]||(l[26]=Oe=>Ga("grid"))},{default:e.withCtx(()=>[...l[171]||(l[171]=[e.createTextVNode("田字格/网格",-1)])]),_:1}),e.createVNode(I,{size:"small",link:"",type:"danger",disabled:!dn.value.length,onClick:Ds},{default:e.withCtx(()=>[...l[172]||(l[172]=[e.createTextVNode("清空分区",-1)])]),_:1},8,["disabled"])]),dn.value.length?(e.openBlock(),e.createElementBlock("div",m2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dn.value,Oe=>(e.openBlock(),e.createElementBlock("div",{key:Oe.id,class:e.normalizeClass(["guide-row",{active:re.value===Oe.id}]),onClick:Zn=>re.value=Oe.id},[e.createVNode(Nt,{size:"small",type:re.value===Oe.id?"success":"info"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(Oe.name),1)]),_:2},1032,["type"]),e.createElementVNode("span",f2,e.toDisplayString(Oe.wMm.toFixed(1))+" x "+e.toDisplayString(Oe.hMm.toFixed(1))+" mm",1)],10,u2))),128))])):e.createCommentVNode("",!0),e.createElementVNode("div",p2,[e.createVNode(Bi,{"model-value":x.value,"onUpdate:modelValue":N,onInsert:D,onPreviewContext:S},null,8,["model-value"])])],8,n2),e.createElementVNode("div",{class:"tools-pane",hidden:E.value!=="arrange"},[e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[...l[173]||(l[173]=[e.createTextVNode("对齐到画布",-1)])]),_:1}),e.createElementVNode("div",g2,[e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"左对齐到画布",onClick:l[27]||(l[27]=Oe=>_l("left"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-left-line"})]),_:1}),e.createVNode(I,{title:"水平居中对画布",onClick:l[28]||(l[28]=Oe=>_l("h-center"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"expand-left-right-line"})]),_:1}),e.createVNode(I,{title:"右对齐到画布",onClick:l[29]||(l[29]=Oe=>_l("right"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-right-line"})]),_:1})]),_:1})]),e.createElementVNode("div",_2,[e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"顶对齐到画布",onClick:l[30]||(l[30]=Oe=>_l("top"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-up-line"})]),_:1}),e.createVNode(I,{title:"垂直居中对画布",onClick:l[31]||(l[31]=Oe=>_l("v-center"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"drag-move-line"})]),_:1}),e.createVNode(I,{title:"底对齐到画布",onClick:l[32]||(l[32]=Oe=>_l("bottom"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-down-line"})]),_:1})]),_:1})]),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[...l[174]||(l[174]=[e.createTextVNode("图层",-1)])]),_:1}),(ld=(od=z.value)==null?void 0:od.elements)!=null&&ld.length?(e.openBlock(),e.createElementBlock("div",b2,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(no.value,Oe=>(e.openBlock(),e.createElementBlock("div",{key:Oe.id,class:e.normalizeClass(["layer-row",{active:oo(Oe.id)}]),onClick:Zn=>q(Oe)},[e.createElementVNode("span",k2,e.toDisplayString(bo(Oe)),1),e.createElementVNode("span",w2,"z"+e.toDisplayString(Oe.zIndex),1),e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"上移一层",onClick:e.withModifiers(Zn=>yo(Oe,1),["stop"])},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-up-s-line"})]),_:1},8,["onClick"]),e.createVNode(I,{title:"下移一层",onClick:e.withModifiers(Zn=>yo(Oe,-1),["stop"])},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-down-s-line"})]),_:1},8,["onClick"])]),_:2},1024)],10,y2))),128))])):(e.openBlock(),e.createElementBlock("span",x2,"暂无元素"))],8,h2)]),e.createElementVNode("div",V2,[e.createVNode(_e),e.createElementVNode("div",C2,[e.createVNode(I,{type:"success",loading:Ve.value,onClick:L4},{default:e.withCtx(()=>[e.createVNode(y,{icon:"checkbox-circle-line"}),l[175]||(l[175]=e.createTextVNode(" 保存模板 ",-1))]),_:1},8,["loading"]),Z.value?(e.openBlock(),e.createElementBlock("span",N2,e.toDisplayString(Z.value),1)):e.createCommentVNode("",!0)])])])]}),_:1}),e.createElementVNode("div",{class:"layout-splitter",title:"拖拽调整左侧宽度",onPointerdown:l[33]||(l[33]=P=>wt("left",P))},null,32),e.createVNode(gn,{class:"canvas-card",shadow:"never"},{header:e.withCtx(()=>[e.createElementVNode("div",B2,[l[179]||(l[179]=e.createElementVNode("span",null,"编辑区(滚轮缩放;灰底拖拽/空格/中键平移;纸面空白框选)",-1)),e.createElementVNode("div",$2,[e.createVNode(Nt,{size:"small",type:"info"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(ji.value),1)]),_:1}),e.createVNode(W,{size:"small"},{default:e.withCtx(()=>[e.createVNode(I,{onClick:l[34]||(l[34]=P=>Oa(-1))},{default:e.withCtx(()=>[...l[176]||(l[176]=[e.createTextVNode("缩小",-1)])]),_:1}),e.createVNode(I,{onClick:Pa},{default:e.withCtx(()=>[...l[177]||(l[177]=[e.createTextVNode("适配",-1)])]),_:1}),e.createVNode(I,{onClick:l[35]||(l[35]=P=>Oa(1))},{default:e.withCtx(()=>[...l[178]||(l[178]=[e.createTextVNode("放大",-1)])]),_:1})]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"viewportRef",ref:$e,class:"canvas-card-body"},[e.createElementVNode("div",{ref_key:"hostRef",ref:De,class:e.normalizeClass(["canvas-host",{"is-panning":rt.value,"is-pan-ready":ot.value&&!rt.value}]),tabindex:"0",onPointerenter:Wa,onPointerleave:Ha,onPointerdown:Ya,onAuxclick:l[36]||(l[36]=e.withModifiers(()=>{},["prevent"])),onClick:l[37]||(l[37]=e.withModifiers(P=>{te.value=[],Jt()},["self"])),onWheel:e.withModifiers(nr,["prevent"])},[e.createElementVNode("div",{class:e.normalizeClass(["editor-workspace",{"no-rulers":!Ye.value}]),style:e.normalizeStyle(Oi.value)},[Ye.value?(e.openBlock(),e.createElementBlock("div",E2)):e.createCommentVNode("",!0),Ye.value?(e.openBlock(),e.createElementBlock("div",S2,[e.createElementVNode("div",{class:"ruler-axis ruler-axis-x",style:e.normalizeStyle($a.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Kt.value,P=>(e.openBlock(),e.createElementBlock("div",{key:`x-${P.mm}`,class:e.normalizeClass(["ruler-tick ruler-tick-x",{major:P.major,mid:P.mid}]),style:e.normalizeStyle({left:`${P.offsetPx}px`})},[P.label?(e.openBlock(),e.createElementBlock("span",M2,e.toDisplayString(P.label),1)):e.createCommentVNode("",!0)],6))),128))],4)])):e.createCommentVNode("",!0),Ye.value?(e.openBlock(),e.createElementBlock("div",q2,[e.createElementVNode("div",{class:"ruler-axis ruler-axis-y",style:e.normalizeStyle(Xn.value)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Xt.value,P=>(e.openBlock(),e.createElementBlock("div",{key:`y-${P.mm}`,class:e.normalizeClass(["ruler-tick ruler-tick-y",{major:P.major,mid:P.mid}]),style:e.normalizeStyle({top:`${P.offsetPx}px`})},[P.label?(e.openBlock(),e.createElementBlock("span",z2,e.toDisplayString(P.label),1)):e.createCommentVNode("",!0)],6))),128))],4)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"workspace-surface",style:e.normalizeStyle(sn.value),onPointerdown:e.withModifiers(hr,["self"]),onContextmenu:e.withModifiers(Ji,["prevent","stop","self"])},[z.value&&ln.value>0?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"canvasClipRef",ref:pt,class:"canvas-scale-clip",style:e.normalizeStyle(Fi.value)},[e.createElementVNode("div",{class:"canvas-scale-inner",style:e.normalizeStyle(Ai.value)},[e.createElementVNode("div",{ref_key:"canvasInnerRef",ref:xt,class:"canvas-inner canvas-inner--paper",style:e.normalizeStyle(Gt.value),onPointerdown:e.withModifiers(pr,["self"]),onContextmenu:e.withModifiers(Zi,["prevent","stop","self"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(It.value,P=>(e.openBlock(),e.createElementBlock("div",{key:P.id,class:e.normalizeClass(["guide-line",[P.axis==="horizontal"?"guide-line--h":"guide-line--v",{active:Ne.value===P.id}]]),style:e.normalizeStyle(ar(P)),onPointerdown:e.withModifiers(Ct=>qn(Ct,P),["stop","prevent"]),onContextmenu:e.withModifiers(Ct=>sl(Ct,P),["prevent","stop"])},[e.createElementVNode("span",{class:"guide-badge",style:e.normalizeStyle(ja(P))},e.toDisplayString(P.axis==="horizontal"?`Y ${P.offsetMm.toFixed(1)}mm`:`X ${P.offsetMm.toFixed(1)}mm`),5)],46,T2))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(dn.value,P=>(e.openBlock(),e.createElementBlock("div",{key:P.id,class:e.normalizeClass(["canvas-region",{active:re.value===P.id}]),style:e.normalizeStyle(Qa(P)),onPointerdown:e.withModifiers(Ct=>s(Ct,P),["stop"]),onContextmenu:e.withModifiers(Ct=>La(Ct,P),["prevent","stop"])},[e.createElementVNode("span",D2,e.toDisplayString(P.name),1)],46,I2))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(En.value,P=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:P.id},[P.type==="text"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(Ul(P)),class:"layer-drop"},[e.createVNode(Vn,{trigger:"contextmenu",onCommand:Ct=>Kl(Ct,P)},{dropdown:e.withCtx(()=>[e.createVNode(zn,null,{default:e.withCtx(()=>[e.createVNode(ve,{command:"copy"},{default:e.withCtx(()=>[...l[180]||(l[180]=[e.createTextVNode("复制元素",-1)])]),_:1}),e.createVNode(ve,{command:"paste",disabled:!kt.value},{default:e.withCtx(()=>[...l[181]||(l[181]=[e.createTextVNode("粘贴元素",-1)])]),_:1},8,["disabled"]),e.createVNode(ve,{command:"delete"},{default:e.withCtx(()=>[...l[182]||(l[182]=[e.createTextVNode("删除元素",-1)])]),_:1}),e.createVNode(ve,{command:"set-link"},{default:e.withCtx(()=>[...l[183]||(l[183]=[e.createTextVNode("设置链接",-1)])]),_:1}),e.createVNode(ve,{command:"clear-link"},{default:e.withCtx(()=>[...l[184]||(l[184]=[e.createTextVNode("清除链接",-1)])]),_:1}),e.createVNode(ve,{divided:"",class:"ctx-submenu-item"},{default:e.withCtx(()=>[e.createVNode(Vn,{trigger:"hover",placement:"right-start",onCommand:Ct=>Qn(Ct,P)},{dropdown:e.withCtx(()=>[e.createVNode(zn,null,{default:e.withCtx(()=>[e.createVNode(ve,{command:"forward"},{default:e.withCtx(()=>[...l[185]||(l[185]=[e.createTextVNode("上一层",-1)])]),_:1}),e.createVNode(ve,{command:"backward"},{default:e.withCtx(()=>[...l[186]||(l[186]=[e.createTextVNode("下一层",-1)])]),_:1}),e.createVNode(ve,{command:"front",divided:""},{default:e.withCtx(()=>[...l[187]||(l[187]=[e.createTextVNode("最顶层",-1)])]),_:1}),e.createVNode(ve,{command:"back"},{default:e.withCtx(()=>[...l[188]||(l[188]=[e.createTextVNode("最底层",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[l[189]||(l[189]=e.createElementVNode("span",{class:"ctx-submenu-trigger"},"层级 ›",-1))]),_:1},8,["onCommand"])]),_:2},1024)]),_:2},1024)]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["hit",{sel:oo(P.id)}]),onPointerdown:e.withModifiers(Ct=>Fe(Ct,P),["prevent","stop"])},[e.createElementVNode("div",{class:"hit-inner",style:e.normalizeStyle(Wl(P))},e.toDisplayString(lr(P)),5),e.withDirectives(e.createElementVNode("div",{class:"resize-handle-br",title:"拖拽缩放区域",onPointerdown:e.withModifiers(Ct=>Jn(Ct,P),["stop"])},null,40,L2),[[e.vShow,te.value.length===1&&te.value[0]===P.id]])],42,R2)]),_:2},1032,["onCommand"])],4)):P.type==="shape"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(Ul(P)),class:"layer-drop"},[e.createVNode(Vn,{trigger:"contextmenu",onCommand:Ct=>Kl(Ct,P)},{dropdown:e.withCtx(()=>[e.createVNode(zn,null,{default:e.withCtx(()=>[e.createVNode(ve,{command:"copy"},{default:e.withCtx(()=>[...l[190]||(l[190]=[e.createTextVNode("复制元素",-1)])]),_:1}),e.createVNode(ve,{command:"paste",disabled:!kt.value},{default:e.withCtx(()=>[...l[191]||(l[191]=[e.createTextVNode("粘贴元素",-1)])]),_:1},8,["disabled"]),e.createVNode(ve,{command:"delete"},{default:e.withCtx(()=>[...l[192]||(l[192]=[e.createTextVNode("删除元素",-1)])]),_:1}),e.createVNode(ve,{command:"set-link"},{default:e.withCtx(()=>[...l[193]||(l[193]=[e.createTextVNode("设置链接",-1)])]),_:1}),e.createVNode(ve,{command:"clear-link"},{default:e.withCtx(()=>[...l[194]||(l[194]=[e.createTextVNode("清除链接",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["hit shape-hit",{sel:oo(P.id)}]),onPointerdown:e.withModifiers(Ct=>Fe(Ct,P),["prevent","stop"])},[(e.openBlock(),e.createElementBlock("svg",{class:"shape-inner",style:e.normalizeStyle(ir(P)),viewBox:"0 0 100 100",preserveAspectRatio:"none"},[P.shape==="line"?(e.openBlock(),e.createElementBlock("line",{key:0,x1:"4",y1:"50",x2:"96",y2:"50",stroke:_o(P),"stroke-width":Math.max(Gn(P),1),"stroke-linecap":"round"},null,8,O2)):P.shape==="rect"?(e.openBlock(),e.createElementBlock("rect",{key:1,x:"4",y:"4",width:"92",height:"92",fill:Lo(P),stroke:_o(P),"stroke-width":Gn(P)},null,8,j2)):P.shape==="circle"?(e.openBlock(),e.createElementBlock("ellipse",{key:2,cx:"50",cy:"50",rx:"46",ry:"46",fill:Lo(P),stroke:_o(P),"stroke-width":Gn(P)},null,8,F2)):P.shape==="triangle"?(e.openBlock(),e.createElementBlock("polygon",{key:3,points:"50,4 96,96 4,96",fill:Lo(P),stroke:_o(P),"stroke-width":Gn(P),"stroke-linejoin":"round"},null,8,A2)):P.shape==="trapezoid"?(e.openBlock(),e.createElementBlock("polygon",{key:4,points:sr(),fill:Lo(P),stroke:_o(P),"stroke-width":Gn(P),"stroke-linejoin":"round"},null,8,Q2)):(e.openBlock(),e.createElementBlock("polygon",{key:5,points:cr(P),fill:Lo(P),stroke:_o(P),"stroke-width":Gn(P),"stroke-linejoin":"round"},null,8,U2))],4)),e.withDirectives(e.createElementVNode("div",{class:"resize-handle-br",title:"拖拽缩放",onPointerdown:e.withModifiers(Ct=>Jn(Ct,P),["stop"])},null,40,W2),[[e.vShow,te.value.length===1&&te.value[0]===P.id]])],42,P2)]),_:2},1032,["onCommand"])],4)):(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(Ul(P)),class:"layer-drop"},[e.createVNode(Vn,{trigger:"contextmenu",onCommand:Ct=>Kl(Ct,P)},{dropdown:e.withCtx(()=>[e.createVNode(zn,null,{default:e.withCtx(()=>[e.createVNode(ve,{command:"copy"},{default:e.withCtx(()=>[...l[195]||(l[195]=[e.createTextVNode("复制元素",-1)])]),_:1}),e.createVNode(ve,{command:"paste",disabled:!kt.value},{default:e.withCtx(()=>[...l[196]||(l[196]=[e.createTextVNode("粘贴元素",-1)])]),_:1},8,["disabled"]),e.createVNode(ve,{command:"delete"},{default:e.withCtx(()=>[...l[197]||(l[197]=[e.createTextVNode("删除元素",-1)])]),_:1}),e.createVNode(ve,{command:"set-link"},{default:e.withCtx(()=>[...l[198]||(l[198]=[e.createTextVNode("设置链接",-1)])]),_:1}),e.createVNode(ve,{command:"clear-link"},{default:e.withCtx(()=>[...l[199]||(l[199]=[e.createTextVNode("清除链接",-1)])]),_:1}),e.createVNode(ve,{divided:"",class:"ctx-submenu-item"},{default:e.withCtx(()=>[e.createVNode(Vn,{trigger:"hover",placement:"right-start",onCommand:Ct=>Qn(Ct,P)},{dropdown:e.withCtx(()=>[e.createVNode(zn,null,{default:e.withCtx(()=>[e.createVNode(ve,{command:"forward"},{default:e.withCtx(()=>[...l[200]||(l[200]=[e.createTextVNode("上一层",-1)])]),_:1}),e.createVNode(ve,{command:"backward"},{default:e.withCtx(()=>[...l[201]||(l[201]=[e.createTextVNode("下一层",-1)])]),_:1}),e.createVNode(ve,{command:"front",divided:""},{default:e.withCtx(()=>[...l[202]||(l[202]=[e.createTextVNode("最顶层",-1)])]),_:1}),e.createVNode(ve,{command:"back"},{default:e.withCtx(()=>[...l[203]||(l[203]=[e.createTextVNode("最底层",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[l[204]||(l[204]=e.createElementVNode("span",{class:"ctx-submenu-trigger"},"层级 ›",-1))]),_:1},8,["onCommand"])]),_:2},1024)]),_:2},1024)]),default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["hit img-hit",{sel:oo(P.id)}]),onPointerdown:e.withModifiers(Ct=>Fe(Ct,P),["prevent","stop"])},[e.createElementVNode("img",{src:Pl(P.src),alt:"",draggable:"false"},null,8,Y2),Ra(P)?(e.openBlock(),e.createElementBlock("span",K2,e.toDisplayString(Ra(P)),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("div",{class:"resize-handle-br",title:"拖拽缩放",onPointerdown:e.withModifiers(Ct=>Jn(Ct,P),["stop"])},null,40,v2),[[e.vShow,te.value.length===1&&te.value[0]===P.id]])],42,H2)]),_:2},1032,["onCommand"])],4))],64))),128)),J.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"marquee-rect",style:e.normalizeStyle(At.value)},null,4)):e.createCommentVNode("",!0)],36)],4)],4)):e.createCommentVNode("",!0)],36)],6)],34)],512)]),_:1}),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[ut.value.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"canvas-context-menu",style:e.normalizeStyle(tl.value),onPointerdown:l[55]||(l[55]=e.withModifiers(()=>{},["stop"]))},[ut.value.target==="guide"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"canvas-context-menu__item danger",disabled:!fn.value,onClick:l[38]||(l[38]=P=>er())}," 删除参考线 ",8,X2)):ut.value.target==="region"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",onClick:l[39]||(l[39]=P=>xn("copy_region"))}," 复制分块 "),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",onClick:l[40]||(l[40]=P=>xn("copy_region_contents"))}," 复制分块及内容 "),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!te.value.length,onClick:l[41]||(l[41]=P=>xn("copy_region_selection"))}," 复制分块+选中元素 ",8,G2),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!bn.value,onClick:l[42]||(l[42]=P=>xn("paste_region"))}," 粘贴分块 ",8,J2),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!kt.value,onClick:l[43]||(l[43]=P=>xn("paste_elements"))}," 粘贴元素 ",8,Z2),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!kt.value,onClick:l[44]||(l[44]=P=>xn("paste_elements_flip_x"))}," 粘贴并左右翻转 ",8,e_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!kt.value,onClick:l[45]||(l[45]=P=>xn("paste_elements_flip_y"))}," 粘贴并上下翻转 ",8,t_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!Ht.value,onClick:l[46]||(l[46]=P=>xn("flip_contents_x"))}," 当前分块内容左右翻转 ",8,n_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!Ht.value,onClick:l[47]||(l[47]=P=>xn("flip_contents_y"))}," 当前分块内容上下翻转 ",8,o_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item danger",disabled:!Ht.value,onClick:l[48]||(l[48]=P=>xn("delete_region"))}," 删除当前分块 ",8,l_)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",onClick:l[49]||(l[49]=P=>jn("zoom_in"))}," 放大 "),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",onClick:l[50]||(l[50]=P=>jn("zoom_out"))}," 缩小 "),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",onClick:l[51]||(l[51]=P=>jn("fit"))}," 适配 "),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!te.value.length,onClick:l[52]||(l[52]=P=>jn("delete"))}," 删除选中元素 ",8,a_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!kt.value,onClick:l[53]||(l[53]=P=>jn("paste"))}," 粘贴元素 ",8,i_),e.createElementVNode("button",{type:"button",class:"canvas-context-menu__item",disabled:!bn.value,onClick:l[54]||(l[54]=P=>jn("paste_region"))}," 粘贴分块 ",8,r_)],64))],36)):e.createCommentVNode("",!0)])),e.createElementVNode("div",{class:"layout-splitter",title:"拖拽调整右侧宽度",onPointerdown:l[56]||(l[56]=P=>wt("right",P))},null,32),e.createVNode(gn,{class:"side",shadow:"never"},{header:e.withCtx(()=>[...l[205]||(l[205]=[e.createTextVNode("属性",-1)])]),default:e.withCtx(()=>[e.createElementVNode("div",c_,[e.createElementVNode("div",s_,[Rt.value?(e.openBlock(),e.createElementBlock("div",d_,[e.createVNode(jo,{"label-width":"88px",size:"small"},{default:e.withCtx(()=>[e.createVNode(Vt,{label:"文字内容"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(Y,{key:te.value.length===1?te.value[0]:"multi",modelValue:yn.value,"onUpdate:modelValue":l[57]||(l[57]=P=>yn.value=P),type:"textarea",rows:8,placeholder:"可直接编辑;占位符用双花括号,如 student_name 写成模板里的字段名"},null,8,["modelValue"]))]),_:1}),e.createVNode(Vt,null,{label:e.withCtx(()=>[e.createElementVNode("span",m_,[e.createVNode(y,{icon:"expand-left-right-line"}),l[206]||(l[206]=e.createTextVNode("字号(pt)",-1))])]),default:e.withCtx(()=>[e.createVNode(A,{modelValue:Rt.value.fontSize,"onUpdate:modelValue":l[58]||(l[58]=P=>Rt.value.fontSize=P),min:6,max:72,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,null,{label:e.withCtx(()=>[e.createElementVNode("span",u_,[e.createVNode(y,{icon:"brush-line"}),l[207]||(l[207]=e.createTextVNode("颜色",-1))])]),default:e.withCtx(()=>[e.createVNode(Ae,{modelValue:Rt.value.color,"onUpdate:modelValue":l[59]||(l[59]=P=>Rt.value.color=P),"show-alpha":""},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"区域 mm"},{default:e.withCtx(()=>[e.createElementVNode("div",f_,[l[208]||(l[208]=e.createElementVNode("span",{class:"pair-label"},"宽",-1)),e.createVNode(A,{modelValue:Rt.value.wMm,"onUpdate:modelValue":l[60]||(l[60]=P=>Rt.value.wMm=P),min:5,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"]),l[209]||(l[209]=e.createElementVNode("span",{class:"pair-label"},"高",-1)),e.createVNode(A,{modelValue:Rt.value.hMm,"onUpdate:modelValue":l[61]||(l[61]=P=>Rt.value.hMm=P),min:4,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"])])]),_:1}),e.createVNode(Vt,{label:"对齐"},{default:e.withCtx(()=>[e.createVNode(Wt,{modelValue:Rt.value.align,"onUpdate:modelValue":l[62]||(l[62]=P=>Rt.value.align=P),placeholder:"对齐",style:{width:"100%"},options:nl},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"文字方向"},{default:e.withCtx(()=>[e.createVNode(it,{modelValue:mt.value,"onUpdate:modelValue":l[63]||(l[63]=P=>mt.value=P)},{default:e.withCtx(()=>[e.createVNode(nt,{label:"horizontal"},{default:e.withCtx(()=>[...l[210]||(l[210]=[e.createTextVNode("横向",-1)])]),_:1}),e.createVNode(nt,{label:"vertical"},{default:e.withCtx(()=>[...l[211]||(l[211]=[e.createTextVNode("纵向",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"旋转 (°)"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:Ue.value,"onUpdate:modelValue":l[64]||(l[64]=P=>Ue.value=P),min:-180,max:180,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"翻转"},{default:e.withCtx(()=>[e.createElementVNode("div",p_,[e.createVNode(ue,{modelValue:et.value,"onUpdate:modelValue":l[65]||(l[65]=P=>et.value=P),"inline-prompt":"","active-text":"左右","inactive-text":"左右"},null,8,["modelValue"]),e.createVNode(ue,{modelValue:qt.value,"onUpdate:modelValue":l[66]||(l[66]=P=>qt.value=P),"inline-prompt":"","active-text":"上下","inactive-text":"上下"},null,8,["modelValue"])])]),_:1})]),_:1})])):mn.value?(e.openBlock(),e.createElementBlock("div",h_,[e.createVNode(jo,{"label-width":"88px",size:"small"},{default:e.withCtx(()=>[e.createVNode(Vt,{label:"尺寸 mm"},{default:e.withCtx(()=>[e.createElementVNode("div",g_,[l[212]||(l[212]=e.createElementVNode("span",{class:"pair-label"},"宽",-1)),e.createVNode(A,{modelValue:mn.value.wMm,"onUpdate:modelValue":l[67]||(l[67]=P=>mn.value.wMm=P),min:5,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"]),l[213]||(l[213]=e.createElementVNode("span",{class:"pair-label"},"高",-1)),e.createVNode(A,{modelValue:mn.value.hMm,"onUpdate:modelValue":l[68]||(l[68]=P=>mn.value.hMm=P),min:5,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"])])]),_:1}),e.createVNode(Vt,{label:"旋转 (°)"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:je.value,"onUpdate:modelValue":l[69]||(l[69]=P=>je.value=P),min:-180,max:180,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"翻转"},{default:e.withCtx(()=>[e.createElementVNode("div",__,[e.createVNode(ue,{modelValue:et.value,"onUpdate:modelValue":l[70]||(l[70]=P=>et.value=P),"inline-prompt":"","active-text":"左右","inactive-text":"左右"},null,8,["modelValue"]),e.createVNode(ue,{modelValue:qt.value,"onUpdate:modelValue":l[71]||(l[71]=P=>qt.value=P),"inline-prompt":"","active-text":"上下","inactive-text":"上下"},null,8,["modelValue"])])]),_:1}),e.createVNode(Vt,null,{default:e.withCtx(()=>[...l[214]||(l[214]=[e.createElementVNode("span",{class:"muted-text"},"画布上拖右下角蓝点可拉伸;文字和图片都支持角度旋转、左右翻转、上下翻转。",-1)])]),_:1})]),_:1})])):$t.value?(e.openBlock(),e.createElementBlock("div",b_,[e.createVNode(jo,{"label-width":"88px",size:"small"},{default:e.withCtx(()=>[e.createVNode(Vt,{label:"图形"},{default:e.withCtx(()=>[e.createVNode(Wt,{modelValue:$t.value.shape,"onUpdate:modelValue":l[72]||(l[72]=P=>$t.value.shape=P),style:{width:"100%"},options:h},null,8,["modelValue"])]),_:1}),$t.value.shape==="polygon"?(e.openBlock(),e.createBlock(Vt,{key:0,label:"边数"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:$t.value.polygonSides,"onUpdate:modelValue":l[73]||(l[73]=P=>$t.value.polygonSides=P),min:3,max:12,step:1,"controls-position":"right",style:{width:"100%"}},null,8,["modelValue"])]),_:1})):e.createCommentVNode("",!0),e.createVNode(Vt,{label:"背景色"},{default:e.withCtx(()=>[e.createVNode(Ae,{modelValue:$t.value.background,"onUpdate:modelValue":l[74]||(l[74]=P=>$t.value.background=P),"show-alpha":""},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"显示边框"},{default:e.withCtx(()=>[e.createVNode(ue,{modelValue:R.value,"onUpdate:modelValue":l[75]||(l[75]=P=>R.value=P)},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"边框色"},{default:e.withCtx(()=>[e.createVNode(Ae,{modelValue:$t.value.strokeColor,"onUpdate:modelValue":l[76]||(l[76]=P=>$t.value.strokeColor=P),"show-alpha":"",disabled:!R.value},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(Vt,{label:"边框 mm"},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:$t.value.strokeWidthMm,"onUpdate:modelValue":l[77]||(l[77]=P=>$t.value.strokeWidthMm=P),min:0,max:20,step:.2,"controls-position":"right",style:{width:"100%"},disabled:!R.value},null,8,["modelValue","disabled"])]),_:1}),e.createVNode(Vt,{label:"透明度"},{default:e.withCtx(()=>[e.createVNode(j4,{modelValue:ne.value,"onUpdate:modelValue":l[78]||(l[78]=P=>ne.value=P),min:0,max:100},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"锁定比例"},{default:e.withCtx(()=>[e.createVNode(ue,{modelValue:Te.value,"onUpdate:modelValue":l[79]||(l[79]=P=>Te.value=P)},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"尺寸 mm"},{default:e.withCtx(()=>[e.createElementVNode("div",y_,[l[215]||(l[215]=e.createElementVNode("span",{class:"pair-label"},"宽",-1)),e.createVNode(A,{modelValue:$t.value.wMm,"onUpdate:modelValue":l[80]||(l[80]=P=>$t.value.wMm=P),min:1,max:500,step:.5,"controls-position":"right",onChange:rr},null,8,["modelValue"]),l[216]||(l[216]=e.createElementVNode("span",{class:"pair-label"},"高",-1)),e.createVNode(A,{modelValue:$t.value.hMm,"onUpdate:modelValue":l[81]||(l[81]=P=>$t.value.hMm=P),min:1,max:500,step:.5,"controls-position":"right",onChange:Aa},null,8,["modelValue"])])]),_:1}),e.createVNode(Vt,null,{default:e.withCtx(()=>[...l[217]||(l[217]=[e.createElementVNode("span",{class:"muted-text"},"开启后,拖拽右下角或手动修改宽高都会按当前比例同步缩放。",-1)])]),_:1})]),_:1})])):Re.value?(e.openBlock(),e.createElementBlock("div",k_,[e.createVNode(jo,{"label-width":"88px",size:"small"},{default:e.withCtx(()=>[e.createVNode(Vt,{label:"分区名称"},{default:e.withCtx(()=>[e.createVNode(Y,{modelValue:Re.value.name,"onUpdate:modelValue":l[82]||(l[82]=P=>Re.value.name=P)},null,8,["modelValue"])]),_:1}),e.createVNode(Vt,{label:"背景模式"},{default:e.withCtx(()=>[e.createVNode(it,{modelValue:Ln.value,"onUpdate:modelValue":l[83]||(l[83]=P=>Ln.value=P),size:"small"},{default:e.withCtx(()=>[e.createVNode(nt,{label:"transparent"},{default:e.withCtx(()=>[...l[218]||(l[218]=[e.createTextVNode("透明",-1)])]),_:1}),e.createVNode(nt,{label:"color"},{default:e.withCtx(()=>[...l[219]||(l[219]=[e.createTextVNode("色块",-1)])]),_:1}),e.createVNode(nt,{label:"image"},{default:e.withCtx(()=>[...l[220]||(l[220]=[e.createTextVNode("图片",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),Ln.value==="color"?(e.openBlock(),e.createBlock(Vt,{key:0,label:"背景色"},{default:e.withCtx(()=>[e.createElementVNode("div",w_,[e.createVNode(Ae,{modelValue:ge.value,"onUpdate:modelValue":l[84]||(l[84]=P=>ge.value=P),"show-alpha":""},null,8,["modelValue"]),e.createVNode(Y,{modelValue:ge.value,"onUpdate:modelValue":l[85]||(l[85]=P=>ge.value=P),size:"small",placeholder:"#ffffff / rgba(...)"},null,8,["modelValue"])])]),_:1})):Ln.value==="image"?(e.openBlock(),e.createBlock(Vt,{key:1,label:"背景图"},{default:e.withCtx(()=>[e.createElementVNode("div",x_,[e.createVNode(I,{size:"small",onClick:l[86]||(l[86]=P=>To("lib"))},{default:e.withCtx(()=>[...l[221]||(l[221]=[e.createTextVNode("选择图片",-1)])]),_:1}),e.createVNode(I,{size:"small",onClick:l[87]||(l[87]=P=>To("up"))},{default:e.withCtx(()=>[...l[222]||(l[222]=[e.createTextVNode("上传图片",-1)])]),_:1}),e.createVNode(I,{size:"small",link:"",type:"danger",disabled:!Re.value.backgroundImage,onClick:Qi},{default:e.withCtx(()=>[...l[223]||(l[223]=[e.createTextVNode(" 清除图片 ",-1)])]),_:1},8,["disabled"])])]),_:1})):e.createCommentVNode("",!0),e.createVNode(Vt,{label:"区域 mm"},{default:e.withCtx(()=>[e.createElementVNode("div",V_,[l[224]||(l[224]=e.createElementVNode("span",{class:"pair-label"},"X",-1)),e.createVNode(A,{modelValue:Re.value.xMm,"onUpdate:modelValue":l[88]||(l[88]=P=>Re.value.xMm=P),min:0,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"]),l[225]||(l[225]=e.createElementVNode("span",{class:"pair-label"},"Y",-1)),e.createVNode(A,{modelValue:Re.value.yMm,"onUpdate:modelValue":l[89]||(l[89]=P=>Re.value.yMm=P),min:0,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"]),l[226]||(l[226]=e.createElementVNode("span",{class:"pair-label"},"宽",-1)),e.createVNode(A,{modelValue:Re.value.wMm,"onUpdate:modelValue":l[90]||(l[90]=P=>Re.value.wMm=P),min:1,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"]),l[227]||(l[227]=e.createElementVNode("span",{class:"pair-label"},"高",-1)),e.createVNode(A,{modelValue:Re.value.hMm,"onUpdate:modelValue":l[91]||(l[91]=P=>Re.value.hMm=P),min:1,max:500,step:.5,"controls-position":"right"},null,8,["modelValue"])])]),_:1}),e.createVNode(Vt,null,{default:e.withCtx(()=>[e.createVNode(I,{type:"danger",plain:"",onClick:l[92]||(l[92]=P=>Jl(Re.value.id))},{default:e.withCtx(()=>[...l[228]||(l[228]=[e.createTextVNode("删除当前分区",-1)])]),_:1})]),_:1})]),_:1}),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",C_,[l[230]||(l[230]=e.createElementVNode("span",null,"当前分区操作",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[229]||(l[229]=[e.createElementVNode("div",{class:"help-popover"},"这里直接处理当前分区内容。可先在分区里选中部分元素再操作;未选中时默认作用于整个分区内容。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",N_,[e.createVNode(I,{size:"small",disabled:!Re.value,onClick:l[93]||(l[93]=P=>Fl("x"))},{default:e.withCtx(()=>[...l[231]||(l[231]=[e.createTextVNode(" 当前分区左右翻转 ",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!Re.value,onClick:l[94]||(l[94]=P=>Fl("y"))},{default:e.withCtx(()=>[...l[232]||(l[232]=[e.createTextVNode(" 当前分区上下翻转 ",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",type:"primary",plain:"",disabled:!Re.value,onClick:l[95]||(l[95]=P=>po("x"))},{default:e.withCtx(()=>[...l[233]||(l[233]=[e.createTextVNode(" 左右镜像到对侧 ",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",type:"primary",plain:"",disabled:!Re.value,onClick:l[96]||(l[96]=P=>po("y"))},{default:e.withCtx(()=>[...l[234]||(l[234]=[e.createTextVNode(" 上下镜像到对侧 ",-1)])]),_:1},8,["disabled"])])])):te.value.length>1?(e.openBlock(),e.createElementBlock("div",B_,[e.createElementVNode("p",$_," 已选中 "+e.toDisplayString(te.value.length)+" 个元素:可整体拖拽、方向键微移、Delete 删除;下方可批量改选中文字的字号与颜色。单选一个文字块后可编辑全文与对齐。 ",1),e.createElementVNode("div",E_,[e.createVNode(I,{size:"small",disabled:te.value.length<2,onClick:j},{default:e.withCtx(()=>[...l[235]||(l[235]=[e.createTextVNode("组合",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:!Rn.value,onClick:ee},{default:e.withCtx(()=>[...l[236]||(l[236]=[e.createTextVNode("打散",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:te.value.length<2,onClick:l[97]||(l[97]=P=>Ce("x"))},{default:e.withCtx(()=>[...l[237]||(l[237]=[e.createTextVNode("左右翻转",-1)])]),_:1},8,["disabled"]),e.createVNode(I,{size:"small",disabled:te.value.length<2,onClick:l[98]||(l[98]=P=>Ce("y"))},{default:e.withCtx(()=>[...l[238]||(l[238]=[e.createTextVNode("上下翻转",-1)])]),_:1},8,["disabled"])]),q4.value>0?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",S_,[l[240]||(l[240]=e.createElementVNode("span",null,"多选:文字样式",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[239]||(l[239]=[e.createElementVNode("div",{class:"help-popover"},"仅作用于选中范围内的文字块。颜色不一致时以当前色块为参考,确认后会统一覆盖。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createVNode(jo,{"label-width":"88px",size:"small",class:"multi-text-form"},{default:e.withCtx(()=>[e.createVNode(Vt,null,{label:e.withCtx(()=>[e.createElementVNode("span",M_,[e.createVNode(y,{icon:"expand-left-right-line"}),l[241]||(l[241]=e.createTextVNode("字号(pt)",-1))])]),default:e.withCtx(()=>[e.createElementVNode("div",q_,[e.createVNode(A,{modelValue:ta.value,"onUpdate:modelValue":l[99]||(l[99]=P=>ta.value=P),min:6,max:72,"controls-position":"right",style:{width:"100%"},placeholder:"不一致",onChange:D4,onKeydown:e.withKeys(e.withModifiers(I4,["prevent","stop"]),["enter"])},null,8,["modelValue","onKeydown"])])]),_:1}),e.createVNode(Vt,null,{label:e.withCtx(()=>[e.createElementVNode("span",z_,[e.createVNode(y,{icon:"brush-line"}),l[242]||(l[242]=e.createTextVNode("颜色",-1))])]),default:e.withCtx(()=>[e.createElementVNode("div",T_,[e.createVNode(Ae,{"model-value":gl.value,"show-alpha":"",onChange:R4},null,8,["model-value"]),e.createVNode(Y,{modelValue:gl.value,"onUpdate:modelValue":l[100]||(l[100]=P=>gl.value=P),size:"small",placeholder:"#409EFF / rgba(...)",onKeydown:e.withKeys(e.withModifiers(Xs,["prevent","stop"]),["enter"]),onBlur:Xs},null,8,["modelValue","onKeydown"])])]),_:1})]),_:1})],64)):e.createCommentVNode("",!0),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",I_,[l[244]||(l[244]=e.createElementVNode("span",null,"多选:相对选区对齐",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[243]||(l[243]=[e.createElementVNode("div",{class:"help-popover"},"以当前选中元素的包围盒为基准对齐彼此。至少选中 2 个元素时生效,单选无变化。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",D_,[e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"左边缘对齐",onClick:l[101]||(l[101]=P=>bl("sel-left"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-left-line"})]),_:1}),e.createVNode(I,{title:"右边缘对齐",onClick:l[102]||(l[102]=P=>bl("sel-right"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-right-line"})]),_:1}),e.createVNode(I,{title:"顶边对齐",onClick:l[103]||(l[103]=P=>bl("sel-top"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-up-line"})]),_:1}),e.createVNode(I,{title:"底边对齐",onClick:l[104]||(l[104]=P=>bl("sel-bottom"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"arrow-down-line"})]),_:1})]),_:1})]),e.createElementVNode("div",R_,[e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"水平居中对齐",onClick:l[105]||(l[105]=P=>bl("sel-h-center"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"expand-left-right-line"})]),_:1}),e.createVNode(I,{title:"垂直居中对齐",onClick:l[106]||(l[106]=P=>bl("sel-v-center"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"drag-move-line"})]),_:1})]),_:1})]),e.createVNode(_e,{"content-position":"left"},{default:e.withCtx(()=>[e.createElementVNode("span",L_,[l[246]||(l[246]=e.createElementVNode("span",null,"多选:分布",-1)),e.createVNode(ie,{placement:"top","show-after":120},{content:e.withCtx(()=>[...l[245]||(l[245]=[e.createElementVNode("div",{class:"help-popover"},"在沿轴最前与最后元素之间均分间距,至少选中 2 个元素。",-1)])]),default:e.withCtx(()=>[e.createVNode(y,{icon:"question-line",class:"help-icon"})]),_:1})])]),_:1}),e.createElementVNode("div",P_,[e.createVNode(W,{size:"small",class:"btn-group-icons"},{default:e.withCtx(()=>[e.createVNode(I,{title:"按左右顺序均分水平间距",disabled:te.value.length<2,onClick:l[107]||(l[107]=P=>Gs("h"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"settings-3-line"})]),_:1},8,["disabled"]),e.createVNode(I,{title:"按上下顺序均分垂直间距",disabled:te.value.length<2,onClick:l[108]||(l[108]=P=>Gs("v"))},{default:e.withCtx(()=>[e.createVNode(y,{icon:"sort-desc"})]),_:1},8,["disabled"])]),_:1})])])):(e.openBlock(),e.createBlock(F4,{key:5,description:"点击画布中的元素以编辑;空白处拖拽框选;Shift+点击多选"}))]),e.createElementVNode("div",O_,[e.createVNode(_e),l[247]||(l[247]=e.createElementVNode("div",{class:"subhead"},"保存后预览",-1)),e.createElementVNode("div",j_,[z.value?(e.openBlock(),e.createBlock(Ho,{key:0,doc:z.value,"merge-data":Lt.value,"screen-scale":hn.value},null,8,["doc","merge-data","screen-scale"])):e.createCommentVNode("",!0)])])])]),_:1})],6)),[[A4,H.value]]),e.createVNode(kr,{modelValue:tt.value,"onUpdate:modelValue":l[109]||(l[109]=P=>tt.value=P),title:"模板预览",width:"640px",draggable:"","align-center":"","destroy-on-close":"",class:"badge-preview-dialog"},{default:e.withCtx(()=>[e.createElementVNode("div",F_,[z.value?(e.openBlock(),e.createBlock(Ho,{key:0,doc:z.value,"merge-data":Lt.value,"screen-scale":Qt.value},null,8,["doc","merge-data","screen-scale"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue"]),e.createVNode(sa,{modelValue:ze.value,"onUpdate:modelValue":l[110]||(l[110]=P=>ze.value=P),onPick:Ka},null,8,["modelValue"]),e.createVNode(sa,{modelValue:we.value,"onUpdate:modelValue":l[111]||(l[111]=P=>we.value=P),"default-tab":Se.value,onPick:Ma},null,8,["modelValue","default-tab"]),e.createVNode(sa,{modelValue:We.value,"onUpdate:modelValue":l[112]||(l[112]=P=>We.value=P),"default-tab":Je.value,onPick:al},null,8,["modelValue","default-tab"]),e.createVNode(ri,{modelValue:Ze.value,"onUpdate:modelValue":l[113]||(l[113]=P=>Ze.value=P)},null,8,["modelValue"]),e.createVNode(kr,{modelValue:_.value,"onUpdate:modelValue":l[117]||(l[117]=P=>_.value=P),title:"设置链接",width:"440px"},{footer:e.withCtx(()=>[e.createVNode(I,{onClick:l[116]||(l[116]=P=>_.value=!1)},{default:e.withCtx(()=>[...l[250]||(l[250]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(I,{type:"primary",onClick:fr},{default:e.withCtx(()=>[...l[251]||(l[251]=[e.createTextVNode("确定",-1)])]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",A_,[e.createVNode(Y,{modelValue:B.value,"onUpdate:modelValue":l[114]||(l[114]=P=>B.value=P),placeholder:"URL,可含 {{module.key}} 或旧 {{student_name}}"},null,8,["modelValue"]),e.createVNode(it,{modelValue:$.value,"onUpdate:modelValue":l[115]||(l[115]=P=>$.value=P),size:"small"},{default:e.withCtx(()=>[e.createVNode(nt,{label:"_blank"},{default:e.withCtx(()=>[...l[248]||(l[248]=[e.createTextVNode("新窗口",-1)])]),_:1}),e.createVNode(nt,{label:"_self"},{default:e.withCtx(()=>[...l[249]||(l[249]=[e.createTextVNode("当前页",-1)])]),_:1})]),_:1},8,["modelValue"])])]),_:1},8,["modelValue"]),e.createVNode(kr,{modelValue:p.value,"onUpdate:modelValue":l[120]||(l[120]=P=>p.value=P),title:"删除粘贴图片",width:"440px"},{footer:e.withCtx(()=>[e.createVNode(I,{onClick:l[118]||(l[118]=P=>M(!1))},{default:e.withCtx(()=>[...l[252]||(l[252]=[e.createTextVNode("只删画布元素",-1)])]),_:1}),e.createVNode(I,{type:"danger",onClick:l[119]||(l[119]=P=>M(!0))},{default:e.withCtx(()=>[...l[253]||(l[253]=[e.createTextVNode("同时删除服务器图片",-1)])]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("p",null,"当前删除中包含 "+e.toDisplayString(C.value)+" 张已上传的粘贴图片,是否同时删除服务器图片?",1)]),_:1},8,["modelValue"])],2)}}}),[["__scopeId","data-v-83568afc"]]),H_=Object.freeze(Object.defineProperty({__proto__:null,default:Si},Symbol.toStringTag,{value:"Module"})),Y_=Object.freeze(Object.defineProperty({__proto__:null,default:Si},Symbol.toStringTag,{value:"Module"})),K_={class:"page-container badge-tpl-list"},v_={class:"badge-tpl-header page-header"},X_={class:"card-hdr"},G_={key:0,class:"card-sub"},J_={key:1,class:"muted"},Z_=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({__name:"BadgeTemplateListView",setup(t){const{hostRef:a,tableHeight:n,recalcTableHeight:o}=wa(200),r=Cn.useRoute(),c=Cn.useRouter(),d=Number(r.params.id),f=e.ref(!1),u=e.ref(!1),h=e.ref([]),p=e.ref(""),_=e.ref(!1),B=e.ref(""),$=e.ref(!1),b=e.ref(null);async function C(){var S,N;try{const D=await Lr(d);p.value=((S=D.data)==null?void 0:S.name)||((N=D.data)==null?void 0:N.title)||""}catch{p.value=""}}async function k(){var S;f.value=!0;try{const N=await Pr(d);h.value=((S=N.data)==null?void 0:S.list)||[]}catch{h.value=[],ke.error("加载模板列表失败")}finally{f.value=!1,e.nextTick(()=>o())}}function M(){B.value="",_.value=!0}async function V(){var N,D,T;const S=B.value.trim();if(!S){ke.warning("请填写模板名称");return}u.value=!0;try{const U=(N=(await fm(d,{name:S})).data)==null?void 0:N.id;_.value=!1,ke.success("已创建"),U?c.push(`/qiuui/badge/competition/${d}/badge-template/${U}`):await k()}catch(L){ke.error(((T=(D=L==null?void 0:L.response)==null?void 0:D.data)==null?void 0:T.message)||"创建失败")}finally{u.value=!1}}function E(S){c.push(`/qiuui/badge/competition/${d}/badge-template/${S}`)}async function x(S){var N,D;try{await _m(d,S),ke.success("已设为默认套打模板"),await k()}catch(T){ke.error(((D=(N=T==null?void 0:T.response)==null?void 0:N.data)==null?void 0:D.message)||"操作失败")}}function m(S){b.value=S,$.value=!0}async function w(){var N,D;const S=b.value;if(S){$.value=!1;try{await gm(d,S.id),ke.success("已删除"),await k()}catch(T){ke.error(((D=(N=T==null?void 0:T.response)==null?void 0:N.data)==null?void 0:D.message)||"删除失败")}}}return e.onMounted(async()=>{if(!Number.isFinite(d)||d<=0){ke.error("无效的比赛 ID");return}await C(),await k(),e.nextTick(()=>o())}),e.onActivated(()=>e.nextTick(()=>o())),(S,N)=>{const D=_t,T=nn,L=_a,U=$o,oe=Ml,H=No,Ve=Wn,Z=Ko,z=Yo,fe=Nn,he=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",K_,[e.createElementVNode("div",v_,[e.createVNode(T,{link:"",onClick:N[0]||(N[0]=se=>S.$router.back())},{default:e.withCtx(()=>[e.createVNode(D,{icon:"arrow-left-line"}),N[7]||(N[7]=e.createTextVNode(" 证件模板 ",-1))]),_:1})]),e.withDirectives((e.openBlock(),e.createBlock(H,{class:"main-card table-card table-fill-card",shadow:"never"},{header:e.withCtx(()=>[e.createElementVNode("div",X_,[e.createElementVNode("div",null,[N[8]||(N[8]=e.createElementVNode("div",{class:"card-title"},"模板列表",-1)),p.value?(e.openBlock(),e.createElementBlock("div",G_,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)]),e.createVNode(T,{type:"primary",onClick:M},{default:e.withCtx(()=>[...N[9]||(N[9]=[e.createTextVNode("新建模板",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"hostRef",ref:a,class:"table-host"},[e.createVNode(oe,{data:h.value,border:"",stripe:"",height:e.unref(n)},{default:e.withCtx(()=>[e.createVNode(L,{prop:"name",label:"名称","min-width":"160","show-overflow-tooltip":""}),e.createVNode(L,{label:"默认套打",width:"100",align:"center"},{default:e.withCtx(({row:se})=>[se.is_default?(e.openBlock(),e.createBlock(U,{key:0,type:"success",size:"small"},{default:e.withCtx(()=>[...N[10]||(N[10]=[e.createTextVNode("默认",-1)])]),_:1})):(e.openBlock(),e.createElementBlock("span",J_,"—"))]),_:1}),e.createVNode(L,{prop:"width_mm",label:"宽 mm",width:"90"}),e.createVNode(L,{prop:"height_mm",label:"高 mm",width:"90"}),e.createVNode(L,{prop:"update_time",label:"更新时间",width:"180"}),e.createVNode(L,{label:"操作",width:"280",fixed:"right"},{default:e.withCtx(({row:se})=>[e.createVNode(T,{link:"",type:"primary",onClick:te=>E(se.id)},{default:e.withCtx(()=>[...N[11]||(N[11]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"]),se.is_default?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:0,link:"",type:"primary",onClick:te=>x(se.id)},{default:e.withCtx(()=>[...N[12]||(N[12]=[e.createTextVNode("设为默认",-1)])]),_:1},8,["onClick"])),e.createVNode(T,{link:"",type:"danger",onClick:te=>m(se)},{default:e.withCtx(()=>[...N[13]||(N[13]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","height"])],512)]),_:1})),[[he,f.value]]),e.createVNode(fe,{modelValue:_.value,"onUpdate:modelValue":N[3]||(N[3]=se=>_.value=se),title:"新建证件模板",width:"440px","destroy-on-close":"",onClosed:N[4]||(N[4]=se=>B.value="")},{footer:e.withCtx(()=>[e.createVNode(T,{onClick:N[2]||(N[2]=se=>_.value=!1)},{default:e.withCtx(()=>[...N[14]||(N[14]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(T,{type:"primary",loading:u.value,onClick:V},{default:e.withCtx(()=>[...N[15]||(N[15]=[e.createTextVNode("保存并制作",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(z,{"label-width":"88px"},{default:e.withCtx(()=>[e.createVNode(Z,{label:"模板名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ve,{modelValue:B.value,"onUpdate:modelValue":N[1]||(N[1]=se=>B.value=se),placeholder:"保存后将进入空白画布开始编排",maxlength:"120","show-word-limit":"",onKeyup:e.withKeys(V,["enter"])},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createVNode(fe,{modelValue:$.value,"onUpdate:modelValue":N[6]||(N[6]=se=>$.value=se),title:"删除确认",width:"400px"},{footer:e.withCtx(()=>[e.createVNode(T,{onClick:N[5]||(N[5]=se=>$.value=!1)},{default:e.withCtx(()=>[...N[16]||(N[16]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(T,{type:"danger",onClick:w},{default:e.withCtx(()=>[...N[17]||(N[17]=[e.createTextVNode("删除",-1)])]),_:1})]),default:e.withCtx(()=>{var se;return[e.createElementVNode("p",null,"确定删除模板「"+e.toDisplayString(((se=b.value)==null?void 0:se.name)||"未命名")+"」吗?",1)]}),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-bd25dea5"]])},Symbol.toStringTag,{value:"Module"})),eb={class:"page-container desk-tpl-list"},tb={class:"desk-tpl-header page-header"},nb={class:"card-hdr"},ob={key:0,class:"card-sub"},lb={key:1,class:"muted"},ab=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({__name:"DeskLabelTemplateListView",setup(t){const{hostRef:a,tableHeight:n,recalcTableHeight:o}=wa(200),r=Cn.useRoute(),c=Cn.useRouter(),d=Number(r.params.id),f=e.ref(!1),u=e.ref(!1),h=e.ref([]),p=e.ref(""),_=e.ref(!1),B=e.ref(""),$=e.ref(!1),b=e.ref(null);async function C(){var S,N;try{const D=await Lr(d);p.value=((S=D.data)==null?void 0:S.name)||((N=D.data)==null?void 0:N.title)||""}catch{p.value=""}}async function k(){var S;f.value=!0;try{const N=await Or(d);h.value=((S=N.data)==null?void 0:S.list)||[]}catch{h.value=[],ke.error("加载模板列表失败")}finally{f.value=!1,e.nextTick(()=>o())}}function M(){B.value="",_.value=!0}async function V(){var N,D,T,L,U;const S=B.value.trim();if(!S){ke.warning("请填写模板名称");return}u.value=!0;try{const H=(N=(await bm(d,{name:S})).data)==null?void 0:N.id;_.value=!1,ke.success("已创建"),H?c.push(`/qiuui/badge/competition/${d}/desk-label-template/${H}`):await k()}catch(oe){ke.error(((T=(D=oe==null?void 0:oe.response)==null?void 0:D.data)==null?void 0:T.msg)||((U=(L=oe==null?void 0:oe.response)==null?void 0:L.data)==null?void 0:U.message)||"创建失败")}finally{u.value=!1}}function E(S){c.push(`/qiuui/badge/competition/${d}/desk-label-template/${S}`)}async function x(S){var N,D,T,L;try{await wm(d,S),ke.success("已设为默认模板"),await k()}catch(U){ke.error(((D=(N=U==null?void 0:U.response)==null?void 0:N.data)==null?void 0:D.msg)||((L=(T=U==null?void 0:U.response)==null?void 0:T.data)==null?void 0:L.message)||"操作失败")}}function m(S){b.value=S,$.value=!0}async function w(){var N,D,T,L;const S=b.value;if(S){$.value=!1;try{await km(d,S.id),ke.success("已删除"),await k()}catch(U){ke.error(((D=(N=U==null?void 0:U.response)==null?void 0:N.data)==null?void 0:D.msg)||((L=(T=U==null?void 0:U.response)==null?void 0:T.data)==null?void 0:L.message)||"删除失败")}}}return e.onMounted(async()=>{if(!Number.isFinite(d)||d<=0){ke.error("无效的比赛 ID");return}await C(),await k(),e.nextTick(()=>o())}),e.onActivated(()=>e.nextTick(()=>o())),(S,N)=>{const D=_t,T=nn,L=_a,U=$o,oe=Ml,H=No,Ve=Wn,Z=Ko,z=Yo,fe=Nn,he=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",eb,[e.createElementVNode("div",tb,[e.createVNode(T,{link:"",onClick:N[0]||(N[0]=se=>S.$router.back())},{default:e.withCtx(()=>[e.createVNode(D,{icon:"arrow-left-line"}),N[7]||(N[7]=e.createTextVNode(" 桌面贴模板 ",-1))]),_:1})]),e.withDirectives((e.openBlock(),e.createBlock(H,{class:"main-card table-card table-fill-card",shadow:"never"},{header:e.withCtx(()=>[e.createElementVNode("div",nb,[e.createElementVNode("div",null,[N[8]||(N[8]=e.createElementVNode("div",{class:"card-title"},"模板列表",-1)),p.value?(e.openBlock(),e.createElementBlock("div",ob,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0)]),e.createVNode(T,{type:"primary",onClick:M},{default:e.withCtx(()=>[...N[9]||(N[9]=[e.createTextVNode("新建模板",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"hostRef",ref:a,class:"table-host"},[e.createVNode(oe,{data:h.value,border:"",stripe:"",height:e.unref(n)},{default:e.withCtx(()=>[e.createVNode(L,{prop:"name",label:"名称","min-width":"160","show-overflow-tooltip":""}),e.createVNode(L,{label:"默认",width:"100",align:"center"},{default:e.withCtx(({row:se})=>[se.is_default?(e.openBlock(),e.createBlock(U,{key:0,type:"success",size:"small"},{default:e.withCtx(()=>[...N[10]||(N[10]=[e.createTextVNode("默认",-1)])]),_:1})):(e.openBlock(),e.createElementBlock("span",lb,"—"))]),_:1}),e.createVNode(L,{prop:"width_mm",label:"宽 mm",width:"90"}),e.createVNode(L,{prop:"height_mm",label:"高 mm",width:"90"}),e.createVNode(L,{prop:"update_time",label:"更新时间",width:"180"}),e.createVNode(L,{label:"操作",width:"280",fixed:"right"},{default:e.withCtx(({row:se})=>[e.createVNode(T,{link:"",type:"primary",onClick:te=>E(se.id)},{default:e.withCtx(()=>[...N[11]||(N[11]=[e.createTextVNode("编辑",-1)])]),_:1},8,["onClick"]),se.is_default?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(T,{key:0,link:"",type:"primary",onClick:te=>x(se.id)},{default:e.withCtx(()=>[...N[12]||(N[12]=[e.createTextVNode("设为默认",-1)])]),_:1},8,["onClick"])),e.createVNode(T,{link:"",type:"danger",onClick:te=>m(se)},{default:e.withCtx(()=>[...N[13]||(N[13]=[e.createTextVNode("删除",-1)])]),_:1},8,["onClick"])]),_:1})]),_:1},8,["data","height"])],512)]),_:1})),[[he,f.value]]),e.createVNode(fe,{modelValue:_.value,"onUpdate:modelValue":N[3]||(N[3]=se=>_.value=se),title:"新建桌面贴模板",width:"440px","destroy-on-close":"",onClosed:N[4]||(N[4]=se=>B.value="")},{footer:e.withCtx(()=>[e.createVNode(T,{onClick:N[2]||(N[2]=se=>_.value=!1)},{default:e.withCtx(()=>[...N[14]||(N[14]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(T,{type:"primary",loading:u.value,onClick:V},{default:e.withCtx(()=>[...N[15]||(N[15]=[e.createTextVNode("保存并制作",-1)])]),_:1},8,["loading"])]),default:e.withCtx(()=>[e.createVNode(z,{"label-width":"88px"},{default:e.withCtx(()=>[e.createVNode(Z,{label:"模板名称",required:""},{default:e.withCtx(()=>[e.createVNode(Ve,{modelValue:B.value,"onUpdate:modelValue":N[1]||(N[1]=se=>B.value=se),placeholder:"保存后将进入空白画布开始编排",maxlength:"120","show-word-limit":"",onKeyup:e.withKeys(V,["enter"])},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createVNode(fe,{modelValue:$.value,"onUpdate:modelValue":N[6]||(N[6]=se=>$.value=se),title:"删除确认",width:"400px"},{footer:e.withCtx(()=>[e.createVNode(T,{onClick:N[5]||(N[5]=se=>$.value=!1)},{default:e.withCtx(()=>[...N[16]||(N[16]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(T,{type:"danger",onClick:w},{default:e.withCtx(()=>[...N[17]||(N[17]=[e.createTextVNode("删除",-1)])]),_:1})]),default:e.withCtx(()=>{var se;return[e.createElementVNode("p",null,"确定删除模板「"+e.toDisplayString(((se=b.value)==null?void 0:se.name)||"未命名")+"」吗?",1)]}),_:1},8,["modelValue"])])}}}),[["__scopeId","data-v-3c689948"]])},Symbol.toStringTag,{value:"Module"})),ib={class:"page-container desk-label-page"},rb={class:"label-grid"},cb={class:"label-seat"},sb={class:"label-name"},db={class:"label-school"},mb={class:"toolbar-pdf"},ub={class:"paper-config"},fb={class:"paper-config-block"},pb={class:"paper-config-block"},hb={key:0,class:"paper-config-desc"},gb={class:"paper-config-block"},_b={class:"paper-inline-row"},bb={class:"paper-config-desc"},yb={class:"pdf-dialog-body"},kb={class:"simple-seat"},wb={class:"simple-name"},xb={class:"simple-school"},Vb={class:"simple-no"},Mi=0,to=2,Cb=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({__name:"DeskLabelView",setup(t){const a=Cn.useRouter(),n=e.ref(0),o=e.ref([]),r=e.ref({}),c=e.ref(""),d=e.ref(!1),f=e.ref([]),u=e.computed(()=>o.value.map(Q=>({label:Q.name,value:Q.id}))),h=e.computed(()=>f.value.map(Q=>({label:Q.is_default?`${Q.name}(默认)`:Q.name,value:Q.id}))),p=e.ref(),_=e.ref(null),B=e.ref(!1),$=e.ref("a4"),b=e.ref("portrait"),C=e.ref(2),k=e.ref(2),M=e.ref(!1),V=e.ref(!1),E=e.ref(!1),x=e.ref(null),m=e.ref(null),w=e.ref([]),S=e.computed(()=>{var ye,Pe;const Q=_.value,F=Number(((ye=Q==null?void 0:Q.canvas)==null?void 0:ye.widthMm)||90),Be=Number(((Pe=Q==null?void 0:Q.canvas)==null?void 0:Pe.heightMm)||50),qe=F*96/25.4,K=Be*96/25.4;return Math.min(1,180/qe,120/K)});async function N(){var Q,F;if(!n.value){f.value=[],p.value=void 0,_.value=null;return}d.value=!0;try{const qe=((Q=(await Or(n.value)).data)==null?void 0:Q.list)||[];f.value=qe;const K=Number(p.value||0),X=K>0?qe.find(ye=>Number(ye.id)===K):null,le=qe.find(ye=>!!ye.is_default);p.value=X?K:le!=null&&le.id?Number(le.id):(F=qe[0])!=null&&F.id?Number(qe[0].id):void 0,await D()}catch{f.value=[],p.value=void 0,_.value=null,ke.error("加载桌面贴模板失败")}finally{d.value=!1}}async function D(){var Q;if(!n.value){_.value=null;return}try{const Be=(Q=(p.value?await ra(n.value,Number(p.value)):await jr(n.value)).data)==null?void 0:Q.template_json;if(Be&&typeof Be=="object"&&Array.isArray(Be.elements)){_.value=Be;return}}catch{}_.value=null}const T=async()=>{if(n.value)try{await D();const Q=await Bm(n.value);r.value=Q.data||{}}catch{r.value={}}},L=async()=>{r.value={},m.value=null,w.value=[];const Q=o.value.find(F=>F.id===n.value);c.value=(Q==null?void 0:Q.name)||"",await N()},U=async()=>{await D()},oe=()=>{n.value&&a.push(`/qiuui/badge/competition/${n.value}/desk-label-templates`)};function H(){const Q=[],F=Object.keys(r.value).sort((Be,qe)=>String(Be).localeCompare(String(qe),"zh-CN"));for(const Be of F){const K=[...r.value[Be]||[]].sort((X,le)=>{const ye=Number(String((X==null?void 0:X.seat_no)??"").replace(/\D/g,""))||0,Pe=Number(String((le==null?void 0:le.seat_no)??"").replace(/\D/g,""))||0;return ye!==Pe?ye-Pe:String((X==null?void 0:X.student_name)??"").localeCompare(String((le==null?void 0:le.student_name)??""),"zh-CN")});for(const X of K)Q.push({...X})}return Q}const Ve={a4:{w:210,h:297},a3:{w:297,h:420}},Z=e.computed(()=>$.value==="custom"),z=e.computed(()=>{var F,Be,qe,K,X,le,ye,Pe;if(Z.value)return{w:Number(((Be=(F=m.value)==null?void 0:F.canvas)==null?void 0:Be.widthMm)??((K=(qe=_.value)==null?void 0:qe.canvas)==null?void 0:K.widthMm)??90),h:Number(((le=(X=m.value)==null?void 0:X.canvas)==null?void 0:le.heightMm)??((Pe=(ye=_.value)==null?void 0:ye.canvas)==null?void 0:Pe.heightMm)??50)};const Q=Ve[$.value==="a3"?"a3":"a4"];return b.value==="landscape"?{w:Q.h,h:Q.w}:Q}),fe=e.computed(()=>{var Q,F,Be,qe,K,X,le,ye;return{w:Number(((F=(Q=m.value)==null?void 0:Q.canvas)==null?void 0:F.widthMm)??((qe=(Be=_.value)==null?void 0:Be.canvas)==null?void 0:qe.widthMm)??90),h:Number(((X=(K=m.value)==null?void 0:K.canvas)==null?void 0:X.heightMm)??((ye=(le=_.value)==null?void 0:le.canvas)==null?void 0:ye.heightMm)??50)}}),he=e.computed(()=>{const Q=z.value,F=fe.value;if(Z.value)return{page:Q,requestedCols:1,maxCols:1,cols:1,rowsPerPage:1,perPage:1,usableW:Q.w,usableH:Q.h,fitsWidth:!0,fitsHeight:!0,labelW:F.w,labelH:F.h,blockW:F.w};const Be=Math.max(1,Number(k.value||1)),qe=Math.max(1,Q.w-Mi*2),K=Math.max(1,Q.h-Mi*2),X=F.w<=qe,le=F.h<=K,ye=Math.max(1,Math.floor((qe+to)/(F.w+to))),Pe=Math.min(Be,ye),Qe=Math.max(1,Math.floor((K+to)/(F.h+to))),Bt=Pe*Qe;return{page:Q,requestedCols:Be,maxCols:ye,cols:Pe,rowsPerPage:Qe,perPage:Bt,usableW:qe,usableH:K,fitsWidth:X,fitsHeight:le,labelW:F.w,labelH:F.h,blockW:Pe*F.w+Math.max(0,Pe-1)*to}}),se=e.computed(()=>1),te=e.computed(()=>{const Q=he.value.perPage,F=w.value,Be=[];for(let qe=0;qe<F.length;qe+=Q)Be.push(F.slice(qe,qe+Q));return Be}),re=e.computed(()=>({width:`${he.value.page.w}mm`})),Ne=e.computed(()=>({width:`${he.value.page.w}mm`,height:`${he.value.page.h}mm`,padding:`${Mi}mm`,boxSizing:"border-box"}));function De(Q){const{cols:F,labelW:Be,labelH:qe}=he.value,K=Math.max(1,Q||1),X=Math.max(1,Math.ceil(K/F)),le=F*Be+(F-1)*to,ye=X*qe+(X-1)*to;return{display:"grid",gridTemplateColumns:`repeat(${F}, ${Be}mm)`,gridAutoRows:`${qe}mm`,gap:`${to}mm`,width:`${le}mm`,height:`${ye}mm`,boxSizing:"border-box"}}const $e=e.computed(()=>{const{labelW:Q,labelH:F}=he.value;return{width:`${Q}mm`,height:`${F}mm`,boxSizing:"border-box",overflow:"hidden"}}),Ge=()=>{if(!n.value||!Object.keys(r.value).length){ke.warning("请先加载桌面贴数据");return}$.value="a4",b.value="portrait",C.value=2,k.value=2,B.value=!0},st=async()=>{if(n.value){B.value=!1,V.value=!0,M.value=!0,m.value=null,w.value=[];try{const Q=H(),Be=(p.value?await ra(n.value,Number(p.value)):await jr(n.value)).data,qe=Be==null?void 0:Be.template_json;if(qe&&typeof qe=="object"&&Array.isArray(qe.elements)&&qe.elements.length&&(m.value=qe),w.value=Q.map(K=>wi(K,c.value)),await e.nextTick(),!he.value.fitsWidth||!he.value.fitsHeight){M.value=!1,ke.warning(`当前桌面贴尺寸 ${fe.value.w} x ${fe.value.h} mm 已超出 ${$.value.toUpperCase()}${b.value==="landscape"?"横向":"纵向"} 纸张尺寸,请调整模板尺寸或改用更大纸张`);return}if(he.value.requestedCols>he.value.maxCols){M.value=!1,ke.warning(`${$.value.toUpperCase()}${b.value==="landscape"?"横向":"纵向"} 最多每行显示 ${he.value.maxCols} 个桌面贴,请调整后重试`);return}}catch{w.value=H().map(Q=>wi(Q,c.value))}finally{V.value=!1}}},ht=async()=>{await e.nextTick()},He=async()=>{const Q=x.value;if(!(!Q||!w.value.length)){E.value=!0;try{await e.nextTick(),await new Promise(qe=>setTimeout(qe,200));const F=`桌面贴_${c.value||n.value}.pdf`,Be=Array.from(Q.querySelectorAll(".pdf-page"));await $c(Be,F,{size:$.value,orientation:b.value,widthMm:z.value.w,heightMm:z.value.h})}finally{E.value=!1}}},ct=async()=>{const Q=x.value;if(!(!Q||!w.value.length))try{await e.nextTick(),await new Promise(Be=>setTimeout(Be,200));const F=Array.from(Q.querySelectorAll(".pdf-page"));await Ec(F,`桌面贴_${c.value||n.value}`,{size:$.value,orientation:b.value,widthMm:z.value.w,heightMm:z.value.h})}catch(F){ke.error(F instanceof Error?F.message:"打印失败")}};return e.onMounted(async()=>{var Q;try{const F=await oi({page_size:200});o.value=((Q=F.data)==null?void 0:Q.data)||[]}catch{o.value=[]}}),e.watch(C,Q=>{Z.value||Q>0&&(k.value=Q)}),e.watch(k,Q=>{if(Z.value){k.value!==1&&(k.value=1),C.value!==1&&(C.value=1);return}const F=Math.max(1,Number(Q||1));if(F!==Q){k.value=F;return}C.value=[1,2,3].includes(F)?F:0}),e.watch($,Q=>{Q==="custom"&&(b.value="portrait",C.value=1,k.value=1)}),(Q,F)=>{const Be=El,qe=Ko,K=nn,X=Yo,le=No,ye=Vo,Pe=fa,Qe=$l,Bt=Nl,wt=Nn,xt=e.resolveDirective("qiu-loading");return e.openBlock(),e.createElementBlock("div",ib,[e.createVNode(le,{class:"filter-card",shadow:"never"},{default:e.withCtx(()=>[e.createVNode(X,{inline:!0},{default:e.withCtx(()=>[e.createVNode(qe,{label:"选择比赛"},{default:e.withCtx(()=>[e.createVNode(Be,{modelValue:n.value,"onUpdate:modelValue":F[0]||(F[0]=pt=>n.value=pt),placeholder:"选择比赛",style:{width:"320px"},options:u.value,onChange:L},null,8,["modelValue","options"])]),_:1}),e.createVNode(qe,{label:"桌面贴模板"},{default:e.withCtx(()=>[e.createVNode(Be,{modelValue:p.value,"onUpdate:modelValue":F[1]||(F[1]=pt=>p.value=pt),clearable:"",placeholder:"默认模板",style:{width:"260px"},disabled:!n.value||d.value,options:h.value,onChange:U},null,8,["modelValue","disabled","options"])]),_:1}),e.createVNode(qe,null,{default:e.withCtx(()=>[e.createVNode(K,{type:"primary",disabled:!n.value,onClick:T},{default:e.withCtx(()=>[...F[10]||(F[10]=[e.createTextVNode("加载桌面贴数据",-1)])]),_:1},8,["disabled"])]),_:1}),n.value?(e.openBlock(),e.createBlock(qe,{key:0},{default:e.withCtx(()=>[e.createVNode(K,{onClick:oe},{default:e.withCtx(()=>[...F[11]||(F[11]=[e.createTextVNode("桌面贴模板",-1)])]),_:1})]),_:1})):e.createCommentVNode("",!0)]),_:1})]),_:1}),Object.keys(r.value).length?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,(pt,J)=>(e.openBlock(),e.createBlock(le,{key:String(J),style:{"margin-bottom":"16px"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(J),1)]),default:e.withCtx(()=>[e.createElementVNode("div",rb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(pt,G=>{var me,pe;return e.openBlock(),e.createElementBlock("div",{class:"label-card",key:`${J}-${G.seat_no}`},[(pe=(me=_.value)==null?void 0:me.elements)!=null&&pe.length?(e.openBlock(),e.createBlock(Ho,{key:0,doc:_.value,"merge-data":e.unref(wi)(G,c.value),"screen-scale":S.value},null,8,["doc","merge-data","screen-scale"])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",cb,e.toDisplayString(G.seat_no)+"号",1),e.createElementVNode("div",sb,e.toDisplayString(G.student_name),1),e.createElementVNode("div",db,e.toDisplayString(G.school_name),1)],64))])}),128))])]),_:2},1024))),128)),e.createElementVNode("div",mb,[e.createVNode(K,{type:"primary",disabled:!n.value,onClick:Ge},{default:e.withCtx(()=>[...F[12]||(F[12]=[e.createTextVNode("生成预览与 PDF",-1)])]),_:1},8,["disabled"])])],64)):(e.openBlock(),e.createBlock(ye,{key:1,description:"请选择比赛并加载桌面贴"})),e.createVNode(wt,{modelValue:B.value,"onUpdate:modelValue":F[7]||(F[7]=pt=>B.value=pt),title:"预览排版设置",width:"520px","destroy-on-close":"","align-center":""},{footer:e.withCtx(()=>[e.createVNode(K,{onClick:F[6]||(F[6]=pt=>B.value=!1)},{default:e.withCtx(()=>[...F[25]||(F[25]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(K,{type:"primary",onClick:st},{default:e.withCtx(()=>[...F[26]||(F[26]=[e.createTextVNode("下一步:整版预览",-1)])]),_:1})]),default:e.withCtx(()=>[F[27]||(F[27]=e.createElementVNode("p",{class:"paper-tip"},"导出整版 PDF 前请选择纸张模式。可按 A4/A3 排版,也可直接按模板实际尺寸生成。预览、下载 PDF、打印都会使用这套排版设置。",-1)),e.createElementVNode("div",ub,[e.createElementVNode("div",fb,[F[16]||(F[16]=e.createElementVNode("div",{class:"paper-config-title"},"纸张尺寸",-1)),e.createVNode(Qe,{modelValue:$.value,"onUpdate:modelValue":F[2]||(F[2]=pt=>$.value=pt)},{default:e.withCtx(()=>[e.createVNode(Pe,{label:"a4"},{default:e.withCtx(()=>[...F[13]||(F[13]=[e.createTextVNode("A4",-1)])]),_:1}),e.createVNode(Pe,{label:"a3"},{default:e.withCtx(()=>[...F[14]||(F[14]=[e.createTextVNode("A3",-1)])]),_:1}),e.createVNode(Pe,{label:"custom"},{default:e.withCtx(()=>[...F[15]||(F[15]=[e.createTextVNode("按模板尺寸",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",pb,[F[19]||(F[19]=e.createElementVNode("div",{class:"paper-config-title"},"打印方向",-1)),e.createVNode(Qe,{modelValue:b.value,"onUpdate:modelValue":F[3]||(F[3]=pt=>b.value=pt),disabled:Z.value},{default:e.withCtx(()=>[e.createVNode(Pe,{label:"portrait"},{default:e.withCtx(()=>[...F[17]||(F[17]=[e.createTextVNode("纵向",-1)])]),_:1}),e.createVNode(Pe,{label:"landscape"},{default:e.withCtx(()=>[...F[18]||(F[18]=[e.createTextVNode("横向",-1)])]),_:1})]),_:1},8,["modelValue","disabled"]),Z.value?(e.openBlock(),e.createElementBlock("div",hb,"按模板尺寸生成时,页面宽高直接取模板设置,方向无需单独选择。")):e.createCommentVNode("",!0)]),e.createElementVNode("div",gb,[F[24]||(F[24]=e.createElementVNode("div",{class:"paper-config-title"},"每行显示",-1)),e.createElementVNode("div",_b,[e.createVNode(Qe,{modelValue:C.value,"onUpdate:modelValue":F[4]||(F[4]=pt=>C.value=pt),disabled:Z.value},{default:e.withCtx(()=>[e.createVNode(Pe,{label:1},{default:e.withCtx(()=>[...F[20]||(F[20]=[e.createTextVNode("1个",-1)])]),_:1}),e.createVNode(Pe,{label:2},{default:e.withCtx(()=>[...F[21]||(F[21]=[e.createTextVNode("2个",-1)])]),_:1}),e.createVNode(Pe,{label:3},{default:e.withCtx(()=>[...F[22]||(F[22]=[e.createTextVNode("3个",-1)])]),_:1}),e.createVNode(Pe,{label:0},{default:e.withCtx(()=>[...F[23]||(F[23]=[e.createTextVNode("自定义",-1)])]),_:1})]),_:1},8,["modelValue","disabled"]),e.createVNode(Bt,{modelValue:k.value,"onUpdate:modelValue":F[5]||(F[5]=pt=>k.value=pt),min:1,max:12,"controls-position":"right",style:{width:"120px"},disabled:Z.value},null,8,["modelValue","disabled"])]),e.createElementVNode("div",bb,e.toDisplayString(Z.value?"按模板尺寸生成时固定为每页 1 个桌面贴。":"只控制每行显示几个桌面贴;每页行数会按纸张高度自动计算。"),1)])])]),_:1},8,["modelValue"]),e.createVNode(wt,{modelValue:M.value,"onUpdate:modelValue":F[9]||(F[9]=pt=>M.value=pt),title:`桌面贴整版预览 — ${c.value||""}`,width:"96%",top:"2vh","destroy-on-close":"",class:"pdf-preview-dialog",onOpened:ht},{footer:e.withCtx(()=>[e.createVNode(K,{disabled:!w.value.length,onClick:ct},{default:e.withCtx(()=>[...F[28]||(F[28]=[e.createTextVNode("打印整版",-1)])]),_:1},8,["disabled"]),e.createVNode(K,{onClick:F[8]||(F[8]=pt=>M.value=!1)},{default:e.withCtx(()=>[...F[29]||(F[29]=[e.createTextVNode("关闭",-1)])]),_:1}),e.createVNode(K,{type:"primary",loading:E.value,disabled:!w.value.length,onClick:He},{default:e.withCtx(()=>[...F[30]||(F[30]=[e.createTextVNode(" 下载 PDF ",-1)])]),_:1},8,["loading","disabled"])]),default:e.withCtx(()=>{var pt,J;return[e.withDirectives((e.openBlock(),e.createElementBlock("div",yb,[e.createElementVNode("div",{ref_key:"pdfExportRoot",ref:x,class:"pdf-export-root",style:e.normalizeStyle(re.value)},[(J=(pt=m.value)==null?void 0:pt.elements)!=null&&J.length&&w.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(te.value,(G,me)=>(e.openBlock(),e.createElementBlock("div",{key:me,class:"pdf-page",style:e.normalizeStyle(Ne.value)},[e.createElementVNode("div",{class:"pdf-page-grid",style:e.normalizeStyle(De(G.length))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G,(pe,ze)=>(e.openBlock(),e.createElementBlock("div",{key:`${me}-${ze}`,class:"pdf-cell",style:e.normalizeStyle($e.value)},[e.createVNode(Ho,{doc:m.value,"merge-data":pe,"screen-scale":se.value},null,8,["doc","merge-data","screen-scale"])],4))),128))],4)],4))),128)):w.value.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(te.value,(G,me)=>(e.openBlock(),e.createElementBlock("div",{key:me,class:"pdf-page",style:e.normalizeStyle(Ne.value)},[e.createElementVNode("div",{class:"pdf-page-grid",style:e.normalizeStyle(De(G.length))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(G,(pe,ze)=>(e.openBlock(),e.createElementBlock("div",{key:`${me}-${ze}`,class:"pdf-cell simple",style:e.normalizeStyle($e.value)},[e.createElementVNode("div",kb,e.toDisplayString(pe.seat_no)+"号",1),e.createElementVNode("div",wb,e.toDisplayString(pe.student_name),1),e.createElementVNode("div",xb,e.toDisplayString(pe.school_name),1),e.createElementVNode("div",Vb,e.toDisplayString(pe.competition_no),1)],4))),128))],4)],4))),128)):e.createCommentVNode("",!0)],4)])),[[xt,V.value]])]}),_:1},8,["modelValue","title"])])}}}),[["__scopeId","data-v-9b226c22"]])},Symbol.toStringTag,{value:"Module"})),Nb=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuBadgeDot",__name:"index",props:{value:{default:""},max:{default:99},isDot:{type:Boolean,default:!1},hidden:{type:Boolean,default:!1}},setup(t){const a=t,n=e.computed(()=>{if(a.isDot)return null;const o=a.value;if(o===""||o===void 0||o===null)return null;const r=Number(o);return!Number.isNaN(r)&&r>a.max?`${a.max}+`:String(o)});return(o,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["qiu-badge-dot",{"is-dot":t.isDot}])},[e.renderSlot(o.$slots,"default",{},void 0,!0),!t.hidden&&(t.isDot||e.unref(n)!==null)?(e.openBlock(),e.createElementBlock("sup",{key:0,class:e.normalizeClass(["qiu-badge-dot__content",{"is-dot":t.isDot,"is-fixed":!!o.$slots.default}])},[t.isDot?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)),1)],64))],2)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-15657c19"]])},Symbol.toStringTag,{value:"Module"})),Qc=Symbol("QiuCarousel"),Bb={class:"qiu-carousel__container"},$b=["aria-label","onClick"],Eb={class:"qiu-carousel__items","aria-hidden":"true"},Sb=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuCarousel",__name:"index",props:{modelValue:{default:0},autoplay:{type:Boolean,default:!0},interval:{default:3e3},height:{default:""},indicatorPosition:{default:"inside"},arrow:{default:"hover"},loop:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref([]),d=e.ref(new Map),f=e.ref(!1),u=e.ref("next");let h=null;const p=e.computed(()=>c.value.length),_=e.computed({get(){return p.value?((o.modelValue??0)%p.value+p.value)%p.value:0},set(D){r("update:modelValue",D),r("change",D)}}),B=e.computed(()=>!o.height&&o.height!==0?void 0:{height:typeof o.height=="number"?`${o.height}px`:o.height}),$=e.computed(()=>u.value==="next"?"qiu-carousel-slide-next":"qiu-carousel-slide-prev"),b=e.computed(()=>{var D;return(D=c.value[_.value])==null?void 0:D.uid}),C=e.computed(()=>{const D=b.value;if(D===void 0)return null;const T=d.value.get(D);return T||null}),k=D=>{const T=c.value.findIndex(L=>L.uid===D.uid);return T>=0?c.value[T]=D:c.value.push(D),c.value.findIndex(L=>L.uid===D.uid)},M=D=>{c.value=c.value.filter(T=>T.uid!==D),d.value.delete(D)};e.provide(Qc,{activeIndex:_,itemCount:p,registerItem:k,unregisterItem:M,loop:e.toRef(o,"loop")}),e.provide("qiuCarouselRegisterRender",(D,T)=>{d.value.set(D,T)});const V=D=>{p.value&&(u.value=D>=_.value?"next":"prev",_.value=D)},E=()=>{p.value&&(u.value="next",_.value>=p.value-1?_.value=o.loop?0:p.value-1:_.value=_.value+1)},x=()=>{p.value&&(u.value="prev",_.value<=0?_.value=o.loop?p.value-1:0:_.value=_.value-1)},m=()=>{w(),!(!o.autoplay||p.value<=1)&&(h=setInterval(()=>E(),o.interval))},w=()=>{h&&(clearInterval(h),h=null)},S=()=>{f.value=!0,w()},N=()=>{f.value=!1,m()};return e.watch(()=>[o.autoplay,o.interval,p.value],()=>m(),{immediate:!0}),e.onBeforeUnmount(w),a({next:E,prev:x,goTo:V}),(D,T)=>{const L=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-carousel",[`qiu-carousel--arrow-${t.arrow}`]]),style:e.normalizeStyle(e.unref(B)),onMouseenter:S,onMouseleave:N},[e.createElementVNode("div",Bb,[e.createVNode(e.Transition,{name:e.unref($),mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:e.unref(_),class:"qiu-carousel__slide"},[e.unref(C)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(C)),{key:0})):e.createCommentVNode("",!0)]))]),_:1},8,["name"]),t.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-carousel__arrow qiu-carousel__arrow--left","aria-label":"previous",onClick:x},[e.createVNode(L,{icon:"arrow-left-s-line"})])):e.createCommentVNode("",!0),t.arrow!=="never"?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-carousel__arrow qiu-carousel__arrow--right","aria-label":"next",onClick:E},[e.createVNode(L,{icon:"arrow-right-s-line"})])):e.createCommentVNode("",!0)]),t.indicatorPosition!=="none"?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qiu-carousel__indicators",`qiu-carousel__indicators--${t.indicatorPosition}`])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(p),(U,oe)=>(e.openBlock(),e.createElementBlock("button",{key:oe,type:"button",class:e.normalizeClass(["qiu-carousel__indicator",{"is-active":oe===e.unref(_)}]),"aria-label":`slide ${oe+1}`,onClick:H=>V(oe)},null,10,$b))),128))],2)):e.createCommentVNode("",!0),e.createElementVNode("div",Eb,[e.renderSlot(D.$slots,"default",{},void 0,!0)])],38)}}}),[["__scopeId","data-v-feddc24a"]])},Symbol.toStringTag,{value:"Module"})),Mb=["data-uid"],Uc=de(e.defineComponent({name:"QiuCarouselItem",__name:"index",props:{name:{}},setup(t){var d;const a=t,n=e.useSlots(),o=e.inject(Qc,null),r=e.inject("qiuCarouselRegisterRender",()=>{}),c=((d=e.getCurrentInstance())==null?void 0:d.uid)??Math.random();return e.onMounted(()=>{o==null||o.registerItem({uid:c,name:a.name}),r(c,()=>{var f;return(f=n.default)==null?void 0:f.call(n)})}),e.onUnmounted(()=>{o==null||o.unregisterItem(c)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:"qiu-carousel-item","data-uid":e.unref(c)},[e.renderSlot(f.$slots,"default",{},void 0,!0)],8,Mb))}}),[["__scopeId","data-v-3430777a"]]),qb=Object.freeze(Object.defineProperty({__proto__:null,default:Uc},Symbol.toStringTag,{value:"Module"}));function _n(t,a){return t[a.value??"value"]}function Va(t,a){return String(t[a.label??"label"]??"")}function Tl(t,a){const n=t[a.children??"children"];return Array.isArray(n)?n:void 0}function Jo(t,a){return!!t[a.disabled??"disabled"]}const zb=["onKeydown"],Tb={key:0,class:"qiu-cascader__tags"},Ib={class:"qiu-cascader__tag-text"},Db=["onClick"],Rb={key:0,class:"qiu-cascader__tag is-collapse"},Lb={class:"qiu-cascader__suffix"},Pb={key:0,class:"qiu-cascader__filter"},Ob=["placeholder"],jb={key:1,class:"qiu-cascader__suggestions"},Fb=["onClick"],Ab={key:0,class:"qiu-cascader__empty"},Qb={key:2,class:"qiu-cascader__menus"},Ub=["onClick","onMouseenter"],Wb=["checked","disabled","onChange"],Hb={class:"qiu-cascader__label"},Yb={key:1,class:"qiu-cascader__arrow"},Kb={key:0,class:"qiu-cascader__empty-item"},vb=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuCascader",__name:"index",props:{modelValue:{default:null},options:{default:()=>[]},props:{default:()=>({})},placeholder:{default:"请选择"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},filterable:{type:Boolean,default:!1},filterPlaceholder:{default:"输入关键字搜索"},showAllLevels:{type:Boolean,default:!0},separator:{default:" / "},collapseTags:{type:Boolean,default:!1},maxCollapseTags:{default:1},size:{default:"default"}},emits:["update:modelValue","change","clear","visibleChange","expand-change"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref(""),u=e.ref([]),h=e.ref({}),p=e.computed(()=>({value:"value",label:"label",children:"children",disabled:"disabled",multiple:!1,checkStrictly:!1,emitPath:!0,expandTrigger:"click",...n.props})),_=e.computed(()=>!!p.value.multiple),B=e.computed(()=>!!p.value.checkStrictly),$=e.computed(()=>p.value.emitPath!==!1),b=e.computed(()=>p.value.expandTrigger||"click"),C=e.computed(()=>n.size||"default"),k=K=>{const X=Tl(K,p.value);return!!(X!=null&&X.length)},M=e.computed(()=>{const K=[n.options||[]];for(const X of u.value){const le=Tl(X,p.value);if(le!=null&&le.length)K.push(le);else break}return K}),V=(K,X=[])=>{const le=[];for(const ye of K){const Pe=[...X,ye],Qe=Pe.map(J=>_n(J,p.value)),Bt=Pe.map(J=>Va(J,p.value)),wt=Pe.some(J=>Jo(J,p.value)),xt=Tl(ye,p.value);(!(xt!=null&&xt.length)||B.value)&&le.push({option:ye,path:Pe,pathValues:Qe,pathLabels:Bt,pathKey:Qe.join("/"),disabled:wt}),xt!=null&&xt.length&&le.push(...V(xt,Pe))}return le},E=e.computed(()=>V(n.options||[])),x=e.computed(()=>{const K=f.value.trim().toLowerCase();return K?E.value.filter(X=>X.pathLabels.some(le=>le.toLowerCase().includes(K))):[]}),m=K=>K==null||K===""?[]:Array.isArray(K)?K.length?Array.isArray(K[0])?[]:K:[]:[K],w=K=>K==null||K===""?[]:Array.isArray(K)?K.length?Array.isArray(K[0])?K:K.map(X=>[X]):[]:[[K]],S=e.computed(()=>{if(_.value)return w(n.modelValue??null);const K=m(n.modelValue??null);return K.length?[K]:[]}),N=K=>{if(!K.length)return null;if(!$.value&&K.length===1){const ye=E.value.find(Pe=>_n(Pe.option,p.value)===K[0]);return(ye==null?void 0:ye.path)||null}let X=n.options||[];const le=[];for(const ye of K){const Pe=X.find(Qe=>_n(Qe,p.value)===ye);if(!Pe)return null;le.push(Pe),X=Tl(Pe,p.value)||[]}return le},D=K=>{const X=K.map(le=>_n(le,p.value));return $.value?X:X[X.length-1]},T=K=>{const X=K.join("/"),le=K[K.length-1];return S.value.some(ye=>$.value?ye.join("/")===X:ye[ye.length-1]===le)},L=K=>{const X=_n(K,p.value);return S.value.some(le=>$.value?le[le.length-1]===X:le.includes(X)||le[le.length-1]===X)},U=(K,X)=>{const le=u.value[K];return le?_n(le,p.value)===_n(X,p.value):!1},oe=(K,X)=>{const le=_n(K,p.value);return S.value.some(ye=>ye[X]===le||!$.value&&ye[ye.length-1]===le)},H=e.computed(()=>S.value.map(K=>{const X=N(K);if(!(X!=null&&X.length))return{value:K[K.length-1],label:String(K[K.length-1]??""),pathValues:K};const le=X.map(ye=>Va(ye,p.value));return{value:_n(X[X.length-1],p.value),label:n.showAllLevels?le.join(n.separator):le[le.length-1],pathValues:K}}).filter(Boolean)),Ve=e.computed(()=>n.collapseTags?H.value.slice(0,n.maxCollapseTags):H.value),Z=e.computed(()=>n.collapseTags?Math.max(0,H.value.length-n.maxCollapseTags):0),z=e.computed(()=>{if(_.value)return"";const K=S.value;if(!K.length)return"";const X=N(K[0]);if(!(X!=null&&X.length))return String(K[0][K[0].length-1]??"");const le=X.map(ye=>Va(ye,p.value));return n.showAllLevels?le.join(n.separator):le[le.length-1]}),fe=e.computed(()=>S.value.length>0),he=()=>{const K=S.value;if(!K.length){u.value=[];return}const X=N(K[0]);X!=null&&X.length&&(u.value=X.slice(0,-1))},se=()=>{const K=r.value;if(!K)return;const X=K.getBoundingClientRect(),le=window.innerHeight-X.bottom,ye=le<240&&X.top>le;h.value={position:"fixed",left:`${X.left}px`,top:ye?"auto":`${X.bottom+4}px`,bottom:ye?`${window.innerHeight-X.top+4}px`:"auto",minWidth:`${Math.max(X.width,180)}px`,zIndex:"4000"}},te=()=>{n.disabled||(he(),f.value="",se(),d.value=!0,o("visibleChange",!0))},re=()=>{d.value&&(d.value=!1,f.value="",o("visibleChange",!1))},Ne=()=>{n.disabled||(d.value?re():te())},De=K=>{o("update:modelValue",K),o("change",K)},$e=(K,X)=>{const le=u.value.slice(0,X);le[X]=K,u.value=le.slice(0,X+1),o("expand-change",u.value.map(ye=>_n(ye,p.value)))},Ge=K=>{if(K.length)if(_.value){const X=K.map(wt=>_n(wt,p.value)),le=X.join("/"),ye=X[X.length-1],Pe=S.value.some(wt=>$.value?wt.join("/")===le:wt[wt.length-1]===ye);let Qe=[...S.value];Pe?Qe=Qe.filter(wt=>$.value?wt.join("/")!==le:wt[wt.length-1]!==ye):Qe.push($.value?X:[ye]);const Bt=$.value?Qe:Qe.map(wt=>wt[wt.length-1]);De(Bt)}else De(D(K)),re()},st=(K,X)=>{if(Jo(K,p.value))return;const le=Tl(K,p.value);if(le!=null&&le.length){$e(K,X),B.value&&!_.value&&Ge([...u.value.slice(0,X),K]);return}const ye=[...u.value.slice(0,X),K];Ge(ye)},ht=(K,X)=>{b.value==="hover"&&(Jo(K,p.value)||k(K)&&$e(K,X))},He=(K,X)=>{if(Jo(K,p.value))return;const le=[...u.value.slice(0,X),K];!B.value&&k(K)||(Ge(le),_.value||re())},ct=K=>{Ge(K.path)},Q=K=>{const X=S.value.filter(ye=>ye[ye.length-1]!==K),le=$.value?X:X.map(ye=>ye[ye.length-1]);De(X.length?le:null)},F=()=>{De(null),o("clear"),u.value=[]},Be=K=>{var le,ye;const X=K.target;(le=r.value)!=null&&le.contains(X)||(ye=c.value)!=null&&ye.contains(X)||re()},qe=()=>{d.value&&se()};return e.onMounted(()=>{document.addEventListener("mousedown",Be),window.addEventListener("resize",qe),window.addEventListener("scroll",qe,!0)}),e.onUnmounted(()=>{document.removeEventListener("mousedown",Be),window.removeEventListener("resize",qe),window.removeEventListener("scroll",qe,!0)}),e.watch(()=>n.modelValue,()=>{d.value||he()}),(K,X)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["qiu-cascader",[`qiu-cascader--${e.unref(C)}`,{"is-disabled":t.disabled,"is-focused":e.unref(d),"is-multiple":e.unref(_)}]])},[e.createElementVNode("div",{class:"qiu-cascader__wrapper",tabindex:"0",onClick:Ne,onKeydown:[e.withKeys(e.withModifiers(Ne,["prevent"]),["enter"]),e.withKeys(e.withModifiers(Ne,["prevent"]),["space"]),e.withKeys(re,["esc"]),e.withKeys(e.withModifiers(te,["prevent"]),["down"])]},[e.unref(_)&&e.unref(H).length?(e.openBlock(),e.createElementBlock("div",Tb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(Ve),le=>(e.openBlock(),e.createElementBlock("span",{key:String(le.value),class:"qiu-cascader__tag"},[e.createElementVNode("span",Ib,e.toDisplayString(le.label),1),e.createElementVNode("button",{type:"button",class:"qiu-cascader__tag-close",tabindex:"-1",onMousedown:X[0]||(X[0]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(ye=>Q(le.value),["stop"])}," × ",40,Db)]))),128)),e.unref(Z)>0?(e.openBlock(),e.createElementBlock("span",Rb," +"+e.toDisplayString(e.unref(Z)),1)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["qiu-cascader__selected",{"is-placeholder":!e.unref(z)}])},e.toDisplayString(e.unref(z)||t.placeholder),3)),e.createElementVNode("span",Lb,[t.clearable&&e.unref(fe)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-cascader__clear",tabindex:"-1",onMousedown:X[1]||(X[1]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(F,["stop"])}," × ",32)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["qiu-cascader__caret",{"is-open":e.unref(d)}])},"▾",2)])],40,zb),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-cascader-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRef",ref:c,class:"qiu-cascader__dropdown",style:e.normalizeStyle(e.unref(h)),onMousedown:X[5]||(X[5]=e.withModifiers(()=>{},["prevent"]))},[t.filterable?(e.openBlock(),e.createElementBlock("div",Pb,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":X[2]||(X[2]=le=>e.isRef(f)?f.value=le:null),class:"qiu-cascader__filter-input",placeholder:t.filterPlaceholder,onClick:X[3]||(X[3]=e.withModifiers(()=>{},["stop"]))},null,8,Ob),[[e.vModelText,e.unref(f)]])])):e.createCommentVNode("",!0),e.unref(f).trim()?(e.openBlock(),e.createElementBlock("div",jb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(x),le=>(e.openBlock(),e.createElementBlock("div",{key:le.pathKey,class:e.normalizeClass(["qiu-cascader__suggestion",{"is-selected":T(le.pathValues),"is-disabled":le.disabled}]),onClick:ye=>!le.disabled&&ct(le)},e.toDisplayString(le.pathLabels.join(t.separator)),11,Fb))),128)),e.unref(x).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ab,"无匹配数据"))])):(e.openBlock(),e.createElementBlock("div",Qb,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(M),(le,ye)=>(e.openBlock(),e.createElementBlock("ul",{key:ye,class:"qiu-cascader__menu"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le,Pe=>(e.openBlock(),e.createElementBlock("li",{key:String(e.unref(_n)(Pe,e.unref(p))),class:e.normalizeClass(["qiu-cascader__node",{"is-active":U(ye,Pe),"is-selected":oe(Pe,ye),"is-disabled":e.unref(Jo)(Pe,e.unref(p))}]),onClick:Qe=>st(Pe,ye),onMouseenter:Qe=>ht(Pe,ye)},[e.unref(_)||e.unref(B)?(e.openBlock(),e.createElementBlock("label",{key:0,class:"qiu-cascader__check",onClick:X[4]||(X[4]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("input",{type:"checkbox",checked:L(Pe),disabled:e.unref(Jo)(Pe,e.unref(p))||!e.unref(B)&&k(Pe),onChange:Qe=>He(Pe,ye)},null,40,Wb)])):e.createCommentVNode("",!0),e.createElementVNode("span",Hb,e.toDisplayString(e.unref(Va)(Pe,e.unref(p))),1),k(Pe)?(e.openBlock(),e.createElementBlock("span",Yb,"›")):e.createCommentVNode("",!0)],42,Ub))),128)),le.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("li",Kb,"无数据"))]))),128))]))],36),[[e.vShow,e.unref(d)]])]),_:1})]))],2))}}),[["__scopeId","data-v-be79302a"]])},Symbol.toStringTag,{value:"Module"})),Wc=de(e.defineComponent({name:"QiuCode",__name:"index",props:{code:{default:""},language:{default:"text"},wrap:{type:Boolean,default:!1},theme:{default:"light"}},setup(t){const a=t,n=e.computed(()=>String(a.code??"").replace(/\n$/,""));return(o,r)=>(e.openBlock(),e.createElementBlock("pre",{class:e.normalizeClass(["qiu-code",[`qiu-code--${t.theme}`,{"is-wrap":t.wrap}]])},[e.createElementVNode("code",null,e.toDisplayString(n.value),1)],2))}}),[["__scopeId","data-v-969309ba"]]),Xb=Object.freeze(Object.defineProperty({__proto__:null,default:Wc},Symbol.toStringTag,{value:"Module"})),Hc=Symbol("qiuRow"),Gb=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuCol",__name:"index",props:{span:{default:24},offset:{default:0},push:{default:0},pull:{default:0},xs:{},sm:{},md:{},lg:{},xl:{}},setup(t){const a=t,n=e.inject(Hc,null),o=d=>d==null?null:typeof d=="number"?{span:d,offset:0}:{span:d.span??24,offset:d.offset??0},r=e.computed(()=>{const d=[`qiu-col-${a.span}`];return a.offset&&d.push(`qiu-col-offset-${a.offset}`),a.push&&d.push(`qiu-col-push-${a.push}`),a.pull&&d.push(`qiu-col-pull-${a.pull}`),["xs","sm","md","lg","xl"].forEach(f=>{const u=o(a[f]);u&&(d.push(`qiu-col-${f}-${u.span}`),u.offset&&d.push(`qiu-col-${f}-offset-${u.offset}`))}),d}),c=e.computed(()=>{const d=(n==null?void 0:n.gutter.value)||0;if(d)return{paddingLeft:`${d/2}px`,paddingRight:`${d/2}px`}});return(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-col",e.unref(r)]),style:e.normalizeStyle(e.unref(c))},[e.renderSlot(d.$slots,"default")],6))}})},Symbol.toStringTag,{value:"Module"})),Yc=Symbol("QiuCollapse"),Jb={class:"qiu-collapse",role:"presentation"},Zb=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuCollapse",__name:"index",props:{modelValue:{},accordion:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=u=>u==null?[]:Array.isArray(u)?[...u]:[u],c=e.computed({get(){return r(n.modelValue)},set(u){const h=n.accordion?u[0]??"":u;o("update:modelValue",h),o("change",h)}}),d=u=>c.value.includes(u),f=u=>{if(n.accordion){c.value=d(u)?[]:[u];return}const h=new Set(c.value);h.has(u)?h.delete(u):h.add(u),c.value=[...h]};return e.provide(Yc,{activeNames:c,accordion:e.toRef(n,"accordion"),toggleItem:f,isActive:d}),(u,h)=>(e.openBlock(),e.createElementBlock("div",Jb,[e.renderSlot(u.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-78a056c5"]])},Symbol.toStringTag,{value:"Module"})),ey=["disabled","aria-expanded"],ty={class:"qiu-collapse-item__title"},ny={class:"qiu-collapse-item__content-inner"},Kc=de(e.defineComponent({name:"QiuCollapseItem",__name:"index",props:{name:{},title:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const a=t,n=e.inject(Yc,null),o=e.ref(null),r=e.ref(0),c=e.computed(()=>(n==null?void 0:n.isActive(a.name))??!1),d=()=>{a.disabled||!n||n.toggleItem(a.name)},f=()=>{o.value&&(r.value=o.value.scrollHeight)};e.watch(c,async h=>{h&&(await e.nextTick(),f())});let u=null;return e.onMounted(()=>{f(),typeof ResizeObserver<"u"&&o.value&&(u=new ResizeObserver(f),u.observe(o.value))}),e.onBeforeUnmount(()=>{u==null||u.disconnect()}),(h,p)=>{const _=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-collapse-item",{"is-active":e.unref(c),"is-disabled":t.disabled}])},[e.createElementVNode("button",{type:"button",class:"qiu-collapse-item__header",disabled:t.disabled,"aria-expanded":e.unref(c),onClick:d},[e.createElementVNode("span",ty,[e.renderSlot(h.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),e.createVNode(_,{class:e.normalizeClass(["qiu-collapse-item__arrow",{"is-active":e.unref(c)}]),icon:"arrow-down-s-line"},null,8,["class"])],8,ey),e.createElementVNode("div",{class:e.normalizeClass(["qiu-collapse-item__wrap",{"is-active":e.unref(c)}])},[e.createElementVNode("div",{ref_key:"contentRef",ref:o,class:"qiu-collapse-item__content"},[e.createElementVNode("div",ny,[e.renderSlot(h.$slots,"default",{},void 0,!0)])],512)],2)],2)}}}),[["__scopeId","data-v-eb2fac55"]]),oy=Object.freeze(Object.defineProperty({__proto__:null,default:Kc},Symbol.toStringTag,{value:"Module"})),vc=de(e.defineComponent({name:"QiuColorPicker",__name:"index",props:{modelValue:{default:""},presets:{default:()=>["#1675fe","#409eff","#67c23a","#e6a23c","#f56c6c","#909399","#00bcd4","#9c27b0","#ff5722","#795548"]},placeholder:{default:"#1675fe"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=a;return(o,r)=>(e.openBlock(),e.createBlock(Ni,e.mergeProps({class:"qiu-color-picker"},o.$attrs,{"model-value":t.modelValue,presets:t.presets,placeholder:t.placeholder,clearable:t.clearable,disabled:t.disabled,"onUpdate:modelValue":r[0]||(r[0]=c=>n("update:modelValue",c)),onChange:r[1]||(r[1]=c=>n("change",c))}),null,16,["model-value","presets","placeholder","clearable","disabled"]))}}),[["__scopeId","data-v-aa23c0c7"]]),ly=Object.freeze(Object.defineProperty({__proto__:null,default:vc},Symbol.toStringTag,{value:"Module"})),ay={key:0,class:"qiu-colorful-card__header"},iy=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuColorfulCard",__name:"index",props:{bodyStyle:{type:[Object,String],default:()=>({})},shadow:{type:String,default:"never"},colorFrom:{type:String,default:""},colorTo:{type:String,default:""},title:{type:String,default:""},icon:{type:String,default:""},style:{type:Object,default:()=>({})}},setup(t){const a=t,n=e.computed(()=>a.style&&Object.keys(a.style).length>0?a.style:{background:`linear-gradient(120deg, ${a.colorFrom} 10%, ${a.colorTo})`});return(o,r)=>{const c=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-colorful-card",[`qiu-colorful-card--shadow-${t.shadow}`]]),style:e.normalizeStyle(e.unref(n))},[o.$slots.header?(e.openBlock(),e.createElementBlock("div",ay,[e.renderSlot(o.$slots,"header",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"qiu-colorful-card__body",style:e.normalizeStyle(t.bodyStyle)},[t.icon?(e.openBlock(),e.createBlock(c,{key:0,class:"qiu-colorful-card__icon",icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default",{},void 0,!0)],4)],6)}}}),[["__scopeId","data-v-5be66a8e"]])},Symbol.toStringTag,{value:"Module"})),ry=["value","placeholder","disabled","onKeydown"],cy={key:0,class:"qiu-combobox__list"},sy=["onMouseenter","onClick"],dy={key:1,class:"qiu-combobox__empty"},Xc=de(e.defineComponent({name:"QiuCombobox",__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},placeholder:{default:"请选择"},size:{default:"default"},disabled:{type:Boolean,default:!1},allowFree:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref(""),u=e.ref(0),h=e.ref({}),p=e.computed(()=>{const w=n.options.find(S=>S.value===n.modelValue);return w?w.label:""}),_=e.computed(()=>{if(!n.filterable||!f.value)return n.options;const w=f.value.toLowerCase();return n.options.filter(S=>S.label.toLowerCase().includes(w))});e.watch(()=>n.modelValue,()=>{f.value=p.value},{immediate:!0});const B=()=>{const w=r.value,S=c.value;if(!w||!S)return;const N=w.getBoundingClientRect(),D=S.getBoundingClientRect(),T=4;let L=N.bottom+T;L+D.height>window.innerHeight-4&&(L=N.top-D.height-T);const U=Math.min(Math.max(4,N.left),window.innerWidth-D.width-4);h.value={position:"fixed",top:`${Math.max(4,L)}px`,left:`${U}px`,width:`${N.width}px`,zIndex:"2100"}},$=async()=>{n.disabled||(d.value=!0,u.value=0,await e.nextTick(),B())},b=()=>{d.value&&(d.value=!1,f.value=p.value)},C=()=>d.value?b():$(),k=w=>{f.value=w.target.value,d.value||$()},M=()=>{if(!d.value)return $();u.value<_.value.length-1&&u.value++},V=()=>{u.value>0&&u.value--},E=()=>{const w=_.value[u.value];w&&x(w)},x=w=>{o("update:modelValue",w.value),o("change",w),f.value=w.label,d.value=!1},m=w=>{var N,D;if(!d.value)return;const S=w.target;(N=r.value)!=null&&N.contains(S)||(D=c.value)!=null&&D.contains(S)||b()};return e.watch(d,w=>{w?document.addEventListener("mousedown",m,!0):document.removeEventListener("mousedown",m,!0)}),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",m,!0)),(w,S)=>{const N=_t;return e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["qiu-combobox",[`qiu-combobox--${t.size}`,{"is-open":d.value,"is-disabled":t.disabled}]])},[e.createElementVNode("div",{class:"qiu-combobox__control",onClick:C},[e.createElementVNode("input",{class:"qiu-combobox__input",value:f.value,placeholder:t.placeholder,disabled:t.disabled,onInput:k,onKeydown:[e.withKeys(e.withModifiers(M,["prevent"]),["down"]),e.withKeys(e.withModifiers(V,["prevent"]),["up"]),e.withKeys(e.withModifiers(E,["prevent"]),["enter"]),e.withKeys(b,["esc"])]},null,40,ry),e.createVNode(N,{icon:"arrow-down-s-line",class:e.normalizeClass(["qiu-combobox__arrow",{"is-open":d.value}])},null,8,["class"])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{ref_key:"panelRef",ref:c,class:"qiu-combobox__panel",style:e.normalizeStyle(h.value)},[_.value.length?(e.openBlock(),e.createElementBlock("ul",cy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,(D,T)=>(e.openBlock(),e.createElementBlock("li",{key:D.value,class:e.normalizeClass(["qiu-combobox__option",{"is-active":T===u.value,"is-selected":D.value===t.modelValue}]),onMouseenter:L=>u.value=T,onClick:L=>x(D)},[e.renderSlot(w.$slots,"option",{option:D},()=>[e.createTextVNode(e.toDisplayString(D.label),1)],!0)],42,sy))),128))])):(e.openBlock(),e.createElementBlock("div",dy,"无匹配项"))],4),[[e.vShow,d.value]])]))],2)}}}),[["__scopeId","data-v-00000c88"]]),my=Object.freeze(Object.defineProperty({__proto__:null,default:Xc},Symbol.toStringTag,{value:"Module"})),Gc=e.defineComponent({name:"QiuConfigProvider",__name:"index",props:{size:{default:"default"},locale:{},zIndex:{default:2e3}},setup(t){const a=t;return e.provide("qiuConfigProvider",{size:e.toRef(a,"size"),locale:e.toRef(a,"locale"),zIndex:e.toRef(a,"zIndex")}),(n,o)=>e.renderSlot(n.$slots,"default")}}),uy=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),fy={class:"qiu-context-menu__list"},py={key:0,class:"qiu-context-menu__divider",role:"separator"},hy=["onClick"],gy={class:"qiu-context-menu__label"},_y={key:1,class:"qiu-context-menu__shortcut"},Jc=de(e.defineComponent({name:"QiuContextMenu",__name:"index",props:{items:{default:()=>[]}},emits:["select","command","visibleChange"],setup(t,{emit:a}){const n=a,o=e.ref(null),r=e.ref(null),c=e.ref(!1),d=e.ref({}),f=async $=>{$.preventDefault(),c.value=!0,n("visibleChange",!0),await e.nextTick(),u($.clientX,$.clientY)},u=($,b)=>{const C=r.value;if(!C)return;const k=C.getBoundingClientRect(),M=window.innerWidth,V=window.innerHeight;let E=Math.min($,M-k.width-4),x=Math.min(b,V-k.height-4);E=Math.max(4,E),x=Math.max(4,x),d.value={position:"fixed",top:`${x}px`,left:`${E}px`,zIndex:"3000"}},h=()=>{c.value&&(c.value=!1,n("visibleChange",!1))},p=$=>{$.disabled||(n("select",$),$.command!==void 0&&n("command",$.command),h())},_=$=>{var b;(b=r.value)!=null&&b.contains($.target)||h()},B=()=>h();return e.watch(c,$=>{$?(document.addEventListener("mousedown",_,!0),window.addEventListener("scroll",B,!0),window.addEventListener("resize",B)):(document.removeEventListener("mousedown",_,!0),window.removeEventListener("scroll",B,!0),window.removeEventListener("resize",B))}),e.onBeforeUnmount(()=>{document.removeEventListener("mousedown",_,!0),window.removeEventListener("scroll",B,!0),window.removeEventListener("resize",B)}),($,b)=>{const C=_t;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{ref_key:"triggerRef",ref:o,class:"qiu-context-menu",onContextmenu:e.withModifiers(f,["prevent"])},[e.renderSlot($.$slots,"default",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-context-menu-fade"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"menuRef",ref:r,class:"qiu-context-menu__panel",style:e.normalizeStyle(d.value),onContextmenu:b[0]||(b[0]=e.withModifiers(()=>{},["prevent"])),onClick:b[1]||(b[1]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("ul",fy,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(k,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[k.divider?(e.openBlock(),e.createElementBlock("li",py)):(e.openBlock(),e.createElementBlock("li",{key:1,class:e.normalizeClass(["qiu-context-menu__item",{"is-disabled":k.disabled}]),onClick:V=>p(k)},[k.icon?(e.openBlock(),e.createBlock(C,{key:0,icon:k.icon,class:"qiu-context-menu__icon"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",gy,e.toDisplayString(k.label),1),k.shortcut?(e.openBlock(),e.createElementBlock("span",_y,e.toDisplayString(k.shortcut),1)):e.createCommentVNode("",!0)],10,hy))],64))),128)),e.renderSlot($.$slots,"items",{},void 0,!0)])],36)):e.createCommentVNode("",!0)]),_:3})]))],64)}}}),[["__scopeId","data-v-9f88bbd9"]]),by=Object.freeze(Object.defineProperty({__proto__:null,default:Jc},Symbol.toStringTag,{value:"Module"})),Zc=Symbol("QiuDescriptions"),yy={key:0,class:"qiu-descriptions__header"},ky={class:"qiu-descriptions__body"},wy=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuDescriptions",__name:"index",props:{title:{default:""},column:{default:3},border:{type:Boolean,default:!1},direction:{default:"horizontal"},size:{default:"default"}},setup(t){const a=t,n=e.ref([]),o=d=>{const f=n.value.findIndex(u=>u.uid===d.uid);f>=0?n.value[f]=d:n.value.push(d)},r=d=>{n.value=n.value.filter(f=>f.uid!==d)};e.provide(Zc,{column:e.toRef(a,"column"),border:e.toRef(a,"border"),direction:e.toRef(a,"direction"),size:e.toRef(a,"size"),registerItem:o,unregisterItem:r});const c=e.computed(()=>({"--qiu-descriptions-columns":String(Math.max(1,a.column))}));return(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-descriptions",[`qiu-descriptions--${t.size}`,`qiu-descriptions--${t.direction}`,{"is-bordered":t.border}]]),style:e.normalizeStyle(e.unref(c))},[t.title||d.$slots.title?(e.openBlock(),e.createElementBlock("div",yy,[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ky,[e.renderSlot(d.$slots,"default",{},void 0,!0)])],6))}}),[["__scopeId","data-v-4c878e2d"]])},Symbol.toStringTag,{value:"Module"})),xy={class:"qiu-descriptions-item__label"},Vy={class:"qiu-descriptions-item__content"},es=de(e.defineComponent({name:"QiuDescriptionsItem",__name:"index",props:{label:{default:""},span:{default:1}},setup(t){var f;const a=t,n=e.useSlots(),o=e.inject(Zc,null),r=((f=e.getCurrentInstance())==null?void 0:f.uid)??Math.random(),c=e.computed(()=>(o==null?void 0:o.border.value)??!1),d=e.computed(()=>({gridColumn:`span ${Math.max(1,a.span)}`}));return e.onMounted(()=>{o==null||o.registerItem({uid:r,label:a.label,span:a.span,render:()=>{var u;return(u=n.default)==null?void 0:u.call(n)}})}),e.onUnmounted(()=>{o==null||o.unregisterItem(r)}),e.watch(()=>[a.label,a.span],()=>{o==null||o.registerItem({uid:r,label:a.label,span:a.span,render:()=>{var u;return(u=n.default)==null?void 0:u.call(n)}})}),(u,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-descriptions-item",{"is-bordered":e.unref(c)}]),style:e.normalizeStyle(e.unref(d))},[e.createElementVNode("div",xy,[e.renderSlot(u.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)]),e.createElementVNode("div",Vy,[e.renderSlot(u.$slots,"default",{},void 0,!0)])],6))}}),[["__scopeId","data-v-c370e697"]]),Cy=Object.freeze(Object.defineProperty({__proto__:null,default:es},Symbol.toStringTag,{value:"Module"})),Ny={key:0,class:"qiu-digital-card__icon"},By={class:"qiu-digital-card__content"},$y={class:"qiu-digital-card__value"},Ey={key:0,class:"qiu-digital-card__affix"},Sy={class:"qiu-digital-card__num"},My={key:1,class:"qiu-digital-card__affix"},qy={key:0,class:"qiu-digital-card__title"},zy={key:1,class:"qiu-digital-card__footer"},ts=de(e.defineComponent({name:"QiuDigitalCard",__name:"index",props:{value:{default:0},title:{default:""},prefix:{default:""},suffix:{default:""},icon:{default:""},precision:{default:0},groupSeparator:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},duration:{default:800},theme:{default:"light"}},setup(t){const a=t,n=e.ref(0),o=e.computed(()=>{const d=Number(n.value.toFixed(a.precision)).toFixed(a.precision);if(!a.groupSeparator)return d;const[f,u]=d.split("."),h=f.replace(/\B(?=(\d{3})+(?!\d))/g,",");return u?`${h}.${u}`:h}),r=c=>{if(!a.animated){n.value=c;return}const d=n.value,f=performance.now(),u=h=>{const p=Math.min(1,(h-f)/a.duration),_=1-Math.pow(1-p,3);n.value=d+(c-d)*_,p<1?requestAnimationFrame(u):n.value=c};requestAnimationFrame(u)};return e.watch(()=>a.value,c=>r(Number(c)||0),{immediate:!0}),(c,d)=>{const f=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-digital-card",[`qiu-digital-card--${t.theme}`]])},[t.icon||c.$slots.icon?(e.openBlock(),e.createElementBlock("div",Ny,[e.renderSlot(c.$slots,"icon",{},()=>[e.createVNode(f,{icon:t.icon},null,8,["icon"])],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",By,[e.createElementVNode("div",$y,[t.prefix?(e.openBlock(),e.createElementBlock("span",Ey,e.toDisplayString(t.prefix),1)):e.createCommentVNode("",!0),e.createElementVNode("span",Sy,e.toDisplayString(o.value),1),t.suffix?(e.openBlock(),e.createElementBlock("span",My,e.toDisplayString(t.suffix),1)):e.createCommentVNode("",!0)]),t.title||c.$slots.title?(e.openBlock(),e.createElementBlock("div",qy,[e.renderSlot(c.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),c.$slots.footer?(e.openBlock(),e.createElementBlock("div",zy,[e.renderSlot(c.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)])],2)}}}),[["__scopeId","data-v-00add6d9"]]),Ty=Object.freeze(Object.defineProperty({__proto__:null,default:ts},Symbol.toStringTag,{value:"Module"})),qi=de(e.defineComponent({name:"QiuDot",__name:"index",props:{type:{values:["primary","success","warning","danger"],type:String,default:"primary"}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass("qiu-dot qiu-dot-"+t.type)},null,2))}}),[["__scopeId","data-v-e6e1d272"]]),Iy=Object.freeze(Object.defineProperty({__proto__:null,default:qi},Symbol.toStringTag,{value:"Module"})),Dy={key:0,class:"qiu-drawer__header"},Ry={class:"qiu-drawer__title"},Ly={class:"qiu-drawer__body"},Py={key:1,class:"qiu-drawer__footer"},Oy=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuDrawer",inheritAttrs:!1,__name:"index",props:{modelValue:{type:Boolean,default:!1},title:{default:""},direction:{default:"rtl"},size:{default:"30%"},modal:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!1},showClose:{type:Boolean,default:!0},animated:{type:Boolean,default:!0},zIndex:{default:2e3},appendToBody:{type:Boolean,default:!0},beforeClose:{}},emits:["update:modelValue","open","opened","close","closed"],setup(t,{emit:a}){const n=e.useAttrs(),o=e.computed(()=>{const{class:V,style:E,...x}=n;return x}),r=t,c=e.computed(()=>r.appendToBody!==!1),d=a,f=na.useVModel(r,"modelValue",d),u=e.computed(()=>typeof r.size=="number"?`${r.size}px`:String(r.size)),h=e.computed(()=>{const V=u.value;switch(r.direction){case"ltr":return{width:V,height:"100%"};case"ttb":return{width:"100%",height:V};case"btt":return{width:"100%",height:V};default:return{width:V,height:"100%"}}}),p=e.computed(()=>{switch(r.direction){case"ltr":return"qiu-drawer-slide-left";case"ttb":return"qiu-drawer-slide-top";case"btt":return"qiu-drawer-slide-bottom";default:return"qiu-drawer-slide-right"}}),{lock:_,unlock:B}=Er(),$=()=>{d("close"),f.value=!1},b=()=>{if(r.beforeClose){r.beforeClose(()=>$());return}$()},C=()=>{r.closeOnClickModal&&b()},k=e.computed(()=>r.modal&&f.value);e.watch(k,async V=>{V?(_(),d("open"),await e.nextTick(),d("opened")):(B(),d("closed"))});const M=V=>{r.closeOnPressEscape&&V.key==="Escape"&&b()};return e.watch(f,V=>{V?window.addEventListener("keydown",M):window.removeEventListener("keydown",M)}),e.onMounted(()=>{k.value&&_()}),e.onBeforeUnmount(()=>{B(),window.removeEventListener("keydown",M)}),(V,E)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!e.unref(c)},[e.createVNode(e.Transition,{name:e.unref(p)},{default:e.withCtx(()=>[e.unref(f)?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["qiu-drawer-root",[`qiu-drawer-root--${t.direction}`]]),style:e.normalizeStyle({zIndex:String(t.zIndex)})},[t.modal?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-drawer__mask",onClick:C})):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({class:["qiu-drawer",[`qiu-drawer--${t.direction}`,{"qiu-drawer--animated":t.animated},e.unref(n).class]]},e.unref(o),{style:e.unref(h),role:"dialog","aria-modal":"true"}),[t.showClose||t.title||V.$slots.header?(e.openBlock(),e.createElementBlock("div",Dy,[e.createElementVNode("div",Ry,[e.renderSlot(V.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),t.showClose?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-drawer__close","aria-label":"close",onClick:b}," × ")):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ly,[e.renderSlot(V.$slots,"default",{},void 0,!0)]),V.$slots.footer?(e.openBlock(),e.createElementBlock("div",Py,[e.renderSlot(V.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],16)],6)):e.createCommentVNode("",!0)]),_:3},8,["name"])],8,["disabled"]))}}),[["__scopeId","data-v-7057cb36"]])},Symbol.toStringTag,{value:"Module"})),jy=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuFullscreen",__name:"index",setup(t){const{isFullscreen:a,toggle:n}=na.useFullscreen();return(o,r)=>{const c=_t;return e.openBlock(),e.createBlock(c,{class:"qiu-fullscreen",icon:e.unref(a)?"fullscreen-exit-fill":"fullscreen-fill",onClick:e.unref(n)},null,8,["icon","onClick"])}}})},Symbol.toStringTag,{value:"Module"})),Fy={key:0,class:"qiu-grid__form"},Ay={key:0,class:"qiu-grid__form-inner"},Qy=["onUpdate:modelValue","placeholder"],Uy=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuGrid",__name:"index",props:{columns:{default:()=>[]},data:{default:()=>[]},loading:{type:Boolean,default:!1},height:{},maxHeight:{},border:{type:[Boolean,String],default:!0},stripe:{type:Boolean},round:{type:Boolean},editable:{type:Boolean},editTrigger:{},editConfig:{},rowKey:{},showIndex:{type:Boolean},showSelection:{type:Boolean},showFooter:{type:Boolean},tree:{type:Boolean},pagerConfig:{type:[Object,Boolean]},toolbarConfig:{type:[Object,Boolean]},formConfig:{type:[Object,Boolean]},proxyConfig:{default:void 0},sortConfig:{},filterConfig:{},columnConfig:{},rowConfig:{},customConfig:{},menuConfig:{},editRules:{},virtualYConfig:{type:[Object,Boolean]},spanMethod:{},mergeCells:{}},emits:["proxy-query","proxy-delete"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.ref(!1),f=e.ref(null),u=e.ref(null),h=e.ref(1),p=e.ref(10),_=e.ref(null),B=e.ref({}),$=e.reactive({}),b=e.computed(()=>o.toolbarConfig===!1?{enabled:!1}:o.toolbarConfig===!0||o.toolbarConfig==null?{enabled:!0,refresh:!0,export:!0,zoom:!0,custom:!0}:{enabled:!0,...o.toolbarConfig}),C=e.computed(()=>b.value.enabled!==!1),k=e.computed(()=>{const Z=b.value;return{enabled:Z.enabled,refresh:Z.refresh,export:Z.export,import:Z.import,print:Z.print,custom:Z.custom,zoom:Z.zoom,copy:Z.copy,toolsPlacement:Z.toolsPlacement,customTools:Z.customTools}}),M=e.useSlots(),V=e.computed(()=>o.formConfig===!1?!1:o.formConfig===!0?!0:o.formConfig&&typeof o.formConfig=="object"?o.formConfig.enabled!==!1:!!M.form),E=e.computed(()=>o.formConfig&&typeof o.formConfig=="object"?o.formConfig.items||[]:[]);e.watch(E,Z=>{Z.forEach(z=>{z.field in $||($[z.field]="")})},{immediate:!0});const x=e.computed(()=>{var Z,z,fe;return((Z=o.proxyConfig)==null?void 0:Z.enabled)!==!1&&!!((fe=(z=o.proxyConfig)==null?void 0:z.ajax)!=null&&fe.query)}),m=e.computed(()=>x.value&&f.value?f.value:o.data||[]),w=e.computed(()=>{const Z=o.pagerConfig===!0?{enabled:!0}:o.pagerConfig&&typeof o.pagerConfig=="object"?{...o.pagerConfig}:x.value?{enabled:!0}:!1;return!Z||Z===!1?!1:{...Z,currentPage:h.value,pageSize:p.value,total:u.value??Z.total??m.value.length}}),S=e.computed(()=>{const{data:Z,loading:z,pagerConfig:fe,toolbarConfig:he,formConfig:se,proxyConfig:te,...re}=o;return{...re,toolbarConfig:k.value,showExport:b.value.export!==!1,customConfig:o.customConfig||(b.value.custom!==!1?{enabled:!0}:void 0),showPrint:b.value.print===!0,showImport:b.value.import===!0,showCopy:b.value.copy===!0}}),N=e.computed(()=>({loading:d.value,data:m.value,total:u.value,form:$})),D=(Z,z)=>z?z.split(".").reduce((fe,he)=>fe==null?fe:fe[he],Z):Z,T=async()=>{var Z,z,fe,he,se;if(!x.value||!((z=(Z=o.proxyConfig)==null?void 0:Z.ajax)!=null&&z.query)){r("proxy-query",{form:{...$}});return}d.value=!0;try{const te=await o.proxyConfig.ajax.query({page:{currentPage:h.value,pageSize:p.value},form:{...$},sorts:_.value?[_.value]:[],filters:B.value}),re=((fe=o.proxyConfig.props)==null?void 0:fe.result)||"result",Ne=((he=o.proxyConfig.props)==null?void 0:he.total)||"page.total";if(Array.isArray(te))f.value=te,u.value=te.length;else{const De=D(te,re)??te.data??[];f.value=Array.isArray(De)?De:[];const $e=D(te,Ne)??te.total??((se=te.page)==null?void 0:se.total)??f.value.length;u.value=Number($e)||0}r("proxy-query",{form:{...$},result:f.value})}finally{d.value=!1}},L=()=>{Object.keys($).forEach(Z=>{$[Z]=""}),h.value=1,T()},U=T,oe=Z=>{h.value=Z.currentPage,p.value=Z.pageSize,x.value&&T()},H=Z=>{var z;_.value=Z,(z=o.sortConfig)!=null&&z.remote&&x.value&&T()},Ve=Z=>{var z;B.value=Z,(z=o.filterConfig)!=null&&z.remote&&x.value&&T()};return e.onMounted(()=>{var Z;x.value&&((Z=o.proxyConfig)==null?void 0:Z.autoLoad)!==!1&&T()}),a({reload:T,getTable:()=>c.value,commitProxy:T,formModel:$}),(Z,z)=>{var he;const fe=Ml;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-grid",{"qiu-grid--loading":e.unref(d)}])},[e.unref(V)&&(Z.$slots.form||t.formConfig)?(e.openBlock(),e.createElementBlock("div",Fy,[e.renderSlot(Z.$slots,"form",{query:e.unref(U),form:e.unref($),reload:T},()=>[e.unref(E).length?(e.openBlock(),e.createElementBlock("div",Ay,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(E),se=>(e.openBlock(),e.createElementBlock("label",{key:se.field,class:"qiu-grid__form-item"},[e.createElementVNode("span",null,e.toDisplayString(se.title||se.field),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":te=>e.unref($)[se.field]=te,class:"qiu-grid__form-input",placeholder:se.title||se.field,onKeydown:z[0]||(z[0]=e.withKeys(te=>T(),["enter"]))},null,40,Qy),[[e.vModelText,e.unref($)[se.field]]])]))),128)),e.createElementVNode("button",{type:"button",class:"qiu-grid__form-btn",onClick:z[1]||(z[1]=se=>T())},"查询"),e.createElementVNode("button",{type:"button",class:"qiu-grid__form-btn is-plain",onClick:L},"重置")])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),e.createVNode(fe,e.mergeProps({ref_key:"tableRef",ref:c},e.unref(S),{data:e.unref(m),loading:e.unref(d)||t.loading,"pager-config":e.unref(w),"show-toolbar":e.unref(C),"show-export":((he=e.unref(b))==null?void 0:he.export)!==!1,onPageChange:oe,onRefresh:T,onSortChange:H,onFilterChange:Ve}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(Z.$slots,"default",{},void 0,!0)]),_:2},[Z.$slots.toolbar?{name:"toolbar",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"toolbar",{reload:T,proxy:e.unref(N)},void 0,!0)]),key:"0"}:void 0,Z.$slots["toolbar-left"]?{name:"toolbar-left",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"toolbar-left",{reload:T,proxy:e.unref(N)},void 0,!0)]),key:"1"}:void 0,Z.$slots["toolbar-center"]?{name:"toolbar-center",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"toolbar-center",{reload:T,proxy:e.unref(N)},void 0,!0)]),key:"2"}:void 0,Z.$slots["toolbar-right"]?{name:"toolbar-right",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"toolbar-right",{reload:T,proxy:e.unref(N)},void 0,!0)]),key:"3"}:void 0,Z.$slots["toolbar-tools"]?{name:"toolbar-tools",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"toolbar-tools",{},void 0,!0)]),key:"4"}:void 0]),1040,["data","loading","pager-config","show-toolbar","show-export"])],2)}}}),[["__scopeId","data-v-d20f65ca"]])},Symbol.toStringTag,{value:"Module"})),Wy={key:0,class:"qiu-hover-card__title"},Hy={class:"qiu-hover-card__body"},ns=de(e.defineComponent({name:"QiuHoverCard",__name:"index",props:{title:{default:""},placement:{default:"top"},width:{default:280},openDelay:{default:80},closeDelay:{default:120}},emits:["visibleChange"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref({});let u,h,p=!1;const _=()=>{u&&clearTimeout(u),h&&clearTimeout(h)},B=async()=>{_(),u=setTimeout(async()=>{d.value=!0,o("visibleChange",!0),await e.nextTick(),V()},n.openDelay)},$=()=>{_(),h=setTimeout(()=>{p||(d.value=!1,o("visibleChange",!1))},n.closeDelay)},b=()=>B(),C=()=>$(),k=()=>{p=!0,_()},M=()=>{p=!1,$()},V=()=>{const x=r.value,m=c.value;if(!x||!m)return;const w=x.getBoundingClientRect(),S=m.getBoundingClientRect(),N=10;let D=0,T=0;switch(n.placement){case"top":D=w.top-S.height-N,T=w.left+w.width/2-S.width/2;break;case"left":D=w.top+w.height/2-S.height/2,T=w.left-S.width-N;break;case"right":D=w.top+w.height/2-S.height/2,T=w.right+N;break;default:D=w.bottom+N,T=w.left+w.width/2-S.width/2}T=Math.min(Math.max(4,T),window.innerWidth-S.width-4),D=Math.min(Math.max(4,D),window.innerHeight-S.height-4),f.value={position:"fixed",top:`${D}px`,left:`${T}px`,width:`${n.width}px`,zIndex:"2100"}},E=()=>d.value&&V();return e.watch(d,x=>{x?(window.addEventListener("scroll",E,!0),window.addEventListener("resize",E)):(window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E))}),e.onBeforeUnmount(()=>{_(),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E)}),(x,m)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("span",{ref_key:"triggerRef",ref:r,class:"qiu-hover-card",onMouseenter:b,onMouseleave:C},[e.renderSlot(x.$slots,"trigger",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-hover-card-fade"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"cardRef",ref:c,class:e.normalizeClass(["qiu-hover-card__panel",[`qiu-hover-card--${t.placement}`]]),style:e.normalizeStyle(f.value),onMouseenter:k,onMouseleave:M},[t.title||x.$slots.title?(e.openBlock(),e.createElementBlock("div",Wy,[e.renderSlot(x.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Hy,[e.renderSlot(x.$slots,"default",{},void 0,!0)])],38)):e.createCommentVNode("",!0)]),_:3})]))],64))}}),[["__scopeId","data-v-391ad416"]]),Yy=Object.freeze(Object.defineProperty({__proto__:null,default:ns},Symbol.toStringTag,{value:"Module"})),Il=["24-hours-fill","24-hours-line","4k-fill","4k-line","a-b","accessibility-fill","accessibility-line","account-box-2-fill","account-box-2-line","account-box-fill","account-box-line","account-circle-2-fill","account-circle-2-line","account-circle-fill","account-circle-line","account-pin-box-fill","account-pin-box-line","account-pin-circle-fill","account-pin-circle-line","add-box-fill","add-box-line","add-circle-fill","add-circle-line","add-fill","add-large-fill","add-large-line","add-line","admin-fill","admin-line","advertisement-fill","advertisement-line","aed-electrodes-fill","aed-electrodes-line","aed-fill","aed-line","ai-generate","ai-generate-2","ai-generate-text","airplay-fill","airplay-line","alarm-add-fill","alarm-add-line","alarm-fill","alarm-line","alarm-snooze-fill","alarm-snooze-line","alarm-warning-fill","alarm-warning-line","album-fill","album-line","alert-fill","alert-line","alibaba-cloud-fill","alibaba-cloud-line","aliens-fill","aliens-line","align-bottom","align-center","align-item-bottom-fill","align-item-bottom-line","align-item-horizontal-center-fill","align-item-horizontal-center-line","align-item-left-fill","align-item-left-line","align-item-right-fill","align-item-right-line","align-item-top-fill","align-item-top-line","align-item-vertical-center-fill","align-item-vertical-center-line","align-justify","align-left","align-right","align-top","align-vertically","alipay-fill","alipay-line","amazon-fill","amazon-line","anchor-fill","anchor-line","ancient-gate-fill","ancient-gate-line","ancient-pavilion-fill","ancient-pavilion-line","android-fill","android-line","angularjs-fill","angularjs-line","anthropic-fill","anthropic-line","anticlockwise-2-fill","anticlockwise-2-line","anticlockwise-fill","anticlockwise-line","app-store-fill","app-store-line","apple-fill","apple-line","apps-2-add-fill","apps-2-add-line","apps-2-ai-fill","apps-2-ai-line","apps-2-fill","apps-2-line","apps-fill","apps-line","archive-2-fill","archive-2-line","archive-drawer-fill","archive-drawer-line","archive-fill","archive-line","archive-stack-fill","archive-stack-line","armchair-fill","armchair-line","arrow-down-box-fill","arrow-down-box-line","arrow-down-circle-fill","arrow-down-circle-line","arrow-down-double-fill","arrow-down-double-line","arrow-down-fill","arrow-down-line","arrow-down-long-fill","arrow-down-long-line","arrow-down-s-fill","arrow-down-s-line","arrow-down-wide-fill","arrow-down-wide-line","arrow-drop-down-fill","arrow-drop-down-line","arrow-drop-left-fill","arrow-drop-left-line","arrow-drop-right-fill","arrow-drop-right-line","arrow-drop-up-fill","arrow-drop-up-line","arrow-go-back-fill","arrow-go-back-line","arrow-go-forward-fill","arrow-go-forward-line","arrow-left-box-fill","arrow-left-box-line","arrow-left-circle-fill","arrow-left-circle-line","arrow-left-double-fill","arrow-left-double-line","arrow-left-down-box-fill","arrow-left-down-box-line","arrow-left-down-fill","arrow-left-down-line","arrow-left-down-long-fill","arrow-left-down-long-line","arrow-left-fill","arrow-left-line","arrow-left-long-fill","arrow-left-long-line","arrow-left-right-fill","arrow-left-right-line","arrow-left-s-fill","arrow-left-s-line","arrow-left-up-box-fill","arrow-left-up-box-line","arrow-left-up-fill","arrow-left-up-line","arrow-left-up-long-fill","arrow-left-up-long-line","arrow-left-wide-fill","arrow-left-wide-line","arrow-right-box-fill","arrow-right-box-line","arrow-right-circle-fill","arrow-right-circle-line","arrow-right-double-fill","arrow-right-double-line","arrow-right-down-box-fill","arrow-right-down-box-line","arrow-right-down-fill","arrow-right-down-line","arrow-right-down-long-fill","arrow-right-down-long-line","arrow-right-fill","arrow-right-line","arrow-right-long-fill","arrow-right-long-line","arrow-right-s-fill","arrow-right-s-line","arrow-right-up-box-fill","arrow-right-up-box-line","arrow-right-up-fill","arrow-right-up-line","arrow-right-up-long-fill","arrow-right-up-long-line","arrow-right-wide-fill","arrow-right-wide-line","arrow-turn-back-fill","arrow-turn-back-line","arrow-turn-forward-fill","arrow-turn-forward-line","arrow-up-box-fill","arrow-up-box-line","arrow-up-circle-fill","arrow-up-circle-line","arrow-up-double-fill","arrow-up-double-line","arrow-up-down-fill","arrow-up-down-line","arrow-up-fill","arrow-up-line","arrow-up-long-fill","arrow-up-long-line","arrow-up-s-fill","arrow-up-s-line","arrow-up-wide-fill","arrow-up-wide-line","artboard-2-fill","artboard-2-line","artboard-fill","artboard-line","article-fill","article-line","aspect-ratio-fill","aspect-ratio-line","asterisk","at-fill","at-line","attachment-2","attachment-fill","attachment-line","auction-fill","auction-line","award-fill","award-line","baidu-fill","baidu-line","ball-pen-fill","ball-pen-line","bank-card-2-fill","bank-card-2-line","bank-card-fill","bank-card-line","bank-fill","bank-line","bar-chart-2-fill","bar-chart-2-line","bar-chart-box-ai-fill","bar-chart-box-ai-line","bar-chart-box-fill","bar-chart-box-line","bar-chart-fill","bar-chart-grouped-fill","bar-chart-grouped-line","bar-chart-horizontal-fill","bar-chart-horizontal-line","bar-chart-line","barcode-box-fill","barcode-box-line","barcode-fill","barcode-line","bard-fill","bard-line","barricade-fill","barricade-line","base-station-fill","base-station-line","basketball-fill","basketball-line","battery-2-charge-fill","battery-2-charge-line","battery-2-fill","battery-2-line","battery-charge-fill","battery-charge-line","battery-fill","battery-line","battery-low-fill","battery-low-line","battery-saver-fill","battery-saver-line","battery-share-fill","battery-share-line","bear-smile-fill","bear-smile-line","beer-fill","beer-line","behance-fill","behance-line","bell-fill","bell-line","bike-fill","bike-line","bilibili-fill","bilibili-line","bill-fill","bill-line","billiards-fill","billiards-line","bit-coin-fill","bit-coin-line","blaze-fill","blaze-line","blender-fill","blender-line","blogger-fill","blogger-line","bluesky-fill","bluesky-line","bluetooth-connect-fill","bluetooth-connect-line","bluetooth-fill","bluetooth-line","blur-off-fill","blur-off-line","bnb-fill","bnb-line","body-scan-fill","body-scan-line","bold","book-2-fill","book-2-line","book-3-fill","book-3-line","book-fill","book-line","book-marked-fill","book-marked-line","book-open-fill","book-open-line","book-read-fill","book-read-line","book-shelf-fill","book-shelf-line","booklet-fill","booklet-line","bookmark-2-fill","bookmark-2-line","bookmark-3-fill","bookmark-3-line","bookmark-fill","bookmark-line","bootstrap-fill","bootstrap-line","bowl-fill","bowl-line","box-1-fill","box-1-line","box-2-fill","box-2-line","box-3-fill","box-3-line","boxing-fill","boxing-line","braces-fill","braces-line","brackets-fill","brackets-line","brain-2-fill","brain-2-line","brain-fill","brain-line","bread-fill","bread-line","briefcase-2-fill","briefcase-2-line","briefcase-3-fill","briefcase-3-line","briefcase-4-fill","briefcase-4-line","briefcase-5-fill","briefcase-5-line","briefcase-fill","briefcase-line","bring-forward","bring-to-front","broadcast-fill","broadcast-line","brush-2-fill","brush-2-line","brush-3-fill","brush-3-line","brush-4-fill","brush-4-line","brush-ai-fill","brush-ai-line","brush-fill","brush-line","btc-fill","btc-line","bubble-chart-fill","bubble-chart-line","bug-2-fill","bug-2-line","bug-fill","bug-line","building-2-fill","building-2-line","building-3-fill","building-3-line","building-4-fill","building-4-line","building-fill","building-line","bus-2-fill","bus-2-line","bus-fill","bus-line","bus-wifi-fill","bus-wifi-line","cactus-fill","cactus-line","cake-2-fill","cake-2-line","cake-3-fill","cake-3-line","cake-fill","cake-line","calculator-fill","calculator-line","calendar-2-fill","calendar-2-line","calendar-check-fill","calendar-check-line","calendar-close-fill","calendar-close-line","calendar-event-fill","calendar-event-line","calendar-fill","calendar-line","calendar-schedule-fill","calendar-schedule-line","calendar-todo-fill","calendar-todo-line","calendar-view","camera-2-fill","camera-2-line","camera-3-fill","camera-3-line","camera-ai-fill","camera-ai-line","camera-fill","camera-lens-ai-fill","camera-lens-ai-line","camera-lens-fill","camera-lens-line","camera-line","camera-off-fill","camera-off-line","camera-switch-fill","camera-switch-line","candle-fill","candle-line","capsule-fill","capsule-line","car-fill","car-line","car-washing-fill","car-washing-line","caravan-fill","caravan-line","carousel-view","cash-fill","cash-line","cast-fill","cast-line","cellphone-fill","cellphone-line","celsius-fill","celsius-line","centos-fill","centos-line","character-recognition-fill","character-recognition-line","charging-pile-2-fill","charging-pile-2-line","charging-pile-fill","charging-pile-line","chat-1-fill","chat-1-line","chat-2-fill","chat-2-line","chat-3-fill","chat-3-line","chat-4-fill","chat-4-line","chat-ai-fill","chat-ai-line","chat-check-fill","chat-check-line","chat-delete-fill","chat-delete-line","chat-download-fill","chat-download-line","chat-follow-up-fill","chat-follow-up-line","chat-forward-fill","chat-forward-line","chat-heart-fill","chat-heart-line","chat-history-fill","chat-history-line","chat-new-fill","chat-new-line","chat-off-fill","chat-off-line","chat-poll-fill","chat-poll-line","chat-private-fill","chat-private-line","chat-quote-fill","chat-quote-line","chat-search-fill","chat-search-line","chat-settings-fill","chat-settings-line","chat-smile-2-fill","chat-smile-2-line","chat-smile-3-fill","chat-smile-3-line","chat-smile-ai-fill","chat-smile-ai-line","chat-smile-fill","chat-smile-line","chat-thread-fill","chat-thread-line","chat-unread-fill","chat-unread-line","chat-upload-fill","chat-upload-line","chat-voice-ai-fill","chat-voice-ai-line","chat-voice-fill","chat-voice-line","check-double-fill","check-double-line","check-fill","check-line","checkbox-blank-circle-fill","checkbox-blank-circle-line","checkbox-blank-fill","checkbox-blank-line","checkbox-circle-fill","checkbox-circle-line","checkbox-fill","checkbox-indeterminate-fill","checkbox-indeterminate-line","checkbox-line","checkbox-multiple-blank-fill","checkbox-multiple-blank-line","checkbox-multiple-fill","checkbox-multiple-line","chess-fill","chess-line","china-railway-fill","china-railway-line","chrome-fill","chrome-line","circle-fill","circle-line","clapperboard-ai-fill","clapperboard-ai-line","clapperboard-fill","clapperboard-line","claude-fill","claude-line","clipboard-fill","clipboard-line","clockwise-2-fill","clockwise-2-line","clockwise-fill","clockwise-line","close-circle-fill","close-circle-line","close-fill","close-large-fill","close-large-line","close-line","closed-captioning-ai-fill","closed-captioning-ai-line","closed-captioning-fill","closed-captioning-line","cloud-fill","cloud-line","cloud-off-fill","cloud-off-line","cloud-windy-fill","cloud-windy-line","cloudy-2-fill","cloudy-2-line","cloudy-fill","cloudy-line","code-ai-fill","code-ai-line","code-block","code-box-fill","code-box-line","code-fill","code-line","code-s-fill","code-s-line","code-s-slash-fill","code-s-slash-line","code-view","codepen-fill","codepen-line","coin-fill","coin-line","coins-fill","coins-line","collage-fill","collage-line","collapse-diagonal-2-fill","collapse-diagonal-2-line","collapse-diagonal-fill","collapse-diagonal-line","collapse-horizontal-fill","collapse-horizontal-line","collapse-vertical-fill","collapse-vertical-line","color-filter-ai-fill","color-filter-ai-line","color-filter-fill","color-filter-line","command-fill","command-line","community-fill","community-line","compass-2-fill","compass-2-line","compass-3-fill","compass-3-line","compass-4-fill","compass-4-line","compass-discover-fill","compass-discover-line","compass-fill","compass-line","compasses-2-fill","compasses-2-line","compasses-fill","compasses-line","computer-fill","computer-line","contacts-book-2-fill","contacts-book-2-line","contacts-book-3-fill","contacts-book-3-line","contacts-book-fill","contacts-book-line","contacts-book-upload-fill","contacts-book-upload-line","contacts-fill","contacts-line","contract-fill","contract-left-fill","contract-left-line","contract-left-right-fill","contract-left-right-line","contract-line","contract-right-fill","contract-right-line","contract-up-down-fill","contract-up-down-line","contrast-2-fill","contrast-2-line","contrast-drop-2-fill","contrast-drop-2-line","contrast-drop-fill","contrast-drop-line","contrast-fill","contrast-line","copilot-fill","copilot-line","copper-coin-fill","copper-coin-line","copper-diamond-fill","copper-diamond-line","copyleft-fill","copyleft-line","copyright-fill","copyright-line","coreos-fill","coreos-line","corner-down-left-fill","corner-down-left-line","corner-down-right-fill","corner-down-right-line","corner-left-down-fill","corner-left-down-line","corner-left-up-fill","corner-left-up-line","corner-right-down-fill","corner-right-down-line","corner-right-up-fill","corner-right-up-line","corner-up-left-double-fill","corner-up-left-double-line","corner-up-left-fill","corner-up-left-line","corner-up-right-double-fill","corner-up-right-double-line","corner-up-right-fill","corner-up-right-line","coupon-2-fill","coupon-2-line","coupon-3-fill","coupon-3-line","coupon-4-fill","coupon-4-line","coupon-5-fill","coupon-5-line","coupon-fill","coupon-line","cpu-fill","cpu-line","creative-commons-by-fill","creative-commons-by-line","creative-commons-fill","creative-commons-line","creative-commons-nc-fill","creative-commons-nc-line","creative-commons-nd-fill","creative-commons-nd-line","creative-commons-sa-fill","creative-commons-sa-line","creative-commons-zero-fill","creative-commons-zero-line","criminal-fill","criminal-line","crop-2-fill","crop-2-line","crop-fill","crop-line","cross-fill","cross-line","crosshair-2-fill","crosshair-2-line","crosshair-fill","crosshair-line","css3-fill","css3-line","cup-fill","cup-line","currency-fill","currency-line","cursor-fill","cursor-line","custom-size","customer-service-2-fill","customer-service-2-line","customer-service-fill","customer-service-line","dashboard-2-fill","dashboard-2-line","dashboard-3-fill","dashboard-3-line","dashboard-fill","dashboard-horizontal-fill","dashboard-horizontal-line","dashboard-line","database-2-fill","database-2-line","database-fill","database-line","delete-back-2-fill","delete-back-2-line","delete-back-fill","delete-back-line","delete-bin-2-fill","delete-bin-2-line","delete-bin-3-fill","delete-bin-3-line","delete-bin-4-fill","delete-bin-4-line","delete-bin-5-fill","delete-bin-5-line","delete-bin-6-fill","delete-bin-6-line","delete-bin-7-fill","delete-bin-7-line","delete-bin-fill","delete-bin-line","delete-column","delete-row","device-fill","device-line","device-recover-fill","device-recover-line","diamond-fill","diamond-line","diamond-ring-fill","diamond-ring-line","dice-1-fill","dice-1-line","dice-2-fill","dice-2-line","dice-3-fill","dice-3-line","dice-4-fill","dice-4-line","dice-5-fill","dice-5-line","dice-6-fill","dice-6-line","dice-fill","dice-line","dingding-fill","dingding-line","direction-fill","direction-line","disc-fill","disc-line","discord-fill","discord-line","discount-percent-fill","discount-percent-line","discuss-fill","discuss-line","dislike-fill","dislike-line","disqus-fill","disqus-line","divide-fill","divide-line","dna-fill","dna-line","donut-chart-fill","donut-chart-line","door-closed-fill","door-closed-line","door-fill","door-line","door-lock-box-fill","door-lock-box-line","door-lock-fill","door-lock-line","door-open-fill","door-open-line","dossier-fill","dossier-line","douban-fill","douban-line","double-quotes-l","double-quotes-r","download-2-fill","download-2-line","download-cloud-2-fill","download-cloud-2-line","download-cloud-fill","download-cloud-line","download-fill","download-line","draft-fill","draft-line","drag-drop-fill","drag-drop-line","drag-move-2-fill","drag-move-2-line","drag-move-fill","drag-move-line","draggable","dribbble-fill","dribbble-line","drinks-2-fill","drinks-2-line","drinks-fill","drinks-line","drive-fill","drive-line","drizzle-fill","drizzle-line","drop-fill","drop-line","dropbox-fill","dropbox-line","dropdown-list","dropper-fill","dropper-line","dual-sim-1-fill","dual-sim-1-line","dual-sim-2-fill","dual-sim-2-line","dv-fill","dv-line","dvd-ai-fill","dvd-ai-line","dvd-fill","dvd-line","e-bike-2-fill","e-bike-2-line","e-bike-fill","e-bike-line","earth-fill","earth-line","earthquake-fill","earthquake-line","edge-fill","edge-line","edge-new-fill","edge-new-line","edit-2-fill","edit-2-line","edit-box-fill","edit-box-line","edit-circle-fill","edit-circle-line","edit-fill","edit-line","eject-fill","eject-line","emoji-sticker-fill","emoji-sticker-line","emotion-2-fill","emotion-2-line","emotion-fill","emotion-happy-fill","emotion-happy-line","emotion-laugh-fill","emotion-laugh-line","emotion-line","emotion-normal-fill","emotion-normal-line","emotion-sad-fill","emotion-sad-line","emotion-unhappy-fill","emotion-unhappy-line","empathize-fill","empathize-line","emphasis","emphasis-cn","english-input","equal-fill","equal-line","equalizer-2-fill","equalizer-2-line","equalizer-3-fill","equalizer-3-line","equalizer-fill","equalizer-line","eraser-fill","eraser-line","error-warning-fill","error-warning-line","eth-fill","eth-line","evernote-fill","evernote-line","exchange-2-fill","exchange-2-line","exchange-box-fill","exchange-box-line","exchange-cny-fill","exchange-cny-line","exchange-dollar-fill","exchange-dollar-line","exchange-fill","exchange-funds-fill","exchange-funds-line","exchange-line","expand-diagonal-2-fill","expand-diagonal-2-line","expand-diagonal-fill","expand-diagonal-line","expand-diagonal-s-2-fill","expand-diagonal-s-2-line","expand-diagonal-s-fill","expand-diagonal-s-line","expand-height-fill","expand-height-line","expand-horizontal-fill","expand-horizontal-line","expand-horizontal-s-fill","expand-horizontal-s-line","expand-left-fill","expand-left-line","expand-left-right-fill","expand-left-right-line","expand-right-fill","expand-right-line","expand-up-down-fill","expand-up-down-line","expand-vertical-fill","expand-vertical-line","expand-vertical-s-fill","expand-vertical-s-line","expand-width-fill","expand-width-line","export-fill","export-line","external-link-fill","external-link-line","eye-2-fill","eye-2-line","eye-close-fill","eye-close-line","eye-fill","eye-line","eye-off-fill","eye-off-line","facebook-box-fill","facebook-box-line","facebook-circle-fill","facebook-circle-line","facebook-fill","facebook-line","fahrenheit-fill","fahrenheit-line","fediverse-fill","fediverse-line","feedback-fill","feedback-line","figma-fill","figma-line","file-2-fill","file-2-line","file-3-fill","file-3-line","file-4-fill","file-4-line","file-add-fill","file-add-line","file-chart-2-fill","file-chart-2-line","file-chart-fill","file-chart-line","file-check-fill","file-check-line","file-close-fill","file-close-line","file-cloud-fill","file-cloud-line","file-code-fill","file-code-line","file-copy-2-fill","file-copy-2-line","file-copy-fill","file-copy-line","file-damage-fill","file-damage-line","file-download-fill","file-download-line","file-edit-fill","file-edit-line","file-excel-2-fill","file-excel-2-line","file-excel-fill","file-excel-line","file-fill","file-forbid-fill","file-forbid-line","file-gif-fill","file-gif-line","file-history-fill","file-history-line","file-hwp-fill","file-hwp-line","file-image-fill","file-image-line","file-info-fill","file-info-line","file-line","file-list-2-fill","file-list-2-line","file-list-3-fill","file-list-3-line","file-list-fill","file-list-line","file-lock-fill","file-lock-line","file-marked-fill","file-marked-line","file-music-fill","file-music-line","file-paper-2-fill","file-paper-2-line","file-paper-fill","file-paper-line","file-pdf-2-fill","file-pdf-2-line","file-pdf-fill","file-pdf-line","file-ppt-2-fill","file-ppt-2-line","file-ppt-fill","file-ppt-line","file-reduce-fill","file-reduce-line","file-search-fill","file-search-line","file-settings-fill","file-settings-line","file-shield-2-fill","file-shield-2-line","file-shield-fill","file-shield-line","file-shred-fill","file-shred-line","file-text-fill","file-text-line","file-transfer-fill","file-transfer-line","file-unknow-fill","file-unknow-line","file-upload-fill","file-upload-line","file-user-fill","file-user-line","file-video-fill","file-video-line","file-warning-fill","file-warning-line","file-word-2-fill","file-word-2-line","file-word-fill","file-word-line","file-zip-fill","file-zip-line","film-ai-fill","film-ai-line","film-fill","film-line","filter-2-fill","filter-2-line","filter-3-fill","filter-3-line","filter-fill","filter-line","filter-off-fill","filter-off-line","find-replace-fill","find-replace-line","finder-fill","finder-line","fingerprint-2-fill","fingerprint-2-line","fingerprint-fill","fingerprint-line","fire-fill","fire-line","firebase-fill","firebase-line","firefox-browser-fill","firefox-browser-line","firefox-fill","firefox-line","first-aid-kit-fill","first-aid-kit-line","flag-2-fill","flag-2-line","flag-fill","flag-line","flag-off-fill","flag-off-line","flashlight-fill","flashlight-line","flask-fill","flask-line","flickr-fill","flickr-line","flight-land-fill","flight-land-line","flight-takeoff-fill","flight-takeoff-line","flip-horizontal-2-fill","flip-horizontal-2-line","flip-horizontal-fill","flip-horizontal-line","flip-vertical-2-fill","flip-vertical-2-line","flip-vertical-fill","flip-vertical-line","flood-fill","flood-line","flow-chart","flower-fill","flower-line","flutter-fill","flutter-line","focus-2-fill","focus-2-line","focus-3-fill","focus-3-line","focus-fill","focus-line","focus-mode","foggy-fill","foggy-line","folder-2-fill","folder-2-line","folder-3-fill","folder-3-line","folder-4-fill","folder-4-line","folder-5-fill","folder-5-line","folder-6-fill","folder-6-line","folder-add-fill","folder-add-line","folder-chart-2-fill","folder-chart-2-line","folder-chart-fill","folder-chart-line","folder-check-fill","folder-check-line","folder-close-fill","folder-close-line","folder-cloud-fill","folder-cloud-line","folder-download-fill","folder-download-line","folder-fill","folder-forbid-fill","folder-forbid-line","folder-history-fill","folder-history-line","folder-image-fill","folder-image-line","folder-info-fill","folder-info-line","folder-keyhole-fill","folder-keyhole-line","folder-line","folder-lock-fill","folder-lock-line","folder-music-fill","folder-music-line","folder-open-fill","folder-open-line","folder-received-fill","folder-received-line","folder-reduce-fill","folder-reduce-line","folder-settings-fill","folder-settings-line","folder-shared-fill","folder-shared-line","folder-shield-2-fill","folder-shield-2-line","folder-shield-fill","folder-shield-line","folder-transfer-fill","folder-transfer-line","folder-unknow-fill","folder-unknow-line","folder-upload-fill","folder-upload-line","folder-user-fill","folder-user-line","folder-video-fill","folder-video-line","folder-warning-fill","folder-warning-line","folder-zip-fill","folder-zip-line","folders-fill","folders-line","font-color","font-family","font-mono","font-sans","font-sans-serif","font-size","font-size-2","font-size-ai","football-fill","football-line","footprint-fill","footprint-line","forbid-2-fill","forbid-2-line","forbid-fill","forbid-line","format-clear","formula","forward-10-fill","forward-10-line","forward-15-fill","forward-15-line","forward-30-fill","forward-30-line","forward-5-fill","forward-5-line","forward-end-fill","forward-end-line","forward-end-mini-fill","forward-end-mini-line","fridge-fill","fridge-line","friendica-fill","friendica-line","fullscreen-exit-fill","fullscreen-exit-line","fullscreen-fill","fullscreen-line","function-add-fill","function-add-line","function-fill","function-line","functions","funds-box-fill","funds-box-line","funds-fill","funds-line","gallery-fill","gallery-line","gallery-upload-fill","gallery-upload-line","gallery-view","gallery-view-2","game-fill","game-line","gamepad-fill","gamepad-line","gas-station-fill","gas-station-line","gatsby-fill","gatsby-line","gemini-fill","gemini-line","genderless-fill","genderless-line","ghost-2-fill","ghost-2-line","ghost-fill","ghost-line","ghost-smile-fill","ghost-smile-line","gift-2-fill","gift-2-line","gift-fill","gift-line","git-branch-fill","git-branch-line","git-close-pull-request-fill","git-close-pull-request-line","git-commit-fill","git-commit-line","git-fork-fill","git-fork-line","git-merge-fill","git-merge-line","git-pr-draft-fill","git-pr-draft-line","git-pull-request-fill","git-pull-request-line","git-repository-commits-fill","git-repository-commits-line","git-repository-fill","git-repository-line","git-repository-private-fill","git-repository-private-line","github-fill","github-line","gitlab-fill","gitlab-line","glasses-2-fill","glasses-2-line","glasses-fill","glasses-line","global-fill","global-line","globe-fill","globe-line","goblet-2-fill","goblet-2-line","goblet-fill","goblet-line","goggles-fill","goggles-line","golf-ball-fill","golf-ball-line","google-fill","google-line","google-play-fill","google-play-line","government-fill","government-line","gps-fill","gps-line","gradienter-fill","gradienter-line","graduation-cap-fill","graduation-cap-line","grid-fill","grid-line","group-2-fill","group-2-line","group-3-fill","group-3-line","group-fill","group-line","guide-fill","guide-line","h-1","h-2","h-3","h-4","h-5","h-6","hail-fill","hail-line","hammer-fill","hammer-line","hand","hand-coin-fill","hand-coin-line","hand-heart-fill","hand-heart-line","hand-sanitizer-fill","hand-sanitizer-line","handbag-fill","handbag-line","hard-drive-2-fill","hard-drive-2-line","hard-drive-3-fill","hard-drive-3-line","hard-drive-fill","hard-drive-line","hashtag","haze-2-fill","haze-2-line","haze-fill","haze-line","hd-fill","hd-line","heading","headphone-fill","headphone-line","health-book-fill","health-book-line","heart-2-fill","heart-2-line","heart-3-fill","heart-3-line","heart-add-2-fill","heart-add-2-line","heart-add-fill","heart-add-line","heart-fill","heart-line","heart-pulse-fill","heart-pulse-line","hearts-fill","hearts-line","heavy-showers-fill","heavy-showers-line","hexagon-fill","hexagon-line","history-fill","history-line","home-2-fill","home-2-line","home-3-fill","home-3-line","home-4-fill","home-4-line","home-5-fill","home-5-line","home-6-fill","home-6-line","home-7-fill","home-7-line","home-8-fill","home-8-line","home-9-fill","home-9-line","home-fill","home-gear-fill","home-gear-line","home-heart-fill","home-heart-line","home-line","home-office-fill","home-office-line","home-smile-2-fill","home-smile-2-line","home-smile-fill","home-smile-line","home-wifi-fill","home-wifi-line","honor-of-kings-fill","honor-of-kings-line","honour-fill","honour-line","hospital-fill","hospital-line","hotel-bed-fill","hotel-bed-line","hotel-fill","hotel-line","hotspot-fill","hotspot-line","hourglass-2-fill","hourglass-2-line","hourglass-fill","hourglass-line","hq-fill","hq-line","html5-fill","html5-line","id-card-fill","id-card-line","ie-fill","ie-line","image-2-fill","image-2-line","image-add-fill","image-add-line","image-ai-fill","image-ai-line","image-circle-ai-fill","image-circle-ai-line","image-circle-fill","image-circle-line","image-edit-fill","image-edit-line","image-fill","image-line","import-fill","import-line","inbox-2-fill","inbox-2-line","inbox-archive-fill","inbox-archive-line","inbox-fill","inbox-line","inbox-unarchive-fill","inbox-unarchive-line","increase-decrease-fill","increase-decrease-line","indent-decrease","indent-increase","indeterminate-circle-fill","indeterminate-circle-line","infinity-fill","infinity-line","info-card-fill","info-card-line","info-i","information-2-fill","information-2-line","information-fill","information-line","information-off-fill","information-off-line","infrared-thermometer-fill","infrared-thermometer-line","ink-bottle-fill","ink-bottle-line","input-cursor-move","input-field","input-method-fill","input-method-line","insert-column-left","insert-column-right","insert-row-bottom","insert-row-top","instagram-fill","instagram-line","install-fill","install-line","instance-fill","instance-line","invision-fill","invision-line","italic","java-fill","java-line","javascript-fill","javascript-line","jewelry-fill","jewelry-line","kakao-talk-fill","kakao-talk-line","kanban-view","kanban-view-2","key-2-fill","key-2-line","key-fill","key-line","keyboard-box-fill","keyboard-box-line","keyboard-fill","keyboard-line","keynote-fill","keynote-line","kick-fill","kick-line","knife-blood-fill","knife-blood-line","knife-fill","knife-line","landscape-ai-fill","landscape-ai-line","landscape-fill","landscape-line","layout-2-fill","layout-2-line","layout-3-fill","layout-3-line","layout-4-fill","layout-4-line","layout-5-fill","layout-5-line","layout-6-fill","layout-6-line","layout-bottom-2-fill","layout-bottom-2-line","layout-bottom-fill","layout-bottom-line","layout-column-fill","layout-column-line","layout-fill","layout-grid-2-fill","layout-grid-2-line","layout-grid-fill","layout-grid-line","layout-horizontal-fill","layout-horizontal-line","layout-left-2-fill","layout-left-2-line","layout-left-fill","layout-left-line","layout-line","layout-masonry-fill","layout-masonry-line","layout-right-2-fill","layout-right-2-line","layout-right-fill","layout-right-line","layout-row-fill","layout-row-line","layout-top-2-fill","layout-top-2-line","layout-top-fill","layout-top-line","layout-vertical-fill","layout-vertical-line","leaf-fill","leaf-line","letter-spacing-2","lifebuoy-fill","lifebuoy-line","lightbulb-fill","lightbulb-flash-fill","lightbulb-flash-line","lightbulb-line","line-chart-fill","line-chart-line","line-fill","line-height","line-height-2","line-line","link","link-m","link-unlink","link-unlink-m","linkedin-box-fill","linkedin-box-line","linkedin-fill","linkedin-line","links-fill","links-line","list-check","list-check-2","list-check-3","list-indefinite","list-ordered","list-ordered-2","list-radio","list-settings-fill","list-settings-line","list-unordered","list-view","live-fill","live-line","loader-2-fill","loader-2-line","loader-3-fill","loader-3-line","loader-4-fill","loader-4-line","loader-5-fill","loader-5-line","loader-fill","loader-line","lock-2-fill","lock-2-line","lock-fill","lock-line","lock-password-fill","lock-password-line","lock-star-fill","lock-star-line","lock-unlock-fill","lock-unlock-line","login-box-fill","login-box-line","login-circle-fill","login-circle-line","logout-box-fill","logout-box-line","logout-box-r-fill","logout-box-r-line","logout-circle-fill","logout-circle-line","logout-circle-r-fill","logout-circle-r-line","loop-left-fill","loop-left-line","loop-right-fill","loop-right-line","luggage-cart-fill","luggage-cart-line","luggage-deposit-fill","luggage-deposit-line","lungs-fill","lungs-line","mac-fill","mac-line","macbook-fill","macbook-line","magic-fill","magic-line","mail-add-fill","mail-add-line","mail-ai-fill","mail-ai-line","mail-check-fill","mail-check-line","mail-close-fill","mail-close-line","mail-download-fill","mail-download-line","mail-fill","mail-forbid-fill","mail-forbid-line","mail-line","mail-lock-fill","mail-lock-line","mail-open-fill","mail-open-line","mail-send-fill","mail-send-line","mail-settings-fill","mail-settings-line","mail-star-fill","mail-star-line","mail-unread-fill","mail-unread-line","mail-volume-fill","mail-volume-line","map-2-fill","map-2-line","map-fill","map-line","map-pin-2-fill","map-pin-2-line","map-pin-3-fill","map-pin-3-line","map-pin-4-fill","map-pin-4-line","map-pin-5-fill","map-pin-5-line","map-pin-add-fill","map-pin-add-line","map-pin-fill","map-pin-line","map-pin-range-fill","map-pin-range-line","map-pin-time-fill","map-pin-time-line","map-pin-user-fill","map-pin-user-line","mark-pen-fill","mark-pen-line","markdown-fill","markdown-line","markup-fill","markup-line","mastercard-fill","mastercard-line","mastodon-fill","mastodon-line","medal-2-fill","medal-2-line","medal-fill","medal-line","medicine-bottle-fill","medicine-bottle-line","medium-fill","medium-line","megaphone-fill","megaphone-line","memories-fill","memories-line","men-fill","men-line","mental-health-fill","mental-health-line","menu-2-fill","menu-2-line","menu-3-fill","menu-3-line","menu-4-fill","menu-4-line","menu-5-fill","menu-5-line","menu-add-fill","menu-add-line","menu-fill","menu-fold-2-fill","menu-fold-2-line","menu-fold-3-fill","menu-fold-3-line","menu-fold-4-fill","menu-fold-4-line","menu-fold-fill","menu-fold-line","menu-line","menu-search-fill","menu-search-line","menu-unfold-2-fill","menu-unfold-2-line","menu-unfold-3-fill","menu-unfold-3-line","menu-unfold-4-fill","menu-unfold-4-line","menu-unfold-fill","menu-unfold-line","merge-cells-horizontal","merge-cells-vertical","message-2-fill","message-2-line","message-3-fill","message-3-line","message-fill","message-line","messenger-fill","messenger-line","meta-fill","meta-line","meteor-fill","meteor-line","mic-2-ai-fill","mic-2-ai-line","mic-2-fill","mic-2-line","mic-ai-fill","mic-ai-line","mic-fill","mic-line","mic-off-fill","mic-off-line","mickey-fill","mickey-line","microscope-fill","microscope-line","microsoft-fill","microsoft-line","microsoft-loop-fill","microsoft-loop-line","mind-map","mini-program-fill","mini-program-line","mist-fill","mist-line","mixtral-fill","mixtral-line","mobile-download-fill","mobile-download-line","money-cny-box-fill","money-cny-box-line","money-cny-circle-fill","money-cny-circle-line","money-dollar-box-fill","money-dollar-box-line","money-dollar-circle-fill","money-dollar-circle-line","money-euro-box-fill","money-euro-box-line","money-euro-circle-fill","money-euro-circle-line","money-pound-box-fill","money-pound-box-line","money-pound-circle-fill","money-pound-circle-line","money-rupee-circle-fill","money-rupee-circle-line","moon-clear-fill","moon-clear-line","moon-cloudy-fill","moon-cloudy-line","moon-fill","moon-foggy-fill","moon-foggy-line","moon-line","more-2-fill","more-2-line","more-fill","more-line","motorbike-fill","motorbike-line","mouse-fill","mouse-line","movie-2-ai-fill","movie-2-ai-line","movie-2-fill","movie-2-line","movie-ai-fill","movie-ai-line","movie-fill","movie-line","multi-image-fill","multi-image-line","music-2-fill","music-2-line","music-ai-fill","music-ai-line","music-fill","music-line","mv-ai-fill","mv-ai-line","mv-fill","mv-line","navigation-fill","navigation-line","netease-cloud-music-fill","netease-cloud-music-line","netflix-fill","netflix-line","news-fill","news-line","newspaper-fill","newspaper-line","nextjs-fill","nextjs-line","nft-fill","nft-line","no-credit-card-fill","no-credit-card-line","node-tree","nodejs-fill","nodejs-line","notification-2-fill","notification-2-line","notification-3-fill","notification-3-line","notification-4-fill","notification-4-line","notification-badge-fill","notification-badge-line","notification-fill","notification-line","notification-off-fill","notification-off-line","notification-snooze-fill","notification-snooze-line","notion-fill","notion-line","npmjs-fill","npmjs-line","number-0","number-1","number-2","number-3","number-4","number-5","number-6","number-7","number-8","number-9","numbers-fill","numbers-line","nurse-fill","nurse-line","octagon-fill","octagon-line","oil-fill","oil-line","omega","open-arm-fill","open-arm-line","open-source-fill","open-source-line","openai-fill","openai-line","openbase-fill","openbase-line","opera-fill","opera-line","order-play-fill","order-play-line","organization-chart","outlet-2-fill","outlet-2-line","outlet-fill","outlet-line","overline","p2p-fill","p2p-line","page-separator","pages-fill","pages-line","paint-brush-fill","paint-brush-line","paint-fill","paint-line","palette-fill","palette-line","pantone-fill","pantone-line","paragraph","parent-fill","parent-line","parentheses-fill","parentheses-line","parking-box-fill","parking-box-line","parking-fill","parking-line","pass-expired-fill","pass-expired-line","pass-pending-fill","pass-pending-line","pass-valid-fill","pass-valid-line","passport-fill","passport-line","patreon-fill","patreon-line","pause-circle-fill","pause-circle-line","pause-fill","pause-large-fill","pause-large-line","pause-line","pause-mini-fill","pause-mini-line","paypal-fill","paypal-line","pen-nib-fill","pen-nib-line","pencil-fill","pencil-line","pencil-ruler-2-fill","pencil-ruler-2-line","pencil-ruler-fill","pencil-ruler-line","pentagon-fill","pentagon-line","percent-fill","percent-line","perplexity-fill","perplexity-line","phone-camera-fill","phone-camera-line","phone-fill","phone-find-fill","phone-find-line","phone-line","phone-lock-fill","phone-lock-line","php-fill","php-line","picture-in-picture-2-fill","picture-in-picture-2-line","picture-in-picture-exit-fill","picture-in-picture-exit-line","picture-in-picture-fill","picture-in-picture-line","pie-chart-2-fill","pie-chart-2-line","pie-chart-box-fill","pie-chart-box-line","pie-chart-fill","pie-chart-line","pin-distance-fill","pin-distance-line","ping-pong-fill","ping-pong-line","pinterest-fill","pinterest-line","pinyin-input","pix-fill","pix-line","pixelfed-fill","pixelfed-line","plane-fill","plane-line","planet-fill","planet-line","plant-fill","plant-line","play-circle-fill","play-circle-line","play-fill","play-large-fill","play-large-line","play-line","play-list-2-fill","play-list-2-line","play-list-add-fill","play-list-add-line","play-list-fill","play-list-line","play-mini-fill","play-mini-line","play-reverse-fill","play-reverse-large-fill","play-reverse-large-line","play-reverse-line","play-reverse-mini-fill","play-reverse-mini-line","playstation-fill","playstation-line","plug-2-fill","plug-2-line","plug-fill","plug-line","poker-clubs-fill","poker-clubs-line","poker-diamonds-fill","poker-diamonds-line","poker-hearts-fill","poker-hearts-line","poker-spades-fill","poker-spades-line","polaroid-2-fill","polaroid-2-line","polaroid-fill","polaroid-line","police-badge-fill","police-badge-line","police-car-fill","police-car-line","presentation-fill","presentation-line","price-tag-2-fill","price-tag-2-line","price-tag-3-fill","price-tag-3-line","price-tag-fill","price-tag-line","printer-cloud-fill","printer-cloud-line","printer-fill","printer-line","product-hunt-fill","product-hunt-line","profile-fill","profile-line","progress-1-fill","progress-1-line","progress-2-fill","progress-2-line","progress-3-fill","progress-3-line","progress-4-fill","progress-4-line","progress-5-fill","progress-5-line","progress-6-fill","progress-6-line","progress-7-fill","progress-7-line","progress-8-fill","progress-8-line","prohibited-2-fill","prohibited-2-line","prohibited-fill","prohibited-line","projector-2-fill","projector-2-line","projector-fill","projector-line","psychotherapy-fill","psychotherapy-line","pulse-ai-fill","pulse-ai-line","pulse-fill","pulse-line","pushpin-2-fill","pushpin-2-line","pushpin-fill","pushpin-line","puzzle-2-fill","puzzle-2-line","puzzle-fill","puzzle-line","qq-fill","qq-line","qr-code-fill","qr-code-line","qr-scan-2-fill","qr-scan-2-line","qr-scan-fill","qr-scan-line","question-answer-fill","question-answer-line","question-fill","question-line","question-mark","questionnaire-fill","questionnaire-line","quill-pen-ai-fill","quill-pen-ai-line","quill-pen-fill","quill-pen-line","quote-text","radar-fill","radar-line","radio-2-fill","radio-2-line","radio-button-fill","radio-button-line","radio-fill","radio-line","rainbow-fill","rainbow-line","rainy-fill","rainy-line","ram-2-fill","ram-2-line","ram-fill","ram-line","reactjs-fill","reactjs-line","receipt-fill","receipt-line","record-circle-fill","record-circle-line","record-mail-fill","record-mail-line","rectangle-fill","rectangle-line","recycle-fill","recycle-line","red-packet-fill","red-packet-line","reddit-fill","reddit-line","refresh-fill","refresh-line","refund-2-fill","refund-2-line","refund-fill","refund-line","registered-fill","registered-line","remix-run-fill","remix-run-line","remixicon-fill","remixicon-line","remote-control-2-fill","remote-control-2-line","remote-control-fill","remote-control-line","repeat-2-fill","repeat-2-line","repeat-fill","repeat-line","repeat-one-fill","repeat-one-line","replay-10-fill","replay-10-line","replay-15-fill","replay-15-line","replay-30-fill","replay-30-line","replay-5-fill","replay-5-line","reply-all-fill","reply-all-line","reply-fill","reply-line","reserved-fill","reserved-line","reset-left-fill","reset-left-line","reset-right-fill","reset-right-line","rest-time-fill","rest-time-line","restart-fill","restart-line","restaurant-2-fill","restaurant-2-line","restaurant-fill","restaurant-line","rewind-fill","rewind-line","rewind-mini-fill","rewind-mini-line","rewind-start-fill","rewind-start-line","rewind-start-mini-fill","rewind-start-mini-line","rfid-fill","rfid-line","rhythm-fill","rhythm-line","riding-fill","riding-line","road-map-fill","road-map-line","roadster-fill","roadster-line","robot-2-fill","robot-2-line","robot-3-fill","robot-3-line","robot-fill","robot-line","rocket-2-fill","rocket-2-line","rocket-fill","rocket-line","rotate-lock-fill","rotate-lock-line","rounded-corner","route-fill","route-line","router-fill","router-line","rss-fill","rss-line","ruler-2-fill","ruler-2-line","ruler-fill","ruler-line","run-fill","run-line","safari-fill","safari-line","safe-2-fill","safe-2-line","safe-3-fill","safe-3-line","safe-fill","safe-line","sailboat-fill","sailboat-line","save-2-fill","save-2-line","save-3-fill","save-3-line","save-fill","save-line","scales-2-fill","scales-2-line","scales-3-fill","scales-3-line","scales-fill","scales-line","scan-2-fill","scan-2-line","scan-fill","scan-line","school-fill","school-line","scissors-2-fill","scissors-2-line","scissors-cut-fill","scissors-cut-line","scissors-fill","scissors-line","screenshot-2-fill","screenshot-2-line","screenshot-fill","screenshot-line","scroll-to-bottom-fill","scroll-to-bottom-line","sd-card-fill","sd-card-line","sd-card-mini-fill","sd-card-mini-line","search-2-fill","search-2-line","search-eye-fill","search-eye-line","search-fill","search-line","secure-payment-fill","secure-payment-line","seedling-fill","seedling-line","send-backward","send-plane-2-fill","send-plane-2-line","send-plane-fill","send-plane-line","send-to-back","sensor-fill","sensor-line","seo-fill","seo-line","separator","server-fill","server-line","service-bell-fill","service-bell-line","service-fill","service-line","settings-2-fill","settings-2-line","settings-3-fill","settings-3-line","settings-4-fill","settings-4-line","settings-5-fill","settings-5-line","settings-6-fill","settings-6-line","settings-fill","settings-line","shadow-fill","shadow-line","shake-hands-fill","shake-hands-line","shape-2-fill","shape-2-line","shape-fill","shape-line","shapes-fill","shapes-line","share-2-fill","share-2-line","share-box-fill","share-box-line","share-circle-fill","share-circle-line","share-fill","share-forward-2-fill","share-forward-2-line","share-forward-box-fill","share-forward-box-line","share-forward-fill","share-forward-line","share-line","shield-check-fill","shield-check-line","shield-cross-fill","shield-cross-line","shield-fill","shield-flash-fill","shield-flash-line","shield-keyhole-fill","shield-keyhole-line","shield-line","shield-star-fill","shield-star-line","shield-user-fill","shield-user-line","shining-2-fill","shining-2-line","shining-fill","shining-line","ship-2-fill","ship-2-line","ship-fill","ship-line","shirt-fill","shirt-line","shopping-bag-2-fill","shopping-bag-2-line","shopping-bag-3-fill","shopping-bag-3-line","shopping-bag-4-fill","shopping-bag-4-line","shopping-bag-fill","shopping-bag-line","shopping-basket-2-fill","shopping-basket-2-line","shopping-basket-fill","shopping-basket-line","shopping-cart-2-fill","shopping-cart-2-line","shopping-cart-fill","shopping-cart-line","showers-fill","showers-line","shuffle-fill","shuffle-line","shut-down-fill","shut-down-line","side-bar-fill","side-bar-line","sidebar-fold-fill","sidebar-fold-line","sidebar-unfold-fill","sidebar-unfold-line","signal-tower-fill","signal-tower-line","signal-wifi-1-fill","signal-wifi-1-line","signal-wifi-2-fill","signal-wifi-2-line","signal-wifi-3-fill","signal-wifi-3-line","signal-wifi-error-fill","signal-wifi-error-line","signal-wifi-fill","signal-wifi-line","signal-wifi-off-fill","signal-wifi-off-line","signpost-fill","signpost-line","sim-card-2-fill","sim-card-2-line","sim-card-fill","sim-card-line","single-quotes-l","single-quotes-r","sip-fill","sip-line","sketching","skip-back-fill","skip-back-line","skip-back-mini-fill","skip-back-mini-line","skip-down-fill","skip-down-line","skip-forward-fill","skip-forward-line","skip-forward-mini-fill","skip-forward-mini-line","skip-left-fill","skip-left-line","skip-right-fill","skip-right-line","skip-up-fill","skip-up-line","skull-2-fill","skull-2-line","skull-fill","skull-line","skype-fill","skype-line","slack-fill","slack-line","slash-commands","slash-commands-2","slice-fill","slice-line","slideshow-2-fill","slideshow-2-line","slideshow-3-fill","slideshow-3-line","slideshow-4-fill","slideshow-4-line","slideshow-fill","slideshow-line","slideshow-view","slow-down-fill","slow-down-line","smartphone-fill","smartphone-line","snapchat-fill","snapchat-line","snowflake-fill","snowflake-line","snowy-fill","snowy-line","sofa-fill","sofa-line","sort-alphabet-asc","sort-alphabet-desc","sort-asc","sort-desc","sort-number-asc","sort-number-desc","sound-module-fill","sound-module-line","soundcloud-fill","soundcloud-line","space","space-ship-fill","space-ship-line","spam-2-fill","spam-2-line","spam-3-fill","spam-3-line","spam-fill","spam-line","sparkling-2-fill","sparkling-2-line","sparkling-fill","sparkling-line","speak-ai-fill","speak-ai-line","speak-fill","speak-line","speaker-2-fill","speaker-2-line","speaker-3-fill","speaker-3-line","speaker-fill","speaker-line","spectrum-fill","spectrum-line","speed-fill","speed-line","speed-mini-fill","speed-mini-line","speed-up-fill","speed-up-line","split-cells-horizontal","split-cells-vertical","spotify-fill","spotify-line","spy-fill","spy-line","square-fill","square-line","square-root","stack-fill","stack-line","stack-overflow-fill","stack-overflow-line","stacked-view","stackshare-fill","stackshare-line","stairs-fill","stairs-line","star-fill","star-half-fill","star-half-line","star-half-s-fill","star-half-s-line","star-line","star-off-fill","star-off-line","star-s-fill","star-s-line","star-smile-fill","star-smile-line","steam-fill","steam-line","steering-2-fill","steering-2-line","steering-fill","steering-line","stethoscope-fill","stethoscope-line","sticky-note-2-fill","sticky-note-2-line","sticky-note-add-fill","sticky-note-add-line","sticky-note-fill","sticky-note-line","stock-fill","stock-line","stop-circle-fill","stop-circle-line","stop-fill","stop-large-fill","stop-large-line","stop-line","stop-mini-fill","stop-mini-line","store-2-fill","store-2-line","store-3-fill","store-3-line","store-fill","store-line","strikethrough","strikethrough-2","subscript","subscript-2","subtract-fill","subtract-line","subway-fill","subway-line","subway-wifi-fill","subway-wifi-line","suitcase-2-fill","suitcase-2-line","suitcase-3-fill","suitcase-3-line","suitcase-fill","suitcase-line","sun-cloudy-fill","sun-cloudy-line","sun-fill","sun-foggy-fill","sun-foggy-line","sun-line","supabase-fill","supabase-line","superscript","superscript-2","surgical-mask-fill","surgical-mask-line","surround-sound-fill","surround-sound-line","survey-fill","survey-line","svelte-fill","svelte-line","swap-2-fill","swap-2-line","swap-3-fill","swap-3-line","swap-box-fill","swap-box-line","swap-fill","swap-line","switch-fill","switch-line","sword-fill","sword-line","syringe-fill","syringe-line","t-box-fill","t-box-line","t-shirt-2-fill","t-shirt-2-line","t-shirt-air-fill","t-shirt-air-line","t-shirt-fill","t-shirt-line","table-2","table-3","table-alt-fill","table-alt-line","table-fill","table-line","table-view","tablet-fill","tablet-line","tailwind-css-fill","tailwind-css-line","takeaway-fill","takeaway-line","taobao-fill","taobao-line","tape-fill","tape-line","task-fill","task-line","taxi-fill","taxi-line","taxi-wifi-fill","taxi-wifi-line","team-fill","team-line","telegram-2-fill","telegram-2-line","telegram-fill","telegram-line","temp-cold-fill","temp-cold-line","temp-hot-fill","temp-hot-line","tent-fill","tent-line","terminal-box-fill","terminal-box-line","terminal-fill","terminal-line","terminal-window-fill","terminal-window-line","test-tube-fill","test-tube-line","text","text-block","text-direction-l","text-direction-r","text-snippet","text-spacing","text-wrap","thermometer-fill","thermometer-line","threads-fill","threads-line","thumb-down-fill","thumb-down-line","thumb-up-fill","thumb-up-line","thunderstorms-fill","thunderstorms-line","ticket-2-fill","ticket-2-line","ticket-fill","ticket-line","tiktok-fill","tiktok-line","time-fill","time-line","time-zone-fill","time-zone-line","timeline-view","timer-2-fill","timer-2-line","timer-fill","timer-flash-fill","timer-flash-line","timer-line","todo-fill","todo-line","toggle-fill","toggle-line","token-swap-fill","token-swap-line","tools-fill","tools-line","tooth-fill","tooth-line","tornado-fill","tornado-line","trademark-fill","trademark-line","traffic-light-fill","traffic-light-line","train-fill","train-line","train-wifi-fill","train-wifi-line","translate","translate-2","translate-ai","translate-ai-2","travesti-fill","travesti-line","treasure-map-fill","treasure-map-line","tree-fill","tree-line","trello-fill","trello-line","triangle-fill","triangle-line","triangular-flag-fill","triangular-flag-line","trophy-fill","trophy-line","truck-fill","truck-line","tumblr-fill","tumblr-line","tv-2-fill","tv-2-line","tv-fill","tv-line","twitch-fill","twitch-line","twitter-fill","twitter-line","twitter-x-fill","twitter-x-line","typhoon-fill","typhoon-line","u-disk-fill","u-disk-line","ubuntu-fill","ubuntu-line","umbrella-fill","umbrella-line","underline","uninstall-fill","uninstall-line","unpin-fill","unpin-line","unsplash-fill","unsplash-line","upload-2-fill","upload-2-line","upload-cloud-2-fill","upload-cloud-2-line","upload-cloud-fill","upload-cloud-line","upload-fill","upload-line","usb-fill","usb-line","user-2-fill","user-2-line","user-3-fill","user-3-line","user-4-fill","user-4-line","user-5-fill","user-5-line","user-6-fill","user-6-line","user-add-fill","user-add-line","user-community-fill","user-community-line","user-fill","user-follow-fill","user-follow-line","user-forbid-fill","user-forbid-line","user-heart-fill","user-heart-line","user-line","user-location-fill","user-location-line","user-minus-fill","user-minus-line","user-received-2-fill","user-received-2-line","user-received-fill","user-received-line","user-search-fill","user-search-line","user-settings-fill","user-settings-line","user-shared-2-fill","user-shared-2-line","user-shared-fill","user-shared-line","user-smile-fill","user-smile-line","user-star-fill","user-star-line","user-unfollow-fill","user-unfollow-line","user-voice-fill","user-voice-line","vercel-fill","vercel-line","verified-badge-fill","verified-badge-line","video-add-fill","video-add-line","video-ai-fill","video-ai-line","video-chat-fill","video-chat-line","video-download-fill","video-download-line","video-fill","video-line","video-off-fill","video-off-line","video-on-ai-fill","video-on-ai-line","video-on-fill","video-on-line","video-upload-fill","video-upload-line","vidicon-2-fill","vidicon-2-line","vidicon-fill","vidicon-line","vimeo-fill","vimeo-line","vip-crown-2-fill","vip-crown-2-line","vip-crown-fill","vip-crown-line","vip-diamond-fill","vip-diamond-line","vip-fill","vip-line","virus-fill","virus-line","visa-fill","visa-line","vk-fill","vk-line","voice-ai-fill","voice-ai-line","voice-recognition-fill","voice-recognition-line","voiceprint-fill","voiceprint-line","volume-down-fill","volume-down-line","volume-mute-fill","volume-mute-line","volume-off-vibrate-fill","volume-off-vibrate-line","volume-up-fill","volume-up-line","volume-vibrate-fill","volume-vibrate-line","vuejs-fill","vuejs-line","walk-fill","walk-line","wallet-2-fill","wallet-2-line","wallet-3-fill","wallet-3-line","wallet-fill","wallet-line","water-flash-fill","water-flash-line","water-percent-fill","water-percent-line","webcam-fill","webcam-line","webhook-fill","webhook-line","wechat-2-fill","wechat-2-line","wechat-channels-fill","wechat-channels-line","wechat-fill","wechat-line","wechat-pay-fill","wechat-pay-line","weibo-fill","weibo-line","weight-fill","weight-line","whatsapp-fill","whatsapp-line","wheelchair-fill","wheelchair-line","wifi-fill","wifi-line","wifi-off-fill","wifi-off-line","window-2-fill","window-2-line","window-fill","window-line","windows-fill","windows-line","windy-fill","windy-line","wireless-charging-fill","wireless-charging-line","women-fill","women-line","wordpress-fill","wordpress-line","wubi-input","xbox-fill","xbox-line","xing-fill","xing-line","xrp-fill","xrp-line","xtz-fill","xtz-line","youtube-fill","youtube-line","yuque-fill","yuque-line","zcool-fill","zcool-line","zhihu-fill","zhihu-line","zoom-in-fill","zoom-in-line","zoom-out-fill","zoom-out-line","zzz-fill","zzz-line"],Dl=[{id:"remix",prefix:"",name:"Remix Icon",license:"Apache-2.0",valueMode:"bare",localRemix:!0},{id:"ant-design",prefix:"ant-design",name:"Ant Design Icons",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/ant-design/icons.json")},{id:"ep",prefix:"ep",name:"Element Plus",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/ep/icons.json")},{id:"flagpack",prefix:"flagpack",name:"Flagpack",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/flagpack/icons.json")},{id:"icon-park",prefix:"icon-park",name:"IconPark",license:"Apache-2.0",valueMode:"prefixed",loader:()=>import("@iconify-json/icon-park/icons.json")},{id:"icon-park-outline",prefix:"icon-park-outline",name:"IconPark Outline",license:"Apache-2.0",valueMode:"prefixed",loader:()=>import("@iconify-json/icon-park-outline/icons.json")},{id:"mdi",prefix:"mdi",name:"Material Design Icons",license:"Apache-2.0",valueMode:"prefixed",loader:()=>import("@iconify-json/mdi/icons.json")},{id:"ri",prefix:"ri",name:"Remix (Iconify)",license:"Apache-2.0",valueMode:"prefixed",loader:()=>import("@iconify-json/ri/icons.json")},{id:"logos",prefix:"logos",name:"SVG Logos",license:"CC0",valueMode:"prefixed",loader:()=>import("@iconify-json/logos/icons.json")},{id:"carbon",prefix:"carbon",name:"Carbon",license:"Apache-2.0",valueMode:"prefixed",loader:()=>import("@iconify-json/carbon/icons.json")},{id:"tabler",prefix:"tabler",name:"Tabler Icons",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/tabler/icons.json")},{id:"lucide",prefix:"lucide",name:"Lucide",license:"ISC",valueMode:"prefixed",loader:()=>import("@iconify-json/lucide/icons.json")},{id:"ph",prefix:"ph",name:"Phosphor",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/ph/icons.json")},{id:"bi",prefix:"bi",name:"Bootstrap Icons",license:"MIT",valueMode:"prefixed",loader:()=>import("@iconify-json/bi/icons.json")}],os=new Set,zi=new Map,Ky=t=>t.default||t;async function vy(t){if(t.localRemix)return[];if(zi.has(t.id))return zi.get(t.id);if(!t.loader)return[];const a=Ky(await t.loader());os.has(t.id)||(wr.addCollection(a),os.add(t.id));const n=Object.keys(a.icons||{}).sort();return zi.set(t.id,n),n}const Xy=(t,a)=>t.valueMode==="bare"?a:`${t.prefix}:${a}`,Gy=t=>{const a=String(t||"").trim();if(!a.includes(":"))return"remix";const n=a.split(":")[0],o=Dl.find(r=>r.prefix===n);return(o==null?void 0:o.id)||"remix"},Jy={class:"qiu-icon-picker"},Zy={key:1,class:"qiu-icon-picker__placeholder"},ek={class:"qiu-icon-picker__body"},tk={class:"qiu-icon-picker__libs"},nk=["onClick"],ok={class:"qiu-icon-picker__license-tip"},lk={class:"qiu-icon-picker__main"},ak={class:"qiu-icon-picker__meta"},ik={key:0,class:"qiu-icon-picker__current"},rk={class:"qiu-icon-picker__current-icon"},ck={class:"qiu-icon-picker__grid"},sk=["title"],dk=["title","onClick"],mk={key:1,class:"qiu-icon-picker__pager"},Ca=60,uk=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuIconPicker",__name:"index",props:{modelValue:{default:""},placeholder:{default:"home-2-line / mdi:home"}},emits:["update:modelValue"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(!1),c=e.ref(""),d=e.ref(1),f=e.ref("remix"),u=e.ref(!1),h=e.reactive({remix:Il}),p=e.reactive({remix:Il.length}),_=e.computed(()=>Dl.find(D=>D.id===f.value)||Dl[0]),B=e.computed(()=>Dl.map(D=>({...D,count:p[D.id]||(D.localRemix?Il.length:"…")}))),$=e.computed(()=>h[f.value]||[]),b=e.computed(()=>{const D=c.value.trim().toLowerCase();return D?$.value.filter(T=>T.toLowerCase().includes(D)):$.value}),C=e.computed(()=>Math.max(1,Math.ceil(b.value.length/Ca))),k=e.computed(()=>{const D=(d.value-1)*Ca;return b.value.slice(D,D+Ca)}),M=D=>Xy(_.value,D),V=async D=>{var T;if(D.localRemix){h.remix=Il,p.remix=Il.length;return}if(!((T=h[D.id])!=null&&T.length)){u.value=!0;try{const L=await vy(D);h[D.id]=L,p[D.id]=L.length}finally{u.value=!1}}},E=async D=>{f.value=D,d.value=1,c.value="";const T=Dl.find(L=>L.id===D);T&&await V(T)},x=()=>{r.value=!0},m=async()=>{f.value=Gy(n.modelValue),await V(_.value)},w=D=>{o("update:modelValue",M(D)),r.value=!1},S=()=>{o("update:modelValue","")},N=D=>{o("update:modelValue",D||""),c.value=D!=null&&D.includes(":")?D.split(":")[1]||"":D||"",d.value=1,r.value=!0};return(D,T)=>{const L=_t,U=Wn,oe=nn,H=Vo,Ve=Qo,Z=Nn;return e.openBlock(),e.createElementBlock("div",Jy,[e.createElementVNode("div",{class:"qiu-icon-picker__trigger",onClick:x},[e.createElementVNode("span",{class:e.normalizeClass(["qiu-icon-picker__preview-wrap",{"is-on":!!t.modelValue}])},[t.modelValue?(e.openBlock(),e.createBlock(L,{key:0,icon:t.modelValue,class:"qiu-icon-picker__preview"},null,8,["icon"])):(e.openBlock(),e.createElementBlock("span",Zy,e.toDisplayString(e.unref(Xe)("选择图标")),1))],2),e.createVNode(U,{"model-value":t.modelValue,class:"qiu-icon-picker__input",placeholder:t.placeholder,clearable:"","onUpdate:modelValue":N,onFocus:x,onClick:e.withModifiers(x,["stop"])},null,8,["model-value","placeholder"]),e.createVNode(oe,{size:"small",onClick:e.withModifiers(x,["stop"])},{default:e.withCtx(()=>[e.createVNode(L,{icon:"apps-2-line"})]),_:1})]),e.createVNode(Z,{modelValue:e.unref(r),"onUpdate:modelValue":T[3]||(T[3]=z=>e.isRef(r)?r.value=z:null),title:e.unref(Xe)("选择图标"),width:"920px","z-index":5300,"show-minimize":!1,"show-fullscreen":!1,"destroy-on-close":"",onOpened:m},{default:e.withCtx(()=>[e.createElementVNode("div",ek,[e.unref(u)?(e.openBlock(),e.createBlock(pa,{key:0,class:"qiu-icon-picker__loading"})):e.createCommentVNode("",!0),e.createElementVNode("aside",tk,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(B),z=>(e.openBlock(),e.createElementBlock("button",{key:z.id,type:"button",class:e.normalizeClass(["qiu-icon-picker__lib",{"is-active":e.unref(f)===z.id}]),onClick:fe=>E(z.id)},[e.createElementVNode("strong",null,e.toDisplayString(z.name),1),e.createElementVNode("span",null,e.toDisplayString(z.count)+" icons",1),e.createElementVNode("em",null,e.toDisplayString(z.license),1)],10,nk))),128)),e.createElementVNode("p",ok,e.toDisplayString(e.unref(Xe)("均为免费开源图标,可商用(按需懒加载)")),1)]),e.createElementVNode("div",lk,[e.createVNode(U,{modelValue:e.unref(c),"onUpdate:modelValue":T[0]||(T[0]=z=>e.isRef(c)?c.value=z:null),clearable:"",placeholder:e.unref(Xe)("搜索图标名"),class:"qiu-icon-picker__search",onInput:T[1]||(T[1]=z=>d.value=1)},{prefix:e.withCtx(()=>[e.createVNode(L,{icon:"search-line"})]),_:1},8,["modelValue","placeholder"]),e.createElementVNode("div",ak,[e.createElementVNode("span",null,e.toDisplayString(e.unref(b).length)+" / "+e.toDisplayString(e.unref($).length),1),t.modelValue?(e.openBlock(),e.createElementBlock("span",ik,[e.createTextVNode(e.toDisplayString(e.unref(Xe)("当前"))+": ",1),e.createElementVNode("span",rk,[e.createVNode(L,{icon:t.modelValue},null,8,["icon"])]),e.createElementVNode("code",null,e.toDisplayString(t.modelValue),1)])):e.createCommentVNode("",!0),t.modelValue?(e.openBlock(),e.createBlock(oe,{key:1,link:"",type:"danger",size:"small",onClick:S},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)("清除")),1)]),_:1})):e.createCommentVNode("",!0)]),e.createElementVNode("div",ck,[e.createElementVNode("button",{type:"button",class:"qiu-icon-picker__item is-clear",title:e.unref(Xe)("清除图标"),onClick:S},[e.createVNode(L,{icon:"delete-bin-line"}),e.createElementVNode("span",null,e.toDisplayString(e.unref(Xe)("清除")),1)],8,sk),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(k),z=>(e.openBlock(),e.createElementBlock("button",{key:z,type:"button",class:e.normalizeClass(["qiu-icon-picker__item",{"is-active":t.modelValue===M(z)}]),title:M(z),onClick:fe=>w(z)},[e.createVNode(L,{icon:M(z)},null,8,["icon"]),e.createElementVNode("span",null,e.toDisplayString(z),1)],10,dk))),128))]),!e.unref(u)&&!e.unref(b).length?(e.openBlock(),e.createBlock(H,{key:0,description:e.unref(Xe)("无匹配图标")},null,8,["description"])):e.createCommentVNode("",!0),e.unref(C)>1?(e.openBlock(),e.createElementBlock("div",mk,[e.createVNode(Ve,{"current-page":e.unref(d),"onUpdate:currentPage":T[2]||(T[2]=z=>e.isRef(d)?d.value=z:null),background:"",layout:"prev, pager, next, jumper","page-size":Ca,total:e.unref(b).length,small:""},null,8,["current-page","total"])])):e.createCommentVNode("",!0)])])]),_:1},8,["modelValue","title"])])}}}),[["__scopeId","data-v-76cf88e4"]])},Symbol.toStringTag,{value:"Module"})),fk=["src","alt","loading"],pk={key:0,class:"qiu-image__mask"},hk=["src","alt"],gk=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuImage",__name:"index",props:{src:{default:""},fit:{default:"fill"},alt:{default:""},lazy:{type:Boolean,default:!1},previewSrcList:{default:()=>[]},hideOnClickModal:{type:Boolean,default:!0}},setup(t){const a=t,n=e.ref(!1),o=e.computed(()=>a.previewSrcList.length>0||!!a.src),r=e.computed(()=>a.previewSrcList.length>0?a.previewSrcList[0]:a.src),c=()=>{o.value&&(n.value=!0)},d=()=>{a.hideOnClickModal&&(n.value=!1)},f=u=>{u.key==="Escape"&&n.value&&(n.value=!1)};return e.onMounted(()=>window.addEventListener("keydown",f)),e.onUnmounted(()=>window.removeEventListener("keydown",f)),(u,h)=>{const p=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-image",{"is-preview":e.unref(o)}]),onClick:c},[e.createElementVNode("img",{class:"qiu-image__inner",src:t.src,alt:t.alt,loading:t.lazy?"lazy":void 0,style:e.normalizeStyle({objectFit:t.fit})},null,12,fk),e.unref(o)?(e.openBlock(),e.createElementBlock("div",pk,[e.createVNode(p,{icon:"zoom-in-line"})])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-image-fade"},{default:e.withCtx(()=>[e.unref(n)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-image__viewer",onClick:e.withModifiers(d,["self"])},[e.createElementVNode("button",{type:"button",class:"qiu-image__close","aria-label":"关闭",onClick:d},[e.createVNode(p,{icon:"close-line"})]),e.createElementVNode("img",{class:"qiu-image__preview",src:e.unref(r),alt:t.alt,onClick:h[0]||(h[0]=e.withModifiers(()=>{},["stop"]))},null,8,hk)])):e.createCommentVNode("",!0)]),_:1})]))],2)}}}),[["__scopeId","data-v-29635742"]])},Symbol.toStringTag,{value:"Module"})),_k=["value","disabled","type","aria-label","onInput","onKeydown","onFocus"],ls=de(e.defineComponent({name:"QiuOtp",__name:"index",props:{modelValue:{default:""},length:{default:6},size:{default:"default"},disabled:{type:Boolean,default:!1},mask:{type:Boolean,default:!1},numeric:{type:Boolean,default:!0}},emits:["update:modelValue","change","complete"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref([]),d=e.computed(()=>{const b=String(n.modelValue||"").slice(0,n.length).split(""),C=[];for(let k=0;k<n.length;k++)C.push(b[k]??"");return C}),f=(b,C)=>{c.value[C]=b},u=b=>{const C=b.join("");o("update:modelValue",C),o("change",C),C.length===n.length&&!b.includes("")&&o("complete",C)},h=b=>{e.nextTick(()=>{var C;return(C=c.value[b])==null?void 0:C.focus()})},p=(b,C)=>{let M=b.target.value;n.numeric&&(M=M.replace(/\D/g,"")),M=M.slice(-1);const V=[...d.value];V[C]=M,M&&C<n.length-1&&h(C+1),u(V)},_=(b,C)=>{if(b.key==="Backspace"){const k=[...d.value];k[C]?(k[C]="",u(k)):C>0&&(k[C-1]="",u(k),h(C-1)),b.preventDefault()}else b.key==="ArrowLeft"&&C>0?h(C-1):b.key==="ArrowRight"&&C<n.length-1&&h(C+1)},B=(b,C)=>{b.target.select()},$=b=>{var V;b.preventDefault();let C=((V=b.clipboardData)==null?void 0:V.getData("text"))??"";n.numeric&&(C=C.replace(/\D/g,""));const k=C.slice(0,n.length).split(""),M=[...d.value];k.forEach((E,x)=>M[x]=E),u(M),h(Math.min(k.length,n.length-1))};return e.watch(()=>n.length,()=>c.value=[]),(b,C)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["qiu-otp",[`qiu-otp--${t.size}`,{"is-disabled":t.disabled}]]),onPaste:$},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,(k,M)=>(e.openBlock(),e.createElementBlock("input",{key:M,ref_for:!0,ref:V=>f(V,M),class:e.normalizeClass(["qiu-otp__input",{"is-filled":!!k}]),value:k,disabled:t.disabled,type:t.mask?"password":"text",inputmode:"numeric",maxlength:"1","aria-label":`验证码第 ${M+1} 位`,onInput:V=>p(V,M),onKeydown:V=>_(V,M),onFocus:V=>B(V)},null,42,_k))),128))],34))}}),[["__scopeId","data-v-eeb64e64"]]),bk=Object.freeze(Object.defineProperty({__proto__:null,default:ls},Symbol.toStringTag,{value:"Module"})),as=de(e.defineComponent({name:"QiuKbd",__name:"index",props:{size:{default:"default"}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("kbd",{class:e.normalizeClass(["qiu-kbd",[`qiu-kbd--${t.size}`]])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-18d9957b"]]),yk=Object.freeze(Object.defineProperty({__proto__:null,default:as},Symbol.toStringTag,{value:"Module"})),is=de(e.defineComponent({name:"QiuLayoutContainer",__name:"index",props:{direction:{default:"horizontal"},fit:{type:Boolean,default:!1},gap:{default:12}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-layout",[`qiu-layout--${t.direction}`]])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-41665f16"]]),kk=Object.freeze(Object.defineProperty({__proto__:null,default:is},Symbol.toStringTag,{value:"Module"})),wk=["href","target"],xk={class:"qiu-link-preview__content"},Vk={class:"qiu-link-preview__host"},Ck={key:0,class:"qiu-link-preview__title"},Nk={key:1,class:"qiu-link-preview__desc"},rs=de(e.defineComponent({name:"QiuLinkPreview",__name:"index",props:{href:{},title:{default:""},description:{default:""},image:{default:""},target:{default:"_blank"},openDelay:{default:200},closeDelay:{default:150}},emits:["visibleChange"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref({});let u,h,p=!1;const _=e.computed(()=>{try{return new URL(n.href).hostname}catch{return n.href}}),B=()=>{u&&clearTimeout(u),h&&clearTimeout(h)},$=async()=>{B(),u=setTimeout(async()=>{d.value=!0,o("visibleChange",!0),await e.nextTick(),E()},n.openDelay)},b=()=>{B(),h=setTimeout(()=>{p||(d.value=!1,o("visibleChange",!1))},n.closeDelay)},C=()=>$(),k=()=>b(),M=()=>{p=!0,B()},V=()=>{p=!1,b()},E=()=>{const m=r.value,w=c.value;if(!m||!w)return;const S=m.getBoundingClientRect(),N=w.getBoundingClientRect(),D=10;let T=S.bottom+D;T+N.height>window.innerHeight-4&&(T=S.top-N.height-D);let L=S.left;L=Math.min(Math.max(4,L),window.innerWidth-N.width-4),T=Math.max(4,T),f.value={position:"fixed",top:`${T}px`,left:`${L}px`,width:`${Math.min(320,window.innerWidth-8)}px`,zIndex:"2100"}},x=()=>d.value&&E();return e.watch(d,m=>{m?(window.addEventListener("scroll",x,!0),window.addEventListener("resize",x)):(window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x))}),e.onBeforeUnmount(()=>{B(),window.removeEventListener("scroll",x,!0),window.removeEventListener("resize",x)}),(m,w)=>{const S=_t;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("a",{ref_key:"triggerRef",ref:r,class:"qiu-link-preview",href:t.href,target:t.target,rel:"noopener noreferrer",onMouseenter:C,onMouseleave:k},[e.renderSlot(m.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.href),1)],!0)],40,wk),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-link-preview-fade"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"cardRef",ref:c,class:"qiu-link-preview__panel",style:e.normalizeStyle(f.value),onMouseenter:M,onMouseleave:V},[t.image?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-link-preview__image",style:e.normalizeStyle({backgroundImage:`url(${t.image})`})},null,4)):e.createCommentVNode("",!0),e.createElementVNode("div",xk,[e.createElementVNode("div",Vk,[e.createVNode(S,{icon:"links-line"}),e.createElementVNode("span",null,e.toDisplayString(_.value),1)]),t.title?(e.openBlock(),e.createElementBlock("div",Ck,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("div",Nk,e.toDisplayString(t.description),1)):e.createCommentVNode("",!0)])],36)):e.createCommentVNode("",!0)]),_:1})]))],64)}}}),[["__scopeId","data-v-690d32da"]]),Bk=Object.freeze(Object.defineProperty({__proto__:null,default:rs},Symbol.toStringTag,{value:"Module"})),$k=["value","rows","placeholder","disabled"],Ek=["value","placeholder","disabled"],Sk={class:"qiu-mention__list"},Mk=["onMousedown","onMouseenter"],qk={key:0,class:"qiu-mention__avatar"},zk={class:"qiu-mention__label"},cs=de(e.defineComponent({name:"QiuMention",__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},triggerChar:{default:"@"},placeholder:{default:"输入 @ 提及他人"},size:{default:"default"},disabled:{type:Boolean,default:!1},type:{default:"text"},rows:{default:3}},emits:["update:modelValue","select"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref(0),u=e.ref(""),h=e.ref({}),p=e.computed(()=>{const x=u.value.toLowerCase();return n.options.filter(m=>m.label.toLowerCase().includes(x))}),_=x=>{const m=x.target.value;o("update:modelValue",m),B(m,x.target.selectionStart??m.length)},B=(x,m)=>{const w=x.slice(0,m),S=w.lastIndexOf(n.triggerChar);if(S===-1){d.value=!1;return}const N=w.slice(S+1);if(/\s/.test(N)){d.value=!1;return}u.value=N,f.value=0,$()},$=async()=>{d.value=!0,await e.nextTick(),b()},b=()=>{const x=r.value,m=c.value;if(!x||!m)return;const w=x.getBoundingClientRect(),S=m.getBoundingClientRect(),N=4;let D=w.bottom+N;D+S.height>window.innerHeight-4&&(D=w.top-S.height-N);let T=Math.min(Math.max(4,w.left),window.innerWidth-S.width-4);D=Math.max(4,D),h.value={position:"fixed",top:`${D}px`,left:`${T}px`,width:`${Math.max(w.width,180)}px`,zIndex:"2100"}},C=x=>{const m=r.value;if(!m)return;const w=n.modelValue,S=m.selectionStart??w.length,D=w.slice(0,S).lastIndexOf(n.triggerChar),T=w.slice(0,D),L=w.slice(S),U=`${n.triggerChar}${x.label} `,oe=T+U+L;o("update:modelValue",oe),o("select",x),d.value=!1,e.nextTick(()=>{const H=(T+U).length;m.focus(),m.setSelectionRange(H,H)})},k=x=>C(x),M=x=>{if(d.value)if(x.key==="ArrowDown")x.preventDefault(),f.value<p.value.length-1&&f.value++;else if(x.key==="ArrowUp")x.preventDefault(),f.value>0&&f.value--;else if(x.key==="Enter"){x.preventDefault();const m=p.value[f.value];m&&C(m)}else x.key==="Escape"&&(d.value=!1)},V=x=>{if(["ArrowLeft","ArrowRight","Home","End"].includes(x.key)){const m=x.target;B(m.value,m.selectionStart??0)}},E=x=>{var m;d.value&&((m=c.value)!=null&&m.contains(x.target)||(d.value=!1))};return e.watch(d,x=>{x?document.addEventListener("mousedown",E,!0):document.removeEventListener("mousedown",E,!0)}),e.onBeforeUnmount(()=>document.removeEventListener("mousedown",E,!0)),(x,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-mention",[`qiu-mention--${t.size}`,{"is-disabled":t.disabled}]])},[t.type==="textarea"?(e.openBlock(),e.createElementBlock("textarea",{key:0,ref_key:"inputRef",ref:r,class:"qiu-mention__input",value:t.modelValue,rows:t.rows,placeholder:t.placeholder,disabled:t.disabled,onInput:_,onKeydown:M,onKeyup:V},null,40,$k)):(e.openBlock(),e.createElementBlock("input",{key:1,ref_key:"inputRef",ref:r,class:"qiu-mention__input",value:t.modelValue,placeholder:t.placeholder,disabled:t.disabled,onInput:_,onKeydown:M,onKeyup:V},null,40,Ek)),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[d.value?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"panelRef",ref:c,class:"qiu-mention__panel",style:e.normalizeStyle(h.value)},[e.createElementVNode("ul",Sk,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(w,S)=>(e.openBlock(),e.createElementBlock("li",{key:w.value,class:e.normalizeClass(["qiu-mention__option",{"is-active":S===f.value}]),onMousedown:e.withModifiers(N=>k(w),["prevent"]),onMouseenter:N=>f.value=S},[w.avatar?(e.openBlock(),e.createElementBlock("span",qk,e.toDisplayString(w.avatar),1)):e.createCommentVNode("",!0),e.createElementVNode("span",zk,e.toDisplayString(w.label),1)],42,Mk))),128))])],4)):e.createCommentVNode("",!0)]))],2))}}),[["__scopeId","data-v-493c0b36"]]),Tk=Object.freeze(Object.defineProperty({__proto__:null,default:cs},Symbol.toStringTag,{value:"Module"})),Ti=Symbol("QiuRouteMenu"),Ik={class:"qiu-route-menu__list"},ss=de(e.defineComponent({name:"QiuMenuRoot",__name:"QiuMenuRoot",props:{mode:{default:"vertical"},defaultActive:{default:""},collapse:{type:Boolean,default:!1},uniqueOpened:{type:Boolean,default:!1},defaultOpeneds:{default:()=>[]},menuTrigger:{default:"click"}},setup(t,{expose:a}){const n=t,o=e.ref(n.defaultActive),r=e.ref(new Set);e.watch(()=>n.defaultActive,m=>{m&&(o.value=m)}),e.watch(()=>[...n.defaultOpeneds],m=>{m.forEach(w=>_(w))},{immediate:!0});const c=e.computed(()=>n.mode),d=e.computed(()=>n.collapse),f=e.computed(()=>n.uniqueOpened),u=e.computed(()=>n.menuTrigger),h=e.computed(()=>o.value),p=m=>r.value.has(m),_=m=>{if(n.collapse||n.mode==="horizontal"){const S=new Set;for(const N of r.value)(m===N||m.startsWith(`${N}/`))&&S.add(N);S.add(m),r.value=S;return}const w=new Set;if(n.uniqueOpened&&n.mode==="vertical")for(const S of r.value)(m===S||m.startsWith(`${S}/`))&&w.add(S);else for(const S of r.value)w.add(S);w.add(m),r.value=w},B=m=>{const w=new Set;for(const S of r.value)S===m||S.startsWith(`${m}/`)||w.add(S);r.value=w},$=()=>{r.value=new Set};let b=null;const C=()=>!!(document.querySelector(".qiu-menu-flyout-panel:hover")||document.querySelector(".qiu-route-menu-sub.is-popup > .qiu-route-menu-sub__title:hover")||document.querySelector(".qiu-route-menu.is-collapse .qiu-route-menu-sub__title:hover")||document.querySelector(".qiu-route-menu--horizontal .qiu-route-menu-sub__title:hover")||document.querySelector(".qiu-route-menu-item__tip:hover")),k=m=>{b&&(clearTimeout(b),b=null),_(m)},M=()=>{b&&clearTimeout(b);const m=n.mode==="horizontal"?280:160;b=setTimeout(()=>{if(C()){b=null;return}(n.collapse||n.mode==="horizontal")&&$(),b=null},m)},V=m=>{p(m)?B(m):_(m)},E=m=>{o.value=m},x=m=>{const w=o.value;return w===m||w.startsWith(`${m}/`)};return e.onBeforeUnmount(()=>{b&&clearTimeout(b)}),e.provide(Ti,{mode:c,collapse:d,activeIndex:h,uniqueOpened:f,menuTrigger:u,isSubOpen:p,toggleSub:V,openSub:_,closeSub:B,enterFlyout:k,leaveFlyout:M,selectItem:E,isActive:x}),a({open:_,close:B,closeAll:$}),(m,w)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["qiu-route-menu",[`qiu-route-menu--${t.mode}`,{"is-collapse":t.collapse}]]),role:"menu"},[e.createElementVNode("ul",Ik,[e.renderSlot(m.$slots,"default",{},void 0,!0)])],2))}}),[["__scopeId","data-v-06f85681"]]),Dk=Object.freeze(Object.defineProperty({__proto__:null,default:ss},Symbol.toStringTag,{value:"Module"})),Rk="加载中...",Lk=3e3;function Ii(t,...a){return t}function Na(){return new Proxy(function(){},{get:()=>Na(),apply:()=>Na()})}const Pk=()=>Na();Na();function ds(t){return/^(https?:|mailto:|tel:|http)/.test(t||"")}const Ok={class:"qiu-route-menu-item__inner"},jk={class:"qiu-route-menu-item__icon-wrap"},Fk=["title"],Ak={class:"qiu-route-menu-item__tip-title"},ms=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuMenuItem",__name:"QiuMenuItem",props:{itemOrMenu:{type:Object,default:()=>({})}},setup(t){const a=t,n=e.inject(Ti,null),o=Cn.useRoute(),r=Cn.useRouter(),c=Pk(),{device:d,theme:f}=id.storeToRefs(c),{foldSideBar:u}=c,{enter:h,exit:p}=na.useFullscreen(),_=()=>{f.value.layout==="column"&&f.value.autoHideColumnMenu&&d.value!=="mobile"&&u()},B=e.ref(null),$=e.ref(!1),b=e.ref({});let C=null;const k=e.computed(()=>a.itemOrMenu.path),M=e.computed(()=>(n==null?void 0:n.activeIndex.value)===k.value),V=e.computed(()=>(n==null?void 0:n.collapse.value)??!1),E=e.computed(()=>{var L;return Ii(((L=a.itemOrMenu.meta)==null?void 0:L.title)||"")}),x=e.computed(()=>{var L;return((L=a.itemOrMenu.meta)==null?void 0:L.badgeType)||"info"}),m=e.computed(()=>{var L;return((L=a.itemOrMenu.meta)==null?void 0:L.badgeEffect)||"dark"}),w=e.computed(()=>{var U;const L=(U=a.itemOrMenu.meta)==null?void 0:U.dot;return L===!0?"danger":typeof L=="string"?L:"danger"}),S=()=>{const L=B.value;if(!L)return;const U=L.getBoundingClientRect();b.value={position:"fixed",top:`${Math.round(U.top+U.height/2)}px`,left:`${Math.round(U.right+10)}px`,transform:"translateY(-50%)",zIndex:"4100"}},N=()=>{var L;C&&(clearTimeout(C),C=null),V.value&&((L=B.value)!=null&&L.closest(".qiu-route-menu-sub__list.is-flyout")||(S(),$.value=!0))},D=()=>{C&&clearTimeout(C),C=setTimeout(()=>{$.value=!1,C=null},80)};e.onBeforeUnmount(()=>{C&&clearTimeout(C)});const T=()=>{n==null||n.selectItem(k.value),_(),e.nextTick(()=>{const L=a.itemOrMenu.path,U=a.itemOrMenu.meta.target,oe=a.itemOrMenu.meta.fullscreen;U==="_blank"?(ds(L)?(window.open(L),r.push("/redirect")):o.path!==L&&window.open(L),r.push("/redirect")):ds(L)?globalThis.location.href=L:o.path!==L&&(d.value==="mobile"&&u(),r.push(a.itemOrMenu.path)),setTimeout(()=>{oe?h():p()},1e3)})};return(L,U)=>{var Z,z,fe,he,se;const oe=_t,H=qi,Ve=$o;return e.openBlock(),e.createElementBlock("li",{ref_key:"itemRef",ref:B,class:e.normalizeClass(["qiu-route-menu-item",{"is-active":e.unref(M),"is-collapse-tip":e.unref(V)}]),role:"menuitem",onClick:T,onMouseenter:N,onMouseleave:D},[e.createElementVNode("div",Ok,[e.createElementVNode("span",jk,[e.createVNode(oe,{icon:((Z=t.itemOrMenu.meta)==null?void 0:Z.icon)||"menu-line","is-custom-svg":(z=t.itemOrMenu.meta)==null?void 0:z.isCustomSvg,title:e.unref(E)},null,8,["icon","is-custom-svg","title"]),(fe=t.itemOrMenu.meta)!=null&&fe.dot?(e.openBlock(),e.createBlock(H,{key:0,class:"qiu-route-menu-item__dot",type:e.unref(w)},null,8,["type"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:"qiu-route-menu-item__text",title:e.unref(E)},e.toDisplayString(e.unref(E)),9,Fk),(he=t.itemOrMenu.meta)!=null&&he.badge?(e.openBlock(),e.createBlock(Ve,{key:0,class:e.normalizeClass(["qiu-route-menu-item__badge",[`qiu-menu-tag--${e.unref(m)}`]]),size:"small",type:e.unref(x),effect:e.unref(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Ii)(t.itemOrMenu.meta.badge)),1)]),_:1},8,["class","type","effect"])):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"qiu-route-menu-item__tip",role:"tooltip",style:e.normalizeStyle(e.unref(b)),onMouseenter:N,onMouseleave:D},[U[0]||(U[0]=e.createElementVNode("i",{class:"qiu-route-menu-item__tip-arrow","aria-hidden":"true"},null,-1)),e.createElementVNode("span",Ak,e.toDisplayString(e.unref(E)),1),(se=t.itemOrMenu.meta)!=null&&se.badge?(e.openBlock(),e.createBlock(Ve,{key:0,size:"small",type:e.unref(x),effect:e.unref(m)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Ii)(t.itemOrMenu.meta.badge)),1)]),_:1},8,["type","effect"])):e.createCommentVNode("",!0)],36),[[e.vShow,e.unref(V)&&e.unref($)]])]))],34)}}}),[["__scopeId","data-v-0eeaf11c"]])},Symbol.toStringTag,{value:"Module"})),us=e.defineComponent({name:"QiuMenu",__name:"index",props:{item:{type:Object,required:!0},layout:{type:String,default:""}},setup(t){const a=Object.assign({"./components/QiuMenuItem.vue":ms,"./components/QiuSubMenu.vue":Nr}),n={};Object.getOwnPropertyNames(a).forEach(c=>{n[c.replaceAll(/(\/|components|\.|vue)/g,"")]=a[c].default});const o=t,r=e.computed(()=>o.item.children&&o.item.children.some(c=>c.meta&&c.meta.hidden!==!0)?n.QiuSubMenu:n.QiuMenuItem);return(c,d)=>{const f=e.resolveComponent("qiu-menu");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{"item-or-menu":t.item,layout:t.layout},{default:e.withCtx(()=>[t.item.children&&t.item.children.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.item.children,u=>(e.openBlock(),e.createBlock(f,{key:u.path,item:u,layout:t.layout},null,8,["item","layout"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["item-or-menu","layout"])}}}),Qk=Object.freeze(Object.defineProperty({__proto__:null,default:us},Symbol.toStringTag,{value:"Module"})),Uk={class:"qiu-route-menu-sub__icon-wrap"},Wk=["title"],Hk={key:2,class:"qiu-route-menu-sub__more"},Yk={key:0,class:"qiu-menu-flyout-panel__arrow","aria-hidden":"true"},Kk={key:1,class:"qiu-menu-flyout-panel__head"},vk=de(e.defineComponent({name:"QiuSubMenu",__name:"QiuSubMenu",props:{itemOrMenu:{type:Object,default:()=>({})},layout:{type:String,default:""}},setup(t){const a=t,n=e.inject(Ti,null),o=e.ref(null),r=e.ref(null),c=e.ref(null),d=e.ref({}),f=e.ref("right");let u=null;const h=e.computed(()=>a.itemOrMenu.path),p=e.computed(()=>{var T;return Xe(((T=a.itemOrMenu.meta)==null?void 0:T.title)||"")}),_=e.computed(()=>(n==null?void 0:n.mode.value)==="horizontal"),B=e.computed(()=>(n==null?void 0:n.collapse.value)??!1),$=e.computed(()=>_.value||B.value),b=e.computed(()=>$.value),C=e.computed(()=>(n==null?void 0:n.isSubOpen(h.value))??!1),k=e.computed(()=>(n==null?void 0:n.isActive(h.value))??!1),M=e.computed(()=>{var T;return((T=a.itemOrMenu.meta)==null?void 0:T.badgeType)||"info"}),V=e.computed(()=>{var T;return((T=a.itemOrMenu.meta)==null?void 0:T.badgeEffect)||"dark"}),E=e.computed(()=>{var L;const T=(L=a.itemOrMenu.meta)==null?void 0:L.dot;return T===!0?"danger":typeof T=="string"?T:"danger"}),x=e.computed(()=>C.value),m=()=>{const T=r.value;if(!T||!b.value)return;const L=T.getBoundingClientRect(),U=200,oe=h.value.split("/").filter(Boolean).length,H=!!T.closest(".qiu-menu-flyout-panel");let Ve=0,Z=0,z="right";const fe=L.left+L.width/2,he=L.top+L.height/2;if(_.value&&!H){z="bottom";const De=6;Ve=Math.round(fe-U/2),Z=Math.round(L.bottom+De),Ve=Math.min(Math.max(8,Ve),window.innerWidth-U-8)}else Ve=Math.round(L.right+10),Z=Math.round(L.top),Ve+U>window.innerWidth-8?(Ve=Math.round(L.left-U-10),z="left"):z="right";const se=window.innerHeight-16;Z>se-80&&(Z=Math.max(8,se-240)),Z<8&&(Z=8);const te=5;let re=Math.round(fe-Ve-te),Ne=Math.round(he-Z-te);re=Math.min(Math.max(12,re),U-22),Ne=Math.min(Math.max(12,Ne),220),f.value=z,d.value={position:"fixed",top:`${Z}px`,left:`${Ve}px`,zIndex:String(5200+oe),"--qiu-flyout-arrow-x":`${re}px`,"--qiu-flyout-arrow-y":`${Ne}px`}},w=()=>{$.value?n==null||n.enterFlyout(h.value):n==null||n.openSub(h.value),e.nextTick(()=>{m(),requestAnimationFrame(()=>m())})},S=()=>{if(n){if($.value){C.value?n.leaveFlyout():w();return}n.toggleSub(h.value)}},N=()=>{u&&(clearTimeout(u),u=null),n&&(n.menuTrigger.value==="hover"||$.value)&&w()},D=T=>{var U,oe;const L=T.relatedTarget;if(!(L&&((U=o.value)!=null&&U.contains(L)||(oe=c.value)!=null&&oe.contains(L)))){if(!$.value){if((n==null?void 0:n.menuTrigger.value)!=="hover")return;u&&clearTimeout(u),u=setTimeout(()=>{n==null||n.closeSub(h.value),u=null},120);return}n==null||n.leaveFlyout()}};return e.watch(C,T=>{T&&b.value&&e.nextTick(()=>m())}),e.onBeforeUnmount(()=>{u&&clearTimeout(u)}),(T,L)=>{var Z,z,fe,he;const U=us,oe=_t,H=qi,Ve=$o;return t.itemOrMenu.meta&&t.itemOrMenu.meta.levelHidden?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.itemOrMenu.children,se=>(e.openBlock(),e.createBlock(U,{key:se.path,item:se,layout:t.layout},null,8,["item","layout"]))),128)):(e.openBlock(),e.createElementBlock("li",{key:1,ref_key:"subRef",ref:o,class:e.normalizeClass(["qiu-route-menu-sub",{"is-open":e.unref(C),"is-active":e.unref(k),"is-popup":e.unref($)}]),role:"none",onMouseenter:N,onMouseleave:D},[e.createElementVNode("div",{ref_key:"titleRef",ref:r,class:"qiu-route-menu-sub__title",onClick:S},[e.createElementVNode("span",Uk,[e.createVNode(oe,{icon:((Z=t.itemOrMenu.meta)==null?void 0:Z.icon)||"folder-line","is-custom-svg":(z=t.itemOrMenu.meta)==null?void 0:z.isCustomSvg,title:e.unref(p)},null,8,["icon","is-custom-svg","title"]),(fe=t.itemOrMenu.meta)!=null&&fe.dot?(e.openBlock(),e.createBlock(H,{key:0,class:"qiu-route-menu-sub__dot",type:e.unref(E)},null,8,["type"])):e.createCommentVNode("",!0)]),e.createElementVNode("span",{class:"qiu-route-menu-sub__text",title:e.unref(p)},e.toDisplayString(e.unref(p)),9,Wk),(he=t.itemOrMenu.meta)!=null&&he.badge?(e.openBlock(),e.createBlock(Ve,{key:0,class:e.normalizeClass(["qiu-route-menu-sub__badge",[`qiu-menu-tag--${e.unref(V)}`]]),size:"small",type:e.unref(M),effect:e.unref(V)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(Xe)(t.itemOrMenu.meta.badge)),1)]),_:1},8,["class","type","effect"])):e.createCommentVNode("",!0),e.unref($)?(e.openBlock(),e.createElementBlock("span",Hk,[e.createVNode(oe,{icon:"arrow-right-s-line"})])):(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["qiu-route-menu-sub__arrow",{"is-open":e.unref(C)}])},[e.createVNode(oe,{icon:"arrow-down-s-line"})],2))],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body",disabled:!e.unref(b)},[e.withDirectives(e.createElementVNode("ul",{ref_key:"listRef",ref:c,class:e.normalizeClass(["qiu-route-menu-sub__list",{"is-flyout":e.unref(b),"qiu-menu-flyout-panel":e.unref(b),[`is-placement-${e.unref(f)}`]:e.unref(b)}]),style:e.normalizeStyle(e.unref(b)?e.unref(d):void 0),onMouseenter:N,onMouseleave:D},[e.unref(b)?(e.openBlock(),e.createElementBlock("i",Yk)):e.createCommentVNode("",!0),e.unref(b)?(e.openBlock(),e.createElementBlock("div",Kk,e.toDisplayString(e.unref(p)),1)):e.createCommentVNode("",!0),e.renderSlot(T.$slots,"default",{},void 0,!0)],38),[[e.vShow,e.unref(x)]])],8,["disabled"]))],34))}}}),[["__scopeId","data-v-a57fad61"]]),Di=Symbol("QiuMenuNav"),Xk={class:"qiu-menu-nav-item__inner"},Gk={class:"qiu-menu-nav-item__title"},fs=de(e.defineComponent({name:"QiuMenuNavItem",__name:"QiuMenuNavItem",props:{index:{},title:{default:""},disabled:{type:Boolean,default:!1}},setup(t){const a=t,n=e.inject(Di,null);let o=null;try{o=Cn.useRouter()}catch{o=null}const r=e.computed(()=>(n==null?void 0:n.activeIndex.value)===a.index),c=()=>{a.disabled||!n||(n.selectItem(a.index),n.router.value&&o&&o.push(a.index).catch(()=>{}))};return(d,f)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["qiu-menu-nav-item",{"is-active":e.unref(r),"is-disabled":t.disabled}]),role:"menuitem",onClick:c},[e.createElementVNode("div",Xk,[e.renderSlot(d.$slots,"icon",{},void 0,!0),e.createElementVNode("span",Gk,[e.renderSlot(d.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])])],2))}}),[["__scopeId","data-v-00a82f73"]]),Jk=Object.freeze(Object.defineProperty({__proto__:null,default:fs},Symbol.toStringTag,{value:"Module"})),Zk={class:"qiu-menu-nav-sub__text"},ew={class:"qiu-menu-nav-sub__list"},ps=de(e.defineComponent({name:"QiuMenuNavSub",__name:"QiuMenuNavSub",props:{index:{},title:{default:""}},setup(t){const a=t,n=e.inject(Di,null),o=e.computed(()=>(n==null?void 0:n.isSubOpen(a.index))??!1),r=e.computed(()=>{const d=(n==null?void 0:n.activeIndex.value)??"";return d===a.index||d.startsWith(`${a.index}/`)}),c=()=>{n==null||n.toggleSub(a.index)};return(d,f)=>{var u;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["qiu-menu-nav-sub",{"is-open":e.unref(o),"is-active":e.unref(r)}]),role:"none"},[e.createElementVNode("div",{class:"qiu-menu-nav-sub__title",onClick:c},[e.renderSlot(d.$slots,"icon",{},void 0,!0),e.createElementVNode("span",Zk,[e.renderSlot(d.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),e.createElementVNode("span",{class:e.normalizeClass(["qiu-menu-nav-sub__arrow",{"is-open":e.unref(o)}])},"▾",2)]),e.withDirectives(e.createElementVNode("ul",ew,[e.renderSlot(d.$slots,"default",{},void 0,!0)],512),[[e.vShow,e.unref(o)&&!((u=e.unref(n))!=null&&u.collapse.value)]])],2)}}}),[["__scopeId","data-v-e63ed470"]]),tw=Object.freeze(Object.defineProperty({__proto__:null,default:ps},Symbol.toStringTag,{value:"Module"})),nw={class:"qiu-menu-nav__list"},hs=de(e.defineComponent({name:"QiuMenuNav",__name:"index",props:{mode:{default:"vertical"},defaultActive:{default:""},defaultOpeneds:{default:()=>[]},collapse:{type:Boolean,default:!1},router:{type:Boolean,default:!1}},emits:["select"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(n.defaultActive),c=e.ref(new Set(n.defaultOpeneds));e.watch(()=>n.defaultActive,b=>{b&&(r.value=b)}),e.watch(()=>n.defaultOpeneds,b=>{c.value=new Set(b||[])});const d=e.computed(()=>n.mode),f=e.computed(()=>n.collapse),u=e.computed(()=>n.defaultActive),h=e.computed(()=>r.value),p=e.computed(()=>n.router),_=b=>c.value.has(b),B=b=>{const C=new Set(c.value);C.has(b)?C.delete(b):C.add(b),c.value=C},$=b=>{r.value=b,o("select",b)};return e.provide(Di,{mode:d,collapse:f,defaultActive:u,activeIndex:h,router:p,selectItem:$,isSubOpen:_,toggleSub:B}),(b,C)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["qiu-menu-nav",[`qiu-menu-nav--${t.mode}`,{"is-collapse":t.collapse,"is-horizontal":t.mode==="horizontal"}]]),role:"menu"},[e.createElementVNode("ul",nw,[e.renderSlot(b.$slots,"default",{},void 0,!0)])],2))}}),[["__scopeId","data-v-f0ceb957"]]),ow=Object.freeze(Object.defineProperty({__proto__:null,default:hs},Symbol.toStringTag,{value:"Module"})),lw={class:"qiu-notify__content"},aw={key:0,class:"qiu-notify__title"},iw={key:1,class:"qiu-notify__message"},gs=e.defineComponent({name:"QiuNotificationItem",__name:"QiuNotificationItem",props:{id:{},type:{},position:{},title:{},message:{},showClose:{type:Boolean},visible:{type:Boolean}},emits:["close"],setup(t){const a=t,n=e.computed(()=>({success:"ri-checkbox-circle-line",warning:"ri-alert-line",info:"ri-information-line",error:"ri-close-circle-line"})[a.type]);return(o,r)=>(e.openBlock(),e.createBlock(e.Transition,{name:"qiu-notify-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["qiu-notify",[`qiu-notify--${t.type}`,`qiu-notify--${t.position}`]])},[e.createElementVNode("i",{class:e.normalizeClass(["qiu-notify__icon",e.unref(n)])},null,2),e.createElementVNode("div",lw,[t.title?(e.openBlock(),e.createElementBlock("div",aw,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),t.message?(e.openBlock(),e.createElementBlock("div",iw,e.toDisplayString(t.message),1)):e.createCommentVNode("",!0)]),t.showClose?(e.openBlock(),e.createElementBlock("i",{key:0,class:"qiu-notify__close ri-close-line",onClick:r[0]||(r[0]=c=>o.$emit("close"))})):e.createCommentVNode("",!0)],2),[[e.vShow,t.visible]])]),_:1}))}}),rw=Object.freeze(Object.defineProperty({__proto__:null,default:gs},Symbol.toStringTag,{value:"Module"})),cw=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuPage",inheritAttrs:!1,__name:"index",setup(t){return(a,n)=>{const o=Qo;return e.openBlock(),e.createBlock(o,e.normalizeProps(e.guardReactiveProps(a.$attrs)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)}}})},Symbol.toStringTag,{value:"Module"})),sw={class:"qiu-page-header"},dw={key:0,class:"qiu-page-header__breadcrumb"},mw={class:"qiu-page-header__main"},uw={class:"qiu-page-header__left"},fw={class:"qiu-page-header__heading"},pw={key:0,class:"qiu-page-header__title"},hw={key:1,class:"qiu-page-header__content"},gw={key:0,class:"qiu-page-header__extra"},_w=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuPageHeader",__name:"index",props:{title:{default:""},content:{default:""},icon:{default:""}},emits:["back"],setup(t,{emit:a}){const n=a;return(o,r)=>{const c=_t;return e.openBlock(),e.createElementBlock("div",sw,[o.$slots.breadcrumb?(e.openBlock(),e.createElementBlock("div",dw,[e.renderSlot(o.$slots,"breadcrumb",{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",mw,[e.createElementVNode("div",uw,[e.createElementVNode("button",{type:"button",class:"qiu-page-header__back","aria-label":"返回",onClick:r[0]||(r[0]=d=>n("back"))},[e.renderSlot(o.$slots,"icon",{},()=>[e.createVNode(c,{icon:t.icon||"arrow-left-line"},null,8,["icon"])],!0)]),e.createElementVNode("div",fw,[t.title||o.$slots.title?(e.openBlock(),e.createElementBlock("div",pw,[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),t.content||o.$slots.content?(e.openBlock(),e.createElementBlock("div",hw,[e.renderSlot(o.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)])):e.createCommentVNode("",!0)])]),o.$slots.extra?(e.openBlock(),e.createElementBlock("div",gw,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)])])}}}),[["__scopeId","data-v-b9f36bf4"]])},Symbol.toStringTag,{value:"Module"})),bw={class:"qiu-page-main"},yw={key:0,class:"qiu-page-main__header"},kw={class:"qiu-page-main__heading"},ww={key:0,class:"qiu-page-main__title"},xw={key:0,class:"qiu-page-main__desc"},Vw={key:0,class:"qiu-page-main__extra"},Cw={class:"qiu-page-main__body"},_s=de(e.defineComponent({name:"QiuPageMain",__name:"index",props:{title:{default:""},description:{default:""}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("section",bw,[t.title||a.$slots.title||a.$slots.extra?(e.openBlock(),e.createElementBlock("header",yw,[e.createElementVNode("div",kw,[e.renderSlot(a.$slots,"title",{},()=>[t.title?(e.openBlock(),e.createElementBlock("h2",ww,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0)],!0),t.description||a.$slots.description?(e.openBlock(),e.createElementBlock("p",xw,[e.renderSlot(a.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0)]),a.$slots.extra?(e.openBlock(),e.createElementBlock("div",Vw,[e.renderSlot(a.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Cw,[e.renderSlot(a.$slots,"default",{},void 0,!0)])]))}}),[["__scopeId","data-v-d9862b9c"]]),Nw=Object.freeze(Object.defineProperty({__proto__:null,default:_s},Symbol.toStringTag,{value:"Module"})),Bw={class:"qiu-pwd-strength__bars"},$w={key:0,class:"qiu-pwd-strength__label"},bs=de(e.defineComponent({name:"QiuPasswordStrength",__name:"index",props:{password:{default:""},showLabel:{type:Boolean,default:!0}},setup(t){const a=t,n=e.computed(()=>{const o=String(a.password||"");if(!o)return{score:0,label:"weak",text:""};let r=0;return o.length>=8&&r++,/[A-Z]/.test(o)&&/[a-z]/.test(o)&&r++,/\d/.test(o)&&r++,/[^A-Za-z0-9]/.test(o)&&r++,o.length<6&&(r=Math.min(r,1)),[{score:0,label:"weak",text:""},{score:1,label:"weak",text:"弱"},{score:2,label:"fair",text:"中"},{score:3,label:"good",text:"强"},{score:4,label:"strong",text:"极强"}][r]});return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-pwd-strength",[`qiu-pwd-strength--${n.value.label}`]])},[e.createElementVNode("div",Bw,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(4,c=>e.createElementVNode("span",{key:c,class:e.normalizeClass(["qiu-pwd-strength__bar",{"is-on":c<=n.value.score}])},null,2)),64))]),t.showLabel?(e.openBlock(),e.createElementBlock("span",$w,e.toDisplayString(n.value.text),1)):e.createCommentVNode("",!0)],2))}}),[["__scopeId","data-v-d3ac32c2"]]),Ew=Object.freeze(Object.defineProperty({__proto__:null,default:bs},Symbol.toStringTag,{value:"Module"})),Sw={class:"qiu-popconfirm-host"},Mw={class:"qiu-popconfirm__body"},qw={class:"qiu-popconfirm__title"},zw={class:"qiu-popconfirm__actions"},Tw=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuPopconfirm",inheritAttrs:!1,__name:"index",props:{title:{default:"确定执行此操作?"},confirmButtonText:{default:"确定"},cancelButtonText:{default:"取消"},confirmButtonType:{default:"primary"},width:{default:240},zIndex:{default:2e3}},emits:["confirm","cancel"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(!1),f=e.ref({}),u=e.computed(()=>typeof n.width=="number"?`${n.width}px`:String(n.width)),h=()=>{const C=r.value,k=c.value;if(!C||!k)return;const M=C.getBoundingClientRect(),V=k.getBoundingClientRect();let x=M.bottom+8,m=M.left+M.width/2-V.width/2;const w=window.innerWidth;m=Math.min(Math.max(8,m),w-V.width-8),f.value={position:"fixed",top:`${x}px`,left:`${m}px`,width:u.value}},p=async()=>{d.value=!0,await e.nextTick(),h()},_=()=>{d.value=!1},B=()=>{o("confirm"),_()},$=()=>{o("cancel"),_()},b=()=>{d.value&&h()};return e.watch(d,C=>{C?(window.addEventListener("scroll",b,!0),window.addEventListener("resize",b)):(window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b))}),e.onBeforeUnmount(()=>{window.removeEventListener("scroll",b,!0),window.removeEventListener("resize",b)}),(C,k)=>{const M=_t,V=nn;return e.openBlock(),e.createElementBlock("span",Sw,[e.createElementVNode("span",{ref_key:"triggerRef",ref:r,class:"qiu-popconfirm__trigger",onClick:p},[e.renderSlot(C.$slots,"reference",{},void 0,!0)],512),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-popconfirm-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"qiu-popconfirm-root",style:e.normalizeStyle({zIndex:String(t.zIndex)})},[e.createElementVNode("div",{class:"qiu-popconfirm__mask",onClick:$}),e.createElementVNode("div",{ref_key:"popperRef",ref:c,class:"qiu-popconfirm",style:e.normalizeStyle(e.unref(f)),onClick:k[0]||(k[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Mw,[e.createVNode(M,{class:"qiu-popconfirm__icon",icon:"error-warning-line"}),e.createElementVNode("div",qw,e.toDisplayString(t.title),1)]),e.createElementVNode("div",zw,[e.renderSlot(C.$slots,"actions",{},()=>[e.createVNode(V,{size:"small",onClick:$},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText),1)]),_:1}),e.createVNode(V,{size:"small",type:t.confirmButtonType,onClick:B},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText),1)]),_:1},8,["type"])],!0)])],4)],4),[[e.vShow,e.unref(d)]])]),_:3})]))])}}}),[["__scopeId","data-v-8266cb4c"]])},Symbol.toStringTag,{value:"Module"})),Iw={key:0,class:"qiu-popover__title"},Dw={class:"qiu-popover__body"},Rw=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuPopover",inheritAttrs:!1,__name:"index",props:{visible:{type:Boolean},title:{default:""},width:{default:240},placement:{default:"bottom"},trigger:{default:"click"},closeOnClickOutside:{type:Boolean,default:!0},zIndex:{default:2e3}},emits:["update:visible","show","hide"],setup(t,{emit:a}){const n=e.useAttrs(),o=t,r=a,c=e.ref(null),d=e.ref(null),f=e.ref(!1),u=e.ref({}),h=e.ref(!1),p=e.computed(()=>o.visible!==void 0),_=e.computed({get:()=>p.value?!!o.visible:f.value,set:D=>{p.value?r("update:visible",D):f.value=D}}),B=e.computed(()=>typeof o.width=="number"?`${o.width}px`:String(o.width)),$=()=>{const D=c.value,T=d.value;if(!D||!T)return;const L=D.getBoundingClientRect(),U=T.getBoundingClientRect(),oe=10;let H=0,Ve=0;switch(o.placement){case"top":H=L.top-U.height-oe,Ve=L.left+L.width/2-U.width/2;break;case"left":H=L.top+L.height/2-U.height/2,Ve=L.left-U.width-oe;break;case"right":H=L.top+L.height/2-U.height/2,Ve=L.right+oe;break;default:H=L.bottom+oe,Ve=L.left+L.width/2-U.width/2}const Z=window.innerWidth,z=window.innerHeight;Ve=Math.min(Math.max(4,Ve),Z-U.width-4),H=Math.min(Math.max(4,H),z-U.height-4),u.value={position:"fixed",top:`${H}px`,left:`${Ve}px`,width:B.value}},b=async()=>{_.value||(_.value=!0,r("show"),await e.nextTick(),$())},C=()=>{_.value&&(_.value=!1,r("hide"))},k=()=>{o.trigger==="click"&&(_.value?C():b())};let M;const V=()=>{o.trigger==="hover"&&(M&&clearTimeout(M),b())},E=()=>{o.trigger==="hover"&&(M=setTimeout(()=>{h.value||C()},120))},x=()=>{h.value=!0,M&&clearTimeout(M)},m=()=>{h.value=!1,o.trigger==="hover"&&E()},w=()=>{o.trigger==="click"&&o.closeOnClickOutside&&C()},S=D=>{var L,U;if(o.trigger!=="click"||!_.value)return;const T=D.target;(L=c.value)!=null&&L.contains(T)||(U=d.value)!=null&&U.contains(T)||o.closeOnClickOutside&&C()},N=()=>{_.value&&$()};return e.watch(_,D=>{D?(document.addEventListener("click",S,!0),window.addEventListener("scroll",N,!0),window.addEventListener("resize",N)):(document.removeEventListener("click",S,!0),window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",N))}),e.onBeforeUnmount(()=>{M&&clearTimeout(M),document.removeEventListener("click",S,!0),window.removeEventListener("scroll",N,!0),window.removeEventListener("resize",N)}),(D,T)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:"qiu-popover-host"},e.unref(n)),[e.createElementVNode("span",{ref_key:"triggerRef",ref:c,class:"qiu-popover__trigger",onClick:k,onMouseenter:V,onMouseleave:E},[e.renderSlot(D.$slots,"reference",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-popover-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{class:"qiu-popover-root",style:e.normalizeStyle({zIndex:String(t.zIndex)})},[t.trigger==="click"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-popover__mask",onClick:w})):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"popperRef",ref:d,class:e.normalizeClass(["qiu-popover",[`qiu-popover--${t.placement}`]]),style:e.normalizeStyle(e.unref(u)),role:"dialog",onMouseenter:x,onMouseleave:m,onClick:T[0]||(T[0]=e.withModifiers(()=>{},["stop"]))},[t.title||D.$slots.title?(e.openBlock(),e.createElementBlock("div",Iw,[e.renderSlot(D.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Dw,[e.renderSlot(D.$slots,"default",{},void 0,!0)])],38)],4),[[e.vShow,e.unref(_)]])]),_:3})]))],16))}}),[["__scopeId","data-v-6bac154c"]])},Symbol.toStringTag,{value:"Module"})),Lw=["aria-valuenow"],Pw={key:0,class:"qiu-progress__text qiu-progress__text--inside"},Ow={key:0,class:"qiu-progress__text"},jw=["viewBox"],Fw=["cx","cy","r","stroke-width"],Aw=["cx","cy","r","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","transform"],Qw={key:0,class:"qiu-progress__circle-text"},Uw=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuProgress",__name:"index",props:{percentage:{default:0},type:{default:"line"},status:{default:""},strokeWidth:{default:6},textInside:{type:Boolean,default:!1},color:{},showText:{type:Boolean,default:!0},width:{default:126}},setup(t){const a=t,n=e.computed(()=>Math.min(100,Math.max(0,a.percentage))),o=e.computed(()=>a.status?a.status:n.value>=100?"success":""),r=e.computed(()=>({success:"var(--qiu-color-success, var(--qiu-color-success, #67c23a))",exception:"var(--qiu-color-danger, var(--qiu-color-danger, #f56c6c))",warning:"var(--qiu-color-warning, var(--qiu-color-warning, #e6a23c))"})[o.value]||"var(--qiu-color-primary, var(--qiu-color-primary, #0f766e))"),c=e.computed(()=>typeof a.color=="string"?a.color:typeof a.color=="function"?a.color(n.value):r.value),d=e.computed(()=>({width:`${n.value}%`,backgroundColor:c.value})),f=e.computed(()=>o.value==="success"?"✓":o.value==="exception"?"✕":o.value==="warning"?"!":`${n.value}%`),u=e.computed(()=>a.width/2),h=e.computed(()=>(a.width-a.strokeWidth)/2),p=e.computed(()=>2*Math.PI*h.value),_=e.computed(()=>a.type==="dashboard"?.75:1),B=e.computed(()=>{const b=n.value/100;return p.value*(1-b*_.value)}),$=e.computed(()=>a.type==="dashboard"?`rotate(135 ${u.value} ${u.value})`:`rotate(-90 ${u.value} ${u.value})`);return(b,C)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-progress",[`qiu-progress--${t.type}`,{"is-success":e.unref(o)==="success","is-exception":e.unref(o)==="exception","is-warning":e.unref(o)==="warning"}]]),role:"progressbar","aria-valuenow":e.unref(n),"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:"qiu-progress__outer",style:e.normalizeStyle({height:`${t.strokeWidth}px`})},[e.createElementVNode("div",{class:e.normalizeClass(["qiu-progress__inner",{"is-text-inside":t.textInside}]),style:e.normalizeStyle(e.unref(d))},[t.textInside&&t.showText?(e.openBlock(),e.createElementBlock("span",Pw,[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)],!0)])):e.createCommentVNode("",!0)],6)],4),!t.textInside&&t.showText?(e.openBlock(),e.createElementBlock("span",Ow,[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)],!0)])):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createElementBlock("div",{key:1,class:"qiu-progress__circle",style:e.normalizeStyle({width:`${t.width}px`,height:`${t.width}px`})},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${t.width} ${t.width}`},[e.createElementVNode("circle",{class:"qiu-progress__track",cx:e.unref(u),cy:e.unref(u),r:e.unref(h),fill:"none","stroke-width":t.strokeWidth},null,8,Fw),e.createElementVNode("circle",{class:"qiu-progress__path",cx:e.unref(u),cy:e.unref(u),r:e.unref(h),fill:"none",stroke:e.unref(c),"stroke-width":t.strokeWidth,"stroke-dasharray":e.unref(p),"stroke-dashoffset":e.unref(B),"stroke-linecap":t.type==="dashboard"?"round":"butt",transform:e.unref($)},null,8,Aw)],8,jw)),t.showText?(e.openBlock(),e.createElementBlock("div",Qw,[e.renderSlot(b.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(f)),1)],!0)])):e.createCommentVNode("",!0)],4))],10,Lw))}}),[["__scopeId","data-v-bfffc557"]])},Symbol.toStringTag,{value:"Module"})),Ww=["width","height"],Hw={key:0,class:"qiu-qrcode__error"},ys=de(e.defineComponent({name:"QiuQrcode",__name:"index",props:{value:{default:""},size:{default:160},level:{default:"M"},fgColor:{default:"#000000"},bgColor:{default:"#ffffff"},margin:{default:2}},setup(t){const a=t,n=e.ref(null),o=e.ref(!1),r=(()=>{const u=new Array(256),h=new Array(256);let p=1;for(let E=0;E<255;E++)u[E]=p,h[p]=E,p<<=1,p&256&&(p^=285);const _=E=>u[(E%255+255)%255],B=E=>h[E],$=(E,x)=>E===0||x===0?0:_(B(E)+B(x)),b=E=>{let x=[1];for(let m=0;m<E;m++){const w=new Array(x.length+1).fill(0);for(let S=0;S<x.length;S++)w[S]^=$(x[S],1),w[S+1]^=$(x[S],_(m));x=w}return x},C={1:{L:7,M:10,Q:13,H:17},2:{L:10,M:16,Q:22,H:28},3:{L:15,M:26,Q:36,H:44},4:{L:20,M:36,Q:52,H:64},5:{L:26,M:48,Q:72,H:86},6:{L:36,M:64,Q:96,H:112},7:{L:40,M:72,Q:108,H:130},8:{L:48,M:88,Q:132,H:156},9:{L:60,M:110,Q:160,H:192},10:{L:72,M:130,Q:192,H:224}},k=[21,25,29,33,37,41,45,49,53,57],M=(E,x)=>{for(let m=1;m<=10;m++)if([17,32,53,78,106,134,154,192,230,271][m-1]>=E)return m;return 10};return{build:(E,x)=>{const m=new TextEncoder().encode(E),w=M(m.length),S=k[w-1],N=C[w][x],D=[],T=(He,ct)=>{for(let Q=ct-1;Q>=0;Q--)D.push(He>>Q&1)};T(4,4),T(m.length,8);for(const He of m)T(He,8);const U=((S-17)*(S-17)/8|0)*8;for(let He=0;He<4&&D.length<U;He++)D.push(0);for(;D.length%8!==0;)D.push(0);const oe=[];for(let He=0;He<D.length;He+=8){let ct=0;for(let Q=0;Q<8;Q++)ct=ct<<1|(D[He+Q]||0);oe.push(ct)}const H=Math.floor(U/8);let Ve=oe.length,Z=!0;for(;Ve<H;)oe.push(Z?236:17),Z=!Z,Ve++;const z=b(N),fe=new Array(N).fill(0);for(const He of oe){const ct=He^fe[0];if(fe.shift(),fe.push(0),ct!==0)for(let Q=0;Q<N;Q++)fe[Q]^=$(z[Q+1],ct)}const he=[...oe,...fe],se=S,te=Array.from({length:se},()=>new Array(se).fill(null)),re=Array.from({length:se},()=>new Array(se).fill(!1)),Ne=(He,ct,Q,F=!0)=>{te[He][ct]=Q,F&&(re[He][ct]=!0)},De=(He,ct)=>{for(let Q=-1;Q<=7;Q++)for(let F=-1;F<=7;F++){const Be=He+Q,qe=ct+F;if(Be<0||Be>=se||qe<0||qe>=se)continue;let K=!1;(Q>=0&&Q<=6&&(F===0||F===6)||F>=0&&F<=6&&(Q===0||Q===6)||Q>=2&&Q<=4&&F>=2&&F<=4)&&(K=!0),Ne(Be,qe,K,!0)}};De(0,0),De(0,se-7),De(se-7,0);for(let He=8;He<se-8;He++){const ct=He%2===0;re[6][He]||Ne(6,He,ct,!0),re[He][6]||Ne(He,6,ct,!0)}if(w>=2){const He=se-7;for(let ct=-2;ct<=2;ct++)for(let Q=-2;Q<=2;Q++){const F=He+ct,Be=He+Q,qe=Math.max(Math.abs(ct),Math.abs(Q))!==1;re[F][Be]||Ne(F,Be,qe,!0)}}Ne(8,0,!0,!0),Ne(se-8,8,!0,!0);let $e=0,Ge=-1,st=se-1,ht=se-1;for(;ht>0;){for(ht===6&&ht--;st>=0&&st<se;){for(let He=0;He<2;He++){const ct=ht-He;if(!re[st][ct]){let Q=!1;$e<he.length*8&&(Q=(he[$e>>3]>>7-($e&7)&1)===1,$e++),Ne(st,ct,Q,!1)}}st+=Ge}Ge=-Ge,st+=Ge,ht-=2}return{size:se,modules:te}}}})(),c=()=>{o.value=!1;const d=n.value;if(!d)return;const f=d.getContext("2d");if(f)try{const{size:u,modules:h}=r.build(a.value||" ",a.level),p=h.length,_=a.size/(p+a.margin*2);f.fillStyle=a.bgColor,f.fillRect(0,0,a.size,a.size),f.fillStyle=a.fgColor;for(let B=0;B<p;B++)for(let $=0;$<p;$++)h[B][$]&&f.fillRect(Math.round(a.margin*_+$*_),Math.round(a.margin*_+B*_),Math.ceil(_),Math.ceil(_))}catch{o.value=!0}};return e.onMounted(c),e.watch(()=>[a.value,a.size,a.level,a.fgColor,a.bgColor,a.margin],c),(d,f)=>(e.openBlock(),e.createElementBlock("div",{class:"qiu-qrcode",style:e.normalizeStyle({width:`${t.size}px`,height:`${t.size}px`})},[e.createElementVNode("canvas",{ref_key:"canvasRef",ref:n,width:t.size,height:t.size,class:"qiu-qrcode__canvas"},null,8,Ww),o.value?(e.openBlock(),e.createElementBlock("div",Hw,"生成失败")):e.createCommentVNode("",!0)],4))}}),[["__scopeId","data-v-3fe03057"]]),Yw=Object.freeze(Object.defineProperty({__proto__:null,default:ys},Symbol.toStringTag,{value:"Module"})),Kw={class:"qiu-query-form-col qiu-query-form-col--full"},vw={class:"bottom-panel"},Xw=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuQueryFormBottomPanel",__name:"QiuQueryFormBottomPanel",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",Kw,[e.createElementVNode("div",vw,[e.renderSlot(a.$slots,"default")])]))}})},Symbol.toStringTag,{value:"Module"})),Gw={class:"left-panel"},Jw=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuQueryFormLeftPanel",__name:"QiuQueryFormLeftPanel",props:{span:{type:Number,default:14}},setup(t){const a=t,n=e.computed(()=>({"--qiu-query-col-span":String(a.span)}));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"qiu-query-form-col",style:e.normalizeStyle(e.unref(n))},[e.createElementVNode("div",Gw,[e.renderSlot(o.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-22f6a5ab"]])},Symbol.toStringTag,{value:"Module"})),Zw={class:"right-panel"},e3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuQueryFormRightPanel",__name:"QiuQueryFormRightPanel",props:{span:{type:Number,default:10}},setup(t){const a=t,n=e.computed(()=>({"--qiu-query-col-span":String(a.span)}));return(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:"qiu-query-form-col",style:e.normalizeStyle(e.unref(n))},[e.createElementVNode("div",Zw,[e.renderSlot(o.$slots,"default",{},void 0,!0)])],4))}}),[["__scopeId","data-v-71aa82fc"]])},Symbol.toStringTag,{value:"Module"})),t3={class:"qiu-query-form-col qiu-query-form-col--full"},n3={class:"top-panel"},o3=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuQueryFormTopPanel",__name:"QiuQueryFormTopPanel",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",t3,[e.createElementVNode("div",n3,[e.renderSlot(a.$slots,"default")])]))}})},Symbol.toStringTag,{value:"Module"})),l3={class:"qiu-query-form"},a3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuQueryForm",__name:"index",setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("div",l3,[e.renderSlot(a.$slots,"default",{},void 0,!0)]))}}),[["__scopeId","data-v-1f52937f"]])},Symbol.toStringTag,{value:"Module"})),i3=["aria-valuenow","aria-valuemax"],r3=["disabled","onMousemove","onClick"],c3={class:"qiu-rate__icon qiu-rate__icon--void"},s3={key:0,class:"qiu-rate__text"},d3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuRate",__name:"index",props:{modelValue:{default:0},max:{default:5},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},allowHalf:{type:Boolean,default:!1},showScore:{type:Boolean,default:!1},showText:{type:Boolean,default:!1},texts:{default:()=>["极差","失望","一般","满意","惊喜"]},colors:{default:()=>["#f7ba2a","#f7ba2a","#f7ba2a"]},voidColor:{default:"#c0c4cc"},icon:{default:"star-fill"},voidIcon:{default:"star-line"}},emits:["update:modelValue","change"],setup(t,{emit:a}){e.useCssVars($=>({v73b936a8:e.unref(c)}));const n=t,o=a,r=e.ref(-1),c=e.computed(()=>n.voidColor),d=e.computed(()=>r.value>=0?r.value:n.modelValue),f=e.computed(()=>{const $=d.value,b=n.colors;return $<=n.max/3?b[0]||"#f7ba2a":$<=n.max*2/3?b[1]||b[0]||"#f7ba2a":b[2]||b[1]||b[0]||"#f7ba2a"}),u=e.computed(()=>{if(n.showScore)return String(d.value);if(!n.showText)return"";const $=Math.ceil(d.value)-1;return n.texts[Math.max(0,Math.min(n.texts.length-1,$))]||""}),h=$=>{const b=d.value;let C="0%";return b>=$?C="100%":n.allowHalf&&b+.5>=$&&b<$&&(C="50%"),{width:C,color:f.value}},p=($,b)=>{if(!n.allowHalf)return b;const k=$.currentTarget.getBoundingClientRect();return $.clientX-k.left<k.width/2?b-.5:b},_=($,b)=>{n.disabled||n.readonly||(r.value=p($,b))},B=($,b)=>{if(n.disabled||n.readonly)return;const C=p($,b);o("update:modelValue",C),o("change",C)};return($,b)=>{const C=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-rate",{"is-disabled":t.disabled,"is-readonly":t.readonly}]),role:"slider","aria-valuenow":t.modelValue,"aria-valuemin":0,"aria-valuemax":t.max},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.max,k=>(e.openBlock(),e.createElementBlock("button",{key:k,type:"button",class:e.normalizeClass(["qiu-rate__item",{"is-active":e.unref(d)>=k,"is-half":t.allowHalf&&e.unref(d)+.5===k}]),disabled:t.disabled||t.readonly,onMousemove:M=>_(M,k),onMouseleave:b[0]||(b[0]=M=>r.value=-1),onClick:M=>B(M,k)},[e.createElementVNode("span",c3,[e.createVNode(C,{icon:t.voidIcon},null,8,["icon"])]),e.createElementVNode("span",{class:"qiu-rate__icon qiu-rate__icon--full",style:e.normalizeStyle(h(k))},[e.createVNode(C,{icon:t.icon},null,8,["icon"])],4)],42,r3))),128)),t.showScore||t.showText?(e.openBlock(),e.createElementBlock("span",s3,e.toDisplayString(e.unref(u)),1)):e.createCommentVNode("",!0)],10,i3)}}}),[["__scopeId","data-v-d99bc534"]])},Symbol.toStringTag,{value:"Module"})),m3=Object.freeze(Object.defineProperty({__proto__:null,default:e.defineComponent({name:"QiuRefresh",__name:"index",setup(t){const a=e.ref(""),n=e.inject("$pub"),o=e.inject("$sub"),r=()=>{a.value="rotate",setTimeout(()=>{a.value=""},500)},c=()=>{n==null||n("reload-router-view"),r()};return e.onBeforeMount(()=>{o==null||o("refresh-rotate",()=>{r()})}),(d,f)=>{const u=_t;return e.openBlock(),e.createBlock(u,{class:e.normalizeClass(e.unref(a)),icon:"refresh-line",onClick:c},null,8,["class"])}}})},Symbol.toStringTag,{value:"Module"})),u3={class:"qiu-result__icon"},f3={key:0,class:"qiu-result__title"},p3={key:1,class:"qiu-result__subtitle"},h3={key:2,class:"qiu-result__extra"},g3={key:3,class:"qiu-result__content"},_3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuResult",__name:"index",props:{icon:{default:""},title:{default:""},subTitle:{default:""}},setup(t){const a=t,n={success:"checkbox-circle-line",warning:"error-warning-line",info:"information-line",error:"close-circle-line"},o=e.computed(()=>a.icon&&n[a.icon]||"");return(r,c)=>{const d=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-result",t.icon?`qiu-result--${t.icon}`:""])},[e.createElementVNode("div",u3,[e.renderSlot(r.$slots,"icon",{},()=>[e.unref(o)?(e.openBlock(),e.createBlock(d,{key:0,icon:e.unref(o)},null,8,["icon"])):e.createCommentVNode("",!0)],!0)]),t.title||r.$slots.title?(e.openBlock(),e.createElementBlock("div",f3,[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),t.subTitle||r.$slots["sub-title"]?(e.openBlock(),e.createElementBlock("div",p3,[e.renderSlot(r.$slots,"sub-title",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)],!0)])):e.createCommentVNode("",!0),r.$slots.extra?(e.openBlock(),e.createElementBlock("div",h3,[e.renderSlot(r.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0),r.$slots.default?(e.openBlock(),e.createElementBlock("div",g3,[e.renderSlot(r.$slots,"default",{},void 0,!0)])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-535c0a58"]])},Symbol.toStringTag,{value:"Module"})),b3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuRow",__name:"index",props:{gutter:{default:0},justify:{default:"start"},align:{default:"top"},tag:{default:"div"}},setup(t){const a=t,n=e.computed(()=>a.gutter||0);e.provide(Hc,{gutter:n});const o=e.computed(()=>{const r=a.gutter||0;return{marginLeft:r?`${-r/2}px`:void 0,marginRight:r?`${-r/2}px`:void 0,justifyContent:a.justify==="start"?"flex-start":a.justify==="end"?"flex-end":a.justify==="center"?"center":a.justify,alignItems:a.align==="top"?"flex-start":a.align==="bottom"?"flex-end":"center"}});return(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:"qiu-row",style:e.normalizeStyle(e.unref(o))},[e.renderSlot(r.$slots,"default",{},void 0,!0)],4))}}),[["__scopeId","data-v-8ecb499a"]])},Symbol.toStringTag,{value:"Module"})),y3=["value","placeholder","disabled"],ks=de(e.defineComponent({name:"QiuSearchBar",__name:"index",props:{modelValue:{default:""},placeholder:{default:"请输入关键词"},size:{default:"default"},disabled:{type:Boolean,default:!1},showButton:{type:Boolean,default:!1}},emits:["update:modelValue","search","clear"],setup(t,{emit:a}){const n=t,o=a,r=f=>{o("update:modelValue",f.target.value)},c=()=>{o("search",n.modelValue)},d=()=>{o("update:modelValue",""),o("clear")};return(f,u)=>{const h=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-search-bar",[`qiu-search-bar--${t.size}`]])},[e.createVNode(h,{icon:"search-line",class:"qiu-search-bar__icon"}),e.createElementVNode("input",{class:"qiu-search-bar__input",value:t.modelValue,placeholder:t.placeholder,disabled:t.disabled,onInput:r,onKeydown:e.withKeys(c,["enter"])},null,40,y3),t.modelValue?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-search-bar__clear","aria-label":"清除",onClick:d}," × ")):e.createCommentVNode("",!0),t.showButton?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:"qiu-search-bar__btn",onClick:c},[e.renderSlot(f.$slots,"button",{},()=>[u[0]||(u[0]=e.createTextVNode("搜索",-1))],!0)])):e.createCommentVNode("",!0)],2)}}}),[["__scopeId","data-v-720111db"]]),k3=Object.freeze(Object.defineProperty({__proto__:null,default:ks},Symbol.toStringTag,{value:"Module"})),w3=["disabled","onClick"],x3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuSegmented",__name:"index",props:{modelValue:{default:""},options:{default:()=>[]},size:{default:"default"},block:{type:Boolean,default:!1}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=c=>{c.disabled||c.value===n.modelValue||(o("update:modelValue",c.value),o("change",c.value))};return(c,d)=>{const f=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-segmented",[`qiu-segmented--${t.size}`,{"is-block":t.block}]]),role:"tablist"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,u=>(e.openBlock(),e.createElementBlock("button",{key:String(u.value),type:"button",role:"tab",class:e.normalizeClass(["qiu-segmented__item",{"is-active":t.modelValue===u.value,"is-disabled":u.disabled}]),disabled:u.disabled,onClick:h=>r(u)},[u.icon?(e.openBlock(),e.createBlock(f,{key:0,class:"qiu-segmented__icon",icon:u.icon},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(u.label),1)],10,w3))),128))],2)}}}),[["__scopeId","data-v-486b3af1"]])},Symbol.toStringTag,{value:"Module"})),ws=de(e.defineComponent({name:"QiuOption",__name:"QiuOption",props:{value:{type:[String,Number,Boolean]},label:{},disabled:{type:Boolean,default:!1}},setup(t){const a=t,n=e.inject("qiuSelect",null),o=e.ref(!1),r=e.computed(()=>(n==null?void 0:n.modelValue.value)===a.value),c=()=>{a.disabled||(o.value=!0,n==null||n.setHoverOption(a.value))},d=()=>{a.disabled||!n||n.selectOption(a.value,a.label??String(a.value))};return e.onMounted(()=>{n==null||n.registerOption({value:a.value,label:a.label??String(a.value),disabled:a.disabled})}),e.onUnmounted(()=>{n==null||n.unregisterOption(a.value)}),(f,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-option",{"is-selected":e.unref(r),"is-disabled":t.disabled,"is-hover":e.unref(o)}]),onMouseenter:c,onClick:d},[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)],!0)],34))}}),[["__scopeId","data-v-e04e3bdb"]]),V3=Object.freeze(Object.defineProperty({__proto__:null,default:ws},Symbol.toStringTag,{value:"Module"})),C3={key:0,class:"qiu-space__spacer"},N3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuSpace",__name:"index",props:{size:{default:"small"},direction:{default:"horizontal"},alignment:{default:"center"},wrap:{type:Boolean,default:!1},spacer:{default:""}},setup(t){const a={small:8,default:12,large:16},n=t,o=e.useSlots(),r=p=>{const _=[];for(const B of p)B.type!==e.Comment&&(B.type===e.Text&&!String(B.children??"").trim()||(B.type===e.Fragment&&Array.isArray(B.children)?_.push(...r(B.children)):_.push(B)));return _},c=e.computed(()=>{var p;return r(((p=o.default)==null?void 0:p.call(o))??[])}),d=e.computed(()=>typeof n.size=="number"?`${n.size}px`:`${a[n.size]??a.small}px`),f=e.computed(()=>({"qiu-space--vertical":n.direction==="vertical","is-wrap":n.wrap})),u={start:"flex-start",end:"flex-end",center:"center",baseline:"baseline",stretch:"stretch"},h=e.computed(()=>({gap:d.value,flexDirection:n.direction==="vertical"?"column":"row",alignItems:u[n.alignment]||"center",flexWrap:n.wrap?"wrap":"nowrap"}));return(p,_)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-space",e.unref(f)]),style:e.normalizeStyle(e.unref(h))},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(B,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:$},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(B))),t.spacer&&$<e.unref(c).length-1?(e.openBlock(),e.createElementBlock("span",C3,e.toDisplayString(t.spacer),1)):e.createCommentVNode("",!0)],64))),128))],6))}}),[["__scopeId","data-v-df2a9599"]])},Symbol.toStringTag,{value:"Module"})),B3=["viewBox"],$3=["stop-color"],E3=["stop-color"],S3=["d","fill"],M3=["d","stroke","stroke-width"],xs=de(e.defineComponent({name:"QiuSparkline",__name:"index",props:{data:{default:()=>[]},width:{default:120},height:{default:36},color:{default:"var(--qiu-color-primary, #409eff)"},fill:{type:Boolean,default:!0},strokeWidth:{default:1.5}},setup(t){const a=t,n=`qiu-spark-${Math.random().toString(36).slice(2,9)}`,o=e.computed(()=>{const f=a.data;if(!f.length)return{min:0,max:1};const u=Math.min(...f),h=Math.max(...f);return{min:u,max:h===u?u+1:h}}),r=e.computed(()=>{const f=a.data,u=f.length;if(!u)return[];const{min:h,max:p}=o.value,_=a.strokeWidth+1,B=a.width,b=a.height-_*2;return f.map((C,k)=>{const M=u===1?B/2:k/(u-1)*B,V=_+b-(C-h)/(p-h)*b;return{x:M,y:V}})}),c=e.computed(()=>r.value.map((f,u)=>`${u===0?"M":"L"}${f.x.toFixed(2)},${f.y.toFixed(2)}`).join(" ")),d=e.computed(()=>{if(!a.fill||!r.value.length)return"";const f=r.value[0],u=r.value[r.value.length-1],h=a.height;return`${c.value} L${u.x.toFixed(2)},${h} L${f.x.toFixed(2)},${h} Z`});return(f,u)=>(e.openBlock(),e.createElementBlock("span",{class:"qiu-sparkline",style:e.normalizeStyle({width:`${t.width}px`,height:`${t.height}px`})},[(e.openBlock(),e.createElementBlock("svg",{viewBox:`0 0 ${t.width} ${t.height}`,class:"qiu-sparkline__svg",preserveAspectRatio:"none"},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:n,x1:"0",y1:"0",x2:"0",y2:"1"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.color,"stop-opacity":"0.32"},null,8,$3),e.createElementVNode("stop",{offset:"100%","stop-color":t.color,"stop-opacity":"0"},null,8,E3)])]),d.value?(e.openBlock(),e.createElementBlock("path",{key:0,d:d.value,fill:`url(#${n})`},null,8,S3)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:c.value,stroke:t.color,"stroke-width":t.strokeWidth,fill:"none","stroke-linejoin":"round","stroke-linecap":"round"},null,8,M3)],8,B3))],4))}}),[["__scopeId","data-v-06041535"]]),q3=Object.freeze(Object.defineProperty({__proto__:null,default:xs},Symbol.toStringTag,{value:"Module"})),z3={class:"qiu-statistic"},T3={key:0,class:"qiu-statistic__title"},I3={key:0,class:"qiu-statistic__prefix"},D3={class:"qiu-statistic__value"},R3={key:1,class:"qiu-statistic__suffix"},Vs=de(e.defineComponent({name:"QiuStatistic",__name:"index",props:{value:{default:0},title:{default:""},precision:{default:0},prefix:{default:""},suffix:{default:""},valueStyle:{default:()=>({})},countdown:{type:Boolean,default:!1}},setup(t){const a=t,n=e.ref(Date.now());let o=null;const r=e.computed(()=>{const p=a.value;if(p instanceof Date)return p.getTime();if(typeof p=="number")return p;const _=Date.parse(String(p));return Number.isNaN(_)?Date.now():_}),c=p=>{const _=Math.max(0,Math.floor(p/1e3)),B=Math.floor(_/3600),$=Math.floor(_%3600/60),b=_%60,C=k=>String(k).padStart(2,"0");return`${C(B)}:${C($)}:${C(b)}`},d=p=>{const _=typeof p=="number"?p:Number(p);return Number.isNaN(_)?String(p):a.precision>=0?_.toFixed(a.precision):String(_)},f=e.computed(()=>a.countdown?c(r.value-n.value):d(a.value)),u=()=>{h(),a.countdown&&(n.value=Date.now(),o=setInterval(()=>{n.value=Date.now()},1e3))},h=()=>{o&&(clearInterval(o),o=null)};return e.watch(()=>a.countdown,u,{immediate:!0}),e.onBeforeUnmount(h),(p,_)=>(e.openBlock(),e.createElementBlock("div",z3,[t.title||p.$slots.title?(e.openBlock(),e.createElementBlock("div",T3,[e.renderSlot(p.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"qiu-statistic__content",style:e.normalizeStyle(t.valueStyle)},[t.prefix||p.$slots.prefix?(e.openBlock(),e.createElementBlock("span",I3,[e.renderSlot(p.$slots,"prefix",{},()=>[e.createTextVNode(e.toDisplayString(t.prefix),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("span",D3,e.toDisplayString(e.unref(f)),1),t.suffix||p.$slots.suffix?(e.openBlock(),e.createElementBlock("span",R3,[e.renderSlot(p.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(t.suffix),1)],!0)])):e.createCommentVNode("",!0)],4)]))}}),[["__scopeId","data-v-00fd9228"]]),L3=Object.freeze(Object.defineProperty({__proto__:null,default:Vs},Symbol.toStringTag,{value:"Module"})),P3=Object.freeze(Object.defineProperty({__proto__:null,default:Vs},Symbol.toStringTag,{value:"Module"})),Cs=Symbol("qiuSteps"),O3={class:"qiu-step__head"},j3={key:3,class:"qiu-step__index"},F3={key:0,class:"qiu-step__line"},A3={class:"qiu-step__main"},Q3={class:"qiu-step__title"},U3={key:0,class:"qiu-step__description"},Ns=de(e.defineComponent({name:"QiuStep",__name:"index",props:{title:{default:""},description:{default:""},icon:{default:""},status:{default:""}},setup(t){var h;const a=t,n=((h=e.getCurrentInstance())==null?void 0:h.uid)??Math.random(),o=e.inject(Cs,null),r=e.computed(()=>o?o.steps.value.findIndex(p=>p.uid===n):0),c=e.computed(()=>o?r.value===o.steps.value.length-1:!0),d=e.computed(()=>{if(a.status)return a.status;if(!o)return"wait";const p=r.value,_=o.active.value;return p<_?o.finishStatus.value:p===_?o.processStatus.value:"wait"}),f=e.computed(()=>{if(!(o!=null&&o.space.value))return;const p=o.space.value;return o.direction.value==="vertical"?{marginBottom:typeof p=="number"?`${p}px`:p}:{flexBasis:typeof p=="number"?`${p}px`:p}}),u=e.computed(()=>({uid:n,title:a.title,description:a.description,icon:a.icon,status:a.status}));return e.onMounted(()=>o==null?void 0:o.addStep(u.value)),e.onUnmounted(()=>o==null?void 0:o.removeStep(n)),e.watch(u,p=>{if(!o)return;const _=o.steps.value.findIndex(B=>B.uid===n);_>=0&&(o.steps.value[_]=p)}),(p,_)=>{var $;const B=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-step",[`qiu-step--${e.unref(d)}`,{"is-last":e.unref(c)},`qiu-step--${(($=e.unref(o))==null?void 0:$.direction.value)||"horizontal"}`]]),style:e.normalizeStyle(e.unref(f))},[e.createElementVNode("div",O3,[e.createElementVNode("div",{class:e.normalizeClass(["qiu-step__icon",{"is-text":!t.icon&&!p.$slots.icon}])},[e.renderSlot(p.$slots,"icon",{},()=>[t.icon?(e.openBlock(),e.createBlock(B,{key:0,icon:t.icon},null,8,["icon"])):e.unref(d)==="finish"?(e.openBlock(),e.createBlock(B,{key:1,icon:"check-line"})):e.unref(d)==="error"?(e.openBlock(),e.createBlock(B,{key:2,icon:"close-line"})):(e.openBlock(),e.createElementBlock("span",j3,e.toDisplayString(e.unref(r)+1),1))],!0)],2),e.unref(c)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",F3))]),e.createElementVNode("div",A3,[e.createElementVNode("div",Q3,[e.renderSlot(p.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),t.description||p.$slots.description?(e.openBlock(),e.createElementBlock("div",U3,[e.renderSlot(p.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0)])],6)}}}),[["__scopeId","data-v-827afc52"]]),W3=Object.freeze(Object.defineProperty({__proto__:null,default:Ns},Symbol.toStringTag,{value:"Module"})),H3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuSteps",__name:"index",props:{active:{default:0},space:{},direction:{default:"horizontal"},processStatus:{default:"process"},finishStatus:{default:"finish"},alignCenter:{type:Boolean,default:!1}},setup(t){const a=t,n=e.ref([]),o=c=>{n.value.push(c),n.value.sort((d,f)=>d.uid-f.uid)},r=c=>{n.value=n.value.filter(d=>d.uid!==c)};return e.provide(Cs,{active:e.toRef(a,"active"),space:e.toRef(a,"space"),direction:e.toRef(a,"direction"),processStatus:e.toRef(a,"processStatus"),finishStatus:e.toRef(a,"finishStatus"),alignCenter:e.toRef(a,"alignCenter"),steps:n,addStep:o,removeStep:r}),(c,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-steps",[`qiu-steps--${t.direction}`,{"is-center":t.alignCenter&&t.direction==="horizontal"}]])},[e.renderSlot(c.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-d81609e4"]])},Symbol.toStringTag,{value:"Module"})),Y3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuText",__name:"index",props:{type:{default:""},size:{default:"default"},truncated:{type:Boolean,default:!1},lineClamp:{default:0},tag:{default:"span"}},setup(t){const a=t,n=e.computed(()=>[a.type?`qiu-text--${a.type}`:"",a.size!=="default"?`qiu-text--${a.size}`:"",{"is-truncated":a.truncated,"is-line-clamp":a.lineClamp>0}]),o=e.computed(()=>{if(a.lineClamp>0)return{WebkitLineClamp:String(a.lineClamp)}});return(r,c)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.tag),{class:e.normalizeClass(["qiu-text",e.unref(n)]),style:e.normalizeStyle(e.unref(o))},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"default",{},void 0,!0)]),_:3},8,["class","style"]))}}),[["__scopeId","data-v-5076f62b"]])},Symbol.toStringTag,{value:"Module"})),K3=["title"],Bs=de(e.defineComponent({name:"QiuTimeAgo",__name:"index",props:{value:{default:void 0},autoUpdate:{type:Boolean,default:!0},interval:{default:3e4}},emits:["update"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(""),c=e.ref("");let d;const f=p=>{if(!p)return null;if(p instanceof Date)return isNaN(p.getTime())?null:p;if(typeof p=="number")return new Date(p);const _=new Date(p);return isNaN(_.getTime())?null:_},u=p=>{const B=Date.now()-p.getTime(),$=Math.abs(B),b=B<0,C=Math.floor($/1e3),k=Math.floor(C/60),M=Math.floor(k/60),V=Math.floor(M/24);let E;if(C<10)E="刚刚";else if(C<60)E=`${C} 秒${b?"后":"前"}`;else if(k<60)E=`${k} 分钟${b?"后":"前"}`;else if(M<24)E=`${M} 小时${b?"后":"前"}`;else if(V<30)E=`${V} 天${b?"后":"前"}`;else{const x=p.getFullYear(),m=String(p.getMonth()+1).padStart(2,"0"),w=String(p.getDate()).padStart(2,"0");r.value=`${x}-${m}-${w}`;return}r.value=E},h=()=>{const p=f(n.value);if(!p){r.value="--",c.value="";return}const _=B=>String(B).padStart(2,"0");c.value=`${p.getFullYear()}-${_(p.getMonth()+1)}-${_(p.getDate())} ${_(p.getHours())}:${_(p.getMinutes())}`,u(p),o("update",r.value)};return e.watch(()=>n.value,h,{immediate:!1}),e.onMounted(()=>{h(),n.autoUpdate&&n.interval>0&&(d=setInterval(h,n.interval))}),e.onBeforeUnmount(()=>{d&&clearInterval(d)}),(p,_)=>(e.openBlock(),e.createElementBlock("span",{class:"qiu-time-ago",title:c.value},[e.renderSlot(p.$slots,"default",{value:r.value},()=>[e.createTextVNode(e.toDisplayString(r.value),1)],!0)],8,K3))}}),[["__scopeId","data-v-cbe7f1c5"]]),v3=Object.freeze(Object.defineProperty({__proto__:null,default:Bs},Symbol.toStringTag,{value:"Module"})),X3=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuTimeline",__name:"index",props:{center:{type:Boolean,default:!1}},setup(t){return(a,n)=>(e.openBlock(),e.createElementBlock("ul",{class:e.normalizeClass(["qiu-timeline",{"qiu-timeline--center":t.center}])},[e.renderSlot(a.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-6d0d4a70"]])},Symbol.toStringTag,{value:"Module"})),G3={class:"qiu-timeline-item__dot"},J3={class:"qiu-timeline-item__wrapper"},Z3={key:0,class:"qiu-timeline-item__timestamp is-top"},ex={class:"qiu-timeline-item__content"},tx={key:1,class:"qiu-timeline-item__timestamp is-bottom"},$s=de(e.defineComponent({name:"QiuTimelineItem",__name:"index",props:{timestamp:{default:""},placement:{default:"bottom"},type:{default:"primary"},color:{default:""},hollow:{type:Boolean,default:!1},icon:{default:""},center:{type:Boolean,default:!1}},setup(t){const a=t,n={primary:"var(--qiu-color-primary, var(--qiu-color-primary, #409eff))",success:"var(--qiu-color-success, var(--qiu-color-success, #67c23a))",warning:"var(--qiu-color-warning, var(--qiu-color-warning, #e6a23c))",danger:"var(--qiu-color-danger, var(--qiu-color-danger, #f56c6c))",info:"var(--qiu-color-info, var(--qiu-color-info, #909399))"},o=e.computed(()=>a.type||"primary"),r=e.computed(()=>({"--qiu-timeline-dot-color":a.color||n[o.value]}));return(c,d)=>{const f=_t;return e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(["qiu-timeline-item",[`qiu-timeline-item--${e.unref(o)}`,`qiu-timeline-item--placement-${t.placement}`,{"is-hollow":t.hollow}]]),style:e.normalizeStyle(e.unref(r))},[d[0]||(d[0]=e.createElementVNode("div",{class:"qiu-timeline-item__tail"},null,-1)),e.createElementVNode("div",G3,[e.renderSlot(c.$slots,"dot",{},()=>[t.icon?(e.openBlock(),e.createBlock(f,{key:0,icon:t.icon},null,8,["icon"])):e.createCommentVNode("",!0)],!0)]),e.createElementVNode("div",J3,[t.timestamp&&t.placement==="top"?(e.openBlock(),e.createElementBlock("div",Z3,e.toDisplayString(t.timestamp),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ex,[e.renderSlot(c.$slots,"default",{},void 0,!0)]),t.timestamp&&t.placement==="bottom"?(e.openBlock(),e.createElementBlock("div",tx,e.toDisplayString(t.timestamp),1)):e.createCommentVNode("",!0)])],6)}}}),[["__scopeId","data-v-aa0c3e85"]]),nx=Object.freeze(Object.defineProperty({__proto__:null,default:$s},Symbol.toStringTag,{value:"Module"})),ox={key:0,class:"qiu-tips__title"},lx={class:"qiu-tips__content"},ax=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuTips",inheritAttrs:!1,__name:"index",props:{content:{default:""},title:{default:""},placement:{default:"top"},type:{default:"primary"},effect:{default:"dark"},trigger:{default:"hover"},showAfter:{default:0},hideAfter:{default:120},disabled:{type:Boolean,default:!1}},setup(t){const a=e.useAttrs(),n=t,o=e.ref(null),r=e.ref(null),c=e.ref(!1),d=e.ref({});let f,u,h=!1;const p=()=>{const x=o.value,m=r.value;if(!x||!m)return;const w=x.getBoundingClientRect(),S=m.getBoundingClientRect(),N=10;let D=0,T=0;switch(n.placement){case"bottom":D=w.bottom+N,T=w.left+w.width/2-S.width/2;break;case"left":D=w.top+w.height/2-S.height/2,T=w.left-S.width-N;break;case"right":D=w.top+w.height/2-S.height/2,T=w.right+N;break;default:D=w.top-S.height-N,T=w.left+w.width/2-S.width/2}T=Math.min(Math.max(4,T),window.innerWidth-S.width-4),D=Math.min(Math.max(4,D),window.innerHeight-S.height-4),d.value={position:"fixed",top:`${Math.round(D)}px`,left:`${Math.round(T)}px`,zIndex:"4100"}},_=()=>{f&&clearTimeout(f),u&&clearTimeout(u),f=void 0,u=void 0},B=async()=>{n.disabled||(_(),f=setTimeout(async()=>{c.value=!0,await e.nextTick(),p(),requestAnimationFrame(()=>p())},n.showAfter))},$=()=>{_(),u=setTimeout(()=>{(!h||n.trigger==="click")&&(c.value=!1),n.trigger==="hover"&&!h&&(c.value=!1)},n.hideAfter)},b=()=>{n.trigger==="hover"&&(h=!1,B())},C=()=>{n.trigger==="hover"&&(h=!1,$())},k=()=>{n.trigger!=="click"||n.disabled||(c.value?c.value=!1:B())},M=()=>{n.trigger==="hover"&&(h=!0,_())},V=x=>{var w,S;if(n.trigger!=="click"||!c.value)return;const m=x.target;(w=o.value)!=null&&w.contains(m)||(S=r.value)!=null&&S.contains(m)||(c.value=!1)},E=()=>{c.value&&p()};return e.watch(c,x=>{x?(window.addEventListener("scroll",E,!0),window.addEventListener("resize",E),n.trigger==="click"&&document.addEventListener("click",V,!0)):(window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E),document.removeEventListener("click",V,!0))}),e.onBeforeUnmount(()=>{_(),window.removeEventListener("scroll",E,!0),window.removeEventListener("resize",E),document.removeEventListener("click",V,!0)}),(x,m)=>(e.openBlock(),e.createElementBlock("span",e.mergeProps({class:"qiu-tips-host"},e.unref(a)),[e.createElementVNode("span",{ref_key:"triggerRef",ref:o,class:"qiu-tips__trigger",onMouseenter:b,onMouseleave:C,onClick:k},[e.renderSlot(x.$slots,"default",{},void 0,!0)],544),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"qiu-tips-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"popperRef",ref:r,class:e.normalizeClass(["qiu-tips",[`qiu-tips--${t.placement}`,`qiu-tips--${t.type}`,`qiu-tips--${t.effect}`]]),style:e.normalizeStyle(e.unref(d)),role:"tooltip",onMouseenter:M,onMouseleave:C},[t.title||x.$slots.title?(e.openBlock(),e.createElementBlock("div",ox,[e.renderSlot(x.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",lx,[e.renderSlot(x.$slots,"content",{},()=>[e.createTextVNode(e.toDisplayString(t.content),1)],!0)]),m[0]||(m[0]=e.createElementVNode("i",{class:"qiu-tips__arrow","aria-hidden":"true"},null,-1))],38),[[e.vShow,e.unref(c)]])]),_:3})]))],16))}}),[["__scopeId","data-v-ccdc5a15"]])},Symbol.toStringTag,{value:"Module"})),ix={class:"qiu-transfer"},rx={class:"qiu-transfer__panel"},cx={class:"qiu-transfer__header"},sx={class:"qiu-transfer__title"},dx={class:"qiu-transfer__count"},mx={key:0,class:"qiu-transfer__filter"},ux={class:"qiu-transfer__body"},fx={key:0,class:"qiu-transfer__empty"},px={class:"qiu-transfer__buttons"},hx={class:"qiu-transfer__panel"},gx={class:"qiu-transfer__header"},_x={class:"qiu-transfer__title"},bx={class:"qiu-transfer__count"},yx={key:0,class:"qiu-transfer__filter"},kx={class:"qiu-transfer__body"},wx={key:0,class:"qiu-transfer__empty"},xx=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuTransfer",__name:"index",props:{modelValue:{default:()=>[]},data:{default:()=>[]},titles:{default:()=>["列表 1","列表 2"]},filterable:{type:Boolean,default:!1},filterPlaceholder:{default:"请输入搜索内容"},buttonTexts:{default:()=>["移除","添加"]}},emits:["update:modelValue","change"],setup(t,{emit:a}){const n=t,o=a,r=e.ref([]),c=e.ref([]),d=e.ref(""),f=e.ref(""),u=e.computed(()=>n.data.filter(N=>!n.modelValue.includes(N.key))),h=e.computed(()=>n.data.filter(N=>n.modelValue.includes(N.key))),p=(N,D)=>D.trim()?N.label.toLowerCase().includes(D.trim().toLowerCase()):!0,_=e.computed(()=>u.value.filter(N=>p(N,d.value))),B=e.computed(()=>h.value.filter(N=>p(N,f.value))),$=e.computed(()=>_.value.filter(N=>!N.disabled).map(N=>N.key)),b=e.computed(()=>B.value.filter(N=>!N.disabled).map(N=>N.key)),C=e.computed(()=>$.value.length>0&&$.value.every(N=>r.value.includes(N))),k=e.computed(()=>r.value.some(N=>$.value.includes(N))&&!C.value),M=e.computed(()=>b.value.length>0&&b.value.every(N=>c.value.includes(N))),V=e.computed(()=>c.value.some(N=>b.value.includes(N))&&!M.value),E=N=>{o("update:modelValue",N),o("change",N)},x=N=>{r.value=N?[...$.value]:[]},m=N=>{c.value=N?[...b.value]:[]},w=()=>{const N=[...n.modelValue,...r.value];E(N),r.value=[]},S=()=>{const N=new Set(c.value),D=n.modelValue.filter(T=>!N.has(T));E(D),c.value=[]};return e.watch(()=>n.modelValue,()=>{const N=new Set(n.modelValue);r.value=r.value.filter(D=>!N.has(D)),c.value=c.value.filter(D=>N.has(D))}),(N,D)=>{const T=Bo,L=Wn,U=ua,oe=nn;return e.openBlock(),e.createElementBlock("div",ix,[e.createElementVNode("div",rx,[e.createElementVNode("div",cx,[e.createVNode(T,{"model-value":e.unref(C),indeterminate:e.unref(k),onChange:x},null,8,["model-value","indeterminate"]),e.createElementVNode("span",sx,e.toDisplayString(t.titles[0]),1),e.createElementVNode("span",dx,e.toDisplayString(e.unref(r).length)+"/"+e.toDisplayString(e.unref(u).length),1)]),t.filterable?(e.openBlock(),e.createElementBlock("div",mx,[e.createVNode(L,{modelValue:e.unref(d),"onUpdate:modelValue":D[0]||(D[0]=H=>e.isRef(d)?d.value=H:null),placeholder:t.filterPlaceholder,"prefix-icon":"search-line"},null,8,["modelValue","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",ux,[e.createVNode(U,{modelValue:e.unref(r),"onUpdate:modelValue":D[1]||(D[1]=H=>e.isRef(r)?r.value=H:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(_),H=>(e.openBlock(),e.createElementBlock("div",{key:String(H.key),class:"qiu-transfer__item"},[e.createVNode(T,{label:H.key,disabled:H.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(H.label),1)]),_:2},1032,["label","disabled"])]))),128))]),_:1},8,["modelValue"]),e.unref(_).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",fx,"无数据"))])]),e.createElementVNode("div",px,[e.createVNode(oe,{type:"primary",disabled:!e.unref(r).length,onClick:w},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonTexts[1])+" › ",1)]),_:1},8,["disabled"]),e.createVNode(oe,{disabled:!e.unref(c).length,onClick:S},{default:e.withCtx(()=>[e.createTextVNode(" ‹ "+e.toDisplayString(t.buttonTexts[0]),1)]),_:1},8,["disabled"])]),e.createElementVNode("div",hx,[e.createElementVNode("div",gx,[e.createVNode(T,{"model-value":e.unref(M),indeterminate:e.unref(V),onChange:m},null,8,["model-value","indeterminate"]),e.createElementVNode("span",_x,e.toDisplayString(t.titles[1]),1),e.createElementVNode("span",bx,e.toDisplayString(e.unref(c).length)+"/"+e.toDisplayString(e.unref(h).length),1)]),t.filterable?(e.openBlock(),e.createElementBlock("div",yx,[e.createVNode(L,{modelValue:e.unref(f),"onUpdate:modelValue":D[2]||(D[2]=H=>e.isRef(f)?f.value=H:null),placeholder:t.filterPlaceholder,"prefix-icon":"search-line"},null,8,["modelValue","placeholder"])])):e.createCommentVNode("",!0),e.createElementVNode("div",kx,[e.createVNode(U,{modelValue:e.unref(c),"onUpdate:modelValue":D[3]||(D[3]=H=>e.isRef(c)?c.value=H:null)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(B),H=>(e.openBlock(),e.createElementBlock("div",{key:String(H.key),class:"qiu-transfer__item"},[e.createVNode(T,{label:H.key,disabled:H.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(H.label),1)]),_:2},1032,["label","disabled"])]))),128))]),_:1},8,["modelValue"]),e.unref(B).length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",wx,"无数据"))])])])}}}),[["__scopeId","data-v-df6eddf6"]])},Symbol.toStringTag,{value:"Module"})),Vx=["onKeydown"],Cx={class:"qiu-tree-select__suffix"},Nx={class:"qiu-tree-select__dropdown"},Bx=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuTreeSelect",__name:"index",props:{modelValue:{default:null},data:{default:()=>[]},props:{default:()=>({})},placeholder:{default:"请选择"},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue","change","clear"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(!1),d=e.computed(()=>n.props),f=e.computed(()=>n.modelValue!==null&&n.modelValue!==void 0&&n.modelValue!==""),u=(k,M)=>{var V;for(const E of k){if(Eo(E,n.props)===M)return E;const m=E[((V=n.props)==null?void 0:V.children)??"children"];if(Array.isArray(m)){const w=u(m,M);if(w)return w}}return null},h=e.computed(()=>{if(!f.value)return"";const k=u(n.data,n.modelValue);return k?ba(k,n.props):String(n.modelValue)}),p=()=>{n.disabled||(c.value=!0)},_=()=>{c.value=!1},B=()=>{n.disabled||(c.value?_():p())},$=k=>{const M=Eo(k,n.props);o("update:modelValue",M),o("change",M),_()},b=()=>{o("update:modelValue",null),o("change",null),o("clear")},C=k=>{var M;(M=r.value)!=null&&M.contains(k.target)||_()};return e.onMounted(()=>document.addEventListener("mousedown",C)),e.onUnmounted(()=>document.removeEventListener("mousedown",C)),(k,M)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:r,class:e.normalizeClass(["qiu-tree-select",{"is-disabled":t.disabled,"is-focused":e.unref(c)}])},[e.createElementVNode("div",{class:"qiu-tree-select__wrapper",tabindex:"0",onClick:B,onKeydown:[e.withKeys(e.withModifiers(B,["prevent"]),["enter"]),e.withKeys(e.withModifiers(B,["prevent"]),["space"]),e.withKeys(_,["esc"])]},[e.createElementVNode("span",{class:e.normalizeClass(["qiu-tree-select__selected",{"is-placeholder":!e.unref(h)}])},e.toDisplayString(e.unref(h)||t.placeholder),3),e.createElementVNode("span",Cx,[t.clearable&&e.unref(f)&&!t.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-tree-select__clear",tabindex:"-1",onMousedown:M[0]||(M[0]=e.withModifiers(()=>{},["prevent"])),onClick:e.withModifiers(b,["stop"])}," × ",32)):e.createCommentVNode("",!0),e.createElementVNode("span",{class:e.normalizeClass(["qiu-tree-select__caret",{"is-open":e.unref(c)}])},"▾",2)])],40,Vx),e.createVNode(e.Transition,{name:"qiu-tree-select-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",Nx,[e.createVNode(bi,{data:t.data,props:e.unref(d),"highlight-current":"","default-expand-all":"",onNodeClick:$},null,8,["data","props"])],512),[[e.vShow,e.unref(c)]])]),_:1})],2))}}),[["__scopeId","data-v-477af231"]])},Symbol.toStringTag,{value:"Module"})),$x=["title"],Ex={class:"qiu-trend__value"},Es=de(e.defineComponent({name:"QiuTrend",__name:"index",props:{direction:{default:void 0},value:{default:void 0},showArrow:{type:Boolean,default:!0},prefix:{default:""},suffix:{default:""}},setup(t){const a=t,n=e.computed(()=>a.direction?a.direction:a.value===void 0?"flat":a.value>0?"up":a.value<0?"down":"flat"),o=e.computed(()=>`qiu-trend--${n.value}`),r=e.computed(()=>n.value==="up"?"arrow-up-line":n.value==="down"?"arrow-down-line":"subtract-line"),c=e.computed(()=>{if(a.value===void 0)return"";const f=a.value>0?"+":"";return`${a.prefix}${f}${a.value}${a.suffix}`}),d=e.computed(()=>n.value==="up"?"上升":n.value==="down"?"下降":"持平");return(f,u)=>{const h=_t;return e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["qiu-trend",o.value]),title:d.value},[t.showArrow?(e.openBlock(),e.createBlock(h,{key:0,icon:r.value,class:"qiu-trend__icon"},null,8,["icon"])):e.createCommentVNode("",!0),e.createElementVNode("span",Ex,[e.renderSlot(f.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(c.value),1)],!0)])],10,$x)}}}),[["__scopeId","data-v-e99af6d6"]]),Sx=Object.freeze(Object.defineProperty({__proto__:null,default:Es},Symbol.toStringTag,{value:"Module"})),Mx=["accept","multiple","disabled"],qx={key:0,class:"qiu-upload__card-list"},zx=["src"],Tx={key:1,class:"qiu-upload__card-name"},Ix={key:2,class:"qiu-upload__card-progress"},Dx=["disabled","onClick"],Rx={key:0,class:"qiu-upload__tip"},Lx={key:1,class:"qiu-upload__trigger"},Px={key:0,class:"qiu-upload__tip"},Ox={key:2,class:"qiu-upload__list"},jx={class:"qiu-upload__item-main"},Fx=["src"],Ax=["title"],Qx={class:"qiu-upload__size"},Ux=["disabled","onClick"],Wx={key:0,class:"qiu-upload__progress"},Hx={key:1,class:"qiu-upload__fail"},Yx={key:2,class:"qiu-upload__response"},Ss=de(e.defineComponent({name:"QiuUpload",__name:"index",props:{modelValue:{default:()=>[]},accept:{default:""},multiple:{type:Boolean,default:!1},limit:{default:0},disabled:{type:Boolean,default:!1},drag:{type:Boolean,default:!1},listType:{default:"text"},buttonText:{default:"点击上传"},tip:{default:""},autoUpload:{type:Boolean,default:!0},action:{default:""},headers:{default:()=>({})},name:{default:"file"},data:{default:()=>({})},withCredentials:{type:Boolean,default:!1},showPreview:{type:Boolean,default:!0},showResponse:{type:Boolean,default:!1},autoThumbnail:{type:Boolean,default:!1},thumbnailSize:{default:64},outputQuality:{default:.85},thumbnailType:{default:"image/jpeg"}},emits:["update:modelValue","change","remove","exceed","success","error","progress"],setup(t,{expose:a,emit:n}){const o=t,r=n,c=e.ref(null),d=e.ref(!1),f=e.ref([...o.modelValue]);let u=Date.now();e.watch(()=>o.modelValue,T=>{f.value=[...T||[]]});const h=()=>r("update:modelValue",[...f.value]),p=e.computed(()=>{const T=Math.max(24,o.thumbnailSize||64);return{width:`${T}px`,height:`${T}px`}}),_=e.computed(()=>{const T=Math.max(64,o.thumbnailSize||100);return{width:`${T}px`,height:`${T}px`}}),B=(T=0)=>T<1024?`${T} B`:T<1024*1024?`${(T/1024).toFixed(1)} KB`:`${(T/1024/1024).toFixed(1)} MB`,$=T=>/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(T),b=T=>!o.showPreview||!$(T.name)&&!T.url?"":T.thumbnail||T.url||"",C=T=>{if(typeof T=="string")return T;try{return JSON.stringify(T,null,2)}catch{return String(T)}},k=T=>{var L,U,oe;if(!T)return"";if(typeof T=="string"&&/^https?:|^\/|blob:|data:/i.test(T))return T;if(typeof T=="object"&&T){const H=T;return H.url||((L=H.data)==null?void 0:L.url)||((U=H.result)==null?void 0:U.url)||H.path||((oe=H.data)==null?void 0:oe.path)||""}return""},M=(T,L)=>new Promise(U=>{if(!T.type.startsWith("image/")){U("");return}const oe=new Image,H=URL.createObjectURL(T);oe.onload=()=>{const Ve=document.createElement("canvas"),Z=Math.min(L/oe.width,L/oe.height,1),z=Math.max(1,Math.round(oe.width*Z)),fe=Math.max(1,Math.round(oe.height*Z));Ve.width=z,Ve.height=fe;const he=Ve.getContext("2d");(o.thumbnailType==="image/jpeg"||o.thumbnailType==="image/webp")&&(he==null||he.fillRect(0,0,z,fe)),he==null||he.drawImage(oe,0,0,z,fe),URL.revokeObjectURL(H);try{U(Ve.toDataURL(o.thumbnailType,o.outputQuality))}catch{U("")}},oe.onerror=()=>{URL.revokeObjectURL(H),U("")},oe.src=H}),V=()=>{var T;o.disabled||(T=c.value)==null||T.click()},E=()=>{o.disabled||(d.value=!0)},x=()=>{d.value=!1},m=T=>{var L;d.value=!1,!o.disabled&&S(Array.from(((L=T.dataTransfer)==null?void 0:L.files)||[]))},w=T=>{const L=T.target,U=Array.from(L.files||[]);L.value="",S(U)},S=async T=>{if(T.length){if(o.limit&&f.value.length+T.length>o.limit){r("exceed",T,[...f.value]);return}for(const L of T){const U={uid:++u,name:L.name,size:L.size,raw:L,url:$(L.name)?URL.createObjectURL(L):void 0,status:"ready",percentage:0};o.autoThumbnail&&$(L.name)&&(U.thumbnail=await M(L,o.thumbnailSize)),f.value.push(U),h(),r("change",U,[...f.value]),o.autoUpload&&D(U)}}},N=T=>{var L;o.disabled||((L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url),f.value=f.value.filter(U=>U.uid!==T.uid),h(),r("remove",T,[...f.value]))},D=T=>{if(!T.raw)return;if(!o.action){T.status="success",T.percentage=100,T.response={local:!0,name:T.name,size:T.size,url:T.url},h(),r("success",T.response,T,[...f.value]);return}T.status="uploading",T.percentage=0,h();const L=new XMLHttpRequest,U=new FormData;U.append(o.name,T.raw,T.name),Object.entries(o.data||{}).forEach(([oe,H])=>U.append(oe,H)),L.upload.onprogress=oe=>{if(!oe.lengthComputable)return;const H=Math.round(oe.loaded/oe.total*100);T.percentage=H,h(),r("progress",H,T,[...f.value])},L.onload=()=>{if(L.status>=200&&L.status<300){let oe=L.responseText;try{oe=JSON.parse(L.responseText)}catch{}T.status="success",T.percentage=100,T.response=oe;const H=k(oe);H&&(T.url=H),h(),r("success",oe,T,[...f.value])}else T.status="fail",h(),r("error",new Error(`Upload failed: ${L.status}`),T,[...f.value])},L.onerror=()=>{T.status="fail",h(),r("error",new Error("Network error"),T,[...f.value])},L.open("POST",o.action),Object.entries(o.headers||{}).forEach(([oe,H])=>L.setRequestHeader(oe,H)),L.withCredentials=o.withCredentials,L.send(U)};return a({clearFiles:()=>{f.value.forEach(T=>{var L;(L=T.url)!=null&&L.startsWith("blob:")&&URL.revokeObjectURL(T.url)}),f.value=[],h()},submit:()=>{f.value.filter(T=>T.status==="ready").forEach(D)}}),(T,L)=>{const U=_t,oe=nn;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-upload",{"is-disabled":t.disabled,[`qiu-upload--${t.listType}`]:!0,"is-dragover":e.unref(d)}])},[e.createElementVNode("input",{ref_key:"inputRef",ref:c,class:"qiu-upload__input",type:"file",accept:t.accept,multiple:t.multiple,disabled:t.disabled,onChange:w},null,40,Mx),t.listType==="picture-card"?(e.openBlock(),e.createElementBlock("div",qx,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),H=>(e.openBlock(),e.createElementBlock("div",{key:H.uid,class:"qiu-upload__card",style:e.normalizeStyle(e.unref(_))},[t.showPreview&&b(H)?(e.openBlock(),e.createElementBlock("img",{key:0,src:b(H),class:"qiu-upload__card-img",alt:""},null,8,zx)):(e.openBlock(),e.createElementBlock("div",Tx,e.toDisplayString(H.name),1)),H.status==="uploading"?(e.openBlock(),e.createElementBlock("div",Ix,e.toDisplayString(H.percentage||0)+"% ",1)):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",class:"qiu-upload__card-remove",disabled:t.disabled,onClick:Ve=>N(H)}," × ",8,Dx)],4))),128)),!t.disabled&&(!t.limit||e.unref(f).length<t.limit)?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"qiu-upload__card-trigger",style:e.normalizeStyle(e.unref(_)),onClick:V},[e.createVNode(U,{icon:"add-line"}),L[0]||(L[0]=e.createElementVNode("span",null,"上传",-1))],4)):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.drag?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-upload__dragger",onClick:V,onDragover:e.withModifiers(E,["prevent"]),onDragleave:e.withModifiers(x,["prevent"]),onDrop:e.withModifiers(m,["prevent"])},[e.createVNode(U,{icon:"upload-cloud-2-line",class:"qiu-upload__drag-icon"}),L[1]||(L[1]=e.createElementVNode("p",null,[e.createTextVNode("将文件拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1)),t.tip?(e.openBlock(),e.createElementBlock("p",Rx,e.toDisplayString(t.tip),1)):e.createCommentVNode("",!0)],32)):(e.openBlock(),e.createElementBlock("div",Lx,[e.createVNode(oe,{type:"primary",disabled:t.disabled,icon:"upload-2-line",onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.buttonText),1)]),_:1},8,["disabled"]),t.tip?(e.openBlock(),e.createElementBlock("p",Px,e.toDisplayString(t.tip),1)):e.createCommentVNode("",!0)])),e.unref(f).length?(e.openBlock(),e.createElementBlock("ul",Ox,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(f),H=>(e.openBlock(),e.createElementBlock("li",{key:H.uid,class:"qiu-upload__item"},[e.createElementVNode("div",jx,[t.showPreview&&b(H)?(e.openBlock(),e.createElementBlock("img",{key:0,src:b(H),class:"qiu-upload__thumb",style:e.normalizeStyle(e.unref(p)),alt:""},null,12,Fx)):(e.openBlock(),e.createBlock(U,{key:1,icon:$(H.name)?"image-line":"file-line"},null,8,["icon"])),e.createElementVNode("span",{class:"qiu-upload__name",title:H.name},e.toDisplayString(H.name),9,Ax),e.createElementVNode("span",Qx,e.toDisplayString(B(H.size)),1),e.createElementVNode("button",{type:"button",class:"qiu-upload__remove",disabled:t.disabled,onClick:Ve=>N(H)},[e.createVNode(U,{icon:"close-line"})],8,Ux)]),H.status==="uploading"?(e.openBlock(),e.createElementBlock("div",Wx,[e.createElementVNode("div",{class:"qiu-upload__progress-bar",style:e.normalizeStyle({width:`${H.percentage||0}%`})},null,4)])):H.status==="fail"?(e.openBlock(),e.createElementBlock("div",Hx,"上传失败")):e.createCommentVNode("",!0),t.showResponse&&H.response!=null?(e.openBlock(),e.createElementBlock("pre",Yx,e.toDisplayString(C(H.response)),1)):e.createCommentVNode("",!0)]))),128))])):e.createCommentVNode("",!0)],64))],2)}}}),[["__scopeId","data-v-f1aab1f7"]]),Kx=Object.freeze(Object.defineProperty({__proto__:null,default:Ss},Symbol.toStringTag,{value:"Module"})),vx=["accept","disabled"],Xx={class:"qiu-upload-crop__trigger-text"},Gx={key:0,class:"qiu-upload-crop__tip"},Jx=["src"],Zx={class:"qiu-upload-crop__mask"},e4=["disabled"],t4=["disabled"],n4=["disabled"],o4={class:"qiu-upload-crop__dialog-box"},l4=["src"],a4=["onMousedown"],i4={class:"qiu-upload-crop__toolbar"},r4={class:"qiu-upload-crop__field"},c4={class:"qiu-upload-crop__field"},s4={class:"qiu-upload-crop__quality"},d4=["src"],Ms=de(e.defineComponent({name:"QiuUploadCrop",__name:"index",props:{modelValue:{default:""},width:{default:178},height:{default:178},type:{default:()=>["png","jpg","jpeg"]},size:{default:5},disabled:{type:Boolean,default:!1},buttonText:{default:"上传图片"},tip:{default:""},shape:{default:"rect"},circleOutput:{type:Boolean,default:!1},shadeClose:{type:Boolean,default:!0},outputType:{default:"image/jpeg"},accept:{default:"image/*"},outputQuality:{default:.92},outputWidth:{default:0},outputHeight:{default:0},withThumbnail:{type:Boolean,default:!1},thumbnailSize:{default:120},withAvatar:{type:Boolean,default:!1},avatarSize:{default:160},cropInitWidth:{default:0},cropInitHeight:{default:0},fixedAspect:{type:Boolean,default:!1},aspectRatio:{default:0},showRotate:{type:Boolean,default:!0},showFlip:{type:Boolean,default:!0},showZoom:{type:Boolean,default:!0},showSizeInputs:{type:Boolean,default:!0}},emits:["update:modelValue","change","cropper-image","cropper-thumbnail","cropper-avatar","cropper-result","cropper-file","remove","error"],setup(t,{emit:a}){const n=t,o=a,r=e.ref(null),c=e.ref(null),d=e.ref(null),f=e.ref(!1),u=e.ref(!1),h=e.ref(!1),p=e.ref(""),_=e.ref(n.modelValue),B=e.computed(()=>!!_.value),$=e.ref(1),b=e.ref(1),C=e.ref(1),k=e.ref(0),M=e.ref(0),V=e.ref(0),E=e.ref(0),x=e.ref(0),m=e.ref(0),w=e.ref(0),S=e.ref(0),N=e.ref(0),D=e.ref(n.outputQuality),T=J=>{if(J==null||J==="")return 0;if(typeof J=="number")return Number.isFinite(J)&&J>0?J:0;const G=String(J).trim();if(!G)return 0;const me=G.includes(":")?":":G.includes("/")?"/":"";if(me){const[ze,we]=G.split(me).map(Se=>Number(Se.trim()));return Number.isFinite(ze)&&Number.isFinite(we)&&we!==0?ze/we:0}const pe=Number(G);return Number.isFinite(pe)&&pe>0?pe:0},L=e.computed(()=>{const J=T(n.aspectRatio);return J>0?J:n.cropInitWidth>0&&n.cropInitHeight>0?n.cropInitWidth/n.cropInitHeight:n.outputWidth>0&&n.outputHeight>0?n.outputWidth/n.outputHeight:1}),U=e.computed(()=>({width:`${n.width}px`,height:`${n.height}px`})),oe=e.computed(()=>n.shape==="round"||n.circleOutput?{borderRadius:"50%"}:{}),H=e.computed(()=>({transform:`translate(${M.value}px, ${V.value}px) scale(${$.value}) rotate(${k.value}deg) scaleX(${b.value}) scaleY(${C.value})`})),Ve=e.computed(()=>({left:`${E.value}px`,top:`${x.value}px`,width:`${m.value}px`,height:`${w.value}px`})),Z=["nw","n","ne","e","se","s","sw","w"],z=J=>(J.split(".").pop()||"").toLowerCase(),fe=J=>{const G=z(J);return n.type.includes(G)},he=()=>{var J;n.disabled||(J=r.value)==null||J.click()},se=()=>{var J;n.disabled||(J=c.value)==null||J.classList.add("is-dragover")},te=()=>{var J;return(J=c.value)==null?void 0:J.classList.remove("is-dragover")},re=J=>{var me,pe,ze;if((me=c.value)==null||me.classList.remove("is-dragover"),n.disabled)return;const G=(ze=(pe=J.dataTransfer)==null?void 0:pe.files)==null?void 0:ze[0];G&&De(G)},Ne=J=>{var pe;const G=J.target,me=(pe=G.files)==null?void 0:pe[0];G.value="",me&&De(me)},De=J=>{if(!J.type.startsWith("image/")){o("error","仅支持图片文件");return}if(!fe(J.name)){o("error",`不支持的格式,仅允许:${n.type.join("/")}`);return}if(J.size>n.size*1024*1024){o("error",`文件超过 ${n.size}MB 限制`);return}const G=new FileReader;G.onload=()=>{p.value=G.result,u.value=!0,e.nextTick(Ge)},G.readAsDataURL(J)},$e=(J,G,me,pe,ze)=>{let we=pe,Se=ze;if(we<=0&&Se<=0){const We=J*.7,Je=G*.7;We/Je>me?(Se=Je,we=Se*me):(we=We,Se=we/me)}else we>0&&Se<=0?(we=Math.min(we,J),Se=we/me,Se>G&&(Se=G,we=Se*me)):Se>0&&we<=0?(Se=Math.min(Se,G),we=Se*me,we>J&&(we=J,Se=we/me)):(we=Math.min(we,J),Se=we/me,Se>G&&(Se=Math.min(ze,G),we=Se*me,we>J&&(we=J,Se=we/me)));return we=Math.max(20,Math.min(we,J)),Se=Math.max(20,Math.min(we/me,G)),we=Math.max(20,Math.min(Se*me,J)),Se=we/me,{w:we,h:Se}},Ge=()=>{const J=c.value;if(!J)return;const G=J.getBoundingClientRect(),me=new Image;me.onload=()=>{const pe=Math.min(G.width/me.width,G.height/me.height,1),ze=me.width*pe,we=me.height*pe;if($.value=pe,b.value=1,C.value=1,k.value=0,M.value=(G.width-ze)/2,V.value=(G.height-we)/2,n.fixedAspect){const Se=L.value,We=n.cropInitWidth>0?n.cropInitWidth:0,Je=n.cropInitHeight>0?n.cropInitHeight:0,Ze=$e(G.width,G.height,Se,We,Je);m.value=Ze.w,w.value=Ze.h}else{const Se=Math.min(G.width,G.height)*.7,We=n.cropInitWidth>0?Math.min(n.cropInitWidth,G.width):Se,Je=n.cropInitHeight>0?Math.min(n.cropInitHeight,G.height):Se;m.value=n.shape==="round"?Math.min(We,Je):Math.min(We,ze),w.value=n.shape==="round"?Math.min(We,Je):Math.min(Je,we)}E.value=(G.width-m.value)/2,x.value=(G.height-w.value)/2,st()},me.src=p.value},st=()=>{S.value=Math.round(m.value),N.value=Math.round(w.value)},ht=(J,G,me,pe,ze,we)=>{let Se=Math.max(20,Math.min(me,ze)),We=Math.max(20,Math.min(pe,we)),Je=Math.max(0,Math.min(J,ze-Se)),Ze=Math.max(0,Math.min(G,we-We));return Je+Se>ze&&(Se=ze-Je),Ze+We>we&&(We=we-Ze),{x:Je,y:Ze,w:Math.max(20,Se),h:Math.max(20,We)}},He=J=>{const G=c.value;if(!G)return;const me=G.getBoundingClientRect();let pe=Math.max(20,S.value||m.value),ze=Math.max(20,N.value||w.value);if(n.fixedAspect){const Se=L.value;J==="h"?pe=ze*Se:ze=pe/Se,pe>me.width&&(pe=me.width,ze=pe/Se),ze>me.height&&(ze=me.height,pe=ze*Se),pe=Math.max(20,pe),ze=Math.max(20,ze)}else pe=Math.max(20,Math.min(pe,me.width)),ze=Math.max(20,Math.min(ze,me.height));const we=ht(E.value,x.value,pe,ze,me.width,me.height);if(n.fixedAspect){const Se=L.value;let We=we.w,Je=We/Se;Je>me.height&&(Je=Math.min(we.h,me.height),We=Je*Se);const Ze=ht(we.x,we.y,We,Je,me.width,me.height);let tt=Ze.w,Ye=tt/Se;Ze.y+Ye>me.height&&(Ye=me.height-Ze.y,tt=Ye*Se),Ze.x+tt>me.width&&(tt=me.width-Ze.x,Ye=tt/Se),E.value=Math.max(0,Math.min(Ze.x,me.width-tt)),x.value=Math.max(0,Math.min(Ze.y,me.height-Ye)),m.value=Math.max(20,tt),w.value=Math.max(20,Ye)}else E.value=we.x,x.value=we.y,m.value=we.w,w.value=we.h;st()},ct=()=>Ge(),Q=J=>{k.value=((k.value+J)%360+360)%360},F=J=>{$.value=Math.max(.1,Math.min(5,+($.value-J.deltaY*.001).toFixed(3)))},Be=J=>{const G=J.clientX,me=J.clientY,pe=M.value,ze=V.value,we=We=>{M.value=pe+(We.clientX-G),V.value=ze+(We.clientY-me)},Se=()=>{window.removeEventListener("mousemove",we),window.removeEventListener("mouseup",Se)};window.addEventListener("mousemove",we),window.addEventListener("mouseup",Se)},qe=J=>{const G=J.clientX,me=J.clientY,pe=E.value,ze=x.value,we=c.value.getBoundingClientRect(),Se=Je=>{let Ze=pe+(Je.clientX-G),tt=ze+(Je.clientY-me);Ze=Math.max(0,Math.min(Ze,we.width-m.value)),tt=Math.max(0,Math.min(tt,we.height-w.value)),E.value=Ze,x.value=tt},We=()=>{window.removeEventListener("mousemove",Se),window.removeEventListener("mouseup",We)};window.addEventListener("mousemove",Se),window.addEventListener("mouseup",We)},K=(J,G,me,pe,ze,we,Se,We,Je,Ze)=>{let tt=G,Ye=me,rt=pe,ot=ze;const Mt=(dt,yt,Ot,ut)=>{rt=Math.max(20,dt),ot=rt/Ze,yt&&(tt=G+pe-rt),ut?Ye=me+(ze-ot)/2:Ot&&(Ye=me+ze-ot)},lt=(dt,yt,Ot,ut)=>{ot=Math.max(20,dt),rt=ot*Ze,yt&&(Ye=me+ze-ot),ut?tt=G+(pe-rt)/2:Ot&&(tt=G+pe-rt)};if(J==="e"||J==="w"){const dt=J==="e"?pe+we:pe-we;Mt(dt,J==="w",!1,!0)}else if(J==="n"||J==="s"){const dt=J==="s"?ze+Se:ze-Se;lt(dt,J==="n",!1,!0)}else{const dt=J.includes("e")?pe+we:pe-we,yt=J.includes("s")?ze+Se:ze-Se;Math.abs(we)*Ze>=Math.abs(Se)?(Mt(dt,J.includes("w"),J.includes("n"),!1),J.includes("n")&&(Ye=me+ze-ot)):(lt(yt,J.includes("n"),J.includes("w"),!1),J.includes("w")&&(tt=G+pe-rt))}return rt>We&&(rt=We,ot=rt/Ze),ot>Je&&(ot=Je,rt=ot*Ze),rt=Math.max(20,rt),ot=Math.max(20,ot),J.includes("w")&&(tt=G+pe-rt),J.includes("n"),J==="n"&&(Ye=me+ze-ot),J.includes("n")&&J.length===2&&(Ye=me+ze-ot),tt=Math.max(0,Math.min(tt,We-rt)),Ye=Math.max(0,Math.min(Ye,Je-ot)),tt+rt>We&&(rt=We-tt,ot=rt/Ze,J.includes("n")&&(Ye=me+ze-ot),Ye=Math.max(0,Math.min(Ye,Je-ot))),Ye+ot>Je&&(ot=Je-Ye,rt=ot*Ze,J.includes("w")&&(tt=G+pe-rt),tt=Math.max(0,Math.min(tt,We-rt))),{nx:tt,ny:Ye,nw:Math.max(20,rt),nh:Math.max(20,ot)}},X=(J,G)=>{const me=J.clientX,pe=J.clientY,ze=E.value,we=x.value,Se=m.value,We=w.value,Je=c.value.getBoundingClientRect(),Ze=Ye=>{const rt=Ye.clientX-me,ot=Ye.clientY-pe;let Mt=ze,lt=we,dt=Se,yt=We;if(n.fixedAspect){const Ot=K(G,ze,we,Se,We,rt,ot,Je.width,Je.height,L.value);Mt=Ot.nx,lt=Ot.ny,dt=Ot.nw,yt=Ot.nh}else G.includes("e")&&(dt=Math.max(20,Math.min(Se+rt,Je.width-ze))),G.includes("s")&&(yt=Math.max(20,Math.min(We+ot,Je.height-we))),G.includes("w")&&(Mt=Math.max(0,ze+rt),dt=ze+Se-Mt),G.includes("n")&&(lt=Math.max(0,we+ot),yt=we+We-lt),dt<20&&(dt=20,G.includes("w")&&(Mt=ze+Se-20)),yt<20&&(yt=20,G.includes("n")&&(lt=we+We-20));E.value=Mt,x.value=lt,m.value=dt,w.value=yt,st()},tt=()=>{window.removeEventListener("mousemove",Ze),window.removeEventListener("mouseup",tt)};window.addEventListener("mousemove",Ze),window.addEventListener("mouseup",tt)},le=()=>{n.shadeClose&&ye()},ye=()=>{u.value=!1},Pe=J=>{const G=J.naturalWidth,me=J.naturalHeight,pe=(k.value%360+360)%360,ze=pe*Math.PI/180,we=pe===90||pe===270,Se=we?me:G,We=we?G:me,Je=document.createElement("canvas");Je.width=Math.max(1,Se),Je.height=Math.max(1,We);const Ze=Je.getContext("2d");return Ze.translate(Se/2,We/2),Ze.rotate(ze),Ze.scale(b.value,C.value),Ze.drawImage(J,-G/2,-me/2),{canvas:Je,outW:Se,outH:We,swapped:we}},Qe=()=>{const J=d.value,G=c.value;if(!J||!G)return;const{canvas:me,outW:pe,outH:ze}=Pe(J),we=pe*$.value,Se=ze*$.value,We=pe/we,Je=M.value+(G.clientWidth-we)/2,Ze=V.value+(G.clientHeight-Se)/2,tt=(E.value-Je)*We,Ye=(x.value-Ze)*We,rt=m.value*We,ot=w.value*We,Mt=n.outputWidth>0?n.outputWidth:Math.max(1,Math.round(rt)),lt=n.outputHeight>0?n.outputHeight:Math.max(1,Math.round(ot)),dt=Bt(me,tt,Ye,rt,ot,Mt,lt,n.outputType,D.value,!1),yt=n.withThumbnail?Bt(me,tt,Ye,rt,ot,n.thumbnailSize,n.thumbnailSize,n.outputType,D.value,!1):"",Ot=n.outputType==="image/jpeg"?"image/png":n.outputType,ut=n.withAvatar?Bt(me,tt,Ye,rt,ot,n.avatarSize,n.avatarSize,Ot,1,!0):"";_.value=dt,o("update:modelValue",dt),o("change",dt),o("cropper-image",dt),yt&&o("cropper-thumbnail",yt),ut&&o("cropper-avatar",ut),o("cropper-result",{image:dt,thumbnail:yt,avatar:ut}),o("cropper-file",xt(dt,`crop.${wt(n.outputType)}`)),u.value=!1},Bt=(J,G,me,pe,ze,we,Se,We,Je,Ze)=>{const tt=document.createElement("canvas");tt.width=Math.max(1,Math.round(we)),tt.height=Math.max(1,Math.round(Se));const Ye=tt.getContext("2d");(We==="image/jpeg"||We==="image/webp")&&(Ye.fillStyle="#fff",Ye.fillRect(0,0,tt.width,tt.height)),Ze&&(Ye.beginPath(),Ye.arc(tt.width/2,tt.height/2,Math.min(tt.width,tt.height)/2,0,Math.PI*2),Ye.closePath(),Ye.clip());const rt="width"in J&&typeof J.width=="number"?J.width:J.naturalWidth||0,ot="height"in J&&typeof J.height=="number"?J.height:J.naturalHeight||0;let Mt=G,lt=me,dt=pe,yt=ze;return rt>0&&ot>0&&(Mt=Math.max(0,Math.min(G,rt-1)),lt=Math.max(0,Math.min(me,ot-1)),dt=Math.max(1,Math.min(pe,rt-Mt)),yt=Math.max(1,Math.min(ze,ot-lt))),Ye.drawImage(J,Mt,lt,dt,yt,0,0,tt.width,tt.height),tt.toDataURL(We,Je)},wt=J=>J.includes("png")?"png":J.includes("webp")?"webp":"jpg",xt=(J,G)=>{var We;const me=J.split(","),pe=((We=me[0].match(/:(.*?);/))==null?void 0:We[1])||"image/jpeg",ze=atob(me[1]),we=ze.length,Se=new Uint8Array(we);for(let Je=0;Je<we;Je++)Se[Je]=ze.charCodeAt(Je);return new File([Se],G,{type:pe})},pt=()=>{_.value="",p.value="",o("update:modelValue",""),o("remove")};return e.watch(()=>n.modelValue,J=>{J!==_.value&&(_.value=J)}),(J,G)=>{const me=_t;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["qiu-upload-crop",{"is-disabled":t.disabled}])},[!e.unref(B)&&!e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-upload-crop__trigger",style:e.normalizeStyle(e.unref(U)),onClick:he,onDragover:e.withModifiers(se,["prevent"]),onDragleave:e.withModifiers(te,["prevent"]),onDrop:e.withModifiers(re,["prevent"])},[e.createElementVNode("input",{ref_key:"inputRef",ref:r,class:"qiu-upload-crop__input",type:"file",accept:t.accept,disabled:t.disabled,onChange:Ne},null,40,vx),e.createVNode(me,{icon:"image-add-line",class:"qiu-upload-crop__trigger-icon"}),e.createElementVNode("p",Xx,e.toDisplayString(t.buttonText),1),t.tip?(e.openBlock(),e.createElementBlock("p",Gx,e.toDisplayString(t.tip),1)):e.createCommentVNode("",!0)],36)):!e.unref(u)&&e.unref(_)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"qiu-upload-crop__result",style:e.normalizeStyle(e.unref(U)),onMouseenter:G[2]||(G[2]=pe=>f.value=!0),onMouseleave:G[3]||(G[3]=pe=>f.value=!1)},[e.createElementVNode("img",{src:e.unref(_),class:"qiu-upload-crop__result-img",alt:"",style:e.normalizeStyle(e.unref(oe))},null,12,Jx),e.withDirectives(e.createElementVNode("div",Zx,[e.createElementVNode("button",{type:"button",disabled:t.disabled,title:"重新裁切",onClick:G[0]||(G[0]=pe=>u.value=!0)},[e.createVNode(me,{icon:"crop-line"})],8,e4),e.createElementVNode("button",{type:"button",disabled:t.disabled,title:"查看原图",onClick:G[1]||(G[1]=pe=>h.value=!0)},[e.createVNode(me,{icon:"zoom-in-line"})],8,t4),e.createElementVNode("button",{type:"button",disabled:t.disabled,title:"删除",onClick:pt},[e.createVNode(me,{icon:"delete-bin-line"})],8,n4)],512),[[e.vShow,e.unref(f)]])],36)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.unref(u)?(e.openBlock(),e.createElementBlock("div",{key:0,class:"qiu-upload-crop__dialog",onClick:e.withModifiers(le,["self"])},[e.createElementVNode("div",o4,[e.createElementVNode("div",{class:"qiu-upload-crop__dialog-head"},[G[17]||(G[17]=e.createElementVNode("span",null,"图片裁剪",-1)),e.createElementVNode("button",{type:"button",class:"qiu-upload-crop__close",onClick:ye},"×")]),e.createElementVNode("div",{ref_key:"stageRef",ref:c,class:"qiu-upload-crop__stage",onWheel:e.withModifiers(F,["prevent"]),onMousedown:Be},[e.createElementVNode("img",{ref_key:"imgRef",ref:d,src:e.unref(p),class:"qiu-upload-crop__source",style:e.normalizeStyle(e.unref(H)),alt:"",draggable:"false"},null,12,l4),e.createElementVNode("div",{class:e.normalizeClass(["qiu-upload-crop__crop",{"is-round":t.shape==="round"}]),style:e.normalizeStyle(e.unref(Ve)),onMousedown:e.withModifiers(qe,["stop"])},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(Z,pe=>e.createElementVNode("span",{key:pe,class:e.normalizeClass(["qiu-upload-crop__handle",`qiu-upload-crop__handle--${pe}`]),onMousedown:e.withModifiers(ze=>X(ze,pe),["stop"])},null,42,a4)),64))],38)],544),e.createElementVNode("div",i4,[t.showRotate?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",title:"左转",onClick:G[4]||(G[4]=pe=>Q(-90))},[e.createVNode(me,{icon:"anticlockwise-line"})])):e.createCommentVNode("",!0),t.showRotate?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",title:"右转",onClick:G[5]||(G[5]=pe=>Q(90))},[e.createVNode(me,{icon:"clockwise-line"})])):e.createCommentVNode("",!0),t.showFlip?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",title:"水平翻转",onClick:G[6]||(G[6]=pe=>b.value=-e.unref(b))},[e.createVNode(me,{icon:"flip-h-line"})])):e.createCommentVNode("",!0),t.showFlip?(e.openBlock(),e.createElementBlock("button",{key:3,type:"button",title:"垂直翻转",onClick:G[7]||(G[7]=pe=>C.value=-e.unref(C))},[e.createVNode(me,{icon:"flip-v-line"})])):e.createCommentVNode("",!0),t.showZoom?(e.openBlock(),e.createElementBlock("button",{key:4,type:"button",title:"放大",onClick:G[8]||(G[8]=pe=>$.value=Math.min(5,+(e.unref($)+.1).toFixed(2)))},[e.createVNode(me,{icon:"zoom-in-line"})])):e.createCommentVNode("",!0),t.showZoom?(e.openBlock(),e.createElementBlock("button",{key:5,type:"button",title:"缩小",onClick:G[9]||(G[9]=pe=>$.value=Math.max(.1,+(e.unref($)-.1).toFixed(2)))},[e.createVNode(me,{icon:"zoom-out-line"})])):e.createCommentVNode("",!0),e.createElementVNode("button",{type:"button",title:"重置",onClick:ct},[e.createVNode(me,{icon:"refresh-line"})]),t.showSizeInputs?(e.openBlock(),e.createElementBlock(e.Fragment,{key:6},[G[20]||(G[20]=e.createElementVNode("span",{class:"qiu-upload-crop__divider"},null,-1)),e.createElementVNode("label",r4,[G[18]||(G[18]=e.createElementVNode("span",null,"宽",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":G[10]||(G[10]=pe=>e.isRef(S)?S.value=pe:null),type:"number",min:"20",onChange:G[11]||(G[11]=pe=>He("w"))},null,544),[[e.vModelText,e.unref(S),void 0,{number:!0}]])]),e.createElementVNode("label",c4,[G[19]||(G[19]=e.createElementVNode("span",null,"高",-1)),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":G[12]||(G[12]=pe=>e.isRef(N)?N.value=pe:null),type:"number",min:"20",onChange:G[13]||(G[13]=pe=>He("h"))},null,544),[[e.vModelText,e.unref(N),void 0,{number:!0}]])]),e.createElementVNode("button",{type:"button",title:"应用尺寸",onClick:G[14]||(G[14]=pe=>He())},"应用")],64)):e.createCommentVNode("",!0),G[21]||(G[21]=e.createElementVNode("span",{class:"qiu-upload-crop__divider"},null,-1)),e.createElementVNode("label",s4,[e.createElementVNode("span",null,"质量 "+e.toDisplayString(e.unref(D)),1),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":G[15]||(G[15]=pe=>e.isRef(D)?D.value=pe:null),type:"range",min:"0.1",max:"1",step:"0.1"},null,512),[[e.vModelText,e.unref(D),void 0,{number:!0}]])]),e.renderSlot(J.$slots,"toolbar",{},void 0,!0),G[22]||(G[22]=e.createElementVNode("span",{class:"qiu-upload-crop__divider"},null,-1)),e.createElementVNode("button",{type:"button",class:"qiu-upload-crop__confirm",onClick:Qe},"确定")])])])):e.createCommentVNode("",!0),e.unref(h)?(e.openBlock(),e.createElementBlock("div",{key:1,class:"qiu-upload-crop__preview",onClick:G[16]||(G[16]=pe=>h.value=!1)},[e.createElementVNode("img",{src:e.unref(_)||e.unref(p),alt:""},null,8,d4)])):e.createCommentVNode("",!0)]))],2)}}}),[["__scopeId","data-v-8e94203c"]]),m4=Object.freeze(Object.defineProperty({__proto__:null,default:Ms},Symbol.toStringTag,{value:"Module"})),u4={class:"qiu-watermark__content"},f4=Object.freeze(Object.defineProperty({__proto__:null,default:de(e.defineComponent({name:"QiuWatermark",__name:"index",props:{content:{default:""},font:{default:()=>({color:"rgba(0,0,0,0.12)",fontSize:16,fontFamily:"sans-serif",fontWeight:"normal"})},gap:{default:()=>[100,100]},rotate:{default:-22},zIndex:{default:9},offset:{default:()=>[0,0]}},setup(t){const a=t,n=e.ref(null),o=e.ref(""),r=e.computed(()=>Array.isArray(a.content)?a.content:a.content?[a.content]:[]),c=()=>{if(!r.value.length){o.value="";return}const[f,u]=a.gap,[h,p]=a.offset,_=a.font,B=document.createElement("canvas"),$=B.getContext("2d");if(!$)return;const b=_.fontSize??16,C=_.fontFamily??"sans-serif",k=_.fontWeight??"normal";$.font=`${k} ${b}px ${C}`;const M=Math.max(...r.value.map(m=>$.measureText(m).width)),V=b*1.4,E=r.value.length*V;B.width=f+M+20,B.height=u+E+20,$.clearRect(0,0,B.width,B.height),$.translate(B.width/2+h,B.height/2+p),$.rotate(a.rotate*Math.PI/180),$.fillStyle=_.color??"rgba(0,0,0,0.12)",$.font=`${k} ${b}px ${C}`,$.textAlign="center",$.textBaseline="middle";const x=-((r.value.length-1)*V)/2;r.value.forEach((m,w)=>{$.fillText(m,0,x+w*V)}),o.value=B.toDataURL()},d=e.computed(()=>({zIndex:String(a.zIndex),backgroundImage:o.value?`url(${o.value})`:void 0}));return e.watch(()=>[a.content,a.gap,a.rotate,a.font,a.offset],()=>c(),{deep:!0,immediate:!0}),e.onMounted(()=>c()),(f,u)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"rootRef",ref:n,class:"qiu-watermark"},[e.createElementVNode("div",{class:"qiu-watermark__layer",style:e.normalizeStyle(e.unref(d)),"aria-hidden":"true"},null,4),e.createElementVNode("div",u4,[e.renderSlot(f.$slots,"default",{},void 0,!0)])],512))}}),[["__scopeId","data-v-854482ba"]])},Symbol.toStringTag,{value:"Module"}));if(typeof window<"u"){let t=function(){var a=document.body,n=document.getElementById("__svg__icons__dom__");n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.id="__svg__icons__dom__",n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),n.innerHTML='<symbol viewBox="0 0 1024 1024" id="qiu-icon-qiu-logo"><path d="m512 64 448 256v384L512 960 64 704V320z" fill="currentColor" /></symbol>',a.insertBefore(n,a.lastChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",t):t()}const Zo={"top-right":[],"top-left":[],"bottom-right":[],"bottom-left":[]};let p4=0;const h4=(t,a=20)=>{const n=`qiu-notify-host-${t}`;let o=document.getElementById(n);return o||(o=document.createElement("div"),o.id=n,o.className=`qiu-notify-host qiu-notify-host--${t}`,document.body.appendChild(o)),o.style.setProperty("--qiu-notify-offset",`${a}px`),o},Ba=t=>{Object.keys(Zo).forEach(a=>{const n=Zo[a].findIndex(o=>o.id===t);if(n>=0){const[o]=Zo[a].splice(n,1);o.timer&&clearTimeout(o.timer),o.app.unmount(),o.el.remove()}})},Bn=Object.assign(t=>{const a=typeof t=="string"?{message:t}:{...t},n=a.position||"top-right",o=a.type||"info",r=a.duration??4500,c=a.id||`qiu-notify-${++p4}`,d=a.offset??20;Ba(c);const f=h4(n,d),u=document.createElement("div");u.className="qiu-notify-wrap",f.appendChild(u);const h=e.ref(!0),p={id:c,app:null,el:u,position:n},_=()=>{p.timer&&(clearTimeout(p.timer),p.timer=void 0),h.value=!1,setTimeout(()=>{var $;Ba(c),($=a.onClose)==null||$.call(a)},200)},B=e.createApp({setup(){return()=>e.h(gs,{id:c,type:o,position:n,title:a.title||"",message:a.message||"",showClose:!0,visible:h.value,onClose:_})}});return r>0&&(p.timer=setTimeout(_,r)),B.mount(u),p.app=B,Zo[n].push(p),{close:()=>Ba(c),id:c}},{success(t){return Bn(typeof t=="string"?{message:t,type:"success"}:{...t,type:"success"})},warning(t){return Bn(typeof t=="string"?{message:t,type:"warning"}:{...t,type:"warning"})},info(t){return Bn(typeof t=="string"?{message:t,type:"info"}:{...t,type:"info"})},error(t){return Bn(typeof t=="string"?{message:t,type:"error"}:{...t,type:"error"})},closeAll:t=>{(t?[t]:Object.keys(Zo)).forEach(n=>{[...Zo[n]].forEach(o=>Ba(o.id))})}}),qs={install(t){t.config.globalProperties.$qiuNotify=Bn,t.provide("$qiuNotify",Bn)}};function g4(t){return{all:t=t||new Map,on:function(a,n){var o=t.get(a);o?o.push(n):t.set(a,[n])},off:function(a,n){var o=t.get(a);o&&(n?o.splice(o.indexOf(n)>>>0,1):t.set(a,[]))},emit:function(a,n){var o=t.get(a);o&&o.slice().map(function(r){r(n)}),(o=t.get("*"))&&o.slice().map(function(r){r(a,n)})}}}Ie.qiuApp=void 0;const _4={install:t=>{const a=(h=Rk,p)=>ka.service({text:h,fullscreen:!0}),n=(h,p="温馨提示",_)=>{ql(h,p,_)},o=(h,p,_,B,$="确定",b="取消")=>{hc(h,p||"温馨提示",_,B,$,b)},r=(h,p,_="success",B,$=Lk)=>{ke({message:p?`${p}:${h}`:h,type:_,duration:$,position:"right-top"})},c=g4(),d=(...h)=>{c.emit(ti.head(h),h[1])},f=(...h)=>{Reflect.apply(c.on,c,ti.toArray(h))},u=(...h)=>{Reflect.apply(c.off,c,ti.toArray(h))};t.provide("$baseAlert",n),t.provide("$baseConfirm",o),t.provide("$baseLoading",a),t.provide("$baseNotify",r),t.provide("$pub",d),t.provide("$sub",f),t.provide("$unsub",u),Ie.qiuApp={$baseAlert:n,$baseConfirm:o,$baseLoading:a,$baseNotify:r,$pub:d,$sub:f,$unsub:u}}};function b4(t){let a=String(t??"").trim();if(!a)return"";a=a.replace(/\s+/g,""),a=a.replace(/^[中国中华人民共和國共和国]+/,"");const n=/^(?:[^省特别行政区]+省|内蒙古自治区|广西壮族自治区|宁夏回族自治区|新疆维吾尔自治区|西藏自治区|北京市|天津市|上海市|重庆市|香港特别行政区|澳门特别行政区|台湾省|[^市]+市|[^区县旗]+区|[^区县旗]+县|[^区县旗]+旗|[^镇乡街道]+镇|[^镇乡街道]+乡|[^镇乡街道]+街道)/;let o=!0;for(;o&&a;){o=!1;const r=a.replace(n,"");r!==a&&(a=r,o=!0)}return a||t.trim()}function Ri(t,a){const n=(t.competition_name!=null?String(t.competition_name):"")||(a??""),o=String(t.school_name??""),r=String(t.school_short_name??t.school_name_short??"").trim()||b4(o);return{competition_name:n,student_name:String(t.student_name??""),competition_no:String(t.competition_no??""),school_name:o,school_short_name:r,age_group:String(t.age_group??""),competition_room:String(t.competition_room??""),seat_no:String(t.seat_no??""),floor:String(t.floor??""),teacher_name:String(t.teacher_name??""),date:String(t.date??t.competition_date??""),session:String(t.session??t.competition_session??""),enroll_teacher_name:String(t.enroll_teacher_name??""),teacher_phone:String(t.teacher_phone??""),signup_teacher_name:String(t.signup_teacher_name??""),signup_teacher_phone:String(t.signup_teacher_phone??""),signup_teacher_department:String(t.signup_teacher_department??""),signup_teacher_position:String(t.signup_teacher_position??""),signup_teacher_id_card:String(t.signup_teacher_id_card??""),signup_teacher_email:String(t.signup_teacher_email??""),signup_teacher_username:String(t.signup_teacher_username??""),venue_name:String(t.venue_name??""),venue_address:String(t.venue_address??""),competition_daily_start:String(t.competition_daily_start??""),competition_daily_end:String(t.competition_daily_end??"")}}function y4(t,a){return Ri(t,a)}function k4(t,a){const n=Ri(t,a);return lu(n,a)}const w4=["competition_name","student_name","competition_no","school_name","school_short_name","age_group","competition_room","seat_no","floor","teacher_name","date","session","enroll_teacher_name","teacher_phone","signup_teacher_name","signup_teacher_phone","signup_teacher_department","signup_teacher_position","signup_teacher_id_card","signup_teacher_email","signup_teacher_username","venue_name","venue_address","competition_daily_start","competition_daily_end"],x4={competition_name:"比赛名称",student_name:"学生姓名",competition_no:"参赛编号",school_name:"学校",school_short_name:"学校简称",age_group:"年龄段",competition_room:"考场/教室",seat_no:"座位号",floor:"楼层",teacher_name:"监考教师",date:"比赛日期",session:"场次",enroll_teacher_name:"报名/带队教师(扩展)",teacher_phone:"教师手机(扩展)",signup_teacher_name:"报名教师姓名",signup_teacher_phone:"报名教师手机",signup_teacher_department:"报名教师部门",signup_teacher_position:"报名教师职务",signup_teacher_id_card:"报名教师身份证",signup_teacher_email:"报名教师邮箱",signup_teacher_username:"报名教师账号",venue_name:"场地名称",venue_address:"场地地址",competition_daily_start:"比赛当天开始时间",competition_daily_end:"比赛当天结束时间"},zs=da().map(t=>({...t,enabled:["school","competition"].includes(t.id)}));function Ts(t){return{version:1,mode:"banner",canvas:{widthMm:320,heightMm:90,widthPx:1200,heightPx:340,unit:"px",background:"#0f766e",showBorder:!1},elements:[{id:"banner-title",type:"text",zIndex:2,xMm:20,yMm:25,wMm:200,hMm:20,text:"{{school.name}}",fontSize:28,fontFamily:"Microsoft YaHei, sans-serif",color:"#ffffff",link:{href:"https://example.com",target:"_blank"}},{id:"banner-sub",type:"text",zIndex:2,xMm:20,yMm:50,wMm:240,hMm:14,text:"{{competition.name}}",fontSize:14,fontFamily:"Microsoft YaHei, sans-serif",color:"#ccfbf1"}],dataModules:zs,...t}}function Is(t){return{version:1,mode:"badge",canvas:{widthMm:90,heightMm:130,unit:"mm",background:"#ffffff",showBorder:!0,borderColor:"#334155",borderWidthMm:.35},elements:[],dataModules:da(),...t}}const V4=Object.freeze(Object.defineProperty({__proto__:null,BANNER_DEFAULT_MODULES:zs,createBadgeDoc:Is,createBannerDoc:Ts},Symbol.toStringTag,{value:"Module"})),C4="1.0.1",Li=t=>{t.use(um),t.use(qs),t.use(Nc),t.use(_4),t.component("QiuIcon",_t),t.component("QiuOption",ws),t.component("QiuDropdownMenu",vo),t.component("QiuDropdownItem",Yn),t.component("QiuCheckboxGroup",ua),t.component("QiuRadioGroup",$l),t.component("QiuMenuRoot",ss),t.component("QiuMenuNav",hs),t.component("QiuMenuNavItem",fs),t.component("QiuMenuNavSub",ps),t.component("QiuStep",Ns),t.component("QiuTabBar",oa),t.component("QiuTabPane",la),t.component("QiuCollapseItem",Kc),t.component("QiuCarouselItem",Uc),t.component("QiuTimelineItem",$s),t.component("QiuDescriptionsItem",es),t.component("QiuAnchorLink",$r),Object.values(Object.assign({"./components/QiuAffix/index.vue":cd,"./components/QiuAlert/index.vue":_d,"./components/QiuAnchor/index.vue":yd,"./components/QiuAnchorLink/index.vue":wd,"./components/QiuApp/index.vue":xd,"./components/QiuAutocomplete/index.vue":Sd,"./components/QiuAvatar/index.vue":Td,"./components/QiuBacktop/index.vue":Id,"./components/QiuBadge/components/BadgeImagePickerDialog.vue":qm,"./components/QiuBadge/components/BadgeLibraryManagerDialog.vue":nu,"./components/QiuBadge/components/BadgeLibraryPanel.vue":tu,"./components/QiuBadge/shared/BadgeTemplateRenderer.vue":gu,"./components/QiuBadge/views/BadgeLibraryView.vue":bu,"./components/QiuBadge/views/BadgeManageView.vue":G0,"./components/QiuBadge/views/BadgeTemplateEditorView.vue":Y_,"./components/QiuBadge/views/BadgeTemplateListView.vue":Z_,"./components/QiuBadge/views/DeskLabelTemplateListView.vue":ab,"./components/QiuBadge/views/DeskLabelView.vue":Cb,"./components/QiuBadgeDot/index.vue":Nb,"./components/QiuButton/index.vue":im,"./components/QiuButtonGroup/index.vue":ug,"./components/QiuCanvasKit/QiuCanvasEditor.vue":H_,"./components/QiuCanvasKit/QiuCanvasRenderer.vue":hu,"./components/QiuCanvasKit/components/DataModulesPanel.vue":Ng,"./components/QiuCard/index.vue":Ym,"./components/QiuCarousel/index.vue":Sb,"./components/QiuCarouselItem/index.vue":qb,"./components/QiuCascader/index.vue":vb,"./components/QiuCheckbox/QiuCheckboxGroup.vue":qu,"./components/QiuCheckbox/index.vue":Du,"./components/QiuCode/index.vue":Xb,"./components/QiuCol/index.vue":Gb,"./components/QiuCollapse/index.vue":Zb,"./components/QiuCollapseItem/index.vue":oy,"./components/QiuColorField/index.vue":cg,"./components/QiuColorPicker/index.vue":ly,"./components/QiuColorfulCard/index.vue":iy,"./components/QiuCombobox/index.vue":my,"./components/QiuConfigProvider/index.vue":uy,"./components/QiuContextMenu/index.vue":by,"./components/QiuDate/index.vue":Oh,"./components/QiuDescriptions/index.vue":wy,"./components/QiuDescriptionsItem/index.vue":Cy,"./components/QiuDialog/index.vue":Ud,"./components/QiuDigitalCard/index.vue":Ty,"./components/QiuDivider/index.vue":mg,"./components/QiuDot/index.vue":Iy,"./components/QiuDrawer/index.vue":Oy,"./components/QiuDropdown/QiuDropdownItem.vue":Wf,"./components/QiuDropdown/QiuDropdownMenu.vue":Uf,"./components/QiuDropdown/index.vue":Af,"./components/QiuEmpty/index.vue":tm,"./components/QiuForm/index.vue":Nu,"./components/QiuFormItem/index.vue":Ku,"./components/QiuFullscreen/index.vue":jy,"./components/QiuGrid/index.vue":Uy,"./components/QiuHoverCard/index.vue":Yy,"./components/QiuIcon/index.vue":md,"./components/QiuIconPicker/index.vue":uk,"./components/QiuImage/index.vue":gk,"./components/QiuInput/index.vue":nf,"./components/QiuInputNumber/index.vue":Vu,"./components/QiuInputOtp/index.vue":bk,"./components/QiuKbd/index.vue":yk,"./components/QiuLayoutContainer/index.vue":kk,"./components/QiuLinkPreview/index.vue":Bk,"./components/QiuLoading/spinner.vue":$f,"./components/QiuMention/index.vue":Tk,"./components/QiuMenu/QiuMenuRoot.vue":Dk,"./components/QiuMenu/components/QiuMenuItem.vue":ms,"./components/QiuMenu/components/QiuSubMenu.vue":Nr,"./components/QiuMenu/index.vue":Qk,"./components/QiuMenuNav/QiuMenuNavItem.vue":Jk,"./components/QiuMenuNav/QiuMenuNavSub.vue":tw,"./components/QiuMenuNav/index.vue":ow,"./components/QiuMsg/QiuMsgItem.vue":sm,"./components/QiuNotification/QiuNotificationItem.vue":rw,"./components/QiuPage/index.vue":cw,"./components/QiuPageHeader/index.vue":_w,"./components/QiuPageMain/index.vue":Nw,"./components/QiuPagination/index.vue":Qm,"./components/QiuPasswordStrength/index.vue":Ew,"./components/QiuPopconfirm/index.vue":Tw,"./components/QiuPopover/index.vue":Rw,"./components/QiuProgress/index.vue":Uw,"./components/QiuQrcode/index.vue":Yw,"./components/QiuQueryForm/components/QiuQueryFormBottomPanel.vue":Xw,"./components/QiuQueryForm/components/QiuQueryFormLeftPanel.vue":Jw,"./components/QiuQueryForm/components/QiuQueryFormRightPanel.vue":e3,"./components/QiuQueryForm/components/QiuQueryFormTopPanel.vue":o3,"./components/QiuQueryForm/index.vue":a3,"./components/QiuRadio/QiuRadioGroup.vue":Ru,"./components/QiuRadio/index.vue":ju,"./components/QiuRate/index.vue":d3,"./components/QiuRefresh/index.vue":m3,"./components/QiuResult/index.vue":_3,"./components/QiuRow/index.vue":b3,"./components/QiuScrollbar/index.vue":Fh,"./components/QiuSearchBar/index.vue":k3,"./components/QiuSegmented/index.vue":x3,"./components/QiuSelect/QiuOption.vue":V3,"./components/QiuSelect/index.vue":Wu,"./components/QiuSkeleton/index.vue":Um,"./components/QiuSlider/index.vue":tg,"./components/QiuSpace/index.vue":N3,"./components/QiuSparkline/index.vue":q3,"./components/QiuStatistic/index.vue":P3,"./components/QiuStatistics/index.vue":L3,"./components/QiuStep/index.vue":W3,"./components/QiuSteps/index.vue":H3,"./components/QiuSwitch/index.vue":Mu,"./components/QiuTabBar/index.vue":Kd,"./components/QiuTabPane/index.vue":Xd,"./components/QiuTable/index.vue":oh,"./components/QiuTableColumn/index.vue":lh,"./components/QiuTag/index.vue":ih,"./components/QiuText/index.vue":Y3,"./components/QiuTime/index.vue":Rf,"./components/QiuTimeAgo/index.vue":v3,"./components/QiuTimeline/index.vue":X3,"./components/QiuTimelineItem/index.vue":nx,"./components/QiuTips/index.vue":ax,"./components/QiuTooltip/index.vue":Pf,"./components/QiuTransfer/index.vue":xx,"./components/QiuTree/QiuTreeNode.vue":Yh,"./components/QiuTree/index.vue":Gh,"./components/QiuTreeSelect/index.vue":Bx,"./components/QiuTrend/index.vue":Sx,"./components/QiuUpload/index.vue":Kx,"./components/QiuUploadCrop/index.vue":m4,"./components/QiuWatermark/index.vue":f4})).forEach(n=>{const o=n.default;o&&o.name&&!t.component(o.name)&&t.component(o.name,o)})},N4=Li,B4=Li;Ie.BADGE_PLACEHOLDER_KEYS=w4,Ie.BADGE_PLACEHOLDER_LABELS=x4,Ie.BUILTIN_DATA_MODULES=Ur,Ie.LEGACY_FLAT_KEY_MAP=ci,Ie.QIU_LOADING_EFFECTS=l0,Ie.QiuButton=nn,Ie.QiuCanvasDataModulesPanel=Bi,Ie.QiuCanvasEditor=Si,Ie.QiuCanvasRenderer=di,Ie.QiuCode=Wc,Ie.QiuColorPicker=vc,Ie.QiuCombobox=Xc,Ie.QiuConfigProvider=Gc,Ie.QiuContextMenu=Jc,Ie.QiuDigitalCard=ts,Ie.QiuHoverCard=ns,Ie.QiuInputOtp=ls,Ie.QiuKbd=as,Ie.QiuLayoutContainer=is,Ie.QiuLinkPreview=rs,Ie.QiuLoading=Nc,Ie.QiuMention=cs,Ie.QiuNotification=qs,Ie.QiuPageMain=_s,Ie.QiuPasswordStrength=bs,Ie.QiuQrcode=ys,Ie.QiuSearchBar=ks,Ie.QiuSparkline=xs,Ie.QiuTabBar=oa,Ie.QiuTabPane=la,Ie.QiuTimeAgo=Bs,Ie.QiuTrend=Es,Ie.QiuUpload=Ss,Ie.QiuUploadCrop=Ms,Ie.buildCanvasHtml=Dc,Ie.cloneBuiltinModules=da,Ie.createBadgeDoc=Is,Ie.createBannerDoc=Ts,Ie.createCustomModule=Hr,Ie.downloadCanvasHtml=Rc,Ie.downloadElementPdf=Lc,Ie.downloadElementPng=Ic,Ie.flattenBadgeForMerge=Ri,Ie.flattenDeskLabelForMerge=y4,Ie.listInsertableFields=Wr,Ie.mapRowToContext=k4,Ie.mergeBadgeText=iu,Ie.mergeTemplateText=Uo,Ie.qiuAlert=ql,Ie.qiuConfirm=hc,Ie.qiuConfirmPromise=Jh,Ie.qiuLoading=ka,Ie.qiuMsg=ke,Ie.qiuNotify=Bn,Ie.resolveDataModules=Tn,Ie.sampleContextFromModules=ma,Ie.setupFoucui=B4,Ie.setupQiu=Li,Ie.setupQiuye=N4,Ie.version=C4,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));