@whyour/qinglong 0.13.3 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README-en.md +13 -15
  2. package/README.md +14 -17
  3. package/docker/Dockerfile +6 -8
  4. package/docker/docker-entrypoint.sh +2 -16
  5. package/docker/front.conf +12 -0
  6. package/ecosystem.config.js +8 -0
  7. package/package.json +13 -8
  8. package/sample/config.sample.sh +10 -20
  9. package/sample/notify.js +115 -136
  10. package/sample/notify.py +7 -7
  11. package/shell/api.sh +4 -4
  12. package/shell/bot.sh +0 -3
  13. package/shell/check.sh +1 -13
  14. package/shell/env.sh +0 -0
  15. package/shell/share.sh +2 -4
  16. package/shell/start.sh +0 -10
  17. package/shell/update.sh +6 -17
  18. package/static/build/api/config.js +23 -6
  19. package/static/build/api/log.js +3 -32
  20. package/static/build/api/script.js +31 -21
  21. package/static/build/api/system.js +76 -8
  22. package/static/build/config/const.js +18 -1
  23. package/static/build/config/index.js +3 -0
  24. package/static/build/config/util.js +98 -95
  25. package/static/build/data/notify.js +2 -2
  26. package/static/build/data/{auth.js → system.js} +3 -3
  27. package/static/build/loaders/db.js +4 -4
  28. package/static/build/loaders/deps.js +11 -14
  29. package/static/build/loaders/express.js +4 -6
  30. package/static/build/loaders/initFile.js +16 -16
  31. package/static/build/loaders/sentry.js +2 -3
  32. package/static/build/loaders/sock.js +3 -3
  33. package/static/build/public.js +1 -1
  34. package/static/build/schedule/client.js +1 -1
  35. package/static/build/schedule/health.js +1 -1
  36. package/static/build/schedule/index.js +1 -1
  37. package/static/build/services/cron.js +32 -25
  38. package/static/build/services/dependence.js +15 -5
  39. package/static/build/services/env.js +2 -2
  40. package/static/build/services/notify.js +8 -7
  41. package/static/build/services/script.js +2 -6
  42. package/static/build/services/sshKey.js +27 -52
  43. package/static/build/services/subscription.js +19 -21
  44. package/static/build/services/system.js +112 -21
  45. package/static/build/services/user.js +52 -41
  46. package/static/build/shared/pLimit.js +4 -4
  47. package/static/dist/{6644.1f11b8fa.async.js → 1431.36b64dc5.async.js} +1 -1
  48. package/static/dist/3752.56c3fba2.async.js +1 -0
  49. package/static/dist/{419.e21ea0bd.async.js → 419.d9597044.async.js} +1 -1
  50. package/static/dist/{8008.cf4ff203.async.js → 8008.fbdcf863.async.js} +1 -1
  51. package/static/dist/833.7348bf8c.async.js +1 -0
  52. package/static/dist/8722.408e3112.async.js +1 -0
  53. package/static/dist/{8171.e2986b87.async.js → 9847.d72d4b37.async.js} +1 -1
  54. package/static/dist/index.html +1 -1
  55. package/static/dist/layouts__index.2c89a418.async.js +1 -0
  56. package/static/dist/monaco-editor/min/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
  57. package/static/dist/monaco-editor/min/vs/base/worker/workerMain.js +22 -0
  58. package/static/dist/monaco-editor/min/vs/basic-languages/abap/abap.js +10 -0
  59. package/static/dist/monaco-editor/min/vs/basic-languages/apex/apex.js +10 -0
  60. package/static/dist/monaco-editor/min/vs/basic-languages/azcli/azcli.js +10 -0
  61. package/static/dist/monaco-editor/min/vs/basic-languages/bat/bat.js +10 -0
  62. package/static/dist/monaco-editor/min/vs/basic-languages/bicep/bicep.js +11 -0
  63. package/static/dist/monaco-editor/min/vs/basic-languages/cameligo/cameligo.js +10 -0
  64. package/static/dist/monaco-editor/min/vs/basic-languages/clojure/clojure.js +10 -0
  65. package/static/dist/monaco-editor/min/vs/basic-languages/coffee/coffee.js +10 -0
  66. package/static/dist/monaco-editor/min/vs/basic-languages/cpp/cpp.js +10 -0
  67. package/static/dist/monaco-editor/min/vs/basic-languages/csharp/csharp.js +10 -0
  68. package/static/dist/monaco-editor/min/vs/basic-languages/csp/csp.js +10 -0
  69. package/static/dist/monaco-editor/min/vs/basic-languages/css/css.js +12 -0
  70. package/static/dist/monaco-editor/min/vs/basic-languages/dart/dart.js +10 -0
  71. package/static/dist/monaco-editor/min/vs/basic-languages/dockerfile/dockerfile.js +10 -0
  72. package/static/dist/monaco-editor/min/vs/basic-languages/ecl/ecl.js +10 -0
  73. package/static/dist/monaco-editor/min/vs/basic-languages/elixir/elixir.js +10 -0
  74. package/static/dist/monaco-editor/min/vs/basic-languages/flow9/flow9.js +10 -0
  75. package/static/dist/monaco-editor/min/vs/basic-languages/freemarker2/freemarker2.js +12 -0
  76. package/static/dist/monaco-editor/min/vs/basic-languages/fsharp/fsharp.js +10 -0
  77. package/static/dist/monaco-editor/min/vs/basic-languages/go/go.js +10 -0
  78. package/static/dist/monaco-editor/min/vs/basic-languages/graphql/graphql.js +10 -0
  79. package/static/dist/monaco-editor/min/vs/basic-languages/handlebars/handlebars.js +10 -0
  80. package/static/dist/monaco-editor/min/vs/basic-languages/hcl/hcl.js +10 -0
  81. package/static/dist/monaco-editor/min/vs/basic-languages/html/html.js +10 -0
  82. package/static/dist/monaco-editor/min/vs/basic-languages/ini/ini.js +10 -0
  83. package/static/dist/monaco-editor/min/vs/basic-languages/java/java.js +10 -0
  84. package/static/dist/monaco-editor/min/vs/basic-languages/javascript/javascript.js +10 -0
  85. package/static/dist/monaco-editor/min/vs/basic-languages/julia/julia.js +10 -0
  86. package/static/dist/monaco-editor/min/vs/basic-languages/kotlin/kotlin.js +10 -0
  87. package/static/dist/monaco-editor/min/vs/basic-languages/less/less.js +11 -0
  88. package/static/dist/monaco-editor/min/vs/basic-languages/lexon/lexon.js +10 -0
  89. package/static/dist/monaco-editor/min/vs/basic-languages/liquid/liquid.js +10 -0
  90. package/static/dist/monaco-editor/min/vs/basic-languages/lua/lua.js +10 -0
  91. package/static/dist/monaco-editor/min/vs/basic-languages/m3/m3.js +10 -0
  92. package/static/dist/monaco-editor/min/vs/basic-languages/markdown/markdown.js +10 -0
  93. package/static/dist/monaco-editor/min/vs/basic-languages/mips/mips.js +10 -0
  94. package/static/dist/monaco-editor/min/vs/basic-languages/msdax/msdax.js +10 -0
  95. package/static/dist/monaco-editor/min/vs/basic-languages/mysql/mysql.js +10 -0
  96. package/static/dist/monaco-editor/min/vs/basic-languages/objective-c/objective-c.js +10 -0
  97. package/static/dist/monaco-editor/min/vs/basic-languages/pascal/pascal.js +10 -0
  98. package/static/dist/monaco-editor/min/vs/basic-languages/pascaligo/pascaligo.js +10 -0
  99. package/static/dist/monaco-editor/min/vs/basic-languages/perl/perl.js +10 -0
  100. package/static/dist/monaco-editor/min/vs/basic-languages/pgsql/pgsql.js +10 -0
  101. package/static/dist/monaco-editor/min/vs/basic-languages/php/php.js +10 -0
  102. package/static/dist/monaco-editor/min/vs/basic-languages/pla/pla.js +10 -0
  103. package/static/dist/monaco-editor/min/vs/basic-languages/postiats/postiats.js +10 -0
  104. package/static/dist/monaco-editor/min/vs/basic-languages/powerquery/powerquery.js +10 -0
  105. package/static/dist/monaco-editor/min/vs/basic-languages/powershell/powershell.js +10 -0
  106. package/static/dist/monaco-editor/min/vs/basic-languages/protobuf/protobuf.js +11 -0
  107. package/static/dist/monaco-editor/min/vs/basic-languages/pug/pug.js +10 -0
  108. package/static/dist/monaco-editor/min/vs/basic-languages/python/python.js +10 -0
  109. package/static/dist/monaco-editor/min/vs/basic-languages/qsharp/qsharp.js +10 -0
  110. package/static/dist/monaco-editor/min/vs/basic-languages/r/r.js +10 -0
  111. package/static/dist/monaco-editor/min/vs/basic-languages/razor/razor.js +10 -0
  112. package/static/dist/monaco-editor/min/vs/basic-languages/redis/redis.js +10 -0
  113. package/static/dist/monaco-editor/min/vs/basic-languages/redshift/redshift.js +10 -0
  114. package/static/dist/monaco-editor/min/vs/basic-languages/restructuredtext/restructuredtext.js +10 -0
  115. package/static/dist/monaco-editor/min/vs/basic-languages/ruby/ruby.js +10 -0
  116. package/static/dist/monaco-editor/min/vs/basic-languages/rust/rust.js +10 -0
  117. package/static/dist/monaco-editor/min/vs/basic-languages/sb/sb.js +10 -0
  118. package/static/dist/monaco-editor/min/vs/basic-languages/scala/scala.js +10 -0
  119. package/static/dist/monaco-editor/min/vs/basic-languages/scheme/scheme.js +10 -0
  120. package/static/dist/monaco-editor/min/vs/basic-languages/scss/scss.js +12 -0
  121. package/static/dist/monaco-editor/min/vs/basic-languages/shell/shell.js +10 -0
  122. package/static/dist/monaco-editor/min/vs/basic-languages/solidity/solidity.js +10 -0
  123. package/static/dist/monaco-editor/min/vs/basic-languages/sophia/sophia.js +10 -0
  124. package/static/dist/monaco-editor/min/vs/basic-languages/sparql/sparql.js +10 -0
  125. package/static/dist/monaco-editor/min/vs/basic-languages/sql/sql.js +10 -0
  126. package/static/dist/monaco-editor/min/vs/basic-languages/st/st.js +10 -0
  127. package/static/dist/monaco-editor/min/vs/basic-languages/swift/swift.js +13 -0
  128. package/static/dist/monaco-editor/min/vs/basic-languages/systemverilog/systemverilog.js +10 -0
  129. package/static/dist/monaco-editor/min/vs/basic-languages/tcl/tcl.js +10 -0
  130. package/static/dist/monaco-editor/min/vs/basic-languages/twig/twig.js +10 -0
  131. package/static/dist/monaco-editor/min/vs/basic-languages/typescript/typescript.js +10 -0
  132. package/static/dist/monaco-editor/min/vs/basic-languages/vb/vb.js +10 -0
  133. package/static/dist/monaco-editor/min/vs/basic-languages/xml/xml.js +10 -0
  134. package/static/dist/monaco-editor/min/vs/basic-languages/yaml/yaml.js +10 -0
  135. package/static/dist/monaco-editor/min/vs/editor/editor.main.css +6 -0
  136. package/static/dist/monaco-editor/min/vs/editor/editor.main.js +805 -0
  137. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.de.js +29 -0
  138. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.es.js +29 -0
  139. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.fr.js +27 -0
  140. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.it.js +27 -0
  141. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ja.js +29 -0
  142. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.js +27 -0
  143. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ko.js +27 -0
  144. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.ru.js +29 -0
  145. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-cn.js +29 -0
  146. package/static/dist/monaco-editor/min/vs/editor/editor.main.nls.zh-tw.js +27 -0
  147. package/static/dist/monaco-editor/min/vs/language/css/cssMode.js +13 -0
  148. package/static/dist/monaco-editor/min/vs/language/css/cssWorker.js +63 -0
  149. package/static/dist/monaco-editor/min/vs/language/html/htmlMode.js +13 -0
  150. package/static/dist/monaco-editor/min/vs/language/html/htmlWorker.js +453 -0
  151. package/static/dist/monaco-editor/min/vs/language/json/jsonMode.js +15 -0
  152. package/static/dist/monaco-editor/min/vs/language/json/jsonWorker.js +36 -0
  153. package/static/dist/monaco-editor/min/vs/language/typescript/tsMode.js +20 -0
  154. package/static/dist/monaco-editor/min/vs/language/typescript/tsWorker.js +33970 -0
  155. package/static/dist/monaco-editor/min/vs/loader.js +11 -0
  156. package/static/dist/src__pages__config__index.e809a5d0.async.js +1 -0
  157. package/static/dist/src__pages__crontab__detail.5b509309.async.js +1 -0
  158. package/static/dist/src__pages__crontab__index.73fc56e9.chunk.css +1 -0
  159. package/static/dist/src__pages__crontab__index.da430aa9.async.js +1 -0
  160. package/static/dist/{src__pages__crontab__modal.3fa8f075.async.js → src__pages__crontab__modal.13de83de.async.js} +1 -1
  161. package/static/dist/src__pages__dependence__index.27d29203.async.js +1 -0
  162. package/static/dist/src__pages__dependence__logModal.b55dacc8.async.js +1 -0
  163. package/static/dist/src__pages__dependence__modal.3cc1a9be.async.js +1 -0
  164. package/static/dist/src__pages__diff__index.218dfd1a.async.js +1 -0
  165. package/static/dist/{src__pages__env__editNameModal.25c21e59.async.js → src__pages__env__editNameModal.08af0049.async.js} +1 -1
  166. package/static/dist/src__pages__env__modal.4c039f3d.async.js +1 -0
  167. package/static/dist/src__pages__error__index.1748dfaa.async.js +1 -0
  168. package/static/dist/src__pages__initialization__index.8f114cca.async.js +1 -0
  169. package/static/dist/src__pages__log__index.84556deb.async.js +1 -0
  170. package/static/dist/src__pages__script__editModal.17bcb1c2.async.js +1 -0
  171. package/static/dist/{src__pages__script__editNameModal.ca76e055.async.js → src__pages__script__editNameModal.61262353.async.js} +1 -1
  172. package/static/dist/src__pages__script__index.27582916.async.js +1 -0
  173. package/static/dist/{src__pages__script__renameModal.c166915b.async.js → src__pages__script__renameModal.3e39fdf4.async.js} +1 -1
  174. package/static/dist/src__pages__script__saveModal.449e50d8.async.js +1 -0
  175. package/static/dist/{src__pages__script__setting.020a7629.async.js → src__pages__script__setting.7944fdd6.async.js} +1 -1
  176. package/static/dist/{src__pages__setting__about.e3293e77.chunk.css → src__pages__setting__about.f6325812.chunk.css} +1 -1
  177. package/static/dist/{src__pages__setting__appModal.efa5bb29.async.js → src__pages__setting__appModal.a419e539.async.js} +1 -1
  178. package/static/dist/{src__pages__setting__other.b4adcffe.chunk.css → src__pages__setting__dependence.55c598d0.chunk.css} +1 -1
  179. package/static/dist/src__pages__setting__dependence.7bcddc85.async.js +1 -0
  180. package/static/dist/src__pages__setting__index.d2fc96f6.async.js +1 -0
  181. package/static/dist/{src__pages__setting__index.d57cc3fc.chunk.css → src__pages__setting__index.d666f8ec.chunk.css} +1 -1
  182. package/static/dist/src__pages__setting__notification.552e6815.async.js +1 -0
  183. package/static/dist/src__pages__setting__other.55c598d0.chunk.css +1 -0
  184. package/static/dist/src__pages__setting__other.a029d99a.async.js +1 -0
  185. package/static/dist/{src__pages__setting__security.d14993c7.async.js → src__pages__setting__security.c667d9e8.async.js} +1 -1
  186. package/static/dist/src__pages__subscription__modal.07629f02.async.js +1 -0
  187. package/static/dist/{umi.decd4ae2.js → umi.c864c23a.js} +1 -1
  188. package/version.yaml +27 -5
  189. package/sample/package.json +0 -12
  190. package/static/dist/5619.db04f386.async.js +0 -1
  191. package/static/dist/6747.36513965.async.js +0 -1
  192. package/static/dist/833.5add31bf.async.js +0 -1
  193. package/static/dist/layouts__index.931ce4c3.async.js +0 -1
  194. package/static/dist/src__pages__config__index.9d83dfb7.async.js +0 -1
  195. package/static/dist/src__pages__crontab__detail.7bceef05.async.js +0 -1
  196. package/static/dist/src__pages__crontab__index.55c93601.async.js +0 -1
  197. package/static/dist/src__pages__crontab__index.9fb90359.chunk.css +0 -1
  198. package/static/dist/src__pages__dependence__index.21153c24.async.js +0 -1
  199. package/static/dist/src__pages__dependence__logModal.5aada63c.async.js +0 -1
  200. package/static/dist/src__pages__dependence__modal.96353c88.async.js +0 -1
  201. package/static/dist/src__pages__diff__index.e644b15f.async.js +0 -1
  202. package/static/dist/src__pages__env__modal.4fd6abc2.async.js +0 -1
  203. package/static/dist/src__pages__error__index.f3ca5563.async.js +0 -1
  204. package/static/dist/src__pages__initialization__index.727e0f70.async.js +0 -1
  205. package/static/dist/src__pages__log__index.ba2c1721.async.js +0 -1
  206. package/static/dist/src__pages__script__editModal.8d7bac2a.async.js +0 -1
  207. package/static/dist/src__pages__script__index.da31e2c2.async.js +0 -1
  208. package/static/dist/src__pages__script__saveModal.7ee07566.async.js +0 -1
  209. package/static/dist/src__pages__setting__index.540c33a4.async.js +0 -1
  210. package/static/dist/src__pages__setting__notification.b99a4c64.async.js +0 -1
  211. package/static/dist/src__pages__setting__other.d20be1c1.async.js +0 -1
  212. package/static/dist/src__pages__subscription__modal.61e787ce.async.js +0 -1
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[833],{15207:function(e,t,r){"use strict";var o=r(88265),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:o.ZP.get("青龙"),apiPrefix:"".concat(n,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:o.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:o.ZP.get("定时任务"),value:"crons"},{name:o.ZP.get("环境变量"),value:"envs"},{name:o.ZP.get("订阅管理"),value:"subscriptions"},{name:o.ZP.get("配置文件"),value:"configs"},{name:o.ZP.get("脚本管理"),value:"scripts"},{name:o.ZP.get("日志管理"),value:"logs"},{name:o.ZP.get("依赖管理"),value:"dependencies"},{name:o.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:o.ZP.get("定时任务"),envs:o.ZP.get("环境变量"),subscriptions:o.ZP.get("订阅管理"),configs:o.ZP.get("配置文件"),scripts:o.ZP.get("脚本管理"),logs:o.ZP.get("日志管理"),dependencies:o.ZP.get("依赖管理"),system:o.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:o.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:o.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:o.ZP.get("钉钉机器人")},{value:"weWorkBot",label:o.ZP.get("企业微信机器人")},{value:"weWorkApp",label:o.ZP.get("企业微信应用")},{value:"aibotk",label:o.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:o.ZP.get("群晖chat")},{value:"email",label:o.ZP.get("邮箱")},{value:"lark",label:o.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:o.ZP.get("自定义通知")},{value:"closed",label:o.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:o.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:o.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:o.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:o.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:o.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:o.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:o.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:o.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:o.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:o.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:o.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:o.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:o.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:o.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:o.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:o.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:o.ZP.get("BARK推送消息的跳转URL")}],telegramBot:[{label:"telegramBotToken",tip:o.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:o.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:o.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:o.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:o.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:o.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:o.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:o.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:o.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:o.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:o.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:o.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:o.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:o.ZP.get("请输入要发送的目标"),items:[{value:"room",label:o.ZP.get("群聊")},{value:"contact",label:o.ZP.get("好友")}]},{label:"aibotkName",tip:o.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:o.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:o.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:o.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:o.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:o.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:o.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:o.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:o.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],chronocat:[{label:"chronocatURL",tip:o.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:o.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:o.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:o.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:o.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:o.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:o.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:o.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":o.ZP.get("登录"),"/initialization":o.ZP.get("初始化"),"/crontab":o.ZP.get("定时任务"),"/env":o.ZP.get("环境变量"),"/subscription":o.ZP.get("订阅管理"),"/config":o.ZP.get("配置文件"),"/script":o.ZP.get("脚本管理"),"/diff":o.ZP.get("对比工具"),"/log":o.ZP.get("日志管理"),"/setting":o.ZP.get("系统设置"),"/error":o.ZP.get("错误日志"),"/dependence":o.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},57229:function(e,t,r){"use strict";r.d(t,{W:function(){return b}});var o=r(25359),n=r.n(o),a=r(49811),i=r.n(a),l=r(88265),s=r(9835),u=r(15207),g=r(14851),p=r(73669);s.ZP.config({duration:2});var c=Date.now(),d=p.Z.create({timeout:6e4,params:{t:c}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=i()(n()().mark((function e(t){var r,o,a;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}g.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(o=t.data).code&&(a=o.message||o.data)&&s.ZP.error({content:a,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",o);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,r=e.response.status;[502,504].includes(r)?g.history.push("/error"):401===r?"/login"!==g.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),g.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var b=d},40141:function(e,t,r){"use strict";r.d(t,{ZP:function(){return u},I1:function(){return c},w7:function(){return p},DY:function(){return d},FA:function(){return b},rS:function(){return w},H$:function(){return m},W9:function(){return g},x$:function(){return h}});var o=r(93525),n=r.n(o),a=r(88265),i={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript"},l=r(11186),s=r.n(l);function u(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},r=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},o="unknow";t(/windows|win32|win64|wow32|wow64/g)?o="windows":t(/macintosh|macintel/g)?o="macos":t(/x11/g)?o="linux":t(/android|adr/g)?o="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(o="ios");var n="unknow";"windows"===o?t(/windows nt 5.0|windows 2000/g)?n="2000":t(/windows nt 5.1|windows xp/g)?n="xp":t(/windows nt 5.2|windows 2003/g)?n="2003":t(/windows nt 6.0|windows vista/g)?n="vista":t(/windows nt 6.1|windows 7/g)?n="7":t(/windows nt 6.2|windows 8/g)?n="8":t(/windows nt 6.3|windows 8.1/g)?n="8.1":t(/windows nt 10.0|windows 10/g)&&(n="10"):"macos"===o?n=r(/os x [\d._]+/g):"android"===o?n=r(/android [\d._]+/g):"ios"===o&&(n=r(/os [\d._]+/g));var a="unknow";"windows"===o||"macos"===o||"linux"===o?a="desktop":("android"===o||"ios"===o||t(/mobile/g))&&(a="mobile");var i="unknow",l="unknow";t(/applewebkit/g)?(i="webkit",t(/edge/g)?l="edge":t(/opr/g)?l="opera":t(/chrome/g)?l="chrome":t(/safari/g)&&(l="safari")):t(/gecko/g)&&t(/firefox/g)?(i="gecko",l="firefox"):t(/presto/g)?(i="presto",l="opera"):t(/trident|compatible|msie/g)&&(i="trident",l="iexplore");var s="unknow";"webkit"===i?s=r(/applewebkit\/[\d._]+/g):"gecko"===i?s=r(/gecko\/[\d._]+/g):"presto"===i?s=r(/presto\/[\d._]+/g):"trident"===i&&(s=r(/trident\/[\d._]+/g));var u="unknow";"chrome"===l?u=r(/chrome\/[\d._]+/g):"safari"===l?u=r(/version\/[\d._]+/g):"firefox"===l?u=r(/firefox\/[\d._]+/g):"opera"===l?u=r(/opr\/[\d._]+/g):"iexplore"===l?u=r(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===l&&(u=r(/edge\/[\d._]+/g));var g="none",p="unknow";t(/micromessenger/g)?(g="wechat",p=r(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(g="qq",p=r(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(g="uc",p=r(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?g="360":t(/2345explorer/g)?(g="2345",p=r(/2345explorer\/[\d._]+/g)):t(/metasr/g)?g="sougou":t(/lbbrowser/g)?g="liebao":t(/maxthon/g)&&(g="maxthon",p=r(/maxthon\/[\d._]+/g));var c=Object.assign({engine:i,engineVs:s,platform:a,supporter:l,supporterVs:u,system:o,systemVs:n},"none"===g?{}:{shell:g,shellVs:p});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(c.system,"/").concat(c.systemVs,"\n浏览器:").concat(c.supporter,"/").concat(c.supporterVs,"\n内核:").concat(c.engine,"/").concat(c.engineVs),"color: green;font-size: 14px;font-weight: bold;"),c}function g(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,r=e.target;void 0===t&&(t=99);var o=null,n=0;(o=r||document.querySelector(".ant-table-wrapper"))&&(n=o.getBoundingClientRect().top);var a=document.body.clientHeight-n-t;return a}function p(e,t){var r,o,n=window.URL||window.webkitURL||window,a=new Blob([t]),i=document.createElementNS("http://www.w3.org/1999/xhtml","a");i.href=n.createObjectURL(a),i.download=e,r=i,(o=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r.dispatchEvent(o)}function c(e,t,r){var o=n()(e),a=[];return function e(o){if(o)for(var n=0;n<(null==o?void 0:o.length);n++){if(t(o[n]))return r?void(o[n].children?o[n].children.unshift(r):o[n].children=[r]):void o.splice(n,1);o[n].children&&(a.push(o[n].key),e(o[n].children))}}(o),o}function d(e,t){var r;return function e(o){if(o)for(var n=0;n<(null==o?void 0:o.length);n++)t(o[n])?r=o[n]:o[n].children&&e(o[n].children)}(n()(e)),r}function h(e){return["     ",a.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function b(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var r=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(r){var o,n;r.startsWith("/ql/data/scripts")&&(r=r.replace("/ql/data/scripts/",""));var a=r.lastIndexOf("/");return a>=0?(n=r.slice(a+1),o=r.slice(0,a)):(n=r,o=""),[n,o]}}function P(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function w(e,t){var r=P(e);return null!=t&&t.length&&t.forEach((function(e){var t=P(e);t&&(!r||t<r)&&(r=t)})),r}function m(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return i[t]}},38433:function(){}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[1717],{38582:function(e,t,n){var a=(0,n(55258).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_ob5y15ewlyq.js"]});t.Z=a},80331:function(e,t,n){n.r(t),n.d(t,{default:function(){return N}});var a=n(57213),i=n.n(a),o=n(54306),s=n.n(o),r=n(88265),c=n(63313),u=n(4574),l=n(62284),d=n(71571),h=n(68834),p=n(38582),f=n(11527),m={route:{routes:[{name:r.ZP.get("登录"),path:"/login",hideInMenu:!0,component:"@/pages/login/index"},{name:r.ZP.get("初始化"),path:"/initialization",hideInMenu:!0,component:"@/pages/initialization/index"},{name:r.ZP.get("错误"),path:"/error",hideInMenu:!0,component:"@/pages/error/index"},{path:"/crontab",name:r.ZP.get("定时任务"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-crontab"}),component:"@/pages/crontab/index"},{path:"/subscription",name:r.ZP.get("订阅管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-subs"}),component:"@/pages/subscription/index"},{path:"/env",name:r.ZP.get("环境变量"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-env"}),component:"@/pages/env/index"},{path:"/config",name:r.ZP.get("配置文件"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-config"}),component:"@/pages/config/index"},{path:"/script",name:r.ZP.get("脚本管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-script"}),component:"@/pages/script/index"},{path:"/dependence",name:r.ZP.get("依赖管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-dependence"}),component:"@/pages/dependence/index"},{path:"/log",name:r.ZP.get("日志管理"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-log"}),component:"@/pages/log/index"},{path:"/diff",name:r.ZP.get("对比工具"),icon:(0,f.jsx)(p.Z,{type:"ql-icon-diff"}),component:"@/pages/diff/index"},{path:"/setting",name:r.ZP.get("系统设置"),icon:(0,f.jsx)(h.Z,{}),component:"@/pages/password/index"}]},navTheme:"light",fixSiderbar:!0,contentWidth:"Fixed",splitMenus:!1,siderWidth:180},g=n(14851),v=n(50988),x=n(3513),b=n(63386),k=n(85153),y=n(15207),Z=n(57229),w=n(86563),S=n.n(w),j=n(3094),P=n(12094),I=n(15367),E=n(13217),q=n(34133),C=n(83535),L=n(45638),T=n(79516),z=n(42078),A=n(25940),M=n(82755);var _=n(21758);function N(){var e=(0,g.useLocation)(),t=(0,j.e)(),n=(0,j.F)(),a=n.theme,o=n.reloadTheme,h=(0,c.useState)({}),p=s()(h,2),w=p[0],N=p[1],R=(0,c.useState)(!0),F=s()(R,2),O=F[0],W=F[1],B=(0,c.useState)(),H=s()(B,2),K=H[0],U=H[1],D=(0,c.useState)(!1),J=s()(D,2),Q=J[0],G=J[1],V=(0,c.useState)(!0),X=s()(V,2),Y=X[0],$=X[1],ee=d||{},te=ee.enable,ne=ee.disable,ae=(ee.exportGeneratedCSS,ee.setFetchMethod),ie=ee.auto,oe=function(){Z.W.get("".concat(y.Z.apiPrefix,"system")).then((function(e){var t,n=e.code,a=e.data;200===n&&(U(a),a.isInitialized?(t=a.version,z.S({dsn:"https://3406424fb1dc4813a62d39e844a9d0ac@o1098464.ingest.sentry.io/6122818",integrations:[new A.jK.BrowserTracing({shouldCreateSpanForRequest:function(e){return!e.includes("/api/ws")&&!e.includes("/api/static")}})],release:t,tracesSampleRate:.1,beforeBreadcrumb:function(e,t){if(e.data&&e.data.url){var n=e.data.url.replace(/token=.*/,"");e.data.url=n}return e}}),M._m.config({paths:{vs:"https://cdn.staticfile.org/monaco-editor/0.33.0/min/vs"},"vs/nls":{availableLanguages:{"*":"zh-cn"}}}),se()):g.history.push("/initialization"))})).catch((function(e){console.log(e)}))},se=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&W(!0),Z.W.get("".concat(y.Z.apiPrefix,"user")).then((function(n){var a=n.code,i=n.data;200===a&&i.username&&(N(i),"/"===e.pathname&&g.history.push("/crontab")),t&&W(!1)})).catch((function(e){console.log(e)}))},re=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];se(e)};if((0,c.useEffect)((function(){K&&K.isInitialized&&!w&&se()}),[e.pathname]),(0,c.useEffect)((function(){Z.W.get("".concat(y.Z.apiPrefix,"public/health")).then((function(e){var t;1===(null==e||null===(t=e.data)||void 0===t?void 0:t.status)?oe():g.history.push("/error")})).catch((function(e){g.history.push("/error")})).finally((function(){return $(!1)}))}),[]),(0,c.useEffect)((function(){"vs-dark"===a?document.body.setAttribute("data-dark","true"):document.body.setAttribute("data-dark","false")}),[a]),(0,c.useEffect)((function(){S()();var e=localStorage.getItem("qinglong_dark_theme")||"auto";if("undefined"!=typeof window&&void 0!==window.matchMedia)return d?(ae(fetch),"dark"===e?te({}):"light"===e?ne():ie({}),function(){ne()}):function(){return null}}),[]),(0,c.useEffect)((function(){if(w&&w.username){var e=_.Z.getInstance("".concat(window.location.origin).concat(y.Z.apiPrefix,"ws?token=").concat(localStorage.getItem(y.Z.authKey)));return function(){e.close()}}}),[w]),(0,c.useEffect)((function(){window.onload=function(){var e=performance.timing;console.log("白屏时间: ".concat(e.responseStart-e.navigationStart)),console.log("请求完毕至DOM加载: ".concat(e.domInteractive-e.responseEnd)),console.log("解释dom树耗时: ".concat(e.domComplete-e.domInteractive)),console.log("从开始至load总耗时: ".concat(e.loadEventEnd-e.navigationStart)),L.uT("白屏时间 ".concat(e.responseStart-e.navigationStart))}}),[]),Y)return(0,f.jsx)(u.Z,{});if(["/login","/initialization","/error"].includes(e.pathname)&&(null!=K&&K.isInitialized&&"/initialization"===e.pathname&&g.history.push("/crontab"),K||"/error"===e.pathname))return(0,f.jsx)(g.Outlet,{context:i()(i()({},t),{},{theme:a,user:w,reloadUser:re,reloadTheme:o})});var ce=navigator.userAgent.includes("Firefox"),ue=navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"),le=navigator.userAgent.includes("QQBrowser"),de={items:[{label:r.ZP.get("退出登录"),className:"side-menu-user-drop-menu",onClick:function(){Z.W.post("".concat(y.Z.apiPrefix,"user/logout")).then((function(){localStorage.removeItem(y.Z.authKey),g.history.push("/login")}))},key:"logout",icon:(0,f.jsx)(v.Z,{})}]};return O?(0,f.jsx)(u.Z,{}):(0,f.jsx)(l.ZP,i()(i()({selectedKeys:[e.pathname],loading:O,ErrorBoundary:T.SV,logo:(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(P.Z,{preview:!1,src:"https://qn.whyour.cn/logo.png"}),(0,f.jsxs)("div",{className:"title",children:[(0,f.jsx)("span",{className:"title",children:r.ZP.get("青龙")}),(0,f.jsx)("a",{href:null==K?void 0:K.changeLogLink,target:"_blank",rel:"noopener noreferrer",onClick:function(e){e.stopPropagation()},children:(0,f.jsx)(I.Z,{title:"develop"===(null==K?void 0:K.branch)?r.ZP.get("开发版"):r.ZP.get("正式版"),children:(0,f.jsx)(E.Z,{size:"small",dot:"develop"===(null==K?void 0:K.branch),children:(0,f.jsxs)("span",{style:{fontSize:ce?9:12,color:"#666",marginLeft:2,zoom:ue?.66:.8,letterSpacing:le?-2:0},children:["v",null==K?void 0:K.version]})})})})]})]}),title:!1,menuItemRender:function(t,n){return t.isUrl||!t.path||e.pathname===t.path?n:(0,f.jsx)(g.Link,{to:t.path,children:n})},pageTitleRender:function(t,n,a){var i=y.Z.documentTitleMap[e.pathname]||r.ZP.get("未找到");return"".concat(i," - ").concat(r.ZP.get("青龙"))},onCollapse:G,collapsed:Q,rightContentRender:function(){return t.isPhone&&(0,f.jsx)(q.Z,{menu:de,placement:"bottomRight",trigger:["click"],children:(0,f.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,f.jsx)(C.C,{shape:"square",size:"small",icon:(0,f.jsx)(x.Z,{}),src:w.avatar?"".concat(y.Z.apiPrefix,"static/").concat(w.avatar):""}),(0,f.jsx)("span",{style:{marginLeft:5},children:w.username})]})})},collapsedButtonRender:function(e){return(0,f.jsxs)("span",{className:"side-menu-container",onClick:function(e){e.preventDefault(),e.stopPropagation()},children:[!e&&!t.isPhone&&(0,f.jsx)(q.Z,{menu:de,placement:"topLeft",trigger:["hover"],children:(0,f.jsxs)("span",{className:"side-menu-user-wrapper",children:[(0,f.jsx)(C.C,{shape:"square",size:"small",icon:(0,f.jsx)(x.Z,{}),src:w.avatar?"".concat(y.Z.apiPrefix,"static/").concat(w.avatar):""}),(0,f.jsx)("span",{style:{marginLeft:5},children:w.username})]})}),(0,f.jsx)("span",{className:"side-menu-collapse-button",onClick:function(){return G(!e)},children:e?(0,f.jsx)(b.Z,{}):(0,f.jsx)(k.Z,{})})]})}},m),{},{children:(0,f.jsx)(g.Outlet,{context:i()(i()({},t),{},{theme:a,user:w,reloadUser:re,reloadTheme:o,systemInfo:K})})}))}},3094:function(e,t,n){n.d(t,{F:function(){return c},e:function(){return r}});var a=n(54306),i=n.n(a),o=n(63313),s=n(40141),r=function(){var e=(0,o.useState)("100%"),t=i()(e,2),n=t[0],a=t[1],r=(0,o.useState)(0),c=i()(r,2),u=c[0],l=c[1],d=(0,o.useState)(-48),h=i()(d,2),p=h[0],f=h[1],m=(0,o.useState)(!1),g=i()(m,2),v=g[0],x=g[1],b=(0,o.useMemo)((function(){return(0,s.ZP)()}),[]).platform;return(0,o.useEffect)((function(){"mobile"===b&&document.body.offsetWidth<768?(a("auto"),l(0),f(0),x(!0),document.body.setAttribute("data-mode","phone")):(a("100%"),l(0),f(-48),x(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:p,width:n,marginLeft:u},isPhone:v}},c=function(){var e=(0,o.useState)(),t=i()(e,2),n=t[0],a=t[1];return(0,o.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;a(n?"vs-dark":"vs");var i=function(e){"auto"!==t&&t||(e.matches?a("vs-dark"):a("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",i):"function"==typeof e.addListener&&e.addListener(i)}),[]),{theme:n,reloadTheme:function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;a(n?"vs-dark":"vs")}}}},21758:function(e,t,n){var a=n(93525),i=n.n(a),o=n(12342),s=n.n(o),r=n(25359),c=n.n(r),u=n(49811),l=n.n(u),d=n(21140),h=n.n(d),p=n(63466),f=n.n(p),m=n(52510),g=n.n(m),v=n(78078),x=n.n(v),b=["type"],k=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(this,e),g()(this,"url",void 0),g()(this,"socket",null),g()(this,"subscriptions",new Map),g()(this,"options",void 0),g()(this,"reconnectAttempts",0),g()(this,"heartbeatTimeout",null),g()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return f()(e,[{key:"init",value:(n=l()(c()().mark((function e(){var t=this;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(x())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=l()(c()().mark((function e(){var t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var a={action:"subscribe",topic:e};this.send(a)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var a={action:"unsubscribe",topic:e};this.send(a)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=s()(e,b),a=this.subscriptions.get(t)||new Set;i()(a).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===x().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();g()(k,"instance",null),t.Z=k}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5825],{37126:function(e,t,a){a.d(t,{Z:function(){return s}});var n=a(14797),r=a(63313),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},i=a(46420),l=function(e,t){return r.createElement(i.Z,(0,n.Z)((0,n.Z)({},e),{},{ref:t,icon:o}))};l.displayName="SearchOutlined";var s=r.forwardRef(l)},74301:function(e,t,a){a.r(t);var n=a(54306),r=a.n(n),o=a(88265),i=a(63313),l=a(9835),s=a(75310),c=a(24378),u=a(15207),p=a(23435),d=a(57229),g=a(82755),h=a(31988),P=a(14851),f=a(26747),m=a(11527);t.default=function(){var e=(0,P.useOutletContext)(),t=e.headerStyle,a=e.isPhone,n=e.theme,b=(0,i.useState)(""),Z=r()(b,2),E=Z[0],v=Z[1],y=(0,i.useState)(!0),k=r()(y,2),S=k[0],C=k[1],x=(0,i.useState)("config.sh"),w=r()(x,2),M=w[0],N=w[1],T=(0,i.useState)("config.sh"),_=r()(T,2),O=_[0],U=_[1],A=(0,i.useState)([]),I=r()(A,2),R=I[0],q=I[1],K=(0,i.useRef)(null),L=(0,i.useState)(!1),B=r()(L,2),D=B[0],H=B[1],F=function(e){d.W.get("".concat(u.Z.apiPrefix,"configs/").concat(e)).then((function(e){var t=e.code,a=e.data;200===t&&v(a)}))};return(0,i.useEffect)((function(){C(!0),d.W.get("".concat(u.Z.apiPrefix,"configs/files")).then((function(e){var t=e.code,a=e.data;200===t&&q(a)})).finally((function(){return C(!1)})),F("config.sh")}),[]),(0,m.jsx)(p.ZP,{className:"ql-container-wrapper config-wrapper",title:M,loading:S,extra:[(0,m.jsx)(s.Z,{treeExpandAction:"click",className:"config-select",value:O,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:R,defaultValue:"config.sh",onSelect:function(e,t){U(e),N(t.value),F(t.value)}},"value"),(0,m.jsx)(c.Z,{loading:D,type:"primary",onClick:function(){H(!0);var e=K.current?K.current.getValue().replace(/\r\n/g,"\n"):E;d.W.post("".concat(u.Z.apiPrefix,"configs/save"),{content:e,name:O}).then((function(e){var t=e.code;e.data;200===t&&l.ZP.success(o.ZP.get("保存成功")),H(!1)}))},children:o.ZP.get("保存")},"1")],header:{style:t},children:a?(0,m.jsx)(h.ZP,{value:E,theme:n.includes("dark")?"dark":"light",extensions:[f.RI.shell()],onChange:function(e){v(e)}}):(0,m.jsx)(g.ZP,{defaultLanguage:"shell",value:E,theme:n,options:{fontSize:12,lineNumbersMinChars:3,folding:!1,glyphMargin:!1},onMount:function(e){K.current=e}})})}},15207:function(e,t,a){var n=a(88265),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:n.ZP.get("青龙"),apiPrefix:"".concat(r,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:n.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:n.ZP.get("定时任务"),value:"crons"},{name:n.ZP.get("环境变量"),value:"envs"},{name:n.ZP.get("订阅管理"),value:"subscriptions"},{name:n.ZP.get("配置文件"),value:"configs"},{name:n.ZP.get("脚本管理"),value:"scripts"},{name:n.ZP.get("日志管理"),value:"logs"},{name:n.ZP.get("依赖管理"),value:"dependencies"},{name:n.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:n.ZP.get("定时任务"),envs:n.ZP.get("环境变量"),subscriptions:n.ZP.get("订阅管理"),configs:n.ZP.get("配置文件"),scripts:n.ZP.get("脚本管理"),logs:n.ZP.get("日志管理"),dependencies:n.ZP.get("依赖管理"),system:n.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:n.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:n.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:n.ZP.get("钉钉机器人")},{value:"weWorkBot",label:n.ZP.get("企业微信机器人")},{value:"weWorkApp",label:n.ZP.get("企业微信应用")},{value:"aibotk",label:n.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:n.ZP.get("群晖chat")},{value:"email",label:n.ZP.get("邮箱")},{value:"lark",label:n.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:n.ZP.get("自定义通知")},{value:"closed",label:n.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:n.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:n.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:n.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:n.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:n.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:n.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:n.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:n.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:n.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:n.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:n.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:n.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:n.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:n.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:n.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:n.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:n.ZP.get("BARK推送消息的跳转URL")}],telegramBot:[{label:"telegramBotToken",tip:n.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:n.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:n.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:n.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:n.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:n.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:n.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:n.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:n.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:n.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:n.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:n.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:n.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:n.ZP.get("请输入要发送的目标"),items:[{value:"room",label:n.ZP.get("群聊")},{value:"contact",label:n.ZP.get("好友")}]},{label:"aibotkName",tip:n.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:n.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:n.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:n.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:n.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:n.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:n.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:n.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:n.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],chronocat:[{label:"chronocatURL",tip:n.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:n.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:n.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:n.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:n.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:n.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:n.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:n.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":n.ZP.get("登录"),"/initialization":n.ZP.get("初始化"),"/crontab":n.ZP.get("定时任务"),"/env":n.ZP.get("环境变量"),"/subscription":n.ZP.get("订阅管理"),"/config":n.ZP.get("配置文件"),"/script":n.ZP.get("脚本管理"),"/diff":n.ZP.get("对比工具"),"/log":n.ZP.get("日志管理"),"/setting":n.ZP.get("系统设置"),"/error":n.ZP.get("错误日志"),"/dependence":n.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},57229:function(e,t,a){a.d(t,{W:function(){return P}});var n=a(25359),r=a.n(n),o=a(49811),i=a.n(o),l=a(88265),s=a(9835),c=a(15207),u=a(14851),p=a(73669);s.ZP.config({duration:2});var d=Date.now(),g=p.Z.create({timeout:6e4,params:{t:d}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];g.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),g.interceptors.response.use(function(){var e=i()(r()().mark((function e(t){var a,n,o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(n=t.data).code&&(o=n.message||n.data)&&s.ZP.error({content:o,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",n);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,a=e.response.status;[502,504].includes(a)?u.history.push("/error"):401===a?"/login"!==u.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var P=g},52105:function(e,t,a){var n=a(41171),r=a(63313),o=a(68098);t.Z=function(){var e=r.useState(!1),t=(0,n.Z)(e,2),a=t[0],i=t[1];return r.useEffect((function(){i((0,o.fk)())}),[]),a}},11847:function(e,t,a){a.d(t,{c4:function(){return o}});var n=a(22481),r=a(88028),o=["xxl","xl","lg","md","sm","xs"],i={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},l=new Map,s=-1,c={},u={matchHandlers:{},dispatch:function(e){return c=e,l.forEach((function(e){return e(c)})),l.size>=1},subscribe:function(e){return l.size||this.register(),s+=1,l.set(s,e),e(c),s},unsubscribe:function(e){l.delete(e),l.size||this.unregister()},unregister:function(){var e=this;Object.keys(i).forEach((function(t){var a=i[t],n=e.matchHandlers[a];null==n||n.mql.removeListener(null==n?void 0:n.listener)})),l.clear()},register:function(){var e=this;Object.keys(i).forEach((function(t){var a=i[t],o=function(a){var o=a.matches;e.dispatch((0,r.Z)((0,r.Z)({},c),(0,n.Z)({},t,o)))},l=window.matchMedia(a);l.addListener(o),e.matchHandlers[a]={mql:l,listener:o},o(l)}))}};t.ZP=u},1020:function(e,t,a){a.d(t,{F:function(){return l},Z:function(){return i}});var n=a(22481),r=a(84875),o=a.n(r);(0,a(20341).b)("warning","error","");function i(e,t,a){var r;return o()((r={},(0,n.Z)(r,"".concat(e,"-status-success"),"success"===t),(0,n.Z)(r,"".concat(e,"-status-warning"),"warning"===t),(0,n.Z)(r,"".concat(e,"-status-error"),"error"===t),(0,n.Z)(r,"".concat(e,"-status-validating"),"validating"===t),(0,n.Z)(r,"".concat(e,"-has-feedback"),a),r))}var l=function(e,t){return t||e}},68098:function(e,t,a){a.d(t,{fk:function(){return i},jD:function(){return o}});var n,r=a(46594),o=function(){return(0,r.Z)()&&window.document.documentElement},i=function(){if(!o())return!1;if(void 0!==n)return n;var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),n=1===e.scrollHeight,document.body.removeChild(e),n}},20277:function(e,t,a){var n=a(88028),r=a(32602),o=a(63313),i=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(a[n[r]]=e[n[r]])}return a},l={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},s=o.forwardRef((function(e,t){var a=e.style,s=e.noStyle,c=e.disabled,u=i(e,["style","noStyle","disabled"]),p={};return s||(p=(0,n.Z)({},l)),c&&(p.pointerEvents="none"),p=(0,n.Z)((0,n.Z)({},p),a),o.createElement("div",(0,n.Z)({role:"button",tabIndex:0,ref:t},u,{onKeyDown:function(e){e.keyCode===r.Z.ENTER&&e.preventDefault()},onKeyUp:function(t){var a=t.keyCode,n=e.onClick;a===r.Z.ENTER&&n&&n()},style:p}))}));t.Z=s},32602:function(e,t){var a={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=a.F1&&t<=a.F12)return!1;switch(t){case a.ALT:case a.CAPS_LOCK:case a.CONTEXT_MENU:case a.CTRL:case a.DOWN:case a.END:case a.ESC:case a.HOME:case a.INSERT:case a.LEFT:case a.MAC_FF_META:case a.META:case a.NUMLOCK:case a.NUM_CENTER:case a.PAGE_DOWN:case a.PAGE_UP:case a.PAUSE:case a.PRINT_SCREEN:case a.RIGHT:case a.SHIFT:case a.UP:case a.WIN_KEY:case a.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=a.ZERO&&e<=a.NINE)return!0;if(e>=a.NUM_ZERO&&e<=a.NUM_MULTIPLY)return!0;if(e>=a.A&&e<=a.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case a.SPACE:case a.QUESTION_MARK:case a.NUM_PLUS:case a.NUM_MINUS:case a.NUM_PERIOD:case a.NUM_DIVISION:case a.SEMICOLON:case a.DASH:case a.EQUALS:case a.COMMA:case a.PERIOD:case a.SLASH:case a.APOSTROPHE:case a.SINGLE_QUOTE:case a.OPEN_SQUARE_BRACKET:case a.BACKSLASH:case a.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.Z=a},35019:function(e,t,a){a.d(t,{Z:function(){return s}});var n=a(2595),r="".concat("accept acceptCharset accessKey action allowFullScreen allowTransparency\n alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge\n charSet checked classID className colSpan cols content contentEditable contextMenu\n controls coords crossOrigin data dateTime default defer dir disabled download draggable\n encType form formAction formEncType formMethod formNoValidate formTarget frameBorder\n headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity\n is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media\n mediaGroup method min minLength multiple muted name noValidate nonce open\n optimum pattern placeholder poster preload radioGroup readOnly rel required\n reversed role rowSpan rows sandbox scope scoped scrolling seamless selected\n shape size sizes span spellCheck src srcDoc srcLang srcSet start step style\n summary tabIndex target title type useMap value width wmode wrap"," ").concat("onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown\n onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick\n onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown\n onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel\n onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough\n onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata\n onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError").split(/[\s\n]+/),o="aria-",i="data-";function l(e,t){return 0===e.indexOf(t)}function s(e){var t,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t=!1===a?{aria:!0,data:!0,attr:!0}:!0===a?{aria:!0}:(0,n.Z)({},a);var s={};return Object.keys(e).forEach((function(a){(t.aria&&("role"===a||l(a,o))||t.data&&l(a,i)||t.attr&&r.includes(a))&&(s[a]=e[a])})),s}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9558,5812],{75909:function(e,n,t){var i=t(14797),r=t(87807),a=t(16803),o=t(63313),c=t(84875),l=t.n(c),s=t(12888),u=t(15152),d=["className","component","viewBox","spin","rotate","tabIndex","onClick","children"],f=o.forwardRef((function(e,n){var t=e.className,c=e.component,f=e.viewBox,m=e.spin,p=e.rotate,h=e.tabIndex,g=e.onClick,Z=e.children,v=(0,a.Z)(e,d);(0,u.Kp)(Boolean(c||Z),"Should have `component` prop or `children`."),(0,u.C3)();var x=o.useContext(s.Z),y=x.prefixCls,b=void 0===y?"anticon":y,j=x.rootClassName,P=l()(j,b,t),C=l()((0,r.Z)({},"".concat(b,"-spin"),!!m)),w=p?{msTransform:"rotate(".concat(p,"deg)"),transform:"rotate(".concat(p,"deg)")}:void 0,S=(0,i.Z)((0,i.Z)({},u.vD),{},{className:C,style:w,viewBox:f});f||delete S.viewBox;var N=h;return void 0===N&&g&&(N=-1),o.createElement("span",(0,i.Z)((0,i.Z)({role:"img"},v),{},{ref:n,tabIndex:N,onClick:g,className:P}),c?o.createElement(c,(0,i.Z)({},S),Z):Z?((0,u.Kp)(Boolean(f)||1===o.Children.count(Z)&&o.isValidElement(Z)&&"use"===o.Children.only(Z).type,"Make sure that you provide correct `viewBox` prop (default `0 0 1024 1024`) to the icon."),o.createElement("svg",(0,i.Z)((0,i.Z)({},S),{},{viewBox:f}),Z)):null)}));f.displayName="AntdIcon",n.Z=f},55258:function(e,n,t){t.d(n,{Z:function(){return d}});var i=t(14797),r=t(16803),a=t(63313),o=t(75909),c=["type","children"],l=new Set;function s(e){return Boolean("string"==typeof e&&e.length&&!l.has(e))}function u(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=e[n];if(s(t)){var i=document.createElement("script");i.setAttribute("src",t),i.setAttribute("data-namespace",t),e.length>n+1&&(i.onload=function(){u(e,n+1)},i.onerror=function(){u(e,n+1)}),l.add(t),document.body.appendChild(i)}}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.scriptUrl,t=e.extraCommonProps,l=void 0===t?{}:t;n&&"undefined"!=typeof document&&"undefined"!=typeof window&&"function"==typeof document.createElement&&(Array.isArray(n)?u(n.reverse()):u([n]));var s=a.forwardRef((function(e,n){var t=e.type,s=e.children,u=(0,r.Z)(e,c),d=null;return e.type&&(d=a.createElement("use",{xlinkHref:"#".concat(t)})),s&&(d=s),a.createElement(o.Z,(0,i.Z)((0,i.Z)((0,i.Z)({},l),u),{},{ref:n}),d)}));return s.displayName="Iconfont",s}},25265:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(14797),r=t(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},o=t(46420),c=function(e,n){return r.createElement(o.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:n,icon:a}))};c.displayName="FileOutlined";var l=r.forwardRef(c)},37126:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(14797),r=t(63313),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},o=t(46420),c=function(e,n){return r.createElement(o.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:n,icon:a}))};c.displayName="SearchOutlined";var l=r.forwardRef(c)},38582:function(e,n,t){var i=(0,t(55258).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_ob5y15ewlyq.js"]});n.Z=i},74385:function(e,n,t){t.r(n),t.d(n,{default:function(){return W}});var i=t(57213),r=t.n(i),a=t(54306),o=t.n(a),c=t(88265),l=t(63313),s=t(92260),u=t(64865),d=t(84163),f=t(9835),m=t(394),p=t(51704),h=t(15367),g=t(24378),Z=t(1953),v=t(25265),x=t(44968),y=t(69685),b=t(20209),j=t(65601),P=t(7688),C=t(76657),w=t(3563),S=t(91350),N=t(87423),k=t(57229),E=t(15207),O=t(33680),B=t(82755),M=t(38582),R=t(40141),_=t(29030),T=t(61761),q=t(52053),A=t.n(q),D=t(11527),F=s.Z.Text,H=[{key:"log",tab:c.ZP.get("日志")},{key:"script",tab:c.ZP.get("脚本")}],W=function(e){var n,t,i,a,q=e.cron,W=void 0===q?{}:q,z=e.handleCancel,I=e.visible,L=e.theme,Y=e.isPhone,V=(0,l.useState)("log"),K=o()(V,2),U=K[0],$=K[1],G=(0,l.useState)(!0),J=o()(G,2),Q=(J[0],J[1]),X=(0,l.useState)([]),ee=o()(X,2),ne=ee[0],te=ee[1],ie=(0,l.useState)(""),re=o()(ie,2),ae=re[0],oe=re[1],ce=(0,l.useState)(""),le=o()(ce,2),se=le[0],ue=le[1],de=(0,l.useState)(!1),fe=o()(de,2),me=fe[0],pe=fe[1],he=(0,l.useRef)(null),ge=(0,l.useState)({}),Ze=o()(ge,2),ve=Ze[0],xe=Ze[1],ye=(0,l.useState)(""),be=o()(ye,2),je=be[0],Pe=be[1],Ce=(0,l.useState)(H),we=o()(Ce,2),Se=we[0],Ne=we[1],ke=(0,l.useState)({}),Ee=o()(ke,2),Oe=Ee[0],Be=Ee[1],Me=(0,l.useRef)(null),Re=function(e){var n=(0,l.useState)(0),t=o()(n,2),i=t[0],r=t[1];return(0,T.Z)(e,(function(e){var n=e.target.clientHeight;i!==n&&r(n)})),i}(Me),_e={log:(0,D.jsx)("div",{ref:Me,children:(0,D.jsx)(u.ZP,{children:(0,D.jsx)(_.Z,{data:ne,height:Re,itemHeight:47,itemKey:"filename",children:function(e){return(0,D.jsxs)(u.ZP.Item,{className:"log-item",onClick:function(){return Te(e)},children:[(0,D.jsx)(v.Z,{style:{marginRight:10}}),e.directory,"/",e.filename]})}})})}),script:ve.filename&&(0,D.jsx)(B.ZP,{language:(0,R.H$)(ve.filename),theme:L,value:se,options:{fontSize:12,lineNumbersMinChars:3,fontFamily:"Source Code Pro",glyphMargin:!1,wordWrap:"on"},onMount:function(e,n){he.current=e}})},Te=function(e){var n="".concat(E.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"");localStorage.setItem("logCron",n),Pe(n),k.W.get("".concat(E.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"")).then((function(e){var n=e.code,t=e.data;200===n&&(oe(t),pe(!0))}))},qe=function(){Q(!0),k.W.get("".concat(E.Z.apiPrefix,"crons/").concat(W.id,"/logs")).then((function(e){var n=e.code,t=e.data;200===n&&te(t)})).finally((function(){return Q(!1)}))};return(0,l.useEffect)((function(){W&&W.id&&(Be(W),qe(),function(){var e=(0,R.FA)(W.command);if(Array.isArray(e)){Ne(Se);var n=o()(e,2),t=n[0],i=n[1];xe({parent:i,filename:t}),k.W.get("".concat(E.Z.apiPrefix,"scripts/").concat(t,"?path=").concat(i||"")).then((function(e){var n=e.code,t=e.data;200===n&&ue(t)}))}else e&&Ne([Se[0]])}())}),[W]),(0,D.jsxs)(d.Z,{title:(0,D.jsxs)("div",{className:"crontab-title-wrapper",children:[(0,D.jsxs)("div",{style:{minWidth:0},children:[(0,D.jsx)(s.Z.Text,{style:{width:"100%"},ellipsis:{tooltip:Oe.name},children:Oe.name}),(null===(n=Oe.labels)||void 0===n?void 0:n.length)>0&&""!==Oe.labels[0]&&(0,D.jsx)(m.Z,{type:"vertical"}),(null===(t=Oe.labels)||void 0===t?void 0:t.length)>0&&""!==Oe.labels[0]&&(null===(i=Oe.labels)||void 0===i?void 0:i.map((function(e,n){return(0,D.jsx)(p.Z,{color:"blue",style:{marginRight:5},children:e},e)})))]}),(0,D.jsxs)("div",{className:"operations",children:[(0,D.jsx)(h.Z,{title:Oe.status===S.CrontabStatus.idle?c.ZP.get("运行"):c.ZP.get("停止"),children:(0,D.jsx)(g.Z,{type:"link",icon:Oe.status===S.CrontabStatus.idle?(0,D.jsx)(x.Z,{}):(0,D.jsx)(y.Z,{}),size:"small",onClick:Oe.status===S.CrontabStatus.idle?function(){d.Z.confirm({title:c.ZP.get("确认运行"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认运行定时任务")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Oe.name})," ",c.ZP.get("吗")]}),onOk:function(){k.W.put("".concat(E.Z.apiPrefix,"crons/run"),[Oe.id]).then((function(e){var n=e.code;e.data;200===n&&(Be(r()(r()({},Oe),{},{status:S.CrontabStatus.running})),setTimeout((function(){qe()}),1e3))}))},onCancel:function(){console.log("Cancel")}})}:function(){d.Z.confirm({title:c.ZP.get("确认停止"),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认停止定时任务")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Oe.name})," ",c.ZP.get("吗")]}),onOk:function(){k.W.put("".concat(E.Z.apiPrefix,"crons/stop"),[Oe.id]).then((function(e){var n=e.code;e.data;200===n&&Be(r()(r()({},Oe),{},{status:S.CrontabStatus.idle}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,D.jsx)(h.Z,{title:1===Oe.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),children:(0,D.jsx)(g.Z,{type:"link",icon:(0,D.jsx)(M.Z,{type:1===Oe.isDisabled?"ql-icon-enable":"ql-icon-disable"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Oe.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用")),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认"),1===Oe.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),c.ZP.get("定时任务")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Oe.name})," ",c.ZP.get("吗")]}),onOk:function(){k.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===Oe.isDisabled?"enable":"disable"),[Oe.id]).then((function(e){var n=e.code;e.data;200===n&&Be(r()(r()({},Oe),{},{isDisabled:1===Oe.isDisabled?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,D.jsx)(h.Z,{title:1===Oe.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),children:(0,D.jsx)(g.Z,{type:"link",icon:(0,D.jsx)(M.Z,{type:1===Oe.isPinned?"ql-icon-untop":"ql-icon-top"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Oe.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶")),content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认"),1===Oe.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),c.ZP.get("定时任务")," ",(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Oe.name})," ",c.ZP.get("吗")]}),onOk:function(){k.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===Oe.isPinned?"unpin":"pin"),[Oe.id]).then((function(e){var n=e.code;e.data;200===n&&Be(r()(r()({},Oe),{},{isPinned:1===Oe.isPinned?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})})]})]}),centered:!0,open:I,forceRender:!0,footer:!1,onCancel:function(){return z()},wrapClassName:"crontab-detail",width:Y?"":"80vw",children:[(0,D.jsxs)("div",{className:"card-wrapper",children:[(0,D.jsx)(Z.Z,{children:(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("任务")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Oe.command})]})}),(0,D.jsxs)(Z.Z,{style:{marginTop:10},children:[(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("状态")}),(0,D.jsxs)("div",{className:"cron-detail-info-value",children:[(!Oe.isDisabled||Oe.status!==S.CrontabStatus.idle)&&(0,D.jsxs)(D.Fragment,{children:[Oe.status===S.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(b.Z,{}),color:"default",children:c.ZP.get("空闲中")}),Oe.status===S.CrontabStatus.running&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(j.Z,{spin:!0}),color:"processing",children:c.ZP.get("运行中")}),Oe.status===S.CrontabStatus.queued&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(P.Z,{}),color:"default",children:c.ZP.get("队列中")})]}),1===Oe.isDisabled&&Oe.status===S.CrontabStatus.idle&&(0,D.jsx)(p.Z,{icon:(0,D.jsx)(C.Z,{}),color:"error",children:c.ZP.get("已禁用")})]})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("定时")}),(0,D.jsxs)("div",{className:"cron-detail-info-value",children:[(0,D.jsx)("div",{children:Oe.schedule}),null===(a=Oe.extra_schedules)||void 0===a?void 0:a.map((function(e){return(0,D.jsx)("div",{children:e.schedule},e.schedule)}))]})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("最后运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Oe.last_execution_time?A()(1e3*Oe.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("最后运行时长")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Oe.last_running_time?(0,N.E)(Oe.last_running_time):"-"})]}),(0,D.jsxs)("div",{className:"cron-detail-info-item",children:[(0,D.jsx)("div",{className:"cron-detail-info-title",children:c.ZP.get("下次运行时间")}),(0,D.jsx)("div",{className:"cron-detail-info-value",children:Oe.nextRunTime&&A()(Oe.nextRunTime).format("YYYY-MM-DD HH:mm:ss")})]})]}),(0,D.jsx)(Z.Z,{style:{marginTop:10},tabList:Se,activeTabKey:U,onTabChange:function(e){!function(e){$(e)}(e)},tabBarExtraContent:"script"===U&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(g.Z,{type:"primary",style:{marginRight:8},onClick:function(){d.Z.confirm({title:"确认保存",content:(0,D.jsxs)(D.Fragment,{children:[c.ZP.get("确认保存文件"),(0,D.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:ve.filename})," ",c.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=he.current?he.current.getValue().replace(/\r\n/g,"\n"):se;return new Promise((function(n,t){k.W.put("".concat(E.Z.apiPrefix,"scripts"),{filename:ve.filename,path:ve.parent||"",content:e}).then((function(t){var i=t.code;t.data;200===i&&(ue(e),f.ZP.success("保存成功")),n(null)})).catch((function(e){return t(e)}))}))},onCancel:function(){console.log("Cancel")}})},children:c.ZP.get("保存")}),(0,D.jsx)(g.Z,{type:"primary",icon:(0,D.jsx)(w.Z,{}),onClick:function(){var e;null===(e=he.current._domElement.parentElement)||void 0===e||e.requestFullscreen()}})]}),children:_e[U]})]}),(0,D.jsx)(O.default,{visible:me,handleCancel:function(){pe(!1)},cron:W,data:ae,logUrl:je})]})}},33680:function(e,n,t){t.r(n);var i=t(54306),r=t.n(i),a=t(88265),o=t(63313),c=t(89065),l=t(92260),s=t(84163),u=t(24378),d=t(57229),f=t(15207),m=t(65601),p=t(38101),h=t(4574),g=t(40141),Z=t(99120),v=t.n(Z),x=t(11527);c.Z.Countdown;n.default=function(e){var n=e.cron,t=e.handleCancel,i=e.visible,c=e.data,Z=e.logUrl,y=(0,o.useState)(a.ZP.get("启动中...")),b=r()(y,2),j=b[0],P=b[1],C=(0,o.useState)(!0),w=r()(C,2),S=w[0],N=w[1],k=(0,o.useState)(!0),E=r()(k,2),O=E[0],B=E[1],M=(0,o.useState)(!1),R=r()(M,2),_=R[0],T=R[1],q=(0,o.useRef)({value:0,down:!0}),A=Z||String(null==n?void 0:n.id),D=function e(t){t&&N(!0),d.W.get(Z||"".concat(f.Z.apiPrefix,"crons/").concat(n.id,"/log")).then((function(n){var t=n.code,i=n.data;if(200===t&&localStorage.getItem("logCron")===A&&i!==j){var r=i;P(r||a.ZP.get("暂无日志"));var o=Boolean(r&&!(0,g.x$)(r)&&!r.includes("任务未运行"));o||(0,g.x$)(j)||j===a.ZP.get("启动中...")||setTimeout((function(){F()})),B(o),o&&setTimeout((function(){F(),e()}),2e3)}})).finally((function(){t&&N(!1)}))},F=function(){q.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},H=function(){localStorage.removeItem("logCron"),t()};return(0,o.useEffect)((function(){n&&n.id&&i&&(D(!0),q.current.down=!0)}),[n,i]),(0,o.useEffect)((function(){c&&P(c)}),[c]),(0,o.useEffect)((function(){T(document.body.clientWidth<768)}),[]),(0,x.jsx)(s.Z,{title:(0,x.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(O||S)&&(0,x.jsx)(m.Z,{spin:!0}),!O&&!S&&(0,x.jsx)(p.Z,{}),(0,x.jsx)(l.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:n&&n.name})]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return H()},onCancel:function(){return H()},footer:[(0,x.jsx)(u.Z,{type:"primary",onClick:function(){return H()},children:a.ZP.get("知道了")})],children:(0,x.jsxs)("div",{onScroll:function(e){var n=e.target.scrollTop;q.current.down&&(q.current={value:n,down:n-q.current.value>-5||!n})},className:"log-container",children:[S?(0,x.jsx)(h.Z,{}):(0,x.jsx)("pre",{style:_?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,x.jsx)(v(),{children:j})}),(0,x.jsx)("div",{id:"log-flag"})]})})}},91350:function(e,n,t){t.r(n),t.d(n,{CrontabStatus:function(){return i},OperationName:function(){return r},OperationPath:function(){return a}});var i=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),r=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),a=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({})},87423:function(e,n,t){function i(e){var n=1e3*e,t=Math.floor(n/864e5),i=n%864e5,r=Math.floor(i/36e5),a=i%36e5,o=Math.floor(a/6e4),c=a%6e4,l=Math.round(c/1e3)+"秒";return o>0&&(l=o+"分"+l),r>0&&(l=r+"小时"+l),t>0&&(l=t+"天"+l),l}t.d(n,{E:function(){return i}})},52105:function(e,n,t){var i=t(41171),r=t(63313),a=t(68098);n.Z=function(){var e=r.useState(!1),n=(0,i.Z)(e,2),t=n[0],o=n[1];return r.useEffect((function(){o((0,a.fk)())}),[]),t}},11847:function(e,n,t){t.d(n,{c4:function(){return a}});var i=t(22481),r=t(88028),a=["xxl","xl","lg","md","sm","xs"],o={xs:"(max-width: 575px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)",xxl:"(min-width: 1600px)"},c=new Map,l=-1,s={},u={matchHandlers:{},dispatch:function(e){return s=e,c.forEach((function(e){return e(s)})),c.size>=1},subscribe:function(e){return c.size||this.register(),l+=1,c.set(l,e),e(s),l},unsubscribe:function(e){c.delete(e),c.size||this.unregister()},unregister:function(){var e=this;Object.keys(o).forEach((function(n){var t=o[n],i=e.matchHandlers[t];null==i||i.mql.removeListener(null==i?void 0:i.listener)})),c.clear()},register:function(){var e=this;Object.keys(o).forEach((function(n){var t=o[n],a=function(t){var a=t.matches;e.dispatch((0,r.Z)((0,r.Z)({},s),(0,i.Z)({},n,a)))},c=window.matchMedia(t);c.addListener(a),e.matchHandlers[t]={mql:c,listener:a},a(c)}))}};n.ZP=u},66216:function(e,n,t){var i=t(63313),r=(0,i.createContext)({});n.Z=r},40630:function(e,n,t){var i=t(22481),r=t(88028),a=t(69947),o=t(84875),c=t.n(o),l=t(63313),s=t(82259),u=t(66216),d=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};var f=["xs","sm","md","lg","xl","xxl"],m=l.forwardRef((function(e,n){var t,o=l.useContext(s.E_),m=o.getPrefixCls,p=o.direction,h=l.useContext(u.Z),g=h.gutter,Z=h.wrap,v=h.supportFlexGap,x=e.prefixCls,y=e.span,b=e.order,j=e.offset,P=e.push,C=e.pull,w=e.className,S=e.children,N=e.flex,k=e.style,E=d(e,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),O=m("col",x),B={};f.forEach((function(n){var t,o={},c=e[n];"number"==typeof c?o.span=c:"object"===(0,a.Z)(c)&&(o=c||{}),delete E[n],B=(0,r.Z)((0,r.Z)({},B),(t={},(0,i.Z)(t,"".concat(O,"-").concat(n,"-").concat(o.span),void 0!==o.span),(0,i.Z)(t,"".concat(O,"-").concat(n,"-order-").concat(o.order),o.order||0===o.order),(0,i.Z)(t,"".concat(O,"-").concat(n,"-offset-").concat(o.offset),o.offset||0===o.offset),(0,i.Z)(t,"".concat(O,"-").concat(n,"-push-").concat(o.push),o.push||0===o.push),(0,i.Z)(t,"".concat(O,"-").concat(n,"-pull-").concat(o.pull),o.pull||0===o.pull),(0,i.Z)(t,"".concat(O,"-rtl"),"rtl"===p),t))}));var M=c()(O,(t={},(0,i.Z)(t,"".concat(O,"-").concat(y),void 0!==y),(0,i.Z)(t,"".concat(O,"-order-").concat(b),b),(0,i.Z)(t,"".concat(O,"-offset-").concat(j),j),(0,i.Z)(t,"".concat(O,"-push-").concat(P),P),(0,i.Z)(t,"".concat(O,"-pull-").concat(C),C),t),w,B),R={};if(g&&g[0]>0){var _=g[0]/2;R.paddingLeft=_,R.paddingRight=_}if(g&&g[1]>0&&!v){var T=g[1]/2;R.paddingTop=T,R.paddingBottom=T}return N&&(R.flex=function(e){return"number"==typeof e?"".concat(e," ").concat(e," auto"):/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?"0 0 ".concat(e):e}(N),!1!==Z||R.minWidth||(R.minWidth=0)),l.createElement("div",(0,r.Z)({},E,{style:(0,r.Z)((0,r.Z)({},R),k),className:M,ref:n}),S)}));n.Z=m},19698:function(e,n,t){var i=t(88028),r=t(22481),a=t(69947),o=t(41171),c=t(84875),l=t.n(c),s=t(63313),u=t(82259),d=t(52105),f=t(11847),m=t(20341),p=t(66216),h=function(e,n){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&n.indexOf(i)<0&&(t[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)n.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(t[i[r]]=e[i[r]])}return t};(0,m.b)("top","middle","bottom","stretch"),(0,m.b)("start","end","center","space-around","space-between","space-evenly");function g(e,n){var t=s.useState("string"==typeof e?e:""),i=(0,o.Z)(t,2),r=i[0],c=i[1];return s.useEffect((function(){!function(){if("string"==typeof e&&c(e),"object"===(0,a.Z)(e))for(var t=0;t<f.c4.length;t++){var i=f.c4[t];if(n[i]){var r=e[i];if(void 0!==r)return void c(r)}}}()}),[JSON.stringify(e),n]),r}var Z=s.forwardRef((function(e,n){var t,c=e.prefixCls,m=e.justify,Z=e.align,v=e.className,x=e.style,y=e.children,b=e.gutter,j=void 0===b?0:b,P=e.wrap,C=h(e,["prefixCls","justify","align","className","style","children","gutter","wrap"]),w=s.useContext(u.E_),S=w.getPrefixCls,N=w.direction,k=s.useState({xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0}),E=(0,o.Z)(k,2),O=E[0],B=E[1],M=s.useState({xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xxl:!1}),R=(0,o.Z)(M,2),_=R[0],T=R[1],q=g(Z,_),A=g(m,_),D=(0,d.Z)(),F=s.useRef(j);s.useEffect((function(){var e=f.ZP.subscribe((function(e){T(e);var n=F.current||0;(!Array.isArray(n)&&"object"===(0,a.Z)(n)||Array.isArray(n)&&("object"===(0,a.Z)(n[0])||"object"===(0,a.Z)(n[1])))&&B(e)}));return function(){return f.ZP.unsubscribe(e)}}),[]);var H,W=S("row",c),z=(H=[void 0,void 0],(Array.isArray(j)?j:[j,void 0]).forEach((function(e,n){if("object"===(0,a.Z)(e))for(var t=0;t<f.c4.length;t++){var i=f.c4[t];if(O[i]&&void 0!==e[i]){H[n]=e[i];break}}else H[n]=e})),H),I=l()(W,(t={},(0,r.Z)(t,"".concat(W,"-no-wrap"),!1===P),(0,r.Z)(t,"".concat(W,"-").concat(A),A),(0,r.Z)(t,"".concat(W,"-").concat(q),q),(0,r.Z)(t,"".concat(W,"-rtl"),"rtl"===N),t),v),L={},Y=null!=z[0]&&z[0]>0?z[0]/-2:void 0,V=null!=z[1]&&z[1]>0?z[1]/-2:void 0;if(Y&&(L.marginLeft=Y,L.marginRight=Y),D){var K=(0,o.Z)(z,2);L.rowGap=K[1]}else V&&(L.marginTop=V,L.marginBottom=V);var U=(0,o.Z)(z,2),$=U[0],G=U[1],J=s.useMemo((function(){return{gutter:[$,G],wrap:P,supportFlexGap:D}}),[$,G,P,D]);return s.createElement(p.Z.Provider,{value:J},s.createElement("div",(0,i.Z)({},C,{className:I,style:(0,i.Z)((0,i.Z)({},L),x),ref:n}),y))}));n.Z=Z}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[4473,5812,833,419],{38582:function(e,t,n){"use strict";var i=(0,n(55258).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_ob5y15ewlyq.js"]});t.Z=i},9839:function(e,t,n){"use strict";var i=n(54306),r=n.n(i),a=n(63313),o=n(61761),l=n(40141);t.Z=function(e,t){var n=(0,a.useState)(0),i=r()(n,2),s=i[0],c=i[1];return(0,o.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),c((0,l.W9)({extraHeight:t,target:n}))})),s}},74385:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return L}});var i=n(57213),r=n.n(i),a=n(54306),o=n.n(a),l=n(88265),s=n(63313),c=n(92260),u=n(64865),d=n(84163),g=n(9835),f=n(394),p=n(51704),m=n(15367),h=n(24378),Z=n(1953),x=n(25265),v=n(44968),P=n(69685),b=n(20209),y=n(65601),j=n(7688),w=n(76657),k=n(3563),C=n(91350),S=n(87423),_=n(57229),q=n(15207),R=n(33680),B=n(82755),I=n(38582),N=n(40141),D=n(29030),W=n(61761),E=n(52053),O=n.n(E),T=n(11527),F=c.Z.Text,z=[{key:"log",tab:l.ZP.get("日志")},{key:"script",tab:l.ZP.get("脚本")}],L=function(e){var t,n,i,a,E=e.cron,L=void 0===E?{}:E,M=e.handleCancel,H=e.visible,V=e.theme,A=e.isPhone,K=(0,s.useState)("log"),Y=o()(K,2),U=Y[0],Q=Y[1],X=(0,s.useState)(!0),G=o()(X,2),$=(G[0],G[1]),J=(0,s.useState)([]),ee=o()(J,2),te=ee[0],ne=ee[1],ie=(0,s.useState)(""),re=o()(ie,2),ae=re[0],oe=re[1],le=(0,s.useState)(""),se=o()(le,2),ce=se[0],ue=se[1],de=(0,s.useState)(!1),ge=o()(de,2),fe=ge[0],pe=ge[1],me=(0,s.useRef)(null),he=(0,s.useState)({}),Ze=o()(he,2),xe=Ze[0],ve=Ze[1],Pe=(0,s.useState)(""),be=o()(Pe,2),ye=be[0],je=be[1],we=(0,s.useState)(z),ke=o()(we,2),Ce=ke[0],Se=ke[1],_e=(0,s.useState)({}),qe=o()(_e,2),Re=qe[0],Be=qe[1],Ie=(0,s.useRef)(null),Ne=function(e){var t=(0,s.useState)(0),n=o()(t,2),i=n[0],r=n[1];return(0,W.Z)(e,(function(e){var t=e.target.clientHeight;i!==t&&r(t)})),i}(Ie),De={log:(0,T.jsx)("div",{ref:Ie,children:(0,T.jsx)(u.ZP,{children:(0,T.jsx)(D.Z,{data:te,height:Ne,itemHeight:47,itemKey:"filename",children:function(e){return(0,T.jsxs)(u.ZP.Item,{className:"log-item",onClick:function(){return We(e)},children:[(0,T.jsx)(x.Z,{style:{marginRight:10}}),e.directory,"/",e.filename]})}})})}),script:xe.filename&&(0,T.jsx)(B.ZP,{language:(0,N.H$)(xe.filename),theme:V,value:ce,options:{fontSize:12,lineNumbersMinChars:3,fontFamily:"Source Code Pro",glyphMargin:!1,wordWrap:"on"},onMount:function(e,t){me.current=e}})},We=function(e){var t="".concat(q.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"");localStorage.setItem("logCron",t),je(t),_.W.get("".concat(q.Z.apiPrefix,"logs/").concat(e.filename,"?path=").concat(e.directory||"")).then((function(e){var t=e.code,n=e.data;200===t&&(oe(n),pe(!0))}))},Ee=function(){$(!0),_.W.get("".concat(q.Z.apiPrefix,"crons/").concat(L.id,"/logs")).then((function(e){var t=e.code,n=e.data;200===t&&ne(n)})).finally((function(){return $(!1)}))};return(0,s.useEffect)((function(){L&&L.id&&(Be(L),Ee(),function(){var e=(0,N.FA)(L.command);if(Array.isArray(e)){Se(Ce);var t=o()(e,2),n=t[0],i=t[1];ve({parent:i,filename:n}),_.W.get("".concat(q.Z.apiPrefix,"scripts/").concat(n,"?path=").concat(i||"")).then((function(e){var t=e.code,n=e.data;200===t&&ue(n)}))}else e&&Se([Ce[0]])}())}),[L]),(0,T.jsxs)(d.Z,{title:(0,T.jsxs)("div",{className:"crontab-title-wrapper",children:[(0,T.jsxs)("div",{style:{minWidth:0},children:[(0,T.jsx)(c.Z.Text,{style:{width:"100%"},ellipsis:{tooltip:Re.name},children:Re.name}),(null===(t=Re.labels)||void 0===t?void 0:t.length)>0&&""!==Re.labels[0]&&(0,T.jsx)(f.Z,{type:"vertical"}),(null===(n=Re.labels)||void 0===n?void 0:n.length)>0&&""!==Re.labels[0]&&(null===(i=Re.labels)||void 0===i?void 0:i.map((function(e,t){return(0,T.jsx)(p.Z,{color:"blue",style:{marginRight:5},children:e},e)})))]}),(0,T.jsxs)("div",{className:"operations",children:[(0,T.jsx)(m.Z,{title:Re.status===C.CrontabStatus.idle?l.ZP.get("运行"):l.ZP.get("停止"),children:(0,T.jsx)(h.Z,{type:"link",icon:Re.status===C.CrontabStatus.idle?(0,T.jsx)(v.Z,{}):(0,T.jsx)(P.Z,{}),size:"small",onClick:Re.status===C.CrontabStatus.idle?function(){d.Z.confirm({title:l.ZP.get("确认运行"),content:(0,T.jsxs)(T.Fragment,{children:[l.ZP.get("确认运行定时任务")," ",(0,T.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Re.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/run"),[Re.id]).then((function(e){var t=e.code;e.data;200===t&&(Be(r()(r()({},Re),{},{status:C.CrontabStatus.running})),setTimeout((function(){Ee()}),1e3))}))},onCancel:function(){console.log("Cancel")}})}:function(){d.Z.confirm({title:l.ZP.get("确认停止"),content:(0,T.jsxs)(T.Fragment,{children:[l.ZP.get("确认停止定时任务")," ",(0,T.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Re.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/stop"),[Re.id]).then((function(e){var t=e.code;e.data;200===t&&Be(r()(r()({},Re),{},{status:C.CrontabStatus.idle}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,T.jsx)(m.Z,{title:1===Re.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),children:(0,T.jsx)(h.Z,{type:"link",icon:(0,T.jsx)(I.Z,{type:1===Re.isDisabled?"ql-icon-enable":"ql-icon-disable"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Re.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用")),content:(0,T.jsxs)(T.Fragment,{children:[l.ZP.get("确认"),1===Re.isDisabled?l.ZP.get("启用"):l.ZP.get("禁用"),l.ZP.get("定时任务")," ",(0,T.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Re.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===Re.isDisabled?"enable":"disable"),[Re.id]).then((function(e){var t=e.code;e.data;200===t&&Be(r()(r()({},Re),{},{isDisabled:1===Re.isDisabled?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})}),(0,T.jsx)(m.Z,{title:1===Re.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),children:(0,T.jsx)(h.Z,{type:"link",icon:(0,T.jsx)(I.Z,{type:1===Re.isPinned?"ql-icon-untop":"ql-icon-top"}),size:"small",onClick:function(){d.Z.confirm({title:"确认".concat(1===Re.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶")),content:(0,T.jsxs)(T.Fragment,{children:[l.ZP.get("确认"),1===Re.isPinned?l.ZP.get("取消置顶"):l.ZP.get("置顶"),l.ZP.get("定时任务")," ",(0,T.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:Re.name})," ",l.ZP.get("吗")]}),onOk:function(){_.W.put("".concat(q.Z.apiPrefix,"crons/").concat(1===Re.isPinned?"unpin":"pin"),[Re.id]).then((function(e){var t=e.code;e.data;200===t&&Be(r()(r()({},Re),{},{isPinned:1===Re.isPinned?0:1}))}))},onCancel:function(){console.log("Cancel")}})}})})]})]}),centered:!0,open:H,forceRender:!0,footer:!1,onCancel:function(){return M()},wrapClassName:"crontab-detail",width:A?"":"80vw",children:[(0,T.jsxs)("div",{className:"card-wrapper",children:[(0,T.jsx)(Z.Z,{children:(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("任务")}),(0,T.jsx)("div",{className:"cron-detail-info-value",children:Re.command})]})}),(0,T.jsxs)(Z.Z,{style:{marginTop:10},children:[(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("状态")}),(0,T.jsxs)("div",{className:"cron-detail-info-value",children:[(!Re.isDisabled||Re.status!==C.CrontabStatus.idle)&&(0,T.jsxs)(T.Fragment,{children:[Re.status===C.CrontabStatus.idle&&(0,T.jsx)(p.Z,{icon:(0,T.jsx)(b.Z,{}),color:"default",children:l.ZP.get("空闲中")}),Re.status===C.CrontabStatus.running&&(0,T.jsx)(p.Z,{icon:(0,T.jsx)(y.Z,{spin:!0}),color:"processing",children:l.ZP.get("运行中")}),Re.status===C.CrontabStatus.queued&&(0,T.jsx)(p.Z,{icon:(0,T.jsx)(j.Z,{}),color:"default",children:l.ZP.get("队列中")})]}),1===Re.isDisabled&&Re.status===C.CrontabStatus.idle&&(0,T.jsx)(p.Z,{icon:(0,T.jsx)(w.Z,{}),color:"error",children:l.ZP.get("已禁用")})]})]}),(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("定时")}),(0,T.jsxs)("div",{className:"cron-detail-info-value",children:[(0,T.jsx)("div",{children:Re.schedule}),null===(a=Re.extra_schedules)||void 0===a?void 0:a.map((function(e){return(0,T.jsx)("div",{children:e.schedule},e.schedule)}))]})]}),(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时间")}),(0,T.jsx)("div",{className:"cron-detail-info-value",children:Re.last_execution_time?O()(1e3*Re.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})]}),(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("最后运行时长")}),(0,T.jsx)("div",{className:"cron-detail-info-value",children:Re.last_running_time?(0,S.E)(Re.last_running_time):"-"})]}),(0,T.jsxs)("div",{className:"cron-detail-info-item",children:[(0,T.jsx)("div",{className:"cron-detail-info-title",children:l.ZP.get("下次运行时间")}),(0,T.jsx)("div",{className:"cron-detail-info-value",children:Re.nextRunTime&&O()(Re.nextRunTime).format("YYYY-MM-DD HH:mm:ss")})]})]}),(0,T.jsx)(Z.Z,{style:{marginTop:10},tabList:Ce,activeTabKey:U,onTabChange:function(e){!function(e){Q(e)}(e)},tabBarExtraContent:"script"===U&&(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){d.Z.confirm({title:"确认保存",content:(0,T.jsxs)(T.Fragment,{children:[l.ZP.get("确认保存文件"),(0,T.jsx)(F,{style:{wordBreak:"break-all"},type:"warning",children:xe.filename})," ",l.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=me.current?me.current.getValue().replace(/\r\n/g,"\n"):ce;return new Promise((function(t,n){_.W.put("".concat(q.Z.apiPrefix,"scripts"),{filename:xe.filename,path:xe.parent||"",content:e}).then((function(n){var i=n.code;n.data;200===i&&(ue(e),g.ZP.success("保存成功")),t(null)})).catch((function(e){return n(e)}))}))},onCancel:function(){console.log("Cancel")}})},children:l.ZP.get("保存")}),(0,T.jsx)(h.Z,{type:"primary",icon:(0,T.jsx)(k.Z,{}),onClick:function(){var e;null===(e=me.current._domElement.parentElement)||void 0===e||e.requestFullscreen()}})]}),children:De[U]})]}),(0,T.jsx)(R.default,{visible:fe,handleCancel:function(){pe(!1)},cron:L,data:ae,logUrl:ye})]})}},62520:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return oe}});var i=n(93525),r=n.n(i),a=n(54306),o=n.n(a),l=n(57213),s=n.n(l),c=n(88265),u=n(63313),d=n(92260),g=n(22159),f=n(51704),p=n(2947),m=n(84163),h=n(9835),Z=n(34133),x=n(24378),v=n(86986),P=n(94674),b=n(20209),y=n(65601),j=n(7688),w=n(76657),k=n(32132),C=n(38101),S=n(23421),_=n(13740),q=n(43114),R=n(23831),B=n(59673),I=n(61327),N=n(26839),D=n(68834),W=n(99604),E=n(15207),O=n(23435),T=n(57229),F=n(70684),z=n(33680),L=n(74385),M=n(87423),H=n(14851),V=n(10419),A=n(3038),K=n(9839),Y=n(40141),U=n(33503),Q=n(91350),X=n(19631),G=n(27705),$=n(11527);function J(e){var t,n=e.service,i=e.options,r=(0,X.Z)(n,i),a=r.loading,o=r.data;return(0,$.jsx)(G.Z,{spinning:a,children:(0,$.jsx)(d.Z.Text,{ellipsis:!0,children:null==o||null===(t=o.data)||void 0===t?void 0:t.name})})}var ee=n(52053),te=n.n(ee),ne=d.Z.Text,ie=d.Z.Paragraph,re=d.Z.Link,ae=g.Z.Search,oe=function(){var e=(0,H.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=e.theme,a=[{title:c.ZP.get("名称"),dataIndex:"name",key:"name",fixed:"left",width:120,render:function(e,t){return(0,$.jsx)(ie,{style:{wordBreak:"break-all",marginBottom:0,color:"#1890ff"},ellipsis:{tooltip:e,rows:2},children:(0,$.jsx)(re,{onClick:function(){Ge(t),Ye(!0)},children:t.name||"-"})})},sorter:{compare:function(e,t){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.localeCompare(null==t?void 0:t.name)}}},{title:c.ZP.get("命令/脚本"),dataIndex:"command",key:"command",width:240,render:function(e,t){return(0,$.jsx)(ie,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:e,rows:2},children:(0,$.jsx)("a",{onClick:function(){It(t)},children:e})})},sorter:{compare:function(e,t){return e.command.localeCompare(t.command)}}},{title:c.ZP.get("状态"),key:"status",dataIndex:"status",width:100,filters:[{text:c.ZP.get("运行中"),value:Q.CrontabStatus.running},{text:c.ZP.get("空闲中"),value:Q.CrontabStatus.idle},{text:c.ZP.get("已禁用"),value:Q.CrontabStatus.disabled},{text:c.ZP.get("队列中"),value:Q.CrontabStatus.queued}],render:function(e,t){return(0,$.jsxs)($.Fragment,{children:[(!t.isDisabled||t.status!==Q.CrontabStatus.idle)&&(0,$.jsxs)($.Fragment,{children:[t.status===Q.CrontabStatus.idle&&(0,$.jsx)(f.Z,{icon:(0,$.jsx)(b.Z,{}),color:"default",children:c.ZP.get("空闲中")}),t.status===Q.CrontabStatus.running&&(0,$.jsx)(f.Z,{icon:(0,$.jsx)(y.Z,{spin:!0}),color:"processing",children:c.ZP.get("运行中")}),t.status===Q.CrontabStatus.queued&&(0,$.jsx)(f.Z,{icon:(0,$.jsx)(j.Z,{}),color:"default",children:c.ZP.get("队列中")})]}),1===t.isDisabled&&t.status===Q.CrontabStatus.idle&&(0,$.jsx)(f.Z,{icon:(0,$.jsx)(w.Z,{}),color:"error",children:c.ZP.get("已禁用")})]})}},{title:c.ZP.get("定时规则"),dataIndex:"schedule",key:"schedule",width:150,sorter:{compare:function(e,t){return e.schedule.localeCompare(t.schedule)}},render:function(e,t){var n;return(0,$.jsx)(ie,{style:{wordBreak:"break-all",marginBottom:0},ellipsis:{tooltip:{placement:"right",title:(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{children:e}),null===(n=t.extra_schedules)||void 0===n?void 0:n.map((function(e){return(0,$.jsx)("div",{children:e.schedule},e.schedule)}))]})},rows:2},children:e})}},{title:c.ZP.get("最后运行时长"),width:167,dataIndex:"last_running_time",key:"last_running_time",sorter:{compare:function(e,t){return e.last_running_time-t.last_running_time}},render:function(e,t){return t.last_running_time?(0,M.E)(t.last_running_time):"-"}},{title:c.ZP.get("最后运行时间"),dataIndex:"last_execution_time",key:"last_execution_time",width:141,sorter:{compare:function(e,t){return(e.last_execution_time||0)-(t.last_execution_time||0)}},render:function(e,t){return(0,$.jsx)("span",{style:{display:"block"},children:t.last_execution_time?te()(1e3*t.last_execution_time).format("YYYY-MM-DD HH:mm:ss"):"-"})}},{title:c.ZP.get("下次运行时间"),width:144,sorter:{compare:function(e,t){return e.nextRunTime-t.nextRunTime}},render:function(e,t){return te()(t.nextRunTime).format("YYYY-MM-DD HH:mm:ss")}},{title:c.ZP.get("关联订阅"),width:185,render:function(e,t){return t.sub_id?(0,$.jsx)(J,{service:function(){return T.W.get("".concat(E.Z.apiPrefix,"subscriptions/").concat(t.sub_id))},options:{ready:null==t?void 0:t.sub_id,cacheKey:t.sub_id}}):"-"}},{title:c.ZP.get("操作"),key:"action",width:140,fixed:n?void 0:"right",render:function(e,t,n){return(0,$.jsxs)(p.Z,{size:"middle",children:[t.status===Q.CrontabStatus.idle&&(0,$.jsx)("a",{onClick:function(e){e.stopPropagation(),Dt(t,n)},children:c.ZP.get("运行")}),t.status!==Q.CrontabStatus.idle&&(0,$.jsx)("a",{onClick:function(e){e.stopPropagation(),Wt(t,n)},children:c.ZP.get("停止")}),(0,$.jsx)("a",{onClick:function(e){e.stopPropagation(),Be(s()(s()({},t),{},{timestamp:Date.now()}))},children:c.ZP.get("日志")}),(0,$.jsx)(Ot,{record:t,index:n},"more")]})}}],l=(0,u.useState)([]),d=o()(l,2),g=d[0],X=d[1],G=(0,u.useState)(!0),ee=o()(G,2),oe=ee[0],le=ee[1],se=(0,u.useState)(!1),ce=o()(se,2),ue=ce[0],de=ce[1],ge=(0,u.useState)(!1),fe=o()(ge,2),pe=fe[0],me=fe[1],he=(0,u.useState)(),Ze=o()(he,2),xe=Ze[0],ve=Ze[1],Pe=(0,u.useState)(""),be=o()(Pe,2),ye=be[0],je=be[1],we=(0,u.useState)(!1),ke=o()(we,2),Ce=ke[0],Se=ke[1],_e=(0,u.useState)(),qe=o()(_e,2),Re=qe[0],Be=qe[1],Ie=(0,u.useState)([]),Ne=o()(Ie,2),De=Ne[0],We=Ne[1],Ee=(0,u.useState)({}),Oe=o()(Ee,2),Te=Oe[0],Fe=Oe[1],ze=(0,u.useState)(),Le=o()(ze,2),Me=Le[0],He=Le[1],Ve=(0,u.useState)(!1),Ae=o()(Ve,2),Ke=Ae[0],Ye=Ae[1],Ue=(0,u.useState)(),Qe=o()(Ue,2),Xe=Qe[0],Ge=Qe[1],$e=(0,u.useState)(""),Je=o()($e,2),et=Je[0],tt=Je[1],nt=(0,u.useState)(),it=o()(nt,2),rt=it[0],at=it[1],ot=(0,u.useState)(!1),lt=o()(ot,2),st=lt[0],ct=lt[1],ut=(0,u.useState)(!1),dt=o()(ut,2),gt=dt[0],ft=dt[1],pt=(0,u.useState)([]),mt=o()(pt,2),ht=mt[0],Zt=mt[1],xt=(0,u.useState)([]),vt=o()(xt,2),Pt=vt[0],bt=vt[1],yt=(0,u.useState)(!1),jt=o()(yt,2),wt=jt[0],kt=jt[1],Ct=(0,u.useRef)(null),St=(0,K.Z)(Ct),_t=(0,u.useState)(""),qt=o()(_t,2),Rt=qt[0],Bt=qt[1],It=function(e){var t=(0,Y.FA)(e.command);if(Array.isArray(t)){var n=o()(t,2),i=n[0],r=n[1];H.history.push("/script?p=".concat(r,"&s=").concat(i))}else t&&(location.href=t)},Nt=function(){le(!0);var e=Te.page,t=Te.size,n=Te.sorter,i=Te.filters,r="".concat(E.Z.apiPrefix,"crons?searchValue=").concat(ye,"&page=").concat(e,"&size=").concat(t,"&filters=").concat(JSON.stringify(i));n&&n.column&&n.order&&(r+="&sorter=".concat(JSON.stringify({field:n.column.key,type:"ascend"===n.order?"ASC":"DESC"}))),Me&&(r+="&queryString=".concat(JSON.stringify({filters:Me.filters,sorts:Me.sorts,filterRelation:Me.filterRelation||"and"}))),T.W.get(r).then((function(e){var t=e.code,n=e.data;if(200===t){var i=n.data,r=n.total;X(i.map((function(e){return s()(s()({},e),{},{nextRunTime:(0,Y.rS)(e.schedule,e.extra_schedules)})}))),at(r)}})).finally((function(){return le(!1)}))},Dt=function(e,t){m.Z.confirm({title:c.ZP.get("确认运行"),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认运行定时任务")," ",(0,$.jsx)(ne,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(E.Z.apiPrefix,"crons/run"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=r()(g),a=i.findIndex((function(t){return t.id===e.id}));-1!==a&&(i.splice(a,1,s()(s()({},e),{},{status:Q.CrontabStatus.running})),X(i))}}))},onCancel:function(){console.log("Cancel")}})},Wt=function(e,t){m.Z.confirm({title:c.ZP.get("确认停止"),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认停止定时任务")," ",(0,$.jsx)(ne,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(E.Z.apiPrefix,"crons/stop"),[e.id]).then((function(t){var n=t.code;t.data;if(200===n){var i=r()(g),a=i.findIndex((function(t){return t.id===e.id}));-1!==a&&(i.splice(a,1,s()(s()({},e),{},{pid:null,status:Q.CrontabStatus.idle})),X(i))}}))},onCancel:function(){console.log("Cancel")}})},Et=function(e){return[{label:c.ZP.get("编辑"),key:"edit",icon:(0,$.jsx)(k.Z,{})},{label:1===e.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),key:"enableOrDisable",icon:1===e.isDisabled?(0,$.jsx)(C.Z,{}):(0,$.jsx)(S.Z,{})},{label:c.ZP.get("删除"),key:"delete",icon:(0,$.jsx)(_.Z,{})},{label:1===e.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),key:"pinOrUnPin",icon:1===e.isPinned?(0,$.jsx)(S.Z,{}):(0,$.jsx)(q.Z,{})}]},Ot=function(e){var t=e.record,n=e.index;return(0,$.jsx)(Z.Z,{placement:"bottomRight",trigger:["click"],menu:{items:Et(t),onClick:function(e){var i=e.key;e.domEvent.stopPropagation(),Tt(i,t,n)}},children:(0,$.jsx)("a",{onClick:function(e){return e.stopPropagation()},children:(0,$.jsx)(R.Z,{})})})},Tt=function(e,t,n){switch(e){case"edit":!function(e,t){ve(e),de(!0)}(t);break;case"enableOrDisable":!function(e,t){m.Z.confirm({title:"确认".concat(1===e.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用")),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认"),1===e.isDisabled?c.ZP.get("启用"):c.ZP.get("禁用"),c.ZP.get("定时任务")," ",(0,$.jsx)(ne,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===e.isDisabled?"enable":"disable"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isDisabled?0:1,a=r()(g),o=a.findIndex((function(t){return t.id===e.id}));-1!==o&&(a.splice(o,1,s()(s()({},e),{},{isDisabled:i})),X(a))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"delete":!function(e,t){m.Z.confirm({title:c.ZP.get("确认删除"),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认删除定时任务")," ",(0,$.jsx)(ne,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){T.W.delete("".concat(E.Z.apiPrefix,"crons"),{data:[e.id]}).then((function(t){var n=t.code;if(t.data,200===n){h.ZP.success(c.ZP.get("删除成功"));var i=r()(g),a=i.findIndex((function(t){return t.id===e.id}));-1!==a&&(i.splice(a,1),X(i))}}))},onCancel:function(){console.log("Cancel")}})}(t);break;case"pinOrUnPin":!function(e,t){m.Z.confirm({title:"确认".concat(1===e.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶")),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认"),1===e.isPinned?c.ZP.get("取消置顶"):c.ZP.get("置顶"),c.ZP.get("定时任务")," ",(0,$.jsx)(ne,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",c.ZP.get("吗")]}),onOk:function(){T.W.put("".concat(E.Z.apiPrefix,"crons/").concat(1===e.isPinned?"unpin":"pin"),[e.id]).then((function(t){var n=t.code;if(t.data,200===n){var i=1===e.isPinned?0:1,a=r()(g),o=a.findIndex((function(t){return t.id===e.id}));-1!==o&&(a.splice(o,1,s()(s()({},e),{},{isPinned:i})),X(a))}}))},onCancel:function(){console.log("Cancel")}})}(t)}},Ft={selectedRowKeys:De,onChange:function(e){We(e)}},zt=function(e){m.Z.confirm({title:"确认".concat(Q.OperationName[e]),content:(0,$.jsxs)($.Fragment,{children:[c.ZP.get("确认"),Q.OperationName[e],c.ZP.get("选中的定时任务吗")]}),onOk:function(){T.W.put("".concat(E.Z.apiPrefix,"crons/").concat(Q.OperationPath[e]),De).then((function(e){var t=e.code;e.data;200===t&&Nt()}))},onCancel:function(){console.log("Cancel")}})};(0,u.useEffect)((function(){Re&&(localStorage.setItem("logCron",Re.id),Se(!0))}),[Re]),(0,u.useEffect)((function(){Fe(s()(s()({},Te),{},{page:1}))}),[ye]),(0,u.useEffect)((function(){Te.page&&Te.size&&Nt(),Me&&Me.id&&Bt(Me.id)}),[Te,Me]),(0,u.useEffect)((function(){if(Me&&Pt&&Pt.length>0){var e=Pt.slice(4).find((function(e){return e.id===Me.id}));kt(!!e)}}),[Me,Pt]),(0,u.useEffect)((function(){Mt()}),[]);var Lt={onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"new":ct(!0);break;case"manage":ft(!0);break;default:Ht(e)}}(t)},items:[].concat(r()(r()(Pt).slice(4).map((function(e){return{label:(0,$.jsxs)(p.Z,{style:{display:"flex",justifyContent:"space-between"},children:[(0,$.jsx)("span",{children:e.name}),(null==Me?void 0:Me.id)===e.id&&(0,$.jsx)(B.Z,{style:{color:"#1890ff"}})]}),key:e.id,icon:(0,$.jsx)(I.Z,{})}}))),[{type:"divider"},{label:c.ZP.get("创建视图"),key:"new",icon:(0,$.jsx)(N.Z,{})},{label:c.ZP.get("视图管理"),key:"manage",icon:(0,$.jsx)(D.Z,{})}])},Mt=function(){le(!0),T.W.get("".concat(E.Z.apiPrefix,"crons/views")).then((function(e){var t=e.code,n=e.data;if(200===t){Zt(n);var i=n.filter((function(e){return!e.isDisabled})).map((function(e){return s()(s()({},e),{},{name:"全部任务"===e.name?c.ZP.get("全部任务"):e.name})}));bt(i),Fe({page:1,size:parseInt(localStorage.getItem("pageSize")||"20"),sorter:{},filters:{}}),He(s()({},i[0]))}})).finally((function(){le(!1)}))},Ht=function(e){var t=Pt.find((function(t){return t.id==e}));We([]),Fe(s()(s()({},Te),{},{page:1})),He(t||null)},Vt=(0,U.u)((function(){return{scroll:{y:St}}}),[St]),At=o()(Vt,1)[0];return(0,$.jsxs)(O.ZP,{className:"ql-container-wrapper crontab-wrapper ql-container-wrapper-has-tab",title:c.ZP.get("定时任务"),extra:[(0,$.jsx)(ae,{placeholder:c.ZP.get("请输入名称或者关键词"),style:{width:"auto"},enterButton:!0,allowClear:!0,loading:oe,value:et,onChange:function(e){return tt(e.target.value)},onSearch:function(e){je(e.trim())}}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return ve(null),void de(!0)},children:c.ZP.get("创建任务")},"2")],header:{style:t},children:[(0,$.jsx)(v.Z,{defaultActiveKey:"all",size:"small",activeKey:Rt,tabPosition:"top",className:"crontab-view ".concat(wt?"more-active":""),tabBarExtraContent:(0,$.jsx)(Z.Z,{menu:Lt,trigger:["click"],overlayStyle:{minWidth:200},children:(0,$.jsxs)("div",{className:"view-more ".concat(wt?"active":""),children:[(0,$.jsxs)(p.Z,{children:[c.ZP.get("更多"),(0,$.jsx)(W.Z,{})]}),(0,$.jsx)("div",{className:"ant-tabs-ink-bar ant-tabs-ink-bar-animated"})]})}),onTabClick:Ht,items:r()(r()(Pt).slice(0,4).map((function(e){return{key:e.id,label:e.name}})))}),(0,$.jsxs)("div",{ref:Ct,children:[De.length>0&&(0,$.jsxs)("div",{style:{marginBottom:16},children:[(0,$.jsx)(x.Z,{type:"primary",style:{marginBottom:5},onClick:function(){m.Z.confirm({title:c.ZP.get("确认删除"),content:(0,$.jsx)($.Fragment,{children:c.ZP.get("确认删除选中的定时任务吗")}),onOk:function(){T.W.delete("".concat(E.Z.apiPrefix,"crons"),{data:De}).then((function(e){var t=e.code;e.data;200===t&&(h.ZP.success(c.ZP.get("批量删除成功")),We([]),Nt())}))},onCancel:function(){console.log("Cancel")}})},children:c.ZP.get("批量删除")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return zt(0)},style:{marginLeft:8,marginBottom:5},children:c.ZP.get("批量启用")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return zt(1)},style:{marginLeft:8,marginRight:8},children:c.ZP.get("批量禁用")}),(0,$.jsx)(x.Z,{type:"primary",style:{marginRight:8},onClick:function(){return zt(2)},children:c.ZP.get("批量运行")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return zt(3)},children:c.ZP.get("批量停止")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return zt(4)},style:{marginLeft:8,marginRight:8},children:c.ZP.get("批量置顶")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return zt(5)},style:{marginLeft:8,marginRight:8},children:c.ZP.get("批量取消置顶")}),(0,$.jsx)(x.Z,{type:"primary",onClick:function(){return me(!0)},style:{marginLeft:8,marginRight:8},children:c.ZP.get("批量修改标签")}),(0,$.jsxs)("span",{style:{marginLeft:8},children:[c.ZP.get("已选择"),(0,$.jsx)("a",{children:null==De?void 0:De.length}),c.ZP.get("项")]})]}),(0,$.jsx)(P.Z,{columns:a,pagination:{current:Te.page,pageSize:Te.size,showSizeChanger:!0,simple:n,total:rt,showTotal:function(e,t){return"第 ".concat(t[0],"-").concat(t[1]," 条/总共 ").concat(e," 条")},pageSizeOptions:[10,20,50,100,200,500,rt||1e4].sort((function(e,t){return e-t}))},dataSource:g,rowKey:"id",size:"middle",scroll:{x:1200,y:St},loading:oe,rowSelection:Ft,rowClassName:function(e,t){return e.isPinned?"pinned-cron cron":"cron"},onChange:function(e,t,n){var i=e.current,r=e.pageSize;Fe({page:i,size:r,sorter:n,filters:t}),localStorage.setItem("pageSize",String(r))},components:n||Te.size<50?void 0:At})]}),(0,$.jsx)(z.default,{visible:Ce,handleCancel:function(){var e;e=Re,T.W.get("".concat(E.Z.apiPrefix,"crons/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var a=g.findIndex((function(t){return t.id===e.id})),o=r()(g);i.nextRunTime=(0,Y.rS)(i.schedule,i.extra_schedules),-1!==a&&(o.splice(a,1,s()(s()({},e),i)),X(o))}})).finally((function(){return le(!1)})),Se(!1)},cron:Re}),(0,$.jsx)(F.default,{visible:ue,handleCancel:function(){de(!1),Nt()},cron:xe}),(0,$.jsx)(F.CronLabelModal,{visible:pe,handleCancel:function(e){me(!1),e&&Nt()},ids:De}),(0,$.jsx)(L.default,{visible:Ke,handleCancel:function(){Ye(!1)},cron:Xe,theme:i,isPhone:n}),(0,$.jsx)(V.default,{visible:st,handleCancel:function(e){ct(!1),Mt()}}),(0,$.jsx)(A.default,{cronViews:ht,visible:gt,handleCancel:function(){ft(!1)},cronViewChange:function(e){Mt()}})]})}},33680:function(e,t,n){"use strict";n.r(t);var i=n(54306),r=n.n(i),a=n(88265),o=n(63313),l=n(89065),s=n(92260),c=n(84163),u=n(24378),d=n(57229),g=n(15207),f=n(65601),p=n(38101),m=n(4574),h=n(40141),Z=n(99120),x=n.n(Z),v=n(11527);l.Z.Countdown;t.default=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,l=e.data,Z=e.logUrl,P=(0,o.useState)(a.ZP.get("启动中...")),b=r()(P,2),y=b[0],j=b[1],w=(0,o.useState)(!0),k=r()(w,2),C=k[0],S=k[1],_=(0,o.useState)(!0),q=r()(_,2),R=q[0],B=q[1],I=(0,o.useState)(!1),N=r()(I,2),D=N[0],W=N[1],E=(0,o.useRef)({value:0,down:!0}),O=Z||String(null==t?void 0:t.id),T=function e(n){n&&S(!0),d.W.get(Z||"".concat(g.Z.apiPrefix,"crons/").concat(t.id,"/log")).then((function(t){var n=t.code,i=t.data;if(200===n&&localStorage.getItem("logCron")===O&&i!==y){var r=i;j(r||a.ZP.get("暂无日志"));var o=Boolean(r&&!(0,h.x$)(r)&&!r.includes("任务未运行"));o||(0,h.x$)(y)||y===a.ZP.get("启动中...")||setTimeout((function(){F()})),B(o),o&&setTimeout((function(){F(),e()}),2e3)}})).finally((function(){n&&S(!1)}))},F=function(){E.current.down&&setTimeout((function(){document.querySelector("#log-flag").scrollIntoView({behavior:"smooth"})}),600)},z=function(){localStorage.removeItem("logCron"),n()};return(0,o.useEffect)((function(){t&&t.id&&i&&(T(!0),E.current.down=!0)}),[t,i]),(0,o.useEffect)((function(){l&&j(l)}),[l]),(0,o.useEffect)((function(){W(document.body.clientWidth<768)}),[]),(0,v.jsx)(c.Z,{title:(0,v.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(R||C)&&(0,v.jsx)(f.Z,{spin:!0}),!R&&!C&&(0,v.jsx)(p.Z,{}),(0,v.jsx)(s.Z.Text,{ellipsis:!0,style:{marginLeft:5},children:t&&t.name})]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return z()},onCancel:function(){return z()},footer:[(0,v.jsx)(u.Z,{type:"primary",onClick:function(){return z()},children:a.ZP.get("知道了")})],children:(0,v.jsxs)("div",{onScroll:function(e){var t=e.target.scrollTop;E.current.down&&(E.current={value:t,down:t-E.current.value>-5||!t})},className:"log-container",children:[C?(0,v.jsx)(m.Z,{}):(0,v.jsx)("pre",{style:D?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,v.jsx)(x(),{children:y})}),(0,v.jsx)("div",{id:"log-flag"})]})})}},70684:function(e,t,n){"use strict";n.r(t),n.d(t,{CronLabelModal:function(){return W},default:function(){return D}});var i=n(12342),r=n.n(i),a=n(25359),o=n.n(a),l=n(57213),s=n.n(l),c=n(49811),u=n.n(c),d=n(54306),g=n.n(d),f=n(88265),p=n(63313),m=n(67393),h=n(9835),Z=n(84163),x=n(22159),v=n(2947),P=n(24378),b=n(57229),y=n(15207),j=n(11186),w=n.n(j),k=n(93525),C=n.n(k),S=n(51704),_=n(8297),q=n(26839),R=n(11527),B=function(e){var t=e.value,n=e.onChange,i=(0,p.useState)(""),r=g()(i,2),a=r[0],o=r[1],l=(0,p.useState)(!1),s=g()(l,2),c=s[0],u=s[1],d=(0,p.useState)([]),m=g()(d,2),h=m[0],Z=m[1],v=(0,p.useRef)(),P=function(){a&&!h.includes(a)&&(Z([].concat(C()(h),[a])),null==n||n([].concat(C()(h),[a]))),u(!1),o("")},b=h.map((function(e){var t=(0,R.jsx)(S.Z,{closable:!0,onClose:function(t){var i,r;t.preventDefault(),i=e,r=h.filter((function(e){return e!==i})),Z(r),null==n||n(r)},children:e});return(0,R.jsx)("span",{style:{display:"inline-block",marginBottom:8},children:t},e)}));return(0,p.useEffect)((function(){c&&v&&v.current.focus()}),[c]),(0,p.useEffect)((function(){t&&Z(t)}),[t]),(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(_.Z,{enter:{scale:.8,opacity:0,type:"from",duration:100},leave:{opacity:0,width:0,scale:0,duration:200},appear:!1,children:b}),c&&(0,R.jsx)(x.Z,{ref:v,type:"text",size:"small",style:{width:78},value:a,onChange:function(e){o(e.target.value)},onBlur:P,onPressEnter:P}),!c&&(0,R.jsxs)(S.Z,{onClick:function(){u(!0)},style:{borderStyle:"dashed",cursor:"pointer"},children:[(0,R.jsx)(q.Z,{})," ",f.ZP.get("新建")]})]})},I=n(32320),N=["key","name"],D=function(e){var t=e.cron,n=e.handleCancel,i=e.visible,a=m.Z.useForm(),l=g()(a,1)[0],c=(0,p.useState)(!1),d=g()(c,2),P=d[0],j=d[1],k=function(){var e=u()(o()().mark((function e(i){var r,a,l,c,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return j(!0),r=t?"put":"post",a=s()({},i),t&&(a.id=t.id),e.prev=4,e.next=7,b.W[r]("".concat(y.Z.apiPrefix,"crons"),a);case 7:l=e.sent,c=l.code,u=l.data,200===c&&(h.ZP.success(t?f.ZP.get("更新任务成功"):f.ZP.get("创建任务成功")),n(u)),j(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),j(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){l.resetFields()}),[t,i]),(0,R.jsx)(Z.Z,{title:t?f.ZP.get("编辑任务"):f.ZP.get("创建任务"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:P,children:(0,R.jsxs)(m.Z,{form:l,layout:"vertical",name:"form_in_modal",initialValues:t,children:[(0,R.jsx)(m.Z.Item,{name:"name",label:f.ZP.get("名称"),rules:[{required:!0,whitespace:!0}],children:(0,R.jsx)(x.Z,{placeholder:f.ZP.get("请输入任务名称")})}),(0,R.jsx)(m.Z.Item,{name:"command",label:f.ZP.get("命令/脚本"),rules:[{required:!0,whitespace:!0}],children:(0,R.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("支持输入脚本路径/任意系统可执行命令/task 脚本路径")})}),(0,R.jsx)(m.Z.Item,{name:"schedule",label:f.ZP.get("定时规则"),rules:[{required:!0},{validator:function(e,t){return!t||w().parseExpression(t).hasNext()?Promise.resolve():Promise.reject(f.ZP.get("Cron表达式格式有误"))}}],children:(0,R.jsx)(x.Z,{placeholder:f.ZP.get("秒(可选) 分 时 天 月 周")})}),(0,R.jsx)(m.Z.List,{name:"extra_schedules",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,R.jsxs)(R.Fragment,{children:[e.map((function(e){var t=e.key,n=e.name,i=r()(e,N);return(0,R.jsx)(m.Z.Item,{noStyle:!0,children:(0,R.jsxs)(v.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,R.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"schedule"],rules:[{required:!0}],children:(0,R.jsx)(x.Z,{placeholder:f.ZP.get("秒(可选) 分 时 天 月 周")})})),(0,R.jsx)(I.Z,{className:"dynamic-delete-button",onClick:function(){return a(n)}})]})},t)})),(0,R.jsx)(m.Z.Item,{children:(0,R.jsxs)("a",{onClick:function(){return i({schedule:""})},children:[(0,R.jsx)(q.Z,{}),f.ZP.get("新增定时规则")]})}),(0,R.jsx)(m.Z.ErrorList,{errors:o})]})}}),(0,R.jsx)(m.Z.Item,{name:"labels",label:f.ZP.get("标签"),children:(0,R.jsx)(B,{})}),(0,R.jsx)(m.Z.Item,{name:"task_before",label:f.ZP.get("执行前"),tooltip:f.ZP.get("运行任务前执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(f.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,R.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("请输入运行任务前要执行的命令,不能包含 task 命令")})}),(0,R.jsx)(m.Z.Item,{name:"task_after",label:f.ZP.get("执行后"),tooltip:f.ZP.get("运行任务后执行的命令,比如 cp/mv/python3 xxx.py/node xxx.js"),rules:[{validator:function(e,t){return t&&(t.includes(" task ")||t.startsWith("task "))?Promise.reject(f.ZP.get("不能包含 task 命令")):Promise.resolve()}}],children:(0,R.jsx)(x.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:f.ZP.get("请输入运行任务后要执行的命令,不能包含 task 命令")})})]})})},W=function(e){var t=e.ids,n=e.handleCancel,i=e.visible,r=m.Z.useForm(),a=g()(r,1)[0],l=(0,p.useState)(!1),s=g()(l,2),c=s[0],d=s[1],x=function(){var e=u()(o()().mark((function e(i){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.validateFields().then(function(){var e=u()(o()().mark((function e(r){var a,l,s;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d(!0),a={ids:t,labels:r.labels},e.prev=2,e.next=5,b.W[i]("".concat(y.Z.apiPrefix,"crons/labels"),a);case 5:l=e.sent,s=l.code,l.data,200===s&&(h.ZP.success("post"===i?f.ZP.get("添加Labels成功"):f.ZP.get("删除Labels成功")),n(!0)),d(!1),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),d(!1);case 15:case"end":return e.stop()}}),e,null,[[2,12]])})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){console.log("Validate Failed:",e)}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){a.resetFields()}),[t,i]);var v=[(0,R.jsx)(P.Z,{onClick:function(){return n(!1)},children:f.ZP.get("取消")}),(0,R.jsx)(P.Z,{type:"primary",danger:!0,onClick:function(){return x("delete")},children:f.ZP.get("删除")}),(0,R.jsx)(P.Z,{type:"primary",onClick:function(){return x("post")},children:f.ZP.get("添加")})];return(0,R.jsx)(Z.Z,{title:f.ZP.get("批量修改标签"),open:i,footer:v,centered:!0,maskClosable:!1,forceRender:!0,onCancel:function(){return n(!1)},confirmLoading:c,children:(0,R.jsx)(m.Z,{form:a,layout:"vertical",name:"form_in_label_modal",children:(0,R.jsx)(m.Z.Item,{name:"labels",label:f.ZP.get("标签"),children:(0,R.jsx)(B,{})})})})}},91350:function(e,t,n){"use strict";n.r(t),n.d(t,{CrontabStatus:function(){return i},OperationName:function(){return r},OperationPath:function(){return a}});var i=function(e){return e[e.running=0]="running",e[e.queued=.5]="queued",e[e.idle=1]="idle",e[e.disabled=2]="disabled",e}({}),r=function(e){return e[e["启用"]=0]="启用",e[e["禁用"]=1]="禁用",e[e["运行"]=2]="运行",e[e["停止"]=3]="停止",e[e["置顶"]=4]="置顶",e[e["取消置顶"]=5]="取消置顶",e}({}),a=function(e){return e[e.enable=0]="enable",e[e.disable=1]="disable",e[e.run=2]="run",e[e.stop=3]="stop",e[e.pin=4]="pin",e[e.unpin=5]="unpin",e}({})},10419:function(e,t,n){"use strict";n.r(t);var i=n(12342),r=n.n(i),a=n(25359),o=n.n(a),l=n(57213),s=n.n(l),c=n(49811),u=n.n(c),d=n(54306),g=n.n(d),f=n(88265),p=n(63313),m=n(67393),h=n(28756),Z=n(84163),x=n(22159),v=n(24378),P=n(2947),b=n(57229),y=n(15207),j=n(32320),w=n(26839),k=n(38582),C=n(91350),S=n(19631),_=n(11527),q=["name"],R=["key","name"],B=["key","name"],I=[{name:f.ZP.get("命令"),value:"command"},{name:f.ZP.get("名称"),value:"name"},{name:f.ZP.get("定时规则"),value:"schedule"},{name:f.ZP.get("状态"),value:"status",onlySelect:!0},{name:f.ZP.get("标签"),value:"labels"},{name:f.ZP.get("订阅"),value:"sub_id",onlySelect:!0}],N={Reg:"",NotReg:"",In:"select",Nin:"select"},D=[{name:f.ZP.get("包含"),value:"Reg"},{name:f.ZP.get("不包含"),value:"NotReg"},{name:f.ZP.get("属于"),value:"In",type:"select"},{name:f.ZP.get("不属于"),value:"Nin",type:"select"}],W=[{name:f.ZP.get("顺序"),value:"ASC"},{name:f.ZP.get("倒序"),value:"DESC"}],E=function(e){return e.and="且",e.or="或",e}(E||{});t.default=function(e){var t=e.view,n=e.handleCancel,i=e.visible,a=m.Z.useForm(),l=g()(a,1)[0],c=(0,p.useState)(!1),d=g()(c,2),O=d[0],T=d[1],F=(0,p.useState)("and"),z=g()(F,2),L=z[0],M=z[1],H=m.Z.useWatch("filters",l),V=(0,S.Z)((function(){return b.W.get("".concat(y.Z.apiPrefix,"subscriptions"))}),{cacheKey:"subscriptions"}).data,A={status:[{name:f.ZP.get("运行中"),value:C.CrontabStatus.running},{name:f.ZP.get("空闲中"),value:C.CrontabStatus.idle},{name:f.ZP.get("已禁用"),value:C.CrontabStatus.disabled}],sub_id:null==V?void 0:V.data.map((function(e){return{name:e.name,value:e.id}}))},K=function(){var e=u()(o()().mark((function e(i){var r,a,l,c;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),i.filterRelation=L,r=t?"put":"post",e.prev=3,e.next=6,b.W[r]("".concat(y.Z.apiPrefix,"crons/views"),t?s()(s()({},i),{},{id:t.id}):i);case 6:a=e.sent,l=a.code,c=a.data,200===l&&n(c),T(!1),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(3),T(!1);case 16:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(t){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){t||l.resetFields(),l.setFieldsValue(t||{filters:[{property:"command"}]})}),[t,i]);var Y=function(e){var t=e.name,n=r()(e,q),i=l.getFieldValue(["filters",t,"property"]);return(0,_.jsx)(h.Z,s()(s()({style:{width:120},placeholder:f.ZP.get("请选择操作符")},n),{},{children:D.filter((function(e){return A[i]?"select"===e.type:e})).map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))}))},U=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,_.jsx)(h.Z,{style:t,children:e.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})},Q=(0,_.jsx)(h.Z,{style:{width:80},children:W.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))});return(0,_.jsx)(Z.Z,{title:t?f.ZP.get("编辑视图"):f.ZP.get("创建视图"),open:i,forceRender:!0,width:580,centered:!0,maskClosable:!1,onOk:function(){l.validateFields().then((function(e){K(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:O,children:(0,_.jsxs)(m.Z,{form:l,layout:"vertical",name:"env_modal",children:[(0,_.jsx)(m.Z.Item,{name:"name",label:f.ZP.get("视图名称"),rules:[{required:!0,message:f.ZP.get("请输入视图名称")}],children:(0,_.jsx)(x.Z,{placeholder:f.ZP.get("请输入视图名称")})}),(0,_.jsx)(m.Z.List,{name:"filters",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(v.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},onClick:function(){M("and"===L?"or":"and")},children:(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("span",{children:E[L]}),(0,_.jsx)(k.Z,{type:"ql-icon-d-caret"})]})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t,n,i=e.key,o=e.name,l=r()(e,R);return(0,_.jsx)(m.Z.Item,{label:0===o?f.ZP.get("筛选条件"):"",style:{marginBottom:0},required:!0,className:"filter-item",children:(0,_.jsxs)(P.Z,{className:"view-create-modal-filters",align:"baseline",children:[(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"property"],rules:[{required:!0}],children:U(I,{width:120})})),(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"operation"],rules:[{required:!0,message:f.ZP.get("请选择操作符")}],children:(0,_.jsx)(Y,{name:o})})),(0,_.jsx)(m.Z.Item,s()(s()({},l),{},{name:[o,"value"],rules:[{required:!0,message:f.ZP.get("请输入内容")}],children:"select"===N[null==H?void 0:H[o].operation]?(t=null==H?void 0:H[o].property,(0,_.jsx)(h.Z,{mode:"tags",allowClear:!0,placeholder:f.ZP.get("输入后回车增加自定义选项"),children:null===(n=A[t])||void 0===n?void 0:n.map((function(e){return(0,_.jsx)(h.Z.Option,{value:e.value,children:e.name},e.name)}))})):(0,_.jsx)(x.Z,{placeholder:f.ZP.get("请输入内容")})})),0!==o&&(0,_.jsx)(j.Z,{onClick:function(){return a(o)}})]})},i)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return i({property:"command",operation:"Reg"})},children:[(0,_.jsx)(w.Z,{}),f.ZP.get("新增筛选条件")]})}),(0,_.jsx)(m.Z.ErrorList,{errors:o})]})]})}}),(0,_.jsx)(m.Z.List,{name:"sorts",children:function(e,t,n){var i=t.add,a=t.remove,o=n.errors;return(0,_.jsxs)("div",{style:{position:"relative"},className:"view-filters-container ".concat(e.length>1?"active":""),children:[e.length>1&&(0,_.jsx)("div",{style:{position:"absolute",width:50,borderRadius:10,border:"1px solid rgb(190, 220, 255)",borderRight:"none",height:56*(e.length-1),top:46,left:15},children:(0,_.jsx)(v.Z,{type:"primary",size:"small",style:{position:"absolute",top:"50%",translate:"-50% -50%",padding:"0 3px",cursor:"pointer"},children:(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("span",{children:E[L]})})})}),(0,_.jsxs)("div",{children:[e.map((function(e){var t=e.key,n=e.name,i=r()(e,B);return(0,_.jsx)(m.Z.Item,{label:0===n?f.ZP.get("排序方式"):"",style:{marginBottom:0},className:"filter-item",children:(0,_.jsxs)(P.Z,{className:"view-create-modal-sorts",align:"baseline",children:[(0,_.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"property"],rules:[{required:!0}],children:U(I)})),(0,_.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"type"],rules:[{required:!0}],children:Q})),(0,_.jsx)(j.Z,{onClick:function(){return a(n)}})]})},t)})),(0,_.jsx)(m.Z.Item,{children:(0,_.jsxs)("a",{onClick:function(){return i({property:"command",type:"ASC"})},children:[(0,_.jsx)(w.Z,{}),f.ZP.get("新增排序方式")]})}),(0,_.jsx)(m.Z.ErrorList,{errors:o})]})]})}})]})})}},3038:function(e,t,n){"use strict";n.r(t);var i=n(93525),r=n.n(i),a=n(57213),o=n.n(a),l=n(54306),s=n.n(l),c=n(12342),u=n.n(c),d=n(88265),g=n(63313),f=n(92260),p=n(16861),m=n(2947),h=n(84163),Z=n(9835),x=n(24378),v=n(94674),P=n(57229),b=n(15207),y=n(32132),j=n(13740),w=n(81871),k=n(21778),C=n(12701),S=n(66255),_=n(10419),q=n(11527),R=["index","moveRow","className","style"],B=f.Z.Text,I="DragableBodyRow",N=function(e){var t=e.index,n=e.moveRow,i=e.className,r=e.style,a=u()(e,R),l=(0,g.useRef)(),c=(0,w.L)({accept:I,collect:function(e){var n=(e.getItem()||{}).index;return n===t?{}:{isOver:e.isOver(),dropClassName:n<t?" drop-over-downward":" drop-over-upward"}},drop:function(e){n(e.index,t)}}),d=s()(c,2),f=d[0],p=f.isOver,m=f.dropClassName,h=d[1],Z=(0,k.c)({type:I,item:{index:t},collect:function(e){return{isDragging:e.isDragging()}}});return h((0,s()(Z,2)[1])(l)),(0,q.jsx)("tr",o()({ref:l,className:"".concat(i).concat(p?m:""),style:o()({cursor:"move"},r)},a))};t.default=function(e){var t=e.cronViews,n=e.handleCancel,i=e.visible,a=e.cronViewChange,l=function(e){return w.filter((function(e){return!e.isDisabled})).length<=1&&!e.isDisabled},c=[{title:d.ZP.get("名称"),dataIndex:"name",key:"name",render:function(e){return"全部任务"===e?d.ZP.get("全部任务"):e}},{title:d.ZP.get("类型"),dataIndex:"type",key:"type",render:function(e){return 1===e?d.ZP.get("系统"):d.ZP.get("个人")}},{title:d.ZP.get("显示"),key:"isDisabled",dataIndex:"isDisabled",width:100,render:function(e,t,n){return(0,q.jsx)(p.Z,{disabled:l(t),checked:!t.isDisabled,onChange:function(e){return M(e,t,n)}})}},{title:d.ZP.get("操作"),key:"action",width:100,render:function(e,t,n){return 1!==t.type?(0,q.jsxs)(m.Z,{size:"middle",children:[(0,q.jsx)("a",{onClick:function(){return z(t,n)},children:(0,q.jsx)(y.Z,{})}),!l(t)&&(0,q.jsx)("a",{onClick:function(){return L(t,n)},children:(0,q.jsx)(j.Z,{})})]}):"-"}}],u=(0,g.useState)([]),f=s()(u,2),w=f[0],k=f[1],R=(0,g.useState)(!1),I=s()(R,2),D=I[0],W=I[1],E=(0,g.useState)(null),O=s()(E,2),T=O[0],F=O[1],z=function(e,t){F(e),W(!0)},L=function(e,t){h.Z.confirm({title:d.ZP.get("确认删除"),content:(0,q.jsxs)(q.Fragment,{children:[d.ZP.get("确认删除视图")," ",(0,q.jsx)(B,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",d.ZP.get("吗")]}),onOk:function(){P.W.delete("".concat(b.Z.apiPrefix,"crons/views"),{data:[e.id]}).then((function(e){var t=e.code;e.data;200===t&&(Z.ZP.success(d.ZP.get("删除成功")),a())}))},onCancel:function(){console.log("Cancel")}})},M=function(e,t,n){P.W.put("".concat(b.Z.apiPrefix,"crons/views/").concat(e?"enable":"disable"),[t.id]).then((function(t){var i=t.code;t.data;if(200===i){var l=r()(w);l.splice(n,1,o()(o()({},w[n]),{},{isDisabled:!e})),k(l),a()}}))},H={body:{row:N}},V=(0,g.useCallback)((function(e,t){if(e!==t){var n=w[e];P.W.put("".concat(b.Z.apiPrefix,"crons/views/move"),{fromIndex:e,toIndex:t,id:n.id}).then((function(i){var l=i.code,s=i.data;if(200===l){var c=r()(w);c.splice(e,1),c.splice(t,0,o()(o()({},n),s)),k(c),a()}}))}}),[w]);return(0,g.useEffect)((function(){k(t)}),[t]),(0,q.jsxs)(h.Z,{title:d.ZP.get("视图管理"),open:i,centered:!0,width:620,onCancel:function(){return n()},className:"view-manage-modal",forceRender:!0,footer:!1,maskClosable:!1,children:[(0,q.jsx)(m.Z,{style:{display:"flex",justifyContent:"flex-end",marginBottom:10},children:(0,q.jsx)(x.Z,{type:"primary",onClick:function(){F(null),W(!0)},children:d.ZP.get("创建视图")},"2")}),(0,q.jsx)(C.W,{backend:S.PD,children:(0,q.jsx)(v.Z,{bordered:!0,columns:c,pagination:!1,dataSource:w,rowKey:"id",size:"middle",style:{marginBottom:20},components:H,onRow:function(e,t){return{index:t,moveRow:V}}})}),(0,q.jsx)(_.default,{view:T,visible:D,handleCancel:function(e){W(!1),a(e)}})]})}},15207:function(e,t,n){"use strict";var i=n(88265),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:i.ZP.get("青龙"),apiPrefix:"".concat(r,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:i.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:i.ZP.get("定时任务"),value:"crons"},{name:i.ZP.get("环境变量"),value:"envs"},{name:i.ZP.get("订阅管理"),value:"subscriptions"},{name:i.ZP.get("配置文件"),value:"configs"},{name:i.ZP.get("脚本管理"),value:"scripts"},{name:i.ZP.get("日志管理"),value:"logs"},{name:i.ZP.get("依赖管理"),value:"dependencies"},{name:i.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:i.ZP.get("定时任务"),envs:i.ZP.get("环境变量"),subscriptions:i.ZP.get("订阅管理"),configs:i.ZP.get("配置文件"),scripts:i.ZP.get("脚本管理"),logs:i.ZP.get("日志管理"),dependencies:i.ZP.get("依赖管理"),system:i.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:i.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:i.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:i.ZP.get("钉钉机器人")},{value:"weWorkBot",label:i.ZP.get("企业微信机器人")},{value:"weWorkApp",label:i.ZP.get("企业微信应用")},{value:"aibotk",label:i.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:i.ZP.get("群晖chat")},{value:"email",label:i.ZP.get("邮箱")},{value:"lark",label:i.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:i.ZP.get("自定义通知")},{value:"closed",label:i.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:i.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:i.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:i.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:i.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:i.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:i.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:i.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:i.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:i.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:i.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:i.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:i.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:i.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:i.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:i.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:i.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:i.ZP.get("BARK推送消息的跳转URL")}],telegramBot:[{label:"telegramBotToken",tip:i.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:i.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:i.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:i.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:i.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:i.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:i.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:i.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:i.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:i.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:i.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:i.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:i.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:i.ZP.get("请输入要发送的目标"),items:[{value:"room",label:i.ZP.get("群聊")},{value:"contact",label:i.ZP.get("好友")}]},{label:"aibotkName",tip:i.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:i.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:i.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:i.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:i.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:i.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:i.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:i.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:i.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],chronocat:[{label:"chronocatURL",tip:i.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:i.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:i.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:i.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:i.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:i.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:i.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:i.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":i.ZP.get("登录"),"/initialization":i.ZP.get("初始化"),"/crontab":i.ZP.get("定时任务"),"/env":i.ZP.get("环境变量"),"/subscription":i.ZP.get("订阅管理"),"/config":i.ZP.get("配置文件"),"/script":i.ZP.get("脚本管理"),"/diff":i.ZP.get("对比工具"),"/log":i.ZP.get("日志管理"),"/setting":i.ZP.get("系统设置"),"/error":i.ZP.get("错误日志"),"/dependence":i.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},87423:function(e,t,n){"use strict";function i(e){var t=1e3*e,n=Math.floor(t/864e5),i=t%864e5,r=Math.floor(i/36e5),a=i%36e5,o=Math.floor(a/6e4),l=a%6e4,s=Math.round(l/1e3)+"秒";return o>0&&(s=o+"分"+s),r>0&&(s=r+"小时"+s),n>0&&(s=n+"天"+s),s}n.d(t,{E:function(){return i}})},57229:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var i=n(25359),r=n.n(i),a=n(49811),o=n.n(a),l=n(88265),s=n(9835),c=n(15207),u=n(14851),d=n(73669);s.ZP.config({duration:2});var g=Date.now(),f=d.Z.create({timeout:6e4,params:{t:g}}),p=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];f.interceptors.request.use((function(e){var t=localStorage.getItem(c.Z.authKey);return t&&!p.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),f.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var n,i,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}u.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==u.history.location.pathname&&(localStorage.removeItem(c.Z.authKey),u.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(i=t.data).code&&(a=i.message||i.data)&&s.ZP.error({content:a,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",i);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,n=e.response.status;[502,504].includes(n)?u.history.push("/error"):401===n?"/login"!==u.history.location.pathname&&(s.ZP.error(l.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(c.Z.authKey),u.history.push("/login")):s.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var m=f},40141:function(e,t,n){"use strict";n.d(t,{ZP:function(){return c},I1:function(){return g},w7:function(){return d},DY:function(){return f},FA:function(){return m},rS:function(){return Z},H$:function(){return x},W9:function(){return u},x$:function(){return p}});var i=n(93525),r=n.n(i),a=n(88265),o={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript"},l=n(11186),s=n.n(l);function c(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){return(e.match(t)||[]).toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")},i="unknow";t(/windows|win32|win64|wow32|wow64/g)?i="windows":t(/macintosh|macintel/g)?i="macos":t(/x11/g)?i="linux":t(/android|adr/g)?i="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(i="ios");var r="unknow";"windows"===i?t(/windows nt 5.0|windows 2000/g)?r="2000":t(/windows nt 5.1|windows xp/g)?r="xp":t(/windows nt 5.2|windows 2003/g)?r="2003":t(/windows nt 6.0|windows vista/g)?r="vista":t(/windows nt 6.1|windows 7/g)?r="7":t(/windows nt 6.2|windows 8/g)?r="8":t(/windows nt 6.3|windows 8.1/g)?r="8.1":t(/windows nt 10.0|windows 10/g)&&(r="10"):"macos"===i?r=n(/os x [\d._]+/g):"android"===i?r=n(/android [\d._]+/g):"ios"===i&&(r=n(/os [\d._]+/g));var a="unknow";"windows"===i||"macos"===i||"linux"===i?a="desktop":("android"===i||"ios"===i||t(/mobile/g))&&(a="mobile");var o="unknow",l="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?l="edge":t(/opr/g)?l="opera":t(/chrome/g)?l="chrome":t(/safari/g)&&(l="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",l="firefox"):t(/presto/g)?(o="presto",l="opera"):t(/trident|compatible|msie/g)&&(o="trident",l="iexplore");var s="unknow";"webkit"===o?s=n(/applewebkit\/[\d._]+/g):"gecko"===o?s=n(/gecko\/[\d._]+/g):"presto"===o?s=n(/presto\/[\d._]+/g):"trident"===o&&(s=n(/trident\/[\d._]+/g));var c="unknow";"chrome"===l?c=n(/chrome\/[\d._]+/g):"safari"===l?c=n(/version\/[\d._]+/g):"firefox"===l?c=n(/firefox\/[\d._]+/g):"opera"===l?c=n(/opr\/[\d._]+/g):"iexplore"===l?c=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===l&&(c=n(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=n(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=n(/maxthon\/[\d._]+/g));var g=Object.assign({engine:o,engineVs:s,platform:a,supporter:l,supporterVs:c,system:i,systemVs:r},"none"===u?{}:{shell:u,shellVs:d});return console.log("%c\n .d88b. d888888b d8b db d888b db .d88b. d8b db d888b \n.8P Y8. `88' 888o 88 88' Y8b 88 .8P Y8. 888o 88 88' Y8b \n88 88 88 88V8o 88 88 88 88 88 88V8o 88 88 \n88 88 88 88 V8o88 88 ooo 88 88 88 88 V8o88 88 ooo \n`8P d8' .88. 88 V888 88. ~8~ 88booo. `8b d8' 88 V888 88. ~8~ \n `Y88'Y8 Y888888P VP V8P Y888P Y88888P `Y88P' VP V8P Y888P \n \n \n","color: blue;font-size: 14px;"),console.log("%c忘形雨笠烟蓑,知心牧唱樵歌。明月清风共我,闲人三个,从他今古消磨。\n","color: yellow;font-size: 18px;"),console.log("%c青龙运行环境:\n\n系统:".concat(g.system,"/").concat(g.systemVs,"\n浏览器:").concat(g.supporter,"/").concat(g.supporterVs,"\n内核:").concat(g.engine,"/").concat(g.engineVs),"color: green;font-size: 14px;font-weight: bold;"),g}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,n=e.target;void 0===t&&(t=99);var i=null,r=0;(i=n||document.querySelector(".ant-table-wrapper"))&&(r=i.getBoundingClientRect().top);var a=document.body.clientHeight-r-t;return a}function d(e,t){var n,i,r=window.URL||window.webkitURL||window,a=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=r.createObjectURL(a),o.download=e,n=o,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}function g(e,t,n){var i=r()(e),a=[];return function e(i){if(i)for(var r=0;r<(null==i?void 0:i.length);r++){if(t(i[r]))return n?void(i[r].children?i[r].children.unshift(n):i[r].children=[n]):void i.splice(r,1);i[r].children&&(a.push(i[r].key),e(i[r].children))}}(i),i}function f(e,t){var n;return function e(i){if(i)for(var r=0;r<(null==i?void 0:i.length);r++)t(i[r])?n=i[r]:i[r].children&&e(i[r].children)}(r()(e)),n}function p(e){return["     ",a.ZP.get("执行结束")].some((function(t){return e.includes(t)}))}function m(e){var t=e.split(" ");if("repo"===t[1]||"raw"===t[1])return t[2];var n=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(n){var i,r;n.startsWith("/ql/data/scripts")&&(n=n.replace("/ql/data/scripts/",""));var a=n.lastIndexOf("/");return a>=0?(r=n.slice(a+1),i=n.slice(0,a)):(r=n,i=""),[r,i]}}function h(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function Z(e,t){var n=h(e);return null!=t&&t.length&&t.forEach((function(e){var t=h(e);t&&(!n||t<n)&&(n=t)})),n}function x(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o[t]}},38433:function(){}}]);
@@ -1 +0,0 @@
1
- .ant-table-pagination.ant-pagination{margin-bottom:0!important}.crontab-detail .card-wrapper .ant-card:last-child .ant-card-body{min-height:0;height:calc(80vh - 314px);height:calc(80vh - var(--vh-offset, 0px) - 314px);overflow-y:auto}.crontab-detail .card-wrapper .ant-card:last-child .ant-card-body>div{height:100%}.crontab-detail .ant-modal-body{background:#eee;padding:12px;max-height:calc(80vh - 57px);max-height:calc(80vh - var(--vh-offset, 57px))}.crontab-detail .ant-card-body{padding:18px}.crontab-detail .ant-card-head{padding:0 18px}.crontab-detail .ant-card:first-child{max-height:66px;overflow:auto}.crontab-detail .ant-card:first-child .ant-card-body{min-width:1000px}.crontab-detail .ant-card:first-child .cron-detail-info-item{display:flex}.crontab-detail .ant-card:first-child .cron-detail-info-item .cron-detail-info-title{width:50px}.crontab-detail .ant-card:first-child .cron-detail-info-item .cron-detail-info-value{flex:1 1;margin-top:0}.crontab-detail .ant-card:nth-child(2){overflow-x:auto}.crontab-detail .ant-card:nth-child(2) .ant-card-body{display:flex;justify-content:space-between;min-width:1000px}.crontab-detail .cron-detail-info-item{flex:auto}.crontab-detail .cron-detail-info-item .cron-detail-info-title{color:#888}.crontab-detail .cron-detail-info-item .cron-detail-info-value{margin-top:12px}.crontab-detail .crontab-title-wrapper{display:flex;align-items:center;justify-content:space-between}.crontab-detail .crontab-title-wrapper .operations{display:flex;align-items:center}.crontab-detail .crontab-title-wrapper .operations .ant-btn:not(:first-child){margin-left:8px}.log-item{cursor:pointer}.log-item:hover{background:#f2f2f2}.crontab-view .ant-tabs-nav-wrap{flex:unset!important}.crontab-view .ant-tabs-nav-operations{position:absolute;visibility:hidden;pointer-events:none}.crontab-view .view-more{margin-left:32px;padding:8px 0;cursor:pointer}.crontab-view .view-more .ant-tabs-ink-bar{width:0}.crontab-view .view-more:hover,.crontab-view .view-more:focus-visible{color:#1890ff}.crontab-view .view-more:hover .ant-tabs-ink-bar,.crontab-view .view-more:focus-visible .ant-tabs-ink-bar{width:50px}.crontab-view .view-more.active{color:#1890ff}.crontab-view .view-more.active .ant-tabs-ink-bar{width:50px}.crontab-view.more-active .ant-tabs-nav-list .ant-tabs-tab.ant-tabs-tab-active .ant-tabs-tab-btn{color:unset}.crontab-view.more-active .ant-tabs-nav-list .ant-tabs-ink-bar{width:0!important}.view-create-modal-filters{display:flex}.view-create-modal-filters .ant-space-item:nth-child(3){flex:1 1}.view-create-modal-sorts{display:flex}.view-create-modal-sorts .ant-space-item:nth-child(1){flex:1 1}tr.drop-over-downward td{border-bottom:2px dashed #1890ff}tr.drop-over-upward td{border-top:2px dashed #1890ff}.view-manage-modal .ant-modal-body{padding-top:10px}.view-filters-container.active .filter-item>div>.ant-form-item-control{margin-left:40px;width:calc(100% - 40px)}body[data-mode=desktop] .crontab-wrapper tbody .ant-table-cell{height:69px!important}.cron.pinned-cron>td{background:#f2f2f2}
@@ -1 +0,0 @@
1
- (self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9914],{20209:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M686.7 638.6L544.1 535.5V288c0-4.4-3.6-8-8-8H488c-4.4 0-8 3.6-8 8v275.4c0 2.6 1.2 5 3.3 6.5l165.4 120.6c3.6 2.6 8.6 1.8 11.2-1.7l28.6-39c2.6-3.7 1.8-8.7-1.8-11.2z"}}]},name:"clock-circle",theme:"outlined"},a=n(46420),c=function(e,t){return r.createElement(a.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:s}))};c.displayName="ClockCircleOutlined";var o=r.forwardRef(c)},13740:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},a=n(46420),c=function(e,t){return r.createElement(a.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:s}))};c.displayName="DeleteOutlined";var o=r.forwardRef(c)},65601:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var i=n(14797),r=n(63313),s={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},a=n(46420),c=function(e,t){return r.createElement(a.Z,(0,i.Z)((0,i.Z)({},e),{},{ref:t,icon:s}))};c.displayName="Loading3QuartersOutlined";var o=r.forwardRef(c)},9839:function(e,t,n){"use strict";var i=n(54306),r=n.n(i),s=n(63313),a=n(61761),c=n(40141);t.Z=function(e,t){var n=(0,s.useState)(0),i=r()(n,2),o=i[0],u=i[1];return(0,a.Z)(e,(function(e){var n=e.target;n.classList.contains("ant-table-wrapper")||(n=e.target.querySelector(".ant-table-wrapper")),u((0,c.W9)({extraHeight:t,target:n}))})),o}},39079:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return te}});var i=n(93525),r=n.n(i),s=n(54306),a=n.n(s),c=n(57213),o=n.n(c),u=n(88265),l=n(63313),d=n(92260),f=n(22159),h=n(2947),v=n(51704),p=n(15367),m=n(84163),g=n(24378),y=n(86986),x=n(94674),Z=n(14797),b={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 01755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8zm756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 01512.1 856a342.24 342.24 0 01-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 00-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 00-8-8.2z"}}]},name:"sync",theme:"outlined"},k=n(46420),w=function(e,t){return l.createElement(k.Z,(0,Z.Z)((0,Z.Z)({},e),{},{ref:t,icon:b}))};w.displayName="SyncOutlined";var $=l.forwardRef(w),j=n(38101),S=n(76657),P=n(20209),M={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494zM504 618H320c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM312 490v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H320c-4.4 0-8 3.6-8 8z"}}]},name:"file-text",theme:"outlined"},C=function(e,t){return l.createElement(k.Z,(0,Z.Z)((0,Z.Z)({},e),{},{ref:t,icon:M}))};C.displayName="FileTextOutlined";var D=l.forwardRef(C),O={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M304 280h56c4.4 0 8-3.6 8-8 0-28.3 5.9-53.2 17.1-73.5 10.6-19.4 26-34.8 45.4-45.4C450.9 142 475.7 136 504 136h16c28.3 0 53.2 5.9 73.5 17.1 19.4 10.6 34.8 26 45.4 45.4C650 218.9 656 243.7 656 272c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-40-8.8-76.7-25.9-108.1a184.31 184.31 0 00-74-74C596.7 72.8 560 64 520 64h-16c-40 0-76.7 8.8-108.1 25.9a184.31 184.31 0 00-74 74C304.8 195.3 296 232 296 272c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M940 512H792V412c76.8 0 139-62.2 139-139 0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8a63 63 0 01-63 63H232a63 63 0 01-63-63c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 76.8 62.2 139 139 139v100H84c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h148v96c0 6.5.2 13 .7 19.3C164.1 728.6 116 796.7 116 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-44.2 23.9-82.9 59.6-103.7a273 273 0 0022.7 49c24.3 41.5 59 76.2 100.5 100.5S460.5 960 512 960s99.8-13.9 141.3-38.2a281.38 281.38 0 00123.2-149.5A120 120 0 01836 876c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8 0-79.3-48.1-147.4-116.7-176.7.4-6.4.7-12.8.7-19.3v-96h148c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM716 680c0 36.8-9.7 72-27.8 102.9-17.7 30.3-43 55.6-73.3 73.3C584 874.3 548.8 884 512 884s-72-9.7-102.9-27.8c-30.3-17.7-55.6-43-73.3-73.3A202.75 202.75 0 01308 680V412h408v268z"}}]},name:"bug",theme:"outlined"},H=function(e,t){return l.createElement(k.Z,(0,Z.Z)((0,Z.Z)({},e),{},{ref:t,icon:O}))};H.displayName="BugOutlined";var I=l.forwardRef(H),z=n(13740),A={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"}}]},name:"delete",theme:"filled"},T=function(e,t){return l.createElement(k.Z,(0,Z.Z)((0,Z.Z)({},e),{},{ref:t,icon:A}))};T.displayName="DeleteFilled";var L=l.forwardRef(T),_=n(15207),E=n(23435),W=n(57229),N=n(53261),Y=n(12701),F=n(66255),R=n(71467),B=n(14851),V=n(9839),q=n(52053),J=n.n(q),U=n(21758),K=n(11527),Q=d.Z.Text,G=f.Z.Search,X=function(e){return e[e["安装中"]=0]="安装中",e[e["已安装"]=1]="已安装",e[e["安装失败"]=2]="安装失败",e[e["删除中"]=3]="删除中",e[e["已删除"]=4]="已删除",e[e["删除失败"]=5]="删除失败",e[e["队列中"]=6]="队列中",e}(X||{}),ee={0:{icon:(0,K.jsx)($,{spin:!0}),color:"processing"},1:{icon:(0,K.jsx)(j.Z,{}),color:"success"},2:{icon:(0,K.jsx)(S.Z,{}),color:"error"},3:{icon:(0,K.jsx)($,{spin:!0}),color:"processing"},4:{icon:(0,K.jsx)(j.Z,{}),color:"success"},5:{icon:(0,K.jsx)(S.Z,{}),color:"error"},6:{icon:(0,K.jsx)(P.Z,{}),color:"default"}},te=function(){var e=(0,B.useOutletContext)(),t=e.headerStyle,n=e.isPhone,i=[{title:u.ZP.get("序号"),width:90,render:function(e,t,n){return(0,K.jsxs)("span",{style:{cursor:"text"},children:[n+1," "]})}},{title:u.ZP.get("名称"),dataIndex:"name",width:180,key:"name"},{title:u.ZP.get("状态"),key:"status",width:120,dataIndex:"status",render:function(e,t,n){var i,r;return console.log(t.status),(0,K.jsx)(h.Z,{size:"middle",style:{cursor:"text"},children:(0,K.jsx)(v.Z,{color:null===(i=ee[t.status])||void 0===i?void 0:i.color,icon:null===(r=ee[t.status])||void 0===r?void 0:r.icon,style:{marginRight:0},children:u.ZP.get(X[t.status])})})}},{title:u.ZP.get("备注"),dataIndex:"remark",width:100,key:"remark"},{title:u.ZP.get("更新时间"),key:"updatedAt",dataIndex:"updatedAt",width:150,render:function(e){return(0,K.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("创建时间"),key:"createdAt",dataIndex:"createdAt",width:150,render:function(e){return(0,K.jsx)("span",{children:J()(e).format("YYYY-MM-DD HH:mm:ss")})}},{title:u.ZP.get("操作"),key:"action",width:140,render:function(e,t,i){var r=!n;return(0,K.jsxs)(h.Z,{size:"middle",children:[(0,K.jsx)(p.Z,{title:r?u.ZP.get("日志"):"",children:(0,K.jsx)("a",{onClick:function(){ue(o()(o()({},t),{},{timestamp:Date.now()}))},children:(0,K.jsx)(D,{})})}),t.status!==X.安装中&&t.status!==X.删除中&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(p.Z,{title:r?u.ZP.get("重新安装"):"",children:(0,K.jsx)("a",{onClick:function(){return ke(t,i)},children:(0,K.jsx)(I,{})})}),(0,K.jsx)(p.Z,{title:r?u.ZP.get("删除"):"",children:(0,K.jsx)("a",{onClick:function(){return be(t,i)},children:(0,K.jsx)(z.Z,{})})}),(0,K.jsx)(p.Z,{title:r?u.ZP.get("强制删除"):"",children:(0,K.jsx)("a",{onClick:function(){return be(t,i,!0)},children:(0,K.jsx)(L,{})})})]})]})}}],s=(0,l.useState)([]),c=a()(s,2),d=c[0],f=c[1],Z=(0,l.useState)(!0),b=a()(Z,2),k=b[0],w=b[1],$=(0,l.useState)(!1),j=a()($,2),S=j[0],P=j[1],M=(0,l.useState)(),C=a()(M,2),O=C[0],H=C[1],A=(0,l.useState)([]),T=a()(A,2),q=T[0],te=T[1],ne=(0,l.useState)(""),ie=a()(ne,2),re=ie[0],se=ie[1],ae=(0,l.useState)(),ce=a()(ae,2),oe=ce[0],ue=ce[1],le=(0,l.useState)(!1),de=a()(le,2),fe=de[0],he=de[1],ve=(0,l.useState)("nodejs"),pe=a()(ve,2),me=pe[0],ge=pe[1],ye=(0,l.useRef)(null),xe=(0,V.Z)(ye,59),Ze=function(){w(!0),W.W.get("".concat(_.Z.apiPrefix,"dependencies?searchValue=").concat(re,"&type=").concat(me)).then((function(e){var t=e.code,n=e.data;200===t&&f(n)})).finally((function(){return w(!1)}))},be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,K.jsxs)(K.Fragment,{children:[u.ZP.get("确认删除依赖")," ",(0,K.jsx)(Q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){W.W.delete("".concat(_.Z.apiPrefix,"dependencies").concat(n?"/force":""),{data:[e.id]}).then((function(e){var t=e.code,i=e.data;if(200===t&&n){var s=d.findIndex((function(e){return e.id===i[0].id}));if(-1!==s){var a=r()(d);a.splice(s,1),f(a)}}}))},onCancel:function(){console.log("Cancel")}})},ke=function(e,t){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,K.jsxs)(K.Fragment,{children:[u.ZP.get("确认重新安装")," ",(0,K.jsx)(Q,{style:{wordBreak:"break-all"},type:"warning",children:e.name})," ",u.ZP.get("吗")]}),onOk:function(){W.W.put("".concat(_.Z.apiPrefix,"dependencies/reinstall"),[e.id]).then((function(e){var t=e.code,n=e.data;200===t&&we(n[0])}))},onCancel:function(){console.log("Cancel")}})},we=function(e){var t=r()(d);if(Array.isArray(e))t.unshift.apply(t,r()(e));else{var n=d.findIndex((function(t){return t.id===e.id}));-1!==n&&t.splice(n,1,o()({},e))}f(t)},$e={selectedRowKeys:q,onChange:function(e){te(e)}},je=function(e){var t=e?"/force":"";m.Z.confirm({title:u.ZP.get("确认删除"),content:(0,K.jsx)(K.Fragment,{children:u.ZP.get("确认删除选中的依赖吗")}),onOk:function(){W.W.delete("".concat(_.Z.apiPrefix,"dependencies").concat(t),{data:q}).then((function(e){var t=e.code;e.data;200===t&&(te([]),Ze())}))},onCancel:function(){console.log("Cancel")}})};(0,l.useEffect)((function(){Ze()}),[re,me]),(0,l.useEffect)((function(){oe&&(localStorage.setItem("logDependence",oe.id),he(!0))}),[oe]);var Se=(0,l.useCallback)((function(e){var t=e.message,n=e.references,i=void 0;t.includes("开始时间")&&n.length>0&&(i=t.includes("安装")?X.安装中:X.删除中),t.includes("结束时间")&&n.length>0&&(i=t.includes("安装")?t.includes("成功")?X.已安装:X.安装失败:t.includes("成功")?X.已删除:X.删除失败)===X.已删除?setTimeout((function(){f((function(e){for(var t=r()(e),i=function(i){var r=e.findIndex((function(e){return e.id===n[i]}));-1!==r&&t.splice(r,1)},s=0;s<n.length;s++)i(s);return t}))}),5e3):"number"==typeof i&&f((function(e){for(var t=r()(e),s=function(r){var s=e.findIndex((function(e){return e.id===n[r]}));-1!==s&&t.splice(s,1,o()(o()({},e[s]),{},{status:i}))},a=0;a<n.length;a++)s(a);return t}))}),[]);(0,l.useEffect)((function(){var e=U.Z.getInstance();return e.subscribe("installDependence",Se),e.subscribe("uninstallDependence",Se),function(){e.unsubscribe("installDependence",Se),e.unsubscribe("uninstallDependence",Se)}}),[]);return(0,K.jsxs)(E.ZP,{className:"ql-container-wrapper dependence-wrapper ql-container-wrapper-has-tab",title:u.ZP.get("依赖管理"),extra:[(0,K.jsx)(G,{placeholder:u.ZP.get("请输入名称"),style:{width:"auto"},enterButton:!0,loading:k,onSearch:function(e){se(e.trim())}}),(0,K.jsx)(g.Z,{type:"primary",onClick:function(){return H(null),void P(!0)},children:u.ZP.get("创建依赖")},"2")],header:{style:t},children:[(0,K.jsx)(y.Z,{defaultActiveKey:"nodejs",size:"small",tabPosition:"top",onChange:function(e){te([]),ge(e)},items:[{key:"nodejs",label:"NodeJs"},{key:"python3",label:"Python3"},{key:"linux",label:"Linux"}]}),(0,K.jsxs)("div",{ref:ye,children:[q.length>0&&(0,K.jsxs)("div",{style:{marginBottom:16},children:[(0,K.jsx)(g.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){m.Z.confirm({title:u.ZP.get("确认重新安装"),content:(0,K.jsx)(K.Fragment,{children:u.ZP.get("确认重新安装选中的依赖吗")}),onOk:function(){W.W.put("".concat(_.Z.apiPrefix,"dependencies/reinstall"),q).then((function(e){var t=e.code;e.data,200===t&&(te([]),Ze())}))},onCancel:function(){console.log("Cancel")}})},children:u.ZP.get("批量安装")}),(0,K.jsx)(g.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return je(!1)},children:u.ZP.get("批量删除")}),(0,K.jsx)(g.Z,{type:"primary",style:{marginBottom:5,marginLeft:8},onClick:function(){return je(!0)},children:u.ZP.get("批量强制删除")}),(0,K.jsxs)("span",{style:{marginLeft:8},children:[u.ZP.get("已选择"),(0,K.jsx)("a",{children:null==q?void 0:q.length}),u.ZP.get("项")]})]}),(0,K.jsx)(Y.W,{backend:F.PD,children:(0,K.jsx)(x.Z,{columns:i,rowSelection:$e,pagination:!1,dataSource:d,rowKey:"id",size:"middle",scroll:{x:768,y:xe},loading:k})})]}),(0,K.jsx)(N.default,{visible:S,handleCancel:function(e){P(!1),e&&we(e)},dependence:O,defaultType:me}),oe&&(0,K.jsx)(R.default,{visible:fe,handleCancel:function(e){if(he(!1),e){var t=d.findIndex((function(e){return e.id===oe.id})),n=r()(d);-1!==t&&(n.splice(t,1),f(n))}else r()(d).map((function(e){return e.id})).includes(oe.id)&&function(e){W.W.get("".concat(_.Z.apiPrefix,"dependencies/").concat(e.id)).then((function(t){var n=t.code,i=t.data;if(200===n){var s=d.findIndex((function(t){return t.id===e.id})),a=r()(d);-1!==s&&(a.splice(s,1,o()(o()({},e),i)),f(a))}})).finally((function(){return w(!1)}))}(oe)},dependence:oe})]})}},71467:function(e,t,n){"use strict";n.r(t);var i=n(54306),r=n.n(i),s=n(88265),a=n(63313),c=n(84163),o=n(24378),u=n(57229),l=n(15207),d=n(65601),f=n(38101),h=n(4574),v=n(99120),p=n.n(v),m=n(21758),g=n(11527);t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,v=(0,a.useState)(""),y=r()(v,2),x=y[0],Z=y[1],b=(0,a.useState)(!0),k=r()(b,2),w=k[0],$=k[1],j=(0,a.useState)(!1),S=r()(j,2),P=S[0],M=S[1],C=(0,a.useState)(!0),D=r()(C,2),O=D[0],H=D[1],I=(0,a.useState)(!1),z=r()(I,2),A=z[0],T=z[1],L=(0,a.useState)(!1),_=r()(L,2),E=_[0],W=_[1],N=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),n(e)};(0,a.useEffect)((function(){t&&(H(!0),u.W.get("".concat(l.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var n=e.code,i=e.data;if(200===n&&localStorage.getItem("logDependence")===String(t.id)){var r=((null==i?void 0:i.log)||[]).join("");Z(r),$(!r.includes("结束时间")),T(r.includes("删除失败"))}})).finally((function(){H(!1)})))}),[t]);var Y=function(e){var n=e.message,i=e.references;i.length>0&&i.includes(t.id)&&(n.includes("结束时间")&&($(!1),T(n.includes("删除失败"))),Z((function(e){return"".concat(e).concat(n)})))};return(0,a.useEffect)((function(){var e=m.Z.getInstance();return e.subscribe("installDependence",Y),function(){e.unsubscribe("installDependence",Y)}}),[]),(0,a.useEffect)((function(){M(document.body.clientWidth<768)}),[]),(0,g.jsx)(c.Z,{title:(0,g.jsxs)(g.Fragment,{children:[w&&(0,g.jsx)(d.Z,{spin:!0}),!w&&(0,g.jsx)(f.Z,{}),(0,g.jsxs)("span",{style:{marginLeft:5},children:[s.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:i,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return N()},onCancel:function(){return N()},footer:[(0,g.jsx)(o.Z,{type:"primary",onClick:function(){A?(W(!0),u.W.delete("".concat(l.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&N(!0)})).finally((function(){W(!1)}))):N()},loading:E,children:A?s.ZP.get("强制删除"):s.ZP.get("知道了")})],children:(0,g.jsx)("div",{className:"log-container",children:O?(0,g.jsx)(h.Z,{}):(0,g.jsx)("pre",{style:P?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,g.jsx)(p(),{children:x})})})})}},53261:function(e,t,n){"use strict";n.r(t);var i=n(25359),r=n.n(i),s=n(57213),a=n.n(s),c=n(49811),o=n.n(c),u=n(54306),l=n.n(u),d=n(88265),f=n(63313),h=n(28756),v=n(67393),p=n(84163),m=n(84468),g=n(22159),y=n(57229),x=n(15207),Z=n(11527),b=h.Z.Option,k=function(e){return e[e.nodejs=0]="nodejs",e[e.python3=1]="python3",e[e.linux=2]="linux",e}(k||{});t.default=function(e){var t=e.dependence,n=e.handleCancel,i=e.visible,s=e.defaultType,c=v.Z.useForm(),u=l()(c,1)[0],w=(0,f.useState)(!1),$=l()(w,2),j=$[0],S=$[1],P=function(){var e=o()(r()().mark((function e(i){var s,c,o,u,l,d,f,h,v,p;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S(!0),s=i.name,c=i.split,o=i.type,u=i.remark,l=t?"put":"post",t?d=a()(a()({},i),{},{id:t.id}):"1"===c?(f=s.includes("&")?"&":"\n",d=s.split(f).map((function(e){return{name:e,type:o,remark:u}}))):d=[{name:s,type:o,remark:u}],e.prev=4,e.next=7,y.W[l]("".concat(x.Z.apiPrefix,"dependencies"),d);case 7:h=e.sent,v=h.code,p=h.data,200===v&&n(p),S(!1),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(4),S(!1);case 17:case"end":return e.stop()}}),e,null,[[4,14]])})));return function(t){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){u.resetFields()}),[t,i]),(0,Z.jsx)(p.Z,{title:t?d.ZP.get("编辑依赖"):d.ZP.get("创建依赖"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){u.validateFields().then((function(e){P(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:j,children:(0,Z.jsxs)(v.Z,{form:u,layout:"vertical",name:"dependence_modal",initialValues:t,children:[(0,Z.jsx)(v.Z.Item,{name:"type",label:d.ZP.get("依赖类型"),initialValue:k[s],children:(0,Z.jsx)(h.Z,{children:x.Z.dependenceTypes.map((function(e,t){return(0,Z.jsx)(b,{value:t,children:e},t)}))})}),!t&&(0,Z.jsx)(v.Z.Item,{name:"split",label:d.ZP.get("自动拆分"),initialValue:"0",tooltip:d.ZP.get("多个依赖是否换行分割"),children:(0,Z.jsxs)(m.ZP.Group,{children:[(0,Z.jsx)(m.ZP,{value:"1",children:d.ZP.get("是")}),(0,Z.jsx)(m.ZP,{value:"0",children:d.ZP.get("否")})]})}),(0,Z.jsx)(v.Z.Item,{name:"name",label:d.ZP.get("名称"),rules:[{required:!0,message:d.ZP.get("请输入依赖名称,支持指定版本"),whitespace:!0}],children:(0,Z.jsx)(g.Z.TextArea,{rows:4,autoSize:{minRows:1,maxRows:5},placeholder:d.ZP.get("请输入依赖名称")})}),(0,Z.jsx)(v.Z.Item,{name:"remark",label:d.ZP.get("备注"),children:(0,Z.jsx)(g.Z,{placeholder:d.ZP.get("请输入备注")})})]})})}},21758:function(e,t,n){"use strict";var i=n(93525),r=n.n(i),s=n(12342),a=n.n(s),c=n(25359),o=n.n(c),u=n(49811),l=n.n(u),d=n(21140),f=n.n(d),h=n(63466),v=n.n(h),p=n(52510),m=n.n(p),g=n(78078),y=n.n(g),x=["type"],Z=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f()(this,e),m()(this,"url",void 0),m()(this,"socket",null),m()(this,"subscriptions",new Map),m()(this,"options",void 0),m()(this,"reconnectAttempts",0),m()(this,"heartbeatTimeout",null),m()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return v()(e,[{key:"init",value:(n=l()(o()().mark((function e(){var t=this;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(y())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=l()(o()().mark((function e(){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var i={action:"subscribe",topic:e};this.send(i)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var i={action:"unsubscribe",topic:e};this.send(i)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=a()(e,x),i=this.subscriptions.get(t)||new Set;r()(i).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===y().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();m()(Z,"instance",null),t.Z=Z},52053:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,i="millisecond",r="second",s="minute",a="hour",c="day",o="week",u="month",l="quarter",d="year",f="date",h="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,m={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"}},g=function(e,t,n){var i=String(e);return!i||i.length>=t?e:""+Array(t+1-i.length).join(n)+e},y={s:g,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),i=Math.floor(n/60),r=n%60;return(t<=0?"+":"-")+g(i,2,"0")+":"+g(r,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var i=12*(n.year()-t.year())+(n.month()-t.month()),r=t.clone().add(i,u),s=n-r<0,a=t.clone().add(i+(s?-1:1),u);return+(-(i+(n-r)/(s?r-a:a-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:d,w:o,d:c,D:f,h:a,m:s,s:r,ms:i,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},x="en",Z={};Z[x]=m;var b=function(e){return e instanceof j},k=function e(t,n,i){var r;if(!t)return x;if("string"==typeof t){var s=t.toLowerCase();Z[s]&&(r=s),n&&(Z[s]=n,r=s);var a=t.split("-");if(!r&&a.length>1)return e(a[0])}else{var c=t.name;Z[c]=t,r=c}return!i&&r&&(x=r),r||!i&&x},w=function(e,t){if(b(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new j(n)},$=y;$.l=k,$.i=b,$.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var j=function(){function m(e){this.$L=k(e.locale,null,!0),this.parse(e)}var g=m.prototype;return g.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if($.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var i=t.match(v);if(i){var r=i[2]-1||0,s=(i[7]||"0").substring(0,3);return n?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},g.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},g.$utils=function(){return $},g.isValid=function(){return!(this.$d.toString()===h)},g.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},g.isAfter=function(e,t){return w(e)<this.startOf(t)},g.isBefore=function(e,t){return this.endOf(t)<w(e)},g.$g=function(e,t,n){return $.u(e)?this[t]:this.set(n,e)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(e,t){var n=this,i=!!$.u(t)||t,l=$.p(e),h=function(e,t){var r=$.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return i?r:r.endOf(c)},v=function(e,t){return $.w(n.toDate()[e].apply(n.toDate("s"),(i?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,m=this.$M,g=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case d:return i?h(1,0):h(31,11);case u:return i?h(1,m):h(0,m+1);case o:var x=this.$locale().weekStart||0,Z=(p<x?p+7:p)-x;return h(i?g-Z:g+(6-Z),m);case c:case f:return v(y+"Hours",0);case a:return v(y+"Minutes",1);case s:return v(y+"Seconds",2);case r:return v(y+"Milliseconds",3);default:return this.clone()}},g.endOf=function(e){return this.startOf(e,!1)},g.$set=function(e,t){var n,o=$.p(e),l="set"+(this.$u?"UTC":""),h=(n={},n[c]=l+"Date",n[f]=l+"Date",n[u]=l+"Month",n[d]=l+"FullYear",n[a]=l+"Hours",n[s]=l+"Minutes",n[r]=l+"Seconds",n[i]=l+"Milliseconds",n)[o],v=o===c?this.$D+(t-this.$W):t;if(o===u||o===d){var p=this.clone().set(f,1);p.$d[h](v),p.init(),this.$d=p.set(f,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](v);return this.init(),this},g.set=function(e,t){return this.clone().$set(e,t)},g.get=function(e){return this[$.p(e)]()},g.add=function(i,l){var f,h=this;i=Number(i);var v=$.p(l),p=function(e){var t=w(h);return $.w(t.date(t.date()+Math.round(e*i)),h)};if(v===u)return this.set(u,this.$M+i);if(v===d)return this.set(d,this.$y+i);if(v===c)return p(1);if(v===o)return p(7);var m=(f={},f[s]=t,f[a]=n,f[r]=e,f)[v]||1,g=this.$d.getTime()+i*m;return $.w(g,this)},g.subtract=function(e,t){return this.add(-1*e,t)},g.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var i=e||"YYYY-MM-DDTHH:mm:ssZ",r=$.z(this),s=this.$H,a=this.$m,c=this.$M,o=n.weekdays,u=n.months,l=function(e,n,r,s){return e&&(e[n]||e(t,i))||r[n].slice(0,s)},d=function(e){return $.s(s%12||12,e,"0")},f=n.meridiem||function(e,t,n){var i=e<12?"AM":"PM";return n?i.toLowerCase():i},v={YY:String(this.$y).slice(-2),YYYY:$.s(this.$y,4,"0"),M:c+1,MM:$.s(c+1,2,"0"),MMM:l(n.monthsShort,c,u,3),MMMM:l(u,c),D:this.$D,DD:$.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,o,2),ddd:l(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:$.s(s,2,"0"),h:d(1),hh:d(2),a:f(s,a,!0),A:f(s,a,!1),m:String(a),mm:$.s(a,2,"0"),s:String(this.$s),ss:$.s(this.$s,2,"0"),SSS:$.s(this.$ms,3,"0"),Z:r};return i.replace(p,(function(e,t){return t||v[e]||r.replace(":","")}))},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(i,f,h){var v,p=$.p(f),m=w(i),g=(m.utcOffset()-this.utcOffset())*t,y=this-m,x=$.m(this,m);return x=(v={},v[d]=x/12,v[u]=x,v[l]=x/3,v[o]=(y-g)/6048e5,v[c]=(y-g)/864e5,v[a]=y/n,v[s]=y/t,v[r]=y/e,v)[p]||y,h?x:$.a(x)},g.daysInMonth=function(){return this.endOf(u).$D},g.$locale=function(){return Z[this.$L]},g.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),i=k(e,t,!0);return i&&(n.$L=i),n},g.clone=function(){return $.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},m}(),S=j.prototype;return w.prototype=S,[["$ms",i],["$s",r],["$m",s],["$H",a],["$W",c],["$M",u],["$y",d],["$D",f]].forEach((function(e){S[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||(e(t,j,w),e.$i=!0),w},w.locale=k,w.isDayjs=b,w.unix=function(e){return w(1e3*e)},w.en=Z[x],w.Ls=Z,w.p={},w}()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[1406],{65601:function(e,t,n){n.d(t,{Z:function(){return l}});var a=n(14797),r=n(63313),i={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874c-47-47-84-101.7-109.8-162.7C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3 22.2 52.4 53.9 99.5 94.3 139.9 40.4 40.4 87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952c59.4 0 117-11.6 171.3-34.6 52.4-22.2 99.5-53.9 139.9-94.3 40.4-40.4 72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512c0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874c-47 47-101.8 83.9-162.7 109.7-63.1 26.8-130.2 40.3-199.3 40.3z"}}]},name:"loading-3-quarters",theme:"outlined"},o=n(46420),s=function(e,t){return r.createElement(o.Z,(0,a.Z)((0,a.Z)({},e),{},{ref:t,icon:i}))};s.displayName="Loading3QuartersOutlined";var l=r.forwardRef(s)},71467:function(e,t,n){n.r(t);var a=n(54306),r=n.n(a),i=n(88265),o=n(63313),s=n(84163),l=n(24378),u=n(57229),c=n(15207),p=n(65601),g=n(38101),d=n(4574),h=n(99120),f=n.n(h),v=n(21758),b=n(11527);t.default=function(e){var t=e.dependence,n=e.handleCancel,a=e.visible,h=(0,o.useState)(""),P=r()(h,2),m=P[0],Z=P[1],k=(0,o.useState)(!0),y=r()(k,2),x=y[0],w=y[1],q=(0,o.useState)(!1),C=r()(q,2),S=C[0],B=C[1],E=(0,o.useState)(!0),A=r()(E,2),I=A[0],T=A[1],_=(0,o.useState)(!1),R=r()(_,2),H=R[0],K=R[1],L=(0,o.useState)(!1),M=r()(L,2),Q=M[0],U=M[1],D=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];localStorage.removeItem("logDependence"),n(e)};(0,o.useEffect)((function(){t&&(T(!0),u.W.get("".concat(c.Z.apiPrefix,"dependencies/").concat(t.id)).then((function(e){var n=e.code,a=e.data;if(200===n&&localStorage.getItem("logDependence")===String(t.id)){var r=((null==a?void 0:a.log)||[]).join("");Z(r),w(!r.includes("结束时间")),K(r.includes("删除失败"))}})).finally((function(){T(!1)})))}),[t]);var W=function(e){var n=e.message,a=e.references;a.length>0&&a.includes(t.id)&&(n.includes("结束时间")&&(w(!1),K(n.includes("删除失败"))),Z((function(e){return"".concat(e).concat(n)})))};return(0,o.useEffect)((function(){var e=v.Z.getInstance();return e.subscribe("installDependence",W),function(){e.unsubscribe("installDependence",W)}}),[]),(0,o.useEffect)((function(){B(document.body.clientWidth<768)}),[]),(0,b.jsx)(s.Z,{title:(0,b.jsxs)(b.Fragment,{children:[x&&(0,b.jsx)(p.Z,{spin:!0}),!x&&(0,b.jsx)(g.Z,{}),(0,b.jsxs)("span",{style:{marginLeft:5},children:[i.ZP.get("日志 -")," ",t&&t.name]})," "]}),open:a,centered:!0,className:"log-modal",forceRender:!0,onOk:function(){return D()},onCancel:function(){return D()},footer:[(0,b.jsx)(l.Z,{type:"primary",onClick:function(){H?(U(!0),u.W.delete("".concat(c.Z.apiPrefix,"dependencies/force"),{data:[t.id]}).then((function(e){var t=e.code;e.data,200===t&&D(!0)})).finally((function(){U(!1)}))):D()},loading:Q,children:H?i.ZP.get("强制删除"):i.ZP.get("知道了")})],children:(0,b.jsx)("div",{className:"log-container",children:I?(0,b.jsx)(d.Z,{}):(0,b.jsx)("pre",{style:S?{fontFamily:"Source Code Pro",zoom:.83}:{},children:(0,b.jsx)(f(),{children:m})})})})}},15207:function(e,t,n){var a=n(88265),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),apiPrefix:"".concat(r,"api/"),authKey:"token",layouts:[{name:"primary",include:[/.*/],exclude:[/(\/(en|zh))*\/login/]}],i18n:{languages:[{key:"pt-br",title:"Português",flag:"/portugal.svg"},{key:"en",title:"English",flag:"/america.svg"},{key:"zh",title:a.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:a.ZP.get("定时任务"),value:"crons"},{name:a.ZP.get("环境变量"),value:"envs"},{name:a.ZP.get("订阅管理"),value:"subscriptions"},{name:a.ZP.get("配置文件"),value:"configs"},{name:a.ZP.get("脚本管理"),value:"scripts"},{name:a.ZP.get("日志管理"),value:"logs"},{name:a.ZP.get("依赖管理"),value:"dependencies"},{name:a.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:a.ZP.get("定时任务"),envs:a.ZP.get("环境变量"),subscriptions:a.ZP.get("订阅管理"),configs:a.ZP.get("配置文件"),scripts:a.ZP.get("脚本管理"),logs:a.ZP.get("日志管理"),dependencies:a.ZP.get("依赖管理"),system:a.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:a.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:a.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:a.ZP.get("钉钉机器人")},{value:"weWorkBot",label:a.ZP.get("企业微信机器人")},{value:"weWorkApp",label:a.ZP.get("企业微信应用")},{value:"aibotk",label:a.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"chat",label:a.ZP.get("群晖chat")},{value:"email",label:a.ZP.get("邮箱")},{value:"lark",label:a.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:a.ZP.get("自定义通知")},{value:"closed",label:a.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:a.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:a.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"chatUrl",tip:a.ZP.get("chat的url地址"),required:!0},{label:"chatToken",tip:a.ZP.get("chat的token码"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:a.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:a.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:a.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:a.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:a.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:a.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:a.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:a.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:a.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:a.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:a.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:a.ZP.get("BARK推送消息的跳转URL")}],telegramBot:[{label:"telegramBotToken",tip:a.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:a.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:a.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:a.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:a.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:a.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:a.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:a.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:a.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:a.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:a.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:a.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:a.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:a.ZP.get("请输入要发送的目标"),items:[{value:"room",label:a.ZP.get("群聊")},{value:"contact",label:a.ZP.get("好友")}]},{label:"aibotkName",tip:a.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:a.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:a.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:a.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")}],lark:[{label:"larkKey",tip:a.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:a.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://nodemailer.com/smtp/well-known/"),required:!0},{label:"emailUser",tip:a.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:a.ZP.get("邮箱SMTP授权码"),required:!0}],pushMe:[{label:"pushMeKey",tip:a.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0}],chronocat:[{label:"chronocatURL",tip:a.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:a.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:a.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:a.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:a.ZP.get("请求头Content-Type"),required:!0,items:[{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:a.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:a.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:a.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":a.ZP.get("登录"),"/initialization":a.ZP.get("初始化"),"/crontab":a.ZP.get("定时任务"),"/env":a.ZP.get("环境变量"),"/subscription":a.ZP.get("订阅管理"),"/config":a.ZP.get("配置文件"),"/script":a.ZP.get("脚本管理"),"/diff":a.ZP.get("对比工具"),"/log":a.ZP.get("日志管理"),"/setting":a.ZP.get("系统设置"),"/error":a.ZP.get("错误日志"),"/dependence":a.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},57229:function(e,t,n){n.d(t,{W:function(){return f}});var a=n(25359),r=n.n(a),i=n(49811),o=n.n(i),s=n(88265),l=n(9835),u=n(15207),c=n(14851),p=n(73669);l.ZP.config({duration:2});var g=Date.now(),d=p.Z.create({timeout:6e4,params:{t:g}}),h=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];d.interceptors.request.use((function(e){var t=localStorage.getItem(u.Z.authKey);return t&&!h.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),d.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var n,a,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.status,![502,504].includes(n)){e.next=5;break}c.history.push("/error"),e.next=18;break;case 5:if(401!==n){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),c.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(a=t.data).code&&(i=a.message||a.data)&&l.ZP.error({content:i,style:{maxWidth:500,margin:"0 auto"}}),e.abrupt("return",a);case 15:e.prev=15,e.t0=e.catch(9);case 17:case 18:return e.abrupt("return",t);case 19:case"end":return e.stop()}}),e,null,[[9,15]])})));return function(t){return e.apply(this,arguments)}}(),(function(e){if(e.response){var t=e.response.data?e.response.data.message||e.message||e.response.data:e.response.statusText,n=e.response.status;[502,504].includes(n)?c.history.push("/error"):401===n?"/login"!==c.history.location.pathname&&(l.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),c.history.push("/login")):l.ZP.error({content:t,style:{maxWidth:500,margin:"0 auto"}})}else console.log(e.message);return Promise.reject(e)}));var f=d},21758:function(e,t,n){var a=n(93525),r=n.n(a),i=n(12342),o=n.n(i),s=n(25359),l=n.n(s),u=n(49811),c=n.n(u),p=n(21140),g=n.n(p),d=n(63466),h=n.n(d),f=n(52510),v=n.n(f),b=n(78078),P=n.n(b),m=["type"],Z=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g()(this,e),v()(this,"url",void 0),v()(this,"socket",null),v()(this,"subscriptions",new Map),v()(this,"options",void 0),v()(this,"reconnectAttempts",0),v()(this,"heartbeatTimeout",null),v()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:n.maxReconnectAttempts||5,reconnectInterval:n.reconnectInterval||3e3,heartbeatInterval:n.heartbeatInterval||3e4},this.init()}var t,n;return h()(e,[{key:"init",value:(n=c()(l()().mark((function e(){var t=this;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,this.state="connecting",this.emit("connecting");case 3:if(!(this.reconnectAttempts<this.options.maxReconnectAttempts)){e.next=16;break}return this.socket=new(P())(this.url),this.setupEventListeners(),this.startHeartbeat(),e.next=9,this.waitForClose();case 9:return this.stopHeartbeat(),this.socket=null,this.reconnectAttempts++,e.next=14,new Promise((function(e){return setTimeout(e,t.options.reconnectInterval)}));case 14:e.next=3;break;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),this.handleError(e.t0);case 21:case"end":return e.stop()}}),e,this,[[0,18]])}))),function(){return n.apply(this,arguments)})},{key:"setupEventListeners",value:function(){var e=this;this.socket&&(this.socket.onopen=function(){e.state="open",e.emit("open")},this.socket.onmessage=function(t){var n=JSON.parse(t.data);e.dispatchMessage(n)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=c()(l()().mark((function e(){var t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===P().CLOSED){e.next=5;break}return e.next=3,new Promise((function(e){return setTimeout(e,100)}));case 3:e.next=0;break;case 5:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"subscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(!n.has(t)){n.add(t),this.subscriptions.set(e,n);var a={action:"subscribe",topic:e};this.send(a)}}},{key:"unsubscribe",value:function(e,t){var n=this.subscriptions.get(e)||new Set;if(n.has(t)){n.delete(t);var a={action:"unsubscribe",topic:e};this.send(a)}}},{key:"send",value:function(e){var t;(null===(t=this.socket)||void 0===t?void 0:t.readyState)===P().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=o()(e,m),a=this.subscriptions.get(t)||new Set;r()(a).forEach((function(e){return e(n)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===P().OPEN&&e.socket.send(JSON.stringify({type:"heartbeat"}))}),this.options.heartbeatInterval)}},{key:"stopHeartbeat",value:function(){this.heartbeatTimeout&&clearInterval(this.heartbeatTimeout)}},{key:"close",value:function(){this.socket&&(this.state="closed",this.stopHeartbeat(),this.socket.close(),this.emit("close"))}},{key:"handleError",value:function(e){console.error("WebSocket错误:",e),this.emit("error",e)}},{key:"on",value:function(e,t){}},{key:"emit",value:function(e,t){}}],[{key:"getInstance",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,n)),e.instance}}]),e}();v()(Z,"instance",null),t.Z=Z},16082:function(e,t,n){n.d(t,{mL:function(){return l},q0:function(){return s}});var a=function(){return{height:0,opacity:0}},r=function(e){return{height:e.scrollHeight,opacity:1}},i=function(e,t){return!0===(null==t?void 0:t.deadline)||"height"===t.propertyName},o={motionName:"ant-motion-collapse",onAppearStart:a,onEnterStart:a,onAppearActive:r,onEnterActive:r,onLeaveStart:function(e){return{height:e?e.offsetHeight:0}},onLeaveActive:a,onAppearEnd:i,onEnterEnd:i,onLeaveEnd:i,motionDeadline:500},s=((0,n(20341).b)("bottomLeft","bottomRight","topLeft","topRight"),function(e){return void 0===e||"topLeft"!==e&&"topRight"!==e?"slide-up":"slide-down"}),l=function(e,t,n){return void 0!==n?n:"".concat(e,"-").concat(t)};t.ZP=o},76737:function(e,t,n){n.d(t,{RV:function(){return u},Rk:function(){return c},Ux:function(){return g},aM:function(){return p},q3:function(){return s},qI:function(){return l}});var a=n(88028),r=n(14542),i=n(54331),o=n(63313),s=o.createContext({labelAlign:"right",vertical:!1,itemRef:function(){}}),l=o.createContext(null),u=function(e){var t=(0,i.Z)(e,["prefixCls"]);return o.createElement(r.FormProvider,(0,a.Z)({},t))},c=o.createContext({prefixCls:""}),p=o.createContext({}),g=function(e){var t=e.children,n=e.status,r=e.override,i=(0,o.useContext)(p),s=(0,o.useMemo)((function(){var e=(0,a.Z)({},i);return r&&delete e.isFormItemInput,n&&(delete e.status,delete e.hasFeedback,delete e.feedbackIcon),e}),[n,r,i]);return o.createElement(p.Provider,{value:s},t)}},12334:function(e,t,n){n.d(t,{o:function(){return o}});var a=n(63313),r=(0,n(46594).Z)()?a.useLayoutEffect:a.useEffect,i=function(e,t){var n=a.useRef(!0);r((function(){return e(n.current)}),t),r((function(){return n.current=!1,function(){n.current=!0}}),[])},o=function(e,t){i((function(t){if(!t)return e()}),t)};t.Z=i}}]);