pcm-agents 0.6.11 → 0.6.13

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 (292) hide show
  1. package/dist/cjs/error-event-J_ZWIqWF.js +33 -0
  2. package/dist/cjs/error-event-J_ZWIqWF.js.map +1 -0
  3. package/dist/cjs/{index-CvEfNyEj.js → index-CRlt8Nv6.js} +53 -3
  4. package/dist/cjs/index-CRlt8Nv6.js.map +1 -0
  5. package/dist/cjs/index-WNdOTXnX.js +11068 -0
  6. package/dist/cjs/index-WNdOTXnX.js.map +1 -0
  7. package/dist/cjs/index.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +3 -5
  9. package/dist/cjs/loader.cjs.js.map +1 -1
  10. package/dist/cjs/message.service-DGUsA-FY.js +135 -0
  11. package/dist/cjs/message.service-DGUsA-FY.js.map +1 -0
  12. package/dist/cjs/{pcm-1zhanshi-mnms-modal_17.cjs.entry.js → pcm-1zhanshi-mnms-modal_21.cjs.entry.js} +3276 -216
  13. package/dist/cjs/pcm-1zhanshi-mnms-modal_21.cjs.entry.js.map +1 -0
  14. package/dist/cjs/pcm-agents.cjs.js +4 -6
  15. package/dist/cjs/pcm-agents.cjs.js.map +1 -1
  16. package/dist/cjs/pcm-message.cjs.entry.js +3 -3
  17. package/dist/cjs/pcm-message.cjs.entry.js.map +1 -1
  18. package/dist/cjs/pcm-message.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js +8 -8
  20. package/dist/cjs/pcm-mnms-video-modal.cjs.entry.js.map +1 -1
  21. package/dist/cjs/pcm-mnms-video-modal.entry.cjs.js.map +1 -1
  22. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js +29 -86
  23. package/dist/cjs/pcm-mnms-zp-modal.cjs.entry.js.map +1 -1
  24. package/dist/cjs/pcm-mnms-zp-modal.entry.cjs.js.map +1 -1
  25. package/dist/cjs/{sentry-reporter-BWFtw_aT.js → sentry-reporter-tpI4WdkE.js} +12 -40
  26. package/dist/cjs/sentry-reporter-tpI4WdkE.js.map +1 -0
  27. package/dist/collection/collection-manifest.json +5 -1
  28. package/dist/collection/components/pcm-1zhanshi-mnms-modal/pcm-1zhanshi-mnms-modal.js.map +1 -1
  29. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.css +986 -986
  30. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js +7 -9
  31. package/dist/collection/components/pcm-app-chat-modal/pcm-app-chat-modal.js.map +1 -1
  32. package/dist/collection/components/pcm-button/pcm-button.css +199 -199
  33. package/dist/collection/components/pcm-button/pcm-button.js +6 -6
  34. package/dist/collection/components/pcm-button/pcm-button.js.map +1 -1
  35. package/dist/collection/components/pcm-card/pcm-card.css +259 -259
  36. package/dist/collection/components/pcm-card/pcm-card.js +1 -1
  37. package/dist/collection/components/pcm-card/pcm-card.js.map +1 -1
  38. package/dist/collection/components/pcm-chat-message/pcm-chat-message.css +554 -554
  39. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js +3 -3
  40. package/dist/collection/components/pcm-chat-message/pcm-chat-message.js.map +1 -1
  41. package/dist/collection/components/pcm-drawer/pcm-drawer.css +102 -102
  42. package/dist/collection/components/pcm-drawer/pcm-drawer.js +1 -1
  43. package/dist/collection/components/pcm-drawer/pcm-drawer.js.map +1 -1
  44. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.css +854 -854
  45. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js +5 -7
  46. package/dist/collection/components/pcm-hr-chat-modal/pcm-hr-chat-modal.js.map +1 -1
  47. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.css +95 -95
  48. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js +1 -1
  49. package/dist/collection/components/pcm-htws-modal/pcm-htws-modal.js.map +1 -1
  50. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js +2 -2
  51. package/dist/collection/components/pcm-hyzj-modal/pcm-hyzj-modal.js.map +1 -1
  52. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.css +312 -312
  53. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js +1 -1
  54. package/dist/collection/components/pcm-jd-modal/pcm-jd-modal.js.map +1 -1
  55. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js +2 -2
  56. package/dist/collection/components/pcm-jlpp-modal/pcm-jlpp-modal.js.map +1 -1
  57. package/dist/collection/components/pcm-message/pcm-message.css +64 -64
  58. package/dist/collection/components/pcm-message/pcm-message.js +2 -2
  59. package/dist/collection/components/pcm-message/pcm-message.js.map +1 -1
  60. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.css +1 -1
  61. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js +2 -2
  62. package/dist/collection/components/pcm-mnct-modal/pcm-mnct-modal.js.map +1 -1
  63. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js +67 -84
  64. package/dist/collection/components/pcm-mnms-modal/pcm-mnms-modal.js.map +1 -1
  65. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js +2 -2
  66. package/dist/collection/components/pcm-mnms-video-modal/pcm-mnms-video-modal.js.map +1 -1
  67. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js +67 -84
  68. package/dist/collection/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.js.map +1 -1
  69. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.css +140 -0
  70. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js +307 -0
  71. package/dist/collection/components/pcm-mobile-input-btn/pcm-mobile-input-btn.js.map +1 -0
  72. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js +25 -0
  73. package/dist/collection/components/pcm-mobile-input-btn/uploadNumberSDK.js.map +1 -0
  74. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.css +127 -0
  75. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js +350 -0
  76. package/dist/collection/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.js.map +1 -0
  77. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js +25 -0
  78. package/dist/collection/components/pcm-mobile-upload-btn/uploadNumberSDK.js.map +1 -0
  79. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js +2 -2
  80. package/dist/collection/components/pcm-msbg-modal/pcm-msbg-modal.js.map +1 -1
  81. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.css +1 -1
  82. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js +2 -2
  83. package/dist/collection/components/pcm-qgqjl-modal/pcm-qgqjl-modal.js.map +1 -1
  84. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.css +0 -0
  85. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js +106 -0
  86. package/dist/collection/components/pcm-time-count-down/pcm-time-count-down.js.map +1 -0
  87. package/dist/collection/components/pcm-upload/pcm-upload.css +0 -0
  88. package/dist/collection/components/pcm-upload/pcm-upload.js +408 -0
  89. package/dist/collection/components/pcm-upload/pcm-upload.js.map +1 -0
  90. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.css +969 -969
  91. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js +3 -5
  92. package/dist/collection/components/pcm-zsk-chat-modal/pcm-zsk-chat-modal.js.map +1 -1
  93. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.css +68 -68
  94. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js +4 -4
  95. package/dist/collection/components/pcm-zygh-modal/pcm-zygh-modal.js.map +1 -1
  96. package/dist/collection/global/global.css +401 -398
  97. package/dist/collection/global/markdown.css +1233 -1233
  98. package/dist/collection/global/message.js.map +1 -1
  99. package/dist/collection/index.js.map +1 -1
  100. package/dist/collection/interfaces/chat.js.map +1 -1
  101. package/dist/collection/interfaces/events.js.map +1 -1
  102. package/dist/collection/services/message.service.js.map +1 -1
  103. package/dist/collection/utils/env.js +3 -0
  104. package/dist/collection/utils/env.js.map +1 -1
  105. package/dist/collection/utils/error-event.js.map +1 -1
  106. package/dist/collection/utils/init.js.map +1 -1
  107. package/dist/collection/utils/sentry-reporter.js.map +1 -1
  108. package/dist/collection/utils/utils.js +48 -24
  109. package/dist/collection/utils/utils.js.map +1 -1
  110. package/dist/components/index.js +3 -5482
  111. package/dist/components/index.js.map +1 -1
  112. package/dist/components/{p-AYWZDCn8.js → p-B0WOTw9J.js} +51 -4
  113. package/dist/components/p-B0WOTw9J.js.map +1 -0
  114. package/dist/components/{p-DUQ46MUh.js → p-BGXbWUJg.js} +3 -3
  115. package/dist/components/{p-DUQ46MUh.js.map → p-BGXbWUJg.js.map} +1 -1
  116. package/dist/{esm/sentry-reporter-BFBS363a.js → components/p-BW3r6Lrf.js} +5 -32
  117. package/dist/components/p-BW3r6Lrf.js.map +1 -0
  118. package/dist/{esm/app-globals-Chti62re.js → components/p-BdiUKin5.js} +9619 -4296
  119. package/dist/components/p-BdiUKin5.js.map +1 -0
  120. package/dist/components/{p-FjtoYPVY.js → p-BywzltXy.js} +10 -9
  121. package/dist/components/p-BywzltXy.js.map +1 -0
  122. package/dist/components/p-C2OsjtRx.js +208 -0
  123. package/dist/components/p-C2OsjtRx.js.map +1 -0
  124. package/dist/components/{p-D2Z8casl.js → p-CuIvbaWY.js} +5 -5
  125. package/dist/components/p-CuIvbaWY.js.map +1 -0
  126. package/dist/components/p-D0ZMoyH8.js +251 -0
  127. package/dist/components/p-D0ZMoyH8.js.map +1 -0
  128. package/dist/components/{p-CjbFHLT7.js → p-De3VHEUn.js} +7 -71
  129. package/dist/components/p-De3VHEUn.js.map +1 -0
  130. package/dist/components/p-Dv8qvK0w.js +2646 -0
  131. package/dist/components/p-Dv8qvK0w.js.map +1 -0
  132. package/dist/components/p-RD3mwuBX.js +226 -0
  133. package/dist/components/p-RD3mwuBX.js.map +1 -0
  134. package/dist/components/p-njngFX_n.js +80 -0
  135. package/dist/components/p-njngFX_n.js.map +1 -0
  136. package/dist/components/pcm-1zhanshi-mnms-modal.js +7 -7
  137. package/dist/components/pcm-1zhanshi-mnms-modal.js.map +1 -1
  138. package/dist/components/pcm-app-chat-modal.js +1 -1
  139. package/dist/components/pcm-button.js +2 -2
  140. package/dist/components/pcm-button.js.map +1 -1
  141. package/dist/components/pcm-card.js +3 -3
  142. package/dist/components/pcm-card.js.map +1 -1
  143. package/dist/components/pcm-chat-message.js +1 -1
  144. package/dist/components/pcm-drawer.js +1 -1
  145. package/dist/components/pcm-hr-chat-modal.js +5 -4
  146. package/dist/components/pcm-hr-chat-modal.js.map +1 -1
  147. package/dist/components/pcm-htws-modal.js +8 -7
  148. package/dist/components/pcm-htws-modal.js.map +1 -1
  149. package/dist/components/pcm-hyzj-modal.js +8 -7
  150. package/dist/components/pcm-hyzj-modal.js.map +1 -1
  151. package/dist/components/pcm-jd-modal.js +8 -7
  152. package/dist/components/pcm-jd-modal.js.map +1 -1
  153. package/dist/components/pcm-jlpp-modal.js +8 -7
  154. package/dist/components/pcm-jlpp-modal.js.map +1 -1
  155. package/dist/components/pcm-message.js +3 -3
  156. package/dist/components/pcm-message.js.map +1 -1
  157. package/dist/components/pcm-mnct-modal.js +8 -7
  158. package/dist/components/pcm-mnct-modal.js.map +1 -1
  159. package/dist/components/pcm-mnms-modal.js +60 -90
  160. package/dist/components/pcm-mnms-modal.js.map +1 -1
  161. package/dist/components/pcm-mnms-video-modal.js +8 -7
  162. package/dist/components/pcm-mnms-video-modal.js.map +1 -1
  163. package/dist/components/pcm-mnms-zp-modal.js +60 -90
  164. package/dist/components/pcm-mnms-zp-modal.js.map +1 -1
  165. package/dist/components/pcm-mobile-input-btn.d.ts +11 -0
  166. package/dist/components/pcm-mobile-input-btn.js +9 -0
  167. package/dist/components/pcm-mobile-input-btn.js.map +1 -0
  168. package/dist/components/pcm-mobile-upload-btn.d.ts +11 -0
  169. package/dist/components/pcm-mobile-upload-btn.js +9 -0
  170. package/dist/components/pcm-mobile-upload-btn.js.map +1 -0
  171. package/dist/components/pcm-msbg-modal.js +8 -7
  172. package/dist/components/pcm-msbg-modal.js.map +1 -1
  173. package/dist/components/pcm-qgqjl-modal.js +8 -7
  174. package/dist/components/pcm-qgqjl-modal.js.map +1 -1
  175. package/dist/components/pcm-time-count-down.d.ts +11 -0
  176. package/dist/components/pcm-time-count-down.js +9 -0
  177. package/dist/components/pcm-time-count-down.js.map +1 -0
  178. package/dist/components/pcm-upload.d.ts +11 -0
  179. package/dist/components/pcm-upload.js +9 -0
  180. package/dist/components/pcm-upload.js.map +1 -0
  181. package/dist/components/pcm-zsk-chat-modal.js +4 -4
  182. package/dist/components/pcm-zsk-chat-modal.js.map +1 -1
  183. package/dist/components/pcm-zygh-modal.js +8 -7
  184. package/dist/components/pcm-zygh-modal.js.map +1 -1
  185. package/dist/esm/error-event-C0FYX2-Z.js +31 -0
  186. package/dist/esm/error-event-C0FYX2-Z.js.map +1 -0
  187. package/dist/esm/{index-GyOE8SlD.js → index-BnNqOUZf.js} +51 -4
  188. package/dist/esm/index-BnNqOUZf.js.map +1 -0
  189. package/dist/esm/index-BuVfV0zo.js +11035 -0
  190. package/dist/esm/index-BuVfV0zo.js.map +1 -0
  191. package/dist/esm/index.js +2 -2
  192. package/dist/esm/loader.js +3 -5
  193. package/dist/esm/loader.js.map +1 -1
  194. package/dist/esm/message.service-DXVhHj6-.js +133 -0
  195. package/dist/esm/message.service-DXVhHj6-.js.map +1 -0
  196. package/dist/esm/{pcm-1zhanshi-mnms-modal_17.entry.js → pcm-1zhanshi-mnms-modal_21.entry.js} +3225 -169
  197. package/dist/esm/pcm-1zhanshi-mnms-modal_21.entry.js.map +1 -0
  198. package/dist/esm/pcm-agents.js +4 -6
  199. package/dist/esm/pcm-agents.js.map +1 -1
  200. package/dist/esm/pcm-message.entry.js +3 -3
  201. package/dist/esm/pcm-message.entry.js.map +1 -1
  202. package/dist/esm/pcm-mnms-video-modal.entry.js +5 -5
  203. package/dist/esm/pcm-mnms-video-modal.entry.js.map +1 -1
  204. package/dist/esm/pcm-mnms-zp-modal.entry.js +28 -85
  205. package/dist/esm/pcm-mnms-zp-modal.entry.js.map +1 -1
  206. package/dist/esm/sentry-reporter-CYzy4_8O.js +70 -0
  207. package/dist/esm/sentry-reporter-CYzy4_8O.js.map +1 -0
  208. package/dist/pcm-agents/index.esm.js +1 -1
  209. package/dist/pcm-agents/loader.esm.js.map +1 -1
  210. package/dist/pcm-agents/p-18a06873.entry.js +2 -0
  211. package/dist/pcm-agents/p-18a06873.entry.js.map +1 -0
  212. package/dist/pcm-agents/p-47e2e1d0.entry.js +2 -0
  213. package/dist/pcm-agents/p-47e2e1d0.entry.js.map +1 -0
  214. package/dist/pcm-agents/{p-3608c0c6.entry.js → p-7a582f00.entry.js} +2 -2
  215. package/dist/pcm-agents/p-7a582f00.entry.js.map +1 -0
  216. package/dist/pcm-agents/p-BhFnI70g.js +2 -0
  217. package/dist/pcm-agents/p-BhFnI70g.js.map +1 -0
  218. package/dist/pcm-agents/p-BuVfV0zo.js +3 -0
  219. package/dist/pcm-agents/p-BuVfV0zo.js.map +1 -0
  220. package/dist/pcm-agents/p-C0FYX2-Z.js +2 -0
  221. package/dist/pcm-agents/p-C0FYX2-Z.js.map +1 -0
  222. package/dist/pcm-agents/p-DXVhHj6-.js +2 -0
  223. package/dist/pcm-agents/p-DXVhHj6-.js.map +1 -0
  224. package/dist/pcm-agents/p-DkeaAFic.js +2 -0
  225. package/dist/pcm-agents/p-DkeaAFic.js.map +1 -0
  226. package/dist/pcm-agents/p-f5f96853.entry.js +245 -0
  227. package/dist/pcm-agents/p-f5f96853.entry.js.map +1 -0
  228. package/dist/pcm-agents/pcm-agents.esm.js +1 -1
  229. package/dist/pcm-agents/pcm-agents.esm.js.map +1 -1
  230. package/dist/pcm-agents/pcm-message.entry.esm.js.map +1 -1
  231. package/dist/pcm-agents/pcm-mnms-video-modal.entry.esm.js.map +1 -1
  232. package/dist/pcm-agents/pcm-mnms-zp-modal.entry.esm.js.map +1 -1
  233. package/dist/store/auth.store.js.map +1 -1
  234. package/dist/store/config.store.js.map +1 -1
  235. package/dist/types/components/pcm-mnms-modal/pcm-mnms-modal.d.ts +9 -4
  236. package/dist/types/components/pcm-mnms-zp-modal/pcm-mnms-zp-modal.d.ts +9 -4
  237. package/dist/types/components/pcm-mobile-input-btn/pcm-mobile-input-btn.d.ts +36 -0
  238. package/dist/types/components/pcm-mobile-input-btn/uploadNumberSDK.d.ts +9 -0
  239. package/dist/types/components/pcm-mobile-upload-btn/pcm-mobile-upload-btn.d.ts +44 -0
  240. package/dist/types/components/pcm-mobile-upload-btn/uploadNumberSDK.d.ts +9 -0
  241. package/dist/types/components/pcm-time-count-down/pcm-time-count-down.d.ts +15 -0
  242. package/dist/types/components/pcm-upload/pcm-upload.d.ts +54 -0
  243. package/dist/types/components/pcm-upload/type.d.ts +4 -0
  244. package/dist/types/components.d.ts +798 -30
  245. package/dist/types/stencil-public-runtime.d.ts +1 -1
  246. package/dist/types/utils/env.d.ts +2 -0
  247. package/dist/types/utils/utils.d.ts +30 -12
  248. package/package.json +70 -69
  249. package/dist/cjs/app-globals-BIO4q6tX.js +0 -5487
  250. package/dist/cjs/app-globals-BIO4q6tX.js.map +0 -1
  251. package/dist/cjs/exports-Dc-pQh4A.js +0 -4087
  252. package/dist/cjs/exports-Dc-pQh4A.js.map +0 -1
  253. package/dist/cjs/index-C_qhED9Z.js +0 -1538
  254. package/dist/cjs/index-C_qhED9Z.js.map +0 -1
  255. package/dist/cjs/index-CvEfNyEj.js.map +0 -1
  256. package/dist/cjs/pcm-1zhanshi-mnms-modal_17.cjs.entry.js.map +0 -1
  257. package/dist/cjs/sentry-reporter-BWFtw_aT.js.map +0 -1
  258. package/dist/components/p-75J0r72D.js +0 -4017
  259. package/dist/components/p-75J0r72D.js.map +0 -1
  260. package/dist/components/p-AYWZDCn8.js.map +0 -1
  261. package/dist/components/p-CR7WLzmM.js +0 -1303
  262. package/dist/components/p-CR7WLzmM.js.map +0 -1
  263. package/dist/components/p-CjbFHLT7.js.map +0 -1
  264. package/dist/components/p-D2Z8casl.js.map +0 -1
  265. package/dist/components/p-FjtoYPVY.js.map +0 -1
  266. package/dist/esm/app-globals-Chti62re.js.map +0 -1
  267. package/dist/esm/exports-Bs-zO1WZ.js +0 -4017
  268. package/dist/esm/exports-Bs-zO1WZ.js.map +0 -1
  269. package/dist/esm/index-Bq0K-WqZ.js +0 -1528
  270. package/dist/esm/index-Bq0K-WqZ.js.map +0 -1
  271. package/dist/esm/index-GyOE8SlD.js.map +0 -1
  272. package/dist/esm/pcm-1zhanshi-mnms-modal_17.entry.js.map +0 -1
  273. package/dist/esm/sentry-reporter-BFBS363a.js.map +0 -1
  274. package/dist/pcm-agents/p-2Gpw8rvH.js +0 -2
  275. package/dist/pcm-agents/p-2Gpw8rvH.js.map +0 -1
  276. package/dist/pcm-agents/p-3608c0c6.entry.js.map +0 -1
  277. package/dist/pcm-agents/p-60d7a0b0.entry.js +0 -2
  278. package/dist/pcm-agents/p-60d7a0b0.entry.js.map +0 -1
  279. package/dist/pcm-agents/p-9e6efc2d.entry.js +0 -2
  280. package/dist/pcm-agents/p-9e6efc2d.entry.js.map +0 -1
  281. package/dist/pcm-agents/p-BUV0S8Cc.js +0 -2
  282. package/dist/pcm-agents/p-BUV0S8Cc.js.map +0 -1
  283. package/dist/pcm-agents/p-Bq0K-WqZ.js +0 -3
  284. package/dist/pcm-agents/p-Bq0K-WqZ.js.map +0 -1
  285. package/dist/pcm-agents/p-Bs-zO1WZ.js +0 -2
  286. package/dist/pcm-agents/p-Bs-zO1WZ.js.map +0 -1
  287. package/dist/pcm-agents/p-CeRTfvY9.js +0 -2
  288. package/dist/pcm-agents/p-CeRTfvY9.js.map +0 -1
  289. package/dist/pcm-agents/p-e6c87a78.entry.js +0 -2
  290. package/dist/pcm-agents/p-e6c87a78.entry.js.map +0 -1
  291. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/auth.store.d.ts +0 -0
  292. /package/dist/types/{code/agents-sdk → Users/debugksir/Documents/pcm/sdk}/packages/pcm-agents/.stencil/store/config.store.d.ts +0 -0
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C_qhED9Z.js');
4
- var index$1 = require('./index-CvEfNyEj.js');
5
- var sentryReporter = require('./sentry-reporter-BWFtw_aT.js');
6
- require('./exports-Dc-pQh4A.js');
3
+ var index = require('./index-WNdOTXnX.js');
4
+ var index$1 = require('./index-CRlt8Nv6.js');
5
+ var errorEvent = require('./error-event-J_ZWIqWF.js');
6
+ var sentryReporter = require('./sentry-reporter-tpI4WdkE.js');
7
+ var message_service = require('./message.service-DGUsA-FY.js');
7
8
 
8
9
  const pcm1zhanshiMnmsModalCss = "";
9
10
 
10
- const globalCss$9 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11
+ const globalCss$d = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11
12
 
12
13
  const ZhanshiMnmsModal = class {
13
14
  constructor(hostRef) {
@@ -129,7 +130,7 @@ const ZhanshiMnmsModal = class {
129
130
  this.tokenInvalid.emit();
130
131
  };
131
132
  // 添加全局错误监听
132
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
133
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
133
134
  this.someErrorEvent.emit(errorDetail);
134
135
  });
135
136
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -184,7 +185,7 @@ const ZhanshiMnmsModal = class {
184
185
  "isOpen": ["handleIsOpenChange"]
185
186
  }; }
186
187
  };
187
- ZhanshiMnmsModal.style = pcm1zhanshiMnmsModalCss + globalCss$9;
188
+ ZhanshiMnmsModal.style = pcm1zhanshiMnmsModalCss + globalCss$d;
188
189
 
