@vunk/plus 1.13.0 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (534) hide show
  1. package/ant/_util/BaseInput.d.ts +56 -0
  2. package/ant/_util/BaseInputInner.d.ts +65 -0
  3. package/ant/_util/BaseMixin.d.ts +7 -0
  4. package/ant/_util/EventInterface.d.ts +18 -0
  5. package/ant/_util/KeyCode.d.ts +436 -0
  6. package/ant/_util/Portal.d.ts +14 -0
  7. package/ant/_util/PortalWrapper.d.ts +41 -0
  8. package/ant/_util/canUseDom.d.ts +2 -0
  9. package/ant/_util/classNames.d.ts +2 -0
  10. package/ant/_util/collapseMotion.d.ts +3 -0
  11. package/ant/_util/colors.d.ts +13 -0
  12. package/ant/_util/copy-to-clipboard/index.d.ts +8 -0
  13. package/ant/_util/copy-to-clipboard/toggle-selection.d.ts +2 -0
  14. package/ant/_util/createContext.d.ts +5 -0
  15. package/ant/_util/createRef.d.ts +10 -0
  16. package/ant/_util/cssinjs/Cache.d.ts +11 -0
  17. package/ant/_util/cssinjs/Keyframes.d.ts +9 -0
  18. package/ant/_util/cssinjs/StyleContext.d.ts +508 -0
  19. package/ant/_util/cssinjs/hooks/useCacheToken.d.ts +40 -0
  20. package/ant/_util/cssinjs/hooks/useGlobalCache.d.ts +3 -0
  21. package/ant/_util/cssinjs/hooks/useHMR.d.ts +3 -0
  22. package/ant/_util/cssinjs/hooks/useStyleRegister/cacheMapUtil.d.ts +14 -0
  23. package/ant/_util/cssinjs/hooks/useStyleRegister/index.d.ts +68 -0
  24. package/ant/_util/cssinjs/index.d.ts +195 -0
  25. package/ant/_util/cssinjs/linters/contentQuotesLinter.d.ts +3 -0
  26. package/ant/_util/cssinjs/linters/hashedAnimationLinter.d.ts +3 -0
  27. package/ant/_util/cssinjs/linters/index.d.ts +6 -0
  28. package/ant/_util/cssinjs/linters/interface.d.ts +8 -0
  29. package/ant/_util/cssinjs/linters/legacyNotSelectorLinter.d.ts +3 -0
  30. package/ant/_util/cssinjs/linters/logicalPropertiesLinter.d.ts +3 -0
  31. package/ant/_util/cssinjs/linters/parentSelectorLinter.d.ts +3 -0
  32. package/ant/_util/cssinjs/linters/utils.d.ts +2 -0
  33. package/ant/_util/cssinjs/theme/Theme.d.ts +11 -0
  34. package/ant/_util/cssinjs/theme/ThemeCache.d.ts +20 -0
  35. package/ant/_util/cssinjs/theme/createTheme.d.ts +6 -0
  36. package/ant/_util/cssinjs/theme/index.d.ts +4 -0
  37. package/ant/_util/cssinjs/theme/interface.d.ts +2 -0
  38. package/ant/_util/cssinjs/transformers/interface.d.ts +4 -0
  39. package/ant/_util/cssinjs/transformers/legacyLogicalProperties.d.ts +12 -0
  40. package/ant/_util/cssinjs/transformers/px2rem.d.ts +20 -0
  41. package/ant/_util/cssinjs/util.d.ts +8 -0
  42. package/ant/_util/firstNotUndefined.d.ts +2 -0
  43. package/ant/_util/gapSize.d.ts +3 -0
  44. package/ant/_util/getScrollBarSize.d.ts +5 -0
  45. package/ant/_util/hooks/_vueuse/resolveUnref.d.ts +5 -0
  46. package/ant/_util/hooks/_vueuse/types.d.ts +114 -0
  47. package/ant/_util/hooks/_vueuse/unrefElement.d.ts +13 -0
  48. package/ant/_util/hooks/useBreakpoint.d.ts +4 -0
  49. package/ant/_util/hooks/useFlexGapSupport.d.ts +2 -0
  50. package/ant/_util/hooks/useMergedState.d.ts +7 -0
  51. package/ant/_util/hooks/useRefs.d.ts +7 -0
  52. package/ant/_util/hooks/useScrollLocker.d.ts +6 -0
  53. package/ant/_util/hooks/useState.d.ts +2 -0
  54. package/ant/_util/isValid.d.ts +2 -0
  55. package/ant/_util/omit.d.ts +2 -0
  56. package/ant/_util/pickAttrs.d.ts +11 -0
  57. package/ant/_util/placements.d.ts +65 -0
  58. package/ant/_util/props-util/index.d.ts +33 -0
  59. package/ant/_util/props-util/initDefaultProps.d.ts +6 -0
  60. package/ant/_util/raf.d.ts +5 -0
  61. package/ant/_util/responsiveObserve.d.ts +21 -0
  62. package/ant/_util/setStyle.d.ts +12 -0
  63. package/ant/_util/statusUtils.d.ts +6 -0
  64. package/ant/_util/styleChecker.d.ts +4 -0
  65. package/ant/_util/transButton.d.ts +34 -0
  66. package/ant/_util/transition.d.ts +18 -0
  67. package/ant/_util/type.d.ts +62 -0
  68. package/ant/_util/util.d.ts +18 -0
  69. package/ant/_util/vnode.d.ts +11 -0
  70. package/ant/_util/vue-types/index.d.ts +12 -0
  71. package/ant/_util/warning.d.ts +6 -0
  72. package/ant/_util/wave/WaveEffect.d.ts +6 -0
  73. package/ant/_util/wave/index.d.ts +13 -0
  74. package/ant/_util/wave/style.d.ts +6 -0
  75. package/ant/_util/wave/useWave.d.ts +4 -0
  76. package/ant/_util/wave/util.d.ts +3 -0
  77. package/ant/button/LoadingIcon.d.ts +12 -0
  78. package/ant/button/button-group.d.ts +33 -0
  79. package/ant/button/button.d.ts +112 -0
  80. package/ant/button/buttonTypes.d.ts +58 -0
  81. package/ant/button/index.d.ts +12 -0
  82. package/ant/button/style/group.d.ts +4 -0
  83. package/ant/button/style/index.d.ts +10 -0
  84. package/ant/calendar/style/index.d.ts +21 -0
  85. package/ant/config-provider/DisabledContext.d.ts +4 -0
  86. package/ant/config-provider/SizeContext.d.ts +4 -0
  87. package/ant/config-provider/context.d.ts +208 -0
  88. package/ant/config-provider/cssVariables.d.ts +3 -0
  89. package/ant/config-provider/hooks/useConfigInject.d.ts +37 -0
  90. package/ant/config-provider/hooks/useTheme.d.ts +3 -0
  91. package/ant/config-provider/index.d.ts +290 -0
  92. package/ant/config-provider/renderEmpty.d.ts +8 -0
  93. package/ant/config-provider/style/index.d.ts +3 -0
  94. package/ant/date-picker/style/index.d.ts +35 -0
  95. package/ant/empty/empty.d.ts +2 -0
  96. package/ant/empty/index.d.ts +86 -0
  97. package/ant/empty/simple.d.ts +2 -0
  98. package/ant/empty/style/index.d.ts +5 -0
  99. package/ant/flex/index.d.ts +142 -0
  100. package/ant/flex/interface.d.ts +36 -0
  101. package/ant/flex/style/index.d.ts +29 -0
  102. package/ant/flex/utils.d.ts +6 -0
  103. package/ant/form/ErrorList.d.ts +21 -0
  104. package/ant/form/Form.d.ts +772 -0
  105. package/ant/form/FormItem.d.ts +191 -0
  106. package/ant/form/FormItemContext.d.ts +32 -0
  107. package/ant/form/FormItemInput.d.ts +44 -0
  108. package/ant/form/FormItemLabel.d.ts +19 -0
  109. package/ant/form/context.d.ts +35 -0
  110. package/ant/form/index.d.ts +16 -0
  111. package/ant/form/interface.d.ts +171 -0
  112. package/ant/form/style/explain.d.ts +4 -0
  113. package/ant/form/style/index.d.ts +7 -0
  114. package/ant/form/useForm.d.ts +45 -0
  115. package/ant/form/utils/asyncUtil.d.ts +2 -0
  116. package/ant/form/utils/messages.d.ts +47 -0
  117. package/ant/form/utils/typeUtil.d.ts +1 -0
  118. package/ant/form/utils/useDebounce.d.ts +2 -0
  119. package/ant/form/utils/validateUtil.d.ts +6 -0
  120. package/ant/form/utils/valueUtil.d.ts +15 -0
  121. package/ant/grid/Col.d.ts +116 -0
  122. package/ant/grid/Row.d.ts +77 -0
  123. package/ant/grid/context.d.ts +11 -0
  124. package/ant/grid/index.d.ts +10 -0
  125. package/ant/grid/style/index.d.ts +2 -0
  126. package/ant/image/PreviewGroup.d.ts +37 -0
  127. package/ant/image/index.d.ts +71 -0
  128. package/ant/image/style/index.d.ts +21 -0
  129. package/ant/index.cjs +203 -0
  130. package/ant/index.d.ts +27 -0
  131. package/ant/index.mjs +20993 -0
  132. package/ant/input/ClearableLabeledInput.d.ts +151 -0
  133. package/ant/input/Group.d.ts +24 -0
  134. package/ant/input/Input.d.ts +191 -0
  135. package/ant/input/Password.d.ts +217 -0
  136. package/ant/input/ResizableTextArea.d.ts +215 -0
  137. package/ant/input/Search.d.ts +195 -0
  138. package/ant/input/TextArea.d.ts +217 -0
  139. package/ant/input/calculateNodeHeight.d.ts +9 -0
  140. package/ant/input/index.d.ts +15 -0
  141. package/ant/input/inputProps.d.ts +207 -0
  142. package/ant/input/style/index.d.ts +30 -0
  143. package/ant/input/util.d.ts +2 -0
  144. package/ant/locale/LocaleReceiver.d.ts +35 -0
  145. package/ant/locale/en_US.d.ts +3 -0
  146. package/ant/locale/index.d.ts +91 -0
  147. package/ant/locale-provider/LocaleReceiver.d.ts +3 -0
  148. package/ant/locale-provider/index.d.ts +3 -0
  149. package/ant/modal/locale.d.ts +7 -0
  150. package/ant/modal/style/index.d.ts +32 -0
  151. package/ant/progress/Circle.d.ts +168 -0
  152. package/ant/progress/Line.d.ts +205 -0
  153. package/ant/progress/Steps.d.ts +168 -0
  154. package/ant/progress/index.d.ts +204 -0
  155. package/ant/progress/progress.d.ts +117 -0
  156. package/ant/progress/props.d.ts +79 -0
  157. package/ant/progress/style/index.d.ts +4 -0
  158. package/ant/progress/utils.d.ts +13 -0
  159. package/ant/space/Compact.d.ts +119 -0
  160. package/ant/space/style/compact.d.ts +8 -0
  161. package/ant/space/style/index.d.ts +5 -0
  162. package/ant/style/compact-item-vertical.d.ts +4 -0
  163. package/ant/style/compact-item.d.ts +18 -0
  164. package/ant/style/index.d.ts +13 -0
  165. package/ant/style/motion/collapse.d.ts +4 -0
  166. package/ant/style/motion/fade.d.ts +7 -0
  167. package/ant/style/motion/index.d.ts +6 -0
  168. package/ant/style/motion/motion.d.ts +2 -0
  169. package/ant/style/motion/move.d.ts +15 -0
  170. package/ant/style/motion/slide.d.ts +15 -0
  171. package/ant/style/motion/zoom.d.ts +19 -0
  172. package/ant/style/operationUnit.d.ts +3 -0
  173. package/ant/style/placementArrow.d.ts +19 -0
  174. package/ant/style/presetColor.d.ts +16 -0
  175. package/ant/style/roundedArrow.d.ts +2 -0
  176. package/ant/theme/index.d.ts +23 -0
  177. package/ant/theme/interface/alias.d.ts +115 -0
  178. package/ant/theme/interface/components.d.ts +32 -0
  179. package/ant/theme/interface/index.d.ts +13 -0
  180. package/ant/theme/interface/maps/colors.d.ts +350 -0
  181. package/ant/theme/interface/maps/font.d.ts +44 -0
  182. package/ant/theme/interface/maps/index.d.ts +17 -0
  183. package/ant/theme/interface/maps/size.d.ts +63 -0
  184. package/ant/theme/interface/maps/style.d.ts +37 -0
  185. package/ant/theme/interface/presetColors.d.ts +8 -0
  186. package/ant/theme/interface/seeds.d.ts +163 -0
  187. package/ant/theme/internal.d.ts +49 -0
  188. package/ant/theme/themes/ColorMap.d.ts +15 -0
  189. package/ant/theme/themes/compact/genCompactSizeMapToken.d.ts +2 -0
  190. package/ant/theme/themes/compact/index.d.ts +4 -0
  191. package/ant/theme/themes/dark/colorAlgorithm.d.ts +2 -0
  192. package/ant/theme/themes/dark/colors.d.ts +3 -0
  193. package/ant/theme/themes/dark/index.d.ts +4 -0
  194. package/ant/theme/themes/default/colorAlgorithm.d.ts +2 -0
  195. package/ant/theme/themes/default/colors.d.ts +3 -0
  196. package/ant/theme/themes/default/index.d.ts +2 -0
  197. package/ant/theme/themes/seed.d.ts +4 -0
  198. package/ant/theme/themes/shared/genColorMapToken.d.ts +8 -0
  199. package/ant/theme/themes/shared/genCommonMapToken.d.ts +2 -0
  200. package/ant/theme/themes/shared/genControlHeight.d.ts +3 -0
  201. package/ant/theme/themes/shared/genFontMapToken.d.ts +3 -0
  202. package/ant/theme/themes/shared/genFontSizes.d.ts +4 -0
  203. package/ant/theme/themes/shared/genRadius.d.ts +3 -0
  204. package/ant/theme/themes/shared/genSizeMapToken.d.ts +2 -0
  205. package/ant/theme/util/alias.d.ts +12 -0
  206. package/ant/theme/util/genComponentStyleHook.d.ts +26 -0
  207. package/ant/theme/util/getAlphaColor.d.ts +2 -0
  208. package/ant/theme/util/statistic.d.ts +18 -0
  209. package/ant/tooltip/Tooltip.d.ts +228 -0
  210. package/ant/tooltip/abstractTooltipProps.d.ts +73 -0
  211. package/ant/tooltip/index.d.ts +245 -0
  212. package/ant/tooltip/style/index.d.ts +8 -0
  213. package/ant/tooltip/util.d.ts +6 -0
  214. package/ant/typography/Base.d.ts +200 -0
  215. package/ant/typography/Editable.d.ts +49 -0
  216. package/ant/typography/Link.d.ts +51 -0
  217. package/ant/typography/Paragraph.d.ts +51 -0
  218. package/ant/typography/Text.d.ts +51 -0
  219. package/ant/typography/Title.d.ts +48 -0
  220. package/ant/typography/Typography.d.ts +24 -0
  221. package/ant/typography/index.d.ts +17 -0
  222. package/ant/typography/style/index.d.ts +9 -0
  223. package/ant/typography/style/mixins.d.ts +9 -0
  224. package/ant/typography/util.d.ts +11 -0
  225. package/ant/upload/Dragger.d.ts +393 -0
  226. package/ant/upload/Upload.d.ts +396 -0
  227. package/ant/upload/UploadList/ListItem.d.ts +339 -0
  228. package/ant/upload/UploadList/index.d.ts +232 -0
  229. package/ant/upload/index.d.ts +1460 -0
  230. package/ant/upload/interface.d.ts +355 -0
  231. package/ant/upload/style/dragger.d.ts +4 -0
  232. package/ant/upload/style/index.d.ts +10 -0
  233. package/ant/upload/style/list.d.ts +4 -0
  234. package/ant/upload/style/motion.d.ts +4 -0
  235. package/ant/upload/style/picture.d.ts +5 -0
  236. package/ant/upload/style/rtl.d.ts +4 -0
  237. package/ant/upload/utils.d.ts +8 -0
  238. package/ant/vc-align/Align.d.ts +45 -0
  239. package/ant/vc-align/hooks/useBuffer.d.ts +3 -0
  240. package/ant/vc-align/interface.d.ts +56 -0
  241. package/ant/vc-align/util.d.ts +4 -0
  242. package/ant/vc-dialog/Content.d.ts +181 -0
  243. package/ant/vc-dialog/Dialog.d.ts +169 -0
  244. package/ant/vc-dialog/DialogWrap.d.ts +165 -0
  245. package/ant/vc-dialog/IDialogPropTypes.d.ts +79 -0
  246. package/ant/vc-dialog/Mask.d.ts +14 -0
  247. package/ant/vc-dialog/index.d.ts +4 -0
  248. package/ant/vc-dialog/util.d.ts +6 -0
  249. package/ant/vc-image/index.d.ts +3 -0
  250. package/ant/vc-image/src/Image.d.ts +114 -0
  251. package/ant/vc-image/src/Preview.d.ts +292 -0
  252. package/ant/vc-image/src/PreviewGroup.d.ts +79 -0
  253. package/ant/vc-image/src/getFixScaleEleTransPosition.d.ts +16 -0
  254. package/ant/vc-image/src/hooks/useFrameSetState.d.ts +3 -0
  255. package/ant/vc-input/BaseInput.d.ts +97 -0
  256. package/ant/vc-input/Input.d.ts +192 -0
  257. package/ant/vc-input/inputProps.d.ts +169 -0
  258. package/ant/vc-input/utils/commonUtils.d.ts +8 -0
  259. package/ant/vc-progress/index.d.ts +5 -0
  260. package/ant/vc-progress/src/Circle.d.ts +41 -0
  261. package/ant/vc-progress/src/Line.d.ts +40 -0
  262. package/ant/vc-progress/src/common.d.ts +5 -0
  263. package/ant/vc-progress/src/index.d.ts +86 -0
  264. package/ant/vc-progress/src/types.d.ts +25 -0
  265. package/ant/vc-resize-observer/index.d.ts +25 -0
  266. package/ant/vc-tooltip/index.d.ts +2 -0
  267. package/ant/vc-tooltip/src/Content.d.ts +17 -0
  268. package/ant/vc-tooltip/src/Tooltip.d.ts +141 -0
  269. package/ant/vc-tooltip/src/placements.d.ts +111 -0
  270. package/ant/vc-trigger/Popup/Mask.d.ts +14 -0
  271. package/ant/vc-trigger/Popup/MobilePopupInner.d.ts +103 -0
  272. package/ant/vc-trigger/Popup/PopupInner.d.ts +98 -0
  273. package/ant/vc-trigger/Popup/index.d.ts +104 -0
  274. package/ant/vc-trigger/Popup/interface.d.ts +151 -0
  275. package/ant/vc-trigger/Popup/useStretchStyle.d.ts +4 -0
  276. package/ant/vc-trigger/Popup/useVisibleStatus.d.ts +15 -0
  277. package/ant/vc-trigger/Trigger.d.ts +282 -0
  278. package/ant/vc-trigger/context.d.ts +11 -0
  279. package/ant/vc-trigger/index.d.ts +6 -0
  280. package/ant/vc-trigger/interface.d.ts +175 -0
  281. package/ant/vc-trigger/utils/alignUtil.d.ts +3 -0
  282. package/ant/vc-trigger/utils/motionUtil.d.ts +12 -0
  283. package/ant/vc-upload/AjaxUploader.d.ts +108 -0
  284. package/ant/vc-upload/Upload.d.ts +108 -0
  285. package/ant/vc-upload/attr-accept.d.ts +3 -0
  286. package/ant/vc-upload/index.d.ts +4 -0
  287. package/ant/vc-upload/interface.d.ts +79 -0
  288. package/ant/vc-upload/request.d.ts +4 -0
  289. package/ant/vc-upload/traverseFileTree.d.ts +14 -0
  290. package/ant/vc-upload/uid.d.ts +1 -0
  291. package/ant/vc-util/Dom/contains.d.ts +1 -0
  292. package/ant/vc-util/Dom/css.d.ts +22 -0
  293. package/ant/vc-util/Dom/dynamicCSS.d.ts +20 -0
  294. package/ant/vc-util/Dom/isVisible.d.ts +2 -0
  295. package/ant/vc-util/Dom/scrollLocker.d.ts +12 -0
  296. package/ant/vc-util/devWarning.d.ts +4 -0
  297. package/ant/vc-util/get.d.ts +1 -0
  298. package/ant/vc-util/set.d.ts +1 -0
  299. package/ant/vc-util/warning.d.ts +7 -0
  300. package/ant/version/index.d.ts +2 -0
  301. package/antx/_util/__tests__/warning.test.d.ts +1 -0
  302. package/antx/_util/cssinjs/Cache.d.ts +11 -0
  303. package/antx/_util/cssinjs/Keyframes.d.ts +9 -0
  304. package/antx/_util/cssinjs/StyleContext.d.ts +508 -0
  305. package/antx/_util/cssinjs/hooks/useCSSVarRegister.d.ts +20 -0
  306. package/antx/_util/cssinjs/hooks/useCacheToken.d.ts +40 -0
  307. package/antx/_util/cssinjs/hooks/useGlobalCache.d.ts +6 -0
  308. package/antx/_util/cssinjs/hooks/useHMR.d.ts +3 -0
  309. package/antx/_util/cssinjs/hooks/useStyleRegister/cacheMapUtil.d.ts +14 -0
  310. package/antx/_util/cssinjs/hooks/useStyleRegister/index.d.ts +69 -0
  311. package/antx/_util/cssinjs/index.d.ts +197 -0
  312. package/antx/_util/cssinjs/linters/contentQuotesLinter.d.ts +3 -0
  313. package/antx/_util/cssinjs/linters/hashedAnimationLinter.d.ts +3 -0
  314. package/antx/_util/cssinjs/linters/index.d.ts +6 -0
  315. package/antx/_util/cssinjs/linters/interface.d.ts +8 -0
  316. package/antx/_util/cssinjs/linters/legacyNotSelectorLinter.d.ts +3 -0
  317. package/antx/_util/cssinjs/linters/logicalPropertiesLinter.d.ts +3 -0
  318. package/antx/_util/cssinjs/linters/parentSelectorLinter.d.ts +3 -0
  319. package/antx/_util/cssinjs/linters/utils.d.ts +2 -0
  320. package/antx/_util/cssinjs/theme/Theme.d.ts +11 -0
  321. package/antx/_util/cssinjs/theme/ThemeCache.d.ts +20 -0
  322. package/antx/_util/cssinjs/theme/createTheme.d.ts +6 -0
  323. package/antx/_util/cssinjs/theme/index.d.ts +4 -0
  324. package/antx/_util/cssinjs/theme/interface.d.ts +2 -0
  325. package/antx/_util/cssinjs/transformers/interface.d.ts +4 -0
  326. package/antx/_util/cssinjs/transformers/legacyLogicalProperties.d.ts +12 -0
  327. package/antx/_util/cssinjs/transformers/px2rem.d.ts +20 -0
  328. package/antx/_util/cssinjs/util.d.ts +28 -0
  329. package/antx/_util/cssinjs-utils/_util/hooks/useUniqueMemo.d.ts +5 -0
  330. package/antx/_util/cssinjs-utils/hooks/useCSP.d.ts +8 -0
  331. package/antx/_util/cssinjs-utils/hooks/usePrefix.d.ts +11 -0
  332. package/antx/_util/cssinjs-utils/hooks/useToken.d.ts +21 -0
  333. package/antx/_util/cssinjs-utils/index.d.ts +6 -0
  334. package/antx/_util/cssinjs-utils/interface/components.d.ts +10 -0
  335. package/antx/_util/cssinjs-utils/interface/index.d.ts +3 -0
  336. package/antx/_util/cssinjs-utils/util/calc/CSSCalculator.d.ts +15 -0
  337. package/antx/_util/cssinjs-utils/util/calc/NumCalculator.d.ts +11 -0
  338. package/antx/_util/cssinjs-utils/util/calc/calculator.d.ts +30 -0
  339. package/antx/_util/cssinjs-utils/util/calc/index.d.ts +5 -0
  340. package/antx/_util/cssinjs-utils/util/genStyleUtils.d.ts +116 -0
  341. package/antx/_util/cssinjs-utils/util/getCompVarPrefix.d.ts +2 -0
  342. package/antx/_util/cssinjs-utils/util/getComponentToken.d.ts +9 -0
  343. package/antx/_util/cssinjs-utils/util/getDefaultComponentToken.d.ts +5 -0
  344. package/antx/_util/cssinjs-utils/util/maxmin.d.ts +8 -0
  345. package/antx/_util/cssinjs-utils/util/statistic.d.ts +20 -0
  346. package/antx/_util/getScrollBarSize.d.ts +5 -0
  347. package/antx/_util/getValue.d.ts +2 -0
  348. package/antx/_util/hooks/use-event-callback.d.ts +1 -0
  349. package/antx/_util/hooks/use-state.d.ts +2 -0
  350. package/antx/_util/hooks/use-x-component-config.d.ts +4 -0
  351. package/antx/_util/hooks/useMergedState.d.ts +7 -0
  352. package/antx/_util/motion.d.ts +3 -0
  353. package/antx/_util/pick-attrs.d.ts +11 -0
  354. package/antx/_util/setStyle.d.ts +12 -0
  355. package/antx/_util/transition.d.ts +29 -0
  356. package/antx/_util/type.d.ts +62 -0
  357. package/antx/_util/warning.d.ts +47 -0
  358. package/antx/attachments/Attachments.vue.d.ts +16 -0
  359. package/antx/attachments/DropArea.vue.d.ts +4 -0
  360. package/antx/attachments/FileList/AudioIcon.vue.d.ts +3 -0
  361. package/antx/attachments/FileList/FileList.vue.d.ts +4 -0
  362. package/antx/attachments/FileList/FileListCard.vue.d.ts +6 -0
  363. package/antx/attachments/FileList/Progress.vue.d.ts +103 -0
  364. package/antx/attachments/FileList/VideoIcon.vue.d.ts +3 -0
  365. package/antx/attachments/FileList/index.d.ts +3 -0
  366. package/antx/attachments/PlaceholderUploader.vue.d.ts +6 -0
  367. package/antx/attachments/SilentUploader.vue.d.ts +6 -0
  368. package/antx/attachments/constants.d.ts +9 -0
  369. package/antx/attachments/context.d.ts +21 -0
  370. package/antx/attachments/index.d.ts +26 -0
  371. package/antx/attachments/interface.d.ts +130 -0
  372. package/antx/attachments/style/fileCard.d.ts +4 -0
  373. package/antx/attachments/style/index.d.ts +9 -0
  374. package/antx/attachments/util.d.ts +3 -0
  375. package/antx/components.d.ts +4 -0
  376. package/antx/hooks.d.ts +8 -0
  377. package/antx/index.cjs +78 -0
  378. package/antx/index.d.ts +10 -0
  379. package/antx/index.mjs +6015 -0
  380. package/antx/sender/Sender.vue.d.ts +48 -0
  381. package/antx/sender/SenderHeader.vue.d.ts +13 -0
  382. package/antx/sender/StopLoading.vue.d.ts +6 -0
  383. package/antx/sender/components/ActionButton/context.d.ts +21 -0
  384. package/antx/sender/components/ActionButton/index.vue.d.ts +13 -0
  385. package/antx/sender/components/ClearButton.vue.d.ts +4 -0
  386. package/antx/sender/components/LoadingButton.vue.d.ts +4 -0
  387. package/antx/sender/components/SendButton.vue.d.ts +4 -0
  388. package/antx/sender/components/SpeechButton/RecordingIcon.vue.d.ts +4 -0
  389. package/antx/sender/components/SpeechButton/index.vue.d.ts +4 -0
  390. package/antx/sender/context.d.ts +21 -0
  391. package/antx/sender/index.d.ts +82 -0
  392. package/antx/sender/interface.d.ts +145 -0
  393. package/antx/sender/style/header.d.ts +4 -0
  394. package/antx/sender/style/index.d.ts +9 -0
  395. package/antx/sender/useSpeech.d.ts +16 -0
  396. package/antx/theme/components.d.ts +8 -0
  397. package/antx/theme/cssinjs-utils.d.ts +14 -0
  398. package/antx/theme/genStyleUtils.d.ts +27 -0
  399. package/antx/theme/index.d.ts +2 -0
  400. package/antx/theme/patch-antd.d.ts +28 -0
  401. package/antx/theme/useToken.d.ts +19 -0
  402. package/antx/transition-collapse/TransitionCollapse.vue.d.ts +17 -0
  403. package/antx/transition-collapse/index.d.ts +6 -0
  404. package/antx/transition-collapse/style/index.d.ts +6 -0
  405. package/antx/type-utility.d.ts +1 -0
  406. package/antx/use-x-agent/index.d.ts +4 -0
  407. package/antx/use-x-agent/use-x-agent.d.ts +34 -0
  408. package/antx/use-x-chat/index.d.ts +4 -0
  409. package/antx/use-x-chat/use-x-chat.d.ts +54 -0
  410. package/antx/use-x-chat/useSyncState.d.ts +4 -0
  411. package/antx/version/index.d.ts +2 -0
  412. package/antx/x-provider/context.d.ts +84 -0
  413. package/antx/x-provider/hooks/use-x-provider-context.d.ts +9 -0
  414. package/antx/x-provider/index.d.ts +5 -0
  415. package/antx/x-provider/index.vue.d.ts +13 -0
  416. package/antx/x-request/index.d.ts +6 -0
  417. package/antx/x-request/x-fetch.d.ts +18 -0
  418. package/antx/x-request/x-request.d.ts +89 -0
  419. package/antx/x-stream/index.d.ts +4 -0
  420. package/antx/x-stream/x-stream.d.ts +32 -0
  421. package/components/agent-chat-provider/index.cjs +1 -1
  422. package/components/agent-chat-provider/index.mjs +1 -3
  423. package/components/agent-chat-provider/src/index.vue.d.ts +3 -3
  424. package/components/agent-chat-provider/src/types.d.ts +1 -1
  425. package/components/agent-chat-provider/src/use.d.ts +2 -2
  426. package/components/avatar/index.mjs +2 -2
  427. package/components/avatar/src/index.vue.d.ts +2 -121
  428. package/components/broadcasting-markdown/index.cjs +3 -3
  429. package/components/broadcasting-markdown/index.mjs +2 -5
  430. package/components/broadcasting-markdown/src/ctx.d.ts +2 -2
  431. package/components/broadcasting-markdown/src/howler-speech.vue.d.ts +6 -6
  432. package/components/broadcasting-markdown/src/index.vue.d.ts +33 -33
  433. package/components/broadcasting-markdown/src/paragraph.vue.d.ts +1 -1
  434. package/components/broadcasting-markdown/src/use.d.ts +1 -1
  435. package/components/bubble-list/index.cjs +1 -1
  436. package/components/bubble-list/index.mjs +5 -5
  437. package/components/bubble-list/src/core/index.vue.d.ts +7 -7
  438. package/components/bubble-list/src/ctx.d.ts +2 -2
  439. package/components/bubble-list/src/index.vue.d.ts +5 -4
  440. package/components/bubble-templates/index.mjs +2 -2
  441. package/components/chat-independent/index.mjs +4 -4
  442. package/components/chat-independent/src/index.vue.d.ts +1 -1
  443. package/components/components.css +1 -1
  444. package/components/drawer/index.mjs +1 -1
  445. package/components/drawer/src/ctx.d.ts +37 -31
  446. package/components/drawer/src/index.vue.d.ts +87 -77
  447. package/components/lottie-animation/index.mjs +2 -2
  448. package/components/lottie-animation/src/index.vue.d.ts +1 -1
  449. package/components/metahuman-broadcasting/index.mjs +2 -2
  450. package/components/metahuman-broadcasting/src/ctx.d.ts +2 -2
  451. package/components/metahuman-broadcasting/src/index.vue.d.ts +4 -4
  452. package/components/monaco-editor/index.cjs +1 -1
  453. package/components/monaco-editor/index.mjs +52 -48
  454. package/components/monaco-editor/src/ctx.d.ts +3 -3
  455. package/components/monaco-editor/src/index.vue.d.ts +5 -5
  456. package/components/pixi-frame/index.cjs +1 -1
  457. package/components/pixi-frame/index.mjs +899 -450
  458. package/components/pixi-frame/src/apng.vue.d.ts +10 -10
  459. package/components/pixi-frame/src/bitmap-generator.vue.d.ts +7 -7
  460. package/components/pixi-frame/src/bitmap.vue.d.ts +12 -12
  461. package/components/pixi-frame/src/buffer-image.vue.d.ts +13 -13
  462. package/components/pixi-frame/src/core.vue.d.ts +12 -12
  463. package/components/pixi-frame/src/ctx.d.ts +5 -5
  464. package/components/pixi-frame/src/index.vue.d.ts +81 -81
  465. package/components/pixi-frame/src/video.vue.d.ts +10 -10
  466. package/components/recorder-button/index.cjs +1 -1
  467. package/components/recorder-button/index.mjs +75 -75
  468. package/components/recorder-button/src/ctx.d.ts +3 -3
  469. package/components/recorder-button/src/index.vue.d.ts +114 -197
  470. package/components/routes-menu-content/index.cjs +1 -1
  471. package/components/routes-menu-content/index.mjs +12 -12
  472. package/components/routes-menu-content/src/ctx.d.ts +1 -1
  473. package/components/routes-menu-content/src/index.vue.d.ts +58 -99
  474. package/components/routes-menu-content/src/item/core/ctx.d.ts +1 -1
  475. package/components/routes-menu-content/src/item/core/index.vue.d.ts +40 -81
  476. package/components/routes-menu-content/src/item/index.vue.d.ts +56 -97
  477. package/components/scrollbar/index.mjs +4 -4
  478. package/components/scrollbar/src/index.vue.d.ts +35 -34
  479. package/components/scrollbar/src/util.d.ts +1 -1
  480. package/components/sender/index.cjs +1 -1
  481. package/components/sender/index.mjs +7 -7
  482. package/components/sender/src/SenderHeader.vue.d.ts +2 -2
  483. package/components/sender/src/ctx.d.ts +9 -9
  484. package/components/sender/src/index.vue.d.ts +28 -28
  485. package/components/speech-button/index.cjs +1 -1
  486. package/components/speech-button/index.mjs +1 -1
  487. package/components/speech-button/src/ctx.d.ts +1 -1
  488. package/components/speech-button/src/index.vue.d.ts +3 -3
  489. package/components/table-columns/src/ctx.d.ts +2 -2
  490. package/components/table-columns/src/el-ctx.d.ts +2 -2
  491. package/components/table-columns/src/index.vue.d.ts +6 -6
  492. package/components/table-columns/src/types.d.ts +3 -4
  493. package/components/tables-v1/index.cjs +1 -1
  494. package/components/tables-v1/index.mjs +3 -3
  495. package/components/tables-v1/src/ctx.d.ts +69 -74
  496. package/components/tables-v1/src/el-ctx.d.ts +24 -24
  497. package/components/tables-v1/src/index.vue.d.ts +54 -313
  498. package/components/tables-v1-checkbox/index.cjs +94 -1
  499. package/components/tables-v1-checkbox/index.mjs +2071 -88
  500. package/components/tables-v1-checkbox/src/ctx.d.ts +68 -73
  501. package/components/tables-v1-checkbox/src/index.vue.d.ts +274 -542
  502. package/components/text/index.mjs +3 -3
  503. package/components/text/src/ctx.d.ts +39 -246
  504. package/components/text/src/index.vue.d.ts +98 -509
  505. package/components/thinking/index.mjs +5 -5
  506. package/components/thinking/src/ctx.d.ts +3 -3
  507. package/components/thinking/src/index.vue.d.ts +8 -8
  508. package/components/typing-markdown/index.mjs +2 -2
  509. package/components/typing-markdown/src/ctx.d.ts +3 -3
  510. package/components/typing-markdown/src/index.vue.d.ts +6 -6
  511. package/components/vditor/index.cjs +1 -1
  512. package/components/vditor/index.mjs +2 -2
  513. package/components/vditor/src/ctx.d.ts +2 -2
  514. package/components/vditor/src/handle-fullscreen.vue.d.ts +3 -3
  515. package/components/vditor/src/handle-value.vue.d.ts +3 -3
  516. package/components/vditor/src/index.vue.d.ts +10 -10
  517. package/components/xgplayer/index.mjs +5 -5
  518. package/composables/recorder/index.cjs +1 -1
  519. package/composables/recorder/index.mjs +3214 -3099
  520. package/element/bubble/index.cjs +2 -2
  521. package/element/bubble/index.mjs +57 -57
  522. package/element/index.css +1 -1
  523. package/element/thinking/index.cjs +1 -1
  524. package/element/thinking/index.mjs +63 -69
  525. package/icons/end/index.cjs +1 -1
  526. package/icons/end/index.mjs +3 -3
  527. package/icons/keyboard/index.cjs +1 -1
  528. package/icons/keyboard/index.mjs +3 -3
  529. package/icons/start/index.cjs +1 -1
  530. package/icons/start/index.mjs +3 -3
  531. package/icons/voice/index.cjs +1 -1
  532. package/icons/voice/index.mjs +3 -3
  533. package/index.css +2 -2
  534. package/package.json +11 -1
