@yuku123/z-subscribe-frontend-component 0.2.1 → 0.2.2
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(X,I){typeof exports=="object"&&typeof module<"u"?I(exports,require("react"),require("react-router-dom"),require("antd"),require("@ant-design/icons"),require("@ant-design/pro-components")):typeof define=="function"&&define.amd?define(["exports","react","react-router-dom","antd","@ant-design/icons","@ant-design/pro-components"],I):(X=typeof globalThis<"u"?globalThis:X||self,I(X.z_component={},X.React,X.ReactRouterDOM,X.antd,X.icons))})(this,(function(X,I,re,c,D){"use strict";var Ie={exports:{}},Re={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ut;function
|
|
9
|
+
*/var ut;function dr(){if(ut)return Re;ut=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:o}}return Re.Fragment=t,Re.jsx=r,Re.jsxs=r,Re}var Te={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,20 +14,12 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ft;function pr(){return ft||(ft=1,process.env.NODE_ENV!=="production"&&(function(){function e(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===J?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case B:return"Fragment";case m:return"Profiler";case y:return"StrictMode";case ne:return"Suspense";case me:return"SuspenseList";case L:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case T:return"Portal";case v:return i.displayName||"Context";case p:return(i._context.displayName||"Context")+".Consumer";case k:var E=i.render;return i=i.displayName,i||(i=E.displayName||E.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case S:return E=i.displayName||null,E!==null?E:e(i.type)||"Memo";case h:E=i._payload,i=i._init;try{return e(i(E))}catch{}}return null}function t(i){return""+i}function r(i){try{t(i);var E=!1}catch{E=!0}if(E){E=console;var j=E.error,A=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return j.call(E,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),t(i)}}function n(i){if(i===B)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===h)return"<...>";try{var E=e(i);return E?"<"+E+">":"<...>"}catch{return"<...>"}}function s(){var i=G.A;return i===null?null:i.getOwner()}function o(){return Error("react-stack-top-frame")}function a(i){if(le.call(i,"key")){var E=Object.getOwnPropertyDescriptor(i,"key").get;if(E&&E.isReactWarning)return!1}return i.key!==void 0}function f(i,E){function j(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",E))}j.isReactWarning=!0,Object.defineProperty(i,"key",{get:j,configurable:!0})}function d(){var i=e(this.type);return oe[i]||(oe[i]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),i=this.props.ref,i!==void 0?i:null}function g(i,E,j,A,te,P){var _=j.ref;return i={$$typeof:N,type:i,key:E,props:j,_owner:A},(_!==void 0?_:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:d}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function b(i,E,j,A,te,P){var _=E.children;if(_!==void 0)if(A)if(W(_)){for(A=0;A<_.length;A++)x(_[A]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(_);if(le.call(E,"key")){_=e(i);var U=Object.keys(E).filter(function(Pe){return Pe!=="key"});A=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",V[_+A]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
23
|
-
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),n=a.substring(s+1).trim(),!(!r||t[r]&&sn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};function an(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const ln=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),cn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function We(e,t){return l.isArray(e)?e.map(r=>We(r,t)):an(String(e).replace(t,""))}const un=e=>We(e,ln),dn=e=>We(e,cn);function Tt(e){const t=Object.create(null);return l.forEach(e.toJSON(),(r,n)=>{t[n]=dn(r)}),t}const Ot=Symbol("internals");function je(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return e===!1||e==null?e:l.isArray(e)?e.map(Ue):un(String(e))}function fn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const pn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ge(e,t,r,n,s){if(l.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function hn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function mn(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,a){return this[n].call(this,t,s,o,a)},configurable:!0})})}let H=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function o(c,p,y){const m=je(p);if(!m)return;const g=l.findKey(s,m);(!g||s[g]===void 0||y===!0||y===void 0&&s[g]!==!1)&&(s[g||p]=Ue(c))}const a=(c,p)=>l.forEach(c,(y,m)=>o(y,m,p));if(l.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(l.isString(t)&&(t=t.trim())&&!pn(t))a(on(t),r);else if(l.isObject(t)&&l.isSafeIterable(t)){let c=Object.create(null),p,y;for(const m of t){if(!l.isArray(m))throw new TypeError("Object iterator must return a key-value pair");y=m[0],l.hasOwnProp(c,y)?(p=c[y],c[y]=l.isArray(p)?[...p,m[1]]:[p,m[1]]):c[y]=m[1]}a(c,r)}else t!=null&&o(r,t,n);return this}get(t,r){if(t=je(t),t){const n=l.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return fn(s);if(l.isFunction(r))return r.call(this,s,n);if(l.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=je(t),t){const n=l.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ge(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function o(a){if(a=je(a),a){const c=l.findKey(n,a);c&&(!r||Ge(n,n[c],c,r))&&(delete n[c],s=!0)}}return l.isArray(t)?t.forEach(o):o(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const o=r[n];(!t||Ge(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const r=this,n={};return l.forEach(this,(s,o)=>{const a=l.findKey(n,o);if(a){r[a]=Ue(s),delete r[o];return}const c=t?hn(o):String(o).trim();c!==o&&delete r[o],r[c]=Ue(s),n[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return l.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&l.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
24
|
-
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Ot]=this[Ot]={accessors:{}}).accessors,s=this.prototype;function o(a){const c=je(a);n[c]||(mn(s,a),n[c]=!0)}return l.isArray(t)?t.forEach(o):o(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(H.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),l.freezeMethods(H);const yn="[REDACTED ****]";function bn(e){if(l.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(l.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function gn(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||l.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof H&&(o=o.toJSON()),n.push(o);let a;if(l.isArray(o))a=[],o.forEach((c,p)=>{const y=s(c);l.isUndefined(y)||(a[p]=y)});else{if(!l.isPlainObject(o)&&bn(o))return n.pop(),o;a=Object.create(null);for(const[c,p]of Object.entries(o)){const y=r.has(c.toLowerCase())?yn:s(p);l.isUndefined(y)||(a[c]=y)}}return n.pop(),a};return s(e)}let E=class ur extends Error{static from(t,r,n,s,o,a){const c=new ur(t.message,r||t.code,n,s,o);return c.cause=t,c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),a&&Object.assign(c,a),c}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&l.hasOwnProp(t,"redact")?t.redact:void 0,n=l.isArray(r)&&r.length>0?gn(t,r):l.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};E.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",E.ERR_BAD_OPTION="ERR_BAD_OPTION",E.ECONNABORTED="ECONNABORTED",E.ETIMEDOUT="ETIMEDOUT",E.ECONNREFUSED="ECONNREFUSED",E.ERR_NETWORK="ERR_NETWORK",E.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",E.ERR_DEPRECATED="ERR_DEPRECATED",E.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",E.ERR_BAD_REQUEST="ERR_BAD_REQUEST",E.ERR_CANCELED="ERR_CANCELED",E.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",E.ERR_INVALID_URL="ERR_INVALID_URL",E.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const xn=null,At=100;function Ye(e){return l.isPlainObject(e)||l.isArray(e)}function _t(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function Ve(e,t,r){return e?e.concat(t).map(function(s,o){return s=_t(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function Sn(e){return l.isArray(e)&&!e.some(Ye)}const wn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function Be(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,f){return!l.isUndefined(f[x])});const n=r.metaTokens,s=r.visitor||P,o=r.dots,a=r.indexes,c=r.Blob||typeof Blob<"u"&&Blob,p=r.maxDepth===void 0?At:r.maxDepth,y=c&&l.isSpecCompliantForm(t),m=[];if(!l.isFunction(s))throw new TypeError("visitor must be a function");function g(b){if(b===null)return"";if(l.isDate(b))return b.toISOString();if(l.isBoolean(b))return b.toString();if(!y&&l.isBlob(b))throw new E("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(b)||l.isTypedArray(b)?y&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function O(b){if(b>p)throw new E("Object is too deeply nested ("+b+" levels). Max depth: "+p,E.ERR_FORM_DATA_DEPTH_EXCEEDED)}function T(b,x){if(p===1/0)return JSON.stringify(b);const f=[];return JSON.stringify(b,function(v,L){if(!l.isObject(L))return L;for(;f.length&&f[f.length-1]!==this;)f.pop();return f.push(L),O(x+f.length-1),L})}function P(b,x,f){let A=b;if(l.isReactNative(t)&&l.isReactNativeBlob(b))return t.append(Ve(f,x,o),g(b)),!1;if(b&&!f&&typeof b=="object"){if(l.endsWith(x,"{}"))x=n?x:x.slice(0,-2),b=T(b,1);else if(l.isArray(b)&&Sn(b)||(l.isFileList(b)||l.endsWith(x,"[]"))&&(A=l.toArray(b)))return x=_t(x),A.forEach(function(L,K){!(l.isUndefined(L)||L===null)&&t.append(a===!0?Ve([x],K,o):a===null?x:x+"[]",g(L))}),!1}return Ye(b)?!0:(t.append(Ve(f,x,o),g(b)),!1)}const N=Object.assign(wn,{defaultVisitor:P,convertValue:g,isVisitable:Ye});function R(b,x,f=0){if(!l.isUndefined(b)){if(O(f),m.indexOf(b)!==-1)throw new Error("Circular reference detected in "+x.join("."));m.push(b),l.forEach(b,function(v,L){(!(l.isUndefined(v)||v===null)&&s.call(t,v,l.isString(L)?L.trim():L,x,N))===!0&&R(v,x?x.concat(L):[L],f+1)}),m.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return R(e),t}function jt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(n){return t[n]})}function Qe(e,t){this._pairs=[],e&&Be(e,this,t)}const Ct=Qe.prototype;Ct.append=function(t,r){this._pairs.push([t,r])},Ct.toString=function(t){const r=t?function(n){return t.call(this,n,jt)}:jt;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function En(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pt(e,t,r){if(!t)return e;const n=l.isFunction(r)?{serialize:r}:r,s=l.getSafeProp(n,"encode")||En,o=l.getSafeProp(n,"serialize");let a;if(o?a=o(t,n):a=l.isURLSearchParams(t)?t.toString():new Qe(t,n).toString(s),a){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Nt{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ze={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Rn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Qe,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},et=typeof window<"u"&&typeof document<"u",tt=typeof navigator=="object"&&navigator||void 0,Tn=et&&(!tt||["ReactNative","NativeScript","NS"].indexOf(tt.product)<0),On=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",An=et&&window.location.href||"http://localhost",$={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:et,hasStandardBrowserEnv:Tn,hasStandardBrowserWebWorkerEnv:On,navigator:tt,origin:An},Symbol.toStringTag,{value:"Module"})),...Rn};function _n(e,t){return Be(e,new $.classes.URLSearchParams,{visitor:function(r,n,s,o){return $.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const It=At;function kt(e){if(e>It)throw new E("FormData field is too deeply nested ("+e+" levels). Max depth: "+It,E.ERR_FORM_DATA_DEPTH_EXCEEDED)}function jn(e){const t=[],r=/\w+|\[(\w*)]/g;let n;for(;(n=r.exec(e))!==null;)kt(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function Cn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function vt(e){function t(r,n,s,o){kt(o);let a=r[o++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),p=o>=r.length;return a=!a&&l.isArray(s)?s.length:a,p?(l.hasOwnProp(s,a)?s[a]=l.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!c):((!l.hasOwnProp(s,a)||!l.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],o)&&l.isArray(s[a])&&(s[a]=Cn(s[a])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(n,s)=>{t(jn(n),s,r,0)}),r}return null}const Ee=(e,t)=>e!=null&&l.hasOwnProp(e,t)?e[t]:void 0;function Pn(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ce={transitional:Ze,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=l.isObject(t);if(o&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(vt(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(o){const p=Ee(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return _n(t,p).toString();if((c=l.isFileList(t))||n.indexOf("multipart/form-data")>-1){const y=Ee(this,"env"),m=y&&y.FormData;return Be(c?{"files[]":t}:t,m&&new m,p)}}return o||s?(r.setContentType("application/json",!1),Pn(t)):t}],transformResponse:[function(t){const r=Ee(this,"transitional")||Ce.transitional,n=r&&r.forcedJSONParsing,s=Ee(this,"responseType"),o=s==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(n&&!s||o)){const c=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t,Ee(this,"parseReviver"))}catch(p){if(c)throw p.name==="SyntaxError"?E.from(p,E.ERR_BAD_RESPONSE,this,null,Ee(this,"response")):p}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$.classes.FormData,Blob:$.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],e=>{Ce.headers[e]={}});function rt(e,t){const r=this||Ce,n=t||r,s=H.from(n.headers);let o=n.data;return l.forEach(e,function(c){o=c.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Dt(e){return!!(e&&e.__CANCEL__)}let Pe=class extends E{constructor(t,r,n){super(t??"canceled",E.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function Lt(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new E("Request failed with status code "+r.status,r.status>=400&&r.status<500?E.ERR_BAD_REQUEST:E.ERR_BAD_RESPONSE,r.config,r.request,r))}function Nn(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function In(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(p){const y=Date.now(),m=n[o];a||(a=y),r[s]=p,n[s]=y;let g=o,O=0;for(;g!==s;)O+=r[g++],g=g%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),y-a<t)return;const T=m&&y-m;return T?Math.round(O*1e3/T):void 0}}function kn(e,t){let r=0,n=1e3/t,s,o;const a=(y,m=Date.now())=>{r=m,s=null,o&&(clearTimeout(o),o=null),e(...y)};return[(...y)=>{const m=Date.now(),g=m-r;g>=n?a(y,m):(s=y,o||(o=setTimeout(()=>{o=null,a(s)},n-g)))},()=>s&&a(s)]}const ze=(e,t,r=3)=>{let n=0;const s=In(50,250);return kn(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,c=o.lengthComputable?o.total:void 0,p=c!=null?Math.min(a,c):a,y=Math.max(0,p-n),m=s(y);n=Math.max(n,p);const g={loaded:p,total:c,progress:c?p/c:void 0,bytes:y,rate:m||void 0,estimated:m&&c?(c-p)/m:void 0,event:o,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(g)},r)},Ft=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Ut=e=>(...t)=>l.asap(()=>e(...t)),vn=$.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,$.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL($.origin),$.navigator&&/(msie|trident)/i.test($.navigator.userAgent)):()=>!0,Dn=$.hasStandardBrowserEnv?{write(e,t,r,n,s,o,a){if(typeof document>"u")return;const c=[`${e}=${encodeURIComponent(t)}`];l.isNumber(r)&&c.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&c.push(`path=${n}`),l.isString(s)&&c.push(`domain=${s}`),o===!0&&c.push("secure"),l.isString(a)&&c.push(`SameSite=${a}`),document.cookie=c.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Ln(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Fn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Un=/^https?:(?!\/\/)/i,Bn=/[\t\n\r]/g;function zn(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function $n(e){return zn(e).replace(Bn,"")}function Bt(e,t){if(typeof e=="string"&&Un.test($n(e)))throw new E('Invalid URL: missing "//" after protocol',E.ERR_INVALID_URL,t)}function zt(e,t,r,n){Bt(t,n);let s=!Ln(t);return e&&(s||r===!1)?(Bt(e,n),Fn(e,t)):t}const $t=e=>e instanceof H?{...e}:e;function he(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(m,g,O,T){return l.isPlainObject(m)&&l.isPlainObject(g)?l.merge.call({caseless:T},m,g):l.isPlainObject(g)?l.merge({},g):l.isArray(g)?g.slice():g}function s(m,g,O,T){if(l.isUndefined(g)){if(!l.isUndefined(m))return n(void 0,m,O,T)}else return n(m,g,O,T)}function o(m,g){if(!l.isUndefined(g))return n(void 0,g)}function a(m,g){if(l.isUndefined(g)){if(!l.isUndefined(m))return n(void 0,m)}else return n(void 0,g)}function c(m){const g=l.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!l.isUndefined(g))if(l.isPlainObject(g)){if(l.hasOwnProp(g,m))return g[m]}else return;const O=l.hasOwnProp(e,"transitional")?e.transitional:void 0;if(l.isPlainObject(O)&&l.hasOwnProp(O,m))return O[m]}function p(m,g,O){if(l.hasOwnProp(t,O))return n(m,g);if(l.hasOwnProp(e,O))return n(void 0,m)}const y={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:p,headers:(m,g,O)=>s($t(m),$t(g),O,!0)};return l.forEach(Object.keys({...e,...t}),function(g){if(g==="__proto__"||g==="constructor"||g==="prototype")return;const O=l.hasOwnProp(y,g)?y[g]:s,T=l.hasOwnProp(e,g)?e[g]:void 0,P=l.hasOwnProp(t,g)?t[g]:void 0,N=O(T,P,g);l.isUndefined(N)&&O!==p||(r[g]=N)}),l.hasOwnProp(t,"validateStatus")&&l.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&(l.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const Hn=["content-type","content-length"];function qn(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{Hn.includes(n.toLowerCase())&&e.set(n,s)})}const Mn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function Ht(e){const t=he({},e),r=O=>l.hasOwnProp(t,O)?t[O]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),a=r("xsrfCookieName");let c=r("headers");const p=r("auth"),y=r("baseURL"),m=r("allowAbsoluteUrls"),g=r("url");if(t.headers=c=H.from(c),t.url=Pt(zt(y,g,m,t),r("params"),r("paramsSerializer")),p){const O=l.getSafeProp(p,"username")||"",T=l.getSafeProp(p,"password")||"";c.set("Authorization","Basic "+btoa(O+":"+(T?Mn(T):"")))}if(l.isFormData(n)&&($.hasStandardBrowserEnv||$.hasStandardBrowserWebWorkerEnv||l.isReactNative(n)?c.setContentType(void 0):l.isFunction(n.getHeaders)&&qn(c,n.getHeaders(),r("formDataHeaderPolicy"))),$.hasStandardBrowserEnv&&(l.isFunction(s)&&(s=s(t)),s===!0||s==null&&vn(t.url))){const T=o&&a&&Dn.read(a);T&&c.set(o,T)}return t}const Jn=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const s=Ht(e);let o=s.data;const a=H.from(s.headers).normalize();let{responseType:c,onUploadProgress:p,onDownloadProgress:y}=s,m,g,O,T,P;function N(){T&&T(),P&&P(),s.cancelToken&&s.cancelToken.unsubscribe(m),s.signal&&s.signal.removeEventListener("abort",m)}let R=new XMLHttpRequest;R.open(s.method.toUpperCase(),s.url,!0),R.timeout=s.timeout;function b(){if(!R)return;const f=H.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),v={data:!c||c==="text"||c==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:f,config:e,request:R};Lt(function(K){r(K),N()},function(K){n(K),N()},v),R=null}"onloadend"in R?R.onloadend=b:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.startsWith("file:"))||setTimeout(b)},R.onabort=function(){R&&(n(new E("Request aborted",E.ECONNABORTED,e,R)),N(),R=null)},R.onerror=function(A){const v=A&&A.message?A.message:"Network Error",L=new E(v,E.ERR_NETWORK,e,R);L.event=A||null,n(L),N(),R=null},R.ontimeout=function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const v=s.transitional||Ze;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),n(new E(A,v.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,R)),N(),R=null},o===void 0&&a.setContentType(null),"setRequestHeader"in R&&l.forEach(Tt(a),function(A,v){R.setRequestHeader(v,A)}),l.isUndefined(s.withCredentials)||(R.withCredentials=!!s.withCredentials),c&&c!=="json"&&(R.responseType=s.responseType),y&&([O,P]=ze(y,!0),R.addEventListener("progress",O)),p&&R.upload&&([g,T]=ze(p),R.upload.addEventListener("progress",g),R.upload.addEventListener("loadend",T)),(s.cancelToken||s.signal)&&(m=f=>{R&&(n(!f||f.type?new Pe(null,e,R):f),R.abort(),N(),R=null)},s.cancelToken&&s.cancelToken.subscribe(m),s.signal&&(s.signal.aborted?m():s.signal.addEventListener("abort",m)));const x=Nn(s.url);if(x&&!$.protocols.includes(x)){n(new E("Unsupported protocol "+x+":",E.ERR_BAD_REQUEST,e));return}R.send(o||null)})},Kn=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const s=function(p){if(!n){n=!0,a();const y=p instanceof Error?p:this.reason;r.abort(y instanceof E?y:new Pe(y instanceof Error?y.message:y))}};let o=t&&setTimeout(()=>{o=null,s(new E(`timeout of ${t}ms exceeded`,E.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(s):p.removeEventListener("abort",s)}),e=null)};e.forEach(p=>p.addEventListener("abort",s));const{signal:c}=r;return c.unsubscribe=()=>l.asap(a),c},Xn=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Wn=async function*(e,t){for await(const r of Gn(e))yield*Xn(r,t)},Gn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},qt=(e,t,r,n)=>{const s=Wn(e,t);let o=0,a,c=p=>{a||(a=!0,n&&n(p))};return new ReadableStream({async pull(p){try{const{done:y,value:m}=await s.next();if(y){c(),p.close();return}let g=m.byteLength;if(r){let O=o+=g;r(O)}p.enqueue(new Uint8Array(m))}catch(y){throw c(y),y}},cancel(p){return c(p),s.return()}},{highWaterMark:2})},$e=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Yn=(e,t,r)=>t+2<r&&$e(e.charCodeAt(t+1))&&$e(e.charCodeAt(t+2));function Vn(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let a=n.length;const c=n.length;for(let T=0;T<c;T++)if(n.charCodeAt(T)===37&&T+2<c){const P=n.charCodeAt(T+1),N=n.charCodeAt(T+2);$e(P)&&$e(N)&&(a-=2,T+=2)}let p=0,y=c-1;const m=T=>T>=2&&n.charCodeAt(T-2)===37&&n.charCodeAt(T-1)===51&&(n.charCodeAt(T)===68||n.charCodeAt(T)===100);y>=0&&(n.charCodeAt(y)===61?(p++,y--):m(y)&&(p++,y-=3)),p===1&&y>=0&&(n.charCodeAt(y)===61||m(y))&&p++;const O=Math.floor(a/4)*3-(p||0);return O>0?O:0}let o=0;for(let a=0,c=n.length;a<c;a++){const p=n.charCodeAt(a);if(p===37&&Yn(n,a,c))o+=1,a+=2;else if(p<128)o+=1;else if(p<2048)o+=2;else if(p>=55296&&p<=56319&&a+1<c){const y=n.charCodeAt(a+1);y>=56320&&y<=57343?(o+=4,a++):o+=3}else o+=3}return o}const nt="1.18.0",Mt=64*1024,{isFunction:He}=l,Qn=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Jt=e=>{if(!l.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Kt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Zn=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},es=e=>{const t=l.global!==void 0&&l.global!==null?l.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=l.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,c=s?He(s):typeof fetch=="function",p=He(o),y=He(a);if(!c)return!1;const m=c&&He(r),g=c&&(typeof n=="function"?(b=>x=>b.encode(x))(new n):async b=>new Uint8Array(await new o(b).arrayBuffer())),O=p&&m&&Kt(()=>{let b=!1;const x=new o($.origin,{body:new r,method:"POST",get duplex(){return b=!0,"half"}}),f=x.headers.has("Content-Type");return x.body!=null&&x.body.cancel(),b&&!f}),T=y&&m&&Kt(()=>l.isReadableStream(new a("").body)),P={stream:T&&(b=>b.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(b=>{!P[b]&&(P[b]=(x,f)=>{let A=x&&x[b];if(A)return A.call(x);throw new E(`Response type '${b}' is not supported`,E.ERR_NOT_SUPPORT,f)})});const N=async b=>{if(b==null)return 0;if(l.isBlob(b))return b.size;if(l.isSpecCompliantForm(b))return(await new o($.origin,{method:"POST",body:b}).arrayBuffer()).byteLength;if(l.isArrayBufferView(b)||l.isArrayBuffer(b))return b.byteLength;if(l.isURLSearchParams(b)&&(b=b+""),l.isString(b))return(await g(b)).byteLength},R=async(b,x)=>{const f=l.toFiniteNumber(b.getContentLength());return f??N(x)};return async b=>{let{url:x,method:f,data:A,signal:v,cancelToken:L,timeout:K,onDownloadProgress:S,onUploadProgress:h,responseType:F,headers:X,withCredentials:Z="same-origin",fetchOptions:ce,maxContentLength:W,maxBodyLength:ee}=Ht(b);const re=l.isNumber(W)&&W>-1,ie=l.isNumber(ee)&&ee>-1,ye=k=>l.hasOwnProp(b,k)?b[k]:void 0;let ue=s||fetch;F=F?(F+"").toLowerCase():"text";let G=Kn([v,L&&L.toAbortSignal()],K),i=null;const w=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let _,C=null;const ne=()=>new E("Request body larger than maxBodyLength limit",E.ERR_BAD_REQUEST,b,i);try{let k;const j=ye("auth");if(j){const I=l.getSafeProp(j,"username")||"",V=l.getSafeProp(j,"password")||"";k={username:I,password:V}}if(Zn(x)){const I=new URL(x,$.origin);if(!k&&(I.username||I.password)){const V=Jt(I.username),de=Jt(I.password);k={username:V,password:de}}(I.username||I.password)&&(I.username="",I.password="",x=I.href)}if(k&&(X.delete("authorization"),X.set("Authorization","Basic "+btoa(Qn((k.username||"")+":"+(k.password||""))))),re&&typeof x=="string"&&x.startsWith("data:")&&Vn(x)>W)throw new E("maxContentLength size of "+W+" exceeded",E.ERR_BAD_RESPONSE,b,i);if(ie&&f!=="get"&&f!=="head"){const I=await N(A);if(typeof I=="number"&&isFinite(I)&&(_=I,I>ee))throw ne()}const z=ie&&(l.isReadableStream(A)||l.isStream(A)),oe=(I,V,de)=>qt(I,Mt,be=>{if(ie&&be>ee)throw C=ne();V&&V(be)},de);if(O&&f!=="get"&&f!=="head"&&(h||z)){if(_=_??await R(X,A),_!==0||z){let I=new o(x,{method:"POST",body:A,duplex:"half"}),V;if(l.isFormData(A)&&(V=I.headers.get("content-type"))&&X.setContentType(V),I.body){const[de,be]=h&&Ft(_,ze(Ut(h)))||[];A=oe(I.body,de,be)}}}else if(z&&!p&&m&&f!=="get"&&f!=="head")A=oe(A);else if(z&&p&&!O&&f!=="get"&&f!=="head")throw new E("Stream request bodies are not supported by the current fetch implementation",E.ERR_NOT_SUPPORT,b,i);l.isString(Z)||(Z=Z?"include":"omit");const Ie=p&&"credentials"in o.prototype;if(l.isFormData(A)){const I=X.getContentType();I&&/^multipart\/form-data/i.test(I)&&!/boundary=/i.test(I)&&X.delete("content-type")}X.set("User-Agent","axios/"+nt,!1);const ar={...ce,signal:G,method:f.toUpperCase(),headers:Tt(X.normalize()),body:A,duplex:"half",credentials:Ie?Z:void 0};i=p&&new o(x,ar);let ae=await(p?ue(i,ce):ue(x,ar));const lr=H.from(ae.headers);if(re){const I=l.toFiniteNumber(lr.getContentLength());if(I!=null&&I>W)throw new E("maxContentLength size of "+W+" exceeded",E.ERR_BAD_RESPONSE,b,i)}const ct=T&&(F==="stream"||F==="response");if(T&&ae.body&&(S||re||ct&&w)){const I={};["status","statusText","headers"].forEach(ke=>{I[ke]=ae[ke]});const V=l.toFiniteNumber(lr.getContentLength()),[de,be]=S&&Ft(V,ze(Ut(S),!0))||[];let cr=0;const _s=ke=>{if(re&&(cr=ke,cr>W))throw new E("maxContentLength size of "+W+" exceeded",E.ERR_BAD_RESPONSE,b,i);de&&de(ke)};ae=new a(qt(ae.body,Mt,_s,()=>{be&&be(),w&&w()}),I)}F=F||"text";let le=await P[l.findKey(P,F)||"text"](ae,b);if(re&&!T&&!ct){let I;if(le!=null&&(typeof le.byteLength=="number"?I=le.byteLength:typeof le.size=="number"?I=le.size:typeof le=="string"&&(I=typeof n=="function"?new n().encode(le).byteLength:le.length)),typeof I=="number"&&I>W)throw new E("maxContentLength size of "+W+" exceeded",E.ERR_BAD_RESPONSE,b,i)}return!ct&&w&&w(),await new Promise((I,V)=>{Lt(I,V,{data:le,headers:H.from(ae.headers),status:ae.status,statusText:ae.statusText,config:b,request:i})})}catch(k){if(w&&w(),G&&G.aborted&&G.reason instanceof E){const j=G.reason;throw j.config=b,i&&(j.request=i),k!==j&&(j.cause=k),j}throw C?(i&&!C.request&&(C.request=i),C):k instanceof E?(i&&!k.request&&(k.request=i),k):k&&k.name==="TypeError"&&/Load failed|fetch/i.test(k.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,b,i,k&&k.response),{cause:k.cause||k}):E.from(k,k&&k.code,b,i,k&&k.response)}}},ts=new Map,Xt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let a=o.length,c=a,p,y,m=ts;for(;c--;)p=o[c],y=m.get(p),y===void 0&&m.set(p,y=c?new Map:es(t)),m=y;return y};Xt();const st={http:xn,xhr:Jn,fetch:{get:Xt}};l.forEach(st,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Wt=e=>`- ${e}`,rs=e=>l.isFunction(e)||e===null||e===!1;function ns(e,t){e=l.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let a=0;a<r;a++){n=e[a];let c;if(s=n,!rs(n)&&(s=st[(c=String(n)).toLowerCase()],s===void 0))throw new E(`Unknown adapter '${c}'`);if(s&&(l.isFunction(s)||(s=s.get(t))))break;o[c||"#"+a]=s}if(!s){const a=Object.entries(o).map(([p,y])=>`adapter ${p} `+(y===!1?"is not supported by the environment":"is not available in the build"));let c=r?a.length>1?`since :
|
|
25
|
-
`+a.map(Wt).join(`
|
|
26
|
-
`):" "+Wt(a[0]):"as no adapter specified";throw new E("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const Gt={getAdapter:ns,adapters:st};function ot(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Pe(null,e)}function Yt(e){return ot(e),e.headers=H.from(e.headers),e.data=rt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Gt.getAdapter(e.adapter||Ce.adapter,e)(e).then(function(n){ot(e),e.response=n;try{n.data=rt.call(e,e.transformResponse,n)}finally{delete e.response}return n.headers=H.from(n.headers),n},function(n){if(!Dt(n)&&(ot(e),n&&n.response)){e.response=n.response;try{n.response.data=rt.call(e,e.transformResponse,n.response)}finally{delete e.response}n.response.headers=H.from(n.response.headers)}return Promise.reject(n)})}const qe={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qe[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Vt={};qe.transitional=function(t,r,n){function s(o,a){return"[Axios v"+nt+"] Transitional option '"+o+"'"+a+(n?". "+n:"")}return(o,a,c)=>{if(t===!1)throw new E(s(a," has been removed"+(r?" in "+r:"")),E.ERR_DEPRECATED);return r&&!Vt[a]&&(Vt[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(o,a,c):!0}},qe.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function ss(e,t,r){if(typeof e!="object")throw new E("options must be an object",E.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const c=e[o],p=c===void 0||a(c,o,e);if(p!==!0)throw new E("option "+o+" must be "+p,E.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new E("Unknown option "+o,E.ERR_BAD_OPTION)}}const Me={assertOptions:ss,validators:qe},q=Me.validators;let me=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Nt,response:new Nt}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=(()=>{if(!s.stack)return"";const a=s.stack.indexOf(`
|
|
27
|
-
`);return a===-1?"":s.stack.slice(a+1)})();try{if(!n.stack)n.stack=o;else if(o){const a=o.indexOf(`
|
|
28
|
-
`),c=a===-1?-1:o.indexOf(`
|
|
29
|
-
`,a+1),p=c===-1?"":o.slice(c+1);String(n.stack).endsWith(p)||(n.stack+=`
|
|
30
|
-
`+o)}}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=he(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:o}=r;n!==void 0&&Me.assertOptions(n,{silentJSONParsing:q.transitional(q.boolean),forcedJSONParsing:q.transitional(q.boolean),clarifyTimeoutError:q.transitional(q.boolean),legacyInterceptorReqResOrdering:q.transitional(q.boolean),advertiseZstdAcceptEncoding:q.transitional(q.boolean),validateStatusUndefinedResolves:q.transitional(q.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Me.assertOptions(s,{encode:q.function,serialize:q.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Me.assertOptions(r,{baseUrl:q.spelling("baseURL"),withXsrfToken:q.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=o&&l.merge(o.common,o[r.method]);o&&l.forEach(["delete","get","head","post","put","patch","query","common"],P=>{delete o[P]}),r.headers=H.concat(a,o);const c=[];let p=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen=="function"&&N.runWhen(r)===!1)return;p=p&&N.synchronous;const R=r.transitional||Ze;R&&R.legacyInterceptorReqResOrdering?c.unshift(N.fulfilled,N.rejected):c.push(N.fulfilled,N.rejected)});const y=[];this.interceptors.response.forEach(function(N){y.push(N.fulfilled,N.rejected)});let m,g=0,O;if(!p){const P=[Yt.bind(this),void 0];for(P.unshift(...c),P.push(...y),O=P.length,m=Promise.resolve(r);g<O;)m=m.then(P[g++],P[g++]);return m}O=c.length;let T=r;for(;g<O;){const P=c[g++],N=c[g++];try{T=P(T)}catch(R){N.call(this,R);break}}try{m=Yt.call(this,T)}catch(P){return Promise.reject(P)}for(g=0,O=y.length;g<O;)m=m.then(y[g++],y[g++]);return m}getUri(t){t=he(this.defaults,t);const r=zt(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Pt(r,t.params,t.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(t){me.prototype[t]=function(r,n){return this.request(he(n||{},{method:t,url:r,data:n&&l.hasOwnProp(n,"data")?n.data:void 0}))}}),l.forEach(["post","put","patch","query"],function(t){function r(n){return function(o,a,c){return this.request(he(c||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:o,data:a}))}}me.prototype[t]=r(),t!=="query"&&(me.prototype[t+"Form"]=r(!0))});let os=class dr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(o){r=o});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(c=>{n.subscribe(c),o=c}).then(s);return a.cancel=function(){n.unsubscribe(o)},a},t(function(o,a,c){n.reason||(n.reason=new Pe(o,a,c),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new dr(function(s){t=s}),cancel:t}}};function is(e){return function(r){return e.apply(null,r)}}function as(e){return l.isObject(e)&&e.isAxiosError===!0}const it={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(it).forEach(([e,t])=>{it[t]=e});function Qt(e){const t=new me(e),r=pt(me.prototype.request,t);return l.extend(r,me.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return Qt(he(e,s))},r}const U=Qt(Ce);U.Axios=me,U.CanceledError=Pe,U.CancelToken=os,U.isCancel=Dt,U.VERSION=nt,U.toFormData=Be,U.AxiosError=E,U.Cancel=U.CanceledError,U.all=function(t){return Promise.all(t)},U.spread=is,U.isAxiosError=as,U.mergeConfig=he,U.AxiosHeaders=H,U.formToJSON=e=>vt(l.isHTMLForm(e)?new FormData(e):e),U.getAdapter=Gt.getAdapter,U.HttpStatusCode=it,U.default=U;const{Axios:vs,AxiosError:Ds,CanceledError:Ls,isCancel:Fs,CancelToken:Us,VERSION:Bs,all:zs,Cancel:$s,isAxiosError:Hs,spread:qs,toFormData:Ms,AxiosHeaders:Js,HttpStatusCode:Ks,formToJSON:Xs,getAdapter:Ws,mergeConfig:Gs,create:Ys}=U;var ls=Object.defineProperty,cs=(e,t,r)=>t in e?ls(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,us=(e,t,r)=>cs(e,t+"",r),at={exports:{}},Ne={};/**
|
|
22
|
+
<%s key={someKey} {...props} />`,A,_,U,_),V[_+A]=!0)}if(_=null,j!==void 0&&(r(j),_=""+j),a(E)&&(r(E.key),_=""+E.key),"key"in E){j={};for(var se in E)se!=="key"&&(j[se]=E[se])}else j=E;return _&&f(j,typeof i=="function"?i.displayName||i.name||"Unknown":i),g(i,_,j,s(),te,P)}function x(i){O(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===h&&(i._payload.status==="fulfilled"?O(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function O(i){return typeof i=="object"&&i!==null&&i.$$typeof===N}var R=I,N=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),v=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),G=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,W=Array.isArray,Z=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(i){return i()}};var ee,oe={},be=R.react_stack_bottom_frame.bind(R,o)(),ce=Z(n(o)),V={};Te.Fragment=B,Te.jsx=function(i,E,j){var A=1e4>G.recentlyCreatedOwnerStacks++;return b(i,E,j,!1,A?Error("react-stack-top-frame"):be,A?Z(n(i)):ce)},Te.jsxs=function(i,E,j){var A=1e4>G.recentlyCreatedOwnerStacks++;return b(i,E,j,!0,A?Error("react-stack-top-frame"):be,A?Z(n(i)):ce)}})()),Te}var dt;function hr(){return dt||(dt=1,process.env.NODE_ENV==="production"?Ie.exports=dr():Ie.exports=pr()),Ie.exports}var u=hr(),mr=Object.defineProperty,br=(e,t,r)=>t in e?mr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,yr=(e,t,r)=>br(e,t+"",r),We={exports:{}},Oe={};/**
|
|
31
23
|
* @license React
|
|
32
24
|
* react-jsx-runtime.production.js
|
|
33
25
|
*
|
|
@@ -35,7 +27,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
35
27
|
*
|
|
36
28
|
* This source code is licensed under the MIT license found in the
|
|
37
29
|
* LICENSE file in the root directory of this source tree.
|
|
38
|
-
*/var
|
|
30
|
+
*/var pt;function gr(){if(pt)return Oe;pt=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,s,o){var a=null;if(o!==void 0&&(a=""+o),s.key!==void 0&&(a=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:n,key:a,ref:s!==void 0?s:null,props:o}}return Oe.Fragment=t,Oe.jsx=r,Oe.jsxs=r,Oe}var Le={};/**
|
|
39
31
|
* @license React
|
|
40
32
|
* react-jsx-runtime.development.js
|
|
41
33
|
*
|
|
@@ -43,9 +35,17 @@ React keys must be passed directly to JSX without using spread:
|
|
|
43
35
|
*
|
|
44
36
|
* This source code is licensed under the MIT license found in the
|
|
45
37
|
* LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/var
|
|
38
|
+
*/var ht;function Sr(){return ht||(ht=1,process.env.NODE_ENV!=="production"&&(function(){function e(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===J?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case B:return"Fragment";case m:return"Profiler";case y:return"StrictMode";case ne:return"Suspense";case me:return"SuspenseList";case L:return"Activity"}if(typeof i=="object")switch(typeof i.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),i.$$typeof){case T:return"Portal";case v:return i.displayName||"Context";case p:return(i._context.displayName||"Context")+".Consumer";case k:var E=i.render;return i=i.displayName,i||(i=E.displayName||E.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case S:return E=i.displayName||null,E!==null?E:e(i.type)||"Memo";case h:E=i._payload,i=i._init;try{return e(i(E))}catch{}}return null}function t(i){return""+i}function r(i){try{t(i);var E=!1}catch{E=!0}if(E){E=console;var j=E.error,A=typeof Symbol=="function"&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||"Object";return j.call(E,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",A),t(i)}}function n(i){if(i===B)return"<>";if(typeof i=="object"&&i!==null&&i.$$typeof===h)return"<...>";try{var E=e(i);return E?"<"+E+">":"<...>"}catch{return"<...>"}}function s(){var i=G.A;return i===null?null:i.getOwner()}function o(){return Error("react-stack-top-frame")}function a(i){if(le.call(i,"key")){var E=Object.getOwnPropertyDescriptor(i,"key").get;if(E&&E.isReactWarning)return!1}return i.key!==void 0}function f(i,E){function j(){ee||(ee=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",E))}j.isReactWarning=!0,Object.defineProperty(i,"key",{get:j,configurable:!0})}function d(){var i=e(this.type);return oe[i]||(oe[i]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),i=this.props.ref,i!==void 0?i:null}function g(i,E,j,A,te,P){var _=j.ref;return i={$$typeof:N,type:i,key:E,props:j,_owner:A},(_!==void 0?_:null)!==null?Object.defineProperty(i,"ref",{enumerable:!1,get:d}):Object.defineProperty(i,"ref",{enumerable:!1,value:null}),i._store={},Object.defineProperty(i._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(i,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(i,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:te}),Object.defineProperty(i,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(i.props),Object.freeze(i)),i}function b(i,E,j,A,te,P){var _=E.children;if(_!==void 0)if(A)if(W(_)){for(A=0;A<_.length;A++)x(_[A]);Object.freeze&&Object.freeze(_)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(_);if(le.call(E,"key")){_=e(i);var U=Object.keys(E).filter(function(Pe){return Pe!=="key"});A=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",V[_+A]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
47
39
|
let props = %s;
|
|
48
40
|
<%s {...props} />
|
|
49
41
|
React keys must be passed directly to JSX without using spread:
|
|
50
42
|
let props = %s;
|
|
51
|
-
<%s key={someKey} {...props} />`,C,j,z,j),G[j+C]=!0)}if(j=null,_!==void 0&&(r(_),j=""+_),a(w)&&(r(w.key),j=""+w.key),"key"in w){_={};for(var oe in w)oe!=="key"&&(_[oe]=w[oe])}else _=w;return j&&c(_,typeof i=="function"?i.displayName||i.name||"Unknown":i),y(i,j,_,s(),ne,k)}function g(i){O(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===h&&(i._payload.status==="fulfilled"?O(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function O(i){return typeof i=="object"&&i!==null&&i.$$typeof===P}var T=D,P=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),A=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),X=Symbol.for("react.client.reference"),Z=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Object.prototype.hasOwnProperty,W=Array.isArray,ee=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(i){return i()}};var re,ie={},ye=T.react_stack_bottom_frame.bind(T,o)(),ue=ee(n(o)),G={};Je.Fragment=R,Je.jsx=function(i,w,_){var C=1e4>Z.recentlyCreatedOwnerStacks++;return m(i,w,_,!1,C?Error("react-stack-top-frame"):ye,C?ee(n(i)):ue)},Je.jsxs=function(i,w,_){var C=1e4>Z.recentlyCreatedOwnerStacks++;return m(i,w,_,!0,C?Error("react-stack-top-frame"):ye,C?ee(n(i)):ue)}})()),Je}var tr;function ps(){return tr||(tr=1,process.env.NODE_ENV==="production"?at.exports=ds():at.exports=fs()),at.exports}var Q=ps();const{Header:Vs,Sider:Qs,Content:Zs}=u.Layout;function hs(e){if(e&&typeof e=="object"&&"code"in e&&"data"in e){const t=e;return t.code!==200?Promise.reject(new Error(t.message||"请求失败")):t.data}return e}function ms(e,t={}){const{tokenKey:r="token",userInfoKey:n="userInfo",unauthorizedRedirect:s="/login"}=t;e.interceptors.request.use(o=>{const a=localStorage.getItem(r);return a&&(o.headers.Authorization=`Bearer ${a}`),o}),e.interceptors.response.use(o=>hs(o.data),o=>{var a,c,p;return((a=o.response)==null?void 0:a.status)===401?(localStorage.removeItem(r),localStorage.removeItem(n),window.location.href=s):((c=o.response)==null?void 0:c.status)===403?console.error("没有权限访问该资源"):((p=o.response)==null?void 0:p.status)===500&&console.error("服务器内部错误"),Promise.reject(o)})}function rr(e={}){const t=U.create({baseURL:e.baseURL??"/api",timeout:e.timeout??1e4});return ms(t,{tokenKey:e.tokenKey,userInfoKey:e.userInfoKey,unauthorizedRedirect:e.unauthorizedRedirect}),t}const M=rr();rr();class eo extends D.Component{constructor(t){super(t),us(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null}),typeof this.props.onReset=="function"&&this.props.onReset()}),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[ErrorBoundary] caught error:",t,r),this.setState({errorInfo:r})}render(){if(!this.state.hasError)return this.props.children;const{fallbackTitle:t="组件加载失败",fallbackDescription:r,showReload:n=!0}=this.props,s=this.state.error&&(this.state.error.message||String(this.state.error))||"未知错误";return Q.jsxs("div",{style:{padding:24,background:"#fff2f0",border:"1px solid #ffccc7",borderRadius:8,minHeight:200},children:[Q.jsx(u.Alert,{type:"error",showIcon:!0,icon:Q.jsx(B.BugOutlined,{}),message:t,description:Q.jsxs("div",{children:[Q.jsx("div",{style:{marginBottom:8},children:r||"当前组件发生了异常,已被错误边界捕获。其他功能仍可正常使用。"}),Q.jsx("div",{style:{fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:12,color:"#cf1322",background:"#fff",padding:8,borderRadius:4,border:"1px solid #ffccc7",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:s})]})}),n&&Q.jsx(u.Space,{style:{marginTop:16},children:Q.jsx(u.Button,{icon:Q.jsx(B.ReloadOutlined,{}),onClick:this.handleReset,children:"重试"})})]})}}const{Title:to,Text:ro,Paragraph:no}=u.Typography;let ys="/api";function nr(){return U.create({baseURL:ys,timeout:15e3})}const bs=nr();nr(),bs.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const{Header:so,Sider:oo,Content:io}=u.Layout,{Text:ao}=u.Typography,{Title:lo,Text:co}=u.Typography,{Option:uo}=u.Select,{TextArea:fo}=u.Input,gs=[{type:"STRING",label:"字符串",icon:Q.jsx(B.FileTextOutlined,{}),color:"#1677ff",desc:"短文本 (默认 VARCHAR 255)"},{type:"TEXT",label:"长文本",icon:Q.jsx(B.FileTextOutlined,{}),color:"#13c2c2",desc:"TEXT 类型, 无长度限制"},{type:"INT",label:"整数",icon:"#",color:"#722ed1",desc:"INT 整数"},{type:"LONG",label:"长整数",icon:"#",color:"#722ed1",desc:"BIGINT 长整数"},{type:"DECIMAL",label:"小数",icon:"0.00",color:"#eb2f96",desc:"DECIMAL 精确小数"},{type:"BOOLEAN",label:"布尔",icon:Q.jsx(B.CheckCircleOutlined,{}),color:"#52c41a",desc:"TINYINT(1) 是/否"},{type:"DATE",label:"日期",icon:"📅",color:"#fa8c16",desc:"DATE yyyy-MM-dd"},{type:"DATETIME",label:"日期时间",icon:"🕐",color:"#fa8c16",desc:"DATETIME yyyy-MM-dd HH:mm:ss"},{type:"JSON",label:"JSON",icon:"{}",color:"#2f54eb",desc:"JSON 字符串"},{type:"REF",label:"引用",icon:"🔗",color:"#8c8c8c",desc:"外键引用 BIGINT"}];Object.fromEntries(gs.map(e=>[e.type,e]));const{Option:po}=u.Select;u.Input.TextArea,u.Input.TextArea;const{Text:ho,Paragraph:mo}=u.Typography,{TextArea:yo}=u.Input,{TextArea:bo}=u.Input,{Text:go,Paragraph:xo}=u.Typography,{TextArea:So}=u.Input,{Text:wo,Paragraph:Eo}=u.Typography,{Text:Ro}=u.Typography,{Text:To}=u.Typography,{TextArea:Oo}=u.Input,{Text:Ao,Paragraph:_o}=u.Typography,{Text:jo}=u.Typography,{Text:Co}=u.Typography,{Text:Po}=u.Typography,{Text:No}=u.Typography;common;const xs={STANDARD_JSON:{label:"标准 JSON",color:"blue"},RSS_XML:{label:"RSS 2.0",color:"orange"},ATOM_XML:{label:"Atom 1.0",color:"gold"},CUSTOM_SCRIPT:{label:"自定义脚本",color:"purple"},INTERNAL_BEAN:{label:"内部 Bean",color:"cyan"}},Ss={PENDING_VERIFY:{color:"default",text:"待验证"},VERIFIED:{color:"green",text:"已验证"},INVALID_AUTH:{color:"red",text:"鉴权失败"},FATAL:{color:"red",text:"永久失败"},DISABLED:{color:"default",text:"已停用"}},sr={PENDING:{color:"default"},RUNNING:{color:"processing"},SUCCESS:{color:"green"},EMPTY:{color:"default"},FAILED:{color:"red"},FATAL:{color:"red"}};function or(){const e=se.useNavigate(),[t,r]=D.useState([]),[n,s]=D.useState(!1),[o,a]=D.useState(null),[c,p]=D.useState([]),[y,m]=D.useState({}),[g,O]=D.useState(null),[T,P]=D.useState([]),N=async()=>{s(!0);try{const S=await M.get("/subscribe/subscription/list");S&&S.success!==!1&&r(Array.isArray(S.data)?S.data:Array.isArray(S)?S:[])}catch(S){u.message.error("获取订阅列表失败: "+((S==null?void 0:S.message)||""))}finally{s(!1)}};D.useEffect(()=>{N()},[]);const R=S=>{u.Modal.confirm({title:"确认删除",icon:d.jsx(B.ExclamationCircleOutlined,{}),content:`确定要删除订阅 "${S.name}" 吗? 运行历史会保留.`,onOk:async()=>{try{const h=await M.delete(`/subscribe/subscription/${S.id}`);h&&h.success!==!1?(u.message.success("删除成功"),N()):u.message.error((h==null?void 0:h.message)||"删除失败")}catch(h){u.message.error("删除失败: "+((h==null?void 0:h.message)||""))}}})},b=async S=>{try{const h=await M.post(`/subscribe/subscription/${S}/enable`);h&&h.success!==!1?(u.message.success("已启用"),N()):u.message.error((h==null?void 0:h.message)||"启用失败")}catch(h){u.message.error("启用失败: "+((h==null?void 0:h.message)||""))}},x=async S=>{try{const h=await M.post(`/subscribe/subscription/${S}/disable`);h&&h.success!==!1?(u.message.success("已停用"),N()):u.message.error((h==null?void 0:h.message)||"停用失败")}catch(h){u.message.error("停用失败: "+((h==null?void 0:h.message)||""))}},f=async S=>{u.Modal.confirm({title:"手动触发",content:`将立即执行一次 "${S.name}" 的抽取, 同步返回 runId.`,onOk:async()=>{try{const h=await M.post(`/subscribe/subscription/${S.id}/trigger?triggerBy=ceo`);if(h&&(h.data!==void 0||h.success!==!1)){const F=h.data??h;u.message.success(`已触发, runId = ${F}`),v(S)}else u.message.error((h==null?void 0:h.message)||"触发失败")}catch(h){u.message.error("触发失败: "+((h==null?void 0:h.message)||""))}}})},A=async S=>{try{const h=await M.post(`/subscribe/subscription/${S.id}/dry-run`);a({sub:S,result:(h==null?void 0:h.data)??h})}catch(h){a({sub:S,result:{success:!1,errorMessage:(h==null?void 0:h.message)||"请求失败"}})}},v=async S=>{try{const h=await M.get(`/subscribe/run/list?subscriptionId=${S.id}&limit=20`),F=(h==null?void 0:h.data)??h??[];p(Array.isArray(F)?F:[]),O(null),m({}),P([]),a({sub:S,tab:"runs"})}catch{u.message.error("获取运行历史失败")}},L=async S=>{if(y[S]){O(S);return}try{const h=await M.get(`/subscribe/run/${S}/items?limit=200`),F=(h==null?void 0:h.data)??h??[];m(X=>({...X,[S]:Array.isArray(F)?F:[]})),O(S)}catch{u.message.error("获取抽取项失败")}},K=[{title:"ID",dataIndex:"id",width:70},{title:"名称",dataIndex:"name",render:(S,h)=>d.jsxs(u.Space,{orientation:"vertical",size:0,children:[d.jsx("span",{style:{fontWeight:500},children:S}),h.description&&d.jsx("span",{style:{color:"#999",fontSize:12},children:h.description})]})},{title:"数据源",dataIndex:"sourceType",width:90,render:S=>d.jsx(u.Tag,{children:S})},{title:"抽取器",dataIndex:"extractorType",width:140,render:S=>{const h=xs[S]||{label:S,color:"default"};return d.jsx(u.Tag,{color:h.color,children:h.label})}},{title:"Cron",dataIndex:"cronExpr",width:150,render:S=>d.jsx("code",{style:{fontSize:12},children:S})},{title:"状态",dataIndex:"status",width:110,render:S=>{const h=Ss[S]||{color:"default",text:S};return d.jsx(u.Tag,{color:h.color,children:h.text})}},{title:"启用",dataIndex:"enabled",width:80,render:(S,h)=>S?d.jsx(u.Tag,{color:"green",children:"是"}):d.jsx(u.Tag,{children:"否"})},{title:"最近 run",dataIndex:"lastStatus",width:110,render:(S,h)=>{var F;return S?d.jsx(u.Tooltip,{title:h.lastError||"",children:d.jsx(u.Tag,{color:((F=sr[S])==null?void 0:F.color)||"default",children:S})}):d.jsx("span",{style:{color:"#ccc"},children:"-"})}},{title:"累计",width:130,render:(S,h)=>d.jsxs(u.Space,{size:4,children:[d.jsxs(u.Tag,{color:"green",children:["✓ ",h.successCountTotal||0]}),d.jsxs(u.Tag,{color:"red",children:["✗ ",h.failCountTotal||0]})]})},{title:"操作",width:280,fixed:"right",render:(S,h)=>d.jsxs(u.Space,{size:4,wrap:!0,children:[d.jsx(u.Button,{type:"link",size:"small",icon:d.jsx(B.EditOutlined,{}),onClick:()=>e(`/subscribe/edit/${h.id}`),children:"编辑"}),d.jsx(u.Button,{type:"link",size:"small",icon:d.jsx(B.ThunderboltOutlined,{}),onClick:()=>A(h),children:"试运行"}),d.jsx(u.Button,{type:"link",size:"small",icon:d.jsx(B.PlayCircleOutlined,{}),onClick:()=>f(h),children:"触发"}),d.jsx(u.Button,{type:"link",size:"small",onClick:()=>v(h),children:"历史"}),h.enabled?d.jsx(u.Button,{type:"link",size:"small",icon:d.jsx(B.PauseCircleOutlined,{}),onClick:()=>x(h.id),children:"停用"}):d.jsx(u.Button,{type:"link",size:"small",icon:d.jsx(B.CheckCircleOutlined,{}),onClick:()=>b(h.id),children:"启用"}),d.jsx(u.Popconfirm,{title:"确认删除?",onConfirm:()=>R(h),okText:"删除",cancelText:"取消",children:d.jsx(u.Button,{type:"link",size:"small",danger:!0,icon:d.jsx(B.DeleteOutlined,{}),children:"删除"})})]})}];return d.jsxs("div",{style:{padding:24},children:[d.jsxs(u.Card,{title:d.jsxs(u.Space,{children:[d.jsx(B.ApiOutlined,{}),"订阅中心 - 数据源订阅"]}),extra:d.jsxs(u.Space,{children:[d.jsx(u.Button,{icon:d.jsx(B.ReloadOutlined,{}),onClick:N,children:"刷新"}),d.jsx(u.Button,{type:"primary",icon:d.jsx(B.PlusOutlined,{}),onClick:()=>e("/subscribe/new"),children:"新建订阅"})]}),children:[d.jsx(u.Alert,{type:"info",showIcon:!0,style:{marginBottom:16},message:"订阅中心负责把三方 / 内部 / RSS 等数据源按 Cron 定时抽取, 归一化后落到本地, 供 CEO 立项和 Agent 协作使用."}),d.jsx(u.Table,{rowKey:"id",columns:K,dataSource:t,loading:n,scroll:{x:1400},size:"middle",pagination:{pageSize:20,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`}})]}),d.jsx(u.Drawer,{title:o!=null&&o.sub?`试运行 - ${o.sub.name}`:"运行历史",open:!!o,onClose:()=>a(null),width:900,children:(o==null?void 0:o.tab)==="runs"?d.jsx(u.Tabs,{activeKey:g?"items":"list",onChange:S=>S==="list"&&O(null),items:[{key:"list",label:`运行列表 (${c.length})`,children:d.jsx(u.Table,{rowKey:"id",size:"small",dataSource:c,pagination:!1,onRow:S=>({onClick:()=>L(S.id)}),columns:[{title:"runId",dataIndex:"id",width:70},{title:"计划",dataIndex:"scheduledAt",width:160,render:S=>S?new Date(S).toLocaleString():"-"},{title:"耗时(ms)",dataIndex:"durationMs",width:90},{title:"状态",dataIndex:"status",width:90,render:S=>{var h;return d.jsx(u.Tag,{color:(h=sr[S])==null?void 0:h.color,children:S})}},{title:"拉取/成功/重复/死信",width:200,render:(S,h)=>`${h.fetchedCount} / ${h.successCount} / ${h.duplicateCount||0} / ${h.deadLetterCount}`},{title:"错误",dataIndex:"errorMessage",render:S=>S?d.jsx("span",{style:{color:"#cf1322",fontSize:12},children:S}):"-"}]})},{key:"items",label:g?`run#${g} 抽取项`:"抽取项",disabled:!g,children:d.jsxs(u.Space,{orientation:"vertical",style:{width:"100%"},children:[d.jsxs(u.Space,{children:[d.jsxs(u.Tag,{color:"blue",children:["已选 ",T.length," 条"]}),d.jsxs(u.Button,{size:"small",type:"primary",icon:d.jsx(B.ProjectOutlined,{}),disabled:T.length===0,onClick:()=>{const S=T.join(",");e(`/project/new?subscriptionId=${o.sub.id}&itemIds=${S}`)},children:["用所选 ",T.length," 条立项"]})]}),d.jsx(u.Table,{rowKey:"id",size:"small",dataSource:y[g]||[],pagination:{pageSize:20},rowSelection:{selectedRowKeys:T,onChange:P},columns:[{title:"id",dataIndex:"dedupKey",width:180,ellipsis:!0},{title:"title",dataIndex:"normalized",render:S=>{try{return JSON.parse(S).title||"(无标题)"}catch{return S}}},{title:"link",dataIndex:"normalized",render:S=>{try{const h=JSON.parse(S);return h.link?d.jsx("a",{href:h.link,target:"_blank",children:"↗"}):"-"}catch{return"-"}}},{title:"状态",dataIndex:"status",width:110,render:S=>d.jsx(u.Tag,{children:S})}]})]})}]}):d.jsx(ws,{result:o==null?void 0:o.result})})]})}function ws({result:e}){return e?e.success?d.jsxs(u.Space,{orientation:"vertical",style:{width:"100%"},size:"middle",children:[d.jsx(u.Card,{size:"small",title:"调用结果",children:d.jsxs(u.Space,{size:"large",wrap:!0,children:[d.jsxs("span",{children:[d.jsx("b",{children:"HTTP:"})," ",e.httpStatus||"-"]}),d.jsxs("span",{children:[d.jsx("b",{children:"耗时:"})," ",e.latencyMs,"ms"]}),d.jsxs("span",{children:[d.jsx("b",{children:"大小:"})," ",e.responseSize,"B"]}),d.jsxs("span",{children:[d.jsx("b",{children:"样本:"})," ",e.sampleCount," 条"]})]})}),e.firstItem&&d.jsx(u.Card,{size:"small",title:"第一条样本 (归一化后)",children:d.jsx("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(e.firstItem,null,2)})}),e.responsePreview&&d.jsx(u.Card,{size:"small",title:"响应预览 (前 4KB)",children:d.jsx("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,maxHeight:300,overflow:"auto",fontSize:12},children:e.responsePreview})}),e.fieldErrors&&e.fieldErrors.length>0&&d.jsx(u.Alert,{type:"warning",showIcon:!0,message:"字段问题",description:d.jsx("ul",{children:e.fieldErrors.map((t,r)=>d.jsx("li",{children:t},r))})})]}):d.jsx(u.Alert,{type:"error",showIcon:!0,message:"试运行失败",description:e.errorMessage||"未知错误"}):null}const Es=[{value:"STANDARD_JSON",label:"标准 JSON (按统一契约返回的 JSON)"},{value:"RSS_XML",label:"RSS 2.0 (XML feed)"},{value:"ATOM_XML",label:"Atom 1.0 (XML feed)"},{value:"CUSTOM_SCRIPT",label:"自定义脚本 (z-script 平台)"},{value:"INTERNAL_BEAN",label:"内部 Bean (我们自己的模块, 暂未启用)"}],Rs=[{value:"NONE",label:"无鉴权"},{value:"BEARER",label:"Bearer (Authorization: Bearer xxx)"},{value:"API_KEY",label:"API Key (Authorization: xxx)"},{value:"BASIC",label:"Basic (user:password base64)"}],Ts=[{label:"每 5 分钟",value:"0 */5 * * * ?"},{label:"每 15 分钟",value:"0 */15 * * * ?"},{label:"每小时",value:"0 0 * * * ?"},{label:"每 6 小时",value:"0 0 */6 * * ?"},{label:"每天 8 点",value:"0 0 8 * * ?"}];function lt(){const{id:e}=se.useParams(),t=se.useNavigate(),r=!!e,[n]=u.Form.useForm(),[s,o]=D.useState(!1),[a,c]=D.useState(!1),[p,y]=D.useState([]),[m,g]=D.useState([]),O=u.Form.useWatch("sourceType",n),T=u.Form.useWatch("extractorType",n),P=u.Form.useWatch("authType",n);D.useEffect(()=>{N(),R(),r&&b()},[e]);const N=async()=>{try{const f=await M.get("/secret/list"),A=(f==null?void 0:f.data)??f??[];y(Array.isArray(A)?A:[])}catch{}},R=async()=>{try{const f=await M.get("/script/list"),A=(f==null?void 0:f.data)??f??[];g(Array.isArray(A)?A.filter(v=>v.status===1):[])}catch{}},b=async()=>{o(!0);try{const f=await M.get(`/subscribe/subscription/${e}`),A=(f==null?void 0:f.data)??f;A&&n.setFieldsValue({...A,enabled:A.enabled===1||A.enabled===!0})}catch(f){u.message.error("加载订阅失败: "+((f==null?void 0:f.message)||""))}finally{o(!1)}},x=async()=>{try{const f=await n.validateFields();c(!0);const A={...f,enabled:f.enabled?1:0};let v;if(r?v=await M.put("/subscribe/subscription",A):v=await M.post("/subscribe/subscription",A),v&&v.success===!1){u.message.error(v.message||"保存失败");return}u.message.success(r?"已更新 (注意: 修改 cron / url / 抽取器后会自动重置为 PENDING_VERIFY)":"已创建, 已自动验证"),t("/subscribe/list")}catch(f){f!=null&&f.errorFields?u.message.warning("请检查表单"):u.message.error("保存失败: "+((f==null?void 0:f.message)||""))}finally{c(!1)}};return d.jsx("div",{style:{padding:24},children:d.jsx(u.Card,{title:d.jsxs(u.Space,{children:[d.jsx(u.Button,{type:"text",icon:d.jsx(B.ArrowLeftOutlined,{}),onClick:()=>t("/subscribe/list")}),d.jsx(B.ApiOutlined,{}),r?`编辑订阅 #${e}`:"新建订阅"]}),extra:d.jsxs(u.Space,{children:[d.jsx(u.Button,{onClick:()=>t("/subscribe/list"),children:"取消"}),d.jsx(u.Button,{type:"primary",icon:d.jsx(B.SaveOutlined,{}),loading:a,onClick:x,children:"保存 (自动验证)"})]}),children:d.jsx(u.Spin,{spinning:s,children:d.jsxs(u.Form,{form:n,layout:"vertical",initialValues:{sourceType:"HTTP",httpMethod:"GET",authType:"NONE",extractorType:"STANDARD_JSON",enabled:!0,minIntervalSec:60,maxItemsPerRun:1e3,timeoutMs:15e3},children:[d.jsxs(u.Card,{type:"inner",title:"基本信息",style:{marginBottom:16},children:[d.jsx(u.Form.Item,{label:"名称",name:"name",rules:[{required:!0,message:"请输入名称"}],children:d.jsx(u.Input,{placeholder:"例如: GitHub PR 通知"})}),d.jsx(u.Form.Item,{label:"说明",name:"description",children:d.jsx(u.Input.TextArea,{rows:2,placeholder:"(可选)"})})]}),d.jsxs(u.Card,{type:"inner",title:"数据源",style:{marginBottom:16},children:[d.jsx(u.Form.Item,{label:"数据源形态",name:"sourceType",rules:[{required:!0}],children:d.jsxs(u.Radio.Group,{children:[d.jsx(u.Radio.Button,{value:"HTTP",children:"HTTP / HTTPS"}),d.jsx(u.Radio.Button,{value:"INTERNAL",disabled:!0,children:"内部 Bean (TODO)"})]})}),O==="HTTP"&&d.jsxs(d.Fragment,{children:[d.jsx(u.Form.Item,{label:"目标 URL",name:"targetUrl",rules:[{required:!0,message:"请输入 URL"}],children:d.jsx(u.Input,{placeholder:"https://api.github.com/repos/.../pulls?state=open"})}),d.jsxs(u.Space,{size:"large",style:{width:"100%"},children:[d.jsx(u.Form.Item,{label:"HTTP 方法",name:"httpMethod",children:d.jsx(u.Select,{style:{width:120},options:[{value:"GET",label:"GET"},{value:"POST",label:"POST"},{value:"PUT",label:"PUT"}]})}),d.jsx(u.Form.Item,{label:"超时 (ms)",name:"timeoutMs",children:d.jsx(u.InputNumber,{min:1e3,max:12e4,step:1e3})})]}),d.jsx(u.Form.Item,{label:"自定义 HTTP 头 (JSON)",name:"httpHeaders",children:d.jsx(u.Input.TextArea,{rows:2,placeholder:'{"X-Trace-Id":"abc"}'})}),d.jsx(u.Form.Item,{label:"请求体 (POST/PUT)",name:"requestBody",children:d.jsx(u.Input.TextArea,{rows:3,placeholder:"(可选)"})})]})]}),d.jsxs(u.Card,{type:"inner",title:"鉴权 (从 z-mist 拉取 secret)",style:{marginBottom:16},children:[d.jsx(u.Form.Item,{label:"鉴权方式",name:"authType",children:d.jsx(u.Select,{options:Rs})}),P&&P!=="NONE"&&d.jsx(u.Form.Item,{label:"z-mist 凭据引用",name:"authSecretKey",extra:"从密钥中心 (z-mist) 选一个 secret; secret 的解密值会作为 secret 注入",children:d.jsx(u.Select,{showSearch:!0,allowClear:!0,placeholder:"选择 secret (key)",options:p.map(f=>({value:f.secretKey,label:`${f.secretKey}${f.secretName?" ("+f.secretName+")":""}`}))})})]}),d.jsxs(u.Card,{type:"inner",title:"抽取器",style:{marginBottom:16},children:[d.jsx(u.Form.Item,{label:"抽取器类型",name:"extractorType",rules:[{required:!0}],extra:"STANDARD_JSON/RSS_XML/ATOM_XML 直接解析; CUSTOM_SCRIPT 调 z-script 平台",children:d.jsx(u.Select,{options:Es})}),T==="CUSTOM_SCRIPT"&&d.jsx(u.Form.Item,{label:"z-script 脚本",name:"extractorScriptCode",rules:[{required:!0,message:"请选择脚本"}],extra:"在 智能中心 > 脚本中心 维护脚本. 脚本返回 { items: [...], nextCursor: '...' }",children:d.jsx(u.Select,{showSearch:!0,placeholder:"选择已启用的脚本",options:m.map(f=>({value:f.scriptCode,label:`${f.scriptCode} (${f.dslType})${f.scriptName?" - "+f.scriptName:""}`}))})})]}),d.jsxs(u.Card,{type:"inner",title:"调度",style:{marginBottom:16},children:[d.jsx(u.Form.Item,{label:"Cron 表达式",name:"cronExpr",rules:[{required:!0,message:"请输入 Cron"}],extra:"Quartz 兼容, 例如 0 */5 * * * ? = 每 5 分钟",children:d.jsx(u.Input,{addonAfter:d.jsx(u.Select,{style:{width:140},placeholder:"常用",options:Ts,onChange:f=>n.setFieldValue("cronExpr",f),value:null})})}),d.jsxs(u.Space,{size:"large",children:[d.jsx(u.Form.Item,{label:"启用",name:"enabled",valuePropName:"checked",children:d.jsxs(u.Radio.Group,{children:[d.jsx(u.Radio.Button,{value:!0,children:"启用"}),d.jsx(u.Radio.Button,{value:!1,children:"停用"})]})}),d.jsx(u.Form.Item,{label:"最小间隔 (秒)",name:"minIntervalSec",extra:"距上次 run 至少 N 秒",children:d.jsx(u.InputNumber,{min:0,max:3600})}),d.jsx(u.Form.Item,{label:"单次最多条数",name:"maxItemsPerRun",children:d.jsx(u.InputNumber,{min:1,max:1e4})})]})]}),d.jsx(u.Alert,{type:"success",showIcon:!0,message:"保存后会自动 dry-run: 真实 HTTP 一次, 把响应喂给抽取器, 失败时订阅进入 INVALID_AUTH 状态, 不会自动调度."})]})})})})}const Os={PENDING:"default",RUNNING:"processing",SUCCESS:"green",EMPTY:"default",FAILED:"red",FATAL:"red"};function ir(){const[e,t]=D.useState([]),[r,n]=D.useState(null),[s,o]=D.useState([]),[a,c]=D.useState([]),[p,y]=D.useState(null),[m,g]=D.useState(!1);D.useEffect(()=>{O()},[]),D.useEffect(()=>{r&&T(r)},[r]);const O=async()=>{try{const x=await M.get("/subscribe/subscription/list"),f=(x==null?void 0:x.data)??x??[];t(Array.isArray(f)?f:[]),Array.isArray(f)&&f.length>0&&n(f[0].id)}catch{u.message.error("加载订阅列表失败")}},T=async x=>{g(!0);try{const f=await M.get(`/subscribe/run/list?subscriptionId=${x}&limit=50`),A=(f==null?void 0:f.data)??f??[];o(Array.isArray(A)?A:[])}catch{u.message.error("加载运行历史失败")}finally{g(!1)}},P=async x=>{y(x);try{const f=await M.get(`/subscribe/run/${x}/items?limit=200`),A=(f==null?void 0:f.data)??f??[];c(Array.isArray(A)?A:[])}catch{u.message.error("加载抽取项失败")}},N=s.reduce((x,f)=>x+(f.successCount||0),0),R=s.reduce((x,f)=>x+(f.deadLetterCount||0),0),b=s.reduce((x,f)=>x+(f.duplicateCount||0),0);return d.jsx("div",{style:{padding:24},children:d.jsxs(u.Card,{title:d.jsxs(u.Space,{children:[d.jsx(B.ApiOutlined,{}),"订阅中心 - 运行历史"]}),extra:d.jsxs(u.Space,{children:[d.jsx(u.Select,{style:{width:280},placeholder:"选择订阅",value:r,onChange:n,options:e.map(x=>({value:x.id,label:x.name})),showSearch:!0,optionFilterProp:"label"}),d.jsxs("a",{onClick:()=>r&&T(r),children:[d.jsx(B.ReloadOutlined,{})," 刷新"]})]}),children:[d.jsxs(u.Row,{gutter:16,style:{marginBottom:16},children:[d.jsx(u.Col,{span:6,children:d.jsx(u.Card,{children:d.jsx(u.Statistic,{title:"run 总数",value:s.length})})}),d.jsx(u.Col,{span:6,children:d.jsx(u.Card,{children:d.jsx(u.Statistic,{title:"成功条数",value:N,valueStyle:{color:"#3f8600"}})})}),d.jsx(u.Col,{span:6,children:d.jsx(u.Card,{children:d.jsx(u.Statistic,{title:"死信条数",value:R,valueStyle:{color:"#cf1322"}})})}),d.jsx(u.Col,{span:6,children:d.jsx(u.Card,{children:d.jsx(u.Statistic,{title:"重复跳过",value:b})})})]}),d.jsxs(u.Row,{gutter:16,children:[d.jsx(u.Col,{span:12,children:d.jsx(u.Card,{type:"inner",title:`运行列表 (${s.length})`,size:"small",children:d.jsx(u.Table,{rowKey:"id",size:"small",loading:m,dataSource:s,pagination:{pageSize:10},onRow:x=>({onClick:()=>P(x.id),style:{cursor:"pointer",background:x.id===p?"#e6f7ff":""}}),columns:[{title:"ID",dataIndex:"id",width:60},{title:"计划",dataIndex:"scheduledAt",width:150,render:x=>x?new Date(x).toLocaleString():"-"},{title:"耗时",dataIndex:"durationMs",width:80},{title:"状态",dataIndex:"status",width:80,render:x=>d.jsx(u.Tag,{color:Os[x],children:x})},{title:"拉取/成功/死信",width:150,render:(x,f)=>`${f.fetchedCount} / ${f.successCount} / ${f.deadLetterCount}`}]})})}),d.jsx(u.Col,{span:12,children:d.jsx(u.Card,{type:"inner",title:p?`run#${p} 抽取项 (${a.length})`:"抽取项",size:"small",children:a.length===0?d.jsx(u.Empty,{description:p?"该 run 无抽取项":"点击左侧 run 查看抽取项"}):d.jsx(u.Table,{rowKey:"id",size:"small",dataSource:a,pagination:{pageSize:10},columns:[{title:"id",dataIndex:"dedupKey",width:160,ellipsis:!0},{title:"title",dataIndex:"normalized",render:x=>{try{return JSON.parse(x).title||"(无标题)"}catch{return x}}},{title:"link",dataIndex:"normalized",width:60,render:x=>{try{const f=JSON.parse(x);return f.link?d.jsx("a",{href:f.link,target:"_blank",children:"↗"}):"-"}catch{return"-"}}},{title:"状态",dataIndex:"status",width:100,render:x=>d.jsx(u.Tag,{children:x})}]})})})]})]})})}function As(){return d.jsxs(se.Routes,{children:[d.jsx(se.Route,{index:!0,element:d.jsx(se.Navigate,{to:"list",replace:!0})}),d.jsx(se.Route,{path:"list",element:d.jsx(or,{})}),d.jsx(se.Route,{path:"new",element:d.jsx(lt,{})}),d.jsx(se.Route,{path:"edit/:id",element:d.jsx(lt,{})}),d.jsx(se.Route,{path:"runs",element:d.jsx(ir,{})})]})}Y.RunHistory=ir,Y.SubscribeApp=As,Y.SubscriptionEdit=lt,Y.SubscriptionList=or,Object.defineProperty(Y,Symbol.toStringTag,{value:"Module"})}));
|
|
43
|
+
<%s key={someKey} {...props} />`,A,_,U,_),V[_+A]=!0)}if(_=null,j!==void 0&&(r(j),_=""+j),a(E)&&(r(E.key),_=""+E.key),"key"in E){j={};for(var se in E)se!=="key"&&(j[se]=E[se])}else j=E;return _&&f(j,typeof i=="function"?i.displayName||i.name||"Unknown":i),g(i,_,j,s(),te,P)}function x(i){O(i)?i._store&&(i._store.validated=1):typeof i=="object"&&i!==null&&i.$$typeof===h&&(i._payload.status==="fulfilled"?O(i._payload.value)&&i._payload.value._store&&(i._payload.value._store.validated=1):i._store&&(i._store.validated=1))}function O(i){return typeof i=="object"&&i!==null&&i.$$typeof===N}var R=I,N=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),B=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),v=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),me=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),J=Symbol.for("react.client.reference"),G=R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le=Object.prototype.hasOwnProperty,W=Array.isArray,Z=console.createTask?console.createTask:function(){return null};R={react_stack_bottom_frame:function(i){return i()}};var ee,oe={},be=R.react_stack_bottom_frame.bind(R,o)(),ce=Z(n(o)),V={};Le.Fragment=B,Le.jsx=function(i,E,j){var A=1e4>G.recentlyCreatedOwnerStacks++;return b(i,E,j,!1,A?Error("react-stack-top-frame"):be,A?Z(n(i)):ce)},Le.jsxs=function(i,E,j){var A=1e4>G.recentlyCreatedOwnerStacks++;return b(i,E,j,!0,A?Error("react-stack-top-frame"):be,A?Z(n(i)):ce)}})()),Le}var mt;function xr(){return mt||(mt=1,process.env.NODE_ENV==="production"?We.exports=gr():We.exports=Sr()),We.exports}var Y=xr();const{Header:Is,Sider:Ls,Content:Fs}=c.Layout;function bt(e,t){return function(){return e.apply(t,arguments)}}const{toString:Er}=Object.prototype,{getPrototypeOf:ge}=Object,{iterator:ve,toStringTag:yt}=Symbol,Fe=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),je=(e,t)=>{let r=e;const n=[];for(;r!=null&&r!==Object.prototype;){if(n.indexOf(r)!==-1)return!1;if(n.push(r),Fe(r,t))return!0;r=ge(r)}return!1},wr=(e,t)=>e!=null&&je(e,t)?e[t]:void 0,Ve=(e=>t=>{const r=Er.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=e=>(e=e.toLowerCase(),t=>Ve(t)===e),De=e=>t=>typeof t===e,{isArray:fe}=Array,Se=De("undefined");function xe(e){return e!==null&&!Se(e)&&e.constructor!==null&&!Se(e.constructor)&&H(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const gt=Q("ArrayBuffer");function Rr(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&>(e.buffer),t}const Tr=De("string"),H=De("function"),St=De("number"),Ee=e=>e!==null&&typeof e=="object",Or=e=>e===!0||e===!1,Be=e=>{if(!Ee(e))return!1;const t=ge(e);return(t===null||t===Object.prototype||ge(t)===null)&&!je(e,yt)&&!je(e,ve)},vr=e=>{if(!Ee(e)||xe(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},jr=Q("Date"),_r=Q("File"),Ar=e=>!!(e&&typeof e.uri<"u"),Cr=e=>e&&typeof e.getParts<"u",Nr=Q("Blob"),Pr=Q("FileList"),kr=e=>Ee(e)&&H(e.pipe);function Ir(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const xt=Ir(),Et=typeof xt.FormData<"u"?xt.FormData:void 0,Lr=e=>{if(!e)return!1;if(Et&&e instanceof Et)return!0;const t=ge(e);if(!t||t===Object.prototype||!H(e.append))return!1;const r=Ve(e);return r==="formdata"||r==="object"&&H(e.toString)&&e.toString()==="[object FormData]"},Fr=Q("URLSearchParams"),[Dr,Br,Ur,zr]=["ReadableStream","Request","Response","Headers"].map(Q),Mr=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _e(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),fe(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{if(xe(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;let f;for(n=0;n<a;n++)f=o[n],t.call(null,e[f],f,e)}}function wt(e,t){if(xe(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const de=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rt=e=>!Se(e)&&e!==de;function Xe(...e){const{caseless:t,skipUndefined:r}=Rt(this)&&this||{},n={},s=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const f=t&&typeof a=="string"&&wt(n,a)||a,d=Fe(n,f)?n[f]:void 0;Be(d)&&Be(o)?n[f]=Xe(d,o):Be(o)?n[f]=Xe({},o):fe(o)?n[f]=o.slice():(!r||!Se(o))&&(n[f]=o)};for(let o=0,a=e.length;o<a;o++){const f=e[o];if(!f||xe(f)||(_e(f,s),typeof f!="object"||fe(f)))continue;const d=Object.getOwnPropertySymbols(f);for(let g=0;g<d.length;g++){const b=d[g];Qr.call(f,b)&&s(f[b],b)}}return n}const $r=(e,t,r,{allOwnKeys:n}={})=>(_e(t,(s,o)=>{r&&H(s)?Object.defineProperty(e,o,{__proto__:null,value:bt(s,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),e),qr=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Hr=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),r&&Object.assign(e.prototype,r)},Jr=(e,t,r,n)=>{let s,o,a;const f={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)a=s[o],(!n||n(a,e,t))&&!f[a]&&(t[a]=e[a],f[a]=!0);e=r!==!1&&ge(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Wr=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Vr=e=>{if(!e)return null;if(fe(e))return e;let t=e.length;if(!St(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Xr=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ge(Uint8Array)),Kr=(e,t)=>{const r=(e&&e[ve]).call(e);let n;for(;(n=r.next())&&!n.done;){const s=n.value;t.call(e,s[0],s[1])}},Yr=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Gr=Q("HTMLFormElement"),Zr=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,r,n){return r.toUpperCase()+n}),{propertyIsEnumerable:Qr}=Object.prototype,en=Q("RegExp"),Tt=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};_e(r,(s,o)=>{let a;(a=t(s,o,e))!==!1&&(n[o]=a||s)}),Object.defineProperties(e,n)},tn=e=>{Tt(e,(t,r)=>{if(H(e)&&["arguments","caller","callee"].includes(r))return!1;const n=e[r];if(H(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},rn=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return fe(e)?n(e):n(String(e).split(t)),r},nn=()=>{},sn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function on(e){return!!(e&&H(e.append)&&e[yt]==="FormData"&&e[ve])}const an=e=>{const t=new WeakSet,r=n=>{if(Ee(n)){if(t.has(n))return;if(xe(n))return n;if(!("toJSON"in n)){t.add(n);const s=fe(n)?[]:{};return _e(n,(o,a)=>{const f=r(o);!Se(f)&&(s[a]=f)}),t.delete(n),s}}return n};return r(e)},ln=Q("AsyncFunction"),cn=e=>e&&(Ee(e)||H(e))&&H(e.then)&&H(e.catch),Ot=((e,t)=>e?setImmediate:t?((r,n)=>(de.addEventListener("message",({source:s,data:o})=>{s===de&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),de.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",H(de.postMessage)),un=typeof queueMicrotask<"u"?queueMicrotask.bind(de):typeof process<"u"&&process.nextTick||Ot,vt=e=>e!=null&&H(e[ve]),fn=e=>e!=null&&je(e,ve)&&vt(e),l={isArray:fe,isArrayBuffer:gt,isBuffer:xe,isFormData:Lr,isArrayBufferView:Rr,isString:Tr,isNumber:St,isBoolean:Or,isObject:Ee,isPlainObject:Be,isEmptyObject:vr,isReadableStream:Dr,isRequest:Br,isResponse:Ur,isHeaders:zr,isUndefined:Se,isDate:jr,isFile:_r,isReactNativeBlob:Ar,isReactNative:Cr,isBlob:Nr,isRegExp:en,isFunction:H,isStream:kr,isURLSearchParams:Fr,isTypedArray:Xr,isFileList:Pr,forEach:_e,merge:Xe,extend:$r,trim:Mr,stripBOM:qr,inherits:Hr,toFlatObject:Jr,kindOf:Ve,kindOfTest:Q,endsWith:Wr,toArray:Vr,forEachEntry:Kr,matchAll:Yr,isHTMLForm:Gr,hasOwnProperty:Fe,hasOwnProp:Fe,hasOwnInPrototypeChain:je,getSafeProp:wr,reduceDescriptors:Tt,freezeMethods:tn,toObjectSet:rn,toCamelCase:Zr,noop:nn,toFiniteNumber:sn,findKey:wt,global:de,isContextDefined:Rt,isSpecCompliantForm:on,toJSONObject:an,isAsyncFn:ln,isThenable:cn,setImmediate:Ot,asap:un,isIterable:vt,isSafeIterable:fn},dn=l.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pn=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
44
|
+
`).forEach(function(o){s=o.indexOf(":"),r=o.substring(0,s).trim().toLowerCase(),n=o.substring(s+1).trim(),!(!r||t[r]&&dn[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t};function hn(e){let t=0,r=e.length;for(;t<r;){const n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;r>t;){const n=e.charCodeAt(r-1);if(n!==9&&n!==32)break;r-=1}return t===0&&r===e.length?e:e.slice(t,r)}const mn=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),bn=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Ke(e,t){return l.isArray(e)?e.map(r=>Ke(r,t)):hn(String(e).replace(t,""))}const yn=e=>Ke(e,mn),gn=e=>Ke(e,bn);function jt(e){const t=Object.create(null);return l.forEach(e.toJSON(),(r,n)=>{t[n]=gn(r)}),t}const _t=Symbol("internals");function Ae(e){return e&&String(e).trim().toLowerCase()}function Ue(e){return e===!1||e==null?e:l.isArray(e)?e.map(Ue):yn(String(e))}function Sn(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const xn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ye(e,t,r,n,s){if(l.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!l.isString(t)){if(l.isString(n))return t.indexOf(n)!==-1;if(l.isRegExp(n))return n.test(t)}}function En(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function wn(e,t){const r=l.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{__proto__:null,value:function(s,o,a){return this[n].call(this,t,s,o,a)},configurable:!0})})}let M=class{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function s(a,f,d){const g=Ae(f);if(!g)return;const b=l.findKey(n,g);(!b||n[b]===void 0||d===!0||d===void 0&&n[b]!==!1)&&(n[b||f]=Ue(a))}const o=(a,f)=>l.forEach(a,(d,g)=>s(d,g,f));if(l.isPlainObject(e)||e instanceof this.constructor)o(e,t);else if(l.isString(e)&&(e=e.trim())&&!xn(e))o(pn(e),t);else if(l.isObject(e)&&l.isSafeIterable(e)){let a=Object.create(null),f,d;for(const g of e){if(!l.isArray(g))throw new TypeError("Object iterator must return a key-value pair");d=g[0],l.hasOwnProp(a,d)?(f=a[d],a[d]=l.isArray(f)?[...f,g[1]]:[f,g[1]]):a[d]=g[1]}o(a,t)}else e!=null&&s(t,e,r);return this}get(e,t){if(e=Ae(e),e){const r=l.findKey(this,e);if(r){const n=this[r];if(!t)return n;if(t===!0)return Sn(n);if(l.isFunction(t))return t.call(this,n,r);if(l.isRegExp(t))return t.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ae(e),e){const r=l.findKey(this,e);return!!(r&&this[r]!==void 0&&(!t||Ye(this,this[r],r,t)))}return!1}delete(e,t){const r=this;let n=!1;function s(o){if(o=Ae(o),o){const a=l.findKey(r,o);a&&(!t||Ye(r,r[a],a,t))&&(delete r[a],n=!0)}}return l.isArray(e)?e.forEach(s):s(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const s=t[r];(!e||Ye(this,this[s],s,e,!0))&&(delete this[s],n=!0)}return n}normalize(e){const t=this,r={};return l.forEach(this,(n,s)=>{const o=l.findKey(r,s);if(o){t[o]=Ue(n),delete t[s];return}const a=e?En(s):String(s).trim();a!==s&&delete t[s],t[a]=Ue(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return l.forEach(this,(r,n)=>{r!=null&&r!==!1&&(t[n]=e&&l.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join(`
|
|
45
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(n=>r.set(n)),r}static accessor(e){const t=(this[_t]=this[_t]={accessors:{}}).accessors,r=this.prototype;function n(s){const o=Ae(s);t[o]||(wn(r,s),t[o]=!0)}return l.isArray(e)?e.forEach(n):n(e),this}};M.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(M.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),l.freezeMethods(M);const Rn="[REDACTED ****]";function Tn(e){if(l.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(l.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function On(e,t){const r=new Set(t.map(o=>String(o).toLowerCase())),n=[],s=o=>{if(o===null||typeof o!="object"||l.isBuffer(o))return o;if(n.indexOf(o)!==-1)return;o instanceof M&&(o=o.toJSON()),n.push(o);let a;if(l.isArray(o))a=[],o.forEach((f,d)=>{const g=s(f);l.isUndefined(g)||(a[d]=g)});else{if(!l.isPlainObject(o)&&Tn(o))return n.pop(),o;a=Object.create(null);for(const[f,d]of Object.entries(o)){const g=r.has(f.toLowerCase())?Rn:s(d);l.isUndefined(g)||(a[f]=g)}}return n.pop(),a};return s(e)}let w=class ur extends Error{static from(t,r,n,s,o,a){const f=new ur(t.message,r||t.code,n,s,o);return f.cause=t,f.name=t.name,t.status!=null&&f.status==null&&(f.status=t.status),a&&Object.assign(f,a),f}constructor(t,r,n,s,o){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){const t=this.config,r=t&&l.hasOwnProp(t,"redact")?t.redact:void 0,n=l.isArray(r)&&r.length>0?On(t,r):l.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};w.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",w.ERR_BAD_OPTION="ERR_BAD_OPTION",w.ECONNABORTED="ECONNABORTED",w.ETIMEDOUT="ETIMEDOUT",w.ECONNREFUSED="ECONNREFUSED",w.ERR_NETWORK="ERR_NETWORK",w.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",w.ERR_DEPRECATED="ERR_DEPRECATED",w.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",w.ERR_BAD_REQUEST="ERR_BAD_REQUEST",w.ERR_CANCELED="ERR_CANCELED",w.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",w.ERR_INVALID_URL="ERR_INVALID_URL",w.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const vn=null,At=100;function Ge(e){return l.isPlainObject(e)||l.isArray(e)}function Ct(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function Ze(e,t,r){return e?e.concat(t).map(function(n,s){return n=Ct(n),!r&&s?"["+n+"]":n}).join(r?".":""):t}function jn(e){return l.isArray(e)&&!e.some(Ge)}const _n=l.toFlatObject(l,{},null,function(e){return/^is[A-Z]/.test(e)});function ze(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!l.isUndefined(m[y])});const n=r.metaTokens,s=r.visitor||N,o=r.dots,a=r.indexes,f=r.Blob||typeof Blob<"u"&&Blob,d=r.maxDepth===void 0?At:r.maxDepth,g=f&&l.isSpecCompliantForm(t),b=[];if(!l.isFunction(s))throw new TypeError("visitor must be a function");function x(y){if(y===null)return"";if(l.isDate(y))return y.toISOString();if(l.isBoolean(y))return y.toString();if(!g&&l.isBlob(y))throw new w("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(y)||l.isTypedArray(y)?g&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function O(y){if(y>d)throw new w("Object is too deeply nested ("+y+" levels). Max depth: "+d,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function R(y,m){if(d===1/0)return JSON.stringify(y);const p=[];return JSON.stringify(y,function(v,k){if(!l.isObject(k))return k;for(;p.length&&p[p.length-1]!==this;)p.pop();return p.push(k),O(m+p.length-1),k})}function N(y,m,p){let v=y;if(l.isReactNative(t)&&l.isReactNativeBlob(y))return t.append(Ze(p,m,o),x(y)),!1;if(y&&!p&&typeof y=="object"){if(l.endsWith(m,"{}"))m=n?m:m.slice(0,-2),y=R(y,1);else if(l.isArray(y)&&jn(y)||(l.isFileList(y)||l.endsWith(m,"[]"))&&(v=l.toArray(y)))return m=Ct(m),v.forEach(function(k,ne){!(l.isUndefined(k)||k===null)&&t.append(a===!0?Ze([m],ne,o):a===null?m:m+"[]",x(k))}),!1}return Ge(y)?!0:(t.append(Ze(p,m,o),x(y)),!1)}const T=Object.assign(_n,{defaultVisitor:N,convertValue:x,isVisitable:Ge});function B(y,m,p=0){if(!l.isUndefined(y)){if(O(p),b.indexOf(y)!==-1)throw new Error("Circular reference detected in "+m.join("."));b.push(y),l.forEach(y,function(v,k){(!(l.isUndefined(v)||v===null)&&s.call(t,v,l.isString(k)?k.trim():k,m,T))===!0&&B(v,m?m.concat(k):[k],p+1)}),b.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return B(e),t}function Nt(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Qe(e,t){this._pairs=[],e&&ze(e,this,t)}const Pt=Qe.prototype;Pt.append=function(e,t){this._pairs.push([e,t])},Pt.toString=function(e){const t=e?function(r){return e.call(this,r,Nt)}:Nt;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function An(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function kt(e,t,r){if(!t)return e;const n=l.isFunction(r)?{serialize:r}:r,s=l.getSafeProp(n,"encode")||An,o=l.getSafeProp(n,"serialize");let a;if(o?a=o(t,n):a=l.isURLSearchParams(t)?t.toString():new Qe(t,n).toString(s),a){const f=e.indexOf("#");f!==-1&&(e=e.slice(0,f)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class It{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(r){r!==null&&t(r)})}}const et={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Cn=typeof URLSearchParams<"u"?URLSearchParams:Qe,Nn=typeof FormData<"u"?FormData:null,Pn=typeof Blob<"u"?Blob:null,kn={isBrowser:!0,classes:{URLSearchParams:Cn,FormData:Nn,Blob:Pn},protocols:["http","https","file","blob","url","data"]},tt=typeof window<"u"&&typeof document<"u",rt=typeof navigator=="object"&&navigator||void 0,In=tt&&(!rt||["ReactNative","NativeScript","NS"].indexOf(rt.product)<0),Ln=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Fn=tt&&window.location.href||"http://localhost",Dn=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:tt,hasStandardBrowserEnv:In,hasStandardBrowserWebWorkerEnv:Ln,navigator:rt,origin:Fn},Symbol.toStringTag,{value:"Module"})),z={...Dn,...kn};function Bn(e,t){return ze(e,new z.classes.URLSearchParams,{visitor:function(r,n,s,o){return z.isNode&&l.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}const Lt=At;function Ft(e){if(e>Lt)throw new w("FormData field is too deeply nested ("+e+" levels). Max depth: "+Lt,w.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Un(e){const t=[],r=/\w+|\[(\w*)]/g;let n;for(;(n=r.exec(e))!==null;)Ft(t.length),t.push(n[0]==="[]"?"":n[1]||n[0]);return t}function zn(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function Dt(e){function t(r,n,s,o){Ft(o);let a=r[o++];if(a==="__proto__")return!0;const f=Number.isFinite(+a),d=o>=r.length;return a=!a&&l.isArray(s)?s.length:a,d?(l.hasOwnProp(s,a)?s[a]=l.isArray(s[a])?s[a].concat(n):[s[a],n]:s[a]=n,!f):((!l.hasOwnProp(s,a)||!l.isObject(s[a]))&&(s[a]=[]),t(r,n,s[a],o)&&l.isArray(s[a])&&(s[a]=zn(s[a])),!f)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(n,s)=>{t(Un(n),s,r,0)}),r}return null}const we=(e,t)=>e!=null&&l.hasOwnProp(e,t)?e[t]:void 0;function Mn(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ce={transitional:et,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,s=l.isObject(e);if(s&&l.isHTMLForm(e)&&(e=new FormData(e)),l.isFormData(e))return n?JSON.stringify(Dt(e)):e;if(l.isArrayBuffer(e)||l.isBuffer(e)||l.isStream(e)||l.isFile(e)||l.isBlob(e)||l.isReadableStream(e))return e;if(l.isArrayBufferView(e))return e.buffer;if(l.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(s){const a=we(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return Bn(e,a).toString();if((o=l.isFileList(e))||r.indexOf("multipart/form-data")>-1){const f=we(this,"env"),d=f&&f.FormData;return ze(o?{"files[]":e}:e,d&&new d,a)}}return s||n?(t.setContentType("application/json",!1),Mn(e)):e}],transformResponse:[function(e){const t=we(this,"transitional")||Ce.transitional,r=t&&t.forcedJSONParsing,n=we(this,"responseType"),s=n==="json";if(l.isResponse(e)||l.isReadableStream(e))return e;if(e&&l.isString(e)&&(r&&!n||s)){const o=!(t&&t.silentJSONParsing)&&s;try{return JSON.parse(e,we(this,"parseReviver"))}catch(a){if(o)throw a.name==="SyntaxError"?w.from(a,w.ERR_BAD_RESPONSE,this,null,we(this,"response")):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:z.classes.FormData,Blob:z.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch","query"],e=>{Ce.headers[e]={}});function nt(e,t){const r=this||Ce,n=t||r,s=M.from(n.headers);let o=n.data;return l.forEach(e,function(a){o=a.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function Bt(e){return!!(e&&e.__CANCEL__)}let Ne=class extends w{constructor(e,t,r){super(e??"canceled",w.ERR_CANCELED,t,r),this.name="CanceledError",this.__CANCEL__=!0}};function Ut(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new w("Request failed with status code "+r.status,r.status>=400&&r.status<500?w.ERR_BAD_REQUEST:w.ERR_BAD_RESPONSE,r.config,r.request,r))}function $n(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function qn(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,a;return t=t!==void 0?t:1e3,function(f){const d=Date.now(),g=n[o];a||(a=d),r[s]=f,n[s]=d;let b=o,x=0;for(;b!==s;)x+=r[b++],b=b%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),d-a<t)return;const O=g&&d-g;return O?Math.round(x*1e3/O):void 0}}function Hn(e,t){let r=0,n=1e3/t,s,o;const a=(f,d=Date.now())=>{r=d,s=null,o&&(clearTimeout(o),o=null),e(...f)};return[(...f)=>{const d=Date.now(),g=d-r;g>=n?a(f,d):(s=f,o||(o=setTimeout(()=>{o=null,a(s)},n-g)))},()=>s&&a(s)]}const Me=(e,t,r=3)=>{let n=0;const s=qn(50,250);return Hn(o=>{if(!o||typeof o.loaded!="number")return;const a=o.loaded,f=o.lengthComputable?o.total:void 0,d=f!=null?Math.min(a,f):a,g=Math.max(0,d-n),b=s(g);n=Math.max(n,d);const x={loaded:d,total:f,progress:f?d/f:void 0,bytes:g,rate:b||void 0,estimated:b&&f?(f-d)/b:void 0,event:o,lengthComputable:f!=null,[t?"download":"upload"]:!0};e(x)},r)},zt=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Mt=e=>(...t)=>l.asap(()=>e(...t)),Jn=z.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,z.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(z.origin),z.navigator&&/(msie|trident)/i.test(z.navigator.userAgent)):()=>!0,Wn=z.hasStandardBrowserEnv?{write(e,t,r,n,s,o,a){if(typeof document>"u")return;const f=[`${e}=${encodeURIComponent(t)}`];l.isNumber(r)&&f.push(`expires=${new Date(r).toUTCString()}`),l.isString(n)&&f.push(`path=${n}`),l.isString(s)&&f.push(`domain=${s}`),o===!0&&f.push("secure"),l.isString(a)&&f.push(`SameSite=${a}`),document.cookie=f.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let r=0;r<t.length;r++){const n=t[r].replace(/^\s+/,""),s=n.indexOf("=");if(s!==-1&&n.slice(0,s)===e)return decodeURIComponent(n.slice(s+1))}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Vn(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Xn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const Kn=/^https?:(?!\/\/)/i,Yn=/[\t\n\r]/g;function Gn(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function Zn(e){return Gn(e).replace(Yn,"")}function $t(e,t){if(typeof e=="string"&&Kn.test(Zn(e)))throw new w('Invalid URL: missing "//" after protocol',w.ERR_INVALID_URL,t)}function qt(e,t,r,n){$t(t,n);let s=!Vn(t);return e&&(s||r===!1)?($t(e,n),Xn(e,t)):t}const Ht=e=>e instanceof M?{...e}:e;function pe(e,t){t=t||{};const r=Object.create(null);Object.defineProperty(r,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function n(b,x,O,R){return l.isPlainObject(b)&&l.isPlainObject(x)?l.merge.call({caseless:R},b,x):l.isPlainObject(x)?l.merge({},x):l.isArray(x)?x.slice():x}function s(b,x,O,R){if(l.isUndefined(x)){if(!l.isUndefined(b))return n(void 0,b,O,R)}else return n(b,x,O,R)}function o(b,x){if(!l.isUndefined(x))return n(void 0,x)}function a(b,x){if(l.isUndefined(x)){if(!l.isUndefined(b))return n(void 0,b)}else return n(void 0,x)}function f(b){const x=l.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!l.isUndefined(x))if(l.isPlainObject(x)){if(l.hasOwnProp(x,b))return x[b]}else return;const O=l.hasOwnProp(e,"transitional")?e.transitional:void 0;if(l.isPlainObject(O)&&l.hasOwnProp(O,b))return O[b]}function d(b,x,O){if(l.hasOwnProp(t,O))return n(b,x);if(l.hasOwnProp(e,O))return n(void 0,b)}const g={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,allowedSocketPaths:a,responseEncoding:a,validateStatus:d,headers:(b,x,O)=>s(Ht(b),Ht(x),O,!0)};return l.forEach(Object.keys({...e,...t}),function(b){if(b==="__proto__"||b==="constructor"||b==="prototype")return;const x=l.hasOwnProp(g,b)?g[b]:s,O=l.hasOwnProp(e,b)?e[b]:void 0,R=l.hasOwnProp(t,b)?t[b]:void 0,N=x(O,R,b);l.isUndefined(N)&&x!==d||(r[b]=N)}),l.hasOwnProp(t,"validateStatus")&&l.isUndefined(t.validateStatus)&&f("validateStatusUndefinedResolves")===!1&&(l.hasOwnProp(e,"validateStatus")?r.validateStatus=n(void 0,e.validateStatus):delete r.validateStatus),r}const Qn=["content-type","content-length"];function es(e,t,r){if(r!=="content-only"){e.set(t);return}Object.entries(t).forEach(([n,s])=>{Qn.includes(n.toLowerCase())&&e.set(n,s)})}const ts=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16)));function Jt(e){const t=pe({},e),r=O=>l.hasOwnProp(t,O)?t[O]:void 0,n=r("data");let s=r("withXSRFToken");const o=r("xsrfHeaderName"),a=r("xsrfCookieName");let f=r("headers");const d=r("auth"),g=r("baseURL"),b=r("allowAbsoluteUrls"),x=r("url");if(t.headers=f=M.from(f),t.url=kt(qt(g,x,b,t),r("params"),r("paramsSerializer")),d){const O=l.getSafeProp(d,"username")||"",R=l.getSafeProp(d,"password")||"";f.set("Authorization","Basic "+btoa(O+":"+(R?ts(R):"")))}if(l.isFormData(n)&&(z.hasStandardBrowserEnv||z.hasStandardBrowserWebWorkerEnv||l.isReactNative(n)?f.setContentType(void 0):l.isFunction(n.getHeaders)&&es(f,n.getHeaders(),r("formDataHeaderPolicy"))),z.hasStandardBrowserEnv&&(l.isFunction(s)&&(s=s(t)),s===!0||s==null&&Jn(t.url))){const O=o&&a&&Wn.read(a);O&&f.set(o,O)}return t}const rs=typeof XMLHttpRequest<"u",ns=rs&&function(e){return new Promise(function(t,r){const n=Jt(e);let s=n.data;const o=M.from(n.headers).normalize();let{responseType:a,onUploadProgress:f,onDownloadProgress:d}=n,g,b,x,O,R;function N(){O&&O(),R&&R(),n.cancelToken&&n.cancelToken.unsubscribe(g),n.signal&&n.signal.removeEventListener("abort",g)}let T=new XMLHttpRequest;T.open(n.method.toUpperCase(),n.url,!0),T.timeout=n.timeout;function B(){if(!T)return;const m=M.from("getAllResponseHeaders"in T&&T.getAllResponseHeaders()),p={data:!a||a==="text"||a==="json"?T.responseText:T.response,status:T.status,statusText:T.statusText,headers:m,config:e,request:T};Ut(function(v){t(v),N()},function(v){r(v),N()},p),T=null}"onloadend"in T?T.onloadend=B:T.onreadystatechange=function(){!T||T.readyState!==4||T.status===0&&!(T.responseURL&&T.responseURL.startsWith("file:"))||setTimeout(B)},T.onabort=function(){T&&(r(new w("Request aborted",w.ECONNABORTED,e,T)),N(),T=null)},T.onerror=function(m){const p=m&&m.message?m.message:"Network Error",v=new w(p,w.ERR_NETWORK,e,T);v.event=m||null,r(v),N(),T=null},T.ontimeout=function(){let m=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const p=n.transitional||et;n.timeoutErrorMessage&&(m=n.timeoutErrorMessage),r(new w(m,p.clarifyTimeoutError?w.ETIMEDOUT:w.ECONNABORTED,e,T)),N(),T=null},s===void 0&&o.setContentType(null),"setRequestHeader"in T&&l.forEach(jt(o),function(m,p){T.setRequestHeader(p,m)}),l.isUndefined(n.withCredentials)||(T.withCredentials=!!n.withCredentials),a&&a!=="json"&&(T.responseType=n.responseType),d&&([x,R]=Me(d,!0),T.addEventListener("progress",x)),f&&T.upload&&([b,O]=Me(f),T.upload.addEventListener("progress",b),T.upload.addEventListener("loadend",O)),(n.cancelToken||n.signal)&&(g=m=>{T&&(r(!m||m.type?new Ne(null,e,T):m),T.abort(),N(),T=null)},n.cancelToken&&n.cancelToken.subscribe(g),n.signal&&(n.signal.aborted?g():n.signal.addEventListener("abort",g)));const y=$n(n.url);if(y&&!z.protocols.includes(y)){r(new w("Unsupported protocol "+y+":",w.ERR_BAD_REQUEST,e));return}T.send(s||null)})},ss=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const r=new AbortController;let n=!1;const s=function(d){if(!n){n=!0,a();const g=d instanceof Error?d:this.reason;r.abort(g instanceof w?g:new Ne(g instanceof Error?g.message:g))}};let o=t&&setTimeout(()=>{o=null,s(new w(`timeout of ${t}ms exceeded`,w.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s));const{signal:f}=r;return f.unsubscribe=()=>l.asap(a),f},os=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},is=async function*(e,t){for await(const r of as(e))yield*os(r,t)},as=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Wt=(e,t,r,n)=>{const s=is(e,t);let o=0,a,f=d=>{a||(a=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:g,value:b}=await s.next();if(g){f(),d.close();return}let x=b.byteLength;if(r){let O=o+=x;r(O)}d.enqueue(new Uint8Array(b))}catch(g){throw f(g),g}},cancel(d){return f(d),s.return()}},{highWaterMark:2})},$e=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,ls=(e,t,r)=>t+2<r&&$e(e.charCodeAt(t+1))&&$e(e.charCodeAt(t+2));function cs(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const r=e.slice(5,t),n=e.slice(t+1);if(/;base64/i.test(r)){let o=n.length;const a=n.length;for(let x=0;x<a;x++)if(n.charCodeAt(x)===37&&x+2<a){const O=n.charCodeAt(x+1),R=n.charCodeAt(x+2);$e(O)&&$e(R)&&(o-=2,x+=2)}let f=0,d=a-1;const g=x=>x>=2&&n.charCodeAt(x-2)===37&&n.charCodeAt(x-1)===51&&(n.charCodeAt(x)===68||n.charCodeAt(x)===100);d>=0&&(n.charCodeAt(d)===61?(f++,d--):g(d)&&(f++,d-=3)),f===1&&d>=0&&(n.charCodeAt(d)===61||g(d))&&f++;const b=Math.floor(o/4)*3-(f||0);return b>0?b:0}let s=0;for(let o=0,a=n.length;o<a;o++){const f=n.charCodeAt(o);if(f===37&&ls(n,o,a))s+=1,o+=2;else if(f<128)s+=1;else if(f<2048)s+=2;else if(f>=55296&&f<=56319&&o+1<a){const d=n.charCodeAt(o+1);d>=56320&&d<=57343?(s+=4,o++):s+=3}else s+=3}return s}const st="1.18.0",Vt=64*1024,{isFunction:qe}=l,us=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,r)=>String.fromCharCode(parseInt(r,16))),Xt=e=>{if(!l.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Kt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fs=e=>{const t=e.indexOf("://");let r=e;return t!==-1&&(r=r.slice(t+3)),r.includes("@")||r.includes(":")},ds=e=>{const t=l.global!==void 0&&l.global!==null?l.global:globalThis,{ReadableStream:r,TextEncoder:n}=t;e=l.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:o,Response:a}=e,f=s?qe(s):typeof fetch=="function",d=qe(o),g=qe(a);if(!f)return!1;const b=f&&qe(r),x=f&&(typeof n=="function"?(y=>m=>y.encode(m))(new n):async y=>new Uint8Array(await new o(y).arrayBuffer())),O=d&&b&&Kt(()=>{let y=!1;const m=new o(z.origin,{body:new r,method:"POST",get duplex(){return y=!0,"half"}}),p=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),y&&!p}),R=g&&b&&Kt(()=>l.isReadableStream(new a("").body)),N={stream:R&&(y=>y.body)};f&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!N[y]&&(N[y]=(m,p)=>{let v=m&&m[y];if(v)return v.call(m);throw new w(`Response type '${y}' is not supported`,w.ERR_NOT_SUPPORT,p)})});const T=async y=>{if(y==null)return 0;if(l.isBlob(y))return y.size;if(l.isSpecCompliantForm(y))return(await new o(z.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(l.isArrayBufferView(y)||l.isArrayBuffer(y))return y.byteLength;if(l.isURLSearchParams(y)&&(y=y+""),l.isString(y))return(await x(y)).byteLength},B=async(y,m)=>l.toFiniteNumber(y.getContentLength())??T(m);return async y=>{let{url:m,method:p,data:v,signal:k,cancelToken:ne,timeout:me,onDownloadProgress:S,onUploadProgress:h,responseType:L,headers:J,withCredentials:G="same-origin",fetchOptions:le,maxContentLength:W,maxBodyLength:Z}=Jt(y);const ee=l.isNumber(W)&&W>-1,oe=l.isNumber(Z)&&Z>-1,be=P=>l.hasOwnProp(y,P)?y[P]:void 0;let ce=s||fetch;L=L?(L+"").toLowerCase():"text";let V=ss([k,ne&&ne.toAbortSignal()],me),i=null;const E=V&&V.unsubscribe&&(()=>{V.unsubscribe()});let j,A=null;const te=()=>new w("Request body larger than maxBodyLength limit",w.ERR_BAD_REQUEST,y,i);try{let P;const _=be("auth");if(_){const C=l.getSafeProp(_,"username")||"",K=l.getSafeProp(_,"password")||"";P={username:C,password:K}}if(fs(m)){const C=new URL(m,z.origin);if(!P&&(C.username||C.password)){const K=Xt(C.username),ue=Xt(C.password);P={username:K,password:ue}}(C.username||C.password)&&(C.username="",C.password="",m=C.href)}if(P&&(J.delete("authorization"),J.set("Authorization","Basic "+btoa(us((P.username||"")+":"+(P.password||""))))),ee&&typeof m=="string"&&m.startsWith("data:")&&cs(m)>W)throw new w("maxContentLength size of "+W+" exceeded",w.ERR_BAD_RESPONSE,y,i);if(oe&&p!=="get"&&p!=="head"){const C=await T(v);if(typeof C=="number"&&isFinite(C)&&(j=C,C>Z))throw te()}const U=oe&&(l.isReadableStream(v)||l.isStream(v)),se=(C,K,ue)=>Wt(C,Vt,ye=>{if(oe&&ye>Z)throw A=te();K&&K(ye)},ue);if(O&&p!=="get"&&p!=="head"&&(h||U)){if(j=j??await B(J,v),j!==0||U){let C=new o(m,{method:"POST",body:v,duplex:"half"}),K;if(l.isFormData(v)&&(K=C.headers.get("content-type"))&&J.setContentType(K),C.body){const[ue,ye]=h&&zt(j,Me(Mt(h)))||[];v=se(C.body,ue,ye)}}}else if(U&&!d&&b&&p!=="get"&&p!=="head")v=se(v);else if(U&&d&&!O&&p!=="get"&&p!=="head")throw new w("Stream request bodies are not supported by the current fetch implementation",w.ERR_NOT_SUPPORT,y,i);l.isString(G)||(G=G?"include":"omit");const Pe=d&&"credentials"in o.prototype;if(l.isFormData(v)){const C=J.getContentType();C&&/^multipart\/form-data/i.test(C)&&!/boundary=/i.test(C)&&J.delete("content-type")}J.set("User-Agent","axios/"+st,!1);const ar={...le,signal:V,method:p.toUpperCase(),headers:jt(J.normalize()),body:v,duplex:"half",credentials:Pe?G:void 0};i=d&&new o(m,ar);let ie=await(d?ce(i,le):ce(m,ar));const lr=M.from(ie.headers);if(ee){const C=l.toFiniteNumber(lr.getContentLength());if(C!=null&&C>W)throw new w("maxContentLength size of "+W+" exceeded",w.ERR_BAD_RESPONSE,y,i)}const ct=R&&(L==="stream"||L==="response");if(R&&ie.body&&(S||ee||ct&&E)){const C={};["status","statusText","headers"].forEach(ke=>{C[ke]=ie[ke]});const K=l.toFiniteNumber(lr.getContentLength()),[ue,ye]=S&&zt(K,Me(Mt(S),!0))||[];let cr=0;const ks=ke=>{if(ee&&(cr=ke,cr>W))throw new w("maxContentLength size of "+W+" exceeded",w.ERR_BAD_RESPONSE,y,i);ue&&ue(ke)};ie=new a(Wt(ie.body,Vt,ks,()=>{ye&&ye(),E&&E()}),C)}L=L||"text";let ae=await N[l.findKey(N,L)||"text"](ie,y);if(ee&&!R&&!ct){let C;if(ae!=null&&(typeof ae.byteLength=="number"?C=ae.byteLength:typeof ae.size=="number"?C=ae.size:typeof ae=="string"&&(C=typeof n=="function"?new n().encode(ae).byteLength:ae.length)),typeof C=="number"&&C>W)throw new w("maxContentLength size of "+W+" exceeded",w.ERR_BAD_RESPONSE,y,i)}return!ct&&E&&E(),await new Promise((C,K)=>{Ut(C,K,{data:ae,headers:M.from(ie.headers),status:ie.status,statusText:ie.statusText,config:y,request:i})})}catch(P){if(E&&E(),V&&V.aborted&&V.reason instanceof w){const _=V.reason;throw _.config=y,i&&(_.request=i),P!==_&&(_.cause=P),_}throw A?(i&&!A.request&&(A.request=i),A):P instanceof w?(i&&!P.request&&(P.request=i),P):P&&P.name==="TypeError"&&/Load failed|fetch/i.test(P.message)?Object.assign(new w("Network Error",w.ERR_NETWORK,y,i,P&&P.response),{cause:P.cause||P}):w.from(P,P&&P.code,y,i,P&&P.response)}}},ps=new Map,Yt=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:s}=t,o=[n,s,r];let a=o.length,f=a,d,g,b=ps;for(;f--;)d=o[f],g=b.get(d),g===void 0&&b.set(d,g=f?new Map:ds(t)),b=g;return g};Yt();const ot={http:vn,xhr:ns,fetch:{get:Yt}};l.forEach(ot,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Gt=e=>`- ${e}`,hs=e=>l.isFunction(e)||e===null||e===!1;function ms(e,t){e=l.isArray(e)?e:[e];const{length:r}=e;let n,s;const o={};for(let a=0;a<r;a++){n=e[a];let f;if(s=n,!hs(n)&&(s=ot[(f=String(n)).toLowerCase()],s===void 0))throw new w(`Unknown adapter '${f}'`);if(s&&(l.isFunction(s)||(s=s.get(t))))break;o[f||"#"+a]=s}if(!s){const a=Object.entries(o).map(([d,g])=>`adapter ${d} `+(g===!1?"is not supported by the environment":"is not available in the build"));let f=r?a.length>1?`since :
|
|
46
|
+
`+a.map(Gt).join(`
|
|
47
|
+
`):" "+Gt(a[0]):"as no adapter specified";throw new w("There is no suitable adapter to dispatch the request "+f,"ERR_NOT_SUPPORT")}return s}const Zt={getAdapter:ms,adapters:ot};function it(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ne(null,e)}function Qt(e){return it(e),e.headers=M.from(e.headers),e.data=nt.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Zt.getAdapter(e.adapter||Ce.adapter,e)(e).then(function(t){it(e),e.response=t;try{t.data=nt.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=M.from(t.headers),t},function(t){if(!Bt(t)&&(it(e),t&&t.response)){e.response=t.response;try{t.response.data=nt.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=M.from(t.response.headers)}return Promise.reject(t)})}const He={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{He[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const er={};He.transitional=function(e,t,r){function n(s,o){return"[Axios v"+st+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(e===!1)throw new w(n(o," has been removed"+(t?" in "+t:"")),w.ERR_DEPRECATED);return t&&!er[o]&&(er[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,a):!0}},He.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function bs(e,t,r){if(typeof e!="object")throw new w("options must be an object",w.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const o=n[s],a=Object.prototype.hasOwnProperty.call(t,o)?t[o]:void 0;if(a){const f=e[o],d=f===void 0||a(f,o,e);if(d!==!0)throw new w("option "+o+" must be "+d,w.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new w("Unknown option "+o,w.ERR_BAD_OPTION)}}const Je={assertOptions:bs,validators:He},$=Je.validators;let he=class{constructor(e){this.defaults=e||{},this.interceptors={request:new It,response:new It}}async request(e,t){try{return await this._request(e,t)}catch(r){if(r instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const s=(()=>{if(!n.stack)return"";const o=n.stack.indexOf(`
|
|
48
|
+
`);return o===-1?"":n.stack.slice(o+1)})();try{if(!r.stack)r.stack=s;else if(s){const o=s.indexOf(`
|
|
49
|
+
`),a=o===-1?-1:s.indexOf(`
|
|
50
|
+
`,o+1),f=a===-1?"":s.slice(a+1);String(r.stack).endsWith(f)||(r.stack+=`
|
|
51
|
+
`+s)}}catch{}}throw r}}_request(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=pe(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:s}=t;r!==void 0&&Je.assertOptions(r,{silentJSONParsing:$.transitional($.boolean),forcedJSONParsing:$.transitional($.boolean),clarifyTimeoutError:$.transitional($.boolean),legacyInterceptorReqResOrdering:$.transitional($.boolean),advertiseZstdAcceptEncoding:$.transitional($.boolean),validateStatusUndefinedResolves:$.transitional($.boolean)},!1),n!=null&&(l.isFunction(n)?t.paramsSerializer={serialize:n}:Je.assertOptions(n,{encode:$.function,serialize:$.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Je.assertOptions(t,{baseUrl:$.spelling("baseURL"),withXsrfToken:$.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o=s&&l.merge(s.common,s[t.method]);s&&l.forEach(["delete","get","head","post","put","patch","query","common"],R=>{delete s[R]}),t.headers=M.concat(o,s);const a=[];let f=!0;this.interceptors.request.forEach(function(R){if(typeof R.runWhen=="function"&&R.runWhen(t)===!1)return;f=f&&R.synchronous;const N=t.transitional||et;N&&N.legacyInterceptorReqResOrdering?a.unshift(R.fulfilled,R.rejected):a.push(R.fulfilled,R.rejected)});const d=[];this.interceptors.response.forEach(function(R){d.push(R.fulfilled,R.rejected)});let g,b=0,x;if(!f){const R=[Qt.bind(this),void 0];for(R.unshift(...a),R.push(...d),x=R.length,g=Promise.resolve(t);b<x;)g=g.then(R[b++],R[b++]);return g}x=a.length;let O=t;for(;b<x;){const R=a[b++],N=a[b++];try{O=R(O)}catch(T){N.call(this,T);break}}try{g=Qt.call(this,O)}catch(R){return Promise.reject(R)}for(b=0,x=d.length;b<x;)g=g.then(d[b++],d[b++]);return g}getUri(e){e=pe(this.defaults,e);const t=qt(e.baseURL,e.url,e.allowAbsoluteUrls,e);return kt(t,e.params,e.paramsSerializer)}};l.forEach(["delete","get","head","options"],function(e){he.prototype[e]=function(t,r){return this.request(pe(r||{},{method:e,url:t,data:r&&l.hasOwnProp(r,"data")?r.data:void 0}))}}),l.forEach(["post","put","patch","query"],function(e){function t(r){return function(n,s,o){return this.request(pe(o||{},{method:e,headers:r?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}he.prototype[e]=t(),e!=="query"&&(he.prototype[e+"Form"]=t(!0))});let ys=class fr{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(s=>{if(!n._listeners)return;let o=n._listeners.length;for(;o-- >0;)n._listeners[o](s);n._listeners=null}),this.promise.then=s=>{let o;const a=new Promise(f=>{n.subscribe(f),o=f}).then(s);return a.cancel=function(){n.unsubscribe(o)},a},t(function(s,o,a){n.reason||(n.reason=new Ne(s,o,a),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new fr(function(r){t=r}),cancel:t}}};function gs(e){return function(t){return e.apply(null,t)}}function Ss(e){return l.isObject(e)&&e.isAxiosError===!0}const at={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(at).forEach(([e,t])=>{at[t]=e});function tr(e){const t=new he(e),r=bt(he.prototype.request,t);return l.extend(r,he.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(n){return tr(pe(e,n))},r}const F=tr(Ce);F.Axios=he,F.CanceledError=Ne,F.CancelToken=ys,F.isCancel=Bt,F.VERSION=st,F.toFormData=ze,F.AxiosError=w,F.Cancel=F.CanceledError,F.all=function(e){return Promise.all(e)},F.spread=gs,F.isAxiosError=Ss,F.mergeConfig=pe,F.AxiosHeaders=M,F.formToJSON=e=>Dt(l.isHTMLForm(e)?new FormData(e):e),F.getAdapter=Zt.getAdapter,F.HttpStatusCode=at,F.default=F;const{Axios:Ds,AxiosError:Bs,CanceledError:Us,isCancel:zs,CancelToken:Ms,VERSION:$s,all:qs,Cancel:Hs,isAxiosError:Js,spread:Ws,toFormData:Vs,AxiosHeaders:Xs,HttpStatusCode:Ks,formToJSON:Ys,getAdapter:Gs,mergeConfig:Zs,create:Qs}=F;function xs(e){if(e&&typeof e=="object"&&"code"in e&&"data"in e){const t=e;return t.code!==200?Promise.reject(new Error(t.message||"请求失败")):t.data}return e}function Es(e,t={}){const{tokenKey:r="token",userInfoKey:n="userInfo",unauthorizedRedirect:s="/login"}=t;e.interceptors.request.use(o=>{const a=localStorage.getItem(r);return a&&(o.headers.Authorization=`Bearer ${a}`),o}),e.interceptors.response.use(o=>xs(o.data),o=>{var a,f,d;return((a=o.response)==null?void 0:a.status)===401?(localStorage.removeItem(r),localStorage.removeItem(n),window.location.href=s):((f=o.response)==null?void 0:f.status)===403?console.error("没有权限访问该资源"):((d=o.response)==null?void 0:d.status)===500&&console.error("服务器内部错误"),Promise.reject(o)})}function rr(e={}){const t=F.create({baseURL:e.baseURL??"/api",timeout:e.timeout??1e4});return Es(t,{tokenKey:e.tokenKey,userInfoKey:e.userInfoKey,unauthorizedRedirect:e.unauthorizedRedirect}),t}const q=rr();rr();class eo extends I.Component{constructor(t){super(t),yr(this,"handleReset",()=>{this.setState({hasError:!1,error:null,errorInfo:null}),typeof this.props.onReset=="function"&&this.props.onReset()}),this.state={hasError:!1,error:null,errorInfo:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("[ErrorBoundary] caught error:",t,r),this.setState({errorInfo:r})}render(){if(!this.state.hasError)return this.props.children;const{fallbackTitle:t="组件加载失败",fallbackDescription:r,showReload:n=!0}=this.props,s=this.state.error&&(this.state.error.message||String(this.state.error))||"未知错误";return Y.jsxs("div",{style:{padding:24,background:"#fff2f0",border:"1px solid #ffccc7",borderRadius:8,minHeight:200},children:[Y.jsx(c.Alert,{type:"error",showIcon:!0,icon:Y.jsx(D.BugOutlined,{}),message:t,description:Y.jsxs("div",{children:[Y.jsx("div",{style:{marginBottom:8},children:r||"当前组件发生了异常,已被错误边界捕获。其他功能仍可正常使用。"}),Y.jsx("div",{style:{fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:12,color:"#cf1322",background:"#fff",padding:8,borderRadius:4,border:"1px solid #ffccc7",wordBreak:"break-word",whiteSpace:"pre-wrap"},children:s})]})}),n&&Y.jsx(c.Space,{style:{marginTop:16},children:Y.jsx(c.Button,{icon:Y.jsx(D.ReloadOutlined,{}),onClick:this.handleReset,children:"重试"})})]})}}const{Title:to,Text:ro,Paragraph:no}=c.Typography;let ws="/api";function nr(){return F.create({baseURL:ws,timeout:15e3})}const Rs=nr();nr(),Rs.interceptors.request.use(e=>{const t=localStorage.getItem("token");return t&&(e.headers.Authorization=`Bearer ${t}`),e});const{Header:so,Sider:oo,Content:io}=c.Layout,{Text:ao}=c.Typography,{Title:lo,Text:co}=c.Typography,{Option:uo}=c.Select,{TextArea:fo}=c.Input,Ts=[{type:"STRING",label:"字符串",icon:Y.jsx(D.FileTextOutlined,{}),color:"#1677ff",desc:"短文本 (默认 VARCHAR 255)"},{type:"TEXT",label:"长文本",icon:Y.jsx(D.FileTextOutlined,{}),color:"#13c2c2",desc:"TEXT 类型, 无长度限制"},{type:"INT",label:"整数",icon:"#",color:"#722ed1",desc:"INT 整数"},{type:"LONG",label:"长整数",icon:"#",color:"#722ed1",desc:"BIGINT 长整数"},{type:"DECIMAL",label:"小数",icon:"0.00",color:"#eb2f96",desc:"DECIMAL 精确小数"},{type:"BOOLEAN",label:"布尔",icon:Y.jsx(D.CheckCircleOutlined,{}),color:"#52c41a",desc:"TINYINT(1) 是/否"},{type:"DATE",label:"日期",icon:"📅",color:"#fa8c16",desc:"DATE yyyy-MM-dd"},{type:"DATETIME",label:"日期时间",icon:"🕐",color:"#fa8c16",desc:"DATETIME yyyy-MM-dd HH:mm:ss"},{type:"JSON",label:"JSON",icon:"{}",color:"#2f54eb",desc:"JSON 字符串"},{type:"REF",label:"引用",icon:"🔗",color:"#8c8c8c",desc:"外键引用 BIGINT"}];Object.fromEntries(Ts.map(e=>[e.type,e]));const{Option:po}=c.Select;c.Input.TextArea,c.Input.TextArea;const{Text:ho,Paragraph:mo}=c.Typography,{TextArea:bo}=c.Input,{TextArea:yo}=c.Input,{Text:go,Paragraph:So}=c.Typography,{TextArea:xo}=c.Input,{Text:Eo,Paragraph:wo}=c.Typography,{Text:Ro}=c.Typography,{Text:To}=c.Typography,{TextArea:Oo}=c.Input,{Text:vo,Paragraph:jo}=c.Typography,{Text:_o}=c.Typography,{Text:Ao}=c.Typography,{Text:Co}=c.Typography,{Text:No}=c.Typography;common;const Os={STANDARD_JSON:{label:"标准 JSON",color:"blue"},RSS_XML:{label:"RSS 2.0",color:"orange"},ATOM_XML:{label:"Atom 1.0",color:"gold"},CUSTOM_SCRIPT:{label:"自定义脚本",color:"purple"},INTERNAL_BEAN:{label:"内部 Bean",color:"cyan"}},vs={PENDING_VERIFY:{color:"default",text:"待验证"},VERIFIED:{color:"green",text:"已验证"},INVALID_AUTH:{color:"red",text:"鉴权失败"},FATAL:{color:"red",text:"永久失败"},DISABLED:{color:"default",text:"已停用"}},sr={PENDING:{color:"default"},RUNNING:{color:"processing"},SUCCESS:{color:"green"},EMPTY:{color:"default"},FAILED:{color:"red"},FATAL:{color:"red"}};function or(){const e=re.useNavigate(),[t,r]=I.useState([]),[n,s]=I.useState(!1),[o,a]=I.useState(null),[f,d]=I.useState([]),[g,b]=I.useState({}),[x,O]=I.useState(null),[R,N]=I.useState([]),T=async()=>{s(!0);try{const S=await q.get("/subscribe/subscription/list");S&&S.success!==!1&&r(Array.isArray(S.data)?S.data:Array.isArray(S)?S:[])}catch(S){c.message.error("获取订阅列表失败: "+((S==null?void 0:S.message)||""))}finally{s(!1)}};I.useEffect(()=>{T()},[]);const B=S=>{c.Modal.confirm({title:"确认删除",icon:u.jsx(D.ExclamationCircleOutlined,{}),content:`确定要删除订阅 "${S.name}" 吗? 运行历史会保留.`,onOk:async()=>{try{const h=await q.delete(`/subscribe/subscription/${S.id}`);h&&h.success!==!1?(c.message.success("删除成功"),T()):c.message.error((h==null?void 0:h.message)||"删除失败")}catch(h){c.message.error("删除失败: "+((h==null?void 0:h.message)||""))}}})},y=async S=>{try{const h=await q.post(`/subscribe/subscription/${S}/enable`);h&&h.success!==!1?(c.message.success("已启用"),T()):c.message.error((h==null?void 0:h.message)||"启用失败")}catch(h){c.message.error("启用失败: "+((h==null?void 0:h.message)||""))}},m=async S=>{try{const h=await q.post(`/subscribe/subscription/${S}/disable`);h&&h.success!==!1?(c.message.success("已停用"),T()):c.message.error((h==null?void 0:h.message)||"停用失败")}catch(h){c.message.error("停用失败: "+((h==null?void 0:h.message)||""))}},p=async S=>{c.Modal.confirm({title:"手动触发",content:`将立即执行一次 "${S.name}" 的抽取, 同步返回 runId.`,onOk:async()=>{try{const h=await q.post(`/subscribe/subscription/${S.id}/trigger?triggerBy=ceo`);if(h&&(h.data!==void 0||h.success!==!1)){const L=h.data??h;c.message.success(`已触发, runId = ${L}`),k(S)}else c.message.error((h==null?void 0:h.message)||"触发失败")}catch(h){c.message.error("触发失败: "+((h==null?void 0:h.message)||""))}}})},v=async S=>{try{const h=await q.post(`/subscribe/subscription/${S.id}/dry-run`);a({sub:S,result:(h==null?void 0:h.data)??h})}catch(h){a({sub:S,result:{success:!1,errorMessage:(h==null?void 0:h.message)||"请求失败"}})}},k=async S=>{try{const h=await q.get(`/subscribe/run/list?subscriptionId=${S.id}&limit=20`),L=(h==null?void 0:h.data)??h??[];d(Array.isArray(L)?L:[]),O(null),b({}),N([]),a({sub:S,tab:"runs"})}catch{c.message.error("获取运行历史失败")}},ne=async S=>{if(g[S]){O(S);return}try{const h=await q.get(`/subscribe/run/${S}/items?limit=200`),L=(h==null?void 0:h.data)??h??[];b(J=>({...J,[S]:Array.isArray(L)?L:[]})),O(S)}catch{c.message.error("获取抽取项失败")}},me=[{title:"ID",dataIndex:"id",width:70},{title:"名称",dataIndex:"name",render:(S,h)=>u.jsxs(c.Space,{orientation:"vertical",size:0,children:[u.jsx("span",{style:{fontWeight:500},children:S}),h.description&&u.jsx("span",{style:{color:"#999",fontSize:12},children:h.description})]})},{title:"数据源",dataIndex:"sourceType",width:90,render:S=>u.jsx(c.Tag,{children:S})},{title:"抽取器",dataIndex:"extractorType",width:140,render:S=>{const h=Os[S]||{label:S,color:"default"};return u.jsx(c.Tag,{color:h.color,children:h.label})}},{title:"Cron",dataIndex:"cronExpr",width:150,render:S=>u.jsx("code",{style:{fontSize:12},children:S})},{title:"状态",dataIndex:"status",width:110,render:S=>{const h=vs[S]||{color:"default",text:S};return u.jsx(c.Tag,{color:h.color,children:h.text})}},{title:"启用",dataIndex:"enabled",width:80,render:(S,h)=>S?u.jsx(c.Tag,{color:"green",children:"是"}):u.jsx(c.Tag,{children:"否"})},{title:"最近 run",dataIndex:"lastStatus",width:110,render:(S,h)=>{var L;return S?u.jsx(c.Tooltip,{title:h.lastError||"",children:u.jsx(c.Tag,{color:((L=sr[S])==null?void 0:L.color)||"default",children:S})}):u.jsx("span",{style:{color:"#ccc"},children:"-"})}},{title:"累计",width:130,render:(S,h)=>u.jsxs(c.Space,{size:4,children:[u.jsxs(c.Tag,{color:"green",children:["✓ ",h.successCountTotal||0]}),u.jsxs(c.Tag,{color:"red",children:["✗ ",h.failCountTotal||0]})]})},{title:"操作",width:280,fixed:"right",render:(S,h)=>u.jsxs(c.Space,{size:4,wrap:!0,children:[u.jsx(c.Button,{type:"link",size:"small",icon:u.jsx(D.EditOutlined,{}),onClick:()=>e(`/subscribe/edit/${h.id}`),children:"编辑"}),u.jsx(c.Button,{type:"link",size:"small",icon:u.jsx(D.ThunderboltOutlined,{}),onClick:()=>v(h),children:"试运行"}),u.jsx(c.Button,{type:"link",size:"small",icon:u.jsx(D.PlayCircleOutlined,{}),onClick:()=>p(h),children:"触发"}),u.jsx(c.Button,{type:"link",size:"small",onClick:()=>k(h),children:"历史"}),h.enabled?u.jsx(c.Button,{type:"link",size:"small",icon:u.jsx(D.PauseCircleOutlined,{}),onClick:()=>m(h.id),children:"停用"}):u.jsx(c.Button,{type:"link",size:"small",icon:u.jsx(D.CheckCircleOutlined,{}),onClick:()=>y(h.id),children:"启用"}),u.jsx(c.Popconfirm,{title:"确认删除?",onConfirm:()=>B(h),okText:"删除",cancelText:"取消",children:u.jsx(c.Button,{type:"link",size:"small",danger:!0,icon:u.jsx(D.DeleteOutlined,{}),children:"删除"})})]})}];return u.jsxs("div",{style:{padding:24},children:[u.jsxs(c.Card,{title:u.jsxs(c.Space,{children:[u.jsx(D.ApiOutlined,{}),"订阅中心 - 数据源订阅"]}),extra:u.jsxs(c.Space,{children:[u.jsx(c.Button,{icon:u.jsx(D.ReloadOutlined,{}),onClick:T,children:"刷新"}),u.jsx(c.Button,{type:"primary",icon:u.jsx(D.PlusOutlined,{}),onClick:()=>e("/subscribe/new"),children:"新建订阅"})]}),children:[u.jsx(c.Alert,{type:"info",showIcon:!0,style:{marginBottom:16},message:"订阅中心负责把三方 / 内部 / RSS 等数据源按 Cron 定时抽取, 归一化后落到本地, 供 CEO 立项和 Agent 协作使用."}),u.jsx(c.Table,{rowKey:"id",columns:me,dataSource:t,loading:n,scroll:{x:1400},size:"middle",pagination:{pageSize:20,showSizeChanger:!0,showTotal:S=>`共 ${S} 条`}})]}),u.jsx(c.Drawer,{title:o!=null&&o.sub?`试运行 - ${o.sub.name}`:"运行历史",open:!!o,onClose:()=>a(null),width:900,children:(o==null?void 0:o.tab)==="runs"?u.jsx(c.Tabs,{activeKey:x?"items":"list",onChange:S=>S==="list"&&O(null),items:[{key:"list",label:`运行列表 (${f.length})`,children:u.jsx(c.Table,{rowKey:"id",size:"small",dataSource:f,pagination:!1,onRow:S=>({onClick:()=>ne(S.id)}),columns:[{title:"runId",dataIndex:"id",width:70},{title:"计划",dataIndex:"scheduledAt",width:160,render:S=>S?new Date(S).toLocaleString():"-"},{title:"耗时(ms)",dataIndex:"durationMs",width:90},{title:"状态",dataIndex:"status",width:90,render:S=>{var h;return u.jsx(c.Tag,{color:(h=sr[S])==null?void 0:h.color,children:S})}},{title:"拉取/成功/重复/死信",width:200,render:(S,h)=>`${h.fetchedCount} / ${h.successCount} / ${h.duplicateCount||0} / ${h.deadLetterCount}`},{title:"错误",dataIndex:"errorMessage",render:S=>S?u.jsx("span",{style:{color:"#cf1322",fontSize:12},children:S}):"-"}]})},{key:"items",label:x?`run#${x} 抽取项`:"抽取项",disabled:!x,children:u.jsxs(c.Space,{orientation:"vertical",style:{width:"100%"},children:[u.jsxs(c.Space,{children:[u.jsxs(c.Tag,{color:"blue",children:["已选 ",R.length," 条"]}),u.jsxs(c.Button,{size:"small",type:"primary",icon:u.jsx(D.ProjectOutlined,{}),disabled:R.length===0,onClick:()=>{const S=R.join(",");e(`/project/new?subscriptionId=${o.sub.id}&itemIds=${S}`)},children:["用所选 ",R.length," 条立项"]})]}),u.jsx(c.Table,{rowKey:"id",size:"small",dataSource:g[x]||[],pagination:{pageSize:20},rowSelection:{selectedRowKeys:R,onChange:N},columns:[{title:"id",dataIndex:"dedupKey",width:180,ellipsis:!0},{title:"title",dataIndex:"normalized",render:S=>{try{return JSON.parse(S).title||"(无标题)"}catch{return S}}},{title:"link",dataIndex:"normalized",render:S=>{try{const h=JSON.parse(S);return h.link?u.jsx("a",{href:h.link,target:"_blank",children:"↗"}):"-"}catch{return"-"}}},{title:"状态",dataIndex:"status",width:110,render:S=>u.jsx(c.Tag,{children:S})}]})]})}]}):u.jsx(js,{result:o==null?void 0:o.result})})]})}function js({result:e}){return e?e.success?u.jsxs(c.Space,{orientation:"vertical",style:{width:"100%"},size:"middle",children:[u.jsx(c.Card,{size:"small",title:"调用结果",children:u.jsxs(c.Space,{size:"large",wrap:!0,children:[u.jsxs("span",{children:[u.jsx("b",{children:"HTTP:"})," ",e.httpStatus||"-"]}),u.jsxs("span",{children:[u.jsx("b",{children:"耗时:"})," ",e.latencyMs,"ms"]}),u.jsxs("span",{children:[u.jsx("b",{children:"大小:"})," ",e.responseSize,"B"]}),u.jsxs("span",{children:[u.jsx("b",{children:"样本:"})," ",e.sampleCount," 条"]})]})}),e.firstItem&&u.jsx(c.Card,{size:"small",title:"第一条样本 (归一化后)",children:u.jsx("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,maxHeight:300,overflow:"auto"},children:JSON.stringify(e.firstItem,null,2)})}),e.responsePreview&&u.jsx(c.Card,{size:"small",title:"响应预览 (前 4KB)",children:u.jsx("pre",{style:{background:"#f5f5f5",padding:12,borderRadius:4,maxHeight:300,overflow:"auto",fontSize:12},children:e.responsePreview})}),e.fieldErrors&&e.fieldErrors.length>0&&u.jsx(c.Alert,{type:"warning",showIcon:!0,message:"字段问题",description:u.jsx("ul",{children:e.fieldErrors.map((t,r)=>u.jsx("li",{children:t},r))})})]}):u.jsx(c.Alert,{type:"error",showIcon:!0,message:"试运行失败",description:e.errorMessage||"未知错误"}):null}const _s=[{value:"STANDARD_JSON",label:"标准 JSON (按统一契约返回的 JSON)"},{value:"RSS_XML",label:"RSS 2.0 (XML feed)"},{value:"ATOM_XML",label:"Atom 1.0 (XML feed)"},{value:"CUSTOM_SCRIPT",label:"自定义脚本 (z-script 平台)"},{value:"INTERNAL_BEAN",label:"内部 Bean (我们自己的模块, 暂未启用)"}],As=[{value:"NONE",label:"无鉴权"},{value:"BEARER",label:"Bearer (Authorization: Bearer xxx)"},{value:"API_KEY",label:"API Key (Authorization: xxx)"},{value:"BASIC",label:"Basic (user:password base64)"}],Cs=[{label:"每 5 分钟",value:"0 */5 * * * ?"},{label:"每 15 分钟",value:"0 */15 * * * ?"},{label:"每小时",value:"0 0 * * * ?"},{label:"每 6 小时",value:"0 0 */6 * * ?"},{label:"每天 8 点",value:"0 0 8 * * ?"}];function lt(){const{id:e}=re.useParams(),t=re.useNavigate(),r=!!e,[n]=c.Form.useForm(),[s,o]=I.useState(!1),[a,f]=I.useState(!1),[d,g]=I.useState([]),[b,x]=I.useState([]),O=c.Form.useWatch("sourceType",n),R=c.Form.useWatch("extractorType",n),N=c.Form.useWatch("authType",n);I.useEffect(()=>{T(),B(),r&&y()},[e]);const T=async()=>{try{const p=await q.get("/secret/list"),v=(p==null?void 0:p.data)??p??[];g(Array.isArray(v)?v:[])}catch{}},B=async()=>{try{const p=await q.get("/script/list"),v=(p==null?void 0:p.data)??p??[];x(Array.isArray(v)?v.filter(k=>k.status===1):[])}catch{}},y=async()=>{o(!0);try{const p=await q.get(`/subscribe/subscription/${e}`),v=(p==null?void 0:p.data)??p;v&&n.setFieldsValue({...v,enabled:v.enabled===1||v.enabled===!0})}catch(p){c.message.error("加载订阅失败: "+((p==null?void 0:p.message)||""))}finally{o(!1)}},m=async()=>{try{const p=await n.validateFields();f(!0);const v={...p,enabled:p.enabled?1:0};let k;if(r?k=await q.put("/subscribe/subscription",v):k=await q.post("/subscribe/subscription",v),k&&k.success===!1){c.message.error(k.message||"保存失败");return}c.message.success(r?"已更新 (注意: 修改 cron / url / 抽取器后会自动重置为 PENDING_VERIFY)":"已创建, 已自动验证"),t("/subscribe/list")}catch(p){p!=null&&p.errorFields?c.message.warning("请检查表单"):c.message.error("保存失败: "+((p==null?void 0:p.message)||""))}finally{f(!1)}};return u.jsx("div",{style:{padding:24},children:u.jsx(c.Card,{title:u.jsxs(c.Space,{children:[u.jsx(c.Button,{type:"text",icon:u.jsx(D.ArrowLeftOutlined,{}),onClick:()=>t("/subscribe/list")}),u.jsx(D.ApiOutlined,{}),r?`编辑订阅 #${e}`:"新建订阅"]}),extra:u.jsxs(c.Space,{children:[u.jsx(c.Button,{onClick:()=>t("/subscribe/list"),children:"取消"}),u.jsx(c.Button,{type:"primary",icon:u.jsx(D.SaveOutlined,{}),loading:a,onClick:m,children:"保存 (自动验证)"})]}),children:u.jsx(c.Spin,{spinning:s,children:u.jsxs(c.Form,{form:n,layout:"vertical",initialValues:{sourceType:"HTTP",httpMethod:"GET",authType:"NONE",extractorType:"STANDARD_JSON",enabled:!0,minIntervalSec:60,maxItemsPerRun:1e3,timeoutMs:15e3},children:[u.jsxs(c.Card,{type:"inner",title:"基本信息",style:{marginBottom:16},children:[u.jsx(c.Form.Item,{label:"名称",name:"name",rules:[{required:!0,message:"请输入名称"}],children:u.jsx(c.Input,{placeholder:"例如: GitHub PR 通知"})}),u.jsx(c.Form.Item,{label:"说明",name:"description",children:u.jsx(c.Input.TextArea,{rows:2,placeholder:"(可选)"})})]}),u.jsxs(c.Card,{type:"inner",title:"数据源",style:{marginBottom:16},children:[u.jsx(c.Form.Item,{label:"数据源形态",name:"sourceType",rules:[{required:!0}],children:u.jsxs(c.Radio.Group,{children:[u.jsx(c.Radio.Button,{value:"HTTP",children:"HTTP / HTTPS"}),u.jsx(c.Radio.Button,{value:"INTERNAL",disabled:!0,children:"内部 Bean (TODO)"})]})}),O==="HTTP"&&u.jsxs(u.Fragment,{children:[u.jsx(c.Form.Item,{label:"目标 URL",name:"targetUrl",rules:[{required:!0,message:"请输入 URL"}],children:u.jsx(c.Input,{placeholder:"https://api.github.com/repos/.../pulls?state=open"})}),u.jsxs(c.Space,{size:"large",style:{width:"100%"},children:[u.jsx(c.Form.Item,{label:"HTTP 方法",name:"httpMethod",children:u.jsx(c.Select,{style:{width:120},options:[{value:"GET",label:"GET"},{value:"POST",label:"POST"},{value:"PUT",label:"PUT"}]})}),u.jsx(c.Form.Item,{label:"超时 (ms)",name:"timeoutMs",children:u.jsx(c.InputNumber,{min:1e3,max:12e4,step:1e3})})]}),u.jsx(c.Form.Item,{label:"自定义 HTTP 头 (JSON)",name:"httpHeaders",children:u.jsx(c.Input.TextArea,{rows:2,placeholder:'{"X-Trace-Id":"abc"}'})}),u.jsx(c.Form.Item,{label:"请求体 (POST/PUT)",name:"requestBody",children:u.jsx(c.Input.TextArea,{rows:3,placeholder:"(可选)"})})]})]}),u.jsxs(c.Card,{type:"inner",title:"鉴权 (从 z-mist 拉取 secret)",style:{marginBottom:16},children:[u.jsx(c.Form.Item,{label:"鉴权方式",name:"authType",children:u.jsx(c.Select,{options:As})}),N&&N!=="NONE"&&u.jsx(c.Form.Item,{label:"z-mist 凭据引用",name:"authSecretKey",extra:"从密钥中心 (z-mist) 选一个 secret; secret 的解密值会作为 secret 注入",children:u.jsx(c.Select,{showSearch:!0,allowClear:!0,placeholder:"选择 secret (key)",options:d.map(p=>({value:p.secretKey,label:`${p.secretKey}${p.secretName?" ("+p.secretName+")":""}`}))})})]}),u.jsxs(c.Card,{type:"inner",title:"抽取器",style:{marginBottom:16},children:[u.jsx(c.Form.Item,{label:"抽取器类型",name:"extractorType",rules:[{required:!0}],extra:"STANDARD_JSON/RSS_XML/ATOM_XML 直接解析; CUSTOM_SCRIPT 调 z-script 平台",children:u.jsx(c.Select,{options:_s})}),R==="CUSTOM_SCRIPT"&&u.jsx(c.Form.Item,{label:"z-script 脚本",name:"extractorScriptCode",rules:[{required:!0,message:"请选择脚本"}],extra:"在 智能中心 > 脚本中心 维护脚本. 脚本返回 { items: [...], nextCursor: '...' }",children:u.jsx(c.Select,{showSearch:!0,placeholder:"选择已启用的脚本",options:b.map(p=>({value:p.scriptCode,label:`${p.scriptCode} (${p.dslType})${p.scriptName?" - "+p.scriptName:""}`}))})})]}),u.jsxs(c.Card,{type:"inner",title:"调度",style:{marginBottom:16},children:[u.jsx(c.Form.Item,{label:"Cron 表达式",name:"cronExpr",rules:[{required:!0,message:"请输入 Cron"}],extra:"Quartz 兼容, 例如 0 */5 * * * ? = 每 5 分钟",children:u.jsx(c.Input,{addonAfter:u.jsx(c.Select,{style:{width:140},placeholder:"常用",options:Cs,onChange:p=>n.setFieldValue("cronExpr",p),value:null})})}),u.jsxs(c.Space,{size:"large",children:[u.jsx(c.Form.Item,{label:"启用",name:"enabled",valuePropName:"checked",children:u.jsxs(c.Radio.Group,{children:[u.jsx(c.Radio.Button,{value:!0,children:"启用"}),u.jsx(c.Radio.Button,{value:!1,children:"停用"})]})}),u.jsx(c.Form.Item,{label:"最小间隔 (秒)",name:"minIntervalSec",extra:"距上次 run 至少 N 秒",children:u.jsx(c.InputNumber,{min:0,max:3600})}),u.jsx(c.Form.Item,{label:"单次最多条数",name:"maxItemsPerRun",children:u.jsx(c.InputNumber,{min:1,max:1e4})})]})]}),u.jsx(c.Alert,{type:"success",showIcon:!0,message:"保存后会自动 dry-run: 真实 HTTP 一次, 把响应喂给抽取器, 失败时订阅进入 INVALID_AUTH 状态, 不会自动调度."})]})})})})}const Ns={PENDING:"default",RUNNING:"processing",SUCCESS:"green",EMPTY:"default",FAILED:"red",FATAL:"red"};function ir(){const[e,t]=I.useState([]),[r,n]=I.useState(null),[s,o]=I.useState([]),[a,f]=I.useState([]),[d,g]=I.useState(null),[b,x]=I.useState(!1);I.useEffect(()=>{O()},[]),I.useEffect(()=>{r&&R(r)},[r]);const O=async()=>{try{const m=await q.get("/subscribe/subscription/list"),p=(m==null?void 0:m.data)??m??[];t(Array.isArray(p)?p:[]),Array.isArray(p)&&p.length>0&&n(p[0].id)}catch{c.message.error("加载订阅列表失败")}},R=async m=>{x(!0);try{const p=await q.get(`/subscribe/run/list?subscriptionId=${m}&limit=50`),v=(p==null?void 0:p.data)??p??[];o(Array.isArray(v)?v:[])}catch{c.message.error("加载运行历史失败")}finally{x(!1)}},N=async m=>{g(m);try{const p=await q.get(`/subscribe/run/${m}/items?limit=200`),v=(p==null?void 0:p.data)??p??[];f(Array.isArray(v)?v:[])}catch{c.message.error("加载抽取项失败")}},T=s.reduce((m,p)=>m+(p.successCount||0),0),B=s.reduce((m,p)=>m+(p.deadLetterCount||0),0),y=s.reduce((m,p)=>m+(p.duplicateCount||0),0);return u.jsx("div",{style:{padding:24},children:u.jsxs(c.Card,{title:u.jsxs(c.Space,{children:[u.jsx(D.ApiOutlined,{}),"订阅中心 - 运行历史"]}),extra:u.jsxs(c.Space,{children:[u.jsx(c.Select,{style:{width:280},placeholder:"选择订阅",value:r,onChange:n,options:e.map(m=>({value:m.id,label:m.name})),showSearch:!0,optionFilterProp:"label"}),u.jsxs("a",{onClick:()=>r&&R(r),children:[u.jsx(D.ReloadOutlined,{})," 刷新"]})]}),children:[u.jsxs(c.Row,{gutter:16,style:{marginBottom:16},children:[u.jsx(c.Col,{span:6,children:u.jsx(c.Card,{children:u.jsx(c.Statistic,{title:"run 总数",value:s.length})})}),u.jsx(c.Col,{span:6,children:u.jsx(c.Card,{children:u.jsx(c.Statistic,{title:"成功条数",value:T,valueStyle:{color:"#3f8600"}})})}),u.jsx(c.Col,{span:6,children:u.jsx(c.Card,{children:u.jsx(c.Statistic,{title:"死信条数",value:B,valueStyle:{color:"#cf1322"}})})}),u.jsx(c.Col,{span:6,children:u.jsx(c.Card,{children:u.jsx(c.Statistic,{title:"重复跳过",value:y})})})]}),u.jsxs(c.Row,{gutter:16,children:[u.jsx(c.Col,{span:12,children:u.jsx(c.Card,{type:"inner",title:`运行列表 (${s.length})`,size:"small",children:u.jsx(c.Table,{rowKey:"id",size:"small",loading:b,dataSource:s,pagination:{pageSize:10},onRow:m=>({onClick:()=>N(m.id),style:{cursor:"pointer",background:m.id===d?"#e6f7ff":""}}),columns:[{title:"ID",dataIndex:"id",width:60},{title:"计划",dataIndex:"scheduledAt",width:150,render:m=>m?new Date(m).toLocaleString():"-"},{title:"耗时",dataIndex:"durationMs",width:80},{title:"状态",dataIndex:"status",width:80,render:m=>u.jsx(c.Tag,{color:Ns[m],children:m})},{title:"拉取/成功/死信",width:150,render:(m,p)=>`${p.fetchedCount} / ${p.successCount} / ${p.deadLetterCount}`}]})})}),u.jsx(c.Col,{span:12,children:u.jsx(c.Card,{type:"inner",title:d?`run#${d} 抽取项 (${a.length})`:"抽取项",size:"small",children:a.length===0?u.jsx(c.Empty,{description:d?"该 run 无抽取项":"点击左侧 run 查看抽取项"}):u.jsx(c.Table,{rowKey:"id",size:"small",dataSource:a,pagination:{pageSize:10},columns:[{title:"id",dataIndex:"dedupKey",width:160,ellipsis:!0},{title:"title",dataIndex:"normalized",render:m=>{try{return JSON.parse(m).title||"(无标题)"}catch{return m}}},{title:"link",dataIndex:"normalized",width:60,render:m=>{try{const p=JSON.parse(m);return p.link?u.jsx("a",{href:p.link,target:"_blank",children:"↗"}):"-"}catch{return"-"}}},{title:"状态",dataIndex:"status",width:100,render:m=>u.jsx(c.Tag,{children:m})}]})})})]})]})})}function Ps(){return u.jsxs(re.Routes,{children:[u.jsx(re.Route,{index:!0,element:u.jsx(re.Navigate,{to:"list",replace:!0})}),u.jsx(re.Route,{path:"list",element:u.jsx(or,{})}),u.jsx(re.Route,{path:"new",element:u.jsx(lt,{})}),u.jsx(re.Route,{path:"edit/:id",element:u.jsx(lt,{})}),u.jsx(re.Route,{path:"runs",element:u.jsx(ir,{})})]})}X.RunHistory=ir,X.SubscribeApp=Ps,X.SubscriptionEdit=lt,X.SubscriptionList=or,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})}));
|