@whyour/qinglong 2.18.2-3 → 2.18.2-6
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.
- package/package.json +4 -4
- package/shell/preload/client.js +149 -40
- package/shell/preload/client.py +200 -30
- package/shell/preload/sitecustomize.js +1 -1
- package/shell/preload/sitecustomize.py +1 -1
- package/shell/share.sh +1 -1
- package/shell/update.sh +4 -1
- package/static/build/api/cron.js +10 -40
- package/static/build/api/system.js +15 -0
- package/static/build/app.js +1 -0
- package/static/build/config/index.js +2 -2
- package/static/build/config/util.js +17 -2
- package/static/build/data/notify.js +5 -6
- package/static/build/interface/schedule.js +9 -0
- package/static/build/loaders/bootAfter.js +12 -0
- package/static/build/loaders/initFile.js +2 -2
- package/static/build/loaders/initTask.js +14 -11
- package/static/build/protos/api.js +1285 -168
- package/static/build/protos/cron.js +46 -41
- package/static/build/protos/health.js +12 -13
- package/static/build/schedule/addCron.js +5 -5
- package/static/build/schedule/api.js +86 -1
- package/static/build/services/cron.js +70 -32
- package/static/build/services/notify.js +3 -4
- package/static/build/services/system.js +16 -1
- package/static/build/services/user.js +2 -1
- package/static/build/validation/schedule.js +42 -0
- package/static/dist/1134.b851963c.async.js +1 -0
- package/static/dist/1174.41a43fee.async.js +1 -0
- package/static/dist/1212.f87fd07a.async.js +1 -0
- package/static/dist/1706.ac98cb3f.async.js +1 -0
- package/static/dist/1887.9e0d3da8.async.js +1 -0
- package/static/dist/1969.d61ba5fb.async.js +1 -0
- package/static/dist/198.db47fc1a.async.js +1 -0
- package/static/dist/2003.8eafeca8.async.js +1 -0
- package/static/dist/2208.03c2cf4a.async.js +1 -0
- package/static/dist/2231.29b754cf.async.js +1 -0
- package/static/dist/2336.0756f45f.async.js +1 -0
- package/static/dist/2506.a6334794.async.js +1 -0
- package/static/dist/2577.aa8fe709.async.js +1 -0
- package/static/dist/2636.70ece391.async.js +1 -0
- package/static/dist/2750.7aa38add.async.js +1 -0
- package/static/dist/2783.0787fd60.async.js +1 -0
- package/static/dist/2843.e968a7af.async.js +1 -0
- package/static/dist/2905.a8f810e1.async.js +1 -0
- package/static/dist/293.80d14a4f.async.js +1 -0
- package/static/dist/2958.1a7daa3c.async.js +1 -0
- package/static/dist/3055.a99f8e4c.async.js +1 -0
- package/static/dist/3617.b7d4b2ed.async.js +1 -0
- package/static/dist/3711.9814cb8c.async.js +1 -0
- package/static/dist/3730.3654e8fa.async.js +1 -0
- package/static/dist/3840.801ded2b.async.js +1 -0
- package/static/dist/4324.5a5887d1.async.js +1 -0
- package/static/dist/4462.02fd0a33.async.js +1 -0
- package/static/dist/4481.4d51cf36.async.js +1 -0
- package/static/dist/4507.8541bc6d.async.js +1 -0
- package/static/dist/4559.faab3673.async.js +1 -0
- package/static/dist/4756.64d6d0a4.async.js +1 -0
- package/static/dist/4818.c83facd7.async.js +1 -0
- package/static/dist/4821.64537e48.async.js +1 -0
- package/static/dist/{8142.e3e82eda.async.js → 4934.1ca6b6b0.async.js} +1 -1
- package/static/dist/4944.3be3e188.async.js +1 -0
- package/static/dist/5.3ebdd181.async.js +1 -0
- package/static/dist/5232.f4b06476.async.js +1 -0
- package/static/dist/5325.54777fe5.async.js +1 -0
- package/static/dist/5363.2fedc735.async.js +1 -0
- package/static/dist/5436.f2e37c36.async.js +1 -0
- package/static/dist/5580.48b4722f.async.js +1 -0
- package/static/dist/5662.678b0cfb.async.js +1 -0
- package/static/dist/5759.45438497.async.js +1 -0
- package/static/dist/5876.93680102.async.js +1 -0
- package/static/dist/5878.32535c39.async.js +1 -0
- package/static/dist/591.1c6b5df7.async.js +1 -0
- package/static/dist/6367.8b0e838c.async.js +1 -0
- package/static/dist/6431.c50479be.async.js +1 -0
- package/static/dist/6437.91ff515b.async.js +1 -0
- package/static/dist/6598.01b8b308.async.js +1 -0
- package/static/dist/6711.84451b08.async.js +1 -0
- package/static/dist/6841.e92e9802.async.js +1 -0
- package/static/dist/685.2419bacf.async.js +1 -0
- package/static/dist/7036.fdeb74d0.async.js +1 -0
- package/static/dist/7272.1c73bcc5.async.js +1 -0
- package/static/dist/7278.96bf439f.async.js +1 -0
- package/static/dist/752.66fdc531.async.js +1 -0
- package/static/dist/7540.6bb57f5f.async.js +1 -0
- package/static/dist/7647.e9446154.async.js +1 -0
- package/static/dist/7661.6684ddda.async.js +1 -0
- package/static/dist/7714.1e826854.async.js +1 -0
- package/static/dist/7846.7d689939.async.js +1 -0
- package/static/dist/7993.ed86bf44.async.js +1 -0
- package/static/dist/8025.7dc65c6a.async.js +1 -0
- package/static/dist/8038.58b0571f.async.js +1 -0
- package/static/dist/8080.056470f6.async.js +1 -0
- package/static/dist/8142.a074ddf1.async.js +1 -0
- package/static/dist/831.9756b44d.async.js +1 -0
- package/static/dist/8315.3c15bde0.async.js +1 -0
- package/static/dist/8394.452e865e.async.js +1 -0
- package/static/dist/8416.69691e31.async.js +1 -0
- package/static/dist/8526.bb556c43.async.js +1 -0
- package/static/dist/8682.597beedb.async.js +1 -0
- package/static/dist/8776.e8798a5a.async.js +1 -0
- package/static/dist/8779.3e755010.async.js +1 -0
- package/static/dist/8826.b3f9fa78.async.js +1 -0
- package/static/dist/8851.a57942be.async.js +1 -0
- package/static/dist/8878.8367da80.async.js +1 -0
- package/static/dist/9033.f2e29d04.async.js +1 -0
- package/static/dist/9082.9f6c6520.async.js +1 -0
- package/static/dist/9095.816eeb1a.async.js +1 -0
- package/static/dist/9187.4bacb25e.async.js +1 -0
- package/static/dist/9308.3202ac13.async.js +1 -0
- package/static/dist/9674.1b962b29.chunk.css +1 -0
- package/static/dist/9674.962a6cda.async.js +1 -0
- package/static/dist/9853.695fdd64.async.js +1 -0
- package/static/dist/9974.c867bc89.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/{layouts__index.c986408d.async.js → layouts__index.623b87d2.async.js} +1 -1
- package/static/dist/preload_helper.68e6986a.js +1 -0
- package/static/dist/{src__pages__config__index.de6dca30.async.js → src__pages__config__index.622b6ee8.async.js} +1 -1
- package/static/dist/src__pages__crontab__const.323d5124.async.js +1 -0
- package/static/dist/{src__pages__crontab__detail.80d30a01.async.js → src__pages__crontab__detail.c7d28d13.async.js} +1 -1
- package/static/dist/src__pages__crontab__index.b6a281d6.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.6a345e8a.async.js → src__pages__crontab__logModal.0767c532.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.b20074c2.async.js +1 -0
- package/static/dist/src__pages__crontab__type.db7c1858.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.1bb8572d.async.js +1 -0
- package/static/dist/{src__pages__diff__index.a4176b58.async.js → src__pages__diff__index.013b7c75.async.js} +1 -1
- package/static/dist/src__pages__env__editNameModal.115bb8ea.async.js +1 -0
- package/static/dist/{src__pages__env__index.f3bfe0c7.async.js → src__pages__env__index.7205e719.async.js} +1 -1
- package/static/dist/{src__pages__env__modal.066399fd.async.js → src__pages__env__modal.d923acdb.async.js} +1 -1
- package/static/dist/{src__pages__error__index.656c9940.async.js → src__pages__error__index.a17578c5.async.js} +1 -1
- package/static/dist/{src__pages__initialization__index.75484c39.async.js → src__pages__initialization__index.684197ee.async.js} +1 -1
- package/static/dist/{src__pages__log__index.8a782756.async.js → src__pages__log__index.43024b22.async.js} +1 -1
- package/static/dist/{src__pages__login__index.8a653852.async.js → src__pages__login__index.cd6e3152.async.js} +1 -1
- package/static/dist/{src__pages__script__editModal.e7bf71bd.async.js → src__pages__script__editModal.10dd9857.async.js} +1 -1
- package/static/dist/src__pages__script__editNameModal.7d1cc6b4.async.js +1 -0
- package/static/dist/src__pages__script__index.1d172186.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.09dfb133.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.21b81bcc.async.js +1 -0
- package/static/dist/src__pages__script__setting.c6503aaf.async.js +1 -0
- package/static/dist/{src__pages__setting__about.f6325812.chunk.css → src__pages__setting__about.e6db5090.chunk.css} +1 -1
- package/static/dist/src__pages__setting__appModal.b115baf8.async.js +1 -0
- package/static/dist/{src__pages__setting__checkUpdate.04c00c9c.async.js → src__pages__setting__checkUpdate.c152dfaf.async.js} +1 -1
- package/static/dist/{src__pages__setting__dependence.55c598d0.chunk.css → src__pages__setting__dependence.28ecea01.chunk.css} +1 -1
- package/static/dist/{src__pages__setting__dependence.0dd0969b.async.js → src__pages__setting__dependence.f3afc194.async.js} +1 -1
- package/static/dist/{src__pages__setting__index.d666f8ec.chunk.css → src__pages__setting__index.7cf46d4a.chunk.css} +1 -1
- package/static/dist/src__pages__setting__index.f6051186.async.js +1 -0
- package/static/dist/{src__pages__setting__notification.b038afec.async.js → src__pages__setting__notification.b7722a0b.async.js} +1 -1
- package/static/dist/{src__pages__setting__other.55c598d0.chunk.css → src__pages__setting__other.28ecea01.chunk.css} +1 -1
- package/static/dist/src__pages__setting__other.45f67bd2.async.js +1 -0
- package/static/dist/{src__pages__setting__security.af57bd6a.async.js → src__pages__setting__security.534a5e67.async.js} +1 -1
- package/static/dist/{src__pages__setting__systemLog.501844bd.async.js → src__pages__setting__systemLog.cb8a2174.async.js} +1 -1
- package/static/dist/{src__pages__subscription__index.b43143e7.async.js → src__pages__subscription__index.30fefd8e.async.js} +1 -1
- package/static/dist/{src__pages__subscription__logModal.02c80eb3.async.js → src__pages__subscription__logModal.9bf0b4f6.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.10cd630d.async.js +1 -0
- package/static/dist/static/codicon.63b8ee5b.ttf +0 -0
- package/static/dist/{umi.e783bacd.js → umi.e6d28cd5.js} +1 -1
- package/version.yaml +9 -6
- package/static/dist/2208.c1a40612.async.js +0 -1
- package/static/dist/3127.2579e73a.async.js +0 -1
- package/static/dist/4402.49bbe98d.async.js +0 -1
- package/static/dist/8826.37966028.async.js +0 -1
- package/static/dist/preload_helper.6482f199.js +0 -1
- package/static/dist/src__pages__crontab__index.9e38b6dc.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.78b1e588.async.js +0 -1
- package/static/dist/src__pages__crontab__type.bde5cda4.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.e6696a7c.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.02322e80.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.c048343e.async.js +0 -1
- package/static/dist/src__pages__script__index.9d9099c1.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.357c6c72.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.61fcb1fe.async.js +0 -1
- package/static/dist/src__pages__script__setting.f2d78204.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.9eeaeee7.async.js +0 -1
- package/static/dist/src__pages__setting__index.46a8e768.async.js +0 -1
- package/static/dist/src__pages__setting__other.0d869d58.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.a61ece75.async.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9939],{75875:function(e,t,n){"use strict";n.d(t,{iN:function(){return w},R_:function(){return l}});var r=n(96299),a=n(28556),i=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function o(e){var t=e.r,n=e.g,a=e.b,i=(0,r.py)(t,n,a);return{h:360*i.h,s:i.s,v:i.v}}function c(e){var t=e.r,n=e.g,a=e.b;return"#".concat((0,r.vq)(t,n,a,!1))}function s(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}function f(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function u(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function d(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function l(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,a.uA)(e),l=5;l>0;l-=1){var h=o(r),m=c((0,a.uA)({h:f(h,l,!0),s:u(h,l,!0),v:d(h,l,!0)}));n.push(m)}n.push(c(r));for(var p=1;p<=4;p+=1){var v=o(r),y=c((0,a.uA)({h:f(v,p),s:u(v,p),v:d(v,p)}));n.push(y)}return"dark"===t.theme?i.map((function(e){var r=e.index,i=e.opacity;return c(s((0,a.uA)(t.backgroundColor||"#141414"),(0,a.uA)(n[r]),100*i))})):n}var h=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];h.primary=h[5];var m=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];m.primary=m[5];var p=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];p.primary=p[5];var v=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];v.primary=v[5];var y=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];y.primary=y[5];var g=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];g.primary=g[5];var b=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];b.primary=b[5];var $=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];$.primary=$[5];var w=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];w.primary=w[5];var x=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];x.primary=x[5];var Z=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Z.primary=Z[5];var C=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];C.primary=C[5];var _=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];_.primary=_[5];var M=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];M.primary=M[5];var k=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];k.primary=k[5];var S=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];S.primary=S[5];var D=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];D.primary=D[5];var j=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];j.primary=j[5];var T=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];T.primary=T[5];var N=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];N.primary=N[5];var P=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];P.primary=P[5];var O=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];O.primary=O[5];var E=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];E.primary=E[5];var H=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];H.primary=H[5];var A=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];A.primary=A[5];var F=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];F.primary=F[5]},48881:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(2053),a=n(99459),i=n(57904),o=n(53162),c=n(75271),s=n(82187),f=n.n(s),u=n(75875),d=n(28771),l=n(98037),h=n(39765),m=["icon","className","onClick","style","primaryColor","secondaryColor"],p={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var v=function(e){var t=e.icon,n=e.className,r=e.onClick,a=e.style,i=e.primaryColor,s=e.secondaryColor,f=(0,o.Z)(e,m),u=c.useRef(),d=p;if(i&&(d={primaryColor:i,secondaryColor:s||(0,h.pw)(i)}),(0,h.C3)(u),(0,h.Kp)((0,h.r)(t),"icon should be icon definiton, but got ".concat(t)),!(0,h.r)(t))return null;var v=t;return v&&"function"==typeof v.icon&&(v=(0,l.Z)((0,l.Z)({},v),{},{icon:v.icon(d.primaryColor,d.secondaryColor)})),(0,h.R_)(v.icon,"svg-".concat(v.name),(0,l.Z)((0,l.Z)({className:n,onClick:r,style:a,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:u}))};v.displayName="IconReact",v.getTwoToneColors=function(){return(0,l.Z)({},p)},v.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;p.primaryColor=t,p.secondaryColor=n||(0,h.pw)(t),p.calculated=!!n};var y=v;function g(e){var t=(0,h.H9)(e),n=(0,a.Z)(t,2),r=n[0],i=n[1];return y.setTwoToneColors({primaryColor:r,secondaryColor:i})}var b=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g(u.iN.primary);var $=c.forwardRef((function(e,t){var n=e.className,s=e.icon,u=e.spin,l=e.rotate,m=e.tabIndex,p=e.onClick,v=e.twoToneColor,g=(0,o.Z)(e,b),$=c.useContext(d.Z),w=$.prefixCls,x=void 0===w?"anticon":w,Z=$.rootClassName,C=f()(Z,x,(0,i.Z)((0,i.Z)({},"".concat(x,"-").concat(s.name),!!s.name),"".concat(x,"-spin"),!!u||"loading"===s.name),n),_=m;void 0===_&&p&&(_=-1);var M=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,k=(0,h.H9)(v),S=(0,a.Z)(k,2),D=S[0],j=S[1];return c.createElement("span",(0,r.Z)({role:"img","aria-label":s.name},g,{ref:t,tabIndex:_,onClick:p,className:C}),c.createElement(y,{icon:s,primaryColor:D,secondaryColor:j,style:M}))}));$.displayName="AntdIcon",$.getTwoToneColor=function(){var e=y.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},$.setTwoToneColor=g;var w=$},28771:function(e,t,n){"use strict";var r=(0,n(75271).createContext)({});t.Z=r},39765:function(e,t,n){"use strict";n.d(t,{R_:function(){return v},pw:function(){return y},r:function(){return m},H9:function(){return g},vD:function(){return b},C3:function(){return $},Kp:function(){return h}});var r=n(98037),a=n(24744),i=n(75875),o=n(61984);function c(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function s(e){return function(e){return c(e)instanceof ShadowRoot}(e)?c(e):null}var f=n(7432),u=n(75271),d=n(28771);function l(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function h(e,t){(0,f.ZP)(e,"[@ant-design/icons] ".concat(t))}function m(e){return"object"===(0,a.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,a.Z)(e.icon)||"function"==typeof e.icon)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[l(n)]=r;return t}),{})}function v(e,t,n){return n?u.createElement(e.tag,(0,r.Z)((0,r.Z)({key:t},p(e.attrs)),n),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):u.createElement(e.tag,(0,r.Z)({key:t},p(e.attrs)),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function y(e){return(0,i.R_)(e)[0]}function g(e){return e?Array.isArray(e)?e:[e]:[]}var b={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},$=function(e){var t=(0,u.useContext)(d.Z),n=t.csp,r=t.prefixCls,a="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(a=a.replace(/anticon/g,r)),(0,u.useEffect)((function(){var t=s(e.current);(0,o.hq)(a,"@ant-design-icons",{prepend:!0,csp:n,attachTo:t})}),[])}},29232:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return A}});var r=n(26068),a=n.n(r),i=n(48305),o=n.n(i),c=n(72317),s=n(75271),f=n(72338),u=n(32890),d=n(33839),l=n(17082),h=n(93481),m=n(75036),p=n(3475),v=n(98783),y="container___ldtvs",g="top___D7yFW",b="header___j_Z_f",$="logo___Cf9cM",w="title___zhtS2",x="main___sAFzH",Z="extra___e62Gt",C=n(16314),_=n(9364),M=n(2053),k={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"},S=n(48881),D=function(e,t){return s.createElement(S.Z,(0,M.Z)({},e,{ref:t,icon:k}))};var j=s.forwardRef(D),T=n(16483),N=n.n(T),P=n(52676),O=f.Z.Item,E=u.Z.Countdown,H="demo"===window.__ENV__DeployEnv,A=function(){var e=(0,v.useOutletContext)().reloadUser,t=(0,s.useState)(!1),n=o()(t,2),r=n[0],i=n[1],u=(0,s.useState)(),M=o()(u,2),k=M[0],S=M[1],D=(0,_.F)().theme,T=(0,s.useState)(!1),A=o()(T,2),F=A[0],I=A[1],Y=(0,s.useState)(!1),L=o()(Y,2),W=L[0],z=L[1],R=(0,s.useState)(),q=o()(R,2),U=q[0],V=q[1],J=function(e){z(!0),C.W.put("".concat(p.Z.apiPrefix,"user/two-factor/login"),a()(a()({},U),{},{code:e.code})).then((function(e){K(e),z(!1)})).catch((function(e){console.log(e),z(!1)}))},K=function(t,n){var r=t.code,a=t.data;t.message;if(200===r){var i=a.token,o=a.lastip,s=a.lastaddr,f=a.lastlogon,u=a.retries,l=void 0===u?0:u,h=a.platform;localStorage.setItem(p.Z.authKey,i),d.Z.success({message:c.ZP.get("登录成功!"),description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{children:[c.ZP.get("上次登录时间:"),f?N()(f).format("YYYY-MM-DD HH:mm:ss"):"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录地点:"),s||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录IP:"),o||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录设备:"),h||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录状态:"),l>0?"失败".concat(l,"次"):c.ZP.get("成功")]})]})}),e(!0),v.history.push("/crontab")}else 410===r?S(a):420===r?(V({username:n.username,password:n.password}),I(!0)):100===r&&setTimeout((function(){location.reload()}),1e3)};return(0,s.useEffect)((function(){localStorage.getItem(p.Z.authKey)&&v.history.push("/crontab")}),[]),(0,P.jsxs)("div",{className:y,children:[(0,P.jsx)("div",{className:g,children:(0,P.jsxs)("div",{className:b,children:[(0,P.jsx)("img",{alt:"logo",className:$,src:"https://qn.whyour.cn/logo.png"}),(0,P.jsx)("span",{className:w,children:F?c.ZP.get("两步验证"):p.Z.siteName})]})}),(0,P.jsx)("div",{className:x,children:F?(0,P.jsxs)(f.Z,{layout:"vertical",onFinish:J,children:[(0,P.jsx)(O,{name:"code",label:c.ZP.get("验证码"),rules:[{pattern:/^[0-9]{6}$/,message:c.ZP.get("验证码为6位数字")}],validateTrigger:"onBlur",children:(0,P.jsx)(l.Z,{placeholder:c.ZP.get("6位数字"),onChange:function(e){var t=e.target.value;/^[0-9]{6}$/.test(t)&&J({code:t})},autoFocus:!0,autoComplete:"off"})}),(0,P.jsx)(h.Z,{type:"primary",htmlType:"submit",style:{width:"100%"},loading:W,children:c.ZP.get("验证")})]}):(0,P.jsxs)(f.Z,{layout:"vertical",onFinish:function(e){i(!0),I(!1),S(null),C.W.post("".concat(p.Z.apiPrefix,"user/login"),{username:e.username,password:e.password}).then((function(t){K(t,e),i(!1)})).catch((function(e){console.log(e),i(!1)}))},children:[(0,P.jsx)(O,{name:"username",label:c.ZP.get("用户名"),hasFeedback:!0,children:(0,P.jsx)(l.Z,{placeholder:"".concat(c.ZP.get("用户名")).concat(H?": admin":""),autoFocus:!0})}),(0,P.jsx)(O,{name:"password",label:c.ZP.get("密码"),hasFeedback:!0,children:(0,P.jsx)(l.Z,{type:"password",placeholder:"".concat(c.ZP.get("密码")).concat(H?": 123":"")})}),(0,P.jsx)(m.Z,{children:k?(0,P.jsxs)(h.Z,{type:"primary",style:{width:"100%"},disabled:!0,children:[c.ZP.get("请"),(0,P.jsx)(E,{valueStyle:{color:"vs"===D?"rgba(0,0,0,.25)":"rgba(232, 230, 227, 0.25)"},className:"inline-countdown",onFinish:function(){return S(null)},format:"ss",value:Date.now()+1e3*k}),c.ZP.get("秒后重试")]}):(0,P.jsx)(h.Z,{type:"primary",htmlType:"submit",style:{width:"100%"},loading:r,children:c.ZP.get("登录")})})]})}),(0,P.jsx)("div",{className:Z,children:F?(0,P.jsxs)("div",{style:{paddingLeft:20,position:"relative"},children:[(0,P.jsx)(j,{style:{position:"absolute",left:0,top:4}}),c.ZP.get("在您的设备上打开两步验证应用程序以查看您的身份验证代码并验证您的身份。")]}):""})]})}},9364:function(e,t,n){"use strict";n.d(t,{F:function(){return s},e:function(){return c}});var r=n(48305),a=n.n(r),i=n(75271),o=n(52076),c=function(){var e=(0,i.useState)("100%"),t=a()(e,2),n=t[0],r=t[1],c=(0,i.useState)(0),s=a()(c,2),f=s[0],u=s[1],d=(0,i.useState)(-48),l=a()(d,2),h=l[0],m=l[1],p=(0,i.useState)(!1),v=a()(p,2),y=v[0],g=v[1],b=(0,i.useMemo)((function(){return(0,o.ZP)()}),[]).platform;return(0,i.useEffect)((function(){"mobile"===b&&document.body.offsetWidth<768?(r("auto"),u(0),m(0),g(!0),document.body.setAttribute("data-mode","phone")):(r("100%"),u(0),m(-48),g(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:h,width:n,marginLeft:f},isPhone:y}},s=function(){var e=(0,i.useState)(),t=a()(e,2),n=t[0],r=t[1];return(0,i.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;r(n?"vs-dark":"vs");var a=function(e){"auto"!==t&&t||(e.matches?r("vs-dark"):r("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",a):"function"==typeof e.addListener&&e.addListener(a)}),[]),{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;r(n?"vs-dark":"vs")}}}},27916:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(99459),a=n(75271);function i(){var e=a.useReducer((function(e){return e+1}),0);return(0,r.Z)(e,2)[1]}},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return o},jD:function(){return i}});var r,a=n(71254),i=function(){return(0,a.Z)()&&window.document.documentElement},o=function(){if(!i())return!1;if(void 0!==r)return r;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),r=1===e.scrollHeight,document.body.removeChild(e),r}},75036:function(e,t,n){"use strict";var r=n(94523);t.Z=r.Z},16483:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",i="minute",o="hour",c="day",s="week",f="month",u="quarter",d="year",l="date",h="Invalid Date",m=/^(\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,v={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])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,f),i=n-a<0,o=t.clone().add(r+(i?-1:1),f);return+(-(r+(n-a)/(i?a-o:o-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:f,y:d,w:s,d:c,D:l,h:o,m:i,s:a,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",$={};$[b]=v;var w="$isDayjsObject",x=function(e){return e instanceof M||!(!e||!e[w])},Z=function e(t,n,r){var a;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();$[i]&&(a=i),n&&($[i]=n,a=i);var o=t.split("-");if(!a&&o.length>1)return e(o[0])}else{var c=t.name;$[c]=t,a=c}return!r&&a&&(b=a),a||!r&&b},C=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new M(n)},_=g;_.l=Z,_.i=x,_.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function v(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var y=v.prototype;return y.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 r=t.match(m);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},y.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()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return C(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<C(e)},y.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!_.u(t)||t,u=_.p(e),h=function(e,t){var a=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?a:a.endOf(c)},m=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,v=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case d:return r?h(1,0):h(31,11);case f:return r?h(1,v):h(0,v+1);case s:var b=this.$locale().weekStart||0,$=(p<b?p+7:p)-b;return h(r?y-$:y+(6-$),v);case c:case l:return m(g+"Hours",0);case o:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case a:return m(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,s=_.p(e),u="set"+(this.$u?"UTC":""),h=(n={},n[c]=u+"Date",n[l]=u+"Date",n[f]=u+"Month",n[d]=u+"FullYear",n[o]=u+"Hours",n[i]=u+"Minutes",n[a]=u+"Seconds",n[r]=u+"Milliseconds",n)[s],m=s===c?this.$D+(t-this.$W):t;if(s===f||s===d){var p=this.clone().set(l,1);p.$d[h](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[_.p(e)]()},y.add=function(r,u){var l,h=this;r=Number(r);var m=_.p(u),p=function(e){var t=C(h);return _.w(t.date(t.date()+Math.round(e*r)),h)};if(m===f)return this.set(f,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===c)return p(1);if(m===s)return p(7);var v=(l={},l[i]=t,l[o]=n,l[a]=e,l)[m]||1,y=this.$d.getTime()+r*v;return _.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=_.z(this),i=this.$H,o=this.$m,c=this.$M,s=n.weekdays,f=n.months,u=n.meridiem,d=function(e,n,a,i){return e&&(e[n]||e(t,r))||a[n].slice(0,i)},l=function(e){return _.s(i%12||12,e,"0")},m=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return c+1;case"MM":return _.s(c+1,2,"0");case"MMM":return d(n.monthsShort,c,f,3);case"MMMM":return d(f,c);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return _.s(i,2,"0");case"h":return l(1);case"hh":return l(2);case"a":return m(i,o,!0);case"A":return m(i,o,!1);case"m":return String(o);case"mm":return _.s(o,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,l,h){var m,p=this,v=_.p(l),y=C(r),g=(y.utcOffset()-this.utcOffset())*t,b=this-y,$=function(){return _.m(p,y)};switch(v){case d:m=$()/12;break;case f:m=$();break;case u:m=$()/3;break;case s:m=(b-g)/6048e5;break;case c:m=(b-g)/864e5;break;case o:m=b/n;break;case i:m=b/t;break;case a:m=b/e;break;default:m=b}return h?m:_.a(m)},y.daysInMonth=function(){return this.endOf(f).$D},y.$locale=function(){return $[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=Z(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return _.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),k=M.prototype;return C.prototype=k,[["$ms",r],["$s",a],["$m",i],["$H",o],["$W",c],["$M",f],["$y",d],["$D",l]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,M,C),e.$i=!0),C},C.locale=Z,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=$[b],C.Ls=$,C.p={},C}()}}]);
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9939],{75875:function(e,t,n){"use strict";n.d(t,{iN:function(){return w},R_:function(){return l}});var r=n(96299),a=n(28556),i=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function o(e){var t=e.r,n=e.g,a=e.b,i=(0,r.py)(t,n,a);return{h:360*i.h,s:i.s,v:i.v}}function c(e){var t=e.r,n=e.g,a=e.b;return"#".concat((0,r.vq)(t,n,a,!1))}function s(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}function f(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-2*t:Math.round(e.h)+2*t:n?Math.round(e.h)+2*t:Math.round(e.h)-2*t)<0?r+=360:r>=360&&(r-=360),r}function u(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-.16*t:4===t?e.s+.16:e.s+.05*t)>1&&(r=1),n&&5===t&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function d(e,t,n){var r;return(r=n?e.v+.05*t:e.v-.15*t)>1&&(r=1),Number(r.toFixed(2))}function l(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=(0,a.uA)(e),l=5;l>0;l-=1){var h=o(r),m=c((0,a.uA)({h:f(h,l,!0),s:u(h,l,!0),v:d(h,l,!0)}));n.push(m)}n.push(c(r));for(var p=1;p<=4;p+=1){var v=o(r),y=c((0,a.uA)({h:f(v,p),s:u(v,p),v:d(v,p)}));n.push(y)}return"dark"===t.theme?i.map((function(e){var r=e.index,i=e.opacity;return c(s((0,a.uA)(t.backgroundColor||"#141414"),(0,a.uA)(n[r]),100*i))})):n}var h=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];h.primary=h[5];var m=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];m.primary=m[5];var p=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];p.primary=p[5];var v=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];v.primary=v[5];var y=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];y.primary=y[5];var g=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];g.primary=g[5];var b=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];b.primary=b[5];var $=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];$.primary=$[5];var w=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];w.primary=w[5];var x=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];x.primary=x[5];var Z=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];Z.primary=Z[5];var C=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];C.primary=C[5];var _=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];_.primary=_[5];var M=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];M.primary=M[5];var k=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];k.primary=k[5];var S=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];S.primary=S[5];var D=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];D.primary=D[5];var j=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];j.primary=j[5];var T=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];T.primary=T[5];var N=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];N.primary=N[5];var P=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];P.primary=P[5];var O=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];O.primary=O[5];var E=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];E.primary=E[5];var H=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];H.primary=H[5];var A=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];A.primary=A[5];var F=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];F.primary=F[5]},48881:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(2053),a=n(99459),i=n(57904),o=n(53162),c=n(75271),s=n(82187),f=n.n(s),u=n(75875),d=n(28771),l=n(98037),h=n(39765),m=["icon","className","onClick","style","primaryColor","secondaryColor"],p={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};var v=function(e){var t=e.icon,n=e.className,r=e.onClick,a=e.style,i=e.primaryColor,s=e.secondaryColor,f=(0,o.Z)(e,m),u=c.useRef(),d=p;if(i&&(d={primaryColor:i,secondaryColor:s||(0,h.pw)(i)}),(0,h.C3)(u),(0,h.Kp)((0,h.r)(t),"icon should be icon definiton, but got ".concat(t)),!(0,h.r)(t))return null;var v=t;return v&&"function"==typeof v.icon&&(v=(0,l.Z)((0,l.Z)({},v),{},{icon:v.icon(d.primaryColor,d.secondaryColor)})),(0,h.R_)(v.icon,"svg-".concat(v.name),(0,l.Z)((0,l.Z)({className:n,onClick:r,style:a,"data-icon":v.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},f),{},{ref:u}))};v.displayName="IconReact",v.getTwoToneColors=function(){return(0,l.Z)({},p)},v.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;p.primaryColor=t,p.secondaryColor=n||(0,h.pw)(t),p.calculated=!!n};var y=v;function g(e){var t=(0,h.H9)(e),n=(0,a.Z)(t,2),r=n[0],i=n[1];return y.setTwoToneColors({primaryColor:r,secondaryColor:i})}var b=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];g(u.iN.primary);var $=c.forwardRef((function(e,t){var n=e.className,s=e.icon,u=e.spin,l=e.rotate,m=e.tabIndex,p=e.onClick,v=e.twoToneColor,g=(0,o.Z)(e,b),$=c.useContext(d.Z),w=$.prefixCls,x=void 0===w?"anticon":w,Z=$.rootClassName,C=f()(Z,x,(0,i.Z)((0,i.Z)({},"".concat(x,"-").concat(s.name),!!s.name),"".concat(x,"-spin"),!!u||"loading"===s.name),n),_=m;void 0===_&&p&&(_=-1);var M=l?{msTransform:"rotate(".concat(l,"deg)"),transform:"rotate(".concat(l,"deg)")}:void 0,k=(0,h.H9)(v),S=(0,a.Z)(k,2),D=S[0],j=S[1];return c.createElement("span",(0,r.Z)({role:"img","aria-label":s.name},g,{ref:t,tabIndex:_,onClick:p,className:C}),c.createElement(y,{icon:s,primaryColor:D,secondaryColor:j,style:M}))}));$.displayName="AntdIcon",$.getTwoToneColor=function(){var e=y.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},$.setTwoToneColor=g;var w=$},28771:function(e,t,n){"use strict";var r=(0,n(75271).createContext)({});t.Z=r},39765:function(e,t,n){"use strict";n.d(t,{R_:function(){return v},pw:function(){return y},r:function(){return m},H9:function(){return g},vD:function(){return b},C3:function(){return $},Kp:function(){return h}});var r=n(98037),a=n(24744),i=n(75875),o=n(61984);function c(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}function s(e){return function(e){return c(e)instanceof ShadowRoot}(e)?c(e):null}var f=n(7432),u=n(75271),d=n(28771);function l(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}function h(e,t){(0,f.ZP)(e,"[@ant-design/icons] ".concat(t))}function m(e){return"object"===(0,a.Z)(e)&&"string"==typeof e.name&&"string"==typeof e.theme&&("object"===(0,a.Z)(e.icon)||"function"==typeof e.icon)}function p(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];if("class"===n)t.className=r,delete t.class;else delete t[n],t[l(n)]=r;return t}),{})}function v(e,t,n){return n?u.createElement(e.tag,(0,r.Z)((0,r.Z)({key:t},p(e.attrs)),n),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):u.createElement(e.tag,(0,r.Z)({key:t},p(e.attrs)),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function y(e){return(0,i.R_)(e)[0]}function g(e){return e?Array.isArray(e)?e:[e]:[]}var b={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},$=function(e){var t=(0,u.useContext)(d.Z),n=t.csp,r=t.prefixCls,a="\n.anticon {\n display: inline-flex;\n align-items: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";r&&(a=a.replace(/anticon/g,r)),(0,u.useEffect)((function(){var t=s(e.current);(0,o.hq)(a,"@ant-design-icons",{prepend:!0,csp:n,attachTo:t})}),[])}},29232:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return A}});var r=n(26068),a=n.n(r),i=n(48305),o=n.n(i),c=n(72317),s=n(75271),f=n(72338),u=n(32890),d=n(33839),l=n(17082),h=n(93481),m=n(75036),p=n(3475),v=n(98783),y="container___ldtvs",g="top___D7yFW",b="header___j_Z_f",$="logo___Cf9cM",w="title___zhtS2",x="main___sAFzH",Z="extra___e62Gt",C=n(16314),_=n(9364),M=n(2053),k={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M744 62H280c-35.3 0-64 28.7-64 64v768c0 35.3 28.7 64 64 64h464c35.3 0 64-28.7 64-64V126c0-35.3-28.7-64-64-64zm-8 824H288V134h448v752zM472 784a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"mobile",theme:"outlined"},S=n(48881),D=function(e,t){return s.createElement(S.Z,(0,M.Z)({},e,{ref:t,icon:k}))};var j=s.forwardRef(D),T=n(16483),N=n.n(T),P=n(52676),O=f.Z.Item,E=u.Z.Countdown,H="demo"===window.__ENV__DeployEnv,A=function(){var e=(0,v.useOutletContext)().reloadUser,t=(0,s.useState)(!1),n=o()(t,2),r=n[0],i=n[1],u=(0,s.useState)(),M=o()(u,2),k=M[0],S=M[1],D=(0,_.F)().theme,T=(0,s.useState)(!1),A=o()(T,2),F=A[0],I=A[1],Y=(0,s.useState)(!1),L=o()(Y,2),W=L[0],z=L[1],R=(0,s.useState)(),q=o()(R,2),U=q[0],V=q[1],J=function(e){z(!0),C.W.put("".concat(p.Z.apiPrefix,"user/two-factor/login"),a()(a()({},U),{},{code:e.code})).then((function(e){K(e),z(!1)})).catch((function(e){console.log(e),z(!1)}))},K=function(t,n){var r=t.code,a=t.data;t.message;if(200===r){var i=a.token,o=a.lastip,s=a.lastaddr,f=a.lastlogon,u=a.retries,l=void 0===u?0:u,h=a.platform;localStorage.setItem(p.Z.authKey,i),d.Z.success({message:c.ZP.get("登录成功!"),description:(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)("div",{children:[c.ZP.get("上次登录时间:"),f?N()(f).format("YYYY-MM-DD HH:mm:ss"):"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录地点:"),s||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录IP:"),o||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录设备:"),h||"-"]}),(0,P.jsxs)("div",{children:[c.ZP.get("上次登录状态:"),l>0?"失败".concat(l,"次"):c.ZP.get("成功")]})]})}),e(!0),v.history.push("/crontab")}else 410===r?S(a):420===r?(V({username:n.username,password:n.password}),I(!0)):100===r&&setTimeout((function(){location.reload()}),1e3)};return(0,s.useEffect)((function(){localStorage.getItem(p.Z.authKey)&&v.history.push("/crontab")}),[]),(0,P.jsxs)("div",{className:y,children:[(0,P.jsx)("div",{className:g,children:(0,P.jsxs)("div",{className:b,children:[(0,P.jsx)("img",{alt:"logo",className:$,src:"https://qn.whyour.cn/logo.png"}),(0,P.jsx)("span",{className:w,children:F?c.ZP.get("两步验证"):p.Z.siteName})]})}),(0,P.jsx)("div",{className:x,children:F?(0,P.jsxs)(f.Z,{layout:"vertical",onFinish:J,children:[(0,P.jsx)(O,{name:"code",label:c.ZP.get("验证码"),rules:[{pattern:/^[0-9]{6}$/,message:c.ZP.get("验证码为6位数字")}],validateTrigger:"onBlur",children:(0,P.jsx)(l.Z,{placeholder:c.ZP.get("6位数字"),onChange:function(e){var t=e.target.value;/^[0-9]{6}$/.test(t)&&J({code:t})},autoFocus:!0,autoComplete:"off"})}),(0,P.jsx)(h.Z,{type:"primary",htmlType:"submit",style:{width:"100%"},loading:W,children:c.ZP.get("验证")})]}):(0,P.jsxs)(f.Z,{layout:"vertical",onFinish:function(e){i(!0),I(!1),S(null),C.W.post("".concat(p.Z.apiPrefix,"user/login"),{username:e.username,password:e.password}).then((function(t){K(t,e),i(!1)})).catch((function(e){console.log(e),i(!1)}))},children:[(0,P.jsx)(O,{name:"username",label:c.ZP.get("用户名"),hasFeedback:!0,children:(0,P.jsx)(l.Z,{placeholder:"".concat(c.ZP.get("用户名")).concat(H?": admin":""),autoFocus:!0})}),(0,P.jsx)(O,{name:"password",label:c.ZP.get("密码"),hasFeedback:!0,children:(0,P.jsx)(l.Z,{type:"password",placeholder:"".concat(c.ZP.get("密码")).concat(H?": 123":"")})}),(0,P.jsx)(m.Z,{children:k?(0,P.jsxs)(h.Z,{type:"primary",style:{width:"100%"},disabled:!0,children:[c.ZP.get("请"),(0,P.jsx)(E,{valueStyle:{color:"vs"===D?"rgba(0,0,0,.25)":"rgba(232, 230, 227, 0.25)"},className:"inline-countdown",onFinish:function(){return S(null)},format:"ss",value:Date.now()+1e3*k}),c.ZP.get("秒后重试")]}):(0,P.jsx)(h.Z,{type:"primary",htmlType:"submit",style:{width:"100%"},loading:r,children:c.ZP.get("登录")})})]})}),(0,P.jsx)("div",{className:Z,children:F?(0,P.jsxs)("div",{style:{paddingLeft:20,position:"relative"},children:[(0,P.jsx)(j,{style:{position:"absolute",left:0,top:4}}),c.ZP.get("在您的设备上打开两步验证应用程序以查看您的身份验证代码并验证您的身份。")]}):""})]})}},9364:function(e,t,n){"use strict";n.d(t,{F:function(){return s},e:function(){return c}});var r=n(48305),a=n.n(r),i=n(75271),o=n(48916),c=function(){var e=(0,i.useState)("100%"),t=a()(e,2),n=t[0],r=t[1],c=(0,i.useState)(0),s=a()(c,2),f=s[0],u=s[1],d=(0,i.useState)(-48),l=a()(d,2),h=l[0],m=l[1],p=(0,i.useState)(!1),v=a()(p,2),y=v[0],g=v[1],b=(0,i.useMemo)((function(){return(0,o.ZP)()}),[]).platform;return(0,i.useEffect)((function(){"mobile"===b&&document.body.offsetWidth<768?(r("auto"),u(0),m(0),g(!0),document.body.setAttribute("data-mode","phone")):(r("100%"),u(0),m(-48),g(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:h,width:n,marginLeft:f},isPhone:y}},s=function(){var e=(0,i.useState)(),t=a()(e,2),n=t[0],r=t[1];return(0,i.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),n=e.matches&&"light"!==t||"dark"===t;r(n?"vs-dark":"vs");var a=function(e){"auto"!==t&&t||(e.matches?r("vs-dark"):r("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",a):"function"==typeof e.addListener&&e.addListener(a)}),[]),{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;r(n?"vs-dark":"vs")}}}},27916:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(99459),a=n(75271);function i(){var e=a.useReducer((function(e){return e+1}),0);return(0,r.Z)(e,2)[1]}},43541:function(e,t,n){"use strict";n.d(t,{fk:function(){return o},jD:function(){return i}});var r,a=n(71254),i=function(){return(0,a.Z)()&&window.document.documentElement},o=function(){if(!i())return!1;if(void 0!==r)return r;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),r=1===e.scrollHeight,document.body.removeChild(e),r}},75036:function(e,t,n){"use strict";var r=n(94523);t.Z=r.Z},16483:function(e){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",a="second",i="minute",o="hour",c="day",s="week",f="month",u="quarter",d="year",l="date",h="Invalid Date",m=/^(\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,v={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])+"]"}},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),a=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(a,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),a=t.clone().add(r,f),i=n-a<0,o=t.clone().add(r+(i?-1:1),f);return+(-(r+(n-a)/(i?a-o:o-a))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:f,y:d,w:s,d:c,D:l,h:o,m:i,s:a,ms:r,Q:u}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",$={};$[b]=v;var w="$isDayjsObject",x=function(e){return e instanceof M||!(!e||!e[w])},Z=function e(t,n,r){var a;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();$[i]&&(a=i),n&&($[i]=n,a=i);var o=t.split("-");if(!a&&o.length>1)return e(o[0])}else{var c=t.name;$[c]=t,a=c}return!r&&a&&(b=a),a||!r&&b},C=function(e,t){if(x(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new M(n)},_=g;_.l=Z,_.i=x,_.w=function(e,t){return C(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var M=function(){function v(e){this.$L=Z(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[w]=!0}var y=v.prototype;return y.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 r=t.match(m);if(r){var a=r[2]-1||0,i=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)):new Date(r[1],a,r[3]||1,r[4]||0,r[5]||0,r[6]||0,i)}}return new Date(t)}(e),this.init()},y.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()},y.$utils=function(){return _},y.isValid=function(){return!(this.$d.toString()===h)},y.isSame=function(e,t){var n=C(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return C(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<C(e)},y.$g=function(e,t,n){return _.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!_.u(t)||t,u=_.p(e),h=function(e,t){var a=_.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?a:a.endOf(c)},m=function(e,t){return _.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},p=this.$W,v=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(u){case d:return r?h(1,0):h(31,11);case f:return r?h(1,v):h(0,v+1);case s:var b=this.$locale().weekStart||0,$=(p<b?p+7:p)-b;return h(r?y-$:y+(6-$),v);case c:case l:return m(g+"Hours",0);case o:return m(g+"Minutes",1);case i:return m(g+"Seconds",2);case a:return m(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,s=_.p(e),u="set"+(this.$u?"UTC":""),h=(n={},n[c]=u+"Date",n[l]=u+"Date",n[f]=u+"Month",n[d]=u+"FullYear",n[o]=u+"Hours",n[i]=u+"Minutes",n[a]=u+"Seconds",n[r]=u+"Milliseconds",n)[s],m=s===c?this.$D+(t-this.$W):t;if(s===f||s===d){var p=this.clone().set(l,1);p.$d[h](m),p.init(),this.$d=p.set(l,Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](m);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[_.p(e)]()},y.add=function(r,u){var l,h=this;r=Number(r);var m=_.p(u),p=function(e){var t=C(h);return _.w(t.date(t.date()+Math.round(e*r)),h)};if(m===f)return this.set(f,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===c)return p(1);if(m===s)return p(7);var v=(l={},l[i]=t,l[o]=n,l[a]=e,l)[m]||1,y=this.$d.getTime()+r*v;return _.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||h;var r=e||"YYYY-MM-DDTHH:mm:ssZ",a=_.z(this),i=this.$H,o=this.$m,c=this.$M,s=n.weekdays,f=n.months,u=n.meridiem,d=function(e,n,a,i){return e&&(e[n]||e(t,r))||a[n].slice(0,i)},l=function(e){return _.s(i%12||12,e,"0")},m=u||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(p,(function(e,r){return r||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return _.s(t.$y,4,"0");case"M":return c+1;case"MM":return _.s(c+1,2,"0");case"MMM":return d(n.monthsShort,c,f,3);case"MMMM":return d(f,c);case"D":return t.$D;case"DD":return _.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return d(n.weekdaysMin,t.$W,s,2);case"ddd":return d(n.weekdaysShort,t.$W,s,3);case"dddd":return s[t.$W];case"H":return String(i);case"HH":return _.s(i,2,"0");case"h":return l(1);case"hh":return l(2);case"a":return m(i,o,!0);case"A":return m(i,o,!1);case"m":return String(o);case"mm":return _.s(o,2,"0");case"s":return String(t.$s);case"ss":return _.s(t.$s,2,"0");case"SSS":return _.s(t.$ms,3,"0");case"Z":return a}return null}(e)||a.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,l,h){var m,p=this,v=_.p(l),y=C(r),g=(y.utcOffset()-this.utcOffset())*t,b=this-y,$=function(){return _.m(p,y)};switch(v){case d:m=$()/12;break;case f:m=$();break;case u:m=$()/3;break;case s:m=(b-g)/6048e5;break;case c:m=(b-g)/864e5;break;case o:m=b/n;break;case i:m=b/t;break;case a:m=b/e;break;default:m=b}return h?m:_.a(m)},y.daysInMonth=function(){return this.endOf(f).$D},y.$locale=function(){return $[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=Z(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return _.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},v}(),k=M.prototype;return C.prototype=k,[["$ms",r],["$s",a],["$m",i],["$H",o],["$W",c],["$M",f],["$y",d],["$D",l]].forEach((function(e){k[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),C.extend=function(e,t){return e.$i||(e(t,M,C),e.$i=!0),C},C.locale=Z,C.isDayjs=x,C.unix=function(e){return C(1e3*e)},C.en=$[b],C.Ls=$,C.p={},C}()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5586],{79297:function(e,t,n){n.r(t);var i=n(26068),a=n.n(i),o=n(48305),r=n.n(o),s=n(72317),c=n(75271),l=n(35181),u=n(53390),d=n(88142),h=n(93481),p=n(16314),f=n(3475),m=n(43382),v=n(83383),g=n(90310),b=n(3843),y=n(9364),x=n(52076),k=n(65814),Z=n(78060),S=n.n(Z),w=n(52676),C=l.Z.Option;t.default=function(e){var t=e.treeData,n=e.currentNode,i=e.content,o=e.handleCancel,Z=e.visible,P=(0,c.useState)(""),I=r()(P,2),j=I[0],O=I[1],E=(0,c.useState)(),N=r()(E,2),_=N[0],F=N[1],R=(0,c.useState)(),M=r()(R,2),H=M[0],A=M[1],L=(0,c.useState)(),T=r()(L,2),W=T[0],q=T[1],z=(0,c.useState)(!1),D=r()(z,2),V=D[0],B=D[1],J=(0,c.useState)(!1),X=r()(J,2),$=X[0],U=X[1],G=(0,c.useState)(""),Y=r()(G,2),K=Y[0],Q=Y[1],ee=(0,y.F)().theme,te=(0,c.useRef)(null),ne=(0,c.useState)(!1),ie=r()(ne,2),ae=ie[0],oe=ie[1],re=(0,c.useState)(null),se=r()(re,2),ce=se[0],le=se[1],ue=function(e){p.W.get("".concat(f.Z.apiPrefix,"scripts/detail?file=").concat(e.title,"&path=").concat(e.parent||"")).then((function(e){var t=e.code,n=e.data;200===t&&O(n)}))},de=function(){H&&H.title&&ce&&p.W.put("".concat(f.Z.apiPrefix,"scripts/stop"),{filename:H.title,path:H.parent||"",pid:ce}).then((function(e){var t=e.code;e.data;200===t&&oe(!1)}))},he=(0,c.useCallback)((function(e){var t=e.message;(0,x.x$)(t)&&setTimeout((function(){oe(!1)}),300),Q((function(e){return"".concat(e).concat(t)}))}),[]);return(0,c.useEffect)((function(){var e=k.Z.getInstance();return e.subscribe("manuallyRunScript",he),function(){e.unsubscribe("manuallyRunScript",he)}}),[]),(0,c.useEffect)((function(){if(Q(""),n){A(n),O(i),q(n.key);var e=(0,x.H$)(n.title);F(e)}}),[i,n]),(0,w.jsxs)(u.Z,{className:"edit-modal",closable:!1,title:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Z,{treeExpandAction:"click",style:{marginRight:8,width:300},value:W,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:t,placeholder:s.ZP.get("请选择脚本文件"),fieldNames:{value:"key",label:"title"},showSearch:!0,onSelect:function(e,t){if(t.key!==W&&e&&"directory"!==t.type){var n=(0,x.H$)(e);A(t),F(n),ue(t),q(t.key)}},treeLine:{showLeafIcon:!0}}),(0,w.jsxs)(l.Z,{value:_,style:{width:110,marginRight:8},onChange:function(e){F(e)},children:[(0,w.jsx)(C,{value:"javascript",children:"javascript"}),(0,w.jsx)(C,{value:"typescript",children:"typescript"}),(0,w.jsx)(C,{value:"shell",children:"shell"}),(0,w.jsx)(C,{value:"python",children:"python"})]}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:ae?de:function(){Q("");var e=te.current.getValue().replace(/\r\n/g,"\n");p.W.put("".concat(f.Z.apiPrefix,"scripts/run"),{filename:H.title,path:H.parent||"",content:e}).then((function(e){var t=e.code,n=e.data;200===t&&(oe(!0),le(n))}))},children:ae?s.ZP.get("停止"):s.ZP.get("运行")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){Q("")},children:s.ZP.get("清空日志")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){B(!0)},children:s.ZP.get("保存")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){de(),o()},children:s.ZP.get("退出")})]}),width:"100%",headerStyle:{padding:"11px 24px"},onClose:function(){o()},open:Z,children:[(0,w.jsxs)(m.Z,{split:"vertical",minSize:200,defaultSize:"50%",style:{height:"calc(100vh - 55px)"},pane2Style:{overflowY:"auto"},children:[(0,w.jsx)(v.ZP,{language:_,value:j,theme:ee,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){te.current=e}}),(0,w.jsx)("pre",{style:{padding:"0 15px"},children:(0,w.jsx)(S(),{children:K})})]}),(0,w.jsx)(g.default,{visible:V,handleCancel:function(){B(!1)},file:a()({content:te.current&&te.current.getValue().replace(/\r\n/g,"\n")},H)}),(0,w.jsx)(b.default,{visible:$,handleCancel:function(){U(!1)}})]})}},90310:function(e,t,n){n.r(t);var i=n(90228),a=n.n(i),o=n(26068),r=n.n(o),s=n(87999),c=n.n(s),l=n(48305),u=n.n(l),d=n(72317),h=n(75271),p=n(72338),f=n(61508),m=n(45520),v=n(17082),g=n(16314),b=n(3475),y=n(52676);t.default=function(e){var t=e.file,n=e.handleCancel,i=e.visible,o=p.Z.useForm(),s=u()(o,1)[0],l=(0,h.useState)(!1),x=u()(l,2),k=x[0],Z=x[1],S=function(){var e=c()(a()().mark((function e(i){var o;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z(!0),o=r()(r()(r()({},t),i),{},{originFilename:t.title}),g.W.post("".concat(b.Z.apiPrefix,"scripts"),o).then((function(e){var t=e.code,i=e.data;200===t&&(f.ZP.success(d.ZP.get("保存文件成功")),n(i))})).finally((function(){Z(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){s.resetFields(),Z(!1)}),[t,i]),(0,y.jsx)(m.Z,{title:d.ZP.get("保存文件"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){s.validateFields().then((function(e){S(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:k,children:(0,y.jsxs)(p.Z,{form:s,layout:"vertical",name:"script_modal",initialValues:{filename:null==t?void 0:t.title,path:(null==t?void 0:t.parent)||""},children:[(0,y.jsx)(p.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")}],children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件名")})}),(0,y.jsx)(p.Z.Item,{name:"path",label:d.ZP.get("保存目录"),children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入保存目录,默认scripts目录")})})]})})}},3843:function(e,t,n){n.r(t);n(90228),n(26068),n(87999);var i=n(48305),a=n.n(i),o=n(72317),r=n(75271),s=n(72338),c=(n(61508),n(45520)),l=n(17082),u=(n(16314),n(3475),n(52676));t.default=function(e){var t=e.file,n=e.handleCancel,i=e.visible,d=s.Z.useForm(),h=a()(d,1)[0],p=(0,r.useState)(!1),f=a()(p,2),m=(f[0],f[1]);return(0,r.useEffect)((function(){h.resetFields(),m(!1)}),[t,i]),(0,u.jsx)(c.Z,{title:o.ZP.get("运行设置"),open:i,forceRender:!0,centered:!0,onCancel:function(){return n()},children:(0,u.jsx)(s.Z,{form:h,layout:"vertical",name:"setting_modal",initialValues:t,children:(0,u.jsx)(s.Z.Item,{name:"filename",label:o.ZP.get("待开发"),rules:[{required:!0,message:o.ZP.get("待开发")}],children:(0,u.jsx)(l.Z,{placeholder:o.ZP.get("待开发")})})})})}},9364:function(e,t,n){n.d(t,{F:function(){return c},e:function(){return s}});var i=n(48305),a=n.n(i),o=n(75271),r=n(52076),s=function(){var e=(0,o.useState)("100%"),t=a()(e,2),n=t[0],i=t[1],s=(0,o.useState)(0),c=a()(s,2),l=c[0],u=c[1],d=(0,o.useState)(-48),h=a()(d,2),p=h[0],f=h[1],m=(0,o.useState)(!1),v=a()(m,2),g=v[0],b=v[1],y=(0,o.useMemo)((function(){return(0,r.ZP)()}),[]).platform;return(0,o.useEffect)((function(){"mobile"===y&&document.body.offsetWidth<768?(i("auto"),u(0),f(0),b(!0),document.body.setAttribute("data-mode","phone")):(i("100%"),u(0),f(-48),b(!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:l},isPhone:g}},c=function(){var e=(0,o.useState)(),t=a()(e,2),n=t[0],i=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;i(n?"vs-dark":"vs");var a=function(e){"auto"!==t&&t||(e.matches?i("vs-dark"):i("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",a):"function"==typeof e.addListener&&e.addListener(a)}),[]),{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;i(n?"vs-dark":"vs")}}}},65814:function(e,t,n){var i=n(15558),a=n.n(i),o=n(67825),r=n.n(o),s=n(90228),c=n.n(s),l=n(87999),u=n.n(l),d=n(25298),h=n.n(d),p=n(17069),f=n.n(p),m=n(82092),v=n.n(m),g=n(78078),b=n.n(g),y=["type"],x=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(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 f()(e,[{key:"init",value:(n=u()(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(b())(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=u()(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)===b().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)===b().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=r()(e,y),i=this.subscriptions.get(t)||new Set;a()(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)===b().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()(x,"instance",null),t.Z=x},35181:function(e,t,n){var i=n(57904),a=n(2053),o=n(82187),r=n.n(o),s=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),h=n(30107),p=n(38470),f=n(5663),m=n(21485),v=n(28800),g=n(50528),b=n(81393),y=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n},x="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=function(e,t){var n,o=e.prefixCls,k=e.bordered,Z=void 0===k||k,S=e.className,w=e.getPopupContainer,C=e.dropdownClassName,P=e.popupClassName,I=e.listHeight,j=void 0===I?256:I,O=e.placement,E=e.listItemHeight,N=void 0===E?32:E,_=e.size,F=e.disabled,R=e.notFoundContent,M=e.status,H=e.showArrow,A=y(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),L=l.useContext(u.E_),T=L.getPopupContainer,W=L.getPrefixCls,q=L.renderEmpty,z=L.direction,D=L.virtual,V=L.dropdownMatchSelectWidth,B=l.useContext(p.Z),J=W("select",o),X=W(),$=(0,b.ri)(J,z),U=$.compactSize,G=$.compactItemClassnames,Y=l.useMemo((function(){var e=A.mode;if("combobox"!==e)return e===x?"combobox":e}),[A.mode]),K="multiple"===Y||"tags"===Y,Q=void 0!==H?H:A.loading||!(K||"combobox"===Y),ee=(0,l.useContext)(f.aM),te=ee.status,ne=ee.hasFeedback,ie=ee.isFormItemInput,ae=ee.feedbackIcon,oe=(0,v.F)(te,M);n=void 0!==R?R:"combobox"===Y?null:(q||d.Z)("Select");var re=(0,g.Z)((0,a.Z)((0,a.Z)({},A),{multiple:K,hasFeedback:ne,feedbackIcon:ae,showArrow:Q,prefixCls:J})),se=re.suffixIcon,ce=re.itemIcon,le=re.removeIcon,ue=re.clearIcon,de=(0,c.Z)(A,["suffixIcon","itemIcon"]),he=r()(P||C,(0,i.Z)({},"".concat(J,"-dropdown-").concat(z),"rtl"===z)),pe=U||_||B,fe=l.useContext(h.Z),me=null!=F?F:fe,ve=r()((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(J,"-lg"),"large"===pe),"".concat(J,"-sm"),"small"===pe),"".concat(J,"-rtl"),"rtl"===z),"".concat(J,"-borderless"),!Z),"".concat(J,"-in-form-item"),ie),(0,v.Z)(J,oe,ne),G,S);return l.createElement(s.ZP,(0,a.Z)({ref:t,virtual:D,dropdownMatchSelectWidth:V},de,{transitionName:(0,m.mL)(X,(0,m.q0)(O),A.transitionName),listHeight:j,listItemHeight:N,mode:Y,prefixCls:J,placement:void 0!==O?O:"rtl"===z?"bottomRight":"bottomLeft",direction:z,inputIcon:se,menuItemSelectedIcon:ce,removeIcon:le,clearIcon:ue,notFoundContent:n,className:ve,getPopupContainer:w||T,dropdownClassName:he,showArrow:ne||H,disabled:me}))},Z=l.forwardRef(k);Z.SECRET_COMBOBOX_MODE_DO_NOT_USE=x,Z.Option=s.Wx,Z.OptGroup=s.Xo,t.Z=Z}}]);
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[5586],{79297:function(e,t,n){n.r(t);var i=n(26068),a=n.n(i),o=n(48305),r=n.n(o),s=n(72317),c=n(75271),l=n(35181),u=n(53390),d=n(88142),h=n(93481),p=n(16314),f=n(3475),m=n(43382),v=n(83383),g=n(90310),b=n(3843),y=n(9364),x=n(48916),k=n(65814),Z=n(78060),S=n.n(Z),w=n(52676),C=l.Z.Option;t.default=function(e){var t=e.treeData,n=e.currentNode,i=e.content,o=e.handleCancel,Z=e.visible,P=(0,c.useState)(""),I=r()(P,2),j=I[0],O=I[1],E=(0,c.useState)(),N=r()(E,2),_=N[0],F=N[1],R=(0,c.useState)(),M=r()(R,2),H=M[0],A=M[1],L=(0,c.useState)(),T=r()(L,2),W=T[0],q=T[1],z=(0,c.useState)(!1),D=r()(z,2),V=D[0],B=D[1],J=(0,c.useState)(!1),X=r()(J,2),$=X[0],U=X[1],G=(0,c.useState)(""),Y=r()(G,2),K=Y[0],Q=Y[1],ee=(0,y.F)().theme,te=(0,c.useRef)(null),ne=(0,c.useState)(!1),ie=r()(ne,2),ae=ie[0],oe=ie[1],re=(0,c.useState)(null),se=r()(re,2),ce=se[0],le=se[1],ue=function(e){p.W.get("".concat(f.Z.apiPrefix,"scripts/detail?file=").concat(e.title,"&path=").concat(e.parent||"")).then((function(e){var t=e.code,n=e.data;200===t&&O(n)}))},de=function(){H&&H.title&&ce&&p.W.put("".concat(f.Z.apiPrefix,"scripts/stop"),{filename:H.title,path:H.parent||"",pid:ce}).then((function(e){var t=e.code;e.data;200===t&&oe(!1)}))},he=(0,c.useCallback)((function(e){var t=e.message;(0,x.x$)(t)&&setTimeout((function(){oe(!1)}),300),Q((function(e){return"".concat(e).concat(t)}))}),[]);return(0,c.useEffect)((function(){var e=k.Z.getInstance();return e.subscribe("manuallyRunScript",he),function(){e.unsubscribe("manuallyRunScript",he)}}),[]),(0,c.useEffect)((function(){if(Q(""),n){A(n),O(i),q(n.key);var e=(0,x.H$)(n.title);F(e)}}),[i,n]),(0,w.jsxs)(u.Z,{className:"edit-modal",closable:!1,title:(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(d.Z,{treeExpandAction:"click",style:{marginRight:8,width:300},value:W,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:t,placeholder:s.ZP.get("请选择脚本文件"),fieldNames:{value:"key",label:"title"},showSearch:!0,onSelect:function(e,t){if(t.key!==W&&e&&"directory"!==t.type){var n=(0,x.H$)(e);A(t),F(n),ue(t),q(t.key)}},treeLine:{showLeafIcon:!0}}),(0,w.jsxs)(l.Z,{value:_,style:{width:110,marginRight:8},onChange:function(e){F(e)},children:[(0,w.jsx)(C,{value:"javascript",children:"javascript"}),(0,w.jsx)(C,{value:"typescript",children:"typescript"}),(0,w.jsx)(C,{value:"shell",children:"shell"}),(0,w.jsx)(C,{value:"python",children:"python"})]}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:ae?de:function(){Q("");var e=te.current.getValue().replace(/\r\n/g,"\n");p.W.put("".concat(f.Z.apiPrefix,"scripts/run"),{filename:H.title,path:H.parent||"",content:e}).then((function(e){var t=e.code,n=e.data;200===t&&(oe(!0),le(n))}))},children:ae?s.ZP.get("停止"):s.ZP.get("运行")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){Q("")},children:s.ZP.get("清空日志")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){B(!0)},children:s.ZP.get("保存")}),(0,w.jsx)(h.Z,{type:"primary",style:{marginRight:8},onClick:function(){de(),o()},children:s.ZP.get("退出")})]}),width:"100%",headerStyle:{padding:"11px 24px"},onClose:function(){o()},open:Z,children:[(0,w.jsxs)(m.Z,{split:"vertical",minSize:200,defaultSize:"50%",style:{height:"calc(100vh - 55px)"},pane2Style:{overflowY:"auto"},children:[(0,w.jsx)(v.ZP,{language:_,value:j,theme:ee,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){te.current=e}}),(0,w.jsx)("pre",{style:{padding:"0 15px"},children:(0,w.jsx)(S(),{children:K})})]}),(0,w.jsx)(g.default,{visible:V,handleCancel:function(){B(!1)},file:a()({content:te.current&&te.current.getValue().replace(/\r\n/g,"\n")},H)}),(0,w.jsx)(b.default,{visible:$,handleCancel:function(){U(!1)}})]})}},90310:function(e,t,n){n.r(t);var i=n(90228),a=n.n(i),o=n(26068),r=n.n(o),s=n(87999),c=n.n(s),l=n(48305),u=n.n(l),d=n(72317),h=n(75271),p=n(72338),f=n(61508),m=n(45520),v=n(17082),g=n(16314),b=n(3475),y=n(52676);t.default=function(e){var t=e.file,n=e.handleCancel,i=e.visible,o=p.Z.useForm(),s=u()(o,1)[0],l=(0,h.useState)(!1),x=u()(l,2),k=x[0],Z=x[1],S=function(){var e=c()(a()().mark((function e(i){var o;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z(!0),o=r()(r()(r()({},t),i),{},{originFilename:t.title}),g.W.post("".concat(b.Z.apiPrefix,"scripts"),o).then((function(e){var t=e.code,i=e.data;200===t&&(f.ZP.success(d.ZP.get("保存文件成功")),n(i))})).finally((function(){Z(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){s.resetFields(),Z(!1)}),[t,i]),(0,y.jsx)(m.Z,{title:d.ZP.get("保存文件"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){s.validateFields().then((function(e){S(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return n()},confirmLoading:k,children:(0,y.jsxs)(p.Z,{form:s,layout:"vertical",name:"script_modal",initialValues:{filename:null==t?void 0:t.title,path:(null==t?void 0:t.parent)||""},children:[(0,y.jsx)(p.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")}],children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件名")})}),(0,y.jsx)(p.Z.Item,{name:"path",label:d.ZP.get("保存目录"),children:(0,y.jsx)(v.Z,{placeholder:d.ZP.get("请输入保存目录,默认scripts目录")})})]})})}},3843:function(e,t,n){n.r(t);n(90228),n(26068),n(87999);var i=n(48305),a=n.n(i),o=n(72317),r=n(75271),s=n(72338),c=(n(61508),n(45520)),l=n(17082),u=(n(16314),n(3475),n(52676));t.default=function(e){var t=e.file,n=e.handleCancel,i=e.visible,d=s.Z.useForm(),h=a()(d,1)[0],p=(0,r.useState)(!1),f=a()(p,2),m=(f[0],f[1]);return(0,r.useEffect)((function(){h.resetFields(),m(!1)}),[t,i]),(0,u.jsx)(c.Z,{title:o.ZP.get("运行设置"),open:i,forceRender:!0,centered:!0,onCancel:function(){return n()},children:(0,u.jsx)(s.Z,{form:h,layout:"vertical",name:"setting_modal",initialValues:t,children:(0,u.jsx)(s.Z.Item,{name:"filename",label:o.ZP.get("待开发"),rules:[{required:!0,message:o.ZP.get("待开发")}],children:(0,u.jsx)(l.Z,{placeholder:o.ZP.get("待开发")})})})})}},9364:function(e,t,n){n.d(t,{F:function(){return c},e:function(){return s}});var i=n(48305),a=n.n(i),o=n(75271),r=n(48916),s=function(){var e=(0,o.useState)("100%"),t=a()(e,2),n=t[0],i=t[1],s=(0,o.useState)(0),c=a()(s,2),l=c[0],u=c[1],d=(0,o.useState)(-48),h=a()(d,2),p=h[0],f=h[1],m=(0,o.useState)(!1),v=a()(m,2),g=v[0],b=v[1],y=(0,o.useMemo)((function(){return(0,r.ZP)()}),[]).platform;return(0,o.useEffect)((function(){"mobile"===y&&document.body.offsetWidth<768?(i("auto"),u(0),f(0),b(!0),document.body.setAttribute("data-mode","phone")):(i("100%"),u(0),f(-48),b(!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:l},isPhone:g}},c=function(){var e=(0,o.useState)(),t=a()(e,2),n=t[0],i=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;i(n?"vs-dark":"vs");var a=function(e){"auto"!==t&&t||(e.matches?i("vs-dark"):i("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",a):"function"==typeof e.addListener&&e.addListener(a)}),[]),{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;i(n?"vs-dark":"vs")}}}},65814:function(e,t,n){var i=n(15558),a=n.n(i),o=n(67825),r=n.n(o),s=n(90228),c=n.n(s),l=n(87999),u=n.n(l),d=n(25298),h=n.n(d),p=n(17069),f=n.n(p),m=n(82092),v=n.n(m),g=n(78078),b=n.n(g),y=["type"],x=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};h()(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 f()(e,[{key:"init",value:(n=u()(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(b())(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=u()(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)===b().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)===b().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,n=r()(e,y),i=this.subscriptions.get(t)||new Set;a()(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)===b().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()(x,"instance",null),t.Z=x},35181:function(e,t,n){var i=n(57904),a=n(2053),o=n(82187),r=n.n(o),s=n(77168),c=n(2021),l=n(75271),u=n(96820),d=n(83289),h=n(30107),p=n(38470),f=n(5663),m=n(21485),v=n(28800),g=n(50528),b=n(81393),y=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(n[i[a]]=e[i[a]])}return n},x="SECRET_COMBOBOX_MODE_DO_NOT_USE",k=function(e,t){var n,o=e.prefixCls,k=e.bordered,Z=void 0===k||k,S=e.className,w=e.getPopupContainer,C=e.dropdownClassName,P=e.popupClassName,I=e.listHeight,j=void 0===I?256:I,O=e.placement,E=e.listItemHeight,N=void 0===E?32:E,_=e.size,F=e.disabled,R=e.notFoundContent,M=e.status,H=e.showArrow,A=y(e,["prefixCls","bordered","className","getPopupContainer","dropdownClassName","popupClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","showArrow"]),L=l.useContext(u.E_),T=L.getPopupContainer,W=L.getPrefixCls,q=L.renderEmpty,z=L.direction,D=L.virtual,V=L.dropdownMatchSelectWidth,B=l.useContext(p.Z),J=W("select",o),X=W(),$=(0,b.ri)(J,z),U=$.compactSize,G=$.compactItemClassnames,Y=l.useMemo((function(){var e=A.mode;if("combobox"!==e)return e===x?"combobox":e}),[A.mode]),K="multiple"===Y||"tags"===Y,Q=void 0!==H?H:A.loading||!(K||"combobox"===Y),ee=(0,l.useContext)(f.aM),te=ee.status,ne=ee.hasFeedback,ie=ee.isFormItemInput,ae=ee.feedbackIcon,oe=(0,v.F)(te,M);n=void 0!==R?R:"combobox"===Y?null:(q||d.Z)("Select");var re=(0,g.Z)((0,a.Z)((0,a.Z)({},A),{multiple:K,hasFeedback:ne,feedbackIcon:ae,showArrow:Q,prefixCls:J})),se=re.suffixIcon,ce=re.itemIcon,le=re.removeIcon,ue=re.clearIcon,de=(0,c.Z)(A,["suffixIcon","itemIcon"]),he=r()(P||C,(0,i.Z)({},"".concat(J,"-dropdown-").concat(z),"rtl"===z)),pe=U||_||B,fe=l.useContext(h.Z),me=null!=F?F:fe,ve=r()((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(J,"-lg"),"large"===pe),"".concat(J,"-sm"),"small"===pe),"".concat(J,"-rtl"),"rtl"===z),"".concat(J,"-borderless"),!Z),"".concat(J,"-in-form-item"),ie),(0,v.Z)(J,oe,ne),G,S);return l.createElement(s.ZP,(0,a.Z)({ref:t,virtual:D,dropdownMatchSelectWidth:V},de,{transitionName:(0,m.mL)(X,(0,m.q0)(O),A.transitionName),listHeight:j,listItemHeight:N,mode:Y,prefixCls:J,placement:void 0!==O?O:"rtl"===z?"bottomRight":"bottomLeft",direction:z,inputIcon:se,menuItemSelectedIcon:ce,removeIcon:le,clearIcon:ue,notFoundContent:n,className:ve,getPopupContainer:w||T,dropdownClassName:he,showArrow:ne||H,disabled:me}))},Z=l.forwardRef(k);Z.SECRET_COMBOBOX_MODE_DO_NOT_USE=x,Z.Option=s.Wx,Z.OptGroup=s.Xo,t.Z=Z}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[7158],{6334:function(e,t,r){r.r(t);var a=r(26068),l=r.n(a),i=r(335),o=r.n(i),n=r(90228),s=r.n(n),u=r(87999),p=r.n(u),c=r(48305),g=r.n(c),d=r(72317),P=r(75271),h=r(35181),Z=r(72338),b=r(61508),m=r(45520),f=r(94747),v=r(17082),y=r(88142),k=r(6367),x=r(16314),w=r(3475),q=r(79231),B=r(52676);h.Z.Option;t.default=function(e){var t=e.handleCancel,r=e.treeData,a=e.visible,i=Z.Z.useForm(),n=g()(i,1)[0],u=(0,P.useState)(!1),c=g()(u,2),h=c[0],C=c[1],j=(0,P.useState)([]),_=g()(j,2),T=_[0],U=_[1],K=(0,P.useState)(),S=g()(K,2),A=S[0],I=S[1],Q=(0,P.useState)("blank"),H=g()(Q,2),R=H[0],X=H[1],D=function(){var e=p()(s()().mark((function e(r){var a,l,i,o,n,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:C(!0),a=r.path,l=void 0===a?"":a,i=r.filename,o=r.directory,n=void 0===o?"":o,(u=new FormData).append("file",A||""),u.append("filename",(null==A?void 0:A.name)||i),u.append("path",l),u.append("content",""),u.append("directory",n),x.W.post("".concat(w.Z.apiPrefix,"scripts"),u).then((function(e){var r=e.code;e.data;if(200===r){b.ZP.success(n?d.ZP.get("创建文件夹成功"):d.ZP.get("创建文件成功"));var a=l?"".concat(l,"/"):"",o=A?A.name:i;t({filename:o,path:l,key:"".concat(a).concat(o)})}C(!1)})).finally((function(){return C(!1)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),E=function e(t){var r,a=o()(t);try{for(a.s();!(r=a.n()).done;){var i=r.value;i.children&&i.children.length>0&&(i.children=i.children.filter((function(e){return"directory"===e.type})).map((function(e){return l()(l()({},e),{},{disabled:!1})})),e(i.children))}}catch(e){a.e(e)}finally{a.f()}return t};return(0,P.useEffect)((function(){var e=r.filter((function(e){return"directory"===e.type})).map((function(e){return l()(l()({},e),{},{disabled:!1})})),t=E(e);U(t)}),[r]),(0,P.useEffect)((function(){n.resetFields()}),[a]),(0,B.jsx)(m.Z,{title:d.ZP.get("创建"),open:a,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){n.validateFields().then((function(e){D(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return t()},confirmLoading:h,children:(0,B.jsxs)(Z.Z,{form:n,layout:"vertical",name:"edit_name_modal",children:[(0,B.jsx)(Z.Z.Item,{name:"type",label:d.ZP.get("类型"),rules:[{required:!0}],initialValue:"blank",children:(0,B.jsxs)(f.ZP.Group,{onChange:function(e){X(e.target.value)},children:[(0,B.jsx)(f.ZP,{value:"blank",children:d.ZP.get("空文件")}),(0,B.jsx)(f.ZP,{value:"upload",children:d.ZP.get("本地文件")}),(0,B.jsx)(f.ZP,{value:"directory",children:d.ZP.get("文件夹")})]})}),"blank"===R&&(0,B.jsx)(Z.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")},{validator:function(e,t){return t.includes("/")?Promise.reject(new Error(d.ZP.get("文件名不能包含斜杠"))):Promise.resolve()}}],children:(0,B.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件名")})}),"directory"===R&&(0,B.jsx)(Z.Z.Item,{name:"directory",label:d.ZP.get("文件夹名"),rules:[{required:!0,message:d.ZP.get("请输入文件夹名")}],children:(0,B.jsx)(v.Z,{placeholder:d.ZP.get("请输入文件夹名")})}),(0,B.jsx)(Z.Z.Item,{label:d.ZP.get("父目录"),name:"path",children:(0,B.jsx)(y.Z,{allowClear:!0,treeData:T,fieldNames:{value:"key",label:"title"},placeholder:d.ZP.get("请选择父目录"),treeDefaultExpandAll:!0})}),"upload"===R&&(0,B.jsx)(Z.Z.Item,{label:d.ZP.get("文件"),name:"file",children:(0,B.jsxs)(k.Z.Dragger,{beforeUpload:function(e){return I(e),!1},maxCount:1,children:[(0,B.jsx)("p",{className:"ant-upload-drag-icon",children:(0,B.jsx)(q.Z,{})}),(0,B.jsx)("p",{className:"ant-upload-text",children:d.ZP.get("点击或者拖拽文件到此区域上传")})]})})]})})}},3475:function(e,t,r){var a=r(72317),l=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),baseUrl:l,apiPrefix:"".concat(l,"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:"ntfy",label:"Ntfy"},{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:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{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("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:a.ZP.get("synologyChat的url地址"),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")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],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("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],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://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),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},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],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:"text/plain"},{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"]}},16314:function(e,t,r){r.d(t,{W:function(){return b}});var a=r(90228),l=r.n(a),i=r(87999),o=r.n(i),n=r(72317),s=r(61508),u=r(33839),p=r(3475),c=r(98783),g=r(69313),d=r(52676);s.ZP.config({duration:2});var P=Date.now(),h=g.Z.create({timeout:6e4,params:{t:P}}),Z=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(p.Z.authKey);return t&&!Z.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(l()().mark((function e(t){var r,a,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=t.status,![502,504].includes(r)){e.next=5;break}c.history.push("/error"),e.next=18;break;case 5:if(401!==r){e.next=9;break}"/login"!==c.history.location.pathname&&(localStorage.removeItem(p.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)&&u.Z.error({message:i,description:null!=a&&a.errors?(0,d.jsx)(d.Fragment,{children:null==a?void 0:a.errors.map((function(e){return(0,d.jsx)("div",{children:e.message})}))}):void 0}),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.statusText,r=e.response.status;if([502,504].includes(r))c.history.push("/error");else if(401===r)"/login"!==c.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(p.Z.authKey),c.history.push("/login"));else{var a,l,i,o;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&u.Z.error({message:t,description:null!==(l=e.response)&&void 0!==l&&null!==(l=l.data)&&void 0!==l&&l.errors?(0,d.jsx)(d.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,d.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var b=h},27916:function(e,t,r){r.d(t,{Z:function(){return i}});var a=r(99459),l=r(75271);function i(){var e=l.useReducer((function(e){return e+1}),0);return(0,a.Z)(e,2)[1]}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[6534,9064,8673,440,8851],{44224:function(e,t,a){"use strict";var i=(0,a(19919).Z)({scriptUrl:["//at.alicdn.com/t/c/font_3354854_lc939gab1iq.js"]});t.Z=i},82802:function(e,t,a){"use strict";var i=a(26068),n=a.n(i),r=a(75271);t.Z=function(e,t,a){var i=a.treeNodeFilterProp;return(0,r.useMemo)((function(){var a=[];if(!t)return{treeData:e,keys:a};var r=t.toUpperCase();function o(e,t){var a=t[i];return String(a).toUpperCase().includes(r)}return{treeData:function e(t){var i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return t.map((function(t){var r=t.children,c=i||o(0,t),s=e(r||[],c);return c||s.length?(s.length&&a.push(t.key),n()(n()({},t),{},{children:s})):null})).filter((function(e){return e}))}(e),keys:a}}),[e,t,i])}},79297:function(e,t,a){"use strict";a.r(t);var i=a(26068),n=a.n(i),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(35181),u=a(53390),d=a(88142),p=a(93481),f=a(16314),g=a(3475),m=a(43382),h=a(83383),A=a(90310),v=a(3843),P=a(9364),b=a(48916),y=a(65814),k=a(78060),Z=a.n(k),x=a(52676),w=l.Z.Option;t.default=function(e){var t=e.treeData,a=e.currentNode,i=e.content,r=e.handleCancel,k=e.visible,E=(0,s.useState)(""),j=o()(E,2),S=j[0],C=j[1],M=(0,s.useState)(),B=o()(M,2),T=B[0],q=B[1],I=(0,s.useState)(),_=o()(I,2),D=_[0],G=_[1],N=(0,s.useState)(),R=o()(N,2),L=R[0],K=R[1],V=(0,s.useState)(!1),F=o()(V,2),H=F[0],U=F[1],O=(0,s.useState)(!1),z=o()(O,2),W=z[0],Y=z[1],Q=(0,s.useState)(""),X=o()(Q,2),J=X[0],$=X[1],ee=(0,P.F)().theme,te=(0,s.useRef)(null),ae=(0,s.useState)(!1),ie=o()(ae,2),ne=ie[0],re=ie[1],oe=(0,s.useState)(null),ce=o()(oe,2),se=ce[0],le=ce[1],ue=function(e){f.W.get("".concat(g.Z.apiPrefix,"scripts/detail?file=").concat(e.title,"&path=").concat(e.parent||"")).then((function(e){var t=e.code,a=e.data;200===t&&C(a)}))},de=function(){D&&D.title&&se&&f.W.put("".concat(g.Z.apiPrefix,"scripts/stop"),{filename:D.title,path:D.parent||"",pid:se}).then((function(e){var t=e.code;e.data;200===t&&re(!1)}))},pe=(0,s.useCallback)((function(e){var t=e.message;(0,b.x$)(t)&&setTimeout((function(){re(!1)}),300),$((function(e){return"".concat(e).concat(t)}))}),[]);return(0,s.useEffect)((function(){var e=y.Z.getInstance();return e.subscribe("manuallyRunScript",pe),function(){e.unsubscribe("manuallyRunScript",pe)}}),[]),(0,s.useEffect)((function(){if($(""),a){G(a),C(i),K(a.key);var e=(0,b.H$)(a.title);q(e)}}),[i,a]),(0,x.jsxs)(u.Z,{className:"edit-modal",closable:!1,title:(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(d.Z,{treeExpandAction:"click",style:{marginRight:8,width:300},value:L,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:t,placeholder:c.ZP.get("请选择脚本文件"),fieldNames:{value:"key",label:"title"},showSearch:!0,onSelect:function(e,t){if(t.key!==L&&e&&"directory"!==t.type){var a=(0,b.H$)(e);G(t),q(a),ue(t),K(t.key)}},treeLine:{showLeafIcon:!0}}),(0,x.jsxs)(l.Z,{value:T,style:{width:110,marginRight:8},onChange:function(e){q(e)},children:[(0,x.jsx)(w,{value:"javascript",children:"javascript"}),(0,x.jsx)(w,{value:"typescript",children:"typescript"}),(0,x.jsx)(w,{value:"shell",children:"shell"}),(0,x.jsx)(w,{value:"python",children:"python"})]}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:ne?de:function(){$("");var e=te.current.getValue().replace(/\r\n/g,"\n");f.W.put("".concat(g.Z.apiPrefix,"scripts/run"),{filename:D.title,path:D.parent||"",content:e}).then((function(e){var t=e.code,a=e.data;200===t&&(re(!0),le(a))}))},children:ne?c.ZP.get("停止"):c.ZP.get("运行")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){$("")},children:c.ZP.get("清空日志")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){U(!0)},children:c.ZP.get("保存")}),(0,x.jsx)(p.Z,{type:"primary",style:{marginRight:8},onClick:function(){de(),r()},children:c.ZP.get("退出")})]}),width:"100%",headerStyle:{padding:"11px 24px"},onClose:function(){r()},open:k,children:[(0,x.jsxs)(m.Z,{split:"vertical",minSize:200,defaultSize:"50%",style:{height:"calc(100vh - 55px)"},pane2Style:{overflowY:"auto"},children:[(0,x.jsx)(h.ZP,{language:T,value:S,theme:ee,options:{fontSize:12,minimap:{enabled:!1},lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){te.current=e}}),(0,x.jsx)("pre",{style:{padding:"0 15px"},children:(0,x.jsx)(Z(),{children:J})})]}),(0,x.jsx)(A.default,{visible:H,handleCancel:function(){U(!1)},file:n()({content:te.current&&te.current.getValue().replace(/\r\n/g,"\n")},D)}),(0,x.jsx)(v.default,{visible:W,handleCancel:function(){Y(!1)}})]})}},6334:function(e,t,a){"use strict";a.r(t);var i=a(26068),n=a.n(i),r=a(335),o=a.n(r),c=a(90228),s=a.n(c),l=a(87999),u=a.n(l),d=a(48305),p=a.n(d),f=a(72317),g=a(75271),m=a(35181),h=a(72338),A=a(61508),v=a(45520),P=a(94747),b=a(17082),y=a(88142),k=a(6367),Z=a(16314),x=a(3475),w=a(79231),E=a(52676);m.Z.Option;t.default=function(e){var t=e.handleCancel,a=e.treeData,i=e.visible,r=h.Z.useForm(),c=p()(r,1)[0],l=(0,g.useState)(!1),d=p()(l,2),m=d[0],j=d[1],S=(0,g.useState)([]),C=p()(S,2),M=C[0],B=C[1],T=(0,g.useState)(),q=p()(T,2),I=q[0],_=q[1],D=(0,g.useState)("blank"),G=p()(D,2),N=G[0],R=G[1],L=function(){var e=u()(s()().mark((function e(a){var i,n,r,o,c,l;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j(!0),i=a.path,n=void 0===i?"":i,r=a.filename,o=a.directory,c=void 0===o?"":o,(l=new FormData).append("file",I||""),l.append("filename",(null==I?void 0:I.name)||r),l.append("path",n),l.append("content",""),l.append("directory",c),Z.W.post("".concat(x.Z.apiPrefix,"scripts"),l).then((function(e){var a=e.code;e.data;if(200===a){A.ZP.success(c?f.ZP.get("创建文件夹成功"):f.ZP.get("创建文件成功"));var i=n?"".concat(n,"/"):"",o=I?I.name:r;t({filename:o,path:n,key:"".concat(i).concat(o)})}j(!1)})).finally((function(){return j(!1)}));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),K=function e(t){var a,i=o()(t);try{for(i.s();!(a=i.n()).done;){var r=a.value;r.children&&r.children.length>0&&(r.children=r.children.filter((function(e){return"directory"===e.type})).map((function(e){return n()(n()({},e),{},{disabled:!1})})),e(r.children))}}catch(e){i.e(e)}finally{i.f()}return t};return(0,g.useEffect)((function(){var e=a.filter((function(e){return"directory"===e.type})).map((function(e){return n()(n()({},e),{},{disabled:!1})})),t=K(e);B(t)}),[a]),(0,g.useEffect)((function(){c.resetFields()}),[i]),(0,E.jsx)(v.Z,{title:f.ZP.get("创建"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){L(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return t()},confirmLoading:m,children:(0,E.jsxs)(h.Z,{form:c,layout:"vertical",name:"edit_name_modal",children:[(0,E.jsx)(h.Z.Item,{name:"type",label:f.ZP.get("类型"),rules:[{required:!0}],initialValue:"blank",children:(0,E.jsxs)(P.ZP.Group,{onChange:function(e){R(e.target.value)},children:[(0,E.jsx)(P.ZP,{value:"blank",children:f.ZP.get("空文件")}),(0,E.jsx)(P.ZP,{value:"upload",children:f.ZP.get("本地文件")}),(0,E.jsx)(P.ZP,{value:"directory",children:f.ZP.get("文件夹")})]})}),"blank"===N&&(0,E.jsx)(h.Z.Item,{name:"filename",label:f.ZP.get("文件名"),rules:[{required:!0,message:f.ZP.get("请输入文件名")},{validator:function(e,t){return t.includes("/")?Promise.reject(new Error(f.ZP.get("文件名不能包含斜杠"))):Promise.resolve()}}],children:(0,E.jsx)(b.Z,{placeholder:f.ZP.get("请输入文件名")})}),"directory"===N&&(0,E.jsx)(h.Z.Item,{name:"directory",label:f.ZP.get("文件夹名"),rules:[{required:!0,message:f.ZP.get("请输入文件夹名")}],children:(0,E.jsx)(b.Z,{placeholder:f.ZP.get("请输入文件夹名")})}),(0,E.jsx)(h.Z.Item,{label:f.ZP.get("父目录"),name:"path",children:(0,E.jsx)(y.Z,{allowClear:!0,treeData:M,fieldNames:{value:"key",label:"title"},placeholder:f.ZP.get("请选择父目录"),treeDefaultExpandAll:!0})}),"upload"===N&&(0,E.jsx)(h.Z.Item,{label:f.ZP.get("文件"),name:"file",children:(0,E.jsxs)(k.Z.Dragger,{beforeUpload:function(e){return _(e),!1},maxCount:1,children:[(0,E.jsx)("p",{className:"ant-upload-drag-icon",children:(0,E.jsx)(w.Z,{})}),(0,E.jsx)("p",{className:"ant-upload-text",children:f.ZP.get("点击或者拖拽文件到此区域上传")})]})})]})})}},53636:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return Y}});var i=a(15558),n=a.n(i),r=a(48305),o=a.n(r),c=a(72317),s=a(75271),l=a(50691),u=a(45520),d=a(61508),p=a(88142),f=a(85950),g=a(93481),m=a(59816),h=a(17082),A=a(13107),v=a(98705),P=a(3475),b=a(47508),y=a(83383),k=a(16314),Z={"left-tree-container":"left-tree-container___z9VeF","left-tree-scroller":"left-tree-scroller___MRc8C","log-container":"log-container___Iva4k"},x=a(79297),w=a(71742),E=a(43382),j=a(21288),S=a(28423),C=a(88939),M=a(97953),B=a(6334),T=a(66292),q=a.n(T),I=a(98783),_=a(40324),D=a(48916),G=a(82802),N=a(4363),R=a.n(N),L=a(44224),K=a(97428),V=a(82904),F=a(28837),H=a(79514),U=a(62609);function O(e){var t=U.Mj.getLanguages(),a=e.slice(e.lastIndexOf(".")).toLowerCase();return t.some((function(e){var t;return null===(t=e.extensions)||void 0===t?void 0:t.includes(a)}))}var z=a(52676),W=l.Z.Text,Y=function(){var e=(0,I.useOutletContext)(),t=e.headerStyle,a=e.isPhone,i=e.theme,r=(0,s.useState)(c.ZP.get("请选择脚本文件")),l=o()(r,2),T=l[0],N=l[1],U=(0,s.useState)(c.ZP.get("请选择脚本文件")),Y=o()(U,2),Q=Y[0],X=Y[1],J=(0,s.useState)([]),$=o()(J,2),ee=$[0],te=$[1],ae=(0,s.useState)(!1),ie=o()(ae,2),ne=ie[0],re=ie[1],oe=(0,s.useState)(""),ce=o()(oe,2),se=ce[0],le=ce[1],ue=(0,s.useState)(),de=o()(ue,2),pe=de[0],fe=de[1],ge=(0,s.useRef)(),me=(0,s.useState)(!1),he=o()(me,2),Ae=he[0],ve=he[1],Pe=(0,s.useState)(""),be=o()(Pe,2),ye=be[0],ke=be[1],Ze=(0,s.useState)(!1),xe=o()(Ze,2),we=xe[0],Ee=xe[1],je=(0,s.useRef)(null),Se=(0,s.useState)(!1),Ce=o()(Se,2),Me=Ce[0],Be=Ce[1],Te=(0,s.useState)(!1),qe=o()(Te,2),Ie=qe[0],_e=qe[1],De=(0,s.useState)(),Ge=o()(De,2),Ne=Ge[0],Re=Ge[1],Le=(0,s.useState)([]),Ke=o()(Le,2),Ve=Ke[0],Fe=Ke[1],He=function(e,t){Ee(t&&O(e))},Ue=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];e&&re(!0),k.W.get("".concat(P.Z.apiPrefix,"scripts")).then((function(e){var t=e.code,a=e.data;200===t&&(te(a),ct(),ze(a))})).finally((function(){return e&&re(!1)}))},Oe=function(e){k.W.get("".concat(P.Z.apiPrefix,"scripts/detail?file=").concat(encodeURIComponent(e.title),"&path=").concat(e.parent||"")).then((function(e){var t=e.code,a=e.data;200===t&&N(a)}))},ze=function(e){var t=(0,_.parse)(I.history.location.search),a=t.p,i=t.s;if(i){var n="".concat(a,"/").concat(i),r={node:{title:i,key:a?n:i,parent:a}},o=(0,D.DY)(e,(function(e){return e.key===r.node.key}));o&&(r.node=o,Fe([a]),Ye([n],r))}},We=function(e,t){if(t.key!==Q&&e)if(X(t.key),Re(t),"directory"!==t.type)if(O(t.title)){var i=(0,D.H$)(e);le(a&&"typescript"===i?"javascript":i),N(c.ZP.get("加载中...")),Oe(t)}else N(c.ZP.get("当前文件不支持预览"));else N(c.ZP.get("请选择脚本文件"))},Ye=(0,s.useCallback)((function(e,t){t.node.key===Q&&we||((je.current?je.current.getValue().replace(/\r\n/g,"\n"):T)!==T?u.Z.confirm({title:"确认离开",content:(0,z.jsx)(z.Fragment,{children:c.ZP.get("当前修改未保存,确定离开吗")}),onOk:function(){We(e[0],t.node),He(t.node.title,!1)},onCancel:function(){console.log("Cancel")}}):(He(t.node.title,!1),We(e[0],t.node)))}),[T,Q,we]),Qe=(0,s.useCallback)((function(e){var t=e.target.value;Xe(t)}),[ee]),Xe=(0,s.useCallback)(q()((function(e){ke(e)}),300),[ee]),Je=(0,G.Z)(ee,ye,{treeNodeFilterProp:"title"}),$e=Je.treeData,et=Je.keys;(0,s.useEffect)((function(){Fe(R()([].concat(n()(Ve),n()(et))))}),[et]);var tt=function(){setTimeout((function(){He(Ne.title,!0)}),300)},at=function(){He(Ne.title,!1),N(c.ZP.get("加载中...")),Oe(Ne)},it=function(){u.Z.confirm({title:"确认保存",content:(0,z.jsxs)(z.Fragment,{children:[c.ZP.get("确认保存文件"),(0,z.jsxs)(W,{style:{wordBreak:"break-all"},type:"warning",children:[" ",Ne.title]}),c.ZP.get(",保存后不可恢复")]}),onOk:function(){var e=je.current?je.current.getValue().replace(/\r\n/g,"\n"):T;return new Promise((function(t,a){k.W.put("".concat(P.Z.apiPrefix,"scripts"),{filename:Ne.title,path:Ne.parent||"",content:e}).then((function(a){var i=a.code;a.data;200===i&&(d.ZP.success("保存成功"),N(e),He(Ne.title,!1)),t(null)})).catch((function(e){return a(e)}))}))},onCancel:function(){console.log("Cancel")}})},nt=function(){u.Z.confirm({title:"确认删除",content:(0,z.jsxs)(z.Fragment,{children:[c.ZP.get("确认删除"),(0,z.jsxs)(W,{style:{wordBreak:"break-all"},type:"warning",children:[" ",Q," "]}),c.ZP.get("文件"),"directory"===Ne.type?c.ZP.get("夹及其子文件"):"",c.ZP.get(",删除后不可恢复")]}),onOk:function(){k.W.delete("".concat(P.Z.apiPrefix,"scripts"),{data:{filename:Ne.title,path:Ne.parent||"",type:Ne.type}}).then((function(e){if(200===e.code){d.ZP.success("删除成功");var t=n()(ee);if(Ne.parent)t=(0,D.I1)(t,(function(e){return e.key===Ne.key}));else{var a=t.findIndex((function(e){return e.key===Ne.key}));-1!==a&&t.splice(a,1)}te(t),ct()}}))},onCancel:function(){console.log("Cancel")}})},rt=function(){_e(!0)},ot=function(){Be(!0)},ct=function(){X(c.ZP.get("请选择脚本文件")),Re(null),N(c.ZP.get("请选择脚本文件"))};(0,s.useEffect)((function(){Ue()}),[]),(0,s.useEffect)((function(){ge.current&&fe(ge.current.clientHeight-6)}),[ge.current,ee]),(0,F.y1)("mod+s",(function(e){we&&it()}),{enableOnFormTags:["textarea"],preventDefault:!0}),(0,F.y1)("mod+d",(function(e){Ne.title&&nt()}),{preventDefault:!0}),(0,F.y1)("mod+o",(function(e){we||ot()}),{preventDefault:!0}),(0,F.y1)("mod+e",(function(e){Ne.title&&at()}),{preventDefault:!0});var st=we?{items:[{label:c.ZP.get("保存"),key:"save",icon:(0,z.jsx)(j.Z,{})},{label:c.ZP.get("退出编辑"),key:"exit",icon:(0,z.jsx)(S.Z,{})}],onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"save":it();break;case"exit":at()}}(t)}}:{items:[{label:c.ZP.get("创建"),key:"add",icon:(0,z.jsx)(j.Z,{})},{label:c.ZP.get("编辑"),key:"edit",icon:(0,z.jsx)(S.Z,{}),disabled:!Q||Ne&&!O(null==Ne?void 0:Ne.title)},{label:c.ZP.get("重命名"),key:"rename",icon:(0,z.jsx)(L.Z,{type:"ql-icon-rename"}),disabled:!Q},{label:c.ZP.get("删除"),key:"delete",icon:(0,z.jsx)(C.Z,{}),disabled:!Q}],onClick:function(e){var t=e.key;e.domEvent.stopPropagation(),function(e){switch(e){case"add":ot();break;case"edit":tt();break;case"delete":nt();break;case"rename":rt()}}(t)}};return(0,z.jsx)(b.ZP,{className:"ql-container-wrapper log-wrapper",title:(0,z.jsxs)(z.Fragment,{children:[Q,"file"===(null==Ne?void 0:Ne.type)&&(0,z.jsx)("span",{style:{marginLeft:6,fontSize:12,color:"#999",display:"inline-block",height:14},children:(0,H.Z)(Ne.size)})]}),loading:ne,extra:a?[(0,z.jsx)(p.Z,{treeExpandAction:"click",className:"log-select",value:Q,dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:ee,placeholder:c.ZP.get("请选择脚本"),fieldNames:{value:"key"},treeNodeFilterProp:"title",showSearch:!0,allowClear:!0,onSelect:We}),(0,z.jsx)(f.Z,{menu:st,trigger:["click"],children:(0,z.jsx)(g.Z,{type:"primary",icon:(0,z.jsx)(M.Z,{})})})]:we?[(0,z.jsx)(g.Z,{type:"primary",onClick:it,children:c.ZP.get("保存")}),(0,z.jsx)(g.Z,{type:"primary",onClick:at,children:c.ZP.get("退出编辑")})]:[(0,z.jsx)(m.Z,{title:c.ZP.get("创建"),children:(0,z.jsx)(g.Z,{type:"primary",onClick:ot,icon:(0,z.jsx)(j.Z,{})})}),(0,z.jsx)(m.Z,{title:c.ZP.get("编辑"),children:(0,z.jsx)(g.Z,{disabled:!Q||Ne&&!O(null==Ne?void 0:Ne.title),type:"primary",onClick:tt,icon:(0,z.jsx)(S.Z,{})})}),(0,z.jsx)(m.Z,{title:c.ZP.get("重命名"),children:(0,z.jsx)(g.Z,{disabled:!Q,type:"primary",onClick:rt,icon:(0,z.jsx)(L.Z,{type:"ql-icon-rename"})})}),(0,z.jsx)(m.Z,{title:c.ZP.get("删除"),children:(0,z.jsx)(g.Z,{type:"primary",disabled:!Q,onClick:nt,icon:(0,z.jsx)(C.Z,{})})}),(0,z.jsx)(g.Z,{type:"primary",onClick:function(){ve(!0)},children:c.ZP.get("调试")})],header:{style:t},children:(0,z.jsxs)("div",{className:"".concat(Z["log-container"]," log-container"),children:[!a&&(0,z.jsxs)(E.Z,{split:"vertical",size:200,maxSize:-100,children:[(0,z.jsx)("div",{className:Z["left-tree-container"],children:ee.length>0?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(h.Z.Search,{className:Z["left-tree-search"],onChange:Qe,placeholder:c.ZP.get("请输入脚本名"),allowClear:!0}),(0,z.jsx)("div",{className:Z["left-tree-scroller"],ref:ge,children:(0,z.jsx)(A.Z,{expandAction:"click",className:Z["left-tree"],treeData:$e,showIcon:!0,height:pe,selectedKeys:[Q],expandedKeys:Ve,onExpand:function(e){Fe(e)},showLine:{showLeafIcon:!0},onSelect:Ye,onDoubleClick:function(e,t){"file"===t.type&&(X(t.key),Re(t),He(t.title,!0))}})})]}):(0,z.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:(0,z.jsx)(v.Z,{description:c.ZP.get("暂无脚本"),image:v.Z.PRESENTED_IMAGE_SIMPLE})})}),(0,z.jsx)(y.ZP,{language:se,value:T,theme:i,options:{readOnly:!we,fontSize:12,lineNumbersMinChars:3,glyphMargin:!1,accessibilitySupport:"off"},onMount:function(e){je.current=e}})]}),a&&(0,z.jsx)(w.ZP,{value:T,extensions:se?[V.RI[se]()]:void 0,theme:i.includes("dark")?"dark":"light",readOnly:!we,onChange:function(e){N(e)}}),Ae&&(0,z.jsx)(x.default,{visible:Ae,treeData:ee,currentNode:Ne,content:T,handleCancel:function(){ve(!1)}}),(0,z.jsx)(B.default,{visible:Me,treeData:ee,handleCancel:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{filename:"",path:"",key:""},t=e.filename,a=e.path,i=e.key;if(t){var r=n()(ee),o={title:t,key:i,parent:a};if(a){r=(0,D.I1)(r,(function(e){return e.key===a}),o);var c=a.split("/"),s=[];c.reduce((function(e,t){return s.push(e),"".concat(e,"/").concat(t)})),Fe([].concat(n()(Ve),s,[a]))}else r.unshift(o);te(r),We(o.title,o),He(o.title,!0)}Be(!1)}}),(0,z.jsx)(K.default,{visible:Ie,handleCancel:function(){_e(!1),Ue(!1)},currentNode:Ne})]})})}},97428:function(e,t,a){"use strict";a.r(t);var i=a(90228),n=a.n(i),r=a(87999),o=a.n(r),c=a(48305),s=a.n(c),l=a(72317),u=a(75271),d=a(72338),p=a(61508),f=a(45520),g=a(17082),m=a(16314),h=a(3475),A=a(52676);t.default=function(e){var t=e.currentNode,a=e.handleCancel,i=e.visible,r=d.Z.useForm(),c=s()(r,1)[0],v=(0,u.useState)(!1),P=s()(v,2),b=P[0],y=P[1],k=function(){var e=o()(n()().mark((function e(i){var r,o;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return y(!0),e.prev=1,e.next=4,m.W.put("".concat(h.Z.apiPrefix,"scripts/rename"),{filename:t.title,path:t.parent||"",newFilename:i.name});case 4:r=e.sent,o=r.code,r.data,200===o&&(p.ZP.success(l.ZP.get("更新名称成功")),a()),y(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),y(!1);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}();return(0,u.useEffect)((function(){c.resetFields()}),[t,i]),(0,A.jsx)(f.Z,{title:l.ZP.get("重命名"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){k(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:b,children:(0,A.jsx)(d.Z,{form:c,initialValues:{name:null==t?void 0:t.title},layout:"vertical",name:"edit_name_modal",children:(0,A.jsx)(d.Z.Item,{name:"name",rules:[{required:!0,message:l.ZP.get("请输入新名称")}],children:(0,A.jsx)(g.Z,{placeholder:l.ZP.get("请输入新名称")})})})})}},90310:function(e,t,a){"use strict";a.r(t);var i=a(90228),n=a.n(i),r=a(26068),o=a.n(r),c=a(87999),s=a.n(c),l=a(48305),u=a.n(l),d=a(72317),p=a(75271),f=a(72338),g=a(61508),m=a(45520),h=a(17082),A=a(16314),v=a(3475),P=a(52676);t.default=function(e){var t=e.file,a=e.handleCancel,i=e.visible,r=f.Z.useForm(),c=u()(r,1)[0],l=(0,p.useState)(!1),b=u()(l,2),y=b[0],k=b[1],Z=function(){var e=s()(n()().mark((function e(i){var r;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k(!0),r=o()(o()(o()({},t),i),{},{originFilename:t.title}),A.W.post("".concat(v.Z.apiPrefix,"scripts"),r).then((function(e){var t=e.code,i=e.data;200===t&&(g.ZP.success(d.ZP.get("保存文件成功")),a(i))})).finally((function(){k(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){c.resetFields(),k(!1)}),[t,i]),(0,P.jsx)(m.Z,{title:d.ZP.get("保存文件"),open:i,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){c.validateFields().then((function(e){Z(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:y,children:(0,P.jsxs)(f.Z,{form:c,layout:"vertical",name:"script_modal",initialValues:{filename:null==t?void 0:t.title,path:(null==t?void 0:t.parent)||""},children:[(0,P.jsx)(f.Z.Item,{name:"filename",label:d.ZP.get("文件名"),rules:[{required:!0,message:d.ZP.get("请输入文件名")}],children:(0,P.jsx)(h.Z,{placeholder:d.ZP.get("请输入文件名")})}),(0,P.jsx)(f.Z.Item,{name:"path",label:d.ZP.get("保存目录"),children:(0,P.jsx)(h.Z,{placeholder:d.ZP.get("请输入保存目录,默认scripts目录")})})]})})}},3843:function(e,t,a){"use strict";a.r(t);a(90228),a(26068),a(87999);var i=a(48305),n=a.n(i),r=a(72317),o=a(75271),c=a(72338),s=(a(61508),a(45520)),l=a(17082),u=(a(16314),a(3475),a(52676));t.default=function(e){var t=e.file,a=e.handleCancel,i=e.visible,d=c.Z.useForm(),p=n()(d,1)[0],f=(0,o.useState)(!1),g=n()(f,2),m=(g[0],g[1]);return(0,o.useEffect)((function(){p.resetFields(),m(!1)}),[t,i]),(0,u.jsx)(s.Z,{title:r.ZP.get("运行设置"),open:i,forceRender:!0,centered:!0,onCancel:function(){return a()},children:(0,u.jsx)(c.Z,{form:p,layout:"vertical",name:"setting_modal",initialValues:t,children:(0,u.jsx)(c.Z.Item,{name:"filename",label:r.ZP.get("待开发"),rules:[{required:!0,message:r.ZP.get("待开发")}],children:(0,u.jsx)(l.Z,{placeholder:r.ZP.get("待开发")})})})})}},3475:function(e,t,a){"use strict";var i=a(72317),n=window.__ENV__QlBaseUrl||"/";t.Z={siteName:i.ZP.get("青龙"),baseUrl:n,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: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:"ntfy",label:"Ntfy"},{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:"wePlusBot",label:i.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{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("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:i.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:i.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:i.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:i.ZP.get("synologyChat的url地址"),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")},{label:"barkArchive",tip:i.ZP.get("BARK是否保存推送消息")}],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("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:i.ZP.get("发送模板")},{label:"pushplusChannel",tip:i.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:i.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:i.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:i.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:i.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:i.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:i.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:i.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:i.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:i.ZP.get("wxPusherBot的uids"),required:!1}],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://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),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},{label:"pushMeUrl",tip:i.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],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:"text/plain"},{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"]}},97302:function(e,t,a){"use strict";a.d(t,{eY:function(){return i},um:function(){return n},z:function(){return r}});var i=" ",n={".py":"python",".js":"javascript",".mjs":"javascript",".sh":"shell",".ts":"typescript",".ini":"ini",".json":"json"},r=["UTC","Africa/Abidjan","Africa/Accra","Africa/Addis Ababa","Africa/Algiers","Africa/Asmara","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar es Salaam","Africa/Djibouti","Africa/Douala","Africa/El Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La Rioja","America/Argentina/Mendoza","America/Argentina/Rio Gallegos","America/Argentina/Salta","America/Argentina/San Juan","America/Argentina/San Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Bahia","America/Bahia Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa Vista","America/Bogota","America/Boise","America/Cambridge Bay","America/Campo Grande","America/Cancun","America/Caracas","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Ciudad Juarez","America/Costa Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El Salvador","America/Fort Nelson","America/Fortaleza","America/Glace Bay","America/Goose Bay","America/Grand Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Inuvik","America/Iqaluit","America/Jamaica","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La Paz","America/Lima","America/Los Angeles","America/Lower Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Menominee","America/Merida","America/Metlakatla","America/Mexico City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montserrat","America/Nassau","America/New York","America/Nome","America/Noronha","America/North Dakota/Beulah","America/North Dakota/Center","America/North Dakota/New Salem","America/Nuuk","America/Ojinaga","America/Panama","America/Paramaribo","America/Phoenix","America/Port of Spain","America/Port-au-Prince","America/Porto Velho","America/Puerto Rico","America/Punta Arenas","America/Rankin Inlet","America/Recife","America/Regina","America/Resolute","America/Rio Branco","America/Santarem","America/Santiago","America/Santo Domingo","America/Sao Paulo","America/Scoresbysund","America/Sitka","America/St Barthelemy","America/St Johns","America/St Kitts","America/St Lucia","America/St Thomas","America/St Vincent","America/Swift Current","America/Tegucigalpa","America/Thule","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Hebron","Asia/Ho Chi Minh","Asia/Hong Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Riyadh","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape Verde","Atlantic/Faroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South Georgia","Atlantic/St Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken Hill","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord Howe","Australia/Melbourne","Australia/Perth","Australia/Sydney","Etc/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT+8","Etc/GMT+9","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-14","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle of Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kirov","Europe/Kyiv","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Kanton","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Port Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Wake","Pacific/Wallis"]},9364:function(e,t,a){"use strict";a.d(t,{F:function(){return s},e:function(){return c}});var i=a(48305),n=a.n(i),r=a(75271),o=a(48916),c=function(){var e=(0,r.useState)("100%"),t=n()(e,2),a=t[0],i=t[1],c=(0,r.useState)(0),s=n()(c,2),l=s[0],u=s[1],d=(0,r.useState)(-48),p=n()(d,2),f=p[0],g=p[1],m=(0,r.useState)(!1),h=n()(m,2),A=h[0],v=h[1],P=(0,r.useMemo)((function(){return(0,o.ZP)()}),[]).platform;return(0,r.useEffect)((function(){"mobile"===P&&document.body.offsetWidth<768?(i("auto"),u(0),g(0),v(!0),document.body.setAttribute("data-mode","phone")):(i("100%"),u(0),g(-48),v(!1),document.body.setAttribute("data-mode","desktop"))}),[]),{headerStyle:{padding:"4px 16px 4px 15px",position:"sticky",top:0,left:0,zIndex:20,marginTop:f,width:a,marginLeft:l},isPhone:A}},s=function(){var e=(0,r.useState)(),t=n()(e,2),a=t[0],i=t[1];return(0,r.useEffect)((function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),a=e.matches&&"light"!==t||"dark"===t;i(a?"vs-dark":"vs");var n=function(e){"auto"!==t&&t||(e.matches?i("vs-dark"):i("vs"))};"function"==typeof e.addEventListener?e.addEventListener("change",n):"function"==typeof e.addListener&&e.addListener(n)}),[]),{theme:a,reloadTheme:function(){var e=window.matchMedia("(prefers-color-scheme: dark)"),t=localStorage.getItem("qinglong_dark_theme"),a=e.matches&&"light"!==t||"dark"===t;i(a?"vs-dark":"vs")}}}},16314:function(e,t,a){"use strict";a.d(t,{W:function(){return A}});var i=a(90228),n=a.n(i),r=a(87999),o=a.n(r),c=a(72317),s=a(61508),l=a(33839),u=a(3475),d=a(98783),p=a(69313),f=a(52676);s.ZP.config({duration:2});var g=Date.now(),m=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"];m.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})),m.interceptors.response.use(function(){var e=o()(n()().mark((function e(t){var a,i,r;return n()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.status,![502,504].includes(a)){e.next=5;break}d.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==d.history.location.pathname&&(localStorage.removeItem(u.Z.authKey),d.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(i=t.data).code&&(r=i.message||i.data)&&l.Z.error({message:r,description:null!=i&&i.errors?(0,f.jsx)(f.Fragment,{children:null==i?void 0:i.errors.map((function(e){return(0,f.jsx)("div",{children:e.message})}))}):void 0}),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.statusText,a=e.response.status;if([502,504].includes(a))d.history.push("/error");else if(401===a)"/login"!==d.history.location.pathname&&(s.ZP.error(c.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(u.Z.authKey),d.history.push("/login"));else{var i,n,r,o;if("function"==typeof(null===(i=e.config)||void 0===i?void 0:i.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&l.Z.error({message:t,description:null!==(n=e.response)&&void 0!==n&&null!==(n=n.data)&&void 0!==n&&n.errors?(0,f.jsx)(f.Fragment,{children:null===(r=e.response)||void 0===r||null===(r=r.data)||void 0===r||null===(r=r.errors)||void 0===r?void 0:r.map((function(e){return(0,f.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var A=m},48916:function(e,t,a){"use strict";a.d(t,{DY:function(){return f},FA:function(){return m},H$:function(){return v},I1:function(){return p},W9:function(){return u},ZP:function(){return l},o4:function(){return P},rS:function(){return A},w7:function(){return d},x$:function(){return g}});var i=a(15558),n=a.n(i),r=a(72317),o=a(97302),c=a(94046),s=a.n(c);function l(){var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},a=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 n="unknow";"windows"===i?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"===i?n=a(/os x [\d._]+/g):"android"===i?n=a(/android [\d._]+/g):"ios"===i&&(n=a(/os [\d._]+/g));var r="unknow";"windows"===i||"macos"===i||"linux"===i?r="desktop":("android"===i||"ios"===i||t(/mobile/g))&&(r="mobile");var o="unknow",c="unknow";t(/applewebkit/g)?(o="webkit",t(/edge/g)?c="edge":t(/opr/g)?c="opera":t(/chrome/g)?c="chrome":t(/safari/g)&&(c="safari")):t(/gecko/g)&&t(/firefox/g)?(o="gecko",c="firefox"):t(/presto/g)?(o="presto",c="opera"):t(/trident|compatible|msie/g)&&(o="trident",c="iexplore");var s="unknow";"webkit"===o?s=a(/applewebkit\/[\d._]+/g):"gecko"===o?s=a(/gecko\/[\d._]+/g):"presto"===o?s=a(/presto\/[\d._]+/g):"trident"===o&&(s=a(/trident\/[\d._]+/g));var l="unknow";"chrome"===c?l=a(/chrome\/[\d._]+/g):"safari"===c?l=a(/version\/[\d._]+/g):"firefox"===c?l=a(/firefox\/[\d._]+/g):"opera"===c?l=a(/opr\/[\d._]+/g):"iexplore"===c?l=a(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===c&&(l=a(/edge\/[\d._]+/g));var u="none",d="unknow";t(/micromessenger/g)?(u="wechat",d=a(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(u="qq",d=a(/qqbrowser\/[\d._]+/g)):t(/ucbrowser/g)?(u="uc",d=a(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?u="360":t(/2345explorer/g)?(u="2345",d=a(/2345explorer\/[\d._]+/g)):t(/metasr/g)?u="sougou":t(/lbbrowser/g)?u="liebao":t(/maxthon/g)&&(u="maxthon",d=a(/maxthon\/[\d._]+/g));var p=Object.assign({engine:o,engineVs:s,platform:r,supporter:c,supporterVs:l,system:i,systemVs:n},"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(p.system,"/").concat(p.systemVs,"\n浏览器:").concat(p.supporter,"/").concat(p.supporterVs,"\n内核:").concat(p.engine,"/").concat(p.engineVs),"color: green;font-size: 14px;font-weight: bold;"),p}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.extraHeight,a=e.target;void 0===t&&(t=99);var i=null,n=0;(i=a||document.querySelector(".ant-table-wrapper"))&&(n=i.getBoundingClientRect().top);var r=document.body.clientHeight-n-t;return r}function d(e,t){var a,i,n=window.URL||window.webkitURL||window,r=new Blob([t]),o=document.createElementNS("http://www.w3.org/1999/xhtml","a");o.href=n.createObjectURL(r),o.download=e,a=o,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),a.dispatchEvent(i)}function p(e,t,a){var i=n()(e),r=[];return function e(i){if(i)for(var n=0;n<(null==i?void 0:i.length);n++){if(t(i[n]))return a?void(i[n].children?i[n].children.unshift(a):i[n].children=[a]):void i.splice(n,1);i[n].children&&(r.push(i[n].key),e(i[n].children))}}(i),i}function f(e,t){var a;return function e(i){if(i)for(var n=0;n<(null==i?void 0:i.length);n++)t(i[n])?a=i[n]:i[n].children&&e(i[n].children)}(n()(e)),a}function g(e){return[o.eY,r.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 a=t.find((function(e){return[".js",".ts",".sh",".py"].some((function(t){return e.endsWith(t)}))}));if(a){var i,n,r="".concat(window.__ENV__QL_DIR,"/data/scripts");a.startsWith(r)&&(a=a.replace(r,""));var o=a.lastIndexOf("/");return o>=0?(n=a.slice(o+1),i=a.slice(0,o)):(n=a,i=""),[n,i]}}function h(e){try{var t=s().parseExpression(e);if(t)return t.next().toDate()}catch(e){}return null}function A(e,t){var a=h(e);return null!=t&&t.length&&t.forEach((function(e){var t=h(e.schedule);t&&(!a||t<a)&&(a=t)})),a}function v(e){var t=function(e){if(!e)return"";var t=e.split(".");return".".concat(t[t.length-1])}(e);return o.um[t]}function P(){var e=document.createElement("div");e.style.position="fixed",e.style.top="0px",e.style.left="0px",e.style.width="100%",e.style.height="100%",e.style.backgroundColor="transparent",e.style.zIndex="9999",document.body.appendChild(e),e.addEventListener("click",(function(e){e.stopPropagation(),e.preventDefault()})),document.body.style.overflow="hidden"}},65814:function(e,t,a){"use strict";var i=a(15558),n=a.n(i),r=a(67825),o=a.n(r),c=a(90228),s=a.n(c),l=a(87999),u=a.n(l),d=a(25298),p=a.n(d),f=a(17069),g=a.n(f),m=a(82092),h=a.n(m),A=a(78078),v=a.n(A),P=["type"],b=function(){function e(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p()(this,e),h()(this,"url",void 0),h()(this,"socket",null),h()(this,"subscriptions",new Map),h()(this,"options",void 0),h()(this,"reconnectAttempts",0),h()(this,"heartbeatTimeout",null),h()(this,"state","closed"),this.url=t,this.options={maxReconnectAttempts:a.maxReconnectAttempts||5,reconnectInterval:a.reconnectInterval||3e3,heartbeatInterval:a.heartbeatInterval||3e4},this.init()}var t,a;return g()(e,[{key:"init",value:(a=u()(s()().mark((function e(){var t=this;return s()().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(v())(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 a.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 a=JSON.parse(t.data);e.dispatchMessage(a)},this.socket.onclose=function(){e.state="closed",e.emit("close")})}},{key:"waitForClose",value:(t=u()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((null===(t=this.socket)||void 0===t?void 0:t.readyState)===v().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 a=this.subscriptions.get(e)||new Set;if(!a.has(t)){a.add(t),this.subscriptions.set(e,a);var i={action:"subscribe",topic:e};this.send(i)}}},{key:"unsubscribe",value:function(e,t){var a=this.subscriptions.get(e)||new Set;if(a.has(t)){a.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)===v().OPEN&&this.socket.send(JSON.stringify(e))}},{key:"dispatchMessage",value:function(e){var t=e.type,a=o()(e,P),i=this.subscriptions.get(t)||new Set;n()(i).forEach((function(e){return e(a)}))}},{key:"startHeartbeat",value:function(){var e=this;this.heartbeatTimeout=setInterval((function(){var t;(null===(t=e.socket)||void 0===t?void 0:t.readyState)===v().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]:"",a=arguments.length>1?arguments[1]:void 0;return e.instance||(e.instance=new e(t,a)),e.instance}}]),e}();h()(b,"instance",null),t.Z=b},50810:function(){}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[9064],{97428:function(e,t,a){a.r(t);var l=a(90228),r=a.n(l),i=a(87999),o=a.n(i),n=a(48305),s=a.n(n),u=a(72317),p=a(75271),g=a(72338),c=a(61508),d=a(45520),P=a(17082),h=a(16314),b=a(3475),Z=a(52676);t.default=function(e){var t=e.currentNode,a=e.handleCancel,l=e.visible,i=g.Z.useForm(),n=s()(i,1)[0],m=(0,p.useState)(!1),v=s()(m,2),f=v[0],k=v[1],y=function(){var e=o()(r()().mark((function e(l){var i,o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k(!0),e.prev=1,e.next=4,h.W.put("".concat(b.Z.apiPrefix,"scripts/rename"),{filename:t.title,path:t.parent||"",newFilename:l.name});case 4:i=e.sent,o=i.code,i.data,200===o&&(c.ZP.success(u.ZP.get("更新名称成功")),a()),k(!1),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),k(!1);case 14:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){n.resetFields()}),[t,l]),(0,Z.jsx)(d.Z,{title:u.ZP.get("重命名"),open:l,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){n.validateFields().then((function(e){y(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return a()},confirmLoading:f,children:(0,Z.jsx)(g.Z,{form:n,initialValues:{name:null==t?void 0:t.title},layout:"vertical",name:"edit_name_modal",children:(0,Z.jsx)(g.Z.Item,{name:"name",rules:[{required:!0,message:u.ZP.get("请输入新名称")}],children:(0,Z.jsx)(P.Z,{placeholder:u.ZP.get("请输入新名称")})})})})}},3475:function(e,t,a){var l=a(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:l.ZP.get("青龙"),baseUrl:r,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:l.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:l.ZP.get("定时任务"),value:"crons"},{name:l.ZP.get("环境变量"),value:"envs"},{name:l.ZP.get("订阅管理"),value:"subscriptions"},{name:l.ZP.get("配置文件"),value:"configs"},{name:l.ZP.get("脚本管理"),value:"scripts"},{name:l.ZP.get("日志管理"),value:"logs"},{name:l.ZP.get("依赖管理"),value:"dependencies"},{name:l.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:l.ZP.get("定时任务"),envs:l.ZP.get("环境变量"),subscriptions:l.ZP.get("订阅管理"),configs:l.ZP.get("配置文件"),scripts:l.ZP.get("脚本管理"),logs:l.ZP.get("日志管理"),dependencies:l.ZP.get("依赖管理"),system:l.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:l.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:l.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:l.ZP.get("钉钉机器人")},{value:"weWorkBot",label:l.ZP.get("企业微信机器人")},{value:"weWorkApp",label:l.ZP.get("企业微信应用")},{value:"aibotk",label:l.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:l.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:l.ZP.get("群晖chat")},{value:"email",label:l.ZP.get("邮箱")},{value:"lark",label:l.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:l.ZP.get("自定义通知")},{value:"closed",label:l.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:l.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:l.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:l.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:l.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:l.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:l.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:l.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:l.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:l.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:l.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:l.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:l.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:l.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:l.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:l.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:l.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:l.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:l.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:l.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:l.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:l.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:l.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:l.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:l.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:l.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:l.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:l.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:l.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:l.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:l.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:l.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:l.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:l.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:l.ZP.get("请输入要发送的目标"),items:[{value:"room",label:l.ZP.get("群聊")},{value:"contact",label:l.ZP.get("好友")}]},{label:"aibotkName",tip:l.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:l.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:l.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:l.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:l.ZP.get("发送模板")},{label:"pushplusChannel",tip:l.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:l.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:l.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:l.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:l.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:l.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:l.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:l.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:l.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:l.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:l.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:l.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:l.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:l.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:l.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:l.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:l.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:l.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:l.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:l.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:l.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:l.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:l.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:l.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":l.ZP.get("登录"),"/initialization":l.ZP.get("初始化"),"/crontab":l.ZP.get("定时任务"),"/env":l.ZP.get("环境变量"),"/subscription":l.ZP.get("订阅管理"),"/config":l.ZP.get("配置文件"),"/script":l.ZP.get("脚本管理"),"/diff":l.ZP.get("对比工具"),"/log":l.ZP.get("日志管理"),"/setting":l.ZP.get("系统设置"),"/error":l.ZP.get("错误日志"),"/dependence":l.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,a){a.d(t,{W:function(){return Z}});var l=a(90228),r=a.n(l),i=a(87999),o=a.n(i),n=a(72317),s=a(61508),u=a(33839),p=a(3475),g=a(98783),c=a(69313),d=a(52676);s.ZP.config({duration:2});var P=Date.now(),h=c.Z.create({timeout:6e4,params:{t:P}}),b=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(p.Z.authKey);return t&&!b.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var a,l,i;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}g.history.push("/error"),e.next=18;break;case 5:if(401!==a){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(p.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(l=t.data).code&&(i=l.message||l.data)&&u.Z.error({message:i,description:null!=l&&l.errors?(0,d.jsx)(d.Fragment,{children:null==l?void 0:l.errors.map((function(e){return(0,d.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",l);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.statusText,a=e.response.status;if([502,504].includes(a))g.history.push("/error");else if(401===a)"/login"!==g.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(p.Z.authKey),g.history.push("/login"));else{var l,r,i,o;if("function"==typeof(null===(l=e.config)||void 0===l?void 0:l.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&u.Z.error({message:t,description:null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.errors?(0,d.jsx)(d.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,d.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var Z=h}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[8673],{90310:function(e,t,l){l.r(t);var a=l(90228),r=l.n(a),i=l(26068),o=l.n(i),n=l(87999),s=l.n(n),u=l(48305),p=l.n(u),g=l(72317),c=l(75271),d=l(72338),P=l(61508),h=l(45520),b=l(17082),Z=l(16314),m=l(3475),v=l(52676);t.default=function(e){var t=e.file,l=e.handleCancel,a=e.visible,i=d.Z.useForm(),n=p()(i,1)[0],u=(0,c.useState)(!1),f=p()(u,2),k=f[0],y=f[1],w=function(){var e=s()(r()().mark((function e(a){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(!0),i=o()(o()(o()({},t),a),{},{originFilename:t.title}),Z.W.post("".concat(m.Z.apiPrefix,"scripts"),i).then((function(e){var t=e.code,a=e.data;200===t&&(P.ZP.success(g.ZP.get("保存文件成功")),l(a))})).finally((function(){y(!1)}));case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){n.resetFields(),y(!1)}),[t,a]),(0,v.jsx)(h.Z,{title:g.ZP.get("保存文件"),open:a,forceRender:!0,centered:!0,maskClosable:!1,onOk:function(){n.validateFields().then((function(e){w(e)})).catch((function(e){console.log("Validate Failed:",e)}))},onCancel:function(){return l()},confirmLoading:k,children:(0,v.jsxs)(d.Z,{form:n,layout:"vertical",name:"script_modal",initialValues:{filename:null==t?void 0:t.title,path:(null==t?void 0:t.parent)||""},children:[(0,v.jsx)(d.Z.Item,{name:"filename",label:g.ZP.get("文件名"),rules:[{required:!0,message:g.ZP.get("请输入文件名")}],children:(0,v.jsx)(b.Z,{placeholder:g.ZP.get("请输入文件名")})}),(0,v.jsx)(d.Z.Item,{name:"path",label:g.ZP.get("保存目录"),children:(0,v.jsx)(b.Z,{placeholder:g.ZP.get("请输入保存目录,默认scripts目录")})})]})})}},3475:function(e,t,l){var a=l(72317),r=window.__ENV__QlBaseUrl||"/";t.Z={siteName:a.ZP.get("青龙"),baseUrl:r,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:"ntfy",label:"Ntfy"},{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:"wePlusBot",label:a.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{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("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:a.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:a.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:a.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:a.ZP.get("synologyChat的url地址"),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")},{label:"barkArchive",tip:a.ZP.get("BARK是否保存推送消息")}],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("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:a.ZP.get("发送模板")},{label:"pushplusChannel",tip:a.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:a.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:a.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:a.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:a.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:a.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:a.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:a.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:a.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:a.ZP.get("wxPusherBot的uids"),required:!1}],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://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),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},{label:"pushMeUrl",tip:a.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],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:"text/plain"},{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"]}},16314:function(e,t,l){l.d(t,{W:function(){return Z}});var a=l(90228),r=l.n(a),i=l(87999),o=l.n(i),n=l(72317),s=l(61508),u=l(33839),p=l(3475),g=l(98783),c=l(69313),d=l(52676);s.ZP.config({duration:2});var P=Date.now(),h=c.Z.create({timeout:6e4,params:{t:P}}),b=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(p.Z.authKey);return t&&!b.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(r()().mark((function e(t){var l,a,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=t.status,![502,504].includes(l)){e.next=5;break}g.history.push("/error"),e.next=18;break;case 5:if(401!==l){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(p.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(a=t.data).code&&(i=a.message||a.data)&&u.Z.error({message:i,description:null!=a&&a.errors?(0,d.jsx)(d.Fragment,{children:null==a?void 0:a.errors.map((function(e){return(0,d.jsx)("div",{children:e.message})}))}):void 0}),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.statusText,l=e.response.status;if([502,504].includes(l))g.history.push("/error");else if(401===l)"/login"!==g.history.location.pathname&&(s.ZP.error(n.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(p.Z.authKey),g.history.push("/login"));else{var a,r,i,o;if("function"==typeof(null===(a=e.config)||void 0===a?void 0:a.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&u.Z.error({message:t,description:null!==(r=e.response)&&void 0!==r&&null!==(r=r.data)&&void 0!==r&&r.errors?(0,d.jsx)(d.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,d.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var Z=h}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_whyour_qinglong=self.webpackChunk_whyour_qinglong||[]).push([[440],{3843:function(e,t,l){l.r(t);l(90228),l(26068),l(87999);var r=l(48305),a=l.n(r),i=l(72317),o=l(75271),s=l(72338),n=(l(61508),l(45520)),u=l(17082),p=(l(16314),l(3475),l(52676));t.default=function(e){var t=e.file,l=e.handleCancel,r=e.visible,g=s.Z.useForm(),c=a()(g,1)[0],P=(0,o.useState)(!1),d=a()(P,2),h=(d[0],d[1]);return(0,o.useEffect)((function(){c.resetFields(),h(!1)}),[t,r]),(0,p.jsx)(n.Z,{title:i.ZP.get("运行设置"),open:r,forceRender:!0,centered:!0,onCancel:function(){return l()},children:(0,p.jsx)(s.Z,{form:c,layout:"vertical",name:"setting_modal",initialValues:t,children:(0,p.jsx)(s.Z.Item,{name:"filename",label:i.ZP.get("待开发"),rules:[{required:!0,message:i.ZP.get("待开发")}],children:(0,p.jsx)(u.Z,{placeholder:i.ZP.get("待开发")})})})})}},3475:function(e,t,l){var r=l(72317),a=window.__ENV__QlBaseUrl||"/";t.Z={siteName:r.ZP.get("青龙"),baseUrl:a,apiPrefix:"".concat(a,"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:r.ZP.get("中文"),flag:"/china.svg"}],defaultLanguage:"en"},scopes:[{name:r.ZP.get("定时任务"),value:"crons"},{name:r.ZP.get("环境变量"),value:"envs"},{name:r.ZP.get("订阅管理"),value:"subscriptions"},{name:r.ZP.get("配置文件"),value:"configs"},{name:r.ZP.get("脚本管理"),value:"scripts"},{name:r.ZP.get("日志管理"),value:"logs"},{name:r.ZP.get("依赖管理"),value:"dependencies"},{name:r.ZP.get("系统信息"),value:"system"}],scopesMap:{crons:r.ZP.get("定时任务"),envs:r.ZP.get("环境变量"),subscriptions:r.ZP.get("订阅管理"),configs:r.ZP.get("配置文件"),scripts:r.ZP.get("脚本管理"),logs:r.ZP.get("日志管理"),dependencies:r.ZP.get("依赖管理"),system:r.ZP.get("系统信息")},notificationModes:[{value:"gotify",label:"Gotify"},{value:"ntfy",label:"Ntfy"},{value:"goCqHttpBot",label:"GoCqHttpBot"},{value:"serverChan",label:r.ZP.get("Server酱")},{value:"pushDeer",label:"PushDeer"},{value:"bark",label:"Bark"},{value:"telegramBot",label:r.ZP.get("Telegram机器人")},{value:"dingtalkBot",label:r.ZP.get("钉钉机器人")},{value:"weWorkBot",label:r.ZP.get("企业微信机器人")},{value:"weWorkApp",label:r.ZP.get("企业微信应用")},{value:"aibotk",label:r.ZP.get("智能微秘书")},{value:"iGot",label:"IGot"},{value:"pushPlus",label:"PushPlus"},{value:"wePlusBot",label:r.ZP.get("微加机器人")},{value:"wxPusherBot",label:"wxPusher"},{value:"chat",label:r.ZP.get("群晖chat")},{value:"email",label:r.ZP.get("邮箱")},{value:"lark",label:r.ZP.get("飞书机器人")},{value:"pushMe",label:"PushMe"},{value:"chronocat",label:"Chronocat"},{value:"webhook",label:r.ZP.get("自定义通知")},{value:"closed",label:r.ZP.get("已关闭")}],notificationModeMap:{gotify:[{label:"gotifyUrl",tip:r.ZP.get("gotify的url地址,例如 https://push.example.de:8080"),required:!0},{label:"gotifyToken",tip:r.ZP.get("gotify的消息应用token码"),required:!0},{label:"gotifyPriority",tip:r.ZP.get("推送消息的优先级")}],ntfy:[{label:"ntfyUrl",tip:r.ZP.get("ntfy的url地址,例如 https://ntfy.sh"),required:!0},{label:"ntfyTopic",tip:r.ZP.get("ntfy的消息应用topic"),required:!0},{label:"ntfyPriority",tip:r.ZP.get("推送消息的优先级")}],chat:[{label:"synologyChatUrl",tip:r.ZP.get("synologyChat的url地址"),required:!0}],goCqHttpBot:[{label:"goCqHttpBotUrl",tip:r.ZP.get("推送到个人QQ: http://127.0.0.1/send_private_msg,群:http://127.0.0.1/send_group_msg"),required:!0},{label:"goCqHttpBotToken",tip:r.ZP.get("访问密钥"),required:!0},{label:"goCqHttpBotQq",tip:r.ZP.get("如果GOBOT_URL设置 /send_private_msg 则需要填入 user_id=个人QQ 相反如果是 /send_group_msg 则需要填入 group_id=QQ群"),required:!0}],serverChan:[{label:"serverChanKey",tip:r.ZP.get("Server酱SENDKEY"),required:!0}],pushDeer:[{label:"pushDeerKey",tip:r.ZP.get("PushDeer的Key,https://github.com/easychen/pushdeer"),required:!0},{label:"pushDeerUrl",tip:r.ZP.get("PushDeer的自架API endpoint,默认是 https://api2.pushdeer.com/message/push")}],bark:[{label:"barkPush",tip:r.ZP.get("Bark的信息IP/设备码,例如:https://api.day.app/XXXXXXXX"),required:!0},{label:"barkIcon",tip:r.ZP.get("BARK推送图标,自定义推送图标 (需iOS15或以上才能显示)")},{label:"barkSound",tip:r.ZP.get("BARK推送铃声,铃声列表去APP查看复制填写")},{label:"barkGroup",tip:r.ZP.get("BARK推送消息的分组,默认为qinglong")},{label:"barkLevel",tip:r.ZP.get("BARK推送消息的时效性,默认为active")},{label:"barkUrl",tip:r.ZP.get("BARK推送消息的跳转URL")},{label:"barkArchive",tip:r.ZP.get("BARK是否保存推送消息")}],telegramBot:[{label:"telegramBotToken",tip:r.ZP.get("telegram机器人的token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw"),required:!0},{label:"telegramBotUserId",tip:r.ZP.get("telegram用户的id,例如:129xxx206"),required:!0},{label:"telegramBotProxyHost",tip:r.ZP.get("代理IP")},{label:"telegramBotProxyPort",tip:r.ZP.get("代理端口")},{label:"telegramBotProxyAuth",tip:r.ZP.get("telegram代理配置认证参数,用户名与密码用英文冒号连接 user:password")},{label:"telegramBotApiHost",tip:r.ZP.get("telegram api自建的反向代理地址,默认tg官方api")}],dingtalkBot:[{label:"dingtalkBotToken",tip:r.ZP.get("钉钉机器人webhook token,例如:5a544165465465645d0f31dca676e7bd07415asdasd"),required:!0},{label:"dingtalkBotSecret",tip:r.ZP.get("密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串")}],weWorkBot:[{label:"weWorkBotKey",tip:r.ZP.get("企业微信机器人的webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],weWorkApp:[{label:"weWorkAppKey",tip:r.ZP.get("corpid、corpsecret、touser(注:多个成员ID使用|隔开)、agentid、消息类型(选填,不填默认文本消息类型) 注意用,号隔开(英文输入法的逗号),例如:wwcfrs,B-76WERQ,qinglong,1000001,2COat"),required:!0},{label:"weWorkOrigin",tip:r.ZP.get("企业微信代理地址")}],aibotk:[{label:"aibotkKey",tip:r.ZP.get("密钥key,智能微秘书个人中心获取apikey,申请地址:https://wechat.aibotk.com/signup?from=ql"),required:!0},{label:"aibotkType",tip:r.ZP.get("发送的目标,群组或者好友"),required:!0,placeholder:r.ZP.get("请输入要发送的目标"),items:[{value:"room",label:r.ZP.get("群聊")},{value:"contact",label:r.ZP.get("好友")}]},{label:"aibotkName",tip:r.ZP.get("要发送的用户昵称或群名,如果目标是群,需要填群名,如果目标是好友,需要填好友昵称"),required:!0}],iGot:[{label:"iGotPushKey",tip:r.ZP.get("iGot的信息推送key,例如:https://push.hellyw.com/XXXXXXXX"),required:!0}],pushPlus:[{label:"pushPlusToken",tip:r.ZP.get("微信扫码登录后一对一推送或一对多推送下面的token(您的Token),不提供PUSH_PLUS_USER则默认为一对一推送,参考 https://www.pushplus.plus/"),required:!0},{label:"pushPlusUser",tip:r.ZP.get("一对多推送的“群组编码”(一对多推送下面->您的群组(如无则创建)->群组编码,如果您是创建群组人。也需点击“查看二维码”扫描绑定,否则不能接受群组消息推送)")},{label:"pushplusTemplate",tip:r.ZP.get("发送模板")},{label:"pushplusChannel",tip:r.ZP.get("发送渠道")},{label:"pushplusWebhook",tip:r.ZP.get("webhook编码")},{label:"pushplusCallbackUrl",tip:r.ZP.get("发送结果回调地址")},{label:"pushplusTo",tip:r.ZP.get("好友令牌")}],wePlusBot:[{label:"wePlusBotToken",tip:r.ZP.get("用户令牌,扫描登录后 我的—>设置->令牌 中获取,参考 https://www.weplusbot.com/"),required:!0},{label:"wePlusBotReceiver",tip:r.ZP.get("消息接收人")},{label:"wePlusBotVersion",tip:r.ZP.get("调用版本;专业版填写pro,个人版填写personal,为空默认使用专业版")}],wxPusherBot:[{label:"wxPusherBotAppToken",tip:r.ZP.get("wxPusherBot的appToken"),required:!0},{label:"wxPusherBotTopicIds",tip:r.ZP.get("wxPusherBot的topicIds"),required:!1},{label:"wxPusherBotUids",tip:r.ZP.get("wxPusherBot的uids"),required:!1}],lark:[{label:"larkKey",tip:r.ZP.get("飞书群组机器人:https://www.feishu.cn/hc/zh-CN/articles/360024984973"),required:!0}],email:[{label:"emailService",tip:r.ZP.get("邮箱服务名称,比如126、163、Gmail、QQ等,支持列表https://github.com/nodemailer/nodemailer/blob/master/lib/well-known/services.json"),required:!0},{label:"emailUser",tip:r.ZP.get("邮箱地址"),required:!0},{label:"emailPass",tip:r.ZP.get("SMTP 登录密码,也可能为特殊口令,视具体邮件服务商说明而定"),required:!0}],pushMe:[{label:"pushMeKey",tip:r.ZP.get("PushMe的Key,https://push.i-i.me/"),required:!0},{label:"pushMeUrl",tip:r.ZP.get("自建的PushMeServer消息接口地址,例如:http://127.0.0.1:3010,不填则使用官方消息接口"),required:!1}],chronocat:[{label:"chronocatURL",tip:r.ZP.get("Chronocat Red 服务的连接地址 https://chronocat.vercel.app/install/docker/official/"),required:!0},{label:"chronocatQQ",tip:r.ZP.get("个人:user_id=个人QQ 群则填入group_id=QQ群 多个用英文;隔开同时支持个人和群 如:user_id=xxx;group_id=xxxx;group_id=xxxxx"),required:!0},{label:"chronocatToken",tip:r.ZP.get("docker安装在持久化config目录下的chronocat.yml文件可找到"),required:!0}],webhook:[{label:"webhookMethod",tip:r.ZP.get("请求方法"),required:!0,items:[{value:"GET"},{value:"POST"},{value:"PUT"}]},{label:"webhookContentType",tip:r.ZP.get("请求头Content-Type"),required:!0,items:[{value:"text/plain"},{value:"application/json"},{value:"multipart/form-data"},{value:"application/x-www-form-urlencoded"}]},{label:"webhookUrl",tip:r.ZP.get("请求链接以http或者https开头。url或者body中必须包含$title,$content可选,对应api内容的位置"),required:!0,placeholder:"https://xxx.cn/api?content=$title\n"},{label:"webhookHeaders",tip:r.ZP.get("请求头格式Custom-Header1: Header1,多个换行分割"),placeholder:"Custom-Header1: Header1\nCustom-Header2: Header2"},{label:"webhookBody",tip:r.ZP.get("请求体格式key1: value1,多个换行分割。url或者body中必须包含$title,$content可选,对应api内容的位置"),placeholder:"key1: $title\nkey2: $content"}]},documentTitleMap:{"/login":r.ZP.get("登录"),"/initialization":r.ZP.get("初始化"),"/crontab":r.ZP.get("定时任务"),"/env":r.ZP.get("环境变量"),"/subscription":r.ZP.get("订阅管理"),"/config":r.ZP.get("配置文件"),"/script":r.ZP.get("脚本管理"),"/diff":r.ZP.get("对比工具"),"/log":r.ZP.get("日志管理"),"/setting":r.ZP.get("系统设置"),"/error":r.ZP.get("错误日志"),"/dependence":r.ZP.get("依赖管理")},dependenceTypes:["nodejs","python3","linux"]}},16314:function(e,t,l){l.d(t,{W:function(){return Z}});var r=l(90228),a=l.n(r),i=l(87999),o=l.n(i),s=l(72317),n=l(61508),u=l(33839),p=l(3475),g=l(98783),c=l(69313),P=l(52676);n.ZP.config({duration:2});var d=Date.now(),h=c.Z.create({timeout:6e4,params:{t:d}}),b=["/api/user/login","/open/auth/token","/api/user/two-factor/login","/api/system","/api/user/init","/api/user/notification/init"];h.interceptors.request.use((function(e){var t=localStorage.getItem(p.Z.authKey);return t&&!b.includes(e.url)?(e.headers.Authorization="Bearer ".concat(t),e):e})),h.interceptors.response.use(function(){var e=o()(a()().mark((function e(t){var l,r,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=t.status,![502,504].includes(l)){e.next=5;break}g.history.push("/error"),e.next=18;break;case 5:if(401!==l){e.next=9;break}"/login"!==g.history.location.pathname&&(localStorage.removeItem(p.Z.authKey),g.history.push("/login")),e.next=18;break;case 9:return e.prev=9,200!==(r=t.data).code&&(i=r.message||r.data)&&u.Z.error({message:i,description:null!=r&&r.errors?(0,P.jsx)(P.Fragment,{children:null==r?void 0:r.errors.map((function(e){return(0,P.jsx)("div",{children:e.message})}))}):void 0}),e.abrupt("return",r);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.statusText,l=e.response.status;if([502,504].includes(l))g.history.push("/error");else if(401===l)"/login"!==g.history.location.pathname&&(n.ZP.error(s.ZP.get("登录已过期,请重新登录")),localStorage.removeItem(p.Z.authKey),g.history.push("/login"));else{var r,a,i,o;if("function"==typeof(null===(r=e.config)||void 0===r?void 0:r.onError))return null===(o=e.config)||void 0===o?void 0:o.onError(e.response);t&&u.Z.error({message:t,description:null!==(a=e.response)&&void 0!==a&&null!==(a=a.data)&&void 0!==a&&a.errors?(0,P.jsx)(P.Fragment,{children:null===(i=e.response)||void 0===i||null===(i=i.data)||void 0===i||null===(i=i.errors)||void 0===i?void 0:i.map((function(e){return(0,P.jsxs)("div",{children:[e.message," (",e.value,")"]})}))}):void 0})}}else console.log(e.message);return Promise.reject(e)}));var Z=h}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.container___nww32{display:flex;justify-content:center;flex-wrap:wrap;max-width:800px;margin:20px auto}.container___nww32 .right___o0xXT{display:flex;justify-content:center;flex-direction:column}.container___nww32 .right___o0xXT .title___DHxWh{font-size:25px;margin-bottom:10px}.container___nww32 .right___o0xXT .desc___frhI6{margin-bottom:10px}.container___nww32 .right___o0xXT .ant-descriptions-row>th,.container___nww32 .right___o0xXT .ant-descriptions-row>td{padding-bottom:10px}.dependence-config-wrapper___MFabM{display:flex;gap:40px}
|
|
1
|
+
.container___nww32{display:flex;justify-content:center;flex-wrap:wrap;max-width:800px;margin:20px auto}.container___nww32 .right___o0xXT{display:flex;justify-content:center;flex-direction:column}.container___nww32 .right___o0xXT .title___DHxWh{font-size:25px;margin-bottom:10px}.container___nww32 .right___o0xXT .desc___frhI6{margin-bottom:10px}.container___nww32 .right___o0xXT .ant-descriptions-row>th,.container___nww32 .right___o0xXT .ant-descriptions-row>td{padding-bottom:10px}.dependence-config-wrapper___MFabM{display:flex;gap:40px}.ql-container-wrapper___Afedg.ql-setting-container___iA4Dn .ant-tabs-tabpane___c37Ui>div{padding-left:2px}.ql-container-wrapper___Afedg.ql-setting-container___iA4Dn .ant-tabs-tabpane___c37Ui>.ant-form___hGpFG{padding-left:2px}
|