@xiping/react-components 1.0.43 → 1.0.49

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 (255) hide show
  1. package/dist/cjs/_virtual/_commonjsHelpers.js +1 -0
  2. package/dist/cjs/_virtual/delegate.js +1 -0
  3. package/dist/cjs/_virtual/download.js +1 -0
  4. package/dist/cjs/_virtual/download2.js +1 -0
  5. package/dist/cjs/_virtual/index.js +1 -0
  6. package/dist/cjs/_virtual/index2.js +1 -0
  7. package/dist/cjs/components/shimmer-button/ShimmerButton.js +1 -1
  8. package/dist/cjs/components/shiny-button/ShinyButton.js +1 -1
  9. package/dist/cjs/components/sparkles-text/SparklesText.js +1 -1
  10. package/dist/cjs/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  11. package/dist/cjs/components/subtitle-player/SubtitlePlayer.js +3 -0
  12. package/dist/cjs/components/subtitle-player/index.d.ts +2 -0
  13. package/dist/cjs/components/txt-editor/TxtEditor.d.ts +5 -4
  14. package/dist/cjs/components/txt-editor/TxtEditor.js +32 -1
  15. package/dist/cjs/components/txt-reader/TxtReader.js +1 -1
  16. package/dist/cjs/components/txt-reader/index.module.css.js +1 -1
  17. package/dist/cjs/components/variable-proximity/index.d.ts +10 -0
  18. package/dist/cjs/components/variable-proximity/index.js +1 -1
  19. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  20. package/dist/cjs/components/video-subtitle-player/VideoSubtitlePlayer.js +1 -0
  21. package/dist/cjs/components/video-subtitle-player/index.d.ts +3 -0
  22. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  23. package/dist/cjs/components/video-subtitle-player/useVideoSubtitleStore.js +1 -0
  24. package/dist/cjs/index.d.ts +2 -1
  25. package/dist/cjs/index.js +1 -1
  26. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +1 -0
  27. package/dist/cjs/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +1 -0
  28. package/dist/cjs/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +3 -0
  29. package/dist/cjs/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +1 -0
  30. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +2 -0
  31. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +1 -0
  32. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +1 -0
  33. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +1 -0
  34. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +1 -0
  35. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +1 -0
  36. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +1 -0
  37. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +1 -0
  38. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +1 -0
  39. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +1 -0
  40. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +1 -0
  41. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1 -0
  42. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +1 -0
  43. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +1 -0
  44. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +1 -0
  45. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +1 -0
  46. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +1 -0
  47. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +1 -0
  48. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +5 -0
  49. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +15 -0
  50. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +4 -0
  51. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +4 -0
  52. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +4 -0
  53. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +4 -0
  54. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +5 -0
  55. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +8 -0
  56. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +4 -0
  57. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +4 -0
  58. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +4 -0
  59. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +4 -0
  60. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +4 -0
  61. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +12 -0
  62. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +7 -0
  63. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +5 -0
  64. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +5 -0
  65. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +5 -0
  66. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +1 -0
  67. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +3 -0
  68. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +1 -0
  69. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +4 -0
  70. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +1 -0
  71. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +9 -0
  72. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +5 -0
  73. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +1 -0
  74. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +5 -0
  75. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +2 -0
  76. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +1 -0
  77. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +6 -0
  78. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +1 -0
  79. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +2 -0
  80. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +5 -0
  81. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +1 -0
  82. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +1 -0
  83. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +4 -0
  84. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +1 -0
  85. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +13 -0
  86. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +4 -0
  87. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +19 -0
  88. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +1 -0
  89. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +1 -0
  90. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +8 -0
  91. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +5 -0
  92. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +7 -0
  93. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +1 -0
  94. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +2 -0
  95. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +7 -0
  96. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +1 -0
  97. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +4 -0
  98. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +1 -0
  99. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +11 -0
  100. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +3 -0
  101. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +3 -0
  102. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +6 -0
  103. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +6 -0
  104. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +4 -0
  105. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +1 -0
  106. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +1 -0
  107. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +6 -0
  108. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +1 -0
  109. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +11 -0
  110. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +1 -0
  111. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +1 -0
  112. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +1 -0
  113. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +1 -0
  114. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +1 -0
  115. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +1 -0
  116. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +1 -0
  117. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +1 -0
  118. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +1 -0
  119. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +1 -0
  120. package/dist/cjs/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +1 -0
  121. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +1 -0
  122. package/dist/cjs/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +1 -0
  123. package/dist/cjs/packages/subtitle/lib/src/json-converter.js +1 -0
  124. package/dist/cjs/packages/subtitle/lib/src/parser.js +5 -0
  125. package/dist/cjs/react-components.css +1 -1
  126. package/dist/es/_virtual/_commonjsHelpers.js +6 -0
  127. package/dist/es/_virtual/delegate.js +7 -0
  128. package/dist/es/_virtual/download.js +7 -0
  129. package/dist/es/_virtual/download2.js +4 -0
  130. package/dist/es/_virtual/index.js +8 -0
  131. package/dist/es/_virtual/index2.js +4 -0
  132. package/dist/es/components/shimmer-button/ShimmerButton.js +29 -62
  133. package/dist/es/components/shiny-button/ShinyButton.js +15 -17
  134. package/dist/es/components/sparkles-text/SparklesText.js +30 -29
  135. package/dist/es/components/subtitle-player/SubtitlePlayer.d.ts +51 -0
  136. package/dist/es/components/subtitle-player/SubtitlePlayer.js +301 -0
  137. package/dist/es/components/subtitle-player/index.d.ts +2 -0
  138. package/dist/es/components/txt-editor/TxtEditor.d.ts +5 -4
  139. package/dist/es/components/txt-editor/TxtEditor.js +105 -43
  140. package/dist/es/components/txt-reader/TxtReader.js +48 -55
  141. package/dist/es/components/txt-reader/index.module.css.js +6 -2
  142. package/dist/es/components/variable-proximity/index.d.ts +10 -0
  143. package/dist/es/components/variable-proximity/index.js +166 -94
  144. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.d.ts +23 -0
  145. package/dist/es/components/video-subtitle-player/VideoSubtitlePlayer.js +125 -0
  146. package/dist/es/components/video-subtitle-player/index.d.ts +3 -0
  147. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.d.ts +61 -0
  148. package/dist/es/components/video-subtitle-player/useVideoSubtitleStore.js +57 -0
  149. package/dist/es/index.d.ts +2 -1
  150. package/dist/es/index.js +60 -56
  151. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/closest.js +21 -0
  152. package/dist/es/node_modules/.pnpm/delegate@3.2.0/node_modules/delegate/src/delegate.js +29 -0
  153. package/dist/es/node_modules/.pnpm/downloadjs@1.4.7/node_modules/downloadjs/download.js +77 -0
  154. package/dist/es/node_modules/.pnpm/eventemitter3@4.0.7/node_modules/eventemitter3/index.js +111 -0
  155. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/_virtual/_rollupPluginBabelHelpers.js +197 -0
  156. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/constant.js +7 -0
  157. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/defaultConfig.js +87 -0
  158. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/error.js +64 -0
  159. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/events.js +67 -0
  160. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/index.umd.js +45 -0
  161. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/instManager.js +101 -0
  162. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/en.js +79 -0
  163. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/i18n.js +75 -0
  164. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/lang/zh-cn.js +79 -0
  165. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/mediaProxy.js +466 -0
  166. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/player.js +1240 -0
  167. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/basePlugin.js +207 -0
  168. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/hooksDescriptor.js +130 -0
  169. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/plugin.js +366 -0
  170. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/pluginsManager.js +204 -0
  171. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/preset.js +14 -0
  172. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugin/resizeObserver.js +81 -0
  173. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/back.js +10 -0
  174. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/download.js +20 -0
  175. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitCssFull.js +9 -0
  176. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/exitFull.js +9 -0
  177. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/loading.js +9 -0
  178. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pause.js +9 -0
  179. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIcon.js +10 -0
  180. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/pipIconExit.js +13 -0
  181. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/play.js +9 -0
  182. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/playNext.js +9 -0
  183. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/replay.js +9 -0
  184. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestCssFull.js +9 -0
  185. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/requestFull.js +9 -0
  186. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/rotate.js +17 -0
  187. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/seekicon.js +12 -0
  188. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeLarge.js +10 -0
  189. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeMuted.js +10 -0
  190. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/assets/volumeSmall.js +10 -0
  191. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconPlugin.js +35 -0
  192. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/iconTools.js +12 -0
  193. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionList.js +79 -0
  194. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/optionsIcon.js +193 -0
  195. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/common/thumbnail.js +141 -0
  196. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/controls/index.js +171 -0
  197. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/cssFullScreen/index.js +105 -0
  198. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/definition/index.js +110 -0
  199. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/download/index.js +83 -0
  200. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/dynamicBg/index.js +232 -0
  201. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/enter/index.js +42 -0
  202. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/error/index.js +68 -0
  203. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fpsDetect/index.js +116 -0
  204. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/backicon.js +68 -0
  205. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/fullscreen/index.js +150 -0
  206. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/gapJump/index.js +96 -0
  207. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/keyboard/index.js +299 -0
  208. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/loading/index.js +46 -0
  209. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/logger/index.js +171 -0
  210. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/index.js +169 -0
  211. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/miniScreen/miniScreenIcon.js +55 -0
  212. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/index.js +448 -0
  213. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/mobile/touch.js +138 -0
  214. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pc/index.js +122 -0
  215. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/pip/index.js +216 -0
  216. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/play/index.js +102 -0
  217. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playNext/index.js +78 -0
  218. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/playbackRate/index.js +100 -0
  219. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/poster/index.js +119 -0
  220. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/index.js +431 -0
  221. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/innerList.js +215 -0
  222. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progress/miniProgress.js +93 -0
  223. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/dotsApi.js +175 -0
  224. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/progressPreview/index.js +292 -0
  225. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/prompt/index.js +86 -0
  226. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/replay/index.js +92 -0
  227. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/rotate/index.js +106 -0
  228. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/screenShot/index.js +134 -0
  229. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/start/index.js +222 -0
  230. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/stats/index.js +152 -0
  231. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/testspeed/index.js +134 -0
  232. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/index.js +164 -0
  233. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/time/timesegments.js +146 -0
  234. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/volume/index.js +206 -0
  235. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/plugins/waitingTimeoutJump/index.js +53 -0
  236. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/presets/default.js +61 -0
  237. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/state.js +13 -0
  238. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/stateClassMap.js +34 -0
  239. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/database.js +83 -0
  240. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/debug.js +34 -0
  241. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/draggabilly.js +271 -0
  242. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/sniffer.js +111 -0
  243. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/util.js +517 -0
  244. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/utils/xgplayerTimeRange.js +25 -0
  245. package/dist/es/node_modules/.pnpm/xgplayer@3.0.23_core-js@3.47.0/node_modules/xgplayer/es/version.js +4 -0
  246. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/react.js +19 -0
  247. package/dist/es/node_modules/.pnpm/zustand@5.0.9_@types_react@19.2.7_react@19.2.3_use-sync-external-store@1.6.0_react@19.2.3_/node_modules/zustand/esm/vanilla.js +14 -0
  248. package/dist/es/packages/subtitle/lib/src/json-converter.js +27 -0
  249. package/dist/es/packages/subtitle/lib/src/parser.js +56 -0
  250. package/dist/es/react-components.css +1 -1
  251. package/package.json +23 -21
  252. package/dist/cjs/components/qr-code/index.d.ts +0 -103
  253. package/dist/cjs/components/qr-code/index.js +0 -1
  254. package/dist/es/components/qr-code/index.d.ts +0 -103
  255. package/dist/es/components/qr-code/index.js +0 -49