@@ -1,13 +1,462 @@
1
- import { inject as ie, provide as le, watchEffect as T, onBeforeUnmount as R, defineComponent as E, useId as W, ref as $, onMounted as X, renderSlot as D, watch as G, computed as j, createElementBlock as pe, openBlock as N, resolveComponent as q, createBlock as U, withCtx as ce, createVNode as de } from "vue";
2
- import { TickerStatus as n } from "@vunk/shared/enum";
3
- import { TickerStatus as Oe } from "@vunk/shared/enum";
4
- import { Deferred as me, sleep as K } from "@vunk/shared/promise";
5
- import fe from "apng-js";
6
- import { Application as ve, Sprite as ye, Assets as P, Texture as Y, ImageSource as te, BufferImageSource as ge } from "pixi.js";
7
- import { pickObject as J } from "@vunk/shared/object";
8
- import { useModelComputed as Q, useDeferred as he } from "@vunk/core/composables";
1
+ import { inject as fe, provide as de, watchEffect as $, onBeforeUnmount as S, defineComponent as C, useId as ne, ref as U, onMounted as ae, renderSlot as V, watch as Q, computed as J, openBlock as H, createElementBlock as me, resolveComponent as K, createBlock as Y, withCtx as he, createVNode as ve } from "vue";
2
+ import { TickerStatus as m } from "@vunk/shared/enum";
3
+ import { TickerStatus as Ye } from "@vunk/shared/enum";
4
+ import { Deferred as ge, sleep as Z } from "@vunk/shared/promise";
5
+ import { Application as _e, Sprite as ye, Assets as R, Texture as ee, ImageSource as oe, BufferImageSource as we } from "pixi.js";
6
+ import { pickObject as se } from "@vunk/shared/object";
7
+ import { useModelComputed as ie, useDeferred as be } from "@vunk/core/composables";
9
8
  import { _ as xe } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
