pixivflow 2.0.38 → 2.0.39
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/dist/commands/DownloadCommand.d.ts.map +1 -1
- package/dist/commands/DownloadCommand.js +50 -2
- package/dist/commands/DownloadCommand.js.map +1 -1
- package/dist/config/validation.d.ts.map +1 -1
- package/dist/config/validation.js +11 -3
- package/dist/config/validation.js.map +1 -1
- package/dist/index.js +37 -14
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/pixiv/AuthClient.d.ts.map +1 -1
- package/dist/pixiv/AuthClient.js +56 -7
- package/dist/pixiv/AuthClient.js.map +1 -1
- package/dist/storage/Database.d.ts +22 -0
- package/dist/storage/Database.d.ts.map +1 -1
- package/dist/storage/Database.js +19 -0
- package/dist/storage/Database.js.map +1 -1
- package/dist/storage/DatabaseMigration.d.ts.map +1 -1
- package/dist/storage/DatabaseMigration.js +29 -0
- package/dist/storage/DatabaseMigration.js.map +1 -1
- package/dist/storage/repositories/TaskHistoryRepository.d.ts +61 -0
- package/dist/storage/repositories/TaskHistoryRepository.d.ts.map +1 -0
- package/dist/storage/repositories/TaskHistoryRepository.js +171 -0
- package/dist/storage/repositories/TaskHistoryRepository.js.map +1 -0
- package/dist/utils/errors.js +11 -11
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/pixiv-url-parser.d.ts +7 -1
- package/dist/utils/pixiv-url-parser.d.ts.map +1 -1
- package/dist/utils/pixiv-url-parser.js +75 -8
- package/dist/utils/pixiv-url-parser.js.map +1 -1
- package/dist/utils/token-manager.d.ts.map +1 -1
- package/dist/utils/token-manager.js +73 -5
- package/dist/utils/token-manager.js.map +1 -1
- package/dist/webui/package.json +1 -1
- package/dist/webui/routes/download.d.ts.map +1 -1
- package/dist/webui/routes/download.js +2 -0
- package/dist/webui/routes/download.js.map +1 -1
- package/dist/webui/routes/handlers/download-basic-handlers.d.ts +11 -0
- package/dist/webui/routes/handlers/download-basic-handlers.d.ts.map +1 -1
- package/dist/webui/routes/handlers/download-basic-handlers.js +199 -8
- package/dist/webui/routes/handlers/download-basic-handlers.js.map +1 -1
- package/dist/webui/services/DownloadTaskManager.d.ts.map +1 -1
- package/dist/webui/services/DownloadTaskManager.js +75 -3
- package/dist/webui/services/DownloadTaskManager.js.map +1 -1
- package/package.json +1 -1
- package/dist/webui/assets/ActionButton-DWq-fh3_.js +0 -2
- package/dist/webui/assets/ActionButton-DWq-fh3_.js.map +0 -1
- package/dist/webui/assets/CheckCircleOutlined-Can0-7ew.js +0 -2
- package/dist/webui/assets/CheckCircleOutlined-Can0-7ew.js.map +0 -1
- package/dist/webui/assets/CloseCircleOutlined-DfRmL2eG.js +0 -2
- package/dist/webui/assets/CloseCircleOutlined-DfRmL2eG.js.map +0 -1
- package/dist/webui/assets/Config-D9TWUGQR.js +0 -16
- package/dist/webui/assets/Config-D9TWUGQR.js.map +0 -1
- package/dist/webui/assets/Dashboard-CaGAH0y2.js +0 -2
- package/dist/webui/assets/Dashboard-CaGAH0y2.js.map +0 -1
- package/dist/webui/assets/DeleteOutlined-u-P2SpoK.js +0 -2
- package/dist/webui/assets/DeleteOutlined-u-P2SpoK.js.map +0 -1
- package/dist/webui/assets/Download-D9E4xrnM.js +0 -2
- package/dist/webui/assets/Download-D9E4xrnM.js.map +0 -1
- package/dist/webui/assets/Files-CKyc_PdW.js +0 -5
- package/dist/webui/assets/Files-CKyc_PdW.js.map +0 -1
- package/dist/webui/assets/PictureOutlined-C8Lbucj1.js +0 -2
- package/dist/webui/assets/PictureOutlined-C8Lbucj1.js.map +0 -1
- package/dist/webui/assets/SortDescendingOutlined-CR-hdhyW.js +0 -2
- package/dist/webui/assets/SortDescendingOutlined-CR-hdhyW.js.map +0 -1
- package/dist/webui/assets/ThunderboltOutlined-CiiB2de5.js +0 -2
- package/dist/webui/assets/ThunderboltOutlined-CiiB2de5.js.map +0 -1
- package/dist/webui/assets/UrlDownload-ClkUOXN_.js +0 -3
- package/dist/webui/assets/UrlDownload-ClkUOXN_.js.map +0 -1
- package/dist/webui/assets/dateUtils-CBk8bEa_.js +0 -2
- package/dist/webui/assets/dateUtils-CBk8bEa_.js.map +0 -1
- package/dist/webui/assets/errorCodeTranslator-DWsWq6B3.js +0 -3
- package/dist/webui/assets/errorCodeTranslator-DWsWq6B3.js.map +0 -1
- package/dist/webui/assets/index-BFgUdwJv.js +0 -214
- package/dist/webui/assets/index-BFgUdwJv.js.map +0 -1
- package/dist/webui/assets/index-CN3FylAF.js +0 -2
- package/dist/webui/assets/index-CN3FylAF.js.map +0 -1
- package/dist/webui/assets/index-CSoUPZat.js +0 -2
- package/dist/webui/assets/index-CSoUPZat.js.map +0 -1
- package/dist/webui/assets/index-CiHwNwrk.js +0 -19
- package/dist/webui/assets/index-CiHwNwrk.js.map +0 -1
- package/dist/webui/assets/index-DHwJxrFi.css +0 -1
- package/dist/webui/assets/index-DTU-FGA4.js +0 -2
- package/dist/webui/assets/index-DTU-FGA4.js.map +0 -1
- package/dist/webui/assets/index-DjpD0HQ5.js +0 -2
- package/dist/webui/assets/index-DjpD0HQ5.js.map +0 -1
- package/dist/webui/assets/index-Dycn6xoz.js +0 -2
- package/dist/webui/assets/index-Dycn6xoz.js.map +0 -1
- package/dist/webui/assets/index-G0EJCamt.js +0 -22
- package/dist/webui/assets/index-G0EJCamt.js.map +0 -1
- package/dist/webui/assets/index-WaraZQH0.js +0 -2
- package/dist/webui/assets/index-WaraZQH0.js.map +0 -1
- package/dist/webui/assets/index-k2rGFxEM.js +0 -8
- package/dist/webui/assets/index-k2rGFxEM.js.map +0 -1
- package/dist/webui/assets/index-lwTtspUb.js +0 -14
- package/dist/webui/assets/index-lwTtspUb.js.map +0 -1
- package/dist/webui/assets/index-pT0W4KjK.js +0 -47
- package/dist/webui/assets/index-pT0W4KjK.js.map +0 -1
- package/dist/webui/assets/index-wvielV9A.js +0 -2
- package/dist/webui/assets/index-wvielV9A.js.map +0 -1
- package/dist/webui/assets/row-FRqVdQDX.js +0 -20
- package/dist/webui/assets/row-FRqVdQDX.js.map +0 -1
- package/dist/webui/assets/useAuth-BMt6dHSB.js +0 -9
- package/dist/webui/assets/useAuth-BMt6dHSB.js.map +0 -1
- package/dist/webui/assets/useConfig-29Ugtjk4.js +0 -9
- package/dist/webui/assets/useConfig-29Ugtjk4.js.map +0 -1
- package/dist/webui/assets/useDownload-Dt6lsP8S.js +0 -2
- package/dist/webui/assets/useDownload-Dt6lsP8S.js.map +0 -1
- package/dist/webui/assets/useErrorHandler-DWHs3RlU.js +0 -84
- package/dist/webui/assets/useErrorHandler-DWHs3RlU.js.map +0 -1
- package/dist/webui/index.html +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DownloadTaskManager.js","sourceRoot":"","sources":["../../../src/webui/services/DownloadTaskManager.ts"],"names":[],"mappings":";;;AAAA,oEAAiE;AACjE,yDAAsD;AACtD,uDAAmD;AACnD,qDAAkD;AAClD,4DAAyD;AACzD,yCAA2E;AAC3E,yCAAsC;AAuBtC,MAAa,mBAAmB;IACtB,KAAK,GAAG,IAAI,GAAG,EAAsB,CAAC;IACtC,QAAQ,GAAG,IAAI,GAAG,EAA0B,CAAC;IAC7C,UAAU,GAMP,IAAI,CAAC;IAEhB;;;;;;OAMG;IACH,KAAK,CAAC,SAAS,CACb,MAAc,EACd,QAAiB,EACjB,YAAwC,EACxC,WAAsB;QAEtB,0CAA0C;QAC1C,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QAED,IAAI,MAAwB,CAAC;QAE7B,6DAA6D;QAC7D,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,gCAAgC;YAChC,MAAM,UAAU,GAAG,IAAA,mBAAU,EAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9C,MAAM,UAAU,GAAU,CAAC,GAAG,CAAC,U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,EAAE,MAAM,EAAE,CAAC,CAAC;gBACrC,MAAM;YACR,KAAK,MAAM;gBACT,eAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,MAAM;gBACT,eAAM,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,OAAO;gBACV,eAAM,CAAC,KAAK,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;gBACrC,MAAM;QACV,CAAC;IACH,CAAC;IAED;;OAEG;IACH,WAAW,CAAC,MAAc,EAAE,KAAc;QACxC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC7C,IAAI,KAAK,EAAE,CAAC;YACV,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC;QAC5B,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;OAEG;IACH,aAAa,CAAC,MAAc;QAC1B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACpC,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;CACF;AA1XD,kDA0XC;AAED,qBAAqB;AACR,QAAA,mBAAmB,GAAG,IAAI,mBAAmB,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as s,bh as k,B as x,aZ as E}from"./index-BFgUdwJv.js";const a=r=>typeof r?.then=="function",P=r=>{const{type:p,children:v,prefixCls:m,buttonProps:h,close:l,autoFocus:f,emitEvent:b,isSilent:i,quitOnNullishReturnValue:y,actionFn:o}=r,n=s.useRef(!1),d=s.useRef(null),[C,c]=k(!1),u=(...t)=>{l?.apply(void 0,t)};s.useEffect(()=>{let t=null;return f&&(t=setTimeout(()=>{var e;(e=d.current)===null||e===void 0||e.focus({preventScroll:!0})})),()=>{t&&clearTimeout(t)}},[f]);const R=t=>{a(t)&&(c(!0),t.then((...e)=>{c(!1,!0),u.apply(void 0,e),n.current=!1},e=>{if(c(!1,!0),n.current=!1,!i?.())return Promise.reject(e)}))},g=t=>{if(n.current)return;if(n.current=!0,!o){u();return}let e;if(b){if(e=o(t),y&&!a(e)){n.current=!1,u(t);return}}else if(o.length)e=o(l),n.current=!1;else if(e=o(),!a(e)){u();return}R(e)};return s.createElement(x,Object.assign({},E(p),{onClick:g,loading:C,prefixCls:m},h,{ref:d}),v)};export{P as A};
|
|
2
|
-
//# sourceMappingURL=ActionButton-DWq-fh3_.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActionButton-DWq-fh3_.js","sources":["../../node_modules/antd/es/_util/ActionButton.js"],"sourcesContent":["\"use client\";\n\nimport * as React from 'react';\nimport useState from \"rc-util/es/hooks/useState\";\nimport Button from '../button';\nimport { convertLegacyProps } from '../button/buttonHelpers';\nconst isThenable = thing => {\n return typeof (thing === null || thing === void 0 ? void 0 : thing.then) === 'function';\n};\nconst ActionButton = props => {\n const {\n type,\n children,\n prefixCls,\n buttonProps,\n close,\n autoFocus,\n emitEvent,\n isSilent,\n quitOnNullishReturnValue,\n actionFn\n } = props;\n const clickedRef = React.useRef(false);\n const buttonRef = React.useRef(null);\n const [loading, setLoading] = useState(false);\n const onInternalClose = (...args) => {\n close === null || close === void 0 ? void 0 : close.apply(void 0, args);\n };\n React.useEffect(() => {\n let timeoutId = null;\n if (autoFocus) {\n timeoutId = setTimeout(() => {\n var _a;\n (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus({\n preventScroll: true\n });\n });\n }\n return () => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n };\n }, [autoFocus]);\n const handlePromiseOnOk = returnValueOfOnOk => {\n if (!isThenable(returnValueOfOnOk)) {\n return;\n }\n setLoading(true);\n returnValueOfOnOk.then((...args) => {\n setLoading(false, true);\n onInternalClose.apply(void 0, args);\n clickedRef.current = false;\n }, e => {\n // See: https://github.com/ant-design/ant-design/issues/6183\n setLoading(false, true);\n clickedRef.current = false;\n // Do not throw if is `await` mode\n if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {\n return;\n }\n return Promise.reject(e);\n });\n };\n const onClick = e => {\n if (clickedRef.current) {\n return;\n }\n clickedRef.current = true;\n if (!actionFn) {\n onInternalClose();\n return;\n }\n let returnValueOfOnOk;\n if (emitEvent) {\n returnValueOfOnOk = actionFn(e);\n if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {\n clickedRef.current = false;\n onInternalClose(e);\n return;\n }\n } else if (actionFn.length) {\n returnValueOfOnOk = actionFn(close);\n // https://github.com/ant-design/ant-design/issues/23358\n clickedRef.current = false;\n } else {\n returnValueOfOnOk = actionFn();\n if (!isThenable(returnValueOfOnOk)) {\n onInternalClose();\n return;\n }\n }\n handlePromiseOnOk(returnValueOfOnOk);\n };\n return /*#__PURE__*/React.createElement(Button, Object.assign({}, convertLegacyProps(type), {\n onClick: onClick,\n loading: loading,\n prefixCls: prefixCls\n }, buttonProps, {\n ref: buttonRef\n }), children);\n};\nexport default ActionButton;"],"names":["isThenable","thing","ActionButton","props","type","children","prefixCls","buttonProps","close","autoFocus","emitEvent","isSilent","quitOnNullishReturnValue","actionFn","clickedRef","React.useRef","buttonRef","loading","setLoading","useState","onInternalClose","args","React.useEffect","timeoutId","_a","handlePromiseOnOk","returnValueOfOnOk","onClick","e","React.createElement","Button","convertLegacyProps"],"mappings":"+DAMA,MAAMA,EAAaC,GACV,OAAsDA,GAAM,MAAU,WAEzEC,EAAeC,GAAS,CAC5B,KAAM,CACJ,KAAAC,EACA,SAAAC,EACA,UAAAC,EACA,YAAAC,EACA,MAAAC,EACA,UA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,CAEFK,EAAkBC,CAAiB,CACrC,EACA,OAAoBG,EAAAA,cAAoBC,EAAQ,OAAO,OAAO,GAAIC,EAAmB3B,CAAI,EAAG,CAC1F,QAASuB,EACT,QAASV,EACT,UAAWX,CACf,EAAKC,EAAa,CACd,IAAKS,CACT,CAAG,EAAGX,CAAQ,CACd","x_google_ignoreList":[0]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,I as a,_ as r}from"./index-BFgUdwJv.js";var l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},n=function(t,c){return e.createElement(a,r({},t,{ref:c,icon:l}))},o=e.forwardRef(n);export{o as R};
|
|
2
|
-
//# sourceMappingURL=CheckCircleOutlined-Can0-7ew.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckCircleOutlined-Can0-7ew.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/CheckCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/CheckCircleOutlined.js"],"sourcesContent":["// This icon file is generated automatically.\nvar CheckCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z\" } }, { \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z\" } }] }, \"name\": \"check-circle\", \"theme\": \"outlined\" };\nexport default CheckCircleOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport CheckCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/CheckCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar CheckCircleOutlined = function CheckCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: CheckCircleOutlinedSvg\n }));\n};\n\n/** */\nvar RefIcon = /*#__PURE__*/React.forwardRef(CheckCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'CheckCircleOutlined';\n}\nexport default RefIcon;"],"names":["CheckCircleOutlined","props","ref","AntdIcon","_extends","CheckCircleOutlinedSvg","RefIcon","React.forwardRef"],"mappings":"sDACA,IAAIA,EAAsB,CAAE,KAAQ,CAAE,IAAO,MAAO,MAAS,CAAE,QAAW,gBAAiB,UAAa,OAAO,EAAI,SAAY,CAAC,CAAE,IAAO,OAAQ,MAAS,CAAE,EAAK,4LAA4L,CAAE,EAAI,CAAE,IAAO,OAAQ,MAAS,CAAE,EAAK,+KAA+K,CAAE,CAAE,CAAC,EAAI,KAAQ,eAAgB,MAAS,UAAU,ECMnmBA,EAAsB,SAA6BC,EAAOC,EAAK,CACjE,uBAAwCC,EAAUC,EAAS,CAAA,EAAIH,EAAO,CACpE,IAAAC,EACA,KAAMG,CAAA,CACP,CAAC,CACJ,EAGIC,EAAuBC,EAAAA,WAAiBP,CAAmB","x_google_ignoreList":[0,1]}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r as e,I as l,_ as r}from"./index-BFgUdwJv.js";var t={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-circle",theme:"outlined"},o=function(a,c){return e.createElement(l,r({},a,{ref:c,icon:t}))},i=e.forwardRef(o);export{i as R};
|
|
2
|
-
//# sourceMappingURL=CloseCircleOutlined-DfRmL2eG.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CloseCircleOutlined-DfRmL2eG.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/CloseCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/CloseCircleOutlined.js"],"sourcesContent":["// This icon file is generated automatically.\nvar CloseCircleOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"fill-rule\": \"evenodd\", \"viewBox\": \"64 64 896 896\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z\" } }] }, \"name\": \"close-circle\", \"theme\": \"outlined\" };\nexport default CloseCircleOutlined;\n","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport CloseCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/CloseCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nvar CloseCircleOutlined = function CloseCircleOutlined(props, ref) {\n return /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: CloseCircleOutlinedSvg\n }));\n};\n\n/** */\nvar RefIcon = /*#__PURE__*/React.forwardRef(CloseCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'CloseCircleOutlined';\n}\nexport default RefIcon;"],"names":["CloseCircleOutlined","props","ref","AntdIcon","_extends","CloseCircleOutlinedSvg","RefIcon","React.forwardRef"],"mappings":"sDACA,IAAIA,EAAsB,CAAE,KAAQ,CAAE,IAAO,MAAO,MAAS,CAAE,YAAa,UAAW,QAAW,gBAAiB,UAAa,OAAO,EAAI,SAAY,CAAC,CAAE,IAAO,OAAQ,MAAS,CAAE,EAAK,gyBAAiyB,CAAE,CAAC,EAAI,KAAQ,eAAgB,MAAS,UAAU,ECMxgCA,EAAsB,SAA6BC,EAAOC,EAAK,CACjE,uBAAwCC,EAAUC,EAAS,CAAA,EAAIH,EAAO,CACpE,IAAAC,EACA,KAAMG,CAAA,CACP,CAAC,CACJ,EAGIC,EAAuBC,EAAAA,WAAiBP,CAAmB","x_google_ignoreList":[0,1]}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import{r as o,I as rn,_ as de,e as Rn,f as An,g as G,w as st,h as Se,i as lt,k as ct,l as Me,m as ie,n as _n,o as dt,p as Xe,q as ut,F as ft,t as gt,v as ht,x as mt,y as Ye,z as X,A as pt,C as xt,D as yt,E as vt,G as jt,H as bt,J as wt,K as St,L as Sn,M as Cn,N as Ct,O as It,P as kt,b as H,T as Be,Q as ue,U as In,s as V,j as e,V as T,W as U,a as _e,B as R,R as on,d as On,c as Et,X as W,Y as Ce,Z as Nt,S as Dt,$ as Tt,a0 as $t}from"./index-BFgUdwJv.js";import{u as Ft,a as Ve,c as Ze,C as Pe,R as Mn,b as Rt}from"./useConfig-29Ugtjk4.js";import{t as ye,e as ze}from"./errorCodeTranslator-DWsWq6B3.js";import{u as ke,F as sn}from"./useErrorHandler-DWHs3RlU.js";import{F as w,u as At,R as q}from"./useAuth-BMt6dHSB.js";import{B as _t,t as Ot,i as Mt,a as zt,g as zn,b as Bt,c as Vt,d as Pt,e as Lt,f as Ht,h as Wt,j as Gt,k as qt,T as oe,R as ln,l as Bn}from"./index-pT0W4KjK.js";import{T as Ie}from"./index-lwTtspUb.js";import{R as Ut}from"./CheckCircleOutlined-Can0-7ew.js";import{a as Ee,T as Kt}from"./row-FRqVdQDX.js";import{D as Jt}from"./index-CN3FylAF.js";import{S as Vn}from"./index-wvielV9A.js";import{I as Q}from"./index-Dycn6xoz.js";import{M as cn}from"./index-k2rGFxEM.js";import{S as Pn,R as Ln}from"./ThunderboltOutlined-CiiB2de5.js";import{P as dn}from"./index-WaraZQH0.js";import{R as un}from"./DeleteOutlined-u-P2SpoK.js";import"./ActionButton-DWq-fh3_.js";var Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Xt=function(t,a){return o.createElement(rn,de({},t,{ref:a,icon:Qt}))},Yt=o.forwardRef(Xt);function an(){return typeof BigInt=="function"}function Hn(n){return!n&&n!==0&&!Number.isNaN(n)||!String(n).trim()}function ce(n){var t=n.trim(),a=t.startsWith("-");a&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var r=t||"0",i=r.split("."),s=i[0]||"0",c=i[1]||"0";s==="0"&&c==="0"&&(a=!1);var l=a?"-":"";return{negative:a,negativeStr:l,trimStr:r,integerStr:s,decimalStr:c,fullStr:"".concat(l).concat(r)}}function fn(n){var t=String(n);return!Number.isNaN(Number(t))&&t.includes("e")}function le(n){var t=String(n);if(fn(n)){var a=Number(t.slice(t.indexOf("e-")+2)),r=t.match(/\.(\d+)/);return r!=null&&r[1]&&(a+=r[1].length),a}return t.includes(".")&&gn(t)?t.length-t.indexOf(".")-1:0}function Le(n){var t=String(n);if(fn(n)){if(n>Number.MAX_SAFE_INTEGER)return String(an()?BigInt(n).toString():Number.MAX_SAFE_INTEGER);if(n<Number.MIN_SAFE_INTEGER)return String(an()?BigInt(n).toString():Number.MIN_SAFE_INTEGER);t=n.toFixed(le(t))}return ce(t).fullStr}function gn(n){return typeof n=="number"?!Number.isNaN(n):n?/^\s*-?\d+(\.\d+)?\s*$/.test(n)||/^\s*-?\d+\.\s*$/.test(n)||/^\s*-?\.\d+\s*$/.test(n):!1}var Zt=(function(){function n(t){if(An(this,n),G(this,"origin",""),G(this,"negative",void 0),G(this,"integer",void 0),G(this,"decimal",void 0),G(this,"decimalLen",void 0),G(this,"empty",void 0),G(this,"nan",void 0),Hn(t)){this.empty=!0;return}if(this.origin=String(t),t==="-"||Number.isNaN(t)){this.nan=!0;return}var a=t;if(fn(a)&&(a=Number(a)),a=typeof a=="string"?a:Le(a),gn(a)){var r=ce(a);this.negative=r.negative;var i=r.trimStr.split(".");this.integer=BigInt(i[0]);var s=i[1]||"0";this.decimal=BigInt(s),this.decimalLen=s.length}else this.nan=!0}return Rn(n,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(a){var r="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(a,"0"));return BigInt(r)}},{key:"negate",value:function(){var a=new n(this.toString());return a.negative=!a.negative,a}},{key:"cal",value:function(a,r,i){var s=Math.max(this.getDecimalStr().length,a.getDecimalStr().length),c=this.alignDecimal(s),l=a.alignDecimal(s),u=r(c,l).toString(),m=i(s),d=ce(u),g=d.negativeStr,f=d.trimStr,v="".concat(g).concat(f.padStart(m+1,"0"));return new n("".concat(v.slice(0,-m),".").concat(v.slice(-m)))}},{key:"add",value:function(a){if(this.isInvalidate())return new n(a);var r=new n(a);return r.isInvalidate()?this:this.cal(r,function(i,s){return i+s},function(i){return i})}},{key:"multi",value:function(a){var r=new n(a);return this.isInvalidate()||r.isInvalidate()?new n(NaN):this.cal(r,function(i,s){return i*s},function(i){return i*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(a){return this.toString()===a?.toString()}},{key:"lessEquals",value:function(a){return this.add(a.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return a?this.isInvalidate()?"":ce("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),n})(),ei=(function(){function n(t){if(An(this,n),G(this,"origin",""),G(this,"number",void 0),G(this,"empty",void 0),Hn(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return Rn(n,[{key:"negate",value:function(){return new n(-this.toNumber())}},{key:"add",value:function(a){if(this.isInvalidate())return new n(a);var r=Number(a);if(Number.isNaN(r))return this;var i=this.number+r;if(i>Number.MAX_SAFE_INTEGER)return new n(Number.MAX_SAFE_INTEGER);if(i<Number.MIN_SAFE_INTEGER)return new n(Number.MIN_SAFE_INTEGER);var s=Math.max(le(this.number),le(r));return new n(i.toFixed(s))}},{key:"multi",value:function(a){var r=Number(a);if(this.isInvalidate()||Number.isNaN(r))return new n(NaN);var i=this.number*r;if(i>Number.MAX_SAFE_INTEGER)return new n(Number.MAX_SAFE_INTEGER);if(i<Number.MIN_SAFE_INTEGER)return new n(Number.MIN_SAFE_INTEGER);var s=Math.max(le(this.number),le(r));return new n(i.toFixed(s))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(a){return this.toNumber()===a?.toNumber()}},{key:"lessEquals",value:function(a){return this.add(a.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return a?this.isInvalidate()?"":Le(this.number):this.origin}}]),n})();function ee(n){return an()?new Zt(n):new ei(n)}function Oe(n,t,a){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n==="")return"";var i=ce(n),s=i.negativeStr,c=i.integerStr,l=i.decimalStr,u="".concat(t).concat(l),m="".concat(s).concat(c);if(a>=0){var d=Number(l[a]);if(d>=5&&!r){var g=ee(n).add("".concat(s,"0.").concat("0".repeat(a)).concat(10-d));return Oe(g.toString(),t,a,r)}return a===0?m:"".concat(m).concat(t).concat(l.padEnd(a,"0").slice(0,a))}return u===".0"?m:"".concat(m).concat(u)}function ni(n,t){return typeof Proxy<"u"&&n?new Proxy(n,{get:function(r,i){if(t[i])return t[i];var s=r[i];return typeof s=="function"?s.bind(r):s}}):n}function ti(n,t){var a=o.useRef(null);function r(){try{var s=n.selectionStart,c=n.selectionEnd,l=n.value,u=l.substring(0,s),m=l.substring(c);a.current={start:s,end:c,value:l,beforeTxt:u,afterTxt:m}}catch{}}function i(){if(n&&a.current&&t)try{var s=n.value,c=a.current,l=c.beforeTxt,u=c.afterTxt,m=c.start,d=s.length;if(s.startsWith(l))d=l.length;else if(s.endsWith(u))d=s.length-a.current.afterTxt.length;else{var g=l[m-1],f=s.indexOf(g,m-1);f!==-1&&(d=f+1)}n.setSelectionRange(d,d)}catch(v){st(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(v.message))}}return[r,i]}var ii=function(){var t=o.useState(!1),a=Se(t,2),r=a[0],i=a[1];return lt(function(){i(ct())},[]),r},ai=200,ri=600;function oi(n){var t=n.prefixCls,a=n.upNode,r=n.downNode,i=n.upDisabled,s=n.downDisabled,c=n.onStep,l=o.useRef(),u=o.useRef([]),m=o.useRef();m.current=c;var d=function(){clearTimeout(l.current)},g=function(E,p){E.preventDefault(),d(),m.current(p);function _(){m.current(p),l.current=setTimeout(_,ai)}l.current=setTimeout(_,ri)};o.useEffect(function(){return function(){d(),u.current.forEach(function(y){return Me.cancel(y)})}},[]);var f=ii();if(f)return null;var v="".concat(t,"-handler"),j=ie(v,"".concat(v,"-up"),G({},"".concat(v,"-up-disabled"),i)),x=ie(v,"".concat(v,"-down"),G({},"".concat(v,"-down-disabled"),s)),S=function(){return u.current.push(Me(d))},h={unselectable:"on",role:"button",onMouseUp:S,onMouseLeave:S};return o.createElement("div",{className:"".concat(v,"-wrap")},o.createElement("span",de({},h,{onMouseDown:function(E){g(E,!0)},"aria-label":"Increase Value","aria-disabled":i,className:j}),a||o.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),o.createElement("span",de({},h,{onMouseDown:function(E){g(E,!1)},"aria-label":"Decrease Value","aria-disabled":s,className:x}),r||o.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function kn(n){var t=typeof n=="number"?Le(n):ce(n).fullStr,a=t.includes(".");return a?ce(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:n+"0"}const si=(function(){var n=o.useRef(0),t=function(){Me.cancel(n.current)};return o.useEffect(function(){return t},[]),function(a){t(),n.current=Me(function(){a()})}});var li=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],ci=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],En=function(t,a){return t||a.isEmpty()?a.toString():a.toNumber()},Nn=function(t){var a=ee(t);return a.isInvalidate()?null:a},di=o.forwardRef(function(n,t){var a=n.prefixCls,r=n.className,i=n.style,s=n.min,c=n.max,l=n.step,u=l===void 0?1:l,m=n.defaultValue,d=n.value,g=n.disabled,f=n.readOnly,v=n.upHandler,j=n.downHandler,x=n.keyboard,S=n.changeOnWheel,h=S===void 0?!1:S,y=n.controls,E=y===void 0?!0:y;n.classNames;var p=n.stringMode,_=n.parser,O=n.formatter,$=n.precision,P=n.decimalSeparator,C=n.onChange,k=n.onInput,D=n.onPressEnter,A=n.onStep,B=n.changeOnBlur,J=B===void 0?!0:B,te=n.domRef,He=_n(n,li),De="".concat(a,"-input"),ae=o.useRef(null),re=o.useState(!1),Te=Se(re,2),fe=Te[0],ve=Te[1],Y=o.useRef(!1),se=o.useRef(!1),ge=o.useRef(!1),We=o.useState(function(){return ee(d??m)}),$e=Se(We,2),M=$e[0],he=$e[1];function Kn(I){d===void 0&&he(I)}var Ge=o.useCallback(function(I,b){if(!b)return $>=0?$:Math.max(le(I),le(u))},[$,u]),qe=o.useCallback(function(I){var b=String(I);if(_)return _(b);var F=b;return P&&(F=F.replace(P,".")),F.replace(/[^\w.-]+/g,"")},[_,P]),Ue=o.useRef(""),hn=o.useCallback(function(I,b){if(O)return O(I,{userTyping:b,input:String(Ue.current)});var F=typeof I=="number"?Le(I):I;if(!b){var N=Ge(F,b);if(gn(F)&&(P||N>=0)){var ne=P||".";F=Oe(F,ne,N)}}return F},[O,Ge,P]),Jn=o.useState(function(){var I=m??d;return M.isInvalidate()&&["string","number"].includes(dt(I))?Number.isNaN(I)?"":I:hn(M.toString(),!1)}),mn=Se(Jn,2),je=mn[0],pn=mn[1];Ue.current=je;function be(I,b){pn(hn(I.isInvalidate()?I.toString(!1):I.toString(!b),b))}var me=o.useMemo(function(){return Nn(c)},[c,$]),pe=o.useMemo(function(){return Nn(s)},[s,$]),xn=o.useMemo(function(){return!me||!M||M.isInvalidate()?!1:me.lessEquals(M)},[me,M]),yn=o.useMemo(function(){return!pe||!M||M.isInvalidate()?!1:M.lessEquals(pe)},[pe,M]),Qn=ti(ae.current,fe),vn=Se(Qn,2),Xn=vn[0],Yn=vn[1],jn=function(b){return me&&!b.lessEquals(me)?me:pe&&!pe.lessEquals(b)?pe:null},Ke=function(b){return!jn(b)},Fe=function(b,F){var N=b,ne=Ke(N)||N.isEmpty();if(!N.isEmpty()&&!F&&(N=jn(N)||N,ne=!0),!f&&!g&&ne){var we=N.toString(),Qe=Ge(we,F);return Qe>=0&&(N=ee(Oe(we,".",Qe)),Ke(N)||(N=ee(Oe(we,".",Qe,!0)))),N.equals(M)||(Kn(N),C?.(N.isEmpty()?null:En(p,N)),d===void 0&&be(N,F)),N}return M},Zn=si(),bn=function I(b){if(Xn(),Ue.current=b,pn(b),!se.current){var F=qe(b),N=ee(F);N.isNaN()||Fe(N,!0)}k?.(b),Zn(function(){var ne=b;_||(ne=b.replace(/。/g,".")),ne!==b&&I(ne)})},et=function(){se.current=!0},nt=function(){se.current=!1,bn(ae.current.value)},tt=function(b){bn(b.target.value)},Je=function(b){var F;if(!(b&&xn||!b&&yn)){Y.current=!1;var N=ee(ge.current?kn(u):u);b||(N=N.negate());var ne=(M||ee(0)).add(N.toString()),we=Fe(ne,!1);A?.(En(p,we),{offset:ge.current?kn(u):u,type:b?"up":"down"}),(F=ae.current)===null||F===void 0||F.focus()}},wn=function(b){var F=ee(qe(je)),N;F.isNaN()?N=Fe(M,b):N=Fe(F,b),d!==void 0?be(M,!1):N.isNaN()||be(N,!1)},it=function(){Y.current=!0},at=function(b){var F=b.key,N=b.shiftKey;Y.current=!0,ge.current=N,F==="Enter"&&(se.current||(Y.current=!1),wn(!1),D?.(b)),x!==!1&&!se.current&&["Up","ArrowUp","Down","ArrowDown"].includes(F)&&(Je(F==="Up"||F==="ArrowUp"),b.preventDefault())},rt=function(){Y.current=!1,ge.current=!1};o.useEffect(function(){if(h&&fe){var I=function(N){Je(N.deltaY<0),N.preventDefault()},b=ae.current;if(b)return b.addEventListener("wheel",I,{passive:!1}),function(){return b.removeEventListener("wheel",I)}}});var ot=function(){J&&wn(!1),ve(!1),Y.current=!1};return Xe(function(){M.isInvalidate()||be(M,!1)},[$,O]),Xe(function(){var I=ee(d);he(I);var b=ee(qe(je));(!I.equals(b)||!Y.current||O)&&be(I,Y.current)},[d]),Xe(function(){O&&Yn()},[je]),o.createElement("div",{ref:te,className:ie(a,r,G(G(G(G(G({},"".concat(a,"-focused"),fe),"".concat(a,"-disabled"),g),"".concat(a,"-readonly"),f),"".concat(a,"-not-a-number"),M.isNaN()),"".concat(a,"-out-of-range"),!M.isInvalidate()&&!Ke(M))),style:i,onFocus:function(){ve(!0)},onBlur:ot,onKeyDown:at,onKeyUp:rt,onCompositionStart:et,onCompositionEnd:nt,onBeforeInput:it},E&&o.createElement(oi,{prefixCls:a,upNode:v,downNode:j,upDisabled:xn,downDisabled:yn,onStep:Je}),o.createElement("div",{className:"".concat(De,"-wrap")},o.createElement("input",de({autoComplete:"off",role:"spinbutton","aria-valuemin":s,"aria-valuemax":c,"aria-valuenow":M.isInvalidate()?null:M.toString(),step:u},He,{ref:ut(ae,t),className:De,value:je,onChange:tt,disabled:g,readOnly:f}))))}),ui=o.forwardRef(function(n,t){var a=n.disabled,r=n.style,i=n.prefixCls,s=i===void 0?"rc-input-number":i,c=n.value,l=n.prefix,u=n.suffix,m=n.addonBefore,d=n.addonAfter,g=n.className,f=n.classNames,v=_n(n,ci),j=o.useRef(null),x=o.useRef(null),S=o.useRef(null),h=function(E){S.current&&Ot(S.current,E)};return o.useImperativeHandle(t,function(){return ni(S.current,{focus:h,nativeElement:j.current.nativeElement||x.current})}),o.createElement(_t,{className:g,triggerFocus:h,prefixCls:s,value:c,disabled:a,style:r,prefix:l,suffix:u,addonAfter:d,addonBefore:m,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:j},o.createElement(di,de({prefixCls:s,disabled:a,ref:S,domRef:x,className:f?.input},v)))});const fi=n=>{var t;const a=(t=n.handleVisible)!==null&&t!==void 0?t:"auto",r=n.controlHeightSM-n.lineWidth*2;return Object.assign(Object.assign({},Mt(n)),{controlWidth:90,handleWidth:r,handleFontSize:n.fontSize/2,handleVisible:a,handleActiveBg:n.colorFillAlter,handleBg:n.colorBgContainer,filledHandleBg:new ft(n.colorFillSecondary).onBackground(n.colorBgContainer).toHexString(),handleHoverColor:n.colorPrimary,handleBorderColor:n.colorBorder,handleOpacity:a===!0?1:0,handleVisibleWidth:a===!0?r:0})},Dn=({componentCls:n,borderRadiusSM:t,borderRadiusLG:a},r)=>{const i=r==="lg"?a:t;return{[`&-${r}`]:{[`${n}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${n}-handler-up`]:{borderStartEndRadius:i},[`${n}-handler-down`]:{borderEndEndRadius:i}}}},gi=n=>{const{componentCls:t,lineWidth:a,lineType:r,borderRadius:i,inputFontSizeSM:s,inputFontSizeLG:c,controlHeightLG:l,controlHeightSM:u,colorError:m,paddingInlineSM:d,paddingBlockSM:g,paddingBlockLG:f,paddingInlineLG:v,colorIcon:j,motionDurationMid:x,handleHoverColor:S,handleOpacity:h,paddingInline:y,paddingBlock:E,handleBg:p,handleActiveBg:_,colorTextDisabled:O,borderRadiusSM:$,borderRadiusLG:P,controlWidth:C,handleBorderColor:k,filledHandleBg:D,lineHeightLG:A,calc:B}=n;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ye(n)),zn(n)),{display:"inline-block",width:C,margin:0,padding:0,borderRadius:i}),Bt(n,{[`${t}-handler-wrap`]:{background:p,[`${t}-handler-down`]:{borderBlockStart:`${X(a)} ${r} ${k}`}}})),Vt(n,{[`${t}-handler-wrap`]:{background:D,[`${t}-handler-down`]:{borderBlockStart:`${X(a)} ${r} ${k}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:p}}})),Pt(n,{[`${t}-handler-wrap`]:{background:p,[`${t}-handler-down`]:{borderBlockStart:`${X(a)} ${r} ${k}`}}})),Lt(n)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:c,lineHeight:A,borderRadius:P,[`input${t}-input`]:{height:B(l).sub(B(a).mul(2)).equal(),padding:`${X(f)} ${X(v)}`}},"&-sm":{padding:0,fontSize:s,borderRadius:$,[`input${t}-input`]:{height:B(u).sub(B(a).mul(2)).equal(),padding:`${X(g)} ${X(d)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:m}}},"&-group":Object.assign(Object.assign(Object.assign({},Ye(n)),Wt(n)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:P,fontSize:n.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:$}}},Gt(n)),qt(n)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},Ye(n)),{width:"100%",padding:`${X(E)} ${X(y)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:i,outline:0,transition:`all ${x} linear`,appearance:"textfield",fontSize:"inherit"}),Ht(n.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:n.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:n.handleVisibleWidth,opacity:h,height:"100%",borderStartStartRadius:0,borderStartEndRadius:i,borderEndEndRadius:i,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${x}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
2
|
-
${t}-handler-up-inner,
|
|
3
|
-
${t}-handler-down-inner
|
|
4
|
-
`]:{marginInlineEnd:0,fontSize:n.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:j,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${X(a)} ${r} ${k}`,transition:`all ${x} linear`,"&:active":{background:_},"&:hover":{height:"60%",[`
|
|
5
|
-
${t}-handler-up-inner,
|
|
6
|
-
${t}-handler-down-inner
|
|
7
|
-
`]:{color:S}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},pt()),{color:j,transition:`all ${x} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:i},[`${t}-handler-down`]:{borderEndEndRadius:i}},Dn(n,"lg")),Dn(n,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[`
|
|
8
|
-
${t}-handler-up-disabled,
|
|
9
|
-
${t}-handler-down-disabled
|
|
10
|
-
`]:{cursor:"not-allowed"},[`
|
|
11
|
-
${t}-handler-up-disabled:hover &-handler-up-inner,
|
|
12
|
-
${t}-handler-down-disabled:hover &-handler-down-inner
|
|
13
|
-
`]:{color:O}})}]},hi=n=>{const{componentCls:t,paddingBlock:a,paddingInline:r,inputAffixPadding:i,controlWidth:s,borderRadiusLG:c,borderRadiusSM:l,paddingInlineLG:u,paddingInlineSM:m,paddingBlockLG:d,paddingBlockSM:g,motionDurationMid:f}=n;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${X(a)} 0`}},zn(n)),{position:"relative",display:"inline-flex",alignItems:"center",width:s,padding:0,paddingInlineStart:r,"&-lg":{borderRadius:c,paddingInlineStart:u,[`input${t}-input`]:{padding:`${X(d)} 0`}},"&-sm":{borderRadius:l,paddingInlineStart:m,[`input${t}-input`]:{padding:`${X(g)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:i},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:r,marginInlineStart:i,transition:`margin ${f}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:n.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:n.calc(n.handleWidth).add(r).equal()}}),[`${t}-underlined`]:{borderRadius:0}}},mi=gt("InputNumber",n=>{const t=ht(n,zt(n));return[gi(t),hi(t),mt(t)]},fi,{unitless:{handleOpacity:!0},resetFont:!1});var pi=function(n,t){var a={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&t.indexOf(r)<0&&(a[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(a[r[i]]=n[r[i]]);return a};const Wn=o.forwardRef((n,t)=>{const{getPrefixCls:a,direction:r}=o.useContext(xt),i=o.useRef(null);o.useImperativeHandle(t,()=>i.current);const{className:s,rootClassName:c,size:l,disabled:u,prefixCls:m,addonBefore:d,addonAfter:g,prefix:f,suffix:v,bordered:j,readOnly:x,status:S,controls:h,variant:y}=n,E=pi(n,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),p=a("input-number",m),_=yt(p),[O,$,P]=mi(p,_),{compactSize:C,compactItemClassnames:k}=vt(p,r);let D=o.createElement(Yt,{className:`${p}-handler-up-inner`}),A=o.createElement(Ct,{className:`${p}-handler-down-inner`});const B=typeof h=="boolean"?h:void 0;typeof h=="object"&&(D=typeof h.upIcon>"u"?D:o.createElement("span",{className:`${p}-handler-up-inner`},h.upIcon),A=typeof h.downIcon>"u"?A:o.createElement("span",{className:`${p}-handler-down-inner`},h.downIcon));const{hasFeedback:J,status:te,isFormItemInput:He,feedbackIcon:De}=o.useContext(jt),ae=It(te,S),re=bt(M=>{var he;return(he=l??C)!==null&&he!==void 0?he:M}),Te=o.useContext(wt),fe=u??Te,[ve,Y]=St("inputNumber",y,j),se=J&&o.createElement(o.Fragment,null,De),ge=ie({[`${p}-lg`]:re==="large",[`${p}-sm`]:re==="small",[`${p}-rtl`]:r==="rtl",[`${p}-in-form-item`]:He},$),We=`${p}-group`,$e=o.createElement(ui,Object.assign({ref:i,disabled:fe,className:ie(P,_,s,c,k),upHandler:D,downHandler:A,prefixCls:p,readOnly:x,controls:B,prefix:f,suffix:se||v,addonBefore:d&&o.createElement(Cn,{form:!0,space:!0},d),addonAfter:g&&o.createElement(Cn,{form:!0,space:!0},g),classNames:{input:ge,variant:ie({[`${p}-${ve}`]:Y},Sn(p,ae,J)),affixWrapper:ie({[`${p}-affix-wrapper-sm`]:re==="small",[`${p}-affix-wrapper-lg`]:re==="large",[`${p}-affix-wrapper-rtl`]:r==="rtl",[`${p}-affix-wrapper-without-controls`]:h===!1||fe||x},$),wrapper:ie({[`${We}-rtl`]:r==="rtl"},$),groupWrapper:ie({[`${p}-group-wrapper-sm`]:re==="small",[`${p}-group-wrapper-lg`]:re==="large",[`${p}-group-wrapper-rtl`]:r==="rtl",[`${p}-group-wrapper-${ve}`]:Y},Sn(`${p}-group-wrapper`,ae,J),$)}},E));return O($e)}),K=Wn,xi=n=>o.createElement(kt,{theme:{components:{InputNumber:{handleVisible:!0}}}},o.createElement(Wn,Object.assign({},n)));K._InternalPanelDoNotUseOrYouWillBeFired=xi;var yi={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M893.3 293.3L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V338.5c0-17-6.7-33.2-18.7-45.2zM384 184h256v104H384V184zm456 656H184V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V840zM512 442c-79.5 0-144 64.5-144 144s64.5 144 144 144 144-64.5 144-144-64.5-144-144-144zm0 224c-44.2 0-80-35.8-80-80s35.8-80 80-80 80 35.8 80 80-35.8 80-80 80z"}}]},name:"save",theme:"outlined"},vi=function(t,a){return o.createElement(rn,de({},t,{ref:a,icon:yi}))},Gn=o.forwardRef(vi),ji={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},bi=function(t,a){return o.createElement(rn,de({},t,{ref:a,icon:ji}))},wi=o.forwardRef(bi);function Si(){const{t:n}=H(),t=Be(),[a]=w.useForm(),{config:r,isLoading:i,updateAsync:s,validate:c,isUpdating:l,isValidating:u}=Ft(),{handleError:m,handleSuccess:d}=ke();return o.useEffect(()=>{if(r){const x=Ci(r);a.setFieldsValue(x)}},[r,a]),{form:a,config:r,isLoading:i,isUpdating:l,isValidating:u,handleSave:async()=>{try{const x=a.getFieldsValue();await s(x),d(n("config.saveSuccess"))}catch(x){const S=In(x),h=ki(S,n);m(S,h)}},handleValidate:()=>{a.validateFields().then(x=>{c(x)})},handleTargetChange:async()=>{try{const x=a.getFieldsValue(),S={...Ii(r),...x,targets:x.targets};await s(S)}catch(x){const S=In(x),h=ye(S.code,n,S.params,n("config.saveFailed"))??n("config.saveFailed");m(S,h)}},getConfigPreview:()=>JSON.stringify(a.getFieldsValue(),null,2),refreshConfig:()=>t.invalidateQueries({queryKey:ue.CONFIG})}}const Ci=n=>{const{_meta:t,_validation:a,...r}=n;return{...r,targets:Array.isArray(r.targets)?r.targets:[]}},Ii=n=>{if(!n)return{};const{_meta:t,_validation:a,...r}=n;return r},ki=(n,t)=>{if(n.code==="CONFIG_INVALID"&&Array.isArray(n.details)){const a=n.details.map(r=>{if(typeof r=="object"&&r&&"code"in r){const{code:i,params:s}=r;return ye(i,t,s)}return String(r)});return`${ye(n.code,t)}: ${a.join(", ")}`}return ye(n.code,t,n.params,n.message)||n.message||t("config.saveFailed")};function Ei(n=!1){const[t,a]=o.useState(n),[r,i]=o.useState(void 0),[s,c]=o.useState(void 0),[l,u]=o.useState(void 0),m=o.useCallback((j,x)=>{a(!0),j&&(i(j),x&&(u(x),V.loading({content:j,key:x,duration:0})))},[]),d=o.useCallback(j=>{a(!1),i(void 0),c(void 0),l&&(V.destroy(l),j&&V.success({content:j,key:l,duration:2}),u(void 0))},[l]),g=o.useCallback(j=>{c(Math.max(0,Math.min(100,j)))},[]),f=o.useCallback(j=>{i(j),l&&V.loading({content:j,key:l,duration:0})},[l]);return{...o.useMemo(()=>({loading:t,message:r,progress:s}),[t,r,s]),startLoading:m,stopLoading:d,updateProgress:g,updateMessage:f,setLoading:a}}const Ni="config-import";function Di(n){const{t}=H(),a=Be(),{refetch:r}=Ve(),{handleWarning:i,handleSuccess:s,handleError:c}=ke(),{loading:l,startLoading:u,stopLoading:m}=Ei(),d=o.useMemo(()=>{if(!n)return null;const{_meta:h,_validation:y,...E}=n;return E},[n]),g=o.useCallback(()=>{if(!d){i(t("config.configNotLoaded"));return}const h=JSON.stringify(d,null,2),y=new Blob([h],{type:"application/json"}),E=URL.createObjectURL(y),p=document.createElement("a");p.href=E,p.download=`config-${new Date().toISOString().split("T")[0]}.json`,p.click(),URL.revokeObjectURL(E),s(t("config.configExported"))},[d,s,i,t]),f=o.useCallback(async h=>{const y=await new Promise(($,P)=>{const C=new FileReader;C.onload=k=>$(k.target?.result??""),C.onerror=()=>P(new Error(t("config.configReadFailed",{defaultValue:"Failed to read config file"}))),C.readAsText(h)}),E=JSON.parse(y);if(typeof E!="object"||E===null)throw new Error(t("config.configFormatError"));const{_meta:p,_validation:_,...O}=E;return O},[t]),v=o.useCallback(()=>{const h=document.createElement("input");h.type="file",h.accept=".json",h.multiple=!0,h.onchange=async y=>{const E=y.target,p=Array.from(E.files??[]);if(p.length===0)return;u(void 0,Ni);let _=0,O=0;const $=[];let P=null;try{for(const C of p){let k;try{k=await f(C)}catch(D){O++,$.push(`${C.name}: ${D instanceof Error?D.message:t("config.configFormatError")}`);continue}try{const D=await Ze.validateConfig(k);if(!D.valid){const A=Array.isArray(D.errors)&&D.errors.length>0?D.errors.join(", "):t("config.validationFailed");O++,$.push(`${C.name}: ${A}`);continue}}catch(D){console.warn("[Config Import] Validation error:",D)}try{const D=C.name.replace(/\.json$/i,"").replace(/^standalone\.config\./i,""),A=new Date().toISOString().split("T")[0],B=D?`${D}-${A}`:`imported-${A}`;P=(await Ze.importConfigFile(k,B)).path,_++}catch(D){const{message:A}=ze(D);O++,$.push(`${C.name}: ${A||(D instanceof Error?D.message:t("config.unknownError"))}`)}}if(P)try{await Ze.switchConfigFile(P)}catch(C){c(C)}if(await a.invalidateQueries({queryKey:ue.CONFIG}),await a.invalidateQueries({queryKey:ue.CONFIG_FILES}),r(),_>0&&O===0)s(p.length===1?t("config.configImportedAndSaved"):t("config.configBatchImportedSuccess",{count:_}));else if(_>0&&O>0)V.warning(t("config.configBatchImportedPartial",{success:_,total:p.length,failed:O})),console.warn(`[Config Import] Failed files:
|
|
14
|
-
`,$.join(`
|
|
15
|
-
`));else{const C=p.length===1?`${t("config.configImportFailed")}: ${$[0]||t("config.unknownError")}`:t("config.configBatchImportedFailed",{count:O});V.error(C)}}finally{m()}},h.click()},[c,s,f,a,r,u,m,t]),j=o.useCallback(async h=>{try{await navigator.clipboard.writeText(h),s(t("config.configCopied"))}catch(y){c(y,t("config.clipboardCopyFailed",{defaultValue:"Failed to copy config to clipboard"}))}},[c,s,t]),x=o.useCallback(()=>{setTimeout(()=>{window.location.reload()},1e3)},[]),S=o.useCallback(()=>{setTimeout(()=>{window.location.reload()},1e3)},[]);return{handleExportConfig:g,handleImportConfig:v,handleCopyConfig:j,handleConfigFileSwitch:x,handleConfigApplied:S,isImporting:l}}function Ti(){const[n,t]=o.useState(!1),[a,r]=o.useState(!1),[i,s]=o.useState(null),c=o.useCallback(()=>{t(!0)},[]),l=o.useCallback(()=>{t(!1)},[]),u=o.useCallback(d=>{s(d),r(!0)},[]),m=o.useCallback(()=>{r(!1),s(null)},[]);return{previewVisible:n,jsonEditorVisible:a,editingConfigFile:i,openPreview:c,closePreview:l,openJsonEditor:u,closeJsonEditor:m}}function $i(){const[n,t]=o.useState("files"),a=o.useCallback(r=>{t(r)},[]);return{activeTab:n,setActiveTab:a}}const{Title:Fi,Text:Ri}=oe,{Option:Ai}=U;function _i({currentConfigPath:n,configFiles:t,onConfigFileSwitch:a,refetchConfigFiles:r}){const{t:i}=H(),s=Be(),{handleError:c,handleSuccess:l}=ke(),u=t?.find(d=>d.isActive),m=async d=>{const g=t.find(f=>f.filename===d);if(g&&!g.isActive)try{await _e.switchConfigFile(g.path),l(i("config.configSwitched")),await s.invalidateQueries({queryKey:ue.CONFIG}),await s.invalidateQueries({queryKey:ue.CONFIG_FILES}),await Promise.resolve(r()),await Promise.resolve(a())}catch(f){c(f,i("config.configSwitchFailed"))}};return e.jsxs("div",{style:{flex:"1 1 auto",minWidth:200},children:[e.jsx(Fi,{level:2,style:{margin:0,whiteSpace:"normal",wordBreak:"normal"},children:i("config.title")}),e.jsxs(T,{direction:"vertical",size:"small",style:{marginTop:8},children:[e.jsxs(Ri,{type:"secondary",style:{fontSize:12},children:[i("config.currentConfigFile"),": ",n]}),t&&t.length>0&&e.jsx(U,{value:u?.filename||void 0,onChange:m,style:{width:300,fontSize:12},placeholder:i("config.selectConfigFile"),size:"small",children:t.map(d=>e.jsxs(Ai,{value:d.filename,children:[d.isActive&&e.jsx(Ie,{color:"green",style:{marginRight:8},children:i("config.activeConfig")}),d.filename]},d.filename))})]})]})}function Oi({onRefresh:n,onPreview:t,onExport:a,onImport:r,onCopy:i,onValidate:s,onSave:c,isValidating:l,isUpdating:u,isImporting:m=!1}){const{t:d}=H(),{authenticated:g}=At(),f=!g,v=d("common.loginRequired");return e.jsxs(T,{wrap:!0,children:[e.jsx(R,{icon:e.jsx(on,{}),onClick:n,children:d("common.refresh")}),e.jsx(R,{icon:e.jsx(On,{}),onClick:t,children:d("config.previewConfig")}),e.jsx(R,{icon:e.jsx(Et,{}),onClick:a,children:d("config.exportConfig")}),e.jsx(W,{title:f?v:void 0,children:e.jsx(R,{icon:e.jsx(wi,{}),onClick:r,loading:m,disabled:m||f,children:d("config.importConfig")})}),e.jsx(R,{icon:e.jsx(ln,{}),onClick:i,children:d("config.copyConfig")}),e.jsx(R,{icon:e.jsx(Ut,{}),onClick:s,loading:l,children:d("config.validateConfig")}),e.jsx(W,{title:f?v:void 0,children:e.jsx(R,{type:"primary",icon:e.jsx(Gn,{}),onClick:c,loading:u,disabled:f,children:d("config.saveConfig")})})]})}const{Panel:Mi}=Pe,{Title:en,Text:nn}=oe,Ne=({title:n,description:t,children:a,collapsible:r=!1,defaultCollapsed:i=!1,card:s=!0,extra:c,style:l,className:u})=>r?e.jsx(Pe,{defaultActiveKey:i?[]:["1"],style:l,className:u,children:e.jsx(Mi,{header:e.jsxs(T,{direction:"vertical",size:0,children:[e.jsx(en,{level:5,style:{margin:0},children:n}),t&&e.jsx(nn,{type:"secondary",style:{fontSize:12},children:t})]}),extra:c,children:a},"1")}):s?e.jsx(Ee,{title:e.jsxs(T,{direction:"vertical",size:0,children:[e.jsx(en,{level:5,style:{margin:0},children:n}),t&&e.jsx(nn,{type:"secondary",style:{fontSize:12},children:t})]}),extra:c,style:l,className:u,children:a}):e.jsx("div",{style:l,className:u,children:e.jsxs(T,{direction:"vertical",size:8,style:{width:"100%"},children:[e.jsx(en,{level:5,style:{margin:0},children:n}),t&&e.jsx(nn,{type:"secondary",style:{fontSize:12},children:t}),a]})}),{Option:Re}=U,zi=()=>{const{t:n}=H();return e.jsxs(Ne,{title:n("config.tabBasic"),children:[e.jsx(w.Item,{label:e.jsxs(T,{children:[n("config.logLevel"),e.jsx(W,{title:n("config.logLevelTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"logLevel",children:e.jsxs(U,{children:[e.jsx(Re,{value:"debug",children:n("config.logLevelDebug")}),e.jsx(Re,{value:"info",children:n("config.logLevelInfo")}),e.jsx(Re,{value:"warn",children:n("config.logLevelWarn")}),e.jsx(Re,{value:"error",children:n("config.logLevelError")})]})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[n("config.initialDelay"),e.jsx(W,{title:n("config.initialDelayTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"initialDelay",children:e.jsx(K,{min:0,style:{width:"100%"},placeholder:n("config.initialDelayPlaceholder")})})]})},{Option:Ae}=U,Bi=()=>{const{t:n}=H();return e.jsxs(Ne,{title:n("config.tabNetwork"),children:[e.jsx(w.Item,{label:n("config.networkTimeout"),name:["network","timeoutMs"],children:e.jsx(K,{min:1e3,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.networkRetries"),name:["network","retries"],children:e.jsx(K,{min:0,max:10,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.networkRetryDelay"),name:["network","retryDelay"],children:e.jsx(K,{min:0,style:{width:"100%"}})}),e.jsx(Jt,{children:n("config.proxySettings")}),e.jsx(w.Item,{label:n("config.proxyEnabled"),name:["network","proxy","enabled"],valuePropName:"checked",children:e.jsx(Vn,{})}),e.jsx(w.Item,{noStyle:!0,shouldUpdate:(t,a)=>t.network?.proxy?.enabled!==a.network?.proxy?.enabled,children:({getFieldValue:t})=>t(["network","proxy","enabled"])?e.jsxs(e.Fragment,{children:[e.jsx(w.Item,{label:n("config.proxyHost"),name:["network","proxy","host"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.proxyPort"),name:["network","proxy","port"],children:e.jsx(K,{min:1,max:65535,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.proxyProtocol"),name:["network","proxy","protocol"],children:e.jsxs(U,{children:[e.jsx(Ae,{value:"http",children:"HTTP"}),e.jsx(Ae,{value:"https",children:"HTTPS"}),e.jsx(Ae,{value:"socks4",children:"SOCKS4"}),e.jsx(Ae,{value:"socks5",children:"SOCKS5"})]})}),e.jsx(w.Item,{label:n("config.proxyUsername"),name:["network","proxy","username"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.proxyPassword"),name:["network","proxy","password"],children:e.jsx(Q.Password,{})})]}):null})]})},{Option:z,OptGroup:xe}=U,Vi=()=>{const{t:n}=H();return e.jsxs(Ne,{title:n("config.tabStorage"),children:[e.jsx(w.Item,{label:n("config.storageDatabasePath"),name:["storage","databasePath"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.storageDownloadDirectory"),name:["storage","downloadDirectory"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.storageIllustrationDirectory"),name:["storage","illustrationDirectory"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.storageNovelDirectory"),name:["storage","novelDirectory"],children:e.jsx(Q,{})}),e.jsx(w.Item,{label:n("config.storageIllustrationOrganization"),name:["storage","illustrationOrganization"],tooltip:n("config.storageIllustrationOrganizationTooltip"),children:e.jsxs(U,{children:[e.jsxs(xe,{label:n("config.organizationGroupSimple"),children:[e.jsx(z,{value:"flat",children:n("config.organizationFlat")}),e.jsx(z,{value:"byAuthor",children:n("config.organizationByAuthor")}),e.jsx(z,{value:"byTag",children:n("config.organizationByTag")})]}),e.jsxs(xe,{label:n("config.organizationGroupDate"),children:[e.jsx(z,{value:"byDate",children:n("config.organizationByDate")}),e.jsx(z,{value:"byDay",children:n("config.organizationByDay")}),e.jsx(z,{value:"byDownloadDate",children:n("config.organizationByDownloadDate")}),e.jsx(z,{value:"byDownloadDay",children:n("config.organizationByDownloadDay")})]}),e.jsxs(xe,{label:n("config.organizationGroupCombined"),children:[e.jsx(z,{value:"byAuthorAndTag",children:n("config.organizationByAuthorAndTag")}),e.jsx(z,{value:"byDateAndAuthor",children:n("config.organizationByDateAndAuthor")}),e.jsx(z,{value:"byDayAndAuthor",children:n("config.organizationByDayAndAuthor")}),e.jsx(z,{value:"byDownloadDateAndAuthor",children:n("config.organizationByDownloadDateAndAuthor")}),e.jsx(z,{value:"byDownloadDayAndAuthor",children:n("config.organizationByDownloadDayAndAuthor")})]})]})}),e.jsx(w.Item,{label:n("config.storageNovelOrganization"),name:["storage","novelOrganization"],tooltip:n("config.storageNovelOrganizationTooltip"),children:e.jsxs(U,{children:[e.jsxs(xe,{label:n("config.organizationGroupSimple"),children:[e.jsx(z,{value:"flat",children:n("config.organizationFlat")}),e.jsx(z,{value:"byAuthor",children:n("config.organizationByAuthor")}),e.jsx(z,{value:"byTag",children:n("config.organizationByTag")})]}),e.jsxs(xe,{label:n("config.organizationGroupDate"),children:[e.jsx(z,{value:"byDate",children:n("config.organizationByDate")}),e.jsx(z,{value:"byDay",children:n("config.organizationByDay")}),e.jsx(z,{value:"byDownloadDate",children:n("config.organizationByDownloadDate")}),e.jsx(z,{value:"byDownloadDay",children:n("config.organizationByDownloadDay")})]}),e.jsxs(xe,{label:n("config.organizationGroupCombined"),children:[e.jsx(z,{value:"byAuthorAndTag",children:n("config.organizationByAuthorAndTag")}),e.jsx(z,{value:"byDateAndAuthor",children:n("config.organizationByDateAndAuthor")}),e.jsx(z,{value:"byDayAndAuthor",children:n("config.organizationByDayAndAuthor")}),e.jsx(z,{value:"byDownloadDateAndAuthor",children:n("config.organizationByDownloadDateAndAuthor")}),e.jsx(z,{value:"byDownloadDayAndAuthor",children:n("config.organizationByDownloadDayAndAuthor")})]})]})})]})},Pi=()=>{const{t:n}=H();return e.jsxs(Ne,{title:n("config.tabScheduler"),children:[e.jsx(w.Item,{label:n("config.schedulerEnabled"),name:["scheduler","enabled"],valuePropName:"checked",children:e.jsx(Vn,{})}),e.jsx(w.Item,{label:n("config.schedulerCron"),name:["scheduler","cron"],children:e.jsx(Q,{placeholder:n("config.schedulerCronPlaceholder")})}),e.jsx(w.Item,{label:n("config.schedulerTimezone"),name:["scheduler","timezone"],children:e.jsx(Q,{placeholder:n("config.schedulerTimezonePlaceholder")})}),e.jsx(w.Item,{label:n("config.schedulerMaxExecutions"),name:["scheduler","maxExecutions"],children:e.jsx(K,{min:1,style:{width:"100%"},placeholder:n("config.schedulerMaxExecutionsPlaceholder")})}),e.jsx(w.Item,{label:n("config.schedulerMinInterval"),name:["scheduler","minInterval"],children:e.jsx(K,{min:0,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.schedulerTimeout"),name:["scheduler","timeout"],children:e.jsx(K,{min:1e3,style:{width:"100%"},placeholder:n("config.schedulerTimeoutPlaceholder")})})]})},Li=()=>{const{t:n}=H();return e.jsxs(Ne,{title:n("config.tabDownload"),children:[e.jsx(w.Item,{label:n("config.downloadConcurrency"),name:["download","concurrency"],children:e.jsx(K,{min:1,max:10,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.downloadMaxRetries"),name:["download","maxRetries"],children:e.jsx(K,{min:0,max:10,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.downloadRetryDelay"),name:["download","retryDelay"],children:e.jsx(K,{min:0,style:{width:"100%"}})}),e.jsx(w.Item,{label:n("config.downloadTimeout"),name:["download","timeout"],children:e.jsx(K,{min:1e3,style:{width:"100%"}})})]})},{Option:L}=U,{Panel:tn}=Pe,{Step:Tn}=Pn,{Text:Hi,Paragraph:Wi}=oe,Gi=({visible:n,editingTarget:t,onSave:a,onCancel:r})=>{const{t:i}=H(),[s]=w.useForm(),[c,l]=o.useState(0),u={tagSearch:{name:i("config.templateTagSearch"),description:i("config.templateTagSearchDesc"),config:{type:"illustration",mode:"search",tag:"",limit:20,searchTarget:"partial_match_for_tags",sort:"date_desc"}},ranking:{name:i("config.templateRanking"),description:i("config.templateRankingDesc"),config:{type:"illustration",mode:"ranking",rankingMode:"day",limit:30}},multiTag:{name:i("config.templateMultiTag"),description:i("config.templateMultiTagDesc"),config:{type:"illustration",mode:"search",tag:"",limit:30,searchTarget:"partial_match_for_tags"}},highQuality:{name:i("config.templateHighQuality"),description:i("config.templateHighQualityDesc"),config:{type:"illustration",mode:"search",tag:"",limit:20,minBookmarks:1e3,sort:"popular_desc"}},novel:{name:i("config.templateNovel"),description:i("config.templateNovelDesc"),config:{type:"novel",mode:"search",tag:"",limit:10}}};o.useEffect(()=>{n&&(t?(s.setFieldsValue(t),l(1)):(s.resetFields(),l(0)))},[n,t,s]);const m=f=>{s.setFieldsValue(f.config),l(1)},d=async()=>{try{const f=await s.validateFields();a(f),s.resetFields(),l(0)}catch{}},g=()=>{s.resetFields(),l(0),r()};return e.jsxs(cn,{title:e.jsxs(T,{children:[i(t?"config.editTarget":"config.addTarget"),!t&&e.jsx(W,{title:i("config.templateTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),open:n,onOk:d,onCancel:g,width:800,okText:i("common.save"),cancelText:i("common.cancel"),children:[e.jsxs(Pn,{current:c,style:{marginBottom:24},children:[e.jsx(Tn,{title:i("config.stepSelectTemplate"),description:i("config.stepSelectTemplateDesc")}),e.jsx(Tn,{title:i("config.stepConfigure"),description:i("config.stepConfigureDesc")})]}),c===0&&!t&&e.jsxs("div",{children:[e.jsx(Wi,{type:"secondary",style:{marginBottom:16},children:i("config.templateSelectDescription")}),e.jsxs(T,{direction:"vertical",style:{width:"100%"},size:"middle",children:[Object.entries(u).map(([f,v])=>e.jsx(Ee,{hoverable:!0,style:{cursor:"pointer"},onClick:()=>m(v),children:e.jsxs(T,{style:{width:"100%",justifyContent:"space-between"},children:[e.jsxs("div",{children:[e.jsx(oe.Title,{level:5,style:{margin:0},children:v.name}),e.jsx(Hi,{type:"secondary",children:v.description})]}),e.jsx(R,{type:"primary",icon:e.jsx(Ln,{}),children:i("config.useTemplate")})]})},f)),e.jsx(R,{block:!0,type:"dashed",onClick:()=>l(1),style:{marginTop:8},children:i("config.skipTemplate")})]})]}),c===1&&e.jsx(w,{form:s,layout:"vertical",children:e.jsxs(Pe,{defaultActiveKey:["basic"],ghost:!0,children:[e.jsxs(tn,{header:i("config.targetBasicSettings"),children:[e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.targetType"),e.jsx(W,{title:i("config.targetTypeTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"type",rules:[{required:!0,message:i("config.targetTypeRequired")}],children:e.jsxs(U,{children:[e.jsx(L,{value:"illustration",children:i("config.typeIllustration")}),e.jsx(L,{value:"novel",children:i("config.typeNovel")})]})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.targetMode"),e.jsx(W,{title:i("config.targetModeTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"mode",initialValue:"search",children:e.jsxs(U,{children:[e.jsx(L,{value:"search",children:i("config.modeSearch")}),e.jsx(L,{value:"ranking",children:i("config.modeRanking")})]})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.targetLimit"),e.jsx(W,{title:i("config.targetLimitTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"limit",rules:[{type:"number",min:1,max:1e3,message:i("config.targetLimitRange")}],children:e.jsx(K,{min:1,max:1e3,style:{width:"100%"},placeholder:i("config.targetLimitPlaceholder")})})]},"basic"),e.jsx(tn,{header:i("config.targetModeSettings"),children:e.jsx(w.Item,{noStyle:!0,shouldUpdate:(f,v)=>f.mode!==v.mode,children:({getFieldValue:f})=>(f("mode")||"search")==="search"?e.jsxs(e.Fragment,{children:[e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.targetTag"),e.jsx(W,{title:i("config.targetTagTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"tag",rules:[{validator:(j,x)=>!x||x.trim()===""?Promise.reject(new Error(i("config.targetTagRequired"))):Promise.resolve()}],children:e.jsx(Q,{placeholder:i("config.targetTagPlaceholder")})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.searchTarget"),e.jsx(W,{title:i("config.searchTargetTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"searchTarget",initialValue:"partial_match_for_tags",children:e.jsxs(U,{children:[e.jsxs(L,{value:"partial_match_for_tags",children:[i("config.searchTargetPartial")," (",i("common.recommended"),")"]}),e.jsx(L,{value:"exact_match_for_tags",children:i("config.searchTargetExact")}),e.jsx(L,{value:"title_and_caption",children:i("config.searchTargetTitle")})]})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.sort"),e.jsx(W,{title:i("config.sortTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"sort",initialValue:"date_desc",children:e.jsxs(U,{children:[e.jsx(L,{value:"date_desc",children:i("config.sortDateDesc")}),e.jsx(L,{value:"date_asc",children:i("config.sortDateAsc")}),e.jsx(L,{value:"popular_desc",children:i("config.sortPopularDesc")})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.rankingMode"),e.jsx(W,{title:i("config.rankingModeTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"rankingMode",initialValue:"day",children:e.jsxs(U,{children:[e.jsx(L,{value:"day",children:i("config.rankingDay")}),e.jsx(L,{value:"week",children:i("config.rankingWeek")}),e.jsx(L,{value:"month",children:i("config.rankingMonth")}),e.jsx(L,{value:"day_male",children:i("config.rankingDayMale")}),e.jsx(L,{value:"day_female",children:i("config.rankingDayFemale")}),e.jsx(L,{value:"day_ai",children:i("config.rankingDayAI")}),e.jsx(L,{value:"week_original",children:i("config.rankingWeekOriginal")}),e.jsx(L,{value:"week_rookie",children:i("config.rankingWeekRookie")})]})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.rankingDate"),e.jsx(W,{title:i("config.rankingDateTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"rankingDate",children:e.jsx(Q,{placeholder:i("config.rankingDatePlaceholder")})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.filterTag"),e.jsx(W,{title:i("config.filterTagTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"filterTag",children:e.jsx(Q,{placeholder:i("config.filterTagPlaceholder")})})]})})},"mode"),e.jsxs(tn,{header:i("config.targetAdvancedFilters"),children:[e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.minBookmarks"),e.jsx(W,{title:i("config.minBookmarksTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"minBookmarks",children:e.jsx(K,{min:0,style:{width:"100%"},placeholder:i("config.minBookmarksPlaceholder")})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.startDate"),e.jsx(W,{title:i("config.startDateTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"startDate",children:e.jsx(Q,{placeholder:i("config.startDatePlaceholder")})}),e.jsx(w.Item,{label:e.jsxs(T,{children:[i("config.endDate"),e.jsx(W,{title:i("config.endDateTooltip"),children:e.jsx(q,{style:{color:"#999"}})})]}),name:"endDate",children:e.jsx(Q,{placeholder:i("config.endDatePlaceholder")})})]},"advanced")]})})]})};function qi(){const{t:n}=H();return e.jsx(Ce,{message:n("config.targetsTitle"),description:n("config.targetsDescription"),type:"info",showIcon:!0})}const{Text:Z}=oe;function Ui({targets:n,onAdd:t,onEdit:a,onDelete:r}){const{t:i}=H(),s=o.useMemo(()=>[{title:i("config.targetType"),dataIndex:"type",key:"type",width:100,render:c=>e.jsx(Ie,{color:c==="illustration"?"blue":"green",children:i(c==="illustration"?"config.typeIllustration":"config.typeNovel")})},{title:i("config.targetMode"),dataIndex:"mode",key:"mode",width:100,render:c=>c?e.jsx(Ie,{color:c==="ranking"?"purple":"cyan",children:i(c==="ranking"?"config.modeRanking":"config.modeSearch")}):"-"},{title:i("config.targetConfig"),key:"config",render:(c,l)=>{if(l.mode==="ranking"){const u={day:i("config.rankingDay"),week:i("config.rankingWeek"),month:i("config.rankingMonth"),day_male:i("config.rankingDayMale"),day_female:i("config.rankingDayFemale"),day_ai:i("config.rankingDayAI"),week_original:i("config.rankingWeekOriginal"),week_rookie:i("config.rankingWeekRookie")};return e.jsxs(T,{direction:"vertical",size:"small",style:{fontSize:12},children:[e.jsx(Z,{strong:!0,children:u[l.rankingMode||"day"]||l.rankingMode}),l.filterTag&&e.jsxs(Z,{type:"secondary",children:[i("config.filterTag"),": ",l.filterTag]}),l.rankingDate&&e.jsxs(Z,{type:"secondary",children:[i("config.rankingDate"),": ",l.rankingDate]})]})}return l.seriesId?e.jsxs(Z,{children:[i("config.seriesId"),": ",l.seriesId]}):l.novelId?e.jsxs(Z,{children:[i("config.novelId"),": ",l.novelId]}):e.jsxs(T,{direction:"vertical",size:"small",style:{fontSize:12},children:[e.jsx(Z,{strong:!0,children:l.tag||"-"}),l.searchTarget&&e.jsx(Z,{type:"secondary",children:l.searchTarget==="partial_match_for_tags"?i("config.searchTargetPartial"):l.searchTarget==="exact_match_for_tags"?i("config.searchTargetExact"):i("config.searchTargetTitle")}),l.sort&&e.jsx(Z,{type:"secondary",children:l.sort==="date_desc"?i("config.sortDateDesc"):l.sort==="date_asc"?i("config.sortDateAsc"):i("config.sortPopularDesc")})]})}},{title:i("config.targetFilters"),key:"filters",width:150,render:(c,l)=>e.jsxs(T,{direction:"vertical",size:"small",style:{fontSize:12},children:[l.limit&&e.jsxs(Z,{children:[i("config.limit"),": ",l.limit]}),l.minBookmarks&&e.jsxs(Z,{type:"secondary",children:[i("config.minBookmarks")," ≥ ",l.minBookmarks]}),(l.startDate||l.endDate)&&e.jsxs(Z,{type:"secondary",children:[l.startDate&&`${i("config.from")} ${l.startDate}`,l.endDate&&` ${i("config.to")} ${l.endDate}`]})]})},{title:i("common.actions"),key:"action",width:150,render:(c,l,u)=>e.jsxs(T,{children:[e.jsx(R,{type:"link",icon:e.jsx(Bn,{}),onClick:()=>a(l,u),size:"small",children:i("common.edit")}),e.jsx(dn,{title:i("config.deleteTargetConfirm"),onConfirm:()=>r(u),okText:i("common.ok"),cancelText:i("common.cancel"),children:e.jsx(R,{type:"link",danger:!0,icon:e.jsx(un,{}),size:"small",children:i("common.delete")})})]})}],[r,a,i]);return e.jsx(Ee,{title:i("config.targetsList"),extra:e.jsx(R,{icon:e.jsx(Ln,{}),onClick:t,children:i("config.addTarget")}),children:e.jsx(sn,{columns:s,dataSource:n,rowKey:c=>c._rowKey?c._rowKey:String(c._index??c.tag??c.mode??"target"),pagination:!1,locale:{emptyText:i("config.targetsEmpty")}})})}const Ki=({form:n,onTargetChange:t})=>{const[a,r]=o.useState(!1),[i,s]=o.useState(null);o.useEffect(()=>{const j=n.getFieldValue("targets");Array.isArray(j)||n.setFieldsValue({targets:[]})},[n]);const c=w.useWatch("targets",n)||n.getFieldValue("targets")||[],l=o.useCallback(()=>{t&&t()},[t]),u=o.useCallback(()=>{s(null),r(!0)},[]),m=o.useCallback((j,x)=>{s({...j,_index:x}),r(!0)},[]),d=o.useCallback(j=>{const S=(n.getFieldValue("targets")||[]).filter((h,y)=>y!==j);n.setFieldsValue({targets:S}),l()},[n,l]),g=o.useCallback(j=>{const S=[...n.getFieldValue("targets")||[]];i&&typeof i._index=="number"?S[i._index]=j:S.push(j),n.setFieldsValue({targets:S}),r(!1),s(null),l()},[i,n,l]),f=o.useCallback(()=>{r(!1),s(null)},[]),v=o.useMemo(()=>c.map((j,x)=>({...j,_index:x,_rowKey:`${j.type||"target"}-${x}`})),[c]);return e.jsxs(e.Fragment,{children:[e.jsx(w.Item,{name:"targets",hidden:!0,children:e.jsx("input",{type:"hidden"})}),e.jsxs(T,{direction:"vertical",style:{width:"100%"},size:"large",children:[e.jsx(qi,{}),e.jsx(Ui,{targets:v,onAdd:u,onEdit:m,onDelete:d})]}),e.jsx(Gi,{visible:a,editingTarget:i,onSave:g,onCancel:f})]})},qn=({value:n,onChange:t,language:a="text",readOnly:r=!1,placeholder:i="Enter code...",minHeight:s=200,maxHeight:c=600,showCopyButton:l=!0,style:u,className:m})=>{const d=o.useRef(null),[g,f]=o.useState(!1),v=h=>{t&&t(h.target.value)},j=async()=>{try{await navigator.clipboard.writeText(n),f(!0),V.success("Copied to clipboard"),setTimeout(()=>f(!1),2e3)}catch{V.error("Failed to copy")}},x=h=>{if(a==="json"&&!r){const y=h.clipboardData.getData("text");try{const E=JSON.parse(y),p=JSON.stringify(E,null,2);h.preventDefault(),t&&t(p)}catch{}}},S={fontFamily:'Monaco, Menlo, "Ubuntu Mono", Consolas, "source-code-pro", monospace',fontSize:"14px",lineHeight:"1.6",padding:"12px",border:"1px solid #d9d9d9",borderRadius:"4px",backgroundColor:a==="json"?"#1f1f1f":"#fff",color:a==="json"?"#fff":"#000",minHeight:`${s}px`,maxHeight:`${c}px`,overflow:"auto",resize:"vertical",width:"100%",...u};return e.jsxs("div",{className:m,children:[l&&e.jsx(T,{style:{marginBottom:8,justifyContent:"flex-end",width:"100%"},children:e.jsx(R,{size:"small",icon:g?e.jsx(Nt,{}):e.jsx(ln,{}),onClick:j,disabled:!n,children:g?"Copied":"Copy"})}),e.jsx("textarea",{ref:d,value:n,onChange:v,onPaste:x,readOnly:r,placeholder:i,style:S,spellCheck:!1})]})},Un=({visible:n,filename:t,onClose:a,onConfigFileSwitch:r})=>{const{t:i}=H(),s=Be(),{configFiles:c,refetch:l}=Ve(),[u,m]=o.useState(""),[d,g]=o.useState(!1),[f,v]=o.useState(""),[j,x]=o.useState(!1),[S,h]=o.useState(!1),y=o.useRef(""),E=o.useRef(""),p=o.useRef(!1);o.useEffect(()=>{n&&t?_():(m(""),v(""),x(!1),y.current="",E.current="")},[n,t]),o.useEffect(()=>{if(!n||!t||p.current)return;let C,k=!0;const D=async()=>{if(!(!k||!t||p.current))try{const B=(await _e.getConfigFileContent(t)).data.data.content,J=y.current,te=E.current;B!==J&&B!==te&&!p.current?(x(!0),v(B),y.current=B):B===te?(x(!1),v(B),y.current=B):p.current||(v(B),y.current=B)}catch(A){console.warn("Failed to poll config file content:",A)}};return D(),C=setInterval(()=>{p.current||D()},5e3),()=>{k=!1,C&&clearInterval(C)}},[n,t,S]),o.useEffect(()=>{y.current=f},[f]),o.useEffect(()=>{E.current=u},[u]),o.useEffect(()=>{p.current=S},[S]);const _=async()=>{try{g(!0);const k=(await _e.getConfigFileContent(t)).data.data.content;m(k),v(k),y.current=k,E.current=k,x(!1)}catch(C){const{message:k}=ze(C),D=C instanceof Error?C.message:void 0;V.error(`${i("config.configFileReadFailed")}: ${k||D||i("config.unknownError")}`)}finally{g(!1)}},O=async()=>{await _(),V.success(i("config.jsonEditorRefreshed"))},$=async()=>{if(t)try{g(!0);try{JSON.parse(u)}catch{V.error(i("config.jsonFormatError"));return}await _e.updateConfigFileContent(t,u),V.success(i("config.configSaved")),v(u),y.current=u,E.current=u,x(!1),h(!1),p.current=!1,await s.invalidateQueries({queryKey:ue.CONFIG}),await s.invalidateQueries({queryKey:ue.CONFIG_FILES}),l(),c?.find(k=>k.filename===t&&k.isActive)?r?r():setTimeout(()=>{window.location.reload()},1e3):a()}catch(C){const{errorCode:k,message:D,details:A}=ze(C);if(k==="CONFIG_INVALID"&&A&&Array.isArray(A)){const B=A.map(J=>{if(typeof J=="object"&&J!==null&&"code"in J){const te=J;return ye(te.code,i,te.params)}return String(J)});V.error(`${ye(k,i)}: ${B.join(", ")}`)}else V.error(D||i("config.configSaveFailed"))}finally{g(!1)}},P=()=>{try{const C=JSON.parse(u),k=JSON.stringify(C,null,2);m(k),V.success(i("config.jsonFormatted"))}catch{V.error(i("config.jsonFormatError"))}};return e.jsx(cn,{title:e.jsxs(T,{children:[i("config.editJson"),e.jsxs("span",{style:{color:"#999",fontSize:14},children:["(",t,")"]})]}),open:n,onCancel:a,width:900,footer:[e.jsx(R,{onClick:P,children:i("config.formatJson")},"format"),e.jsx(R,{onClick:a,children:i("common.cancel")},"cancel"),e.jsx(R,{type:"primary",icon:e.jsx(Gn,{}),loading:d,onClick:$,children:i("config.saveConfig")},"save")],children:e.jsxs(Dt,{spinning:d&&!u,children:[j&&e.jsx(Ce,{message:i("config.jsonEditorExternalChanges"),description:i("config.jsonEditorExternalChangesDesc"),type:"warning",showIcon:!0,style:{marginBottom:16},action:e.jsx(R,{size:"small",onClick:O,children:i("config.refresh")})}),e.jsx(qn,{value:u,onChange:C=>{m(C),h(!0),p.current=!0,j&&C!==f&&x(!1)},language:"json",minHeight:400,maxHeight:600,placeholder:i("config.jsonEditorPlaceholder")}),e.jsx(Ce,{message:i("config.jsonEditorWarning"),type:"warning",showIcon:!0,style:{marginTop:16}})]})})},{Text:$n}=oe,Ji=({onConfigFileSwitch:n,onJsonEditorOpen:t})=>{const{t:a}=H(),{configFiles:r,isLoading:i,refetch:s,switchFileAsync:c,deleteFileAsync:l}=Ve(),{handleError:u}=ke(),[m,d]=o.useState(!1),[g,f]=o.useState(null),v=async h=>{if(t){t(h);return}try{f(h),d(!0)}catch(y){const{message:E}=ze(y),p=y instanceof Error?y:null;V.error(`${a("config.configFileReadFailed")}: ${E||p?.message||a("config.unknownError")}`)}},j=async h=>{if(!h.isActive)try{await c(h.path),V.success(a("config.configSwitched")),n&&n()}catch(y){u(y)}},x=async h=>{try{await l(h),V.success(a("config.configFileDeleted")),s()}catch(y){u(y)}},S=[{title:a("config.fileName"),dataIndex:"filename",key:"filename",render:(h,y)=>e.jsxs(T,{children:[e.jsx($n,{strong:y.isActive,children:h}),y.isActive&&e.jsx(Ie,{color:"green",children:a("config.activeConfig")})]})},{title:a("config.filePath"),dataIndex:"pathRelative",key:"pathRelative",render:h=>e.jsx($n,{type:"secondary",style:{fontSize:12},children:h})},{title:a("config.fileModified"),dataIndex:"modifiedTime",key:"modifiedTime",render:h=>new Date(h).toLocaleString()},{title:a("config.fileSize"),dataIndex:"size",key:"size",render:h=>`${(h/1024).toFixed(2)} KB`},{title:a("common.actions"),key:"action",width:250,render:(h,y)=>e.jsxs(T,{children:[e.jsx(R,{type:"link",icon:e.jsx(Bn,{}),onClick:()=>v(y.filename),size:"small",children:a("config.editJson")}),!y.isActive&&e.jsx(R,{type:"link",icon:e.jsx(Mn,{}),onClick:()=>j(y),size:"small",children:a("config.switch")}),e.jsx(dn,{title:a("config.deleteConfigFileConfirm"),onConfirm:()=>x(y.filename),okText:a("common.ok"),cancelText:a("common.cancel"),children:e.jsx(R,{type:"link",danger:!0,icon:e.jsx(un,{}),size:"small",children:a("common.delete")})})]})}];return e.jsxs(e.Fragment,{children:[e.jsx(Ee,{title:a("config.configFiles"),extra:e.jsx(R,{icon:e.jsx(on,{}),onClick:()=>s(),children:a("common.refresh")}),children:r&&r.length>0?e.jsx(sn,{columns:S,dataSource:r,rowKey:"filename",loading:i,pagination:{pageSize:10},locale:{emptyText:a("config.configFilesEmpty")}}):e.jsx(Ce,{message:a("config.configFilesEmpty"),description:a("config.configFilesEmptyDesc"),type:"info",showIcon:!0})}),m&&g&&e.jsx(Un,{visible:m,filename:g,onClose:()=>{d(!1),f(null)},onConfigFileSwitch:n})]})},{Text:Fn}=oe,Qi=({onConfigApplied:n})=>{const{t}=H(),{history:a,isLoading:r,refetch:i,applyAsync:s,deleteAsync:c}=Rt(),{handleError:l}=ke(),u=async g=>{try{await s(g),V.success(t("config.configApplied")),n&&n()}catch(f){l(f)}},m=async g=>{try{await c(g),V.success(t("config.historyDeleted")),i()}catch(f){l(f)}},d=[{title:t("config.historyName"),dataIndex:"name",key:"name",render:(g,f)=>e.jsxs(T,{children:[e.jsx(Fn,{strong:f.is_active===1,children:g}),f.is_active===1&&e.jsx(Ie,{color:"green",children:t("config.activeConfig")})]})},{title:t("config.historyDescription"),dataIndex:"description",key:"description",render:g=>g||e.jsx(Fn,{type:"secondary",children:"-"})},{title:t("config.historyCreatedAt"),dataIndex:"created_at",key:"created_at",render:g=>new Date(g).toLocaleString()},{title:t("config.historyUpdatedAt"),dataIndex:"updated_at",key:"updated_at",render:g=>new Date(g).toLocaleString()},{title:t("common.actions"),key:"action",width:200,render:(g,f)=>e.jsxs(T,{children:[e.jsx(R,{type:"link",icon:e.jsx(Mn,{}),onClick:()=>u(f.id),size:"small",children:t("config.apply")}),e.jsx(dn,{title:t("config.deleteHistoryConfirm"),onConfirm:()=>m(f.id),okText:t("common.ok"),cancelText:t("common.cancel"),children:e.jsx(R,{type:"link",danger:!0,icon:e.jsx(un,{}),size:"small",children:t("common.delete")})})]})}];return e.jsx(Ee,{title:t("config.configHistory"),extra:e.jsx(R,{icon:e.jsx(on,{}),onClick:()=>i(),children:t("common.refresh")}),children:a&&a.length>0?e.jsx(sn,{columns:d,dataSource:a,rowKey:"id",loading:r,pagination:{pageSize:10},locale:{emptyText:t("config.historyEmpty")}}):e.jsx(Ce,{message:t("config.historyEmpty"),description:t("config.historyEmptyDesc"),type:"info",showIcon:!0})})},{Text:Xi}=oe;function Yi({form:n,onConfigFileSwitch:t,onJsonEditorOpen:a,onConfigApplied:r,onTargetChange:i}){const{t:s}=H(),c=o.useMemo(()=>[{key:"files",label:e.jsxs(e.Fragment,{children:[e.jsx(On,{})," ",s("config.tabConfigFiles")]}),children:e.jsx(Ji,{onConfigFileSwitch:t,onJsonEditorOpen:a})},{key:"history",label:e.jsxs(e.Fragment,{children:[e.jsx(Tt,{})," ",s("config.tabHistory")]}),children:e.jsx(Qi,{onConfigApplied:r})}],[r,t,a,s]),l=o.useMemo(()=>[{key:"basic",label:s("config.tabBasic"),children:e.jsx(zi,{})},{key:"pixiv",label:s("config.tabPixiv"),children:e.jsx("div",{children:e.jsx(Xi,{type:"secondary",children:s("config.pixivCredentialsHidden")})})},{key:"network",label:s("config.tabNetwork"),children:e.jsx(Bi,{})},{key:"storage",label:s("config.tabStorage"),children:e.jsx(Vi,{})},{key:"scheduler",label:s("config.tabScheduler"),children:e.jsx(Pi,{})},{key:"download",label:s("config.tabDownload"),children:e.jsx(Li,{})},{key:"targets",label:s("config.tabTargets"),children:e.jsx(Ki,{form:n,onTargetChange:i})}],[n,i,s]),u=o.useMemo(()=>[...c||[],...l||[]],[l,c]);return{managementTabItems:c,formTabItems:l,tabItems:u}}function Zi({form:n,activeTab:t,onTabChange:a,onConfigFileSwitch:r,onJsonEditorOpen:i,onConfigApplied:s,onTargetChange:c}){const{tabItems:l}=Yi({form:n,onConfigFileSwitch:r,onJsonEditorOpen:i,onConfigApplied:s,onTargetChange:c});return e.jsx(w,{form:n,layout:"vertical",children:e.jsx(Kt,{activeKey:t,onChange:a,items:l})})}function ea({visible:n,configPreview:t,onClose:a}){const{t:r}=H(),i=()=>{navigator.clipboard.writeText(t),V.success(r("config.configCopied"))};return e.jsx(cn,{title:r("config.previewConfig"),open:n,onCancel:a,footer:[e.jsx(R,{icon:e.jsx(ln,{}),onClick:i,children:r("common.copy")},"copy"),e.jsx(R,{onClick:a,children:r("common.close")},"close")],width:800,children:e.jsx(qn,{value:t,readOnly:!0,language:"json",minHeight:400,maxHeight:600})})}function ya(){const{t:n}=H(),{activeTab:t,setActiveTab:a}=$i(),{previewVisible:r,jsonEditorVisible:i,editingConfigFile:s,openPreview:c,closePreview:l,openJsonEditor:u,closeJsonEditor:m}=Ti(),{form:d,config:g,isLoading:f,isUpdating:v,isValidating:j,handleSave:x,handleValidate:S,handleTargetChange:h,getConfigPreview:y,refreshConfig:E}=Si(),{handleExportConfig:p,handleImportConfig:_,handleCopyConfig:O,handleConfigFileSwitch:$,handleConfigApplied:P,isImporting:C}=Di(g),{configFiles:k,refetch:D}=Ve();if(f)return e.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"48px 0"},children:e.jsx($t,{})});const A=g?._meta?.configPathRelative??g?._meta?.configPath??n("config.unknown");return e.jsxs("div",{children:[e.jsxs("div",{style:{marginBottom:16,width:"100%",display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:16,flexWrap:"wrap"},children:[e.jsx(_i,{currentConfigPath:A,configFiles:k,onConfigFileSwitch:$,refetchConfigFiles:D}),e.jsx(Oi,{onRefresh:E,onPreview:c,onExport:p,onImport:_,onCopy:()=>O(y()),onValidate:S,onSave:x,isValidating:j,isUpdating:v,isImporting:C})]}),e.jsx(Zi,{form:d,activeTab:t,onTabChange:a,onConfigFileSwitch:$,onJsonEditorOpen:u,onConfigApplied:P,onTargetChange:h}),e.jsx(ea,{visible:r,configPreview:y(),onClose:l}),i&&s&&e.jsx(Un,{visible:i,filename:s,onClose:m,onConfigFileSwitch:$})]})}export{ya as default};
|
|
16
|
-
//# sourceMappingURL=Config-D9TWUGQR.js.map
|