@cmstops/pro-compo 0.3.52 → 0.3.55

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 (381) hide show
  1. package/README.md +107 -107
  2. package/dist/gif.worker.js +3 -3
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/es/appCenter/component.js +1 -1
  6. package/es/appCenter/style/index.less +118 -118
  7. package/es/baseFilter/style/index.less +45 -45
  8. package/es/colorPalette/style/index.less +44 -44
  9. package/es/contentDetailList/components/Content/KongoNavItem/index.js +1 -7
  10. package/es/contentDetailList/style/ComoItem.less +99 -99
  11. package/es/contentDetailList/style/Content.less +49 -49
  12. package/es/contentDetailList/style/ContentListItem.less +132 -132
  13. package/es/contentDetailList/style/Doc.less +3 -3
  14. package/es/contentDetailList/style/DocMpItem.less +135 -135
  15. package/es/contentDetailList/style/GroupPieceItem.less +108 -108
  16. package/es/contentDetailList/style/KongoNavItem.less +104 -104
  17. package/es/contentDetailList/style/LiveItem.less +108 -108
  18. package/es/contentDetailList/style/MaccountItem.less +111 -111
  19. package/es/contentDetailList/style/MatrixItem.less +214 -214
  20. package/es/contentDetailList/style/courseItem.less +108 -108
  21. package/es/contentDetailList/style/funhdItem.less +108 -108
  22. package/es/contentModal/components/storeBox/index.js +1 -1
  23. package/es/contentModal/style/ViewAllColumn.less +68 -68
  24. package/es/contentModal/style/columnTree.less +32 -32
  25. package/es/contentModal/style/index.less +23 -23
  26. package/es/contentModal/style/storeBox.less +55 -55
  27. package/es/dataTags/style/index.less +73 -73
  28. package/es/docHistory/style/docDiffPanel.less +9 -9
  29. package/es/docHistory/style/docHistoryList.less +58 -58
  30. package/es/docHistory/style/index.less +32 -32
  31. package/es/docPreview/style/index.less +129 -129
  32. package/es/docPreview/style/previewIframe.less +36 -36
  33. package/es/editMetaInfo/components/metaInfoForm.js +4 -4
  34. package/es/editMetaInfo/style/index.less +60 -60
  35. package/es/emptyData/style/index.less +34 -34
  36. package/es/gif.worker.js +3 -3
  37. package/es/hooks/useUpload.js +22 -2
  38. package/es/imageCrop/style/cropper.less +291 -291
  39. package/es/imageCrop/style/imageCropper.less +133 -133
  40. package/es/imageCrop/style/index.less +2 -2
  41. package/es/index.less +29 -29
  42. package/es/mediaFilter/components/FilterGroup.js +1 -1
  43. package/es/mediaFilter/style/index.less +115 -115
  44. package/es/mediaView/style/index.less +71 -71
  45. package/es/messageBox/list.js +1 -1
  46. package/es/messageBox/style/index.less +71 -71
  47. package/es/previousVersion/style/index.less +209 -209
  48. package/es/resourceGridList/components/FileTypeThumb/index.js +6 -3
  49. package/es/resourceGridList/style/FileTypeThumb.less +96 -96
  50. package/es/resourceGridList/style/index.less +233 -233
  51. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +6 -3
  52. package/es/resourceModal/style/DocAiMediaSelected.less +55 -55
  53. package/es/resourceModal/style/FileTypeThumb.less +205 -205
  54. package/es/resourceModal/style/MainContent.less +222 -222
  55. package/es/resourceModal/style/MediaPreviewer.less +71 -71
  56. package/es/resourceModal/style/MediaSelection.less +69 -69
  57. package/es/resourceModal/style/SystemResourceSelected.less +154 -154
  58. package/es/resourceModal/style/ToolbarSearch.less +53 -53
  59. package/es/resourceModal/style/index.less +18 -18
  60. package/es/selectAvatarList/style/index.less +4 -4
  61. package/es/selectGategory/style/ColumnSelection.less +190 -190
  62. package/es/selectGategory/style/index.less +40 -40
  63. package/es/selectResourceModal/components/ListCardWrapper/index.js +11 -9
  64. package/es/selectResourceModal/components/ListContentLocal/components/Upload.js +1 -1
  65. package/es/selectResourceModal/components/ListContentLocal/index.js +4 -2
  66. package/es/selectResourceModal/style/index.less +70 -70
  67. package/es/selectResourceModal/style/listCardWrapper.less +97 -97
  68. package/es/selectResourceModal/style/listContent.less +5 -5
  69. package/es/selectResourceModal/style/listContentLocal.less +26 -26
  70. package/es/selectResourceModal/style/listFilter.less +41 -41
  71. package/es/selectResourceModal/style/listSelected.less +90 -90
  72. package/es/selectThumb/components/card.js +10 -6
  73. package/es/selectThumb/style/card.less +95 -95
  74. package/es/selectThumb/style/colorPalette.less +30 -30
  75. package/es/style/index.less +1 -1
  76. package/es/thumbCard/style/index.less +90 -90
  77. package/es/thumbCard/style/thumbUploading.less +26 -26
  78. package/es/typeIcons/component.js +1 -1
  79. package/es/typeIcons/style/index.less +6 -6
  80. package/es/uploadBefore/style/index.less +144 -144
  81. package/es/uploadStep/style/index.less +152 -152
  82. package/es/userAvater/style/index.less +54 -54
  83. package/es/videoThumb/style/index.less +61 -61
  84. package/lib/appCenter/component.js +1 -1
  85. package/lib/appCenter/style/index.less +118 -118
  86. package/lib/baseFilter/style/index.less +45 -45
  87. package/lib/colorPalette/style/index.less +44 -44
  88. package/lib/contentDetailList/components/Content/KongoNavItem/index.js +1 -7
  89. package/lib/contentDetailList/style/ComoItem.less +99 -99
  90. package/lib/contentDetailList/style/Content.less +49 -49
  91. package/lib/contentDetailList/style/ContentListItem.less +132 -132
  92. package/lib/contentDetailList/style/Doc.less +3 -3
  93. package/lib/contentDetailList/style/DocMpItem.less +135 -135
  94. package/lib/contentDetailList/style/GroupPieceItem.less +108 -108
  95. package/lib/contentDetailList/style/KongoNavItem.less +104 -104
  96. package/lib/contentDetailList/style/LiveItem.less +108 -108
  97. package/lib/contentDetailList/style/MaccountItem.less +111 -111
  98. package/lib/contentDetailList/style/MatrixItem.less +214 -214
  99. package/lib/contentDetailList/style/courseItem.less +108 -108
  100. package/lib/contentDetailList/style/funhdItem.less +108 -108
  101. package/lib/contentModal/components/storeBox/index.js +1 -1
  102. package/lib/contentModal/style/ViewAllColumn.less +68 -68
  103. package/lib/contentModal/style/columnTree.less +32 -32
  104. package/lib/contentModal/style/index.less +23 -23
  105. package/lib/contentModal/style/storeBox.less +55 -55
  106. package/lib/dataTags/style/index.less +73 -73
  107. package/lib/docHistory/style/docDiffPanel.less +9 -9
  108. package/lib/docHistory/style/docHistoryList.less +58 -58
  109. package/lib/docHistory/style/index.less +32 -32
  110. package/lib/docPreview/style/index.less +129 -129
  111. package/lib/docPreview/style/previewIframe.less +36 -36
  112. package/lib/editMetaInfo/components/metaInfoForm.js +3 -3
  113. package/lib/editMetaInfo/style/index.less +60 -60
  114. package/lib/emptyData/style/index.less +34 -34
  115. package/lib/hooks/useUpload.js +22 -1
  116. package/lib/imageCrop/style/cropper.less +291 -291
  117. package/lib/imageCrop/style/imageCropper.less +133 -133
  118. package/lib/imageCrop/style/index.less +2 -2
  119. package/lib/index.less +29 -29
  120. package/lib/mediaFilter/components/FilterGroup.js +1 -1
  121. package/lib/mediaFilter/style/index.less +115 -115
  122. package/lib/mediaView/style/index.less +71 -71
  123. package/lib/messageBox/list.js +1 -1
  124. package/lib/messageBox/style/index.less +71 -71
  125. package/lib/previousVersion/style/index.less +209 -209
  126. package/lib/resourceGridList/components/FileTypeThumb/index.js +6 -3
  127. package/lib/resourceGridList/style/FileTypeThumb.less +96 -96
  128. package/lib/resourceGridList/style/index.less +233 -233
  129. package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +6 -3
  130. package/lib/resourceModal/style/DocAiMediaSelected.less +55 -55
  131. package/lib/resourceModal/style/FileTypeThumb.less +205 -205
  132. package/lib/resourceModal/style/MainContent.less +222 -222
  133. package/lib/resourceModal/style/MediaPreviewer.less +71 -71
  134. package/lib/resourceModal/style/MediaSelection.less +69 -69
  135. package/lib/resourceModal/style/SystemResourceSelected.less +154 -154
  136. package/lib/resourceModal/style/ToolbarSearch.less +53 -53
  137. package/lib/resourceModal/style/index.less +18 -18
  138. package/lib/selectAvatarList/style/index.less +4 -4
  139. package/lib/selectGategory/style/ColumnSelection.less +190 -190
  140. package/lib/selectGategory/style/index.less +40 -40
  141. package/lib/selectResourceModal/components/ListCardWrapper/index.js +11 -9
  142. package/lib/selectResourceModal/components/ListContentLocal/components/Upload.js +1 -1
  143. package/lib/selectResourceModal/components/ListContentLocal/index.js +4 -2
  144. package/lib/selectResourceModal/style/index.less +70 -70
  145. package/lib/selectResourceModal/style/listCardWrapper.less +97 -97
  146. package/lib/selectResourceModal/style/listContent.less +5 -5
  147. package/lib/selectResourceModal/style/listContentLocal.less +26 -26
  148. package/lib/selectResourceModal/style/listFilter.less +41 -41
  149. package/lib/selectResourceModal/style/listSelected.less +90 -90
  150. package/lib/selectThumb/components/card.js +10 -6
  151. package/lib/selectThumb/style/card.less +95 -95
  152. package/lib/selectThumb/style/colorPalette.less +30 -30
  153. package/lib/style/index.less +1 -1
  154. package/lib/thumbCard/style/index.less +90 -90
  155. package/lib/thumbCard/style/thumbUploading.less +26 -26
  156. package/lib/typeIcons/component.js +1 -1
  157. package/lib/typeIcons/style/index.less +6 -6
  158. package/lib/uploadBefore/style/index.less +144 -144
  159. package/lib/uploadStep/style/index.less +152 -152
  160. package/lib/userAvater/style/index.less +54 -54
  161. package/lib/videoThumb/style/index.less +61 -61
  162. package/package.json +137 -137
  163. package/es/appCenter/component.d.ts +0 -0
  164. package/es/appCenter/index.d.ts +0 -2
  165. package/es/appCenter/script/api.d.ts +0 -11
  166. package/es/appCenter/script/apps.d.ts +0 -14
  167. package/es/appCenter/script/permissionMap.d.ts +0 -6
  168. package/es/appCenter/script/routeMap.d.ts +0 -4
  169. package/es/appCenter/style/index.d.ts +0 -1
  170. package/es/baseFilter/component.d.ts +0 -0
  171. package/es/baseFilter/components/FilterGroup.d.ts +0 -0
  172. package/es/baseFilter/components/filterItem.d.ts +0 -0
  173. package/es/baseFilter/index.d.ts +0 -2
  174. package/es/baseFilter/style/index.d.ts +0 -1
  175. package/es/baseFilter/useCalcWidth.d.ts +0 -16
  176. package/es/colorPalette/component.d.ts +0 -0
  177. package/es/colorPalette/components/colorPicker.d.ts +0 -0
  178. package/es/colorPalette/index.d.ts +0 -2
  179. package/es/colorPalette/style/index.d.ts +0 -1
  180. package/es/components.d.ts +0 -5
  181. package/es/config.d.ts +0 -4
  182. package/es/contentDetailList/__demo__/matrix/platform.d.ts +0 -36
  183. package/es/contentDetailList/component.d.ts +0 -0
  184. package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
  185. package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
  186. package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
  187. package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
  188. package/es/contentDetailList/components/Content/DocMpItem/index.d.ts +0 -0
  189. package/es/contentDetailList/components/Content/GroupPieceItem/index.d.ts +0 -0
  190. package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
  191. package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
  192. package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
  193. package/es/contentDetailList/components/Content/courseItem/index.d.ts +0 -0
  194. package/es/contentDetailList/components/Content/funhdItem/index.d.ts +0 -0
  195. package/es/contentDetailList/components/Content/index.d.ts +0 -0
  196. package/es/contentDetailList/components/CustomWrp/CustomItem.d.ts +0 -0
  197. package/es/contentDetailList/components/CustomWrp/index.d.ts +0 -0
  198. package/es/contentDetailList/components/Doc/index.d.ts +0 -0
  199. package/es/contentDetailList/components/Records/MatrixItem/index.d.ts +0 -0
  200. package/es/contentDetailList/components/Records/index.d.ts +0 -0
  201. package/es/contentDetailList/components/ShowQRCode/QrcodeView/index.d.ts +0 -0
  202. package/es/contentDetailList/components/ShowQRCode/index.d.ts +0 -0
  203. package/es/contentDetailList/index.d.ts +0 -2
  204. package/es/contentDetailList/script/api.d.ts +0 -6
  205. package/es/contentDetailList/style/index.d.ts +0 -1
  206. package/es/contentModal/component.d.ts +0 -0
  207. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  208. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  209. package/es/contentModal/components/ContentList/MediaFilter/index.d.ts +0 -0
  210. package/es/contentModal/components/ContentList/index.d.ts +0 -0
  211. package/es/contentModal/components/EqxiuList/MediaFilter/index.d.ts +0 -0
  212. package/es/contentModal/components/EqxiuList/index.d.ts +0 -0
  213. package/es/contentModal/components/LiveList/MediaFilter/index.d.ts +0 -0
  214. package/es/contentModal/components/LiveList/index.d.ts +0 -0
  215. package/es/contentModal/components/MpAccountList/MpAccountFilter/index.d.ts +0 -0
  216. package/es/contentModal/components/MpAccountList/index.d.ts +0 -0
  217. package/es/contentModal/components/MpContentList/MediaFilter/index.d.ts +0 -0
  218. package/es/contentModal/components/MpContentList/index.d.ts +0 -0
  219. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  220. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  221. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  222. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  223. package/es/contentModal/index.d.ts +0 -2
  224. package/es/contentModal/script/api.d.ts +0 -14
  225. package/es/contentModal/style/index.d.ts +0 -1
  226. package/es/dataTags/component.d.ts +0 -0
  227. package/es/dataTags/index.d.ts +0 -2
  228. package/es/dataTags/style/index.d.ts +0 -1
  229. package/es/docHistory/component.d.ts +0 -0
  230. package/es/docHistory/components/DocDiffPanel/index.d.ts +0 -0
  231. package/es/docHistory/components/DocHistoryList/index.d.ts +0 -0
  232. package/es/docHistory/index.d.ts +0 -2
  233. package/es/docHistory/scripts/diff.d.ts +0 -1
  234. package/es/docHistory/scripts/useDocHistory.d.ts +0 -10
  235. package/es/docHistory/style/index.d.ts +0 -1
  236. package/es/docPreview/component.d.ts +0 -0
  237. package/es/docPreview/components/PreviewIframe.d.ts +0 -0
  238. package/es/docPreview/index.d.ts +0 -2
  239. package/es/docPreview/scripts/api.d.ts +0 -1
  240. package/es/docPreview/scripts/hook.d.ts +0 -20
  241. package/es/docPreview/style/index.d.ts +0 -1
  242. package/es/editMetaInfo/component.d.ts +0 -0
  243. package/es/editMetaInfo/components/metaInfoForm.d.ts +0 -0
  244. package/es/editMetaInfo/index.d.ts +0 -2
  245. package/es/editMetaInfo/script/api.d.ts +0 -6
  246. package/es/editMetaInfo/script/restaurants.d.ts +0 -4
  247. package/es/editMetaInfo/style/index.d.ts +0 -1
  248. package/es/emptyData/component.d.ts +0 -0
  249. package/es/emptyData/index.d.ts +0 -2
  250. package/es/emptyData/style/index.d.ts +0 -1
  251. package/es/emptyData/svg/add.d.ts +0 -0
  252. package/es/hooks/assets.d.ts +0 -1
  253. package/es/hooks/batch.d.ts +0 -8
  254. package/es/hooks/dialogVisible.d.ts +0 -8
  255. package/es/hooks/source.d.ts +0 -9
  256. package/es/hooks/toggle.d.ts +0 -6
  257. package/es/hooks/useAttachement.d.ts +0 -26
  258. package/es/hooks/useLocalStorage.d.ts +0 -8
  259. package/es/hooks/useMediaContext.d.ts +0 -12
  260. package/es/hooks/usePopper.d.ts +0 -8
  261. package/es/hooks/useSelection.d.ts +0 -23
  262. package/es/hooks/useUpload.d.ts +0 -17
  263. package/es/hooks/user.d.ts +0 -9
  264. package/es/imageCrop/component.d.ts +0 -0
  265. package/es/imageCrop/index.d.ts +0 -2
  266. package/es/imageCrop/script/api.d.ts +0 -1
  267. package/es/imageCrop/style/index.d.ts +0 -1
  268. package/es/index.d.ts +0 -29
  269. package/es/mediaFilter/component.d.ts +0 -0
  270. package/es/mediaFilter/components/DocFilter.d.ts +0 -0
  271. package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
  272. package/es/mediaFilter/components/FilterItem.d.ts +0 -0
  273. package/es/mediaFilter/components/MpAccountFilter.d.ts +0 -0
  274. package/es/mediaFilter/components/MpContentFilter.d.ts +0 -0
  275. package/es/mediaFilter/index.d.ts +0 -3
  276. package/es/mediaFilter/script/optionsGetter.d.ts +0 -26
  277. package/es/mediaFilter/script/types.d.ts +0 -16
  278. package/es/mediaFilter/style/index.d.ts +0 -1
  279. package/es/mediaView/component.d.ts +0 -0
  280. package/es/mediaView/index.d.ts +0 -2
  281. package/es/mediaView/style/index.d.ts +0 -1
  282. package/es/messageBox/component.d.ts +0 -0
  283. package/es/messageBox/index.d.ts +0 -2
  284. package/es/messageBox/list.d.ts +0 -0
  285. package/es/messageBox/script/api.d.ts +0 -6
  286. package/es/messageBox/style/index.d.ts +0 -1
  287. package/es/previousVersion/component.d.ts +0 -0
  288. package/es/previousVersion/index.d.ts +0 -2
  289. package/es/previousVersion/script/api.d.ts +0 -15
  290. package/es/previousVersion/script/tool.d.ts +0 -6
  291. package/es/previousVersion/style/index.d.ts +0 -1
  292. package/es/resourceGridList/component.d.ts +0 -0
  293. package/es/resourceGridList/components/FileTypeThumb/index.d.ts +0 -0
  294. package/es/resourceGridList/index.d.ts +0 -2
  295. package/es/resourceGridList/style/index.d.ts +0 -1
  296. package/es/resourceModal/component.d.ts +0 -0
  297. package/es/resourceModal/components/MediaPreviewer/index.d.ts +0 -0
  298. package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.d.ts +0 -0
  299. package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.d.ts +0 -0
  300. package/es/resourceModal/components/MediaSelection/MainContent/index.d.ts +0 -0
  301. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceFilter.d.ts +0 -0
  302. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/components/SystemResourceList.d.ts +0 -0
  303. package/es/resourceModal/components/MediaSelection/SystemResourceSelected/index.d.ts +0 -0
  304. package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.d.ts +0 -0
  305. package/es/resourceModal/components/MediaSelection/index.d.ts +0 -0
  306. package/es/resourceModal/index.d.ts +0 -2
  307. package/es/resourceModal/script/api.d.ts +0 -25
  308. package/es/resourceModal/script/mediaSelection.d.ts +0 -14
  309. package/es/resourceModal/style/index.d.ts +0 -1
  310. package/es/selectAvatarList/component.d.ts +0 -0
  311. package/es/selectAvatarList/index.d.ts +0 -2
  312. package/es/selectAvatarList/style/index.d.ts +0 -1
  313. package/es/selectGategory/component.d.ts +0 -0
  314. package/es/selectGategory/components/ColumnSelection/index.d.ts +0 -0
  315. package/es/selectGategory/index.d.ts +0 -2
  316. package/es/selectGategory/script/api.d.ts +0 -6
  317. package/es/selectGategory/style/index.d.ts +0 -1
  318. package/es/selectResourceModal/component.d.ts +0 -0
  319. package/es/selectResourceModal/components/ListCardWrapper/index.d.ts +0 -0
  320. package/es/selectResourceModal/components/ListContent/index.d.ts +0 -0
  321. package/es/selectResourceModal/components/ListContentLocal/components/Upload.d.ts +0 -0
  322. package/es/selectResourceModal/components/ListContentLocal/index.d.ts +0 -0
  323. package/es/selectResourceModal/components/ListFilter/index.d.ts +0 -0
  324. package/es/selectResourceModal/components/ListFilter/scripts/api.d.ts +0 -1
  325. package/es/selectResourceModal/components/ListSelected/index.d.ts +0 -0
  326. package/es/selectResourceModal/components/ListTabs/index.d.ts +0 -0
  327. package/es/selectResourceModal/index.d.ts +0 -2
  328. package/es/selectResourceModal/scripts/useResourceSelect.d.ts +0 -7
  329. package/es/selectResourceModal/style/index.d.ts +0 -1
  330. package/es/selectThumb/component.d.ts +0 -0
  331. package/es/selectThumb/components/card.d.ts +0 -0
  332. package/es/selectThumb/components/colorPalette.d.ts +0 -0
  333. package/es/selectThumb/components/colorPicker.d.ts +0 -0
  334. package/es/selectThumb/index.d.ts +0 -2
  335. package/es/selectThumb/style/index.d.ts +0 -1
  336. package/es/thumbCard/component.d.ts +0 -0
  337. package/es/thumbCard/components/ThumbUploading/index.d.ts +0 -0
  338. package/es/thumbCard/index.d.ts +0 -2
  339. package/es/thumbCard/style/index.d.ts +0 -1
  340. package/es/typeIcons/component.d.ts +0 -0
  341. package/es/typeIcons/index.d.ts +0 -2
  342. package/es/typeIcons/style/index.d.ts +0 -1
  343. package/es/uploadBefore/component.d.ts +0 -0
  344. package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
  345. package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
  346. package/es/uploadBefore/index.d.ts +0 -2
  347. package/es/uploadBefore/script/api.d.ts +0 -16
  348. package/es/uploadBefore/script/fileTypeAdapter.d.ts +0 -39
  349. package/es/uploadBefore/script/fileUpload.d.ts +0 -7
  350. package/es/uploadBefore/script/uploadHooks.d.ts +0 -55
  351. package/es/uploadBefore/style/index.d.ts +0 -1
  352. package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
  353. package/es/uploadStep/component.d.ts +0 -0
  354. package/es/uploadStep/index.d.ts +0 -2
  355. package/es/uploadStep/script/fileTypeAdapter.d.ts +0 -20
  356. package/es/uploadStep/style/index.d.ts +0 -1
  357. package/es/userAvater/component.d.ts +0 -0
  358. package/es/userAvater/index.d.ts +0 -2
  359. package/es/userAvater/script/api.d.ts +0 -8
  360. package/es/userAvater/style/index.d.ts +0 -1
  361. package/es/userDirector/component.d.ts +0 -0
  362. package/es/userDirector/components/userTree.d.ts +0 -0
  363. package/es/userDirector/index.d.ts +0 -2
  364. package/es/userDirector/script/api.d.ts +0 -10
  365. package/es/userDirector/style/index.d.ts +0 -1
  366. package/es/utils/auth.d.ts +0 -5
  367. package/es/utils/date.d.ts +0 -3
  368. package/es/utils/doc.d.ts +0 -76
  369. package/es/utils/filter.d.ts +0 -9
  370. package/es/utils/index.d.ts +0 -17
  371. package/es/utils/request.d.ts +0 -9
  372. package/es/utils/resource.d.ts +0 -4
  373. package/es/utils/transcodeMedia.d.ts +0 -13
  374. package/es/utils/tusUpload.d.ts +0 -16
  375. package/es/utils/typeMap.d.ts +0 -185
  376. package/es/utils/uploadCatalog.d.ts +0 -1
  377. package/es/videoThumb/component.d.ts +0 -0
  378. package/es/videoThumb/index.d.ts +0 -2
  379. package/es/videoThumb/scripts/api.d.ts +0 -9
  380. package/es/videoThumb/scripts/useVideoThumbs.d.ts +0 -7
  381. package/es/videoThumb/style/index.d.ts +0 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, computed, watch, onMounted, openBlock, createBlock, unref, withCtx, createVNode, withDirectives, vShow, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString, toRaw } from "vue";
