@whyour/qinglong 2.21.0 → 2.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (362) hide show
  1. package/.dockerignore +13 -0
  2. package/.env.example +7 -0
  3. package/AGENTS.md +2 -2
  4. package/README-en.md +24 -0
  5. package/README.md +24 -0
  6. package/back/protos/api.proto +9 -1
  7. package/back/protos/cron.proto +8 -1
  8. package/deploy/kubernetes/README.md +81 -0
  9. package/deploy/kubernetes/base/kustomization.yaml +5 -0
  10. package/deploy/kubernetes/base/qinglong.yaml +95 -0
  11. package/deploy/kubernetes/overlays/example/kustomization.yaml +10 -0
  12. package/docker/Dockerfile +31 -12
  13. package/docker/Dockerfile.310 +31 -12
  14. package/docker/Dockerfile.debian +22 -14
  15. package/docker/Dockerfile.debian310 +24 -14
  16. package/docker/build-manifest.cjs +28 -0
  17. package/docker/verify-build.cjs +49 -0
  18. package/docs/development/node-cron-migration.md +49 -0
  19. package/docs/development/task-startup.md +78 -0
  20. package/docs/releases/2.22.0-validation.md +49 -0
  21. package/docs/releases/2.22.0.md +62 -0
  22. package/docs/releases/2.23.0.md +33 -0
  23. package/docs/script-history.md +53 -0
  24. package/ecosystem.config.js +10 -1
  25. package/package.json +19 -13
  26. package/sample/config.sample.sh +17 -2
  27. package/sample/notify.js +118 -0
  28. package/sample/notify.py +93 -0
  29. package/scripts/benchmark-execution.cjs +96 -0
  30. package/scripts/benchmark-script-history.cjs +39 -0
  31. package/scripts/publish-static.sh +34 -0
  32. package/scripts/sync-static.sh +20 -0
  33. package/scripts/wait-for-mirror.sh +214 -0
  34. package/scripts/write-build-info.cjs +27 -0
  35. package/shell/api.sh +96 -83
  36. package/shell/check.sh +59 -19
  37. package/shell/lang/en.sh +6 -0
  38. package/shell/lang/zh.sh +6 -0
  39. package/shell/node_path_cache.sh +136 -0
  40. package/shell/otask.sh +17 -10
  41. package/shell/preload/sitecustomize.js +11 -3
  42. package/shell/preload/sitecustomize.py +4 -2
  43. package/shell/share.sh +27 -10
  44. package/shell/start.sh +6 -3
  45. package/shell/task-timeout.sh +63 -0
  46. package/shell/task.sh +21 -9
  47. package/shell/update.sh +104 -98
  48. package/shell/upgrade.cjs +8 -0
  49. package/static/build/api/clientIp.js +42 -0
  50. package/static/build/api/config.js +9 -21
  51. package/static/build/api/cron.js +39 -3
  52. package/static/build/api/dashboard.js +50 -6
  53. package/static/build/api/env.js +17 -16
  54. package/static/build/api/health.js +2 -2
  55. package/static/build/api/index.js +4 -0
  56. package/static/build/api/log.js +39 -19
  57. package/static/build/api/open.js +2 -1
  58. package/static/build/api/retention.js +63 -0
  59. package/static/build/api/script.js +172 -25
  60. package/static/build/api/subscription.js +19 -8
  61. package/static/build/api/system.js +66 -12
  62. package/static/build/api/user.js +75 -15
  63. package/static/build/app.js +63 -54
  64. package/static/build/bootstrap/database.js +51 -0
  65. package/static/build/config/const.js +2 -0
  66. package/static/build/config/grpcCerts.js +93 -44
  67. package/static/build/config/index.js +0 -4
  68. package/static/build/config/share.js +5 -4
  69. package/static/build/config/subscription.js +19 -11
  70. package/static/build/config/util.js +142 -45
  71. package/static/build/data/cron.js +1 -0
  72. package/static/build/data/notify.js +18 -1
  73. package/static/build/data/sock.js +1 -0
  74. package/static/build/loaders/app.js +8 -6
  75. package/static/build/loaders/db.js +5 -35
  76. package/static/build/loaders/deps.js +30 -22
  77. package/static/build/loaders/express.js +46 -32
  78. package/static/build/loaders/initData.js +26 -33
  79. package/static/build/loaders/initFile.js +1 -1
  80. package/static/build/loaders/initTask.js +14 -3
  81. package/static/build/loaders/server.js +1 -1
  82. package/static/build/loaders/sock.js +72 -6
  83. package/static/build/middlewares/monitoring.js +12 -33
  84. package/static/build/middlewares/protectedPathCase.js +17 -0
  85. package/static/build/middlewares/uniqueConstraintError.js +15 -0
  86. package/static/build/protos/api.js +78 -2
  87. package/static/build/protos/cron.js +83 -5
  88. package/static/build/protos/health.js +1 -1
  89. package/static/build/schedule/addCron.js +67 -19
  90. package/static/build/schedule/api.js +5 -2
  91. package/static/build/schedule/client.js +56 -6
  92. package/static/build/schedule/delCron.js +11 -1
  93. package/static/build/schedule/health.js +72 -7
  94. package/static/build/schedule/setConcurrency.js +27 -0
  95. package/static/build/services/config.js +5 -43
  96. package/static/build/services/cron.js +389 -174
  97. package/static/build/services/dependence.js +66 -18
  98. package/static/build/services/env.js +1 -1
  99. package/static/build/services/grpc.js +4 -3
  100. package/static/build/services/health.js +4 -7
  101. package/static/build/services/http.js +9 -3
  102. package/static/build/services/log.js +2 -3
  103. package/static/build/services/metrics.js +46 -14
  104. package/static/build/services/notify.js +73 -5
  105. package/static/build/services/open.js +106 -31
  106. package/static/build/services/retention.js +123 -0
  107. package/static/build/services/schedule.js +77 -43
  108. package/static/build/services/script.js +4 -5
  109. package/static/build/services/scriptHistory.js +30 -0
  110. package/static/build/services/sshKey.js +39 -14
  111. package/static/build/services/subscription.js +161 -87
  112. package/static/build/services/system.js +116 -43
  113. package/static/build/services/user.js +255 -37
  114. package/static/build/shared/auth.js +22 -3
  115. package/static/build/shared/authMutation.js +17 -0
  116. package/static/build/shared/childProcess.js +82 -0
  117. package/static/build/shared/clientIp.js +27 -0
  118. package/static/build/shared/cronCommand.js +17 -0
  119. package/static/build/shared/cronSchedule.js +101 -0
  120. package/static/build/shared/cronScheduler.js +73 -0
  121. package/static/build/shared/errors.js +9 -0
  122. package/static/build/shared/fileAccess.js +60 -0
  123. package/static/build/shared/i18n.js +63 -4
  124. package/static/build/shared/logPath.js +15 -0
  125. package/static/build/shared/logReader.js +85 -0
  126. package/static/build/shared/logStreamManager.js +80 -60
  127. package/static/build/shared/loginThrottle.js +45 -0
  128. package/static/build/shared/pLimit.js +22 -8
  129. package/static/build/shared/password.js +30 -0
  130. package/static/build/shared/retention.js +58 -0
  131. package/static/build/shared/runCron.js +39 -17
  132. package/static/build/shared/schedulerMutationLock.js +44 -0
  133. package/static/build/shared/schedulerReadiness.js +82 -0
  134. package/static/build/shared/schemaMigrations.js +58 -0
  135. package/static/build/shared/scriptHistory.js +445 -0
  136. package/static/build/shared/shellQuote.js +11 -0
  137. package/static/build/shared/startupProcess.js +48 -0
  138. package/static/build/shared/store.js +7 -0
  139. package/static/build/shared/subscriptionMutationLock.js +34 -0
  140. package/static/build/shared/subscriptionPath.js +41 -0
  141. package/static/build/shared/subscriptionStorage.js +98 -0
  142. package/static/build/shared/trustProxy.js +119 -0
  143. package/static/build/shared/utils.js +2 -1
  144. package/static/build/token.js +3 -14
  145. package/static/build/validation/schedule.js +6 -12
  146. package/static/dist/{1885.e1ea09f6.async.js → 1885.b8f427bf.async.js} +1 -1
  147. package/static/dist/2031.6af40025.async.js +1 -0
  148. package/static/dist/2693.51c2636b.async.js +1 -0
  149. package/static/dist/{2890.9e373f5b.async.js → 2890.add55e85.async.js} +1 -1
  150. package/static/dist/2901.2ca95295.async.js +1 -0
  151. package/static/dist/292.264757f0.async.js +1 -0
  152. package/static/dist/3512.95e41255.async.js +1 -0
  153. package/static/dist/445.a65ff63b.async.js +1 -0
  154. package/static/dist/4736.1d2b5cb6.async.js +1 -0
  155. package/static/dist/{6013.4e38de36.async.js → 6013.db535339.async.js} +1 -1
  156. package/static/dist/6212.9e6d9913.async.js +1 -0
  157. package/static/dist/{6339.ab305e96.async.js → 6431.4603ad0e.async.js} +1 -1
  158. package/static/dist/{6872.42f939f1.async.js → 6872.a503ef55.async.js} +1 -1
  159. package/static/dist/7231.f7e5b668.async.js +1 -0
  160. package/static/dist/{7355.f9f263d8.async.js → 7355.fca746f5.async.js} +1 -1
  161. package/static/dist/{7508.7dcee91c.async.js → 7508.d90eac63.async.js} +1 -1
  162. package/static/dist/{7984.594296a5.async.js → 7984.eaac7402.async.js} +1 -1
  163. package/static/dist/8844.a0fef08e.async.js +1 -0
  164. package/static/dist/index.html +2 -2
  165. package/static/dist/layouts__index.633d3553.async.js +1 -0
  166. package/static/dist/preload_helper.01fcd534.js +1 -0
  167. package/static/dist/{src__pages__config__index.a22ff7dc.async.js → src__pages__config__index.9aba4054.async.js} +1 -1
  168. package/static/dist/src__pages__crontab__detail.86b2eebb.async.js +1 -0
  169. package/static/dist/src__pages__crontab__index.ae4e06f2.async.js +1 -0
  170. package/static/dist/{src__pages__crontab__logModal.0b8cce8c.async.js → src__pages__crontab__logModal.930535e2.async.js} +1 -1
  171. package/static/dist/src__pages__crontab__modal.a2c8fdcc.async.js +1 -0
  172. package/static/dist/src__pages__crontab__viewCreateModal.7b4f9cbe.async.js +1 -0
  173. package/static/dist/src__pages__crontab__viewManageModal.cd454ea0.async.js +1 -0
  174. package/static/dist/src__pages__dashboard__index.243c5a35.async.js +1 -0
  175. package/static/dist/src__pages__dashboard__taskResultModal.7795d6e1.async.js +1 -0
  176. package/static/dist/src__pages__dependence__index.874d501f.async.js +1 -0
  177. package/static/dist/src__pages__dependence__logModal.154efe7a.async.js +1 -0
  178. package/static/dist/src__pages__dependence__modal.0fa8b421.async.js +1 -0
  179. package/static/dist/src__pages__diff__index.b94e5dc5.async.js +1 -0
  180. package/static/dist/src__pages__env__editNameModal.c13d47d2.async.js +1 -0
  181. package/static/dist/src__pages__env__index.fd6fd2b0.async.js +1 -0
  182. package/static/dist/src__pages__env__modal.4d71adb3.async.js +1 -0
  183. package/static/dist/src__pages__error__index.aae50c94.async.js +1 -0
  184. package/static/dist/src__pages__initialization__index.82a2e967.async.js +1 -0
  185. package/static/dist/src__pages__log__index.71250e0d.async.js +1 -0
  186. package/static/dist/{src__pages__login__index.8c813eb1.async.js → src__pages__login__index.a0fd5ed8.async.js} +1 -1
  187. package/static/dist/src__pages__script__editModal.afabf073.async.js +1 -0
  188. package/static/dist/src__pages__script__editNameModal.789ad87b.async.js +1 -0
  189. package/static/dist/src__pages__script__historyDrawer.8c58d958.async.js +1 -0
  190. package/static/dist/src__pages__script__historyDrawer.a449193a.chunk.css +1 -0
  191. package/static/dist/src__pages__script__index.ab360776.chunk.css +1 -0
  192. package/static/dist/src__pages__script__index.fc575945.async.js +1 -0
  193. package/static/dist/src__pages__script__renameModal.0ab029e7.async.js +1 -0
  194. package/static/dist/src__pages__script__saveModal.8fca1a22.async.js +1 -0
  195. package/static/dist/src__pages__script__saveWithHistory.99ece830.async.js +1 -0
  196. package/static/dist/src__pages__script__setting.35ad4f02.async.js +1 -0
  197. package/static/dist/src__pages__setting__appModal.7eaeb9d3.async.js +1 -0
  198. package/static/dist/src__pages__setting__checkUpdate.d175b154.async.js +1 -0
  199. package/static/dist/src__pages__setting__clientIp.3a8711ed.async.js +1 -0
  200. package/static/dist/src__pages__setting__dependence.9c0f749b.async.js +1 -0
  201. package/static/dist/src__pages__setting__index.cb397741.async.js +1 -0
  202. package/static/dist/src__pages__setting__loginLog.e0a1f54d.async.js +1 -0
  203. package/static/dist/src__pages__setting__notification.2ffe4e5a.async.js +1 -0
  204. package/static/dist/src__pages__setting__other.3d0b8492.async.js +1 -0
  205. package/static/dist/{src__pages__setting__progress.8823ac90.async.js → src__pages__setting__progress.2ccae3d7.async.js} +1 -1
  206. package/static/dist/src__pages__setting__security.e2d71ebb.async.js +1 -0
  207. package/static/dist/src__pages__setting__systemLog.b3046955.async.js +1 -0
  208. package/static/dist/src__pages__subscription__index.43086a06.async.js +1 -0
  209. package/static/dist/src__pages__subscription__logModal.cdba5139.async.js +1 -0
  210. package/static/dist/src__pages__subscription__modal.30868ba8.async.js +1 -0
  211. package/static/dist/{umi.ca04a019.js → umi.3a24a9fa.js} +1 -1
  212. package/test/back/advisory-input-security.test.cjs +416 -0
  213. package/test/back/auth-security.test.cjs +74 -0
  214. package/test/back/build-provenance.test.cjs +150 -0
  215. package/test/back/code-scanning-security.test.cjs +189 -0
  216. package/test/back/cron-log-name.test.cjs +110 -0
  217. package/test/back/cron-macros.test.cjs +51 -0
  218. package/test/back/cron-schedule-compatibility.test.cjs +69 -0
  219. package/test/back/cron-scheduler-routing.test.cjs +59 -0
  220. package/test/back/cron-validation.test.cjs +45 -0
  221. package/test/back/dashboard-failures.test.cjs +173 -0
  222. package/test/back/database-bootstrap.test.cjs +193 -0
  223. package/test/back/dependence-cache-status.test.cjs +125 -0
  224. package/test/back/deprecated-file-routes.test.cjs +82 -0
  225. package/test/back/draft-path-security.test.cjs +235 -0
  226. package/test/back/ecosystem.test.cjs +28 -0
  227. package/test/back/env-import-security.test.cjs +91 -0
  228. package/test/back/env-name-parsing.test.cjs +96 -0
  229. package/test/back/execution-lifecycle.test.cjs +236 -0
  230. package/test/back/file-access-scope.test.cjs +180 -0
  231. package/test/back/file-access-security.test.cjs +47 -0
  232. package/test/back/fileTreeListing.test.cjs +57 -0
  233. package/test/back/grpc-cron-response.test.cjs +60 -0
  234. package/test/back/grpc-mtls-security.test.cjs +136 -0
  235. package/test/back/http-exclusive-listen.test.cjs +31 -0
  236. package/test/back/http-security.test.cjs +313 -0
  237. package/test/back/legacy-cron-recovery.test.cjs +76 -0
  238. package/test/back/linux-mirror-result.test.cjs +176 -0
  239. package/test/back/listen-security.test.cjs +68 -0
  240. package/test/back/log-path-security.test.cjs +158 -0
  241. package/test/back/logReader.test.cjs +72 -0
  242. package/test/back/manual-execution.test.cjs +85 -0
  243. package/test/back/manual-stop-claim.test.cjs +220 -0
  244. package/test/back/metrics.test.cjs +34 -0
  245. package/test/back/mirror-status.test.cjs +257 -0
  246. package/test/back/monitoring.test.cjs +73 -0
  247. package/test/back/node-cron-migration.test.cjs +65 -0
  248. package/test/back/node-path-cache.test.cjs +202 -0
  249. package/test/back/node-path-lock.test.cjs +182 -0
  250. package/test/back/npm-publication.test.cjs +70 -0
  251. package/test/back/preload-lazy-notify.test.cjs +168 -0
  252. package/test/back/primary-apm.test.cjs +24 -0
  253. package/test/back/process-exit-state.test.cjs +81 -0
  254. package/test/back/process-stop-signal.test.cjs +77 -0
  255. package/test/back/protected-path-case.test.cjs +58 -0
  256. package/test/back/qlServiceLogCommand.test.cjs +128 -0
  257. package/test/back/queued-cron-invalidation.test.cjs +98 -0
  258. package/test/back/restart-instance-recovery.test.cjs +116 -0
  259. package/test/back/retention.test.cjs +131 -0
  260. package/test/back/role-loading.test.cjs +118 -0
  261. package/test/back/schedule-health.test.cjs +86 -0
  262. package/test/back/scheduler-bulk-recovery.test.cjs +40 -0
  263. package/test/back/scheduler-concurrency.test.cjs +411 -0
  264. package/test/back/scheduler-file-lock.test.cjs +51 -0
  265. package/test/back/scheduler-mutation.test.cjs +312 -0
  266. package/test/back/scheduler-readiness.test.cjs +85 -0
  267. package/test/back/scheduler-reconciliation.test.cjs +206 -0
  268. package/test/back/scheduler-rpc-timeout.test.cjs +49 -0
  269. package/test/back/schema-migrations.test.cjs +127 -0
  270. package/test/back/script-file-access.test.cjs +210 -0
  271. package/test/back/script-history-api.test.cjs +551 -0
  272. package/test/back/script-history.test.cjs +383 -0
  273. package/test/back/shell-api-parsing.test.cjs +184 -0
  274. package/test/back/shell-translation-output.test.cjs +16 -0
  275. package/test/back/shell-upgrade.test.cjs +312 -0
  276. package/test/back/shellApiToken.test.cjs +151 -0
  277. package/test/back/sock-polling.test.cjs +297 -0
  278. package/test/back/sock-security.test.cjs +72 -0
  279. package/test/back/ssh-config-home.test.cjs +113 -0
  280. package/test/back/start-env-preservation.test.cjs +53 -0
  281. package/test/back/static-mirror-trigger.test.cjs +441 -0
  282. package/test/back/static-mirror.test.cjs +179 -0
  283. package/test/back/stop-failure-feedback.test.cjs +158 -0
  284. package/test/back/stop-race.test.cjs +171 -0
  285. package/test/back/subscription-cleanup.test.cjs +53 -0
  286. package/test/back/subscription-mutation-lock.test.cjs +83 -0
  287. package/test/back/subscription-review-regression.test.cjs +607 -0
  288. package/test/back/subscription-stop-state.test.cjs +66 -0
  289. package/test/back/subscription-storage-regression.test.cjs +553 -0
  290. package/test/back/system-dependence-cache.test.cjs +127 -0
  291. package/test/back/system-export-history.test.cjs +119 -0
  292. package/test/back/systemTokenRenewal.test.cjs +497 -0
  293. package/test/back/task-shell-lifecycle.test.cjs +194 -0
  294. package/test/back/task-time.test.cjs +116 -0
  295. package/test/back/unique-constraint-error.test.cjs +72 -0
  296. package/test/back/upgrade-guards.test.cjs +285 -0
  297. package/test/back/upgrade-lifecycle.test.cjs +288 -0
  298. package/test/back/upgrade-transaction.test.cjs +133 -0
  299. package/test/back/user-api.test.cjs +99 -0
  300. package/test/back/user-security.test.cjs +349 -0
  301. package/test/back/worker-apm.test.cjs +84 -0
  302. package/test/back/wpush-grpc.test.cjs +116 -0
  303. package/test/fixtures/legacy-cron.json +1371 -0
  304. package/test/front/cron-log-pagination.test.cjs +214 -0
  305. package/test/front/diff-file-routing.test.cjs +126 -0
  306. package/test/front/http-auth.test.cjs +152 -0
  307. package/test/front/http-error.test.cjs +29 -0
  308. package/test/front/script-history-save.test.cjs +121 -0
  309. package/test/helpers/load-security-module.cjs +42 -0
  310. package/test/helpers/upgrade-fixture.cjs +30 -0
  311. package/version.yaml +14 -34
  312. package/CLAUDE.md +0 -43
  313. package/static/dist/1147.c420132e.async.js +0 -1
  314. package/static/dist/134.54df9e38.async.js +0 -1
  315. package/static/dist/2096.6d98fd12.async.js +0 -1
  316. package/static/dist/2208.f7ba3dfa.async.js +0 -1
  317. package/static/dist/2286.164bb089.async.js +0 -1
  318. package/static/dist/3191.63263871.async.js +0 -1
  319. package/static/dist/4859.6592cebb.async.js +0 -1
  320. package/static/dist/4902.555f92ab.async.js +0 -1
  321. package/static/dist/5520.ff2cfd6b.async.js +0 -1
  322. package/static/dist/6431.c50479be.async.js +0 -1
  323. package/static/dist/6707.801b886b.async.js +0 -1
  324. package/static/dist/8826.2447a104.async.js +0 -1
  325. package/static/dist/layouts__index.a7a2bfe0.async.js +0 -1
  326. package/static/dist/preload_helper.0431c0f3.js +0 -1
  327. package/static/dist/src__pages__crontab__detail.b9c36808.async.js +0 -1
  328. package/static/dist/src__pages__crontab__index.fed99fd0.async.js +0 -1
  329. package/static/dist/src__pages__crontab__modal.f7041c7c.async.js +0 -1
  330. package/static/dist/src__pages__crontab__viewCreateModal.4d589f66.async.js +0 -1
  331. package/static/dist/src__pages__crontab__viewManageModal.0e317746.async.js +0 -1
  332. package/static/dist/src__pages__dashboard__index.b30f2f47.async.js +0 -1
  333. package/static/dist/src__pages__dependence__index.3d87ceac.async.js +0 -1
  334. package/static/dist/src__pages__dependence__logModal.0681830b.async.js +0 -1
  335. package/static/dist/src__pages__dependence__modal.11124896.async.js +0 -1
  336. package/static/dist/src__pages__diff__index.013b7c75.async.js +0 -1
  337. package/static/dist/src__pages__env__editNameModal.5d264b25.async.js +0 -1
  338. package/static/dist/src__pages__env__index.baa27d4e.async.js +0 -1
  339. package/static/dist/src__pages__env__modal.7f2ef1bc.async.js +0 -1
  340. package/static/dist/src__pages__error__index.f156b45e.async.js +0 -1
  341. package/static/dist/src__pages__initialization__index.e96d4ba8.async.js +0 -1
  342. package/static/dist/src__pages__log__index.e0978bae.async.js +0 -1
  343. package/static/dist/src__pages__script__editModal.cbf4ec0e.async.js +0 -1
  344. package/static/dist/src__pages__script__editNameModal.3e7e100d.async.js +0 -1
  345. package/static/dist/src__pages__script__index.2765d1b8.async.js +0 -1
  346. package/static/dist/src__pages__script__index.60b6f827.chunk.css +0 -1
  347. package/static/dist/src__pages__script__renameModal.5e987ef5.async.js +0 -1
  348. package/static/dist/src__pages__script__saveModal.3f9d23d6.async.js +0 -1
  349. package/static/dist/src__pages__script__setting.a535793a.async.js +0 -1
  350. package/static/dist/src__pages__setting__appModal.251cd14f.async.js +0 -1
  351. package/static/dist/src__pages__setting__checkUpdate.46efe057.async.js +0 -1
  352. package/static/dist/src__pages__setting__dependence.8a7a9529.async.js +0 -1
  353. package/static/dist/src__pages__setting__index.cc85fdfb.async.js +0 -1
  354. package/static/dist/src__pages__setting__loginLog.cea6056c.async.js +0 -1
  355. package/static/dist/src__pages__setting__notification.390fc905.async.js +0 -1
  356. package/static/dist/src__pages__setting__other.b22d2165.async.js +0 -1
  357. package/static/dist/src__pages__setting__security.598720a8.async.js +0 -1
  358. package/static/dist/src__pages__setting__systemLog.67406721.async.js +0 -1
  359. package/static/dist/src__pages__subscription__index.d0ab2abc.async.js +0 -1
  360. package/static/dist/src__pages__subscription__logModal.3864b37f.async.js +0 -1
  361. package/static/dist/src__pages__subscription__modal.3562c670.async.js +0 -1
  362. /package/static/dist/{4859.1b962b29.chunk.css → 292.1b962b29.chunk.css} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7508],{24506:function(e,t,n){var r=(0,n(75271).createContext)({});t.Z=r},47508:function(e,t,n){n.d(t,{ZP:function(){return Re}});n(5860);var r=n(2053),a=n(57904),o=n(73779),i=n(71374),c=n(57520),l=n(95531),s=n(52601),u=n(36326),f=n(24744),d=n(82187),p=n.n(d),m=n(28526),v=n(2021),h=n(75271),g=n(96820),x=n(35047),y=n(15363);function b(){return function(e,t,n){var r=n.value,a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t))return r;var n=function(e){var t,n=function(n){return function(){t=null,e.apply(void 0,(0,x.Z)(n))}},r=function(){if(null==t){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];t=(0,y.Z)(n(r))}};return r.cancel=function(){y.Z.cancel(t),t=null},r}(r.bind(this));return a=!0,Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),a=!1,n}}}}var Z=n(24429);function C(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function E(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function N(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n)return n+(window.innerHeight-t.bottom)}var P=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],w=[];function O(e,t){if(e){var n=w.find((function(t){return t.target===e}));n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},w.push(n),P.forEach((function(t){n.eventHandlers[t]=(0,Z.Z)(e,t,(function(){n.affixList.forEach((function(e){e.lazyUpdatePosition()}))}))})))}}function j(e){var t=w.find((function(t){var n=t.affixList.some((function(t){return t===e}));return n&&(t.affixList=t.affixList.filter((function(t){return t!==e}))),n}));t&&0===t.affixList.length&&(w=w.filter((function(e){return e!==t})),P.forEach((function(e){var n=t.eventHandlers[e];n&&n.remove&&n.remove()})))}function k(e,t,n){return t=(0,s.Z)(t),(0,c.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,s.Z)(e).constructor):t.apply(e,n))}var R,S=function(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":(0,f.Z)(Reflect))&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i};function T(){return"undefined"!=typeof window?window:null}!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(R||(R={}));var M=function(e){function t(){var e;return(0,o.Z)(this,t),(e=k(this,t,arguments)).state={status:R.None,lastAffix:!1,prevTarget:null},e.getOffsetTop=function(){var t=e.props,n=t.offsetBottom,r=t.offsetTop;return void 0===n&&void 0===r?0:r},e.getOffsetBottom=function(){return e.props.offsetBottom},e.savePlaceholderNode=function(t){e.placeholderNode=t},e.saveFixedNode=function(t){e.fixedNode=t},e.measure=function(){var t=e.state,n=t.status,r=t.lastAffix,a=e.props.onChange,o=e.getTargetFunc();if(n===R.Prepare&&e.fixedNode&&e.placeholderNode&&o){var i=e.getOffsetTop(),c=e.getOffsetBottom(),l=o();if(l){var s={status:R.None},u=C(l),f=C(e.placeholderNode),d=E(f,u,i),p=N(f,u,c);0===f.top&&0===f.left&&0===f.width&&0===f.height||(void 0!==d?(s.affixStyle={position:"fixed",top:d,width:f.width,height:f.height},s.placeholderStyle={width:f.width,height:f.height}):void 0!==p&&(s.affixStyle={position:"fixed",bottom:p,width:f.width,height:f.height},s.placeholderStyle={width:f.width,height:f.height}),s.lastAffix=!!s.affixStyle,a&&r!==s.lastAffix&&a(s.lastAffix),e.setState(s))}}},e.prepareMeasure=function(){e.setState({status:R.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e}return(0,u.Z)(t,e),(0,i.Z)(t,[{key:"getTargetFunc",value:function(){var e=this.context.getTargetContainer,t=this.props.target;return void 0!==t?t:null!=e?e:T}},{key:"componentDidMount",value:function(){var e=this,t=this.getTargetFunc();t&&(this.timeout=setTimeout((function(){O(t(),e),e.updatePosition()})))}},{key:"componentDidUpdate",value:function(e){var t=this.state.prevTarget,n=this.getTargetFunc(),r=(null==n?void 0:n())||null;t!==r&&(j(this),r&&(O(r,this),this.updatePosition()),this.setState({prevTarget:r})),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),j(this),this.updatePosition.cancel(),this.lazyUpdatePosition.cancel()}},{key:"updatePosition",value:function(){this.prepareMeasure()}},{key:"lazyUpdatePosition",value:function(){var e=this.getTargetFunc(),t=this.state.affixStyle;if(e&&t){var n=this.getOffsetTop(),r=this.getOffsetBottom(),a=e();if(a&&this.placeholderNode){var o=C(a),i=C(this.placeholderNode),c=E(i,o,n),l=N(i,o,r);if(void 0!==c&&t.top===c||void 0!==l&&t.bottom===l)return}}this.prepareMeasure()}},{key:"render",value:function(){var e=this,t=this.state,n=t.affixStyle,o=t.placeholderStyle,i=this.props,c=i.affixPrefixCls,l=i.children,s=p()((0,a.Z)({},c,!!n)),u=(0,v.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls"]);return h.createElement(m.Z,{onResize:function(){e.updatePosition()}},h.createElement("div",(0,r.Z)({},u,{ref:this.savePlaceholderNode}),n&&h.createElement("div",{style:o,"aria-hidden":"true"}),h.createElement("div",{className:s,ref:this.saveFixedNode,style:n},h.createElement(m.Z,{onResize:function(){e.updatePosition()}},l))))}}]),t}(h.Component);M.contextType=g.E_,S([b()],M.prototype,"updatePosition",null),S([b()],M.prototype,"lazyUpdatePosition",null);var z=h.forwardRef((function(e,t){var n=e.prefixCls,a=(0,h.useContext(g.E_).getPrefixCls)("affix",n),o=(0,r.Z)((0,r.Z)({},e),{affixPrefixCls:a});return h.createElement(M,(0,r.Z)({},o,{ref:t}))})),H=(n(99539),n(403)),B=(n(14823),n(99459)),_=n(98037),L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},A=n(64720),F=function(e,t){return h.createElement(A.Z,(0,_.Z)((0,_.Z)({},e),{},{ref:t,icon:L}))};var I=h.forwardRef(F),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"},U=function(e,t){return h.createElement(A.Z,(0,_.Z)((0,_.Z)({},e),{},{ref:t,icon:D}))};var W=h.forwardRef(U),q=n(82290),K=n(70892),V=n(22615),X=n(31492),G=n(5555),Q=n(95101),Y=n(20119),J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},$=function(e){var t=e.prefixCls,n=e.separator,a=void 0===n?"/":n,o=e.children,i=e.menu,c=e.overlay,l=e.dropdownProps,s=J(e,["prefixCls","separator","children","menu","overlay","dropdownProps"]),u=(0,h.useContext(g.E_).getPrefixCls)("breadcrumb",t);var f;return f=function(t){if(i||c){var n=(0,r.Z)({},l);return"overlay"in e&&(n.overlay=c),h.createElement(Y.Z,(0,r.Z)({menu:i,placement:"bottom"},n),h.createElement("span",{className:"".concat(u,"-overlay-link")},t,h.createElement(Q.Z,null)))}return t}(f="href"in s?h.createElement("a",(0,r.Z)({className:"".concat(u,"-link")},s),o):h.createElement("span",(0,r.Z)({className:"".concat(u,"-link")},s),o)),null!=o?h.createElement("li",null,f,a&&h.createElement("span",{className:"".concat(u,"-separator")},a)):null};$.__ANT_BREADCRUMB_ITEM=!0;var ee=$,te=function(e){var t=e.children,n=(0,h.useContext(g.E_).getPrefixCls)("breadcrumb");return h.createElement("span",{className:"".concat(n,"-separator")},t||"/")};te.__ANT_BREADCRUMB_SEPARATOR=!0;var ne=te,re=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function ae(e,t,n,r){var a=n.indexOf(e)===n.length-1,o=function(e,t){if(!e.breadcrumbName)return null;var n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(":(".concat(n,")"),"g"),(function(e,n){return t[n]||e}))}(e,t);return a?h.createElement("span",null,o):h.createElement("a",{href:"#/".concat(r.join("/"))},o)}var oe=function(e,t){return e=(e||"").replace(/^\//,""),Object.keys(t).forEach((function(n){e=e.replace(":".concat(n),t[n])})),e},ie=function(e,t,n){var r=(0,x.Z)(e),a=oe(t||"",n);return a&&r.push(a),r},ce=function(e){var t,n=e.prefixCls,o=e.separator,i=void 0===o?"/":o,c=e.style,l=e.className,s=e.routes,u=e.children,f=e.itemRender,d=void 0===f?ae:f,m=e.params,v=void 0===m?{}:m,x=re(e,["prefixCls","separator","style","className","routes","children","itemRender","params"]),y=h.useContext(g.E_),b=y.getPrefixCls,Z=y.direction,C=b("breadcrumb",n);if(s&&s.length>0){var E=[];t=s.map((function(e){var t,n=oe(e.path,v);n&&E.push(n),e.children&&e.children.length&&(t=h.createElement(X.Z,{items:e.children.map((function(e){return{key:e.path||e.breadcrumbName,label:d(e,v,s,ie(E,e.path,v))}}))}));var a={separator:i};return t&&(a.overlay=t),h.createElement(ee,(0,r.Z)({},a,{key:n||e.breadcrumbName}),d(e,v,s,E))}))}else u&&(t=(0,V.Z)(u).map((function(e,t){return e?(0,G.Tm)(e,{separator:i,key:t}):e})));var N=p()(C,(0,a.Z)({},"".concat(C,"-rtl"),"rtl"===Z),l);return h.createElement("nav",(0,r.Z)({className:N,style:c},x),h.createElement("ol",null,t))};ce.Item=ee,ce.Separator=ne;var le=ce,se=n(76595),ue=n(63505),fe=n(26382),de=function(e,t,n){return t&&n?h.createElement(se.Z,{componentName:"PageHeader"},(function(r){return h.createElement("div",{className:"".concat(e,"-back")},h.createElement(fe.Z,{onClick:function(e){null==n||n(e)},className:"".concat(e,"-back-button"),"aria-label":r.back},t))})):null},pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr";return void 0!==e.backIcon?e.backIcon:"rtl"===t?h.createElement(W,null):h.createElement(I,null)},me=function(e){var t=(0,q.Z)(!1),n=(0,B.Z)(t,2),o=n[0],i=n[1],c=function(e){var t=e.width;i(t<768,!0)};return h.createElement(g.C,null,(function(t){var n,i=t.getPrefixCls,l=t.pageHeader,s=t.direction,u=e.prefixCls,f=e.style,d=e.footer,v=e.children,g=e.breadcrumb,x=e.breadcrumbRender,y=e.className,b=!0;"ghost"in e?b=e.ghost:l&&"ghost"in l&&(b=l.ghost);var Z=i("page-header",u),C=(null==g?void 0:g.routes)?function(e){return h.createElement(le,(0,r.Z)({},e))}(g):null,E=g&&"props"in g,N=null!==(n=null==x?void 0:x(e,C))&&void 0!==n?n:C,P=E?g:N,w=p()(Z,y,(0,a.Z)((0,a.Z)((0,a.Z)({"has-breadcrumb":!!P,"has-footer":!!d},"".concat(Z,"-ghost"),b),"".concat(Z,"-rtl"),"rtl"===s),"".concat(Z,"-compact"),o));return h.createElement(m.Z,{onResize:c},h.createElement("div",{className:w,style:f},P,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",a=t.title,o=t.avatar,i=t.subTitle,c=t.tags,l=t.extra,s=t.onBack,u="".concat(e,"-heading"),f=a||i||c||l;if(!f)return null;var d=pe(t,n),p=de(e,d,s),m=p||o||f;return h.createElement("div",{className:u},m&&h.createElement("div",{className:"".concat(u,"-left")},p,o&&h.createElement(K.C,(0,r.Z)({},o)),a&&h.createElement("span",{className:"".concat(u,"-title"),title:"string"==typeof a?a:void 0},a),i&&h.createElement("span",{className:"".concat(u,"-sub-title"),title:"string"==typeof i?i:void 0},i),c&&h.createElement("span",{className:"".concat(u,"-tags")},c)),l&&h.createElement("span",{className:"".concat(u,"-extra")},h.createElement(ue.Z,null,l)))}(Z,e,s),v&&function(e,t){return h.createElement("div",{className:"".concat(e,"-content")},t)}(Z,v),function(e,t){return t?h.createElement("div",{className:"".concat(e,"-footer")},t):null}(Z,d)))}))},ve=n(58006),he=n(46035),ge=n(52676),xe=n(24506),ye=n(71770),be=["children","className","extra","style","renderContent"],Ze=function(e){var t=e.children,n=e.className,r=e.extra,a=e.style,o=e.renderContent,i=(0,ve.Z)(e,be),c=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,l=e.prefixCls||c("pro"),s="".concat(l,"-footer-bar"),u=(0,h.useContext)(xe.Z),f=(0,h.useMemo)((function(){var e=u.hasSiderMenu,t=u.isMobile,n=u.siderWidth;if(e)return n?t?"100%":"calc(100% - ".concat(n,"px)"):"100%"}),[u.collapsed,u.hasSiderMenu,u.isMobile,u.siderWidth]),d=(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("div",{className:"".concat(s,"-left"),children:r}),(0,ge.jsx)("div",{className:"".concat(s,"-right"),children:t})]});return(0,h.useEffect)((function(){return u&&(null==u?void 0:u.setHasFooterToolbar)?(null==u||u.setHasFooterToolbar(!0),function(){var e;null==u||null===(e=u.setHasFooterToolbar)||void 0===e||e.call(u,!1)}):function(){}}),[]),(0,ge.jsx)("div",(0,_.Z)((0,_.Z)({className:p()(n,"".concat(s)),style:(0,_.Z)({width:f},a)},(0,ye.Z)(i,["prefixCls"])),{},{children:o?o((0,_.Z)((0,_.Z)((0,_.Z)({},e),u),{},{leftWidth:f}),d):d}))},Ce=function(e){var t=(0,h.useContext)(xe.Z),n=e.children,r=e.contentWidth,a=e.className,o=e.style,i=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,c=e.prefixCls||i("pro"),l=r||t.contentWidth,s="".concat(c,"-grid-content");return(0,ge.jsx)("div",{className:p()(s,a,{wide:"Fixed"===l}),style:o,children:(0,ge.jsx)("div",{className:"".concat(c,"-grid-content-children"),children:n})})},Ee=n(34014),Ne=function(e){var t=e.children,n=e.style,r=e.className,a=e.markStyle,o=e.markClassName,i=e.zIndex,c=void 0===i?9:i,l=e.gapX,s=void 0===l?212:l,u=e.gapY,f=void 0===u?222:u,d=e.width,m=void 0===d?120:d,v=e.height,g=void 0===v?64:v,x=e.rotate,y=void 0===x?-22:x,b=e.image,Z=e.content,C=e.offsetLeft,E=e.offsetTop,N=e.fontStyle,P=void 0===N?"normal":N,w=e.fontWeight,O=void 0===w?"normal":w,j=e.fontColor,k=void 0===j?"rgba(0,0,0,.15)":j,R=e.fontSize,S=void 0===R?16:R,T=e.fontFamily,M=void 0===T?"sans-serif":T,z=e.prefixCls,L=(0,(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls)("pro-layout-watermark",z),A=p()("".concat(L,"-wrapper"),r),F=p()(L,o),I=(0,h.useState)(""),D=(0,B.Z)(I,2),U=D[0],W=D[1];return(0,h.useEffect)((function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=function(e){if(!e)return 1;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t}(t),r="".concat((s+m)*n,"px"),a="".concat((f+g)*n,"px"),o=C||s/2,i=E||f/2;if(e.setAttribute("width",r),e.setAttribute("height",a),t){t.translate(o*n,i*n),t.rotate(Math.PI/180*Number(y));var c=m*n,l=g*n;if(b){var u=new Image;u.crossOrigin="anonymous",u.referrerPolicy="no-referrer",u.src=b,u.onload=function(){t.drawImage(u,0,0,c,l),W(e.toDataURL())}}else if(Z){var d=Number(S)*n;t.font="".concat(P," normal ").concat(O," ").concat(d,"px/").concat(l,"px ").concat(M),t.fillStyle=k,Array.isArray(Z)?null==Z||Z.forEach((function(e,n){return t.fillText(e,0,50*n)})):t.fillText(Z,0,0),W(e.toDataURL())}}else console.error("当前环境不支持Canvas")}),[s,f,C,E,y,P,O,m,g,M,k,b,Z,S]),(0,ge.jsxs)("div",{style:(0,_.Z)({position:"relative"},n),className:A,children:[t,(0,ge.jsx)("div",{className:F,style:(0,_.Z)((0,_.Z)({zIndex:c,position:"absolute",left:0,top:0,width:"100%",height:"100%",backgroundSize:"".concat(s+m,"px"),pointerEvents:"none",backgroundRepeat:"repeat"},U?{backgroundImage:"url('".concat(U,"')")}:null),a)})]})},Pe=["title","content","pageHeaderRender","header","prefixedClassName","extraContent","style","prefixCls","breadcrumbRender"],we=["children","loading","className","style","footer","affixProps","ghost","fixedHeader","breadcrumbRender"];var Oe=function(e){var t=e.tabList,n=e.tabActiveKey,r=e.onTabChange,a=e.tabBarExtraContent,o=e.tabProps,i=e.prefixedClassName;return Array.isArray(t)||a?(0,ge.jsx)(he.Z,(0,_.Z)((0,_.Z)({className:"".concat(i,"-tabs"),activeKey:n,onChange:function(e){r&&r(e)},tabBarExtraContent:a},o),{},{children:null==t?void 0:t.map((function(e,t){return(0,h.createElement)(he.Z.TabPane,(0,_.Z)((0,_.Z)({},e),{},{tab:e.tab,key:e.key||t}))}))})):null},je=function(e,t,n){return e||t?(0,ge.jsx)("div",{className:"".concat(n,"-detail"),children:(0,ge.jsx)("div",{className:"".concat(n,"-main"),children:(0,ge.jsxs)("div",{className:"".concat(n,"-row"),children:[e&&(0,ge.jsx)("div",{className:"".concat(n,"-content"),children:e}),t&&(0,ge.jsx)("div",{className:"".concat(n,"-extraContent"),children:t})]})})}):null},ke=function(e){var t,n=(0,h.useContext)(xe.Z),r=e.title,a=e.content,o=e.pageHeaderRender,i=e.header,c=e.prefixedClassName,l=e.extraContent,s=(e.style,e.prefixCls),u=e.breadcrumbRender,f=(0,ve.Z)(e,Pe),d=(0,h.useMemo)((function(){if(u)return u}),[u]);if(!1===o)return null;if(o)return(0,ge.jsxs)(ge.Fragment,{children:[" ",o((0,_.Z)((0,_.Z)({},e),n))]});var p=r;r||!1===r||(p=n.title);var m=(0,_.Z)((0,_.Z)((0,_.Z)({},n),{},{title:p},f),{},{footer:Oe((0,_.Z)((0,_.Z)({},f),{},{breadcrumbRender:u,prefixedClassName:c}))},i),v=m.breadcrumb,g=!(v&&((null==v?void 0:v.itemRender)||(null==v||null===(t=v.routes)||void 0===t?void 0:t.length))||u);return["title","subTitle","extra","tags","footer","avatar","backIcon"].every((function(e){return!m[e]}))&&g&&!a&&!l?null:(0,ge.jsx)("div",{className:"".concat(c,"-warp"),children:(0,ge.jsx)(me,(0,_.Z)((0,_.Z)({},m),{},{breadcrumb:!1===u?void 0:(0,_.Z)((0,_.Z)({},m.breadcrumb),n.breadcrumbProps),breadcrumbRender:d,prefixCls:s,children:(null==i?void 0:i.children)||je(a,l,c)}))})},Re=function(e){var t,n,r=e.children,o=e.loading,i=void 0!==o&&o,c=e.className,l=e.style,s=e.footer,u=e.affixProps,d=e.ghost,m=e.fixedHeader,v=e.breadcrumbRender,g=(0,ve.Z)(e,we),x=(0,h.useContext)(xe.Z),y=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,b=e.prefixCls||y("pro"),Z="".concat(b,"-page-container"),C=p()(Z,c,(t={},(0,a.Z)(t,"".concat(b,"-page-container-ghost"),d),(0,a.Z)(t,"".concat(b,"-page-container-with-footer"),s),t)),E=(0,h.useMemo)((function(){return r?(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("div",{className:"".concat(Z,"-children-content"),children:r}),x.hasFooterToolbar&&(0,ge.jsx)("div",{style:{height:48,marginTop:24}})]}):null}),[r,Z,x.hasFooterToolbar]),N=(0,h.useMemo)((function(){var e;return 0!=v&&(v||(null==g||null===(e=g.header)||void 0===e?void 0:e.breadcrumbRender))}),[v,null==g||null===(n=g.header)||void 0===n?void 0:n.breadcrumbRender]),P=(0,ge.jsx)(ke,(0,_.Z)((0,_.Z)({},g),{},{breadcrumbRender:N,ghost:d,prefixCls:void 0,prefixedClassName:Z})),w=(0,h.useMemo)((function(){if(h.isValidElement(i))return i;if("boolean"==typeof i&&!i)return null;var e=function(e){return"object"===(0,f.Z)(e)?e:{spinning:e}}(i);return e.spinning?(0,ge.jsx)(Ee.Z,(0,_.Z)({},e)):null}),[i]),O=(0,h.useMemo)((function(){var t=w||E;if(e.waterMarkProps||x.waterMarkProps){var n=(0,_.Z)((0,_.Z)({},x.waterMarkProps),e.waterMarkProps);return(0,ge.jsx)(Ne,(0,_.Z)((0,_.Z)({},n),{},{children:t}))}return t}),[e.waterMarkProps,x.waterMarkProps,w,E]);return(0,ge.jsxs)("div",{style:l,className:C,children:[m&&P?(0,ge.jsx)(z,(0,_.Z)((0,_.Z)({offsetTop:x.hasHeader&&x.fixedHeader?x.headerHeight:0},u),{},{children:P})):P,O&&(0,ge.jsx)(Ce,{children:O}),s&&(0,ge.jsx)(Ze,{prefixCls:b,children:s})]})}},70892:function(e,t,n){n.d(t,{C:function(){return S}});var r=n(2053),a=n(57904),o=n(24744),i=n(99459),c=n(82187),l=n.n(c),s=n(28526),u=n(3083),f=n(75271),d=n(96820),p=n(71343),m=n(46555),v=f.createContext("default"),h=function(e){var t=e.children,n=e.size;return f.createElement(v.Consumer,null,(function(e){return f.createElement(v.Provider,{value:n||e},t)}))},g=v,x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},y=function(e,t){var n=f.useContext(g),c=f.useState(1),v=(0,i.Z)(c,2),h=v[0],y=v[1],b=f.useState(!1),Z=(0,i.Z)(b,2),C=Z[0],E=Z[1],N=f.useState(!0),P=(0,i.Z)(N,2),w=P[0],O=P[1],j=f.useRef(null),k=f.useRef(null),R=(0,u.sQ)(t,j),S=f.useContext(d.E_).getPrefixCls,T=function(){if(k.current&&j.current){var t=k.current.offsetWidth,n=j.current.offsetWidth;if(0!==t&&0!==n){var r=e.gap,a=void 0===r?4:r;2*a<n&&y(n-2*a<t?(n-2*a)/t:1)}}};f.useEffect((function(){E(!0)}),[]),f.useEffect((function(){O(!0),y(1)}),[e.src]),f.useEffect((function(){T()}),[e.gap]);var M,z=e.prefixCls,H=e.shape,B=void 0===H?"circle":H,_=e.size,L=void 0===_?"default":_,A=e.src,F=e.srcSet,I=e.icon,D=e.className,U=e.alt,W=e.draggable,q=e.children,K=e.crossOrigin,V=x(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),X="default"===L?n:L,G=Object.keys("object"===(0,o.Z)(X)&&X||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),Q=(0,p.Z)(G),Y=f.useMemo((function(){if("object"!==(0,o.Z)(X))return{};var e=m.c4.find((function(e){return Q[e]})),t=X[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:I?t/2:18}:{}}),[Q,X]),J=S("avatar",z),$=l()((0,a.Z)((0,a.Z)({},"".concat(J,"-lg"),"large"===X),"".concat(J,"-sm"),"small"===X)),ee=f.isValidElement(A),te=l()(J,$,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(J,"-").concat(B),!!B),"".concat(J,"-image"),ee||A&&w),"".concat(J,"-icon"),!!I),D),ne="number"==typeof X?{width:X,height:X,lineHeight:"".concat(X,"px"),fontSize:I?X/2:18}:{};if("string"==typeof A&&w)M=f.createElement("img",{src:A,draggable:W,srcSet:F,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&O(!1)},alt:U,crossOrigin:K});else if(ee)M=A;else if(I)M=I;else if(C||1!==h){var re="scale(".concat(h,") translateX(-50%)"),ae={msTransform:re,WebkitTransform:re,transform:re},oe="number"==typeof X?{lineHeight:"".concat(X,"px")}:{};M=f.createElement(s.Z,{onResize:T},f.createElement("span",{className:"".concat(J,"-string"),ref:k,style:(0,r.Z)((0,r.Z)({},oe),ae)},q))}else M=f.createElement("span",{className:"".concat(J,"-string"),style:{opacity:0},ref:k},q);return delete V.onError,delete V.gap,f.createElement("span",(0,r.Z)({},V,{style:(0,r.Z)((0,r.Z)((0,r.Z)({},ne),Y),V.style),className:te,ref:R}),M)};var b=f.forwardRef(y),Z=n(22615),C=function(e){return e?"function"==typeof e?e():e:null},E=n(21485),N=n(59816),P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},w=function(e){var t=e.title,n=e.content,r=e.prefixCls;return f.createElement(f.Fragment,null,t&&f.createElement("div",{className:"".concat(r,"-title")},C(t)),f.createElement("div",{className:"".concat(r,"-inner-content")},C(n)))};var O=f.forwardRef((function(e,t){var n=e.prefixCls,a=e.title,o=e.content,i=e._overlay,c=e.placement,l=void 0===c?"top":c,s=e.trigger,u=void 0===s?"hover":s,p=e.mouseEnterDelay,m=void 0===p?.1:p,v=e.mouseLeaveDelay,h=void 0===v?.1:v,g=e.overlayStyle,x=void 0===g?{}:g,y=P(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),b=f.useContext(d.E_).getPrefixCls,Z=b("popover",n),C=b(),O=f.useMemo((function(){return i||(a||o?f.createElement(w,{prefixCls:Z,title:a,content:o}):null)}),[i,a,o,Z]);return f.createElement(N.Z,(0,r.Z)({placement:l,trigger:u,mouseEnterDelay:m,mouseLeaveDelay:h,overlayStyle:x},y,{prefixCls:Z,ref:t,overlay:O,transitionName:(0,E.mL)(C,"zoom-big",y.transitionName)}))})),j=n(5555),k=function(e){var t=f.useContext(d.E_),n=t.getPrefixCls,r=t.direction,o=e.prefixCls,i=e.className,c=void 0===i?"":i,s=e.maxCount,u=e.maxStyle,p=e.size,m=n("avatar-group",o),v=l()(m,(0,a.Z)({},"".concat(m,"-rtl"),"rtl"===r),c),g=e.children,x=e.maxPopoverPlacement,y=void 0===x?"top":x,C=e.maxPopoverTrigger,E=void 0===C?"hover":C,N=(0,Z.Z)(g).map((function(e,t){return(0,j.Tm)(e,{key:"avatar-key-".concat(t)})})),P=N.length;if(s&&s<P){var w=N.slice(0,s),k=N.slice(s,P);return w.push(f.createElement(O,{key:"avatar-popover-key",content:k,trigger:E,placement:y,overlayClassName:"".concat(m,"-popover")},f.createElement(b,{style:u},"+".concat(P-s)))),f.createElement(h,{size:p},f.createElement("div",{className:v,style:e.style},w))}return f.createElement(h,{size:p},f.createElement("div",{className:v,style:e.style},N))},R=b;R.Group=k;var S=R},99539:function(){},14823:function(e,t,n){n(5860),n(58504)},58504:function(e,t,n){n(5860)},71770:function(e,t){t.Z=function(e,t){for(var n=Object.assign({},e),r=0;r<t.length;r+=1){delete n[t[r]]}return n}}}]);