10
- const V = {
9
+ function Fe(o) {
10
+ return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
11
+ }
12
+ var X = { exports: {} }, ke = X.exports, ue;
13
+ function Pe() {
14
+ return ue || (ue = 1, (function(o, P) {
15
+ (function(r, p) {
16
+ o.exports = p();
17
+ })(ke, function() {
18
+ return (
19
+ /******/
20
+ (function(t) {
21
+ var r = {};
22
+ function p(l) {
23
+ if (r[l])
24
+ return r[l].exports;
25
+ var v = r[l] = {
26
+ /******/
27
+ exports: {},
28
+ /******/
29
+ id: l,
30
+ /******/
31
+ loaded: !1
32
+ /******/
33
+ };
34
+ return t[l].call(v.exports, v, v.exports, p), v.loaded = !0, v.exports;
35
+ }
36
+ return p.m = t, p.c = r, p.p = "", p(0);
37
+ })([
38
+ /* 0 */
39
+ /***/
40
+ (function(t, r, p) {
41
+ Object.defineProperty(r, "__esModule", {
42
+ value: !0
43
+ }), r.isNotPNG = a, r.isNotAPNG = u, r.default = s;
44
+ var l = p(1), v = w(l), _ = p(2);
45
+ function w(f) {
46
+ return f && f.__esModule ? f : { default: f };
47
+ }
48
+ var e = new Error("Not a PNG"), n = new Error("Not an animated PNG");
49
+ function a(f) {
50
+ return f === e;
51
+ }
52
+ function u(f) {
53
+ return f === n;
54
+ }
55
+ var i = new Uint8Array([137, 80, 78, 71, 13, 10, 26, 10]);
56
+ function s(f) {
57
+ var g = new Uint8Array(f);
58
+ if (Array.prototype.some.call(i, function(T, D) {
59
+ return T !== g[D];
60
+ }))
61
+ return e;
62
+ var c = !1;
63
+ if (b(g, function(T) {
64
+ return !(c = T === "acTL");
65
+ }), !c)
66
+ return n;
67
+ var x = [], I = [], N = null, k = null, B = 0, O = new _.APNG();
68
+ if (b(g, function(T, D, E, M) {
69
+ var L = new DataView(D.buffer);
70
+ switch (T) {
71
+ case "IHDR":
72
+ N = D.subarray(E + 8, E + 8 + M), O.width = L.getUint32(E + 8), O.height = L.getUint32(E + 12);
73
+ break;
74
+ case "acTL":
75
+ O.numPlays = L.getUint32(E + 8 + 4);
76
+ break;
77
+ case "fcTL":
78
+ k && (O.frames.push(k), B++), k = new _.Frame(), k.width = L.getUint32(E + 8 + 4), k.height = L.getUint32(E + 8 + 8), k.left = L.getUint32(E + 8 + 12), k.top = L.getUint32(E + 8 + 16);
79
+ var pe = L.getUint16(E + 8 + 20), te = L.getUint16(E + 8 + 22);
80
+ te === 0 && (te = 100), k.delay = 1e3 * pe / te, k.delay <= 10 && (k.delay = 100), O.playTime += k.delay, k.disposeOp = L.getUint8(E + 8 + 24), k.blendOp = L.getUint8(E + 8 + 25), k.dataParts = [], B === 0 && k.disposeOp === 2 && (k.disposeOp = 1);
81
+ break;
82
+ case "fdAT":
83
+ k && k.dataParts.push(D.subarray(E + 8 + 4, E + 8 + M));
84
+ break;
85
+ case "IDAT":
86
+ k && k.dataParts.push(D.subarray(E + 8, E + 8 + M));
87
+ break;
88
+ case "IEND":
89
+ I.push(y(D, E, 12 + M));
90
+ break;
91
+ default:
92
+ x.push(y(D, E, 12 + M));
93
+ }
94
+ }), k && O.frames.push(k), O.frames.length == 0)
95
+ return n;
96
+ var G = new Blob(x), W = new Blob(I);
97
+ return O.frames.forEach(function(T) {
98
+ var D = [];
99
+ D.push(i), N.set(d(T.width), 0), N.set(d(T.height), 4), D.push(F("IHDR", N)), D.push(G), T.dataParts.forEach(function(E) {
100
+ return D.push(F("IDAT", E));
101
+ }), D.push(W), T.imageData = new Blob(D, { type: "image/png" }), delete T.dataParts, D = null;
102
+ }), O;
103
+ }
104
+ function b(f, g) {
105
+ var c = new DataView(f.buffer), x = 8, I = void 0, N = void 0, k = void 0;
106
+ do
107
+ N = c.getUint32(x), I = h(f, x + 4, 4), k = g(I, f, x, N), x += 12 + N;
108
+ while (k !== !1 && I != "IEND" && x < f.length);
109
+ }
110
+ function h(f, g, c) {
111
+ var x = Array.prototype.slice.call(f.subarray(g, g + c));
112
+ return String.fromCharCode.apply(String, x);
113
+ }
114
+ function A(f) {
115
+ for (var g = new Uint8Array(f.length), c = 0; c < f.length; c++)
116
+ g[c] = f.charCodeAt(c);
117
+ return g;
118
+ }
119
+ function y(f, g, c) {
120
+ var x = new Uint8Array(c);
121
+ return x.set(f.subarray(g, g + c)), x;
122
+ }
123
+ var F = function(g, c) {
124
+ var x = g.length + c.length, I = new Uint8Array(x + 8), N = new DataView(I.buffer);
125
+ N.setUint32(0, c.length), I.set(A(g), 4), I.set(c, 8);
126
+ var k = (0, v.default)(I, 4, x);
127
+ return N.setUint32(x + 4, k), I;
128
+ }, d = function(g) {
129
+ return new Uint8Array([g >>> 24 & 255, g >>> 16 & 255, g >>> 8 & 255, g & 255]);
130
+ };
131
+ }),
132
+ /* 1 */
133
+ /***/
134
+ (function(t, r) {
135
+ Object.defineProperty(r, "__esModule", {
136
+ value: !0
137
+ }), r.default = function(w) {
138
+ for (var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : w.length - e, a = -1, u = e, i = e + n; u < i; u++)
139
+ a = a >>> 8 ^ p[(a ^ w[u]) & 255];
140
+ return a ^ -1;
141
+ };
142
+ for (var p = new Uint32Array(256), l = 0; l < 256; l++) {
143
+ for (var v = l, _ = 0; _ < 8; _++)
144
+ v = (v & 1) !== 0 ? 3988292384 ^ v >>> 1 : v >>> 1;
145
+ p[l] = v;
146
+ }
147
+ }),
148
+ /* 2 */
149
+ /***/
150
+ (function(t, r, p) {
151
+ Object.defineProperty(r, "__esModule", {
152
+ value: !0
153
+ }), r.Frame = r.APNG = void 0;
154
+ var l = /* @__PURE__ */ (function() {
155
+ function n(a, u) {
156
+ for (var i = 0; i < u.length; i++) {
157
+ var s = u[i];
158
+ s.enumerable = s.enumerable || !1, s.configurable = !0, "value" in s && (s.writable = !0), Object.defineProperty(a, s.key, s);
159
+ }
160
+ }
161
+ return function(a, u, i) {
162
+ return u && n(a.prototype, u), i && n(a, i), a;
163
+ };
164
+ })(), v = p(3), _ = w(v);
165
+ function w(n) {
166
+ return n && n.__esModule ? n : { default: n };
167
+ }
168
+ function e(n, a) {
169
+ if (!(n instanceof a))
170
+ throw new TypeError("Cannot call a class as a function");
171
+ }
172
+ r.APNG = (function() {
173
+ function n() {
174
+ e(this, n), this.width = 0, this.height = 0, this.numPlays = 0, this.playTime = 0, this.frames = [];
175
+ }
176
+ return l(n, [{
177
+ key: "createImages",
178
+ /**
179
+ *
180
+ * @return {Promise.<*>}
181
+ */
182
+ value: function() {
183
+ return Promise.all(this.frames.map(function(u) {
184
+ return u.createImage();
185
+ }));
186
+ }
187
+ /**
188
+ *
189
+ * @param {CanvasRenderingContext2D} context
190
+ * @param {boolean} autoPlay
191
+ * @return {Promise.<Player>}
192
+ */
193
+ }, {
194
+ key: "getPlayer",
195
+ value: function(u) {
196
+ var i = this, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
197
+ return this.createImages().then(function() {
198
+ return new _.default(i, u, s);
199
+ });
200
+ }
201
+ }]), n;
202
+ })(), r.Frame = (function() {
203
+ function n() {
204
+ e(this, n), this.left = 0, this.top = 0, this.width = 0, this.height = 0, this.delay = 0, this.disposeOp = 0, this.blendOp = 0, this.imageData = null, this.imageElement = null;
205
+ }
206
+ return l(n, [{
207
+ key: "createImage",
208
+ value: function() {
209
+ var u = this;
210
+ return this.imageElement ? Promise.resolve() : new Promise(function(i, s) {
211
+ var b = URL.createObjectURL(u.imageData);
212
+ u.imageElement = document.createElement("img"), u.imageElement.onload = function() {
213
+ URL.revokeObjectURL(b), i();
214
+ }, u.imageElement.onerror = function() {
215
+ URL.revokeObjectURL(b), u.imageElement = null, s(new Error("Image creation error"));
216
+ }, u.imageElement.src = b;
217
+ });
218
+ }
219
+ }]), n;
220
+ })();
221
+ }),
222
+ /* 3 */
223
+ /***/
224
+ (function(t, r, p) {
225
+ Object.defineProperty(r, "__esModule", {
226
+ value: !0
227
+ });
228
+ var l = /* @__PURE__ */ (function() {
229
+ function i(s, b) {
230
+ for (var h = 0; h < b.length; h++) {
231
+ var A = b[h];
232
+ A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(s, A.key, A);
233
+ }
234
+ }
235
+ return function(s, b, h) {
236
+ return b && i(s.prototype, b), h && i(s, h), s;
237
+ };
238
+ })(), v = p(4), _ = w(v);
239
+ function w(i) {
240
+ return i && i.__esModule ? i : { default: i };
241
+ }
242
+ function e(i, s) {
243
+ if (!(i instanceof s))
244
+ throw new TypeError("Cannot call a class as a function");
245
+ }
246
+ function n(i, s) {
247
+ if (!i)
248
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
249
+ return s && (typeof s == "object" || typeof s == "function") ? s : i;
250
+ }
251
+ function a(i, s) {
252
+ if (typeof s != "function" && s !== null)
253
+ throw new TypeError("Super expression must either be null or a function, not " + typeof s);
254
+ i.prototype = Object.create(s && s.prototype, { constructor: { value: i, enumerable: !1, writable: !0, configurable: !0 } }), s && (Object.setPrototypeOf ? Object.setPrototypeOf(i, s) : i.__proto__ = s);
255
+ }
256
+ var u = (function(i) {
257
+ a(s, i);
258
+ function s(b, h, A) {
259
+ e(this, s);
260
+ var y = n(this, (s.__proto__ || Object.getPrototypeOf(s)).call(this));
261
+ return y.playbackRate = 1, y._currentFrameNumber = 0, y._ended = !1, y._paused = !0, y._numPlays = 0, y._rafId = null, y._apng = b, y.context = h, y.stop(), A && y.play(), y;
262
+ }
263
+ return l(s, [{
264
+ key: "renderNextFrame",
265
+ value: function() {
266
+ this._currentFrameNumber = (this._currentFrameNumber + 1) % this._apng.frames.length, this._currentFrameNumber === this._apng.frames.length - 1 && (this._numPlays++, this._apng.numPlays !== 0 && this._numPlays >= this._apng.numPlays && (this._ended = !0, this._paused = !0)), this._prevFrame && this._prevFrame.disposeOp == 1 ? this.context.clearRect(this._prevFrame.left, this._prevFrame.top, this._prevFrame.width, this._prevFrame.height) : this._prevFrame && this._prevFrame.disposeOp == 2 && this.context.putImageData(this._prevFrameData, this._prevFrame.left, this._prevFrame.top);
267
+ var h = this.currentFrame;
268
+ this._prevFrame = h, this._prevFrameData = null, h.disposeOp == 2 && (this._prevFrameData = this.context.getImageData(h.left, h.top, h.width, h.height)), h.blendOp == 0 && this.context.clearRect(h.left, h.top, h.width, h.height), this.context.drawImage(h.imageElement, h.left, h.top), this.emit("frame", this._currentFrameNumber), this._ended && this.emit("end");
269
+ }
270
+ // playback
271
+ }, {
272
+ key: "play",
273
+ value: function() {
274
+ var h = this;
275
+ this._rafId && cancelAnimationFrame(this._rafId), this.emit("play"), this._ended && this.stop(), this._paused = !1;
276
+ var A = performance.now() + this.currentFrame.delay / this.playbackRate, y = function F(d) {
277
+ if (!(h._ended || h._paused)) {
278
+ if (d >= A) {
279
+ for (; d - A >= h._apng.playTime / h.playbackRate; )
280
+ A += h._apng.playTime / h.playbackRate, h._numPlays++;
281
+ do
282
+ h.renderNextFrame(), A += h.currentFrame.delay / h.playbackRate;
283
+ while (!h._ended && !h._paused && d > A);
284
+ }
285
+ h._rafId = requestAnimationFrame(F);
286
+ }
287
+ };
288
+ this._rafId = requestAnimationFrame(y);
289
+ }
290
+ }, {
291
+ key: "pause",
292
+ value: function() {
293
+ this._paused || (this._rafId && (cancelAnimationFrame(this._rafId), this._rafId = null), this.emit("pause"), this._paused = !0);
294
+ }
295
+ }, {
296
+ key: "stop",
297
+ value: function() {
298
+ this._rafId && (cancelAnimationFrame(this._rafId), this._rafId = null), this.emit("stop"), this._numPlays = 0, this._ended = !1, this._paused = !0, this._currentFrameNumber = -1, this.context.clearRect(0, 0, this._apng.width, this._apng.height), this.renderNextFrame();
299
+ }
300
+ }, {
301
+ key: "currentFrameNumber",
302
+ get: function() {
303
+ return this._currentFrameNumber;
304
+ }
305
+ /**
306
+ *
307
+ * @return {Frame}
308
+ */
309
+ }, {
310
+ key: "currentFrame",
311
+ get: function() {
312
+ return this._apng.frames[this._currentFrameNumber];
313
+ }
314
+ }, {
315
+ key: "paused",
316
+ get: function() {
317
+ return this._paused;
318
+ }
319
+ }, {
320
+ key: "ended",
321
+ get: function() {
322
+ return this._ended;
323
+ }
324
+ }]), s;
325
+ })(_.default);
326
+ r.default = u;
327
+ }),
328
+ /* 4 */
329
+ /***/
330
+ (function(t, r) {
331
+ function p() {
332
+ this._events = this._events || {}, this._maxListeners = this._maxListeners || void 0;
333
+ }
334
+ t.exports = p, p.EventEmitter = p, p.prototype._events = void 0, p.prototype._maxListeners = void 0, p.defaultMaxListeners = 10, p.prototype.setMaxListeners = function(e) {
335
+ if (!v(e) || e < 0 || isNaN(e))
336
+ throw TypeError("n must be a positive number");
337
+ return this._maxListeners = e, this;
338
+ }, p.prototype.emit = function(e) {
339
+ var n, a, u, i, s, b;
340
+ if (this._events || (this._events = {}), e === "error" && (!this._events.error || _(this._events.error) && !this._events.error.length)) {
341
+ if (n = arguments[1], n instanceof Error)
342
+ throw n;
343
+ var h = new Error('Uncaught, unspecified "error" event. (' + n + ")");
344
+ throw h.context = n, h;
345
+ }
346
+ if (a = this._events[e], w(a))
347
+ return !1;
348
+ if (l(a))
349
+ switch (arguments.length) {
350
+ // fast cases
351
+ case 1:
352
+ a.call(this);
353
+ break;
354
+ case 2:
355
+ a.call(this, arguments[1]);
356
+ break;
357
+ case 3:
358
+ a.call(this, arguments[1], arguments[2]);
359
+ break;
360
+ // slower
361
+ default:
362
+ i = Array.prototype.slice.call(arguments, 1), a.apply(this, i);
363
+ }
364
+ else if (_(a))
365
+ for (i = Array.prototype.slice.call(arguments, 1), b = a.slice(), u = b.length, s = 0; s < u; s++)
366
+ b[s].apply(this, i);
367
+ return !0;
368
+ }, p.prototype.addListener = function(e, n) {
369
+ var a;
370
+ if (!l(n))
371
+ throw TypeError("listener must be a function");
372
+ return this._events || (this._events = {}), this._events.newListener && this.emit(
373
+ "newListener",
374
+ e,
375
+ l(n.listener) ? n.listener : n
376
+ ), this._events[e] ? _(this._events[e]) ? this._events[e].push(n) : this._events[e] = [this._events[e], n] : this._events[e] = n, _(this._events[e]) && !this._events[e].warned && (w(this._maxListeners) ? a = p.defaultMaxListeners : a = this._maxListeners, a && a > 0 && this._events[e].length > a && (this._events[e].warned = !0, console.error(
377
+ "(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",
378
+ this._events[e].length
379
+ ), typeof console.trace == "function" && console.trace())), this;
380
+ }, p.prototype.on = p.prototype.addListener, p.prototype.once = function(e, n) {
381
+ if (!l(n))
382
+ throw TypeError("listener must be a function");
383
+ var a = !1;
384
+ function u() {
385
+ this.removeListener(e, u), a || (a = !0, n.apply(this, arguments));
386
+ }
387
+ return u.listener = n, this.on(e, u), this;
388
+ }, p.prototype.removeListener = function(e, n) {
389
+ var a, u, i, s;
390
+ if (!l(n))
391
+ throw TypeError("listener must be a function");
392
+ if (!this._events || !this._events[e])
393
+ return this;
394
+ if (a = this._events[e], i = a.length, u = -1, a === n || l(a.listener) && a.listener === n)
395
+ delete this._events[e], this._events.removeListener && this.emit("removeListener", e, n);
396
+ else if (_(a)) {
397
+ for (s = i; s-- > 0; )
398
+ if (a[s] === n || a[s].listener && a[s].listener === n) {
399
+ u = s;
400
+ break;
401
+ }
402
+ if (u < 0)
403
+ return this;
404
+ a.length === 1 ? (a.length = 0, delete this._events[e]) : a.splice(u, 1), this._events.removeListener && this.emit("removeListener", e, n);
405
+ }
406
+ return this;
407
+ }, p.prototype.removeAllListeners = function(e) {
408
+ var n, a;
409
+ if (!this._events)
410
+ return this;
411
+ if (!this._events.removeListener)
412
+ return arguments.length === 0 ? this._events = {} : this._events[e] && delete this._events[e], this;
413
+ if (arguments.length === 0) {
414
+ for (n in this._events)
415
+ n !== "removeListener" && this.removeAllListeners(n);
416
+ return this.removeAllListeners("removeListener"), this._events = {}, this;
417
+ }
418
+ if (a = this._events[e], l(a))
419
+ this.removeListener(e, a);
420
+ else if (a)
421
+ for (; a.length; )
422
+ this.removeListener(e, a[a.length - 1]);
423
+ return delete this._events[e], this;
424
+ }, p.prototype.listeners = function(e) {
425
+ var n;
426
+ return !this._events || !this._events[e] ? n = [] : l(this._events[e]) ? n = [this._events[e]] : n = this._events[e].slice(), n;
427
+ }, p.prototype.listenerCount = function(e) {
428
+ if (this._events) {
429
+ var n = this._events[e];
430
+ if (l(n))
431
+ return 1;
432
+ if (n)
433
+ return n.length;
434
+ }
435
+ return 0;
436
+ }, p.listenerCount = function(e, n) {
437
+ return e.listenerCount(n);
438
+ };
439
+ function l(e) {
440
+ return typeof e == "function";
441
+ }
442
+ function v(e) {
443
+ return typeof e == "number";
444
+ }
445
+ function _(e) {
446
+ return typeof e == "object" && e !== null;
447
+ }
448
+ function w(e) {
449
+ return e === void 0;
450
+ }
451
+ })
452
+ /******/
453
+ ])
454
+ );
455
+ });
456
+ })(X)), X.exports;
457
+ }
458
+ var Ae = Pe();
459
+ const Ee = /* @__PURE__ */ Fe(Ae), q = {
11
460
  url: {
12
461
  type: String,
13
462
  requierd: !1
@@ -28,7 +477,7 @@ const V = {
28
477
  */
29
478
  status: {
30
479
  type: String,
31
- default: n.pending
480
+ default: m.pending
32
481
  },
33
482
  frameRate: {
34
483
  type: Number,
@@ -53,157 +502,157 @@ const V = {
53
502
  type: Boolean,
54
503
  default: !0
55
504
  }
56
- }, S = {
505
+ }, j = {
57
506
  "update:status": null,
58
507
  "update:data": null,
59
508
  setData: null
60
- }, ae = /* @__PURE__ */ Symbol("appInjectKey");
61
- function we() {
62
- const a = new ve(), m = new me(), e = {
63
- whenDef: m,
64
- when: () => m.promise
509
+ }, le = /* @__PURE__ */ Symbol("appInjectKey");
510
+ function Ie() {
511
+ const o = new _e(), P = new ge(), t = {
512
+ whenDef: P,
513
+ when: () => P.promise
65
514
  };
66
- return le(ae, {
67
- application: a,
68
- context: e
69
- }), { application: a, context: e };
515
+ return de(le, {
516
+ application: o,
517
+ context: t
518
+ }), { application: o, context: t };
70
519
  }
71
- function ne() {
72
- const a = ie(ae);
73
- if (!a)
520
+ function ce() {
521
+ const o = fe(le);
522
+ if (!o)
74
523
  throw new Error("Pixi app not provided");
75
- return a;
524
+ return o;
76
525
  }
77
- function B(a) {
78
- const m = a.autoResize ?? !0, e = a.resize ?? f, { application: t, context: F } = ne(), l = new ye();
79
- t.stage.addChild(l), T(() => {
80
- l.visible = a.visible ?? !0;
81
- }), T(() => {
82
- a.label && (l.label = a.label);
83
- }), m && F.when().then((v) => {
84
- l.texture && (y(), v.renderer.on("resize", y));
526
+ function z(o) {
527
+ const P = o.autoResize ?? !0, t = o.resize ?? _, { application: r, context: p } = ce(), l = new ye();
528
+ r.stage.addChild(l), $(() => {
529
+ l.visible = o.visible ?? !0;
530
+ }), $(() => {
531
+ o.label && (l.label = o.label);
532
+ }), P && p.when().then((w) => {
533
+ l.texture && (v(), w.renderer.on("resize", v));
85
534
  });
86
- function y() {
87
- if (!t.renderer?.screen)
535
+ function v() {
536
+ if (!r.renderer?.screen)
88
537
  return;
89
- const v = l.texture._meta;
90
- e({
91
- application: t,
538
+ const w = l.texture._meta;
539
+ t({
540
+ application: r,
92
541
  sprite: l,
93
- meta: v
542
+ meta: w
94
543
  });
95
544
  }
96
- R(() => {
97
- t.renderer.off("resize", y), t.stage.removeChild(l);
545
+ S(() => {
546
+ r.renderer.off("resize", v), r.stage.removeChild(l);
98
547
  });
99
- function f() {
100
- const v = t.screen.width / l.texture.width, r = t.screen.height / l.texture.height, w = Math.min(v, r);
101
- l.scale.set(w), l.x = (t.screen.width - l.width) / 2, l.y = (t.screen.height - l.height) / 2;
548
+ function _() {
549
+ const w = r.screen.width / l.texture.width, e = r.screen.height / l.texture.height, n = Math.min(w, e);
550
+ l.scale.set(n), l.x = (r.screen.width - l.width) / 2, l.y = (r.screen.height - l.height) / 2;
102
551
  }
103
552
  return {
104
553
  sprite: l,
105
- resizeSprite: y,
106
- application: t
554
+ resizeSprite: v,
555
+ application: r
107
556
  };
108
557
  }
109
- const _e = /* @__PURE__ */ E({
558
+ const Ne = /* @__PURE__ */ C({
110
559
  __name: "apng",
111
560
  props: {
112
- ...V,
561
+ ...q,
113
562
  url: {
114
563
  type: String,
115
564
  required: !0
116
565
  }
117
566
  },
118
- emits: S,
119
- setup(a, { emit: m }) {
120
- const e = a, t = m, F = W(), l = (o) => `${F}-apng-frame-${o}`, { sprite: y, resizeSprite: f } = B(e), v = $([]), r = $(0), w = $(!1), g = $(""), i = /* @__PURE__ */ new Map();
121
- let u = null, c = null, k = null;
122
- X(() => I(e.url));
123
- function A(o, _) {
124
- return c || (c = document.createElement("canvas"), k = c.getContext("2d", {
567
+ emits: j,
568
+ setup(o, { emit: P }) {
569
+ const t = o, r = P, p = ne(), l = (c) => `${p}-apng-frame-${c}`, { sprite: v, resizeSprite: _ } = z(t), w = U([]), e = U(0), n = U(!1), a = U(""), u = /* @__PURE__ */ new Map();
570
+ let i = null, s = null, b = null;
571
+ ae(() => A(t.url));
572
+ function h(c, x) {
573
+ return s || (s = document.createElement("canvas"), b = s.getContext("2d", {
125
574
  willReadFrequently: !0
126
- })), (c.width !== o || c.height !== _) && (c.width = o, c.height = _), { canvas: c, ctx: k };
575
+ })), (s.width !== c || s.height !== x) && (s.width = c, s.height = x), { canvas: s, ctx: b };
127
576
  }
128
- async function I(o) {
577
+ async function A(c) {
129
578
  try {
130
- g.value = "", w.value = !1, await x();
131
- const _ = await fetch(o);
132
- if (!_.ok)
133
- throw new Error(`加载APNG失败: ${_.status}`);
134
- const b = await _.arrayBuffer(), C = fe(b);
135
- if (C instanceof Error)
136
- throw new TypeError(`APNG解析失败: ${C.message}`);
137
- const { canvas: z, ctx: L } = A(C.width, C.height), re = C.frames.map(async (O, Z) => {
138
- L.clearRect(0, 0, z.width, z.height), await O.createImage();
139
- const se = O.imageElement;
140
- L.drawImage(se, O.left, O.top);
141
- const oe = L.getImageData(0, 0, z.width, z.height), M = l(Z);
142
- i.set(M, void 0), L.putImageData(oe, 0, 0);
143
- const ue = z.toDataURL();
144
- P.add({ alias: M, src: ue });
145
- const ee = await P.load(M);
146
- return i.set(M, ee), Z === 0 && (y.texture = ee, f()), M;
579
+ a.value = "", n.value = !1, await g();
580
+ const x = await fetch(c);
581
+ if (!x.ok)
582
+ throw new Error(`加载APNG失败: ${x.status}`);
583
+ const I = await x.arrayBuffer(), N = Ee(I);
584
+ if (N instanceof Error)
585
+ throw new TypeError(`APNG解析失败: ${N.message}`);
586
+ const { canvas: k, ctx: B } = h(N.width, N.height), O = N.frames.map(async (G, W) => {
587
+ B.clearRect(0, 0, k.width, k.height), await G.createImage();
588
+ const T = G.imageElement;
589
+ B.drawImage(T, G.left, G.top);
590
+ const D = B.getImageData(0, 0, k.width, k.height), E = l(W);
591
+ u.set(E, void 0), B.putImageData(D, 0, 0);
592
+ const M = k.toDataURL();
593
+ R.add({ alias: E, src: M });
594
+ const L = await R.load(E);
595
+ return u.set(E, L), W === 0 && (v.texture = L, _()), E;
147
596
  });
148
- v.value = await Promise.all(re), w.value = !0;
149
- } catch (_) {
150
- console.error("加载APNG失败:", _), g.value = _ instanceof Error ? _.message : "加载APNG失败", t("update:status", n.stopped);
597
+ w.value = await Promise.all(O), n.value = !0;
598
+ } catch (x) {
599
+ console.error("加载APNG失败:", x), a.value = x instanceof Error ? x.message : "加载APNG失败", r("update:status", m.stopped);
151
600
  }
152
601
  }
153
- function h() {
154
- u === null && (u = window.setInterval(() => {
155
- if (v.value.length === 0 || e.status !== n.playing)
602
+ function y() {
603
+ i === null && (i = window.setInterval(() => {
604
+ if (w.value.length === 0 || t.status !== m.playing)
156
605
  return;
157
- const o = i.get(
158
- l(r.value)
606
+ const c = u.get(
607
+ l(e.value)
159
608
  );
160
- if (o) {
161
- const _ = r.value - 1;
162
- _ >= 0 && !e.loop && Promise.resolve().then(() => K(500)).then(() => {
163
- P.unload(l(_)), i.delete(l(_));
164
- }), y.texture = o, f(), r.value = e.loop ? (r.value + 1) % v.value.length : r.value + 1;
609
+ if (c) {
610
+ const x = e.value - 1;
611
+ x >= 0 && !t.loop && Promise.resolve().then(() => Z(500)).then(() => {
612
+ R.unload(l(x)), u.delete(l(x));
613
+ }), v.texture = c, _(), e.value = t.loop ? (e.value + 1) % w.value.length : e.value + 1;
165
614
  } else
166
- e.loop || t("update:status", n.paused);
167
- }, 1e3 / e.frameRate));
168
- }
169
- function p() {
170
- !w.value || v.value.length <= 1 || (t("update:status", n.playing), h());
615
+ t.loop || r("update:status", m.paused);
616
+ }, 1e3 / t.frameRate));
171
617
  }
172
- function s() {
173
- u !== null && (clearInterval(u), u = null), t("update:status", n.paused);
618
+ function F() {
619
+ !n.value || w.value.length <= 1 || (r("update:status", m.playing), y());
174
620
  }
175
621
  function d() {
176
- u !== null && (clearInterval(u), u = null), r.value = 0;
177
- const o = i.get(l(0));
178
- o && (y.texture = o, f()), t("update:status", n.stopped);
179
- }
180
- async function x() {
181
- u !== null && (clearInterval(u), u = null);
182
- const o = [];
183
- for (const [_, b] of i)
184
- b && b !== Y.EMPTY && o.push(P.unload(_));
185
- await Promise.all(o), i.clear(), v.value = [], r.value = 0, w.value = !1, g.value = "", c && (c.width = 0, c.height = 0);
186
- }
187
- return T(() => {
188
- switch (e.status) {
189
- case n.play:
190
- p();
191
- break;
192
- case n.pause:
193
- s();
622
+ i !== null && (clearInterval(i), i = null), r("update:status", m.paused);
623
+ }
624
+ function f() {
625
+ i !== null && (clearInterval(i), i = null), e.value = 0;
626
+ const c = u.get(l(0));
627
+ c && (v.texture = c, _()), r("update:status", m.stopped);
628
+ }
629
+ async function g() {
630
+ i !== null && (clearInterval(i), i = null);
631
+ const c = [];
632
+ for (const [x, I] of u)
633
+ I && I !== ee.EMPTY && c.push(R.unload(x));
634
+ await Promise.all(c), u.clear(), w.value = [], e.value = 0, n.value = !1, a.value = "", s && (s.width = 0, s.height = 0);
635
+ }
636
+ return $(() => {
637
+ switch (t.status) {
638
+ case m.play:
639
+ F();
194
640
  break;
195
- case n.stop:
641
+ case m.pause:
196
642
  d();
197
643
  break;
644
+ case m.stop:
645
+ f();
646
+ break;
198
647
  }
199
- }), R(async () => {
200
- await x(), c = null, k = null;
201
- }), (o, _) => D(o.$slots, "default");
648
+ }), S(async () => {
649
+ await g(), s = null, b = null;
650
+ }), (c, x) => V(c.$slots, "default");
202
651
  }
203
- }), Be = /* @__PURE__ */ E({
652
+ }), Ge = /* @__PURE__ */ C({
204
653
  __name: "bitmap-generator",
205
654
  props: {
206
- ...J(V, {
655
+ ...se(q, {
207
656
  excludes: ["loop"]
208
657
  }),
209
658
  generator: {
@@ -213,50 +662,50 @@ const _e = /* @__PURE__ */ E({
213
662
  },
214
663
  emits: {
215
664
  "update:status": null,
216
- load: (a) => a
665
+ load: (o) => o
217
666
  },
218
- setup(a, { emit: m }) {
219
- const e = a, t = m, { sprite: F, resizeSprite: l, application: y } = B(e), f = new Y({
667
+ setup(o, { emit: P }) {
668
+ const t = o, r = P, { sprite: p, resizeSprite: l, application: v } = z(t), _ = new ee({
220
669
  dynamic: !0
221
670
  });
222
- F.texture = f;
223
- function v(u) {
224
- f.source.destroy();
225
- const c = new te({
226
- resource: u
671
+ p.texture = _;
672
+ function w(i) {
673
+ _.source.destroy();
674
+ const s = new oe({
675
+ resource: i
227
676
  });
228
- f.source = c, f.update(), l();
677
+ _.source = s, _.update(), l();
229
678
  }
230
- t("load", {
231
- application: y,
232
- sprite: F
233
- }), G(() => e.status, (u) => {
234
- u === n.play && w(), u === n.pause && g(), u === n.stop && i();
679
+ r("load", {
680
+ application: v,
681
+ sprite: p
682
+ }), Q(() => t.status, (i) => {
683
+ i === m.play && n(), i === m.pause && a(), i === m.stop && u();
235
684
  }, { immediate: !0 });
236
- function r() {
237
- e.status === n.playing && e.generator.next().then(({ value: u, done: c }) => {
238
- if (c)
239
- return t("update:status", n.stopped);
240
- v(u);
685
+ function e() {
686
+ t.status === m.playing && t.generator.next().then(({ value: i, done: s }) => {
687
+ if (s)
688
+ return r("update:status", m.stopped);
689
+ w(i);
241
690
  });
242
691
  }
243
- function w() {
244
- y.ticker.minFPS = e.frameRate, y.ticker.maxFPS = e.frameRate, t("update:status", n.playing), y.ticker.add(r);
692
+ function n() {
693
+ v.ticker.minFPS = t.frameRate, v.ticker.maxFPS = t.frameRate, r("update:status", m.playing), v.ticker.add(e);
245
694
  }
246
- function g() {
247
- y.ticker.remove(r), t("update:status", n.paused);
695
+ function a() {
696
+ v.ticker.remove(e), r("update:status", m.paused);
248
697
  }
249
- function i() {
250
- y.ticker.remove(r), t("update:status", n.stopped);
698
+ function u() {
699
+ v.ticker.remove(e), r("update:status", m.stopped);
251
700
  }
252
- return R(() => {
253
- i(), f.destroy();
254
- }), (u, c) => D(u.$slots, "default");
701
+ return S(() => {
702
+ u(), _.destroy();
703
+ }), (i, s) => V(i.$slots, "default");
255
704
  }
256
- }), Fe = /* @__PURE__ */ E({
705
+ }), De = /* @__PURE__ */ C({
257
706
  __name: "bitmap",
258
707
  props: {
259
- ...J(V, {
708
+ ...se(q, {
260
709
  excludes: ["loop"]
261
710
  }),
262
711
  data: {
@@ -268,92 +717,92 @@ const _e = /* @__PURE__ */ E({
268
717
  }
269
718
  },
270
719
  emits: {
271
- ...S,
272
- load: (a) => a,
720
+ ...j,
721
+ load: (o) => o,
273
722
  "update:frameIndex": null,
274
- notFound: (a) => !0
723
+ notFound: (o) => !0
275
724
  },
276
- setup(a, { emit: m }) {
277
- const e = a, t = m, { sprite: F, resizeSprite: l, application: y } = B(e), f = new Y({
725
+ setup(o, { emit: P }) {
726
+ const t = o, r = P, { sprite: p, resizeSprite: l, application: v } = z(t), _ = new ee({
278
727
  dynamic: !0
279
728
  });
280
- F.texture = f;
281
- function v(s) {
282
- f.source?.resource?.close(), f.source?.destroy();
283
- const d = new te({
284
- resource: s
729
+ p.texture = _;
730
+ function w(d) {
731
+ _.source?.resource?.close(), _.source?.destroy();
732
+ const f = new oe({
733
+ resource: d
285
734
  });
286
- f.source = d, f.update(), l();
735
+ _.source = f, _.update(), l();
287
736
  }
288
- t("load", {
289
- application: y,
290
- sprite: F
737
+ r("load", {
738
+ application: v,
739
+ sprite: p
291
740
  });
292
- const r = Q({
741
+ const e = ie({
293
742
  default: 0,
294
743
  key: "frameIndex"
295
- }, e, t), w = $(-1);
296
- function g(s) {
297
- s <= w.value || (w.value = s, K(0).then(() => {
298
- t("setData", {
299
- k: s,
744
+ }, t, r), n = U(-1);
745
+ function a(d) {
746
+ d <= n.value || (n.value = d, Z(0).then(() => {
747
+ r("setData", {
748
+ k: d,
300
749
  v: null
301
750
  });
302
751
  }));
303
752
  }
304
- let i = null, u = 0, c = 0, k = 0;
305
- function A() {
306
- if (i !== null)
753
+ let u = null, i = 0, s = 0, b = 0;
754
+ function h() {
755
+ if (u !== null)
307
756
  return;
308
- u = performance.now(), k = u, c = 0;
309
- function s() {
310
- const x = performance.now(), o = 1e3 / e.frameRate, _ = x - u;
311
- if (_ >= o) {
312
- u = x - _ % o, d(), c++;
313
- const b = x - k;
314
- if (b >= 1e3) {
315
- const C = Math.round(c * 1e3 / b);
316
- console.log(`[Bitmap] FPS: ${C}`), c = 0, k = x;
757
+ i = performance.now(), b = i, s = 0;
758
+ function d() {
759
+ const g = performance.now(), c = 1e3 / t.frameRate, x = g - i;
760
+ if (x >= c) {
761
+ i = g - x % c, f(), s++;
762
+ const I = g - b;
763
+ if (I >= 1e3) {
764
+ const N = Math.round(s * 1e3 / I);
765
+ console.log(`[Bitmap] FPS: ${N}`), s = 0, b = g;
317
766
  }
318
767
  }
319
- e.status === n.playing ? i = requestAnimationFrame(s) : i = null;
768
+ t.status === m.playing ? u = requestAnimationFrame(d) : u = null;
320
769
  }
321
- function d() {
322
- if (e.data.length === 0 || e.status !== n.playing)
770
+ function f() {
771
+ if (t.data.length === 0 || t.status !== m.playing)
323
772
  return;
324
- const x = e.data[r.value];
325
- if (x) {
326
- const o = r.value - 1;
327
- o >= 0 && g(o), v(x), r.value = r.value + 1;
773
+ const g = t.data[e.value];
774
+ if (g) {
775
+ const c = e.value - 1;
776
+ c >= 0 && a(c), w(g), e.value = e.value + 1;
328
777
  } else
329
778
  console.warn(
330
- `Bitmap for index ${r.value} not found. Ensure the data is loaded.`
331
- ), t("notFound", r.value);
779
+ `Bitmap for index ${e.value} not found. Ensure the data is loaded.`
780
+ ), r("notFound", e.value);
332
781
  }
333
- i = requestAnimationFrame(s);
782
+ u = requestAnimationFrame(d);
334
783
  }
335
- T(() => {
336
- e.prerender && r.value === 0 && e.data.length > 0 && e.data[0] && v(e.data[0]);
337
- }), G(() => e.status, (s) => {
338
- s === n.play && I(), s === n.pause && h(), s === n.stop && p();
784
+ $(() => {
785
+ t.prerender && e.value === 0 && t.data.length > 0 && t.data[0] && w(t.data[0]);
786
+ }), Q(() => t.status, (d) => {
787
+ d === m.play && A(), d === m.pause && y(), d === m.stop && F();
339
788
  }, { immediate: !0 });
340
- function I() {
341
- e.data.length > 0 ? (t("update:status", n.playing), A()) : t("update:status", n.stopped);
789
+ function A() {
790
+ t.data.length > 0 ? (r("update:status", m.playing), h()) : r("update:status", m.stopped);
342
791
  }
343
- function h() {
344
- t("update:status", n.paused);
792
+ function y() {
793
+ r("update:status", m.paused);
345
794
  }
346
- function p() {
347
- t("update:status", n.stopped), i !== null && (cancelAnimationFrame(i), i = null), t("update:data", []), r.value = 0, w.value = -1;
795
+ function F() {
796
+ r("update:status", m.stopped), u !== null && (cancelAnimationFrame(u), u = null), r("update:data", []), e.value = 0, n.value = -1;
348
797
  }
349
- return R(() => {
350
- p(), f.destroy();
351
- }), (s, d) => D(s.$slots, "default");
798
+ return S(() => {
799
+ F(), _.destroy();
800
+ }), (d, f) => V(d.$slots, "default");
352
801
  }
353
- }), ze = /* @__PURE__ */ E({
802
+ }), je = /* @__PURE__ */ C({
354
803
  __name: "buffer-image",
355
804
  props: {
356
- ...J(V, {
805
+ ...se(q, {
357
806
  excludes: ["loop"]
358
807
  }),
359
808
  data: {
@@ -381,95 +830,95 @@ const _e = /* @__PURE__ */ E({
381
830
  }
382
831
  },
383
832
  emits: {
384
- ...S,
385
- load: (a) => a,
833
+ ...j,
834
+ load: (o) => o,
386
835
  "update:frameIndex": null,
387
- notFound: (a) => !0
836
+ notFound: (o) => !0
388
837
  },
389
- setup(a, { emit: m }) {
390
- const e = a, t = m, { sprite: F, resizeSprite: l, application: y } = B(e), f = new Y({
838
+ setup(o, { emit: P }) {
839
+ const t = o, r = P, { sprite: p, resizeSprite: l, application: v } = z(t), _ = new ee({
391
840
  dynamic: !0
392
841
  });
393
- F.texture = f;
394
- function v(s) {
395
- f.source?.destroy();
396
- const d = new ge({
397
- resource: s,
398
- height: e.height,
399
- width: e.width,
400
- format: e.format
842
+ p.texture = _;
843
+ function w(d) {
844
+ _.source?.destroy();
845
+ const f = new we({
846
+ resource: d,
847
+ height: t.height,
848
+ width: t.width,
849
+ format: t.format
401
850
  });
402
- f.source = d, f.update(), l();
851
+ _.source = f, _.update(), l();
403
852
  }
404
- t("load", {
405
- application: y,
406
- sprite: F
853
+ r("load", {
854
+ application: v,
855
+ sprite: p
407
856
  });
408
- const r = Q({
857
+ const e = ie({
409
858
  default: 0,
410
859
  key: "frameIndex"
411
- }, e, t), w = $(-1);
412
- function g(s) {
413
- s <= w.value || (w.value = s, K(0).then(() => {
414
- t("setData", {
415
- k: s,
860
+ }, t, r), n = U(-1);
861
+ function a(d) {
862
+ d <= n.value || (n.value = d, Z(0).then(() => {
863
+ r("setData", {
864
+ k: d,
416
865
  v: null
417
866
  });
418
867
  }));
419
868
  }
420
- let i = null, u = 0, c = 0, k = 0;
421
- function A() {
422
- if (i !== null)
869
+ let u = null, i = 0, s = 0, b = 0;
870
+ function h() {
871
+ if (u !== null)
423
872
  return;
424
- u = performance.now(), k = u, c = 0;
425
- function s() {
426
- const x = performance.now(), o = 1e3 / e.frameRate, _ = x - u;
427
- if (_ >= o) {
428
- u = x - _ % o, d(), c++;
429
- const b = x - k;
430
- if (b >= 1e3) {
431
- const C = Math.round(c * 1e3 / b);
432
- console.log(`[Bitmap] FPS: ${C}`), c = 0, k = x;
873
+ i = performance.now(), b = i, s = 0;
874
+ function d() {
875
+ const g = performance.now(), c = 1e3 / t.frameRate, x = g - i;
876
+ if (x >= c) {
877
+ i = g - x % c, f(), s++;
878
+ const I = g - b;
879
+ if (I >= 1e3) {
880
+ const N = Math.round(s * 1e3 / I);
881
+ console.log(`[Bitmap] FPS: ${N}`), s = 0, b = g;
433
882
  }
434
883
  }
435
- e.status === n.playing ? i = requestAnimationFrame(s) : i = null;
884
+ t.status === m.playing ? u = requestAnimationFrame(d) : u = null;
436
885
  }
437
- function d() {
438
- if (e.data.length === 0 || e.status !== n.playing)
886
+ function f() {
887
+ if (t.data.length === 0 || t.status !== m.playing)
439
888
  return;
440
- const x = e.data[r.value];
441
- if (x) {
442
- const o = r.value - 1;
443
- o >= 0 && g(o), v(x), r.value = r.value + 1;
889
+ const g = t.data[e.value];
890
+ if (g) {
891
+ const c = e.value - 1;
892
+ c >= 0 && a(c), w(g), e.value = e.value + 1;
444
893
  } else
445
894
  console.warn(
446
- `Bitmap for index ${r.value} not found. Ensure the data is loaded.`
447
- ), t("notFound", r.value);
895
+ `Bitmap for index ${e.value} not found. Ensure the data is loaded.`
896
+ ), r("notFound", e.value);
448
897
  }
449
- i = requestAnimationFrame(s);
898
+ u = requestAnimationFrame(d);
450
899
  }
451
- T(() => {
452
- e.prerender && r.value === 0 && e.data.length > 0 && e.data[0] && v(e.data[0]);
453
- }), G(() => e.status, (s) => {
454
- s === n.play && I(), s === n.pause && h(), s === n.stop && p();
900
+ $(() => {
901
+ t.prerender && e.value === 0 && t.data.length > 0 && t.data[0] && w(t.data[0]);
902
+ }), Q(() => t.status, (d) => {
903
+ d === m.play && A(), d === m.pause && y(), d === m.stop && F();
455
904
  }, { immediate: !0 });
456
- function I() {
457
- e.data.length > 0 ? (t("update:status", n.playing), A()) : t("update:status", n.stopped);
905
+ function A() {
906
+ t.data.length > 0 ? (r("update:status", m.playing), h()) : r("update:status", m.stopped);
458
907
  }
459
- function h() {
460
- t("update:status", n.paused);
908
+ function y() {
909
+ r("update:status", m.paused);
461
910
  }
462
- function p() {
463
- t("update:status", n.stopped), i !== null && (cancelAnimationFrame(i), i = null), t("update:data", []), r.value = 0, w.value = -1;
911
+ function F() {
912
+ r("update:status", m.stopped), u !== null && (cancelAnimationFrame(u), u = null), r("update:data", []), e.value = 0, n.value = -1;
464
913
  }
465
- return R(() => {
466
- p(), f.destroy();
467
- }), (s, d) => D(s.$slots, "default");
914
+ return S(() => {
915
+ F(), _.destroy();
916
+ }), (d, f) => V(d.$slots, "default");
468
917
  }
469
- }), Me = /* @__PURE__ */ E({
918
+ }), ze = /* @__PURE__ */ C({
470
919
  __name: "core",
471
920
  props: {
472
- ...V,
921
+ ...q,
473
922
  data: {
474
923
  type: void 0,
475
924
  required: !0
@@ -479,179 +928,179 @@ const _e = /* @__PURE__ */ E({
479
928
  }
480
929
  },
481
930
  emits: {
482
- ...S,
483
- load: (a) => a,
931
+ ...j,
932
+ load: (o) => o,
484
933
  "update:frameIndex": null,
485
- notFound: (a) => !0
934
+ notFound: (o) => !0
486
935
  },
487
- setup(a, { emit: m }) {
488
- const e = a, t = m, F = W(), l = (p) => `${F}-${p}`, { sprite: y, resizeSprite: f, application: v } = B(e), r = /* @__PURE__ */ new Map(), w = $(0), g = j(() => e.data.slice(w.value));
489
- T(() => {
490
- for (const p in g.value) {
491
- const s = +p + w.value, d = `${F}-${s}`, x = typeof g.value[p] == "string" ? g.value[p] : g.value[p]?.src;
492
- x && (r.has(d) || (P.add({
493
- alias: d,
494
- src: x,
936
+ setup(o, { emit: P }) {
937
+ const t = o, r = P, p = ne(), l = (F) => `${p}-${F}`, { sprite: v, resizeSprite: _, application: w } = z(t), e = /* @__PURE__ */ new Map(), n = U(0), a = J(() => t.data.slice(n.value));
938
+ $(() => {
939
+ for (const F in a.value) {
940
+ const d = +F + n.value, f = `${p}-${d}`, g = typeof a.value[F] == "string" ? a.value[F] : a.value[F]?.src;
941
+ g && (e.has(f) || (R.add({
942
+ alias: f,
943
+ src: g,
495
944
  loadParser: "loadTextures"
496
- }), r.set(d, void 0), P.load(d).then((o) => {
497
- o._meta = g.value[p], r.set(d, o), e.prerender && s === 0 && (y.texture = o, f());
945
+ }), e.set(f, void 0), R.load(f).then((c) => {
946
+ c._meta = a.value[F], e.set(f, c), t.prerender && d === 0 && (v.texture = c, _());
498
947
  })));
499
948
  }
500
- }), t("load", {
501
- application: v,
502
- sprite: y
949
+ }), r("load", {
950
+ application: w,
951
+ sprite: v
503
952
  });
504
- const i = Q({
953
+ const u = ie({
505
954
  default: 0,
506
955
  key: "frameIndex"
507
- }, e, t);
508
- let u = null, c = 0;
509
- function k() {
510
- if (u !== null)
956
+ }, t, r);
957
+ let i = null, s = 0;
958
+ function b() {
959
+ if (i !== null)
511
960
  return;
512
- c = performance.now();
513
- function p() {
514
- const d = performance.now(), x = 1e3 / e.frameRate, o = d - c;
515
- o >= x && (c = d - o % x, s()), e.status === n.playing ? u = requestAnimationFrame(p) : u = null;
961
+ s = performance.now();
962
+ function F() {
963
+ const f = performance.now(), g = 1e3 / t.frameRate, c = f - s;
964
+ c >= g && (s = f - c % g, d()), t.status === m.playing ? i = requestAnimationFrame(F) : i = null;
516
965
  }
517
- function s() {
518
- if (e.data.length === 0 || e.status !== n.playing)
966
+ function d() {
967
+ if (t.data.length === 0 || t.status !== m.playing)
519
968
  return;
520
- const d = r.get(
521
- l(i.value)
969
+ const f = e.get(
970
+ l(u.value)
522
971
  );
523
- if (d) {
524
- const x = y.texture, o = i.value - 1;
525
- x && o >= 0 && !e.loop && Promise.resolve(K(500)).then(() => P.unload(
526
- l(o)
972
+ if (f) {
973
+ const g = v.texture, c = u.value - 1;
974
+ g && c >= 0 && !t.loop && Promise.resolve(Z(500)).then(() => R.unload(
975
+ l(c)
527
976
  )).then(() => {
528
- r.set(
529
- l(o),
977
+ e.set(
978
+ l(c),
530
979
  void 0
531
- ), t("setData", {
532
- k: o,
980
+ ), r("setData", {
981
+ k: c,
533
982
  v: ""
534
- }), w.value = o;
535
- }), y.texture = d, f(), i.value = e.loop ? (i.value + 1) % e.data.length : i.value + 1;
983
+ }), n.value = c;
984
+ }), v.texture = f, _(), u.value = t.loop ? (u.value + 1) % t.data.length : u.value + 1;
536
985
  } else
537
986
  console.warn(
538
- `Texture for index ${i.value} not found. Ensure the texture is loaded.`
539
- ), t("notFound", i.value), e.loop || t("update:status", n.paused);
987
+ `Texture for index ${u.value} not found. Ensure the texture is loaded.`
988
+ ), r("notFound", u.value), t.loop || r("update:status", m.paused);
540
989
  }
541
- u = requestAnimationFrame(p);
990
+ i = requestAnimationFrame(F);
542
991
  }
543
- G(() => e.status, (p) => {
544
- p === n.play && A(), p === n.pause && I(), p === n.stop && h();
992
+ Q(() => t.status, (F) => {
993
+ F === m.play && h(), F === m.pause && A(), F === m.stop && y();
545
994
  }, { immediate: !0 });
546
- function A() {
547
- e.data.length > 0 ? (t("update:status", n.playing), k()) : t("update:status", n.stopped);
995
+ function h() {
996
+ t.data.length > 0 ? (r("update:status", m.playing), b()) : r("update:status", m.stopped);
548
997
  }
549
- function I() {
550
- t("update:status", n.paused);
998
+ function A() {
999
+ r("update:status", m.paused);
551
1000
  }
552
- function h() {
553
- t("update:status", n.stopped), u !== null && (cancelAnimationFrame(u), u = null), t("update:data", []), r.clear(), i.value = 0;
1001
+ function y() {
1002
+ r("update:status", m.stopped), i !== null && (cancelAnimationFrame(i), i = null), r("update:data", []), e.clear(), u.value = 0;
554
1003
  }
555
- return R(() => {
556
- Array.from(r.entries()).forEach(([s, d]) => {
557
- d && P.unload(s);
558
- }), h();
559
- }), (p, s) => D(p.$slots, "default");
1004
+ return S(() => {
1005
+ Array.from(e.entries()).forEach(([d, f]) => {
1006
+ f && R.unload(d);
1007
+ }), y();
1008
+ }), (F, d) => V(F.$slots, "default");
560
1009
  }
561
- }), ke = /* @__PURE__ */ E({
1010
+ }), Le = /* @__PURE__ */ C({
562
1011
  __name: "provider",
563
- setup(a) {
564
- return we(), (m, e) => D(m.$slots, "default");
1012
+ setup(o) {
1013
+ return Ie(), (P, t) => V(P.$slots, "default");
565
1014
  }
566
- }), Pe = /* @__PURE__ */ E({
1015
+ }), Re = /* @__PURE__ */ C({
567
1016
  __name: "video",
568
1017
  props: {
569
- ...V,
1018
+ ...q,
570
1019
  url: {
571
1020
  type: String,
572
1021
  required: !0
573
1022
  }
574
1023
  },
575
- emits: S,
576
- setup(a, { emit: m }) {
577
- const e = a, t = m, F = W(), l = () => `${F}-video`, { sprite: y, resizeSprite: f } = B(e), v = $(), r = j(() => {
578
- if (v.value?.source && v.value.source.resource) {
579
- const h = v.value.source.resource;
580
- if (h instanceof HTMLVideoElement)
581
- return h;
1024
+ emits: j,
1025
+ setup(o, { emit: P }) {
1026
+ const t = o, r = P, p = ne(), l = () => `${p}-video`, { sprite: v, resizeSprite: _ } = z(t), w = U(), e = J(() => {
1027
+ if (w.value?.source && w.value.source.resource) {
1028
+ const y = w.value.source.resource;
1029
+ if (y instanceof HTMLVideoElement)
1030
+ return y;
582
1031
  }
583
1032
  return null;
584
- }), w = he(), g = $("");
585
- w.promise.then(() => {
586
- e.status === n.play && k();
587
- }), T(() => {
588
- r.value && (r.value.loop = e.loop);
589
- }), X(() => i(e.url));
590
- async function i(h) {
1033
+ }), n = be(), a = U("");
1034
+ n.promise.then(() => {
1035
+ t.status === m.play && b();
1036
+ }), $(() => {
1037
+ e.value && (e.value.loop = t.loop);
1038
+ }), ae(() => u(t.url));
1039
+ async function u(y) {
591
1040
  try {
592
- g.value = "";
593
- const p = l();
594
- P.cache.has(p) && await P.unload(p), P.add({ alias: p, src: h });
595
- const s = await P.load(p);
596
- return v.value = s, y.texture = s, r.value && (r.value.loop = e.loop, r.value.muted = !0, r.value.crossOrigin = "anonymous", u(r.value), w.resolve()), f(), s;
597
- } catch (p) {
598
- return console.error("加载视频纹理失败:", p), g.value = "视频加载失败", null;
1041
+ a.value = "";
1042
+ const F = l();
1043
+ R.cache.has(F) && await R.unload(F), R.add({ alias: F, src: y });
1044
+ const d = await R.load(F);
1045
+ return w.value = d, v.texture = d, e.value && (e.value.loop = t.loop, e.value.muted = !0, e.value.crossOrigin = "anonymous", i(e.value), n.resolve()), _(), d;
1046
+ } catch (F) {
1047
+ return console.error("加载视频纹理失败:", F), a.value = "视频加载失败", null;
599
1048
  }
600
1049
  }
601
- function u(h) {
602
- h.addEventListener("play", () => {
603
- e.status !== n.playing && t("update:status", n.playing);
604
- }), h.addEventListener("pause", () => {
605
- e.status !== n.paused && t("update:status", n.paused);
606
- }), h.addEventListener("ended", () => {
607
- e.loop ? (h.currentTime = 0, h.play()) : t("update:status", n.stopped);
608
- }), h.addEventListener("error", (p) => {
609
- const s = h.error;
610
- let d = "视频播放失败";
611
- if (s)
612
- switch (s.code) {
613
- case s.MEDIA_ERR_ABORTED:
614
- d = "视频播放被中止";
1050
+ function i(y) {
1051
+ y.addEventListener("play", () => {
1052
+ t.status !== m.playing && r("update:status", m.playing);
1053
+ }), y.addEventListener("pause", () => {
1054
+ t.status !== m.paused && r("update:status", m.paused);
1055
+ }), y.addEventListener("ended", () => {
1056
+ t.loop ? (y.currentTime = 0, y.play()) : r("update:status", m.stopped);
1057
+ }), y.addEventListener("error", (F) => {
1058
+ const d = y.error;
1059
+ let f = "视频播放失败";
1060
+ if (d)
1061
+ switch (d.code) {
1062
+ case d.MEDIA_ERR_ABORTED:
1063
+ f = "视频播放被中止";
615
1064
  break;
616
- case s.MEDIA_ERR_NETWORK:
617
- d = "网络错误导致视频播放失败";
1065
+ case d.MEDIA_ERR_NETWORK:
1066
+ f = "网络错误导致视频播放失败";
618
1067
  break;
619
- case s.MEDIA_ERR_DECODE:
620
- d = "视频解码失败";
1068
+ case d.MEDIA_ERR_DECODE:
1069
+ f = "视频解码失败";
621
1070
  break;
622
- case s.MEDIA_ERR_SRC_NOT_SUPPORTED:
623
- d = "不支持的视频格式";
1071
+ case d.MEDIA_ERR_SRC_NOT_SUPPORTED:
1072
+ f = "不支持的视频格式";
624
1073
  break;
625
1074
  }
626
- console.error("视频播放错误:", d, p), g.value = d, t("update:status", n.stopped);
1075
+ console.error("视频播放错误:", f, F), a.value = f, r("update:status", m.stopped);
627
1076
  });
628
1077
  }
629
- async function c() {
630
- if (v.value) {
631
- const h = l();
632
- v.value.destroy(!0), v.value = void 0, P.cache.has(h) && await P.unload(h);
1078
+ async function s() {
1079
+ if (w.value) {
1080
+ const y = l();
1081
+ w.value.destroy(!0), w.value = void 0, R.cache.has(y) && await R.unload(y);
633
1082
  }
634
- g.value = "";
1083
+ a.value = "";
635
1084
  }
636
- T(() => {
637
- e.status === n.play && k(), e.status === n.pause && A(), e.status === n.stop && I();
638
- }), R(() => {
639
- c();
1085
+ $(() => {
1086
+ t.status === m.play && b(), t.status === m.pause && h(), t.status === m.stop && A();
1087
+ }), S(() => {
1088
+ s();
640
1089
  });
641
- function k() {
642
- r.value && r.value.play().catch((h) => {
643
- console.error("视频播放失败:", h), g.value = "视频播放失败";
1090
+ function b() {
1091
+ e.value && e.value.play().catch((y) => {
1092
+ console.error("视频播放失败:", y), a.value = "视频播放失败";
644
1093
  });
645
1094
  }
646
- function A() {
647
- r.value?.pause();
1095
+ function h() {
1096
+ e.value?.pause();
648
1097
  }
649
- function I() {
650
- r.value && (r.value.pause(), r.value.currentTime = 0), t("update:status", n.stopped);
1098
+ function A() {
1099
+ e.value && (e.value.pause(), e.value.currentTime = 0), r("update:status", m.stopped);
651
1100
  }
652
- return (h, p) => D(h.$slots, "default");
1101
+ return (y, F) => V(y.$slots, "default");
653
1102
  }
654
- }), be = /* @__PURE__ */ E({
1103
+ }), Te = /* @__PURE__ */ C({
655
1104
  __name: "view",
656
1105
  props: {
657
1106
  defaultOptions: {
@@ -659,97 +1108,97 @@ const _e = /* @__PURE__ */ E({
659
1108
  default: () => ({})
660
1109
  }
661
1110
  },
662
- setup(a) {
663
- const m = a, { application: e, context: t } = ne(), F = $();
664
- return X(async () => {
665
- await e.init({
666
- resizeTo: F.value,
667
- ...m.defaultOptions
668
- }), t.whenDef.resolve(e), F.value.appendChild(e.canvas);
669
- }), (l, y) => (N(), pe("div", {
1111
+ setup(o) {
1112
+ const P = o, { application: t, context: r } = ce(), p = U();
1113
+ return ae(async () => {
1114
+ await t.init({
1115
+ resizeTo: p.value,
1116
+ ...P.defaultOptions
1117
+ }), r.whenDef.resolve(t), p.value.appendChild(t.canvas);
1118
+ }), (l, v) => (H(), me("div", {
670
1119
  ref_key: "appRef",
671
- ref: F,
1120
+ ref: p,
672
1121
  class: "vk-pixi-frame"
673
1122
  }, null, 512));
674
1123
  }
675
- }), $e = E({
1124
+ }), Oe = C({
676
1125
  name: "VkPixiFrame",
677
1126
  components: {
678
- ApngComp: _e,
1127
+ ApngComp: Ne,
679
1128
  // CoreComp,
680
- ProviderComp: ke,
681
- ViewComp: be,
682
- VideoComp: Pe,
683
- Bitmap: Fe
1129
+ ProviderComp: Le,
1130
+ ViewComp: Te,
1131
+ VideoComp: Re,
1132
+ Bitmap: De
684
1133
  },
685
- props: V,
686
- emits: S,
687
- setup(a) {
688
- const m = j(() => {
689
- if (!a.url)
1134
+ props: q,
1135
+ emits: j,
1136
+ setup(o) {
1137
+ const P = J(() => {
1138
+ if (!o.url)
690
1139
  return !1;
691
- const t = a.url.toLowerCase();
692
- return t.includes(".png") && !t.includes(".mp4") && !t.includes(".webm");
693
- }), e = j(() => {
694
- if (!a.url)
1140
+ const r = o.url.toLowerCase();
1141
+ return r.includes(".png") && !r.includes(".mp4") && !r.includes(".webm");
1142
+ }), t = J(() => {
1143
+ if (!o.url)
695
1144
  return !1;
696
- const t = a.url.toLowerCase();
697
- return t.includes(".mp4") || t.includes(".webm") || t.includes(".mov");
1145
+ const r = o.url.toLowerCase();
1146
+ return r.includes(".mp4") || r.includes(".webm") || r.includes(".mov");
698
1147
  });
699
1148
  return {
700
- isApng: m,
701
- isVideo: e
1149
+ isApng: P,
1150
+ isVideo: t
702
1151
  };
703
1152
  }
704
1153
  });
705
- function Ae(a, m, e, t, F, l) {
706
- const y = q("ViewComp"), f = q("ApngComp"), v = q("VideoComp"), r = q("Bitmap"), w = q("ProviderComp");
707
- return N(), U(w, null, {
708
- default: ce(() => [
709
- de(y),
710
- a.isApng && a.url ? (N(), U(f, {
1154
+ function Ue(o, P, t, r, p, l) {
1155
+ const v = K("ViewComp"), _ = K("ApngComp"), w = K("VideoComp"), e = K("Bitmap"), n = K("ProviderComp");
1156
+ return H(), Y(n, null, {
1157
+ default: he(() => [
1158
+ ve(v),
1159
+ o.isApng && o.url ? (H(), Y(_, {
711
1160
  key: 0,
712
- url: a.url,
713
- loop: a.loop,
714
- status: a.status,
715
- "onUpdate:status": m[0] || (m[0] = (g) => a.$emit("update:status", g))
716
- }, null, 8, ["url", "loop", "status"])) : a.isVideo && a.url ? (N(), U(v, {
1161
+ url: o.url,
1162
+ loop: o.loop,
1163
+ status: o.status,
1164
+ "onUpdate:status": P[0] || (P[0] = (a) => o.$emit("update:status", a))
1165
+ }, null, 8, ["url", "loop", "status"])) : o.isVideo && o.url ? (H(), Y(w, {
717
1166
  key: 1,
718
- url: a.url,
719
- loop: a.loop,
720
- status: a.status,
721
- "onUpdate:status": m[1] || (m[1] = (g) => a.$emit("update:status", g))
722
- }, null, 8, ["url", "loop", "status"])) : (N(), U(r, {
1167
+ url: o.url,
1168
+ loop: o.loop,
1169
+ status: o.status,
1170
+ "onUpdate:status": P[1] || (P[1] = (a) => o.$emit("update:status", a))
1171
+ }, null, 8, ["url", "loop", "status"])) : (H(), Y(e, {
723
1172
  key: 2,
724
- data: a.data,
725
- loop: a.loop,
726
- status: a.status,
727
- onSetData: m[2] || (m[2] = (g) => a.$emit("setData", g)),
728
- "onUpdate:status": m[3] || (m[3] = (g) => a.$emit("update:status", g))
1173
+ data: o.data,
1174
+ loop: o.loop,
1175
+ status: o.status,
1176
+ onSetData: P[2] || (P[2] = (a) => o.$emit("setData", a)),
1177
+ "onUpdate:status": P[3] || (P[3] = (a) => o.$emit("update:status", a))
729
1178
  }, null, 8, ["data", "loop", "status"]))
730
1179
  ]),
731
1180
  _: 1
732
1181
  });
733
1182
  }
734
- const H = /* @__PURE__ */ xe($e, [["render", Ae]]), qe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1183
+ const re = /* @__PURE__ */ xe(Oe, [["render", Ue]]), Ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
735
1184
  __proto__: null
736
1185
  }, Symbol.toStringTag, { value: "Module" }));
737
- H.install = (a) => {
738
- a.component(H.name || "VkPixiFrame", H);
1186
+ re.install = (o) => {
1187
+ o.component(re.name || "VkPixiFrame", re);
739
1188
  };
740
1189
  export {
741
- Oe as TickerStatus,
742
- H as VkPixiFrame,
743
- _e as VkPixiFrameApng,
744
- Fe as VkPixiFrameBitmap,
745
- Be as VkPixiFrameBitmapGenerator,
746
- ze as VkPixiFrameBufferImage,
747
- Me as VkPixiFrameCore,
748
- ke as VkPixiFrameProvider,
749
- Pe as VkPixiFrameVideo,
750
- be as VkPixiFrameView,
751
- qe as __VkPixiFrame,
752
- H as default,
753
- ne as usePixiApp,
754
- B as useSprite
1190
+ Ye as TickerStatus,
1191
+ re as VkPixiFrame,
1192
+ Ne as VkPixiFrameApng,
1193
+ De as VkPixiFrameBitmap,
1194
+ Ge as VkPixiFrameBitmapGenerator,
1195
+ je as VkPixiFrameBufferImage,
1196
+ ze as VkPixiFrameCore,
1197
+ Le as VkPixiFrameProvider,
1198
+ Re as VkPixiFrameVideo,
1199
+ Te as VkPixiFrameView,
1200
+ Ke as __VkPixiFrame,
1201
+ re as default,
1202
+ ce as usePixiApp,
1203
+ z as useSprite
755
1204
  };