@@ -0,0 +1,207 @@
1
+ import { createClass as p, classCallCheck as y, objectSpread2 as u } from "../_virtual/_rollupPluginBabelHelpers.js";
2
+ import s from "../utils/util.js";
3
+ import g from "../utils/debug.js";
4
+ import m, { hook as f, useHooks as h, removeHooks as c, delHooksDescriptor as v } from "./hooksDescriptor.js";
5
+ function l(a, n) {
6
+ g.logError("[".concat(a, "] event or callback cant be undefined or null when call ").concat(n));
7
+ }
8
+ var P = /* @__PURE__ */ (function() {
9
+ function a(n) {
10
+ y(this, a), s.checkIsFunction(this.beforeCreate) && this.beforeCreate(n), m(this), this.__args = n, this.__events = {}, this.__onceEvents = {}, this.config = n.config || {}, this.player = null, this.playerConfig = {}, this.pluginName = "", this.__init(n);
11
+ }
12
+ return p(a, [{
13
+ key: "beforeCreate",
14
+ value: function(e) {
15
+ }
16
+ }, {
17
+ key: "afterCreate",
18
+ value: function() {
19
+ }
20
+ }, {
21
+ key: "beforePlayerInit",
22
+ value: function() {
23
+ }
24
+ }, {
25
+ key: "onPluginsReady",
26
+ value: function() {
27
+ }
28
+ }, {
29
+ key: "afterPlayerInit",
30
+ value: function() {
31
+ }
32
+ }, {
33
+ key: "destroy",
34
+ value: function() {
35
+ }
36
+ }, {
37
+ key: "__init",
38
+ value: function(e) {
39
+ this.player = e.player, this.playerConfig = e.player && e.player.config, this.pluginName = e.pluginName ? e.pluginName.toLowerCase() : this.constructor.pluginName.toLowerCase(), this.logger = e.player && e.player.logger;
40
+ }
41
+ }, {
42
+ key: "updateLang",
43
+ value: function(e) {
44
+ e || (e = this.lang);
45
+ }
46
+ }, {
47
+ key: "lang",
48
+ get: function() {
49
+ return this.player.lang;
50
+ }
51
+ }, {
52
+ key: "i18n",
53
+ get: function() {
54
+ return this.player.i18n;
55
+ }
56
+ }, {
57
+ key: "i18nKeys",
58
+ get: function() {
59
+ return this.player.i18nKeys;
60
+ }
61
+ }, {
62
+ key: "domEventType",
63
+ get: function() {
64
+ var e = s.checkTouchSupport() ? "touch" : "mouse";
65
+ return this.playerConfig && (this.playerConfig.domEventType === "touch" || this.playerConfig.domEventType === "mouse") && (e = this.playerConfig.domEventType), e;
66
+ }
67
+ }, {
68
+ key: "on",
69
+ value: function(e, t) {
70
+ var r = this;
71
+ if (!e || !t || !this.player) {
72
+ l(this.pluginName, "plugin.on(event, callback)");
73
+ return;
74
+ }
75
+ typeof e == "string" ? (this.__events[e] = t, this.player.on(e, t)) : Array.isArray(e) && e.forEach(function(i) {
76
+ r.__events[i] = t, r.player.on(i, t);
77
+ });
78
+ }
79
+ }, {
80
+ key: "once",
81
+ value: function(e, t) {
82
+ var r = this;
83
+ if (!e || !t || !this.player) {
84
+ l(this.pluginName, "plugin.once(event, callback)");
85
+ return;
86
+ }
87
+ typeof e == "string" ? (this.__onceEvents[e] = t, this.player.once(e, t)) : Array.isArray(e) && e.forEach(function(i) {
88
+ r.__onceEvents[i] = t, r.player.once(e, t);
89
+ });
90
+ }
91
+ }, {
92
+ key: "off",
93
+ value: function(e, t) {
94
+ var r = this;
95
+ if (!e || !t || !this.player) {
96
+ l(this.pluginName, "plugin.off(event, callback)");
97
+ return;
98
+ }
99
+ typeof e == "string" ? (delete this.__events[e], this.player.off(e, t)) : Array.isArray(e) && e.forEach(function(i) {
100
+ delete r.__events[e], r.player.off(i, t);
101
+ });
102
+ }
103
+ }, {
104
+ key: "offAll",
105
+ value: function() {
106
+ var e = this;
107
+ ["__events", "__onceEvents"].forEach(function(t) {
108
+ Object.keys(e[t]).forEach(function(r) {
109
+ e[t][r] && e.off(r, e[t][r]), r && delete e[t][r];
110
+ });
111
+ }), this.__events = {}, this.__onceEvents = {};
112
+ }
113
+ }, {
114
+ key: "emit",
115
+ value: function(e) {
116
+ var t;
117
+ if (this.player) {
118
+ for (var r = arguments.length, i = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
119
+ i[o - 1] = arguments[o];
120
+ (t = this.player).emit.apply(t, [e].concat(i));
121
+ }
122
+ }
123
+ }, {
124
+ key: "emitUserAction",
125
+ value: function(e, t) {
126
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
127
+ if (this.player) {
128
+ var i = u(u({}, r), {}, {
129
+ pluginName: this.pluginName
130
+ });
131
+ this.player.emitUserAction(e, t, i);
132
+ }
133
+ }
134
+ }, {
135
+ key: "hook",
136
+ value: function(e, t) {
137
+ return f.call.apply(f, [this].concat(Array.prototype.slice.call(arguments)));
138
+ }
139
+ }, {
140
+ key: "useHooks",
141
+ value: function(e, t) {
142
+ for (var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), o = 2; o < r; o++)
143
+ i[o - 2] = arguments[o];
144
+ return h.call.apply(h, [this].concat(Array.prototype.slice.call(arguments)));
145
+ }
146
+ }, {
147
+ key: "removeHooks",
148
+ value: function(e, t) {
149
+ for (var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), o = 2; o < r; o++)
150
+ i[o - 2] = arguments[o];
151
+ return c.call.apply(c, [this].concat(Array.prototype.slice.call(arguments)));
152
+ }
153
+ }, {
154
+ key: "registerPlugin",
155
+ value: function(e) {
156
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
157
+ if (this.player)
158
+ return r && (t.pluginName = r), this.player.registerPlugin({
159
+ plugin: e,
160
+ options: t
161
+ });
162
+ }
163
+ }, {
164
+ key: "getPlugin",
165
+ value: function(e) {
166
+ return this.player ? this.player.getPlugin(e) : null;
167
+ }
168
+ }, {
169
+ key: "__destroy",
170
+ value: function() {
171
+ var e = this, t = this.player, r = this.pluginName;
172
+ this.offAll(), s.clearAllTimers(this), s.checkIsFunction(this.destroy) && this.destroy(), ["player", "playerConfig", "pluginName", "logger", "__args", "__hooks"].map(function(i) {
173
+ e[i] = null;
174
+ }), t.unRegisterPlugin(r), v(this);
175
+ }
176
+ }], [{
177
+ key: "defineGetterOrSetter",
178
+ value: function(e, t) {
179
+ for (var r in t)
180
+ Object.prototype.hasOwnProperty.call(t, r) && Object.defineProperty(e, r, t[r]);
181
+ }
182
+ }, {
183
+ key: "defineMethod",
184
+ value: function(e, t) {
185
+ for (var r in t)
186
+ Object.prototype.hasOwnProperty.call(t, r) && typeof t[r] == "function" && Object.defineProperty(e, r, {
187
+ configurable: !0,
188
+ value: t[r]
189
+ });
190
+ }
191
+ }, {
192
+ key: "defaultConfig",
193
+ get: function() {
194
+ return {};
195
+ }
196
+ }, {
197
+ key: "pluginName",
198
+ get: function() {
199
+ return "pluginName";
200
+ }
201
+ }]), a;
202
+ })();
203
+ export {
204
+ s as Util,
205
+ g as XG_DEBUG,
206
+ P as default
207
+ };
@@ -0,0 +1,130 @@
1
+ import { toConsumableArray as _ } from "../_virtual/_rollupPluginBabelHelpers.js";
2
+ function v(t, n, r) {
3
+ for (var s = arguments.length, o = new Array(s > 3 ? s - 3 : 0), i = 3; i < s; i++)
4
+ o[i - 3] = arguments[i];
5
+ var u = n.call.apply(n, [t].concat(o));
6
+ !r || typeof r != "function" || (u && u.then ? u.then(function() {
7
+ for (var a = arguments.length, f = new Array(a), c = 0; c < a; c++)
8
+ f[c] = arguments[c];
9
+ r.call.apply(r, [t].concat(f));
10
+ }) : r.call.apply(r, [t].concat(o)));
11
+ }
12
+ function L(t, n) {
13
+ var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
14
+ pre: null,
15
+ next: null
16
+ };
17
+ return this.__hooks || (this.__hooks = {}), !this.__hooks[t] && (this.__hooks[t] = null), (function() {
18
+ var s = arguments, o = this;
19
+ if (r.pre)
20
+ try {
21
+ var i;
22
+ (i = r.pre).call.apply(i, [this].concat(Array.prototype.slice.call(arguments)));
23
+ } catch (a) {
24
+ throw a.message = "[pluginName: ".concat(this.pluginName, ":").concat(t, ":pre error] >> ").concat(a.message), a;
25
+ }
26
+ if (this.__hooks && this.__hooks[t])
27
+ try {
28
+ var u = d.apply(void 0, [this, t, n].concat(Array.prototype.slice.call(arguments)));
29
+ u ? u.then ? u.then(function(a) {
30
+ a !== !1 && v.apply(void 0, [o, n, r.next].concat(_(s)));
31
+ }).catch(function(a) {
32
+ throw a;
33
+ }) : v.apply(void 0, [this, n, r.next].concat(Array.prototype.slice.call(arguments))) : u === void 0 && v.apply(void 0, [this, n, r.next].concat(Array.prototype.slice.call(arguments)));
34
+ } catch (a) {
35
+ throw a.message = "[pluginName: ".concat(this.pluginName, ":").concat(t, "] >> ").concat(a.message), a;
36
+ }
37
+ else
38
+ v.apply(void 0, [this, n, r.next].concat(Array.prototype.slice.call(arguments)));
39
+ }).bind(this);
40
+ }
41
+ function H(t, n) {
42
+ var r = this.__hooks;
43
+ if (!r || !Array.isArray(r[t]))
44
+ return -1;
45
+ for (var s = r[t], o = 0; o < s.length; o++)
46
+ if (s[o] === n)
47
+ return o;
48
+ return -1;
49
+ }
50
+ function P(t, n) {
51
+ var r = this.__hooks;
52
+ if (r)
53
+ return r.hasOwnProperty(t) ? (Array.isArray(r[t]) || (r[t] = []), H.call(this, t, n) === -1 && r[t].push(n), !0) : (console.warn("has no supported hook which name [".concat(t, "]")), !1);
54
+ }
55
+ function O(t, n) {
56
+ var r = this.__hooks;
57
+ if (r)
58
+ if (Array.isArray(r[t])) {
59
+ var s = r[t], o = H.call(this, t, n);
60
+ o !== -1 && s.splice(o, 1);
61
+ } else r[t] && (r[t] = null);
62
+ }
63
+ function k(t) {
64
+ if (!(!this.plugins || !this.plugins[t.toLowerCase()])) {
65
+ for (var n = this.plugins[t.toLowerCase()], r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
66
+ s[o - 1] = arguments[o];
67
+ return n.useHooks && n.useHooks.apply(n, s);
68
+ }
69
+ }
70
+ function D(t) {
71
+ if (!(!this.plugins || !this.plugins[t.toLowerCase()])) {
72
+ var n = this.plugins[t.toLowerCase()];
73
+ if (n) {
74
+ for (var r = arguments.length, s = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
75
+ s[o - 1] = arguments[o];
76
+ return n.removeHooks && n.removeHooks.apply(n, s);
77
+ }
78
+ }
79
+ }
80
+ function I(t) {
81
+ var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
82
+ t.__hooks = {}, n && n.map(function(r) {
83
+ t.__hooks[r] = null;
84
+ }), Object.defineProperty(t, "hooks", {
85
+ get: function() {
86
+ return t.__hooks && Object.keys(t.__hooks).map(function(s) {
87
+ if (t.__hooks[s])
88
+ return s;
89
+ });
90
+ }
91
+ });
92
+ }
93
+ function q(t) {
94
+ t.__hooks = null;
95
+ }
96
+ function d(t, n, r) {
97
+ for (var s = arguments.length, o = new Array(s > 3 ? s - 3 : 0), i = 3; i < s; i++)
98
+ o[i - 3] = arguments[i];
99
+ if (t.__hooks && Array.isArray(t.__hooks[n])) {
100
+ var u = t.__hooks[n], a = -1, f = function c(e, y, h) {
101
+ for (var m = arguments.length, l = new Array(m > 3 ? m - 3 : 0), g = 3; g < m; g++)
102
+ l[g - 3] = arguments[g];
103
+ if (a++, u.length === 0 || a === u.length)
104
+ return h.call.apply(h, [e, e].concat(l));
105
+ var w = u[a], p = w.call.apply(w, [e, e].concat(l));
106
+ if (p && p.then)
107
+ return p.then(function(A) {
108
+ return A === !1 ? null : c.apply(void 0, [e, y, h].concat(l));
109
+ }).catch(function(A) {
110
+ console.warn("[runHooks]".concat(y, " reject"), A.message);
111
+ });
112
+ if (p !== !1)
113
+ return c.apply(void 0, [e, y, h].concat(l));
114
+ if (p === !1)
115
+ return !1;
116
+ };
117
+ return f.apply(void 0, [t, n, r].concat(o));
118
+ } else
119
+ return r.call.apply(r, [t, t].concat(o));
120
+ }
121
+ export {
122
+ I as default,
123
+ q as delHooksDescriptor,
124
+ L as hook,
125
+ O as removeHooks,
126
+ D as removePluginHooks,
127
+ d as runHooks,
128
+ P as useHooks,
129
+ k as usePluginHooks
130
+ };
@@ -0,0 +1,366 @@
1
+ import { inherits as L, createSuper as T, classCallCheck as E, createClass as x, get as p, getPrototypeOf as y, typeof as v } from "../_virtual/_rollupPluginBabelHelpers.js";
2
+ import k from "./basePlugin.js";
3
+ import b from "../../../../../../../_virtual/delegate.js";
4
+ import d from "../utils/debug.js";
5
+ import g from "../utils/util.js";
6
+ var A = {
7
+ CONTROLS: "controls",
8
+ ROOT: "root"
9
+ }, I = {
10
+ ROOT: "root",
11
+ ROOT_LEFT: "rootLeft",
12
+ ROOT_RIGHT: "rootRight",
13
+ ROOT_TOP: "rootTop",
14
+ CONTROLS_LEFT: "controlsLeft",
15
+ CONTROLS_RIGTH: "controlsRight",
16
+ CONTROLS_RIGHT: "controlsRight",
17
+ CONTROLS_CENTER: "controlsCenter",
18
+ CONTROLS: "controls"
19
+ }, O = {
20
+ ICON_DISABLE: "xg-icon-disable"
21
+ };
22
+ function _(i) {
23
+ return i ? i.indexOf && /^(?:http|data:|\/)/.test(i) : !1;
24
+ }
25
+ function N(i, c) {
26
+ return v(i) === "object" && i.class && typeof i.class == "string" ? "".concat(c, " ").concat(i.class) : c;
27
+ }
28
+ function w(i, c) {
29
+ return v(i) === "object" && i.attr && v(i.attr) === "object" && Object.keys(i.attr).map(function(o) {
30
+ c[o] = i.attr[o];
31
+ }), c;
32
+ }
33
+ function C(i, c) {
34
+ var o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "", r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}, t = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : "", e = null;
35
+ if (i instanceof window.Element)
36
+ return g.addClass(i, o), Object.keys(r).map(function(n) {
37
+ i.setAttribute(n, r[n]);
38
+ }), i;
39
+ if (_(i) || _(i.url))
40
+ return r.src = _(i) ? i : i.url || "", e = g.createDom(i.tag || "img", "", r, "xg-img ".concat(o)), e;
41
+ if (typeof i == "function")
42
+ try {
43
+ return e = i(), e instanceof window.Element ? (g.addClass(e, o), Object.keys(r).map(function(n) {
44
+ e.setAttribute(n, r[n]);
45
+ }), e) : (d.logWarn("warn>>icons.".concat(c, " in config of plugin named [").concat(t, "] is a function mast return an Element Object")), null);
46
+ } catch (n) {
47
+ return d.logError("Plugin named [".concat(t, "]:createIcon"), n), null;
48
+ }
49
+ return typeof i == "string" ? g.createDomFromHtml(i, r, o) : (d.logWarn("warn>>icons.".concat(c, " in config of plugin named [").concat(t, "] is invalid")), null);
50
+ }
51
+ function P(i, c) {
52
+ var o = c.config.icons || c.playerConfig.icons;
53
+ Object.keys(i).map(function(r) {
54
+ var t = i[r], e = t && t.class ? t.class : "", n = t && t.attr ? t.attr : {}, s = null;
55
+ o && o[r] && (e = N(o[r], e), n = w(o[r], n), s = C(o[r], r, e, n, c.pluginName)), !s && t && (s = C(t.icon ? t.icon : t, n, e, {}, c.pluginName)), c.icons[r] = s;
56
+ });
57
+ }
58
+ function j(i, c) {
59
+ Object.keys(i).map(function(o) {
60
+ Object.defineProperty(c.langText, o, {
61
+ get: function() {
62
+ var t = c.lang, e = c.i18n;
63
+ return e[o] ? e[o] : i[o] && i[o][t] || "";
64
+ }
65
+ });
66
+ });
67
+ }
68
+ var G = /* @__PURE__ */ (function(i) {
69
+ L(o, i);
70
+ var c = T(o);
71
+ function o() {
72
+ var r, t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
73
+ return E(this, o), r = c.call(this, t), r.__delegates = [], r;
74
+ }
75
+ return x(o, [{
76
+ key: "__init",
77
+ value: function(t) {
78
+ if (p(y(o.prototype), "__init", this).call(this, t), !!t.root) {
79
+ var e = t.root, n = null;
80
+ this.icons = {}, this.root = null, this.parent = null, this.extraEls = [];
81
+ var s = this.registerIcons() || {};
82
+ P(s, this), this.langText = {};
83
+ var a = this.registerLanguageTexts() || {};
84
+ j(a, this);
85
+ var l = "";
86
+ try {
87
+ l = this.render();
88
+ } catch (h) {
89
+ throw d.logError("Plugin:".concat(this.pluginName, ":render"), h), new Error("Plugin:".concat(this.pluginName, ":render:").concat(h.message));
90
+ }
91
+ if (l)
92
+ n = o.insert(l, e, t.index), n.setAttribute("data-index", t.index);
93
+ else if (t.tag)
94
+ n = g.createDom(t.tag, "", t.attr, t.name), n.setAttribute("data-index", t.index), e.appendChild(n);
95
+ else
96
+ return;
97
+ this.root = n, this.parent = e;
98
+ var u = this.config.attr || {}, f = this.config.style || {};
99
+ this.setAttr(u), this.setStyle(f), this.config.index && this.root.setAttribute("data-index", this.config.index), this.__registerChildren();
100
+ }
101
+ }
102
+ }, {
103
+ key: "__registerChildren",
104
+ value: function() {
105
+ var t = this;
106
+ if (this.root) {
107
+ this._children = [];
108
+ var e = this.children();
109
+ e && v(e) === "object" && Object.keys(e).length > 0 && Object.keys(e).map(function(n) {
110
+ var s = n, a = e[s], l = {
111
+ root: t.root
112
+ }, u, f;
113
+ typeof a == "function" ? (u = t.config[s] || {}, f = a) : v(a) === "object" && typeof a.plugin == "function" && (u = a.options ? g.deepCopy(t.config[s] || {}, a.options) : t.config[s] || {}, f = a.plugin), l.config = u, u.index !== void 0 && (l.index = u.index), u.root && (l.root = u.root), t.registerPlugin(f, l, s);
114
+ });
115
+ }
116
+ }
117
+ }, {
118
+ key: "updateLang",
119
+ value: function(t) {
120
+ t || (t = this.lang);
121
+ function e(l, u) {
122
+ for (var f = 0; f < l.children.length; f++)
123
+ l.children[f].children.length > 0 ? e(l.children[f], u) : u(l.children[f]);
124
+ }
125
+ var n = this.root, s = this.i18n, a = this.langText;
126
+ n && e(n, function(l) {
127
+ var u = l.getAttribute && l.getAttribute("lang-key");
128
+ if (u) {
129
+ var f = s[u.toUpperCase()] || a[u];
130
+ f && (l.innerHTML = typeof f == "function" ? f(t) : f);
131
+ }
132
+ });
133
+ }
134
+ }, {
135
+ key: "lang",
136
+ get: function() {
137
+ return this.player.lang;
138
+ }
139
+ }, {
140
+ key: "changeLangTextKey",
141
+ value: function(t) {
142
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", n = this.i18n || {}, s = this.langText;
143
+ t.setAttribute && t.setAttribute("lang-key", e);
144
+ var a = n[e] || s[e] || "";
145
+ a && (t.innerHTML = a);
146
+ }
147
+ }, {
148
+ key: "plugins",
149
+ value: function() {
150
+ return this._children;
151
+ }
152
+ }, {
153
+ key: "disable",
154
+ value: function() {
155
+ this.config.disable = !0, g.addClass(this.find(".xgplayer-icon"), O.ICON_DISABLE);
156
+ }
157
+ }, {
158
+ key: "enable",
159
+ value: function() {
160
+ this.config.disable = !1, g.removeClass(this.find(".xgplayer-icon"), O.ICON_DISABLE);
161
+ }
162
+ }, {
163
+ key: "children",
164
+ value: function() {
165
+ return {};
166
+ }
167
+ }, {
168
+ key: "registerPlugin",
169
+ value: function(t) {
170
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "";
171
+ e.root = e.root || this.root;
172
+ var s = p(y(o.prototype), "registerPlugin", this).call(this, t, e, n);
173
+ return this._children.push(s), s;
174
+ }
175
+ }, {
176
+ key: "registerIcons",
177
+ value: function() {
178
+ return {};
179
+ }
180
+ }, {
181
+ key: "registerLanguageTexts",
182
+ value: function() {
183
+ return {};
184
+ }
185
+ }, {
186
+ key: "find",
187
+ value: function(t) {
188
+ if (this.root)
189
+ return this.root.querySelector(t);
190
+ }
191
+ }, {
192
+ key: "bind",
193
+ value: function(t, e, n) {
194
+ var s = this;
195
+ if (arguments.length < 3 && typeof e == "function")
196
+ Array.isArray(t) ? t.forEach(function(l) {
197
+ s.bindEL(l, e);
198
+ }) : this.bindEL(t, e);
199
+ else {
200
+ var a = o.delegate.call(this, this.root, t, e, n);
201
+ this.__delegates = this.__delegates.concat(a);
202
+ }
203
+ }
204
+ }, {
205
+ key: "unbind",
206
+ value: function(t, e) {
207
+ var n = this;
208
+ if (arguments.length < 3 && typeof e == "function")
209
+ Array.isArray(t) ? t.forEach(function(l) {
210
+ n.unbindEL(l, e);
211
+ }) : this.unbindEL(t, e);
212
+ else
213
+ for (var s = "".concat(t, "_").concat(e), a = 0; a < this.__delegates.length; a++)
214
+ if (this.__delegates[a].key === s) {
215
+ this.__delegates[a].destroy(), this.__delegates.splice(a, 1);
216
+ break;
217
+ }
218
+ }
219
+ }, {
220
+ key: "setStyle",
221
+ value: function(t, e) {
222
+ var n = this;
223
+ if (this.root) {
224
+ if (g.typeOf(t) === "String")
225
+ return this.root.style[t] = e;
226
+ g.typeOf(t) === "Object" && Object.keys(t).map(function(s) {
227
+ n.root.style[s] = t[s];
228
+ });
229
+ }
230
+ }
231
+ }, {
232
+ key: "setAttr",
233
+ value: function(t, e) {
234
+ var n = this;
235
+ if (this.root) {
236
+ if (g.typeOf(t) === "String")
237
+ return this.root.setAttribute(t, e);
238
+ g.typeOf(t) === "Object" && Object.keys(t).map(function(s) {
239
+ n.root.setAttribute(s, t[s]);
240
+ });
241
+ }
242
+ }
243
+ }, {
244
+ key: "setHtml",
245
+ value: function(t, e) {
246
+ this.root && (this.root.innerHTML = t, typeof e == "function" && e());
247
+ }
248
+ }, {
249
+ key: "bindEL",
250
+ value: function(t, e) {
251
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
252
+ this.root && "on".concat(t) in this.root && typeof e == "function" && this.root.addEventListener(t, e, n);
253
+ }
254
+ }, {
255
+ key: "unbindEL",
256
+ value: function(t, e) {
257
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
258
+ this.root && "on".concat(t) in this.root && typeof e == "function" && this.root.removeEventListener(t, e, n);
259
+ }
260
+ }, {
261
+ key: "show",
262
+ value: function(t) {
263
+ if (this.root) {
264
+ this.root.style.display = t !== void 0 ? t : "block";
265
+ var e = window.getComputedStyle(this.root, null), n = e.getPropertyValue("display");
266
+ if (n === "none")
267
+ return this.root.style.display = "block";
268
+ }
269
+ }
270
+ }, {
271
+ key: "hide",
272
+ value: function() {
273
+ this.root && (this.root.style.display = "none");
274
+ }
275
+ }, {
276
+ key: "appendChild",
277
+ value: function(t, e) {
278
+ if (!this.root)
279
+ return null;
280
+ if (arguments.length < 2 && arguments[0] instanceof window.Element)
281
+ return this.root.appendChild(arguments[0]);
282
+ if (!e || !(e instanceof window.Element))
283
+ return null;
284
+ try {
285
+ return typeof t == "string" ? this.find(t).appendChild(e) : t.appendChild(e);
286
+ } catch (n) {
287
+ return d.logError("Plugin:appendChild", n), null;
288
+ }
289
+ }
290
+ }, {
291
+ key: "render",
292
+ value: function() {
293
+ return "";
294
+ }
295
+ }, {
296
+ key: "destroy",
297
+ value: function() {
298
+ }
299
+ }, {
300
+ key: "__destroy",
301
+ value: function() {
302
+ var t = this, e = this.player;
303
+ this.__delegates.map(function(n) {
304
+ n.destroy();
305
+ }), this.__delegates = [], this._children instanceof Array && (this._children.map(function(n) {
306
+ e.unRegisterPlugin(n.pluginName);
307
+ }), this._children = null), this.root && (this.root.hasOwnProperty("remove") ? this.root.remove() : this.root.parentNode && this.root.parentNode.removeChild(this.root)), p(y(o.prototype), "__destroy", this).call(this), this.icons = {}, ["root", "parent"].map(function(n) {
308
+ t[n] = null;
309
+ }), this.extraEls = [];
310
+ }
311
+ }], [{
312
+ key: "insert",
313
+ value: function(t, e) {
314
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, s = e.children.length, a = Number(n), l = t instanceof window.Node;
315
+ if (s) {
316
+ for (var u = 0, f = null, h = ""; u < s; u++) {
317
+ f = e.children[u];
318
+ var m = Number(f.getAttribute("data-index"));
319
+ if (m >= a) {
320
+ h = "beforebegin";
321
+ break;
322
+ } else m < a && (h = "afterend");
323
+ }
324
+ return l ? h === "afterend" ? e.appendChild(t) : e.insertBefore(t, f) : f.insertAdjacentHTML(h, t), h === "afterend" ? e.children[e.children.length - 1] : e.children[u];
325
+ } else
326
+ return l ? e.appendChild(t) : e.insertAdjacentHTML("beforeend", t), e.children[e.children.length - 1];
327
+ }
328
+ }, {
329
+ key: "defaultConfig",
330
+ get: function() {
331
+ return {};
332
+ }
333
+ }, {
334
+ key: "delegate",
335
+ value: function(t, e, n, s) {
336
+ var a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !1, l = [];
337
+ if (t instanceof window.Node && typeof s == "function")
338
+ if (Array.isArray(n))
339
+ n.forEach(function(f) {
340
+ var h = b(t, e, f, s, a);
341
+ h.key = "".concat(e, "_").concat(f), l.push(h);
342
+ });
343
+ else {
344
+ var u = b(t, e, n, s, a);
345
+ u.key = "".concat(e, "_").concat(n), l.push(u);
346
+ }
347
+ return l;
348
+ }
349
+ }, {
350
+ key: "ROOT_TYPES",
351
+ get: function() {
352
+ return A;
353
+ }
354
+ }, {
355
+ key: "POSITIONS",
356
+ get: function() {
357
+ return I;
358
+ }
359
+ }]), o;
360
+ })(k);
361
+ export {
362
+ O as PLUGIN_STATE_CLASS,
363
+ I as POSITIONS,
364
+ A as ROOT_TYPES,
365
+ G as default
366
+ };