1
+ import { defineComponent, ref, computed, watch, onMounted, openBlock, createBlock, unref, withCtx, createVNode, withDirectives, vShow, createElementBlock, Fragment, renderList, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
2
  import { Form, FormItem, Input, InputTag, Select, Option, Switch, DatePicker, InputNumber, RadioGroup, Radio, Message } from "@arco-design/web-vue";
3
3
  import { IconInfoCircle } from "@arco-design/web-vue/es/icon";
4
4
  import { docSeries } from "../../utils/doc.js";
@@ -180,7 +180,7 @@ const _sfc_main = defineComponent({
180
180
  return false;
181
181
  }
182
182
  }
183
- const data = toRaw(form.value);
183
+ const data = JSON.parse(JSON.stringify(form.value));
184
184
  data.self_publish_time = data.self_publish_time && Math.floor(data.self_publish_time / 1e3);
185
185
  data.online_time = data.online_time && Math.floor(data.online_time / 1e3);
186
186
  data.offline_time = data.offline_time && Math.floor(data.offline_time / 1e3);
@@ -192,7 +192,7 @@ const _sfc_main = defineComponent({
192
192
  data.comment_available = !!data.comment_available;
193
193
  data.statement = !!data.statement;
194
194
  data.is_recommend = !!data.is_recommend;
195
- data.album_status = !!data.album_status;
195
+ data.album_status = data.album_status ? "1" : "0";
196
196
  delete data.line_time;
197
197
  delete data.ori_count;
198
198
  delete data.aiRelated;
@@ -226,7 +226,7 @@ const _sfc_main = defineComponent({
226
226
  data.comment_available = data.comment_available !== "false";
227
227
  data.statement = data.statement !== "false";
228
228
  data.is_recommend = data.is_recommend !== "false";
229
- data.album_status = data.album_status !== "0";
229
+ data.album_status = Number(data.album_status);
230
230
  Object.assign(form.value, data);
231
231
  };
232
232
  watch(silenceOptions, (newVal, oldVal) => {
@@ -1,60 +1,60 @@
1
- .edit-meta-info-dialog-body {
2
- padding: 0;
3
-
4
- .style-form-item {
5
- position: relative;
6
- top: -10px;
7
-
8
- .title {
9
- max-width: 100%;
10
- color: var(--color-text-2);
11
- font-weight: 400;
12
- font-size: 14px;
13
- white-space: normal;
14
- }
15
- }
16
-
17
- .select-thumb-wrap {
18
- margin-left: 20.8%;
19
- }
20
-
21
- .horizontal {
22
- // display: flex;
23
- // align-items: center;
24
- // flex-direction: row !important;
25
- // .arco-form-item-label-col {
26
- // margin-bottom: 0;
27
- // padding-right: 16px;
28
- // text-align: right;
29
- // }
30
- }
31
-
32
- .input-w {
33
- width: 450px;
34
- }
35
-
36
- .silence {
37
- .arco-form-item-wrapper-col {
38
- .arco-form-item-content {
39
- display: block;
40
-
41
- .arco-switch {
42
- margin: 4px 0;
43
- }
44
-
45
- .silence-options {
46
- margin-top: 20px;
47
- margin-left: -75px;
48
-
49
- .info {
50
- margin-top: 12px;
51
- padding-left: 5px;
52
- color: #878e96;
53
- font-size: 14px;
54
- line-height: 1.5;
55
- }
56
- }
57
- }
58
- }
59
- }
60
- }
1
+ .edit-meta-info-dialog-body {
2
+ padding: 0;
3
+
4
+ .style-form-item {
5
+ position: relative;
6
+ top: -10px;
7
+
8
+ .title {
9
+ max-width: 100%;
10
+ color: var(--color-text-2);
11
+ font-weight: 400;
12
+ font-size: 14px;
13
+ white-space: normal;
14
+ }
15
+ }
16
+
17
+ .select-thumb-wrap {
18
+ margin-left: 20.8%;
19
+ }
20
+
21
+ .horizontal {
22
+ // display: flex;
23
+ // align-items: center;
24
+ // flex-direction: row !important;
25
+ // .arco-form-item-label-col {
26
+ // margin-bottom: 0;
27
+ // padding-right: 16px;
28
+ // text-align: right;
29
+ // }
30
+ }
31
+
32
+ .input-w {
33
+ width: 450px;
34
+ }
35
+
36
+ .silence {
37
+ .arco-form-item-wrapper-col {
38
+ .arco-form-item-content {
39
+ display: block;
40
+
41
+ .arco-switch {
42
+ margin: 4px 0;
43
+ }
44
+
45
+ .silence-options {
46
+ margin-top: 20px;
47
+ margin-left: -75px;
48
+
49
+ .info {
50
+ margin-top: 12px;
51
+ padding-left: 5px;
52
+ color: #878e96;
53
+ font-size: 14px;
54
+ line-height: 1.5;
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
@@ -1,34 +1,34 @@
1
- .empty-data-container {
2
- position: absolute;
3
- top: 50%;
4
- left: 50%;
5
- display: block;
6
- display: flex;
7
- flex-direction: column;
8
- align-items: center;
9
- justify-content: center;
10
- width: 220px;
11
- transform: translate(-50%, -50%);
12
-
13
- &.small {
14
- width: 160px;
15
- }
16
-
17
- img {
18
- width: 100%;
19
- }
20
-
21
- .custom-icon {
22
- width: 100%;
23
- }
24
-
25
- .tip {
26
- margin-top: 16px;
27
- color: #999eaa;
28
- font-size: 14px;
29
- }
30
-
31
- .slot-view {
32
- margin-top: 16px;
33
- }
34
- }
1
+ .empty-data-container {
2
+ position: absolute;
3
+ top: 50%;
4
+ left: 50%;
5
+ display: block;
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ justify-content: center;
10
+ width: 220px;
11
+ transform: translate(-50%, -50%);
12
+
13
+ &.small {
14
+ width: 160px;
15
+ }
16
+
17
+ img {
18
+ width: 100%;
19
+ }
20
+
21
+ .custom-icon {
22
+ width: 100%;
23
+ }
24
+
25
+ .tip {
26
+ margin-top: 16px;
27
+ color: #999eaa;
28
+ font-size: 14px;
29
+ }
30
+
31
+ .slot-view {
32
+ margin-top: 16px;
33
+ }
34
+ }
package/es/gif.worker.js CHANGED
@@ -1,3 +1,3 @@
1
- // gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
2
- (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
3
- //# sourceMappingURL=gif.worker.js.map
1
+ // gif.worker.js 0.2.0 - https://github.com/jnordberg/gif.js
2
+ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){var NeuQuant=require("./TypedNeuQuant.js");var LZWEncoder=require("./LZWEncoder.js");function ByteArray(){this.page=-1;this.pages=[];this.newPage()}ByteArray.pageSize=4096;ByteArray.charMap={};for(var i=0;i<256;i++)ByteArray.charMap[i]=String.fromCharCode(i);ByteArray.prototype.newPage=function(){this.pages[++this.page]=new Uint8Array(ByteArray.pageSize);this.cursor=0};ByteArray.prototype.getData=function(){var rv="";for(var p=0;p<this.pages.length;p++){for(var i=0;i<ByteArray.pageSize;i++){rv+=ByteArray.charMap[this.pages[p][i]]}}return rv};ByteArray.prototype.writeByte=function(val){if(this.cursor>=ByteArray.pageSize)this.newPage();this.pages[this.page][this.cursor++]=val};ByteArray.prototype.writeUTFBytes=function(string){for(var l=string.length,i=0;i<l;i++)this.writeByte(string.charCodeAt(i))};ByteArray.prototype.writeBytes=function(array,offset,length){for(var l=length||array.length,i=offset||0;i<l;i++)this.writeByte(array[i])};function GIFEncoder(width,height){this.width=~~width;this.height=~~height;this.transparent=null;this.transIndex=0;this.repeat=-1;this.delay=0;this.image=null;this.pixels=null;this.indexedPixels=null;this.colorDepth=null;this.colorTab=null;this.neuQuant=null;this.usedEntry=new Array;this.palSize=7;this.dispose=-1;this.firstFrame=true;this.sample=10;this.dither=false;this.globalPalette=false;this.out=new ByteArray}GIFEncoder.prototype.setDelay=function(milliseconds){this.delay=Math.round(milliseconds/10)};GIFEncoder.prototype.setFrameRate=function(fps){this.delay=Math.round(100/fps)};GIFEncoder.prototype.setDispose=function(disposalCode){if(disposalCode>=0)this.dispose=disposalCode};GIFEncoder.prototype.setRepeat=function(repeat){this.repeat=repeat};GIFEncoder.prototype.setTransparent=function(color){this.transparent=color};GIFEncoder.prototype.addFrame=function(imageData){this.image=imageData;this.colorTab=this.globalPalette&&this.globalPalette.slice?this.globalPalette:null;this.getImagePixels();this.analyzePixels();if(this.globalPalette===true)this.globalPalette=this.colorTab;if(this.firstFrame){this.writeLSD();this.writePalette();if(this.repeat>=0){this.writeNetscapeExt()}}this.writeGraphicCtrlExt();this.writeImageDesc();if(!this.firstFrame&&!this.globalPalette)this.writePalette();this.writePixels();this.firstFrame=false};GIFEncoder.prototype.finish=function(){this.out.writeByte(59)};GIFEncoder.prototype.setQuality=function(quality){if(quality<1)quality=1;this.sample=quality};GIFEncoder.prototype.setDither=function(dither){if(dither===true)dither="FloydSteinberg";this.dither=dither};GIFEncoder.prototype.setGlobalPalette=function(palette){this.globalPalette=palette};GIFEncoder.prototype.getGlobalPalette=function(){return this.globalPalette&&this.globalPalette.slice&&this.globalPalette.slice(0)||this.globalPalette};GIFEncoder.prototype.writeHeader=function(){this.out.writeUTFBytes("GIF89a")};GIFEncoder.prototype.analyzePixels=function(){if(!this.colorTab){this.neuQuant=new NeuQuant(this.pixels,this.sample);this.neuQuant.buildColormap();this.colorTab=this.neuQuant.getColormap()}if(this.dither){this.ditherPixels(this.dither.replace("-serpentine",""),this.dither.match(/-serpentine/)!==null)}else{this.indexPixels()}this.pixels=null;this.colorDepth=8;this.palSize=7;if(this.transparent!==null){this.transIndex=this.findClosest(this.transparent,true)}};GIFEncoder.prototype.indexPixels=function(imgq){var nPix=this.pixels.length/3;this.indexedPixels=new Uint8Array(nPix);var k=0;for(var j=0;j<nPix;j++){var index=this.findClosestRGB(this.pixels[k++]&255,this.pixels[k++]&255,this.pixels[k++]&255);this.usedEntry[index]=true;this.indexedPixels[j]=index}};GIFEncoder.prototype.ditherPixels=function(kernel,serpentine){var kernels={FalseFloydSteinberg:[[3/8,1,0],[3/8,0,1],[2/8,1,1]],FloydSteinberg:[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]],Stucki:[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]],Atkinson:[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]]};if(!kernel||!kernels[kernel]){throw"Unknown dithering kernel: "+kernel}var ds=kernels[kernel];var index=0,height=this.height,width=this.width,data=this.pixels;var direction=serpentine?-1:1;this.indexedPixels=new Uint8Array(this.pixels.length/3);for(var y=0;y<height;y++){if(serpentine)direction=direction*-1;for(var x=direction==1?0:width-1,xend=direction==1?width:0;x!==xend;x+=direction){index=y*width+x;var idx=index*3;var r1=data[idx];var g1=data[idx+1];var b1=data[idx+2];idx=this.findClosestRGB(r1,g1,b1);this.usedEntry[idx]=true;this.indexedPixels[index]=idx;idx*=3;var r2=this.colorTab[idx];var g2=this.colorTab[idx+1];var b2=this.colorTab[idx+2];var er=r1-r2;var eg=g1-g2;var eb=b1-b2;for(var i=direction==1?0:ds.length-1,end=direction==1?ds.length:0;i!==end;i+=direction){var x1=ds[i][1];var y1=ds[i][2];if(x1+x>=0&&x1+x<width&&y1+y>=0&&y1+y<height){var d=ds[i][0];idx=index+x1+y1*width;idx*=3;data[idx]=Math.max(0,Math.min(255,data[idx]+er*d));data[idx+1]=Math.max(0,Math.min(255,data[idx+1]+eg*d));data[idx+2]=Math.max(0,Math.min(255,data[idx+2]+eb*d))}}}}};GIFEncoder.prototype.findClosest=function(c,used){return this.findClosestRGB((c&16711680)>>16,(c&65280)>>8,c&255,used)};GIFEncoder.prototype.findClosestRGB=function(r,g,b,used){if(this.colorTab===null)return-1;if(this.neuQuant&&!used){return this.neuQuant.lookupRGB(r,g,b)}var c=b|g<<8|r<<16;var minpos=0;var dmin=256*256*256;var len=this.colorTab.length;for(var i=0,index=0;i<len;index++){var dr=r-(this.colorTab[i++]&255);var dg=g-(this.colorTab[i++]&255);var db=b-(this.colorTab[i++]&255);var d=dr*dr+dg*dg+db*db;if((!used||this.usedEntry[index])&&d<dmin){dmin=d;minpos=index}}return minpos};GIFEncoder.prototype.getImagePixels=function(){var w=this.width;var h=this.height;this.pixels=new Uint8Array(w*h*3);var data=this.image;var srcPos=0;var count=0;for(var i=0;i<h;i++){for(var j=0;j<w;j++){this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];this.pixels[count++]=data[srcPos++];srcPos++}}};GIFEncoder.prototype.writeGraphicCtrlExt=function(){this.out.writeByte(33);this.out.writeByte(249);this.out.writeByte(4);var transp,disp;if(this.transparent===null){transp=0;disp=0}else{transp=1;disp=2}if(this.dispose>=0){disp=dispose&7}disp<<=2;this.out.writeByte(0|disp|0|transp);this.writeShort(this.delay);this.out.writeByte(this.transIndex);this.out.writeByte(0)};GIFEncoder.prototype.writeImageDesc=function(){this.out.writeByte(44);this.writeShort(0);this.writeShort(0);this.writeShort(this.width);this.writeShort(this.height);if(this.firstFrame||this.globalPalette){this.out.writeByte(0)}else{this.out.writeByte(128|0|0|0|this.palSize)}};GIFEncoder.prototype.writeLSD=function(){this.writeShort(this.width);this.writeShort(this.height);this.out.writeByte(128|112|0|this.palSize);this.out.writeByte(0);this.out.writeByte(0)};GIFEncoder.prototype.writeNetscapeExt=function(){this.out.writeByte(33);this.out.writeByte(255);this.out.writeByte(11);this.out.writeUTFBytes("NETSCAPE2.0");this.out.writeByte(3);this.out.writeByte(1);this.writeShort(this.repeat);this.out.writeByte(0)};GIFEncoder.prototype.writePalette=function(){this.out.writeBytes(this.colorTab);var n=3*256-this.colorTab.length;for(var i=0;i<n;i++)this.out.writeByte(0)};GIFEncoder.prototype.writeShort=function(pValue){this.out.writeByte(pValue&255);this.out.writeByte(pValue>>8&255)};GIFEncoder.prototype.writePixels=function(){var enc=new LZWEncoder(this.width,this.height,this.indexedPixels,this.colorDepth);enc.encode(this.out)};GIFEncoder.prototype.stream=function(){return this.out};module.exports=GIFEncoder},{"./LZWEncoder.js":2,"./TypedNeuQuant.js":3}],2:[function(require,module,exports){var EOF=-1;var BITS=12;var HSIZE=5003;var masks=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535];function LZWEncoder(width,height,pixels,colorDepth){var initCodeSize=Math.max(2,colorDepth);var accum=new Uint8Array(256);var htab=new Int32Array(HSIZE);var codetab=new Int32Array(HSIZE);var cur_accum,cur_bits=0;var a_count;var free_ent=0;var maxcode;var clear_flg=false;var g_init_bits,ClearCode,EOFCode;function char_out(c,outs){accum[a_count++]=c;if(a_count>=254)flush_char(outs)}function cl_block(outs){cl_hash(HSIZE);free_ent=ClearCode+2;clear_flg=true;output(ClearCode,outs)}function cl_hash(hsize){for(var i=0;i<hsize;++i)htab[i]=-1}function compress(init_bits,outs){var fcode,c,i,ent,disp,hsize_reg,hshift;g_init_bits=init_bits;clear_flg=false;n_bits=g_init_bits;maxcode=MAXCODE(n_bits);ClearCode=1<<init_bits-1;EOFCode=ClearCode+1;free_ent=ClearCode+2;a_count=0;ent=nextPixel();hshift=0;for(fcode=HSIZE;fcode<65536;fcode*=2)++hshift;hshift=8-hshift;hsize_reg=HSIZE;cl_hash(hsize_reg);output(ClearCode,outs);outer_loop:while((c=nextPixel())!=EOF){fcode=(c<<BITS)+ent;i=c<<hshift^ent;if(htab[i]===fcode){ent=codetab[i];continue}else if(htab[i]>=0){disp=hsize_reg-i;if(i===0)disp=1;do{if((i-=disp)<0)i+=hsize_reg;if(htab[i]===fcode){ent=codetab[i];continue outer_loop}}while(htab[i]>=0)}output(ent,outs);ent=c;if(free_ent<1<<BITS){codetab[i]=free_ent++;htab[i]=fcode}else{cl_block(outs)}}output(ent,outs);output(EOFCode,outs)}function encode(outs){outs.writeByte(initCodeSize);remaining=width*height;curPixel=0;compress(initCodeSize+1,outs);outs.writeByte(0)}function flush_char(outs){if(a_count>0){outs.writeByte(a_count);outs.writeBytes(accum,0,a_count);a_count=0}}function MAXCODE(n_bits){return(1<<n_bits)-1}function nextPixel(){if(remaining===0)return EOF;--remaining;var pix=pixels[curPixel++];return pix&255}function output(code,outs){cur_accum&=masks[cur_bits];if(cur_bits>0)cur_accum|=code<<cur_bits;else cur_accum=code;cur_bits+=n_bits;while(cur_bits>=8){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}if(free_ent>maxcode||clear_flg){if(clear_flg){maxcode=MAXCODE(n_bits=g_init_bits);clear_flg=false}else{++n_bits;if(n_bits==BITS)maxcode=1<<BITS;else maxcode=MAXCODE(n_bits)}}if(code==EOFCode){while(cur_bits>0){char_out(cur_accum&255,outs);cur_accum>>=8;cur_bits-=8}flush_char(outs)}}this.encode=encode}module.exports=LZWEncoder},{}],3:[function(require,module,exports){var ncycles=100;var netsize=256;var maxnetpos=netsize-1;var netbiasshift=4;var intbiasshift=16;var intbias=1<<intbiasshift;var gammashift=10;var gamma=1<<gammashift;var betashift=10;var beta=intbias>>betashift;var betagamma=intbias<<gammashift-betashift;var initrad=netsize>>3;var radiusbiasshift=6;var radiusbias=1<<radiusbiasshift;var initradius=initrad*radiusbias;var radiusdec=30;var alphabiasshift=10;var initalpha=1<<alphabiasshift;var alphadec;var radbiasshift=8;var radbias=1<<radbiasshift;var alpharadbshift=alphabiasshift+radbiasshift;var alpharadbias=1<<alpharadbshift;var prime1=499;var prime2=491;var prime3=487;var prime4=503;var minpicturebytes=3*prime4;function NeuQuant(pixels,samplefac){var network;var netindex;var bias;var freq;var radpower;function init(){network=[];netindex=new Int32Array(256);bias=new Int32Array(netsize);freq=new Int32Array(netsize);radpower=new Int32Array(netsize>>3);var i,v;for(i=0;i<netsize;i++){v=(i<<netbiasshift+8)/netsize;network[i]=new Float64Array([v,v,v,0]);freq[i]=intbias/netsize;bias[i]=0}}function unbiasnet(){for(var i=0;i<netsize;i++){network[i][0]>>=netbiasshift;network[i][1]>>=netbiasshift;network[i][2]>>=netbiasshift;network[i][3]=i}}function altersingle(alpha,i,b,g,r){network[i][0]-=alpha*(network[i][0]-b)/initalpha;network[i][1]-=alpha*(network[i][1]-g)/initalpha;network[i][2]-=alpha*(network[i][2]-r)/initalpha}function alterneigh(radius,i,b,g,r){var lo=Math.abs(i-radius);var hi=Math.min(i+radius,netsize);var j=i+1;var k=i-1;var m=1;var p,a;while(j<hi||k>lo){a=radpower[m++];if(j<hi){p=network[j++];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}if(k>lo){p=network[k--];p[0]-=a*(p[0]-b)/alpharadbias;p[1]-=a*(p[1]-g)/alpharadbias;p[2]-=a*(p[2]-r)/alpharadbias}}}function contest(b,g,r){var bestd=~(1<<31);var bestbiasd=bestd;var bestpos=-1;var bestbiaspos=bestpos;var i,n,dist,biasdist,betafreq;for(i=0;i<netsize;i++){n=network[i];dist=Math.abs(n[0]-b)+Math.abs(n[1]-g)+Math.abs(n[2]-r);if(dist<bestd){bestd=dist;bestpos=i}biasdist=dist-(bias[i]>>intbiasshift-netbiasshift);if(biasdist<bestbiasd){bestbiasd=biasdist;bestbiaspos=i}betafreq=freq[i]>>betashift;freq[i]-=betafreq;bias[i]+=betafreq<<gammashift}freq[bestpos]+=beta;bias[bestpos]-=betagamma;return bestbiaspos}function inxbuild(){var i,j,p,q,smallpos,smallval,previouscol=0,startpos=0;for(i=0;i<netsize;i++){p=network[i];smallpos=i;smallval=p[1];for(j=i+1;j<netsize;j++){q=network[j];if(q[1]<smallval){smallpos=j;smallval=q[1]}}q=network[smallpos];if(i!=smallpos){j=q[0];q[0]=p[0];p[0]=j;j=q[1];q[1]=p[1];p[1]=j;j=q[2];q[2]=p[2];p[2]=j;j=q[3];q[3]=p[3];p[3]=j}if(smallval!=previouscol){netindex[previouscol]=startpos+i>>1;for(j=previouscol+1;j<smallval;j++)netindex[j]=i;previouscol=smallval;startpos=i}}netindex[previouscol]=startpos+maxnetpos>>1;for(j=previouscol+1;j<256;j++)netindex[j]=maxnetpos}function inxsearch(b,g,r){var a,p,dist;var bestd=1e3;var best=-1;var i=netindex[g];var j=i-1;while(i<netsize||j>=0){if(i<netsize){p=network[i];dist=p[1]-g;if(dist>=bestd)i=netsize;else{i++;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}if(j>=0){p=network[j];dist=g-p[1];if(dist>=bestd)j=-1;else{j--;if(dist<0)dist=-dist;a=p[0]-b;if(a<0)a=-a;dist+=a;if(dist<bestd){a=p[2]-r;if(a<0)a=-a;dist+=a;if(dist<bestd){bestd=dist;best=p[3]}}}}}return best}function learn(){var i;var lengthcount=pixels.length;var alphadec=30+(samplefac-1)/3;var samplepixels=lengthcount/(3*samplefac);var delta=~~(samplepixels/ncycles);var alpha=initalpha;var radius=initradius;var rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(i=0;i<rad;i++)radpower[i]=alpha*((rad*rad-i*i)*radbias/(rad*rad));var step;if(lengthcount<minpicturebytes){samplefac=1;step=3}else if(lengthcount%prime1!==0){step=3*prime1}else if(lengthcount%prime2!==0){step=3*prime2}else if(lengthcount%prime3!==0){step=3*prime3}else{step=3*prime4}var b,g,r,j;var pix=0;i=0;while(i<samplepixels){b=(pixels[pix]&255)<<netbiasshift;g=(pixels[pix+1]&255)<<netbiasshift;r=(pixels[pix+2]&255)<<netbiasshift;j=contest(b,g,r);altersingle(alpha,j,b,g,r);if(rad!==0)alterneigh(rad,j,b,g,r);pix+=step;if(pix>=lengthcount)pix-=lengthcount;i++;if(delta===0)delta=1;if(i%delta===0){alpha-=alpha/alphadec;radius-=radius/radiusdec;rad=radius>>radiusbiasshift;if(rad<=1)rad=0;for(j=0;j<rad;j++)radpower[j]=alpha*((rad*rad-j*j)*radbias/(rad*rad))}}}function buildColormap(){init();learn();unbiasnet();inxbuild()}this.buildColormap=buildColormap;function getColormap(){var map=[];var index=[];for(var i=0;i<netsize;i++)index[network[i][3]]=i;var k=0;for(var l=0;l<netsize;l++){var j=index[l];map[k++]=network[j][0];map[k++]=network[j][1];map[k++]=network[j][2]}return map}this.getColormap=getColormap;this.lookupRGB=inxsearch}module.exports=NeuQuant},{}],4:[function(require,module,exports){var GIFEncoder,renderFrame;GIFEncoder=require("./GIFEncoder.js");renderFrame=function(frame){var encoder,page,stream,transfer;encoder=new GIFEncoder(frame.width,frame.height);if(frame.index===0){encoder.writeHeader()}else{encoder.firstFrame=false}encoder.setTransparent(frame.transparent);encoder.setRepeat(frame.repeat);encoder.setDelay(frame.delay);encoder.setQuality(frame.quality);encoder.setDither(frame.dither);encoder.setGlobalPalette(frame.globalPalette);encoder.addFrame(frame.data);if(frame.last){encoder.finish()}if(frame.globalPalette===true){frame.globalPalette=encoder.getGlobalPalette()}stream=encoder.stream();frame.data=stream.pages;frame.cursor=stream.cursor;frame.pageSize=stream.constructor.pageSize;if(frame.canTransfer){transfer=function(){var i,len,ref,results;ref=frame.data;results=[];for(i=0,len=ref.length;i<len;i++){page=ref[i];results.push(page.buffer)}return results}();return self.postMessage(frame,transfer)}else{return self.postMessage(frame)}};self.onmessage=function(event){return renderFrame(event.data)}},{"./GIFEncoder.js":1}]},{},[4]);
3
+ //# sourceMappingURL=gif.worker.js.map
@@ -11,6 +11,13 @@ function addMedia(BASE_API, params) {
11
11
  data: params
12
12
  });
13
13
  }
14
+ function reTranscodeMedia(BASE_API, media_id) {
15
+ return request(BASE_API, {
16
+ url: "/poplar/v3/attachment/re_transcoding",
17
+ method: "post",
18
+ data: { media_id }
19
+ });
20
+ }
14
21
  function useUpload() {
15
22
  const { get, set, remove } = useLocalstorage("LOCAL_RESOURCES");
16
23
  const list = ref(get() || []);
@@ -31,6 +38,7 @@ function useUpload() {
31
38
  progress !== -1 && (originList[taskIndex].progress = progress.toFixed(2));
32
39
  file.status != null && (originList[taskIndex].status = file.status);
33
40
  file.msg != null && (originList[taskIndex].msg = file.msg);
41
+ file.mediaFile && (originList[taskIndex].mediaFile = file.mediaFile);
34
42
  if (isTrans)
35
43
  originList[taskIndex].isTrans = true;
36
44
  originList[taskIndex].url = file.url;
@@ -123,21 +131,33 @@ function useUpload() {
123
131
  );
124
132
  }
125
133
  }).catch((e) => {
126
- console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u8F6C\u7801\u5931\u8D25", e);
134
+ console.log("\u{1F525}\u{1F525}\u{1F525}\u{1F525}\u{1F525} \u8F6C\u7801\u5931\u8D25", e, file);
127
135
  recordTaskStatusChange(
128
136
  { ...item, mediaFile: file, status: 3, msg: "\u8F6C\u7801\u5931\u8D25" },
129
137
  -1
130
138
  );
131
139
  });
132
140
  };
141
+ const reTranscode = async (BASE_API, file) => {
142
+ try {
143
+ const { code } = await reTranscodeMedia(BASE_API, file.id);
144
+ if (code !== 0)
145
+ return false;
146
+ return true;
147
+ } catch (e) {
148
+ console.log(e);
149
+ return false;
150
+ }
151
+ };
133
152
  watch(() => list.value, set, { deep: true });
134
153
  window.onbeforeunload = remove;
135
154
  return {
136
155
  list,
137
156
  uploadFile,
157
+ reTranscode,
138
158
  transcodingFile,
139
159
  recordTaskStatusChange,
140
160
  removeRecord
141
161
  };
142
162
  }
143
- export { addMedia, useUpload as default };
163
+ export { addMedia, useUpload as default, reTranscodeMedia };