@gientech/modual 2.3.59 → 2.3.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "license": "MIT",
4
4
  "style": "assets/style.css",
5
5
  "private": false,
6
- "version": "2.3.59",
6
+ "version": "2.3.60",
7
7
  "author": "hanfeng_Zhang",
8
8
  "type": "module",
9
9
  "main": "index.js",
@@ -104,9 +104,9 @@
104
104
  "./assets/style.css": "./assets/style.css"
105
105
  },
106
106
  "dependencies": {
107
- "@mxmweb/aichat": "2.2.4",
107
+ "@mxmweb/aichat": "2.2.5",
108
108
  "@mxmweb/fviewer": "1.5.7",
109
- "@mxmweb/rtext": "1.8.4",
109
+ "@mxmweb/rtext": "1.8.5",
110
110
  "@mxmweb/xviewer": "1.4.18",
111
111
  "@mxmweb/zui": "1.4.0",
112
112
  "antd": "^5.18.0",
package/reviewManage.js CHANGED
@@ -1,4 +1,4 @@
1
- import{jsxs as r,jsx as u,Fragment as J}from"react/jsx-runtime";import{useMemo as b,useState as l,useCallback as ke,useEffect as I,useRef as Te}from"react";import{DatePicker as Se,message as o,Select as j,Tooltip as X,Space as Z,Input as D,Table as ee,Pagination as Ne,Modal as f,Tag as ze,Button as A}from"antd";import ae from"styled-components";import{useTheme as Re,deepMergeTheme as te,defaultTheme as Ie,DashboardContainer as je,Icon as Pe}from"@mxmweb/zui";import{A as _e,P as Me}from"./assets/server-BOB675f_.js";import{R as He}from"./assets/QuestionCircleOutlined-DCE9HNtM.js";import{R as ue}from"./assets/SearchOutlined-DW1p94FY.js";import{T as Ye}from"./assets/triangle-alert-LqO4u4ts.js";import"./assets/DrawerVideo-DE96g9Ht.js";import"./assets/GientechStreamReader-CnAI3q38.js";import"axios";import"@mxmweb/fviewer";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/x-CdZQbi--.js";import"dayjs";import"./assets/index-CpW6Dhpp.js";import"./assets/AntdIcon-CAOWkvVt.js";const{RangePicker:Oe}=Se,Le={0:{text:"\u5168\u90E8",color:"default"},1:{text:"\u5BA1\u6838\u4E2D",color:"processing"},2:{text:"\u5BA1\u6838\u901A\u8FC7",color:"success"},3:{text:"\u5BA1\u6838\u62D2\u7EDD",color:"error"},4:{text:"\u590D\u5BA1\u4E2D",color:"warning"},5:{text:"\u590D\u5BA1\u901A\u8FC7",color:"success"},6:{text:"\u590D\u5BA1\u62D2\u7EDD",color:"error"}},Ke={1:"\u4E0A\u4F20",2:"\u5220\u9664"},Ue={1:"\u77E5\u8BC6\u5E93",2:"\u6570\u636E\u5E93"},mt=({url:P,token:k,role:_,styles:M,CustomComponents:ne,eventsEmit:T})=>{const H=Re(),ie=b(()=>te(te({theme:Ie,mode:"light"},H||{}),M||{}),[H,M]),[c,x]=l({pageNo:1,pageSize:10}),[d,se]=l([1,4]),[Y,le]=l(""),[O,re]=l(""),[m,L]=l(null),[w,oe]=l([]),[ce,K]=l(!1),[S,de]=l(0),[p,U]=l([]),[me,F]=l(!1),[pe,N]=l(),q=t=>{const e=t.split(".");return e.length>1?e[e.length-1]:""},Q=async(t,e,a)=>{var n,i,s,W,$,G;switch(console.log("[adopter] mergedEventsEmit",t,e,a),t){case"request:error_network":{((s=(i=(n=e==null?void 0:e.error)==null?void 0:n.response)==null?void 0:i.data)==null?void 0:s.errorCode)=="51036"?f.warning({title:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664",width:400,content:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}}):((G=($=(W=e==null?void 0:e.error)==null?void 0:W.response)==null?void 0:$.data)==null?void 0:G.errorCode)=="51038"&&f.warning({title:"\u5BA1\u6838\u5DF2\u5173\u95ED",width:400,content:"\u8D85\u7EA7\u7BA1\u7406\u5458\u5DF2\u5173\u95ED\u5BA1\u6838\u5F00\u5173\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}});break}default:typeof T=="function"&&T(t,e);break}},ge=b(()=>_e({url:P,token:k,role:_,eventsEmit:Q}),[T,_,k,P]),{getReviewData:he,reviewSingleData:E,batchReview:De,getCovertUrl:fe}=ge,v=ke(async()=>{K(!0);const t=d.includes(1),e=d.includes(4),a=t&&e;try{const n={...c,...d.length>0&&!d.includes(0)?{auditStatuses:d}:{},targetNameFuzzy:Y||void 0,fileNameFuzzy:O||void 0,...d.length>0&&(t||e||a)?{sortOrder:"asc"}:{sortOrder:"desc"}};m&&m[0]&&m[1]&&(n.uploadStartTime=m[0].format("YYYY-MM-DD HH:mm:ss"),n.uploadEndTime=m[1].format("YYYY-MM-DD HH:mm:ss"));const i=await he(n);oe(i.records||[]),de(i.total||0)}catch(n){o.error("\u83B7\u53D6\u5BA1\u6838\u5217\u8868\u5931\u8D25"),console.error(n)}finally{K(!1)}},[c,d,m]);I(()=>{v()},[v]);const g=()=>{x({...c,pageNo:1})},y=()=>{x(t=>({...t,pageNo:1}))},xe=t=>{if(t&&t[0]&&t[1]){const e=t[0].startOf("day"),a=t[1].endOf("day");L([e,a])}else L(null);x(e=>({...e,pageNo:1}))},z=(t,e)=>{x(a=>({...a,pageNo:t,pageSize:e||a.pageSize}))},C=async(t,e)=>{const a=t==null?void 0:t.id;if(a)switch(e){case"first_approve":{await E({instanceId:a,actionTypeCode:1})&&(g(),o.success("\u521D\u5BA1\u901A\u8FC7"));break}case"second_approve":{await E({instanceId:a,actionTypeCode:3})&&(g(),o.success("\u590D\u5BA1\u901A\u8FC7"));break}case"first_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:2,rejectReason:i})&&(g(),o.success("\u521D\u5BA1\u62D2\u7EDD"))}});break}case"second_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u590D\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:4,rejectReason:i})&&(g(),o.success("\u590D\u5BA1\u62D2\u7EDD"))}});break}default:return}},Ae=async t=>{if(p.length===0){o.warning("\u8BF7\u5148\u9009\u62E9\u6570\u636E");return}if(t)if(t==2||t==4){let e="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:a=>{e=a.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const a=e.trim();if(!a)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));await V({instanceIds:p,actionTypeCode:t,rejectReason:a})}})}else await V({instanceIds:p,actionTypeCode:t})},V=async t=>{var a;const e=await De({...t});e&&(((a=e==null?void 0:e.failedInstances)==null?void 0:a.length)>0?f.warning({title:"\u6279\u91CF\u5BA1\u6838\u5931\u8D25",width:900,content:u(ee,{columns:[{title:"\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",width:195},{title:"\u5BA1\u6838\u5931\u8D25\u539F\u56E0",dataIndex:"failedReason",key:"failedReason",width:195}],dataSource:(e==null?void 0:e.failedInstances)||[],pagination:!1,scroll:{y:400}}),okText:"\u77E5\u9053\u4E86",onOk:async()=>{g()}}):g()),U([])},we=async t=>{const{id:e,fileName:a,fileUrl:n}=t;if(e){const i=q(a);if(["html","txt","jpg","jpeg","png"].includes(i))N({url:n||"",parse_url:n||"",file_type:i,file_name:a||""}),F(!0);else if(["mp4","flv","avi","mkv","video"].includes(i))N({link:n||"",parse_url:n||"",file_type:i,source_name:a||""}),F(!0);else if(["xls","xlsx"].includes(i))Q("reviewmanage_table_action_detail",t);else{const s=await fe(e);s?(N({url:(s==null?void 0:s.convertedFilePath)||"",parse_url:(s==null?void 0:s.convertedFilePath)||"",file_type:i,source_name:a||"",pdfPages:s==null?void 0:s.totalPages}),F(!0)):o.error("\u683C\u5F0F\u8F6C\u6362\u5931\u8D25\uFF0C\u65E0\u6CD5\u9884\u89C8")}}},Fe=t=>{const e=q(t);return e==="pdf"?"rag/pdf":e==="ofd"?"rag/ofd":["doc","docx"].includes(e)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(e)?"rag/excel":["ppt","pptx"].includes(e)?"rag/ppt":["txt","md"].includes(e)?"rag/txt":["zip","rar","7z"].includes(e)?"rag/zip":["ofd"].includes(e)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(e)?"rag/video":"rag/file"},Ee=[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",fixed:"left",width:380,render:t=>r(Qe,{children:[u("span",{className:"reviewmanage-filename-icon",children:u(Pe,{type:Fe(t),size:16})}),u("span",{className:"reviewmanage-filename-text",title:t,children:t})]})},{title:"\u4F01\u4E1A\u5E93\u540D",dataIndex:"targetName",key:"targetName",width:180,ellipsis:!0},{title:"\u77E5\u8BC6\u7C7B\u578B",dataIndex:"targetType",key:"targetType",width:100,render:t=>u(ze,{color:t===1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:Ue[t]||"\u672A\u77E5"})},{title:"\u64CD\u4F5C\u7C7B\u522B",dataIndex:"operateType",key:"operateType",width:100,render:t=>Ke[t]||"\u672A\u77E5"},{title:"\u5BA1\u6838\u72B6\u6001",dataIndex:"auditStatus",key:"auditStatus",width:150,render:(t,e)=>{const n=Le[t].text;return r(qe,{className:"reviewmanage-status-cell","data-status":n,children:[n==="\u5BA1\u6838\u4E2D"||n==="\u590D\u5BA1\u4E2D"?u("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):u("span",{className:"reviewmanage-status-dot"}),u("span",{className:"reviewmanage-status-text",children:n}),(n==="\u5BA1\u6838\u62D2\u7EDD"||n==="\u590D\u5BA1\u62D2\u7EDD")&&u(X,{title:(e==null?void 0:e.lastRejectReason)||"",children:u(Ye,{size:14,color:"#FF4D4F"})})]})}},{title:"\u5F55\u5165\u5458",dataIndex:"createBy",key:"createBy",width:130},{title:"\u521D\u5BA1\u4EBA\u5458",dataIndex:"firstAuditor",key:"firstAuditor",width:130},{title:"\u590D\u5BA1\u4EBA\u5458",dataIndex:"secondAuditor",key:"secondAuditor",width:130},{title:"\u4E0A\u4F20\u65F6\u95F4",dataIndex:"uploadTime",key:"uploadTime",width:200},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"firstAuditTime",key:"firstAuditTime",width:200},{title:"\u590D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"secondAuditTime",key:"secondAuditTime",width:200},{title:"\u64CD\u4F5C",key:"action",fixed:"right",width:240,render:(t,e)=>r(Z,{size:"small",children:[e.enableFirstAudit&&(e==null?void 0:e.auditStatus)==1&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"first_approve"),children:"\u5BA1\u6838\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"first_reject"),children:"\u5BA1\u6838\u62D2\u7EDD"})]}),e.enableSecondAudit&&(e==null?void 0:e.auditStatus)==4&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"second_approve"),children:"\u590D\u5BA1\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"second_reject"),children:"\u590D\u5BA1\u62D2\u7EDD"})]}),u(A,{type:"link",size:"small",onClick:()=>we(e),children:"\u67E5\u770B"})]})}],ve=(t,e)=>{const{auditStatus:a,operateType:n,enableFirstAudit:i,enableSecondAudit:s}=t;return n==1?!((a==1||a==4)&&(i||s)):!0},ye={selectedRowKeys:p,fixed:!0,onChange:t=>{U(t)},getCheckboxProps:t=>({disabled:ve(t)})},h=b(()=>w.filter(t=>p.includes(t.id)),[w,p]),Ce=b(()=>{var t;if((h==null?void 0:h.length)>0){const e=(t=h[0])==null?void 0:t.auditStatus;return h.every(n=>(n==null?void 0:n.auditStatus)===e)?[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:e==4},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:e==4},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:e==1},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:e==1}]:[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:!0},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:!0}]}return[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4}]},[h]),[Be,be]=l(55),R=Te(null),B=()=>{if(!R.current)return;const t=R.current.clientHeight;console.log("+++++",t);const e=t-54-32,a=Math.floor(e/10),n=Math.min(Math.max(a,40),120);be(n)};return I(()=>(B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)),[]),I(()=>{B()},[w.length]),r(je,{title:"\u5BA1\u6838\u7BA1\u7406",styles:ie,CustomComponents:ne,children:[r("div",{className:"review-manage-component flex flex-col justify-between h-full p-[12px]",style:{backgroundColor:"#fff"},children:[r("div",{className:"flex justify-between",children:[r("div",{children:[u(j,{size:"middle",style:{width:120},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:Ce,onChange:t=>Ae(t)}),u(X,{title:"\u53EA\u6709\u540C\u4E00\u72B6\u6001\u7684\u6587\u6863\u624D\u53EF\u4EE5\u8FDB\u884C\u6279\u91CF\u64CD\u4F5C",children:u(He,{style:{color:"#86909C",marginLeft:10}})})]}),r(Z,{size:"middle",children:[u(j,{mode:"multiple",size:"middle",style:{width:230},placeholder:"\u5BA1\u6838\u72B6\u6001",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:2},{label:"\u5BA1\u6838\u62D2\u7EDD",value:3},{label:"\u590D\u5BA1\u4E2D",value:4},{label:"\u590D\u5BA1\u901A\u8FC7",value:5},{label:"\u590D\u5BA1\u62D2\u7EDD",value:6},{label:"\u5168\u90E8",value:0}],value:d,onChange:t=>{se(t),x(e=>({...e,pageNo:1}))}}),u(D,{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22",value:Y,onChange:t=>le(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(D,{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22",value:O,onChange:t=>re(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(Oe,{format:"YYYY-MM-DD",value:m,onChange:xe,placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})]})]}),u("div",{className:"my-[16px]",ref:R,style:{overflowY:"auto",height:"calc(100% - 110px)"},children:u(ee,{rowKey:"id",columns:Ee,dataSource:w,loading:ce,rowSelection:ye,pagination:!1,scroll:{x:1e3},rootClassName:"review-manage-table",components:{body:{cell:({children:t,...e})=>u("td",{...e,style:{...e.style,height:`${Be}px`,padding:"8px 16px",verticalAlign:"middle"},children:t})}}})}),r("div",{className:"flex px-[16px] items-center justify-end gap-2",children:[u("span",{className:"text-sm text-gray-600",children:"\u6BCF\u9875"}),u(j,{value:c.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onChange:t=>z(1,t),style:{width:70}}),u("span",{className:"text-sm text-gray-600",children:"\u6761"}),u(Ne,{current:c.pageNo,pageSize:c.pageSize,total:S,showSizeChanger:!1,showQuickJumper:!1,showTotal:!1,onChange:z}),u("span",{className:"text-sm text-gray-600",children:"\u524D\u5F80"}),u(D,{type:"number",min:1,max:Math.ceil(S/c.pageSize)||1,style:{width:60},onPressEnter:t=>{const e=parseInt(t.target.value),a=Math.ceil(S/c.pageSize)||1;e>=1&&e<=a&&z(e,c.pageSize)}}),u("span",{className:"text-sm text-gray-600",children:"\u9875"})]})]}),u(Me,{open:me,curFileInfo:pe,token:k,onClose:()=>F(!1)})]})},qe=ae.div.attrs({className:"reviewmanage-status-cell"})`
1
+ import{jsxs as r,jsx as u,Fragment as J}from"react/jsx-runtime";import{useMemo as b,useState as l,useCallback as ke,useEffect as I,useRef as Te}from"react";import{DatePicker as Se,message as o,Select as j,Tooltip as X,Space as Z,Input as D,Table as ee,Pagination as Ne,Modal as f,Tag as ze,Button as A}from"antd";import ae from"styled-components";import{useTheme as Re,deepMergeTheme as te,defaultTheme as Ie,DashboardContainer as je,Icon as Pe}from"@mxmweb/zui";import{A as _e,P as Me}from"./assets/server-BOB675f_.js";import{R as He}from"./assets/QuestionCircleOutlined-BsYIcMyN.js";import{R as ue}from"./assets/SearchOutlined-BFI_fmw7.js";import{T as Ye}from"./assets/triangle-alert-LqO4u4ts.js";import"./assets/DrawerVideo-DE96g9Ht.js";import"./assets/GientechStreamReader-CnAI3q38.js";import"axios";import"@mxmweb/fviewer";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/x-CdZQbi--.js";import"dayjs";import"./assets/index-CpW6Dhpp.js";import"./assets/AntdIcon-Vuhc5UuC.js";const{RangePicker:Oe}=Se,Le={0:{text:"\u5168\u90E8",color:"default"},1:{text:"\u5BA1\u6838\u4E2D",color:"processing"},2:{text:"\u5BA1\u6838\u901A\u8FC7",color:"success"},3:{text:"\u5BA1\u6838\u62D2\u7EDD",color:"error"},4:{text:"\u590D\u5BA1\u4E2D",color:"warning"},5:{text:"\u590D\u5BA1\u901A\u8FC7",color:"success"},6:{text:"\u590D\u5BA1\u62D2\u7EDD",color:"error"}},Ke={1:"\u4E0A\u4F20",2:"\u5220\u9664"},Ue={1:"\u77E5\u8BC6\u5E93",2:"\u6570\u636E\u5E93"},mt=({url:P,token:k,role:_,styles:M,CustomComponents:ne,eventsEmit:T})=>{const H=Re(),ie=b(()=>te(te({theme:Ie,mode:"light"},H||{}),M||{}),[H,M]),[c,x]=l({pageNo:1,pageSize:10}),[d,se]=l([1,4]),[Y,le]=l(""),[O,re]=l(""),[m,L]=l(null),[w,oe]=l([]),[ce,K]=l(!1),[S,de]=l(0),[p,U]=l([]),[me,F]=l(!1),[pe,N]=l(),q=t=>{const e=t.split(".");return e.length>1?e[e.length-1]:""},Q=async(t,e,a)=>{var n,i,s,W,$,G;switch(console.log("[adopter] mergedEventsEmit",t,e,a),t){case"request:error_network":{((s=(i=(n=e==null?void 0:e.error)==null?void 0:n.response)==null?void 0:i.data)==null?void 0:s.errorCode)=="51036"?f.warning({title:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664",width:400,content:"\u5F53\u524D\u6587\u6863\u5DF2\u88AB\u5220\u9664\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}}):((G=($=(W=e==null?void 0:e.error)==null?void 0:W.response)==null?void 0:$.data)==null?void 0:G.errorCode)=="51038"&&f.warning({title:"\u5BA1\u6838\u5DF2\u5173\u95ED",width:400,content:"\u8D85\u7EA7\u7BA1\u7406\u5458\u5DF2\u5173\u95ED\u5BA1\u6838\u5F00\u5173\uFF0C\u6570\u636E\u65E0\u9700\u7EE7\u7EED\u5BA1\u6838\u3002",okText:"\u77E5\u9053\u4E86",closable:!1,onOk:async()=>{await v()}});break}default:typeof T=="function"&&T(t,e);break}},ge=b(()=>_e({url:P,token:k,role:_,eventsEmit:Q}),[T,_,k,P]),{getReviewData:he,reviewSingleData:E,batchReview:De,getCovertUrl:fe}=ge,v=ke(async()=>{K(!0);const t=d.includes(1),e=d.includes(4),a=t&&e;try{const n={...c,...d.length>0&&!d.includes(0)?{auditStatuses:d}:{},targetNameFuzzy:Y||void 0,fileNameFuzzy:O||void 0,...d.length>0&&(t||e||a)?{sortOrder:"asc"}:{sortOrder:"desc"}};m&&m[0]&&m[1]&&(n.uploadStartTime=m[0].format("YYYY-MM-DD HH:mm:ss"),n.uploadEndTime=m[1].format("YYYY-MM-DD HH:mm:ss"));const i=await he(n);oe(i.records||[]),de(i.total||0)}catch(n){o.error("\u83B7\u53D6\u5BA1\u6838\u5217\u8868\u5931\u8D25"),console.error(n)}finally{K(!1)}},[c,d,m]);I(()=>{v()},[v]);const g=()=>{x({...c,pageNo:1})},y=()=>{x(t=>({...t,pageNo:1}))},xe=t=>{if(t&&t[0]&&t[1]){const e=t[0].startOf("day"),a=t[1].endOf("day");L([e,a])}else L(null);x(e=>({...e,pageNo:1}))},z=(t,e)=>{x(a=>({...a,pageNo:t,pageSize:e||a.pageSize}))},C=async(t,e)=>{const a=t==null?void 0:t.id;if(a)switch(e){case"first_approve":{await E({instanceId:a,actionTypeCode:1})&&(g(),o.success("\u521D\u5BA1\u901A\u8FC7"));break}case"second_approve":{await E({instanceId:a,actionTypeCode:3})&&(g(),o.success("\u590D\u5BA1\u901A\u8FC7"));break}case"first_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:2,rejectReason:i})&&(g(),o.success("\u521D\u5BA1\u62D2\u7EDD"))}});break}case"second_reject":{let n="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:i=>{n=i.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const i=n.trim();if(!i)return o.warning("\u8BF7\u8F93\u5165\u590D\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));a&&await E({instanceId:a,actionTypeCode:4,rejectReason:i})&&(g(),o.success("\u590D\u5BA1\u62D2\u7EDD"))}});break}default:return}},Ae=async t=>{if(p.length===0){o.warning("\u8BF7\u5148\u9009\u62E9\u6570\u636E");return}if(t)if(t==2||t==4){let e="";f.confirm({title:"\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",width:600,content:u("div",{style:{minHeight:220},children:u(D.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0",maxLength:100,showCount:!0,rows:8,onChange:a=>{e=a.target.value}})}),cancelText:"\u53D6\u6D88",okText:"\u786E\u8BA4",onOk:async()=>{const a=e.trim();if(!a)return o.warning("\u8BF7\u8F93\u5165\u5BA1\u6838\u62D2\u7EDD\u539F\u56E0"),Promise.reject(new Error("empty reject reason"));await V({instanceIds:p,actionTypeCode:t,rejectReason:a})}})}else await V({instanceIds:p,actionTypeCode:t})},V=async t=>{var a;const e=await De({...t});e&&(((a=e==null?void 0:e.failedInstances)==null?void 0:a.length)>0?f.warning({title:"\u6279\u91CF\u5BA1\u6838\u5931\u8D25",width:900,content:u(ee,{columns:[{title:"\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",width:195},{title:"\u5BA1\u6838\u5931\u8D25\u539F\u56E0",dataIndex:"failedReason",key:"failedReason",width:195}],dataSource:(e==null?void 0:e.failedInstances)||[],pagination:!1,scroll:{y:400}}),okText:"\u77E5\u9053\u4E86",onOk:async()=>{g()}}):g()),U([])},we=async t=>{const{id:e,fileName:a,fileUrl:n}=t;if(e){const i=q(a);if(["html","txt","jpg","jpeg","png"].includes(i))N({url:n||"",parse_url:n||"",file_type:i,file_name:a||""}),F(!0);else if(["mp4","flv","avi","mkv","video"].includes(i))N({link:n||"",parse_url:n||"",file_type:i,source_name:a||""}),F(!0);else if(["xls","xlsx"].includes(i))Q("reviewmanage_table_action_detail",t);else{const s=await fe(e);s?(N({url:(s==null?void 0:s.convertedFilePath)||"",parse_url:(s==null?void 0:s.convertedFilePath)||"",file_type:i,source_name:a||"",pdfPages:s==null?void 0:s.totalPages}),F(!0)):o.error("\u683C\u5F0F\u8F6C\u6362\u5931\u8D25\uFF0C\u65E0\u6CD5\u9884\u89C8")}}},Fe=t=>{const e=q(t);return e==="pdf"?"rag/pdf":e==="ofd"?"rag/ofd":["doc","docx"].includes(e)?"rag/word":["xls","xlsx","xlsm","xlsb","xltx","xltm","xlt","xlam"].includes(e)?"rag/excel":["ppt","pptx"].includes(e)?"rag/ppt":["txt","md"].includes(e)?"rag/txt":["zip","rar","7z"].includes(e)?"rag/zip":["ofd"].includes(e)?"rag/ofd":["mp4","flv","avi","mkv","video"].includes(e)?"rag/video":"rag/file"},Ee=[{title:"\u5F85\u5BA1\u6838\u6587\u4EF6\u540D",dataIndex:"fileName",key:"fileName",fixed:"left",width:380,render:t=>r(Qe,{children:[u("span",{className:"reviewmanage-filename-icon",children:u(Pe,{type:Fe(t),size:16})}),u("span",{className:"reviewmanage-filename-text",title:t,children:t})]})},{title:"\u4F01\u4E1A\u5E93\u540D",dataIndex:"targetName",key:"targetName",width:180,ellipsis:!0},{title:"\u77E5\u8BC6\u7C7B\u578B",dataIndex:"targetType",key:"targetType",width:100,render:t=>u(ze,{color:t===1?"#C5D8FF":"#BEB8FF",style:{color:"#1D2129"},children:Ue[t]||"\u672A\u77E5"})},{title:"\u64CD\u4F5C\u7C7B\u522B",dataIndex:"operateType",key:"operateType",width:100,render:t=>Ke[t]||"\u672A\u77E5"},{title:"\u5BA1\u6838\u72B6\u6001",dataIndex:"auditStatus",key:"auditStatus",width:150,render:(t,e)=>{const n=Le[t].text;return r(qe,{className:"reviewmanage-status-cell","data-status":n,children:[n==="\u5BA1\u6838\u4E2D"||n==="\u590D\u5BA1\u4E2D"?u("span",{className:"reviewmanage-status-spinner","aria-label":"loading"}):u("span",{className:"reviewmanage-status-dot"}),u("span",{className:"reviewmanage-status-text",children:n}),(n==="\u5BA1\u6838\u62D2\u7EDD"||n==="\u590D\u5BA1\u62D2\u7EDD")&&u(X,{title:(e==null?void 0:e.lastRejectReason)||"",children:u(Ye,{size:14,color:"#FF4D4F"})})]})}},{title:"\u5F55\u5165\u5458",dataIndex:"createBy",key:"createBy",width:130},{title:"\u521D\u5BA1\u4EBA\u5458",dataIndex:"firstAuditor",key:"firstAuditor",width:130},{title:"\u590D\u5BA1\u4EBA\u5458",dataIndex:"secondAuditor",key:"secondAuditor",width:130},{title:"\u4E0A\u4F20\u65F6\u95F4",dataIndex:"uploadTime",key:"uploadTime",width:200},{title:"\u521D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"firstAuditTime",key:"firstAuditTime",width:200},{title:"\u590D\u5BA1\u5BA1\u6838\u65F6\u95F4",dataIndex:"secondAuditTime",key:"secondAuditTime",width:200},{title:"\u64CD\u4F5C",key:"action",fixed:"right",width:240,render:(t,e)=>r(Z,{size:"small",children:[e.enableFirstAudit&&(e==null?void 0:e.auditStatus)==1&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"first_approve"),children:"\u5BA1\u6838\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"first_reject"),children:"\u5BA1\u6838\u62D2\u7EDD"})]}),e.enableSecondAudit&&(e==null?void 0:e.auditStatus)==4&&r(J,{children:[u(A,{type:"link",size:"small",onClick:()=>C(e,"second_approve"),children:"\u590D\u5BA1\u901A\u8FC7"}),u(A,{type:"link",size:"small",onClick:()=>C(e,"second_reject"),children:"\u590D\u5BA1\u62D2\u7EDD"})]}),u(A,{type:"link",size:"small",onClick:()=>we(e),children:"\u67E5\u770B"})]})}],ve=(t,e)=>{const{auditStatus:a,operateType:n,enableFirstAudit:i,enableSecondAudit:s}=t;return n==1?!((a==1||a==4)&&(i||s)):!0},ye={selectedRowKeys:p,fixed:!0,onChange:t=>{U(t)},getCheckboxProps:t=>({disabled:ve(t)})},h=b(()=>w.filter(t=>p.includes(t.id)),[w,p]),Ce=b(()=>{var t;if((h==null?void 0:h.length)>0){const e=(t=h[0])==null?void 0:t.auditStatus;return h.every(n=>(n==null?void 0:n.auditStatus)===e)?[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:e==4},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:e==4},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:e==1},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:e==1}]:[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1,disabled:!0},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3,disabled:!0},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4,disabled:!0}]}return[{label:"\u6279\u91CF\u521D\u5BA1\u901A\u8FC7",value:1},{label:"\u6279\u91CF\u521D\u5BA1\u62D2\u7EDD",value:2},{label:"\u6279\u91CF\u590D\u5BA1\u901A\u8FC7",value:3},{label:"\u6279\u91CF\u590D\u5BA1\u62D2\u7EDD",value:4}]},[h]),[Be,be]=l(55),R=Te(null),B=()=>{if(!R.current)return;const t=R.current.clientHeight;console.log("+++++",t);const e=t-54-32,a=Math.floor(e/10),n=Math.min(Math.max(a,40),120);be(n)};return I(()=>(B(),window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)),[]),I(()=>{B()},[w.length]),r(je,{title:"\u5BA1\u6838\u7BA1\u7406",styles:ie,CustomComponents:ne,children:[r("div",{className:"review-manage-component flex flex-col justify-between h-full p-[12px]",style:{backgroundColor:"#fff"},children:[r("div",{className:"flex justify-between",children:[r("div",{children:[u(j,{size:"middle",style:{width:120},placeholder:"\u6279\u91CF\u64CD\u4F5C",options:Ce,onChange:t=>Ae(t)}),u(X,{title:"\u53EA\u6709\u540C\u4E00\u72B6\u6001\u7684\u6587\u6863\u624D\u53EF\u4EE5\u8FDB\u884C\u6279\u91CF\u64CD\u4F5C",children:u(He,{style:{color:"#86909C",marginLeft:10}})})]}),r(Z,{size:"middle",children:[u(j,{mode:"multiple",size:"middle",style:{width:230},placeholder:"\u5BA1\u6838\u72B6\u6001",maxTagCount:"responsive",options:[{label:"\u5BA1\u6838\u4E2D",value:1},{label:"\u5BA1\u6838\u901A\u8FC7",value:2},{label:"\u5BA1\u6838\u62D2\u7EDD",value:3},{label:"\u590D\u5BA1\u4E2D",value:4},{label:"\u590D\u5BA1\u901A\u8FC7",value:5},{label:"\u590D\u5BA1\u62D2\u7EDD",value:6},{label:"\u5168\u90E8",value:0}],value:d,onChange:t=>{se(t),x(e=>({...e,pageNo:1}))}}),u(D,{placeholder:"\u8F93\u5165\u4F01\u4E1A\u5E93\u540D\u641C\u7D22",value:Y,onChange:t=>le(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(D,{placeholder:"\u8F93\u5165\u5BA1\u6838\u6587\u4EF6\u540D\u641C\u7D22",value:O,onChange:t=>re(t.target.value),style:{width:200},suffix:u("div",{className:"cursor-pointer",onClick:y,children:u(ue,{style:{color:"#999",fontSize:12}})}),onKeyDown:t=>{t.key==="Enter"&&y()},allowClear:!0}),u(Oe,{format:"YYYY-MM-DD",value:m,onChange:xe,placeholder:["\u5F00\u59CB\u65F6\u95F4","\u7ED3\u675F\u65F6\u95F4"]})]})]}),u("div",{className:"my-[16px]",ref:R,style:{overflowY:"auto",height:"calc(100% - 110px)"},children:u(ee,{rowKey:"id",columns:Ee,dataSource:w,loading:ce,rowSelection:ye,pagination:!1,scroll:{x:1e3},rootClassName:"review-manage-table",components:{body:{cell:({children:t,...e})=>u("td",{...e,style:{...e.style,height:`${Be}px`,padding:"8px 16px",verticalAlign:"middle"},children:t})}}})}),r("div",{className:"flex px-[16px] items-center justify-end gap-2",children:[u("span",{className:"text-sm text-gray-600",children:"\u6BCF\u9875"}),u(j,{value:c.pageSize,options:[{label:"10",value:10},{label:"20",value:20},{label:"50",value:50},{label:"100",value:100}],onChange:t=>z(1,t),style:{width:70}}),u("span",{className:"text-sm text-gray-600",children:"\u6761"}),u(Ne,{current:c.pageNo,pageSize:c.pageSize,total:S,showSizeChanger:!1,showQuickJumper:!1,showTotal:!1,onChange:z}),u("span",{className:"text-sm text-gray-600",children:"\u524D\u5F80"}),u(D,{type:"number",min:1,max:Math.ceil(S/c.pageSize)||1,style:{width:60},onPressEnter:t=>{const e=parseInt(t.target.value),a=Math.ceil(S/c.pageSize)||1;e>=1&&e<=a&&z(e,c.pageSize)}}),u("span",{className:"text-sm text-gray-600",children:"\u9875"})]})]}),u(Me,{open:me,curFileInfo:pe,token:k,onClose:()=>F(!1)})]})},qe=ae.div.attrs({className:"reviewmanage-status-cell"})`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 6px;
package/reviewSetting.js CHANGED
@@ -1 +1 @@
1
- import"react/jsx-runtime";import"react";import"styled-components";import"@mxmweb/xviewer";import"antd";import"@mxmweb/zui";import{R as g}from"./assets/ReviewSetting-Dxtpuyr1.js";/* empty css */import"./assets/ExclamationCircleFilled-BDa8DeZo.js";import"./assets/search-CEuIa9-_.js";import"axios";import"./assets/x-CdZQbi--.js";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/plus-B679mjyt.js";import"./assets/AntdIcon-CAOWkvVt.js";export{g as default};
1
+ import"react/jsx-runtime";import"react";import"styled-components";import"@mxmweb/xviewer";import"antd";import"@mxmweb/zui";import{R as g}from"./assets/ReviewSetting-BE-nCaCT.js";/* empty css */import"./assets/ExclamationCircleFilled-iFno81Rg.js";import"./assets/search-CEuIa9-_.js";import"axios";import"./assets/x-CdZQbi--.js";import"./assets/createLucideIcon-Bj5DlX2s.js";import"./assets/chevron-right-CrkLSPrQ.js";import"./assets/plus-B679mjyt.js";import"./assets/AntdIcon-Vuhc5UuC.js";export{g as default};
@@ -1,63 +0,0 @@
1
- import*as C from"react";import $,{createContext as gt,useContext as dt,useEffect as mt}from"react";var ne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function re(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Y=gt({});function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(null,arguments)}function yt(e){if(Array.isArray(e))return e}function pt(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,s,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,t!==0)for(;!(c=(r=o.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(l){u=!0,i=l}finally{try{if(!c&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return a}}function L(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function vt(e,t){if(e){if(typeof e=="string")return L(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}function Ct(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J(e,t){return yt(e)||pt(e,t)||vt(e,t)||Ct()}function b(e){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(e)}function _t(e,t){if(b(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(b(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wt(e){var t=_t(e,"string");return b(t)=="symbol"?t:t+""}function g(e,t,n){return(t=wt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function X(e,t){if(e==null)return{};var n,r,i=xt(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var T={exports:{}};/*!
3
- Copyright (c) 2018 Jed Watson.
4
- Licensed under the MIT License (MIT), see
5
- http://jedwatson.github.io/classnames
6
- */var D;function St(){return D||(D=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",s=0;s<arguments.length;s++){var a=arguments[s];a&&(o=i(o,r(a)))}return o}function r(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return n.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var s="";for(var a in o)t.call(o,a)&&o[a]&&(s=i(s,a));return s}function i(o,s){return s?o?o+" "+s:o+s:o}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(T)),T.exports}var Ot=St();const Tt=bt(Ot),h=Math.round;function M(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)r[i]=t(r[i]||0,n[i]||"",i);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const B=(e,t,n)=>n===0?e:e/100;function v(e,t){const n=t||255;return e>n?n:e<0?0:e}class y{constructor(t){g(this,"isValid",!0),g(this,"r",0),g(this,"g",0),g(this,"b",0),g(this,"a",1),g(this,"_h",void 0),g(this,"_s",void 0),g(this,"_l",void 0),g(this,"_v",void 0),g(this,"_max",void 0),g(this,"_min",void 0),g(this,"_brightness",void 0);function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let i=function(o){return r.startsWith(o)};const r=t.trim();/^#?[A-F\d]{3,8}$/i.test(r)?this.fromHexString(r):i("rgb")?this.fromRgbString(r):i("hsl")?this.fromHslString(r):(i("hsv")||i("hsb"))&&this.fromHsvString(r)}else if(t instanceof y)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=v(t.r),this.g=v(t.g),this.b=v(t.b),this.a=typeof t.a=="number"?v(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(o){const s=o/255;return s<=.03928?s/12.92:Math.pow((s+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),i=t(this.b);return .2126*n+.7152*r+.0722*i}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=h(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/t+2:(this.r-this.g)/t+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()-t/100;return i<0&&(i=0),this._c({h:n,s:r,l:i,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let i=this.getLightness()+t/100;return i>1&&(i=1),this._c({h:n,s:r,l:i,a:this.a})}mix(t,n=50){const r=this._c(t),i=n/100,o=a=>(r[a]-this[a])*i+this[a],s={r:h(o("r")),g:h(o("g")),b:h(o("b")),a:h(o("a")*100)/100};return this._c(s)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),i=o=>h((this[o]*this.a+n[o]*n.a*(1-this.a))/r);return this._c({r:i("r"),g:i("g"),b:i("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const i=(this.b||0).toString(16);if(t+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=h(this.a*255).toString(16);t+=o.length===2?o:"0"+o}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=h(this.getSaturation()*100),r=h(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const i=this.clone();return i[t]=v(n,r),i}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(i,o){return parseInt(n[i]+n[o||i],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:i}){if(this._h=t%360,this._s=n,this._l=r,this.a=typeof i=="number"?i:1,n<=0){const d=h(r*255);this.r=d,this.g=d,this.b=d}let o=0,s=0,a=0;const c=t/60,u=(1-Math.abs(2*r-1))*n,l=u*(1-Math.abs(c%2-1));c>=0&&c<1?(o=u,s=l):c>=1&&c<2?(o=l,s=u):c>=2&&c<3?(s=u,a=l):c>=3&&c<4?(s=l,a=u):c>=4&&c<5?(o=l,a=u):c>=5&&c<6&&(o=u,a=l);const f=r-u/2;this.r=h((o+f)*255),this.g=h((s+f)*255),this.b=h((a+f)*255)}fromHsv({h:t,s:n,v:r,a:i}){this._h=t%360,this._s=n,this._v=r,this.a=typeof i=="number"?i:1;const o=h(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const s=t/60,a=Math.floor(s),c=s-a,u=h(r*(1-n)*255),l=h(r*(1-n*c)*255),f=h(r*(1-n*(1-c))*255);switch(a){case 0:this.g=f,this.b=u;break;case 1:this.r=l,this.b=u;break;case 2:this.r=u,this.b=f;break;case 3:this.r=u,this.g=l;break;case 4:this.r=f,this.g=u;break;case 5:default:this.g=u,this.b=l;break}}fromHsvString(t){const n=M(t,B);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=M(t,B);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=M(t,(r,i)=>i.includes("%")?h(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}var w=2,z=.16,Mt=.05,jt=.05,Ht=.15,Z=5,tt=4,Pt=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function W(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-w*t:Math.round(e.h)+w*t:r=n?Math.round(e.h)+w*t:Math.round(e.h)-w*t,r<0?r+=360:r>=360&&(r-=360),r}function q(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-z*t:t===tt?r=e.s+z:r=e.s+Mt*t,r>1&&(r=1),n&&t===Z&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function V(e,t,n){var r;return n?r=e.v+jt*t:r=e.v-Ht*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function Nt(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=new y(e),i=r.toHsv(),o=Z;o>0;o-=1){var s=new y({h:W(i,o,!0),s:q(i,o,!0),v:V(i,o,!0)});n.push(s)}n.push(r);for(var a=1;a<=tt;a+=1){var c=new y({h:W(i,a),s:q(i,a),v:V(i,a)});n.push(c)}return t.theme==="dark"?Pt.map(function(u){var l=u.index,f=u.amount;return new y(t.backgroundColor||"#141414").mix(n[l],f).toHexString()}):n.map(function(u){return u.toHexString()})}var H=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];H.primary=H[5];function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?F(Object(n),!0).forEach(function(r){g(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function At(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var G="data-rc-order",K="data-rc-priority",kt="rc-util-key",P=new Map;function et(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):kt}function A(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Et(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function k(e){return Array.from((P.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function nt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Rt())return null;var n=t.csp,r=t.prepend,i=t.priority,o=i===void 0?0:i,s=Et(r),a=s==="prependQueue",c=document.createElement("style");c.setAttribute(G,s),a&&o&&c.setAttribute(K,"".concat(o)),n!=null&&n.nonce&&(c.nonce=n==null?void 0:n.nonce),c.innerHTML=e;var u=A(t),l=u.firstChild;if(r){if(a){var f=(t.styles||k(u)).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(G)))return!1;var S=Number(d.getAttribute(K)||0);return o>=S});if(f.length)return u.insertBefore(c,f[f.length-1].nextSibling),c}u.insertBefore(c,l)}else u.appendChild(c);return c}function It(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=A(t);return(t.styles||k(n)).find(function(r){return r.getAttribute(et(t))===e})}function $t(e,t){var n=P.get(e);if(!n||!At(document,n)){var r=nt("",t),i=r.parentNode;P.set(e,i),e.removeChild(r)}}function Lt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=A(n),i=k(r),o=m(m({},n),{},{styles:i});$t(r,o);var s=It(t,o);if(s){var a,c;if((a=o.csp)!==null&&a!==void 0&&a.nonce&&s.nonce!==((c=o.csp)===null||c===void 0?void 0:c.nonce)){var u;s.nonce=(u=o.csp)===null||u===void 0?void 0:u.nonce}return s.innerHTML!==e&&(s.innerHTML=e),s}var l=nt(e,o);return l.setAttribute(et(o),t),l}function rt(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function Dt(e){return rt(e)instanceof ShadowRoot}function Bt(e){return Dt(e)?rt(e):null}var N={},zt=function(t){};function Wt(e,t){}function qt(e,t){}function Vt(){N={}}function it(e,t,n){!t&&!N[n]&&(e(!1,n),N[n]=!0)}function x(e,t){it(Wt,e,t)}function Ft(e,t){it(qt,e,t)}x.preMessage=zt;x.resetWarned=Vt;x.noteOnce=Ft;function Gt(e){return e.replace(/-(.)/g,function(t,n){return n.toUpperCase()})}function Kt(e,t){x(e,"[@ant-design/icons] ".concat(t))}function Q(e){return b(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(b(e.icon)==="object"||typeof e.icon=="function")}function U(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[Gt(n)]=r}return t},{})}function R(e,t,n){return n?$.createElement(e.tag,m(m({key:t},U(e.attrs)),n),(e.children||[]).map(function(r,i){return R(r,"".concat(t,"-").concat(e.tag,"-").concat(i))})):$.createElement(e.tag,m({key:t},U(e.attrs)),(e.children||[]).map(function(r,i){return R(r,"".concat(t,"-").concat(e.tag,"-").concat(i))}))}function ot(e){return Nt(e)[0]}function st(e){return e?Array.isArray(e)?e:[e]:[]}var Qt=`
7
- .anticon {
8
- display: inline-flex;
9
- align-items: center;
10
- color: inherit;
11
- font-style: normal;
12
- line-height: 0;
13
- text-align: center;
14
- text-transform: none;
15
- vertical-align: -0.125em;
16
- text-rendering: optimizeLegibility;
17
- -webkit-font-smoothing: antialiased;
18
- -moz-osx-font-smoothing: grayscale;
19
- }
20
-
21
- .anticon > * {
22
- line-height: 1;
23
- }
24
-
25
- .anticon svg {
26
- display: inline-block;
27
- }
28
-
29
- .anticon::before {
30
- display: none;
31
- }
32
-
33
- .anticon .anticon-icon {
34
- display: block;
35
- }
36
-
37
- .anticon[tabindex] {
38
- cursor: pointer;
39
- }
40
-
41
- .anticon-spin::before,
42
- .anticon-spin {
43
- display: inline-block;
44
- -webkit-animation: loadingCircle 1s infinite linear;
45
- animation: loadingCircle 1s infinite linear;
46
- }
47
-
48
- @-webkit-keyframes loadingCircle {
49
- 100% {
50
- -webkit-transform: rotate(360deg);
51
- transform: rotate(360deg);
52
- }
53
- }
54
-
55
- @keyframes loadingCircle {
56
- 100% {
57
- -webkit-transform: rotate(360deg);
58
- transform: rotate(360deg);
59
- }
60
- }
61
- `,Ut=function(t){var n=dt(Y),r=n.csp,i=n.prefixCls,o=n.layer,s=Qt;i&&(s=s.replace(/anticon/g,i)),o&&(s="@layer ".concat(o,` {
62
- `).concat(s,`
63
- }`)),mt(function(){var a=t.current,c=Bt(a);Lt(s,"@ant-design-icons",{prepend:!o,csp:r,attachTo:c})},[])},Yt=["icon","className","onClick","style","primaryColor","secondaryColor"],_={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Jt(e){var t=e.primaryColor,n=e.secondaryColor;_.primaryColor=t,_.secondaryColor=n||ot(t),_.calculated=!!n}function Xt(){return m({},_)}var p=function(t){var n=t.icon,r=t.className,i=t.onClick,o=t.style,s=t.primaryColor,a=t.secondaryColor,c=X(t,Yt),u=C.useRef(),l=_;if(s&&(l={primaryColor:s,secondaryColor:a||ot(s)}),Ut(u),Kt(Q(n),"icon should be icon definiton, but got ".concat(n)),!Q(n))return null;var f=n;return f&&typeof f.icon=="function"&&(f=m(m({},f),{},{icon:f.icon(l.primaryColor,l.secondaryColor)})),R(f.icon,"svg-".concat(f.name),m(m({className:r,onClick:i,style:o,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},c),{},{ref:u}))};p.displayName="IconReact";p.getTwoToneColors=Xt;p.setTwoToneColors=Jt;function at(e){var t=st(e),n=J(t,2),r=n[0],i=n[1];return p.setTwoToneColors({primaryColor:r,secondaryColor:i})}function Zt(){var e=p.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var te=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];at(H.primary);var E=C.forwardRef(function(e,t){var n=e.className,r=e.icon,i=e.spin,o=e.rotate,s=e.tabIndex,a=e.onClick,c=e.twoToneColor,u=X(e,te),l=C.useContext(Y),f=l.prefixCls,d=f===void 0?"anticon":f,S=l.rootClassName,ct=Tt(S,d,g(g({},"".concat(d,"-").concat(r.name),!!r.name),"".concat(d,"-spin"),!!i||r.name==="loading"),n),O=s;O===void 0&&a&&(O=-1);var ut=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,lt=st(c),I=J(lt,2),ft=I[0],ht=I[1];return C.createElement("span",j({role:"img","aria-label":r.name},u,{ref:t,tabIndex:O,onClick:a,className:ct}),C.createElement(p,{icon:r,primaryColor:ft,secondaryColor:ht,style:ut}))});E.displayName="AntdIcon";E.getTwoToneColor=Zt;E.setTwoToneColor=at;export{E as I,j as _,re as a,ne as c,bt as g};