189
190
  /**
190
191
  * marked v9.1.6 - a markdown parser
@@ -2869,7 +2870,7 @@ const ChatAPPModal = class {
2869
2870
  component: 'pcm-app-chat-modal',
2870
2871
  title: '获取智能体信息失败'
2871
2872
  });
2872
- sentryReporter.ErrorEventBus.emitError({
2873
+ errorEvent.ErrorEventBus.emitError({
2873
2874
  error: error,
2874
2875
  message: '获取智能体信息失败'
2875
2876
  });
@@ -2992,7 +2993,7 @@ const ChatAPPModal = class {
2992
2993
  },
2993
2994
  onError: (error) => {
2994
2995
  console.error('发生错误:', error);
2995
- sentryReporter.ErrorEventBus.emitError({
2996
+ errorEvent.ErrorEventBus.emitError({
2996
2997
  error: error,
2997
2998
  message: '消息发送失败,请稍后再试'
2998
2999
  });
@@ -3170,7 +3171,7 @@ const ChatAPPModal = class {
3170
3171
  component: 'pcm-app-chat-modal',
3171
3172
  title: '加载历史消息失败'
3172
3173
  });
3173
- sentryReporter.ErrorEventBus.emitError({
3174
+ errorEvent.ErrorEventBus.emitError({
3174
3175
  error: error,
3175
3176
  message: '加载历史消息失败,请刷新重试'
3176
3177
  });
@@ -3417,7 +3418,7 @@ const ChatAPPModal = class {
3417
3418
  }
3418
3419
  this.deviceError = errorMessage;
3419
3420
  this.showRecordingUI = false;
3420
- sentryReporter.ErrorEventBus.emitError({
3421
+ errorEvent.ErrorEventBus.emitError({
3421
3422
  error: error,
3422
3423
  message: errorMessage
3423
3424
  });
@@ -3444,7 +3445,7 @@ const ChatAPPModal = class {
3444
3445
  component: 'pcm-app-chat-modal',
3445
3446
  title: '视频播放失败'
3446
3447
  });
3447
- sentryReporter.ErrorEventBus.emitError({
3448
+ errorEvent.ErrorEventBus.emitError({
3448
3449
  error: err,
3449
3450
  message: '视频播放失败'
3450
3451
  });
@@ -3469,7 +3470,7 @@ const ChatAPPModal = class {
3469
3470
  component: 'pcm-app-chat-modal',
3470
3471
  title: '创建对象URL失败'
3471
3472
  });
3472
- sentryReporter.ErrorEventBus.emitError({
3473
+ errorEvent.ErrorEventBus.emitError({
3473
3474
  error: urlError,
3474
3475
  message: '创建对象URL失败'
3475
3476
  });
@@ -3533,7 +3534,7 @@ const ChatAPPModal = class {
3533
3534
  this.videoRef = null;
3534
3535
  }
3535
3536
  }
3536
- // 修改音频转文字方法
3537
+ // 修改音视频转文字方法
3537
3538
  async convertAudioToText(cosKey) {
3538
3539
  try {
3539
3540
  const result = await index$1.sendHttpRequest({
@@ -3558,7 +3559,7 @@ const ChatAPPModal = class {
3558
3559
  component: 'pcm-app-chat-modal',
3559
3560
  title: '音频转文字错误'
3560
3561
  });
3561
- sentryReporter.ErrorEventBus.emitError({
3562
+ errorEvent.ErrorEventBus.emitError({
3562
3563
  error: error,
3563
3564
  message: '音频转文字错误'
3564
3565
  });
@@ -3594,7 +3595,7 @@ const ChatAPPModal = class {
3594
3595
  component: 'pcm-app-chat-modal',
3595
3596
  title: '视频上传或处理失败'
3596
3597
  });
3597
- sentryReporter.ErrorEventBus.emitError({
3598
+ errorEvent.ErrorEventBus.emitError({
3598
3599
  error: error,
3599
3600
  message: '视频上传或处理失败'
3600
3601
  });
@@ -3624,7 +3625,7 @@ const ChatAPPModal = class {
3624
3625
  console.error('音频播放错误');
3625
3626
  this.isPlayingAudio = false;
3626
3627
  this.audioUrl = null;
3627
- sentryReporter.ErrorEventBus.emitError({
3628
+ errorEvent.ErrorEventBus.emitError({
3628
3629
  error: '音频播放错误',
3629
3630
  message: '音频播放错误'
3630
3631
  });
@@ -3639,7 +3640,7 @@ const ChatAPPModal = class {
3639
3640
  console.error('音频播放失败:', error);
3640
3641
  this.isPlayingAudio = false;
3641
3642
  this.audioUrl = null;
3642
- sentryReporter.ErrorEventBus.emitError({
3643
+ errorEvent.ErrorEventBus.emitError({
3643
3644
  error: error,
3644
3645
  message: '音频播放失败'
3645
3646
  });
@@ -3754,7 +3755,7 @@ const ChatAPPModal = class {
3754
3755
  component: 'pcm-app-chat-modal',
3755
3756
  title: '提交文本回答失败'
3756
3757
  });
3757
- sentryReporter.ErrorEventBus.emitError({
3758
+ errorEvent.ErrorEventBus.emitError({
3758
3759
  error: error,
3759
3760
  message: '提交文本回答失败'
3760
3761
  });
@@ -3783,7 +3784,7 @@ const ChatAPPModal = class {
3783
3784
  component: 'pcm-app-chat-modal',
3784
3785
  title: '麦克风权限请求失败'
3785
3786
  });
3786
- sentryReporter.ErrorEventBus.emitError({
3787
+ errorEvent.ErrorEventBus.emitError({
3787
3788
  error: error,
3788
3789
  message: '麦克风权限请求失败'
3789
3790
  });
@@ -3816,7 +3817,7 @@ const ChatAPPModal = class {
3816
3817
  component: 'pcm-app-chat-modal',
3817
3818
  title: '无法创建音频录制器'
3818
3819
  });
3819
- sentryReporter.ErrorEventBus.emitError({
3820
+ errorEvent.ErrorEventBus.emitError({
3820
3821
  error: recorderError,
3821
3822
  message: '无法创建音频录制器'
3822
3823
  });
@@ -3862,7 +3863,7 @@ const ChatAPPModal = class {
3862
3863
  component: 'pcm-app-chat-modal',
3863
3864
  title: '开始录音失败'
3864
3865
  });
3865
- sentryReporter.ErrorEventBus.emitError({
3866
+ errorEvent.ErrorEventBus.emitError({
3866
3867
  error: error,
3867
3868
  message: '开始录音失败,请确保麦克风设备正常工作'
3868
3869
  });
@@ -3927,7 +3928,7 @@ const ChatAPPModal = class {
3927
3928
  component: 'pcm-app-chat-modal',
3928
3929
  title: '处理音频录制失败'
3929
3930
  });
3930
- sentryReporter.ErrorEventBus.emitError({
3931
+ errorEvent.ErrorEventBus.emitError({
3931
3932
  error: error,
3932
3933
  message: '语音识别失败,请重试'
3933
3934
  });
@@ -4077,7 +4078,7 @@ const ChatAPPModal = class {
4077
4078
  component: 'pcm-app-chat-modal',
4078
4079
  title: '获取历史会话失败'
4079
4080
  });
4080
- sentryReporter.ErrorEventBus.emitError({
4081
+ errorEvent.ErrorEventBus.emitError({
4081
4082
  error: error,
4082
4083
  message: '获取历史会话失败'
4083
4084
  });
@@ -4195,7 +4196,7 @@ const ChatAPPModal = class {
4195
4196
  this.isDrawerOpen = false;
4196
4197
  this.previewUrl = '';
4197
4198
  this.previewContent = '';
4198
- } }, this.previewContentType === 'file' && this.previewUrl && (index.h("div", { class: "file-preview-container" }, index.h("iframe", { src: this.previewUrl, frameborder: "0", width: "100%", height: "100%", style: { border: 'none', height: 'calc(100vh - 120px)' } }))), this.previewContentType === 'markdown' && this.previewContent && (index.h("div", { class: "markdown-preview-container markdown-body", innerHTML: marked(this.previewContent) })), this.previewContentType === 'text' && this.previewContent && (index.h("div", { class: "text-preview-container" }, index.h("pre", null, this.previewContent)))), index.h("pcm-drawer", { isOpen: this.isHistoryDrawerOpen, drawerTitle: "\u5386\u53F2\u4F1A\u8BDD", width: "400px", onClosed: () => {
4199
+ } }, this.previewContentType === 'file' && this.previewUrl && (index.h("div", { class: "file-preview-container" }, index.h("iframe", { src: this.previewUrl, frameborder: "0", width: "100%", height: "100%", style: { border: 'none', height: 'calc(100vh - 120px)' } }))), this.previewContentType === 'markdown' && this.previewContent && (index.h("div", { class: "markdown-preview-container markdown-body", innerHTML: marked(this.previewContent) })), this.previewContentType === 'text' && this.previewContent && (index.h("div", { class: "text-preview-container" }, index.h("pre", { style: { whiteSpace: 'pre-wrap', wordWrap: 'break-word' } }, this.previewContent)))), index.h("pcm-drawer", { isOpen: this.isHistoryDrawerOpen, drawerTitle: "\u5386\u53F2\u4F1A\u8BDD", width: "400px", onClosed: () => {
4199
4200
  this.isHistoryDrawerOpen = false;
4200
4201
  } }, index.h("div", { class: "history-drawer-content" }, index.h("div", { class: "conversation-list" }, this.isLoadingConversations ? (index.h("div", { class: "loading-conversations" }, index.h("div", { class: "loading-spinner-small" }), index.h("p", null, "\u52A0\u8F7D\u4E2D..."))) : this.historyConversations.length === 0 ? (index.h("div", { class: "empty-conversations" }, index.h("p", null, "\u6682\u65E0\u5386\u53F2\u4F1A\u8BDD"))) : (this.historyConversations.map((conversation) => (index.h("div", { key: conversation.id, class: {
4201
4202
  'conversation-item': true,
@@ -4306,7 +4307,7 @@ const PcmButton = class {
4306
4307
  if (this.borderStyle) {
4307
4308
  customStyle['borderStyle'] = this.borderStyle;
4308
4309
  }
4309
- return (index.h("button", { key: 'f8105a4e08d60af62e77185726b2d67f8378ad2a', class: Object.keys(classes).filter(key => classes[key]).join(' '), style: customStyle, disabled: this.disabled, type: "button" }, this.loading && (index.h("span", { key: '713aaf3ed2e05e933e3813128146cad481179055', class: "loading-icon" })), this.icon && !this.loading && (index.h("span", { key: 'f680ccc5a0481c8c2eddaef84497475426eba8fb', class: "button-icon" }, index.h("img", { key: '888b1a7ba7427a91f4c53732ba4583e3cc68fbe5', src: this.icon, alt: "" }))), index.h("slot", { key: '1ee6ce028c10949dd2d0bc761c52b9e01d8fc673' })));
4310
+ return (index.h("button", { key: '370d4d7a0676a5d6abdeec7c14b3d15ba3ce9410', class: Object.keys(classes).filter(key => classes[key]).join(' '), style: customStyle, disabled: this.disabled, type: "button" }, this.loading && (index.h("span", { key: 'c9624a3e95ffb9a325fd3b606689b9176e82930c', class: "loading-icon" })), this.icon && !this.loading && (index.h("span", { key: 'd2061865c930901f83b0ffc2adc535c13a8c6220', class: "button-icon" }, index.h("img", { key: '63a726785f5ffe74283915bd69b26a8552c1a593', src: this.icon, alt: "" }))), index.h("slot", { key: 'e57fecba739bce61f48ffc18c052a5b5923e63d5' })));
4310
4311
  }
4311
4312
  };
4312
4313
  PcmButton.style = pcmButtonCss;
@@ -4451,7 +4452,7 @@ const PcmCard = class {
4451
4452
  const starsCount = this.botData?.follow_count || 0;
4452
4453
  const usageCount = this.botData?.view_count || 0;
4453
4454
 
4454
- return (index.h("div", { key: '686774ebe2a5e2942c7e41d73a9fd8ae8e427f5d', class: "card-container" }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("div", null, "\u52A0\u8F7D\u4E2D..."))) : this.error ? (index.h("div", { class: "error-container" }, index.h("div", { class: "error-icon" }, "!"), index.h("div", { class: "error-message" }, this.error))) : (index.h("div", null, index.h("div", { class: "card-header" }, icon && (index.h("div", { class: "card-icon" }, index.h("img", { src: icon, alt: title }))), index.h("div", { class: "card-info" }, index.h("div", { class: "title-row" }, index.h("div", { class: "title-wrapper" }, index.h("div", { class: "card-title" }, title)), this.showChatTag && hasChatTag && index.h("div", { class: "chat-tag" }, hasChatTag)), authorName && (index.h("div", { class: "author-row" }, authorAvatar && (index.h("img", { class: "author-avatar", src: authorAvatar, alt: authorName })), index.h("div", { class: "author-name" }, authorName))), desc && (index.h("div", { class: "card-description" }, desc)))), index.h("div", { class: "card-footer" }, index.h("div", { class: "stats-container" }, index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon user-icon" }), index.h("div", { class: "stat-value" }, usersCount)), index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon star-icon" }), index.h("div", { class: "stat-value" }, starsCount)), index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon video-icon" }), index.h("div", { class: "stat-value" }, usageCount))), index.h("div", { class: "use-button" }, this.useButtonText || '立即使用'))))));
4455
+ return (index.h("div", { key: '97827af60487bae41aeb80fcea46d8e2dd4b072a', class: "card-container" }, this.loading ? (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("div", null, "\u52A0\u8F7D\u4E2D..."))) : this.error ? (index.h("div", { class: "error-container" }, index.h("div", { class: "error-icon" }, "!"), index.h("div", { class: "error-message" }, this.error))) : (index.h("div", null, index.h("div", { class: "card-header" }, icon && (index.h("div", { class: "card-icon" }, index.h("img", { src: icon, alt: title }))), index.h("div", { class: "card-info" }, index.h("div", { class: "title-row" }, index.h("div", { class: "title-wrapper" }, index.h("div", { class: "card-title" }, title)), this.showChatTag && hasChatTag && index.h("div", { class: "chat-tag" }, hasChatTag)), authorName && (index.h("div", { class: "author-row" }, authorAvatar && (index.h("img", { class: "author-avatar", src: authorAvatar, alt: authorName })), index.h("div", { class: "author-name" }, authorName))), desc && (index.h("div", { class: "card-description" }, desc)))), index.h("div", { class: "card-footer" }, index.h("div", { class: "stats-container" }, index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon user-icon" }), index.h("div", { class: "stat-value" }, usersCount)), index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon star-icon" }), index.h("div", { class: "stat-value" }, starsCount)), index.h("div", { class: "stat-item" }, index.h("span", { class: "stat-icon video-icon" }), index.h("div", { class: "stat-value" }, usageCount))), index.h("div", { class: "use-button" }, this.useButtonText || '立即使用'))))));
4455
4456
  }
4456
4457
  static get watchers() { return {
4457
4458
  "botId": ["watchBotIdHandler"],
@@ -4781,7 +4782,7 @@ const ChatMessageComponent = class {
4781
4782
  })
4782
4783
  .catch(err => {
4783
4784
  // 使用全局事件总线发送错误
4784
- sentryReporter.ErrorEventBus.emitError({
4785
+ errorEvent.ErrorEventBus.emitError({
4785
4786
  error: err,
4786
4787
  message: '复制内容失败',
4787
4788
  });
@@ -4854,7 +4855,7 @@ const ChatMessageComponent = class {
4854
4855
  component: 'pcm-chat-message',
4855
4856
  title: '无法获取预览URL'
4856
4857
  });
4857
- sentryReporter.ErrorEventBus.emitError({
4858
+ errorEvent.ErrorEventBus.emitError({
4858
4859
  error: '无法获取预览URL',
4859
4860
  message: '无法获取预览URL',
4860
4861
  });
@@ -4961,7 +4962,7 @@ const ChatMessageComponent = class {
4961
4962
  component: 'pcm-chat-message',
4962
4963
  title: '无法提交反馈'
4963
4964
  });
4964
- sentryReporter.ErrorEventBus.emitError({
4965
+ errorEvent.ErrorEventBus.emitError({
4965
4966
  error: '消息ID不存在,无法提交反馈',
4966
4967
  message: '消息ID不存在,无法提交反馈',
4967
4968
  });
@@ -5014,7 +5015,7 @@ const ChatMessageComponent = class {
5014
5015
  }
5015
5016
  }
5016
5017
  render() {
5017
- return (index.h("div", { key: '5a0c434cc297b60f94398c681145ac8922d0fc70', class: "message-round" }, this.renderUserMessage(), this.renderAssistantMessage()));
5018
+ return (index.h("div", { key: 'c337dbb59e5236ac112554ec34da6355e63d806f', class: "message-round" }, this.renderUserMessage(), this.renderAssistantMessage()));
5018
5019
  }
5019
5020
  };
5020
5021
  ChatMessageComponent.style = markdownCss + pcmChatMessageCss;
@@ -5146,7 +5147,7 @@ const PcmDrawer = class {
5146
5147
  const maskStyle = {
5147
5148
  zIndex: `${this.zIndex}`,
5148
5149
  };
5149
- return (index.h("div", { key: 'c0c12a379d5ebfa0dd3cc3d1bbdc3ac758a5006f', class: { 'drawer-container': true, 'drawer-open': this.isOpen } }, this.mask && (index.h("div", { key: '01a6db65de08dd54fbc1a52efeda576e6f71f4ae', class: { 'drawer-mask': true, 'mask-visible': this.isOpen }, style: maskStyle, onClick: this.handleMaskClick })), index.h("div", { key: '121cb9463b12c9ff287e1890c03281dd69d074a9', class: { 'drawer-content': true, 'drawer-content-visible': this.isOpen }, style: drawerStyle }, index.h("div", { key: '839536eb87451599dafdda11185935f51b59ce03', class: "drawer-header" }, this.drawerTitle && index.h("div", { key: 'f02c896b38f2e089687f0baa96fea06f4303ebf0', class: "drawer-title" }, this.drawerTitle), this.closable && (index.h("button", { key: '0ed699d106894d01242f105583860376f1228f48', class: "drawer-close", onClick: this.handleClose }, index.h("svg", { key: '987102bc7f8fb3d86322a8d9029951db6cccb266', viewBox: "64 64 896 896", focusable: "false", "data-icon": "close", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { key: 'b2e5ea93efbab2fe2a76ed59872144cdb4ee9f6a', d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" }))))), index.h("div", { key: 'd882ce5d71c4d2adeecab918a70a56b657e86b63', class: "drawer-body" }, index.h("slot", { key: '9a822a390e1f2f20d287d29dbbbb0501b0989207' })))));
5150
+ return (index.h("div", { key: '5ca0630697aaf594d75095a631163a19ed8e4a9b', class: { 'drawer-container': true, 'drawer-open': this.isOpen } }, this.mask && (index.h("div", { key: '59e9f9f1d48dca079d76ff3ac4f3d4e2f7132bae', class: { 'drawer-mask': true, 'mask-visible': this.isOpen }, style: maskStyle, onClick: this.handleMaskClick })), index.h("div", { key: 'c9138ac3ff9139d2a199abba971481842eb78ee3', class: { 'drawer-content': true, 'drawer-content-visible': this.isOpen }, style: drawerStyle }, index.h("div", { key: 'fbcffe58c697b95b188609733afafc1531a87e5f', class: "drawer-header" }, this.drawerTitle && index.h("div", { key: '7f57ebafc446670961a05c0714a25f2650183e32', class: "drawer-title" }, this.drawerTitle), this.closable && (index.h("button", { key: '9d6ec03e600639be9c44fd87da0687b1777d0d92', class: "drawer-close", onClick: this.handleClose }, index.h("svg", { key: '8960f8ce5325339ed8c06b40043f19e17c45aa52', viewBox: "64 64 896 896", focusable: "false", "data-icon": "close", width: "1em", height: "1em", fill: "currentColor", "aria-hidden": "true" }, index.h("path", { key: '0dede2ac0608601edde40bee26720ee938a8f7d9', d: "M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z" }))))), index.h("div", { key: '28d0ee3ededd2b7ee4b00747acc820227629f91d', class: "drawer-body" }, index.h("slot", { key: 'bbbd99d68c216d10afa4458fe9e4f384f17cb563' })))));
5150
5151
  }
5151
5152
  static get watchers() { return {
5152
5153
  "isOpen": ["visibleChanged"]
@@ -6469,7 +6470,7 @@ ChatHRModal.style = pcmHrChatModalCss;
6469
6470
 
6470
6471
  const pcmHtwsModalCss = ".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}";
6471
6472
 
6472
- const globalCss$8 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
6473
+ const globalCss$c = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
6473
6474
 
6474
6475
  const HtwsModal = class {
6475
6476
  constructor(hostRef) {
@@ -6595,7 +6596,7 @@ const HtwsModal = class {
6595
6596
  this.tokenInvalid.emit();
6596
6597
  };
6597
6598
  // 添加全局错误监听
6598
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
6599
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
6599
6600
  this.someErrorEvent.emit(errorDetail);
6600
6601
  });
6601
6602
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -6649,7 +6650,7 @@ const HtwsModal = class {
6649
6650
  component: 'pcm-htws-modal',
6650
6651
  title: '文件上传失败'
6651
6652
  });
6652
- sentryReporter.ErrorEventBus.emitError({
6653
+ errorEvent.ErrorEventBus.emitError({
6653
6654
  error: error,
6654
6655
  message: '文件上传失败,请重试'
6655
6656
  });
@@ -6698,7 +6699,7 @@ const HtwsModal = class {
6698
6699
  component: 'pcm-htws-modal',
6699
6700
  title: '开始分析时出错'
6700
6701
  });
6701
- sentryReporter.ErrorEventBus.emitError({
6702
+ errorEvent.ErrorEventBus.emitError({
6702
6703
  error: error,
6703
6704
  message: '开始分析时出错,请重试'
6704
6705
  });
@@ -6763,11 +6764,11 @@ const HtwsModal = class {
6763
6764
  "isOpen": ["handleIsOpenChange"]
6764
6765
  }; }
6765
6766
  };
6766
- HtwsModal.style = pcmHtwsModalCss + globalCss$8;
6767
+ HtwsModal.style = pcmHtwsModalCss + globalCss$c;
6767
6768
 
6768
6769
  const pcmHyzjModalCss = "";
6769
6770
 
6770
- const globalCss$7 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
6771
+ const globalCss$b = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
6771
6772
 
6772
6773
  const HyzjModal = class {
6773
6774
  constructor(hostRef) {
@@ -6904,7 +6905,7 @@ const HyzjModal = class {
6904
6905
  this.tokenInvalid.emit();
6905
6906
  };
6906
6907
  // 添加全局错误监听
6907
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
6908
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
6908
6909
  this.someErrorEvent.emit(errorDetail);
6909
6910
  });
6910
6911
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -6958,7 +6959,7 @@ const HyzjModal = class {
6958
6959
  component: 'pcm-hyzj-modal',
6959
6960
  title: '文件上传失败'
6960
6961
  });
6961
- sentryReporter.ErrorEventBus.emitError({
6962
+ errorEvent.ErrorEventBus.emitError({
6962
6963
  error: error,
6963
6964
  message: '文件上传失败,请重试'
6964
6965
  });
@@ -6992,7 +6993,7 @@ const HyzjModal = class {
6992
6993
  component: 'pcm-hyzj-modal',
6993
6994
  title: '开始面试时出错'
6994
6995
  });
6995
- sentryReporter.ErrorEventBus.emitError({
6996
+ errorEvent.ErrorEventBus.emitError({
6996
6997
  error: error,
6997
6998
  message: '开始面试时出错,请重试'
6998
6999
  });
@@ -7034,11 +7035,11 @@ const HyzjModal = class {
7034
7035
  "isOpen": ["handleIsOpenChange"]
7035
7036
  }; }
7036
7037
  };
7037
- HyzjModal.style = pcmHyzjModalCss + globalCss$7;
7038
+ HyzjModal.style = pcmHyzjModalCss + globalCss$b;
7038
7039
 
7039
7040
  const pcmJdModalCss = ".input-mode-toggle{display:flex;align-items:center;margin-bottom:16px}.input-mode-toggle span{color:#333;margin-right:12px}.toggle-button{display:flex;align-items:center;background:none;border:none;color:#2E6EDF;cursor:pointer;font-size:14px;padding:4px 8px}.toggle-button svg{margin-right:4px}.toggle-button:disabled{opacity:0.5;cursor:not-allowed}.structured-input{width:100%}.job-name-input{margin-bottom:20px}.job-name-input label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-name-input input{width:95%;padding:10px 12px;border:1px solid #ddd;border-radius:4px;font-size:14px;background-color:#f9f9f9}.job-name-input input:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.required{color:#f56c6c}.button-container{display:flex;justify-content:center;margin-top:24px;gap:12px;max-width:100%;box-sizing:border-box;flex-wrap:wrap}.next-button{background-color:#2E6EDF;color:white}.next-button:hover{background-color:#2457b8}.next-button:disabled{background-color:#a0c0e8;cursor:not-allowed}.prev-button{background-color:#f0f0f0 !important;color:#333 !important}.prev-button:hover{background-color:#e0e0e0}.tag-selection{width:100%}.tag-selection-content{width:100%}.section-title{font-weight:600;color:#333;margin-bottom:12px;font-size:16px}.ai-tags-section,.basic-tags-section{margin-bottom:24px}.tag-group{margin-bottom:16px}.tag-title{color:#555;margin-bottom:8px;font-weight:500}.tag-container{display:flex;flex-wrap:wrap;gap:8px;max-width:100%;box-sizing:border-box}.tag{display:inline-flex;align-items:center;padding:6px 12px;border-radius:4px;background-color:#f5f5f5;border:1px solid #e0e0e0;color:#333;font-size:13px;cursor:pointer;transition:all 0.2s;max-width:100%;box-sizing:border-box;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tag:hover{background-color:#e8e8e8}.tag-selected{background-color:#e6f0ff;border-color:#2E6EDF;color:#2E6EDF}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 0;background-color:#f9f9f9;border-radius:8px;margin:20px 0;max-width:100%;box-sizing:border-box}.loading-spinner{width:40px;height:40px;border:3px solid rgba(46, 110, 223, 0.2);border-radius:50%;border-top-color:#2E6EDF;animation:spin 1s linear infinite;margin-bottom:16px}@keyframes spin{to{transform:rotate(360deg)}}.loading-text{text-align:center;color:#333;font-weight:500}.loading-subtext{color:#888;font-size:14px;margin-top:4px}.free-input{width:100%}.textarea-container{margin-bottom:16px}.textarea-container label{display:block;margin-bottom:8px;font-weight:500;color:#333}.textarea-container textarea{border:1px solid #ddd;border-radius:4px;font-size:14px;resize:vertical;background-color:#f9f9f9;min-height:150px;width:100%;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.textarea-container textarea:focus{outline:none;border-color:#2E6EDF;box-shadow:0 0 0 2px rgba(46, 110, 223, 0.2)}.input-guide{background-color:#f5f7fa;border-radius:4px;padding:12px 16px;margin-bottom:20px;max-width:100%;box-sizing:border-box;word-wrap:break-word}.guide-title{font-weight:500;color:#333;margin-bottom:8px}.guide-content{color:#666;font-size:13px;max-width:100%;word-wrap:break-word}.guide-content div{margin-bottom:4px}@media (max-width: 768px){.tag-container{gap:7px}.tag{padding:4px 8px;font-size:12px}}@media (max-width: 480px){.button-container{flex-direction:column;align-items:center}.next-button,.prev-button,.submit-button{width:100%;margin-bottom:8px}.tag{max-width:calc(50% - 8px)}}.tag-selection,.tag-selection-content,.ai-tags-section,.basic-tags-section,.structured-input,.free-input{max-width:100%;box-sizing:border-box}";
7040
7041
 
7041
- const globalCss$6 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7042
+ const globalCss$a = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7042
7043
 
7043
7044
  const PcmJdModal = class {
7044
7045
  constructor(hostRef) {
@@ -7175,7 +7176,7 @@ const PcmJdModal = class {
7175
7176
  this.tokenInvalid.emit();
7176
7177
  };
7177
7178
  // 添加全局错误监听
7178
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
7179
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
7179
7180
  this.someErrorEvent.emit(errorDetail);
7180
7181
  });
7181
7182
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -7289,7 +7290,7 @@ const PcmJdModal = class {
7289
7290
  component: 'pcm-jd-modal',
7290
7291
  title: '解析前置标签时错误'
7291
7292
  });
7292
- sentryReporter.ErrorEventBus.emitError({
7293
+ errorEvent.ErrorEventBus.emitError({
7293
7294
  error: error,
7294
7295
  message: '解析前置标签时错误'
7295
7296
  });
@@ -7380,7 +7381,7 @@ const PcmJdModal = class {
7380
7381
  component: 'pcm-jd-modal',
7381
7382
  title: '提交数据时出错'
7382
7383
  });
7383
- sentryReporter.ErrorEventBus.emitError({
7384
+ errorEvent.ErrorEventBus.emitError({
7384
7385
  error: error,
7385
7386
  message: '提交数据时出错,请重试'
7386
7387
  });
@@ -7408,7 +7409,7 @@ const PcmJdModal = class {
7408
7409
  component: 'pcm-jd-modal',
7409
7410
  title: '提交数据时出错'
7410
7411
  });
7411
- sentryReporter.ErrorEventBus.emitError({
7412
+ errorEvent.ErrorEventBus.emitError({
7412
7413
  error: error,
7413
7414
  message: '提交数据时出错,请重试'
7414
7415
  });
@@ -7503,11 +7504,11 @@ const PcmJdModal = class {
7503
7504
  "isOpen": ["handleIsOpenChange"]
7504
7505
  }; }
7505
7506
  };
7506
- PcmJdModal.style = pcmJdModalCss + globalCss$6;
7507
+ PcmJdModal.style = pcmJdModalCss + globalCss$a;
7507
7508
 
7508
7509
  const pcmJlppModalCss = "";
7509
7510
 
7510
- const globalCss$5 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7511
+ const globalCss$9 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7511
7512
 
7512
7513
  const JlppModal = class {
7513
7514
  constructor(hostRef) {
@@ -7650,7 +7651,7 @@ const JlppModal = class {
7650
7651
  this.tokenInvalid.emit();
7651
7652
  };
7652
7653
  // 添加全局错误监听
7653
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
7654
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
7654
7655
  this.someErrorEvent.emit(errorDetail);
7655
7656
  });
7656
7657
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -7707,7 +7708,7 @@ const JlppModal = class {
7707
7708
  component: 'pcm-jlpp-modal',
7708
7709
  title: '文件上传失败'
7709
7710
  });
7710
- sentryReporter.ErrorEventBus.emitError({
7711
+ errorEvent.ErrorEventBus.emitError({
7711
7712
  error: error,
7712
7713
  message: '文件上传失败,请重试'
7713
7714
  });
@@ -7746,7 +7747,7 @@ const JlppModal = class {
7746
7747
  component: 'pcm-jlpp-modal',
7747
7748
  title: '开始分析时出错'
7748
7749
  });
7749
- sentryReporter.ErrorEventBus.emitError({
7750
+ errorEvent.ErrorEventBus.emitError({
7750
7751
  error: error,
7751
7752
  message: '开始分析时出错,请重试'
7752
7753
  });
@@ -7793,11 +7794,11 @@ const JlppModal = class {
7793
7794
  "isOpen": ["handleIsOpenChange"]
7794
7795
  }; }
7795
7796
  };
7796
- JlppModal.style = pcmJlppModalCss + globalCss$5;
7797
+ JlppModal.style = pcmJlppModalCss + globalCss$9;
7797
7798
 
7798
7799
  const pcmMnctModalCss = "";
7799
7800
 
7800
- const globalCss$4 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7801
+ const globalCss$8 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
7801
7802
 
7802
7803
  const MnctModal = class {
7803
7804
  constructor(hostRef) {
@@ -7940,7 +7941,7 @@ const MnctModal = class {
7940
7941
  this.tokenInvalid.emit();
7941
7942
  };
7942
7943
  // 添加全局错误监听
7943
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
7944
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
7944
7945
  this.someErrorEvent.emit(errorDetail);
7945
7946
  });
7946
7947
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -7994,7 +7995,7 @@ const MnctModal = class {
7994
7995
  component: 'pcm-mnct-modal',
7995
7996
  title: '文件上传失败'
7996
7997
  });
7997
- sentryReporter.ErrorEventBus.emitError({
7998
+ errorEvent.ErrorEventBus.emitError({
7998
7999
  error: error,
7999
8000
  message: '文件上传失败,请重试'
8000
8001
  });
@@ -8037,7 +8038,7 @@ const MnctModal = class {
8037
8038
  component: 'pcm-mnct-modal',
8038
8039
  title: '开始面试时出错'
8039
8040
  });
8040
- sentryReporter.ErrorEventBus.emitError({
8041
+ errorEvent.ErrorEventBus.emitError({
8041
8042
  error: error,
8042
8043
  message: '开始面试时出错,请重试'
8043
8044
  });
@@ -8086,11 +8087,11 @@ const MnctModal = class {
8086
8087
  "isOpen": ["handleIsOpenChange"]
8087
8088
  }; }
8088
8089
  };
8089
- MnctModal.style = pcmMnctModalCss + globalCss$4;
8090
+ MnctModal.style = pcmMnctModalCss + globalCss$8;
8090
8091
 
8091
8092
  const pcmMnmsModalCss = "";
8092
8093
 
8093
- const globalCss$3 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
8094
+ const globalCss$7 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
8094
8095
 
8095
8096
  const MnmsModal = class {
8096
8097
  constructor(hostRef) {
@@ -8160,6 +8161,14 @@ const MnmsModal = class {
8160
8161
  * 是否显示工作区历史会话按钮
8161
8162
  */
8162
8163
  showWorkspaceHistory = false;
8164
+ /**
8165
+ * 是否开启移动端上传(仅PC端生效)
8166
+ */
8167
+ mobileJdInputAble = false;
8168
+ /**
8169
+ * 是否开启移动端上传(仅PC端生效)
8170
+ */
8171
+ mobileUploadAble = false;
8163
8172
  /**
8164
8173
  * 上传成功事件
8165
8174
  */
@@ -8224,7 +8233,6 @@ const MnmsModal = class {
8224
8233
  async handleIsOpenChange(newValue) {
8225
8234
  if (!newValue) {
8226
8235
  // 重置状态
8227
- this.clearSelectedFile();
8228
8236
  this.showChatModal = false;
8229
8237
  this.jobDescription = '';
8230
8238
  }
@@ -8252,7 +8260,7 @@ const MnmsModal = class {
8252
8260
  this.tokenInvalid.emit();
8253
8261
  };
8254
8262
  // 添加全局错误监听
8255
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
8263
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
8256
8264
  this.someErrorEvent.emit(errorDetail);
8257
8265
  });
