@swiftcast/clip-editor-react 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.html +1 -1
- package/dist/mf-manifest.json +28 -29
- package/dist/mf-stats.json +28 -29
- package/dist/remoteEntry.js +3 -3
- package/dist/static/js/{94.ed9056c0.js → 94.3bce66cb.js} +2 -2
- package/dist/static/js/async/191.ba82b2aa.js +2 -0
- package/dist/static/js/async/191.ba82b2aa.js.LICENSE.txt +19 -0
- package/dist/static/js/async/194.00a1ac33.js +1 -0
- package/dist/static/js/async/375.dbbbf5b9.js +1 -0
- package/dist/static/js/async/470.b7746900.js +9 -0
- package/dist/static/js/async/{993.5ddcca60.js.LICENSE.txt → 470.b7746900.js.LICENSE.txt} +0 -20
- package/dist/static/js/async/491.24ed25bd.js +1 -0
- package/dist/static/js/async/525.e80f374e.js +1 -0
- package/dist/static/js/async/682.f9ec3784.js +2 -0
- package/dist/static/js/async/{307.c4997706.js.LICENSE.txt → 682.f9ec3784.js.LICENSE.txt} +2 -2
- package/dist/static/js/async/696.9e1d8d18.js +6 -0
- package/dist/static/js/async/728.d8464797.js +9 -0
- package/dist/static/js/async/731.f9db2879.js +36 -0
- package/dist/static/js/async/{473.6f1380b6.js.LICENSE.txt → 731.f9db2879.js.LICENSE.txt} +2 -2
- package/dist/static/js/async/{861.bafeeb80.js → 888.87fe6dc2.js} +2 -2
- package/dist/static/js/async/929.23ab9291.js +1 -0
- package/dist/static/js/async/{826.d0b8337b.js → 977.96bac1ea.js} +35 -35
- package/dist/static/js/async/{826.d0b8337b.js.LICENSE.txt → 977.96bac1ea.js.LICENSE.txt} +0 -20
- package/dist/static/js/async/__federation_expose_ProjectsPage.939a362b.js +2 -0
- package/dist/static/js/async/__federation_expose_SniffingPage.55fecd62.js +1 -0
- package/dist/static/js/async/__federation_expose_WorkFlow.3f5bc0f5.js +11 -0
- package/dist/static/js/index.65653c3a.js +1 -0
- package/package.json +5 -5
- package/dist/static/js/async/115.cc1fa793.js +0 -2
- package/dist/static/js/async/115.cc1fa793.js.LICENSE.txt +0 -9
- package/dist/static/js/async/194.1c950ca8.js +0 -1
- package/dist/static/js/async/304.e8652e65.js +0 -2
- package/dist/static/js/async/304.e8652e65.js.LICENSE.txt +0 -9
- package/dist/static/js/async/307.c4997706.js +0 -2
- package/dist/static/js/async/375.4f08c1b1.js +0 -1
- package/dist/static/js/async/432.c1467d27.js +0 -1
- package/dist/static/js/async/473.6f1380b6.js +0 -36
- package/dist/static/js/async/491.e6c05189.js +0 -1
- package/dist/static/js/async/525.8d2cc416.js +0 -1
- package/dist/static/js/async/620.b26dd7c1.js +0 -9
- package/dist/static/js/async/893.8969935f.js +0 -6
- package/dist/static/js/async/993.5ddcca60.js +0 -9
- package/dist/static/js/async/__federation_expose_ProjectsPage.01da0212.js +0 -2
- package/dist/static/js/async/__federation_expose_SniffingPage.da5afebe.js +0 -1
- package/dist/static/js/async/__federation_expose_WorkFlow.dc059c9e.js +0 -11
- package/dist/static/js/index.99f8d1bb.js +0 -1
- /package/dist/static/js/async/{893.8969935f.js.LICENSE.txt → 696.9e1d8d18.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{620.b26dd7c1.js.LICENSE.txt → 728.d8464797.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{861.bafeeb80.js.LICENSE.txt → 888.87fe6dc2.js.LICENSE.txt} +0 -0
- /package/dist/static/js/async/{__federation_expose_ProjectsPage.01da0212.js.LICENSE.txt → __federation_expose_ProjectsPage.939a362b.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["491"],{52099:function(e,t,s){s.d(t,{u:()=>a});var l=s(31549),i=s(45436);s(8491);var r=s(71553),n=s(65005);let a=e=>{let{children:t,content:s,tooltipContentClassName:a}=e;return(0,l.jsxs)("div",{className:"inline-flex whitespace-nowrap justify-center items-center w-fit",children:[t,(0,l.jsx)(n.pn,{children:(0,l.jsxs)(n.u,{children:[(0,l.jsx)(n.aJ,{className:"inline-flex w-fit",children:(0,l.jsx)(i.Z,{className:"ml-1",size:15})}),(0,l.jsx)(n._v,{className:(0,r.cn)("max-w-60 overflow-y-auto h-full",a),children:(0,l.jsx)("div",{children:s})})]})})]})}},38137:function(e,t,s){s.d(t,{Z:()=>eg});var l=s(31549),i=s(53589),r=s(71553);let n=async(e,t)=>{try{let s=`/sniffing/account/${e.replace(" ","")}/${t}`;return await i.hi.get(s)}catch(e){console.error("Error fetching video posts:",e)}},a=async(e,t)=>{try{let s=`/sniffing/video/${e.replace(" ","")}/${t}`;return await i.hi.get(s)}catch(e){console.error("Error fetching video posts:",e)}};var c=s(40349),o=s(59561),d=(s(75953),s(8491)),u=s.n(d);let m=d.forwardRef((e,t)=>{let{...s}=e;return(0,l.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...s})});m.displayName="Breadcrumb";let x=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("ol",{ref:t,className:(0,r.cn)("flex flex-wrap items-center gap-1.5 break-words text-sm text-zinc-500 sm:gap-2.5 dark:text-zinc-400",s),...i})});x.displayName="BreadcrumbList";let h=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("li",{ref:t,className:(0,r.cn)("inline-flex items-center gap-1.5",s),...i})});h.displayName="BreadcrumbItem";let f=d.forwardRef((e,t)=>{let{asChild:s,className:i,...n}=e,a=s?c.g7:"a";return(0,l.jsx)(a,{ref:t,className:(0,r.cn)("transition-colors hover:text-zinc-950 dark:hover:text-zinc-50",i),...n})});f.displayName="BreadcrumbLink";let j=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("span",{ref:t,role:"link","aria-disabled":"true","aria-current":"page",className:(0,r.cn)("font-normal font-semibold text-zinc-950 text- dark:text-zinc-50",s),...i})});j.displayName="BreadcrumbPage";let g=e=>{let{children:t,className:s,...i}=e;return(0,l.jsx)("li",{role:"presentation","aria-hidden":"true",className:(0,r.cn)("[&>svg]:w-3.5 [&>svg]:h-3.5",s),...i,children:t??(0,l.jsx)(o.Z,{})})};g.displayName="BreadcrumbSeparator";var p=s(57282);let v=e=>{let{data_type:t,links:s,children:i}=e;function r(e,s){return"account_add_sniffing"==e?(0,l.jsx)(f,{href:"http://dev.swfitcast.ai:8001/swfitcast_admin/",children:s}):t!=e?(0,l.jsx)(f,{href:`?data_type=${e}`,children:s}):(0,l.jsx)(j,{children:s})}return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:"h-10 px-4 w-full inline-flex items-center justify-between",children:[(0,l.jsx)(m,{children:(0,l.jsxs)(x,{children:[(0,l.jsx)(h,{children:r(s[0].key,s[0].value)},"crumb-0"),s.slice(1).map((e,t)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(g,{},`crumb${t+1}`),(0,l.jsx)(h,{children:r(e.key,e.value)},`crumb${t}`)]}))]})}),i]}),(0,l.jsx)(p.Z,{})]})},w=[{key:"video_sniffing",value:"视频"},{key:"account_sniffing",value:"账号"}];var _=s(90164),y=s(31421),N=s(48959),b=s(39378),k=s.n(b),C=s(87360),z=s(61782),S=s(26791),F=s(60426),R=s(52114),T=s(94957),K=s(30157),Z=s(85737),V=s(94502);let M=e=>{let{generateCurrentTableData:t}=e,[s,i]=(0,d.useState)(""),[n,a]=(0,d.useState)(!1);return(0,l.jsxs)(Z.J2,{children:[(0,l.jsxs)(Z.xo,{children:[" ",(0,l.jsx)(K.z,{className:"ml-1 h-8 w-8 ",variant:"outline",size:"sm",onClick:()=>{},children:(0,l.jsx)(R.Z,{})})]}),(0,l.jsxs)(Z.yk,{className:"w-[700px]",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)(K.z,{disabled:n,onClick:async()=>{let e=(0,N.iL)({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!0,filename:`${(0,r.eF)()}`});(0,N.gB)(e)(t()),a(!0),i("loading...."),a(!1)},children:["Ask 广林 ",n&&(0,l.jsx)(T.Z,{className:"animate-spin"})]})," ",(0,l.jsx)("span",{className:"ml-2 text-sm",children:"关闭设置 chrome://flags/#block-insecure-private-network-requests"})]}),(0,l.jsx)(V.g,{className:"mt-4 min-h-[500px]",value:s})]})]})};var $=s(17511),L=s(44153);let P=e=>{let{className:t}=e;return(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:(0,r.cn)("animate-spin",t),children:(0,l.jsx)("path",{d:"M21 12a9 9 0 1 1-6.219-8.56"})})};var D=s(72513),A=s(67494);class B extends u().PureComponent{componentDidMount(){this.props.listenRef.addEventListener("scroll",this.onScroll)}componentWillUnmount(){this.props.listenRef.removeEventListener("scroll",this.onScroll)}render(){return(0,l.jsx)("div",{style:{position:"absolute",float:"right",right:"20px",bottom:"20px",width:"40px",textAlign:"center",zIndex:2},children:this.isShowAvailable()&&(0,l.jsx)("div",{className:"bg-gray-200 w-fit rounded-md p-1 cursor-pointer",onClick:this.scrollToTop,children:(0,l.jsx)(A.Z,{})})})}constructor(...e){super(...e),(0,D._)(this,"state",{scrollLastTop:this.props.listenRef.scrollTop}),(0,D._)(this,"isShowAvailable",()=>this.props.listenRef.scrollHeight>window.innerHeight&&5*this.props.listenRef.scrollTop>this.props.listenRef.scrollHeight),(0,D._)(this,"scrollToTop",()=>{null!=this.props.listenRef&&this.props.listenRef.scrollTo({top:0,left:0,behavior:"smooth"})}),(0,D._)(this,"onScroll",()=>{this.setState({scrollLastTop:this.props.listenRef.scrollTop})})}}function E(e){var t,s;let{columns:i,data:n,filter:a,init:c={defaultSortColumn:void 0,pageIndex:0,pageSize:Number.MAX_VALUE,disableTool:!1},loading:u=!1,assistTools:m,height:x=""}=e,[h,f]=d.useState([]),[j,g]=d.useState([]),[p,v]=d.useState({}),[w,b]=d.useState({}),R=(0,d.useRef)(null),T=(0,_.b7)({data:n,columns:i,onSortingChange:f,onColumnFiltersChange:g,getCoreRowModel:(0,y.sC)(),getPaginationRowModel:(0,y.G_)(),getSortedRowModel:(0,y.tj)(),getFilteredRowModel:(0,y.vL)(),onColumnVisibilityChange:v,onRowSelectionChange:b,state:{sorting:h,columnFilters:j,columnVisibility:p,rowSelection:w},initialState:{pagination:{...c}}});(0,d.useEffect)(()=>{let e=(0,r.n6)(window.location.href).filter;e&&a&&Z(a.accessorKey,e),c&&(T.setColumnVisibility({...c.columnVisibility}),c.defaultSortColumn&&T.setSorting([{id:c.defaultSortColumn,desc:!0}]))},[]);let Z=async(e,t)=>{var s;await (null==(s=T.getColumn(e))?void 0:s.setFilterValue(t)),a&&a.callback&&setTimeout(()=>{let e=T.getFilteredRowModel().rows.map(e=>e);a.callback&&a.callback(e)},1e3)};function V(){let e=T.getPrePaginationRowModel().rows.map(e=>e.original),t={};for(let s of i)s.accessorKey&&s.csvTitle&&s.accessorKey in e[0]&&(t[s.accessorKey]=s.csvTitle);c&&c.csv&&(t={...c.csv.keyDict,...t});let s=Object.keys(t);return e.map(e=>{let t=k().pick(e,s);return c&&c.csv&&c.csv.appendRows&&(t={...t,...c.csv.appendRows(e)}),t}).map(e=>(0,r.U_)(e,t))}return(0,l.jsxs)("div",{children:[!(c&&c.disableTool)&&(0,l.jsxs)("div",{className:"flex items-center py-4 justify-between",children:[(0,l.jsxs)("div",{children:[" ",m&&m.map(e=>e)]}),(0,l.jsxs)("div",{className:"w-fit items-center inline-flex ",children:[(0,l.jsxs)("span",{className:"text-gray-400 mr-1 text-sm",children:["当前显示 ",T.getState().pagination.pageIndex+1," of"," ",T.getPageCount()," 页,总"," ",T.getFilteredRowModel().rows.length," 行"]}),(0,l.jsx)(K.z,{variant:"outline",size:"sm",className:"ml-1 h-8 w-8",onClick:()=>T.previousPage(),disabled:!T.getCanPreviousPage(),children:(0,l.jsx)(C.Z,{})}),(0,l.jsx)(K.z,{className:"ml-1 h-8 w-8 ",variant:"outline",size:"sm",onClick:()=>T.nextPage(),disabled:!T.getCanNextPage(),children:(0,l.jsx)(o.Z,{})}),c&&c.enableAI&&(0,l.jsx)(M,{generateCurrentTableData:V}),a?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"w-fit inline-flex ml-1",children:(0,l.jsxs)("div",{className:(0,r.cn)("flex h-8 items-center rounded-md border border-input bg-white pr-3 text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-2"),children:[(0,l.jsx)("input",{placeholder:`Filter ${a.placement}...`,value:(null==(t=T.getColumn(a.accessorKey))?void 0:t.getFilterValue())??"",onChange:e=>{Z(a.accessorKey,e.target.value)},className:"w-full h-7 p-2 placeholder:text-muted-foreground focus-visible:outline-hidden disabled:cursor-not-allowed disabled:opacity-50"}),(0,l.jsx)("div",{className:" ml-1 hover:cursor-pointer opacity-10 hover:opacity-100 ",onClick:()=>{T.resetColumnFilters()},children:(0,l.jsx)(z.Z,{size:15})})]})})}):(0,l.jsx)("div",{}),(0,l.jsx)(K.z,{size:"sm",variant:"outline",className:"ml-1 h-8 w-8",onClick:()=>{let e=V(),t=[];Object.keys(e[0]).forEach(e=>{let s={key:e,displayLabel:e};e.includes("id")?t.unshift(s):t.push(s)});let s=(0,N.iL)({fieldSeparator:",",decimalSeparator:".",useKeysAsHeaders:!1,columnHeaders:t,filename:`${(0,r.eF)()}`}),l=(0,N.gB)(s);(0,N.LR)(s)(l(e))},children:(0,l.jsx)(S.Z,{})}),(0,l.jsxs)($.h_,{children:[(0,l.jsx)($.$F,{asChild:!0,children:(0,l.jsxs)(K.z,{variant:"outline",className:"ml-1 h-8",children:["显示列 ",(0,l.jsx)(F.Z,{})]})}),(0,l.jsx)($.AW,{align:"end",children:T.getAllColumns().filter(e=>e.getCanHide()).map(e=>(0,l.jsx)($.bO,{className:"capitalize",checked:e.getIsVisible(),onCheckedChange:t=>e.toggleVisibility(!!t),children:e.columnDef.csvTitle?e.columnDef.csvTitle:e.id},e.id))})]})]})]}),(0,l.jsx)("div",{className:"rounded-md border",children:u?(0,l.jsx)("div",{className:"flex w-full h-[600px] justify-center items-center",children:(0,l.jsx)(P,{})}):(0,l.jsxs)(L.iA,{ref:R,className:(0,r.cn)("inline-block overflow-y-auto w-full",x),children:[(0,l.jsx)(L.xD,{className:"sticky top-0 bg-white z-10 shadow-xs",children:T.getHeaderGroups().map(e=>(0,l.jsx)(L.SC,{children:e.headers.map(e=>(0,l.jsx)(L.ss,{children:e.isPlaceholder?null:(0,_.ie)(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,l.jsx)(L.RM,{className:"relative",children:(null==(s=T.getRowModel().rows)?void 0:s.length)?T.getRowModel().rows.map(e=>(0,l.jsx)(L.SC,{"data-state":e.getIsSelected()&&"selected",children:e.getVisibleCells().map(e=>(0,l.jsx)(L.pj,{children:(0,_.ie)(e.column.columnDef.cell,e.getContext())},e.id))},e.id)):(0,l.jsx)(L.SC,{children:(0,l.jsx)(L.pj,{colSpan:null==i?void 0:i.length,className:"h-24 text-center",children:"No results."})})}),R.current&&(0,l.jsx)(B,{listenRef:R.current})]})})]})}let H=e=>{let{children:t,link:s,className:i}=e;return(0,l.jsx)("a",{target:"_blank",href:s,className:(0,r.cn)("cursor-pointer mx-1 inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 text-foreground",i),rel:"noreferrer",children:t})},Y=e=>{let{link:t,className:s}=e;return(0,l.jsx)(H,{link:t,className:(0,r.cn)(!t&&"text-gray-400 cursor-default"),children:"抖音"})},I=e=>{let{children:t,className:s,src:i}=e;return(0,l.jsx)("a",{className:(0,r.cn)("hover:underline",s),href:function(e){let t=new URLSearchParams(window.location.search);return t.set("filter",e),i&&t.set("data_type",i),`?${t.toString()}`}(t),children:t})};var Q=s(44457);let J=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.fC,{ref:t,className:(0,r.cn)("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...i})});J.displayName=Q.fC.displayName;let O=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.Ee,{ref:t,className:(0,r.cn)("aspect-square h-full w-full",s),...i})});O.displayName=Q.Ee.displayName;let U=d.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)(Q.NY,{ref:t,className:(0,r.cn)("flex h-full w-full items-center justify-center rounded-full bg-zinc-100 dark:bg-zinc-800",s),...i})});U.displayName=Q.NY.displayName;let W=e=>{let{account:t}=e;return k().isEmpty(t.name)?"":(0,l.jsxs)("div",{className:"inline-flex w-fit justify-center items-center ",children:[(0,l.jsxs)(J,{className:"w-8 h-8",children:[(0,l.jsx)(O,{src:t.user_cover}),(0,l.jsx)(U,{children:t.sid})]}),(0,l.jsx)(I,{className:"ml-2",src:"video_sniffing",children:t.name?t.name:""})," ",(0,l.jsx)(Y,{link:t.user_visit_url})]})};var q=s(52099),G=s(84025),X=s.n(G);let ee=e=>{let{src:t,className:s}=e;return(0,l.jsxs)(Z.J2,{children:[(0,l.jsxs)(Z.xo,{children:[" ",(0,l.jsx)("img",{className:(0,r.cn)(s),src:t,alt:"Video Cover"})]}),(0,l.jsx)(Z.yk,{side:"top",children:(0,l.jsx)("img",{src:t,alt:"Video Cover"})})]})},et=e=>{let{children:t,link:s,className:i}=e;return(0,l.jsx)("a",{title:t,target:"_blank",className:(0,r.cn)("cursor-pointer hover:underline hover:text-blue-600 truncate max-w-[350px] ",i),href:s,rel:"noreferrer",children:t})};var es=s(11068);let el=e=>{let{info:t}=e;return(0,l.jsxs)("div",{className:"inline-flex flex-row w-[300px] overflow-hidden",children:[(0,l.jsx)("div",{children:(0,l.jsx)(ee,{src:t.cover_url,className:" min-w-[50px] h-[80px] object-cover"})}),(0,l.jsxs)("div",{className:"flex flex-col ml-2 w-full justify-center py-1 ",children:[(0,l.jsxs)("div",{className:"truncate",title:t.title,children:[(0,l.jsx)(K.z,{size:"2",variant:"ghost",onClick:async()=>{let e=(await (0,es.DQ)({task_type:"download_video",download_video_link_platform:"douyin",download_video_link:t.visit_link})).workflow_id;window.open(`https://task.8600800.com/runs/${e}`,"_blank")},children:(0,l.jsx)(S.Z,{className:"mx-2",size:1})}),(0,l.jsx)(Y,{link:t.visit_link}),t.title?t.title:"无标题"]}),(0,l.jsxs)("div",{className:"text-sm text-gray-600 truncate ",title:t.tag,children:[" ",t.tag?t.tag:"无标签"]}),(0,l.jsxs)("span",{className:"text-[10px] ",children:["发布时间:"," ",(0,l.jsx)(et,{link:t.visit_link,children:(0,r.eF)({current:t.video_create_time,format:"YYYY-MM-DD HH:mm:ss"})})]}),(0,l.jsxs)("span",{className:"text-[10px] ",title:`update_time: ${t.update_time}`,children:["爬取时间: ",function(){if(!t.update_time)return"update_time 获取异常";let e=X()().diff(X()(t.update_time),"milliseconds"),s=X().duration(e);return 0!=s.days()?`${s.days()} 天前`:0!=s.hours()?`${s.hours()} 小时 ${s.minutes()} 分钟前`:0!=s.minutes()?`${s.minutes()} 分钟前`:"时间差值计算异常"}()]})]})]})};var ei=s(3956),er=s(81553),en=s(50087);let ea=e=>{let{column:t,children:s,tooltip:i}=e,r=t.getIsSorted();function n(){return(0,l.jsxs)(K.z,{variant:"ghost",onClick:()=>{!1===r?t.toggleSorting(!0):"desc"===r?t.toggleSorting(!1):t.toggleSorting(!0)},children:[s,!1===r&&(0,l.jsx)(ei.Z,{}),"desc"===r&&(0,l.jsx)(er.Z,{className:"text-[#FF9000]"}),"asc"===r&&(0,l.jsx)(en.Z,{className:"text-[#FF9000]"})]})}return i?(0,l.jsx)(q.u,{content:i,children:n()}):n()},ec=[{csvTitle:"账号名称",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"账号名称"})},accessorKey:"name",cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(W,{account:s})}},{csvTitle:"新增发布",accessorKey:"new_video_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增发布"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,l.jsx)("div",{children:" 开始时间: "}),(0,l.jsx)("div",{children:s.new_video_start_time}),(0,l.jsx)("div",{children:" 结束时间: "}),(0,l.jsx)("div",{children:s.new_video_end_time})]}),children:(0,l.jsxs)("div",{className:"text-[#FF9000]",children:[" ",s.new_video_count]})})}},{csvTitle:"新增点赞",accessorKey:"incr_digg_counts",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增点赞"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,l.jsx)("div",{children:" 开始时间:"}),(0,l.jsx)("div",{children:s.new_video_start_time}),(0,l.jsx)("div",{children:" 结束时间:"}),(0,l.jsx)("div",{children:s.new_video_end_time})]}),children:(0,l.jsxs)("div",{className:"text-[#FF9000]",children:[" ",s.incr_digg_counts]})})}},{csvTitle:"新增粉丝",accessorKey:"incr_follower_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"新增粉丝"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(q.u,{tooltipContentClassName:"max-w-100",content:(0,l.jsxs)("div",{className:"grid grid-cols-3 gap-1",children:[(0,l.jsx)("div",{children:" 最近日期: "}),(0,l.jsx)("div",{children:s.old_update_time}),(0,l.jsxs)("div",{children:["最近值: ",s.old_follower_count]}),(0,l.jsx)("div",{children:" 最新抓取时间: "}),(0,l.jsx)("div",{children:s.update_time}),(0,l.jsxs)("div",{children:["最新值: ",s.follower_count]})]}),children:(0,l.jsx)("div",{className:"text-[#FF9000]",children:s.incr_follower_count})})}},{csvTitle:"粉丝",accessorKey:"collect_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"粉丝"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.collect_count,2)})}},{csvTitle:"获赞",accessorKey:"digg_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"获赞"})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.digg_count,2)})}},{csvTitle:"评论",accessorKey:"comment_counts",header:e=>{let{column:t}=e;return(0,l.jsx)(q.u,{content:"快照数据求和 comment求和",children:(0,l.jsx)(ea,{column:t,children:"总评论"})})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.comment_counts,2)})}},{csvTitle:"分享",accessorKey:"share_counts",header:e=>{let{column:t}=e;return(0,l.jsxs)(q.u,{content:"快照数据求和 share_count 求和",children:[" ",(0,l.jsx)(ea,{column:t,children:"总分享"})]})},cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(s.share_counts,2)})}},{csvTitle:"最近一次发布视频时间",accessorKey:"create_time",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"最近一次发布视频"})},sortingFn:(e,t)=>e.original.video_create_time<t.original.video_create_time?-1:1,cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{className:"flex flex-row w-full",children:(0,l.jsx)(el,{info:s})})}}],eo=e=>{let{cell:t,dataKey:s}=e,i=t.original;return(0,l.jsx)("div",{children:(0,r.Zv)(i[s],2)})},ed=[{csvTitle:"账号名称",accessorKey:"name",header:"账号名称",cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)(W,{account:s})}},{csvTitle:"视频时间",accessorKey:"create_time",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"视频信息"})},sortingFn:(e,t)=>X()(e.original.create_time)>X()(t.original.create_time)?1:-1,cell:e=>{let{row:t}=e,s=t.original;return(0,l.jsx)("div",{className:"flex flex-row min-w-[400px] ",children:(0,l.jsx)(el,{info:{title:s.desc,tag:s.tag,visit_link:s.link,cover_url:s.cover,video_create_time:s.create_time,update_time:s.update_time}})})}},{csvTitle:"点赞",accessorKey:"digg_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"点赞"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"digg_count"})}},{csvTitle:"评论",accessorKey:"comment_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"评论"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"comment_count"})}},{csvTitle:"收藏",accessorKey:"collect_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"收藏"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"collect_count"})}},{csvTitle:"分享",accessorKey:"share_count",header:e=>{let{column:t}=e;return(0,l.jsx)(ea,{column:t,children:"分享"})},cell:e=>{let{row:t}=e;return(0,l.jsx)(eo,{cell:t,dataKey:"share_count"})}}];var eu=s(57972);let em="yyyy-MM-D";var ex=s(76497),eh=s(7132),ef=s(35731);let ej=e=>{let{defaultValue:t="365",callback:s}=e,i="yyyy-MM-D";return(0,l.jsxs)(eu.Ph,{defaultValue:t,onValueChange:async e=>{let t,l;4==e?(t=(0,r.eF)({offset:3,format:i}),l=(0,r.eF)({format:i})):7==e?(t=(0,r.eF)({offset:7,format:i}),l=(0,r.eF)({format:i})):15==e?(t=(0,r.eF)({offset:15,format:i}),l=(0,r.eF)({format:i})):365==e?(t=(0,r.eF)({offset:365,format:i}),l=(0,r.eF)({format:i})):(t=(0,r.eF)({offset:e,format:i}),l=(0,r.eF)({offset:e,format:i})),await s(t,l,e)},children:[(0,l.jsx)(eu.i4,{className:"w-[180px]",children:(0,l.jsx)(eu.ki,{})}),(0,l.jsxs)(eu.Bw,{children:[(0,l.jsx)(eu.Ql,{value:"365",children:"全部时间"}),(0,l.jsx)(eu.Ql,{value:"1",children:"昨天"}),(0,l.jsx)(eu.Ql,{value:"2",children:"前天"}),(0,l.jsx)(eu.Ql,{value:"3",children:"大前天"}),(0,l.jsx)(eu.Ql,{value:"4",children:"3天内"}),(0,l.jsx)(eu.Ql,{value:"7",children:"7天内"}),(0,l.jsx)(eu.Ql,{value:"15",children:"15天内"})]})]})},eg=()=>{let[e,t]=(0,d.useState)([]),[s,i]=(0,d.useState)(!0),[c,o]=(0,d.useState)(!1),[u,m]=(0,d.useState)("account_sniffing"),x=(0,eh.T)();return(0,ex.Z)(async()=>{let e=x.search.data_type;e=e||"account_sniffing",o(!0);try{let s;"account_sniffing"===e?s=await n((0,r.eF)({offset:3,format:em}),(0,r.eF)({format:em})):"video_sniffing"===e?s=await a((0,r.eF)({offset:3,format:em}),(0,r.eF)({format:em})):"account_add_sniffing"===e&&(s=[]),t(s),m(e)}finally{o(!1)}},[]),(0,l.jsxs)("div",{className:"w-fit",children:[(0,l.jsx)(v,{links:w,data_type:u,children:(0,l.jsx)(K.z,{className:"h-[20px]",size:"sm",onClick:()=>{window.open("http://122.9.155.28:7100/swfitcast_admin/account-login-info/list","_blank")},children:"添加监控账号"})}),(0,l.jsxs)(ef.Z,{spinning:c,children:["account_sniffing"===u&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"px-4",children:(0,l.jsx)("div",{className:"flex flex-col w-full",children:(0,l.jsx)("div",{className:"flex w-full",children:(0,l.jsx)(E,{height:"max-h-[calc(100vh-180px)]",columns:ec.filter(e=>s||!s&&!["incr_digg_counts","incr_follower_counts"].includes(e.accessorKey)),data:e,init:{pageSize:100,defaultSortColumn:"incr_digg_counts"},filter:{placement:"账号名称",accessorKey:"name"},assistTools:[(0,l.jsx)(ej,{defaultValue:"4",callback:async(e,s,l)=>{o(!0),t(await n(e,s)),i(365!=l),o(!1)}})]})})})})}),"video_sniffing"===u&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"inline-flex w-full items-center justify-center",children:(0,l.jsx)(E,{height:"max-h-[calc(100vh-180px)]",columns:ed.filter(e=>s||!s&&!["incr_video_count","incr_digg_count"].includes(e.accessorKey)),data:e,filter:{placement:" 账号名称",accessorKey:"name"},init:{pageIndex:0,pageSize:100,columnVisibility:{},defaultSortColumn:"digg_count"},assistTools:[(0,l.jsx)(ej,{defaultValue:"4",callback:async(e,s)=>{o(!0),t(await a(e,s)),o(!1)}})]})})})]})]})}},85737:function(e,t,s){s.d(t,{J2:()=>a,xo:()=>c,yk:()=>o});var l=s(31549),i=s(82937),r=s(8491),n=s(71553);let a=i.fC,c=i.xz;i.ee;let o=r.forwardRef((e,t)=>{let{className:s,align:r="center",sideOffset:a=4,...c}=e;return(0,l.jsx)(i.h_,{children:(0,l.jsx)(i.VY,{ref:t,align:r,sideOffset:a,className:(0,n.cn)("z-50 w-72 rounded-md border border-zinc-200 bg-white p-2 text-zinc-950 shadow-md outline-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-zinc-800 dark:bg-zinc-950 dark:text-zinc-50",s),...c})})});o.displayName=i.VY.displayName},94502:function(e,t,s){s.d(t,{g:()=>n});var l=s(31549),i=s(8491),r=s(71553);let n=i.forwardRef((e,t)=>{let{className:s,...i}=e;return(0,l.jsx)("textarea",{className:(0,r.cn)("flex min-h-[60px] w-full rounded-md border border-zinc-200 bg-transparent px-3 py-2 text-base shadow-xs placeholder:text-zinc-500 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-zinc-800 dark:placeholder:text-zinc-400 dark:focus-visible:ring-zinc-300",s),ref:t,...i})});n.displayName="Textarea"},65005:function(e,t,s){s.d(t,{_v:()=>d,aJ:()=>o,pn:()=>a,u:()=>c});var l=s(31549),i=s(7094),r=s(8491),n=s(71553);let a=i.zt,c=i.fC,o=i.xz,d=r.forwardRef((e,t)=>{let{className:s,sideOffset:r=4,...a}=e;return(0,l.jsx)(i.h_,{children:(0,l.jsx)(i.VY,{ref:t,sideOffset:r,className:(0,n.cn)("z-50 overflow-hidden rounded-md bg-zinc-900 px-3 py-1.5 text-xs text-zinc-50 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:bg-zinc-50 dark:text-zinc-900",s),...a})})});d.displayName=i.VY.displayName}}]);
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["525"],{85079:function(e,s,t){t.d(s,{z:()=>i});var a=t(31549),n=t(25613),r=t(71553);let i=e=>{let{className:s}=e;return(0,a.jsx)("div",{className:(0,r.cn)("bg-[#EFF2F9] rounded-lg m-2 inline-flex items-center justify-center",s),children:(0,a.jsx)(n.Z,{className:"text-gray-400"})})}},19813:function(e,s,t){t.d(s,{Z:()=>Q});var a=t(31549),n=t(36423),r=t(99523),i=t(8491),l=t(29055),c=t(56896),d=t(30157),o=t(43346),h=t(23560),m=t(59693),x=t(40718),u=t(30929),j=t(23942),p=t(93585),f=t(53589),v=t(57282),y=t(93330);async function N(e){try{return await f.hi.get(`/studio_manager/generate-share-link/${e}`)}catch(e){console.error("该项目共享链接生成失败:",e),(0,p.S3)("共享链接生成失败")}}async function g(e){try{let s=new URL(e).pathname.split("/").pop();return await f.hi.get(`/studio_manager/share-content/${s}`)}catch(e){console.error("使用共享链接失败:",e),(0,p.S3)("共享链接使用失败")}}function _(e){let{projectId:s,disabled:t=!1}=e,[n,r]=(0,i.useState)(!1),[l,c]=(0,i.useState)(""),[f,_]=(0,i.useState)(""),[w,b]=(0,i.useState)(!1),[S,C]=(0,i.useState)(!1),[k,z]=(0,i.useState)(!1),{t:$}=(0,y.$)();(0,i.useEffect)(()=>{let e=!0;return n&&(b(!0),(async()=>{try{let t=await N(s);e&&t&&(c(t),z(!1))}catch(e){console.error("获取分享链接失败:",e)}finally{e&&b(!1)}})()),()=>{e=!1}},[n]);let Z=async()=>{try{await navigator.clipboard.writeText(l),z(!0),(0,p.x9)("分享链接已复制到剪贴板")}catch(e){console.error(`复制失败 ${e}`),(0,p.S3)("复制失败,请手动复制")}},R=async()=>{if(!f.trim())return void(0,p.L$)("请输入共享链接");try{C(!0);let e=await g(f);e.used_flag?(_(""),(0,p.x9)("共享链接使用成功,Team 已在新窗口打开"),r(!1),window.open(`/?${e}`,"_blank")):(0,p.L$)("你已经在这个 Team 中了")}catch(e){console.error(`共享链接使用失败 ${e}`),(0,p.S3)("使用共享链接失败")}finally{C(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(d.z,{variant:"outline",size:"default",onClick:()=>{r(!0),c(""),z(!1)},disabled:t,children:[(0,a.jsx)(o.Z,{className:"mr-2 h-4 w-4"}),$("home.share.title")]}),(0,a.jsx)(u.Vq,{open:n,onOpenChange:e=>r(e),children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-md",children:[(0,a.jsx)(u.fK,{children:(0,a.jsxs)(u.$N,{children:[" ",$("home.share.title")]})}),(0,a.jsxs)("div",{className:"space-y-4 mb-6",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium",children:[" ",$("home.share.link")]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(j.I,{value:l,readOnly:!0,placeholder:"点击生成按钮获取共享链接",className:"flex-1"}),(0,a.jsxs)(d.z,{size:"sm",onClick:Z,variant:"secondary",children:[k?(0,a.jsx)(h.Z,{className:"h-4 w-4 mr-2"}):(0,a.jsx)(m.Z,{className:"h-4 w-4 mr-2"}),$(k?"home.share.copied":"home.share.copy")]})]})]}),(0,a.jsx)(v.Z,{}),(0,a.jsxs)("div",{className:"space-y-4 mt-6",children:[(0,a.jsxs)("h3",{className:"text-sm font-medium",children:[" ",$("home.share.use_share_link_content")]}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(j.I,{value:f,onChange:e=>_(e.target.value),placeholder:"粘贴共享链接",className:"flex-1"}),(0,a.jsxs)(d.z,{size:"sm",onClick:R,disabled:S||!f.trim(),variant:"secondary",children:[(0,a.jsx)(x.Z,{className:"h-4 w-4 mr-2"}),S?"处理中...":"共享"]})]})]})]})})]})}var w=t(17511),b=t(46041),S=t(7132),C=t(94455),k=t(76497),z=t(79530),$=t(78271),Z=t(57077),R=t(12786),F=t(35731),O=t(57972),E=t(75953),q=t(85079);function A(e){let{isOpen:s,onClose:t,onConfirm:n,projectName:r}=e;return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"确认克隆"}),(0,a.jsxs)(u.Be,{children:['你确定要克隆项目 "',r,'" 吗?']})]}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"outline",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",variant:"default",onClick:n,children:"克隆"})]})]})})}var T=t(53701);function I(e){let{isOpen:s,onClose:t,onConfirm:n,projectName:r}=e;return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"确认删除"}),(0,a.jsxs)(u.Be,{children:['你确定要删除项目 "',r,'" 吗?此操作不可逆。']})]}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"secondary",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",variant:"destructive",onClick:n,children:"删除"})]})]})})}var D=t(66264);function K(e){let{isOpen:s,onClose:t,onRename:n,currentName:r}=e,[l,c]=(0,i.useState)(r);return(0,a.jsx)(u.Vq,{open:s,onOpenChange:t,children:(0,a.jsxs)(u.cZ,{className:"sm:max-w-[425px]",children:[(0,a.jsxs)(u.fK,{children:[(0,a.jsx)(u.$N,{children:"重命名项目"}),(0,a.jsx)(u.Be,{children:"输入新的项目名称"})]}),(0,a.jsx)("div",{className:"grid gap-4 py-4",children:(0,a.jsxs)("div",{className:"grid grid-cols-4 items-center gap-4",children:[(0,a.jsx)(D._,{htmlFor:"name",className:"text-right",children:"名称"}),(0,a.jsx)(j.I,{id:"name",value:l,onChange:e=>c(e.target.value),className:"col-span-3"})]})}),(0,a.jsxs)(u.cN,{children:[(0,a.jsx)(d.z,{type:"button",variant:"secondary",onClick:t,children:"取消"}),(0,a.jsx)(d.z,{type:"button",onClick:()=>{n(l),t()},children:"确认"})]})]})})}function V(e){let{project:s,onRename:t,onClone:n,onDelete:r}=e,[l,c]=(0,i.useState)(!1),[o,h]=(0,i.useState)(!1),[m,x]=(0,i.useState)(!1),u=(0,C.s)({from:"/"}),{t:j}=(0,y.$)();return(0,a.jsxs)("div",{children:[(0,a.jsx)(T.Zb,{className:"hover:shadow-lg hover:cursor-pointer p-4",onClick:()=>{u({to:"/editor?project="+s.short_url_id})},children:(0,a.jsx)("div",{className:"aspect-video relative overflow-hidden rounded-md",children:(0,a.jsx)(q.z,{className:"w-full h-full m-0"})})}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between space-y-0 pb-2 pt-4",children:[(0,a.jsx)("h3",{className:"font-medium text-xl text-gray-600 truncate w-[70%]",children:s.title}),(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsxs)(d.z,{variant:"ghost",size:"icon",className:"h-8 w-8 p-0",children:[(0,a.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,a.jsx)(E.Z,{})]})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsx)(w.Xi,{onSelect:()=>c(!0),children:j("home.project.rename")}),(0,a.jsx)(w.Xi,{onSelect:()=>h(!0),children:j("home.project.clone")}),(0,a.jsx)(w.Xi,{onSelect:()=>x(!0),className:"text-red-600",children:j("home.project.delete")})]})]})]}),(0,a.jsx)("div",{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:(0,a.jsxs)("span",{className:"text-sm",children:[" ",s.createdAt]})}),(0,a.jsx)(K,{isOpen:l,onClose:()=>c(!1),onRename:e=>t(s.short_url_id,e),currentName:s.title}),(0,a.jsx)(A,{isOpen:o,onClose:()=>h(!1),onConfirm:()=>{n(s.short_url_id),h(!1)},projectName:s.title}),(0,a.jsx)(I,{isOpen:m,onClose:()=>x(!1),onConfirm:()=>{console.info(555,s),r(s.short_url_id)},projectName:s.title})]})}function X(e){let{teamId:s}=e,{t}=(0,y.$)(),n=(0,R.D)({mutationFn:async e=>await c.R.POST("/studio_manager/projects/",{body:{name:"工作流"+(0,$.Vj)(),create_at:(0,$.Ux)(),update_at:(0,$.Ux)(),team_id:e}}),onSuccess:async e=>{window.open(`/editor?project=${e.data.data.short_url_id}`,"_blank")}});return(0,a.jsx)("div",{children:(0,a.jsx)(d.z,{disabled:-1==s,onClick:()=>{n.mutate(s)},children:t("home.create_project")})})}var L=t(44153);function P(e){let{projects:s,onRename:t,onDelete:n}=e,[r,l]=(0,i.useState)(null),[c,o]=(0,i.useState)(!1),[h,m]=(0,i.useState)(!1),x=(e,s)=>{t(e,s),l(null),o(!1)},u=e=>{n(e),l(null),m(!1)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"rounded-md border",children:(0,a.jsxs)(L.iA,{children:[(0,a.jsx)(L.xD,{children:(0,a.jsxs)(L.SC,{children:[(0,a.jsx)(L.ss,{className:"w-[100px]",children:"缩略图"}),(0,a.jsx)(L.ss,{children:"项目名称"}),(0,a.jsx)(L.ss,{children:"创建时间"}),(0,a.jsx)(L.ss,{className:"w-[100px]",children:"操作"})]})}),(0,a.jsx)(L.RM,{children:s.map(e=>(0,a.jsxs)(L.SC,{children:[(0,a.jsx)(L.pj,{children:(0,a.jsx)("div",{className:"relative w-16 h-16 rounded-md overflow-hidden",children:(0,a.jsx)("img",{src:e.thumbnail||"/placeholder.svg",alt:e.title,className:"object-cover"})})}),(0,a.jsx)(L.pj,{className:"font-medium",children:e.title}),(0,a.jsx)(L.pj,{children:e.createdAt}),(0,a.jsx)(L.pj,{children:(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsxs)(d.z,{variant:"ghost",className:"h-8 w-8 p-0",children:[(0,a.jsx)("span",{className:"sr-only",children:"Open menu"}),(0,a.jsx)(E.Z,{className:"h-4 w-4"})]})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsx)(w.Xi,{onSelect:()=>{l(e),o(!0)},children:"重命名"}),(0,a.jsx)(w.Xi,{onSelect:()=>{l(e),m(!0)},className:"text-red-600",children:"删除"})]})]})})]},e.id))})]})}),r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(K,{isOpen:c,onClose:()=>{o(!1),l(null)},onRename:e=>x(r.short_url_id,e),currentName:r.title}),(0,a.jsx)(I,{isOpen:h,onClose:()=>{m(!1),l(null)},onConfirm:()=>u(r.id),projectName:r.title})]})]})}function Q(){let[e,s]=(0,i.useState)("grid"),t=(0,S.T)(),[o,h]=function(e,s){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(0,b.t)();let a=(0,S.T)(),n=(0,C.s)(),[r,l]=(0,i.useState)(s);return(0,i.useEffect)(()=>{let n=a.search[e];n?t.validate?t.validate(n)&&l(n):l(n):l(s)},[a,e,s,t.validate]),[r,s=>{l(s);let r=new URLSearchParams(a.searchStr);r.set(e,s),t.replace,n({to:`?${r.toString()}`})}]}("teamId","-1"),{t:m}=(0,y.$)(),{isPending:x,error:u,data:j}=(0,Z.a)({queryKey:["teams"],queryFn:async()=>{let e=await c.R.GET("/studio_manager/teams/",{params:{query:{user_id:(0,l.rc)()}}}),s=await c.R.GET("/studio_manager/projects/",{params:{query:{user_id:(0,l.rc)()}}});return(0,$.yV)({teams:[],projects:[]},e,s)}});(0,k.Z)(async()=>{j&&"-1"===o&&!t.search.teamId&&h(j.teams.find(e=>e.name.startsWith("我的")).short_url_id)},[j]);let p=(0,R.D)({mutationFn:async e=>await c.R.DELETE("/studio_manager/projects/{project_id}/",{params:{path:{project_id:e}}}),onSuccess:e=>z.E.invalidateQueries({queryKey:["teams"]})}),f=(0,R.D)({mutationFn:async e=>await c.R.POST("/studio_manager/projects/clone/",{body:{project_id:e}}),onSuccess:async e=>{console.info(444,e),window.open(`/editor?project=${e.data.data.short_url_id}`,"_blank")}}),v=(0,R.D)({mutationKey:["update_project_name"],mutationFn:async e=>await c.R.PUT("/studio_manager/projects/{project_id}/",{params:{path:{project_id:e.project_id}},body:{name:e.name}}),onSuccess:e=>z.E.invalidateQueries({queryKey:["teams"]})}),N=(e,s)=>{v.mutate({project_id:e,name:s})},g=e=>{f.mutate(e)},E=e=>{p.mutate(e)},q=null==j?void 0:j.teams.find(e=>e.short_url_id===o),A=null==j?void 0:j.projects.map(e=>({id:e.id,short_url_id:e.short_url_id,team_id:e.team_id,title:e.name,thumbnail:"",createdAt:e.update_at})).filter(e=>"-1"!==o&&String(e.team_id)===String(null==q?void 0:q.id));return(0,a.jsx)(F.Z,{spinning:x,children:(0,a.jsx)("div",{className:"w-full h-full flex-1 flex-col space-y-8 p-8 flex ",children:(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-end space-x-2",children:(0,a.jsx)("h2",{className:"text-xl font-semibold",children:m("home.title")})}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsxs)(w.h_,{children:[(0,a.jsx)(w.$F,{asChild:!0,children:(0,a.jsx)(d.z,{size:"icon",variant:"outline",children:"grid"===e?(0,a.jsx)(n.Z,{className:"h-4 w-4"}):(0,a.jsx)(r.Z,{className:"h-4 w-4"})})}),(0,a.jsxs)(w.AW,{align:"end",children:[(0,a.jsxs)(w.Xi,{onClick:()=>s("grid"),children:[(0,a.jsx)(n.Z,{className:"mr-2 h-4 w-4"})," Grid view"]}),(0,a.jsxs)(w.Xi,{onClick:()=>s("list"),children:[(0,a.jsx)(r.Z,{className:"mr-2 h-4 w-4"})," List view"]})]})]}),(0,a.jsx)(_,{projectId:o}),(0,a.jsxs)(O.Ph,{value:o,onValueChange:e=>{z.E.invalidateQueries({queryKey:["teams"]}),h(e)},children:[(0,a.jsx)(O.i4,{className:"w-[180px]",children:(0,a.jsx)(O.ki,{placeholder:"Select a fruit"})}),(0,a.jsx)(O.Bw,{children:(0,a.jsx)(O.DI,{children:null==j?void 0:j.teams.map((e,s)=>(0,a.jsx)(O.Ql,{value:String(e.short_url_id),children:e.name},e.short_url_id))})})]}),(0,a.jsx)(X,{teamId:o})]})]}),"grid"===e?(0,a.jsx)("div",{className:"grid grid-cols-5 gap-14",children:null==A?void 0:A.map(e=>(0,a.jsx)(V,{project:e,onRename:N,onClone:g,onDelete:E},e.id))}):(0,a.jsx)(P,{projects:A,onRename:N,onDelete:E})]})})})}},23942:function(e,s,t){t.d(s,{I:()=>i});var a=t(31549),n=t(8491),r=t(71553);let i=n.forwardRef((e,s)=>{let{className:t,type:n,...i}=e;return(0,a.jsx)("input",{type:n,className:(0,r.cn)("flex h-9 w-full rounded-md border border-zinc-200 bg-transparent px-3 py-1 text-base shadow-xs transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-zinc-950 placeholder:text-zinc-500 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-zinc-950 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:border-zinc-800 dark:file:text-zinc-50 dark:placeholder:text-zinc-400 dark:focus-visible:ring-zinc-300",t),ref:s,...i})});i.displayName="Input"},66264:function(e,s,t){t.d(s,{_:()=>d});var a=t(31549),n=t(60891),r=t(68621),i=t(8491),l=t(71553);let c=(0,r.j)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=i.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)(n.f,{ref:s,className:(0,l.cn)(c(),t),...r})});d.displayName=n.f.displayName},93330:function(e,s,t){t.d(s,{$:()=>n});var a=t(91299);function n(){let{language:e,setLanguage:s,languages:t,dictionary:n}=(0,a.Qg)();return{t:(e,s)=>{let t=(Array.isArray(e)?e:e.split(".")).reduce((e,s)=>null==e?void 0:e[s],n);return t?(s&&"string"==typeof t&&Object.entries(s).forEach(e=>{let[s,a]=e;t=t.replace(RegExp(`{{${s}}}`,"g"),a)}),t):Array.isArray(e)?e[e.length-1]:e.split(".").pop()||e},language:e,setLanguage:s,languages:t}}}}]);
|
@@ -0,0 +1,2 @@
|
|
1
|
+
/*! For license information please see 682.f9ec3784.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["682"],{53032:function(e,t){var r=Symbol.for("react.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),i=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.iterator,d={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,_={};function m(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}function b(){}function v(e,t,r){this.props=e,this.context=t,this.refs=_,this.updater=r||d}m.prototype.isReactComponent={},m.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): 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")},m.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=m.prototype;var S=v.prototype=new b;S.constructor=v,h(S,m.prototype),S.isPureReactComponent=!0;var k=Array.isArray,w=Object.prototype.hasOwnProperty,E={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function R(e,t,n){var o,u={},a=null,c=null;if(null!=t)for(o in void 0!==t.ref&&(c=t.ref),void 0!==t.key&&(a=""+t.key),t)w.call(t,o)&&!$.hasOwnProperty(o)&&(u[o]=t[o]);var i=arguments.length-2;if(1===i)u.children=n;else if(1<i){for(var f=Array(i),s=0;s<i;s++)f[s]=arguments[s+2];u.children=f}if(e&&e.defaultProps)for(o in i=e.defaultProps)void 0===u[o]&&(u[o]=i[o]);return{$$typeof:r,type:e,key:a,ref:c,props:u,_owner:E.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var g=/\/+/g;function j(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function O(e,t,o){if(null==e)return e;var u=[],a=0;return!function e(t,o,u,a,c){var i,f,s,l=typeof t;("undefined"===l||"boolean"===l)&&(t=null);var p=!1;if(null===t)p=!0;else switch(l){case"string":case"number":p=!0;break;case"object":switch(t.$$typeof){case r:case n:p=!0}}if(p)return c=c(p=t),t=""===a?"."+j(p,0):a,k(c)?(u="",null!=t&&(u=t.replace(g,"$&/")+"/"),e(c,o,u,"",function(e){return e})):null!=c&&(C(c)&&(i=c,f=u+(!c.key||p&&p.key===c.key?"":(""+c.key).replace(g,"$&/")+"/")+t,c={$$typeof:r,type:i.type,key:f,ref:i.ref,props:i.props,_owner:i._owner}),o.push(c)),1;if(p=0,a=""===a?".":a+":",k(t))for(var d=0;d<t.length;d++){var h=a+j(l=t[d],d);p+=e(l,o,u,h,c)}else if("function"==typeof(h=null===(s=t)||"object"!=typeof s?null:"function"==typeof(s=y&&s[y]||s["@@iterator"])?s:null))for(t=h.call(t),d=0;!(l=t.next()).done;)h=a+j(l=l.value,d++),p+=e(l,o,u,h,c);else if("object"===l)throw Error("Objects are not valid as a React child (found: "+("[object Object]"===(o=String(t))?"object with keys {"+Object.keys(t).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.");return p}(e,u,"","",function(e){return t.call(o,e,a++)}),u}function x(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){(0===e._status||-1===e._status)&&(e._status=1,e._result=t)},function(t){(0===e._status||-1===e._status)&&(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var P={current:null},I={transition:null};function T(){throw Error("act(...) is not supported in production builds of React.")}t.Children={map:O,forEach:function(e,t,r){O(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return O(e,function(){t++}),t},toArray:function(e){return O(e,function(e){return e})||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=m,t.Fragment=o,t.Profiler=a,t.PureComponent=v,t.StrictMode=u,t.Suspense=s,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:I,ReactCurrentOwner:E},t.act=T,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=h({},e.props),u=e.key,a=e.ref,c=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,c=E.current),void 0!==t.key&&(u=""+t.key),e.type&&e.type.defaultProps)var i=e.type.defaultProps;for(f in t)w.call(t,f)&&!$.hasOwnProperty(f)&&(o[f]=void 0===t[f]&&void 0!==i?i[f]:t[f])}var f=arguments.length-2;if(1===f)o.children=n;else if(1<f){i=Array(f);for(var s=0;s<f;s++)i[s]=arguments[s+2];o.children=i}return{$$typeof:r,type:e.type,key:u,ref:a,props:o,_owner:c}},t.createContext=function(e){return(e={$$typeof:i,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=R,t.createFactory=function(e){var t=R.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:f,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:x}},t.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=T,t.useCallback=function(e,t){return P.current.useCallback(e,t)},t.useContext=function(e){return P.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return P.current.useDeferredValue(e)},t.useEffect=function(e,t){return P.current.useEffect(e,t)},t.useId=function(){return P.current.useId()},t.useImperativeHandle=function(e,t,r){return P.current.useImperativeHandle(e,t,r)},t.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return P.current.useMemo(e,t)},t.useReducer=function(e,t,r){return P.current.useReducer(e,t,r)},t.useRef=function(e){return P.current.useRef(e)},t.useState=function(e){return P.current.useState(e)},t.useSyncExternalStore=function(e,t,r){return P.current.useSyncExternalStore(e,t,r)},t.useTransition=function(){return P.current.useTransition()},t.version="18.3.1"},44194:function(e,t,r){e.exports=r(53032)}}]);
|
@@ -1,8 +1,8 @@
|
|
1
1
|
/**
|
2
2
|
* @license React
|
3
|
-
* react.production.js
|
3
|
+
* react.production.min.js
|
4
4
|
*
|
5
|
-
* Copyright (c)
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
6
6
|
*
|
7
7
|
* This source code is licensed under the MIT license found in the
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
@@ -0,0 +1,6 @@
|
|
1
|
+
/*! For license information please see 696.9e1d8d18.js.LICENSE.txt */
|
2
|
+
"use strict";(self.webpackChunkremote=self.webpackChunkremote||[]).push([["696"],{59693:function(e,t,r){r.d(t,{Z:()=>s});let s=(0,r(98195).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},40718:function(e,t,r){r.d(t,{Z:()=>s});let s=(0,r(98195).Z)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},25613:function(e,t,r){r.d(t,{Z:()=>s});let s=(0,r(98195).Z)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},99523:function(e,t,r){r.d(t,{Z:()=>s});let s=(0,r(98195).Z)("list",[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]])},85076:function(e,t,r){r.d(t,{Dx:()=>es,VY:()=>er,aV:()=>et,dk:()=>ei,fC:()=>G,h_:()=>ee,x8:()=>en,xz:()=>J});var s=r(8491),i=r(71115),n=r(88905),a=r(76418),o=r(1563),u=r(44160),l=r(90367),c=r(57984),h=r(64429),d=r(36387),p=r(76207),f=r(49319),y=r(47319),R=r(50726),m=r(40349),v=r(31549),b="Dialog",[g,O]=(0,a.b)(b),[I,C]=g(b),x=e=>{let{__scopeDialog:t,children:r,open:i,defaultOpen:n,onOpenChange:a,modal:l=!0}=e,c=s.useRef(null),h=s.useRef(null),[d,p]=(0,u.T)({prop:i,defaultProp:n??!1,onChange:a,caller:b});return(0,v.jsx)(I,{scope:t,triggerRef:c,contentRef:h,contentId:(0,o.M)(),titleId:(0,o.M)(),descriptionId:(0,o.M)(),open:d,onOpenChange:p,onOpenToggle:s.useCallback(()=>p(e=>!e),[p]),modal:l,children:r})};x.displayName=b;var Q="DialogTrigger",M=s.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,a=C(Q,r),o=(0,n.e)(t,a.triggerRef);return(0,v.jsx)(p.WV.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":K(a.open),...s,ref:o,onClick:(0,i.M)(e.onClick,a.onOpenToggle)})});M.displayName=Q;var D="DialogPortal",[k,w]=g(D,{forceMount:void 0}),S=e=>{let{__scopeDialog:t,forceMount:r,children:i,container:n}=e,a=C(D,t);return(0,v.jsx)(k,{scope:t,forceMount:r,children:s.Children.map(i,e=>(0,v.jsx)(d.z,{present:r||a.open,children:(0,v.jsx)(h.h,{asChild:!0,container:n,children:e})}))})};S.displayName=D;var E="DialogOverlay",T=s.forwardRef((e,t)=>{let r=w(E,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,n=C(E,e.__scopeDialog);return n.modal?(0,v.jsx)(d.z,{present:s||n.open,children:(0,v.jsx)(F,{...i,ref:t})}):null});T.displayName=E;var j=(0,m.Z8)("DialogOverlay.RemoveScroll"),F=s.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(E,r);return(0,v.jsx)(y.Z,{as:j,allowPinchZoom:!0,shards:[i.contentRef],children:(0,v.jsx)(p.WV.div,{"data-state":K(i.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),N="DialogContent",_=s.forwardRef((e,t)=>{let r=w(N,e.__scopeDialog),{forceMount:s=r.forceMount,...i}=e,n=C(N,e.__scopeDialog);return(0,v.jsx)(d.z,{present:s||n.open,children:n.modal?(0,v.jsx)(P,{...i,ref:t}):(0,v.jsx)(U,{...i,ref:t})})});_.displayName=N;var P=s.forwardRef((e,t)=>{let r=C(N,e.__scopeDialog),a=s.useRef(null),o=(0,n.e)(t,r.contentRef,a);return s.useEffect(()=>{let e=a.current;if(e)return(0,R.Ry)(e)},[]),(0,v.jsx)(V,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,i.M)(e.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:(0,i.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()}),onFocusOutside:(0,i.M)(e.onFocusOutside,e=>e.preventDefault())})}),U=s.forwardRef((e,t)=>{let r=C(N,e.__scopeDialog),i=s.useRef(!1),n=s.useRef(!1);return(0,v.jsx)(V,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(i.current||r.triggerRef.current?.focus(),t.preventDefault()),i.current=!1,n.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(n.current=!0));let s=t.target;r.triggerRef.current?.contains(s)&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&n.current&&t.preventDefault()}})}),V=s.forwardRef((e,t)=>{let{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,...u}=e,h=C(N,r),d=s.useRef(null),p=(0,n.e)(t,d);return(0,f.EW)(),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(c.M,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:o,children:(0,v.jsx)(l.XB,{role:"dialog",id:h.contentId,"aria-describedby":h.descriptionId,"aria-labelledby":h.titleId,"data-state":K(h.open),...u,ref:p,onDismiss:()=>h.onOpenChange(!1)})}),(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Y,{titleId:h.titleId}),(0,v.jsx)(X,{contentRef:d,descriptionId:h.descriptionId})]})]})}),L="DialogTitle",W=s.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(L,r);return(0,v.jsx)(p.WV.h2,{id:i.titleId,...s,ref:t})});W.displayName=L;var Z="DialogDescription",q=s.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,i=C(Z,r);return(0,v.jsx)(p.WV.p,{id:i.descriptionId,...s,ref:t})});q.displayName=Z;var z="DialogClose",A=s.forwardRef((e,t)=>{let{__scopeDialog:r,...s}=e,n=C(z,r);return(0,v.jsx)(p.WV.button,{type:"button",...s,ref:t,onClick:(0,i.M)(e.onClick,()=>n.onOpenChange(!1))})});function K(e){return e?"open":"closed"}A.displayName=z;var H="DialogTitleWarning",[B,$]=(0,a.k)(H,{contentName:N,titleName:L,docsSlug:"dialog"}),Y=({titleId:e})=>{let t=$(H),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
3
|
+
|
4
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
5
|
+
|
6
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return s.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},X=({contentRef:e,descriptionId:t})=>{let r=$("DialogDescriptionWarning"),i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${r.contentName}}.`;return s.useEffect(()=>{let r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(i))},[i,e,t]),null},G=x,J=M,ee=S,et=T,er=_,es=W,ei=q,en=A},60891:function(e,t,r){r.d(t,{f:()=>o});var s=r(8491),i=r(76207),n=r(31549),a=s.forwardRef((e,t)=>(0,n.jsx)(i.WV.label,{...e,ref:t,onMouseDown:t=>{t.target.closest("button, input, select, textarea")||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));a.displayName="Label";var o=a},12786:function(e,t,r){r.d(t,{D:()=>h});var s=r(8491),i=r(86482),n=r(88730),a=r(22838),o=r(76269),u=class extends a.l{#e;#t=void 0;#r;#s;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.VS)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.Ym)(t.mutationKey)!==(0,o.Ym)(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#n(e)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#i(),this.#n()}mutate(e,t){return this.#s=t,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(e)}#i(){let e=this.#r?.state??(0,i.R)();this.#t={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#n(e){n.Vr.batch(()=>{if(this.#s&&this.hasListeners()){let t=this.#t.variables,r=this.#t.context;e?.type==="success"?(this.#s.onSuccess?.(e.data,t,r),this.#s.onSettled?.(e.data,null,t,r)):e?.type==="error"&&(this.#s.onError?.(e.error,t,r),this.#s.onSettled?.(void 0,e.error,t,r))}this.listeners.forEach(e=>{e(this.#t)})})}},l=r(58026),c=r(89073);function h(e,t){let r=(0,l.NL)(t),[i]=s.useState(()=>new u(r,e));s.useEffect(()=>{i.setOptions(e)},[i,e]);let a=s.useSyncExternalStore(s.useCallback(e=>i.subscribe(n.Vr.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),o=s.useCallback((e,t)=>{i.mutate(e,t).catch(c.Z)},[i]);if(a.error&&(0,c.L)(i.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:o,mutateAsync:a.mutate}}},57077:function(e,t,r){let s;r.d(t,{a:()=>w});var i=r(29241),n=r(88730),a=r(15239),o=r(22838),u=r(90260),l=r(76269),c=class extends o.l{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=(0,u.O)(),this.options.experimental_prefetchInRender||this.#o.reject(Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#u=void 0;#l=void 0;#t=void 0;#c;#h;#o;#a;#d;#p;#f;#y;#R;#m;#v=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#u.addObserver(this),h(this.#u,this.options)?this.#b():this.updateResult(),this.#g())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#u,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#u,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#I(),this.#u.removeObserver(this)}setOptions(e){let t=this.options,r=this.#u;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,l.Nc)(this.options.enabled,this.#u))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#C(),this.#u.setOptions(this.options),t._defaulted&&!(0,l.VS)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#u,observer:this});let s=this.hasListeners();s&&p(this.#u,r,this.options,t)&&this.#b(),this.updateResult(),s&&(this.#u!==r||(0,l.Nc)(this.options.enabled,this.#u)!==(0,l.Nc)(t.enabled,this.#u)||(0,l.KC)(this.options.staleTime,this.#u)!==(0,l.KC)(t.staleTime,this.#u))&&this.#x();let i=this.#Q();s&&(this.#u!==r||(0,l.Nc)(this.options.enabled,this.#u)!==(0,l.Nc)(t.enabled,this.#u)||i!==this.#m)&&this.#M(i)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(s,e);return t=this,r=i,(0,l.VS)(t.getCurrentResult(),r)||(this.#t=i,this.#h=this.options,this.#c=this.#u.state),i}getCurrentResult(){return this.#t}trackResult(e,t){let r={};return Object.keys(e).forEach(s=>{Object.defineProperty(r,s,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(s),t?.(s),e[s])})}),r}trackProp(e){this.#v.add(e)}getCurrentQuery(){return this.#u}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#b({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#t))}#b(e){this.#C();let t=this.#u.fetch(this.options,e);return e?.throwOnError||(t=t.catch(l.ZT)),t}#x(){this.#O();let e=(0,l.KC)(this.options.staleTime,this.#u);if(l.sk||this.#t.isStale||!(0,l.PN)(e))return;let t=(0,l.Kp)(this.#t.dataUpdatedAt,e);this.#y=setTimeout(()=>{this.#t.isStale||this.updateResult()},t+1)}#Q(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#u):this.options.refetchInterval)??!1}#M(e){this.#I(),this.#m=e,!l.sk&&!1!==(0,l.Nc)(this.options.enabled,this.#u)&&(0,l.PN)(this.#m)&&0!==this.#m&&(this.#R=setInterval(()=>{(this.options.refetchIntervalInBackground||i.j.isFocused())&&this.#b()},this.#m))}#g(){this.#x(),this.#M(this.#Q())}#O(){this.#y&&(clearTimeout(this.#y),this.#y=void 0)}#I(){this.#R&&(clearInterval(this.#R),this.#R=void 0)}createResult(e,t){let r,s=this.#u,i=this.options,n=this.#t,o=this.#c,c=this.#h,d=e!==s?e.state:this.#l,{state:y}=e,R={...y},m=!1;if(t._optimisticResults){let r=this.hasListeners(),n=!r&&h(e,t),o=r&&p(e,s,t,i);(n||o)&&(R={...R,...(0,a.z)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(R.fetchStatus="idle")}let{error:v,errorUpdatedAt:b,status:g}=R;r=R.data;let O=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===g){let e;n?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=n.data,O=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,void 0!==e&&(g="success",r=(0,l.oE)(n?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!O)if(n&&r===o?.data&&t.select===this.#d)r=this.#p;else try{this.#d=t.select,r=t.select(r),r=(0,l.oE)(n?.data,r,t),this.#p=r,this.#a=null}catch(e){this.#a=e}this.#a&&(v=this.#a,r=this.#p,b=Date.now(),g="error");let I="fetching"===R.fetchStatus,C="pending"===g,x="error"===g,Q=C&&I,M=void 0!==r,D={status:g,fetchStatus:R.fetchStatus,isPending:C,isSuccess:"success"===g,isError:x,isInitialLoading:Q,isLoading:Q,data:r,dataUpdatedAt:R.dataUpdatedAt,error:v,errorUpdatedAt:b,failureCount:R.fetchFailureCount,failureReason:R.fetchFailureReason,errorUpdateCount:R.errorUpdateCount,isFetched:R.dataUpdateCount>0||R.errorUpdateCount>0,isFetchedAfterMount:R.dataUpdateCount>d.dataUpdateCount||R.errorUpdateCount>d.errorUpdateCount,isFetching:I,isRefetching:I&&!C,isLoadingError:x&&!M,isPaused:"paused"===R.fetchStatus,isPlaceholderData:m,isRefetchError:x&&M,isStale:f(e,t),refetch:this.refetch,promise:this.#o};if(this.options.experimental_prefetchInRender){let t=e=>{"error"===D.status?e.reject(D.error):void 0!==D.data&&e.resolve(D.data)},r=()=>{t(this.#o=D.promise=(0,u.O)())},i=this.#o;switch(i.status){case"pending":e.queryHash===s.queryHash&&t(i);break;case"fulfilled":("error"===D.status||D.data!==i.value)&&r();break;case"rejected":("error"!==D.status||D.error!==i.reason)&&r()}}return D}updateResult(){let e=this.#t,t=this.createResult(this.#u,this.options);this.#c=this.#u.state,this.#h=this.options,void 0!==this.#c.data&&(this.#f=this.#u),(0,l.VS)(t,e)||(this.#t=t,this.#n({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#v.size)return!0;let s=new Set(r??this.#v);return this.options.throwOnError&&s.add("error"),Object.keys(this.#t).some(t=>this.#t[t]!==e[t]&&s.has(t))})()}))}#C(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#u)return;let t=this.#u;this.#u=e,this.#l=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#g()}#n(e){n.Vr.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#t)}),this.#e.getQueryCache().notify({query:this.#u,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,l.Nc)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,l.Nc)(t.enabled,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&f(e,t)}return!1}function p(e,t,r,s){return(e!==t||!1===(0,l.Nc)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&f(e,r)}function f(e,t){return!1!==(0,l.Nc)(t.enabled,e)&&e.isStaleByTime((0,l.KC)(t.staleTime,e))}var y=r(8491),R=r(58026);r(31549);var m=y.createContext((s=!1,{clearReset:()=>{s=!1},reset:()=>{s=!0},isReset:()=>s})),v=()=>y.useContext(m),b=r(89073),g=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&!t.isReset()&&(e.retryOnMount=!1)},O=e=>{y.useEffect(()=>{e.clearReset()},[e])},I=({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,b.L)(r,[e.error,s])),C=y.createContext(!1),x=()=>y.useContext(C);C.Provider;var Q=e=>{let t=e.staleTime;e.suspense&&(e.staleTime="function"==typeof t?(...e)=>Math.max(t(...e),1e3):Math.max(t??1e3,1e3),"number"==typeof e.gcTime&&(e.gcTime=Math.max(e.gcTime,1e3)))},M=(e,t)=>e.isLoading&&e.isFetching&&!t,D=(e,t)=>e?.suspense&&t.isPending,k=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});function w(e,t){return function(e,t,r){let s=(0,R.NL)(r),i=x(),a=v(),o=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(o),o._optimisticResults=i?"isRestoring":"optimistic",Q(o),g(o,a),O(a);let u=!s.getQueryCache().get(o.queryHash),[c]=y.useState(()=>new t(s,o)),h=c.getOptimisticResult(o),d=!i&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=d?c.subscribe(n.Vr.batchCalls(e)):b.Z;return c.updateResult(),t},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),y.useEffect(()=>{c.setOptions(o)},[o,c]),D(o,h))throw k(o,c,a);if(I({result:h,errorResetBoundary:a,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw h.error;if(s.getDefaultOptions().queries?._experimental_afterQuery?.(o,h),o.experimental_prefetchInRender&&!l.sk&&M(h,i)){let e=u?k(o,c,a):s.getQueryCache().get(o.queryHash)?.promise;e?.catch(b.Z).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?h:c.trackResult(h)}(e,c,t)}},89073:function(e,t,r){function s(e,t){return"function"==typeof e?e(...t):!!e}function i(){}r.d(t,{L:()=>s,Z:()=>i})},94455:function(e,t,r){r.d(t,{s:()=>n});var s=r(8491),i=r(46041);function n(e){let{navigate:t}=(0,i.t)();return s.useCallback(r=>t({from:null==e?void 0:e.from,...r}),[null==e?void 0:e.from,t])}}}]);
|