From 04110db524655aa5a6ecb359b8c69501591c9dbd Mon Sep 17 00:00:00 2001 From: wwwwwwwww <526125649@qq.com> Date: Mon, 6 Jul 2026 16:21:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1=E3=80=81=E5=9B=A2=E9=98=9F=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E5=8F=98=E5=8A=A8=E5=A2=9E=E5=8A=A0=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=92=8C=E6=97=A5=E6=9C=9F=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=202=E3=80=81=E7=BF=BB=E9=A1=B5=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E6=94=BE=E5=9C=A8=E5=B7=A6=E4=B8=8B=E8=A7=92?= =?UTF-8?q?=EF=BC=8C=E5=88=AB=E7=9A=84=E9=A1=B5=E9=9D=A2=E4=B9=9F=E5=9C=A8?= =?UTF-8?q?=E5=B7=A6=E4=B8=8B=E8=A7=92=E5=90=A7=203=E3=80=81=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=E6=98=BE=E7=A4=BA=E6=80=BB=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=A7=AF=E5=88=86=E5=92=8C=E4=B8=8B=E8=BD=BDexcel=204?= =?UTF-8?q?=E3=80=81=E5=9B=A2=E9=98=9F=E7=AE=A1=E7=90=86=E5=91=98=E5=88=86?= =?UTF-8?q?=E9=85=8D=E7=A7=AF=E5=88=86=E7=9A=84=E9=80=BB=E8=BE=91=E6=9C=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E5=9B=A2=E9=98=9F=E7=A7=AF=E5=88=86?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E4=B8=8D=E6=98=BE=E7=A4=BA=EF=BC=8C=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E6=98=BE=E7=A4=BA=E6=B5=81=E6=B0=B4=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B9=9F=E4=B8=8D=E5=AF=B9=EF=BC=8C=E5=BA=94=E8=AF=A5=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=9B=A2=E9=98=9F=E7=9A=84=E5=86=85=E9=83=A8=E7=A7=AF?= =?UTF-8?q?=E5=88=86=E5=8F=98=E5=8A=A8=E7=B1=BB=E5=9E=8B=EF=BC=8C=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E6=90=9C=E7=B4=A2=E4=B8=8B=E8=BD=BD=205=E3=80=81?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=A7=AF=E5=88=86=E5=BC=B9=E7=AA=97=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E8=AE=A9=E7=94=A8=E6=88=B7=E6=98=BE=E7=A4=BA=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=BF=98=E6=98=AF=E5=87=8F=E5=B0=91=E7=9A=84button=20?= =?UTF-8?q?6=E3=80=81=E6=A3=80=E6=9F=A5=E4=BB=A3=E7=A0=81=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9C=89=E4=B8=8D=E5=90=88=E7=90=86=E7=9A=84=E5=9C=B0?= =?UTF-8?q?=E6=96=B9=EF=BC=8C=E6=AF=94=E5=A6=82=E6=9E=9A=E4=B8=BE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=94=BE=E5=9C=A8enums=E9=87=8C=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- video-gen-api/app/api/v1/team.py | 95 +++- video-gen-api/app/enums/credit_record.py | 2 + video-gen-api/app/schemas/team_manager.py | 1 + .../app/services/team_manager_service.py | 72 ++- video-gen-app/dist/assets/index-D7ovjI8j.js | 505 ++++++++++++++++++ video-gen-app/dist/assets/index-XSsSl940.js | 505 ------------------ video-gen-app/dist/index.html | 2 +- video-gen-app/src/api/index.ts | 21 +- .../src/pages/TeamManagementPage.tsx | 228 +++++--- 9 files changed, 827 insertions(+), 604 deletions(-) create mode 100644 video-gen-app/dist/assets/index-D7ovjI8j.js delete mode 100644 video-gen-app/dist/assets/index-XSsSl940.js diff --git a/video-gen-api/app/api/v1/team.py b/video-gen-api/app/api/v1/team.py index 29e6c982..3818f774 100644 --- a/video-gen-api/app/api/v1/team.py +++ b/video-gen-api/app/api/v1/team.py @@ -5,6 +5,7 @@ from datetime import datetime from fastapi import APIRouter, Depends, HTTPException, Query from sqlalchemy import select from sqlalchemy.ext.asyncio import AsyncSession +from starlette.responses import StreamingResponse from app.config import settings from app.dependencies import get_current_user, get_db @@ -99,6 +100,7 @@ async def transfer_credits( current_user.id, req.target_user_id, req.amount, + req.direction or "increase", req.description, ) return {"message": "ok"} @@ -261,9 +263,10 @@ async def list_team_credit_records( page: int = Query(1, ge=1), page_size: int = Query(20, ge=1, le=100), user_id: str | None = Query(None), - record_type: str | None = Query(None, pattern="^(recharge|consume|refund|admin)$"), - start_date: str | None = Query(None), - end_date: str | None = Query(None), + phone: str | None = Query(None, description="按手机号搜索"), + record_type: str | None = Query(None, pattern="^(recharge|consume|refund|team_internal)$"), + 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), db: AsyncSession = Depends(get_db), ): @@ -273,13 +276,97 @@ async def list_team_credit_records( raise HTTPException(status_code=403, detail="只有团队管理人可查看") from app.services.admin_credit_record_service import list_admin_credit_records + + # 如果传了 phone,先找到对应的 user_id + resolved_user_id = user_id + if phone and not user_id: + phone_result = await db.execute( + select(User.id).where( + User.team_id == team.id, + User.phone == phone, + User.is_active.is_(True), + ).limit(1) + ) + resolved_user_id = phone_result.scalar_one_or_none() + if not resolved_user_id: + return {"items": [], "total": 0, "summary": {}} + return await list_admin_credit_records( db, page=page, page_size=page_size, team_id=team.id, - user_id=user_id, + user_id=resolved_user_id, record_type=record_type, start_date=start_date, end_date=end_date, ) + + +# ── 团队积分导出 Excel ────────────────────────────────── +@router.get("/credit-records/export") +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)$"), + start_date: str | None = Query(None), + end_date: str | None = Query(None), + current_user: User = Depends(get_current_user), + db: AsyncSession = Depends(get_db), +): + """导出团队积分变动记录为 Excel(仅管理人)。""" + team = await get_managed_team(db, current_user.id) + if not team: + raise HTTPException(status_code=403, detail="只有团队管理人可查看") + + from app.services.admin_credit_record_service import list_admin_credit_records + + resolved_user_id = user_id + if phone and not user_id: + phone_result = await db.execute( + select(User.id).where( + User.team_id == team.id, + User.phone == phone, + User.is_active.is_(True), + ).limit(1) + ) + resolved_user_id = phone_result.scalar_one_or_none() + + # 拉取全部记录(不分页) + result = await list_admin_credit_records( + db, + page=1, + page_size=10000, + team_id=team.id, + user_id=resolved_user_id, + record_type=record_type, + start_date=start_date, + end_date=end_date, + ) + + # 生成 CSV(兼容 Excel 打开) + import csv + import io + + output = io.StringIO() + writer = csv.writer(output) + writer.writerow(["用户名", "手机号", "类型", "积分变动", "余额", "说明", "时间"]) + for item in result.get("items", []): + writer.writerow([ + item.get("username") or "-", + item.get("phone") or "-", + item.get("record_type_label") or item.get("type") or "-", + item.get("amount", 0), + item.get("balance_after", 0), + item.get("description") or "-", + item.get("created_at") or "-", + ]) + + from starlette.responses import StreamingResponse + output.seek(0) + filename = f"team_credits_{team.id}_{datetime.now().strftime('%Y%m%d_%H%M%S')}.csv" + return StreamingResponse( + iter([output.getvalue()]), + media_type="text/csv; charset=utf-8-sig", + headers={"Content-Disposition": f"attachment; filename*=UTF-8''{filename}"}, + ) diff --git a/video-gen-api/app/enums/credit_record.py b/video-gen-api/app/enums/credit_record.py index 1a6c0e58..b9e9c19f 100644 --- a/video-gen-api/app/enums/credit_record.py +++ b/video-gen-api/app/enums/credit_record.py @@ -5,6 +5,7 @@ class CreditRecordType(str, Enum): RECHARGE = "recharge" CONSUME = "consume" REFUND = "refund" + TEAM_INTERNAL = "team_internal" # 团队内部积分流转(管理人分配) class CreditRecordOwnerType(str, Enum): @@ -111,6 +112,7 @@ CREDIT_RECORD_TYPE_LABELS = { CreditRecordType.RECHARGE.value: "充值", CreditRecordType.CONSUME.value: "消费", CreditRecordType.REFUND.value: "回退", + CreditRecordType.TEAM_INTERNAL.value: "团队内部", } CREDIT_RECORD_SUBJECT_LABELS = { diff --git a/video-gen-api/app/schemas/team_manager.py b/video-gen-api/app/schemas/team_manager.py index d8d70ca1..ce76e800 100644 --- a/video-gen-api/app/schemas/team_manager.py +++ b/video-gen-api/app/schemas/team_manager.py @@ -21,6 +21,7 @@ class TeamMemberOut(BaseModel): class ManagerTransferRequest(BaseModel): target_user_id: str = Field(..., description="接收积分的成员用户ID") amount: float = Field(gt=0, description="转账积分数量(正数)") + direction: str = Field(default="increase", pattern="^(increase|decrease)$", description="increase=管理人转给成员;decrease=从成员扣减回管理人") description: str | None = Field(None, max_length=256, description="转账说明") diff --git a/video-gen-api/app/services/team_manager_service.py b/video-gen-api/app/services/team_manager_service.py index 6fbc5219..360dce3e 100644 --- a/video-gen-api/app/services/team_manager_service.py +++ b/video-gen-api/app/services/team_manager_service.py @@ -129,11 +129,19 @@ async def transfer_credits_to_member( manager_id: str, target_member_id: str, amount: float, + direction: str = "increase", # "increase" 管理人→成员; "decrease" 成员扣减 description: str | None = None, ) -> None: - """管理人从自己余额转积分给团队成员。""" + """管理人为团队成员增加或扣减积分。 + + direction: + - "increase": 管理人从自己余额转积分给成员(管理人减少,成员增加) + - "decrease": 从成员扣积分回到管理人(成员减少,管理人增加) + """ if amount <= 0: - raise HTTPException(status_code=400, description="转账积分必须大于0") + raise HTTPException(status_code=400, description="积分数量必须大于0") + if direction not in ("increase", "decrease"): + raise HTTPException(status_code=400, description="无效操作方向") # 获取管理人 manager_result = await db.execute( @@ -155,7 +163,7 @@ async def transfer_credits_to_member( if not manager.team_id: raise HTTPException(status_code=400, detail="您不在任何团队中") if member.team_id != manager.team_id: - raise HTTPException(status_code=400, detail="只能转账给同团队成员") + raise HTTPException(status_code=400, detail="只能操作同团队成员") team_result = await db.execute( select(Team).where(Team.id == manager.team_id, Team.deleted_at.is_(None)).limit(1) @@ -164,22 +172,44 @@ async def transfer_credits_to_member( if not team or team.manager_id != manager_id: raise HTTPException(status_code=403, detail="只有团队管理人才能分配积分") - desc = description or "团队积分发放" + desc = description or ("团队积分发放" if direction == "increase" else "团队积分扣减") + xfer_id = generate_id() - # 从管理人扣减 - await deduct_credits( - db, - manager_id, - amount, - f"分配给成员 {member.username}: {desc}", - biz_key=f"mgr_xfer_out:{manager_id}:{target_member_id}:{generate_id()}", - ) - # 给成员增加 - await add_credits( - db, - target_member_id, - amount, - f"来自团队管理人: {desc}", - record_type="admin", - biz_key=f"mgr_xfer_in:{manager_id}:{target_member_id}:{generate_id()}", - ) + if direction == "increase": + # 管理人扣减 + await deduct_credits( + db, + manager_id, + amount, + f"分配给成员 {member.username}: {desc}", + record_type="team_internal", + biz_key=f"mgr_xfer_out:{manager_id}:{target_member_id}:{xfer_id}", + ) + # 成员增加 + await add_credits( + db, + target_member_id, + amount, + f"来自团队管理人: {desc}", + record_type="team_internal", + biz_key=f"mgr_xfer_in:{manager_id}:{target_member_id}:{xfer_id}", + ) + else: + # 成员扣减 + await deduct_credits( + db, + target_member_id, + amount, + f"扣减给团队管理人: {desc}", + record_type="team_internal", + biz_key=f"mgr_deduct_out:{manager_id}:{target_member_id}:{xfer_id}", + ) + # 管理人增加 + await add_credits( + db, + manager_id, + amount, + f"来自成员 {member.username}: {desc}", + record_type="team_internal", + biz_key=f"mgr_deduct_in:{manager_id}:{target_member_id}:{xfer_id}", + ) diff --git a/video-gen-app/dist/assets/index-D7ovjI8j.js b/video-gen-app/dist/assets/index-D7ovjI8j.js new file mode 100644 index 00000000..0b620d97 --- /dev/null +++ b/video-gen-app/dist/assets/index-D7ovjI8j.js @@ -0,0 +1,505 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),l=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=f()})),m=o((e=>{var t=p();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=d(),n=p(),r=h();function i(e){var t=`https://react.dev/errors/`+e;if(1B||(e.current=z[B],z[B]=null,B--)}function U(e,t){B++,z[B]=e.current,e.current=t}var W=V(null),ee=V(null),te=V(null),ne=V(null);function re(e,t){switch(U(te,t),U(ee,e),U(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Kd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}H(W),U(W,e)}function G(){H(W),H(ee),H(te)}function ie(e){e.memoizedState!==null&&U(ne,e);var t=W.current,n=Kd(t,e.type);t!==n&&(U(ee,e),U(W,n))}function K(e){ee.current===e&&(H(W),H(ee)),ne.current===e&&(H(ne),np._currentValue=R)}var ae,q;function oe(e){if(ae===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ae=t&&t[1]||``,q=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{se=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?oe(n):``}function le(e,t){switch(e.tag){case 26:case 27:case 5:return oe(e.type);case 16:return oe(`Lazy`);case 13:return e.child!==t&&t!==null?oe(`Suspense Fallback`):oe(`Suspense`);case 19:return oe(`SuspenseList`);case 0:case 15:return ce(e.type,!1);case 11:return ce(e.type.render,!1);case 1:return ce(e.type,!0);case 31:return oe(`Activity`);default:return``}}function ue(e){try{var t=``,n=null;do t+=le(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var de=Object.prototype.hasOwnProperty,fe=t.unstable_scheduleCallback,pe=t.unstable_cancelCallback,me=t.unstable_shouldYield,he=t.unstable_requestPaint,ge=t.unstable_now,_e=t.unstable_getCurrentPriorityLevel,ve=t.unstable_ImmediatePriority,ye=t.unstable_UserBlockingPriority,be=t.unstable_NormalPriority,xe=t.unstable_LowPriority,Se=t.unstable_IdlePriority,Ce=t.log,we=t.unstable_setDisableYieldValue,Te=null,Ee=null;function De(e){if(typeof Ce==`function`&&we(e),Ee&&typeof Ee.setStrictMode==`function`)try{Ee.setStrictMode(Te,e)}catch{}}var Oe=Math.clz32?Math.clz32:je,ke=Math.log,Ae=Math.LN2;function je(e){return e>>>=0,e===0?32:31-(ke(e)/Ae|0)|0}var Me=256,Ne=262144,Pe=4194304;function Fe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ie(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Fe(n))):i=Fe(o):i=Fe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Fe(n))):i=Fe(o)):i=Fe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Le(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Re(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ze(){var e=Pe;return Pe<<=1,!(Pe&62914560)&&(Pe=4194304),e}function Be(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ve(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function He(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),en=!1;if($t)try{var tn={};Object.defineProperty(tn,`passive`,{get:function(){en=!0}}),window.addEventListener(`test`,tn,tn),window.removeEventListener(`test`,tn,tn)}catch{en=!1}var nn=null,rn=null,an=null;function on(){if(an)return an;var e,t=rn,n=t.length,r,i=`value`in nn?nn.value:nn.textContent,a=i.length;for(e=0;e=Rn),Vn=` `,Hn=!1;function Un(e,t){switch(e){case`keyup`:return In.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Wn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Gn=!1;function Kn(e,t){switch(e){case`compositionend`:return Wn(t);case`keypress`:return t.which===32?(Hn=!0,Vn):null;case`textInput`:return e=t.data,e===Vn&&Hn?null:e;default:return null}}function qn(e,t){if(Gn)return e===`compositionend`||!Ln&&Un(e,t)?(e=on(),an=rn=nn=null,Gn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=hr(n)}}function _r(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_r(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Dt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dt(e.document)}return t}function yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var br=$t&&`documentMode`in document&&11>=document.documentMode,xr=null,Sr=null,Cr=null,wr=!1;function Tr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;wr||xr==null||xr!==Dt(r)||(r=xr,`selectionStart`in r&&yr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Cr&&mr(Cr,r)||(Cr=r,r=kd(Sr,`onSelect`),0>=o,i-=o,_i=1<<32-Oe(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ei&&yi(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ei&&yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ei&&yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ei&&yi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ya(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ea(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ii(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ri(o.type,o.key,o.props,null,e.mode,c),Ea(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=si(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ya(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ta(o),c);if(o.$$typeof===C)return b(e,r,Ji(e,o),c);Da(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ai(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{wa=0;var i=b(e,t,n,r);return Ca=null,i}catch(t){if(t===pa||t===ha)throw t;var a=$r(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var ka=Oa(!0),Aa=Oa(!1),ja=!1;function Ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Na(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Fl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Xr(e),Yr(e,null,n),t}return Kr(e,r,t,n),Xr(e)}function Ia(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,We(e,n)}}function La(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ra=!1;function za(){if(Ra){var e=aa;if(e!==null)throw e}}function Ba(e,t,n,r){Ra=!1;var i=e.updateQueue;ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Rl&f)===f:(r&f)===f){f!==0&&f===ia&&(Ra=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:ja=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function Va(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ha(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=I.T,s={};I.T=s,Os(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ds(e,t,J(c,r),mu(e)):Ds(e,t,r,mu(e))}catch(n){Ds(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function _s(){}function vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ys(e).queue;gs(e,a,t,R,n===null?_s:function(){return bs(e),n(r)})}function ys(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ko,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bs(e){var t=ys(e);t.next===null&&(t=e.alternate.memoizedState),Ds(e,t.next.queue,{},mu())}function xs(){return qi(np)}function Ss(){return wo().memoizedState}function Cs(){return wo().memoizedState}function ws(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Pa(n);var r=Fa(t,e,n);r!==null&&(gu(r,t,n),Ia(r,t,n)),t={cache:ea()},e.payload=t;return}t=t.return}}function Ts(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ks(e)?As(t,n):(n=qr(e,t,n,r),n!==null&&(gu(n,e,r),js(n,t,r)))}function Es(e,t,n){Ds(e,t,n,mu())}function Ds(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ks(e))As(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,pr(s,o))return Kr(e,t,i,0),Il===null&&Gr(),!1}catch{}if(n=qr(e,t,i,r),n!==null)return gu(n,e,r),js(n,t,r),!0}return!1}function Os(e,t,n,r){if(r={lane:2,revertLane:pd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},ks(e)){if(t)throw Error(i(479))}else t=qr(e,n,r,2),t!==null&&gu(t,e,2)}function ks(e){var t=e.alternate;return e===ro||t!==null&&t===ro}function As(e,t){so=oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function js(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,We(e,n)}}var Ms={readContext:qi,use:Do,useCallback:mo,useContext:mo,useEffect:mo,useImperativeHandle:mo,useLayoutEffect:mo,useInsertionEffect:mo,useMemo:mo,useReducer:mo,useRef:mo,useState:mo,useDebugValue:mo,useDeferredValue:mo,useTransition:mo,useSyncExternalStore:mo,useId:mo,useHostTransitionStatus:mo,useFormState:mo,useActionState:mo,useOptimistic:mo,useMemoCache:mo,useCacheRefresh:mo};Ms.useEffectEvent=mo;var Ns={readContext:qi,use:Do,useCallback:function(e,t){return Co().memoizedState=[e,t===void 0?null:t],e},useContext:qi,useEffect:rs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ts(4194308,4,ls.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=Co();t=t===void 0?null:t;var r=e();if(co){De(!0);try{e()}finally{De(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Co();if(n!==void 0){var i=n(t);if(co){De(!0);try{n(t)}finally{De(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ts.bind(null,ro,e),[r.memoizedState,e]},useRef:function(e){var t=Co();return e={current:e},t.memoizedState=e},useState:function(e){e=zo(e);var t=e.queue,n=Es.bind(null,ro,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ds,useDeferredValue:function(e,t){return ms(Co(),e,t)},useTransition:function(){var e=zo(!1);return e=gs.bind(null,ro,e.queue,!0,!1),Co().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ro,a=Co();if(Ei){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Il===null)throw Error(i(349));Rl&127||Po(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,rs(Io.bind(null,r,o,e),[e]),r.flags|=2048,$o(9,{destroy:void 0},Fo.bind(null,r,o,n,t),null),n},useId:function(){var e=Co(),t=Il.identifierPrefix;if(Ei){var n=vi,r=_i;n=(r&~(1<<32-Oe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=lo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[Ze]=t,o[Qe]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Rd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Dc(t)}}return Mc(t),Oc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Dc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=te.current,Ni(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=wi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Fd(e.nodeValue,n)),e||Ai(t,!0)}else e=Wd(e).createTextNode(r),e[Ze]=t,t.stateNode=e}return Mc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ni(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[Ze]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),e=!1}else n=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?($a(t),t):($a(t),null);if(t.flags&128)throw Error(i(558))}return Mc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ni(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[Ze]=t}else Pi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Mc(t),a=!1}else a=Fi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?($a(t),t):($a(t),null)}return $a(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ac(t,t.updateQueue),Mc(t),null);case 4:return G(),e===null&&Td(t.stateNode.containerInfo),Mc(t),null;case 10:return Vi(t.type),Mc(t),null;case 19:if(H(eo),r=t.memoizedState,r===null)return Mc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)jc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=to(e),o!==null){for(t.flags|=128,jc(r,!1),e=o.updateQueue,t.updateQueue=e,Ac(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ni(n,e),n=n.sibling;return U(eo,eo.current&1|2),Ei&&yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ge()>nu&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304)}else{if(!a)if(e=to(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ac(t,e),jc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ei)return Mc(t),null}else 2*ge()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,a=!0,jc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Mc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ge(),e.sibling=null,n=eo.current,U(eo,a?n&1|2:n&1),Ei&&yi(t,r.treeForkCount),e);case 22:case 23:return $a(t),Ka(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Mc(t),t.subtreeFlags&6&&(t.flags|=8192)):Mc(t),n=t.updateQueue,n!==null&&Ac(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&H(la),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vi($i),Mc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Pc(e,t){switch(Si(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vi($i),G(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return K(t),null;case 31:if(t.memoizedState!==null){if($a(t),t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if($a(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Pi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(eo),null;case 4:return G(),null;case 10:return Vi(t.type),null;case 22:case 23:return $a(t),Ka(),e!==null&&H(la),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vi($i),null;case 25:return null;default:return null}}function Fc(e,t){switch(Si(t),t.tag){case 3:Vi($i),G();break;case 26:case 27:case 5:K(t);break;case 4:G();break;case 31:t.memoizedState!==null&&$a(t);break;case 13:$a(t);break;case 19:H(eo);break;case 10:Vi(t.type);break;case 22:case 23:$a(t),Ka(),e!==null&&H(la);break;case 24:Vi($i)}}function Ic(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Ku(t,t.return,e)}}function Lc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Ku(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Ku(t,t.return,e)}}function Rc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ha(t,n)}catch(t){Ku(e,e.return,t)}}}function zc(e,t,n){n.props=Bs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Ku(e,t,n)}}function Bc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Ku(e,t,n)}}function Vc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Ku(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Ku(e,t,n)}else n.current=null}function Hc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Ku(e,e.return,t)}}function Uc(e,t,n){try{var r=e.stateNode;zd(r,e.type,n,t),r[Qe]=t}catch(t){Ku(e,e.return,t)}}function Wc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tf(e.type)||e.tag===4}function Gc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&tf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Kc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Wt));else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kc(e,t,n),e=e.sibling;e!==null;)Kc(e,t,n),e=e.sibling}function qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&tf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qc(e,t,n),e=e.sibling;e!==null;)qc(e,t,n),e=e.sibling}function Jc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Rd(t,r,n),t[Ze]=e,t[Qe]=n}catch(t){Ku(e,e.return,t)}}var Yc=!1,Xc=!1,Zc=!1,Qc=typeof WeakSet==`function`?WeakSet:Set,$c=null;function el(e,t){if(e=e.containerInfo,Hd=dp,e=vr(e),yr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Ud={focusedElem:e,selectionRange:n},dp=!1,$c=t;$c!==null;)if(t=$c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,$c=e;else for(;$c!==null;){switch(t=$c,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Rd(o,r,n),o[Ze]=e,ut(o),r=o;break a;case`link`:var s=Gf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=gr(s,h),v=gr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,I.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,Fl&6)throw Error(i(331));var c=Fl;if(Fl|=4,Al(o.current),Sl(o,o.current,s,n),Fl=c,od(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot==`function`)try{Ee.onPostCommitFiberRoot(Te,o)}catch{}return!0}finally{L.p=a,I.T=r,Hu(e,t)}}function Gu(e,t,n){t=li(n,t),t=Ks(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(Ve(e,2),ad(e))}function Ku(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=li(n,e),n=qs(2),r=Fa(t,n,2),r!==null&&(Js(n,r,t,e),Ve(r,2),ad(r));break}}t=t.return}}function qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Pl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=Ju.bind(null,e,t,n),t.then(e,e))}function Ju(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Il===e&&(Rl&n)===n&&(Gl===4||Gl===3&&(Rl&62914560)===Rl&&300>ge()-eu?!(Fl&2)&&Cu(e,0):Jl|=n,Xl===Rl&&(Xl=0)),ad(e)}function Yu(e,t){t===0&&(t=ze()),e=Jr(e,t),e!==null&&(Ve(e,t),ad(e))}function Xu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Yu(e,n)}function Zu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Yu(e,n)}function Qu(e,t){return fe(e,t)}var $u=null,ed=null,td=!1,nd=!1,rd=!1,id=0;function ad(e){e!==ed&&e.next===null&&(ed===null?$u=ed=e:ed=ed.next=e),nd=!0,td||(td=!0,fd())}function od(e,t){if(!rd&&nd){rd=!0;do for(var n=!1,r=$u;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Oe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,dd(r,a))}else a=Rl,a=Ie(r,r===Il?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Le(r,a)||(n=!0,dd(r,a));r=r.next}while(n);rd=!1}}function sd(){cd()}function cd(){nd=td=!1;var e=0;id!==0&&Yd()&&(e=id);for(var t=ge(),n=null,r=$u;r!==null;){var i=r.next,a=ld(r,t);a===0?(r.next=null,n===null?$u=i:n.next=i,i===null&&(ed=n)):(n=r,(e!==0||a&3)&&(nd=!0)),r=i}au!==0&&au!==5||od(e,!1),id!==0&&(id=0)}function ld(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Bd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Tf(e,t,n){var r=wf;if(r&&typeof t==`string`&&t){var i=kt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),yf.has(i)||(yf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function Ef(e){xf.D(e),Tf(`dns-prefetch`,e,null)}function Df(e,t){xf.C(e,t),Tf(`preconnect`,e,t)}function Of(e,t,n){xf.L(e,t,n);var r=wf;if(r&&e&&t){var i=`link[rel="preload"][as="`+kt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+kt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+kt(n.imageSizes)+`"]`)):i+=`[href="`+kt(e)+`"]`;var a=i;switch(t){case`style`:a=Pf(e);break;case`script`:a=Rf(e)}vf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),vf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Ff(a))||t===`script`&&r.querySelector(zf(a))||(t=r.createElement(`link`),Rd(t,`link`,e),ut(t),r.head.appendChild(t)))}}function kf(e,t){xf.m(e,t);var n=wf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+kt(r)+`"][href="`+kt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Rf(e)}if(!vf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),vf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(zf(a)))return}r=n.createElement(`link`),Rd(r,`link`,e),ut(r),n.head.appendChild(r)}}}function Af(e,t,n){xf.S(e,t,n);var r=wf;if(r&&e){var i=lt(r).hoistableStyles,a=Pf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Ff(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=vf.get(a))&&Hf(e,n);var c=o=r.createElement(`link`);ut(c),Rd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Vf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function jf(e,t){xf.X(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=m({src:e,async:!0},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Mf(e,t){xf.M(e,t);var n=wf;if(n&&e){var r=lt(n).hoistableScripts,i=Rf(e),a=r.get(i);a||(a=n.querySelector(zf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=vf.get(i))&&Uf(e,t),a=n.createElement(`script`),ut(a),Rd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nf(e,t,n,r){var a=(a=te.current)?bf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Pf(n.href),n=lt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Pf(n.href);var o=lt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Ff(e)))&&!o._p&&(s.instance=o,s.state.loading=5),vf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},vf.set(e,n),o||Lf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Rf(n),n=lt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Pf(e){return`href="`+kt(e)+`"`}function Ff(e){return`link[rel="stylesheet"][`+e+`]`}function If(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Lf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Rd(t,`link`,n),ut(t),e.head.appendChild(t))}function Rf(e){return`[src="`+kt(e)+`"]`}function zf(e){return`script[async]`+e}function Bf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+kt(n.href)+`"]`);if(r)return t.instance=r,ut(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ut(r),Rd(r,`style`,a),Vf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Pf(n.href);var o=e.querySelector(Ff(a));if(o)return t.state.loading|=4,t.instance=o,ut(o),o;r=If(n),(a=vf.get(a))&&Hf(r,a),o=(e.ownerDocument||e).createElement(`link`),ut(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Rd(o,`link`,r),t.state.loading|=4,Vf(o,n.precedence,e),t.instance=o;case`script`:return o=Rf(n.src),(a=e.querySelector(zf(o)))?(t.instance=a,ut(a),a):(r=n,(a=vf.get(o))&&(r=m({},n),Uf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ut(a),Rd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Vf(r,n.precedence,e));return t.instance}function Vf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Yf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Pf(r.href),a=t.querySelector(Ff(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Qf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ut(a);return}a=t.ownerDocument||t,r=If(r),(i=vf.get(i))&&Hf(r,i),a=a.createElement(`link`),ut(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Rd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Qf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Xf=0;function Zf(e,t){return e.stylesheets&&e.count===0&&ep(e,e.stylesheets),0Xf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Qf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ep(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var $f=null;function ep(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,$f=new Map,t.forEach(tp,e),$f=null,Qf.call(e))}function tp(e,t){if(!(t.state.loading&4)){var n=$f.get(e);if(n)var r=n.get(null);else{n=new Map,$f.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()}))(),v=`modulepreload`,y=function(e){return`/`+e},b={},x=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=y(t,n),t in b)return;b[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:v,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},S=c(p(),1),C=`popstate`;function w(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function T(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return A(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:j(t)}return N(t,n,null,e)}function E(e,t){if(e===!1||e==null)throw Error(t)}function D(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function O(){return Math.random().toString(36).substring(2,10)}function k(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function A(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?M(t):t,state:n,key:t&&t.key||r||O(),mask:i}}function j({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function M(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function N(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u()+1;let d=k(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=w(e)?e:A(h.location,e,t);n&&n(r,e),l=u();let i=k(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return P(e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(C,d),c=e,()=>{i.removeEventListener(C,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function P(e,t=!1){let n=`http://localhost`;typeof window<`u`&&(n=window.location.origin===`null`?window.location.href:window.location.origin),E(n,`No window.location.(origin|href) available to create URL`);let r=typeof e==`string`?e:j(e);return r=r.replace(/ $/,`%20`),!t&&r.startsWith(`//`)&&(r=n+r),new URL(r,n)}function F(e,t,n=`/`){return I(e,t,n,!1)}function I(e,t,n,r,i){let a=se((typeof t==`string`?M(t):t).pathname||`/`,n);if(a==null)return null;let o=i??R(e),s=null,c=oe(a);for(let e=0;s==null&&e{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;E(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ge([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(E(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),z(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:G(l,e.index),routesMeta:u})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of B(e.path))a(e,t,!0,n)}),t}function B(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=B(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function V(e){e.sort((e,t)=>e.score===t.score?ie(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var H=/^:[\w-]+$/,U=3,W=2,ee=1,te=10,ne=-2,re=e=>e===`*`;function G(e,t){let n=e.split(`/`),r=n.length;return n.some(re)&&(r+=ne),t&&(r+=W),n.filter(e=>!re(e)).reduce((e,t)=>e+(H.test(t)?U:t===``?ee:te),r)}function ie(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function K(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function q(e,t=!1,n=!0){D(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function oe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return D(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function se(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function le(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?M(e):e,a;return n?(n=he(n),a=n.startsWith(`/`)?ue(n.substring(1),`/`):ue(n,t)):a=t,{pathname:a,search:ye(r),hash:be(i)}}function ue(e,t){let n=_e(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function de(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function pe(e){let t=fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function me(e,t,n,r=!1){let i;typeof e==`string`?i=M(e):(i={...e},E(!i.pathname||!i.pathname.includes(`?`),de(`?`,`pathname`,`search`,i)),E(!i.pathname||!i.pathname.includes(`#`),de(`#`,`pathname`,`hash`,i)),E(!i.search||!i.search.includes(`#`),de(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=le(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var he=e=>e.replace(/\/\/+/g,`/`),ge=e=>he(e.join(`/`)),_e=e=>e.replace(/\/+$/,``),ve=e=>_e(e).replace(/^\/*/,`/`),ye=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,be=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,xe=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Se(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Ce(e){return ge(e.map(e=>e.route.path).filter(Boolean))||`/`}var we=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Te(e,t){let n=e;if(typeof n!=`string`||!ce.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(we)try{let e=new URL(window.location.href),r=n.startsWith(`//`)?new URL(e.protocol+n):new URL(n),a=se(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{D(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ee=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ee);var De=[`GET`,...Ee];new Set(De);var Oe=S.createContext(null);Oe.displayName=`DataRouter`;var ke=S.createContext(null);ke.displayName=`DataRouterState`;var Ae=S.createContext(!1);function je(){return S.useContext(Ae)}var Me=S.createContext({isTransitioning:!1});Me.displayName=`ViewTransition`;var Ne=S.createContext(new Map);Ne.displayName=`Fetchers`;var Pe=S.createContext(null);Pe.displayName=`Await`;var Fe=S.createContext(null);Fe.displayName=`Navigation`;var Ie=S.createContext(null);Ie.displayName=`Location`;var Le=S.createContext({outlet:null,matches:[],isDataRoute:!1});Le.displayName=`Route`;var Re=S.createContext(null);Re.displayName=`RouteError`;var ze=`REACT_ROUTER_ERROR`,Be=`REDIRECT`,Ve=`ROUTE_ERROR_RESPONSE`;function He(e){if(e.startsWith(`${ze}:${Be}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function Ue(e){if(e.startsWith(`${ze}:${Ve}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new xe(t.status,t.statusText,t.data)}catch{}}function We(e,{relative:t}={}){E(Ge(),`useHref() may be used only in the context of a component.`);let{basename:n,navigator:r}=S.useContext(Fe),{hash:i,pathname:a,search:o}=et(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ge([n,a])),r.createHref({pathname:s,search:o,hash:i})}function Ge(){return S.useContext(Ie)!=null}function Ke(){return E(Ge(),`useLocation() may be used only in the context of a component.`),S.useContext(Ie).location}var qe=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Je(e){S.useContext(Fe).static||S.useLayoutEffect(e)}function Ye(){let{isDataRoute:e}=S.useContext(Le);return e?yt():Xe()}function Xe(){E(Ge(),`useNavigate() may be used only in the context of a component.`);let e=S.useContext(Oe),{basename:t,navigator:n}=S.useContext(Fe),{matches:r}=S.useContext(Le),{pathname:i}=Ke(),a=JSON.stringify(pe(r)),o=S.useRef(!1);return Je(()=>{o.current=!0}),S.useCallback((r,s={})=>{if(D(o.current,qe),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=me(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ge([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var Ze=S.createContext(null);function Qe(e){let t=S.useContext(Le).outlet;return S.useMemo(()=>t&&S.createElement(Ze.Provider,{value:e},t),[t,e])}function $e(){let{matches:e}=S.useContext(Le);return e[e.length-1]?.params??{}}function et(e,{relative:t}={}){let{matches:n}=S.useContext(Le),{pathname:r}=Ke(),i=JSON.stringify(pe(n));return S.useMemo(()=>me(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function tt(e,t){return nt(e,t)}function nt(e,t,n){E(Ge(),`useRoutes() may be used only in the context of a component.`);let{navigator:r}=S.useContext(Fe),{matches:i}=S.useContext(Le),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;xt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant (or called \`useRoutes()\`) at "${s}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. + +Please change the parent to .`)}let u=Ke(),d;if(t){let e=typeof t==`string`?M(t):t;E(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let f=d.pathname||`/`,p=f;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);p=`/`+f.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let m=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):F(e,{pathname:p});D(l||m!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),D(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`);let h=lt(m&&m.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ge([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:ge([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&h?S.createElement(Ie.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},h):h}function rt(){let e=vt(),t=Se(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=S.createElement(S.Fragment,null,S.createElement(`p`,null,`💿 Hey developer 👋`),S.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,S.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,S.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),S.createElement(S.Fragment,null,S.createElement(`h2`,null,`Unexpected Application Error!`),S.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?S.createElement(`pre`,{style:i},n):null,o)}var it=S.createElement(rt,null),at=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=Ue(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:S.createElement(Le.Provider,{value:this.props.routeContext},S.createElement(Re.Provider,{value:e,children:this.props.component}));return this.context?S.createElement(st,{error:e},t):t}};at.contextType=Ae;var ot=new WeakMap;function st({children:e,error:t}){let{basename:n}=S.useContext(Fe);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=He(t.digest);if(e){let r=ot.get(t);if(r)throw r;let i=Te(e.location,n);if(we&&!ot.get(t))if(i.isExternal||e.reloadDocument)window.location.href=i.absoluteURL||i.to;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw ot.set(t,n),n}return S.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${i.absoluteURL||i.to}`})}}return e}function ct({routeContext:e,match:t,children:n}){let r=S.useContext(Oe);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(Le.Provider,{value:e},n)}function lt(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);E(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Ce(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||it,o&&(s<0&&c===0?(xt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?S.createElement(n.route.Component,null):n.route.element?n.route.element:e,S.createElement(ct,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?S.createElement(at,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function ut(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function dt(e){let t=S.useContext(Oe);return E(t,ut(e)),t}function ft(e){let t=S.useContext(ke);return E(t,ut(e)),t}function pt(e){let t=S.useContext(Le);return E(t,ut(e)),t}function mt(e){let t=pt(e),n=t.matches[t.matches.length-1];return E(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ht(){return mt(`useRouteId`)}function gt(){return ft(`useNavigation`).navigation}function _t(){let{matches:e,loaderData:t}=ft(`useMatches`);return S.useMemo(()=>e.map(e=>L(e,t)),[e,t])}function vt(){let e=S.useContext(Re),t=ft(`useRouteError`),n=mt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function yt(){let{router:e}=dt(`useNavigate`),t=mt(`useNavigate`),n=S.useRef(!1);return Je(()=>{n.current=!0}),S.useCallback(async(r,i={})=>{D(n.current,qe),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var bt={};function xt(e,t,n){!t&&!bt[e]&&(bt[e]=!0,D(!1,n))}S.memo(St);function St({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return nt(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Ct({to:e,replace:t,state:n,relative:r}){E(Ge(),` may be used only in the context of a component.`);let{static:i}=S.useContext(Fe);D(!i,` must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.`);let{matches:a}=S.useContext(Le),{pathname:o}=Ke(),s=Ye(),c=me(e,pe(a),o,r===`path`),l=JSON.stringify(c);return S.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function wt(e){return Qe(e.context)}function Tt(e){E(!1,`A is only ever to be used as the child of element, never rendered directly. Please wrap your in a .`)}function Et({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){E(!Ge(),`You cannot render a inside another . You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=S.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=M(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=S.useMemo(()=>{let e=se(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return D(h!=null,` is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the won't render anything.`),h==null?null:S.createElement(Fe.Provider,{value:c},S.createElement(Ie.Provider,{children:t,value:h}))}function Dt({children:e,location:t}){return tt(Ot(e),t)}S.Component;function Ot(e,t=[]){let n=[];return S.Children.forEach(e,(e,r)=>{if(!S.isValidElement(e))return;let i=[...t,r];if(e.type===S.Fragment){n.push.apply(n,Ot(e.props.children,i));return}E(e.type===Tt,`[${typeof e.type==`string`?e.type:e.type.name}] is not a component. All component children of must be a or `),E(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=Ot(e.props.children,i)),n.push(a)}),n}var kt=`get`,At=`application/x-www-form-urlencoded`;function jt(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Mt(e){return jt(e)&&e.tagName.toLowerCase()===`button`}function Nt(e){return jt(e)&&e.tagName.toLowerCase()===`form`}function Pt(e){return jt(e)&&e.tagName.toLowerCase()===`input`}function Ft(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function It(e,t){return e.button===0&&(!t||t===`_self`)&&!Ft(e)}function Lt(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Rt(e,t){let n=Lt(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var zt=null;function Bt(){if(zt===null)try{new FormData(document.createElement(`form`),0),zt=!1}catch{zt=!0}return zt}var Vt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ht(e){return e!=null&&!Vt.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${At}"`),null):e}function Ut(e,t){let n,r,i,a,o;if(Nt(e)){let o=e.getAttribute(`action`);r=o?se(o,t):null,n=e.getAttribute(`method`)||kt,i=Ht(e.getAttribute(`enctype`))||At,a=new FormData(e)}else if(Mt(e)||Pt(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a + + + + {/* 汇总统计 */} + {creditSummary && ( +
+ 总充值:+{creditSummary.total_recharge ?? 0} + 总消费:-{creditSummary.total_consume ?? 0} + 笔数:{creditSummary.transaction_count ?? 0} +
+ )} + + setCreditPage(p), + showTotal: (t) => `共 ${t} 条`, + position: ['bottomLeft'], + }} + scroll={{ x: 950 }} + columns={[ + { title: '用户名', key: 'username', width: 120, render: (_: any, r: any) => {r.username || '-'} }, + { title: '手机号', key: 'phone', width: 120, render: (_: any, r: any) => r.phone || '-' }, + { + title: '类型', key: 'type', width: 100, + render: (_: any, r: any) => { + const colorMap: Record = { recharge: 'green', consume: 'red', refund: 'orange', team_internal: 'blue' }; + const labelMap: Record = { recharge: '充值', consume: '消费', refund: '退款', team_internal: '团队内部' }; + return {labelMap[r.type] || r.type || '-'}; + }, + }, + { + title: '积分变动', key: 'amount', width: 100, + render: (_: any, r: any) => ( + = 0 ? '#16a34a' : '#dc2626', fontWeight: 600 }}> + {r.amount >= 0 ? '+' : ''}{(r.amount ?? 0).toFixed(2)} + + ), + }, + { title: '余额', key: 'balance_after', width: 100, render: (_: any, r: any) => (r.balance_after ?? 0).toFixed(2) }, + { title: '说明', dataIndex: 'description', ellipsis: true, render: (v: string) => v || '-' }, + { title: '时间', key: 'created_at', width: 160, render: (_: any, r: any) => formatDate(r.created_at) }, + ]} + locale={{ emptyText: }} + /> + + ), + }, { key: 'invitations', label: 邀请管理, @@ -311,65 +450,6 @@ const TeamManagementPage: React.FC = () => { /> ), }, - { - key: 'credits', - label: 团队积分变动, - children: ( -
-
-
setCreditPage(p), - showTotal: (t) => `共 ${t} 条`, - }} - scroll={{ x: 900 }} - columns={[ - { title: '用户名', key: 'username', width: 120, render: (_: any, r: any) => {r.username || r.user_id || '-'} }, - { - title: '类型', key: 'type', width: 100, - render: (_: any, r: any) => { - const colorMap: Record = { recharge: 'green', consume: 'red', admin: 'blue', refund: 'orange' }; - const labelMap: Record = { recharge: '充值', consume: '消费', admin: '管理员调整', refund: '退款' }; - return {labelMap[r.type] || r.type}; - }, - }, - { - title: '积分变动', key: 'amount', width: 100, - render: (_: any, r: any) => ( - = 0 ? '#16a34a' : '#dc2626', fontWeight: 600 }}> - {r.amount >= 0 ? '+' : ''}{(r.amount ?? 0).toFixed(2)} - - ), - }, - { title: '余额', key: 'balance_after', width: 100, render: (_: any, r: any) => (r.balance_after ?? 0).toFixed(2) }, - { title: '说明', dataIndex: 'description', ellipsis: true, render: (v: string) => v || '-' }, - { title: '时间', key: 'created_at', width: 160, render: (_: any, r: any) => formatDate(r.created_at) }, - ]} - locale={{ emptyText: }} - /> - - ), - }, ]; return ( @@ -390,19 +470,25 @@ const TeamManagementPage: React.FC = () => { - {/* 积分转账弹窗 */} + {/* 调整积分弹窗 */} 调整成员积分 - {creditModal.member?.username}} open={creditModal.open} confirmLoading={creditSaving} onOk={handleTransfer} onCancel={() => setCreditModal({ open: false, member: null })} - okText="确认转账" + okText="确认" width={480} > - - - + + + + 增加成员积分 + 扣减成员积分 + + + + 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 2/2] 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(); + }, + }, + ]} + > +