From cff69423d700d7b4aa5dfb98d469e0b47b00588b Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Mon, 6 Jul 2026 16:35:22 +0800 Subject: [PATCH] 1 --- .../{index-Dx-bvo36.js => index-C4H6x_-U.js} | 2 +- video-gen-admin/dist/index.html | 72 +++++++++---------- .../src/pages/AdminCreditRecords.tsx | 2 + video-gen-api/app/api/v1/team.py | 4 +- .../{index-D7ovjI8j.js => index-DlbOvnzQ.js} | 2 +- video-gen-app/dist/index.html | 2 +- .../src/pages/TeamManagementPage.tsx | 72 +++++++++++++------ 7 files changed, 92 insertions(+), 64 deletions(-) rename video-gen-admin/dist/assets/{index-Dx-bvo36.js => index-C4H6x_-U.js} (99%) rename video-gen-app/dist/assets/{index-D7ovjI8j.js => index-DlbOvnzQ.js} (99%) diff --git a/video-gen-admin/dist/assets/index-Dx-bvo36.js b/video-gen-admin/dist/assets/index-C4H6x_-U.js similarity index 99% rename from video-gen-admin/dist/assets/index-Dx-bvo36.js rename to video-gen-admin/dist/assets/index-C4H6x_-U.js index af26ee72..b40f4570 100644 --- a/video-gen-admin/dist/assets/index-Dx-bvo36.js +++ b/video-gen-admin/dist/assets/index-C4H6x_-U.js @@ -530,7 +530,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `);break;case``:l=!0;break;case``:l=!1;break;case``:case``:case``:break;case``:l=!1;break;default:if(!l&&o.WTF)throw Error(`unrecognized `+n[0]+` in threaded comments`)}return e}),s)))}),_&&_.length&&oc(g,_,!0,c.people||[])}catch(e){if(c.WTF)throw e}var v,h}function Gd(e){return e.charAt(0)==`/`?e.slice(1):e}function Kd(e,t){if(De(),Vd(t||={}),ot(e,`META-INF/manifest.xml`)||ot(e,`objectdata.xml`))return ld(e,t);if(ot(e,`Index/Document.iwa`)){if(typeof Uint8Array>`u`)throw Error(`NUMBERS file parsing requires Uint8Array support`);if(e.FileIndex)return Rd(e);var n=Ne.utils.cfb_new();return ut(e).forEach(function(t){dt(n,t,function e(t,n,r){if(!r)return at(st(t,n));if(!n)return null;try{return e(t,n)}catch{return null}}(e,t))}),Rd(n)}if(!ot(e,`[Content_Types].xml`))throw ot(e,`index.xml.gz`)?Error(`Unsupported NUMBERS 08 file`):ot(e,`index.xml`)?Error(`Unsupported NUMBERS 09 file`):Error(`Unsupported ZIP file`);var r,i,a=ut(e),o=function(e){var t=Qr();if(!e||!e.match)return t;var n={};if((e.match(vt)||[]).forEach(function(e){var r=xt(e);switch(r[0].replace(yt,`<`)){case`]*>([\\s\\S]*?)`));n&&0`:r=null;break;default:if(o.indexOf(``),l=c[0].slice(4),u=c[1];switch(l){case`lpstr`:case`bstr`:case`lpwstr`:n[r]=Dt(u);break;case`bool`:n[r]=Lt(u);break;case`i1`:case`i2`:case`i4`:case`i8`:case`int`:case`uint`:n[r]=parseInt(u,10);break;case`r4`:case`r8`:case`decimal`:n[r]=parseFloat(u);break;case`filetime`:case`date`:n[r]=Ye(u);break;case`cy`:case`error`:n[r]=Dt(u);break;default:if(l.slice(-1)==`/`)break;t.WTF&&typeof console<`u`&&console.warn(`Unexpected`,o,l,c)}}else if(o.slice(0,2)!==``:break;case``:break;case``:case``:case``:break;case``:O=!1;break;default:if(!O&&E.WTF)throw Error(`unrecognized `+t[0]+` in threaded comments`)}return e}),D)),k&&=Ud(k,p.Sheets);var A=+!!ct(e,`xl/worksheets/sheet.xml`,!0);e:for(b=0;b!=m.Worksheets;++b){var j=`sheet`;if(k&&k[b]?(v=`xl/`+k[b][1].replace(/[\/]?xl\//,``),ot(e,v)||(v=k[b][1]),ot(e,v)||(v=T.replace(/_rels\/.*$/,``)+k[b][1]),j=k[b][2]):v=(v=`xl/worksheets/sheet`+(b+1-A)+`.`+w).replace(/sheet0\./,`sheet.`),y=v.replace(/^(.*)(\/)([^\/]*)$/,`$1/_rels/$3.rels`),t&&t.sheets!=null)switch(typeof t.sheets){case`number`:if(b!=t.sheets)continue e;break;case`string`:if(m.SheetNames[b].toLowerCase()!=t.sheets.toLowerCase())continue e;break;default:if(Array.isArray&&Array.isArray(t.sheets)){for(var M=!1,N=0;N!=t.sheets.length;++N)typeof t.sheets[N]==`number`&&t.sheets[N]==b&&(M=1),typeof t.sheets[N]==`string`&&t.sheets[N].toLowerCase()==m.SheetNames[b].toLowerCase()&&(M=1);if(!M)continue e}}Wd(e,v,y,m.SheetNames[b],b,x,r,j,t,p,c,l)}return _={Directory:o,Workbook:p,Props:m,Custprops:g,Deps:h,Sheets:r,SheetNames:m.SheetNames,Strings:el,Styles:l,Themes:c,SSF:Ze(V)},t&&t.bookFiles&&(e.files?(_.keys=a,_.files=e.files):(_.keys=[],_.files={},e.FullPaths.forEach(function(t,n){t=t.replace(/^Root Entry[\/]/,``),_.keys.push(t),_.files[t]=e.FileIndex[n]}))),t&&t.bookVBA&&(0/,`>`)];return e.forEach(function(e){var i=``;(e[1]||[]).forEach(function(a,o){var s;a.T?(a.a&&t.indexOf(a.a)==-1&&t.push(a.a),s={ref:e[0],id:`{54EE7951-7262-4200-6969-`+(`000000000000`+ n.tcid++).slice(-12)+`}`},o==0?i=s.id:s.parentId=i,a.ID=s.id,a.a&&(s.personId=`{54EE7950-7262-4200-6969-`+(`000000000000`+t.indexOf(a.a)).slice(-12)+`}`),r.push(nn(`threadedComment`,en(`text`,a.t||``),s))):delete a.ID})}),r.push(``),r.join(``)}(f,d,t)),i.threadedcomments.push(m),ii(g,-1,`../threadedComments/threadedComment`+s+`.`+n,ei.TCMNT)),dt(a,m=`xl/comments`+s+`.`+n,sc(f)),i.comments.push(m),ii(g,-1,`../comments`+s+`.`+n,ei.CMNT),p=!0),_[`!legacy`]&&p&&dt(a,`xl/drawings/vmlDrawing`+s+`.vml`,ac(s,_[`!comments`])),delete _[`!comments`],delete _[`!legacy`]),g[`!id`].rId1&&dt(a,ti(o),ri(g))}return t.Strings!=null&&0/,`>`)],r.forEach(function(e,t){u.push(nn(`person`,null,{displayName:e,id:`{54EE7950-7262-4200-6969-`+(`000000000000`+t).slice(-12)+`}`,userId:e,providerId:`None`}))}),u.push(``),u.join(``))),i.people.push(o),ii(t.wbrels,-1,`persons/person.xml`,ei.PEOPLE)),dt(a,`[Content_Types].xml`,$r(i,t)),dt(a,`_rels/.rels`,ri(t.rels)),dt(a,`xl/_rels/workbook.xml.rels`,ri(t.wbrels)),delete t.revssf,delete t.ssf,a}function Xd(e,t){var n=``;switch((t||{}).type||`base64`){case`buffer`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];case`base64`:n=b(e.slice(0,12));break;case`binary`:n=e;break;case`array`:return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]];default:throw Error(`Unrecognized type `+(t&&t.type||`undefined`))}return[n.charCodeAt(0),n.charCodeAt(1),n.charCodeAt(2),n.charCodeAt(3),n.charCodeAt(4),n.charCodeAt(5),n.charCodeAt(6),n.charCodeAt(7)]}function Zd(e,t){var n=0;e:for(;n`u`||x||(r.type=`array`)),r.type==`string`&&(d=!0,r.type=`binary`,r.codepage=65001,u=(f=e).match(/[^\x00-\x7F]/)?Kt(f):f),r.type==`array`&&typeof Uint8Array<`u`&&e instanceof Uint8Array&&typeof ArrayBuffer<`u`){var f=new ArrayBuffer(3),f=new Uint8Array(f);if(f.foo=`bar`,!f.foo)return(r=Ze(r)).type=`array`,$d(O(u),r)}switch((i=Xd(u,r))[0]){case 208:if(i[1]===207&&i[2]===17&&i[3]===224&&i[4]===161&&i[5]===177&&i[6]===26&&i[7]===225)return s=Ne.read(u,r),c=r,(Ne.find(s,`EncryptedPackage`)?qd:Iu)(s,c);break;case 9:if(i[1]<=8)return Iu(u,r);break;case 60:return Cu(u,r);case 73:if(i[1]===73&&i[2]===42&&i[3]===0)throw Error(`TIFF Image File is not a spreadsheet`);if(i[1]===68)return function(e,t){var n=t||{},r=!!n.WTF;n.WTF=!0;try{var i=Ra.to_workbook(e,n);return n.WTF=r,i}catch(i){if(n.WTF=r,!i.message.match(/SYLK bad record ID/)&&r)throw i;return to.to_workbook(e,t)}}(u,r);break;case 84:if(i[1]===65&&i[2]===66&&i[3]===76)return Va.to_workbook(u,r);break;case 80:return i[1]===75&&i[2]<9&&i[3]<9?(o=c=u,(a=(a=r)||{}).type||(a.type=x&&Buffer.isBuffer(c)?`buffer`:`base64`),Kd(pt(o,a),a)):Qd(e,u,r,d);case 239:return i[3]===60?Cu(u,r):Qd(e,u,r,d);case 255:if(i[1]===254)return o=u,(a=r).type==`base64`&&(o=b(o)),o=n.utils.decode(1200,o.slice(2),`str`),a.type=`binary`,Zd(o,a);if(i[1]===0&&i[2]===2&&i[3]===0)return fo.to_workbook(u,r);break;case 0:if(i[1]===0&&(2<=i[2]&&i[3]===0||i[2]===0&&(i[3]===8||i[3]===9)))return fo.to_workbook(u,r);break;case 3:case 131:case 139:case 140:return Ma.to_workbook(u,r);case 123:if(i[1]===92&&i[2]===114&&i[3]===116)return rs.to_workbook(u,r);break;case 10:case 13:case 32:return function(e,t){var n=``,r=Xd(e,t);switch(t.type){case`base64`:n=b(e);break;case`binary`:n=e;break;case`buffer`:n=e.toString(`binary`);break;case`array`:n=Xe(e);break;default:throw Error(`Unrecognized type `+t.type)}return r[0]==239&&r[1]==187&&r[2]==191&&(n=Gt(n)),t.type=`binary`,Zd(n,t)}(u,r);case 137:if(i[1]===80&&i[2]===78&&i[3]===71)throw Error(`PNG Image File is not a spreadsheet`)}return-1t)return t;throw Error(`Cannot find sheet # `+t)}if(typeof t!=`string`)throw Error(`Cannot find sheet |`+t+`|`);if(-1<(e=e.SheetNames.indexOf(t)))return e;throw Error(`Cannot find sheet name |`+t+`|`)}(e,t),e.Workbook.Sheets[t]||(e.Workbook.Sheets[t]={}),n){case 0:case 1:case 2:break;default:throw Error(`Bad sheet visibility setting `+n)}e.Workbook.Sheets[t].Hidden=n},cell_set_number_format:function(e,t){return e.z=t,e},cell_set_hyperlink:bf,cell_set_internal_link:function(e,t,n){return bf(e,`#`+t,n)},cell_add_comment:function(e,t,n){e.c||=[],e.c.push({t,a:n||`SheetJS`})},sheet_set_array_formula:function(e,t,n,r){for(var i=typeof t==`string`?sr(t):t,a=typeof t==`string`?t:or(t),o=i.s.r;o<=i.e.r;++o)for(var s=i.s.c;s<=i.e.c;++s){var c=_f(e,o,s);c.t=`n`,c.F=a,delete c.v,o==i.s.r&&s==i.s.c&&(c.f=n,r&&(c.D=!0))}return e},consts:{SHEET_VISIBLE:0,SHEET_HIDDEN:1,SHEET_VERY_HIDDEN:2}};function Sf(e){xf=e}var fa={to_json:function(e,t){var n=xf({objectMode:!0});if(e==null||e[`!ref`]==null)return n.push(null),n;var r,i={t:`n`,v:0},a=0,o=1,s=[],c=``,l={s:{r:0,c:0},e:{r:0,c:0}},u=t||{},d=u.range==null?e[`!ref`]:u.range;switch(u.header===1?a=1:u.header===`A`?a=2:Array.isArray(u.header)&&(a=3),typeof d){case`string`:l=sr(d);break;case`number`:(l=sr(e[`!ref`])).s.r=d;break;default:l=d}0a.e.r)return s||(s=!0,n.push(``+i)),n.push(null);for(;o<=a.e.r;){n.push($u(e,a,o,r)),++o;break}},n},to_csv:function(e,t){var n=xf(),r=t??{};if(e==null||e[`!ref`]==null)return n.push(null),n;var i=sr(e[`!ref`]),a=r.FS===void 0?`,`:r.FS,o=a.charCodeAt(0),s=r.RS===void 0?` -`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=nr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),je.writeFile(e,sf(t,i),r)},e.utils=Da,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=Oe,fa!==void 0&&(e.stream=fa),Ne!==void 0&&(e.CFB=Ne),u===void 0||((fa=V5())||{}).Readable&&Sf(fa.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),U5={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},W5={vertical:`center`,wrapText:!0},vHe={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...W5,horizontal:`center`},border:U5},yHe={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...W5,horizontal:`center`},border:U5},bHe={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...W5,horizontal:`left`},border:U5},xHe={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...W5,horizontal:`center`},border:U5},SHe={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...W5,horizontal:`left`},border:U5};function G5(e){return e??``}function K5(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function q5(e,t,n){return Math.min(n,Math.max(t,e))}function CHe(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,K5(t[r])),K5(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:q5(Math.ceil(a*1.15)+2,o,s)}})}function wHe(e,t,n=20){return q5(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(K5(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function J5(e,t,n){e.s={...t,alignment:{...t.alignment},border:U5},n&&(e.z=n)}function Y5(e){return typeof e==`number`&&Number.isFinite(e)}function THe(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(G5))),a.forEach(e=>l.push(e.map(G5))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>G5(n.render(e,t))))});let f=H5.utils.aoa_to_sheet(l),p=H5.utils.decode_range(f[`!ref`]||`A1:A1`),m=CHe(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:wHe(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:H5.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=H5.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){J5(r,vHe);continue}if(e===d){J5(r,xHe);continue}if(e{let[e,t]=(0,C.useState)([]),[n,r]=(0,C.useState)(X5),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(``),[f,p]=(0,C.useState)(1),[m,h]=(0,C.useState)(10),[g,_]=(0,C.useState)(``),[v,y]=(0,C.useState)(``),[b,x]=(0,C.useState)([]),[S,w]=(0,C.useState)(``),[T,E]=(0,C.useState)(``),[D,O]=(0,C.useState)(``),[k,A]=(0,C.useState)(``),[j,M]=(0,C.useState)(``),[N,P]=(0,C.useState)(``),[F,I]=(0,C.useState)(``),[L,R]=(0,C.useState)(``),[z,B]=(0,C.useState)([null,null]),V=(0,C.useMemo)(()=>({page:f,pageSize:m,userName:L||void 0,teamId:v||void 0,recordType:S||void 0,creditSubject:T||void 0,mediaType:D||void 0,chargeKind:k||void 0,sourceModule:j||void 0,sourceStepCode:N||void 0,billingScene:F||void 0,startDate:z[0]?.format(`YYYY-MM-DD`),endDate:z[1]?.format(`YYYY-MM-DD`),...IHe(g)}),[f,m,L,v,S,T,D,k,j,N,F,z,g]),H=async()=>{s(!0);try{let e=await m5(V);t(e.items||[]),a(e.total||0),r(e.summary||X5)}catch(e){CP.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};(0,C.useEffect)(()=>{H()},[V]),(0,C.useEffect)(()=>{l5(!0).then(x).catch(()=>{})},[]);let U=()=>{_(``),y(``),w(``),E(``),O(``),A(``),M(``),P(``),I(``),R(``),B([null,null]),p(1)},W=async()=>{l(!0),d(`准备导出...`);try{let e={...V,page:1,pageSize:500},t=await m5(e),n=[...t.items||[]],r=t.summary||X5,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await m5({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}THe({filename:`积分流水_${(0,tC.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${z[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${z[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,tC.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>I5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`归属团队`,maxWidth:20,render:e=>e.teamNameSnapshot||`未分配团队`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>Q5(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),CP.success(`Excel 已导出`)}catch(e){CP.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},ee=[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(ER,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`归属团队`,dataIndex:`teamNameSnapshot`,width:130,render:e=>e?(0,Q.jsx)(ER,{color:`blue`,children:e}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`未分配`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=DHe[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(ER,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(ER,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(ER,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,Z5(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>Z5(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:Z5(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,Z5(t.inputTokens),` / 出 `,Z5(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(ER,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:Q5(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(ER,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:I5(e)})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(VH,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,Z5(n.totalRecharge)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(MH,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,Z5(n.totalConsume)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(G2,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,Z5(n.totalRefund)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(p8,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[Z5(n.transactionCount),` / `,Z5(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`图片生成:`,Z5(n.imageGenerationCount),` 条 / `,Z5(n.imageConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`视频生成:`,Z5(n.videoGenerationCount),` 条 / `,Z5(n.videoConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`提词消费:`,Z5(n.textConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`视频分析:`,Z5(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(FM,{wrap:!0,children:[(0,Q.jsx)(Tb,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:OHe}),(0,Q.jsx)(Tb,{value:v,onChange:e=>{p(1),y(e)},style:{width:170},options:[{value:``,label:`全部团队`},{value:EHe,label:`未分配团队`},...b.map(e=>({value:e.id,label:e.status===`disabled`?`${e.name}(禁用)`:e.name}))]}),(0,Q.jsx)(Tb,{value:S,onChange:e=>{p(1),w(e)},style:{width:130},options:kHe}),(0,Q.jsx)(Tb,{value:T,onChange:e=>{p(1),E(e)},style:{width:180},options:AHe}),(0,Q.jsx)(Tb,{value:D,onChange:e=>{p(1),O(e)},style:{width:110},options:jHe}),(0,Q.jsx)(Tb,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:MHe}),(0,Q.jsx)(Tb,{value:j,onChange:e=>{p(1),M(e)},style:{width:150},options:NHe}),(0,Q.jsx)(Tb,{value:N,onChange:e=>{p(1),P(e)},style:{width:150},options:PHe}),(0,Q.jsx)(Tb,{value:F,onChange:e=>{p(1),I(e)},style:{width:220},options:FHe}),(0,Q.jsx)(WN,{placeholder:`用户名/手机号/邮箱`,value:L,onChange:e=>{p(1),R(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(hM.RangePicker,{value:z,onChange:e=>{p(1),B(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(FM,{children:[(0,Q.jsx)($S,{onClick:U,children:`重置`}),(0,Q.jsx)($S,{icon:(0,Q.jsx)(VP,{}),onClick:H,children:`刷新`}),(0,Q.jsx)($S,{type:`primary`,icon:(0,Q.jsx)(mB,{}),loading:c,onClick:W,children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(pR,{columns:ee,dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:2050}})]})]})},RHe=()=>{let[e,t]=(0,C.useState)(!1),[n,r]=(0,C.useState)(!1),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await RBe(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{CP.error(`加载支付配置失败`)}};return(0,C.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(dM,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(FM.Compact,{style:{width:140},children:[(0,Q.jsx)(Nj,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(sY,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(lF,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(y8,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(lF,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(WN,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(WN,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` +`:r.RS,c=s.charCodeAt(0),l=RegExp((a==`|`?`\\|`:a)+`+$`),u=``,d=[];r.dense=Array.isArray(e);for(var f=r.skipHidden&&e[`!cols`]||[],p=r.skipHidden&&e[`!rows`]||[],m=i.s.c;m<=i.e.c;++m)(f[m]||{}).hidden||(d[m]=nr(m));var h=i.s.r,g=!1,_=0;return n._read=function(){if(!g)return g=!0,n.push(``);for(;h<=i.e.r;)if(++h,!(p[h-1]||{}).hidden&&(u=pf(e,i,h-1,d,o,c,a,r),u!=null&&((u=r.strip?u.replace(l,``):u)||!1!==r.blankrows)))return n.push((_++?s:``)+u);return n.push(null)},n},set_readable:Sf},Cf=function(){function e(t,n,r){return this instanceof e?(this.tagName=t,this._attributes=n||{},this._children=r||[],this._prefix=``,this):new e(t,n,r)}return e.prototype.createElement=function(){return new e(arguments)},e.prototype.children=function(){return this._children},e.prototype.append=function(e){return this._children.push(e),this},e.prototype.prefix=function(e){return arguments.length==0?this._prefix:(this._prefix=e,this)},e.prototype.attr=function(e,t){if(t==null)return delete this._attributes[e],this;if(arguments.length==0)return this._attributes;if(typeof e==`string`&&arguments.length==1)return this._attributes.attr[e];if(typeof e==`object`&&arguments.length==1)for(var n in e)this._attributes[n]=e[n];else arguments.length==2&&typeof e==`string`&&(this._attributes[e]=t);return this},e.prototype.escapeAttributeValue=function(e){return`"`+e.replace(/\"/g,`"`)+`"`},e.prototype.toXml=function(e){var t=(e||=this)._prefix;if(t+=`<`+e.tagName,e._attributes)for(var n in e._attributes)t+=` `+n+`=`+this.escapeAttributeValue(``+e._attributes[n]);if(e._children&&0`;for(var r=0;r`}else t+=`/>`;return t},e}(),wf=function(e){var t,n=164,r={0:`General`,1:`0`,2:`0.00`,3:`#,##0`,4:`#,##0.00`,9:`0%`,10:`0.00%`,11:`0.00E+00`,12:`# ?/?`,13:`# ??/??`,14:`m/d/yy`,15:`d-mmm-yy`,16:`d-mmm`,17:`mmm-yy`,18:`h:mm AM/PM`,19:`h:mm:ss AM/PM`,20:`h:mm`,21:`h:mm:ss`,22:`m/d/yy h:mm`,37:`#,##0 ;(#,##0)`,38:`#,##0 ;[Red](#,##0)`,39:`#,##0.00;(#,##0.00)`,40:`#,##0.00;[Red](#,##0.00)`,45:`mm:ss`,46:`[h]:mm:ss`,47:`mmss.0`,48:`##0.0E+0`,49:`@`,56:`"上午/下午 "hh"時"mm"分"ss"秒 "`},i={};for(t in r)i[r[t]]=t;var a={};return{initialize:function(e){this.$fonts=Cf(`fonts`).attr(`count`,0).attr(`x14ac:knownFonts`,`1`),this.$fills=Cf(`fills`).attr(`count`,0),this.$borders=Cf(`borders`).attr(`count`,0),this.$numFmts=Cf(`numFmts`).attr(`count`,0),this.$cellStyleXfs=Cf(`cellStyleXfs`),this.$xf=Cf(`xf`).attr(`numFmtId`,0).attr(`fontId`,0).attr(`fillId`,0).attr(`borderId`,0),this.$cellXfs=Cf(`cellXfs`).attr(`count`,0),this.$cellStyles=Cf(`cellStyles`).append(Cf(`cellStyle`).attr(`name`,`Normal`).attr(`xfId`,0).attr(`builtinId`,0)),this.$dxfs=Cf(`dxfs`).attr(`count`,`0`),this.$tableStyles=Cf(`tableStyles`).attr(`count`,`0`).attr(`defaultTableStyle`,`TableStyleMedium9`).attr(`defaultPivotStyle`,`PivotStyleMedium4`),this.$styles=Cf(`styleSheet`).attr(`xmlns:mc`,`http://schemas.openxmlformats.org/markup-compatibility/2006`).attr(`xmlns:x14ac`,`http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac`).attr(`xmlns`,`http://schemas.openxmlformats.org/spreadsheetml/2006/main`).attr(`mc:Ignorable`,`x14ac`).prefix(``).append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var t=e.defaultCellStyle||{};return t.font||={name:`Calibri`,sz:`11`},t.font.name||(t.font.name=`Calibri`),t.font.sz||(t.font.sz=11),t.fill||={patternType:`none`,fgColor:{}},t.border||={},t.numFmt||=0,this.defaultStyle=t,e=JSON.parse(JSON.stringify(t)),e.fill={patternType:`gray125`,fgColor:{}},this.addStyles([t,e]),this},addStyle:function(e){var t=JSON.stringify(e),n=a[t];return n==null?(n=this._addXf(e),a[t]=n):n=a[t],n},addStyles:function(e){var t=this;return e.map(function(e){return t.addStyle(e)})},_duckTypeStyle:function(e){return typeof e==`object`&&(e.patternFill||e.fgColor)?{fill:e}:e.font||e.numFmt||e.border||e.fill?e:this._getStyleCSS(e)},_getStyleCSS:function(e){return e},_addXf:function(e){var t=this._addFont(e.font),n=this._addFill(e.fill),r=this._addBorder(e.border),i=this._addNumFmt(e.numFmt),a=Cf(`xf`).attr(`numFmtId`,i).attr(`fontId`,t).attr(`fillId`,n).attr(`borderId`,r).attr(`xfId`,`0`);return 0/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`),e=Cf(`numFmt`).attr(`numFmtId`,++n).attr(`formatCode`,e),this.$numFmts.append(e),e=this.$numFmts.children().length,this.$numFmts.attr(`count`,e),n)},_addFill:function(e){if(!e)return 0;var t,n=Cf(`patternFill`).attr(`patternType`,e.patternType||`solid`);return e.fgColor&&(t=Cf(`fgColor`),e.fgColor.rgb?(e.fgColor.rgb.length==6&&(e.fgColor.rgb=`FF`+e.fgColor.rgb),t.attr(`rgb`,e.fgColor.rgb),n.append(t)):e.fgColor.theme&&(t.attr(`theme`,e.fgColor.theme),e.fgColor.tint&&t.attr(`tint`,e.fgColor.tint),n.append(t)),e.bgColor||={indexed:`64`}),e.bgColor&&(e=Cf(`bgColor`).attr(e.bgColor),n.append(e)),n=Cf(`fill`).append(n),this.$fills.append(n),n=this.$fills.children().length,this.$fills.attr(`count`,n),n-1},_getSubBorder:function(e,t){var n=Cf(e);return t&&(n.attr(`style`,t.style||`medium`),t.color&&(e=Cf(`color`),t.color.auto?e.attr(`auto`,t.color.auto):t.color.rgb?e.attr(`rgb`,t.color.rgb):(t.color.theme||t.color.tint)&&(e.attr(`theme`,t.color.theme||`1`),e.attr(`tint`,t.color.tint||`0`)),n.append(e))),n},_addBorder:function(e){if(!e)return 0;var t=this,n=Cf(`border`).attr(`diagonalUp`,e.diagonalUp).attr(`diagonalDown`,e.diagonalDown);[`left`,`right`,`top`,`bottom`,`diagonal`].forEach(function(r){n.append(t._getSubBorder(r,e[r]))}),this.$borders.append(n);var r=this.$borders.children().length;return this.$borders.attr(`count`,r),r-1},toXml:function(){return this.$styles.toXml()}}.initialize(e||{})};Iu!==void 0&&(e.parse_xlscfb=Iu),e.parse_zip=Kd,e.read=$d,e.readFile=ef,e.readFileSync=ef,e.write=sf,e.writeFile=lf,e.writeFileSync=lf,e.writeFileAsync=function(e,t,n,r){var i=n||{};return i.type=`file`,i.file=e,cf(i),i.type=`buffer`,r instanceof Function||(r=n),je.writeFile(e,sf(t,i),r)},e.utils=Da,e.writeXLSX=of,e.writeFileXLSX=function(e,t,n){return(n||={}).type=`file`,n.file=t,cf(n),of(e,n)},e.SSF=Oe,fa!==void 0&&(e.stream=fa),Ne!==void 0&&(e.CFB=Ne),u===void 0||((fa=V5())||{}).Readable&&Sf(fa.Readable)}if(e===void 0?t!==void 0&&t.exports?r(t.exports):typeof define==`function`&&define.amd?define(`xlsx`,function(){return n.version||r(n),n}):r(n):r(e),typeof window<`u`&&!window.XLSX)try{window.XLSX=n}catch{}}))(),1),U5={top:{style:`thin`,color:{rgb:`000000`}},right:{style:`thin`,color:{rgb:`000000`}},bottom:{style:`thin`,color:{rgb:`000000`}},left:{style:`thin`,color:{rgb:`000000`}}},W5={vertical:`center`,wrapText:!0},vHe={font:{bold:!0,sz:16,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`111827`}},alignment:{...W5,horizontal:`center`},border:U5},yHe={font:{bold:!0,color:{rgb:`111827`}},fill:{fgColor:{rgb:`F3F4F6`}},alignment:{...W5,horizontal:`center`},border:U5},bHe={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...W5,horizontal:`left`},border:U5},xHe={font:{bold:!0,color:{rgb:`FFFFFF`}},fill:{fgColor:{rgb:`374151`}},alignment:{...W5,horizontal:`center`},border:U5},SHe={font:{color:{rgb:`111827`}},fill:{fgColor:{rgb:`FFFFFF`}},alignment:{...W5,horizontal:`left`},border:U5};function G5(e){return e??``}function K5(e){if(e==null)return 0;let t=(e instanceof Date?e.toISOString():String(e)).split(/\r?\n/);return Math.max(...t.map(e=>Array.from(e).reduce((e,t)=>e+(t.charCodeAt(0)>255?2:1),0)),0)}function q5(e,t,n){return Math.min(n,Math.max(t,e))}function CHe(e,t){let n=Math.max(t.length,...e.map(e=>e.length));return Array.from({length:n},(n,r)=>{let i=t[r];if(i?.width)return{wch:i.width};let a=e.reduce((e,t)=>Math.max(e,K5(t[r])),K5(i?.title)),o=i?.minWidth??10,s=i?.maxWidth??42;return{wch:q5(Math.ceil(a*1.15)+2,o,s)}})}function wHe(e,t,n=20){return q5(n+(e.reduce((e,n,r)=>{let i=Math.max(8,t[r]?.wch||12),a=(n==null?``:String(n)).split(/\r?\n/).reduce((e,t)=>e+Math.max(1,Math.ceil(K5(t)/Math.max(8,i-2))),0);return Math.max(e,a)},1)-1)*16,n,120)}function J5(e,t,n){e.s={...t,alignment:{...t.alignment},border:U5},n&&(e.z=n)}function Y5(e){return typeof e==`number`&&Number.isFinite(e)}function THe(e){let{filename:t,sheetName:n,title:r,metadataRows:i=[],summaryRows:a=[],columns:o,rows:s}=e,c=Math.max(1,o.length),l=[],u=-1,d=-1;r&&(u=l.length,l.push([r,...Array.from({length:c-1},()=>``)])),i.forEach(e=>l.push(e.map(G5))),a.forEach(e=>l.push(e.map(G5))),(i.length||a.length)&&l.push(Array.from({length:c},()=>``)),d=l.length,l.push(o.map(e=>e.title)),s.forEach((e,t)=>{l.push(o.map(n=>G5(n.render(e,t))))});let f=H5.utils.aoa_to_sheet(l),p=H5.utils.decode_range(f[`!ref`]||`A1:A1`),m=CHe(l,o);f[`!cols`]=m,f[`!rows`]=l.map((e,t)=>t===u?{hpt:34}:t===d?{hpt:28}:e.every(e=>e===``)?{hpt:10}:{hpt:wHe(e,m)}),u>=0&&c>1&&(f[`!merges`]=f[`!merges`]||[],f[`!merges`].push({s:{r:u,c:0},e:{r:u,c:c-1}})),f[`!autofilter`]={ref:H5.utils.encode_range({s:{r:d,c:0},e:{r:Math.max(d,l.length-1),c:c-1}})};for(let e=p.s.r;e<=p.e.r;e+=1)for(let t=p.s.c;t<=p.e.c;t+=1){let n=H5.utils.encode_cell({r:e,c:t}),r=f[n]||{t:`s`,v:``};if(f[n]=r,e===u){J5(r,vHe);continue}if(e===d){J5(r,xHe);continue}if(e{let[e,t]=(0,C.useState)([]),[n,r]=(0,C.useState)(X5),[i,a]=(0,C.useState)(0),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(!1),[u,d]=(0,C.useState)(``),[f,p]=(0,C.useState)(1),[m,h]=(0,C.useState)(10),[g,_]=(0,C.useState)(``),[v,y]=(0,C.useState)(``),[b,x]=(0,C.useState)([]),[S,w]=(0,C.useState)(``),[T,E]=(0,C.useState)(``),[D,O]=(0,C.useState)(``),[k,A]=(0,C.useState)(``),[j,M]=(0,C.useState)(``),[N,P]=(0,C.useState)(``),[F,I]=(0,C.useState)(``),[L,R]=(0,C.useState)(``),[z,B]=(0,C.useState)([null,null]),V=(0,C.useMemo)(()=>({page:f,pageSize:m,userName:L||void 0,teamId:v||void 0,recordType:S||void 0,creditSubject:T||void 0,mediaType:D||void 0,chargeKind:k||void 0,sourceModule:j||void 0,sourceStepCode:N||void 0,billingScene:F||void 0,startDate:z[0]?.format(`YYYY-MM-DD`),endDate:z[1]?.format(`YYYY-MM-DD`),...IHe(g)}),[f,m,L,v,S,T,D,k,j,N,F,z,g]),H=async()=>{s(!0);try{let e=await m5(V);t(e.items||[]),a(e.total||0),r(e.summary||X5)}catch(e){CP.error(e?.message||`加载积分记录失败`)}finally{s(!1)}};(0,C.useEffect)(()=>{H()},[V]),(0,C.useEffect)(()=>{l5(!0).then(x).catch(()=>{})},[]);let U=()=>{_(``),y(``),w(``),E(``),O(``),A(``),M(``),P(``),I(``),R(``),B([null,null]),p(1)},W=async()=>{l(!0),d(`准备导出...`);try{let e={...V,page:1,pageSize:500},t=await m5(e),n=[...t.items||[]],r=t.summary||X5,i=t.total||0,a=Math.max(1,Math.ceil(i/500));d(`正在获取 ${n.length} / ${i}`);for(let t=2;t<=a;t+=1){let r=await m5({...e,page:t});n.push(...r.items||[]),d(`正在获取 ${Math.min(n.length,i)} / ${i}`)}THe({filename:`积分流水_${(0,tC.default)().format(`YYYYMMDD_HHmmss`)}.xlsx`,sheetName:`积分流水`,title:`积分流水汇总`,metadataRows:[[`筛选时间`,`${z[0]?.format(`YYYY-MM-DD`)||`不限`} 至 ${z[1]?.format(`YYYY-MM-DD`)||`不限`}`],[`导出时间`,(0,tC.default)().format(`YYYY-MM-DD HH:mm:ss`)],[`导出条数`,i]],summaryRows:[[`总充值`,r.totalRecharge],[`总消费`,r.totalConsume],[`总回退`,r.totalRefund],[`交易笔数`,r.transactionCount],[`生成条数`,r.generationCount],[`生成尝试次数`,r.generationAttemptCount],[`图片生成条数`,r.imageGenerationCount],[`视频生成条数`,r.videoGenerationCount],[`图片消费积分`,r.imageConsume],[`视频消费积分`,r.videoConsume],[`提词消费积分`,r.textConsume],[`视频分析积分`,r.analysisConsume],[`总 Token`,r.totalTokens],[`输入 Token`,r.inputTokens],[`输出 Token`,r.outputTokens]],columns:[{title:`时间`,maxWidth:22,render:e=>I5(e.createdAt||``)},{title:`用户`,minWidth:12,maxWidth:20,render:e=>e.username||`-`},{title:`手机号`,minWidth:13,maxWidth:18,render:e=>e.phone||`-`},{title:`用户类型`,maxWidth:16,render:e=>e.userTypeLabel||`-`},{title:`前台归类`,maxWidth:18,render:e=>e.frontendUserKindLabel||`-`},{title:`归属团队`,maxWidth:20,render:e=>e.teamNameSnapshot||`未分配团队`},{title:`流水类型`,maxWidth:14,align:`center`,render:e=>e.recordTypeLabel||e.type||`-`},{title:`积分类型`,maxWidth:20,render:e=>e.creditSubjectLabel||`-`},{title:`扣费子类`,maxWidth:22,render:e=>e.chargeKindLabel||`-`},{title:`模块`,maxWidth:20,render:e=>e.sourceModuleLabel||`-`},{title:`模块步骤`,maxWidth:22,render:e=>e.sourceStepCodeLabel||`-`},{title:`计费场景`,maxWidth:32,render:e=>e.billingSceneLabel||`-`},{title:`媒体类型`,maxWidth:12,align:`center`,render:e=>e.mediaTypeLabel||`-`},{title:`变动积分`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.amount},{title:`变动后余额`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0.00`,render:e=>e.balanceAfter},{title:`实际 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.totalTokens||0},{title:`输入 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.inputTokens||0},{title:`输出 Token`,minWidth:12,maxWidth:14,align:`right`,numFmt:`#,##0`,render:e=>e.outputTokens||0},{title:`执行类型`,maxWidth:18,render:e=>Q5(e.engineType)},{title:`执行配置`,maxWidth:28,render:e=>e.engineName||`-`},{title:`供应商`,maxWidth:18,render:e=>e.engineProvider||`-`},{title:`模型版本`,maxWidth:26,render:e=>e.engineModelName||`-`},{title:`关联状态`,maxWidth:14,align:`center`,render:e=>e.ownerDeleted?`关联已删除`:`正常`},{title:`说明`,minWidth:18,maxWidth:42,render:e=>e.description||``},{title:`业务归属类型`,maxWidth:18,render:e=>e.ownerType||``},{title:`业务归属ID`,maxWidth:28,render:e=>e.ownerId||``},{title:`BizKey`,maxWidth:36,render:e=>e.bizKey||``}],rows:n}),CP.success(`Excel 已导出`)}catch(e){CP.error(e?.message||`导出失败`)}finally{l(!1),d(``)}},ee=[{title:`用户`,dataIndex:`username`,width:130,fixed:`left`,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Text,{strong:!0,children:e||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.phone||`-`})]})},{title:`用户类型`,dataIndex:`userTypeLabel`,width:120,render:(e,t)=>(0,Q.jsx)(ER,{color:t.userType===`admin`?`orange`:`blue`,children:t.userTypeLabel||`-`})},{title:`归属团队`,dataIndex:`teamNameSnapshot`,width:130,render:e=>e?(0,Q.jsx)(ER,{color:`blue`,children:e}):(0,Q.jsx)(Z.Text,{type:`secondary`,children:`未分配`})},{title:`流水类型`,dataIndex:`recordType`,width:100,render:(e,t)=>{let n=DHe[e]||{text:t.recordTypeLabel||e||`-`,color:`default`,icon:null};return(0,Q.jsx)(ER,{color:n.color,icon:n.icon,children:n.text})}},{title:`积分类型`,dataIndex:`creditSubjectLabel`,width:150,render:e=>(0,Q.jsx)(ER,{children:e||`-`})},{title:`模块`,dataIndex:`sourceModuleLabel`,width:130,render:e=>e||`-`},{title:`步骤/场景`,key:`scene`,width:210,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{children:t.billingSceneLabel||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:t.sourceStepCodeLabel||`-`})]})},{title:`媒体`,dataIndex:`mediaTypeLabel`,width:80,render:e=>e?(0,Q.jsx)(ER,{color:`purple`,children:e}):`-`},{title:`变动积分`,dataIndex:`amount`,width:120,sorter:(e,t)=>e.amount-t.amount,render:e=>(0,Q.jsxs)(Z.Text,{strong:!0,style:{color:e>0?`#10b981`:`#ef4444`},children:[e>0?`+`:``,Z5(e)]})},{title:`余额`,dataIndex:`balanceAfter`,width:110,render:e=>Z5(e)},{title:`Token`,key:`tokens`,width:140,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`b`,{children:Z5(t.totalTokens)}),(0,Q.jsxs)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[`入 `,Z5(t.inputTokens),` / 出 `,Z5(t.outputTokens)]})]})},{title:`执行配置`,key:`engine`,width:230,render:(e,t)=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(ER,{color:t.engineType===`model`?`geekblue`:t.engineType===`image`?`purple`:t.engineType===`video`?`cyan`:`default`,children:Q5(t.engineType)}),(0,Q.jsx)(`div`,{children:t.engineName||`-`}),(0,Q.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`},children:[t.engineProvider,t.engineModelName].filter(Boolean).join(` / `)||`-`})]})},{title:`关联状态`,dataIndex:`ownerDeleted`,width:100,render:e=>(0,Q.jsx)(ER,{color:e?`red`:`green`,children:e?`已删除`:`正常`})},{title:`说明`,dataIndex:`description`,width:240,ellipsis:!0},{title:`时间`,dataIndex:`createdAt`,width:160,render:e=>(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:I5(e)})}];return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(VH,{style:{color:`#10b981`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总充值`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#10b981`},children:[`+`,Z5(n.totalRecharge)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(MH,{style:{color:`#ef4444`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总消费`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#ef4444`},children:[`-`,Z5(n.totalConsume)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(G2,{style:{color:`#3b82f6`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`总回退`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800,color:`#3b82f6`},children:[`+`,Z5(n.totalRefund)]})]})]})}),(0,Q.jsx)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(FM,{children:[(0,Q.jsx)(p8,{style:{color:`#6366f1`,fontSize:22}}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`div`,{style:{color:`#94a3b8`},children:`交易 / 生成`}),(0,Q.jsxs)(`div`,{style:{fontSize:22,fontWeight:800},children:[Z5(n.transactionCount),` / `,Z5(n.generationCount)]})]})]})})]}),(0,Q.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(4, minmax(0, 1fr))`,gap:16,marginBottom:16},children:[(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`图片生成:`,Z5(n.imageGenerationCount),` 条 / `,Z5(n.imageConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`视频生成:`,Z5(n.videoGenerationCount),` 条 / `,Z5(n.videoConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`提词消费:`,Z5(n.textConsume),` 积分`]}),(0,Q.jsxs)(BA,{size:`small`,bordered:!1,children:[`视频分析:`,Z5(n.analysisConsume),` 积分`]})]}),(0,Q.jsxs)(BA,{bordered:!1,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,marginBottom:16,flexWrap:`wrap`,gap:12},children:[(0,Q.jsxs)(FM,{wrap:!0,children:[(0,Q.jsx)(Tb,{value:g,onChange:e=>{p(1),_(e)},style:{width:150},options:OHe}),(0,Q.jsx)(Tb,{value:v,onChange:e=>{p(1),y(e)},style:{width:170},options:[{value:``,label:`全部团队`},{value:EHe,label:`未分配团队`},...b.map(e=>({value:e.id,label:e.status===`disabled`?`${e.name}(禁用)`:e.name}))]}),(0,Q.jsx)(Tb,{value:S,onChange:e=>{p(1),w(e)},style:{width:130},options:kHe}),(0,Q.jsx)(Tb,{value:T,onChange:e=>{p(1),E(e)},style:{width:180},options:AHe}),(0,Q.jsx)(Tb,{value:D,onChange:e=>{p(1),O(e)},style:{width:110},options:jHe}),(0,Q.jsx)(Tb,{value:k,onChange:e=>{p(1),A(e)},style:{width:150},options:MHe}),(0,Q.jsx)(Tb,{value:j,onChange:e=>{p(1),M(e)},style:{width:150},options:NHe}),(0,Q.jsx)(Tb,{value:N,onChange:e=>{p(1),P(e)},style:{width:150},options:PHe}),(0,Q.jsx)(Tb,{value:F,onChange:e=>{p(1),I(e)},style:{width:220},options:FHe}),(0,Q.jsx)(WN,{placeholder:`用户名/手机号/邮箱`,value:L,onChange:e=>{p(1),R(e.target.value)},style:{width:180},allowClear:!0}),(0,Q.jsx)(hM.RangePicker,{value:z,onChange:e=>{p(1),B(e?[e[0],e[1]]:[null,null])},placeholder:[`开始日期`,`结束日期`],style:{width:250}})]}),(0,Q.jsxs)(FM,{children:[(0,Q.jsx)($S,{onClick:U,children:`重置`}),(0,Q.jsx)($S,{icon:(0,Q.jsx)(VP,{}),onClick:H,children:`刷新`}),(0,Q.jsx)($S,{type:`primary`,icon:(0,Q.jsx)(mB,{}),loading:c,onClick:W,children:`下载 Excel`})]})]}),u&&(0,Q.jsx)(`div`,{style:{marginBottom:12,color:`#6366f1`},children:u}),(0,Q.jsx)(pR,{columns:ee,dataSource:e,rowKey:`id`,loading:o,pagination:{current:f,pageSize:m,total:i,onChange:(e,t)=>{p(e),h(t)},showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`},scroll:{x:2050}})]})]})},RHe=()=>{let[e,t]=(0,C.useState)(!1),[n,r]=(0,C.useState)(!1),[i,a]=(0,C.useState)(!1),[o,s]=(0,C.useState)(!1),[c,l]=(0,C.useState)(180),[u]=X.useForm(),d=async()=>{try{let e=await RBe(),t={};e.forEach(e=>{t[e.key]=e.value}),u.setFieldsValue({wechat_appid:t.payment_wechat_appid||``,wechat_mch_id:t.payment_wechat_mch_id||``,wechat_private_key:t.payment_wechat_private_key||``,wechat_cert_serial_no:t.payment_wechat_cert_serial_no||``,wechat_api_v3_key:t.payment_wechat_api_v3_key||``,wechat_notify_url:t.payment_wechat_notify_url||``,wechat_public_key:t.payment_wechat_public_key||``,wechat_public_key_id:t.payment_wechat_public_key_id||``,alipay_app_id:t.payment_alipay_app_id||``,alipay_private_key:t.payment_alipay_private_key||``,alipay_public_key:t.payment_alipay_public_key||``,alipay_notify_url:t.payment_alipay_notify_url||``,alipay_gateway:t.payment_alipay_gateway||``,order_timeout:t.payment_order_timeout||`180`}),r(t.payment_wechat_enabled===`true`),a(t.payment_alipay_enabled===`true`),s(t.payment_mock===`true`),l(parseInt(t.payment_order_timeout||`180`,10))}catch{CP.error(`加载支付配置失败`)}};return(0,C.useEffect)(()=>{d()},[]),(0,Q.jsxs)(`div`,{style:{maxWidth:`100%`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,marginBottom:24},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:`#6366f1`},children:(0,Q.jsx)(dM,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`订单超时时间`})})]}),(0,Q.jsx)(X,{form:u,layout:`inline`,children:(0,Q.jsx)(X.Item,{name:`order_timeout`,style:{margin:0},children:(0,Q.jsxs)(FM.Compact,{style:{width:140},children:[(0,Q.jsx)(Nj,{min:30,max:86400,placeholder:`180`,style:{width:`100%`},size:`middle`}),(0,Q.jsx)(Z.Text,{children:`秒`})]})})})]})})}),(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsx)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`,background:o?`#fff7e6`:`#fafbff`},children:(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:40,height:40,borderRadius:10,background:o?`rgba(245,158,11,0.15)`:`rgba(99,102,241,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:20,color:o?`#f59e0b`:`#6366f1`},children:(0,Q.jsx)(sY,{})}),(0,Q.jsx)(`div`,{children:(0,Q.jsx)(Z.Text,{strong:!0,style:{fontSize:14},children:`模拟支付模式`})})]}),(0,Q.jsx)(lF,{checked:o,onChange:s,checkedChildren:`已开启`,unCheckedChildren:`已关闭`})]})})})]}),(0,Q.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`},children:[(0,Q.jsx)(`div`,{style:{flex:`1 1 400px`,minWidth:400},children:(0,Q.jsxs)(BA,{variant:`outlined`,style:{borderRadius:12,border:`1px solid #f0f0f5`},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:20},children:[(0,Q.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,Q.jsx)(`div`,{style:{width:44,height:44,borderRadius:10,background:`rgba(7,193,96,0.08)`,display:`flex`,alignItems:`center`,justifyContent:`center`,fontSize:22,color:`#07c160`},children:(0,Q.jsx)(y8,{})}),(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(Z.Title,{level:5,style:{margin:0},children:`微信支付`}),(0,Q.jsx)(Z.Text,{type:`secondary`,style:{fontSize:12},children:`微信商户号支付配置`})]})]}),(0,Q.jsx)(lF,{checked:n,onChange:r,checkedChildren:`已启用`,unCheckedChildren:`未启用`})]}),(0,Q.jsxs)(X,{form:u,layout:`vertical`,children:[(0,Q.jsx)(X.Item,{name:`wechat_appid`,label:`AppID`,children:(0,Q.jsx)(WN,{placeholder:`微信支付 AppID`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_mch_id`,label:`商户号 (MchID)`,children:(0,Q.jsx)(WN,{placeholder:`微信支付商户号`,size:`large`,disabled:!n})}),(0,Q.jsx)(X.Item,{name:`wechat_private_key`,label:`商户私钥`,extra:` ⚠️ 重要:请填写 apiclient_key.pem 的内容,不是 apiclient_cert.pem! 内容应该以 -----BEGIN PRIVATE KEY----- 或 -----BEGIN RSA PRIVATE KEY----- 开头 `,children:(0,Q.jsx)(WN.TextArea,{rows:4,placeholder:`\r diff --git a/video-gen-admin/dist/index.html b/video-gen-admin/dist/index.html index 55353140..ee80ce13 100644 --- a/video-gen-admin/dist/index.html +++ b/video-gen-admin/dist/index.html @@ -1,37 +1,37 @@ - - - - - - - - - - 后台管理 - - + + + + + + + + + + 后台管理 + + - - -
- - + + +
+ + diff --git a/video-gen-admin/src/pages/AdminCreditRecords.tsx b/video-gen-admin/src/pages/AdminCreditRecords.tsx index c54439eb..021de141 100644 --- a/video-gen-admin/src/pages/AdminCreditRecords.tsx +++ b/video-gen-admin/src/pages/AdminCreditRecords.tsx @@ -35,6 +35,7 @@ const RECORD_TYPE_MAP: Record }, consume: { text: '消费', color: 'red', icon: }, refund: { text: '回退', color: 'blue', icon: }, + team_internal: { text: '团队内部', color: 'cyan', icon: }, }; const userScopeOptions = [ @@ -49,6 +50,7 @@ const recordTypeOptions = [ { value: 'recharge', label: '充值' }, { value: 'consume', label: '消费' }, { value: 'refund', label: '回退' }, + { value: 'team_internal', label: '团队内部' }, ]; const creditSubjectOptions = [ diff --git a/video-gen-api/app/api/v1/team.py b/video-gen-api/app/api/v1/team.py index 3818f774..b7e2a0a5 100644 --- a/video-gen-api/app/api/v1/team.py +++ b/video-gen-api/app/api/v1/team.py @@ -264,7 +264,7 @@ async def list_team_credit_records( page_size: int = Query(20, ge=1, le=100), user_id: str | None = Query(None), phone: str | None = Query(None, description="按手机号搜索"), - record_type: str | None = Query(None, pattern="^(recharge|consume|refund|team_internal)$"), + record_type: str | None = Query(None, pattern="^(recharge|consume|refund|team_internal)$", description="流水类型"), start_date: str | None = Query(None, description="起始日期 YYYY-MM-DD"), end_date: str | None = Query(None, description="截止日期 YYYY-MM-DD"), current_user: User = Depends(get_current_user), @@ -308,7 +308,7 @@ async def list_team_credit_records( async def export_team_credit_records( user_id: str | None = Query(None), phone: str | None = Query(None), - record_type: str | None = Query(None, pattern="^(recharge|consume|refund|team_internal)$"), + record_type: str | None = Query(None, pattern="^(recharge|consume|refund|team_internal)$", description="流水类型"), start_date: str | None = Query(None), end_date: str | None = Query(None), current_user: User = Depends(get_current_user), diff --git a/video-gen-app/dist/assets/index-D7ovjI8j.js b/video-gen-app/dist/assets/index-DlbOvnzQ.js similarity index 99% rename from video-gen-app/dist/assets/index-D7ovjI8j.js rename to video-gen-app/dist/assets/index-DlbOvnzQ.js index 0b620d97..7ce10638 100644 --- a/video-gen-app/dist/assets/index-D7ovjI8j.js +++ b/video-gen-app/dist/assets/index-DlbOvnzQ.js @@ -502,4 +502,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho div::-webkit-scrollbar { display: none; } - `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(HK,{size:`small`}),(0,$.jsx)(Zie,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(HK,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(RV,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${U9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:oae}=FG,sae=`http://ceshi.apiforeign.minzhong.cn`,J9=2,Y9=15;function X9(e){return e?/^https?:\/\//i.test(e)?e:`${sae}${e}`:``}function cae(){let{creatID:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>X9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await B7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await V7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await V7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch{}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?N.current=window.setInterval(async()=>{try{C(await B7(e))}catch{}},3e3):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await h7(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:X9(y),idempotency_key:`replication_${Date.now()}`};D(!0);try{await lre(o,n),Z.success(`视频生成任务创建成功`),B(),V7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},W=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await sre(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},ee=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},te=async t=>{if(e){if(t.durationSecondY9){Z.warning(`拆镜片段不能超过 ${Y9} 秒`);return}k(!0);try{await cre(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},ne=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(G2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(b$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ee,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(_q,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:W,children:(0,$.jsxs)(X,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)(Rw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(s$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(b$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(b$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{t.segmentVideoUrl&&(d(X9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:X9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!ne(n),style:{color:ne(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:ne(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(aae,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:J9,maxDuration:Y9,onCancel:()=>a(!1),onConfirm:te}),(0,$.jsx)(ZH,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Q5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(W0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(zL,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(FG,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oae,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(X,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:lae,Text:Z9}=Q,{TextArea:uae}=FG;function dae(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Q9(){let e=Ye(),{creatID:t}=$e(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,te]=(0,S.useState)(0),[ne,re]=(0,S.useState)(``),[G,ie]=(0,S.useState)({}),[K,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:K[t]?.status||``,id:K[t]?.id||t,output:K[t]?.output||``,engineId:K[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[K]);let he=(e,t,n)=>{z7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&te(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,ne)},_e=()=>{he(1,20,ne)};(0,S.useEffect)(()=>{he(V,U,ne)},[]),(0,S.useEffect)(()=>{D7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];R({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?dae(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await dre(G.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}y(!0);try{await fre(G.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{ure(G.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};U7(G.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};U7(G.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};pre(G.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{W7(G.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{W7(G.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(G2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>G?.material?.materialVideoUrl&&Se(G.material.materialVideoUrl,`video`),children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>G?.material?.materialImageUrl&&Se(G.material.materialImageUrl,`image`),children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),G?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),G?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(e_,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(I4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(X,{onClick:()=>{Te(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Z9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(oU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>ve(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Ee(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[G.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>De(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),A(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(G8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),R({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{A(!k),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(f6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Oe(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(oU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>ve(G?.videoGeneration?.promptSchema,`video`,e.id,G?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!G?.videoGeneration?.promptSchema||!G?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&G?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(oU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(n1,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${G?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(uae,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(FG,{placeholder:`搜索产品名称`,value:ne,onChange:e=>re(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(s$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(pq,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var fae=`/assets/homebtn1-DjQgGq1F.png`,pae=`/assets/homebtn2-BNQvBUFh.png`,mae=`/assets/homebtn3-CaXf7CQb.png`;function hae(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var gae=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null);(0,S.useEffect)(()=>{Tre().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),Y7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>{(async()=>{try{bre(5).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let g=e=>{n(e)},_=[{icon:(0,$.jsx)(dU,{style:{fontSize:24,color:`#6366f1`}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(z8,{style:{fontSize:24,color:`#f97316`}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始混剪`,path:`/removelens`},{icon:(0,$.jsx)(D8,{style:{fontSize:24,color:`#10b981`}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`}],v=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],y=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(J2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`linear-gradient(135deg, #f0f9ff 0%, #faf5ff 50%, #fef3c7 100%)`,border:`1px solid rgba(99,102,241,0.10)`,margin:`0 0 20px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:18},children:(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsxs)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:[`我的项目`,(0,$.jsx)(`span`,{style:{color:`#a8a8a8ff`,fontSize:12},children:`(操作步骤)`})]})]})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第1步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px dashed #c7d2fe`,borderRadius:8,background:`#fafbff`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:2,background:`#6366f1`}}),(0,$.jsx)(`div`,{style:{flex:1,height:22,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4,display:`flex`,alignItems:`center`,padding:`0 8px`,fontSize:10,color:`#94a3b8`},children:`项目名称...`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:[(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#eef2ff`,color:`#6366f1`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #c7d2fe`},children:`美妆`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#fff7ed`,color:`#f97316`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #fed7aa`},children:`美食`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#ecfdf5`,color:`#10b981`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #a7f3d0`},children:`3C数码`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#f5f3ff`,color:`#8b5cf6`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #ddd6fe`},children:`服饰`})]}),(0,$.jsx)(`div`,{style:{height:16,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}}),(0,$.jsx)(`div`,{style:{height:16,width:`70%`,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`创建新项目,自定义项目名称并选择对应行业分类`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(J2,{style:{transform:`rotate(0deg)`}})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第2步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f1f5f9`,borderRadius:6,padding:2,gap:2},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,background:`#fff`,borderRadius:4,fontSize:11,fontWeight:600,color:`#6366f1`,boxShadow:`0 1px 3px rgba(99,102,241,0.15)`},children:[(0,$.jsx)(G5,{style:{fontSize:11}}),`视频`]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,fontSize:11,color:`#94a3b8`},children:[(0,$.jsx)(r8,{style:{fontSize:11}}),` 图片`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`尺寸比例`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#eef2ff`,color:`#6366f1`,border:`1px solid #c7d2fe`,borderRadius:4,fontSize:10,fontWeight:600},children:`9:16`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`16:9`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`1:1`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`5s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff7ed`,color:`#f97316`,border:`1px solid #fed7aa`,borderRadius:4,fontSize:10,fontWeight:600},children:`10s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`15s`})]})]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`选择生成图片或视频,设置尺寸、时长等参数,点击生成即可一键优化提示词`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(J2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第3步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:6,marginBottom:12,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`提示词已智能优化`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`尺寸 9:16 · 时长 5s`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`6px 0`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,borderRadius:5,fontSize:11,fontWeight:600,boxShadow:`0 2px 6px rgba(99,102,241,0.25)`},children:[(0,$.jsx)(D5,{style:{fontSize:11}}),`确认并生成素材`]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`核对图片 / 视频参数与优化后的提示词,确认后一键生成素材`})]}),(0,$.jsxs)(`div`,{onClick:()=>e(`/projects`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px) scale(1.05)`,e.currentTarget.style.boxShadow=`0 14px 32px rgba(99,102,241,0.45)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(3px)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.boxShadow=`0 8px 20px rgba(99,102,241,0.30)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(0)`)},style:{cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,width:64,height:64,borderRadius:`50%`,textAlign:`center`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,color:`#fff`,fontSize:14,fontWeight:600,letterSpacing:.5,boxShadow:`0 8px 20px rgba(99,102,241,0.30)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,userSelect:`none`,position:`relative`},children:[(0,$.jsx)(`span`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:`radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35) 0%, transparent 55%)`,pointerEvents:`none`}}),`前往`,(0,$.jsx)(J2,{className:`round-arrow`,style:{fontSize:13,transition:`transform 0.3s ease`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp stagger-children`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:18},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16},children:_.map((t,n)=>{let r=[{color:`#6366f1`,light:`rgba(99,102,241,0.10)`,tag:`复刻`,bg:fae},{color:`#f97316`,light:`rgba(249,115,22,0.10)`,tag:`混剪`,bg:pae},{color:`#10b981`,light:`rgba(16,185,129,0.10)`,tag:`云创`,bg:mae}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:1,padding:`20px 22px`,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`,backgroundImage:`url(${i.bg})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 12px 32px ${i.light}`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${i.color}, ${i.color}88)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:i.color,fontSize:22,display:`flex`},children:t.icon})}),(0,$.jsx)(`div`,{style:{fontSize:11,color:i.color,padding:`2px 8px`,borderRadius:6,background:i.light,fontWeight:600},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`#1f2937`,marginBottom:4},children:t.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#6b7280`,marginBottom:14,lineHeight:1.5,minHeight:36},children:t.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600},children:[t.action,(0,$.jsx)(J2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`近期作品`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(lR,{activeKey:t,onChange:g,items:v.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:y.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(r8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):y.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(G5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:hae(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}),d.length>0&&(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:18},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`素材案例`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:4},children:`精选优质作品参考`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(lR,{activeKey:l,onChange:e=>{u(e),Y7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:d.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(r8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>m(e),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(G5,{style:{fontSize:28,color:`#fff`}})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title||`素材 ${t+1}`})})]},e.id||t))})]}),(0,$.jsxs)(pq,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:760,centered:!0,className:`preview-modal`,bodyStyle:{padding:0,background:`#fff`,borderRadius:16,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,paddingTop:`56.25%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})}),p?.title&&(0,$.jsx)(`div`,{style:{padding:`14px 20px`,fontSize:14,color:`#4b5563`,fontWeight:500,borderTop:`1px solid #f1f5f9`,textAlign:`center`},children:p.title})]})]})},{RangePicker:_ae}=mH,$9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),vae=()=>{let e=Ye(),[t]=On(),{message:n}=lx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,nD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await gre({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await q7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{pq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(mH,{value:(0,nD.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,nD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(FG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await _re({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(G2,{}),onClick:F}),(0,$.jsx)(x3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(FG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(_ae,{value:E?[(0,nD.default)(E[0]),(0,nD.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(v5,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(G8,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(s$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(xK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(pq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(FG,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(eB,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(eB,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await q7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},yae=()=>{let e=Ye(),[t]=On(),{message:n}=lx.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await tre(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(HK,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(sH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)($q,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)($q,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(sH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},bae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(l4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(w8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(N5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(x6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(J2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(f8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(pG,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(h6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(r3,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),xae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(z3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(f3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(h5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(x6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(J2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(f8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(pG,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),Sae=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await Pre())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await Fre(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=eW.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields();v(!0),await Ire(m.member.id,e.amount,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),ue()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=eW.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Lre()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0);let t=e.expiresAt?new Date(e.expiresAt).toISOString():null;await Rre(e.maxUses||null,t),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await zre(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{Z.warning(`复制失败,请手动复制`)})},[P,F]=(0,S.useState)([]),[I,L]=(0,S.useState)(!1),R=(0,S.useCallback)(async()=>{L(!0);try{F(await Bre()||[])}catch(e){Z.error(e?.message||`加载申请失败`)}finally{L(!1)}},[]);(0,S.useEffect)(()=>{R()},[R]);let z=async(e,t,n)=>{try{await Vre(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),R(),p()}catch(e){Z.error(e?.message||`操作失败`)}},[B,V]=(0,S.useState)([]),[H,U]=(0,S.useState)(0),[W,ee]=(0,S.useState)(null),[te,ne]=(0,S.useState)(!1),[re,G]=(0,S.useState)(1),[ie,K]=(0,S.useState)(``),[ae,q]=(0,S.useState)(``),[oe,se]=(0,S.useState)(``),[ce,le]=(0,S.useState)(``),ue=(0,S.useCallback)(async()=>{ne(!0);try{let e=await Wre({page:re,pageSize:20,phone:ae||void 0,recordType:ie||void 0,startDate:oe||void 0,endDate:ce||void 0});V(e.items||[]),U(e.total||0),ee(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{ne(!1)}},[re,ie,ae,oe,ce]);(0,S.useEffect)(()=>{ue()},[ue]);let de=[{key:`members`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(H5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsx)(s$,{columns:[{title:`用户名`,dataIndex:`username`,width:150,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(b$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:160,render:e=>a9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>(0,$.jsx)(X,{size:`small`,type:`link`,onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}],dataSource:a,rowKey:`id`,loading:l,pagination:{current:d,pageSize:20,total:s,onChange:e=>f(e),showTotal:e=>`共 ${e} 人`,position:[`bottomLeft`]},scroll:{x:800},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无成员`})}})},{key:`credits`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(q5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(JC,{value:ie,onChange:e=>{K(e||``),G(1)},allowClear:!0,placeholder:`全部类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(FG,{placeholder:`搜索手机号`,value:ae,onChange:e=>{q(e.target.value),G(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(FG,{placeholder:`起始日期 YYYY-MM-DD`,value:oe,onChange:e=>{se(e.target.value),G(1)},style:{width:160}}),(0,$.jsx)(FG,{placeholder:`截止日期 YYYY-MM-DD`,value:ce,onChange:e=>{le(e.target.value),G(1)},style:{width:160}}),(0,$.jsx)(X,{onClick:()=>{K(``),q(``),se(``),le(``),G(1)},children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),onClick:()=>{let e=Gre({phone:ae||void 0,recordType:ie||void 0,startDate:oe||void 0,endDate:ce||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`team_credits_${Date.now()}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},children:`导出 Excel`})]}),W&&(0,$.jsxs)(`div`,{style:{marginBottom:12,padding:`8px 12px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:20,flexWrap:`wrap`,fontSize:13},children:[(0,$.jsxs)(`span`,{children:[`总充值:`,(0,$.jsxs)(`strong`,{style:{color:`#16a34a`},children:[`+`,W.total_recharge??0]})]}),(0,$.jsxs)(`span`,{children:[`总消费:`,(0,$.jsxs)(`strong`,{style:{color:`#dc2626`},children:[`-`,W.total_consume??0]})]}),(0,$.jsxs)(`span`,{children:[`笔数:`,(0,$.jsx)(`strong`,{children:W.transaction_count??0})]})]}),(0,$.jsx)(s$,{size:`small`,rowKey:`id`,loading:te,dataSource:B,pagination:{current:re,pageSize:20,total:H,onChange:e=>G(e),showTotal:e=>`共 ${e} 条`,position:[`bottomLeft`]},scroll:{x:950},columns:[{title:`用户名`,key:`username`,width:120,render:(e,t)=>(0,$.jsx)(Q.Text,{strong:!0,children:t.username||`-`})},{title:`手机号`,key:`phone`,width:120,render:(e,t)=>t.phone||`-`},{title:`类型`,key:`type`,width:100,render:(e,t)=>(0,$.jsx)(b$,{color:{recharge:`green`,consume:`red`,refund:`orange`,team_internal:`blue`}[t.type]||`default`,children:{recharge:`充值`,consume:`消费`,refund:`退款`,team_internal:`团队内部`}[t.type]||t.type||`-`})},{title:`积分变动`,key:`amount`,width:100,render:(e,t)=>(0,$.jsxs)(Q.Text,{style:{color:t.amount>=0?`#16a34a`:`#dc2626`,fontWeight:600},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,key:`balance_after`,width:100,render:(e,t)=>(t.balance_after??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,render:e=>e||`-`},{title:`时间`,key:`created_at`,width:160,render:(e,t)=>a9(t.created_at)}],locale:{emptyText:(0,$.jsx)(vC,{description:`暂无积分记录`})}})]})},{key:`invitations`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(T1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(zL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(s$,{columns:[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`inviteLink`,ellipsis:!0,render:e=>(0,$.jsxs)(oU,{children:[(0,$.jsx)(Q.Text,{ellipsis:!0,style:{maxWidth:250,fontSize:12},children:e}),(0,$.jsx)(Rw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(T1,{}),onClick:()=>N(e)})})]})},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(b$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:160,render:e=>e?a9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],dataSource:b,rowKey:`id`,loading:C,pagination:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(Z3,{}),`加入申请`,P.length>0&&(0,$.jsx)(b$,{color:`red`,children:P.length})]}),children:(0,$.jsx)(s$,{columns:[{title:`申请人`,dataIndex:`username`,width:150,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`申请时间`,dataIndex:`createdAt`,width:160,render:e=>a9(e)},{title:`操作`,key:`action`,width:160,render:(e,t)=>(0,$.jsxs)(oU,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,style:{color:`#16a34a`,padding:0},onClick:()=>z(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,style:{padding:0},onClick:()=>{pq.confirm({title:`拒绝申请`,content:(0,$.jsx)(eW,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)(eW.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(FG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;z(t.id,`reject`,e)}})},children:`拒绝`})]})}],dataSource:P,rowKey:`id`,loading:I,pagination:!1,scroll:{x:600},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无待审批申请`})}})}];return(0,$.jsxs)(`div`,{style:{padding:24,maxWidth:1200,margin:`0 auto`},children:[(0,$.jsx)(CR,{variant:`outlined`,style:{borderRadius:12,marginBottom:16},loading:n,children:e&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)($q,{}),onClick:()=>{i(),p(),A(),R(),ue()},children:`刷新`})]})}),(0,$.jsx)(CR,{variant:`outlined`,style:{borderRadius:12},children:(0,$.jsx)(lR,{items:de,defaultActiveKey:`members`})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(oU,{children:[(0,$.jsx)(H5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,children:(0,$.jsxs)(eW,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsx)(eW.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0}],children:(0,$.jsxs)(pL.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(pL.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(pL.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)(eW.Item,{name:`amount`,label:`积分数量`,rules:[{required:!0,message:`请输入数量`},{type:`number`,min:.01,message:`必须大于 0`}],children:(0,$.jsx)(JB,{style:{width:`100%`},step:1,min:.01,placeholder:`请输入正数积分数量`,size:`large`})}),(0,$.jsx)(eW.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(FG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(oU,{children:[(0,$.jsx)(T1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)(eW,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(eW.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(JB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsx)(eW.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(FG,{type:`datetime-local`,style:{width:`100%`},placeholder:`留空表示永不过期`,size:`large`})})]})})]})},Cae=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,[r,i]=(0,S.useState)(!0),[a,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1);return(0,S.useEffect)(()=>{if(!n){i(!1);return}Hre(n).then(e=>o(e)).catch(()=>o(null)).finally(()=>i(!1))},[n]),r?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(HK,{size:`large`})}):l?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`success`,icon:(0,$.jsx)(I4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):!n||!a?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):a.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${a.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsxs)(CR,{variant:`outlined`,style:{borderRadius:16,maxWidth:480,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(w5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,a.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:s,onClick:async()=>{n&&pq.confirm({title:`确认加入团队`,icon:(0,$.jsx)(w5,{style:{color:`#6366f1`}}),content:a?.teamName?`您确定要加入团队「${a.teamName}」吗?提交后需等待团队管理人审批。`:`您确定要加入该团队吗?`,okText:`确认加入`,cancelText:`取消`,onOk:async()=>{try{c(!0),await Ure(n),u(!0)}catch(e){Z.error(e?.message||`申请失败`)}finally{c(!1)}}})},children:`申请加入`})]})})};nD.default.locale(`zh-cn`);var wae=({children:e})=>{let{user:t,loading:n,checkAuth:r}=Q7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(HK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=Q7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:r2.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(lx,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(Xre,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(wae,{children:(0,$.jsx)(Jre,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(Qre,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(eie,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(tie,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(nie,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(aie,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(gae,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Sie,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Eie,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Mie,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Nie,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(cae,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Q9,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(Rie,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(Bie,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(Hie,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(yae,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(Xie,{})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(vae,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(bae,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(Wie,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(xae,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Sae,{})}),(0,$.jsx)(Tt,{path:`join-team`,element:(0,$.jsx)(Cae,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file + `}),(0,$.jsx)(`div`,{style:{margin:`auto`,display:`flex`,flexDirection:`column`,width:y.length>0?`${y.length*80+Math.max(0,y.length-1)*1}px`:`100%`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,height:86,borderRadius:12,background:`#fff`,gap:1,position:`relative`},children:[x&&y.length===0?(0,$.jsxs)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(HK,{size:`small`}),(0,$.jsx)(Zie,{style:{marginLeft:8,color:`#64748b`},children:`正在抽取每秒帧...`})]}):y.length>0?y.map(e=>{let t=e.second>=_[0]&&e.second<_[1];return(0,$.jsxs)(`button`,{type:`button`,onClick:()=>I(e.second),title:`${e.second}s${e.fallback?`,实际取帧 ${e.captureSecond?.toFixed(1)}s`:``}`,style:{minWidth:80,flex:`0 0 80px`,height:86,borderTop:t?`5px solid #6366f1`:`none`,borderBottom:t?`5px solid #6366f1`:`none`,padding:0,background:`transparent`,overflow:`hidden`,cursor:A?`not-allowed`:`pointer`,position:`relative`},children:[e.status===`success`&&e.image?(0,$.jsx)(`img`,{src:e.image,alt:`${e.second}s`,style:{width:`100%`,height:`100%`,objectFit:`cover`,display:`block`}}):e.status===`loading`?(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(HK,{size:`small`})}):(0,$.jsxs)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,color:`#64748b`,fontSize:12,background:`#fff`},children:[(0,$.jsxs)(`span`,{children:[e.second,`s`]}),(0,$.jsx)(`span`,{style:{fontSize:11},children:`无有效帧`})]}),(0,$.jsxs)(`span`,{style:{position:`absolute`,left:0,bottom:3,color:`#ffffffff`,fontSize:16,textShadow:`0 1px 3px rgba(0,0,0,.7)`},children:[e.second,`s`]})]},e.second)}):(0,$.jsx)(`div`,{style:{flex:`1 1 auto`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#64748b`},children:`暂无帧预览,请确认视频是否加载完成`}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:-10,left:0,right:0,bottom:0},children:(0,$.jsx)(RV,{range:!0,min:0,max:O||a,step:1,value:_,onChange:P,onChangeComplete:F,tooltip:{formatter:e=>`${U9(Number(e||0))}s`},disabled:!O||A,styles:{track:{background:`#6969dd63`,height:86,borderRadius:12,margin:`0 `},rail:{height:86,borderRadius:12},handle:{width:20,height:86,marginTop:0,borderRadius:`50%`}}})})]})})]}),(0,$.jsxs)(`div`,{style:{marginTop:16,textAlign:`center`,color:`#64748b`,fontSize:14},children:[`已选取 `,k,`s`]}),E&&(0,$.jsx)(`div`,{style:{marginTop:12,padding:`10px 14px`,borderRadius:8,background:`rgba(239, 68, 68, 0.08)`,border:`1px solid rgba(239, 68, 68, 0.15)`,color:`#ef4444`,fontSize:13,textAlign:`center`},children:E})]})]})})},{TextArea:oae}=FG,sae=`http://ceshi.apiforeign.minzhong.cn`,J9=2,Y9=15;function X9(e){return e?/^https?:\/\//i.test(e)?e:`${sae}${e}`:``}function cae(){let{creatID:e}=$e(),t=Ye(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(!1),[o,s]=(0,S.useState)(null),[c,l]=(0,S.useState)(null),[u,d]=(0,S.useState)(null),[f,p]=(0,S.useState)(!1),m=(0,S.useRef)(null),[h,g]=(0,S.useState)(``),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(``),[x,C]=(0,S.useState)(null),[w,T]=(0,S.useState)([]),[E,D]=(0,S.useState)(!1),[O,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(!1),M=(0,S.useRef)(null),N=(0,S.useRef)(null),P=(0,S.useMemo)(()=>X9(x?.videoUrl),[x?.videoUrl]),F=(0,S.useMemo)(()=>w.length===0?`AI自动拆分`:w.some(e=>e.sourceMode===`ai_suggestion`)?`AI重拆`:`AI自动拆分`,[w]),I=(0,S.useCallback)(async()=>{if(e)try{C(await B7(e))}catch{Z.error(`获取任务详情失败`)}},[e]),L=(0,S.useCallback)(async()=>{if(e)try{let t=(await V7(e)).items||[];T(t),t.some(e=>e.moduleProjectCurrentStepCode!==`video_generate`&&e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?M.current||=window.setInterval(async()=>{try{let t=(await V7(e)).items||[];T(e=>e.map(e=>{let n=t.find(t=>t.id===e.id);return n&&(e.moduleProjectCurrentStepCode!==`video_generate`||e.moduleProjectStatus!==`completed`&&e.moduleProjectStatus!==`failed`)?n:e})),t.every(e=>e.moduleProjectCurrentStepCode===`video_generate`||e.moduleProjectStatus===`completed`||e.moduleProjectStatus===`failed`)&&(M.current&&=(clearInterval(M.current),null))}catch{}},3e4):M.current&&=(clearInterval(M.current),null)}catch{Z.error(`获取拆镜列表失败`)}},[e]),R=(0,S.useCallback)(async()=>{await Promise.all([I(),L()])},[I,L]);(0,S.useEffect)(()=>(R(),()=>{M.current&&=(clearInterval(M.current),null),N.current&&=(clearInterval(N.current),null)}),[R]),(0,S.useEffect)(()=>{if(x)return x.analysisStatus===`processing`?N.current=window.setInterval(async()=>{try{C(await B7(e))}catch{}},3e3):N.current&&=(clearInterval(N.current),null),()=>{N.current&&=(clearInterval(N.current),null)}},[x?.analysisStatus,e]);let z=(e,t)=>{s(e),l(t),r(!0)},B=()=>{r(!1),s(null),g(``),l(``),v(``),b(``)},V=e=>{e.fileList.length===0&&b(``)},H=async e=>{try{b((await h7(e)).url),Z.success(`图片上传成功`)}catch{Z.error(`图片上传失败,请重试`)}return!1},U=async()=>{if(!o){Z.warning(`请先选择拆镜片段`);return}if(!y){Z.warning(`请上传产品图`);return}if(!h.trim()){Z.warning(`请输入产品名称`);return}if(!_.trim()){Z.warning(`请输入产品卖点`);return}let n={target_project_name:h.trim(),core_content_point:_.trim(),material_image_url:X9(y),idempotency_key:`replication_${Date.now()}`};D(!0);try{await lre(o,n),Z.success(`视频生成任务创建成功`),B(),V7(e).then(e=>{let n=e.items.find(e=>e.id===o);Z.loading(`创建中...`,3),setTimeout(()=>{t(`/removelens/${n.moduleProjectId}/removefenbu`)},3e3)})}catch(e){Z.error(e?.message||`创建失败,请重试`)}finally{D(!1)}},W=async()=>{if(e){j(!0);try{let t=w.some(e=>e.sourceMode===`ai_suggestion`);await sre(e,{selected_indices:[],replace_existing:t}),Z.success(t?`AI 重拆任务已提交`:`AI 拆镜任务已提交`),await R()}catch(e){Z.error(e?.message||`拆镜失败`)}finally{j(!1)}}},ee=()=>{if(!P){Z.warning(`原视频地址不存在`);return}a(!0)},te=async t=>{if(e){if(t.durationSecondY9){Z.warning(`拆镜片段不能超过 ${Y9} 秒`);return}k(!0);try{await cre(e,{start_second:t.startSecond,end_second:t.endSecond}),Z.success(`手动拆镜任务已提交`),a(!1),await R()}catch(e){Z.error(e?.message||`手动拆镜失败`)}finally{k(!1)}}},ne=e=>e?.splitStatus===`completed`&&!!e?.segmentVideoUrl;return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{margin:`-24px -32px -32px`,borderRadius:20,minHeight:`calc(100vh - 34px)`,display:`flex`,flexDirection:`column`,overflow:`hidden`,background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{padding:`16px 24px`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,borderRadius:16,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,border:`1px solid rgba(99, 102, 241, 0.08)`,position:`relative`,zIndex:10},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:16},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(G2,{}),onClick:()=>t(-1),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h1`,{style:{fontSize:18,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,margin:0},children:`AI视频拆镜工作台`}),(0,$.jsx)(`p`,{style:{fontSize:13,color:`#64748b`,margin:`4px 0 0 0`},children:`一键拆解画面分镜,助力仿拍或创作`})]}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]})}),x?(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,overflow:`hidden`,padding:`0 32px 32px`},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`linear-gradient(135deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0.6) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,display:`flex`,alignItems:`center`,gap:30,padding:24,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8)`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-50,right:-50,width:200,height:200,background:`radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 70%)`,borderRadius:`50%`}}),(0,$.jsx)(`div`,{style:{position:`relative`,width:280,height:160,borderRadius:12,overflow:`hidden`,flexShrink:0,boxShadow:`0 4px 16px rgba(0,0,0,0.1)`},children:(0,$.jsx)(`video`,{controls:!0,src:P,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`,justifyContent:`space-between`,position:`relative`,zIndex:1},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`h2`,{style:{fontSize:20,fontWeight:600,marginBottom:16,background:`linear-gradient(135deg, #1e293b 0%, #334155 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频总结`}),(0,$.jsx)(`div`,{style:{textAlign:`right`},children:(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`上传时间: `,x.createdAt?new Date(x.createdAt).toLocaleString(`zh-CN`,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}):`-`]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`产品名称:`}),(0,$.jsx)(`span`,{style:{color:`#1e293b`,fontWeight:500},children:x.title})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,marginBottom:12},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`受众群体:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`div`,{style:{display:`flex`,gap:8,flexWrap:`wrap`},children:(x.originalVideoAudience?.split(`、`)||[]).map((e,t)=>(0,$.jsx)(b$,{style:{fontSize:12,background:`rgba(99, 102, 241, 0.1)`,color:`#6366f1`,border:`none`,borderRadius:20},children:e},t))}):null]}),(0,$.jsxs)(`div`,{style:{display:`flex`},children:[(0,$.jsx)(`span`,{style:{color:`#64748b`,fontSize:14,marginRight:12,width:80,flexShrink:0},children:`视频内容:`}),x.analysisStatus===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`,style:{color:`#f59e0b`}}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):x.analysisStatus===`completed`?(0,$.jsx)(`span`,{style:{color:`#475569`,lineHeight:1.6,height:100,overflowY:`auto`},children:x.originalVideoContent}):null]})]})})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:16,marginBottom:20,marginTop:20},children:[(0,$.jsx)(X,{type:`default`,onClick:ee,disabled:!P||O,style:{flex:1,height:52,borderRadius:12,border:`2px solid rgba(99, 102, 241, 0.3)`,color:`#6366f1`,fontWeight:600,fontSize:15,background:`rgba(255, 255, 255, 0.9)`,backdropFilter:`blur(10px)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`},onMouseEnter:e=>{e.currentTarget.style.borderColor=`#6366f1`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.2)`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`rgba(99, 102, 241, 0.3)`,e.currentTarget.style.boxShadow=`none`},children:`手动`}),(0,$.jsx)(_q,{title:F===`AI重拆`?`确定要AI重拆吗?`:`确定要AI拆分吗?`,okText:`确定`,cancelText:`取消`,onConfirm:W,children:(0,$.jsxs)(X,{type:`primary`,loading:A,disabled:A,style:{flex:1,height:52,borderRadius:12,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 20px rgba(99, 102, 241, 0.3)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`},onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px)`,e.currentTarget.style.boxShadow=`0 6px 25px rgba(99, 102, 241, 0.4)`},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0)`,e.currentTarget.style.boxShadow=`0 4px 20px rgba(99, 102, 241, 0.3)`},children:[(0,$.jsx)(`span`,{style:{position:`relative`,zIndex:1},children:F}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:`-100%`,width:`100%`,height:`100%`,background:`linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent)`,transition:`left 0.5s ease`},onMouseEnter:e=>{e.currentTarget.style.left=`100%`}}),x?.aiSuggestions&&x.aiSuggestions.length>0&&(0,$.jsx)(Rw,{title:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontWeight:600,marginBottom:8,color:`#6366f1`},children:`AI拆分方案`}),(x?.ai_suggestions||x?.aiSuggestions||[]).map(e=>(0,$.jsxs)(`div`,{style:{marginBottom:8,fontSize:13,lineHeight:1.5},children:[(0,$.jsxs)(`span`,{style:{fontWeight:500,color:`#6366f1`},children:[e.index,`.`]}),(0,$.jsx)(`span`,{style:{marginLeft:4,color:`#000000ff`},children:e.timeNode}),(0,$.jsx)(`br`,{}),(0,$.jsx)(`span`,{style:{color:`#666`},children:e.content})]},e.index))]}),placement:`top`,trigger:`hover`,overlayInnerStyle:{backgroundColor:`#fff`,height:300,overflowY:`auto`,border:`1px solid rgba(99, 102, 241, 0.1)`,borderRadius:12,boxShadow:`0 8px 24px rgba(99, 102, 241, 0.12)`},children:(0,$.jsx)(`span`,{style:{marginLeft:8,fontSize:13,opacity:.9},children:`(AI 镜头拆分方案)`})})]})})]}),(0,$.jsxs)(`div`,{style:{flex:2,background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,display:`flex`,flexDirection:`column`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,background:`linear-gradient(135deg, rgba(99,102,241,0.02) 0%, transparent 100%)`},children:[(0,$.jsx)(`h3`,{style:{fontSize:16,fontWeight:600,color:`#1e293b`,margin:0},children:`拆镜片段列表`}),(0,$.jsxs)(`span`,{style:{fontSize:12,color:`#64748b`,marginLeft:12},children:[`共 `,w.length,` 个片段`]})]}),(0,$.jsx)(s$,{columns:[{title:`片段`,width:100,fixed:`left`,align:`center`,render:(e,t)=>(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:600,color:`#333`},children:t.segmentName||`片段${t.segmentIndex||``}`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#999`},children:t.timeNode}),t.sourceMode===`custom`&&(0,$.jsx)(b$,{color:`blue`,style:{marginTop:6},children:`手动`}),t.sourceMode===`ai_suggestion`&&(0,$.jsx)(b$,{color:`orange`,style:{marginTop:6},children:`自动`})]})},{title:`片段视频`,width:150,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{position:`relative`,width:120,height:80,borderRadius:6,overflow:`hidden`,background:`#f1f5f9`,cursor:`pointer`},onClick:()=>{t.segmentVideoUrl&&(d(X9(t.segmentVideoUrl)),p(!0))},children:t.segmentVideoUrl?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:X9(t.segmentVideoUrl),style:{width:`100%`,height:`100%`,objectFit:`cover`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,bottom:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.3)`},children:(0,$.jsx)(`div`,{style:{width:32,height:32,borderRadius:`50%`,background:`rgba(255,255,255,0.9)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`div`,{style:{width:0,height:0,borderTop:`8px solid transparent`,borderBottom:`8px solid transparent`,borderLeft:`14px solid #6366f1`,marginLeft:2}})})})]}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:12},children:t.splitStatus===`failed`?`切割失败`:`切割中`})})},{title:`视频内容`,width:500,align:`left`,render:(e,t)=>{if(t.source_mode===`ai_suggestion`||t.sourceMode===`ai_suggestion`)return(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:t.segmentContent||t.lastError||`-`});let n=t.analysis_status||t.analysisStatus,r={not_required:`无需单独分析`,pending:`等待分析`,processing:`分析中`,failed:`分析失败`};return n===`processing`?(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(HK,{size:`small`}),(0,$.jsx)(`span`,{style:{fontSize:14,color:`#f59e0b`},children:`分析中`})]}):n===`failed`?(0,$.jsx)(`div`,{style:{fontSize:14,color:`#ef4444`,lineHeight:1.6},children:`分析失败`}):(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,lineHeight:1.6},children:n&&r[n]?r[n]:t.segmentContent||t.lastError||`-`})}},{title:`视频类型`,width:120,align:`center`,render:(e,t)=>(0,$.jsx)(`div`,{style:{fontSize:14,color:`#333`,fontWeight:500},children:t.segmentCategory||`-`})},{title:`状态`,width:120,align:`center`,dataIndex:`moduleProjectStatus`,render:(e,t)=>{let n=e,r=t.moduleProjectCurrentStepCode||t.currentStepCode,i=(()=>{if(r===`image_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待融合图生成`,color:`#f59e0b`};case`processing`:return{text:`图片提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`图片提示词生成成功`,color:`#10b981`};case`failed`:return{text:`图片提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`image_generate`)switch(n){case`waiting_user`:return{text:`等待生成视频提示词`,color:`#f59e0b`};case`processing`:return{text:`融合图生成中`,color:`#f59e0b`};case`completed`:return{text:`融合图生成成功`,color:`#10b981`};case`failed`:return{text:`融合图生成失败`,color:`#ef4444`};default:return n||`-`}else if(r===`video_prompt_optimize`)switch(n){case`waiting_user`:return{text:`等待最终视频生成`,color:`#f59e0b`};case`processing`:return{text:`视频提示词生成中`,color:`#f59e0b`};case`completed`:return{text:`视频提示词生成成功`,color:`#10b981`};case`failed`:return{text:`视频提示词生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`video_generate`)switch(n){case`waiting_user`:return{text:``,color:`#666`};case`processing`:return{text:`最终视频生成中`,color:`#f59e0b`};case`completed`:return{text:`任务完成`,color:`#10b981`};case`failed`:return{text:`最终视频生成失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else if(r===`material_input`)switch(n){case`waiting_user`:return{text:`等待生成图片提示词`,color:`#f59e0b`};case`processing`:return{text:`素材处理中`,color:`#f59e0b`};case`completed`:return{text:`素材上传成功`,color:`#10b981`};case`failed`:return{text:`素材上传失败`,color:`#ef4444`};default:return{text:n||`-`,color:`#666`}}else return t.moduleProjectId?{pending:{text:`子任务待处理`,color:`#f59e0b`},waiting_user:{text:`等待用户确认或触发`,color:`#f59e0b`},processing:{text:`子任务处理中`,color:`#f59e0b`},completed:{text:`子任务完成`,color:`#10b981`},failed:{text:`子任务失败`,color:`#ef4444`},cancelled:{text:`子任务取消`,color:`#94a3b8`}}[n]||{text:n||`-`,color:`#666`}:{text:`待生成任务`,color:`#94a3b8`}})();return typeof i==`string`?(0,$.jsx)(`span`,{style:{fontSize:12,color:`#666`,fontWeight:500},children:i}):(0,$.jsx)(`span`,{style:{fontSize:12,color:i.color,fontWeight:500},children:i.text})}},{title:`操作`,width:140,fixed:`right`,align:`center`,render:(e,n)=>(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:8},children:n.moduleProjectId?(0,$.jsx)(X,{type:`text`,onClick:()=>t(`/removelens/${n.moduleProjectId}/removefenbu`),style:{color:`#10b981`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:`详情任务`}):(0,$.jsx)(X,{type:`text`,onClick:()=>z(String(n.id),n.segmentName),disabled:!ne(n),style:{color:ne(n)?`#f59e0b`:`#94a3b8`,fontSize:12,padding:0,display:`flex`,alignItems:`center`,gap:4},children:ne(n)?`视频生成`:`待切割完成`})})}],dataSource:w,pagination:!1,bordered:!1,rowKey:`id`,scroll:{y:300},style:{flex:1},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`,height:80,overflow:`auto`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(255, 255, 255, 1)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})]})]}):(0,$.jsx)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{fontSize:16,color:`#999`},children:`加载中...`})})]}),(0,$.jsx)(aae,{open:i,videoUrl:P,title:`手动视频切片`,loading:O,minDuration:J9,maxDuration:Y9,onCancel:()=>a(!1),onConfirm:te}),(0,$.jsx)(ZH,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:18,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`智能视频复刻`}),c&&(0,$.jsxs)(`span`,{style:{fontSize:14,color:`#64748b`},children:[`- `,c]})]}),(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(Q5,{}),onClick:B,style:{padding:0,color:`#64748b`,fontSize:14}})]}),placement:`right`,closable:!1,onClose:B,open:n,size:480,styles:{body:{padding:`24px`,background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`},section:{borderRadius:`20px 0 0 20px`,overflow:`hidden`}},children:(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:20},children:[(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品白底图 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12},children:(0,$.jsx)(W0,{listType:`picture-card`,onChange:V,beforeUpload:H,maxCount:1,accept:`image/*`,style:{width:120,height:120,borderRadius:8,border:`2px dashed rgba(99, 102, 241, 0.3)`,background:`rgba(99, 102, 241, 0.02)`},children:!y&&(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,alignItems:`center`,gap:6},children:[(0,$.jsx)(zL,{style:{fontSize:20,color:`#6366f1`}}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#64748b`},children:`上传产品图`})]})})})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品名称 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(FG,{value:h,onChange:e=>g(e.target.value),placeholder:`请输入产品名称`,style:{height:44,borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:10,showCount:!0})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,padding:16,border:`1px solid rgba(99, 102, 241, 0.1)`},children:[(0,$.jsxs)(`label`,{style:{fontWeight:500,color:`#334155`,marginBottom:8,display:`block`,fontSize:14},children:[`产品卖点 `,(0,$.jsx)(`span`,{style:{color:`#ef4444`},children:`*`})]}),(0,$.jsx)(oae,{value:_,onChange:e=>v(e.target.value),placeholder:`请输入产品卖点`,style:{borderRadius:8,border:`1px solid rgba(99, 102, 241, 0.2)`},maxLength:100,showCount:!0,rows:3})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:12,marginTop:8},children:(0,$.jsx)(X,{type:`primary`,onClick:U,loading:E,disabled:E,style:{flex:1,height:48,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,fontWeight:600,fontSize:15,border:`none`,boxShadow:`0 4px 15px rgba(99, 102, 241, 0.3)`,transition:`all 0.2s ease`},onMouseEnter:e=>{e.currentTarget.style.boxShadow=`0 6px 20px rgba(99, 102, 241, 0.4)`,e.currentTarget.style.transform=`translateY(-1px)`},onMouseLeave:e=>{e.currentTarget.style.boxShadow=`0 4px 15px rgba(99, 102, 241, 0.3)`,e.currentTarget.style.transform=`translateY(0)`},children:E?`生成中...`:`手动生成`})})]})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`视频预览`})]}),open:f,onCancel:()=>p(!1),afterClose:()=>{m.current&&(m.current.pause(),m.current.currentTime=0)},footer:null,width:640,centered:!0,styles:{body:{padding:24},header:{borderBottom:`1px solid #e0e0e0`,padding:`20px 24px`}},children:(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`},children:(0,$.jsx)(`video`,{ref:m,controls:!0,src:u||``,style:{width:`100%`,maxHeight:420,objectFit:`contain`,backgroundColor:`#000`},playsInline:!0,"webkit-playsinline":!0,autoPlay:!0})})})]})}var{Title:lae,Text:Z9}=Q,{TextArea:uae}=FG;function dae(e){return e===void 0?e:JSON.parse(JSON.stringify(e))}function Q9(){let e=Ye(),{creatID:t}=$e(),[n,r]=(0,S.useState)(!1),[i,a]=(0,S.useState)(``),[o,s]=(0,S.useState)(!1),[c,l]=(0,S.useState)(`image`),[u,d]=(0,S.useState)({}),[f,p]=(0,S.useState)(null),[m,h]=(0,S.useState)(null),[g,_]=(0,S.useState)(``),[v,y]=(0,S.useState)(!1),[b,x]=(0,S.useState)({}),[C,w]=(0,S.useState)(``),[T,E]=(0,S.useState)(``),[D,O]=(0,S.useState)(!1),[k,A]=(0,S.useState)(!1),[j,M]=(0,S.useState)(5),[N,P]=(0,S.useState)(`16:9`),[F,I]=(0,S.useState)(`480p`),[L,R]=(0,S.useState)({ratios:[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:[`480p`,`720p`,`1080p`],durations:[5,8,10,12,15]}),[z,B]=(0,S.useState)([]),[V,H]=(0,S.useState)(1),[U,W]=(0,S.useState)(20),[ee,te]=(0,S.useState)(0),[ne,re]=(0,S.useState)(``),[G,ie]=(0,S.useState)({}),[K,ae]=(0,S.useState)([]),[q,oe]=(0,S.useState)([]),[se,ce]=(0,S.useState)(!1),[le,ue]=(0,S.useState)(``),[de,fe]=(0,S.useState)(`image`),pe=S.useRef(null);(0,S.useEffect)(()=>{if(se&&de===`video`){let e=()=>{pe.current&&pe.current.play().catch(()=>{})};pe.current&&(pe.current.readyState>=2?e():pe.current.addEventListener(`loadedmetadata`,e));let t=setTimeout(e,300);return()=>{clearTimeout(t),pe.current&&(pe.current.removeEventListener(`loadedmetadata`,e),pe.current.pause())}}else pe.current&&pe.current.pause()},[se,de]);let me=[{id:1,title:`原始素材`,description:`上传原始视频素材`,childId:1},{id:2,title:`生成提示词`,description:`根据素材生成描述词`,childId:2},{id:3,title:`生成产品融合图`,description:`生成产品与场景融合图`,childId:3},{id:4,title:`生成视频提示词`,description:`生成视频生成提示词`,childId:4},{id:5,title:`生成最终视频`,description:`合成最终视频`,childId:5}].map((e,t)=>({...e,status:K[t]?.status||``,id:K[t]?.id||t,output:K[t]?.output||``,engineId:K[t]?.input?.payload?.videoConfig?.engineId||``}));(0,S.useEffect)(()=>{let e=new Set;q.forEach(t=>{let n=me.find(e=>String(e.childId)===t);n&&(n.status===`completed`||n.status===`failed`)&&e.add(t)});for(let t=me.length-1;t>=0;t--)if(me[t].status===`completed`||me[t].status===`failed`){e.add(String(me[t].childId));break}e.size>0?oe(Array.from(e)):oe([])},[K]);let he=(e,t,n)=>{z7(e,t,n).then(e=>{e.items&&B(e.items),e.total!==void 0&&te(e.total)}).catch(e=>{})},ge=(e,t)=>{H(e),W(t),he(e,t,ne)},_e=()=>{he(1,20,ne)};(0,S.useEffect)(()=>{he(V,U,ne)},[]),(0,S.useEffect)(()=>{D7().then(e=>{if(x(e.engine||{}),e.engine?.video&&e.engine.video.length>0){w(e.engine.video[0].id);let t=e.engine.video[0];R({ratios:t.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:t.supportedResolutions||[`480p`,`720p`,`1080p`],durations:t.supportedDurations||[5,8,10,12,15]})}e.engine?.image&&e.engine.image.length>0&&E(e.engine.image[0].id)}).catch(e=>{})},[]),(0,S.useEffect)(()=>()=>{m&&(clearInterval(m),h(null))},[m]),(0,S.useEffect)(()=>{let e=e=>{let t=e.target;!t.closest(`.image-settings-trigger`)&&!t.closest(`.image-settings-popover`)&&(O(!1),A(!1))};return document.addEventListener(`mousedown`,e),()=>{document.removeEventListener(`mousedown`,e)}},[]),(0,S.useEffect)(()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},[t]),(0,S.useEffect)(()=>{let e=me[4];e&&e.status!==`completed`&&e.status!==`failed`?m||h(setInterval(be,3e4)):e&&m&&(clearInterval(m),h(null))},[me]);let ve=(e,t,n,i)=>{l(t||`image`),_(n?String(n):``),t===`video`?(p(i||null),d(e&&typeof e==`object`?dae(e):{}),a(``)):(p(null),a(e||``),d({})),r(!0)},ye=async()=>{if(c===`image`){if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存图片提示词`);return}if(!i||!i.trim()){Z.warning(`图片提示词不能为空`);return}y(!0);try{await dre(G.id,g,{prompt:i.trim()}),Z.success(`图片提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存图片提示词失败`)}finally{y(!1)}return}if(!G?.id||!g){Z.warning(`缺少任务或步骤 ID,无法保存视频提示词`);return}if(!u||typeof u!=`object`||Object.keys(u).length===0){Z.warning(`视频提示词不能为空`);return}if(!f){Z.warning(`视频提词配置缺失,暂不能保存`);return}let e=T9(u,f);if(e){Z.warning(e);return}y(!0);try{await fre(G.id,g,{prompt_schema:u}),Z.success(`视频提示词已保存`),xe(),r(!1),_(``)}catch(e){Z.error(e?.message||`保存视频提示词失败`)}finally{y(!1)}},be=()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},xe=()=>{t&&H7(t).then(e=>{ie(e),e.steps&&ae(e.steps)}).catch(e=>{})},Se=(e,t)=>{ue(e),fe(t),ce(!0)},Ce=()=>{ce(!1),ue(``),pe.current&&pe.current.pause()},we=e=>{if(e.preventDefault(),e.stopPropagation(),!le)return;let t=document.createElement(`a`);t.href=`http://ceshi.apiforeign.minzhong.cn${le}&download=1`,t.download=de===`image`?`image.png`:`video.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},Te=e=>{ure(G.id,e.toString()).then(e=>{Z.info(`正在生成图片提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ee=e=>{let t={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};U7(G.id,e.toString(),t).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},De=()=>{let e={engine_id:T,image_proportion:`1:1`,image_px:`2048x2048`,image_size:`2K`};U7(G.id,me[1].id.toString(),e).then(e=>{Z.info(`正在生成图片,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Oe=e=>{let t={engine_id:C,duration:j,aspect_ratio:N,resolution:F,target_platform:`抖音`};pre(G.id,e.toString(),t).then(e=>{Z.info(`正在生成视频提示词,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},ke=(e,t)=>{W7(G.id,e.toString(),{engine_id:``}).then(e=>{Z.info(`正在生成视频,请稍候...`),xe()}).catch(e=>{let t=e?.message?.split(`: `)?.[1]||e?.message||`生成失败`;Z.error(t)})},Ae=()=>{W7(G.id,me[3].id.toString(),{engine_id:``}).then(e=>{xe()}).catch(e=>{})};return(0,$.jsxs)(S.Fragment,{children:[(0,$.jsxs)(`div`,{className:`initialinfo-container`,style:{margin:`-24px -32px -32px`,height:`calc(100vh - 34px)`,position:`relative`,boxSizing:`border-box`,overflow:`hidden`,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:-100,right:-100,width:300,height:300,background:`radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,bottom:-100,left:-100,width:300,height:300,background:`radial-gradient(circle, rgba(167,139,250,0.08) 0%, transparent 70%)`,borderRadius:`50%`,pointerEvents:`none`}}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,justifyContent:`space-between`,alignItems:`stretch`,gap:`2%`,position:`relative`,zIndex:1,minHeight:0},children:[(0,$.jsxs)(`div`,{className:`replication-preview`,style:{flex:4,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,width:`100%`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,boxSizing:`border-box`},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(G2,{}),onClick:()=>window.history.back(),style:{borderRadius:10,fontSize:13,height:32,background:`rgba(99, 102, 241, 0.1)`,border:`1px solid rgba(99, 102, 241, 0.2)`,color:`#6366f1`},children:`返回`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent)`,borderRadius:1}}),(0,$.jsx)(`h3`,{style:{margin:0,fontSize:16,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`拆镜复刻 - 任务详情`}),(0,$.jsx)(`div`,{style:{width:32,height:2,background:`linear-gradient(90deg, transparent, #8b5cf6, #6366f1, transparent)`,borderRadius:1}})]}),(0,$.jsx)(X,{type:`primary`,ghost:!0,style:{borderRadius:10,padding:`4px 16px`,fontSize:13,background:`rgba(99, 102, 241, 0.1)`,borderColor:`rgba(99, 102, 241, 0.2)`,color:`#6366f1`},onClick:()=>s(!0),children:`创作记录`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`},children:(0,$.jsxs)(`div`,{className:`material_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:24,flexWrap:`wrap`,alignItems:`flex-start`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialVideoUrl?`pointer`:`default`},onClick:()=>G?.material?.materialVideoUrl&&Se(G.material.materialVideoUrl,`video`),children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无视频`})})]}),(0,$.jsxs)(`div`,{className:`product_img`,style:{flex:1,minWidth:250},children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`产品图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:G?.material?.materialImageUrl?`pointer`:`default`},onClick:()=>G?.material?.materialImageUrl&&Se(G.material.materialImageUrl,`image`),children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:`100%`,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:13},children:`暂无图片`})})]})]}),G?.finalImageUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成图片`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`1/1`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalImageUrl,`image`),children:(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:``,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})}),G?.finalVideoUrl&&(0,$.jsx)(`div`,{style:{marginTop:24},children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`span`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:10,display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`span`,{style:{width:3,height:14,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,display:`inline-block`}}),`生成视频`]}),(0,$.jsx)(`div`,{className:`medio_box`,style:{aspectRatio:`16/9`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,borderRadius:14,overflow:`hidden`,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.06)`,border:`1px solid rgba(99, 102, 241, 0.08)`,cursor:`pointer`},onClick:()=>Se(G.finalVideoUrl,`video`),children:(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})]})})]})})]}),(0,$.jsxs)(`div`,{className:`replication-form`,style:{flex:1,minWidth:`450px`,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(20px)`,borderRadius:20,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`,display:`flex`,flexDirection:`column`,minHeight:0},children:[(0,$.jsxs)(`div`,{style:{padding:`16px 24px`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,display:`flex`,alignItems:`center`,gap:10,background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`生成步骤`})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,padding:`8px 16px 16px`},children:(0,$.jsx)(e_,{activeKey:q,onChange:oe,ghost:!0,bordered:!1,style:{background:`transparent`},expandIconPlacement:`end`,items:me.map(e=>({key:String(e.childId),label:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,width:`100%`,justifyContent:`space-between`},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:16,height:16},children:e.status===`completed`?(0,$.jsx)(I4,{style:{fontSize:16,color:`#22c55e`}}):e.status===`processing`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:16,height:16,borderRadius:`50%`,background:`#ef4444`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:`#fff`,fontSize:10},children:`×`})}):(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:`50%`,background:`#cbd5e1`}})}),(0,$.jsx)(`span`,{style:{fontSize:14,color:e.status===`processing`||e.status===`waiting_user`?`#6366f1`:`#1e293b`,fontWeight:500},children:e.title}),(e.status===`processing`||e.status===`waiting_user`)&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#6366f1`,marginLeft:8},children:`生成中`}),e.status===`failed`&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#ef4444`,marginLeft:8},children:`失败`}),e.status===``&&(0,$.jsx)(`span`,{style:{fontSize:12,color:`#717d8b`,marginLeft:8},children:`待生成`})]})}),children:(0,$.jsxs)(`div`,{style:{padding:`16px`,background:`linear-gradient(135deg, rgba(248,250,252,0.6) 0%, rgba(238,242,255,0.4) 100%)`,borderRadius:12,marginTop:8,border:`1px solid rgba(99, 102, 241, 0.06)`},children:[e.childId===1&&(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,marginBottom:20,alignItems:`flex-start`,flexWrap:`wrap`},children:[(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`原视频`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.material.materialVideoUrl}`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10},controls:!0}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`2`,y:`2`,width:`20`,height:`16`,rx:`2`,ry:`2`}),(0,$.jsx)(`path`,{d:`M8 12l4 2 4-2`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无视频`})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:200},children:[(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,marginBottom:10,display:`block`,fontWeight:500},children:`产品图片`}),(0,$.jsx)(`div`,{style:{height:180,borderRadius:12,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,border:`1px solid rgba(99, 102, 241, 0.06)`},children:G?.material?.materialImageUrl?(0,$.jsx)(`img`,{src:G.material.materialImageUrl,alt:`产品图片`,style:{maxWidth:`100%`,maxHeight:`100%`,objectFit:`contain`,borderRadius:10}}):(0,$.jsxs)(`div`,{style:{textAlign:`center`,color:`#94a3b8`},children:[(0,$.jsxs)(`svg`,{width:`32`,height:`32`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,style:{marginBottom:8},children:[(0,$.jsx)(`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,ry:`2`}),(0,$.jsx)(`circle`,{cx:`8.5`,cy:`8.5`,r:`1.5`,fill:`currentColor`}),(0,$.jsx)(`path`,{d:`M21 15l-5-5L5 21`})]}),(0,$.jsx)(`div`,{style:{fontSize:13},children:`暂无图片`})]})})]}),(0,$.jsx)(X,{onClick:()=>{Te(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片提示词`})]})}),e.childId===2&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Z9,{style:{color:`#475569`,fontSize:13,lineHeight:1.8,whiteSpace:`pre-wrap`},children:e?.output?.payload?.prompt||`暂无提示词`})}),(0,$.jsxs)(oU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>ve(e?.output?.payload?.prompt,`image`,e.id),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`修改提示词`}),(0,$.jsx)(X,{onClick:()=>{Ee(e.id)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成图片`})]})]}),e.childId===3&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`,position:`relative`},children:[G.finalImageUrl?(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalImageUrl}`,alt:`融合图`,style:{width:`100%`,height:180,objectFit:`cover`}}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无融合图`}),(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>De(),disabled:e.status!==`completed`,style:{position:`absolute`,bottom:8,left:8,borderRadius:8,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:30,fontWeight:500,background:`rgba(255,255,255,0.85)`,backdropFilter:`blur(4px)`,padding:`0 12px`,fontSize:12},children:`重新生成`})]}),(0,$.jsx)(`p`,{style:{marginBottom:6,fontSize:14,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:`视频参数选择:`}),(0,$.jsxs)(`div`,{style:{width:`100%`,display:`flex`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{O(!D),A(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(G8,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsx)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:b.video?.find(e=>e.id===C)?.name||`选择引擎`})]}),D&&(0,$.jsx)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-10,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:(0,$.jsxs)(`div`,{style:{marginBottom:8},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择引擎`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:4},children:b.video?.map(e=>(0,$.jsxs)(`button`,{onClick:()=>{w(e.id),R({ratios:e.supportedRatios||[`16:9`,`4:3`,`1:1`,`3:4`,`9:16`,`21:9`],resolutions:e.supportedResolutions||[`480p`,`720p`,`1080p`],durations:e.supportedDurations||[5,8,10,12,15]}),e.supportedRatios?.includes(N)||P(e.supportedRatios?.[0]||`16:9`),e.supportedResolutions?.includes(F)||I(e.supportedResolutions?.[0]||`720p`),e.supportedDurations?.includes(j)||M(e.supportedDurations?.[0]||5),O(!1)},style:{flex:1,minHeight:48,borderRadius:8,border:C===e.id?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:C===e.id?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`flex-start`,padding:`8px 12px`,transition:`all 0.2s`,textAlign:`left`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,fontWeight:C===e.id?600:500,color:C===e.id?`#6366f1`:`#4b5563`,marginBottom:2},children:e.name}),(0,$.jsx)(`span`,{style:{fontSize:11,color:`#9ca3af`}})]},e.id))})]})})]}),(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,display:`inline-block`},children:[(0,$.jsxs)(`button`,{onClick:()=>{A(!k),O(!1)},className:`image-settings-trigger`,style:{width:`100%`,padding:`4px 12px`,height:34,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,backgroundColor:`rgba(255,255,255,0.7)`,cursor:`pointer`,display:`inline-flex`,alignItems:`center`,gap:6,transition:`all 0.2s`},children:[(0,$.jsx)(f6,{style:{fontSize:14,color:`#6366f1`}}),(0,$.jsxs)(Z9,{style:{fontSize:14,fontWeight:500,color:`#64748b`},children:[N,` · `,j,`s · `,F]})]}),k&&(0,$.jsxs)(`div`,{className:`image-settings-popover`,style:{position:`absolute`,bottom:`calc(100% + 8px)`,left:-160,width:350,backgroundColor:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.15)`,padding:16,border:`none`,zIndex:9999},onClick:e=>e.stopPropagation(),children:[(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择比例`}),(0,$.jsx)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:L.ratios.map(e=>(0,$.jsxs)(`button`,{onClick:()=>P(e),style:{flex:`0 0 calc(14.28% - 4px)`,minWidth:44,height:52,borderRadius:6,border:N===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:N===e?`#fff`:`#f9fafb`,cursor:`pointer`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:[(0,$.jsx)(`div`,{style:{width:18,height:18,border:`2px solid ${N===e?`#6366f1`:`#9ca3af`}`,borderRadius:2,marginBottom:2}}),(0,$.jsx)(`span`,{style:{fontSize:9,color:N===e?`#6366f1`:`#6b7280`,fontWeight:N===e?600:400},children:e})]},e))})]}),(0,$.jsxs)(`div`,{style:{marginBottom:16},children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,position:`relative`,height:24,display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,right:0,height:6,borderRadius:3,background:`#e5e7eb`,transform:`translateY(-50%)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:`50%`,left:0,height:6,borderRadius:3,background:`#6366f1`,width:`${(j-Math.min(...L.durations))/(Math.max(...L.durations)-Math.min(...L.durations))*100}%`,transform:`translateY(-50%)`}}),(0,$.jsx)(`input`,{type:`range`,min:Math.min(...L.durations),max:Math.max(...L.durations),value:j,onChange:e=>M(Number(e.target.value)),style:{position:`relative`,width:`100%`,height:24,borderRadius:3,background:`transparent`,outline:`none`,appearance:`none`,cursor:`pointer`,zIndex:1}})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,padding:`4px 12px`,backgroundColor:`#f1f5f9`,borderRadius:6},children:[(0,$.jsx)(`span`,{style:{fontSize:14,fontWeight:600,color:`#64748b`},children:j}),(0,$.jsx)(`span`,{style:{fontSize:12,color:`#9ca3af`},children:`秒`})]})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Z9,{style:{display:`block`,marginBottom:8,fontSize:12,fontWeight:500,color:`#666666`},children:`选择分辨率`}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:6},children:L.resolutions.map(e=>(0,$.jsx)(`button`,{onClick:()=>I(e),style:{flex:1,height:42,borderRadius:6,border:F===e?`2px solid #6366f1`:`1px solid #e5e7eb`,backgroundColor:F===e?`#6366f1`:`#f9fafb`,cursor:`pointer`,display:`flex`,justifyContent:`center`,alignItems:`center`,transition:`all 0.2s`},children:(0,$.jsx)(`span`,{style:{fontSize:12,fontWeight:600,color:F===e?`#fff`:`#4b5563`},children:e})},e))})]})]})]})]}),(0,$.jsx)(X,{type:`primary`,style:{width:`100%`,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},onClick:()=>{Oe(e.id)},disabled:e.status!==`completed`,children:`下一步:生成视频提示词`})]}),e.childId===4&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{padding:`12px 14px`,background:`rgba(255,255,255,0.6)`,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.08)`,marginBottom:4},children:(0,$.jsx)(Z9,{style:{color:`#64748b`,fontSize:13,lineHeight:1.8},children:`视频提词已生成,可点击按钮查看/修改`})}),(0,$.jsxs)(oU,{style:{marginTop:16,gap:12,width:`100%`},children:[(0,$.jsx)(X,{type:`default`,icon:(0,$.jsx)(n1,{}),onClick:()=>ve(G?.videoGeneration?.promptSchema,`video`,e.id,G?.videoGeneration?.schemaConfigSnapshot),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`||!G?.videoGeneration?.promptSchema||!G?.videoGeneration?.schemaConfigSnapshot,children:`查看/修改视频提词`}),(0,$.jsx)(X,{onClick:()=>{ke(e.id,e.engineId)},type:`primary`,style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,children:`下一步:生成视频`})]})]}),e.childId===5&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`div`,{style:{borderRadius:12,overflow:`hidden`,marginBottom:16,position:`relative`,background:`linear-gradient(135deg, rgba(248,250,252,0.8) 0%, rgba(238,242,255,0.6) 100%)`,border:`1px solid rgba(99, 102, 241, 0.08)`,boxShadow:`0 2px 8px rgba(99, 102, 241, 0.04)`},children:e.status===`completed`&&G?.finalVideoUrl?(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${G.finalVideoUrl}`,style:{width:`100%`,height:180,objectFit:`cover`},controls:!0}):e.status===`processing`?(0,$.jsxs)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:20,height:20,borderRadius:`50%`,border:`2px solid #e2e8f0`,borderTopColor:`#6366f1`,animation:`spinSlow 1s linear infinite`}}),(0,$.jsx)(`span`,{style:{color:`#6366f1`,fontSize:14},children:`视频生成中...`})]}):e.status===`failed`?(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#ef4444`,fontSize:14},children:`视频生成失败`}):(0,$.jsx)(`div`,{style:{width:`100%`,height:180,display:`flex`,alignItems:`center`,justifyContent:`center`,color:`#94a3b8`,fontSize:14},children:`暂无视频`})}),(0,$.jsxs)(oU,{style:{width:`100%`,gap:12},children:[(0,$.jsx)(X,{onClick:()=>Ae(),type:`default`,icon:(0,$.jsx)(n1,{}),style:{flex:1,borderRadius:10,borderColor:`rgba(99, 102, 241, 0.3)`,color:`#6366f1`,height:36,fontWeight:500,background:`rgba(99, 102, 241, 0.04)`},disabled:e.status!==`completed`,children:`重新生成`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),style:{flex:1,borderRadius:10,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,height:36,fontWeight:500,boxShadow:`0 4px 12px rgba(99, 102, 241, 0.3)`},disabled:e.status!==`completed`,onClick:()=>{let e=`http://ceshi.apiforeign.minzhong.cn${G?.finalVideoUrl}&download=1`,t=document.createElement(`a`);t.href=e,t.download=`video_${Date.now()}.mp4`,document.body.appendChild(t),t.click(),document.body.removeChild(t)},children:`下载视频`})]})]})]})}))})})]})]})]}),(0,$.jsx)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:10},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:15,fontWeight:700,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`,backgroundClip:`text`},children:c===`video`?`查看/编辑视频提词`:`修改提示词`})]}),open:n,onCancel:()=>{v||r(!1)},footer:[(0,$.jsx)(X,{onClick:()=>r(!1),disabled:v,style:{borderRadius:8},children:`取消`},`cancel`),(0,$.jsx)(X,{type:`primary`,onClick:ye,loading:v,disabled:v,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`确认`},`confirm`)],width:800,style:{borderRadius:16},styles:{header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(99, 102, 241, 0.08)`,padding:`16px 24px`},body:{background:`linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0f9ff 100%)`,padding:`20px 24px`}},children:c===`image`?(0,$.jsx)(uae,{value:i,onChange:e=>a(e.target.value),rows:8,style:{width:`100%`,height:300,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.15)`,background:`rgba(255,255,255,0.8)`},placeholder:`请输入提示词`}):(0,$.jsx)(`div`,{style:{maxHeight:500,overflowY:`auto`,paddingRight:10},children:(0,$.jsx)(M9,{value:u,schemaConfigSnapshot:f,onChange:d})})}),(0,$.jsxs)(pq,{title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:600,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,WebkitBackgroundClip:`text`,WebkitTextFillColor:`transparent`},children:`创作记录`})]}),open:o,onCancel:()=>s(!1),width:800,footer:null,styles:{body:{background:`linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%)`},header:{background:`#fff`,borderBottom:`1px solid rgba(99, 102, 241, 0.1)`,padding:`20px 24px`}},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,marginBottom:16,gap:8},children:[(0,$.jsx)(FG,{placeholder:`搜索产品名称`,value:ne,onChange:e=>re(e.target.value),onPressEnter:_e,style:{width:200,borderRadius:10,border:`1px solid rgba(99, 102, 241, 0.2)`,height:40}}),(0,$.jsx)(X,{type:`primary`,onClick:_e,style:{borderRadius:10,height:40,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`},children:`搜索`})]}),(0,$.jsx)(`div`,{style:{background:`linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%)`,backdropFilter:`blur(20px)`,borderRadius:16,overflow:`hidden`,border:`1px solid rgba(99, 102, 241, 0.1)`,boxShadow:`0 8px 32px rgba(99, 102, 241, 0.08)`},children:(0,$.jsx)(s$,{columns:[{title:`产品名称`,dataIndex:`title`,key:`title`,render:e=>(0,$.jsx)(`span`,{style:{fontSize:14,color:`#1e293b`,fontWeight:500},children:e})},{title:`创建时间`,dataIndex:`createdAt`,key:`createdAt`,render:e=>{if(!e)return`-`;let t=new Date(e);return(0,$.jsx)(`span`,{style:{fontSize:13,color:`#64748b`},children:`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)} ${String(t.getHours()).padStart(2,`0`)}:${String(t.getMinutes()).padStart(2,`0`)}:${String(t.getSeconds()).padStart(2,`0`)}`})}},{title:`操作`,key:`action`,align:`center`,render:t=>(0,$.jsx)(X,{type:`text`,onClick:()=>e(`/removelens/${t.id}/removeinfo`),style:{color:`#6366f1`,fontSize:13,padding:`4px 12px`,borderRadius:6,background:`rgba(99, 102, 241, 0.1)`},onMouseEnter:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.15)`},onMouseLeave:e=>{e.currentTarget.style.background=`rgba(99, 102, 241, 0.1)`},children:`查看详情`})}],dataSource:z,rowKey:`id`,pagination:{current:V,pageSize:U,total:ee,showSizeChanger:!0,showQuickJumper:!0,showTotal:e=>`共 ${e} 条`,onChange:ge,style:{padding:`16px 24px`,borderTop:`1px solid rgba(99, 102, 241, 0.1)`}},style:{fontSize:13},scroll:{y:350},components:{body:{row:({className:e,style:t,...n})=>(0,$.jsx)(`tr`,{...n,className:e,style:{...t,transition:`all 0.2s ease`,borderBottom:`1px solid rgba(99, 102, 241, 0.05)`}}),cell:({className:e,style:t,...n})=>(0,$.jsx)(`td`,{...n,className:e,style:{...t,padding:`16px 24px`}})},header:{cell:({className:e,style:t,...n})=>(0,$.jsx)(`th`,{...n,className:e,style:{...t,background:`rgba(99, 102, 241, 0.03)`,color:`#64748b`,fontWeight:500,fontSize:13,padding:`16px 24px`,borderBottom:`none`}})}}})})]}),(0,$.jsx)(pq,{open:se,title:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsx)(`div`,{style:{width:4,height:20,background:`linear-gradient(180deg, #8b5cf6 0%, #ddd6fe 100%)`,borderRadius:2}}),(0,$.jsx)(`span`,{style:{fontSize:16,fontWeight:700,color:`#8b5cf6`,letterSpacing:.4},children:`预览`})]}),onCancel:Ce,width:800,footer:(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`flex-end`,gap:12,padding:`16px 24px`,background:`rgba(255,255,255,0.6)`,borderTop:`1px solid rgba(139, 92, 246, 0.08)`},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),onClick:we,style:{borderRadius:10,background:`linear-gradient(135deg, #8b5cf6 0%, #ddd6fe 100%)`,border:`none`,boxShadow:`0 8px 18px rgba(47, 52, 64, 0.15)`},children:`下载`})}),centered:!0,style:{borderRadius:16},styles:{body:{display:`flex`,alignItems:`center`,justifyContent:`center`,minHeight:`400px`},header:{background:`rgba(255,255,255,0.6)`,backdropFilter:`blur(10px)`,borderBottom:`1px solid rgba(139, 92, 246, 0.08)`,padding:`16px 24px`}},children:(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,width:`100%`,height:`100%`},children:de===`image`?(0,$.jsx)(`img`,{src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,alt:`预览`,style:{width:`100%`,maxHeight:`400px`,objectFit:`contain`}}):(0,$.jsx)(`video`,{ref:pe,src:le.startsWith(`http`)?le:`http://ceshi.apiforeign.minzhong.cn${le}`,controls:!0,style:{maxWidth:`100%`,maxHeight:`400px`}})})})]})}var fae=`/assets/homebtn1-DjQgGq1F.png`,pae=`/assets/homebtn2-BNQvBUFh.png`,mae=`/assets/homebtn3-CaXf7CQb.png`;function hae(e){if(!e)return`-`;let t=String(e).trim();t.includes(`T`)||(t=t.replace(` `,`T`));let n=t.indexOf(`.`);n>0&&(t=t.slice(0,n)),t=t.replace(/[+-]\d{2}:?\d{0,2}$/,``).replace(/Z$/,``);let[r=``,i=``]=t.split(`T`),[,a=``,o=``]=r.split(`-`),s=i.slice(0,5);return!a||!o?`-`:`${a}-${o} ${s}`}var gae=()=>{let e=Ye(),[t,n]=(0,S.useState)(`project`),[r,i]=(0,S.useState)(``),[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)([]),[l,u]=(0,S.useState)(``),[d,f]=(0,S.useState)([]),[p,m]=(0,S.useState)(null),h=(0,S.useRef)(null);(0,S.useEffect)(()=>{Tre().then(e=>{if(e?.items?.length>0){c(e.items);let t=e.items[0].id;u(t),Y7(t).then(e=>{console.log(`caseButton:`,e),e?.categories?.[0]?.assets&&f(e.categories[0].assets)})}})},[]),(0,S.useEffect)(()=>{(async()=>{try{bre(5).then(e=>{for(let t in e)e[t].forEach(e=>{e.type=t,o(t=>[...t,e])});o(e=>e)})}catch{}})()},[]);let g=e=>{n(e)},_=[{icon:(0,$.jsx)(dU,{style:{fontSize:24,color:`#6366f1`}}),title:`爆款复刻`,description:`上传参考视频与产品图片,一键复刻爆款视频开头`,action:`立即创作`,path:`/initial`},{icon:(0,$.jsx)(z8,{style:{fontSize:24,color:`#f97316`}}),title:`拆镜复刻`,description:`精细化镜头复刻工具,拆分参考视频单镜头独立复刻,提升素材原创度,规避素材同质化`,action:`开始混剪`,path:`/removelens`},{icon:(0,$.jsx)(D8,{style:{fontSize:24,color:`#10b981`}}),title:`AI成片`,description:`输入想法、剧本或上传参考,智能生成视频/图片`,action:`立即生成`,path:`/conversation`}],v=[{key:`all`,label:`全部`},{key:`project`,label:`项目媒体`},{key:`chatAi`,label:`AI成片`},{key:`hotOpeningReplicate`,label:`爆款复刻`},{key:`shotReplicate`,label:`拆镜复刻`}],y=t===`all`?a:a.filter(e=>e.type===t);return(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:16},children:[(0,$.jsx)(`h3`,{children:`首页工作台 `}),(0,$.jsxs)(`p`,{style:{cursor:`pointer`,fontSize:12,letterSpacing:.3,padding:`10px 16px`,backgroundColor:`#ffffffff`,borderRadius:30,boxShadow:`0px 4px 12px 0px rgba(0, 0, 0, 0.1)`},children:[`如需进行账户素材推送:`,(0,$.jsxs)(`span`,{style:{color:`#1a50bbff`},onClick:()=>{e(`/authorization`)},children:[`一键推送`,(0,$.jsx)(J2,{style:{marginLeft:8,transform:`rotate(0deg)`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`linear-gradient(135deg, #f0f9ff 0%, #faf5ff 50%, #fef3c7 100%)`,border:`1px solid rgba(99,102,241,0.10)`,margin:`0 0 20px`,position:`relative`,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:18},children:(0,$.jsx)(`div`,{children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsxs)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:[`我的项目`,(0,$.jsx)(`span`,{style:{color:`#a8a8a8ff`,fontSize:12},children:`(操作步骤)`})]})]})})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:12},children:[(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第1步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px dashed #c7d2fe`,borderRadius:8,background:`#fafbff`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6},children:[(0,$.jsx)(`div`,{style:{width:8,height:8,borderRadius:2,background:`#6366f1`}}),(0,$.jsx)(`div`,{style:{flex:1,height:22,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4,display:`flex`,alignItems:`center`,padding:`0 8px`,fontSize:10,color:`#94a3b8`},children:`项目名称...`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,flexWrap:`wrap`,gap:4},children:[(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#eef2ff`,color:`#6366f1`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #c7d2fe`},children:`美妆`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#fff7ed`,color:`#f97316`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #fed7aa`},children:`美食`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#ecfdf5`,color:`#10b981`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #a7f3d0`},children:`3C数码`}),(0,$.jsx)(`div`,{style:{padding:`2px 8px`,background:`#f5f3ff`,color:`#8b5cf6`,borderRadius:10,fontSize:10,fontWeight:500,border:`1px solid #ddd6fe`},children:`服饰`})]}),(0,$.jsx)(`div`,{style:{height:16,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}}),(0,$.jsx)(`div`,{style:{height:16,width:`70%`,background:`#fff`,border:`1px solid #e2e8f0`,borderRadius:4}})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`创建新项目,自定义项目名称并选择对应行业分类`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(J2,{style:{transform:`rotate(0deg)`}})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第2步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:8,marginBottom:12},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,background:`#f1f5f9`,borderRadius:6,padding:2,gap:2},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,background:`#fff`,borderRadius:4,fontSize:11,fontWeight:600,color:`#6366f1`,boxShadow:`0 1px 3px rgba(99,102,241,0.15)`},children:[(0,$.jsx)(G5,{style:{fontSize:11}}),`视频`]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`5px 0`,fontSize:11,color:`#94a3b8`},children:[(0,$.jsx)(r8,{style:{fontSize:11}}),` 图片`]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`尺寸比例`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#eef2ff`,color:`#6366f1`,border:`1px solid #c7d2fe`,borderRadius:4,fontSize:10,fontWeight:600},children:`9:16`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`16:9`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`1:1`})]})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{fontSize:9,color:`#94a3b8`,marginBottom:3},children:`时长`}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:4},children:[(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`5s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff7ed`,color:`#f97316`,border:`1px solid #fed7aa`,borderRadius:4,fontSize:10,fontWeight:600},children:`10s`}),(0,$.jsx)(`div`,{style:{flex:1,textAlign:`center`,padding:`4px 0`,background:`#fff`,color:`#64748b`,border:`1px solid #e2e8f0`,borderRadius:4,fontSize:10},children:`15s`})]})]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`选择生成图片或视频,设置尺寸、时长等参数,点击生成即可一键优化提示词`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,color:`#94a3b8`,fontSize:22},children:(0,$.jsx)(J2,{})}),(0,$.jsxs)(`div`,{style:{flex:1,background:`#fff`,borderRadius:14,padding:`20px 18px`,display:`flex`,flexDirection:`column`,boxShadow:`0 2px 8px rgba(15, 23, 42, 0.04)`},children:[(0,$.jsx)(`div`,{style:{textAlign:`center`,fontSize:20,fontWeight:700,color:`#1e293b`,marginBottom:14,letterSpacing:1},children:`第3步`}),(0,$.jsxs)(`div`,{style:{flex:1,minHeight:140,border:`1px solid #e2e8f0`,borderRadius:8,background:`#fafafa`,padding:10,display:`flex`,flexDirection:`column`,gap:6,marginBottom:12,justifyContent:`space-between`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,flexDirection:`column`,gap:6},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`提示词已智能优化`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:6,padding:`5px 8px`,background:`#f0fdf4`,border:`1px solid #bbf7d0`,borderRadius:5},children:[(0,$.jsx)(`div`,{style:{width:14,height:14,borderRadius:`50%`,background:`#10b981`,color:`#fff`,fontSize:10,display:`flex`,alignItems:`center`,justifyContent:`center`,fontWeight:700},children:`✓`}),(0,$.jsx)(`div`,{style:{fontSize:10,color:`#065f46`,fontWeight:500},children:`尺寸 9:16 · 时长 5s`})]})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,padding:`6px 0`,background:`linear-gradient(135deg, #6366f1, #8b5cf6)`,color:`#fff`,borderRadius:5,fontSize:11,fontWeight:600,boxShadow:`0 2px 6px rgba(99,102,241,0.25)`},children:[(0,$.jsx)(D5,{style:{fontSize:11}}),`确认并生成素材`]})]}),(0,$.jsx)(`div`,{style:{background:`#f1f5f9`,borderRadius:10,padding:`14px 12px`,textAlign:`center`,fontSize:13,color:`#475569`,lineHeight:1.6},children:`核对图片 / 视频参数与优化后的提示词,确认后一键生成素材`})]}),(0,$.jsxs)(`div`,{onClick:()=>e(`/projects`),onMouseEnter:e=>{e.currentTarget.style.transform=`translateY(-2px) scale(1.05)`,e.currentTarget.style.boxShadow=`0 14px 32px rgba(99,102,241,0.45)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(3px)`)},onMouseLeave:e=>{e.currentTarget.style.transform=`translateY(0) scale(1)`,e.currentTarget.style.boxShadow=`0 8px 20px rgba(99,102,241,0.30)`;let t=e.currentTarget.querySelector(`.round-arrow`);t&&(t.style.transform=`translateX(0)`)},style:{cursor:`pointer`,display:`flex`,alignItems:`center`,justifyContent:`center`,gap:4,width:64,height:64,borderRadius:`50%`,textAlign:`center`,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%)`,color:`#fff`,fontSize:14,fontWeight:600,letterSpacing:.5,boxShadow:`0 8px 20px rgba(99,102,241,0.30)`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,userSelect:`none`,position:`relative`},children:[(0,$.jsx)(`span`,{style:{position:`absolute`,inset:0,borderRadius:`50%`,background:`radial-gradient(circle at 30% 25%, rgba(255,255,255,0.35) 0%, transparent 55%)`,pointerEvents:`none`}}),`前往`,(0,$.jsx)(J2,{className:`round-arrow`,style:{fontSize:13,transition:`transform 0.3s ease`}})]})]})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp stagger-children`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:18},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`AI 创作入口`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:8},children:`一键开启智能创作`})]}),(0,$.jsx)(`div`,{style:{display:`flex`,gap:16},children:_.map((t,n)=>{let r=[{color:`#6366f1`,light:`rgba(99,102,241,0.10)`,tag:`复刻`,bg:fae},{color:`#f97316`,light:`rgba(249,115,22,0.10)`,tag:`混剪`,bg:pae},{color:`#10b981`,light:`rgba(16,185,129,0.10)`,tag:`云创`,bg:mae}],i=r[n]||r[0];return(0,$.jsxs)(`div`,{onClick:()=>e(t.path),className:`project-card`,style:{flex:1,padding:`20px 22px`,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`,transition:`all 0.3s cubic-bezier(0.4, 0, 0.2, 1)`,position:`relative`,overflow:`hidden`,backgroundImage:`url(${i.bg})`,backgroundRepeat:`no-repeat`,backgroundSize:`100% 100%`,backgroundPosition:`center`},onMouseEnter:e=>{e.currentTarget.style.borderColor=i.color,e.currentTarget.style.boxShadow=`0 12px 32px ${i.light}`},onMouseLeave:e=>{e.currentTarget.style.borderColor=`#e2e8f0`,e.currentTarget.style.boxShadow=`none`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,top:0,left:0,right:0,height:3,background:`linear-gradient(90deg, ${i.color}, ${i.color}88)`}}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:14},children:[(0,$.jsx)(`div`,{style:{width:48,height:48,borderRadius:12,background:i.light,display:`flex`,alignItems:`center`,justifyContent:`center`},children:(0,$.jsx)(`span`,{style:{color:i.color,fontSize:22,display:`flex`},children:t.icon})}),(0,$.jsx)(`div`,{style:{fontSize:11,color:i.color,padding:`2px 8px`,borderRadius:6,background:i.light,fontWeight:600},children:i.tag})]}),(0,$.jsx)(`div`,{style:{fontSize:16,fontWeight:700,color:`#1f2937`,marginBottom:4},children:t.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#6b7280`,marginBottom:14,lineHeight:1.5,minHeight:36},children:t.description}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:4,color:i.color,fontSize:13,fontWeight:600},children:[t.action,(0,$.jsx)(J2,{style:{fontSize:12}})]})]},n)})})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`,marginBottom:20},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:16},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`近期作品`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(lR,{activeKey:t,onChange:g,items:v.map(e=>({key:e.key,label:e.label})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:y.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(r8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无作品`})]}):y.map(t=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>{let n=t.moduleProjectId;t.type===`hotOpeningReplicate`&&n!=null?e(`/initial/${n}/initialinfo`):t.type===`shotReplicate`&&n!=null?e(`/removelens/${n}/removefenbu`):t.type===`chatAi`?e(`/conversation`):t.type===`project`&&e(`/project`)},style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:[(()=>{let e=t.type!==`hotOpeningReplicate`&&(String(t.resourceType??``).toLowerCase()===`image`||t.resourceType===1||String(t.resourceType??``)===`1`),n=``;return n=e?`/static`+t.resultUrl+`&w=300&p=50`||``:(t.type,t.coverUrl||t.resultUrl||t.resultUrl||``),(0,$.jsx)(`img`,{src:n?n.startsWith(`http`)?n:`http://ceshi.apiforeign.minzhong.cn`+n:``,alt:t.title||t.name||`作品`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})})(),String(t.resourceType??``).toLowerCase()===`image`?null:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(G5,{style:{fontSize:28,color:`#fff`}})})]}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`,paddingTop:0},children:(0,$.jsxs)(`div`,{style:{marginTop:6,display:`flex`,alignItems:`center`,gap:6,fontSize:12,color:`#64748b`},children:[(0,$.jsx)(`span`,{style:{display:`inline-block`,padding:`1px 6px`,border:`1px solid #3b82f6`,borderRadius:4,color:`#3b82f6`,fontSize:11,fontWeight:500,background:`#fff`,lineHeight:1.4,whiteSpace:`nowrap`},children:{project:`项目媒体`,chatAi:`AI成片`,hotOpeningReplicate:`爆款复刻`,shotReplicate:`拆镜复刻`}[t.type]||`其他`}),(0,$.jsx)(`span`,{style:{color:`#94a3b8`},children:`·`}),(0,$.jsx)(`span`,{style:{whiteSpace:`nowrap`},children:hae(t.generatedTime)})]})})]},t.id||`${t.type}-${Math.random()}`))})]}),d.length>0&&(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,marginBottom:18},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,borderRadius:2,background:`linear-gradient(180deg, #6366f1, #a855f7)`}}),(0,$.jsx)(`div`,{style:{fontSize:17,fontWeight:700,color:`#1f2937`,letterSpacing:.3},children:`素材案例`}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginLeft:4},children:`精选优质作品参考`})]})}),(0,$.jsx)(`div`,{style:{marginBottom:20},children:(0,$.jsx)(lR,{activeKey:l,onChange:e=>{u(e),Y7(e).then(e=>{e?.categories?.[0]?.assets?f(e.categories[0].assets):f([])})},items:s.map(e=>({key:e.id,label:e.name})),className:`homepage-tabs`})}),(0,$.jsx)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(5, 1fr)`,gap:16},children:d.length===0?(0,$.jsxs)(`div`,{style:{gridColumn:`1 / -1`,padding:`60px 0`,textAlign:`center`,color:`#94a3b8`,fontSize:14},children:[(0,$.jsx)(r8,{style:{fontSize:36,color:`#cbd5e1`,marginBottom:8}}),(0,$.jsx)(`div`,{children:`暂无素材`})]}):d.map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card`,onClick:()=>m(e),style:{borderRadius:12,overflow:`hidden`,cursor:`pointer`,background:`#fff`,border:`1px solid #e2e8f0`},children:[(0,$.jsx)(`div`,{style:{position:`relative`,aspectRatio:`16/9`},children:e.mediaType===`video`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`video`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,style:{width:`100%`,height:`100%`,objectFit:`cover`},muted:!0,playsInline:!0}),(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`,background:`rgba(0,0,0,0.2)`},children:(0,$.jsx)(G5,{style:{fontSize:28,color:`#fff`}})})]}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${e.url}`,alt:e.title||`素材 ${t+1}`,style:{width:`100%`,height:`100%`,objectFit:`cover`}})}),(0,$.jsx)(`div`,{style:{padding:`10px 12px`,background:`#f8fafc`},children:(0,$.jsx)(`div`,{style:{fontSize:12,color:`#64748b`,textAlign:`center`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e.title||`素材 ${t+1}`})})]},e.id||t))})]}),(0,$.jsxs)(pq,{open:!!p,onCancel:()=>{h.current?.pause(),m(null)},footer:null,width:760,centered:!0,className:`preview-modal`,bodyStyle:{padding:0,background:`#fff`,borderRadius:16,overflow:`hidden`},children:[(0,$.jsx)(`div`,{style:{width:`100%`,paddingTop:`56.25%`,position:`relative`},children:(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,display:`flex`,alignItems:`center`,justifyContent:`center`},children:p?.mediaType===`video`?(0,$.jsx)(`video`,{ref:h,src:`http://ceshi.apiforeign.minzhong.cn${p.url}`,controls:!0,autoPlay:!0,style:{width:`100%`,height:`100%`,objectFit:`contain`}}):(0,$.jsx)(`img`,{src:`http://ceshi.apiforeign.minzhong.cn${p?.url}`,alt:p?.title,style:{width:`100%`,height:`100%`,objectFit:`contain`}})})}),p?.title&&(0,$.jsx)(`div`,{style:{padding:`14px 20px`,fontSize:14,color:`#4b5563`,fontWeight:500,borderTop:`1px solid #f1f5f9`,textAlign:`center`},children:p.title})]})]})},{RangePicker:_ae}=mH,$9=e=>e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),vae=()=>{let e=Ye(),[t]=On(),{message:n}=lx.useApp(),[r,i]=(0,S.useState)([]),[a,o]=(0,S.useState)(0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(!1),[p,m]=(0,S.useState)([]),[h,g]=(0,S.useState)([]),[_,v]=(0,S.useState)(``),[y,b]=(0,S.useState)(1),[x,C]=(0,S.useState)(10),[w,T]=(0,S.useState)(t.get(`advertiserId`)||``),[E,D]=(0,S.useState)(),[O,k]=(0,S.useState)((0,nD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),[A,j]=(0,S.useState)(``);(0,S.useEffect)(()=>{N(),M()},[]);let M=async(e=1,t=10,r,a)=>{c(!0);try{let n=await gre({advertiser_id:a??w,consume_date:r??E,page:e,page_size:t});i(n.data||[]),o(n.pagination?.total||0),b(n.pagination?.page||1),C(n.pagination?.pageSize||10)}catch{n.error(`加载数据失败`)}finally{c(!1)}},N=async()=>{try{let e=((await q7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e);let t=localStorage.getItem(`consumeColumns`);g(t?JSON.parse(t):e.map(e=>e.name))}catch{n.error(`加载表头字段失败`)}},P=r.map((e,t)=>({...e,index:t+1,key:e.id})),F=()=>{document.referrer.includes(window.location.origin)?e(-1):e(`/materials`)},I=()=>{b(1),M(1,x)},L=()=>{pq.confirm({title:`拉取消耗数据`,content:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12},children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`同步日期:`}),(0,$.jsx)(mH,{value:(0,nD.default)(O),onChange:e=>k(e?e.format(`YYYY-MM-DD`):(0,nD.default)().subtract(1,`day`).format(`YYYY-MM-DD`)),style:{width:`100%`}})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Text,{style:{display:`block`,marginBottom:8},children:`广告主ID(可选):`}),(0,$.jsx)(FG,{placeholder:`不指定则同步所有授权的广告主`,value:A,onChange:e=>j(e.target.value)})]})]}),onOk:async()=>{u(!0);try{await _re({date:O,advertiser_id:A||void 0}),n.success(`拉取消耗数据成功`),M(y,x)}catch{n.error(`拉取消耗数据失败`)}finally{u(!1)}},okText:`开始拉取`,cancelText:`取消`})},R=h.map(e=>p.find(t=>t.name===e)).filter(e=>!!e).map(e=>({title:e.description,dataIndex:e.name,key:e.name,ellipsis:!0}));return(0,$.jsxs)(`div`,{style:{minHeight:`94vh`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,marginBottom:12},children:[t.get(`advertiserId`)&&(0,$.jsx)(X,{type:`text`,icon:(0,$.jsx)(G2,{}),onClick:F}),(0,$.jsx)(x3,{style:{color:`#6366f1`,fontSize:16}}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:16},children:`消耗记录`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,gap:12,marginBottom:16},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(FG,{placeholder:`广告主ID`,value:w,onChange:e=>T(e.target.value),style:{width:180},allowClear:!0,onPressEnter:()=>{b(1),M(1,x)}}),(0,$.jsx)(_ae,{value:E?[(0,nD.default)(E[0]),(0,nD.default)(E[1])]:void 0,onChange:e=>{e&&e[0]&&e[1]?D([e[0].format(`YYYY-MM-DD`),e[1].format(`YYYY-MM-DD`)]):D(void 0)}}),(0,$.jsx)(X,{type:`primary`,size:`medium`,onClick:I,children:`搜索`})]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12},children:[(0,$.jsx)(X,{icon:(0,$.jsx)(v5,{}),onClick:L,loading:l,style:{borderRadius:8},children:`拉取消耗`}),(0,$.jsx)(X,{icon:(0,$.jsx)(G8,{}),onClick:()=>f(!0),style:{borderRadius:8},children:`自定义表头`})]})]}),(0,$.jsxs)(`div`,{style:{background:`#fff`,borderRadius:12,boxShadow:`0 1px 3px rgba(0,0,0,0.05)`},children:[(0,$.jsx)(s$,{dataSource:P,columns:R,loading:s,pagination:!1,rowKey:`id`,bordered:!1,scroll:{x:`max-content`}}),(0,$.jsx)(`div`,{style:{padding:`16px`,textAlign:`right`},children:(0,$.jsx)(xK,{current:y,pageSize:x,total:a,showSizeChanger:!0,showTotal:e=>`共 ${e} 条记录`,onChange:(e,t)=>{b(e),C(t),M(e,t)},size:`small`})})]}),(0,$.jsx)(pq,{title:`自定义表头`,open:d,onOk:()=>{localStorage.setItem(`consumeColumns`,JSON.stringify(h)),n.success(`表头设置已保存`),f(!1)},onCancel:()=>{f(!1),v(``)},okText:`确定`,cancelText:`取消`,width:800,children:(0,$.jsxs)(`div`,{style:{display:`flex`,gap:20,height:400},children:[(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(FG,{placeholder:`搜索指标...`,value:_,allowClear:!0,onChange:e=>v(e.target.value),style:{marginBottom:8}}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12,marginBottom:12,display:`block`},children:`输入指标名称进行搜索`}),(0,$.jsxs)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:[(0,$.jsx)(`div`,{style:{marginBottom:16},children:(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:`任务详情指标`})}),(0,$.jsx)(eB,{checked:h.length===p.length&&p.length>0,indeterminate:h.length>0&&h.length{e.target.checked?g(p.map(e=>e.name)):g([])},style:{marginBottom:12},children:`全选`}),(0,$.jsx)(`div`,{style:{display:`grid`,gridTemplateColumns:`1fr 1fr`,gap:8},children:p.filter(e=>e.description.toLowerCase().includes(_.toLowerCase())||e.name.toLowerCase().includes(_.toLowerCase())).map(e=>(0,$.jsx)(eB,{checked:h.includes(e.name),onChange:t=>{t.target.checked?g(t=>[...t,e.name]):g(t=>t.filter(t=>t!==e.name))},children:e.description},e.name))})]})]}),(0,$.jsxs)(`div`,{style:{flex:1,display:`flex`,flexDirection:`column`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:12},children:[(0,$.jsxs)(Q.Text,{strong:!0,style:{fontSize:14,color:`#1e293b`},children:[`已添加(`,h.length,`)`]}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:8},children:[(0,$.jsx)(X,{size:`small`,onClick:()=>g([]),disabled:h.length===0,children:`清空`}),(0,$.jsx)(X,{size:`small`,onClick:async()=>{try{let e=((await q7()).data||[]).map(e=>({name:$9(e.field),description:e.description}));m(e),g(e.map(e=>e.name)),localStorage.removeItem(`consumeColumns`),n.success(`表头字段已更新`)}catch{n.error(`更新表头字段失败`)}},children:`更新表头字段`})]})]}),(0,$.jsx)(`div`,{style:{flex:1,overflowY:`auto`,border:`1px solid #f0f0f5`,borderRadius:8,padding:12},children:h.length===0?(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:14,textAlign:`center`,display:`block`,padding:`40px 0`},children:`暂无已选指标`}):(0,$.jsx)(`div`,{children:h.map((e,t)=>{let n=p.find(t=>t.name===e);return(0,$.jsxs)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,padding:`8px 12px`,borderBottom:`1px solid #f0f0f5`,cursor:`move`,userSelect:`none`},draggable:!0,onDragStart:e=>{e.dataTransfer.setData(`index`,String(t))},onDragOver:e=>{e.preventDefault()},onDrop:e=>{let n=parseInt(e.dataTransfer.getData(`index`)),r=t;if(n!==r){let e=[...h],[t]=e.splice(n,1);e.splice(r,0,t),g(e)}},children:[(0,$.jsx)(Q.Text,{children:n?.description||e}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{fontSize:12},children:t+1})]},e)})})})]})]})})]})},yae=()=>{let e=Ye(),[t]=On(),{message:n}=lx.useApp(),[r,i]=(0,S.useState)(0),[a,o]=(0,S.useState)(!0),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(``);(0,S.useEffect)(()=>{let r=t.get(`auth_code`),a=t.get(`state`);if(!r||!a){o(!1),i(10);return}let s={auth_code:r,state:a,app_id:t.get(`app_id`)||void 0,material_auth_status:t.get(`material_auth_status`)||void 0,scope:t.get(`scope`)||void 0,uid:t.get(`uid`)||void 0};(async()=>{try{let t=await tre(s);c(!0),o(!1),n.success(t?.message||`授权成功`),setTimeout(()=>{e(`/authorization`)},1500)}catch(e){let t=e?.message||`授权失败`;u(t),o(!1),n.error(t)}})();let l=setInterval(()=>{i(e=>e>=11?(o(!1),e):e+1)},1e3);return()=>{clearInterval(l)}},[e,t,n]);let d=()=>{i(0),o(!0),c(!1),u(``),window.location.href=`/authorization`};return s?(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`#dcfce7`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:(0,$.jsx)(Q.Text,{style:{fontSize:40,color:`#22c55e`},children:`✓`})}),(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权成功`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`},children:`正在跳转至授权管理页面...`})]})}):(0,$.jsx)(`div`,{style:{minHeight:`100vh`,display:`flex`,justifyContent:`center`,alignItems:`center`,background:`linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)`},children:(0,$.jsxs)(`div`,{style:{textAlign:`center`,padding:`60px 80px`,background:`#fff`,borderRadius:16,boxShadow:`0 10px 40px rgba(0,0,0,0.1)`},children:[(0,$.jsx)(`div`,{style:{width:80,height:80,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,borderRadius:`50%`,display:`flex`,justifyContent:`center`,alignItems:`center`,margin:`0 auto 24px`},children:a&&r<10?(0,$.jsx)(HK,{size:`large`,tip:`加载中`,style:{color:`#fff`}}):(0,$.jsx)(sH,{style:{fontSize:40,color:`#fff`}})}),l?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权失败`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:l}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)($q,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):r>=10?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#ef4444`},children:`授权无响应`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`请重新授权`}),(0,$.jsx)(X,{type:`primary`,size:`large`,icon:(0,$.jsx)($q,{}),onClick:d,style:{borderRadius:8,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,fontWeight:600,padding:`12px 32px`},children:`重新授权`})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Q.Title,{level:3,style:{marginBottom:16,color:`#1e293b`},children:`授权中,请等待`}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,marginBottom:24,display:`block`},children:`正在等待平台完成授权操作`}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`center`,gap:8},children:[(0,$.jsx)(sH,{style:{color:`#6366f1`}}),(0,$.jsxs)(Q.Text,{style:{color:`#6366f1`,fontWeight:500,fontSize:16},children:[r,`s`]})]})]})]})})},bae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #fffbeb 0%, #fef3c7 50%, #fed7aa 100%)`,border:`1px solid rgba(245, 158, 11, 0.18)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #f59e0b 0%, #d97706 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(245, 158, 11, 0.3)`},children:(0,$.jsx)(l4,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700,backgroundImage:`linear-gradient(90deg, #f59e0b 0%, #d97706 30%, #ea580c 50%, #d97706 70%, #f59e0b 100%)`},children:`行业爆款大盘`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#b45309`},children:[(0,$.jsx)(w8,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`实时追踪全网热门素材趋势`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#78716c`,fontSize:14,lineHeight:1.7},children:`实时追踪各行业爆款素材,把握创作风向,打造热门内容`})]}),(0,$.jsx)(`div`,{style:{position:`relative`},children:(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(N5,{style:{marginRight:8,color:`#6366f1`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`爆款素材榜单`}),(0,$.jsx)(`span`,{style:{marginLeft:10,fontSize:12,fontWeight:400,color:`#94a3b8`}})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(2, 1fr)`,gap:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,zIndex:1,inset:0,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:2,color:`#fff`,borderRadius:6},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(x6,{style:{marginRight:6}}),`立即解锁全部`,(0,$.jsx)(J2,{style:{marginLeft:4,fontSize:12}})]})}),[{rank:1,title:`夏日美妆教程:3 步打造奶油肌`,author:`美妆博主·小雅`,views:`128.4w`,likes:`12.6w`,comments:`8,234`,tag:`NO.1`,tagColor:`#f59e0b`},{rank:2,title:`平价穿搭 | 学生党一周不重样`,author:`穿搭达人·Miki`,views:`96.2w`,likes:`9.8w`,comments:`6,128`,tag:`NO.2`,tagColor:`#a78bfa`},{rank:3,title:`探店 vlog | 网红咖啡馆测评`,author:`美食探店·阿伦`,views:`78.5w`,likes:`7.4w`,comments:`4,892`,tag:`NO.3`,tagColor:`#6366f1`},{rank:4,title:`iPhone 16 Pro 一周深度体验`,author:`数码评测·老王`,views:`65.7w`,likes:`6.1w`,comments:`3,847`,tag:`NO.4`,tagColor:`#94a3b8`}].map(e=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{display:`flex`,gap:14,padding:14,borderRadius:14,background:`#fff`,border:`1px solid #e2e8f0`,cursor:`pointer`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,width:140,height:80,flexShrink:0,borderRadius:10,overflow:`hidden`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(f8,{style:{fontSize:28,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:6,left:6,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:600},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{flex:1,minWidth:0,display:`flex`,flexDirection:`column`},children:[(0,$.jsx)(`div`,{style:{fontSize:14,fontWeight:600,color:`#1e293b`,marginBottom:4,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(`div`,{style:{fontSize:12,color:`#94a3b8`,marginBottom:8},children:e.author}),(0,$.jsxs)(`div`,{style:{display:`flex`,gap:12,fontSize:12,color:`#64748b`},children:[(0,$.jsxs)(`span`,{children:[(0,$.jsx)(pG,{style:{marginRight:3}}),e.views]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(h6,{style:{marginRight:3}}),e.likes]}),(0,$.jsxs)(`span`,{children:[(0,$.jsx)(r3,{style:{marginRight:3}}),e.comments]})]})]})]},e.rank))]})]})})]}),xae=()=>(0,$.jsxs)(`div`,{className:`content_box`,children:[(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`28px 32px`,borderRadius:16,background:`linear-gradient(135deg, #f5f3ff 0%, #ede9fe 50%, #fce7f3 100%)`,border:`1px solid rgba(139, 92, 246, 0.12)`,marginBottom:24,position:`relative`,overflow:`hidden`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:14,marginBottom:12},children:[(0,$.jsx)(`div`,{style:{width:52,height:52,borderRadius:14,background:`linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`,boxShadow:`0 6px 20px rgba(139, 92, 246, 0.3)`},children:(0,$.jsx)(z3,{style:{fontSize:24,color:`#fff`}})}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`shiny-text-container`,style:{marginBottom:4},children:(0,$.jsx)(`span`,{className:`shiny-text`,style:{fontSize:26,fontWeight:700},children:`创意素材案例`})}),(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:8,fontSize:13,color:`#7c3aed`},children:[(0,$.jsx)(f3,{style:{fontSize:12}}),(0,$.jsx)(`span`,{children:`探索 AI 创作无限可能`})]})]})]}),(0,$.jsx)(Q.Text,{style:{color:`#64748b`,fontSize:14,lineHeight:1.7},children:`精选 AI 生成的优秀素材案例,展示 AI 创作的无限潜力与创意灵感`})]}),(0,$.jsxs)(`div`,{className:`animate-fadeInUp`,style:{padding:`24px 28px`,borderRadius:16,background:`#fff`,position:`relative`},children:[(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`space-between`,alignItems:`center`,marginBottom:20},children:(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`},children:[(0,$.jsx)(`div`,{style:{width:4,height:18,background:`linear-gradient(180deg, #6366f1, #8b5cf6)`,borderRadius:2,marginRight:10}}),(0,$.jsx)(h5,{style:{marginRight:8,color:`#f59e0b`,fontSize:16}}),(0,$.jsx)(`span`,{style:{fontSize:17,fontWeight:600,color:`#1f2937`},children:`精选案例展示`})]})}),(0,$.jsxs)(`div`,{className:`stagger-children`,style:{display:`grid`,gridTemplateColumns:`repeat(3, 1fr)`,gap:16,marginBottom:16,position:`relative`},children:[(0,$.jsx)(`div`,{style:{position:`absolute`,inset:0,zIndex:1,background:`rgb(255,255,255)`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,borderRadius:14,gap:4,color:`#fff`},children:(0,$.jsxs)(X,{type:`primary`,size:`middle`,onClick:()=>{Z.info(`请联系客服开通会员`)},style:{borderRadius:10,fontWeight:500,background:`linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%)`,border:`none`,boxShadow:`0 4px 14px rgba(99, 102, 241, 0.28)`},children:[(0,$.jsx)(x6,{style:{marginRight:6}}),`解锁全部案例`,(0,$.jsx)(J2,{style:{marginLeft:4,fontSize:12}})]})}),[{title:`美妆直播切片`,tag:`热门`,tagColor:`#ef4444`},{title:`3C 数码测评`,tag:`推荐`,tagColor:`#6366f1`},{title:`美食探店 vlog`,tag:`推荐`,tagColor:`#6366f1`},{title:`服饰穿搭合集`,tag:`热门`,tagColor:`#ef4444`},{title:`家居场景展示`,tag:`推荐`,tagColor:`#6366f1`},{title:`母婴亲子内容`,tag:`热门`,tagColor:`#ef4444`}].map((e,t)=>(0,$.jsxs)(`div`,{className:`project-card animate-fadeInUp`,style:{position:`relative`,borderRadius:14,overflow:`hidden`,cursor:`pointer`,border:`1px solid #e2e8f0`,background:`#fff`},children:[(0,$.jsxs)(`div`,{style:{position:`relative`,aspectRatio:`16/9`,background:`linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%)`,display:`flex`,alignItems:`center`,justifyContent:`center`},children:[(0,$.jsx)(f8,{style:{fontSize:36,color:`rgba(255,255,255,0.6)`}}),(0,$.jsx)(`div`,{style:{position:`absolute`,top:10,left:10,padding:`2px 8px`,borderRadius:6,background:e.tagColor,color:`#fff`,fontSize:11,fontWeight:500},children:e.tag})]}),(0,$.jsxs)(`div`,{style:{padding:`10px 14px`,background:`#f8fafc`,display:`flex`,alignItems:`center`,justifyContent:`space-between`},children:[(0,$.jsx)(`span`,{style:{fontSize:13,color:`#334155`,fontWeight:500,whiteSpace:`nowrap`,overflow:`hidden`,textOverflow:`ellipsis`},children:e.title}),(0,$.jsx)(pG,{style:{fontSize:13,color:`#94a3b8`}})]})]},t))]})]})]}),{RangePicker:Sae}=mH,Cae=()=>{let[e,t]=(0,S.useState)(null),[n,r]=(0,S.useState)(!1),i=(0,S.useCallback)(async()=>{r(!0);try{t(await Pre())}catch(e){Z.error(e?.message||`获取团队信息失败`)}finally{r(!1)}},[]);(0,S.useEffect)(()=>{i()},[i]);let[a,o]=(0,S.useState)([]),[s,c]=(0,S.useState)(0),[l,u]=(0,S.useState)(!1),[d,f]=(0,S.useState)(1),p=(0,S.useCallback)(async()=>{if(e){u(!0);try{let e=await Fre(d);o(e.items||[]),c(e.total||0)}catch(e){Z.error(e?.message||`加载成员失败`)}finally{u(!1)}}},[e,d]);(0,S.useEffect)(()=>{p()},[p]);let[m,h]=(0,S.useState)({open:!1,member:null}),[g]=eW.useForm(),[_,v]=(0,S.useState)(!1),y=async()=>{if(m.member)try{let e=await g.validateFields();v(!0),await Ire(m.member.id,e.amount,e.direction||`increase`,e.description),Z.success(e.direction===`decrease`?`积分扣减成功`:`积分增加成功`),h({open:!1,member:null}),g.resetFields(),p(),ue()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`操作失败`)}finally{v(!1)}},[b,x]=(0,S.useState)([]),[C,w]=(0,S.useState)(!1),[T,E]=(0,S.useState)(!1),[D]=eW.useForm(),[O,k]=(0,S.useState)(!1),A=(0,S.useCallback)(async()=>{w(!0);try{x(await Lre()||[])}catch(e){Z.error(e?.message||`加载邀请码失败`)}finally{w(!1)}},[]);(0,S.useEffect)(()=>{A()},[A]);let j=async()=>{try{let e=await D.validateFields();k(!0);let t=e.expiresAt?new Date(e.expiresAt).toISOString():null;await Rre(e.maxUses||null,t),Z.success(`邀请码已生成`),E(!1),D.resetFields(),A()}catch(e){if(e?.errorFields)return;Z.error(e?.message||`创建失败`)}finally{k(!1)}},M=async e=>{try{await zre(e),Z.success(`已撤销`),A()}catch(e){Z.error(e?.message||`撤销失败`)}},N=e=>{navigator.clipboard.writeText(e).then(()=>{Z.success(`邀请链接已复制`)}).catch(()=>{Z.warning(`复制失败,请手动复制`)})},[P,F]=(0,S.useState)([]),[I,L]=(0,S.useState)(!1),R=(0,S.useCallback)(async()=>{L(!0);try{F(await Bre()||[])}catch(e){Z.error(e?.message||`加载申请失败`)}finally{L(!1)}},[]);(0,S.useEffect)(()=>{R()},[R]);let z=async(e,t,n)=>{try{await Vre(e,t,n),Z.success(t===`approve`?`已通过`:`已拒绝`),R(),p()}catch(e){Z.error(e?.message||`操作失败`)}},[B,V]=(0,S.useState)([]),[H,U]=(0,S.useState)(0),[W,ee]=(0,S.useState)(null),[te,ne]=(0,S.useState)(!1),[re,G]=(0,S.useState)(1),[ie,K]=(0,S.useState)(``),[ae,q]=(0,S.useState)(``),[oe,se]=(0,S.useState)(``),[ce,le]=(0,S.useState)(``),ue=(0,S.useCallback)(async()=>{ne(!0);try{let e=await Wre({page:re,pageSize:20,phone:ae||void 0,recordType:ie||void 0,startDate:oe||void 0,endDate:ce||void 0});V(e.items||[]),U(e.total||0),ee(e.summary||null)}catch(e){Z.error(e?.message||`加载积分记录失败`)}finally{ne(!1)}},[re,ie,ae,oe,ce]);(0,S.useEffect)(()=>{ue()},[ue]);let de=[{key:`members`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(H5,{}),`成员列表`,s>0&&(0,$.jsxs)(`span`,{style:{color:`#94a3b8`,fontSize:12},children:[`(`,s,`)`]})]}),children:(0,$.jsx)(s$,{columns:[{title:`用户名`,dataIndex:`username`,width:150,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`积分`,dataIndex:`credits`,width:100,render:e=>(0,$.jsx)(Q.Text,{style:{color:`#6366f1`},children:(e??0).toFixed(2)})},{title:`状态`,dataIndex:`isActive`,width:80,render:e=>(0,$.jsx)(b$,{color:e?`green`:`red`,children:e?`启用`:`禁用`})},{title:`加入时间`,dataIndex:`joinedAt`,width:160,render:e=>a9(e)},{title:`操作`,key:`action`,width:100,render:(e,t)=>(0,$.jsx)(X,{size:`small`,type:`link`,onClick:()=>{h({open:!0,member:t}),g.resetFields()},children:`调整积分`})}],dataSource:a,rowKey:`id`,loading:l,pagination:{current:d,pageSize:20,total:s,onChange:e=>f(e),showTotal:e=>`共 ${e} 人`,position:[`bottomLeft`]},scroll:{x:800},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无成员`})}})},{key:`credits`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(q5,{}),`团队积分变动`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{style:{marginBottom:12,display:`flex`,gap:8,flexWrap:`wrap`,alignItems:`center`},children:[(0,$.jsx)(JC,{value:ie||void 0,onChange:e=>{K(e||``),G(1)},allowClear:!0,placeholder:`交易类型`,style:{width:130},options:[{value:`recharge`,label:`充值`},{value:`consume`,label:`消费`},{value:`team_internal`,label:`团队内部`},{value:`refund`,label:`退款`}]}),(0,$.jsx)(FG,{placeholder:`搜索手机号`,value:ae,onChange:e=>{q(e.target.value),G(1)},style:{width:160},allowClear:!0}),(0,$.jsx)(Sae,{value:oe&&ce?[(0,nD.default)(oe),(0,nD.default)(ce)]:void 0,onChange:e=>{e&&e[0]&&e[1]?(se(e[0].format(`YYYY-MM-DD`)),le(e[1].format(`YYYY-MM-DD`))):(se(``),le(``)),G(1)}}),(0,$.jsx)(X,{onClick:()=>{K(``),q(``),se(``),le(``),G(1)},children:`重置`}),(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(R0,{}),onClick:()=>{let e=Gre({phone:ae||void 0,recordType:ie||void 0,startDate:oe||void 0,endDate:ce||void 0}),t=localStorage.getItem(`auth_token`),n=t?{Authorization:`Bearer ${t}`}:{};fetch(e,{headers:n}).then(e=>e.blob()).then(e=>{let t=document.createElement(`a`);t.href=URL.createObjectURL(e),t.download=`team_credits_${Date.now()}.csv`,t.click(),URL.revokeObjectURL(t.href)}).catch(()=>Z.error(`导出失败`))},children:`导出 Excel`})]}),(0,$.jsxs)(`div`,{style:{marginBottom:12,padding:`8px 12px`,background:`#f8f9fc`,borderRadius:8,display:`flex`,gap:20,flexWrap:`wrap`,fontSize:13},children:[(0,$.jsxs)(`span`,{children:[`总充值:`,(0,$.jsxs)(`strong`,{style:{color:`#16a34a`},children:[`+`,W?.total_recharge??0]})]}),(0,$.jsxs)(`span`,{children:[`总消费:`,(0,$.jsxs)(`strong`,{style:{color:`#dc2626`},children:[`-`,W?.total_consume??0]})]})]}),(0,$.jsx)(s$,{size:`small`,rowKey:`id`,loading:te,dataSource:B,pagination:{current:re,pageSize:20,total:H,onChange:e=>G(e),showTotal:e=>`共 ${e} 条`,position:[`bottomLeft`]},scroll:{x:950},columns:[{title:`用户名`,key:`username`,width:120,render:(e,t)=>(0,$.jsx)(Q.Text,{strong:!0,children:t.username||`-`})},{title:`手机号`,key:`phone`,width:120,render:(e,t)=>t.phone||`-`},{title:`类型`,key:`type`,width:100,render:(e,t)=>(0,$.jsx)(b$,{color:{recharge:`green`,consume:`red`,refund:`orange`,team_internal:`blue`}[t.type]||`default`,children:{recharge:`充值`,consume:`消费`,refund:`退款`,team_internal:`团队内部`}[t.type]||t.type||`-`})},{title:`积分变动`,key:`amount`,width:100,render:(e,t)=>(0,$.jsxs)(Q.Text,{style:{color:t.amount>=0?`#16a34a`:`#dc2626`,fontWeight:600},children:[t.amount>=0?`+`:``,(t.amount??0).toFixed(2)]})},{title:`余额`,key:`balance_after`,width:100,render:(e,t)=>(t.balance_after??0).toFixed(2)},{title:`说明`,dataIndex:`description`,ellipsis:!0,render:e=>e||`-`},{title:`时间`,key:`created_at`,width:160,render:(e,t)=>a9(t.created_at)}],locale:{emptyText:(0,$.jsx)(vC,{description:`暂无积分记录`})}})]})},{key:`invitations`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(T1,{}),`邀请管理`]}),children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{style:{marginBottom:12},children:(0,$.jsx)(X,{type:`primary`,icon:(0,$.jsx)(zL,{}),onClick:()=>E(!0),children:`生成邀请码`})}),(0,$.jsx)(s$,{columns:[{title:`邀请码`,dataIndex:`code`,width:200,render:e=>(0,$.jsx)(Q.Text,{copyable:!0,style:{fontFamily:`monospace`},children:e})},{title:`邀请链接`,dataIndex:`inviteLink`,ellipsis:!0,render:e=>(0,$.jsxs)(oU,{children:[(0,$.jsx)(Q.Text,{ellipsis:!0,style:{maxWidth:250,fontSize:12},children:e}),(0,$.jsx)(Rw,{title:`复制链接`,children:(0,$.jsx)(X,{size:`small`,type:`text`,icon:(0,$.jsx)(T1,{}),onClick:()=>N(e)})})]})},{title:`状态`,dataIndex:`status`,width:80,render:e=>(0,$.jsx)(b$,{color:e===`active`?`green`:`default`,children:e===`active`?`有效`:`已撤销`})},{title:`使用次数`,key:`uses`,width:100,render:(e,t)=>`${t.useCount}${t.maxUses?`/${t.maxUses}`:``}`},{title:`过期时间`,dataIndex:`expiresAt`,width:160,render:e=>e?a9(e):`永不过期`},{title:`操作`,key:`action`,width:80,render:(e,t)=>t.status===`active`?(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,onClick:()=>M(t.id),children:`撤销`}):null}],dataSource:b,rowKey:`id`,loading:C,pagination:!1,scroll:{x:900},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无邀请码`})}})]})},{key:`requests`,label:(0,$.jsxs)(oU,{children:[(0,$.jsx)(Z3,{}),`加入申请`,P.length>0&&(0,$.jsx)(b$,{color:`red`,children:P.length})]}),children:(0,$.jsx)(s$,{columns:[{title:`申请人`,dataIndex:`username`,width:150,render:e=>(0,$.jsx)(Q.Text,{strong:!0,children:e})},{title:`手机号`,dataIndex:`phone`,width:130,render:e=>e||`-`},{title:`申请时间`,dataIndex:`createdAt`,width:160,render:e=>a9(e)},{title:`操作`,key:`action`,width:160,render:(e,t)=>(0,$.jsxs)(oU,{size:4,children:[(0,$.jsx)(X,{size:`small`,type:`link`,style:{color:`#16a34a`,padding:0},onClick:()=>z(t.id,`approve`),children:`通过`}),(0,$.jsx)(X,{size:`small`,type:`link`,danger:!0,style:{padding:0},onClick:()=>{pq.confirm({title:`拒绝申请`,content:(0,$.jsx)(eW,{layout:`vertical`,style:{marginTop:12},children:(0,$.jsx)(eW.Item,{name:`note`,label:`拒绝原因(可选)`,children:(0,$.jsx)(FG.TextArea,{rows:2,placeholder:`选填`,id:`reject-note-input`})})}),onOk:()=>{let e=document.getElementById(`reject-note-input`)?.value||void 0;z(t.id,`reject`,e)}})},children:`拒绝`})]})}],dataSource:P,rowKey:`id`,loading:I,pagination:!1,scroll:{x:600},locale:{emptyText:(0,$.jsx)(vC,{description:`暂无待审批申请`})}})}];return(0,$.jsxs)(`div`,{style:{padding:24,maxWidth:1200,margin:`0 auto`},children:[(0,$.jsx)(CR,{variant:`outlined`,style:{borderRadius:12,marginBottom:16},loading:n,children:e&&(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,justifyContent:`space-between`,flexWrap:`wrap`,gap:12},children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(Q.Title,{level:4,style:{margin:0},children:e.name}),(0,$.jsxs)(Q.Text,{type:`secondary`,children:[`代码: `,e.code||`-`,` 成员: `,e.memberCount,` 人`]})]}),(0,$.jsx)(X,{icon:(0,$.jsx)($q,{}),onClick:()=>{i(),p(),A(),R(),ue()},children:`刷新`})]})}),(0,$.jsx)(CR,{variant:`outlined`,style:{borderRadius:12},children:(0,$.jsx)(lR,{items:de,defaultActiveKey:`members`})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(oU,{children:[(0,$.jsx)(H5,{}),`调整成员积分 - `,m.member?.username]}),open:m.open,confirmLoading:_,onOk:y,onCancel:()=>h({open:!1,member:null}),okText:`确认`,width:480,children:(0,$.jsxs)(eW,{form:g,layout:`vertical`,style:{marginTop:16},initialValues:{direction:`increase`},children:[(0,$.jsxs)(`div`,{style:{marginBottom:16,padding:`8px 12px`,background:`#f0f4ff`,borderRadius:8,display:`flex`,justifyContent:`space-between`,alignItems:`center`},children:[(0,$.jsx)(Q.Text,{type:`secondary`,children:`我的当前积分`}),(0,$.jsx)(Q.Text,{strong:!0,style:{fontSize:18,color:`#6366f1`},children:Q7.getState().user?.credits?.toFixed(2)??`0.00`})]}),(0,$.jsx)(eW.Item,{name:`direction`,label:`操作类型`,rules:[{required:!0,message:`请选择操作类型`}],children:(0,$.jsxs)(pL.Group,{buttonStyle:`solid`,size:`large`,style:{width:`100%`},children:[(0,$.jsx)(pL.Button,{value:`increase`,style:{width:`50%`,textAlign:`center`},children:`增加成员积分`}),(0,$.jsx)(pL.Button,{value:`decrease`,style:{width:`50%`,textAlign:`center`},children:`扣减成员积分`})]})}),(0,$.jsx)(eW.Item,{name:`amount`,label:`积分数量`,rules:[{required:!0,message:`请输入积分数量`},{type:`number`,min:.01,message:`必须大于 0`},{type:`number`,max:9999999,message:`单次不能超过 9999999`},{validator:(e,t)=>{if(!t||t<=0)return Promise.reject(Error(`请输入有效的正数`));let n=String(t).split(`.`)[1];return n&&n.length>2?Promise.reject(Error(`最多两位小数`)):Promise.resolve()}}],children:(0,$.jsx)(JB,{style:{width:`100%`},step:1,min:.01,precision:2,placeholder:`请输入正数积分数量`,size:`large`})}),(0,$.jsx)(eW.Item,{name:`description`,label:`备注`,children:(0,$.jsx)(FG.TextArea,{rows:2,maxLength:256,placeholder:`选填,例如:活动奖励`})})]})}),(0,$.jsx)(pq,{title:(0,$.jsxs)(oU,{children:[(0,$.jsx)(T1,{}),`生成邀请码`]}),open:T,confirmLoading:O,onOk:j,onCancel:()=>{E(!1),D.resetFields()},okText:`生成`,width:480,children:(0,$.jsxs)(eW,{form:D,layout:`vertical`,style:{marginTop:16},children:[(0,$.jsx)(eW.Item,{name:`maxUses`,label:`最大使用次数`,children:(0,$.jsx)(JB,{style:{width:`100%`},min:1,placeholder:`留空表示不限`,size:`large`})}),(0,$.jsx)(eW.Item,{name:`expiresAt`,label:`过期时间`,children:(0,$.jsx)(FG,{type:`datetime-local`,style:{width:`100%`},placeholder:`留空表示永不过期`,size:`large`})})]})})]})},wae=()=>{let[e]=On(),t=Ye(),n=e.get(`code`)||``,[r,i]=(0,S.useState)(!0),[a,o]=(0,S.useState)(null),[s,c]=(0,S.useState)(!1),[l,u]=(0,S.useState)(!1);return(0,S.useEffect)(()=>{if(!n){i(!1);return}Hre(n).then(e=>o(e)).catch(()=>o(null)).finally(()=>i(!1))},[n]),r?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,minHeight:`60vh`},children:(0,$.jsx)(HK,{size:`large`})}):l?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`success`,icon:(0,$.jsx)(I4,{style:{color:`#6366f1`}}),title:`申请已提交`,subTitle:`您的加入申请已提交,请等待团队管理人审批。审批通过后将自动加入团队。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):!n||!a?.valid?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`error`,title:`邀请链接无效`,subTitle:`该邀请链接可能已过期或不存在,请联系团队管理人重新获取。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):a.alreadyInTeam?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsx)(vJ,{status:`info`,title:`您已在此团队中`,subTitle:`您已经是「${a.teamName}」的成员了,无需再次加入。`,extra:(0,$.jsx)(X,{type:`primary`,onClick:()=>t(`/projects`),children:`返回首页`})})}):(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,padding:40},children:(0,$.jsxs)(CR,{variant:`outlined`,style:{borderRadius:16,maxWidth:480,width:`100%`,textAlign:`center`},children:[(0,$.jsx)(w5,{style:{fontSize:48,color:`#6366f1`,marginBottom:16}}),(0,$.jsx)(Q.Title,{level:3,children:`加入团队`}),(0,$.jsx)(Q.Text,{style:{fontSize:16,color:`#475569`,display:`block`,marginBottom:8},children:`您被邀请加入团队`}),(0,$.jsxs)(Q.Title,{level:4,style:{color:`#6366f1`,margin:`16px 0 24px`},children:[`「`,a.teamName,`」`]}),(0,$.jsx)(Q.Text,{type:`secondary`,style:{display:`block`,marginBottom:24},children:`加入后团队管理人可以为您分配积分、查看您的积分使用情况。`}),(0,$.jsx)(X,{type:`primary`,size:`large`,block:!0,loading:s,onClick:async()=>{n&&pq.confirm({title:`确认加入团队`,icon:(0,$.jsx)(w5,{style:{color:`#6366f1`}}),content:a?.teamName?`您确定要加入团队「${a.teamName}」吗?提交后需等待团队管理人审批。`:`您确定要加入该团队吗?`,okText:`确认加入`,cancelText:`取消`,onOk:async()=>{try{c(!0),await Ure(n),u(!0)}catch(e){Z.error(e?.message||`申请失败`)}finally{c(!1)}}})},children:`申请加入`})]})})};nD.default.locale(`zh-cn`);var Tae=({children:e})=>{let{user:t,loading:n,checkAuth:r}=Q7();return(0,S.useEffect)(()=>{!localStorage.getItem(`auth_token`)&&!n&&!t&&(window.location.href=`/login`)},[t,n]),n?(0,$.jsx)(`div`,{style:{display:`flex`,justifyContent:`center`,alignItems:`center`,height:`100vh`},children:(0,$.jsx)(HK,{size:`large`})}):t?(0,$.jsx)($.Fragment,{children:e}):(window.location.href=`/login`,null)};(0,_.createRoot)(document.getElementById(`root`)).render((0,$.jsx)(()=>{let{checkAuth:e}=Q7();return(0,S.useEffect)(()=>{e()},[]),(0,$.jsx)(Fm,{locale:r2.default,theme:{token:{colorPrimary:`#6366f1`,borderRadius:8,fontFamily:`'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif`},components:{Button:{controlHeight:36,controlHeightLG:44},Card:{boxShadow:`0 1px 3px rgba(0,0,0,0.04)`},Table:{headerBg:`#fafbfc`}}},children:(0,$.jsx)(lx,{children:(0,$.jsx)(_n,{children:(0,$.jsxs)(Dt,{children:[(0,$.jsx)(Tt,{path:`/login`,element:(0,$.jsx)(Xre,{})}),(0,$.jsxs)(Tt,{path:`/`,element:(0,$.jsx)(Tae,{children:(0,$.jsx)(Jre,{})}),children:[(0,$.jsx)(Tt,{index:!0,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})}),(0,$.jsx)(Tt,{path:`projects`,element:(0,$.jsx)(Qre,{})}),(0,$.jsx)(Tt,{path:`projects/:projectId/generate`,element:(0,$.jsx)(eie,{})}),(0,$.jsx)(Tt,{path:`records`,element:(0,$.jsx)(tie,{})}),(0,$.jsx)(Tt,{path:`credits`,element:(0,$.jsx)(nie,{})}),(0,$.jsx)(Tt,{path:`credit-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`order-records`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`user-center`,element:(0,$.jsx)(d9,{})}),(0,$.jsx)(Tt,{path:`messages`,element:(0,$.jsx)(aie,{})}),(0,$.jsx)(Tt,{path:`home`,element:(0,$.jsx)(gae,{})}),(0,$.jsx)(Tt,{path:`conversation`,element:(0,$.jsx)(Sie,{})}),(0,$.jsx)(Tt,{path:`initial`,element:(0,$.jsx)(Eie,{})}),(0,$.jsx)(Tt,{path:`initial/:creatID/initialinfo`,element:(0,$.jsx)(Mie,{})}),(0,$.jsx)(Tt,{path:`removelens`,element:(0,$.jsx)(Nie,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removeinfo`,element:(0,$.jsx)(cae,{})}),(0,$.jsx)(Tt,{path:`removelens/:creatID/removefenbu`,element:(0,$.jsx)(Q9,{})}),(0,$.jsx)(Tt,{path:`generated`,element:(0,$.jsx)(Rie,{})}),(0,$.jsx)(Tt,{path:`pretest`,element:(0,$.jsx)(Bie,{})}),(0,$.jsx)(Tt,{path:`authorization`,element:(0,$.jsx)(Hie,{})}),(0,$.jsx)(Tt,{path:`authoriza-waiting`,element:(0,$.jsx)(yae,{})}),(0,$.jsx)(Tt,{path:`materials`,element:(0,$.jsx)(Xie,{})}),(0,$.jsx)(Tt,{path:`consume`,element:(0,$.jsx)(vae,{})}),(0,$.jsx)(Tt,{path:`popular`,element:(0,$.jsx)(bae,{})}),(0,$.jsx)(Tt,{path:`authacc`,element:(0,$.jsx)(Wie,{})}),(0,$.jsx)(Tt,{path:`creativeplaza`,element:(0,$.jsx)(xae,{})}),(0,$.jsx)(Tt,{path:`team-management`,element:(0,$.jsx)(Cae,{})}),(0,$.jsx)(Tt,{path:`join-team`,element:(0,$.jsx)(wae,{})})]}),(0,$.jsx)(Tt,{path:`*`,element:(0,$.jsx)(Ct,{to:`/projects`,replace:!0})})]})})})})},{})); \ No newline at end of file diff --git a/video-gen-app/dist/index.html b/video-gen-app/dist/index.html index 4cf5f3d8..b5ff1c29 100644 --- a/video-gen-app/dist/index.html +++ b/video-gen-app/dist/index.html @@ -28,7 +28,7 @@ } })(); - + diff --git a/video-gen-app/src/pages/TeamManagementPage.tsx b/video-gen-app/src/pages/TeamManagementPage.tsx index 3527fe34..ca162610 100644 --- a/video-gen-app/src/pages/TeamManagementPage.tsx +++ b/video-gen-app/src/pages/TeamManagementPage.tsx @@ -2,15 +2,20 @@ import React, { useEffect, useState, useCallback } from 'react'; import { Button, Card, Empty, Form, Input, InputNumber, message, Modal, Radio, Select, Space, Table, Tabs, Tag, Tooltip, Typography, } from 'antd'; +import { DatePicker } from 'antd'; +import dayjs from 'dayjs'; import { CopyOutlined, DownloadOutlined, PlusOutlined, ReloadOutlined, UserOutlined, HistoryOutlined, WalletOutlined, } from '@ant-design/icons'; + +const { RangePicker } = DatePicker; import { createTeamInvitation, getJoinTeamInfo, getManagedTeam, getPendingJoinRequests, getTeamCreditExportUrl, getTeamCreditRecords, getTeamInvitations, getTeamMembers, handleJoinRequest, revokeInvitation, submitJoinRequest, transferCredits, } from '../api'; import type { ManagedTeam, TeamInvitation, TeamJoinRequest, TeamMember } from '../types'; import { formatDate } from '../utils/formatDate'; +import { useAuthStore } from '../store/useAuthStore'; const TeamManagementPage: React.FC = () => { const [team, setTeam] = useState(null); @@ -329,10 +334,10 @@ const TeamManagementPage: React.FC = () => { {/* 搜索栏 */}
{ setCreditFilterStart(e.target.value); setCreditPage(1); }} - style={{ width: 160 }} - /> - { setCreditFilterEnd(e.target.value); setCreditPage(1); }} - style={{ width: 160 }} + { + if (dates && dates[0] && dates[1]) { + setCreditFilterStart(dates[0].format('YYYY-MM-DD')); + setCreditFilterEnd(dates[1].format('YYYY-MM-DD')); + } else { + setCreditFilterStart(''); + setCreditFilterEnd(''); + } + setCreditPage(1); + }} />
{/* 汇总统计 */} - {creditSummary && ( -
- 总充值:+{creditSummary.total_recharge ?? 0} - 总消费:-{creditSummary.total_consume ?? 0} - 笔数:{creditSummary.transaction_count ?? 0} -
- )} +
+ 总充值:+{creditSummary?.total_recharge ?? 0} + 总消费:-{creditSummary?.total_consume ?? 0} +
{ width={480} > - + {/* 显示管理人当前积分 */} +
+ 我的当前积分 + + {useAuthStore.getState().user?.credits?.toFixed(2) ?? '0.00'} + +
+ 增加成员积分 扣减成员积分 - - + { + if (!value || value <= 0) return Promise.reject(new Error('请输入有效的正数')); + const decimals = String(value).split('.')[1]; + if (decimals && decimals.length > 2) return Promise.reject(new Error('最多两位小数')); + return Promise.resolve(); + }, + }, + ]} + > +