1
+ "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7508],{24506:function(e,t,n){var r=(0,n(75271).createContext)({});t.Z=r},47508:function(e,t,n){n.d(t,{ZP:function(){return Re}});n(5860);var r=n(2053),a=n(57904),o=n(73779),i=n(71374),c=n(57520),l=n(95531),s=n(52601),u=n(36326),f=n(24744),d=n(82187),p=n.n(d),m=n(28526),v=n(2021),h=n(75271),g=n(96820),x=n(35047),y=n(15363);function b(){return function(e,t,n){var r=n.value,a=!1;return{configurable:!0,get:function(){if(a||this===e.prototype||this.hasOwnProperty(t))return r;var n=function(e){var t,n=function(n){return function(){t=null,e.apply(void 0,(0,x.Z)(n))}},r=function(){if(null==t){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];t=(0,y.Z)(n(r))}};return r.cancel=function(){y.Z.cancel(t),t=null},r}(r.bind(this));return a=!0,Object.defineProperty(this,t,{value:n,configurable:!0,writable:!0}),a=!1,n}}}}var Z=n(24429);function C(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function E(e,t,n){if(void 0!==n&&t.top>e.top-n)return n+t.top}function N(e,t,n){if(void 0!==n&&t.bottom<e.bottom+n)return n+(window.innerHeight-t.bottom)}var P=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"],w=[];function O(e,t){if(e){var n=w.find((function(t){return t.target===e}));n?n.affixList.push(t):(n={target:e,affixList:[t],eventHandlers:{}},w.push(n),P.forEach((function(t){n.eventHandlers[t]=(0,Z.Z)(e,t,(function(){n.affixList.forEach((function(e){e.lazyUpdatePosition()}))}))})))}}function j(e){var t=w.find((function(t){var n=t.affixList.some((function(t){return t===e}));return n&&(t.affixList=t.affixList.filter((function(t){return t!==e}))),n}));t&&0===t.affixList.length&&(w=w.filter((function(e){return e!==t})),P.forEach((function(e){var n=t.eventHandlers[e];n&&n.remove&&n.remove()})))}function k(e,t,n){return t=(0,s.Z)(t),(0,c.Z)(e,(0,l.Z)()?Reflect.construct(t,n||[],(0,s.Z)(e).constructor):t.apply(e,n))}var R,S=function(e,t,n,r){var a,o=arguments.length,i=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===("undefined"==typeof Reflect?"undefined":(0,f.Z)(Reflect))&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,n,r);else for(var c=e.length-1;c>=0;c--)(a=e[c])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i};function T(){return"undefined"!=typeof window?window:null}!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(R||(R={}));var M=function(e){function t(){var e;return(0,o.Z)(this,t),(e=k(this,t,arguments)).state={status:R.None,lastAffix:!1,prevTarget:null},e.getOffsetTop=function(){var t=e.props,n=t.offsetBottom,r=t.offsetTop;return void 0===n&&void 0===r?0:r},e.getOffsetBottom=function(){return e.props.offsetBottom},e.savePlaceholderNode=function(t){e.placeholderNode=t},e.saveFixedNode=function(t){e.fixedNode=t},e.measure=function(){var t=e.state,n=t.status,r=t.lastAffix,a=e.props.onChange,o=e.getTargetFunc();if(n===R.Prepare&&e.fixedNode&&e.placeholderNode&&o){var i=e.getOffsetTop(),c=e.getOffsetBottom(),l=o();if(l){var s={status:R.None},u=C(l),f=C(e.placeholderNode),d=E(f,u,i),p=N(f,u,c);0===f.top&&0===f.left&&0===f.width&&0===f.height||(void 0!==d?(s.affixStyle={position:"fixed",top:d,width:f.width,height:f.height},s.placeholderStyle={width:f.width,height:f.height}):void 0!==p&&(s.affixStyle={position:"fixed",bottom:p,width:f.width,height:f.height},s.placeholderStyle={width:f.width,height:f.height}),s.lastAffix=!!s.affixStyle,a&&r!==s.lastAffix&&a(s.lastAffix),e.setState(s))}}},e.prepareMeasure=function(){e.setState({status:R.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e}return(0,u.Z)(t,e),(0,i.Z)(t,[{key:"getTargetFunc",value:function(){var e=this.context.getTargetContainer,t=this.props.target;return void 0!==t?t:null!=e?e:T}},{key:"componentDidMount",value:function(){var e=this,t=this.getTargetFunc();t&&(this.timeout=setTimeout((function(){O(t(),e),e.updatePosition()})))}},{key:"componentDidUpdate",value:function(e){var t=this.state.prevTarget,n=this.getTargetFunc(),r=(null==n?void 0:n())||null;t!==r&&(j(this),r&&(O(r,this),this.updatePosition()),this.setState({prevTarget:r})),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){clearTimeout(this.timeout),j(this),this.updatePosition.cancel(),this.lazyUpdatePosition.cancel()}},{key:"updatePosition",value:function(){this.prepareMeasure()}},{key:"lazyUpdatePosition",value:function(){var e=this.getTargetFunc(),t=this.state.affixStyle;if(e&&t){var n=this.getOffsetTop(),r=this.getOffsetBottom(),a=e();if(a&&this.placeholderNode){var o=C(a),i=C(this.placeholderNode),c=E(i,o,n),l=N(i,o,r);if(void 0!==c&&t.top===c||void 0!==l&&t.bottom===l)return}}this.prepareMeasure()}},{key:"render",value:function(){var e=this,t=this.state,n=t.affixStyle,o=t.placeholderStyle,i=this.props,c=i.affixPrefixCls,l=i.children,s=p()((0,a.Z)({},c,!!n)),u=(0,v.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls"]);return h.createElement(m.Z,{onResize:function(){e.updatePosition()}},h.createElement("div",(0,r.Z)({},u,{ref:this.savePlaceholderNode}),n&&h.createElement("div",{style:o,"aria-hidden":"true"}),h.createElement("div",{className:s,ref:this.saveFixedNode,style:n},h.createElement(m.Z,{onResize:function(){e.updatePosition()}},l))))}}]),t}(h.Component);M.contextType=g.E_,S([b()],M.prototype,"updatePosition",null),S([b()],M.prototype,"lazyUpdatePosition",null);var z=h.forwardRef((function(e,t){var n=e.prefixCls,a=(0,h.useContext(g.E_).getPrefixCls)("affix",n),o=(0,r.Z)((0,r.Z)({},e),{affixPrefixCls:a});return h.createElement(M,(0,r.Z)({},o,{ref:t}))})),H=(n(99539),n(403)),B=(n(14823),n(99459)),_=n(98037),L={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},A=n(64720),F=function(e,t){return h.createElement(A.Z,(0,_.Z)((0,_.Z)({},e),{},{ref:t,icon:L}))};var I=h.forwardRef(F),D={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M869 487.8L491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 000-48.4z"}}]},name:"arrow-right",theme:"outlined"},U=function(e,t){return h.createElement(A.Z,(0,_.Z)((0,_.Z)({},e),{},{ref:t,icon:D}))};var W=h.forwardRef(U),q=n(82290),K=n(19321),V=n(22615),X=n(31492),G=n(5555),Q=n(95101),Y=n(20119),J=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},$=function(e){var t=e.prefixCls,n=e.separator,a=void 0===n?"/":n,o=e.children,i=e.menu,c=e.overlay,l=e.dropdownProps,s=J(e,["prefixCls","separator","children","menu","overlay","dropdownProps"]),u=(0,h.useContext(g.E_).getPrefixCls)("breadcrumb",t);var f;return f=function(t){if(i||c){var n=(0,r.Z)({},l);return"overlay"in e&&(n.overlay=c),h.createElement(Y.Z,(0,r.Z)({menu:i,placement:"bottom"},n),h.createElement("span",{className:"".concat(u,"-overlay-link")},t,h.createElement(Q.Z,null)))}return t}(f="href"in s?h.createElement("a",(0,r.Z)({className:"".concat(u,"-link")},s),o):h.createElement("span",(0,r.Z)({className:"".concat(u,"-link")},s),o)),null!=o?h.createElement("li",null,f,a&&h.createElement("span",{className:"".concat(u,"-separator")},a)):null};$.__ANT_BREADCRUMB_ITEM=!0;var ee=$,te=function(e){var t=e.children,n=(0,h.useContext(g.E_).getPrefixCls)("breadcrumb");return h.createElement("span",{className:"".concat(n,"-separator")},t||"/")};te.__ANT_BREADCRUMB_SEPARATOR=!0;var ne=te,re=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function ae(e,t,n,r){var a=n.indexOf(e)===n.length-1,o=function(e,t){if(!e.breadcrumbName)return null;var n=Object.keys(t).join("|");return e.breadcrumbName.replace(new RegExp(":(".concat(n,")"),"g"),(function(e,n){return t[n]||e}))}(e,t);return a?h.createElement("span",null,o):h.createElement("a",{href:"#/".concat(r.join("/"))},o)}var oe=function(e,t){return e=(e||"").replace(/^\//,""),Object.keys(t).forEach((function(n){e=e.replace(":".concat(n),t[n])})),e},ie=function(e,t,n){var r=(0,x.Z)(e),a=oe(t||"",n);return a&&r.push(a),r},ce=function(e){var t,n=e.prefixCls,o=e.separator,i=void 0===o?"/":o,c=e.style,l=e.className,s=e.routes,u=e.children,f=e.itemRender,d=void 0===f?ae:f,m=e.params,v=void 0===m?{}:m,x=re(e,["prefixCls","separator","style","className","routes","children","itemRender","params"]),y=h.useContext(g.E_),b=y.getPrefixCls,Z=y.direction,C=b("breadcrumb",n);if(s&&s.length>0){var E=[];t=s.map((function(e){var t,n=oe(e.path,v);n&&E.push(n),e.children&&e.children.length&&(t=h.createElement(X.Z,{items:e.children.map((function(e){return{key:e.path||e.breadcrumbName,label:d(e,v,s,ie(E,e.path,v))}}))}));var a={separator:i};return t&&(a.overlay=t),h.createElement(ee,(0,r.Z)({},a,{key:n||e.breadcrumbName}),d(e,v,s,E))}))}else u&&(t=(0,V.Z)(u).map((function(e,t){return e?(0,G.Tm)(e,{separator:i,key:t}):e})));var N=p()(C,(0,a.Z)({},"".concat(C,"-rtl"),"rtl"===Z),l);return h.createElement("nav",(0,r.Z)({className:N,style:c},x),h.createElement("ol",null,t))};ce.Item=ee,ce.Separator=ne;var le=ce,se=n(76595),ue=n(63505),fe=n(26382),de=function(e,t,n){return t&&n?h.createElement(se.Z,{componentName:"PageHeader"},(function(r){return h.createElement("div",{className:"".concat(e,"-back")},h.createElement(fe.Z,{onClick:function(e){null==n||n(e)},className:"".concat(e,"-back-button"),"aria-label":r.back},t))})):null},pe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr";return void 0!==e.backIcon?e.backIcon:"rtl"===t?h.createElement(W,null):h.createElement(I,null)},me=function(e){var t=(0,q.Z)(!1),n=(0,B.Z)(t,2),o=n[0],i=n[1],c=function(e){var t=e.width;i(t<768,!0)};return h.createElement(g.C,null,(function(t){var n,i=t.getPrefixCls,l=t.pageHeader,s=t.direction,u=e.prefixCls,f=e.style,d=e.footer,v=e.children,g=e.breadcrumb,x=e.breadcrumbRender,y=e.className,b=!0;"ghost"in e?b=e.ghost:l&&"ghost"in l&&(b=l.ghost);var Z=i("page-header",u),C=(null==g?void 0:g.routes)?function(e){return h.createElement(le,(0,r.Z)({},e))}(g):null,E=g&&"props"in g,N=null!==(n=null==x?void 0:x(e,C))&&void 0!==n?n:C,P=E?g:N,w=p()(Z,y,(0,a.Z)((0,a.Z)((0,a.Z)({"has-breadcrumb":!!P,"has-footer":!!d},"".concat(Z,"-ghost"),b),"".concat(Z,"-rtl"),"rtl"===s),"".concat(Z,"-compact"),o));return h.createElement(m.Z,{onResize:c},h.createElement("div",{className:w,style:f},P,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",a=t.title,o=t.avatar,i=t.subTitle,c=t.tags,l=t.extra,s=t.onBack,u="".concat(e,"-heading"),f=a||i||c||l;if(!f)return null;var d=pe(t,n),p=de(e,d,s),m=p||o||f;return h.createElement("div",{className:u},m&&h.createElement("div",{className:"".concat(u,"-left")},p,o&&h.createElement(K.C,(0,r.Z)({},o)),a&&h.createElement("span",{className:"".concat(u,"-title"),title:"string"==typeof a?a:void 0},a),i&&h.createElement("span",{className:"".concat(u,"-sub-title"),title:"string"==typeof i?i:void 0},i),c&&h.createElement("span",{className:"".concat(u,"-tags")},c)),l&&h.createElement("span",{className:"".concat(u,"-extra")},h.createElement(ue.Z,null,l)))}(Z,e,s),v&&function(e,t){return h.createElement("div",{className:"".concat(e,"-content")},t)}(Z,v),function(e,t){return t?h.createElement("div",{className:"".concat(e,"-footer")},t):null}(Z,d)))}))},ve=n(58006),he=n(46035),ge=n(52676),xe=n(24506),ye=n(71770),be=["children","className","extra","style","renderContent"],Ze=function(e){var t=e.children,n=e.className,r=e.extra,a=e.style,o=e.renderContent,i=(0,ve.Z)(e,be),c=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,l=e.prefixCls||c("pro"),s="".concat(l,"-footer-bar"),u=(0,h.useContext)(xe.Z),f=(0,h.useMemo)((function(){var e=u.hasSiderMenu,t=u.isMobile,n=u.siderWidth;if(e)return n?t?"100%":"calc(100% - ".concat(n,"px)"):"100%"}),[u.collapsed,u.hasSiderMenu,u.isMobile,u.siderWidth]),d=(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("div",{className:"".concat(s,"-left"),children:r}),(0,ge.jsx)("div",{className:"".concat(s,"-right"),children:t})]});return(0,h.useEffect)((function(){return u&&(null==u?void 0:u.setHasFooterToolbar)?(null==u||u.setHasFooterToolbar(!0),function(){var e;null==u||null===(e=u.setHasFooterToolbar)||void 0===e||e.call(u,!1)}):function(){}}),[]),(0,ge.jsx)("div",(0,_.Z)((0,_.Z)({className:p()(n,"".concat(s)),style:(0,_.Z)({width:f},a)},(0,ye.Z)(i,["prefixCls"])),{},{children:o?o((0,_.Z)((0,_.Z)((0,_.Z)({},e),u),{},{leftWidth:f}),d):d}))},Ce=function(e){var t=(0,h.useContext)(xe.Z),n=e.children,r=e.contentWidth,a=e.className,o=e.style,i=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,c=e.prefixCls||i("pro"),l=r||t.contentWidth,s="".concat(c,"-grid-content");return(0,ge.jsx)("div",{className:p()(s,a,{wide:"Fixed"===l}),style:o,children:(0,ge.jsx)("div",{className:"".concat(c,"-grid-content-children"),children:n})})},Ee=n(34014),Ne=function(e){var t=e.children,n=e.style,r=e.className,a=e.markStyle,o=e.markClassName,i=e.zIndex,c=void 0===i?9:i,l=e.gapX,s=void 0===l?212:l,u=e.gapY,f=void 0===u?222:u,d=e.width,m=void 0===d?120:d,v=e.height,g=void 0===v?64:v,x=e.rotate,y=void 0===x?-22:x,b=e.image,Z=e.content,C=e.offsetLeft,E=e.offsetTop,N=e.fontStyle,P=void 0===N?"normal":N,w=e.fontWeight,O=void 0===w?"normal":w,j=e.fontColor,k=void 0===j?"rgba(0,0,0,.15)":j,R=e.fontSize,S=void 0===R?16:R,T=e.fontFamily,M=void 0===T?"sans-serif":T,z=e.prefixCls,L=(0,(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls)("pro-layout-watermark",z),A=p()("".concat(L,"-wrapper"),r),F=p()(L,o),I=(0,h.useState)(""),D=(0,B.Z)(I,2),U=D[0],W=D[1];return(0,h.useEffect)((function(){var e=document.createElement("canvas"),t=e.getContext("2d"),n=function(e){if(!e)return 1;var t=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/t}(t),r="".concat((s+m)*n,"px"),a="".concat((f+g)*n,"px"),o=C||s/2,i=E||f/2;if(e.setAttribute("width",r),e.setAttribute("height",a),t){t.translate(o*n,i*n),t.rotate(Math.PI/180*Number(y));var c=m*n,l=g*n;if(b){var u=new Image;u.crossOrigin="anonymous",u.referrerPolicy="no-referrer",u.src=b,u.onload=function(){t.drawImage(u,0,0,c,l),W(e.toDataURL())}}else if(Z){var d=Number(S)*n;t.font="".concat(P," normal ").concat(O," ").concat(d,"px/").concat(l,"px ").concat(M),t.fillStyle=k,Array.isArray(Z)?null==Z||Z.forEach((function(e,n){return t.fillText(e,0,50*n)})):t.fillText(Z,0,0),W(e.toDataURL())}}else console.error("当前环境不支持Canvas")}),[s,f,C,E,y,P,O,m,g,M,k,b,Z,S]),(0,ge.jsxs)("div",{style:(0,_.Z)({position:"relative"},n),className:A,children:[t,(0,ge.jsx)("div",{className:F,style:(0,_.Z)((0,_.Z)({zIndex:c,position:"absolute",left:0,top:0,width:"100%",height:"100%",backgroundSize:"".concat(s+m,"px"),pointerEvents:"none",backgroundRepeat:"repeat"},U?{backgroundImage:"url('".concat(U,"')")}:null),a)})]})},Pe=["title","content","pageHeaderRender","header","prefixedClassName","extraContent","style","prefixCls","breadcrumbRender"],we=["children","loading","className","style","footer","affixProps","ghost","fixedHeader","breadcrumbRender"];var Oe=function(e){var t=e.tabList,n=e.tabActiveKey,r=e.onTabChange,a=e.tabBarExtraContent,o=e.tabProps,i=e.prefixedClassName;return Array.isArray(t)||a?(0,ge.jsx)(he.Z,(0,_.Z)((0,_.Z)({className:"".concat(i,"-tabs"),activeKey:n,onChange:function(e){r&&r(e)},tabBarExtraContent:a},o),{},{children:null==t?void 0:t.map((function(e,t){return(0,h.createElement)(he.Z.TabPane,(0,_.Z)((0,_.Z)({},e),{},{tab:e.tab,key:e.key||t}))}))})):null},je=function(e,t,n){return e||t?(0,ge.jsx)("div",{className:"".concat(n,"-detail"),children:(0,ge.jsx)("div",{className:"".concat(n,"-main"),children:(0,ge.jsxs)("div",{className:"".concat(n,"-row"),children:[e&&(0,ge.jsx)("div",{className:"".concat(n,"-content"),children:e}),t&&(0,ge.jsx)("div",{className:"".concat(n,"-extraContent"),children:t})]})})}):null},ke=function(e){var t,n=(0,h.useContext)(xe.Z),r=e.title,a=e.content,o=e.pageHeaderRender,i=e.header,c=e.prefixedClassName,l=e.extraContent,s=(e.style,e.prefixCls),u=e.breadcrumbRender,f=(0,ve.Z)(e,Pe),d=(0,h.useMemo)((function(){if(u)return u}),[u]);if(!1===o)return null;if(o)return(0,ge.jsxs)(ge.Fragment,{children:[" ",o((0,_.Z)((0,_.Z)({},e),n))]});var p=r;r||!1===r||(p=n.title);var m=(0,_.Z)((0,_.Z)((0,_.Z)({},n),{},{title:p},f),{},{footer:Oe((0,_.Z)((0,_.Z)({},f),{},{breadcrumbRender:u,prefixedClassName:c}))},i),v=m.breadcrumb,g=!(v&&((null==v?void 0:v.itemRender)||(null==v||null===(t=v.routes)||void 0===t?void 0:t.length))||u);return["title","subTitle","extra","tags","footer","avatar","backIcon"].every((function(e){return!m[e]}))&&g&&!a&&!l?null:(0,ge.jsx)("div",{className:"".concat(c,"-warp"),children:(0,ge.jsx)(me,(0,_.Z)((0,_.Z)({},m),{},{breadcrumb:!1===u?void 0:(0,_.Z)((0,_.Z)({},m.breadcrumb),n.breadcrumbProps),breadcrumbRender:d,prefixCls:s,children:(null==i?void 0:i.children)||je(a,l,c)}))})},Re=function(e){var t,n,r=e.children,o=e.loading,i=void 0!==o&&o,c=e.className,l=e.style,s=e.footer,u=e.affixProps,d=e.ghost,m=e.fixedHeader,v=e.breadcrumbRender,g=(0,ve.Z)(e,we),x=(0,h.useContext)(xe.Z),y=(0,h.useContext)(H.ZP.ConfigContext).getPrefixCls,b=e.prefixCls||y("pro"),Z="".concat(b,"-page-container"),C=p()(Z,c,(t={},(0,a.Z)(t,"".concat(b,"-page-container-ghost"),d),(0,a.Z)(t,"".concat(b,"-page-container-with-footer"),s),t)),E=(0,h.useMemo)((function(){return r?(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsx)("div",{className:"".concat(Z,"-children-content"),children:r}),x.hasFooterToolbar&&(0,ge.jsx)("div",{style:{height:48,marginTop:24}})]}):null}),[r,Z,x.hasFooterToolbar]),N=(0,h.useMemo)((function(){var e;return 0!=v&&(v||(null==g||null===(e=g.header)||void 0===e?void 0:e.breadcrumbRender))}),[v,null==g||null===(n=g.header)||void 0===n?void 0:n.breadcrumbRender]),P=(0,ge.jsx)(ke,(0,_.Z)((0,_.Z)({},g),{},{breadcrumbRender:N,ghost:d,prefixCls:void 0,prefixedClassName:Z})),w=(0,h.useMemo)((function(){if(h.isValidElement(i))return i;if("boolean"==typeof i&&!i)return null;var e=function(e){return"object"===(0,f.Z)(e)?e:{spinning:e}}(i);return e.spinning?(0,ge.jsx)(Ee.Z,(0,_.Z)({},e)):null}),[i]),O=(0,h.useMemo)((function(){var t=w||E;if(e.waterMarkProps||x.waterMarkProps){var n=(0,_.Z)((0,_.Z)({},x.waterMarkProps),e.waterMarkProps);return(0,ge.jsx)(Ne,(0,_.Z)((0,_.Z)({},n),{},{children:t}))}return t}),[e.waterMarkProps,x.waterMarkProps,w,E]);return(0,ge.jsxs)("div",{style:l,className:C,children:[m&&P?(0,ge.jsx)(z,(0,_.Z)((0,_.Z)({offsetTop:x.hasHeader&&x.fixedHeader?x.headerHeight:0},u),{},{children:P})):P,O&&(0,ge.jsx)(Ce,{children:O}),s&&(0,ge.jsx)(Ze,{prefixCls:b,children:s})]})}},43150:function(e,t,n){n.d(t,{Z:function(){return r}});var r=function(e){return e?"function"==typeof e?e():e:null}},19321:function(e,t,n){n.d(t,{C:function(){return w}});var r=n(2053),a=n(57904),o=n(24744),i=n(99459),c=n(82187),l=n.n(c),s=n(28526),u=n(3083),f=n(75271),d=n(96820),p=n(71343),m=n(46555),v=f.createContext("default"),h=function(e){var t=e.children,n=e.size;return f.createElement(v.Consumer,null,(function(e){return f.createElement(v.Provider,{value:n||e},t)}))},g=v,x=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},y=function(e,t){var n=f.useContext(g),c=f.useState(1),v=(0,i.Z)(c,2),h=v[0],y=v[1],b=f.useState(!1),Z=(0,i.Z)(b,2),C=Z[0],E=Z[1],N=f.useState(!0),P=(0,i.Z)(N,2),w=P[0],O=P[1],j=f.useRef(null),k=f.useRef(null),R=(0,u.sQ)(t,j),S=f.useContext(d.E_).getPrefixCls,T=function(){if(k.current&&j.current){var t=k.current.offsetWidth,n=j.current.offsetWidth;if(0!==t&&0!==n){var r=e.gap,a=void 0===r?4:r;2*a<n&&y(n-2*a<t?(n-2*a)/t:1)}}};f.useEffect((function(){E(!0)}),[]),f.useEffect((function(){O(!0),y(1)}),[e.src]),f.useEffect((function(){T()}),[e.gap]);var M,z=e.prefixCls,H=e.shape,B=void 0===H?"circle":H,_=e.size,L=void 0===_?"default":_,A=e.src,F=e.srcSet,I=e.icon,D=e.className,U=e.alt,W=e.draggable,q=e.children,K=e.crossOrigin,V=x(e,["prefixCls","shape","size","src","srcSet","icon","className","alt","draggable","children","crossOrigin"]),X="default"===L?n:L,G=Object.keys("object"===(0,o.Z)(X)&&X||{}).some((function(e){return["xs","sm","md","lg","xl","xxl"].includes(e)})),Q=(0,p.Z)(G),Y=f.useMemo((function(){if("object"!==(0,o.Z)(X))return{};var e=m.c4.find((function(e){return Q[e]})),t=X[e];return t?{width:t,height:t,lineHeight:"".concat(t,"px"),fontSize:I?t/2:18}:{}}),[Q,X]),J=S("avatar",z),$=l()((0,a.Z)((0,a.Z)({},"".concat(J,"-lg"),"large"===X),"".concat(J,"-sm"),"small"===X)),ee=f.isValidElement(A),te=l()(J,$,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(J,"-").concat(B),!!B),"".concat(J,"-image"),ee||A&&w),"".concat(J,"-icon"),!!I),D),ne="number"==typeof X?{width:X,height:X,lineHeight:"".concat(X,"px"),fontSize:I?X/2:18}:{};if("string"==typeof A&&w)M=f.createElement("img",{src:A,draggable:W,srcSet:F,onError:function(){var t=e.onError;!1!==(t?t():void 0)&&O(!1)},alt:U,crossOrigin:K});else if(ee)M=A;else if(I)M=I;else if(C||1!==h){var re="scale(".concat(h,") translateX(-50%)"),ae={msTransform:re,WebkitTransform:re,transform:re},oe="number"==typeof X?{lineHeight:"".concat(X,"px")}:{};M=f.createElement(s.Z,{onResize:T},f.createElement("span",{className:"".concat(J,"-string"),ref:k,style:(0,r.Z)((0,r.Z)({},oe),ae)},q))}else M=f.createElement("span",{className:"".concat(J,"-string"),style:{opacity:0},ref:k},q);return delete V.onError,delete V.gap,f.createElement("span",(0,r.Z)({},V,{style:(0,r.Z)((0,r.Z)((0,r.Z)({},ne),Y),V.style),className:te,ref:R}),M)};var b=f.forwardRef(y),Z=n(22615),C=n(63845),E=n(5555),N=function(e){var t=f.useContext(d.E_),n=t.getPrefixCls,r=t.direction,o=e.prefixCls,i=e.className,c=void 0===i?"":i,s=e.maxCount,u=e.maxStyle,p=e.size,m=n("avatar-group",o),v=l()(m,(0,a.Z)({},"".concat(m,"-rtl"),"rtl"===r),c),g=e.children,x=e.maxPopoverPlacement,y=void 0===x?"top":x,N=e.maxPopoverTrigger,P=void 0===N?"hover":N,w=(0,Z.Z)(g).map((function(e,t){return(0,E.Tm)(e,{key:"avatar-key-".concat(t)})})),O=w.length;if(s&&s<O){var j=w.slice(0,s),k=w.slice(s,O);return j.push(f.createElement(C.Z,{key:"avatar-popover-key",content:k,trigger:P,placement:y,overlayClassName:"".concat(m,"-popover")},f.createElement(b,{style:u},"+".concat(O-s)))),f.createElement(h,{size:p},f.createElement("div",{className:v,style:e.style},j))}return f.createElement(h,{size:p},f.createElement("div",{className:v,style:e.style},w))},P=b;P.Group=N;var w=P},99539:function(){},14823:function(e,t,n){n(5860),n(58504)},63845:function(e,t,n){var r=n(2053),a=n(75271),o=n(43150),i=n(21485),c=n(96820),l=n(59816),s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},u=function(e){var t=e.title,n=e.content,r=e.prefixCls;return a.createElement(a.Fragment,null,t&&a.createElement("div",{className:"".concat(r,"-title")},(0,o.Z)(t)),a.createElement("div",{className:"".concat(r,"-inner-content")},(0,o.Z)(n)))},f=a.forwardRef((function(e,t){var n=e.prefixCls,o=e.title,f=e.content,d=e._overlay,p=e.placement,m=void 0===p?"top":p,v=e.trigger,h=void 0===v?"hover":v,g=e.mouseEnterDelay,x=void 0===g?.1:g,y=e.mouseLeaveDelay,b=void 0===y?.1:y,Z=e.overlayStyle,C=void 0===Z?{}:Z,E=s(e,["prefixCls","title","content","_overlay","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),N=a.useContext(c.E_).getPrefixCls,P=N("popover",n),w=N(),O=a.useMemo((function(){return d||(o||f?a.createElement(u,{prefixCls:P,title:o,content:f}):null)}),[d,o,f,P]);return a.createElement(l.Z,(0,r.Z)({placement:m,trigger:h,mouseEnterDelay:x,mouseLeaveDelay:b,overlayStyle:C},E,{prefixCls:P,ref:t,overlay:O,transitionName:(0,i.mL)(w,"zoom-big",E.transitionName)}))}));t.Z=f},58504:function(e,t,n){n(5860)},71770:function(e,t){t.Z=function(e,t){for(var n=Object.assign({},e),r=0;r<t.length;r+=1){delete n[t[r]]}return n}}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7984],{1371:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),o=n(75271),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=n(48881),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=o.forwardRef(s)},69822:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var r=n(15767),o=n(52676),i=n(45520),a=n(6367),s=n(75271),c=n(93481),u=n(24744),l=n(57904),h=n(2053),d=n(99459),p=n(82187),f=n.n(p),v=n(35047),m=n(50631),g=n.n(m),y=n(6522),C=n(58006),b=n(98037),w=n(1260),x=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function S(e,t,n){return(e-t)/(n-t)}function E(e,t,n,r){var o=S(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function M(e,t){return Array.isArray(e)?e[t]:e}var P=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];var R=s.forwardRef((function(e,t){var n,r,o=e.prefixCls,i=e.value,a=e.valueIndex,c=e.onStartMove,u=e.style,d=e.render,p=e.dragging,v=e.onOffsetChange,m=(0,C.Z)(e,P),g=s.useContext(x),y=g.min,S=g.max,R=g.direction,D=g.disabled,k=g.range,L=g.tabIndex,O=g.ariaLabelForHandle,z=g.ariaLabelledByForHandle,A=g.ariaValueTextFormatterForHandle,T="".concat(o,"-handle"),_=function(e){D||c(e,a)},Z=E(R,i,y,S),N=s.createElement("div",(0,h.Z)({ref:t,className:f()(T,(n={},(0,l.Z)(n,"".concat(T,"-").concat(a+1),k),(0,l.Z)(n,"".concat(T,"-dragging"),p),n)),style:(0,b.Z)((0,b.Z)({},Z),u),onMouseDown:_,onTouchStart:_,onKeyDown:function(e){if(!D){var t=null;switch(e.which||e.keyCode){case w.Z.LEFT:t="ltr"===R||"btt"===R?-1:1;break;case w.Z.RIGHT:t="ltr"===R||"btt"===R?1:-1;break;case w.Z.UP:t="ttb"!==R?1:-1;break;case w.Z.DOWN:t="ttb"!==R?-1:1;break;case w.Z.HOME:t="min";break;case w.Z.END:t="max";break;case w.Z.PAGE_UP:t=2;break;case w.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),v(t,a))}},tabIndex:D?null:M(L,a),role:"slider","aria-valuemin":y,"aria-valuemax":S,"aria-valuenow":i,"aria-disabled":D,"aria-label":M(O,a),"aria-labelledby":M(z,a),"aria-valuetext":null===(r=M(A,a))||void 0===r?void 0:r(i)},m));return d&&(N=d(N,{index:a,prefixCls:o,value:i,dragging:p})),N})),D=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];var k=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,c=e.handleRender,u=e.draggingIndex,l=(0,C.Z)(e,D),d=s.useRef({});return s.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),s.createElement(s.Fragment,null,a.map((function(e,t){return s.createElement(R,(0,h.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:u===t,prefixCls:n,style:M(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:c},l))})))}));function L(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function O(e){var t=e.prefixCls,n=e.style,r=e.start,o=e.end,i=e.index,a=e.onStartMove,c=s.useContext(x),u=c.direction,l=c.min,h=c.max,d=c.disabled,p=c.range,v="".concat(t,"-track"),m=S(r,l,h),g=S(o,l,h),y=function(e){!d&&a&&a(e,-1)},C={};switch(u){case"rtl":C.right="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%");break;case"btt":C.bottom="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;case"ttb":C.top="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;default:C.left="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%")}return s.createElement("div",{className:f()(v,p&&"".concat(v,"-").concat(i+1)),style:(0,b.Z)((0,b.Z)({},C),n),onMouseDown:y,onTouchStart:y})}function z(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=s.useContext(x),c=a.included,u=a.range,l=a.min,h=s.useMemo((function(){if(!u){if(0===r.length)return[];var e=null!=o?o:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,u,o,l]);return c?h.map((function(e,r){var o=e.start,a=e.end;return s.createElement(O,{index:r,prefixCls:t,style:M(n,r),start:o,end:a,key:r,onStartMove:i})})):null}function A(e){var t=e.prefixCls,n=e.style,r=e.children,o=e.value,i=e.onClick,a=s.useContext(x),c=a.min,u=a.max,h=a.direction,d=a.includedStart,p=a.includedEnd,v=a.included,m="".concat(t,"-text"),g=E(h,o,c,u);return s.createElement("span",{className:f()(m,(0,l.Z)({},"".concat(m,"-active"),v&&d<=o&&o<=p)),style:(0,b.Z)((0,b.Z)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){i(o)}},r)}function T(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?s.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return s.createElement(A,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}function _(e){var t=e.prefixCls,n=e.value,r=e.style,o=e.activeStyle,i=s.useContext(x),a=i.min,c=i.max,u=i.direction,h=i.included,d=i.includedStart,p=i.includedEnd,v="".concat(t,"-dot"),m=h&&d<=n&&n<=p,g=(0,b.Z)((0,b.Z)({},E(u,n,a,c)),"function"==typeof r?r(n):r);return m&&(g=(0,b.Z)((0,b.Z)({},g),"function"==typeof o?o(n):o)),s.createElement("span",{className:f()(v,(0,l.Z)({},"".concat(v,"-active"),m)),style:g})}function Z(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=s.useContext(x),c=a.min,u=a.max,l=a.step,h=s.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==l)for(var t=c;t<=u;)e.add(t),t+=l;return Array.from(e)}),[c,u,l,r,n]);return s.createElement("div",{className:"".concat(t,"-step")},h.map((function(e){return s.createElement(_,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}n(7432);var N=s.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-slider":r,i=e.className,a=e.style,c=e.disabled,h=void 0!==c&&c,p=e.autoFocus,m=e.onFocus,C=e.onBlur,b=e.min,w=void 0===b?0:b,S=e.max,E=void 0===S?100:S,M=e.step,P=void 0===M?1:M,R=e.value,D=e.defaultValue,O=e.range,A=e.count,_=e.onChange,N=e.onBeforeChange,B=e.onAfterChange,I=e.allowCross,j=void 0===I||I,F=e.pushable,H=void 0!==F&&F,W=e.draggableTrack,G=e.reverse,U=e.vertical,X=e.included,Y=void 0===X||X,K=e.startPoint,V=e.trackStyle,$=e.handleStyle,q=e.railStyle,J=e.dotStyle,Q=e.activeDotStyle,ee=e.marks,te=e.dots,ne=e.handleRender,re=e.tabIndex,oe=void 0===re?0:re,ie=e.ariaLabelForHandle,ae=e.ariaLabelledByForHandle,se=e.ariaValueTextFormatterForHandle,ce=s.useRef(),ue=s.useRef(),le=s.useMemo((function(){return U?G?"ttb":"btt":G?"rtl":"ltr"}),[G,U]),he=s.useMemo((function(){return isFinite(w)?w:0}),[w]),de=s.useMemo((function(){return isFinite(E)?E:100}),[E]),pe=s.useMemo((function(){return null!==P&&P<=0?1:P}),[P]),fe=s.useMemo((function(){return!0===H?pe:H>=0&&H}),[H,pe]),ve=s.useMemo((function(){return Object.keys(ee||{}).map((function(e){var t=ee[e],n={value:Number(e)};return t&&"object"===(0,u.Z)(t)&&!s.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[ee]),me=function(e,t,n,r,o,i){var a=s.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),Math.max(e,r)}),[e,t]),c=s.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),c=Number(o.toFixed(s));return e<=c&&c<=t?c:null}return null}),[n,e,t,a]),u=s.useCallback((function(o){var i=a(o),s=r.map((function(e){return e.value}));null!==n&&s.push(c(o)),s.push(e,t);var u=s[0],l=t-e;return s.forEach((function(e){var t=Math.abs(i-e);t<=l&&(u=e,l=t)})),u}),[e,t,r,n,a,c]),l=function o(i,a,s){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var l,h=i[s],d=h+a,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(c(h));var f=a>0?1:-1;"unit"===u?p.push(c(h+f*n)):p.push(c(d)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=h:e>=h})),"unit"===u&&(p=p.filter((function(e){return e!==h})));var m="unit"===u?h:d;l=p[0];var g=Math.abs(l-m);if(p.forEach((function(e){var t=Math.abs(e-m);t<g&&(l=e,g=t)})),void 0===l)return a<0?e:t;if("dist"===u)return l;if(Math.abs(a)>1){var y=(0,v.Z)(i);return y[s]=l,o(y,a-f,s,u)}return l}return"min"===a?e:"max"===a?t:void 0},h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=l(e,t,n,r);return{value:i,changed:i!==o}},d=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[u,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(u),s=a[n],c=l(a,t,n,r);if(a[n]=c,!1===o){var p=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-p))}else if("number"==typeof i||null===i){for(var f=n+1;f<a.length;f+=1)for(var v=!0;d(a[f]-a[f-1])&&v;){var m=h(a,1,f);a[f]=m.value,v=m.changed}for(var g=n;g>0;g-=1)for(var y=!0;d(a[g]-a[g-1])&&y;){var C=h(a,-1,g-1);a[g-1]=C.value,y=C.changed}for(var b=a.length-1;b>0;b-=1)for(var w=!0;d(a[b]-a[b-1])&&w;){var x=h(a,-1,b-1);a[b-1]=x.value,w=x.changed}for(var S=0;S<a.length-1;S+=1)for(var E=!0;d(a[S+1]-a[S])&&E;){var M=h(a,1,S+1);a[S+1]=M.value,E=M.changed}}return{value:a[n],values:a}}]}(he,de,pe,ve,j,fe),ge=(0,d.Z)(me,2),ye=ge[0],Ce=ge[1],be=(0,y.Z)(D,{value:R}),we=(0,d.Z)(be,2),xe=we[0],Se=we[1],Ee=s.useMemo((function(){var e=null==xe?[]:Array.isArray(xe)?xe:[xe],t=(0,d.Z)(e,1)[0],n=null===xe?[]:[void 0===t?he:t];if(O){if(n=(0,v.Z)(e),A||void 0===xe){var r=A>=0?A+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:he)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ye(e)})),n}),[xe,O,he,A,ye]),Me=s.useRef(Ee);Me.current=Ee;var Pe=function(e){return O?e:e[0]},Re=function(e){var t=(0,v.Z)(e).sort((function(e,t){return e-t}));_&&!g()(t,Me.current)&&_(Pe(t)),Se(t)},De=function(e){if(!h){var t=0,n=de-he;Ee.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,v.Z)(Ee);r[t]=e,O&&!Ee.length&&void 0===A&&r.push(e),null==N||N(Pe(r)),Re(r),null==B||B(Pe(r))}},ke=s.useState(null),Le=(0,d.Z)(ke,2),Oe=Le[0],ze=Le[1];s.useEffect((function(){if(null!==Oe){var e=Ee.indexOf(Oe);e>=0&&ce.current.focus(e)}ze(null)}),[Oe]);var Ae=s.useMemo((function(){return(!W||null!==pe)&&W}),[W,pe]),Te=function(e,t,n,r,o,i,a,c,u){var l=s.useState(null),h=(0,d.Z)(l,2),p=h[0],f=h[1],m=s.useState(-1),g=(0,d.Z)(m,2),y=g[0],C=g[1],b=s.useState(n),w=(0,d.Z)(b,2),x=w[0],S=w[1],E=s.useState(n),M=(0,d.Z)(E,2),P=M[0],R=M[1],D=s.useRef(null),k=s.useRef(null);s.useEffect((function(){-1===y&&S(n)}),[n,y]),s.useEffect((function(){return function(){document.removeEventListener("mousemove",D.current),document.removeEventListener("mouseup",k.current),document.removeEventListener("touchmove",D.current),document.removeEventListener("touchend",k.current)}}),[]);var O=function(e,t){x.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&f(t),S(e),a(e))},z=function(e,t){if(-1===e){var n=P[0],a=P[P.length-1],s=r-n,c=o-a,l=t*(o-r);l=Math.max(l,s),l=Math.min(l,c);var h=i(n+l);l=h-n;var d=P.map((function(e){return e+l}));O(d)}else{var p=(o-r)*t,f=(0,v.Z)(x);f[e]=P[e];var m=u(f,p,e,"dist");O(m.values,m.value)}},A=s.useRef(z);A.current=z;var T=s.useMemo((function(){var e=(0,v.Z)(n).sort((function(e,t){return e-t})),t=(0,v.Z)(x).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?x:n}),[n,x]);return[y,p,T,function(r,o){r.stopPropagation();var i=n[o];C(o),f(i),R(n);var a=L(r),s=a.pageX,u=a.pageY,l=function(n){n.preventDefault();var r,i=L(n),a=i.pageX,c=i.pageY,l=a-s,h=c-u,d=e.current.getBoundingClientRect(),p=d.width,f=d.height;switch(t){case"btt":r=-h/f;break;case"ttb":r=h/f;break;case"rtl":r=-l/p;break;default:r=l/p}A.current(o,r)},h=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",l),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",l),D.current=null,k.current=null,C(-1),c()};document.addEventListener("mouseup",h),document.addEventListener("mousemove",l),document.addEventListener("touchend",h),document.addEventListener("touchmove",l),D.current=l,k.current=h}]}(ue,le,Ee,he,de,ye,Re,(function(){null==B||B(Pe(Me.current))}),Ce),_e=(0,d.Z)(Te,4),Ze=_e[0],Ne=_e[1],Be=_e[2],Ie=_e[3],je=function(e,t){Ie(e,t),null==N||N(Pe(Me.current))},Fe=-1!==Ze;s.useEffect((function(){if(!Fe){var e=Ee.lastIndexOf(Ne);ce.current.focus(e)}}),[Fe]);var He=s.useMemo((function(){return(0,v.Z)(Be).sort((function(e,t){return e-t}))}),[Be]),We=s.useMemo((function(){return O?[He[0],He[He.length-1]]:[he,He[0]]}),[He,O,he]),Ge=(0,d.Z)(We,2),Ue=Ge[0],Xe=Ge[1];s.useImperativeHandle(t,(function(){return{focus:function(){ce.current.focus(0)},blur:function(){var e=document.activeElement;ue.current.contains(e)&&(null==e||e.blur())}}})),s.useEffect((function(){p&&ce.current.focus(0)}),[]);var Ye=s.useMemo((function(){return{min:he,max:de,direction:le,disabled:h,step:pe,included:Y,includedStart:Ue,includedEnd:Xe,range:O,tabIndex:oe,ariaLabelForHandle:ie,ariaLabelledByForHandle:ae,ariaValueTextFormatterForHandle:se}}),[he,de,le,h,pe,Y,Ue,Xe,O,oe,ie,ae,se]);return s.createElement(x.Provider,{value:Ye},s.createElement("div",{ref:ue,className:f()(o,i,(n={},(0,l.Z)(n,"".concat(o,"-disabled"),h),(0,l.Z)(n,"".concat(o,"-vertical"),U),(0,l.Z)(n,"".concat(o,"-horizontal"),!U),(0,l.Z)(n,"".concat(o,"-with-marks"),ve.length),n)),style:a,onMouseDown:function(e){e.preventDefault();var t,n=ue.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,c=n.right,u=e.clientX,l=e.clientY;switch(le){case"btt":t=(s-l)/o;break;case"ttb":t=(l-a)/o;break;case"rtl":t=(c-u)/r;break;default:t=(u-i)/r}De(ye(he+t*(de-he)))}},s.createElement("div",{className:"".concat(o,"-rail"),style:q}),s.createElement(z,{prefixCls:o,style:V,values:He,startPoint:K,onStartMove:Ae?je:null}),s.createElement(Z,{prefixCls:o,marks:ve,dots:te,style:J,activeStyle:Q}),s.createElement(k,{ref:ce,prefixCls:o,style:$,values:Be,draggingIndex:Ze,onStartMove:je,onOffsetChange:function(e,t){if(!h){var n=Ce(Ee,e,t);null==N||N(Pe(Ee)),Re(n.values),null==B||B(Pe(n.values)),ze(n.value)}},onFocus:m,onBlur:C,handleRender:ne}),s.createElement(T,{prefixCls:o,marks:ve,onClick:De})))}));var B=N,I=n(96820),j=n(15363),F=n(3083),H=n(59816),W=s.forwardRef((function(e,t){var n=e.open,r=(0,s.useRef)(null),o=(0,s.useRef)(null);function i(){j.Z.cancel(o.current),o.current=null}return s.useEffect((function(){return n?o.current=(0,j.Z)((function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i}),[n,e.title]),s.createElement(H.Z,(0,h.Z)({ref:(0,F.sQ)(r,t)},e))})),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},U=s.forwardRef((function(e,t){var n=s.useContext(I.E_),r=n.getPrefixCls,o=n.direction,i=n.getPopupContainer,a=s.useState({}),c=(0,d.Z)(a,2),p=c[0],v=c[1],m=function(e,t){v((function(n){return(0,h.Z)((0,h.Z)({},n),(0,l.Z)({},e,t))}))},g=function(e,t){return e||(t?"rtl"===o?"left":"right":"top")},y=e.prefixCls,C=e.range,b=e.className,w=G(e,["prefixCls","range","className"]),x=r("slider",y),S=f()(b,(0,l.Z)({},"".concat(x,"-rtl"),"rtl"===o));"rtl"!==o||w.vertical||(w.reverse=!w.reverse);var E=s.useMemo((function(){return C?"object"===(0,u.Z)(C)?[!0,C.draggableTrack]:[!0,!1]:[!1]}),[C]),M=(0,d.Z)(E,2),P=M[0],R=M[1];return s.createElement(B,(0,h.Z)({},w,{step:w.step,range:P,draggableTrack:R,className:S,ref:t,prefixCls:x,handleRender:function(t,n){var o,a=n.index,c=n.dragging,u=r(),l=e.tooltip,d=void 0===l?{}:l,f=e.vertical,v=(0,h.Z)({formatter:null!==(o=e.tipFormatter)&&void 0!==o?o:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},d),y=v.open,C=v.placement,b=v.getPopupContainer,w=v.prefixCls,S=v.formatter,E=!!S&&(p[a]||c),M=y||void 0===y&&E,P=(0,h.Z)((0,h.Z)({},t.props),{onMouseEnter:function(){return m(a,!0)},onMouseLeave:function(){return m(a,!1)}}),R=r("tooltip",w);return s.createElement(W,{prefixCls:R,title:S?S(n.value):"",open:M,placement:g(C,f),transitionName:"".concat(u,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:b||i},s.cloneElement(t,P))}}))}));var X=U,Y=n(6210),K=n.n(Y);function V(e,t,n,r,o,i){void 0===i&&(i=0);var a=ae(e,t,i),s=a.width,c=a.height,u=Math.min(s,n),l=Math.min(c,r);return u>l*o?{width:l*o,height:l}:{width:u,height:u/o}}function $(e,t,n,r,o){void 0===o&&(o=0);var i=ae(t.width,t.height,o),a=i.width,s=i.height;return{x:q(e.x,a,n.width,r),y:q(e.y,s,n.height,r)}}function q(e,t,n,r){var o=t*r/2-n/2;return se(e,-o,o)}function J(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Q(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ee(e,t,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=!0);var c=s?te:ne,u=ae(t.width,t.height,a),l=ae(t.naturalWidth,t.naturalHeight,a),h={x:c(100,((u.width-n.width/i)/2-e.x/i)/u.width*100),y:c(100,((u.height-n.height/i)/2-e.y/i)/u.height*100),width:c(100,n.width/u.width*100/i),height:c(100,n.height/u.height*100/i)},d=Math.round(c(l.width,h.width*l.width/100)),p=Math.round(c(l.height,h.height*l.height/100)),f=l.width>=l.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:h,croppedAreaPixels:(0,r.pi)((0,r.pi)({},f),{x:Math.round(c(l.width-f.width,h.x*l.width/100)),y:Math.round(c(l.height-f.height,h.y*l.height/100))})}}function te(e,t){return Math.min(e,Math.max(0,t))}function ne(e,t){return t}function re(e,t,n,r,o,i){var a=ae(t.width,t.height,n),s=se(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function oe(e,t,n,r,o,i){void 0===n&&(n=0);var a=ae(t.naturalWidth,t.naturalHeight,n),s=se(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}function ie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function ae(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function se(e,t,n){return Math.min(Math.max(e,t),n)}function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var ue=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=s.createRef(),n.videoRef=s.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=re(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=oe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,o,i,a,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u=n.containerRect.width/n.containerRect.height,l=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,h=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/h,p=void 0;if(c.offsetWidth<l||c.offsetHeight<h)switch(n.state.mediaObjectFit){default:case"contain":p=u>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=(0,r.pi)((0,r.pi)({},p),{naturalWidth:l,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:V(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===f.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,r.pi)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?$(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=K()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e,t){var r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=se(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),u={x:c.x*a-s.x,y:c.y*a-s.y},l=n.props.restrictPosition?$(u,n.mediaSize,n.state.cropSize,a,n.props.rotation):u;n.props.onCropChange(l)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?ee(n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t=n.props,o=t.crop,i=t.onCropChange,a=t.keyboardStep,s=t.zoom,c=t.rotation,u=a;if(n.state.cropSize){e.shiftKey&&(u*=.2);var l=(0,r.pi)({},o);switch(e.key){case"ArrowUp":l.y-=u,e.preventDefault();break;case"ArrowDown":l.y+=u,e.preventDefault();break;case"ArrowLeft":l.x-=u,e.preventDefault();break;case"ArrowRight":l.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(l=$(l,n.mediaSize,n.state.cropSize,s,c)),i(l)}},n}return(0,r.ZT)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,c,u;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(u=this.videoRef.current)||void 0===u||u.load());var l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=J(n,r),this.lastPinchRotation=Q(n,r),this.onDragStart(ie(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=ie(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=J(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=Q(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,o=n.image,i=n.video,a=n.mediaProps,c=n.transform,u=n.crop,l=u.x,h=u.y,d=n.rotation,p=n.zoom,f=n.cropShape,v=n.showGrid,m=n.style,g=m.containerStyle,y=m.cropAreaStyle,C=m.mediaStyle,b=n.classes,w=b.containerClassName,x=b.cropAreaClassName,S=b.mediaClassName,E=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return s.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:g,className:ce("reactEasyCrop_Container",w)},o?s.createElement("img",(0,r.pi)({alt:"",className:ce("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{src:o,ref:this.imageRef,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):i&&s.createElement("video",(0,r.pi)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ce("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return s.createElement("source",(0,r.pi)({key:e.src},e))}))),this.state.cropSize&&s.createElement("div",{style:(0,r.pi)((0,r.pi)({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,"data-testid":"cropper",className:ce("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(s.Component);const le="img-crop",he=.1,de=.01,pe=(0,s.forwardRef)(((e,t)=>{const{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:u,resetBtnText:l,modalImage:h,aspect:d,minZoom:p,maxZoom:f,cropShape:v,showGrid:m,cropperProps:g}=e,[y,C]=(0,s.useState)(1),[b,w]=(0,s.useState)(0),[x,S]=(0,s.useState)(d),E=1!==y||0!==b||x!==d,M=()=>{C(1),w(0),S(d)},[P,R]=(0,s.useState)({x:0,y:0}),D=(0,s.useRef)({width:0,height:0,x:0,y:0}),k=(0,s.useCallback)(((e,t)=>{D.current=t}),[]);(0,s.useImperativeHandle)(t,(()=>({rotation:b,cropPixelsRef:D,onReset:M})));const L="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",O="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",z="[flex:1]";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ue,Object.assign({},g,{ref:n,image:h,crop:P,zoom:y,rotation:b,aspect:x,minZoom:p,maxZoom:f,zoomWithScroll:r,cropShape:v,showGrid:m,onCropChange:R,onZoomChange:C,onRotationChange:w,onCropComplete:k,classes:{containerClassName:`${le}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${le}-media`}})),r&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-zoom ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>C(+(y-he).toFixed(1)),disabled:y-he<p,children:"-"}),(0,o.jsx)(X,{className:z,min:p,max:f,step:he,value:y,onChange:C}),(0,o.jsx)("button",{className:O,onClick:()=>C(+(y+he).toFixed(1)),disabled:y+he>f,children:"+"})]}),i&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-rotation ${L}`,children:[(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b-1),disabled:-180===b,children:"↺"}),(0,o.jsx)(X,{className:z,min:-180,max:180,step:1,value:b,onChange:w}),(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b+1),disabled:180===b,children:"↻"})]}),a&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-aspect ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>S(+(x-de).toFixed(2)),disabled:x-de<.5,children:"↕️"}),(0,o.jsx)(X,{className:z,min:.5,max:2,step:de,value:x,onChange:S}),(0,o.jsx)("button",{className:O,onClick:()=>S(+(x+de).toFixed(2)),disabled:x+de>2,children:"↔️"})]}),u&&(r||i||a)&&(0,o.jsx)(c.Z,{className:"[bottom:20px] [position:absolute]",style:E?{}:{opacity:.3,pointerEvents:"none"},onClick:M,children:l})]})}));var fe=(0,s.memo)(pe);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\!\\[position\\:relative\\]{position:relative!important}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.disabled\\:\\[cursor\\:default\\]:disabled{cursor:default}.disabled\\:\\[opacity\\:20\\%\\]:disabled{opacity:20%}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]~section:first-of-type{margin-top:16px}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]~section:last-of-type{margin-bottom:16px}",{insertAt:"top"});const ve=(0,s.forwardRef)(((e,t)=>{const{quality:n=.4,fillColor:c="white",zoomSlider:u=!0,rotationSlider:l=!1,aspectSlider:h=!1,showReset:d=!1,resetText:p,aspect:f=1,minZoom:v=1,maxZoom:m=3,cropShape:g="rect",showGrid:y=!1,cropperProps:C,modalClassName:b,modalTitle:w,modalWidth:x,modalOk:S,modalCancel:E,onModalOk:M,onModalCancel:P,modalProps:R,beforeCrop:D,children:k}=e,L=(0,s.useRef)({});L.current.onModalOk=M,L.current.onModalCancel=P,L.current.beforeCrop=D;const O=(0,s.useRef)(null),z=(0,s.useCallback)((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),o=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${le}-media`),{width:i,height:a,x:s,y:u}=O.current.cropPixelsRef.current;if(l&&0!==O.current.rotation){const{naturalWidth:e,naturalHeight:t}=o,l=O.current.rotation*(Math.PI/180),h=Math.abs(Math.sin(l)),d=Math.abs(Math.cos(l)),p=e*d+t*h,f=t*d+e*h;n.width=p,n.height=f,r.fillStyle=c,r.fillRect(0,0,p,f);const v=p/2,m=f/2;r.translate(v,m),r.rotate(l),r.translate(-v,-m);const g=(p-e)/2,y=(f-t)/2;r.drawImage(o,0,0,e,t,g,y,e,t);const C=r.getImageData(0,0,p,f);n.width=i,n.height=a,r.putImageData(C,-s,-u)}else n.width=i,n.height=a,r.fillStyle=c,r.fillRect(0,0,i,a),r.drawImage(o,s,u,i,a,0,0,i,a);return n}),[c,l]),[A,T]=(0,s.useState)(""),_=(0,s.useRef)(),Z=(0,s.useRef)(),N=(0,s.useCallback)((e=>(0,r.mG)(void 0,[e],void 0,(function*({beforeUpload:e,file:t,resolve:n,reject:r}){const o=t;if("function"==typeof e)try{const r=yield e(t,[t]);n(!1!==r&&(!0!==r&&r||o))}catch(e){r(e)}else n(o)}))),[]),B=(0,s.useCallback)((e=>(t,o)=>new Promise(((i,s)=>(0,r.mG)(void 0,void 0,void 0,(function*(){let c=t;if("function"==typeof L.current.beforeCrop)try{const n=yield L.current.beforeCrop(t,o);if(!1===n)return N({beforeUpload:e,file:t,resolve:i,reject:s});!0!==n&&(c=n||t)}catch(n){return N({beforeUpload:e,file:t,resolve:i,reject:s})}const u=new FileReader;u.addEventListener("load",(()=>{"string"==typeof u.result&&T(u.result)})),u.readAsDataURL(c),_.current=()=>{var e,t;T(""),O.current.onReset();let n=!1;null===(t=(e=L.current).onModalCancel)||void 0===t||t.call(e,(e=>{i(e),n=!0})),n||i(a.Z.LIST_IGNORE)},Z.current=t=>(0,r.mG)(void 0,void 0,void 0,(function*(){T(""),O.current.onReset();const o=z(t.target),{type:a,name:u,uid:l}=c;o.toBlob((t=>(0,r.mG)(void 0,void 0,void 0,(function*(){const n=new File([t],u,{type:a});Object.assign(n,{uid:l}),N({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)},reject:e=>{var t,n;s(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)}})}))),a,n)}))}))))),[z,n,N]),I=(0,s.useCallback)((e=>{const t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:o,accept:i}=n,a=(0,r._T)(n,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:B(o)})})}),[B]),j=(0,s.useMemo)((()=>{const e={};return void 0!==x&&(e.width=x),void 0!==S&&(e.okText=S),void 0!==E&&(e.cancelText=E),e}),[E,S,x]),F=`${le}-modal${b?` ${b}`:""}`,H="zh-CN"===("undefined"==typeof window?"":window.navigator.language),W=w||(H?"编辑图片":"Edit image"),G=p||(H?"重置":"Reset");return(0,o.jsxs)(o.Fragment,{children:[I(k),A&&(0,o.jsx)(i.Z,Object.assign({},R,j,{open:!0,title:W,onCancel:_.current,onOk:Z.current,wrapClassName:F,maskClosable:!1,destroyOnClose:!0,children:(0,o.jsx)(fe,{ref:O,cropperRef:t,zoomSlider:u,rotationSlider:l,aspectSlider:h,showReset:d,resetBtnText:G,modalImage:A,aspect:f,minZoom:v,maxZoom:m,cropShape:g,showGrid:y,cropperProps:C})}))]})}))},94095:function(e,t,n){"use strict";n(5860),n(58504)},6210:function(e,t,n){e.exports=n(92782)},72906:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},73211:function(e){var t,n,r,o,i,a,s,c,u,l,h,d,p,f,v,m=!1;function g(){if(!m){m=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),l=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),h=!!/Win64/.exec(e),g){(t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var C=/(?:Trident\/(\d+.\d+))/.exec(e);a=C?parseFloat(C[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,r=g[3]?parseFloat(g[3]):NaN,(o=g[4]?parseFloat(g[4]):NaN)?(g=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=g&&g[1]?parseFloat(g[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(y){if(y[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!b||parseFloat(b[1].replace("_","."))}else s=!1;c=!!y[2],u=!!y[3]}else s=c=u=!1}}var y={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||a>t},ie64:function(){return y.ie()&&h},firefox:function(){return g()||n},opera:function(){return g()||r},webkit:function(){return g()||o},safari:function(){return y.webkit()},chrome:function(){return g()||i},windows:function(){return g()||c},osx:function(){return g()||s},linux:function(){return g()||u},iphone:function(){return g()||d},mobile:function(){return g()||d||p||l||v},nativeApp:function(){return g()||f},android:function(){return g()||l},ipad:function(){return g()||p}};e.exports=y},16177:function(e,t,n){"use strict";var r,o=n(72906);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},92782:function(e,t,n){"use strict";var r=n(73211),o=n(16177);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},31688:function(e,t,n){var r=n(45478);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},77572:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},12538:function(e){e.exports={L:1,M:0,Q:3,H:2}},14382:function(e,t,n){var r=n(4897);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},46175:function(e,t,n){var r=n(31688),o=n(77515),i=n(77572),a=n(62739),s=n(14382);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=c.prototype;u.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},u.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var c=this.dataList[s];n.put(c.mode,4),n.put(c.getLength(),a.getLengthInBits(c.mode,e)),c.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},u.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},u.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},u.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},u.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},u.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var c=0;c<2;c++)if(null==this.modules[r][s-c]){var u=!1;i<e.length&&(u=1==(e[i]>>>o&1)),a.getMask(t,r,s-c)&&(u=!u),this.modules[r][s-c]=u,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,u=0;u<n.length;u++){var l=n[u];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var h=0;for(u=0;u<r.length;u++)h+=r[u].dataCount;if(s.getLengthInBits()>8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(c.PAD0,8),s.getLengthInBits()>=8*h));)s.put(c.PAD1,8);return c.createBytes(s,r)},c.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),c=new Array(t.length),u=0;u<t.length;u++){var l=t[u].dataCount,h=t[u].totalCount-l;r=Math.max(r,l),o=Math.max(o,h),i[u]=new Array(l);for(var d=0;d<i[u].length;d++)i[u][d]=255&e.buffer[d+n];n+=l;var p=a.getErrorCorrectPolynomial(h),f=new s(i[u],p.getLength()-1).mod(p);c[u]=new Array(p.getLength()-1);for(d=0;d<c[u].length;d++){var v=d+f.getLength()-c[u].length;c[u][d]=v>=0?f.get(v):0}}var m=0;for(d=0;d<t.length;d++)m+=t[d].totalCount;var g=new Array(m),y=0;for(d=0;d<r;d++)for(u=0;u<t.length;u++)d<i[u].length&&(g[y++]=i[u][d]);for(d=0;d<o;d++)for(u=0;u<t.length;u++)d<c[u].length&&(g[y++]=c[u][d]);return g},e.exports=c},77515:function(e,t,n){var r=n(12538);function o(e,t){this.totalCount=e,this.dataCount=t}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],c=n[3*a+1],u=n[3*a+2],l=0;l<s;l++)i.push(new o(c,u));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},4897:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},45478:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},62739:function(e,t,n){var r=n(45478),o=n(14382),i=n(4897),a=0,s=1,c=2,u=3,l=4,h=5,d=6,p=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case c:return n%3==0;case u:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case p:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var c=-1;c<=1;c++)o+c<0||t<=o+c||0==s&&0==c||a==e.isDark(r+s,o+c)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var u=0;e.isDark(r,o)&&u++,e.isDark(r+1,o)&&u++,e.isDark(r,o+1)&&u++,e.isDark(r+1,o+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var l=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=f},63392:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=n(75271),y=(n(40507),n(46175)),C=n(12538);function b(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function E(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),c=a/r,u=(n.width||s)*c,l=(n.height||s)*c,h=null==n.x?t.length/2-u/2:n.x*c,d=null==n.y?t.length/2-l/2:n.y*c,p=null;if(n.excavate){var f=Math.floor(h),v=Math.floor(d);p={x:f,y:v,w:Math.ceil(u+h-f),h:Math.ceil(l+d-v)}}return{x:h,y:d,h:l,w:u,excavation:p}}var M=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),P=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return m(p(n=h(this,(e=d(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),m(p(n),"_image",void 0),m(p(n),"state",{imgLoaded:!1}),m(p(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return f(t,e),l(t,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,c=new y(-1,C[r]);if(c.addData(b(t)),c.make(),null!=this._canvas){var u=this._canvas,l=u.getContext("2d");if(!l)return;var h=c.modules;if(null===h)return;var d=a?4:0,p=h.length+2*d,f=E(this.props,h);null!=s&&null!=f&&null!=f.excavation&&(h=S(h,f.excavation));var v=window.devicePixelRatio||1;u.height=u.width=n*v;var m=n/p*v;l.scale(m,m),l.fillStyle=o,l.fillRect(0,0,p,p),l.fillStyle=i,M?l.fill(new Path2D(x(h,d))):h.forEach((function(e,t){e.forEach((function(e,n){e&&l.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=f&&l.drawImage(this._image,f.x+d,f.y+d,f.w,f.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),c=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),u=a({height:n,width:n},r),l=null,h=i&&i.src;return null!=i&&null!=h&&(l=g.createElement("img",{src:h,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),g.createElement(g.Fragment,null,g.createElement("canvas",o({style:u,height:n,width:n,ref:function(t){return e._canvas=t}},c)),l)}}]),t}(g.PureComponent);m(P,"defaultProps",w);var R=function(e){function t(){return c(this,t),h(this,d(t).apply(this,arguments))}return f(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,c=e.includeMargin,u=e.imageSettings,l=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),h=new y(-1,C[r]);h.addData(b(t)),h.make();var d=h.modules;if(null===d)return null;var p=c?4:0,f=d.length+2*p,v=E(this.props,d),m=null;null!=u&&null!=v&&(null!=v.excavation&&(d=S(d,v.excavation)),m=g.createElement("image",{xlinkHref:u.src,height:v.h,width:v.w,x:v.x+p,y:v.y+p,preserveAspectRatio:"none"}));var w=x(d,p);return g.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},l),g.createElement("path",{fill:i,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),g.createElement("path",{fill:a,d:w}),m)}}]),t}(g.PureComponent);m(R,"defaultProps",w);var D=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?R:P;return g.createElement(r,n)};D.defaultProps=a({renderAs:"canvas"},w),e.exports=D}}]);
1
+ (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7984],{1371:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var r=n(2053),o=n(75271),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"},a=n(48881),s=function(e,t){return o.createElement(a.Z,(0,r.Z)({},e,{ref:t,icon:i}))};var c=o.forwardRef(s)},69822:function(e,t,n){"use strict";n.d(t,{Z:function(){return ve}});var r=n(15767),o=n(52676),i=n(22901),a=n(6367),s=n(75271),c=n(93481),u=n(24744),l=n(57904),h=n(2053),d=n(99459),p=n(82187),f=n.n(p),v=n(35047),m=n(50631),g=n.n(m),y=n(6522),C=n(58006),b=n(98037),w=n(1260),x=s.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0});function S(e,t,n){return(e-t)/(n-t)}function E(e,t,n,r){var o=S(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function M(e,t){return Array.isArray(e)?e[t]:e}var P=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"];var R=s.forwardRef((function(e,t){var n,r,o=e.prefixCls,i=e.value,a=e.valueIndex,c=e.onStartMove,u=e.style,d=e.render,p=e.dragging,v=e.onOffsetChange,m=(0,C.Z)(e,P),g=s.useContext(x),y=g.min,S=g.max,R=g.direction,D=g.disabled,k=g.range,L=g.tabIndex,O=g.ariaLabelForHandle,z=g.ariaLabelledByForHandle,A=g.ariaValueTextFormatterForHandle,T="".concat(o,"-handle"),_=function(e){D||c(e,a)},Z=E(R,i,y,S),N=s.createElement("div",(0,h.Z)({ref:t,className:f()(T,(n={},(0,l.Z)(n,"".concat(T,"-").concat(a+1),k),(0,l.Z)(n,"".concat(T,"-dragging"),p),n)),style:(0,b.Z)((0,b.Z)({},Z),u),onMouseDown:_,onTouchStart:_,onKeyDown:function(e){if(!D){var t=null;switch(e.which||e.keyCode){case w.Z.LEFT:t="ltr"===R||"btt"===R?-1:1;break;case w.Z.RIGHT:t="ltr"===R||"btt"===R?1:-1;break;case w.Z.UP:t="ttb"!==R?1:-1;break;case w.Z.DOWN:t="ttb"!==R?-1:1;break;case w.Z.HOME:t="min";break;case w.Z.END:t="max";break;case w.Z.PAGE_UP:t=2;break;case w.Z.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),v(t,a))}},tabIndex:D?null:M(L,a),role:"slider","aria-valuemin":y,"aria-valuemax":S,"aria-valuenow":i,"aria-disabled":D,"aria-label":M(O,a),"aria-labelledby":M(z,a),"aria-valuetext":null===(r=M(A,a))||void 0===r?void 0:r(i)},m));return d&&(N=d(N,{index:a,prefixCls:o,value:i,dragging:p})),N})),D=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"];var k=s.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,c=e.handleRender,u=e.draggingIndex,l=(0,C.Z)(e,D),d=s.useRef({});return s.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),s.createElement(s.Fragment,null,a.map((function(e,t){return s.createElement(R,(0,h.Z)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:u===t,prefixCls:n,style:M(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:c},l))})))}));function L(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function O(e){var t=e.prefixCls,n=e.style,r=e.start,o=e.end,i=e.index,a=e.onStartMove,c=s.useContext(x),u=c.direction,l=c.min,h=c.max,d=c.disabled,p=c.range,v="".concat(t,"-track"),m=S(r,l,h),g=S(o,l,h),y=function(e){!d&&a&&a(e,-1)},C={};switch(u){case"rtl":C.right="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%");break;case"btt":C.bottom="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;case"ttb":C.top="".concat(100*m,"%"),C.height="".concat(100*g-100*m,"%");break;default:C.left="".concat(100*m,"%"),C.width="".concat(100*g-100*m,"%")}return s.createElement("div",{className:f()(v,p&&"".concat(v,"-").concat(i+1)),style:(0,b.Z)((0,b.Z)({},C),n),onMouseDown:y,onTouchStart:y})}function z(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=s.useContext(x),c=a.included,u=a.range,l=a.min,h=s.useMemo((function(){if(!u){if(0===r.length)return[];var e=null!=o?o:l,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,u,o,l]);return c?h.map((function(e,r){var o=e.start,a=e.end;return s.createElement(O,{index:r,prefixCls:t,style:M(n,r),start:o,end:a,key:r,onStartMove:i})})):null}function A(e){var t=e.prefixCls,n=e.style,r=e.children,o=e.value,i=e.onClick,a=s.useContext(x),c=a.min,u=a.max,h=a.direction,d=a.includedStart,p=a.includedEnd,v=a.included,m="".concat(t,"-text"),g=E(h,o,c,u);return s.createElement("span",{className:f()(m,(0,l.Z)({},"".concat(m,"-active"),v&&d<=o&&o<=p)),style:(0,b.Z)((0,b.Z)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){i(o)}},r)}function T(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?s.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return s.createElement(A,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}function _(e){var t=e.prefixCls,n=e.value,r=e.style,o=e.activeStyle,i=s.useContext(x),a=i.min,c=i.max,u=i.direction,h=i.included,d=i.includedStart,p=i.includedEnd,v="".concat(t,"-dot"),m=h&&d<=n&&n<=p,g=(0,b.Z)((0,b.Z)({},E(u,n,a,c)),"function"==typeof r?r(n):r);return m&&(g=(0,b.Z)((0,b.Z)({},g),"function"==typeof o?o(n):o)),s.createElement("span",{className:f()(v,(0,l.Z)({},"".concat(v,"-active"),m)),style:g})}function Z(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=s.useContext(x),c=a.min,u=a.max,l=a.step,h=s.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==l)for(var t=c;t<=u;)e.add(t),t+=l;return Array.from(e)}),[c,u,l,r,n]);return s.createElement("div",{className:"".concat(t,"-step")},h.map((function(e){return s.createElement(_,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}n(7432);var N=s.forwardRef((function(e,t){var n,r=e.prefixCls,o=void 0===r?"rc-slider":r,i=e.className,a=e.style,c=e.disabled,h=void 0!==c&&c,p=e.autoFocus,m=e.onFocus,C=e.onBlur,b=e.min,w=void 0===b?0:b,S=e.max,E=void 0===S?100:S,M=e.step,P=void 0===M?1:M,R=e.value,D=e.defaultValue,O=e.range,A=e.count,_=e.onChange,N=e.onBeforeChange,B=e.onAfterChange,I=e.allowCross,j=void 0===I||I,F=e.pushable,H=void 0!==F&&F,W=e.draggableTrack,G=e.reverse,U=e.vertical,X=e.included,Y=void 0===X||X,K=e.startPoint,V=e.trackStyle,$=e.handleStyle,q=e.railStyle,J=e.dotStyle,Q=e.activeDotStyle,ee=e.marks,te=e.dots,ne=e.handleRender,re=e.tabIndex,oe=void 0===re?0:re,ie=e.ariaLabelForHandle,ae=e.ariaLabelledByForHandle,se=e.ariaValueTextFormatterForHandle,ce=s.useRef(),ue=s.useRef(),le=s.useMemo((function(){return U?G?"ttb":"btt":G?"rtl":"ltr"}),[G,U]),he=s.useMemo((function(){return isFinite(w)?w:0}),[w]),de=s.useMemo((function(){return isFinite(E)?E:100}),[E]),pe=s.useMemo((function(){return null!==P&&P<=0?1:P}),[P]),fe=s.useMemo((function(){return!0===H?pe:H>=0&&H}),[H,pe]),ve=s.useMemo((function(){return Object.keys(ee||{}).map((function(e){var t=ee[e],n={value:Number(e)};return t&&"object"===(0,u.Z)(t)&&!s.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[ee]),me=function(e,t,n,r,o,i){var a=s.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),Math.max(e,r)}),[e,t]),c=s.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),c=Number(o.toFixed(s));return e<=c&&c<=t?c:null}return null}),[n,e,t,a]),u=s.useCallback((function(o){var i=a(o),s=r.map((function(e){return e.value}));null!==n&&s.push(c(o)),s.push(e,t);var u=s[0],l=t-e;return s.forEach((function(e){var t=Math.abs(i-e);t<=l&&(u=e,l=t)})),u}),[e,t,r,n,a,c]),l=function o(i,a,s){var u=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var l,h=i[s],d=h+a,p=[];r.forEach((function(e){p.push(e.value)})),p.push(e,t),p.push(c(h));var f=a>0?1:-1;"unit"===u?p.push(c(h+f*n)):p.push(c(d)),p=p.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=h:e>=h})),"unit"===u&&(p=p.filter((function(e){return e!==h})));var m="unit"===u?h:d;l=p[0];var g=Math.abs(l-m);if(p.forEach((function(e){var t=Math.abs(e-m);t<g&&(l=e,g=t)})),void 0===l)return a<0?e:t;if("dist"===u)return l;if(Math.abs(a)>1){var y=(0,v.Z)(i);return y[s]=l,o(y,a-f,s,u)}return l}return"min"===a?e:"max"===a?t:void 0},h=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=l(e,t,n,r);return{value:i,changed:i!==o}},d=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[u,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(u),s=a[n],c=l(a,t,n,r);if(a[n]=c,!1===o){var p=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+p)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-p))}else if("number"==typeof i||null===i){for(var f=n+1;f<a.length;f+=1)for(var v=!0;d(a[f]-a[f-1])&&v;){var m=h(a,1,f);a[f]=m.value,v=m.changed}for(var g=n;g>0;g-=1)for(var y=!0;d(a[g]-a[g-1])&&y;){var C=h(a,-1,g-1);a[g-1]=C.value,y=C.changed}for(var b=a.length-1;b>0;b-=1)for(var w=!0;d(a[b]-a[b-1])&&w;){var x=h(a,-1,b-1);a[b-1]=x.value,w=x.changed}for(var S=0;S<a.length-1;S+=1)for(var E=!0;d(a[S+1]-a[S])&&E;){var M=h(a,1,S+1);a[S+1]=M.value,E=M.changed}}return{value:a[n],values:a}}]}(he,de,pe,ve,j,fe),ge=(0,d.Z)(me,2),ye=ge[0],Ce=ge[1],be=(0,y.Z)(D,{value:R}),we=(0,d.Z)(be,2),xe=we[0],Se=we[1],Ee=s.useMemo((function(){var e=null==xe?[]:Array.isArray(xe)?xe:[xe],t=(0,d.Z)(e,1)[0],n=null===xe?[]:[void 0===t?he:t];if(O){if(n=(0,v.Z)(e),A||void 0===xe){var r=A>=0?A+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:he)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ye(e)})),n}),[xe,O,he,A,ye]),Me=s.useRef(Ee);Me.current=Ee;var Pe=function(e){return O?e:e[0]},Re=function(e){var t=(0,v.Z)(e).sort((function(e,t){return e-t}));_&&!g()(t,Me.current)&&_(Pe(t)),Se(t)},De=function(e){if(!h){var t=0,n=de-he;Ee.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,v.Z)(Ee);r[t]=e,O&&!Ee.length&&void 0===A&&r.push(e),null==N||N(Pe(r)),Re(r),null==B||B(Pe(r))}},ke=s.useState(null),Le=(0,d.Z)(ke,2),Oe=Le[0],ze=Le[1];s.useEffect((function(){if(null!==Oe){var e=Ee.indexOf(Oe);e>=0&&ce.current.focus(e)}ze(null)}),[Oe]);var Ae=s.useMemo((function(){return(!W||null!==pe)&&W}),[W,pe]),Te=function(e,t,n,r,o,i,a,c,u){var l=s.useState(null),h=(0,d.Z)(l,2),p=h[0],f=h[1],m=s.useState(-1),g=(0,d.Z)(m,2),y=g[0],C=g[1],b=s.useState(n),w=(0,d.Z)(b,2),x=w[0],S=w[1],E=s.useState(n),M=(0,d.Z)(E,2),P=M[0],R=M[1],D=s.useRef(null),k=s.useRef(null);s.useEffect((function(){-1===y&&S(n)}),[n,y]),s.useEffect((function(){return function(){document.removeEventListener("mousemove",D.current),document.removeEventListener("mouseup",k.current),document.removeEventListener("touchmove",D.current),document.removeEventListener("touchend",k.current)}}),[]);var O=function(e,t){x.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&f(t),S(e),a(e))},z=function(e,t){if(-1===e){var n=P[0],a=P[P.length-1],s=r-n,c=o-a,l=t*(o-r);l=Math.max(l,s),l=Math.min(l,c);var h=i(n+l);l=h-n;var d=P.map((function(e){return e+l}));O(d)}else{var p=(o-r)*t,f=(0,v.Z)(x);f[e]=P[e];var m=u(f,p,e,"dist");O(m.values,m.value)}},A=s.useRef(z);A.current=z;var T=s.useMemo((function(){var e=(0,v.Z)(n).sort((function(e,t){return e-t})),t=(0,v.Z)(x).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?x:n}),[n,x]);return[y,p,T,function(r,o){r.stopPropagation();var i=n[o];C(o),f(i),R(n);var a=L(r),s=a.pageX,u=a.pageY,l=function(n){n.preventDefault();var r,i=L(n),a=i.pageX,c=i.pageY,l=a-s,h=c-u,d=e.current.getBoundingClientRect(),p=d.width,f=d.height;switch(t){case"btt":r=-h/f;break;case"ttb":r=h/f;break;case"rtl":r=-l/p;break;default:r=l/p}A.current(o,r)},h=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",l),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",l),D.current=null,k.current=null,C(-1),c()};document.addEventListener("mouseup",h),document.addEventListener("mousemove",l),document.addEventListener("touchend",h),document.addEventListener("touchmove",l),D.current=l,k.current=h}]}(ue,le,Ee,he,de,ye,Re,(function(){null==B||B(Pe(Me.current))}),Ce),_e=(0,d.Z)(Te,4),Ze=_e[0],Ne=_e[1],Be=_e[2],Ie=_e[3],je=function(e,t){Ie(e,t),null==N||N(Pe(Me.current))},Fe=-1!==Ze;s.useEffect((function(){if(!Fe){var e=Ee.lastIndexOf(Ne);ce.current.focus(e)}}),[Fe]);var He=s.useMemo((function(){return(0,v.Z)(Be).sort((function(e,t){return e-t}))}),[Be]),We=s.useMemo((function(){return O?[He[0],He[He.length-1]]:[he,He[0]]}),[He,O,he]),Ge=(0,d.Z)(We,2),Ue=Ge[0],Xe=Ge[1];s.useImperativeHandle(t,(function(){return{focus:function(){ce.current.focus(0)},blur:function(){var e=document.activeElement;ue.current.contains(e)&&(null==e||e.blur())}}})),s.useEffect((function(){p&&ce.current.focus(0)}),[]);var Ye=s.useMemo((function(){return{min:he,max:de,direction:le,disabled:h,step:pe,included:Y,includedStart:Ue,includedEnd:Xe,range:O,tabIndex:oe,ariaLabelForHandle:ie,ariaLabelledByForHandle:ae,ariaValueTextFormatterForHandle:se}}),[he,de,le,h,pe,Y,Ue,Xe,O,oe,ie,ae,se]);return s.createElement(x.Provider,{value:Ye},s.createElement("div",{ref:ue,className:f()(o,i,(n={},(0,l.Z)(n,"".concat(o,"-disabled"),h),(0,l.Z)(n,"".concat(o,"-vertical"),U),(0,l.Z)(n,"".concat(o,"-horizontal"),!U),(0,l.Z)(n,"".concat(o,"-with-marks"),ve.length),n)),style:a,onMouseDown:function(e){e.preventDefault();var t,n=ue.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,c=n.right,u=e.clientX,l=e.clientY;switch(le){case"btt":t=(s-l)/o;break;case"ttb":t=(l-a)/o;break;case"rtl":t=(c-u)/r;break;default:t=(u-i)/r}De(ye(he+t*(de-he)))}},s.createElement("div",{className:"".concat(o,"-rail"),style:q}),s.createElement(z,{prefixCls:o,style:V,values:He,startPoint:K,onStartMove:Ae?je:null}),s.createElement(Z,{prefixCls:o,marks:ve,dots:te,style:J,activeStyle:Q}),s.createElement(k,{ref:ce,prefixCls:o,style:$,values:Be,draggingIndex:Ze,onStartMove:je,onOffsetChange:function(e,t){if(!h){var n=Ce(Ee,e,t);null==N||N(Pe(Ee)),Re(n.values),null==B||B(Pe(n.values)),ze(n.value)}},onFocus:m,onBlur:C,handleRender:ne}),s.createElement(T,{prefixCls:o,marks:ve,onClick:De})))}));var B=N,I=n(96820),j=n(15363),F=n(3083),H=n(59816),W=s.forwardRef((function(e,t){var n=e.open,r=(0,s.useRef)(null),o=(0,s.useRef)(null);function i(){j.Z.cancel(o.current),o.current=null}return s.useEffect((function(){return n?o.current=(0,j.Z)((function(){var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i}),[n,e.title]),s.createElement(H.Z,(0,h.Z)({ref:(0,F.sQ)(r,t)},e))})),G=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},U=s.forwardRef((function(e,t){var n=s.useContext(I.E_),r=n.getPrefixCls,o=n.direction,i=n.getPopupContainer,a=s.useState({}),c=(0,d.Z)(a,2),p=c[0],v=c[1],m=function(e,t){v((function(n){return(0,h.Z)((0,h.Z)({},n),(0,l.Z)({},e,t))}))},g=function(e,t){return e||(t?"rtl"===o?"left":"right":"top")},y=e.prefixCls,C=e.range,b=e.className,w=G(e,["prefixCls","range","className"]),x=r("slider",y),S=f()(b,(0,l.Z)({},"".concat(x,"-rtl"),"rtl"===o));"rtl"!==o||w.vertical||(w.reverse=!w.reverse);var E=s.useMemo((function(){return C?"object"===(0,u.Z)(C)?[!0,C.draggableTrack]:[!0,!1]:[!1]}),[C]),M=(0,d.Z)(E,2),P=M[0],R=M[1];return s.createElement(B,(0,h.Z)({},w,{step:w.step,range:P,draggableTrack:R,className:S,ref:t,prefixCls:x,handleRender:function(t,n){var o,a=n.index,c=n.dragging,u=r(),l=e.tooltip,d=void 0===l?{}:l,f=e.vertical,v=(0,h.Z)({formatter:null!==(o=e.tipFormatter)&&void 0!==o?o:function(e){return"number"==typeof e?e.toString():""},open:e.tooltipVisible,placement:e.tooltipPlacement,getPopupContainer:e.getTooltipPopupContainer},d),y=v.open,C=v.placement,b=v.getPopupContainer,w=v.prefixCls,S=v.formatter,E=!!S&&(p[a]||c),M=y||void 0===y&&E,P=(0,h.Z)((0,h.Z)({},t.props),{onMouseEnter:function(){return m(a,!0)},onMouseLeave:function(){return m(a,!1)}}),R=r("tooltip",w);return s.createElement(W,{prefixCls:R,title:S?S(n.value):"",open:M,placement:g(C,f),transitionName:"".concat(u,"-zoom-down"),key:a,overlayClassName:"".concat(x,"-tooltip"),getPopupContainer:b||i},s.cloneElement(t,P))}}))}));var X=U,Y=n(6210),K=n.n(Y);function V(e,t,n,r,o,i){void 0===i&&(i=0);var a=ae(e,t,i),s=a.width,c=a.height,u=Math.min(s,n),l=Math.min(c,r);return u>l*o?{width:l*o,height:l}:{width:u,height:u/o}}function $(e,t,n,r,o){void 0===o&&(o=0);var i=ae(t.width,t.height,o),a=i.width,s=i.height;return{x:q(e.x,a,n.width,r),y:q(e.y,s,n.height,r)}}function q(e,t,n,r){var o=t*r/2-n/2;return se(e,-o,o)}function J(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function Q(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function ee(e,t,n,o,i,a,s){void 0===a&&(a=0),void 0===s&&(s=!0);var c=s?te:ne,u=ae(t.width,t.height,a),l=ae(t.naturalWidth,t.naturalHeight,a),h={x:c(100,((u.width-n.width/i)/2-e.x/i)/u.width*100),y:c(100,((u.height-n.height/i)/2-e.y/i)/u.height*100),width:c(100,n.width/u.width*100/i),height:c(100,n.height/u.height*100/i)},d=Math.round(c(l.width,h.width*l.width/100)),p=Math.round(c(l.height,h.height*l.height/100)),f=l.width>=l.height*o?{width:Math.round(p*o),height:p}:{width:d,height:Math.round(d/o)};return{croppedAreaPercentages:h,croppedAreaPixels:(0,r.pi)((0,r.pi)({},f),{x:Math.round(c(l.width-f.width,h.x*l.width/100)),y:Math.round(c(l.height-f.height,h.y*l.height/100))})}}function te(e,t){return Math.min(e,Math.max(0,t))}function ne(e,t){return t}function re(e,t,n,r,o,i){var a=ae(t.width,t.height,n),s=se(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function oe(e,t,n,r,o,i){void 0===n&&(n=0);var a=ae(t.naturalWidth,t.naturalHeight,n),s=se(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),c=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*c,y:((a.height-e.height)/2-e.y)*c},zoom:s}}function ie(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function ae(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function se(e,t,n){return Math.min(Math.max(e,t),n)}function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}var ue=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=s.createRef(),n.videoRef=s.createRef(),n.containerPosition={x:0,y:0},n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc="undefined"!=typeof document?document:null,n.currentWindow="undefined"!=typeof window?window:null,n.resizeObserver=null,n.state={cropSize:null,hasWheelJustStarted:!1,mediaObjectFit:void 0},n.initResizeObserver=function(){if(void 0!==window.ResizeObserver&&n.containerRef){var e=!0;n.resizeObserver=new window.ResizeObserver((function(t){e?e=!1:n.computeSizes()})),n.resizeObserver.observe(n.containerRef)}},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc&&(n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd),n.currentDoc.removeEventListener("scroll",n.onScroll))},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=re(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=oe(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,o,i,a,s,c=n.imageRef.current||n.videoRef.current;if(c&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect(),n.saveContainerPosition();var u=n.containerRect.width/n.containerRect.height,l=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,h=(null===(o=n.imageRef.current)||void 0===o?void 0:o.naturalHeight)||(null===(i=n.videoRef.current)||void 0===i?void 0:i.videoHeight)||0,d=l/h,p=void 0;if(c.offsetWidth<l||c.offsetHeight<h)switch(n.state.mediaObjectFit){default:case"contain":p=u>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":p={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":p={width:n.containerRect.height*d,height:n.containerRect.height}}else p={width:c.offsetWidth,height:c.offsetHeight};n.mediaSize=(0,r.pi)((0,r.pi)({},p),{naturalWidth:l,naturalHeight:h}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var f=n.props.cropSize?n.props.cropSize:V(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(a=n.state.cropSize)||void 0===a?void 0:a.height)===f.height&&(null===(s=n.state.cropSize)||void 0===s?void 0:s.width)===f.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(f),n.setState({cropSize:f},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(f),f}},n.saveContainerPosition=function(){if(n.containerRef){var e=n.containerRef.getBoundingClientRect();n.containerPosition={x:e.left,y:e.top}}},n.onMouseDown=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.saveContainerPosition(),n.onDragStart(t.getMousePoint(e)))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onScroll=function(e){n.currentDoc&&(e.preventDefault(),n.saveContainerPosition())},n.onTouchStart=function(e){n.currentDoc&&(n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),n.saveContainerPosition(),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0]))))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){n.currentDoc&&(e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation)},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,o,i=e.x,a=e.y;n.dragStartPosition={x:i,y:a},n.dragStartCrop=(0,r.pi)({},n.props.crop),null===(o=(t=n.props).onInteractionStart)||void 0===o||o.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.currentWindow&&(n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?$(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}})))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(n.currentWindow&&(!n.props.onWheelRequest||n.props.onWheelRequest(e))){e.preventDefault();var r=t.getMousePoint(e),o=K()(e).pixelY,i=n.props.zoom-o*n.props.zoomSpeed/200;n.setNewZoom(i,r,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e,t){var r=e.x,o=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(r-t.x),y:n.containerRect.height/2-(o-t.y)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=se(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t,n.containerPosition),c=n.getPointOnMedia(s),u={x:c.x*a-s.x,y:c.y*a-s.y},l=n.props.restrictPosition?$(u,n.mediaSize,n.state.cropSize,a,n.props.rotation):u;n.props.onCropChange(l)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?ee(n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?$(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n.onKeyDown=function(e){var t=n.props,o=t.crop,i=t.onCropChange,a=t.keyboardStep,s=t.zoom,c=t.rotation,u=a;if(n.state.cropSize){e.shiftKey&&(u*=.2);var l=(0,r.pi)({},o);switch(e.key){case"ArrowUp":l.y-=u,e.preventDefault();break;case"ArrowDown":l.y+=u,e.preventDefault();break;case"ArrowLeft":l.x-=u,e.preventDefault();break;case"ArrowRight":l.x+=u,e.preventDefault();break;default:return}n.props.restrictPosition&&(l=$(l,n.mediaSize,n.state.cropSize,s,c)),i(l)}},n}return(0,r.ZT)(t,e),t.prototype.componentDidMount=function(){this.currentDoc&&this.currentWindow&&(this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.initResizeObserver(),void 0===window.ResizeObserver&&this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.currentDoc.addEventListener("scroll",this.onScroll),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef))},t.prototype.componentWillUnmount=function(){var e,t;this.currentDoc&&this.currentWindow&&(void 0===window.ResizeObserver&&this.currentWindow.removeEventListener("resize",this.computeSizes),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(t=this.styleRef.parentNode)||void 0===t||t.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent())},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,c,u;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect||e.objectFit!==this.props.objectFit?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(c=this.props.crop)||void 0===c?void 0:c.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(u=this.videoRef.current)||void 0===u||u.load());var l=this.getObjectFit();l!==this.state.mediaObjectFit&&this.setState({mediaObjectFit:l},this.computeSizes)},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.getObjectFit=function(){var e,t,n,r;if("cover"===this.props.objectFit){if((this.imageRef.current||this.videoRef.current)&&this.containerRef){this.containerRect=this.containerRef.getBoundingClientRect();var o=this.containerRect.width/this.containerRect.height;return((null===(e=this.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=this.videoRef.current)||void 0===t?void 0:t.videoWidth)||0)/((null===(n=this.imageRef.current)||void 0===n?void 0:n.naturalHeight)||(null===(r=this.videoRef.current)||void 0===r?void 0:r.videoHeight)||0)<o?"horizontal-cover":"vertical-cover"}return"horizontal-cover"}return this.props.objectFit},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=J(n,r),this.lastPinchRotation=Q(n,r),this.onDragStart(ie(n,r))},t.prototype.onPinchMove=function(e){var n=this;if(this.currentDoc&&this.currentWindow){var r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=ie(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=J(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=Q(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))}},t.prototype.render=function(){var e,t=this,n=this.props,o=n.image,i=n.video,a=n.mediaProps,c=n.transform,u=n.crop,l=u.x,h=u.y,d=n.rotation,p=n.zoom,f=n.cropShape,v=n.showGrid,m=n.style,g=m.containerStyle,y=m.cropAreaStyle,C=m.mediaStyle,b=n.classes,w=b.containerClassName,x=b.cropAreaClassName,S=b.mediaClassName,E=null!==(e=this.state.mediaObjectFit)&&void 0!==e?e:this.getObjectFit();return s.createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(e){return t.containerRef=e},"data-testid":"container",style:g,className:ce("reactEasyCrop_Container",w)},o?s.createElement("img",(0,r.pi)({alt:"",className:ce("reactEasyCrop_Image","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{src:o,ref:this.imageRef,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),onLoad:this.onMediaLoad})):i&&s.createElement("video",(0,r.pi)({autoPlay:!0,playsInline:!0,loop:!0,muted:!0,className:ce("reactEasyCrop_Video","contain"===E&&"reactEasyCrop_Contain","horizontal-cover"===E&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===E&&"reactEasyCrop_Cover_Vertical",S)},a,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:(0,r.pi)((0,r.pi)({},C),{transform:c||"translate(".concat(l,"px, ").concat(h,"px) rotate(").concat(d,"deg) scale(").concat(p,")")}),controls:!1}),(Array.isArray(i)?i:[{src:i}]).map((function(e){return s.createElement("source",(0,r.pi)({key:e.src},e))}))),this.state.cropSize&&s.createElement("div",{style:(0,r.pi)((0,r.pi)({},y),{width:this.state.cropSize.width,height:this.state.cropSize.height}),tabIndex:0,onKeyDown:this.onKeyDown,"data-testid":"cropper",className:ce("reactEasyCrop_CropArea","round"===f&&"reactEasyCrop_CropAreaRound",v&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0,keyboardStep:1},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(s.Component);const le="img-crop",he=.1,de=.01,pe=(0,s.forwardRef)(((e,t)=>{const{cropperRef:n,zoomSlider:r,rotationSlider:i,aspectSlider:a,showReset:u,resetBtnText:l,modalImage:h,aspect:d,minZoom:p,maxZoom:f,cropShape:v,showGrid:m,cropperProps:g}=e,[y,C]=(0,s.useState)(1),[b,w]=(0,s.useState)(0),[x,S]=(0,s.useState)(d),E=1!==y||0!==b||x!==d,M=()=>{C(1),w(0),S(d)},[P,R]=(0,s.useState)({x:0,y:0}),D=(0,s.useRef)({width:0,height:0,x:0,y:0}),k=(0,s.useCallback)(((e,t)=>{D.current=t}),[]);(0,s.useImperativeHandle)(t,(()=>({rotation:b,cropPixelsRef:D,onReset:M})));const L="[display:flex] [align-items:center] [width:60%] [margin-inline:auto]",O="[display:flex] [align-items:center] [justify-content:center] [height:32px] [width:32px] [background:transparent] [border:0] [font-family:inherit] [font-size:18px] [cursor:pointer] disabled:[opacity:20%] disabled:[cursor:default]",z="[flex:1]";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ue,Object.assign({},g,{ref:n,image:h,crop:P,zoom:y,rotation:b,aspect:x,minZoom:p,maxZoom:f,zoomWithScroll:r,cropShape:v,showGrid:m,onCropChange:R,onZoomChange:C,onRotationChange:w,onCropComplete:k,classes:{containerClassName:`${le}-container ![position:relative] [width:100%] [height:40vh] [&~section:first-of-type]:[margin-top:16px] [&~section:last-of-type]:[margin-bottom:16px]`,mediaClassName:`${le}-media`}})),r&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-zoom ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>C(+(y-he).toFixed(1)),disabled:y-he<p,children:"-"}),(0,o.jsx)(X,{className:z,min:p,max:f,step:he,value:y,onChange:C}),(0,o.jsx)("button",{className:O,onClick:()=>C(+(y+he).toFixed(1)),disabled:y+he>f,children:"+"})]}),i&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-rotation ${L}`,children:[(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b-1),disabled:-180===b,children:"↺"}),(0,o.jsx)(X,{className:z,min:-180,max:180,step:1,value:b,onChange:w}),(0,o.jsx)("button",{className:`${O} [font-size:16px]`,onClick:()=>w(b+1),disabled:180===b,children:"↻"})]}),a&&(0,o.jsxs)("section",{className:`${le}-control ${le}-control-aspect ${L}`,children:[(0,o.jsx)("button",{className:O,onClick:()=>S(+(x-de).toFixed(2)),disabled:x-de<.5,children:"↕️"}),(0,o.jsx)(X,{className:z,min:.5,max:2,step:de,value:x,onChange:S}),(0,o.jsx)("button",{className:O,onClick:()=>S(+(x+de).toFixed(2)),disabled:x+de>2,children:"↔️"})]}),u&&(r||i||a)&&(0,o.jsx)(c.Z,{className:"[bottom:20px] [position:absolute]",style:E?{}:{opacity:.3,pointerEvents:"none"},onClick:M,children:l})]})}));var fe=(0,s.memo)(pe);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".\\[align-items\\:center\\]{align-items:center}.\\[background\\:transparent\\]{background:transparent}.\\[border\\:0\\]{border:0}.\\[bottom\\:20px\\]{bottom:20px}.\\[cursor\\:pointer\\]{cursor:pointer}.\\[display\\:flex\\]{display:flex}.\\[flex\\:1\\]{flex:1}.\\[font-family\\:inherit\\]{font-family:inherit}.\\[font-size\\:16px\\]{font-size:16px}.\\[font-size\\:18px\\]{font-size:18px}.\\[height\\:32px\\]{height:32px}.\\[height\\:40vh\\]{height:40vh}.\\[justify-content\\:center\\]{justify-content:center}.\\[margin-inline\\:auto\\]{margin-inline:auto}.\\[position\\:absolute\\]{position:absolute}.\\!\\[position\\:relative\\]{position:relative!important}.\\[width\\:100\\%\\]{width:100%}.\\[width\\:32px\\]{width:32px}.\\[width\\:60\\%\\]{width:60%}.disabled\\:\\[cursor\\:default\\]:disabled{cursor:default}.disabled\\:\\[opacity\\:20\\%\\]:disabled{opacity:20%}.\\[\\&\\~section\\:first-of-type\\]\\:\\[margin-top\\:16px\\]~section:first-of-type{margin-top:16px}.\\[\\&\\~section\\:last-of-type\\]\\:\\[margin-bottom\\:16px\\]~section:last-of-type{margin-bottom:16px}",{insertAt:"top"});const ve=(0,s.forwardRef)(((e,t)=>{const{quality:n=.4,fillColor:c="white",zoomSlider:u=!0,rotationSlider:l=!1,aspectSlider:h=!1,showReset:d=!1,resetText:p,aspect:f=1,minZoom:v=1,maxZoom:m=3,cropShape:g="rect",showGrid:y=!1,cropperProps:C,modalClassName:b,modalTitle:w,modalWidth:x,modalOk:S,modalCancel:E,onModalOk:M,onModalCancel:P,modalProps:R,beforeCrop:D,children:k}=e,L=(0,s.useRef)({});L.current.onModalOk=M,L.current.onModalCancel=P,L.current.beforeCrop=D;const O=(0,s.useRef)(null),z=(0,s.useCallback)((e=>{var t;const n=document.createElement("canvas"),r=n.getContext("2d"),o=((null===(t=null==e?void 0:e.getRootNode)||void 0===t?void 0:t.call(e))||document).querySelector(`.${le}-media`),{width:i,height:a,x:s,y:u}=O.current.cropPixelsRef.current;if(l&&0!==O.current.rotation){const{naturalWidth:e,naturalHeight:t}=o,l=O.current.rotation*(Math.PI/180),h=Math.abs(Math.sin(l)),d=Math.abs(Math.cos(l)),p=e*d+t*h,f=t*d+e*h;n.width=p,n.height=f,r.fillStyle=c,r.fillRect(0,0,p,f);const v=p/2,m=f/2;r.translate(v,m),r.rotate(l),r.translate(-v,-m);const g=(p-e)/2,y=(f-t)/2;r.drawImage(o,0,0,e,t,g,y,e,t);const C=r.getImageData(0,0,p,f);n.width=i,n.height=a,r.putImageData(C,-s,-u)}else n.width=i,n.height=a,r.fillStyle=c,r.fillRect(0,0,i,a),r.drawImage(o,s,u,i,a,0,0,i,a);return n}),[c,l]),[A,T]=(0,s.useState)(""),_=(0,s.useRef)(),Z=(0,s.useRef)(),N=(0,s.useCallback)((e=>(0,r.mG)(void 0,[e],void 0,(function*({beforeUpload:e,file:t,resolve:n,reject:r}){const o=t;if("function"==typeof e)try{const r=yield e(t,[t]);n(!1!==r&&(!0!==r&&r||o))}catch(e){r(e)}else n(o)}))),[]),B=(0,s.useCallback)((e=>(t,o)=>new Promise(((i,s)=>(0,r.mG)(void 0,void 0,void 0,(function*(){let c=t;if("function"==typeof L.current.beforeCrop)try{const n=yield L.current.beforeCrop(t,o);if(!1===n)return N({beforeUpload:e,file:t,resolve:i,reject:s});!0!==n&&(c=n||t)}catch(n){return N({beforeUpload:e,file:t,resolve:i,reject:s})}const u=new FileReader;u.addEventListener("load",(()=>{"string"==typeof u.result&&T(u.result)})),u.readAsDataURL(c),_.current=()=>{var e,t;T(""),O.current.onReset();let n=!1;null===(t=(e=L.current).onModalCancel)||void 0===t||t.call(e,(e=>{i(e),n=!0})),n||i(a.Z.LIST_IGNORE)},Z.current=t=>(0,r.mG)(void 0,void 0,void 0,(function*(){T(""),O.current.onReset();const o=z(t.target),{type:a,name:u,uid:l}=c;o.toBlob((t=>(0,r.mG)(void 0,void 0,void 0,(function*(){const n=new File([t],u,{type:a});Object.assign(n,{uid:l}),N({beforeUpload:e,file:n,resolve:e=>{var t,n;i(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)},reject:e=>{var t,n;s(e),null===(n=(t=L.current).onModalOk)||void 0===n||n.call(t,e)}})}))),a,n)}))}))))),[z,n,N]),I=(0,s.useCallback)((e=>{const t=Array.isArray(e)?e[0]:e,n=t.props,{beforeUpload:o,accept:i}=n,a=(0,r._T)(n,["beforeUpload","accept"]);return Object.assign(Object.assign({},t),{props:Object.assign(Object.assign({},a),{accept:i||"image/*",beforeUpload:B(o)})})}),[B]),j=(0,s.useMemo)((()=>{const e={};return void 0!==x&&(e.width=x),void 0!==S&&(e.okText=S),void 0!==E&&(e.cancelText=E),e}),[E,S,x]),F=`${le}-modal${b?` ${b}`:""}`,H="zh-CN"===("undefined"==typeof window?"":window.navigator.language),W=w||(H?"编辑图片":"Edit image"),G=p||(H?"重置":"Reset");return(0,o.jsxs)(o.Fragment,{children:[I(k),A&&(0,o.jsx)(i.Z,Object.assign({},R,j,{open:!0,title:W,onCancel:_.current,onOk:Z.current,wrapClassName:F,maskClosable:!1,destroyOnClose:!0,children:(0,o.jsx)(fe,{ref:O,cropperRef:t,zoomSlider:u,rotationSlider:l,aspectSlider:h,showReset:d,resetBtnText:G,modalImage:A,aspect:f,minZoom:v,maxZoom:m,cropShape:g,showGrid:y,cropperProps:C})}))]})}))},94095:function(e,t,n){"use strict";n(5860),n(58504)},6210:function(e,t,n){e.exports=n(92782)},72906:function(e){"use strict";var t=!("undefined"==typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},73211:function(e){var t,n,r,o,i,a,s,c,u,l,h,d,p,f,v,m=!1;function g(){if(!m){m=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),y=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(d=/\b(iPhone|iP[ao]d)/.exec(e),p=/\b(iP[ao]d)/.exec(e),l=/Android/i.exec(e),f=/FBAN\/\w+;/i.exec(e),v=/Mobile/i.exec(e),h=!!/Win64/.exec(e),g){(t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN)&&document&&document.documentMode&&(t=document.documentMode);var C=/(?:Trident\/(\d+.\d+))/.exec(e);a=C?parseFloat(C[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,r=g[3]?parseFloat(g[3]):NaN,(o=g[4]?parseFloat(g[4]):NaN)?(g=/(?:Chrome\/(\d+\.\d+))/.exec(e),i=g&&g[1]?parseFloat(g[1]):NaN):i=NaN}else t=n=r=i=o=NaN;if(y){if(y[1]){var b=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);s=!b||parseFloat(b[1].replace("_","."))}else s=!1;c=!!y[2],u=!!y[3]}else s=c=u=!1}}var y={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||a>t},ie64:function(){return y.ie()&&h},firefox:function(){return g()||n},opera:function(){return g()||r},webkit:function(){return g()||o},safari:function(){return y.webkit()},chrome:function(){return g()||i},windows:function(){return g()||c},osx:function(){return g()||s},linux:function(){return g()||u},iphone:function(){return g()||d},mobile:function(){return g()||d||p||l||v},nativeApp:function(){return g()||f},android:function(){return g()||l},ipad:function(){return g()||p}};e.exports=y},16177:function(e,t,n){"use strict";var r,o=n(72906);o.canUseDOM&&(r=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=function(e,t){if(!o.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,i=n in document;if(!i){var a=document.createElement("div");a.setAttribute(n,"return;"),i="function"==typeof a[n]}return!i&&r&&"wheel"===e&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}},92782:function(e,t,n){"use strict";var r=n(73211),o=n(16177);function i(e){var t=0,n=0,r=0,o=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),r=10*t,o=10*n,"deltaY"in e&&(o=e.deltaY),"deltaX"in e&&(r=e.deltaX),(r||o)&&e.deltaMode&&(1==e.deltaMode?(r*=40,o*=40):(r*=800,o*=800)),r&&!t&&(t=r<1?-1:1),o&&!n&&(n=o<1?-1:1),{spinX:t,spinY:n,pixelX:r,pixelY:o}}i.getEventType=function(){return r.firefox()?"DOMMouseScroll":o("wheel")?"wheel":"mousewheel"},e.exports=i},31688:function(e,t,n){var r=n(45478);function o(e){this.mode=r.MODE_8BIT_BYTE,this.data=e}o.prototype={getLength:function(e){return this.data.length},write:function(e){for(var t=0;t<this.data.length;t++)e.put(this.data.charCodeAt(t),8)}},e.exports=o},77572:function(e){function t(){this.buffer=new Array,this.length=0}t.prototype={get:function(e){var t=Math.floor(e/8);return 1==(this.buffer[t]>>>7-e%8&1)},put:function(e,t){for(var n=0;n<t;n++)this.putBit(1==(e>>>t-n-1&1))},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}},e.exports=t},12538:function(e){e.exports={L:1,M:0,Q:3,H:2}},14382:function(e,t,n){var r=n(4897);function o(e,t){if(null==e.length)throw new Error(e.length+"/"+t);for(var n=0;n<e.length&&0==e[n];)n++;this.num=new Array(e.length-n+t);for(var r=0;r<e.length-n;r++)this.num[r]=e[r+n]}o.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),n=0;n<this.getLength();n++)for(var i=0;i<e.getLength();i++)t[n+i]^=r.gexp(r.glog(this.get(n))+r.glog(e.get(i)));return new o(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=r.glog(this.get(0))-r.glog(e.get(0)),n=new Array(this.getLength()),i=0;i<this.getLength();i++)n[i]=this.get(i);for(i=0;i<e.getLength();i++)n[i]^=r.gexp(r.glog(e.get(i))+t);return new o(n,0).mod(e)}},e.exports=o},46175:function(e,t,n){var r=n(31688),o=n(77515),i=n(77572),a=n(62739),s=n(14382);function c(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}var u=c.prototype;u.addData=function(e){var t=new r(e);this.dataList.push(t),this.dataCache=null},u.isDark=function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},u.getModuleCount=function(){return this.moduleCount},u.make=function(){if(this.typeNumber<1){var e=1;for(e=1;e<40;e++){for(var t=o.getRSBlocks(e,this.errorCorrectLevel),n=new i,r=0,s=0;s<t.length;s++)r+=t[s].dataCount;for(s=0;s<this.dataList.length;s++){var c=this.dataList[s];n.put(c.mode,4),n.put(c.getLength(),a.getLengthInBits(c.mode,e)),c.write(n)}if(n.getLengthInBits()<=8*r)break}this.typeNumber=e}this.makeImpl(!1,this.getBestMaskPattern())},u.makeImpl=function(e,t){this.moduleCount=4*this.typeNumber+17,this.modules=new Array(this.moduleCount);for(var n=0;n<this.moduleCount;n++){this.modules[n]=new Array(this.moduleCount);for(var r=0;r<this.moduleCount;r++)this.modules[n][r]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),null==this.dataCache&&(this.dataCache=c.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},u.setupPositionProbePattern=function(e,t){for(var n=-1;n<=7;n++)if(!(e+n<=-1||this.moduleCount<=e+n))for(var r=-1;r<=7;r++)t+r<=-1||this.moduleCount<=t+r||(this.modules[e+n][t+r]=0<=n&&n<=6&&(0==r||6==r)||0<=r&&r<=6&&(0==n||6==n)||2<=n&&n<=4&&2<=r&&r<=4)},u.getBestMaskPattern=function(){for(var e=0,t=0,n=0;n<8;n++){this.makeImpl(!0,n);var r=a.getLostPoint(this);(0==n||e>r)&&(e=r,t=n)}return t},u.createMovieClip=function(e,t,n){var r=e.createEmptyMovieClip(t,n);this.make();for(var o=0;o<this.modules.length;o++)for(var i=1*o,a=0;a<this.modules[o].length;a++){var s=1*a;this.modules[o][a]&&(r.beginFill(0,100),r.moveTo(s,i),r.lineTo(s+1,i),r.lineTo(s+1,i+1),r.lineTo(s,i+1),r.endFill())}return r},u.setupTimingPattern=function(){for(var e=8;e<this.moduleCount-8;e++)null==this.modules[e][6]&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)null==this.modules[6][t]&&(this.modules[6][t]=t%2==0)},u.setupPositionAdjustPattern=function(){for(var e=a.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var n=0;n<e.length;n++){var r=e[t],o=e[n];if(null==this.modules[r][o])for(var i=-2;i<=2;i++)for(var s=-2;s<=2;s++)this.modules[r+i][o+s]=-2==i||2==i||-2==s||2==s||0==i&&0==s}},u.setupTypeNumber=function(e){for(var t=a.getBCHTypeNumber(this.typeNumber),n=0;n<18;n++){var r=!e&&1==(t>>n&1);this.modules[Math.floor(n/3)][n%3+this.moduleCount-8-3]=r}for(n=0;n<18;n++){r=!e&&1==(t>>n&1);this.modules[n%3+this.moduleCount-8-3][Math.floor(n/3)]=r}},u.setupTypeInfo=function(e,t){for(var n=this.errorCorrectLevel<<3|t,r=a.getBCHTypeInfo(n),o=0;o<15;o++){var i=!e&&1==(r>>o&1);o<6?this.modules[o][8]=i:o<8?this.modules[o+1][8]=i:this.modules[this.moduleCount-15+o][8]=i}for(o=0;o<15;o++){i=!e&&1==(r>>o&1);o<8?this.modules[8][this.moduleCount-o-1]=i:o<9?this.modules[8][15-o-1+1]=i:this.modules[8][15-o-1]=i}this.modules[this.moduleCount-8][8]=!e},u.mapData=function(e,t){for(var n=-1,r=this.moduleCount-1,o=7,i=0,s=this.moduleCount-1;s>0;s-=2)for(6==s&&s--;;){for(var c=0;c<2;c++)if(null==this.modules[r][s-c]){var u=!1;i<e.length&&(u=1==(e[i]>>>o&1)),a.getMask(t,r,s-c)&&(u=!u),this.modules[r][s-c]=u,-1==--o&&(i++,o=7)}if((r+=n)<0||this.moduleCount<=r){r-=n,n=-n;break}}},c.PAD0=236,c.PAD1=17,c.createData=function(e,t,n){for(var r=o.getRSBlocks(e,t),s=new i,u=0;u<n.length;u++){var l=n[u];s.put(l.mode,4),s.put(l.getLength(),a.getLengthInBits(l.mode,e)),l.write(s)}var h=0;for(u=0;u<r.length;u++)h+=r[u].dataCount;if(s.getLengthInBits()>8*h)throw new Error("code length overflow. ("+s.getLengthInBits()+">"+8*h+")");for(s.getLengthInBits()+4<=8*h&&s.put(0,4);s.getLengthInBits()%8!=0;)s.putBit(!1);for(;!(s.getLengthInBits()>=8*h||(s.put(c.PAD0,8),s.getLengthInBits()>=8*h));)s.put(c.PAD1,8);return c.createBytes(s,r)},c.createBytes=function(e,t){for(var n=0,r=0,o=0,i=new Array(t.length),c=new Array(t.length),u=0;u<t.length;u++){var l=t[u].dataCount,h=t[u].totalCount-l;r=Math.max(r,l),o=Math.max(o,h),i[u]=new Array(l);for(var d=0;d<i[u].length;d++)i[u][d]=255&e.buffer[d+n];n+=l;var p=a.getErrorCorrectPolynomial(h),f=new s(i[u],p.getLength()-1).mod(p);c[u]=new Array(p.getLength()-1);for(d=0;d<c[u].length;d++){var v=d+f.getLength()-c[u].length;c[u][d]=v>=0?f.get(v):0}}var m=0;for(d=0;d<t.length;d++)m+=t[d].totalCount;var g=new Array(m),y=0;for(d=0;d<r;d++)for(u=0;u<t.length;u++)d<i[u].length&&(g[y++]=i[u][d]);for(d=0;d<o;d++)for(u=0;u<t.length;u++)d<c[u].length&&(g[y++]=c[u][d]);return g},e.exports=c},77515:function(e,t,n){var r=n(12538);function o(e,t){this.totalCount=e,this.dataCount=t}o.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],o.getRSBlocks=function(e,t){var n=o.getRsBlockTable(e,t);if(null==n)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var r=n.length/3,i=new Array,a=0;a<r;a++)for(var s=n[3*a+0],c=n[3*a+1],u=n[3*a+2],l=0;l<s;l++)i.push(new o(c,u));return i},o.getRsBlockTable=function(e,t){switch(t){case r.L:return o.RS_BLOCK_TABLE[4*(e-1)+0];case r.M:return o.RS_BLOCK_TABLE[4*(e-1)+1];case r.Q:return o.RS_BLOCK_TABLE[4*(e-1)+2];case r.H:return o.RS_BLOCK_TABLE[4*(e-1)+3];default:return}},e.exports=o},4897:function(e){for(var t={glog:function(e){if(e<1)throw new Error("glog("+e+")");return t.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return t.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},n=0;n<8;n++)t.EXP_TABLE[n]=1<<n;for(n=8;n<256;n++)t.EXP_TABLE[n]=t.EXP_TABLE[n-4]^t.EXP_TABLE[n-5]^t.EXP_TABLE[n-6]^t.EXP_TABLE[n-8];for(n=0;n<255;n++)t.LOG_TABLE[t.EXP_TABLE[n]]=n;e.exports=t},45478:function(e){e.exports={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8}},62739:function(e,t,n){var r=n(45478),o=n(14382),i=n(4897),a=0,s=1,c=2,u=3,l=4,h=5,d=6,p=7,f={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;f.getBCHDigit(t)-f.getBCHDigit(f.G15)>=0;)t^=f.G15<<f.getBCHDigit(t)-f.getBCHDigit(f.G15);return(e<<10|t)^f.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;f.getBCHDigit(t)-f.getBCHDigit(f.G18)>=0;)t^=f.G18<<f.getBCHDigit(t)-f.getBCHDigit(f.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;0!=e;)t++,e>>>=1;return t},getPatternPosition:function(e){return f.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,n){switch(e){case a:return(t+n)%2==0;case s:return t%2==0;case c:return n%3==0;case u:return(t+n)%3==0;case l:return(Math.floor(t/2)+Math.floor(n/3))%2==0;case h:return t*n%2+t*n%3==0;case d:return(t*n%2+t*n%3)%2==0;case p:return(t*n%3+(t+n)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new o([1],0),n=0;n<e;n++)t=t.multiply(new o([1,i.gexp(n)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case r.MODE_NUMBER:return 10;case r.MODE_ALPHA_NUM:return 9;case r.MODE_8BIT_BYTE:case r.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case r.MODE_NUMBER:return 12;case r.MODE_ALPHA_NUM:return 11;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else{if(!(t<41))throw new Error("type:"+t);switch(e){case r.MODE_NUMBER:return 14;case r.MODE_ALPHA_NUM:return 13;case r.MODE_8BIT_BYTE:return 16;case r.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}}},getLostPoint:function(e){for(var t=e.getModuleCount(),n=0,r=0;r<t;r++)for(var o=0;o<t;o++){for(var i=0,a=e.isDark(r,o),s=-1;s<=1;s++)if(!(r+s<0||t<=r+s))for(var c=-1;c<=1;c++)o+c<0||t<=o+c||0==s&&0==c||a==e.isDark(r+s,o+c)&&i++;i>5&&(n+=3+i-5)}for(r=0;r<t-1;r++)for(o=0;o<t-1;o++){var u=0;e.isDark(r,o)&&u++,e.isDark(r+1,o)&&u++,e.isDark(r,o+1)&&u++,e.isDark(r+1,o+1)&&u++,0!=u&&4!=u||(n+=3)}for(r=0;r<t;r++)for(o=0;o<t-6;o++)e.isDark(r,o)&&!e.isDark(r,o+1)&&e.isDark(r,o+2)&&e.isDark(r,o+3)&&e.isDark(r,o+4)&&!e.isDark(r,o+5)&&e.isDark(r,o+6)&&(n+=40);for(o=0;o<t;o++)for(r=0;r<t-6;r++)e.isDark(r,o)&&!e.isDark(r+1,o)&&e.isDark(r+2,o)&&e.isDark(r+3,o)&&e.isDark(r+4,o)&&!e.isDark(r+5,o)&&e.isDark(r+6,o)&&(n+=40);var l=0;for(o=0;o<t;o++)for(r=0;r<t;r++)e.isDark(r,o)&&l++;return n+=10*(Math.abs(100*l/t/t-50)/5)}};e.exports=f},63392:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o.apply(this,arguments)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(n,!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function h(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?p(e):t}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&v(e,t)}function v(e,t){return v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},v(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var g=n(75271),y=(n(40507),n(46175)),C=n(12538);function b(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r<2048?(t+=String.fromCharCode(192|r>>6),t+=String.fromCharCode(128|63&r)):r<55296||r>=57344?(t+=String.fromCharCode(224|r>>12),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r)):(n++,r=65536+((1023&r)<<10|1023&e.charCodeAt(n)),t+=String.fromCharCode(240|r>>18),t+=String.fromCharCode(128|r>>12&63),t+=String.fromCharCode(128|r>>6&63),t+=String.fromCharCode(128|63&r))}return t}var w={size:128,level:"L",bgColor:"#FFFFFF",fgColor:"#000000",includeMargin:!1};function x(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=[];return e.forEach((function(e,r){var o=null;e.forEach((function(i,a){if(!i&&null!==o)return n.push("M".concat(o+t," ").concat(r+t,"h").concat(a-o,"v1H").concat(o+t,"z")),void(o=null);if(a!==e.length-1)i&&null===o&&(o=a);else{if(!i)return;null===o?n.push("M".concat(a+t,",").concat(r+t," h1v1H").concat(a+t,"z")):n.push("M".concat(o+t,",").concat(r+t," h").concat(a+1-o,"v1H").concat(o+t,"z"))}}))})),n.join("")}function S(e,t){return e.slice().map((function(e,n){return n<t.y||n>=t.y+t.h?e:e.map((function(e,n){return(n<t.x||n>=t.x+t.w)&&e}))}))}function E(e,t){var n=e.imageSettings,r=e.size,o=e.includeMargin;if(null==n)return null;var i=o?4:0,a=t.length+2*i,s=Math.floor(.1*r),c=a/r,u=(n.width||s)*c,l=(n.height||s)*c,h=null==n.x?t.length/2-u/2:n.x*c,d=null==n.y?t.length/2-l/2:n.y*c,p=null;if(n.excavate){var f=Math.floor(h),v=Math.floor(d);p={x:f,y:v,w:Math.ceil(u+h-f),h:Math.ceil(l+d-v)}}return{x:h,y:d,h:l,w:u,excavation:p}}var M=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}(),P=function(e){function t(){var e,n;c(this,t);for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return m(p(n=h(this,(e=d(t)).call.apply(e,[this].concat(o)))),"_canvas",void 0),m(p(n),"_image",void 0),m(p(n),"state",{imgLoaded:!1}),m(p(n),"handleImageLoad",(function(){n.setState({imgLoaded:!0})})),n}return f(t,e),l(t,[{key:"componentDidMount",value:function(){this._image&&this._image.complete&&this.handleImageLoad(),this.update()}},{key:"componentWillReceiveProps",value:function(e){var t,n;(null===(t=this.props.imageSettings)||void 0===t?void 0:t.src)!==(null===(n=e.imageSettings)||void 0===n?void 0:n.src)&&this.setState({imgLoaded:!1})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"update",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,o=e.bgColor,i=e.fgColor,a=e.includeMargin,s=e.imageSettings,c=new y(-1,C[r]);if(c.addData(b(t)),c.make(),null!=this._canvas){var u=this._canvas,l=u.getContext("2d");if(!l)return;var h=c.modules;if(null===h)return;var d=a?4:0,p=h.length+2*d,f=E(this.props,h);null!=s&&null!=f&&null!=f.excavation&&(h=S(h,f.excavation));var v=window.devicePixelRatio||1;u.height=u.width=n*v;var m=n/p*v;l.scale(m,m),l.fillStyle=o,l.fillRect(0,0,p,p),l.fillStyle=i,M?l.fill(new Path2D(x(h,d))):h.forEach((function(e,t){e.forEach((function(e,n){e&&l.fillRect(n+d,t+d,1,1)}))})),this.state.imgLoaded&&this._image&&null!=f&&l.drawImage(this._image,f.x+d,f.y+d,f.w,f.h)}}},{key:"render",value:function(){var e=this,t=this.props,n=(t.value,t.size),r=(t.level,t.bgColor,t.fgColor,t.style),i=(t.includeMargin,t.imageSettings),c=s(t,["value","size","level","bgColor","fgColor","style","includeMargin","imageSettings"]),u=a({height:n,width:n},r),l=null,h=i&&i.src;return null!=i&&null!=h&&(l=g.createElement("img",{src:h,style:{display:"none"},onLoad:this.handleImageLoad,ref:function(t){return e._image=t}})),g.createElement(g.Fragment,null,g.createElement("canvas",o({style:u,height:n,width:n,ref:function(t){return e._canvas=t}},c)),l)}}]),t}(g.PureComponent);m(P,"defaultProps",w);var R=function(e){function t(){return c(this,t),h(this,d(t).apply(this,arguments))}return f(t,e),l(t,[{key:"render",value:function(){var e=this.props,t=e.value,n=e.size,r=e.level,i=e.bgColor,a=e.fgColor,c=e.includeMargin,u=e.imageSettings,l=s(e,["value","size","level","bgColor","fgColor","includeMargin","imageSettings"]),h=new y(-1,C[r]);h.addData(b(t)),h.make();var d=h.modules;if(null===d)return null;var p=c?4:0,f=d.length+2*p,v=E(this.props,d),m=null;null!=u&&null!=v&&(null!=v.excavation&&(d=S(d,v.excavation)),m=g.createElement("image",{xlinkHref:u.src,height:v.h,width:v.w,x:v.x+p,y:v.y+p,preserveAspectRatio:"none"}));var w=x(d,p);return g.createElement("svg",o({shapeRendering:"crispEdges",height:n,width:n,viewBox:"0 0 ".concat(f," ").concat(f)},l),g.createElement("path",{fill:i,d:"M0,0 h".concat(f,"v").concat(f,"H0z")}),g.createElement("path",{fill:a,d:w}),m)}}]),t}(g.PureComponent);m(R,"defaultProps",w);var D=function(e){var t=e.renderAs,n=s(e,["renderAs"]),r="svg"===t?R:P;return g.createElement(r,n)};D.defaultProps=a({renderAs:"canvas"},w),e.exports=D}}]);