8258
8266
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -8268,94 +8276,25 @@ const MnmsModal = class {
8268
8276
  handleClose = () => {
8269
8277
  this.modalClosed.emit();
8270
8278
  };
8271
- handleFileChange = (event) => {
8272
- const input = event.target;
8273
- if (input.files && input.files.length > 0) {
8274
- this.selectedFile = input.files[0];
8275
- }
8276
- };
8277
- handleUploadClick = () => {
8278
- const fileInput = this.hostElement.shadowRoot?.querySelector('.file-input');
8279
- fileInput?.click();
8280
- };
8281
- clearSelectedFile = () => {
8282
- this.selectedFile = null;
8283
- this.uploadedFileInfo = null;
8284
- const fileInput = this.hostElement.shadowRoot?.querySelector('.file-input');
8285
- if (fileInput) {
8286
- fileInput.value = '';
8287
- }
8288
- };
8289
- async uploadFile() {
8290
- if (!this.selectedFile)
8291
- return;
8292
- this.isUploading = true;
8293
- try {
8294
- // 使用 uploadFileToBackend 工具函数上传文件
8295
- const result = await index$1.uploadFileToBackend(this.selectedFile, {}, {
8296
- 'tags': ['resume']
8297
- });
8298
- this.uploadedFileInfo = result;
8299
- this.uploadSuccess.emit(result);
8300
- }
8301
- catch (error) {
8302
- console.error('文件上传错误:', error);
8303
- this.clearSelectedFile();
8304
- sentryReporter.SentryReporter.captureError(error, {
8305
- action: 'uploadFile',
8306
- component: 'pcm-mnms-modal',
8307
- title: '文件上传失败'
8308
- });
8309
- sentryReporter.ErrorEventBus.emitError({
8310
- error: error,
8311
- message: '文件上传失败,请重试'
8312
- });
8313
- }
8314
- finally {
8315
- this.isUploading = false;
8316
- }
8317
- }
8318
8279
  handleJobDescriptionChange = (event) => {
8319
8280
  const textarea = event.target;
8320
8281
  this.jobDescription = textarea.value;
8321
8282
  };
8322
8283
  handleStartInterview = async () => {
8323
- // 判断是否隐藏简历上传区域
8324
- const hideResumeUpload = Boolean(this.customInputs && (this.customInputs.file_url || this.customInputs.resume_content));
8325
8284
  // 如果没有预设的job_info,则需要检查用户输入
8326
8285
  if (!this.customInputs?.job_info && !this.jobDescription.trim()) {
8327
8286
  alert('请输入职位描述');
8328
8287
  return;
8329
8288
  }
8330
8289
  this.isSubmitting = true;
8331
- try {
8332
- // 如果需要上传文件且还没上传,先上传文件(简历为选填)
8333
- if (!hideResumeUpload && this.selectedFile && !this.uploadedFileInfo) {
8334
- await this.uploadFile();
8335
- if (!this.uploadedFileInfo) {
8336
- this.isSubmitting = false;
8337
- return; // 上传失败
8338
- }
8339
- }
8340
- // 直接显示聊天模态框
8341
- this.showChatModal = true;
8342
- }
8343
- catch (error) {
8344
- console.error('开始面试时出错:', error);
8345
- sentryReporter.SentryReporter.captureError(error, {
8346
- action: 'handleStartInterview',
8347
- component: 'pcm-mnms-modal',
8348
- title: '开始面试时出错'
8349
- });
8350
- sentryReporter.ErrorEventBus.emitError({
8351
- error: error,
8352
- message: '开始面试时出错,请重试'
8353
- });
8354
- }
8355
- finally {
8356
- this.isSubmitting = false;
8290
+ // 判断文件是否正在上传
8291
+ if (await this.pcmUploadRef?.getIsUploading?.()) {
8292
+ message_service.Message.info('文件上传中,请稍后');
8293
+ return;
8357
8294
  }
8295
+ this.showChatModal = true;
8358
8296
  };
8297
+ pcmUploadRef;
8359
8298
  render() {
8360
8299
  if (!this.isOpen)
8361
8300
  return null;
@@ -8379,10 +8318,15 @@ const MnmsModal = class {
8379
8318
  const hideResumeUpload = Boolean(this.customInputs && (this.customInputs.file_url || this.customInputs.resume_content));
8380
8319
  // 判断是否同时提供了(file_url或resume_content)和job_info
8381
8320
  const hasFileAndJob = Boolean((this.customInputs?.file_url || this.customInputs?.resume_content) && this.customInputs?.job_info);
8382
- return (index.h("div", { class: overlayClass, style: modalStyle }, index.h("div", { class: containerClass }, this.isShowHeader && (index.h("div", { class: "modal-header" }, index.h("div", { class: "header-left" }, this.icon && index.h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), index.h("div", null, this.modalTitle)), this.isNeedClose && (index.h("button", { class: "close-button", onClick: this.handleClose }, index.h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && !hasFileAndJob && (index.h("div", { class: "input-container" }, !hideJdInput && (index.h("div", { class: "jd-input-section" }, index.h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), index.h("textarea", { id: "job-description", class: "job-description-textarea", placeholder: "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0\uFF0C\u5305\u62EC\u804C\u8D23\u3001\u8981\u6C42\u7B49\u4FE1\u606F...", rows: 6, value: this.jobDescription, onInput: this.handleJobDescriptionChange }))), !hideResumeUpload && (index.h("div", { class: "resume-upload-section" }, index.h("label", null, "\u4E0A\u4F20\u7B80\u5386\uFF08\u9009\u586B\uFF09"), index.h("div", { class: "upload-area", onClick: this.handleUploadClick }, this.selectedFile ? (index.h("div", { class: "file-item" }, index.h("div", { class: "file-item-content" }, index.h("span", { class: "file-icon" }, "\uD83D\uDCDD"), index.h("span", { class: "file-name" }, this.selectedFile.name)), index.h("button", { class: "remove-file", onClick: (e) => {
8383
- e.stopPropagation();
8384
- this.clearSelectedFile();
8385
- } }, "\u00D7"))) : (index.h("div", { class: "upload-placeholder" }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, "\u652F\u6301 txt\u3001markdown\u3001pdf\u3001docx\u3001doc\u3001md \u683C\u5F0F")))))), index.h("button", { class: "submit-button", disabled: (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))), index.h("input", { type: "file", class: "file-input", onChange: this.handleFileChange }))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isShowHeader, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: "3022316191018884", conversationId: this.conversationId, defaultQuery: this.defaultQuery, enableTTS: false, filePreviewMode: this.filePreviewMode, showCopyButton: this.showCopyButton, showFeedbackButtons: this.showFeedbackButtons, customInputs: this.conversationId ? {} : {
8321
+ return (index.h("div", { class: overlayClass, style: modalStyle }, index.h("div", { class: containerClass }, this.isShowHeader && (index.h("div", { class: "modal-header" }, index.h("div", { class: "header-left" }, this.icon && index.h("img", { src: this.icon, class: "header-icon", alt: "\u5E94\u7528\u56FE\u6807" }), index.h("div", null, this.modalTitle)), this.isNeedClose && (index.h("button", { class: "close-button", onClick: this.handleClose }, index.h("span", null, "\u00D7"))))), !this.showChatModal && !this.conversationId && !hasFileAndJob && (index.h("div", { class: "input-container" }, !hideJdInput && (index.h("div", { class: "jd-input-section" }, index.h("label", { htmlFor: "job-description" }, "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0 (JD)"), !!this.mobileJdInputAble && (index.h("pcm-mobile-input-btn", { name: "\u804C\u4F4D\u63CF\u8FF0", onOk: (e) => {
8322
+ this.jobDescription = e.detail;
8323
+ } })), index.h("textarea", { id: "job-description", class: "job-description-textarea", placeholder: "\u8BF7\u8F93\u5165\u804C\u4F4D\u63CF\u8FF0\uFF0C\u5305\u62EC\u804C\u8D23\u3001\u8981\u6C42\u7B49\u4FE1\u606F...", rows: 6, value: this.jobDescription, onInput: this.handleJobDescriptionChange }))), !hideResumeUpload && (index.h("pcm-upload", { ref: el => this.pcmUploadRef = el, maxFileSize: 15 * 1024 * 1024, multiple: false, mobileUploadAble: this.mobileUploadAble, labelText: "\u4E0A\u4F20\u7B80\u5386\uFF08\u9009\u586B\uFF09", acceptFileSuffixList: ['.txt', '.md', '.pdf', '.docx', '.doc'], uploadParams: {
8324
+ tags: ['resume'],
8325
+ }, onUploadChange: (e) => {
8326
+ const result = e.detail ?? [];
8327
+ this.uploadedFileInfo = result[0];
8328
+ this.uploadSuccess.emit(this.uploadedFileInfo);
8329
+ } })), index.h("button", { class: "submit-button", disabled: (!hideJdInput && !this.jobDescription.trim()) || this.isUploading || this.isSubmitting, onClick: this.handleStartInterview }, this.isUploading ? '上传中...' : this.isSubmitting ? '处理中...' : '开始分析'), index.h("div", { class: "ai-disclaimer" }, index.h("p", null, "\u6240\u6709\u5185\u5BB9\u5747\u7531AI\u751F\u6210\u4EC5\u4F9B\u53C2\u8003"), index.h("p", { class: "beian-info" }, index.h("span", null, "\u4E2D\u592E\u7F51\u4FE1\u529E\u751F\u6210\u5F0F\u4EBA\u5DE5\u667A\u80FD\u670D\u52A1\u5907\u6848\u53F7"), "\uFF1A", index.h("a", { href: "https://www.pincaimao.com", target: "_blank", rel: "noopener noreferrer" }, "Hunan-PinCaiMao-202412310003"))))), isLoading && (index.h("div", { class: "loading-container" }, index.h("div", { class: "loading-spinner" }), index.h("p", { class: "loading-text" }, "\u6B63\u5728\u52A0\u8F7D\u5BF9\u8BDD..."))), this.showChatModal && (index.h("div", null, index.h("pcm-app-chat-modal", { isOpen: true, modalTitle: this.modalTitle, icon: this.icon, isShowHeader: this.isShowHeader, isNeedClose: this.isShowHeader, fullscreen: this.fullscreen, showWorkspaceHistory: this.showWorkspaceHistory, botId: "3022316191018884", conversationId: this.conversationId, defaultQuery: this.defaultQuery, enableTTS: false, filePreviewMode: this.filePreviewMode, showCopyButton: this.showCopyButton, showFeedbackButtons: this.showFeedbackButtons, customInputs: this.conversationId ? {} : {
8386
8330
  ...this.customInputs,
8387
8331
  file_url: this.customInputs?.file_url || this.uploadedFileInfo?.cos_key,
8388
8332
  file_name: this.customInputs?.file_name || this.uploadedFileInfo?.file_name,
@@ -8395,71 +8339,2970 @@ const MnmsModal = class {
8395
8339
  "isOpen": ["handleIsOpenChange"]
8396
8340
  }; }
8397
8341
  };
8398
- MnmsModal.style = pcmMnmsModalCss + globalCss$3;
8342
+ MnmsModal.style = pcmMnmsModalCss + globalCss$7;
8399
8343
 
8400
- const pcmMsbgModalCss = "";
8344
+ /**
8345
+ * @module QRCode
8346
+ * @package @nuintun/qrcode
8347
+ * @license MIT
8348
+ * @version 5.0.2
8349
+ * @author nuintun <nuintun@qq.com>
8350
+ * @description A pure JavaScript QRCode encode and decode library.
8351
+ * @see https://github.com/nuintun/qrcode#readme
8352
+ */
8401
8353
 
8402
- const globalCss$2 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
8354
+ /**
8355
+ * @module Charset
8356
+ */
8357
+ const VALUES_TO_CHARSET = new Map();
8358
+ class Charset {
8359
+ #label;
8360
+ #values;
8361
+ // See: https://en.wikipedia.org/wiki/Extended_Channel_Interpretation
8362
+ static CP437 = new Charset('cp437', 2, 0);
8363
+ static ISO_8859_1 = new Charset('iso-8859-1', 3, 1);
8364
+ static ISO_8859_2 = new Charset('iso-8859-2', 4);
8365
+ static ISO_8859_3 = new Charset('iso-8859-3', 5);
8366
+ static ISO_8859_4 = new Charset('iso-8859-4', 6);
8367
+ static ISO_8859_5 = new Charset('iso-8859-5', 7);
8368
+ static ISO_8859_6 = new Charset('iso-8859-6', 8);
8369
+ static ISO_8859_7 = new Charset('iso-8859-7', 9);
8370
+ static ISO_8859_8 = new Charset('iso-8859-8', 10);
8371
+ static ISO_8859_9 = new Charset('iso-8859-9', 11);
8372
+ static ISO_8859_10 = new Charset('iso-8859-10', 12);
8373
+ static ISO_8859_11 = new Charset('iso-8859-11', 13);
8374
+ static ISO_8859_13 = new Charset('iso-8859-13', 15);
8375
+ static ISO_8859_14 = new Charset('iso-8859-14', 16);
8376
+ static ISO_8859_15 = new Charset('iso-8859-15', 17);
8377
+ static ISO_8859_16 = new Charset('iso-8859-16', 18);
8378
+ static SHIFT_JIS = new Charset('shift-jis', 20);
8379
+ static CP1250 = new Charset('cp1250', 21);
8380
+ static CP1251 = new Charset('cp1251', 22);
8381
+ static CP1252 = new Charset('cp1252', 23);
8382
+ static CP1256 = new Charset('cp1256', 24);
8383
+ static UTF_16BE = new Charset('utf-16be', 25);
8384
+ static UTF_8 = new Charset('utf-8', 26);
8385
+ static ASCII = new Charset('ascii', 27);
8386
+ static BIG5 = new Charset('big5', 28);
8387
+ static GB2312 = new Charset('gb2312', 29);
8388
+ static EUC_KR = new Charset('euc-kr', 30);
8389
+ static GBK = new Charset('gbk', 31);
8390
+ static GB18030 = new Charset('gb18030', 32);
8391
+ static UTF_16LE = new Charset('utf-16le', 33);
8392
+ static UTF_32BE = new Charset('utf-32be', 34);
8393
+ static UTF_32LE = new Charset('utf-32le', 35);
8394
+ static ISO_646_INV = new Charset('iso-646-inv', 170);
8395
+ static BINARY = new Charset('binary', 899);
8396
+ /**
8397
+ * @constructor
8398
+ * @param label The label of charset.
8399
+ * @param values The values of charset.
8400
+ */
8401
+ constructor(label, ...values) {
8402
+ this.#label = label;
8403
+ this.#values = Object.freeze(values);
8404
+ for (const value of values) {
8405
+ if (value >= 0 && value <= 999999 && Number.isInteger(value)) {
8406
+ VALUES_TO_CHARSET.set(value, this);
8407
+ } else {
8408
+ throw new Error('illegal extended channel interpretation value');
8409
+ }
8410
+ }
8411
+ }
8412
+ /**
8413
+ * @property label
8414
+ * @description Get the label of charset.
8415
+ */
8416
+ get label() {
8417
+ return this.#label;
8418
+ }
8419
+ /**
8420
+ * @property values
8421
+ * @description Get the values of charset.
8422
+ */
8423
+ get values() {
8424
+ return this.#values;
8425
+ }
8426
+ }
8403
8427
 
8404
- const MsbgModal = class {
8405
- constructor(hostRef) {
8406
- index.registerInstance(this, hostRef);
8407
- this.modalClosed = index.createEvent(this, "modalClosed");
8408
- this.uploadSuccess = index.createEvent(this, "uploadSuccess");
8409
- this.streamComplete = index.createEvent(this, "streamComplete");
8410
- this.conversationStart = index.createEvent(this, "conversationStart");
8411
- this.interviewComplete = index.createEvent(this, "interviewComplete");
8412
- this.tokenInvalid = index.createEvent(this, "tokenInvalid");
8413
- this.someErrorEvent = index.createEvent(this, "someErrorEvent");
8428
+ /**
8429
+ * @module QRCode
8430
+ * @package @nuintun/qrcode
8431
+ * @license MIT
8432
+ * @version 5.0.2
8433
+ * @author nuintun <nuintun@qq.com>
8434
+ * @description A pure JavaScript QRCode encode and decode library.
8435
+ * @see https://github.com/nuintun/qrcode#readme
8436
+ */
8437
+
8438
+ /**
8439
+ * @module utils
8440
+ */
8441
+ function toBit(value) {
8442
+ return value & 0x01;
8443
+ }
8444
+ function toInt32(value) {
8445
+ return value | 0;
8446
+ }
8447
+ function getBitMask(value) {
8448
+ return 1 << getBitOffset(value);
8449
+ }
8450
+ function getBitOffset(value) {
8451
+ return value & 0x1f;
8452
+ }
8453
+ // Return the position of the most significant bit set (to one) in the "value". The most
8454
+ // significant bit is position 32. If there is no bit set, return 0. Examples:
8455
+ // - findMSBSet(0) => 0
8456
+ // - findMSBSet(1) => 1
8457
+ // - findMSBSet(255) => 8
8458
+ function findMSBSet(value) {
8459
+ return 32 - Math.clz32(value);
8460
+ }
8461
+ // Calculate BCH (Bose-Chaudhuri-Hocquenghem) code for "value" using polynomial "poly". The BCH
8462
+ // code is used for encoding type information and version information.
8463
+ // Example: Calculation of version information of 7.
8464
+ // f(x) is created from 7.
8465
+ // - 7 = 000111 in 6 bits
8466
+ // - f(x) = x^2 + x^1 + x^0
8467
+ // g(x) is given by the standard (p. 67)
8468
+ // - g(x) = x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1
8469
+ // Multiply f(x) by x^(18 - 6)
8470
+ // - f'(x) = f(x) * x^(18 - 6)
8471
+ // - f'(x) = x^14 + x^13 + x^12
8472
+ // Calculate the remainder of f'(x) / g(x)
8473
+ // x^2
8474
+ // __________________________________________________
8475
+ // g(x) )x^14 + x^13 + x^12
8476
+ // x^14 + x^13 + x^12 + x^11 + x^10 + x^7 + x^4 + x^2
8477
+ // --------------------------------------------------
8478
+ // x^11 + x^10 + x^7 + x^4 + x^2
8479
+ //
8480
+ // The remainder is x^11 + x^10 + x^7 + x^4 + x^2
8481
+ // Encode it in binary: 110010010100
8482
+ // The return value is 0xc94 (1100 1001 0100)
8483
+ //
8484
+ // Since all coefficients in the polynomials are 1 or 0, we can do the calculation by bit
8485
+ // operations. We don't care if coefficients are positive or negative.
8486
+ function calculateBCHCode(value, poly) {
8487
+ // If poly is "1 1111 0010 0101" (version info poly), msbSetInPoly is 13. We'll subtract 1
8488
+ // from 13 to make it 12.
8489
+ const msbSetInPoly = findMSBSet(poly);
8490
+ value <<= msbSetInPoly - 1;
8491
+ // Do the division business using exclusive-or operations.
8492
+ while (findMSBSet(value) >= msbSetInPoly) {
8493
+ value ^= poly << (findMSBSet(value) - msbSetInPoly);
8494
+ }
8495
+ // Now the "value" is the remainder (i.e. the BCH code).
8496
+ return value;
8497
+ }
8498
+
8499
+ /**
8500
+ * @module QRCode
8501
+ * @package @nuintun/qrcode
8502
+ * @license MIT
8503
+ * @version 5.0.2
8504
+ * @author nuintun <nuintun@qq.com>
8505
+ * @description A pure JavaScript QRCode encode and decode library.
8506
+ * @see https://github.com/nuintun/qrcode#readme
8507
+ */
8508
+
8509
+ /**
8510
+ * @module Mode
8511
+ */
8512
+ const VALUES_TO_MODE = new Map();
8513
+ class Mode {
8514
+ #bits;
8515
+ #characterCountBitsSet;
8516
+ static TERMINATOR = new Mode([0, 0, 0], 0x00);
8517
+ static NUMERIC = new Mode([10, 12, 14], 0x01);
8518
+ static ALPHANUMERIC = new Mode([9, 11, 13], 0x02);
8519
+ static STRUCTURED_APPEND = new Mode([0, 0, 0], 0x03);
8520
+ static BYTE = new Mode([8, 16, 16], 0x04);
8521
+ static ECI = new Mode([0, 0, 0], 0x07);
8522
+ static KANJI = new Mode([8, 10, 12], 0x08);
8523
+ static FNC1_FIRST_POSITION = new Mode([0, 0, 0], 0x05);
8524
+ static FNC1_SECOND_POSITION = new Mode([0, 0, 0], 0x09);
8525
+ static HANZI = new Mode([8, 10, 12], 0x0d);
8526
+ constructor(characterCountBitsSet, bits) {
8527
+ this.#bits = bits;
8528
+ this.#characterCountBitsSet = new Int32Array(characterCountBitsSet);
8529
+ VALUES_TO_MODE.set(bits, this);
8530
+ }
8531
+ get bits() {
8532
+ return this.#bits;
8533
+ }
8534
+ getCharacterCountBits({ version }) {
8535
+ let offset;
8536
+ if (version <= 9) {
8537
+ offset = 0;
8538
+ } else if (version <= 26) {
8539
+ offset = 1;
8540
+ } else {
8541
+ offset = 2;
8542
+ }
8543
+ return this.#characterCountBitsSet[offset];
8544
+ }
8545
+ }
8546
+
8547
+ /**
8548
+ * @module QRCode
8549
+ * @package @nuintun/qrcode
8550
+ * @license MIT
8551
+ * @version 5.0.2
8552
+ * @author nuintun <nuintun@qq.com>
8553
+ * @description A pure JavaScript QRCode encode and decode library.
8554
+ * @see https://github.com/nuintun/qrcode#readme
8555
+ */
8556
+
8557
+
8558
+ /**
8559
+ * @module mask
8560
+ */
8561
+ // Penalty weights.
8562
+ const N1 = 3;
8563
+ const N2 = 3;
8564
+ const N3 = 40;
8565
+ const N4 = 10;
8566
+ // Is dark point.
8567
+ function isDark(matrix, x, y) {
8568
+ return matrix.get(x, y) === 1;
8569
+ }
8570
+ // Helper function for applyMaskPenaltyRule1. We need this for doing this calculation in both
8571
+ // horizontal and vertical orders respectively.
8572
+ function applyMaskPenaltyRule1Internal(matrix, isVertical) {
8573
+ let penalty = 0;
8574
+ const { size } = matrix;
8575
+ for (let y = 0; y < size; y++) {
8576
+ let prevBit = -1;
8577
+ let numSameBitCells = 0;
8578
+ for (let x = 0; x < size; x++) {
8579
+ const bit = isVertical ? matrix.get(y, x) : matrix.get(x, y);
8580
+ if (bit === prevBit) {
8581
+ numSameBitCells++;
8582
+ } else {
8583
+ if (numSameBitCells >= 5) {
8584
+ penalty += N1 + (numSameBitCells - 5);
8585
+ }
8586
+ // set prev bit.
8587
+ prevBit = bit;
8588
+ // include the cell itself.
8589
+ numSameBitCells = 1;
8590
+ }
8591
+ }
8592
+ if (numSameBitCells >= 5) {
8593
+ penalty += N1 + (numSameBitCells - 5);
8594
+ }
8595
+ }
8596
+ return penalty;
8597
+ }
8598
+ // Apply mask penalty rule 1 and return the penalty. Find repetitive cells with the same color and
8599
+ // give penalty to them. Example: 00000 or 11111.
8600
+ function applyMaskPenaltyRule1(matrix) {
8601
+ return applyMaskPenaltyRule1Internal(matrix) + applyMaskPenaltyRule1Internal(matrix, true);
8602
+ }
8603
+ // Apply mask penalty rule 2 and return the penalty. Find 2x2 blocks with the same color and give
8604
+ // penalty to them. This is actually equivalent to the spec's rule, which is to find MxN blocks and give a
8605
+ // penalty proportional to (M-1)x(N-1), because this is the number of 2x2 blocks inside such a block.
8606
+ function applyMaskPenaltyRule2(matrix) {
8607
+ let penalty = 0;
8608
+ const size = matrix.size - 1;
8609
+ for (let y = 0; y < size; y++) {
8610
+ for (let x = 0; x < size; x++) {
8611
+ const bit = matrix.get(x, y);
8612
+ if (
8613
+ // Find 2x2 blocks with the same color.
8614
+ bit === matrix.get(x + 1, y) &&
8615
+ bit === matrix.get(x, y + 1) &&
8616
+ bit === matrix.get(x + 1, y + 1)
8617
+ ) {
8618
+ penalty += N2;
8619
+ }
8620
+ }
8621
+ }
8622
+ return penalty;
8623
+ }
8624
+ // Is is four white, check on horizontal and vertical.
8625
+ function isFourWhite(matrix, offset, from, to, isVertical) {
8626
+ if (from < 0 || to > matrix.size) {
8627
+ return false;
8628
+ }
8629
+ for (let i = from; i < to; i++) {
8630
+ if (isVertical ? isDark(matrix, offset, i) : isDark(matrix, i, offset)) {
8631
+ return false;
8632
+ }
8633
+ }
8634
+ return true;
8635
+ }
8636
+ // Apply mask penalty rule 3 and return the penalty. Find consecutive runs of 1:1:3:1:1:4
8637
+ // starting with black, or 4:1:1:3:1:1 starting with white, and give penalty to them. If we
8638
+ // find patterns like 000010111010000, we give penalty once.
8639
+ function applyMaskPenaltyRule3(matrix) {
8640
+ let numPenalties = 0;
8641
+ const { size } = matrix;
8642
+ for (let y = 0; y < size; y++) {
8643
+ for (let x = 0; x < size; x++) {
8644
+ if (
8645
+ // Find consecutive runs of 1:1:3:1:1:4 or 4:1:1:3:1:1, patterns like 000010111010000.
8646
+ x + 6 < size &&
8647
+ isDark(matrix, x, y) &&
8648
+ !isDark(matrix, x + 1, y) &&
8649
+ isDark(matrix, x + 2, y) &&
8650
+ isDark(matrix, x + 3, y) &&
8651
+ isDark(matrix, x + 4, y) &&
8652
+ !isDark(matrix, x + 5, y) &&
8653
+ isDark(matrix, x + 6, y) &&
8654
+ (isFourWhite(matrix, y, x - 4, x) || isFourWhite(matrix, y, x + 7, x + 11))
8655
+ ) {
8656
+ numPenalties++;
8657
+ }
8658
+ if (
8659
+ // Find consecutive runs of 1:1:3:1:1:4 or 4:1:1:3:1:1, patterns like 000010111010000.
8660
+ y + 6 < size &&
8661
+ isDark(matrix, x, y) &&
8662
+ !isDark(matrix, x, y + 1) &&
8663
+ isDark(matrix, x, y + 2) &&
8664
+ isDark(matrix, x, y + 3) &&
8665
+ isDark(matrix, x, y + 4) &&
8666
+ !isDark(matrix, x, y + 5) &&
8667
+ isDark(matrix, x, y + 6) &&
8668
+ (isFourWhite(matrix, x, y - 4, y, true) || isFourWhite(matrix, x, y + 7, y + 11, true))
8669
+ ) {
8670
+ numPenalties++;
8671
+ }
8672
+ }
8673
+ }
8674
+ return numPenalties * N3;
8675
+ }
8676
+ // Apply mask penalty rule 4 and return the penalty. Calculate the ratio of dark cells and give
8677
+ // penalty if the ratio is far from 50%. It gives 10 penalty for 5% distance.
8678
+ function applyMaskPenaltyRule4(matrix) {
8679
+ let numDarkCells = 0;
8680
+ const { size } = matrix;
8681
+ for (let y = 0; y < size; y++) {
8682
+ for (let x = 0; x < size; x++) {
8683
+ if (isDark(matrix, x, y)) {
8684
+ numDarkCells++;
8685
+ }
8686
+ }
8687
+ }
8688
+ const numTotalCells = size * size;
8689
+ const fivePercentVariances = toInt32((Math.abs(numDarkCells * 2 - numTotalCells) * 10) / numTotalCells);
8690
+ return fivePercentVariances * N4;
8691
+ }
8692
+ // The mask penalty calculation is complicated. See Table 11 of ISO/IEC 18004:2015(E)(p.54) for details.
8693
+ // Basically it applies four rules and summate all penalties.
8694
+ function calculateMaskPenalty(matrix) {
8695
+ return (
8696
+ applyMaskPenaltyRule1(matrix) +
8697
+ applyMaskPenaltyRule2(matrix) +
8698
+ applyMaskPenaltyRule3(matrix) +
8699
+ applyMaskPenaltyRule4(matrix)
8700
+ );
8701
+ }
8702
+ // Return is apply mask at "x" and "y". See 7.8 of ISO/IEC 18004:2015(E)(p.50) for mask pattern conditions.
8703
+ function isApplyMask(mask, x, y) {
8704
+ let temporary;
8705
+ let intermediate;
8706
+ switch (mask) {
8707
+ case 0:
8708
+ intermediate = (y + x) & 0x01;
8709
+ break;
8710
+ case 1:
8711
+ intermediate = y & 0x01;
8712
+ break;
8713
+ case 2:
8714
+ intermediate = x % 3;
8715
+ break;
8716
+ case 3:
8717
+ intermediate = (y + x) % 3;
8718
+ break;
8719
+ case 4:
8720
+ intermediate = (toInt32(y / 2) + toInt32(x / 3)) & 0x01;
8721
+ break;
8722
+ case 5:
8723
+ temporary = y * x;
8724
+ intermediate = (temporary & 0x01) + (temporary % 3);
8725
+ break;
8726
+ case 6:
8727
+ temporary = y * x;
8728
+ intermediate = ((temporary & 0x01) + (temporary % 3)) & 0x01;
8729
+ break;
8730
+ case 7:
8731
+ intermediate = (((y * x) % 3) + ((y + x) & 0x01)) & 0x01;
8732
+ break;
8733
+ default:
8734
+ throw new Error(`illegal mask: ${mask}`);
8735
+ }
8736
+ return intermediate === 0;
8737
+ }
8738
+
8739
+ /**
8740
+ * @module QRCode
8741
+ * @package @nuintun/qrcode
8742
+ * @license MIT
8743
+ * @version 5.0.2
8744
+ * @author nuintun <nuintun@qq.com>
8745
+ * @description A pure JavaScript QRCode encode and decode library.
8746
+ * @see https://github.com/nuintun/qrcode#readme
8747
+ */
8748
+
8749
+ /**
8750
+ * @module ECLevel
8751
+ */
8752
+ const VALUES_TO_ECLEVEL = new Map();
8753
+ class ECLevel {
8754
+ #name;
8755
+ #bits;
8756
+ #level;
8757
+ // L = ~7% correction.
8758
+ static L = new ECLevel('L', 0, 0x01);
8759
+ // L = ~15% correction.
8760
+ static M = new ECLevel('M', 1, 0x00);
8761
+ // L = ~25% correction.
8762
+ static Q = new ECLevel('Q', 2, 0x03);
8763
+ // L = ~30% correction.
8764
+ static H = new ECLevel('H', 3, 0x02);
8765
+ constructor(name, level, bits) {
8766
+ this.#bits = bits;
8767
+ this.#name = name;
8768
+ this.#level = level;
8769
+ VALUES_TO_ECLEVEL.set(bits, this);
8770
+ }
8771
+ get bits() {
8772
+ return this.#bits;
8773
+ }
8774
+ get name() {
8775
+ return this.#name;
8776
+ }
8777
+ get level() {
8778
+ return this.#level;
8779
+ }
8780
+ }
8781
+
8782
+ /**
8783
+ * @module QRCode
8784
+ * @package @nuintun/qrcode
8785
+ * @license MIT
8786
+ * @version 5.0.2
8787
+ * @author nuintun <nuintun@qq.com>
8788
+ * @description A pure JavaScript QRCode encode and decode library.
8789
+ * @see https://github.com/nuintun/qrcode#readme
8790
+ */
8791
+
8792
+ /**
8793
+ * @module ECB
8794
+ */
8795
+ class ECB {
8796
+ #count;
8797
+ #numDataCodewords;
8798
+ constructor(count, numDataCodewords) {
8799
+ this.#count = count;
8800
+ this.#numDataCodewords = numDataCodewords;
8801
+ }
8802
+ get count() {
8803
+ return this.#count;
8804
+ }
8805
+ get numDataCodewords() {
8806
+ return this.#numDataCodewords;
8807
+ }
8808
+ }
8809
+
8810
+ /**
8811
+ * @module QRCode
8812
+ * @package @nuintun/qrcode
8813
+ * @license MIT
8814
+ * @version 5.0.2
8815
+ * @author nuintun <nuintun@qq.com>
8816
+ * @description A pure JavaScript QRCode encode and decode library.
8817
+ * @see https://github.com/nuintun/qrcode#readme
8818
+ */
8819
+
8820
+ /**
8821
+ * @module ECBlocks
8822
+ */
8823
+ class ECBlocks {
8824
+ #ecBlocks;
8825
+ #numTotalCodewords;
8826
+ #numTotalECCodewords;
8827
+ #numTotalDataCodewords;
8828
+ #numECCodewordsPerBlock;
8829
+ constructor(numECCodewordsPerBlock, ...ecBlocks) {
8830
+ let numBlocks = 0;
8831
+ let numTotalDataCodewords = 0;
8832
+ for (const { count, numDataCodewords } of ecBlocks) {
8833
+ numBlocks += count;
8834
+ numTotalDataCodewords += numDataCodewords * count;
8835
+ }
8836
+ const numTotalECCodewords = numECCodewordsPerBlock * numBlocks;
8837
+ this.#ecBlocks = ecBlocks;
8838
+ this.#numTotalECCodewords = numTotalECCodewords;
8839
+ this.#numTotalDataCodewords = numTotalDataCodewords;
8840
+ this.#numECCodewordsPerBlock = numECCodewordsPerBlock;
8841
+ this.#numTotalCodewords = numTotalDataCodewords + numTotalECCodewords;
8842
+ }
8843
+ get ecBlocks() {
8844
+ return this.#ecBlocks;
8845
+ }
8846
+ get numTotalCodewords() {
8847
+ return this.#numTotalCodewords;
8848
+ }
8849
+ get numTotalECCodewords() {
8850
+ return this.#numTotalECCodewords;
8851
+ }
8852
+ get numTotalDataCodewords() {
8853
+ return this.#numTotalDataCodewords;
8854
+ }
8855
+ get numECCodewordsPerBlock() {
8856
+ return this.#numECCodewordsPerBlock;
8857
+ }
8858
+ }
8859
+
8860
+ /**
8861
+ * @module QRCode
8862
+ * @package @nuintun/qrcode
8863
+ * @license MIT
8864
+ * @version 5.0.2
8865
+ * @author nuintun <nuintun@qq.com>
8866
+ * @description A pure JavaScript QRCode encode and decode library.
8867
+ * @see https://github.com/nuintun/qrcode#readme
8868
+ */
8869
+
8870
+ class Version {
8871
+ #size;
8872
+ #version;
8873
+ #ecBlocks;
8874
+ #alignmentPatterns;
8875
+ constructor(version, alignmentPatterns, ...ecBlocks) {
8876
+ this.#version = version;
8877
+ this.#ecBlocks = ecBlocks;
8878
+ this.#size = 17 + 4 * version;
8879
+ this.#alignmentPatterns = alignmentPatterns;
8880
+ }
8881
+ get size() {
8882
+ return this.#size;
8883
+ }
8884
+ get version() {
8885
+ return this.#version;
8886
+ }
8887
+ get alignmentPatterns() {
8888
+ return this.#alignmentPatterns;
8889
+ }
8890
+ getECBlocks({ level }) {
8891
+ return this.#ecBlocks[level];
8892
+ }
8893
+ }
8894
+ const VERSIONS = [
8895
+ new Version(
8896
+ 1,
8897
+ [],
8898
+ new ECBlocks(7, new ECB(1, 19)),
8899
+ new ECBlocks(10, new ECB(1, 16)),
8900
+ new ECBlocks(13, new ECB(1, 13)),
8901
+ new ECBlocks(17, new ECB(1, 9))
8902
+ ),
8903
+ new Version(
8904
+ 2,
8905
+ [6, 18],
8906
+ new ECBlocks(10, new ECB(1, 34)),
8907
+ new ECBlocks(16, new ECB(1, 28)),
8908
+ new ECBlocks(22, new ECB(1, 22)),
8909
+ new ECBlocks(28, new ECB(1, 16))
8910
+ ),
8911
+ new Version(
8912
+ 3,
8913
+ [6, 22],
8914
+ new ECBlocks(15, new ECB(1, 55)),
8915
+ new ECBlocks(26, new ECB(1, 44)),
8916
+ new ECBlocks(18, new ECB(2, 17)),
8917
+ new ECBlocks(22, new ECB(2, 13))
8918
+ ),
8919
+ new Version(
8920
+ 4,
8921
+ [6, 26],
8922
+ new ECBlocks(20, new ECB(1, 80)),
8923
+ new ECBlocks(18, new ECB(2, 32)),
8924
+ new ECBlocks(26, new ECB(2, 24)),
8925
+ new ECBlocks(16, new ECB(4, 9))
8926
+ ),
8927
+ new Version(
8928
+ 5,
8929
+ [6, 30],
8930
+ new ECBlocks(26, new ECB(1, 108)),
8931
+ new ECBlocks(24, new ECB(2, 43)),
8932
+ new ECBlocks(18, new ECB(2, 15), new ECB(2, 16)),
8933
+ new ECBlocks(22, new ECB(2, 11), new ECB(2, 12))
8934
+ ),
8935
+ new Version(
8936
+ 6,
8937
+ [6, 34],
8938
+ new ECBlocks(18, new ECB(2, 68)),
8939
+ new ECBlocks(16, new ECB(4, 27)),
8940
+ new ECBlocks(24, new ECB(4, 19)),
8941
+ new ECBlocks(28, new ECB(4, 15))
8942
+ ),
8943
+ new Version(
8944
+ 7,
8945
+ [6, 22, 38],
8946
+ new ECBlocks(20, new ECB(2, 78)),
8947
+ new ECBlocks(18, new ECB(4, 31)),
8948
+ new ECBlocks(18, new ECB(2, 14), new ECB(4, 15)),
8949
+ new ECBlocks(26, new ECB(4, 13), new ECB(1, 14))
8950
+ ),
8951
+ new Version(
8952
+ 8,
8953
+ [6, 24, 42],
8954
+ new ECBlocks(24, new ECB(2, 97)),
8955
+ new ECBlocks(22, new ECB(2, 38), new ECB(2, 39)),
8956
+ new ECBlocks(22, new ECB(4, 18), new ECB(2, 19)),
8957
+ new ECBlocks(26, new ECB(4, 14), new ECB(2, 15))
8958
+ ),
8959
+ new Version(
8960
+ 9,
8961
+ [6, 26, 46],
8962
+ new ECBlocks(30, new ECB(2, 116)),
8963
+ new ECBlocks(22, new ECB(3, 36), new ECB(2, 37)),
8964
+ new ECBlocks(20, new ECB(4, 16), new ECB(4, 17)),
8965
+ new ECBlocks(24, new ECB(4, 12), new ECB(4, 13))
8966
+ ),
8967
+ new Version(
8968
+ 10,
8969
+ [6, 28, 50],
8970
+ new ECBlocks(18, new ECB(2, 68), new ECB(2, 69)),
8971
+ new ECBlocks(26, new ECB(4, 43), new ECB(1, 44)),
8972
+ new ECBlocks(24, new ECB(6, 19), new ECB(2, 20)),
8973
+ new ECBlocks(28, new ECB(6, 15), new ECB(2, 16))
8974
+ ),
8975
+ new Version(
8976
+ 11,
8977
+ [6, 30, 54],
8978
+ new ECBlocks(20, new ECB(4, 81)),
8979
+ new ECBlocks(30, new ECB(1, 50), new ECB(4, 51)),
8980
+ new ECBlocks(28, new ECB(4, 22), new ECB(4, 23)),
8981
+ new ECBlocks(24, new ECB(3, 12), new ECB(8, 13))
8982
+ ),
8983
+ new Version(
8984
+ 12,
8985
+ [6, 32, 58],
8986
+ new ECBlocks(24, new ECB(2, 92), new ECB(2, 93)),
8987
+ new ECBlocks(22, new ECB(6, 36), new ECB(2, 37)),
8988
+ new ECBlocks(26, new ECB(4, 20), new ECB(6, 21)),
8989
+ new ECBlocks(28, new ECB(7, 14), new ECB(4, 15))
8990
+ ),
8991
+ new Version(
8992
+ 13,
8993
+ [6, 34, 62],
8994
+ new ECBlocks(26, new ECB(4, 107)),
8995
+ new ECBlocks(22, new ECB(8, 37), new ECB(1, 38)),
8996
+ new ECBlocks(24, new ECB(8, 20), new ECB(4, 21)),
8997
+ new ECBlocks(22, new ECB(12, 11), new ECB(4, 12))
8998
+ ),
8999
+ new Version(
9000
+ 14,
9001
+ [6, 26, 46, 66],
9002
+ new ECBlocks(30, new ECB(3, 115), new ECB(1, 116)),
9003
+ new ECBlocks(24, new ECB(4, 40), new ECB(5, 41)),
9004
+ new ECBlocks(20, new ECB(11, 16), new ECB(5, 17)),
9005
+ new ECBlocks(24, new ECB(11, 12), new ECB(5, 13))
9006
+ ),
9007
+ new Version(
9008
+ 15,
9009
+ [6, 26, 48, 70],
9010
+ new ECBlocks(22, new ECB(5, 87), new ECB(1, 88)),
9011
+ new ECBlocks(24, new ECB(5, 41), new ECB(5, 42)),
9012
+ new ECBlocks(30, new ECB(5, 24), new ECB(7, 25)),
9013
+ new ECBlocks(24, new ECB(11, 12), new ECB(7, 13))
9014
+ ),
9015
+ new Version(
9016
+ 16,
9017
+ [6, 26, 50, 74],
9018
+ new ECBlocks(24, new ECB(5, 98), new ECB(1, 99)),
9019
+ new ECBlocks(28, new ECB(7, 45), new ECB(3, 46)),
9020
+ new ECBlocks(24, new ECB(15, 19), new ECB(2, 20)),
9021
+ new ECBlocks(30, new ECB(3, 15), new ECB(13, 16))
9022
+ ),
9023
+ new Version(
9024
+ 17,
9025
+ [6, 30, 54, 78],
9026
+ new ECBlocks(28, new ECB(1, 107), new ECB(5, 108)),
9027
+ new ECBlocks(28, new ECB(10, 46), new ECB(1, 47)),
9028
+ new ECBlocks(28, new ECB(1, 22), new ECB(15, 23)),
9029
+ new ECBlocks(28, new ECB(2, 14), new ECB(17, 15))
9030
+ ),
9031
+ new Version(
9032
+ 18,
9033
+ [6, 30, 56, 82],
9034
+ new ECBlocks(30, new ECB(5, 120), new ECB(1, 121)),
9035
+ new ECBlocks(26, new ECB(9, 43), new ECB(4, 44)),
9036
+ new ECBlocks(28, new ECB(17, 22), new ECB(1, 23)),
9037
+ new ECBlocks(28, new ECB(2, 14), new ECB(19, 15))
9038
+ ),
9039
+ new Version(
9040
+ 19,
9041
+ [6, 30, 58, 86],
9042
+ new ECBlocks(28, new ECB(3, 113), new ECB(4, 114)),
9043
+ new ECBlocks(26, new ECB(3, 44), new ECB(11, 45)),
9044
+ new ECBlocks(26, new ECB(17, 21), new ECB(4, 22)),
9045
+ new ECBlocks(26, new ECB(9, 13), new ECB(16, 14))
9046
+ ),
9047
+ new Version(
9048
+ 20,
9049
+ [6, 34, 62, 90],
9050
+ new ECBlocks(28, new ECB(3, 107), new ECB(5, 108)),
9051
+ new ECBlocks(26, new ECB(3, 41), new ECB(13, 42)),
9052
+ new ECBlocks(30, new ECB(15, 24), new ECB(5, 25)),
9053
+ new ECBlocks(28, new ECB(15, 15), new ECB(10, 16))
9054
+ ),
9055
+ new Version(
9056
+ 21,
9057
+ [6, 28, 50, 72, 94],
9058
+ new ECBlocks(28, new ECB(4, 116), new ECB(4, 117)),
9059
+ new ECBlocks(26, new ECB(17, 42)),
9060
+ new ECBlocks(28, new ECB(17, 22), new ECB(6, 23)),
9061
+ new ECBlocks(30, new ECB(19, 16), new ECB(6, 17))
9062
+ ),
9063
+ new Version(
9064
+ 22,
9065
+ [6, 26, 50, 74, 98],
9066
+ new ECBlocks(28, new ECB(2, 111), new ECB(7, 112)),
9067
+ new ECBlocks(28, new ECB(17, 46)),
9068
+ new ECBlocks(30, new ECB(7, 24), new ECB(16, 25)),
9069
+ new ECBlocks(24, new ECB(34, 13))
9070
+ ),
9071
+ new Version(
9072
+ 23,
9073
+ [6, 30, 54, 78, 102],
9074
+ new ECBlocks(30, new ECB(4, 121), new ECB(5, 122)),
9075
+ new ECBlocks(28, new ECB(4, 47), new ECB(14, 48)),
9076
+ new ECBlocks(30, new ECB(11, 24), new ECB(14, 25)),
9077
+ new ECBlocks(30, new ECB(16, 15), new ECB(14, 16))
9078
+ ),
9079
+ new Version(
9080
+ 24,
9081
+ [6, 28, 54, 80, 106],
9082
+ new ECBlocks(30, new ECB(6, 117), new ECB(4, 118)),
9083
+ new ECBlocks(28, new ECB(6, 45), new ECB(14, 46)),
9084
+ new ECBlocks(30, new ECB(11, 24), new ECB(16, 25)),
9085
+ new ECBlocks(30, new ECB(30, 16), new ECB(2, 17))
9086
+ ),
9087
+ new Version(
9088
+ 25,
9089
+ [6, 32, 58, 84, 110],
9090
+ new ECBlocks(26, new ECB(8, 106), new ECB(4, 107)),
9091
+ new ECBlocks(28, new ECB(8, 47), new ECB(13, 48)),
9092
+ new ECBlocks(30, new ECB(7, 24), new ECB(22, 25)),
9093
+ new ECBlocks(30, new ECB(22, 15), new ECB(13, 16))
9094
+ ),
9095
+ new Version(
9096
+ 26,
9097
+ [6, 30, 58, 86, 114],
9098
+ new ECBlocks(28, new ECB(10, 114), new ECB(2, 115)),
9099
+ new ECBlocks(28, new ECB(19, 46), new ECB(4, 47)),
9100
+ new ECBlocks(28, new ECB(28, 22), new ECB(6, 23)),
9101
+ new ECBlocks(30, new ECB(33, 16), new ECB(4, 17))
9102
+ ),
9103
+ new Version(
9104
+ 27,
9105
+ [6, 34, 62, 90, 118],
9106
+ new ECBlocks(30, new ECB(8, 122), new ECB(4, 123)),
9107
+ new ECBlocks(28, new ECB(22, 45), new ECB(3, 46)),
9108
+ new ECBlocks(30, new ECB(8, 23), new ECB(26, 24)),
9109
+ new ECBlocks(30, new ECB(12, 15), new ECB(28, 16))
9110
+ ),
9111
+ new Version(
9112
+ 28,
9113
+ [6, 26, 50, 74, 98, 122],
9114
+ new ECBlocks(30, new ECB(3, 117), new ECB(10, 118)),
9115
+ new ECBlocks(28, new ECB(3, 45), new ECB(23, 46)),
9116
+ new ECBlocks(30, new ECB(4, 24), new ECB(31, 25)),
9117
+ new ECBlocks(30, new ECB(11, 15), new ECB(31, 16))
9118
+ ),
9119
+ new Version(
9120
+ 29,
9121
+ [6, 30, 54, 78, 102, 126],
9122
+ new ECBlocks(30, new ECB(7, 116), new ECB(7, 117)),
9123
+ new ECBlocks(28, new ECB(21, 45), new ECB(7, 46)),
9124
+ new ECBlocks(30, new ECB(1, 23), new ECB(37, 24)),
9125
+ new ECBlocks(30, new ECB(19, 15), new ECB(26, 16))
9126
+ ),
9127
+ new Version(
9128
+ 30,
9129
+ [6, 26, 52, 78, 104, 130],
9130
+ new ECBlocks(30, new ECB(5, 115), new ECB(10, 116)),
9131
+ new ECBlocks(28, new ECB(19, 47), new ECB(10, 48)),
9132
+ new ECBlocks(30, new ECB(15, 24), new ECB(25, 25)),
9133
+ new ECBlocks(30, new ECB(23, 15), new ECB(25, 16))
9134
+ ),
9135
+ new Version(
9136
+ 31,
9137
+ [6, 30, 56, 82, 108, 134],
9138
+ new ECBlocks(30, new ECB(13, 115), new ECB(3, 116)),
9139
+ new ECBlocks(28, new ECB(2, 46), new ECB(29, 47)),
9140
+ new ECBlocks(30, new ECB(42, 24), new ECB(1, 25)),
9141
+ new ECBlocks(30, new ECB(23, 15), new ECB(28, 16))
9142
+ ),
9143
+ new Version(
9144
+ 32,
9145
+ [6, 34, 60, 86, 112, 138],
9146
+ new ECBlocks(30, new ECB(17, 115)),
9147
+ new ECBlocks(28, new ECB(10, 46), new ECB(23, 47)),
9148
+ new ECBlocks(30, new ECB(10, 24), new ECB(35, 25)),
9149
+ new ECBlocks(30, new ECB(19, 15), new ECB(35, 16))
9150
+ ),
9151
+ new Version(
9152
+ 33,
9153
+ [6, 30, 58, 86, 114, 142],
9154
+ new ECBlocks(30, new ECB(17, 115), new ECB(1, 116)),
9155
+ new ECBlocks(28, new ECB(14, 46), new ECB(21, 47)),
9156
+ new ECBlocks(30, new ECB(29, 24), new ECB(19, 25)),
9157
+ new ECBlocks(30, new ECB(11, 15), new ECB(46, 16))
9158
+ ),
9159
+ new Version(
9160
+ 34,
9161
+ [6, 34, 62, 90, 118, 146],
9162
+ new ECBlocks(30, new ECB(13, 115), new ECB(6, 116)),
9163
+ new ECBlocks(28, new ECB(14, 46), new ECB(23, 47)),
9164
+ new ECBlocks(30, new ECB(44, 24), new ECB(7, 25)),
9165
+ new ECBlocks(30, new ECB(59, 16), new ECB(1, 17))
9166
+ ),
9167
+ new Version(
9168
+ 35,
9169
+ [6, 30, 54, 78, 102, 126, 150],
9170
+ new ECBlocks(30, new ECB(12, 121), new ECB(7, 122)),
9171
+ new ECBlocks(28, new ECB(12, 47), new ECB(26, 48)),
9172
+ new ECBlocks(30, new ECB(39, 24), new ECB(14, 25)),
9173
+ new ECBlocks(30, new ECB(22, 15), new ECB(41, 16))
9174
+ ),
9175
+ new Version(
9176
+ 36,
9177
+ [6, 24, 50, 76, 102, 128, 154],
9178
+ new ECBlocks(30, new ECB(6, 121), new ECB(14, 122)),
9179
+ new ECBlocks(28, new ECB(6, 47), new ECB(34, 48)),
9180
+ new ECBlocks(30, new ECB(46, 24), new ECB(10, 25)),
9181
+ new ECBlocks(30, new ECB(2, 15), new ECB(64, 16))
9182
+ ),
9183
+ new Version(
9184
+ 37,
9185
+ [6, 28, 54, 80, 106, 132, 158],
9186
+ new ECBlocks(30, new ECB(17, 122), new ECB(4, 123)),
9187
+ new ECBlocks(28, new ECB(29, 46), new ECB(14, 47)),
9188
+ new ECBlocks(30, new ECB(49, 24), new ECB(10, 25)),
9189
+ new ECBlocks(30, new ECB(24, 15), new ECB(46, 16))
9190
+ ),
9191
+ new Version(
9192
+ 38,
9193
+ [6, 32, 58, 84, 110, 136, 162],
9194
+ new ECBlocks(30, new ECB(4, 122), new ECB(18, 123)),
9195
+ new ECBlocks(28, new ECB(13, 46), new ECB(32, 47)),
9196
+ new ECBlocks(30, new ECB(48, 24), new ECB(14, 25)),
9197
+ new ECBlocks(30, new ECB(42, 15), new ECB(32, 16))
9198
+ ),
9199
+ new Version(
9200
+ 39,
9201
+ [6, 26, 54, 82, 110, 138, 166],
9202
+ new ECBlocks(30, new ECB(20, 117), new ECB(4, 118)),
9203
+ new ECBlocks(28, new ECB(40, 47), new ECB(7, 48)),
9204
+ new ECBlocks(30, new ECB(43, 24), new ECB(22, 25)),
9205
+ new ECBlocks(30, new ECB(10, 15), new ECB(67, 16))
9206
+ ),
9207
+ new Version(
9208
+ 40,
9209
+ [6, 30, 58, 86, 114, 142, 170],
9210
+ new ECBlocks(30, new ECB(19, 118), new ECB(6, 119)),
9211
+ new ECBlocks(28, new ECB(18, 47), new ECB(31, 48)),
9212
+ new ECBlocks(30, new ECB(34, 24), new ECB(34, 25)),
9213
+ new ECBlocks(30, new ECB(20, 15), new ECB(61, 16))
9214
+ )
9215
+ ];
9216
+
9217
+ /**
9218
+ * @module QRCode
9219
+ * @package @nuintun/qrcode
9220
+ * @license MIT
9221
+ * @version 5.0.2
9222
+ * @author nuintun <nuintun@qq.com>
9223
+ * @description A pure JavaScript QRCode encode and decode library.
9224
+ * @see https://github.com/nuintun/qrcode#readme
9225
+ */
9226
+
9227
+ /**
9228
+ * @module Polynomial
9229
+ */
9230
+ class Polynomial {
9231
+ #field;
9232
+ #coefficients;
9233
+ constructor(field, coefficients) {
9234
+ const { length } = coefficients;
9235
+ if (length <= 0) {
9236
+ throw new Error('polynomial coefficients cannot empty');
9237
+ }
9238
+ this.#field = field;
9239
+ if (length > 1 && coefficients[0] === 0) {
9240
+ // Leading term must be non-zero for anything except the constant polynomial "0".
9241
+ let firstNonZero = 1;
9242
+ while (firstNonZero < length && coefficients[firstNonZero] === 0) {
9243
+ firstNonZero++;
9244
+ }
9245
+ if (firstNonZero === length) {
9246
+ this.#coefficients = new Int32Array([0]);
9247
+ } else {
9248
+ const array = new Int32Array(length - firstNonZero);
9249
+ array.set(coefficients.subarray(firstNonZero));
9250
+ this.#coefficients = array;
9251
+ }
9252
+ } else {
9253
+ this.#coefficients = coefficients;
9254
+ }
9255
+ }
9256
+ get coefficients() {
9257
+ return this.#coefficients;
9258
+ }
9259
+ isZero() {
9260
+ return this.#coefficients[0] === 0;
9261
+ }
9262
+ getDegree() {
9263
+ return this.#coefficients.length - 1;
9264
+ }
9265
+ getCoefficient(degree) {
9266
+ const coefficients = this.#coefficients;
9267
+ return coefficients[coefficients.length - 1 - degree];
9268
+ }
9269
+ evaluate(a) {
9270
+ if (a === 0) {
9271
+ // Just return the x^0 coefficient.
9272
+ return this.getCoefficient(0);
9273
+ }
9274
+ let result;
9275
+ const coefficients = this.#coefficients;
9276
+ if (a === 1) {
9277
+ // Just the sum of the coefficients.
9278
+ result = 0;
9279
+ for (const coefficient of coefficients) {
9280
+ result ^= coefficient;
9281
+ }
9282
+ return result;
9283
+ }
9284
+ [result] = coefficients;
9285
+ const field = this.#field;
9286
+ const { length } = coefficients;
9287
+ for (let i = 1; i < length; i++) {
9288
+ result = field.multiply(a, result) ^ coefficients[i];
9289
+ }
9290
+ return result;
9291
+ }
9292
+ multiply(other) {
9293
+ const field = this.#field;
9294
+ const coefficients = this.#coefficients;
9295
+ const { length } = coefficients;
9296
+ if (other instanceof Polynomial) {
9297
+ if (this.isZero() || other.isZero()) {
9298
+ return field.zero;
9299
+ }
9300
+ const otherCoefficients = other.#coefficients;
9301
+ const otherLength = otherCoefficients.length;
9302
+ const product = new Int32Array(length + otherLength - 1);
9303
+ for (let i = 0; i < length; i++) {
9304
+ const coefficient = coefficients[i];
9305
+ for (let j = 0; j < otherLength; j++) {
9306
+ product[i + j] ^= field.multiply(coefficient, otherCoefficients[j]);
9307
+ }
9308
+ }
9309
+ return new Polynomial(field, product);
9310
+ }
9311
+ if (other === 0) {
9312
+ return field.zero;
9313
+ }
9314
+ if (other === 1) {
9315
+ return this;
9316
+ }
9317
+ const product = new Int32Array(length);
9318
+ for (let i = 0; i < length; i++) {
9319
+ product[i] = field.multiply(coefficients[i], other);
9320
+ }
9321
+ return new Polynomial(field, product);
9322
+ }
9323
+ multiplyByMonomial(degree, coefficient) {
9324
+ const field = this.#field;
9325
+ if (coefficient === 0) {
9326
+ return field.zero;
9327
+ }
9328
+ const coefficients = this.#coefficients;
9329
+ const { length } = coefficients;
9330
+ const product = new Int32Array(length + degree);
9331
+ for (let i = 0; i < length; i++) {
9332
+ product[i] = field.multiply(coefficients[i], coefficient);
9333
+ }
9334
+ return new Polynomial(field, product);
9335
+ }
9336
+ addOrSubtract(other) {
9337
+ if (this.isZero()) {
9338
+ return other;
9339
+ }
9340
+ if (other.isZero()) {
9341
+ return this;
9342
+ }
9343
+ let largerCoefficients = other.#coefficients;
9344
+ let largerLength = largerCoefficients.length;
9345
+ let smallerCoefficients = this.#coefficients;
9346
+ let smallerLength = smallerCoefficients.length;
9347
+ if (largerLength < smallerLength) {
9348
+ [largerLength, smallerLength] = [smallerLength, largerLength];
9349
+ [largerCoefficients, smallerCoefficients] = [smallerCoefficients, largerCoefficients];
9350
+ }
9351
+ // Diff index offset.
9352
+ const offset = largerLength - smallerLength;
9353
+ const coefficients = new Int32Array(largerLength);
9354
+ // Copy high-order terms only found in higher-degree polynomial's coefficients.
9355
+ coefficients.set(largerCoefficients.subarray(0, offset));
9356
+ for (let i = offset; i < largerLength; i++) {
9357
+ coefficients[i] = smallerCoefficients[i - offset] ^ largerCoefficients[i];
9358
+ }
9359
+ return new Polynomial(this.#field, coefficients);
9360
+ }
9361
+ divide(other) {
9362
+ const field = this.#field;
9363
+ let quotient = field.zero;
9364
+ let remainder = this;
9365
+ const denominatorLeadingTerm = other.getCoefficient(other.getDegree());
9366
+ const invertDenominatorLeadingTerm = field.invert(denominatorLeadingTerm);
9367
+ while (remainder.getDegree() >= other.getDegree() && !remainder.isZero()) {
9368
+ const remainderDegree = remainder.getDegree();
9369
+ const degreeDiff = remainderDegree - other.getDegree();
9370
+ const scale = field.multiply(remainder.getCoefficient(remainderDegree), invertDenominatorLeadingTerm);
9371
+ const term = other.multiplyByMonomial(degreeDiff, scale);
9372
+ const iterationQuotient = field.buildPolynomial(degreeDiff, scale);
9373
+ quotient = quotient.addOrSubtract(iterationQuotient);
9374
+ remainder = remainder.addOrSubtract(term);
9375
+ }
9376
+ return [quotient, remainder];
9377
+ }
9378
+ }
9379
+
9380
+ /**
9381
+ * @module QRCode
9382
+ * @package @nuintun/qrcode
9383
+ * @license MIT
9384
+ * @version 5.0.2
9385
+ * @author nuintun <nuintun@qq.com>
9386
+ * @description A pure JavaScript QRCode encode and decode library.
9387
+ * @see https://github.com/nuintun/qrcode#readme
9388
+ */
9389
+
9390
+
9391
+ /**
9392
+ * @module GaloisField
9393
+ */
9394
+ class GaloisField {
9395
+ #size;
9396
+ #one;
9397
+ #zero;
9398
+ #generator;
9399
+ #expTable;
9400
+ #logTable;
9401
+ constructor(primitive, size, generator) {
9402
+ let x = 1;
9403
+ const expTable = new Int32Array(size);
9404
+ for (let i = 0; i < size; i++) {
9405
+ expTable[i] = x;
9406
+ // We're assuming the generator alpha is 2.
9407
+ x *= 2;
9408
+ if (x >= size) {
9409
+ x ^= primitive;
9410
+ x &= size - 1;
9411
+ }
9412
+ }
9413
+ const logTable = new Int32Array(size);
9414
+ for (let i = 0, length = size - 1; i < length; i++) {
9415
+ logTable[expTable[i]] = i;
9416
+ }
9417
+ this.#size = size;
9418
+ this.#expTable = expTable;
9419
+ this.#logTable = logTable;
9420
+ this.#generator = generator;
9421
+ this.#one = new Polynomial(this, new Int32Array([1]));
9422
+ this.#zero = new Polynomial(this, new Int32Array([0]));
9423
+ }
9424
+ get size() {
9425
+ return this.#size;
9426
+ }
9427
+ get one() {
9428
+ return this.#one;
9429
+ }
9430
+ get zero() {
9431
+ return this.#zero;
9432
+ }
9433
+ get generator() {
9434
+ return this.#generator;
9435
+ }
9436
+ exp(a) {
9437
+ return this.#expTable[a];
9438
+ }
9439
+ log(a) {
9440
+ return this.#logTable[a];
9441
+ }
9442
+ invert(a) {
9443
+ return this.#expTable[this.#size - this.#logTable[a] - 1];
9444
+ }
9445
+ multiply(a, b) {
9446
+ if (a === 0 || b === 0) {
9447
+ return 0;
9448
+ }
9449
+ const logTable = this.#logTable;
9450
+ return this.#expTable[(logTable[a] + logTable[b]) % (this.#size - 1)];
9451
+ }
9452
+ buildPolynomial(degree, coefficient) {
9453
+ if (coefficient === 0) {
9454
+ return this.#zero;
9455
+ }
9456
+ const coefficients = new Int32Array(degree + 1);
9457
+ coefficients[0] = coefficient;
9458
+ return new Polynomial(this, coefficients);
9459
+ }
9460
+ }
9461
+ const QR_CODE_FIELD_256 = new GaloisField(0x011d, 256, 0);
9462
+
9463
+ /**
9464
+ * @module QRCode
9465
+ * @package @nuintun/qrcode
9466
+ * @license MIT
9467
+ * @version 5.0.2
9468
+ * @author nuintun <nuintun@qq.com>
9469
+ * @description A pure JavaScript QRCode encode and decode library.
9470
+ * @see https://github.com/nuintun/qrcode#readme
9471
+ */
9472
+
9473
+
9474
+ /**
9475
+ * @module index
9476
+ */
9477
+ function getUnicodeCodes(content, maxCode) {
9478
+ const bytes = [];
9479
+ for (const character of content) {
9480
+ const code = character.codePointAt(0);
9481
+ // If gt max code, push "?".
9482
+ bytes.push(code == null || code > maxCode ? 63 : code);
9483
+ }
9484
+ return new Uint8Array(bytes);
9485
+ }
9486
+ function encode$1(content, charset) {
9487
+ switch (charset) {
9488
+ case Charset.ASCII:
9489
+ return getUnicodeCodes(content, 0x7f);
9490
+ case Charset.ISO_8859_1:
9491
+ return getUnicodeCodes(content, 0xff);
9492
+ case Charset.UTF_8:
9493
+ return new TextEncoder().encode(content);
9494
+ default:
9495
+ throw Error(`built-in encode not support charset: ${charset.label}`);
9496
+ }
9497
+ }
9498
+
9499
+ /**
9500
+ * @module QRCode
9501
+ * @package @nuintun/qrcode
9502
+ * @license MIT
9503
+ * @version 5.0.2
9504
+ * @author nuintun <nuintun@qq.com>
9505
+ * @description A pure JavaScript QRCode encode and decode library.
9506
+ * @see https://github.com/nuintun/qrcode#readme
9507
+ */
9508
+
9509
+
9510
+ /**
9511
+ * @module BitArray
9512
+ */
9513
+ const LOAD_FACTOR = 0.75;
9514
+ function offset(index) {
9515
+ return toInt32(index / 32);
9516
+ }
9517
+ function makeArray(length) {
9518
+ return new Int32Array(Math.ceil(length / 32));
9519
+ }
9520
+ class BitArray {
9521
+ #length;
9522
+ #bits;
9523
+ constructor(length = 0) {
9524
+ this.#length = length;
9525
+ this.#bits = makeArray(length);
9526
+ }
9527
+ #alloc(length) {
9528
+ const bits = this.#bits;
9529
+ if (length > bits.length * 32) {
9530
+ const array = makeArray(Math.ceil(length / LOAD_FACTOR));
9531
+ array.set(bits);
9532
+ this.#bits = array;
9533
+ }
9534
+ this.#length = length;
9535
+ }
9536
+ get length() {
9537
+ return this.#length;
9538
+ }
9539
+ get byteLength() {
9540
+ return Math.ceil(this.#length / 8);
9541
+ }
9542
+ set(index) {
9543
+ this.#bits[offset(index)] |= getBitMask(index);
9544
+ }
9545
+ get(index) {
9546
+ return toBit(this.#bits[offset(index)] >>> getBitOffset(index));
9547
+ }
9548
+ xor(mask) {
9549
+ const bits = this.#bits;
9550
+ const maskBits = mask.#bits;
9551
+ const length = Math.min(this.#length, mask.#length);
9552
+ for (let i = 0; i < length; i++) {
9553
+ // The last int could be incomplete (i.e. not have 32 bits in
9554
+ // it) but there is no problem since 0 XOR 0 == 0.
9555
+ bits[i] ^= maskBits[i];
9556
+ }
9557
+ }
9558
+ append(value, length = 1) {
9559
+ let index = this.#length;
9560
+ if (value instanceof BitArray) {
9561
+ length = value.#length;
9562
+ this.#alloc(index + length);
9563
+ for (let i = 0; i < length; i++) {
9564
+ if (value.get(i) !== 0) {
9565
+ this.set(index);
9566
+ }
9567
+ index++;
9568
+ }
9569
+ } else {
9570
+ this.#alloc(index + length);
9571
+ for (let i = length - 1; i >= 0; i--) {
9572
+ if (toBit(value >>> i) !== 0) {
9573
+ this.set(index);
9574
+ }
9575
+ index++;
9576
+ }
9577
+ }
9578
+ }
9579
+ writeToUint8Array(bitOffset, target, byteOffset, byteLength) {
9580
+ for (let i = 0; i < byteLength; i++) {
9581
+ let byte = 0;
9582
+ for (let j = 0; j < 8; j++) {
9583
+ if (this.get(bitOffset++) !== 0) {
9584
+ byte |= 1 << (7 - j);
9585
+ }
9586
+ }
9587
+ target[byteOffset + i] = byte;
9588
+ }
9589
+ }
9590
+ clear() {
9591
+ this.#bits.fill(0);
9592
+ }
9593
+ }
9594
+
9595
+ /**
9596
+ * @module QRCode
9597
+ * @package @nuintun/qrcode
9598
+ * @license MIT
9599
+ * @version 5.0.2
9600
+ * @author nuintun <nuintun@qq.com>
9601
+ * @description A pure JavaScript QRCode encode and decode library.
9602
+ * @see https://github.com/nuintun/qrcode#readme
9603
+ */
9604
+
9605
+ /**
9606
+ * @module ByteMatrix
9607
+ */
9608
+ class ByteMatrix {
9609
+ #size;
9610
+ #bytes;
9611
+ constructor(size) {
9612
+ this.#size = size;
9613
+ this.#bytes = new Int8Array(size * size);
9614
+ }
9615
+ get size() {
9616
+ return this.#size;
9617
+ }
9618
+ set(x, y, value) {
9619
+ this.#bytes[y * this.#size + x] = value;
9620
+ }
9621
+ get(x, y) {
9622
+ return this.#bytes[y * this.#size + x];
9623
+ }
9624
+ clear(value) {
9625
+ this.#bytes.fill(value);
9626
+ }
9627
+ }
9628
+
9629
+ /**
9630
+ * @module QRCode
9631
+ * @package @nuintun/qrcode
9632
+ * @license MIT
9633
+ * @version 5.0.2
9634
+ * @author nuintun <nuintun@qq.com>
9635
+ * @description A pure JavaScript QRCode encode and decode library.
9636
+ * @see https://github.com/nuintun/qrcode#readme
9637
+ */
9638
+
9639
+
9640
+ /**
9641
+ * @module matrix
9642
+ */
9643
+ // Format information poly: 101 0011 0111.
9644
+ const FORMAT_INFO_POLY = 0x537;
9645
+ // Format information mask.
9646
+ const FORMAT_INFO_MASK = 0x5412;
9647
+ // Version information poly: 1 1111 0010 0101.
9648
+ const VERSION_INFO_POLY = 0x1f25;
9649
+ // Finder pattern shape.
9650
+ const FINDER_PATTERN_SHAPE = [
9651
+ [1, 1, 1, 1, 1, 1, 1],
9652
+ [1, 0, 0, 0, 0, 0, 1],
9653
+ [1, 0, 1, 1, 1, 0, 1],
9654
+ [1, 0, 1, 1, 1, 0, 1],
9655
+ [1, 0, 1, 1, 1, 0, 1],
9656
+ [1, 0, 0, 0, 0, 0, 1],
9657
+ [1, 1, 1, 1, 1, 1, 1]
9658
+ ];
9659
+ // Alignment pattern shape.
9660
+ const ALIGNMENT_PATTERN_SHAPE = [
9661
+ [1, 1, 1, 1, 1],
9662
+ [1, 0, 0, 0, 1],
9663
+ [1, 0, 1, 0, 1],
9664
+ [1, 0, 0, 0, 1],
9665
+ [1, 1, 1, 1, 1]
9666
+ ];
9667
+ // Format information coordinates.
9668
+ const FORMAT_INFO_COORDINATES = [
9669
+ [8, 0],
9670
+ [8, 1],
9671
+ [8, 2],
9672
+ [8, 3],
9673
+ [8, 4],
9674
+ [8, 5],
9675
+ [8, 7],
9676
+ [8, 8],
9677
+ [7, 8],
9678
+ [5, 8],
9679
+ [4, 8],
9680
+ [3, 8],
9681
+ [2, 8],
9682
+ [1, 8],
9683
+ [0, 8]
9684
+ ];
9685
+ // Is empty point.
9686
+ function isEmpty(matrix, x, y) {
9687
+ return matrix.get(x, y) === -1;
9688
+ }
9689
+ function embedFinderPattern(matrix, x, y) {
9690
+ for (let i = 0; i < 7; i++) {
9691
+ const pattern = FINDER_PATTERN_SHAPE[i];
9692
+ for (let j = 0; j < 7; j++) {
9693
+ matrix.set(x + j, y + i, pattern[j]);
8414
9694
  }
8415
- /**
8416
- * 模态框标题
8417
- */
8418
- modalTitle = '面试报告';
8419
- /**
8420
- * SDK鉴权密钥
8421
- */
8422
- token;
8423
- /**
8424
- * 是否显示聊天模态框
8425
- */
8426
- isOpen = false;
8427
- /**
8428
- * 当点击模态框关闭时触发
8429
- */
8430
- modalClosed;
8431
- /**
8432
- * 应用图标URL
8433
- */
8434
- icon;
8435
- /**
8436
- * 聊天框的页面层级
8437
- */
8438
- zIndex = 1000;
8439
- /**
8440
- * 是否展示顶部标题栏
8441
- */
8442
- isShowHeader = true;
8443
- /**
8444
- * 是否展示右上角的关闭按钮
8445
- */
8446
- isNeedClose = true;
8447
- /**
8448
- * 会话ID,传入继续对话,否则创建新会话
8449
- */
8450
- conversationId;
8451
- /**
8452
- * 默认查询文本
8453
- */
8454
- defaultQuery = '请开始分析';
8455
- /**
8456
- * 是否以全屏模式打开,移动端建议设置为true
8457
- */
8458
- fullscreen = false;
8459
- /**
8460
- * 自定义输入参数,传入customInputs.job_info时,会隐藏JD输入区域<br>
8461
- * 传入customInputs.file_urls时,会隐藏简历上传区域。<br>
8462
- * 传入customInputs.file_urls和customInputs.job_info时,会直接开始聊天。<br>
9695
+ }
9696
+ }
9697
+ function embedHorizontalSeparator(matrix, x, y) {
9698
+ for (let j = 0; j < 8; j++) {
9699
+ matrix.set(x + j, y, 0);
9700
+ }
9701
+ }
9702
+ function embedVerticalSeparator(matrix, x, y) {
9703
+ for (let i = 0; i < 7; i++) {
9704
+ matrix.set(x, y + i, 0);
9705
+ }
9706
+ }
9707
+ // Embed finder patterns and surrounding vertical/horizontal separators.
9708
+ function embedFinderPatternsAndSeparators(matrix) {
9709
+ // Embed three big squares at corners.
9710
+ const pdpWidth = 7;
9711
+ // Embed horizontal separation patterns around the squares.
9712
+ const hspWidth = 8;
9713
+ // Embed vertical separation patterns around the squares.
9714
+ const vspHeight = 7;
9715
+ // Matrix width
9716
+ const { size } = matrix;
9717
+ // Left top corner.
9718
+ embedFinderPattern(matrix, 0, 0);
9719
+ // Right top corner.
9720
+ embedFinderPattern(matrix, size - pdpWidth, 0);
9721
+ // Left bottom corner.
9722
+ embedFinderPattern(matrix, 0, size - pdpWidth);
9723
+ // Left top corner.
9724
+ embedHorizontalSeparator(matrix, 0, hspWidth - 1);
9725
+ // Right top corner.
9726
+ embedHorizontalSeparator(matrix, size - hspWidth, hspWidth - 1);
9727
+ // Left bottom corner.
9728
+ embedHorizontalSeparator(matrix, 0, size - hspWidth);
9729
+ // Left top corner.
9730
+ embedVerticalSeparator(matrix, vspHeight, 0);
9731
+ // Right top corner.
9732
+ embedVerticalSeparator(matrix, size - vspHeight - 1, 0);
9733
+ // Left bottom corner.
9734
+ embedVerticalSeparator(matrix, vspHeight, size - vspHeight);
9735
+ }
9736
+ function embedTimingPatterns(matrix) {
9737
+ const size = matrix.size - 8;
9738
+ // -8 is for skipping position detection patterns (7: size)
9739
+ // separation patterns (1: size). Thus, 8 = 7 + 1.
9740
+ for (let x = 8; x < size; x++) {
9741
+ const bit = (x + 1) & 0x01;
9742
+ // Horizontal line.
9743
+ if (isEmpty(matrix, x, 6)) {
9744
+ matrix.set(x, 6, bit);
9745
+ }
9746
+ }
9747
+ // -8 is for skipping position detection patterns (7: size)
9748
+ // separation patterns (1: size). Thus, 8 = 7 + 1.
9749
+ for (let y = 8; y < size; y++) {
9750
+ const bit = (y + 1) & 0x01;
9751
+ // Vertical line.
9752
+ if (isEmpty(matrix, 6, y)) {
9753
+ matrix.set(6, y, bit);
9754
+ }
9755
+ }
9756
+ }
9757
+ function embedAlignmentPattern(matrix, x, y) {
9758
+ for (let i = 0; i < 5; i++) {
9759
+ const pattern = ALIGNMENT_PATTERN_SHAPE[i];
9760
+ for (let j = 0; j < 5; j++) {
9761
+ matrix.set(x + j, y + i, pattern[j]);
9762
+ }
9763
+ }
9764
+ }
9765
+ // Embed position alignment patterns if need be.
9766
+ function embedAlignmentPatterns(matrix, { version }) {
9767
+ if (version >= 2) {
9768
+ const { alignmentPatterns } = VERSIONS[version - 1];
9769
+ const { length } = alignmentPatterns;
9770
+ for (let i = 0; i < length; i++) {
9771
+ const y = alignmentPatterns[i];
9772
+ for (let j = 0; j < length; j++) {
9773
+ const x = alignmentPatterns[j];
9774
+ if (isEmpty(matrix, x, y)) {
9775
+ // If the cell is unset, we embed the position alignment pattern here.
9776
+ // -2 is necessary since the x/y coordinates point to the center of the pattern, not the
9777
+ // left top corner.
9778
+ embedAlignmentPattern(matrix, x - 2, y - 2);
9779
+ }
9780
+ }
9781
+ }
9782
+ }
9783
+ }
9784
+ // Embed the lonely dark dot at left bottom corner. ISO/IEC 18004:2015(E)(p.56)
9785
+ function embedDarkModule(matrix) {
9786
+ matrix.set(8, matrix.size - 8, 1);
9787
+ }
9788
+ // Make bit vector of format information. On success, store the result in "bits".
9789
+ // Encode error correction level and mask pattern. See 8.9 of
9790
+ // ISO/IEC 18004:2015(E)(p.55) for details.
9791
+ function makeFormatInfoBits(bits, ecLevel, mask) {
9792
+ const formatInfo = (ecLevel.bits << 3) | mask;
9793
+ bits.append(formatInfo, 5);
9794
+ const bchCode = calculateBCHCode(formatInfo, FORMAT_INFO_POLY);
9795
+ bits.append(bchCode, 10);
9796
+ const maskBits = new BitArray();
9797
+ maskBits.append(FORMAT_INFO_MASK, 15);
9798
+ bits.xor(maskBits);
9799
+ }
9800
+ // Embed format information. On success, modify the matrix.
9801
+ function embedFormatInfo(matrix, ecLevel, mask) {
9802
+ const formatInfoBits = new BitArray();
9803
+ makeFormatInfoBits(formatInfoBits, ecLevel, mask);
9804
+ const { size } = matrix;
9805
+ const { length } = formatInfoBits;
9806
+ for (let i = 0; i < length; i++) {
9807
+ // Type info bits at the left top corner.
9808
+ const [x, y] = FORMAT_INFO_COORDINATES[i];
9809
+ // Place bits in LSB to MSB order. LSB (least significant bit) is the last value in formatInfoBits.
9810
+ const bit = formatInfoBits.get(length - 1 - i);
9811
+ matrix.set(x, y, bit);
9812
+ if (i < 8) {
9813
+ // Right top corner.
9814
+ matrix.set(size - i - 1, 8, bit);
9815
+ } else {
9816
+ // Left bottom corner.
9817
+ matrix.set(8, size - 7 + (i - 8), bit);
9818
+ }
9819
+ }
9820
+ // Then, embed the dark dot at the left bottom corner.
9821
+ embedDarkModule(matrix);
9822
+ }
9823
+ // Make bit vector of version information. On success, store the result in "bits".
9824
+ // See 7.10 of ISO/IEC 18004:2015(E)(p.58) for details.
9825
+ function makeVersionInfoBits(bits, version) {
9826
+ bits.append(version, 6);
9827
+ const bchCode = calculateBCHCode(version, VERSION_INFO_POLY);
9828
+ bits.append(bchCode, 12);
9829
+ }
9830
+ // Embed version information if need be. On success, modify the matrix.
9831
+ // See 7.10 of ISO/IEC 18004:2015(E)(p.58) for how to embed version information.
9832
+ function embedVersionInfo(matrix, { version }) {
9833
+ if (version >= 7) {
9834
+ const versionInfoBits = new BitArray();
9835
+ makeVersionInfoBits(versionInfoBits, version);
9836
+ // It will decrease from 17 to 0.
9837
+ let bitIndex = 6 * 3 - 1;
9838
+ const { size } = matrix;
9839
+ for (let i = 0; i < 6; i++) {
9840
+ for (let j = 0; j < 3; j++) {
9841
+ // Place bits in LSB (least significant bit) to MSB order.
9842
+ const bit = versionInfoBits.get(bitIndex--);
9843
+ // Left bottom corner.
9844
+ matrix.set(i, size - 11 + j, bit);
9845
+ // Right bottom corner.
9846
+ matrix.set(size - 11 + j, i, bit);
9847
+ }
9848
+ }
9849
+ }
9850
+ }
9851
+ // Embed "codewords". On success, modify the matrix.
9852
+ // See 7.7.3 of ISO/IEC 18004:2015(E)(p.46) for how to embed codewords.
9853
+ function embedCodewords(matrix, codewords, mask) {
9854
+ let bitIndex = 0;
9855
+ const { size } = matrix;
9856
+ const { length } = codewords;
9857
+ // Start from the right bottom cell.
9858
+ for (let x = size - 1; x >= 1; x -= 2) {
9859
+ // Skip the vertical timing pattern.
9860
+ if (x === 6) {
9861
+ x = 5;
9862
+ }
9863
+ for (let y = 0; y < size; y++) {
9864
+ for (let i = 0; i < 2; i++) {
9865
+ const offsetX = x - i;
9866
+ const upward = ((x + 1) & 2) === 0;
9867
+ const offsetY = upward ? size - 1 - y : y;
9868
+ // Skip the cell if it's not empty.
9869
+ if (isEmpty(matrix, offsetX, offsetY)) {
9870
+ // Padding bit. If there is no bit left, we'll fill the left cells with 0.
9871
+ let bit = 0;
9872
+ if (bitIndex < length) {
9873
+ bit = codewords.get(bitIndex++);
9874
+ }
9875
+ // Is apply mask.
9876
+ if (isApplyMask(mask, offsetX, offsetY)) {
9877
+ bit ^= 1;
9878
+ }
9879
+ matrix.set(offsetX, offsetY, bit);
9880
+ }
9881
+ }
9882
+ }
9883
+ }
9884
+ }
9885
+ // Embed function patterns. On success, modify the matrix.
9886
+ // The function patterns are:
9887
+ // - Finder patterns and separators
9888
+ // - Alignment patterns, if version >= 2
9889
+ // - Timing patterns
9890
+ function embedFunctionPatterns(matrix, version) {
9891
+ // Let's get started with embedding big squares at corners.
9892
+ embedFinderPatternsAndSeparators(matrix);
9893
+ // Alignment patterns appear if version >= 2.
9894
+ embedAlignmentPatterns(matrix, version);
9895
+ // Timing patterns should be embedded after position adj. patterns.
9896
+ embedTimingPatterns(matrix);
9897
+ }
9898
+ // Embed encoding region. On success, modify the matrix.
9899
+ // The encoding region are:
9900
+ // - Format Info
9901
+ // - Version Info, if version >= 7
9902
+ // - Data with correction
9903
+ function embedEncodingRegion(matrix, codewords, version, ecLevel, mask) {
9904
+ // Type information appear with any version.
9905
+ embedFormatInfo(matrix, ecLevel, mask);
9906
+ // Version info appear if version >= 7.
9907
+ embedVersionInfo(matrix, version);
9908
+ // Data should be embedded at end.
9909
+ embedCodewords(matrix, codewords, mask);
9910
+ }
9911
+ // Build 2D matrix of QR Code from "codewords" with "ecLevel", "version" and "getMaskPattern". On
9912
+ // success, store the result in "matrix".
9913
+ function buildMatrix(codewords, version, ecLevel, mask) {
9914
+ const matrix = new ByteMatrix(version.size);
9915
+ // Clear matrix.
9916
+ matrix.clear(-1);
9917
+ // Embed function patterns.
9918
+ embedFunctionPatterns(matrix, version);
9919
+ // Embed encoding region.
9920
+ embedEncodingRegion(matrix, codewords, version, ecLevel, mask);
9921
+ return matrix;
9922
+ }
9923
+
9924
+ /**
9925
+ * @module QRCode
9926
+ * @package @nuintun/qrcode
9927
+ * @license MIT
9928
+ * @version 5.0.2
9929
+ * @author nuintun <nuintun@qq.com>
9930
+ * @description A pure JavaScript QRCode encode and decode library.
9931
+ * @see https://github.com/nuintun/qrcode#readme
9932
+ */
9933
+
9934
+ /**
9935
+ * @module BlockPair
9936
+ */
9937
+ class BlockPair {
9938
+ #ecCodewords;
9939
+ #dataCodewords;
9940
+ constructor(dataCodewords, ecCodewords) {
9941
+ this.#ecCodewords = ecCodewords;
9942
+ this.#dataCodewords = dataCodewords;
9943
+ }
9944
+ get ecCodewords() {
9945
+ return this.#ecCodewords;
9946
+ }
9947
+ get dataCodewords() {
9948
+ return this.#dataCodewords;
9949
+ }
9950
+ }
9951
+
9952
+ /**
9953
+ * @module QRCode
9954
+ * @package @nuintun/qrcode
9955
+ * @license MIT
9956
+ * @version 5.0.2
9957
+ * @author nuintun <nuintun@qq.com>
9958
+ * @description A pure JavaScript QRCode encode and decode library.
9959
+ * @see https://github.com/nuintun/qrcode#readme
9960
+ */
9961
+
9962
+
9963
+ /**
9964
+ * @module Encoder
9965
+ */
9966
+ function buildGenerator(field, generators, degree) {
9967
+ const { length } = generators;
9968
+ if (degree >= length) {
9969
+ const { generator } = field;
9970
+ let lastGenerator = generators[length - 1];
9971
+ for (let i = length; i <= degree; i++) {
9972
+ const coefficients = new Int32Array([1, field.exp(i - 1 + generator)]);
9973
+ const nextGenerator = lastGenerator.multiply(new Polynomial(field, coefficients));
9974
+ generators.push(nextGenerator);
9975
+ lastGenerator = nextGenerator;
9976
+ }
9977
+ }
9978
+ return generators[degree];
9979
+ }
9980
+ let Encoder$1 = class Encoder {
9981
+ #field;
9982
+ #generators;
9983
+ constructor(field = QR_CODE_FIELD_256) {
9984
+ this.#field = field;
9985
+ this.#generators = [new Polynomial(field, new Int32Array([1]))];
9986
+ }
9987
+ encode(received, ecLength) {
9988
+ const dataBytes = received.length - ecLength;
9989
+ const infoCoefficients = new Int32Array(dataBytes);
9990
+ const generator = buildGenerator(this.#field, this.#generators, ecLength);
9991
+ infoCoefficients.set(received.subarray(0, dataBytes));
9992
+ const base = new Polynomial(this.#field, infoCoefficients);
9993
+ const info = base.multiplyByMonomial(ecLength, 1);
9994
+ const [, remainder] = info.divide(generator);
9995
+ const { coefficients } = remainder;
9996
+ const numZeroCoefficients = ecLength - coefficients.length;
9997
+ const zeroCoefficientsOffset = dataBytes + numZeroCoefficients;
9998
+ received.fill(0, dataBytes, zeroCoefficientsOffset);
9999
+ received.set(coefficients, zeroCoefficientsOffset);
10000
+ }
10001
+ };
10002
+
10003
+ /**
10004
+ * @module QRCode
10005
+ * @package @nuintun/qrcode
10006
+ * @license MIT
10007
+ * @version 5.0.2
10008
+ * @author nuintun <nuintun@qq.com>
10009
+ * @description A pure JavaScript QRCode encode and decode library.
10010
+ * @see https://github.com/nuintun/qrcode#readme
10011
+ */
10012
+
10013
+
10014
+ /**
10015
+ * @module encoder
10016
+ */
10017
+ function generateECCodewords(codewords, numECCodewords) {
10018
+ const numDataCodewords = codewords.length;
10019
+ const buffer = new Int32Array(numDataCodewords + numECCodewords);
10020
+ // Copy data codewords.
10021
+ buffer.set(codewords);
10022
+ // Reed solomon encode.
10023
+ new Encoder$1().encode(buffer, numECCodewords);
10024
+ // Get ec codewords.
10025
+ return new Uint8Array(buffer.subarray(numDataCodewords));
10026
+ }
10027
+ function injectECCodewords(bits, { ecBlocks, numECCodewordsPerBlock }) {
10028
+ // Step 1. Divide data bytes into blocks and generate error correction bytes for them. We'll
10029
+ // store the divided data bytes blocks and error correction bytes blocks into "blocks".
10030
+ let maxNumECCodewords = 0;
10031
+ let maxNumDataCodewords = 0;
10032
+ let dataCodewordsOffset = 0;
10033
+ // Block pair.
10034
+ const blocks = [];
10035
+ for (const { count, numDataCodewords } of ecBlocks) {
10036
+ for (let i = 0; i < count; i++) {
10037
+ const dataCodewords = new Uint8Array(numDataCodewords);
10038
+ bits.writeToUint8Array(dataCodewordsOffset * 8, dataCodewords, 0, numDataCodewords);
10039
+ const ecCodewords = generateECCodewords(dataCodewords, numECCodewordsPerBlock);
10040
+ blocks.push(new BlockPair(dataCodewords, ecCodewords));
10041
+ dataCodewordsOffset += numDataCodewords;
10042
+ maxNumECCodewords = Math.max(maxNumECCodewords, ecCodewords.length);
10043
+ maxNumDataCodewords = Math.max(maxNumDataCodewords, numDataCodewords);
10044
+ }
10045
+ }
10046
+ const codewords = new BitArray();
10047
+ // First, place data blocks.
10048
+ for (let i = 0; i < maxNumDataCodewords; i++) {
10049
+ for (const { dataCodewords } of blocks) {
10050
+ if (i < dataCodewords.length) {
10051
+ codewords.append(dataCodewords[i], 8);
10052
+ }
10053
+ }
10054
+ }
10055
+ // Then, place error correction blocks.
10056
+ for (let i = 0; i < maxNumECCodewords; i++) {
10057
+ for (const { ecCodewords } of blocks) {
10058
+ if (i < ecCodewords.length) {
10059
+ codewords.append(ecCodewords[i], 8);
10060
+ }
10061
+ }
10062
+ }
10063
+ return codewords;
10064
+ }
10065
+ function appendTerminator(bits, numDataCodewords) {
10066
+ const capacity = numDataCodewords * 8;
10067
+ // Append terminator if there is enough space (value is 0000).
10068
+ for (let i = 0; i < 4 && bits.length < capacity; i++) {
10069
+ bits.append(0);
10070
+ }
10071
+ // Append terminator. See 7.4.9 of ISO/IEC 18004:2015(E)(p.32) for details.
10072
+ // If the last byte isn't 8-bit aligned, we'll add padding bits.
10073
+ const numBitsInLastByte = bits.length & 0x07;
10074
+ if (numBitsInLastByte > 0) {
10075
+ for (let i = numBitsInLastByte; i < 8; i++) {
10076
+ bits.append(0);
10077
+ }
10078
+ }
10079
+ // If we have more space, we'll fill the space with padding patterns defined in 8.4.9 (p.24).
10080
+ const numPaddingCodewords = numDataCodewords - bits.byteLength;
10081
+ for (let i = 0; i < numPaddingCodewords; i++) {
10082
+ bits.append(i & 0x01 ? 0x11 : 0xec, 8);
10083
+ }
10084
+ }
10085
+ function isByteMode(segment) {
10086
+ return segment.mode === Mode.BYTE;
10087
+ }
10088
+ function isHanziMode(segment) {
10089
+ return segment.mode === Mode.HANZI;
10090
+ }
10091
+ function appendModeInfo(bits, mode) {
10092
+ bits.append(mode.bits, 4);
10093
+ }
10094
+ function appendECI(bits, segment, currentECIValue) {
10095
+ if (isByteMode(segment)) {
10096
+ const [value] = segment.charset.values;
10097
+ if (value !== currentECIValue) {
10098
+ bits.append(Mode.ECI.bits, 4);
10099
+ // See 7.4.2.2 of ISO/IEC 18004:2015(E)(p.24) for details.
10100
+ if (value <= 127) {
10101
+ bits.append(value, 8);
10102
+ } else if (value <= 16383) {
10103
+ bits.append(0x8000 | value, 16);
10104
+ } else {
10105
+ bits.append(0xc00000 | value, 24);
10106
+ }
10107
+ return value;
10108
+ }
10109
+ }
10110
+ return currentECIValue;
10111
+ }
10112
+ function appendFNC1Info(bits, fnc1) {
10113
+ const [mode, indicator] = fnc1;
10114
+ // Append FNC1 if applicable.
10115
+ switch (mode) {
10116
+ case 'GS1':
10117
+ // GS1 formatted codes are prefixed with a FNC1 in first position mode header.
10118
+ appendModeInfo(bits, Mode.FNC1_FIRST_POSITION);
10119
+ break;
10120
+ case 'AIM':
10121
+ // AIM formatted codes are prefixed with a FNC1 in first position mode header.
10122
+ appendModeInfo(bits, Mode.FNC1_SECOND_POSITION);
10123
+ // Append AIM application indicator.
10124
+ bits.append(indicator, 8);
10125
+ break;
10126
+ }
10127
+ }
10128
+ function getSegmentLength(segment, bits) {
10129
+ // Byte segment use byte Length.
10130
+ if (isByteMode(segment)) {
10131
+ return bits.byteLength;
10132
+ }
10133
+ // Other segments use the real length of characters.
10134
+ // All rest segments content codePointAt at 0x0000 to 0xffff, so use length directly.
10135
+ return segment.content.length;
10136
+ }
10137
+ function appendLengthInfo(bits, mode, version, numLetters) {
10138
+ bits.append(numLetters, mode.getCharacterCountBits(version));
10139
+ }
10140
+ function willFit(numInputBits, version, ecLevel) {
10141
+ // In the following comments, we use numbers of Version 7-H.
10142
+ const ecBlocks = version.getECBlocks(ecLevel);
10143
+ const numInputCodewords = Math.ceil(numInputBits / 8);
10144
+ return ecBlocks.numTotalDataCodewords >= numInputCodewords;
10145
+ }
10146
+ function chooseVersion(numInputBits, ecLevel) {
10147
+ for (const version of VERSIONS) {
10148
+ if (willFit(numInputBits, version, ecLevel)) {
10149
+ return version;
10150
+ }
10151
+ }
10152
+ throw new Error('data too big for all versions');
10153
+ }
10154
+ function calculateBitsNeeded(segmentBlocks, version) {
10155
+ let bitsNeeded = 0;
10156
+ for (const { mode, head, body } of segmentBlocks) {
10157
+ bitsNeeded += head.length + mode.getCharacterCountBits(version) + body.length;
10158
+ }
10159
+ return bitsNeeded;
10160
+ }
10161
+ function chooseRecommendVersion(segmentBlocks, ecLevel) {
10162
+ // Hard part: need to know version to know how many bits length takes. But need to know how many
10163
+ // bits it takes to know version. First we take a guess at version by assuming version will be
10164
+ // the minimum, 1:
10165
+ const provisionalBitsNeeded = calculateBitsNeeded(segmentBlocks, VERSIONS[0]);
10166
+ const provisionalVersion = chooseVersion(provisionalBitsNeeded, ecLevel);
10167
+ // Use that guess to calculate the right version. I am still not sure this works in 100% of cases.
10168
+ const bitsNeeded = calculateBitsNeeded(segmentBlocks, provisionalVersion);
10169
+ return chooseVersion(bitsNeeded, ecLevel);
10170
+ }
10171
+ function chooseBestMaskAndMatrix(codewords, version, ecLevel) {
10172
+ let bestMask = 0;
10173
+ let bestMatrix = buildMatrix(codewords, version, ecLevel, bestMask);
10174
+ let minPenalty = calculateMaskPenalty(bestMatrix);
10175
+ // We try all rest mask patterns to choose the best one.
10176
+ for (let mask = 1; mask < 8; mask++) {
10177
+ const matrix = buildMatrix(codewords, version, ecLevel, mask);
10178
+ const penalty = calculateMaskPenalty(matrix);
10179
+ // Lower penalty is better.
10180
+ if (penalty < minPenalty) {
10181
+ bestMask = mask;
10182
+ bestMatrix = matrix;
10183
+ minPenalty = penalty;
10184
+ }
10185
+ }
10186
+ return [bestMask, bestMatrix];
10187
+ }
10188
+
10189
+ /**
10190
+ * @module QRCode
10191
+ * @package @nuintun/qrcode
10192
+ * @license MIT
10193
+ * @version 5.0.2
10194
+ * @author nuintun <nuintun@qq.com>
10195
+ * @description A pure JavaScript QRCode encode and decode library.
10196
+ * @see https://github.com/nuintun/qrcode#readme
10197
+ */
10198
+
10199
+ /**
10200
+ * @module Dict
10201
+ * @see https://github.com/google/dart-gif-encoder
10202
+ */
10203
+ // The highest code that can be defined in the CodeBook.
10204
+ const MAX_CODE = (1 << 12) - 1;
10205
+ /**
10206
+ * A dict contains codes defined during LZW compression. It's a mapping from a string
10207
+ * of pixels to the code that represents it. The codes are stored in a trie which is
10208
+ * represented as a map. Codes may be up to 12 bits. The size of the codebook is always
10209
+ * the minimum power of 2 needed to represent all the codes and automatically increases
10210
+ * as new codes are defined.
10211
+ */
10212
+ class Dict {
10213
+ #bof;
10214
+ #eof;
10215
+ #bits;
10216
+ #depth;
10217
+ #size;
10218
+ #unused;
10219
+ #codes;
10220
+ constructor(depth) {
10221
+ const bof = 1 << depth;
10222
+ const eof = bof + 1;
10223
+ this.#bof = bof;
10224
+ this.#eof = eof;
10225
+ this.#depth = depth;
10226
+ this.reset();
10227
+ }
10228
+ get bof() {
10229
+ return this.#bof;
10230
+ }
10231
+ get eof() {
10232
+ return this.#eof;
10233
+ }
10234
+ get bits() {
10235
+ return this.#bits;
10236
+ }
10237
+ get depth() {
10238
+ return this.#depth;
10239
+ }
10240
+ reset() {
10241
+ const bits = this.#depth + 1;
10242
+ this.#bits = bits;
10243
+ this.#size = 1 << bits;
10244
+ this.#codes = new Map();
10245
+ this.#unused = this.#eof + 1;
10246
+ }
10247
+ add(code, index) {
10248
+ let unused = this.#unused;
10249
+ if (unused > MAX_CODE) {
10250
+ return false;
10251
+ }
10252
+ this.#codes.set((code << 8) | index, unused++);
10253
+ let bits = this.#bits;
10254
+ let size = this.#size;
10255
+ if (unused > size) {
10256
+ size = 1 << ++bits;
10257
+ }
10258
+ this.#bits = bits;
10259
+ this.#size = size;
10260
+ this.#unused = unused;
10261
+ return true;
10262
+ }
10263
+ get(code, index) {
10264
+ return this.#codes.get((code << 8) | index);
10265
+ }
10266
+ }
10267
+
10268
+ /**
10269
+ * @module QRCode
10270
+ * @package @nuintun/qrcode
10271
+ * @license MIT
10272
+ * @version 5.0.2
10273
+ * @author nuintun <nuintun@qq.com>
10274
+ * @description A pure JavaScript QRCode encode and decode library.
10275
+ * @see https://github.com/nuintun/qrcode#readme
10276
+ */
10277
+
10278
+ /**
10279
+ * @module DictStream
10280
+ * @see https://github.com/google/dart-gif-encoder
10281
+ */
10282
+ class DictStream {
10283
+ #bits = 0;
10284
+ #dict;
10285
+ #buffer = 0;
10286
+ #bytes = [];
10287
+ constructor(dict) {
10288
+ this.#dict = dict;
10289
+ }
10290
+ write(code) {
10291
+ let bits = this.#bits;
10292
+ let buffer = this.#buffer | (code << bits);
10293
+ bits += this.#dict.bits;
10294
+ const bytes = this.#bytes;
10295
+ while (bits >= 8) {
10296
+ bytes.push(buffer & 0xff);
10297
+ buffer >>= 8;
10298
+ bits -= 8;
10299
+ }
10300
+ this.#bits = bits;
10301
+ this.#buffer = buffer;
10302
+ }
10303
+ pipe(stream) {
10304
+ const bytes = this.#bytes;
10305
+ // Add the remaining bits. (Unused bits are set to zero.)
10306
+ if (this.#bits > 0) {
10307
+ bytes.push(this.#buffer);
10308
+ }
10309
+ stream.writeByte(this.#dict.depth);
10310
+ // Divide it up into blocks with a size in front of each block.
10311
+ const { length } = bytes;
10312
+ for (let i = 0; i < length; ) {
10313
+ const remain = length - i;
10314
+ if (remain >= 255) {
10315
+ stream.writeByte(0xff);
10316
+ stream.writeBytes(bytes, i, 255);
10317
+ i += 255;
10318
+ } else {
10319
+ stream.writeByte(remain);
10320
+ stream.writeBytes(bytes, i, remain);
10321
+ i = length;
10322
+ }
10323
+ }
10324
+ stream.writeByte(0);
10325
+ }
10326
+ }
10327
+
10328
+ /**
10329
+ * @module QRCode
10330
+ * @package @nuintun/qrcode
10331
+ * @license MIT
10332
+ * @version 5.0.2
10333
+ * @author nuintun <nuintun@qq.com>
10334
+ * @description A pure JavaScript QRCode encode and decode library.
10335
+ * @see https://github.com/nuintun/qrcode#readme
10336
+ */
10337
+
10338
+
10339
+ /**
10340
+ * @module index
10341
+ * @see https://github.com/google/dart-gif-encoder
10342
+ */
10343
+ function compress(pixels, depth, stream) {
10344
+ const dict = new Dict(depth);
10345
+ const buffer = new DictStream(dict);
10346
+ buffer.write(dict.bof);
10347
+ if (pixels.length > 0) {
10348
+ let code = pixels[0];
10349
+ const { length } = pixels;
10350
+ for (let i = 1; i < length; i++) {
10351
+ const pixelIndex = pixels[i];
10352
+ const nextCode = dict.get(code, pixelIndex);
10353
+ if (nextCode != null) {
10354
+ code = nextCode;
10355
+ } else {
10356
+ buffer.write(code);
10357
+ // Reset dict when full.
10358
+ if (!dict.add(code, pixelIndex)) {
10359
+ buffer.write(dict.bof);
10360
+ dict.reset();
10361
+ }
10362
+ code = pixelIndex;
10363
+ }
10364
+ }
10365
+ buffer.write(code);
10366
+ }
10367
+ buffer.write(dict.eof);
10368
+ buffer.pipe(stream);
10369
+ }
10370
+
10371
+ /**
10372
+ * @module QRCode
10373
+ * @package @nuintun/qrcode
10374
+ * @license MIT
10375
+ * @version 5.0.2
10376
+ * @author nuintun <nuintun@qq.com>
10377
+ * @description A pure JavaScript QRCode encode and decode library.
10378
+ * @see https://github.com/nuintun/qrcode#readme
10379
+ */
10380
+
10381
+ /**
10382
+ * @module ByteStream
10383
+ */
10384
+ class ByteStream {
10385
+ #bytes = [];
10386
+ get bytes() {
10387
+ return this.#bytes;
10388
+ }
10389
+ writeByte(value) {
10390
+ this.#bytes.push(value & 0xff);
10391
+ }
10392
+ writeInt16(value) {
10393
+ this.#bytes.push(value & 0xff, (value >> 8) & 0xff);
10394
+ }
10395
+ writeBytes(bytes, offset = 0, length = bytes.length) {
10396
+ const buffer = this.#bytes;
10397
+ for (let i = 0; i < length; i++) {
10398
+ buffer.push(bytes[offset + i] & 0xff);
10399
+ }
10400
+ }
10401
+ }
10402
+
10403
+ /**
10404
+ * @module QRCode
10405
+ * @package @nuintun/qrcode
10406
+ * @license MIT
10407
+ * @version 5.0.2
10408
+ * @author nuintun <nuintun@qq.com>
10409
+ * @description A pure JavaScript QRCode encode and decode library.
10410
+ * @see https://github.com/nuintun/qrcode#readme
10411
+ */
10412
+
10413
+
10414
+ /**
10415
+ * @module Base64Stream
10416
+ */
10417
+ const { fromCharCode } = String;
10418
+ function encode(byte) {
10419
+ byte &= 0x3f;
10420
+ if (byte >= 0) {
10421
+ if (byte < 26) {
10422
+ // A.
10423
+ return 0x41 + byte;
10424
+ } else if (byte < 52) {
10425
+ // a.
10426
+ return 0x61 + (byte - 26);
10427
+ } else if (byte < 62) {
10428
+ // 0.
10429
+ return 0x30 + (byte - 52);
10430
+ } else if (byte === 62) {
10431
+ // +.
10432
+ return 0x2b;
10433
+ } else if (byte === 63) {
10434
+ // /.
10435
+ return 0x2f;
10436
+ }
10437
+ }
10438
+ throw new Error(`illegal char: ${fromCharCode(byte)}`);
10439
+ }
10440
+ class Base64Stream {
10441
+ #bits = 0;
10442
+ #buffer = 0;
10443
+ #length = 0;
10444
+ #stream = new ByteStream();
10445
+ get bytes() {
10446
+ return this.#stream.bytes;
10447
+ }
10448
+ write(byte) {
10449
+ let bits = this.#bits + 8;
10450
+ const stream = this.#stream;
10451
+ const buffer = (this.#buffer << 8) | (byte & 0xff);
10452
+ while (bits >= 6) {
10453
+ stream.writeByte(encode(buffer >>> (bits - 6)));
10454
+ bits -= 6;
10455
+ }
10456
+ this.#length++;
10457
+ this.#bits = bits;
10458
+ this.#buffer = buffer;
10459
+ }
10460
+ close() {
10461
+ const bits = this.#bits;
10462
+ const stream = this.#stream;
10463
+ if (bits > 0) {
10464
+ stream.writeByte(encode(this.#buffer << (6 - bits)));
10465
+ this.#bits = 0;
10466
+ this.#buffer = 0;
10467
+ }
10468
+ const length = this.#length;
10469
+ if (length % 3 != 0) {
10470
+ // Padding.
10471
+ const pad = 3 - (length % 3);
10472
+ for (let i = 0; i < pad; i++) {
10473
+ // =.
10474
+ stream.writeByte(0x3d);
10475
+ }
10476
+ }
10477
+ }
10478
+ }
10479
+
10480
+ /**
10481
+ * @module QRCode
10482
+ * @package @nuintun/qrcode
10483
+ * @license MIT
10484
+ * @version 5.0.2
10485
+ * @author nuintun <nuintun@qq.com>
10486
+ * @description A pure JavaScript QRCode encode and decode library.
10487
+ * @see https://github.com/nuintun/qrcode#readme
10488
+ */
10489
+
10490
+
10491
+ /**
10492
+ * @module GIFImage
10493
+ */
10494
+ class GIFImage {
10495
+ #width;
10496
+ #height;
10497
+ #foreground;
10498
+ #background;
10499
+ #pixels = [];
10500
+ constructor(width, height, { foreground = [0x00, 0x00, 0x00], background = [0xff, 0xff, 0xff] } = {}) {
10501
+ this.#width = width;
10502
+ this.#height = height;
10503
+ this.#foreground = foreground;
10504
+ this.#background = background;
10505
+ }
10506
+ #encode() {
10507
+ const width = this.#width;
10508
+ const height = this.#height;
10509
+ const stream = new ByteStream();
10510
+ const background = this.#background;
10511
+ const foreground = this.#foreground;
10512
+ // GIF signature: GIF89a.
10513
+ stream.writeBytes([0x47, 0x49, 0x46, 0x38, 0x39, 0x61]);
10514
+ // Logical screen descriptor.
10515
+ stream.writeInt16(width);
10516
+ stream.writeInt16(height);
10517
+ stream.writeBytes([0x80, 0, 0]);
10518
+ // Global background color palette.
10519
+ stream.writeBytes([background[0], background[1], background[2]]);
10520
+ // Global foreground color palette.
10521
+ stream.writeBytes([foreground[0], foreground[1], foreground[2]]);
10522
+ // Image descriptor.
10523
+ stream.writeByte(0x2c);
10524
+ stream.writeInt16(0);
10525
+ stream.writeInt16(0);
10526
+ stream.writeInt16(width);
10527
+ stream.writeInt16(height);
10528
+ stream.writeByte(0);
10529
+ // Compress pixels to stream.
10530
+ compress(this.#pixels, 2, stream);
10531
+ // GIF terminator.
10532
+ stream.writeByte(0x3b);
10533
+ return stream.bytes;
10534
+ }
10535
+ set(x, y, color) {
10536
+ this.#pixels[y * this.#width + x] = color;
10537
+ }
10538
+ toDataURL() {
10539
+ const bytes = this.#encode();
10540
+ const stream = new Base64Stream();
10541
+ for (const byte of bytes) {
10542
+ stream.write(byte);
10543
+ }
10544
+ stream.close();
10545
+ const base64 = stream.bytes;
10546
+ let url = 'data:image/gif;base64,';
10547
+ for (const byte of base64) {
10548
+ url += fromCharCode(byte);
10549
+ }
10550
+ return url;
10551
+ }
10552
+ }
10553
+
10554
+ /**
10555
+ * @module QRCode
10556
+ * @package @nuintun/qrcode
10557
+ * @license MIT
10558
+ * @version 5.0.2
10559
+ * @author nuintun <nuintun@qq.com>
10560
+ * @description A pure JavaScript QRCode encode and decode library.
10561
+ * @see https://github.com/nuintun/qrcode#readme
10562
+ */
10563
+
10564
+
10565
+ /**
10566
+ * @module Encoded
10567
+ */
10568
+ class Encoded {
10569
+ #mask;
10570
+ #level;
10571
+ #version;
10572
+ #matrix;
10573
+ constructor(matrix, version, level, mask) {
10574
+ this.#mask = mask;
10575
+ this.#level = level;
10576
+ this.#matrix = matrix;
10577
+ this.#version = version;
10578
+ }
10579
+ /**
10580
+ * @property matrix
10581
+ * @description Get the size of qrcode.
10582
+ */
10583
+ get size() {
10584
+ return this.#matrix.size;
10585
+ }
10586
+ /**
10587
+ * @property mask
10588
+ * @description Get the mask of qrcode.
10589
+ */
10590
+ get mask() {
10591
+ return this.#mask;
10592
+ }
10593
+ /**
10594
+ * @property level
10595
+ * @description Get the error correction level of qrcode.
10596
+ */
10597
+ get level() {
10598
+ return this.#level.name;
10599
+ }
10600
+ /**
10601
+ * @property version
10602
+ * @description Get the version of qrcode.
10603
+ */
10604
+ get version() {
10605
+ return this.#version.version;
10606
+ }
10607
+ /**
10608
+ * @method get
10609
+ * @description Get the bit value of the specified coordinate of qrcode.
10610
+ */
10611
+ get(x, y) {
10612
+ const { size } = this.#matrix;
10613
+ if (x < 0 || y < 0 || x >= size || y >= size) {
10614
+ throw new Error(`illegal coordinate: [${x}, ${y}]`);
10615
+ }
10616
+ return this.#matrix.get(x, y);
10617
+ }
10618
+ /**
10619
+ * @method toDataURL
10620
+ * @param moduleSize The size of one qrcode module
10621
+ * @param options Set rest options of gif, like margin, foreground and background.
10622
+ */
10623
+ toDataURL(moduleSize = 2, { margin = moduleSize * 4, ...colors } = {}) {
10624
+ moduleSize = Math.max(1, moduleSize >> 0);
10625
+ margin = Math.max(0, margin >> 0);
10626
+ const matrix = this.#matrix;
10627
+ const matrixSize = matrix.size;
10628
+ const size = moduleSize * matrixSize + margin * 2;
10629
+ const gif = new GIFImage(size, size, colors);
10630
+ const max = size - margin;
10631
+ for (let y = 0; y < size; y++) {
10632
+ for (let x = 0; x < size; x++) {
10633
+ if (x >= margin && x < max && y >= margin && y < max) {
10634
+ const offsetX = toInt32((x - margin) / moduleSize);
10635
+ const offsetY = toInt32((y - margin) / moduleSize);
10636
+ gif.set(x, y, matrix.get(offsetX, offsetY));
10637
+ } else {
10638
+ // Margin pixels.
10639
+ gif.set(x, y, 0);
10640
+ }
10641
+ }
10642
+ }
10643
+ return gif.toDataURL();
10644
+ }
10645
+ }
10646
+
10647
+ /**
10648
+ * @module QRCode
10649
+ * @package @nuintun/qrcode
10650
+ * @license MIT
10651
+ * @version 5.0.2
10652
+ * @author nuintun <nuintun@qq.com>
10653
+ * @description A pure JavaScript QRCode encode and decode library.
10654
+ * @see https://github.com/nuintun/qrcode#readme
10655
+ */
10656
+
10657
+
10658
+ /**
10659
+ * @module asserts
10660
+ */
10661
+ function assertContent(content) {
10662
+ if (content === '') {
10663
+ throw new Error('segment content should be at least 1 character');
10664
+ }
10665
+ }
10666
+ function assertCharset(charset) {
10667
+ if (!(charset instanceof Charset)) {
10668
+ throw new Error('illegal charset');
10669
+ }
10670
+ }
10671
+ function assertHints(hints) {
10672
+ const { fnc1 } = hints;
10673
+ // FNC1.
10674
+ if (fnc1 != null) {
10675
+ const [mode] = fnc1;
10676
+ if (mode !== 'GS1' && mode !== 'AIM') {
10677
+ throw new Error('illegal fn1 hint');
10678
+ }
10679
+ if (mode === 'AIM') {
10680
+ const [, indicator] = fnc1;
10681
+ if (indicator < 0 || indicator > 0xff || !Number.isInteger(indicator)) {
10682
+ throw new Error('illegal fn1 application indicator');
10683
+ }
10684
+ }
10685
+ }
10686
+ }
10687
+ function assertLevel(level) {
10688
+ if (['L', 'M', 'Q', 'H'].indexOf(level) < 0) {
10689
+ throw new Error('illegal error correction level');
10690
+ }
10691
+ }
10692
+ function assertVersion(version) {
10693
+ if (version !== 'Auto') {
10694
+ if (version < 1 || version > 40 || !Number.isInteger(version)) {
10695
+ throw new Error('illegal version');
10696
+ }
10697
+ }
10698
+ }
10699
+
10700
+ /**
10701
+ * @module QRCode
10702
+ * @package @nuintun/qrcode
10703
+ * @license MIT
10704
+ * @version 5.0.2
10705
+ * @author nuintun <nuintun@qq.com>
10706
+ * @description A pure JavaScript QRCode encode and decode library.
10707
+ * @see https://github.com/nuintun/qrcode#readme
10708
+ */
10709
+
10710
+
10711
+ /**
10712
+ * @module Encoder
10713
+ */
10714
+ class Encoder {
10715
+ #hints;
10716
+ #level;
10717
+ #encode;
10718
+ #version;
10719
+ /**
10720
+ * @constructor
10721
+ * @param options The options of encoder.
10722
+ */
10723
+ constructor({ hints = {}, level = 'L', version = 'Auto', encode: encode$1$1 = encode$1 } = {}) {
10724
+ assertHints(hints);
10725
+ assertLevel(level);
10726
+ assertVersion(version);
10727
+ this.#hints = hints;
10728
+ this.#encode = encode$1$1;
10729
+ this.#version = version;
10730
+ this.#level = ECLevel[level];
10731
+ }
10732
+ /**
10733
+ * @method encode
10734
+ * @description Encode the segments.
10735
+ * @param segments The segments.
10736
+ */
10737
+ encode(...segments) {
10738
+ const ecLevel = this.#level;
10739
+ const encode = this.#encode;
10740
+ const { fnc1 } = this.#hints;
10741
+ const versionNumber = this.#version;
10742
+ const segmentBlocks = [];
10743
+ // Only append FNC1 once.
10744
+ let isFNC1Appended = false;
10745
+ // Current ECI value.
10746
+ let [currentECIValue] = Charset.ISO_8859_1.values;
10747
+ // Init segments.
10748
+ for (const segment of segments) {
10749
+ const { mode } = segment;
10750
+ const head = new BitArray();
10751
+ const body = segment.encode(encode);
10752
+ const length = getSegmentLength(segment, body);
10753
+ // Append ECI segment if applicable.
10754
+ currentECIValue = appendECI(head, segment, currentECIValue);
10755
+ // Append FNC1 if applicable.
10756
+ if (fnc1 != null && !isFNC1Appended) {
10757
+ isFNC1Appended = true;
10758
+ appendFNC1Info(head, fnc1);
10759
+ }
10760
+ // With ECI in place, Write the mode marker.
10761
+ appendModeInfo(head, mode);
10762
+ // If is Hanzi mode append GB2312 subset.
10763
+ if (isHanziMode(segment)) {
10764
+ head.append(1, 4);
10765
+ }
10766
+ // Push segment block.
10767
+ segmentBlocks.push({ mode, head, body, length });
10768
+ }
10769
+ let version;
10770
+ if (versionNumber === 'Auto') {
10771
+ version = chooseRecommendVersion(segmentBlocks, ecLevel);
10772
+ } else {
10773
+ version = VERSIONS[versionNumber - 1];
10774
+ const bitsNeeded = calculateBitsNeeded(segmentBlocks, version);
10775
+ if (!willFit(bitsNeeded, version, ecLevel)) {
10776
+ throw new Error('data too big for requested version');
10777
+ }
10778
+ }
10779
+ const buffer = new BitArray();
10780
+ for (const { mode, head, body, length } of segmentBlocks) {
10781
+ buffer.append(head);
10782
+ appendLengthInfo(buffer, mode, version, length);
10783
+ buffer.append(body);
10784
+ }
10785
+ const ecBlocks = version.getECBlocks(ecLevel);
10786
+ appendTerminator(buffer, ecBlocks.numTotalDataCodewords);
10787
+ const codewords = injectECCodewords(buffer, ecBlocks);
10788
+ const [mask, matrix] = chooseBestMaskAndMatrix(codewords, version, ecLevel);
10789
+ return new Encoded(matrix, version, ecLevel, mask);
10790
+ }
10791
+ }
10792
+
10793
+ /**
10794
+ * @module QRCode
10795
+ * @package @nuintun/qrcode
10796
+ * @license MIT
10797
+ * @version 5.0.2
10798
+ * @author nuintun <nuintun@qq.com>
10799
+ * @description A pure JavaScript QRCode encode and decode library.
10800
+ * @see https://github.com/nuintun/qrcode#readme
10801
+ */
10802
+
10803
+
10804
+ /**
10805
+ * @module Byte
10806
+ */
10807
+ class Byte {
10808
+ #content;
10809
+ #charset;
10810
+ /**
10811
+ * @constructor
10812
+ * @param content The content to encode.
10813
+ * @param charset The charset of the content.
10814
+ */
10815
+ constructor(content, charset = Charset.ISO_8859_1) {
10816
+ assertContent(content);
10817
+ assertCharset(charset);
10818
+ this.#content = content;
10819
+ this.#charset = charset;
10820
+ }
10821
+ /**
10822
+ * @property mode
10823
+ * @description The mode of the segment.
10824
+ */
10825
+ get mode() {
10826
+ return Mode.BYTE;
10827
+ }
10828
+ /**
10829
+ * @property content
10830
+ * @description The content of the segment.
10831
+ */
10832
+ get content() {
10833
+ return this.#content;
10834
+ }
10835
+ /**
10836
+ * @property charset
10837
+ * @description The charset of the content.
10838
+ */
10839
+ get charset() {
10840
+ return this.#charset;
10841
+ }
10842
+ /**
10843
+ * @method encode
10844
+ * @description Encode the segment.
10845
+ * @param encode The text encode function.
10846
+ */
10847
+ encode(encode) {
10848
+ const bits = new BitArray();
10849
+ const bytes = encode(this.#content, this.#charset);
10850
+ for (const byte of bytes) {
10851
+ bits.append(byte, 8);
10852
+ }
10853
+ return bits;
10854
+ }
10855
+ }
10856
+
10857
+ // 文件上传流水号SDK
10858
+ const uploadNumberSDK$1 = {
10859
+ number: '',
10860
+ isWorking: false,
10861
+ close: async function (params) {
10862
+ const { onOk, onError } = params ?? {};
10863
+ const { number } = this;
10864
+ if (number) {
10865
+ const result = await index$1.sendHttpRequest({
10866
+ url: `/resource/update_id/${number}`,
10867
+ method: 'delete',
10868
+ });
10869
+ if (result.success) {
10870
+ this.number = '';
10871
+ onOk?.();
10872
+ }
10873
+ else {
10874
+ onError?.();
10875
+ }
10876
+ }
10877
+ }
10878
+ };
10879
+
10880
+ const pcmMobileInputBtnCss = ".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}.qrcode-textarea{width:calc(100% - 16px);min-height:120px;border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}";
10881
+
10882
+ const globalCss$6 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
10883
+
10884
+ const MobileUploadBtn$1 = class MobileUploadBtn {
10885
+ constructor(hostRef) {
10886
+ index.registerInstance(this, hostRef);
10887
+ this.ok = index.createEvent(this, "ok");
10888
+ }
10889
+ // 标题
10890
+ name = '';
10891
+ /**
10892
+ * 最大文件数
10893
+ */
10894
+ rows = 8;
10895
+ /**
10896
+ * 最大文件大小
10897
+ */
10898
+ maxLength = undefined;
10899
+ /**
10900
+ * 填写请求头
10901
+ */
10902
+ uploadHeaders;
10903
+ /**
10904
+ * 填写请求参数
10905
+ */
10906
+ uploadParams;
10907
+ QR_CODE_VALID_TIME = 0;
10908
+ open = false;
10909
+ mobileUrl = '';
10910
+ setStartMobileUpload = false;
10911
+ startMobileUploadLoading = false;
10912
+ qrcodeStatus = 'loading';
10913
+ value = '';
10914
+ ok;
10915
+ setStartMobileUploadWrapper = (e) => {
10916
+ uploadNumberSDK$1.isWorking = e;
10917
+ this.setStartMobileUpload = e;
10918
+ };
10919
+ qrcodeUrl = '';
10920
+ setMobileUrlWrapper = (e) => {
10921
+ this.mobileUrl = e;
10922
+ if (e) {
10923
+ const encoder = new Encoder();
10924
+ const qrcode = encoder.encode(new Byte(e));
10925
+ this.qrcodeUrl = qrcode.toDataURL();
10926
+ }
10927
+ else {
10928
+ this.qrcodeUrl = '';
10929
+ }
10930
+ };
10931
+ // 轮询流水号数据
10932
+ pollingQueryNumberInfo = async (num) => {
10933
+ const res = await index$1.sendHttpRequest({
10934
+ url: `/sdk/v1/update_id/${num}/status`,
10935
+ method: 'get',
10936
+ });
10937
+ if (res?.success) {
10938
+ const resData = res.data ?? {};
10939
+ const { custom_data } = resData;
10940
+ this.value = custom_data ?? '';
10941
+ }
10942
+ if (uploadNumberSDK$1.isWorking) {
10943
+ setTimeout(() => {
10944
+ this.pollingQueryNumberInfo(num);
10945
+ }, 3000);
10946
+ }
10947
+ };
10948
+ handleStartMobileUpload = async () => {
10949
+ const that = this;
10950
+ this.qrcodeStatus = 'loading';
10951
+ this.startMobileUploadLoading = true;
10952
+ const params = this.uploadParams ?? {};
10953
+ const reqData = {
10954
+ cfg: {
10955
+ fromUserName: '',
10956
+ fromUserId: '',
10957
+ upload: that.uploadParams,
10958
+ name: that.name,
10959
+ rows: that.rows,
10960
+ maxLength: that.maxLength,
10961
+ params,
10962
+ },
10963
+ };
10964
+ const res = await index$1.sendHttpRequest({
10965
+ url: `/sdk/v1/update_id`,
10966
+ method: 'post',
10967
+ data: reqData,
10968
+ });
10969
+ if (res?.success) {
10970
+ const resData = res.data ?? {};
10971
+ uploadNumberSDK$1.number = resData.update_id;
10972
+ this.QR_CODE_VALID_TIME = Number(resData.exp) - Number(resData.now);
10973
+ const theMobileUrl = `${index$1.PCM_DOMAIN}/agents/inputByCode?num=${uploadNumberSDK$1.number}`;
10974
+ this.setMobileUrlWrapper(theMobileUrl);
10975
+ this.setStartMobileUploadWrapper(true);
10976
+ this.qrcodeStatus = 'active';
10977
+ // 开启轮询
10978
+ this.pollingQueryNumberInfo(uploadNumberSDK$1.number);
10979
+ }
10980
+ this.startMobileUploadLoading = false;
10981
+ };
10982
+ // 取消手机填写
10983
+ cancelLoading = false;
10984
+ cancelMobileUpload = async () => {
10985
+ this.cancelLoading = true;
10986
+ await uploadNumberSDK$1.close({
10987
+ onError() {
10988
+ message_service.Message.info('取消失败');
10989
+ }
10990
+ });
10991
+ this.cancelLoading = false;
10992
+ this.QR_CODE_VALID_TIME = 0;
10993
+ this.setStartMobileUploadWrapper(false);
10994
+ this.setMobileUrlWrapper('');
10995
+ this.qrcodeStatus = 'expired';
10996
+ this.value = '';
10997
+ this.open = false;
10998
+ };
10999
+ render() {
11000
+ const mobile = index$1.isMobile();
11001
+ if (mobile) {
11002
+ return null;
11003
+ }
11004
+ else {
11005
+ return (index.h("div", null, index.h("div", { class: "mobile-upload" }, index.h("div", { class: "btn btn-link", onClick: () => {
11006
+ this.open = true;
11007
+ this.handleStartMobileUpload();
11008
+ } }, "\u626B\u7801\u586B\u5199")), this.open && index.h("div", { class: "mask" }, index.h("div", { class: "upload-wrapper" }, this.setStartMobileUpload ? index.h("div", { class: "upload-box" }, index.h("div", { class: "qrcode-wrapper" }, this.qrcodeStatus === 'active' && index.h("img", { class: "qrcode", src: this.qrcodeUrl }), this.qrcodeStatus === 'loading' && index.h("span", { class: "loading" }, "\u52A0\u8F7D\u4E2D..."), this.qrcodeStatus === 'expired' && index.h("div", { class: "btn btn-link", onClick: this.handleStartMobileUpload }, "\u91CD\u65B0\u83B7\u53D6")), index.h("div", { class: "time-expire" }, "\u4E8C\u7EF4\u7801\u6709\u6548\u671F", index.h("span", { class: "time-count-down" }, !!this.QR_CODE_VALID_TIME && index.h("pcm-time-count-down", { time: this.QR_CODE_VALID_TIME, onFinished: () => {
11009
+ this.qrcodeStatus = 'expired';
11010
+ } }))), index.h("div", { class: "alert-tip" }, "\u586B\u5199\u8FC7\u7A0B\u4E2D\u8BF7\u4E0D\u8981\u5173\u95ED\u6B64\u5F39\u7A97"), this.qrcodeStatus === 'active' && index.h("div", { style: { marginTop: '12px', fontSize: '12px' }, class: "btn btn-link", onClick: () => {
11011
+ navigator.clipboard
11012
+ .writeText(this.mobileUrl)
11013
+ .then(() => {
11014
+ message_service.Message.success("已复制到剪贴板");
11015
+ })
11016
+ .catch(() => {
11017
+ message_service.Message.error("复制失败");
11018
+ });
11019
+ } }, "\u590D\u5236\u4E8C\u7EF4\u7801\u5730\u5740")) : (this.startMobileUploadLoading && index.h("span", { class: "loading" }, "\u52A0\u8F7D\u4E2D...")), index.h("div", { style: { marginTop: '12px' } }, !!this.value?.length && index.h("textarea", { readOnly: true, class: "qrcode-textarea", value: this.value, onChange: (e) => {
11020
+ this.value = e.target.value;
11021
+ } })), index.h("div", { class: "modal-footer" }, index.h("div", { class: "btn btn-default", onClick: this.cancelMobileUpload }, "\u53D6\u6D88"), index.h("div", { class: "btn btn-primary", onClick: () => {
11022
+ if (!this.value) {
11023
+ message_service.Message.info(`请输入内容`);
11024
+ return;
11025
+ }
11026
+ if (this.value.length > this.maxLength) {
11027
+ message_service.Message.info(`输入内容不能超过${this.maxLength}个字符`);
11028
+ return;
11029
+ }
11030
+ this.ok.emit(this.value);
11031
+ this.cancelMobileUpload();
11032
+ } }, "\u5B8C\u6210"))))));
11033
+ }
11034
+ }
11035
+ };
11036
+ MobileUploadBtn$1.style = pcmMobileInputBtnCss + globalCss$6;
11037
+
11038
+ // 文件上传流水号SDK
11039
+ const uploadNumberSDK = {
11040
+ number: '',
11041
+ isWorking: false,
11042
+ close: async function (params) {
11043
+ const { onOk, onError } = params ?? {};
11044
+ const { number } = this;
11045
+ if (number) {
11046
+ const result = await index$1.sendHttpRequest({
11047
+ url: `/resource/update_id/${number}`,
11048
+ method: 'delete',
11049
+ });
11050
+ if (result.success) {
11051
+ this.number = '';
11052
+ onOk?.();
11053
+ }
11054
+ else {
11055
+ onError?.();
11056
+ }
11057
+ }
11058
+ }
11059
+ };
11060
+
11061
+ const pcmMobileUploadBtnCss = ".mobile-upload{display:flex;justify-content:flex-end;margin-bottom:4px}.btn{position:relative;padding:4px 8px;border-radius:4px;cursor:pointer;overflow:hidden;display:flex;justify-content:center;align-items:center;white-space:nowrap}.btn::after{content:'';position:absolute;top:0;left:0;width:100%;height:100%}.btn:hover::after{background-color:rgba(0,0,0,0.04)}.btn-link{color:#0D75FB}.btn-default{background-color:#ffffff;color:#0D75FB;border:1px solid #0D75FB}.btn-primary{background-color:#0D75FB;color:#ffffff}.loading{font-size:12px;color:#999999}.mask{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,0.5);display:flex;justify-content:center;align-items:center;z-index:10000}.mask .upload-wrapper{width:540px;max-width:80%;max-height:80%;background-color:#ffffff;padding:32px 24px;border-radius:16px;overflow-y:auto}.mask .upload-wrapper .upload-box{display:flex;flex-direction:column;align-items:center}.time-expire{margin:8px 0;text-align:center;font-size:12px;color:#555555}.time-count-down{margin-left:8px;color:#0D75FB}.alert-tip{margin-top:8px;text-align:center;font-size:12px;color:#999999}.qrcode-wrapper{width:160px;height:160px;display:flex;justify-content:center;align-items:center;border:1px solid #e5e5e5;border-radius:4px;padding:1px}.qrcode-wrapper .qrcode{width:100%;height:100%}.modal-footer{margin-top:32px;display:flex;justify-content:center;align-items:center;gap:8px}.modal-footer .btn{min-width:100px}";
11062
+
11063
+ const globalCss$5 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11064
+
11065
+ const MobileUploadBtn = class {
11066
+ constructor(hostRef) {
11067
+ index.registerInstance(this, hostRef);
11068
+ this.ok = index.createEvent(this, "ok");
11069
+ }
11070
+ /**
11071
+ * 是否支持多文件上传
11072
+ */
11073
+ multiple = false;
11074
+ /**
11075
+ * 支持的文件后缀列表(需要带上小数点.)
11076
+ */
11077
+ acceptFileSuffixList = [];
11078
+ /**
11079
+ * 最大文件数
11080
+ */
11081
+ maxFileCount = Infinity;
11082
+ /**
11083
+ * 最大文件大小
11084
+ */
11085
+ maxFileSize = Infinity;
11086
+ /**
11087
+ * 上传请求头
11088
+ */
11089
+ uploadHeaders;
11090
+ /**
11091
+ * 上传请求参数
11092
+ */
11093
+ uploadParams;
11094
+ QR_CODE_VALID_TIME = 0;
11095
+ open = false;
11096
+ mobileUrl = '';
11097
+ setStartMobileUpload = false;
11098
+ startMobileUploadLoading = false;
11099
+ qrcodeStatus = 'loading';
11100
+ value = [];
11101
+ ok;
11102
+ setStartMobileUploadWrapper = (e) => {
11103
+ uploadNumberSDK.isWorking = e;
11104
+ this.setStartMobileUpload = e;
11105
+ };
11106
+ qrcodeUrl = '';
11107
+ setMobileUrlWrapper = (e) => {
11108
+ this.mobileUrl = e;
11109
+ if (e) {
11110
+ const encoder = new Encoder();
11111
+ const qrcode = encoder.encode(new Byte(e));
11112
+ this.qrcodeUrl = qrcode.toDataURL();
11113
+ }
11114
+ else {
11115
+ this.qrcodeUrl = '';
11116
+ }
11117
+ };
11118
+ // 轮询流水号数据
11119
+ pollingQueryNumberInfo = async (num) => {
11120
+ const res = await index$1.sendHttpRequest({
11121
+ url: `/sdk/v1/update_id/${num}/status`,
11122
+ method: 'get',
11123
+ });
11124
+ if (res?.success) {
11125
+ const resData = res.data ?? {};
11126
+ const { file_list } = resData;
11127
+ this.value = file_list ?? [];
11128
+ }
11129
+ if (uploadNumberSDK.isWorking) {
11130
+ setTimeout(() => {
11131
+ this.pollingQueryNumberInfo(num);
11132
+ }, 3000);
11133
+ }
11134
+ };
11135
+ handleStartMobileUpload = async () => {
11136
+ const that = this;
11137
+ this.qrcodeStatus = 'loading';
11138
+ this.startMobileUploadLoading = true;
11139
+ const params = this.uploadParams ?? {};
11140
+ const reqData = {
11141
+ is_knowledge_doc: false,
11142
+ tags: params.tags,
11143
+ cfg: {
11144
+ maxSize: that.maxFileSize,
11145
+ maxCount: that.multiple ? that.maxFileCount : 1,
11146
+ fromUserName: '',
11147
+ fromUserId: '',
11148
+ customAccept: that.acceptFileSuffixList.join(','),
11149
+ upload: that.uploadParams,
11150
+ },
11151
+ };
11152
+ const res = await index$1.sendHttpRequest({
11153
+ url: `/sdk/v1/update_id`,
11154
+ method: 'post',
11155
+ data: reqData,
11156
+ });
11157
+ if (res?.success) {
11158
+ const resData = res.data ?? {};
11159
+ uploadNumberSDK.number = resData.update_id;
11160
+ this.QR_CODE_VALID_TIME = Number(resData.exp) - Number(resData.now);
11161
+ const theMobileUrl = `${index$1.PCM_DOMAIN}/agents/uploadFileByCode?num=${uploadNumberSDK.number}`;
11162
+ this.setMobileUrlWrapper(theMobileUrl);
11163
+ this.setStartMobileUploadWrapper(true);
11164
+ this.qrcodeStatus = 'active';
11165
+ // 开启轮询
11166
+ this.pollingQueryNumberInfo(uploadNumberSDK.number);
11167
+ }
11168
+ this.startMobileUploadLoading = false;
11169
+ };
11170
+ // 取消手机上传
11171
+ cancelLoading = false;
11172
+ cancelMobileUpload = async () => {
11173
+ this.cancelLoading = true;
11174
+ await uploadNumberSDK.close({
11175
+ onError() {
11176
+ message_service.Message.info('取消失败');
11177
+ }
11178
+ });
11179
+ this.cancelLoading = false;
11180
+ this.QR_CODE_VALID_TIME = 0;
11181
+ this.setStartMobileUploadWrapper(false);
11182
+ this.setMobileUrlWrapper('');
11183
+ this.qrcodeStatus = 'expired';
11184
+ this.value = [];
11185
+ this.open = false;
11186
+ };
11187
+ // 删除文件
11188
+ handleDelete = async (cos_key) => {
11189
+ const res = await index$1.sendHttpRequest({
11190
+ url: `/sdk/v1/update_id/${uploadNumberSDK.number}/file`,
11191
+ method: 'delete',
11192
+ params: {
11193
+ update_id: uploadNumberSDK.number,
11194
+ cos_key,
11195
+ }
11196
+ });
11197
+ if (res?.success) {
11198
+ this.value = this.value.filter(it => it.cos_key !== cos_key);
11199
+ }
11200
+ };
11201
+ render() {
11202
+ const mobile = index$1.isMobile();
11203
+ if (mobile) {
11204
+ return null;
11205
+ }
11206
+ else {
11207
+ return (index.h("div", null, index.h("div", { class: "mobile-upload" }, index.h("div", { class: "btn btn-link", onClick: () => {
11208
+ if (this.maxFileCount < 1) {
11209
+ message_service.Message.info('文件数量已达到上限!');
11210
+ return;
11211
+ }
11212
+ this.open = true;
11213
+ this.handleStartMobileUpload();
11214
+ } }, "\u626B\u7801\u4E0A\u4F20")), this.open && index.h("div", { class: "mask" }, index.h("div", { class: "upload-wrapper" }, this.setStartMobileUpload ? index.h("div", { class: "upload-box" }, index.h("div", { class: "qrcode-wrapper" }, this.qrcodeStatus === 'active' && index.h("img", { class: "qrcode", src: this.qrcodeUrl }), this.qrcodeStatus === 'loading' && index.h("span", { class: "loading" }, "\u52A0\u8F7D\u4E2D..."), this.qrcodeStatus === 'expired' && index.h("div", { class: "btn btn-link", onClick: this.handleStartMobileUpload }, "\u91CD\u65B0\u83B7\u53D6")), index.h("div", { class: "time-expire" }, "\u4E8C\u7EF4\u7801\u6709\u6548\u671F", index.h("span", { class: "time-count-down" }, !!this.QR_CODE_VALID_TIME && index.h("pcm-time-count-down", { time: this.QR_CODE_VALID_TIME, onFinished: () => {
11215
+ this.qrcodeStatus = 'expired';
11216
+ } }))), index.h("div", { class: "alert-tip" }, "\u4E0A\u4F20\u8FC7\u7A0B\u4E2D\u8BF7\u4E0D\u8981\u5173\u95ED\u6B64\u5F39\u7A97"), this.qrcodeStatus === 'active' && index.h("div", { style: { marginTop: '12px', fontSize: '12px' }, class: "btn btn-link", onClick: () => {
11217
+ navigator.clipboard
11218
+ .writeText(this.mobileUrl)
11219
+ .then(() => {
11220
+ message_service.Message.success("已复制到剪贴板");
11221
+ })
11222
+ .catch(() => {
11223
+ message_service.Message.error("复制失败");
11224
+ });
11225
+ } }, "\u590D\u5236\u4E8C\u7EF4\u7801\u5730\u5740")) : (this.startMobileUploadLoading && index.h("span", { class: "loading" }, "\u52A0\u8F7D\u4E2D...")), index.h("div", { style: { marginTop: '12px' } }, this.value?.map?.((item, index$1) => {
11226
+ return index.h("div", { class: "file-item", key: index$1 }, index.h("div", { class: "file-item-content" }, index.h("span", { class: "file-icon" }, "\uD83D\uDCDD"), index.h("span", { class: "file-name" }, item?.file_name)), index.h("button", { class: "remove-file", onClick: (e) => {
11227
+ e.stopPropagation();
11228
+ this.handleDelete(item.cos_key);
11229
+ } }, "\u00D7"));
11230
+ })), index.h("div", { class: "modal-footer" }, index.h("div", { class: "btn btn-default", onClick: this.cancelMobileUpload }, "\u53D6\u6D88"), index.h("div", { class: "btn btn-primary", onClick: () => {
11231
+ if (this.value.length > this.maxFileCount) {
11232
+ message_service.Message.info(`最多只能选择${this.maxFileCount}个文件,请删除多余文件!`);
11233
+ return;
11234
+ }
11235
+ this.ok.emit(this.value);
11236
+ this.cancelMobileUpload();
11237
+ } }, "\u5B8C\u6210"))))));
11238
+ }
11239
+ }
11240
+ };
11241
+ MobileUploadBtn.style = pcmMobileUploadBtnCss + globalCss$5;
11242
+
11243
+ const pcmMsbgModalCss = "";
11244
+
11245
+ const globalCss$4 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11246
+
11247
+ const MsbgModal = class {
11248
+ constructor(hostRef) {
11249
+ index.registerInstance(this, hostRef);
11250
+ this.modalClosed = index.createEvent(this, "modalClosed");
11251
+ this.uploadSuccess = index.createEvent(this, "uploadSuccess");
11252
+ this.streamComplete = index.createEvent(this, "streamComplete");
11253
+ this.conversationStart = index.createEvent(this, "conversationStart");
11254
+ this.interviewComplete = index.createEvent(this, "interviewComplete");
11255
+ this.tokenInvalid = index.createEvent(this, "tokenInvalid");
11256
+ this.someErrorEvent = index.createEvent(this, "someErrorEvent");
11257
+ }
11258
+ /**
11259
+ * 模态框标题
11260
+ */
11261
+ modalTitle = '面试报告';
11262
+ /**
11263
+ * SDK鉴权密钥
11264
+ */
11265
+ token;
11266
+ /**
11267
+ * 是否显示聊天模态框
11268
+ */
11269
+ isOpen = false;
11270
+ /**
11271
+ * 当点击模态框关闭时触发
11272
+ */
11273
+ modalClosed;
11274
+ /**
11275
+ * 应用图标URL
11276
+ */
11277
+ icon;
11278
+ /**
11279
+ * 聊天框的页面层级
11280
+ */
11281
+ zIndex = 1000;
11282
+ /**
11283
+ * 是否展示顶部标题栏
11284
+ */
11285
+ isShowHeader = true;
11286
+ /**
11287
+ * 是否展示右上角的关闭按钮
11288
+ */
11289
+ isNeedClose = true;
11290
+ /**
11291
+ * 会话ID,传入继续对话,否则创建新会话
11292
+ */
11293
+ conversationId;
11294
+ /**
11295
+ * 默认查询文本
11296
+ */
11297
+ defaultQuery = '请开始分析';
11298
+ /**
11299
+ * 是否以全屏模式打开,移动端建议设置为true
11300
+ */
11301
+ fullscreen = false;
11302
+ /**
11303
+ * 自定义输入参数,传入customInputs.job_info时,会隐藏JD输入区域<br>
11304
+ * 传入customInputs.file_urls时,会隐藏简历上传区域。<br>
11305
+ * 传入customInputs.file_urls和customInputs.job_info时,会直接开始聊天。<br>
8463
11306
  */
8464
11307
  customInputs = {};
8465
11308
  /**
@@ -8542,7 +11385,7 @@ const MsbgModal = class {
8542
11385
  this.tokenInvalid.emit();
8543
11386
  };
8544
11387
  // 添加全局错误监听
8545
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
11388
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
8546
11389
  this.someErrorEvent.emit(errorDetail);
8547
11390
  });
8548
11391
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -8596,7 +11439,7 @@ const MsbgModal = class {
8596
11439
  component: 'pcm-msbg-modal',
8597
11440
  title: '文件上传失败'
8598
11441
  });
8599
- sentryReporter.ErrorEventBus.emitError({
11442
+ errorEvent.ErrorEventBus.emitError({
8600
11443
  error: error,
8601
11444
  message: '文件上传失败,请重试'
8602
11445
  });
@@ -8639,7 +11482,7 @@ const MsbgModal = class {
8639
11482
  component: 'pcm-msbg-modal',
8640
11483
  title: '开始面试时出错'
8641
11484
  });
8642
- sentryReporter.ErrorEventBus.emitError({
11485
+ errorEvent.ErrorEventBus.emitError({
8643
11486
  error: error,
8644
11487
  message: '开始面试时出错,请重试'
8645
11488
  });
@@ -8686,11 +11529,11 @@ const MsbgModal = class {
8686
11529
  "isOpen": ["handleIsOpenChange"]
8687
11530
  }; }
8688
11531
  };
8689
- MsbgModal.style = pcmMsbgModalCss + globalCss$2;
11532
+ MsbgModal.style = pcmMsbgModalCss + globalCss$4;
8690
11533
 
8691
11534
  const pcmQgqjlModalCss = "";
8692
11535
 
8693
- const globalCss$1 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11536
+ const globalCss$3 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
8694
11537
 
8695
11538
  const QgqjlModal = class {
8696
11539
  constructor(hostRef) {
@@ -8833,7 +11676,7 @@ const QgqjlModal = class {
8833
11676
  this.tokenInvalid.emit();
8834
11677
  };
8835
11678
  // 添加全局错误监听
8836
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
11679
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
8837
11680
  this.someErrorEvent.emit(errorDetail);
8838
11681
  });
8839
11682
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -8887,7 +11730,7 @@ const QgqjlModal = class {
8887
11730
  component: 'pcm-qgqjl-modal',
8888
11731
  title: '文件上传失败'
8889
11732
  });
8890
- sentryReporter.ErrorEventBus.emitError({
11733
+ errorEvent.ErrorEventBus.emitError({
8891
11734
  error: error,
8892
11735
  message: '文件上传失败,请重试'
8893
11736
  });
@@ -8930,7 +11773,7 @@ const QgqjlModal = class {
8930
11773
  component: 'pcm-qgqjl-modal',
8931
11774
  title: '开始面试时出错'
8932
11775
  });
8933
- sentryReporter.ErrorEventBus.emitError({
11776
+ errorEvent.ErrorEventBus.emitError({
8934
11777
  error: error,
8935
11778
  message: '开始面试时出错,请重试'
8936
11779
  });
@@ -8977,7 +11820,220 @@ const QgqjlModal = class {
8977
11820
  "isOpen": ["handleIsOpenChange"]
8978
11821
  }; }
8979
11822
  };
8980
- QgqjlModal.style = pcmQgqjlModalCss + globalCss$1;
11823
+ QgqjlModal.style = pcmQgqjlModalCss + globalCss$3;
11824
+
11825
+ const pcmTimeCountDownCss = "";
11826
+
11827
+ const globalCss$2 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11828
+
11829
+ const formatNumber = (n) => {
11830
+ const str = n.toString();
11831
+ return str[1] ? str : `0${str}`;
11832
+ };
11833
+ // 时间转时分秒
11834
+ const timeToHMS = (time) => {
11835
+ const hour = Math.floor(time / 3600);
11836
+ const minute = Math.floor((time - hour * 3600) / 60);
11837
+ const second = time - hour * 3600 - minute * 60;
11838
+ return `${formatNumber(hour)}:${formatNumber(minute)}:${formatNumber(second)}`;
11839
+ };
11840
+ const TimeCountDown = class {
11841
+ constructor(hostRef) {
11842
+ index.registerInstance(this, hostRef);
11843
+ this.finished = index.createEvent(this, "finished");
11844
+ }
11845
+ /**
11846
+ * 倒计时总秒数
11847
+ */
11848
+ time;
11849
+ /**
11850
+ * 倒计时结束事件
11851
+ */
11852
+ finished;
11853
+ currentTime;
11854
+ componentWillLoad() {
11855
+ this.currentTime = this.time;
11856
+ }
11857
+ watchStateHandler(currentTime) {
11858
+ let timer;
11859
+ if (currentTime > 0) {
11860
+ timer = setTimeout(() => {
11861
+ this.currentTime = currentTime - 1;
11862
+ clearTimeout(timer);
11863
+ }, 1000);
11864
+ }
11865
+ else {
11866
+ this.finished.emit();
11867
+ }
11868
+ }
11869
+ render() {
11870
+ return index.h("span", { key: '88065e0a7955b893f71110ae8389ee1d1d37bdf6' }, timeToHMS(this.currentTime));
11871
+ }
11872
+ static get watchers() { return {
11873
+ "currentTime": ["watchStateHandler"]
11874
+ }; }
11875
+ };
11876
+ TimeCountDown.style = pcmTimeCountDownCss + globalCss$2;
11877
+
11878
+ const pcmUploadCss = "";
11879
+
11880
+ const globalCss$1 = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
11881
+
11882
+ const PcmUpload = class {
11883
+ constructor(hostRef) {
11884
+ index.registerInstance(this, hostRef);
11885
+ this.uploadFailed = index.createEvent(this, "uploadFailed");
11886
+ this.uploadChange = index.createEvent(this, "uploadChange");
11887
+ }
11888
+ /**
11889
+ * 是否支持多文件上传
11890
+ */
11891
+ multiple = false;
11892
+ /**
11893
+ * 是否开启移动端上传(仅PC端生效)
11894
+ */
11895
+ mobileUploadAble = false;
11896
+ /**
11897
+ * label内容
11898
+ */
11899
+ labelText = '上传文件';
11900
+ /**
11901
+ * 支持的文件后缀列表(需要带上小数点.)
11902
+ */
11903
+ acceptFileSuffixList = [];
11904
+ /**
11905
+ * 最大文件数
11906
+ */
11907
+ maxFileCount = Infinity;
11908
+ /**
11909
+ * 最大文件大小
11910
+ */
11911
+ maxFileSize = Infinity;
11912
+ /**
11913
+ * 上传请求头
11914
+ */
11915
+ uploadHeaders;
11916
+ /**
11917
+ * 上传请求参数
11918
+ */
11919
+ uploadParams;
11920
+ /**
11921
+ * 上传失败监听
11922
+ */
11923
+ uploadFailed;
11924
+ /**
11925
+ * 上传文件变化监听
11926
+ */
11927
+ uploadChange;
11928
+ get hostElement() { return index.getElement(this); }
11929
+ selectedFiles = null;
11930
+ async getIsUploading() {
11931
+ return !!this.selectedFiles?.some(item => item.state === index$1.FileUploadState.Uploading);
11932
+ }
11933
+ handleUploadClick = () => {
11934
+ const fileInput = this.hostElement.shadowRoot?.querySelector('.file-input');
11935
+ fileInput?.click();
11936
+ };
11937
+ clearSelectedFile = () => {
11938
+ const fileInput = this.hostElement.shadowRoot?.querySelector('.file-input');
11939
+ if (fileInput) {
11940
+ fileInput.value = '';
11941
+ }
11942
+ };
11943
+ async uploadFile(file) {
11944
+ try {
11945
+ const result = await index$1.uploadFileToBackend(file, this.uploadHeaders || {}, this.uploadParams || {});
11946
+ return {
11947
+ ...result,
11948
+ file,
11949
+ file_name: file.name,
11950
+ file_size: file.size,
11951
+ state: index$1.FileUploadState.Success,
11952
+ };
11953
+ }
11954
+ catch (error) {
11955
+ this.clearSelectedFile();
11956
+ sentryReporter.SentryReporter.captureError(error, {
11957
+ action: 'uploadFile',
11958
+ component: 'pcm-mnms-modal',
11959
+ title: '文件上传失败'
11960
+ });
11961
+ this.uploadFailed.emit({
11962
+ error: error,
11963
+ message: '文件上传失败,请重试'
11964
+ });
11965
+ return {
11966
+ file,
11967
+ error,
11968
+ state: index$1.FileUploadState.Failed,
11969
+ };
11970
+ }
11971
+ }
11972
+ handleFileChange = async (event) => {
11973
+ const input = event.target;
11974
+ if (this.multiple) ;
11975
+ else {
11976
+ // 单选
11977
+ const file = input.files?.[0];
11978
+ if (!file)
11979
+ return;
11980
+ // 检测文件是否符合后缀名
11981
+ if (this.acceptFileSuffixList?.length) {
11982
+ const suffix = '.' + file.name.split('.').pop()?.toLowerCase();
11983
+ if (!this.acceptFileSuffixList.includes(suffix)) {
11984
+ message_service.Message.info(`请上传 ${this.acceptFileSuffixList.join('、')} 格式的文件`);
11985
+ return;
11986
+ }
11987
+ }
11988
+ // 检测文件大小是否超出限制
11989
+ if (this.maxFileSize < file.size) {
11990
+ message_service.Message.info(`文件大小不能超过 ${index$1.formatFileSize(this.maxFileSize) ?? '-'}`);
11991
+ return;
11992
+ }
11993
+ this.selectedFiles = [{
11994
+ file,
11995
+ file_name: file.name,
11996
+ file_size: file.size,
11997
+ state: index$1.FileUploadState.Uploading,
11998
+ cos_key: '',
11999
+ error: undefined,
12000
+ }];
12001
+ const uploadResult = await this.uploadFile(file);
12002
+ this.selectedFiles = [uploadResult];
12003
+ this.clearSelectedFile();
12004
+ this.emitUploadChange();
12005
+ }
12006
+ };
12007
+ emitUploadChange = () => {
12008
+ this.uploadChange.emit(this.selectedFiles?.map?.(item => ({
12009
+ cos_key: item.cos_key,
12010
+ file_name: item.file_name,
12011
+ file_size: item.file_size,
12012
+ ext: item.ext,
12013
+ })));
12014
+ };
12015
+ uploadBtn() {
12016
+ return index.h("div", null, !!this.mobileUploadAble && index.h("pcm-mobile-upload-btn", { multiple: this.multiple, acceptFileSuffixList: this.acceptFileSuffixList, maxFileCount: this.maxFileCount, maxFileSize: this.maxFileSize, uploadHeaders: this.uploadHeaders, uploadParams: this.uploadParams, onOk: e => {
12017
+ this.selectedFiles = [
12018
+ ...(this.selectedFiles ?? []),
12019
+ ...(e.detail ?? []).map(item => ({
12020
+ ...item,
12021
+ state: index$1.FileUploadState.Success,
12022
+ }))
12023
+ ];
12024
+ this.emitUploadChange();
12025
+ } }), index.h("div", { class: "upload-placeholder", onClick: this.handleUploadClick }, index.h("img", { src: 'https://pub.pincaimao.com/static/web/images/home/i_upload.png' }), index.h("p", { class: 'upload-text' }, "\u70B9\u51FB\u4E0A\u4F20\u7B80\u5386"), index.h("p", { class: "upload-hint" }, !!this.acceptFileSuffixList?.length && index.h("p", null, "\u652F\u6301 ", this.acceptFileSuffixList.join('、'), " \u683C\u5F0F\u3002"), !!this.maxFileSize && this.maxFileSize !== Infinity && index.h("p", null, "\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7 ", index$1.formatFileSize(this.maxFileSize) ?? '', "\u3002"), !!this.maxFileCount && this.maxFileCount !== Infinity && index.h("p", null, "\u6700\u591A\u4E0A\u4F20 ", this.maxFileCount, " \u4E2A\u6587\u4EF6\u3002"))));
12026
+ }
12027
+ render() {
12028
+ return (index.h("div", { key: 'faec753d60f8c6bfb1e3996b67552f8a12155c07' }, index.h("div", { key: '55e1e83f962dc17c033885869d8cb7e73b65bb95', class: "resume-upload-section" }, index.h("label", { key: '80cb959d043a015267bfb55c20bae44afd509ebd' }, this.labelText), index.h("div", { key: 'e7aa8c65761f945287de858ea7b3ad036fb4cb6d', class: "upload-area" }, index.h("div", { key: '48bef805f845bdd6e6a542bccbc1d2b8d30b4a02' }, this.selectedFiles?.map?.((item, index$2) => {
12029
+ return index.h("div", { class: "file-item" }, index.h("div", { class: "file-item-content" }, index.h("span", { class: "file-icon" }, "\uD83D\uDCDD"), index.h("span", { class: "file-name", style: item.state === index$1.FileUploadState.Failed ? { color: 'red', textDecoration: 'line-through' } : undefined }, item?.file_name), item.state === index$1.FileUploadState.Failed && index.h("span", { style: { color: 'red', marginLeft: '4px' } }, "(", item.error?.message ?? '上传失败', ")")), index.h("button", { class: "remove-file", onClick: (e) => {
12030
+ e.stopPropagation();
12031
+ this.selectedFiles = this.selectedFiles?.filter((_, itemIndex) => index$2 !== itemIndex);
12032
+ } }, "\u00D7"));
12033
+ })), this.multiple ? index.h("div", null, (this.selectedFiles?.length ?? 0) < this.maxFileCount && this.uploadBtn()) : index.h("div", null, !this.selectedFiles?.length && this.uploadBtn()))), index.h("input", { key: '480b2f35655d4cdb5a99c058e4b894baf0e4c6a8', type: "file", class: "file-input", onChange: this.handleFileChange })));
12034
+ }
12035
+ };
12036
+ PcmUpload.style = pcmUploadCss + globalCss$1;
8981
12037
 
8982
12038
  const pcmZskChatModalCss = ":host{display:block;font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;overflow-y:auto;padding:20px;z-index:1000;-webkit-overflow-scrolling:touch;}.fullscreen-overlay{padding:0;position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background:white;border-radius:8px;width:100%;max-width:900px;display:flex;flex-direction:column;position:relative;margin:auto}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.modal-container.fullscreen>div:not(.modal-header):not(.initial-upload){display:flex;flex-direction:column;flex:1;overflow:hidden;height:100%}.pc-layout{width:80%;max-width:800px;min-width:320px;min-height:400px}.video-preview.placeholder{display:flex;justify-content:center;align-items:center;background:#EAEAEA}.placeholder-status{color:#00000066}.waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-container{width:100%;display:flex;flex-direction:column;align-items:center}.video-area{width:100%;display:flex;flex-direction:column;align-items:center}.stop-recording-button{width:100%;height:100%;font-size:16px;background:#f44336;border-radius:6px;color:white;border:none;cursor:pointer}.stop-recording-button:hover{background:#d32f2f}.play-audio-container{width:100%;height:100%;display:flex;justify-content:center;align-items:center}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0;}.header-left{display:flex;align-items:center;gap:8px}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.chat-container{background-image:url(https://pub.pincaimao.com/static/web/images/login/bg_login_m.png);background-size:100%;height:100%;border-radius:0px 0px 8px 8px}.chat-history{position:relative;flex:1;overflow-y:auto;padding:20px;scroll-behavior:smooth;height:400px}.fullscreen .chat-history{height:auto;flex:1 1 auto}.message-input{padding:16px;border-top:1px solid #eee;display:flex;gap:8px;align-items:center}.message-input input{flex:1;padding:8px 12px;border:1px solid #ddd;border-radius:4px;outline:none;transition:border-color 0.2s ease}.message-input input:focus{border-color:#bbb}.message{margin-bottom:16px;opacity:1;transition:opacity 0.3s ease}.message-content{max-width:70%;padding:8px 12px;border-radius:8px;word-break:break-word}.message-content p{margin:0;word-break:break-word}.user-message{display:flex;justify-content:flex-end}.agent-message{display:flex;justify-content:flex-start}.user-message .message-content{background-color:#007bff;color:white}.agent-message .message-content{background-color:#f1f1f1}.message-time{font-size:12px;color:#999;margin-top:4px;display:block}.send-button{width:38px;height:38px;border-radius:16px;background:#0d75fb;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background-color 0.2s ease}.send-button img{width:24px;height:24px}.send-button:hover{background:#0a62d6}.send-button.disabled{background:#d9d9d9;cursor:not-allowed}.empty-state{display:flex;justify-content:center;align-items:center;height:100%;color:#999;text-align:center}.loading-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;justify-content:center;align-items:center;background-color:rgba(255, 255, 255, 0.98);z-index:1;opacity:1;transition:opacity 0.3s ease}.loading-container p{margin-top:16px;color:#666;font-size:14px}.loading-spinner{width:40px;height:40px;border:3px solid #f3f3f3;border-top:3px solid #1890ff;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}.messages-wrapper{width:100%;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}.messages-wrapper.has-overflow{justify-content:flex-start}.suggested-questions{display:flex;flex-direction:column;gap:8px;padding:16px}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#f3f4f6;border-radius:4px;cursor:pointer;font-size:14px;color:#374151;transition:background-color 0.2s}.suggested-question:hover{background-color:#e5e7eb}.arrow-right{margin-left:8px}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:#6b7280;border-radius:50%;animation:spin 1s linear infinite}.upload-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;color:#666;border-radius:4px;transition:background-color 0.2s}.upload-button:hover{background-color:rgba(0, 0, 0, 0.04)}.upload-button svg{width:20px;height:20px}.file-input{display:none}.selected-file{font-size:12px;color:#666;margin-left:8px;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.input-wrapper{flex:1;display:flex;align-items:center;border:1px solid #ddd;border-radius:4px;padding:0 4px;background:white}.input-wrapper input{border:none;flex:1;padding:8px;outline:none}.input-wrapper:focus-within{border-color:#bbb}.file-preview{padding:8px 16px;border-top:1px solid #eee;background-color:#f9f9f9}.recording-section{border-top:1px solid #eee;display:flex;flex-direction:column;align-items:center;padding:10px 20px 0px 20px;border-radius:14px 14px 0 0;flex:0 0 auto}.recording-section .video-preview{width:100%;height:200px;max-width:400px;position:relative;margin-bottom:10px;border:1px solid #ddd;border-radius:12px;overflow:hidden}.recording-section video{width:100%;height:100%;object-fit:cover}.recording-status{position:absolute;top:10px;left:10px;background-color:rgba(0, 0, 0, 0.6);color:white;padding:4px 8px;border-radius:4px;display:flex;align-items:center;gap:5px;font-size:14px;z-index:2}.recording-status .recording-dot{display:inline-block;width:10px;height:10px;background-color:red;border-radius:50%;margin-right:5px;animation:blink 1s infinite}.recording-status.warning{color:#ff4d4f;animation:blink 1s infinite}@keyframes blink{0%{opacity:1}50%{opacity:0.5}100%{opacity:1}}.recording-section .stop-recording-button{background-color:#f44336;color:white;border:none;cursor:pointer;font-weight:bold}.recording-section .stop-recording-button:hover{background-color:#d32f2f}.fullscreen{width:100vw;border-radius:0;height:100vh;display:flex;flex-direction:column;overflow-y:auto}.recording-controls{margin-top:10px;height:53px;width:100%;max-width:400px;display:flex;justify-content:center}.recording-controls .waiting-message{text-align:center;color:white;font-size:16px;background-image:linear-gradient(100deg, #4A9FFF 0%, #1058FF 100%);border-radius:6px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.15);width:95%;display:flex;justify-content:center;align-items:center;cursor:pointer}.recording-controls .waiting-message.loading{background:#faad14}.recording-controls .waiting-message p{margin:0;font-size:16px;color:white;font-weight:500}.recording-controls .stop-recording-button{background-color:#dc3545;color:white;border:none;cursor:pointer;font-size:16px}.recording-controls .stop-recording-button:hover{background-color:#c82333}.recording-controls .stop-recording-button.disabled{background:#ccc;cursor:not-allowed}.recording-controls .stop-recording-button.disabled:hover{background:#ccc}.progress-container{display:flex;justify-content:space-between;align-items:center;width:100%;max-width:400px;margin-top:10px;padding:0 5px}.progress-bar-container{height:4px;background-color:#E5E5E5;border-radius:2px;overflow:hidden;margin-right:10px;width:75px}.progress-bar{height:100%;background-image:linear-gradient(111deg, #4A9FFF 0%, #1058FF 100%);border-radius:2px;transition:width 0.3s ease}.progress-text{font-size:14px;color:#666;white-space:nowrap}.text-input-area{display:flex;flex-direction:column;width:100%;height:100%;padding:0px 16px 16px 16px;border-radius:8px;border:none;}.text-answer-input{flex:1;min-height:80px;padding:12px 12px 0px 12px;border:1px solid #ddd;border-radius:8px 8px 0 0;resize:none;font-size:16px;background-color:#fff;border-bottom:none;outline:none;}.input-toolbar{display:flex;justify-content:end;align-items:center;padding:8px 12px;background-color:#fff;border:1px solid #ddd;border-top:none;border-radius:0 0 8px 8px}.text-answer-input:focus{border-color:rgb(74, 144, 226);border-bottom:none}.text-answer-input:focus+.input-toolbar{border-color:rgb(74, 144, 226);border-top:none}.toolbar-actions{width:32px;height:32px;display:flex;justify-content:center;align-items:center;margin-right:10px;border:1px solid #d9d9d9;border-radius:6px}.toolbar-actions:hover{background-color:#f0f0f0}.toolbar-button{background:transparent;border:none;color:#666;cursor:pointer;padding:0;margin:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center}.toolbar-button>div,.toolbar-button>svg{display:flex;justify-content:center;align-items:center}.toolbar-button img{width:16px;height:16px}.submit-text-button{padding:6px 16px;background-color:#4a90e2;color:white;border:none;border-radius:4px;font-size:14px;font-weight:500;cursor:pointer;transition:background-color 0.2s}.submit-text-button:hover:not(.disabled){background-color:#3a7bc8}.submit-text-button.disabled{background-color:#b3b3b3;cursor:not-allowed}.toolbar-button.recording{background-color:rgba(255, 0, 0, 0.1);color:#ff3b30;animation:pulse 1.5s infinite}.toolbar-button.converting{background-color:rgba(0, 122, 255, 0.1);color:#007aff}.toolbar-button .recording-time{font-size:12px;margin-left:4px}.converting-indicator{display:flex;justify-content:center;align-items:center}.converting-indicator svg{animation:spin 1.5s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0.4)}70%{box-shadow:0 0 0 6px rgba(255, 0, 0, 0)}100%{box-shadow:0 0 0 0 rgba(255, 0, 0, 0)}}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.references-section{margin-top:30px;padding:12px;background-color:#f9f9f9;border-radius:8px;border:1px solid #e8e8e8}.references-title{font-size:14px;color:#666;margin:0 0 8px 0;font-weight:500}.references-list{display:flex;flex-direction:column;gap:8px}.reference-item{background-color:#fff;border:1px solid #e8e8e8;border-radius:6px;padding:10px;cursor:pointer;transition:background-color 0.2s, box-shadow 0.2s}.reference-item:hover{background-color:#f5f5f5;box-shadow:0 2px 8px rgba(0, 0, 0, 0.1)}.reference-header{display:flex;align-items:center;gap:6px;position:relative}.reference-icon{color:#1890ff;display:flex;align-items:center}.reference-name{font-size:13px;font-weight:500;color:#333;flex:1}.download-icon{color:#1890ff;display:flex;align-items:center}.reference-content{display:none}.suggested-questions{margin-top:20px;padding:12px;background-color:#f0f7ff;border-radius:8px;border:1px solid #d6e8ff}.suggested-title{font-size:14px;color:#1890ff;margin:0 0 8px 0;font-weight:500}.suggested-question{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:#fff;border:1px solid #e6f7ff;border-radius:6px;cursor:pointer;font-size:14px;color:#1890ff;transition:all 0.3s;margin-bottom:8px}.suggested-question:last-child{margin-bottom:0}.suggested-question:hover{background-color:#e6f7ff;border-color:#91d5ff}.arrow-right{color:#1890ff;display:flex;align-items:center}.loading-suggestions{display:flex;justify-content:center;padding:16px}.loading-spinner-small{width:20px;height:20px;border:2px solid #e6f7ff;border-top-color:#1890ff;border-radius:50%;animation:spin 1s linear infinite}";
8983
12039
 
@@ -9887,7 +12943,7 @@ const ChatKBModal = class {
9887
12943
  };
9888
12944
  ChatKBModal.style = pcmZskChatModalCss;
9889
12945
 
9890
- const globalCss = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
12946
+ const globalCss = ":host{font-size:16px}.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);display:flex;justify-content:center;align-items:center;z-index:1000;overflow-y:auto;padding:20px}.fullscreen-overlay{padding:0;background-color:rgba(0, 0, 0, 0.7);position:absolute;width:100%;height:calc(100% - 10px)}.modal-container{background-color:#fff;border-radius:8px;width:100%;display:flex;flex-direction:column;position:relative;margin:auto;transition:all 0.3s ease-out;overflow:hidden}.modal-container.fullscreen{width:100%;max-width:none;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column;max-height:100%}.pc-layout{width:80%;max-width:600px;min-width:320px}@media screen and (max-width: 768px){.pc-layout{width:95%}.modal-overlay{padding:10px 0px 0px 0px}.modal-container.fullscreen{width:100%;height:100%;max-height:100%;border-radius:16px 16px 0 0;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}}.modal-header{display:flex;justify-content:space-between;align-items:center;padding:4px 16px;height:50px;border-bottom:1px solid #e8e8e8;flex-shrink:0}.header-left{display:flex;align-items:center;gap:8px;font-size:16px;font-weight:600;color:#333}.header-icon{width:24px;height:24px}.close-button{background:transparent;border:none;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:4px}.close-button:hover{background-color:rgba(0, 0, 0, 0.04)}.close-button span{font-size:24px;line-height:1;color:#999}.close-button:hover span{color:#666}.upload-area{cursor:pointer;width:100%}.upload-placeholder{transition:all 0.3s ease;display:flex;flex-direction:column;align-items:center;background:rgba(0, 0, 0, 0.02);border:1px dashed #d9d9d9;border-radius:8px}.upload-placeholder:hover{border:1px dashed #1890ff}.upload-placeholder img{margin-top:8px;width:50px;height:50px}.upload-placeholder .upload-text{margin:4px 0;color:#332F39;font-size:14px}.upload-placeholder .upload-hint{font-size:14px;color:#949AA5;margin-top:8px;padding:0px 10px;text-align:center}.file-item{position:relative;padding:16px;border:1px solid #e2e8f0;border-radius:8px;transition:border-color 0.3s;cursor:pointer;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center}.file-item:hover{border-color:#0D75FB}.file-item-content{display:flex;align-items:center;gap:8px;flex:1;min-width:0;overflow:hidden}.file-icon{color:#0D75FB;flex-shrink:0}.file-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:calc(100% - 50px)}.remove-file{background:transparent;border:none;color:#94a3b8;cursor:pointer;font-size:18px;display:flex;align-items:center;justify-content:center;padding:4px;margin-left:8px;border-radius:4px;transition:all 0.2s;min-width:30px;min-height:30px}.remove-file:hover{background-color:#f1f5f9;color:#475569}.file-input{display:none}.input-container{padding:20px;display:flex;flex-direction:column;height:calc(100% - 50px);background:linear-gradient(150deg, #2a6ee933, #0000 50%) 0 0 / 400px 200px no-repeat, #fff;overflow-y:auto}.input-container h3{margin-top:0;margin-bottom:20px;font-size:18px;color:#333;text-align:center}.jd-input-section{margin-bottom:20px}.jd-input-section label{display:block;margin-bottom:8px;font-weight:500;color:#333}.job-description-textarea{width:calc(100% - 16px);border:1px solid #ddd;border-radius:4px;resize:vertical;font-family:inherit;font-size:14px;line-height:1.5;transition:border-color 0.3s;padding:8px}.job-description-textarea:focus{outline:none;border-color:#1890ff;box-shadow:0 0 0 2px rgba(24, 144, 255, 0.2)}.resume-upload-section{margin-bottom:20px;width:100%;display:flex;flex-direction:column;align-items:center}.resume-upload-section label{display:block;margin-bottom:8px;font-weight:500;color:#333;align-self:flex-start}.submit-button{margin-top:10px;padding:10px 30px;background:#0D75FB;color:white;border:none;border-radius:4px;font-size:16px;cursor:pointer;transition:all 0.3s ease;width:100%;max-width:400px;align-self:center}.submit-button:hover{background-color:#40a9ff}.submit-button:disabled{background-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.25);cursor:not-allowed}.ai-disclaimer{margin-top:16px;text-align:center;font-size:12px;color:#999;line-height:1.5}.ai-disclaimer p{margin:4px 0}.beian-info{display:flex;justify-content:center;flex-wrap:wrap;gap:4px}.ai-disclaimer a{color:#666;text-decoration:none;transition:color 0.2s ease}.ai-disclaimer a:hover{color:#1890ff;text-decoration:underline}.loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:24px}.loading-spinner{width:40px;height:40px;border:4px solid rgba(0, 0, 0, 0.1);border-radius:50%;border-top-color:var(--pcm-primary-color, #1890ff);animation:spin 1s linear infinite;margin-bottom:16px}.loading-text{font-size:16px;color:var(--pcm-text-color, #333)}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
9891
12947
 
9892
12948
  const pcmZyghModalCss = ".plan-type-section{display:flex;flex-direction:column;gap:10px;margin-bottom:20px}.plan-type-section label{font-weight:600;color:#333;margin-bottom:8px}.plan-type-options{display:flex;gap:15px;flex-wrap:wrap}.plan-type-option{flex:1;min-width:120px;border:1px solid #e8e8e8;border-radius:8px;padding:15px;cursor:pointer;display:flex;flex-direction:column;align-items:center;transition:all 0.3s}.plan-type-option:hover{border-color:#1890ff;background-color:#f0f7ff}.plan-type-option.selected{border-color:#1890ff;background-color:#e6f7ff;box-shadow:0 2px 8px rgba(24, 144, 255, 0.2)}.option-icon{font-size:24px;margin-bottom:8px}.option-label{font-size:14px;font-weight:500;color:#333}.resume-upload-section{display:flex;flex-direction:column;gap:8px}.resume-upload-section label{font-weight:600;color:#333;margin-bottom:8px}";
9893
12949
 
@@ -10035,7 +13091,7 @@ const ZyghModal = class {
10035
13091
  this.tokenInvalid.emit();
10036
13092
  };
10037
13093
  // 添加全局错误监听
10038
- this.removeErrorListener = sentryReporter.ErrorEventBus.addErrorListener((errorDetail) => {
13094
+ this.removeErrorListener = errorEvent.ErrorEventBus.addErrorListener((errorDetail) => {
10039
13095
  this.someErrorEvent.emit(errorDetail);
10040
13096
  });
10041
13097
  document.addEventListener('pcm-token-invalid', this.tokenInvalidListener);
@@ -10091,7 +13147,7 @@ const ZyghModal = class {
10091
13147
  component: 'pcm-zygh-modal',
10092
13148
  title: '文件上传失败'
10093
13149
  });
10094
- sentryReporter.ErrorEventBus.emitError({
13150
+ errorEvent.ErrorEventBus.emitError({
10095
13151
  error: error,
10096
13152
  message: '文件上传失败,请重试'
10097
13153
  });
@@ -10125,7 +13181,7 @@ const ZyghModal = class {
10125
13181
  component: 'pcm-zygh-modal',
10126
13182
  title: '开始规划时出错'
10127
13183
  });
10128
- sentryReporter.ErrorEventBus.emitError({
13184
+ errorEvent.ErrorEventBus.emitError({
10129
13185
  error: error,
10130
13186
  message: '开始规划时出错,请重试'
10131
13187
  });
@@ -10190,10 +13246,14 @@ exports.pcm_jd_modal = PcmJdModal;
10190
13246
  exports.pcm_jlpp_modal = JlppModal;
10191
13247
  exports.pcm_mnct_modal = MnctModal;
10192
13248
  exports.pcm_mnms_modal = MnmsModal;
13249
+ exports.pcm_mobile_input_btn = MobileUploadBtn$1;
13250
+ exports.pcm_mobile_upload_btn = MobileUploadBtn;
10193
13251
  exports.pcm_msbg_modal = MsbgModal;
10194
13252
  exports.pcm_qgqjl_modal = QgqjlModal;
13253
+ exports.pcm_time_count_down = TimeCountDown;
13254
+ exports.pcm_upload = PcmUpload;
10195
13255
  exports.pcm_zsk_chat_modal = ChatKBModal;
10196
13256
  exports.pcm_zygh_modal = ZyghModal;
10197
- //# sourceMappingURL=pcm-1zhanshi-mnms-modal.pcm-app-chat-modal.pcm-button.pcm-card.pcm-chat-message.pcm-drawer.pcm-hr-chat-modal.pcm-htws-modal.pcm-hyzj-modal.pcm-jd-modal.pcm-jlpp-modal.pcm-mnct-modal.pcm-mnms-modal.pcm-msbg-modal.pcm-qgqjl-modal.pcm-zsk-chat-modal.pcm-zygh-modal.entry.cjs.js.map
13257
+ //# sourceMappingURL=pcm-1zhanshi-mnms-modal.pcm-app-chat-modal.pcm-button.pcm-card.pcm-chat-message.pcm-drawer.pcm-hr-chat-modal.pcm-htws-modal.pcm-hyzj-modal.pcm-jd-modal.pcm-jlpp-modal.pcm-mnct-modal.pcm-mnms-modal.pcm-mobile-input-btn.pcm-mobile-upload-btn.pcm-msbg-modal.pcm-qgqjl-modal.pcm-time-count-down.pcm-upload.pcm-zsk-chat-modal.pcm-zygh-modal.entry.cjs.js.map
10198
13258
 
10199
- //# sourceMappingURL=pcm-1zhanshi-mnms-modal_17.cjs.entry.js.map
13259
+ //# sourceMappingURL=pcm-1zhanshi-mnms-modal_21.cjs.entry.js.map