PageSourceSearch

https://app.prompts.ai/_next/static/chunks/pages/home-70895674449110ff.js

js prompts.ai collected 2026-09-26 08:31:28 UTC 138,756 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9473,9845],{4055:(e,t,i)=>{"use strict";var l=i(29563);t.A=void 0;var o=l(i(59628)),n=i(37876);t.A=(0,o.default)((0,n.jsx)("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"}),"Search")},15660:(e,t,i)=>{"use strict";i.d(t,{A:()=>I});var l=i(37876),o=i(14232),n=i(6907),a=i(1992),s=i(54227),r=i(35003),d=i(72147),p=i(60230),c=i(84812),x=i(88992),h=i(91408),u=i(71090),m=i(77693),g=i(35244),A=i(74695),f=i(75769),j=i(45169),b=i(35573),w=i(38117),v=i(53206),y=i(37830),C=i(25296),S=i(24542),T=i(69395);function I(e){let{open:t=!1,onModalClose:i=()=>{},modelData:o={}}=e;return(0,l.jsx)(S.A,{title:(0,g.t)("storage.Files"),subTitle:"An event that starts your node",open:t,handleClose:i,content:(0,l.jsx)(P,{handleClose:i,modelData:o})})}function P(e){var t,i;let{handleClose:S=()=>{},modelData:I={}}=e,P=(0,n.u)(),E=(0,A.wA)(),{allModelsCategories:R,isAllModelsCategoriesFetching:k}=(0,A.d4)(e=>e.aiModelsCategories),_=(0,o.useMemo)(()=>null==R?void 0:R.filter(e=>(null==e?void 0:e.modelType)===f.J4J&&(null==e?void 0:e.supportedCustomAction)===!0),[R,S]);(0,o.useEffect)(()=>{k||(null==R?void 0:R.length)||E((0,w.y)())},[]);let L=h.Ik().shape({title:h.Yj().required(m.i.titleRequired).min(2).nullable(),categoryId:h.Yj().required(m.i.titleRequired).nullable(),aiModelId:h.Yj().required(m.i.titleRequired).nullable(),prompt:h.Yj().required(m.i.titleRequired).nullable()}),{control:O,handleSubmit:N,reset:M,formState:{errors:F}}=(0,x.mN)({defaultValues:{title:null!=(i=null==I?void 0:I.title)?i:"",categoryId:(null==I?void 0:I.categoryId)||(null==(t=_[0])?void 0:t.id),aiModelId:null==I?void 0:I.id,prompt:""},resolver:(0,u.t)(L),mode:"onChange"});(0,o.useEffect)(()=>{var e,t;return M({title:null!=(t=null==I?void 0:I.title)?t:"",categoryId:(null==I?void 0:I.categoryId)||(null==(e=_[0])?void 0:e.id),aiModelId:null==I?void 0:I.id,prompt:""}),()=>{var e;M({title:"",categoryId:null==(e=_[0])?void 0:e.id,aiModelId:"",prompt:""})}},[I,_]);let W=(0,a.useMutation)(async e=>await (0,v.api)({endpoint:j.FF,payloadData:e}),{onSuccess:e=>{(0,b.lA)(e)&&S()},onError:()=>{}});async function H(e){try{await W.mutateAsync(e)}catch(e){console.log("error: ",e)}}let D={width:"100%","& .Mui-focused":{boxShadow:"none !important"},"& .MuiFormLabel-root":{fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:P.palette.promptsColorPalette.mainText},"& .MuiInputBase-root":{borderRadius:"12px",border:"1px solid ".concat(P.palette.promptsColorPalette.newBgColor3),boxShadow:"none !important",backgroundColor:"".concat(P.palette.promptsColorPalette.bgBlackInput," !important"),width:"100%","& .MuiInputBase-input":{padding:"4px 13px !important",minHeight:"24px","&::placeholder":{color:P.palette.promptsColorPalette.subText}}},"& .MuiInputBase-input ":{color:P.palette.promptsColorPalette.mainText}},z={width:"100%","& .Mui-focused":{boxShadow:"none !important"},"& .MuiFormLabel-root":{fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:P.palette.promptsColorPalette.mainText},"& .MuiInputBase-root":{borderRadius:"12px",border:"1px solid ".concat(P.palette.promptsColorPalette.newBgColor3),boxShadow:"none !important",backgroundColor:"".concat(P.palette.promptsColorPalette.bgBlackInput," !important"),width:"100%","& .MuiInputBase-input":{padding:"4px 13px !important",minHeight:"24px","&::placeholder":{color:P.palette.promptsColorPalette.borderColor}}},"& .MuiInputBase-input ":{color:P.palette.promptsColorPalette.mainText}};return(0,l.jsxs)("form",{onSubmit:N(H),children:[(0,l.jsxs)(s.A,{display:"flex",alignItems:"center",gap:"8px",sx:{padding:"16px",borderBottom:"1px solid ".concat(P.palette.divider)},children:[(0,l.jsx)(y.A,{icon:"textToTextIcon"}),(0,l.jsx)(r.A,{fontSize:"16px",fontWeight:"600",lineHeight:"24px",color:P.palette.promptsColorPalette.mainText,children:(0,g.t)(T.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)})]}),(0,l.jsxs)(s.A,{p:"16px",children:[(0,l.jsx)(s.A,{children:(0,l.jsx)(x.xI,{name:"title",control:O,rules:{required:!0},render:e=>{var t;let{field:{value:i,onChange:o}}=e;return(0,l.jsx)(C.A,{fullWidth:!0,label:(0,l.jsxs)(l.Fragment,{children:["Node title"," ",(0,l.jsx)("span",{className:"star",style:{color:P.palette.error.main},children:"*"})]}
1),placeholder:"Enter Title",onChange:o,value:i,sx:D,error:!!(null==F?void 0:F.title),...(null==F?void 0:F.title)&&{helperText:null==F||null==(t=F.title)?void 0:t.message}})}})}),(0,l.jsx)(s.A,{pt:5,children:(0,l.jsx)(x.xI,{name:"categoryId",control:O,rules:{required:!0},render:e=>{var t,i;let{field:{value:o,onChange:n}}=e;return(0,l.jsx)(C.A,{select:!0,defaultValue:null==(t=_[0])?void 0:t.id,label:(0,l.jsxs)(l.Fragment,{children:["Model type"," ",(0,l.jsx)("span",{className:"star",style:{color:P.palette.error.main},children:"*"})]}),id:"custom-select",onChange:n,value:o,sx:z,error:!!(null==F?void 0:F.categoryId),...(null==F?void 0:F.categoryId)&&{helperText:null==F||null==(i=F.categoryId)?void 0:i.message},children:(null==_?void 0:_.length)?_&&(null==_?void 0:_.length)>0&&(null==_?void 0:_.map(e=>(0,l.jsx)(p.A,{value:e.id,children:e.displayName}))):(0,l.jsx)(d.A,{sx:{mb:6}})},o)}})}),(0,l.jsx)(s.A,{py:5,children:(0,l.jsx)(x.xI,{name:"prompt",control:O,rules:{required:!0},render:e=>{var t;let{field:{value:i,onChange:o}}=e;return(0,l.jsx)(C.A,{fullWidth:!0,label:(0,l.jsxs)(l.Fragment,{children:[(0,g.t)("workflow.prompt")," ",(0,l.jsx)("span",{className:"star",style:{color:P.palette.error.main},children:"*"})]}),placeholder:"Enter prompt",name:"title",onChange:o,value:i,sx:D,error:!!(null==F?void 0:F.prompt),...(null==F?void 0:F.prompt)&&{helperText:null==F||null==(t=F.prompt)?void 0:t.message}})}})}),(0,l.jsxs)(s.A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px"},children:[(0,l.jsx)(c.A,{variant:"contained",className:"btn-custom btn-blue common-shadow-one minh32 br6",type:"submit",children:"Add"}),(0,l.jsx)(c.A,{variant:"outlined",color:"inherit",className:"btn-custom spacing-1 minh32 br6 auth-btn ".concat("light"===P.palette.mode?"btn-secondary-new":"btn-black"),onClick:S,children:"Cancel"})]})]})]})}},18189:(e,t,i)=>{"use strict";i.d(t,{A:()=>J});var l=i(37876),o=i(14729),n=i(79647),a=i(72907),s=i(71733),r=i(35268),d=i(35003),p=i(81003),c=i(86541),x=i(35
1573),h=i(76058),u=i(53206),m=i(67811),g=i(59627),A=i(9395),f=i(6907),j=i(53612),b=i(18149),w=i(35705),v=i(14232),y=i(10841),C=i.n(y),S=i(74347),T=i.n(S),I=i(72147),P=i(34356),E=i(21131),R=i(67748);let k=(0,r.Ay)(T())(e=>{let{theme:t}=e;return{}}),_=e=>{let{isHomeComponent:t}=e,{currentChat:i,chatAreaRef:o,chatEndsRef:n,nextPage:s,hasMore:r,loading:p,chatTab:c,selectedId:x,chatContainerRef:h}=(0,g.P)(),u=(0,f.u)(),m=(0,P.A)(),[A,j]=(0,v.useState)(!1),b=()=>{let e=[];i&&(e=[...i].reverse());let t=[],l=e[0]?"Ch"===c?e[0].senderId:e[0].sender:m.user.organizationUserId,o={senderId:l,messages:[]};return e.forEach((i,n)=>{l="Ch"===c?i.senderId:i.sender,t.push(o),o={senderId:"Ch"===c?i.senderId:i.sender,messages:[{time:i.time,msg:i.message,image:i.imageArr,feedback:i.isRead}]},n===e.length-1&&t.push(o)}),function(e){let t={};return e.forEach(e=>{let i=e.messages;if(0===i.length)return;let l=e.senderId;i.forEach(e=>{let i=new Date(1e3*e.time).toISOString().split("T")[0];t[i]||(t[i]=[]),t[i].push({senderId:l,message:e})})}),t}(t)};return(0,v.useEffect)(()=>(j(!1),()=>{j(!1)}),[x]),(0,v.useEffect)(()=>{i&&(j(!0),(0,R.yA)(300).then(()=>(()=>{try{if(null==h?void 0:h.current){var e,t;h.current._container.scrollTop=null==h||null==(t=h.current)||null==(e=t._container)?void 0:e.scrollHeight}}catch(e){}})()))},[i]),(0,l.jsx)(a.A,{className:"common-scroll",sx:{height:"calc(100% - 8.875rem)",overflow:"auto",padding:"1.25rem",[u.breakpoints.down("sm")]:{...t?{height:"60vh"}:{}},[u.breakpoints.down("md")]:{padding:"12px"}},ref:o,children:(0,l.jsxs)(k,{sx:{padding:"0",cursor:"default"},ref:h,options:{wheelPropagation:!1,suppressScrollX:!0},onScroll:()=>{let e=h.current._container.scrollTop;!p&&r&&0===e&&s()},children:[p&&(0,l.jsx)(a.A,{sx:{display:"flex",width:"100%",justifyContent:"center",alignItems:"center",cursor:"pointer",padding:"10px 0"},children:(0,l.jsx)(I.A,{})}),Object.entries(b()).map(e=>{let[t,i]=e;return"Ch"===c?(i.senderId,m.user.organizationUserId):(i.senderId,m.user.id),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{p:4,sx:{position:"relative"},children:(0,l.jsx)(d.A,{sx:{fontSize:"14px",fontWeight:"400",lineHeight:"20px",textTransform:"uppercase",letterSpacing:"2px",padding:"0 10px",position:"absolute",left:"50%",transform:"translateX(-50%)",bottom:"15px"},children:"Invalid date"!==C()(t).format(m.user.dateFormat)?C()(t).format(m.user.dateFormat):t})}),i.map((e,i,o)=>{var n,s,r;let{length:p}=o,x="Ch"===c?e.senderId===m.user.organizationUserId:e.senderId===m.user.id;return null==e||null==(n=e.message)||n.time,(0,l.jsx)(a.A,{sx:{display:"flex",flexDirection:x?"row-reverse":"row",mb:i!==b().length-1?4:void 0},children:(0,l.jsx)(a.A,{className:"chat-body",sx:{maxWidth:["calc(100% - 5.75rem)","75%","65%"]},children:(0,l.jsxs)(a.A,{sx:{"&:not(:last-of-type)":{mb:3}},children:[(0,l.jsxs)("div",{children:[(0,l.jsx)(d.A,{sx:{boxShadow:1,borderRadius:1,maxWidth:"100%",width:"fit-content",wordWrap:"break-word",p:e=>e.spacing(2.25,4),ml:x?"auto":void 0,borderTopLeftRadius:x?void 0:0,borderTopRightRadius:x?0:void 0,color:"common.white",backgroundColor:u.palette.promptsColorPalette.primary},children:e.message.msg}),e.message.thinking&&!x&&(0,l.jsxs)(a.A,{sx:{mt:1,p:2,backgroundColor:u.palette.promptsColorPalette.newCardBg,borderRadius:1,border:"1px solid ".concat(u.palette.promptsColorPalette.newBgColor3)},children:[(0,l.jsx)(d.A,{variant:"body2",sx:{fontSize:"12px",fontWeight:600,color:u.palette.promptsColorPalette.mainText2,mb:1},children:"Thinking Process:"}),(0,l.jsx)(d.A,{variant:"body2",sx:{fontSize:"14px",color:u.palette.promptsColorPalette.newTextColor,lineHeight:1.5},children:e.message.thinking})]})]}),(0,l.jsx)(a.A,{sx:{mt:1,display:"flex",alignItems:"center",justifyContent:x?"flex-end":"flex-start"},children:(0,l.jsx)(d.A,{variant:"body2",sx:{color:"text.disabled"},children:(null==e||null==(s=e.message)||s.time,(0,l.jsx)(E.c4,{utcTimestamp:(null==e||null==(r=e.message)?void 0:r.time)*1e3,timeFormate:"hh:mm A",showOnlyTime:!0}))})})]},i)})},t)})]})}),(0,l.jsx)("div",{ref:n})]})})};var L=i(74695),O=i(35244),N=i(84812),M=i(85811),F=i(8075),W=i(57297),H=i(24349),D=i(
151804),z=i(80917),B=i(6397),G=i(25296),U=i(75452);let K=(0,r.Ay)(a.A)(e=>{let{theme:t}=e;return{display:"flex",alignItems:"center",padding:t.spacing(2.5),border:"1px solid ".concat(t.palette.promptsColorPalette.newBgColor3," !important"),background:t.palette.promptsColorPalette.newFinalBg,justifyContent:"space-between",borderRadius:t.shape.borderRadius}}),V=(0,r.Ay)("form")(e=>{let{theme:t}=e;return{padding:t.spacing(0,5,5)}}),Y=e=>{let{setSelectedId:t,isHomeComponent:i=!1,isDisabled:o=!1,setIsNewUser:n=()=>{}}=e,s=(0,L.wA)(),r=(0,U.A)(),{userId:p,scrollToBottom:c,isNewParamPresent:x,activeUser:h,chatTab:u,contectList:A}=(0,g.P)(),{createChatMessage:f}=(0,D.Y)(),{messages:j,sendMessage:b,newId:w}=(0,F.V)(p,x),{messages:y}=(0,H.g)(p),[C,S]=(0,v.useState)(""),[T,I]=(0,v.useState)(!1),{refetchAvailableToken:P}=(0,W.R)(),E=async e=>{if(e.preventDefault(),C.trim().length){let e=x?{message:C,userId:p,isFile:!1}:{message:C,chatId:p,isFile:!1,userId:null==h?void 0:h.userId};if(x){let l=await b(e);if(null==l?void 0:l.data){var i;s((0,m.AF)(A.find(t=>(null==t?void 0:t.id)===(null==e?void 0:e.userId)))),t(null==l||null==(i=l.data)?void 0:i.chatId),n(!1)}I(e=>!e)}else"Ch"===u?await b(e):"Co"===u&&f({chatId:null==h?void 0:h.id,userId:null==h?void 0:h.userId,message:C});c()}P(),S("")};return(0,v.useEffect)(()=>{(j||y)&&("Ch"===u?s((0,m.QM)(j)):"Co"===u&&s((0,B.p8)(y)))},[j,y]),(0,v.useEffect)(()=>{(x||"Ch"===u)&&s((0,z.RE)({activeUser:!0}))},[T]),(0,v.useEffect)(()=>{w&&t(w)},[w]),(0,l.jsxs)(V,{onSubmit:E,sx:{[r.breakpoints.down("md")]:{padding:"12px"}},children:[o?function(){let e=[],t={position:"absolute",bottom:"85px",padding:"4px 20px 4px 8px ",borderRadius:"8px",border:r.palette.promptsColorPalette.newBgColor3,background:r.palette.promptsColorPalette.newCardBg,display:"flex",gap:"4px",alignItems:"flex-start",maxWidth:"fit-content"},i=r.palette.promptsColorPalette.mainText2;return e.push("Receiver account do not have the required license"),(0,l.jsx)(l.Fragment,{children:e.map((e,o)=>(0,l.jsx)(a.A,{sx:t,children:(0,l.jsx)(a.A,{children:(0,l.jsxs)(d.A,{sx:{fontSize:"14px",color:i},children:[(0,l.jsx)(M.In,{icon:"typcn:info-outline",color:r.palette.promptsColorPalette.videoLogo,width:16,style:{margin:"5px 5px -3px 0px"}}),(0,l.jsx)("strong",{children:"Note: "}),e]})})},o))})}():(0,l.jsx)(l.Fragment,{}),(0,l.jsxs)(K,{children:[(0,l.jsx)(a.A,{sx:{flexGrow:1,display:"flex",alignItems:"center"},children:(0,l.jsx)(G.A,{fullWidth:!0,value:C,placeholder:(0,O.t)("promptErPanel.typeMessageHere"),onChange:e=>S(e.target.value),sx:{"& .Mui-focused":{boxShadow:"none !important"},"& .MuiInputBase-input:not(textarea).MuiInputBase-inputSizeSmall":{p:e=>e.spacing(1.875,2.5)},"& .MuiInputBase-root":{border:"0 !important",boxShadow:"none !important"},[r.breakpoints.down("md")]:{"& .MuiInputBase-input:not(textarea).MuiInputBase-inputSizeSmall":{p:e=>e.spacing(1.5,1)}}}})}),(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center"},children:(0,l.jsx)(N.A,{type:"submit",className:"btn-custom btn-blue common-shadow-one minh32 br6",disabled:o,children:"Send"})})]})]})},X=(0,r.Ay)(a.A)(e=>{let{theme:t}=e;return{flexGrow:1,height:"100%",display:"flex",borderRadius:1,alignItems:"center",flexDirection:"column",justifyContent:"center"}}),J=e=>{let{hidden:t,sendMsg:i,mdAbove:r,dispatch:y,statusObj:C,handleLeftSidebarToggle:S,setSelectedId:T,isHomeComponent:I=!1,setChatIsOpen:P,selectedId:E=!1,setLeftSidebarOpen:R,setIsNewUser:k=()=>{}}=e,{activeUser:L,chatTab:O}=(0,g.P)(),N=(0,f.u)(),M=(0,p.A)(e=>e.breakpoints.down("lg")),F=()=>{r||S()},W=async()=>{if(null!==L){let e=await (0,u.api)({endpoint:h._t,id:null==L?void 0:L.id});(0,x.lA)(e)&&y((0,m.QM)([]))}};return(0,v.useEffect)(()=>{!E&&M&&F()},[E,M]),(0,v.useEffect)(()=>{(null==L?void 0:L.chatId)===null&&y((0,m.QM)([]))},[L]),(()=>{var e;return(null==L?void 0:L.length)!==0&&L?(0,l.jsxs)(a.A,{sx:{width:I?"100%":0,flexGrow:1,height:"100%",backgroundColor:N.palette.promptsColorPalette.newCardBg},children:[(0,l.jsxs)(a.A,{sx:{px:I?3:5,py:"8px",display:"flex",alignItems:"center",...I?{gap:"10px"}:{justifyContent:"space-between",minHeight:"57px"},backgroundColor:"",borderBottom:e=>"1px solid ".concat(e.palette.promptsColorPalette.newBgColor3),[N.breakpoints.down("md")]:{px:I?3:1}},children:[I&&(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{"& svg":{width:"20px",height:"20px",cursor:"pointer",display:"flex"}},onClick:()=>{y((0,B.l)()),P(!1)},children:(0,l.jsx)(c.A,{icon:"tabler:chevron-left"})})}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center"},children:[r?null:I?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(s.A,{onClick:()=>{R(!1),T("")},sx:{mr:2},children:(0,l.jsx)(c.A,{icon:"tabler:chevron-left",width:"30",height:"30"})}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",cursor:"pointer"},children:[(0,l.jsx)(n.A,{overlap:"circular",anchorOrigin:{vertical:"bottom",horizontal:"right"},sx:{mr:3},badgeContent:(0,l.jsx)(l.Fragment,{}),children:(0,l.jsx)(o.A,{sx:{width:38,height:38},src:null!=(e=null==L?void 0:L.profilePic)?e:"/images/avatars/16.png",alt:"".concat(null==L?void 0:L.firstName," ").concat(null==L?void 0:L.lastName)})}),(0,l.jsxs)(a.A,{sx:{display:"flex",flexDirection:"column"},children:[(0,l.jsx)(d.A,{variant:"h6",children:"".concat(null==L?void 0:L.firstName," ").concat(null==L?void 0:L.lastName)}),(0,l.jsx)(d.A,{sx:{color:"text.disabled"},children:null==L?void 0:L.role})]})]})]}),(0,l.jsx)(A.A,{action:b.H.CHAT_DELETE,children:"Ch"===O&&(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center"},children:(0,l.jsx)(w.A,{menuProps:{sx:{mt:2}},paperStyle:!0,iconButtonProps:{size:"small",sx:{color:"text.secondary"}},options:[{text:"Clear Chat",menuItemProps:{onClick:()=>{W()}}}]})})})]}),(0,l.jsx)(_,{isHomeComponent:I,activeUser:L,hidden:t}),(0,l.jsx)(A.A,{action:b.H.CHAT_CREATE,children:(0,l.jsx)(Y,{dispatch:y,sendMsg:i,setSelectedId:T,isHomeComponent:I,isDisabled:(null==L?void 0:L.isLicensed)!==void 0&&(null==L?void 0:L.isLicensed)!==null&&(null==L||!L.isLicensed),setIsNewUser:k})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(X,{sx:{backgroundColor:N.palette.promptsColorPalette.newCardBg,...r?{borderTopLeftRadius:0,borderBottomLeftRadius:0}:{}},children:[(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",height:"20%"},children:(0,l.jsx)(j.A,{img:"light"===N.palette.mode?"/images/emptyImage/chat-Light.svg":"/images/emptyImage/chat.svg"})}),(0,l.jsx)(a.A,{onClick:F,sx:{mt:"16px",py:2,px:6,borderRadius:5,backgroundColor:"promptsColorPalette.newCardBg",curs
1or:r?"default":"pointer"},children:(0,l.jsx)(d.A,{sx:{fontWeight:500,fontSize:"1.125rem",lineHeight:"normal"},children:"Start Your Conversation"})})]})})})()}},18726:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});var l=i(49932),o=i(37876);let n=(0,l.A)((0,o.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"}),"Add")},23667:(e,t,i)=>{"use strict";i.d(t,{h$:()=>r,ac:()=>d,uR:()=>x,Uk:()=>a,Ob:()=>n,GH:()=>s,ze:()=>p,z:()=>c});let l={ENDPOINTS_FOR_AGENT_MARKETPLACE_LISTING:"/custom-action/publishedActionList",ENDPOINTS_FOR_AGENT_MARKETPLACE_DATA_BY_ID:"/custom-action/detailPageOfAction/",ENDPOINTS_FOR_FAVORITE_AGENT_MARKETPLACE:"/custom-action/addToFavourite/",ENDPOINTS_FOR_ADD_TO_ORG_AGENT_MARKETPLACE:"/custom-action/buyAction",ENDPOINTS_FOR_ADD_TO_ORG_AGENT_MARKETPLACE_LIST:"/custom-action/listActionForBuy",ENDPOINTS_FOR_UPLOAD_TO_AGENT_MARKETPLACE_LIST:"/custom-action/actionListTobePublishedForAdmin",ENDPOINTS_FOR_UPLOAD_TO_APPROVED_AGENT:"/custom-action/adminApproveActionForPublish",ENDPOINTS_FOR_ADD_TO_ORG_APPROVED_AGENT:"/custom-action/approveActionForBuy"};var o=i(59456);i(32890);let n={url:l.ENDPOINTS_FOR_AGENT_MARKETPLACE_LISTING,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},a={url:l.ENDPOINTS_FOR_AGENT_MARKETPLACE_DATA_BY_ID,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},s={url:l.ENDPOINTS_FOR_FAVORITE_AGENT_MARKETPLACE,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!0},r={url:l.ENDPOINTS_FOR_ADD_TO_ORG_AGENT_MARKETPLACE,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},d={url:l.ENDPOINTS_FOR_ADD_TO_ORG_AGENT_MARKETPLACE_LIST,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},p={url:l.ENDPOINTS_FOR_UPLOAD_TO_AGENT_MARKETPLACE_LIST,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},c={url:l.ENDPOINTS_FOR_UPLOAD_TO_APPROVED_AGENT,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1},x={url:l.ENDPOINTS_FOR_ADD_TO_ORG_APPROVED_AGENT,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1}},24542:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var l=i(37876),o=i(14232),n=i(79270),a=i(80553),s=i(44395),r=i(75039),d=i(54227),p=i(35003),c=i(6907),x=i(85811);let h=(0,o.forwardRef)(function(e,t){return(0,l.jsx)(r.A,{direction:"up",ref:t,...e})}),u=e=>{let{handleClose:t,open:i,title:r,content:u,size:m="md",subTitle:g}=e,A=(0,c.u)();return(0,l.jsx)(o.Fragment,{children:(0,l.jsxs)(n.A,{open:i,keepMounted:!0,onClose:t,TransitionComponent:h,"aria-labelledby":"alert-dialog-slide-title","aria-describedby":"alert-dialog-slide-description",maxWidth:m,fullWidth:m,PaperProps:{sx:{maxWidth:"700px"}},className:"".concat("light"===A.palette.mode?"model-light-theme":"model-dark-theme"),children:[(0,l.jsxs)(d.A,{position:"relative",sx:{borderBottom:"1px solid ".concat(A.palette.promptsColorPalette.newBgColor3)},children:[(0,l.jsxs)(s.A,{id:"alert-dialog-slide-title",sx:{padding:"16px",fontSize:"18px",fontWeight:"600",lineHeight:"24px",color:A.palette.promptsColorPalette.mainText2,backgroundColor:A.palette.promptsColorPalette.newCardBg},children:[r,(0,l.jsx)(p.A,{sx:{color:A.palette.promptsColorPalette.mainText2,mt:"8px",fontSize:"14px",fontWeight:"400",lineHeight:"20px"},children:g})]}),(0,l.jsx)(d.A,{sx:{position:"absolute",top:"20px",right:"16px","& svg":{transition:"0.2s ease-in-out",cursor:"pointer"},"&:hover":{"& svg":{transform:"rotate(180deg)"}}},onClick:t,children:(0,l.jsx)(x.In,{icon:"ic:baseline-close",width:"20",height:"20",color:A.palette.promptsColorPalette.mainText2})})]}),(0,l.jsx)(a.A,{sx:{padding:"0px  !important",scrollBehavior:"smooth",backgroundColor:A.palette.promptsColorPalette.newCardBg,"& .MuiTabs-vertical":{minWidth:"280px"}},className:"common-scroll",children:u})]})})}},25545:(e,t,i)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/home",function(){return i(78644)}])},33939:(e,t,i)=>{"use strict";i.d(t,{km:()=>c,rr:()=>p,N:()=>x,aw:()=>s,CM:()=>d,Q6:()=>r,zB:()=>a});let l={ENDPOINT_PUBLISH_MULTI_IMAGE:"/explore/publishMedias",ENDPOINT_GET_EXPLORE_MEDIA:"/explore/get",ENDPOINT_GET_EXPLORE_PUBLIC_MEDIA:"/explore/public/get",ENDPOINT_GET_EXPLORE_MEDIA_BY_ID:"/explore/getById/",ENDPOINT_EXPLORE_IMAGE_REPORT:"/explore/reportMedia",ENDPOINT_EXPLORE_IMAGE_FAVOURITE:"/explore/likeMedia",ENDPOINT_EXPLORE_CATEGORIES:"/explore-categories/list"};var o=i(59456),n=i(32890);let a={url:l.ENDPOINT_PUBLISH_MULTI_IMAGE,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!0,succesMsgHide:!0,ToastMessages:(0,n.s)("PUBLISH_MULTI_MEDIA")},s={url:l.ENDPOINT_GET_EXPLORE_MEDIA,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1,isPublicApi:!0},r={url:l.ENDPOINT_GET_EXPLORE_PUBLIC_MEDIA,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1,isPublicApi:!0},d={url:l.ENDPOINT_GET_EXPLORE_MEDIA_BY_ID,method:o.wU,withToken:!0,module:o.Wr,isMultipart:!1,showToast:!1,isPublicApi:!0},p={url:l.ENDPOINT_EXPLORE_IMAGE_REPORT,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1,ToastMessages:(0,n.s)("EXPLORE_IMAGE_REPORT")},c={url:l.ENDPOINT_EXPLORE_IMAGE_FAVOURITE,method:o.Qd,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1,succesMsgHide:!0,ToastMessages:(0,n.s)("EXPLORE_IMAGE_FAVOURITE")},x={url:l.ENDPOINT_EXPLORE_CATEGORIES,method:o.wU,withToken:!0,module:o.mb,isMultipart:!1,showToast:!1,isPublicApi:!0}},42850:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});var l=i(14232),o=i(97279);let n=()=>(0,l.useContext)(o.N)},49473:function(e,t,i){var l,o;void 0===(o="function"==typeof(l=function(){"use strict";function t(e,t,i){var l=new XMLHttpRequest;l.open("GET",e),l.responseType="blob",l.onload=function(){s(l.response,t,i)},l.onerror=function(){console.error("could not download file")},l.send()}function l(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(i){var t=document.createEvent("MouseEvents");
1t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var n="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof i.g&&i.g.global===i.g?i.g:void 0,a=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=n.saveAs||("object"!=typeof window||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,i,a){var s=n.URL||n.webkitURL,r=document.createElement("a");r.download=i=i||e.name||"download",r.rel="noopener","string"==typeof e?(r.href=e,r.origin===location.origin?o(r):l(r.href)?t(e,i,a):o(r,r.target="_blank")):(r.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(r.href)},4e4),setTimeout(function(){o(r)},0))}:"msSaveOrOpenBlob"in navigator?function(e,i,n){if(i=i||e.name||"download","string"!=typeof e){var a;navigator.msSaveOrOpenBlob((void 0===(a=n)?a={autoBom:!1}:"object"!=typeof a&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e),i)}else if(l(e))t(e,i,n);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout(function(){o(s)})}}:function(e,i,l,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof e)return t(e,i,l);var s="application/octet-stream"===e.type,r=/constructor/i.test(n.HTMLElement)||n.safari,d=/CriOS\/[\d]+/.test(navigator.userAgent);if((d||s&&r||a)&&"undefined"!=typeof FileReader){var p=new FileReader;p.onloadend=function(){var e=p.result;e=d?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=e:location=e,o=null},p.readAsDataURL(e)}else{var c=n.URL||n.webkitURL,x=c.createObjectURL(e);o?o.location=x:location.href=x,o=null,setTimeout(function(){c.revokeObjectURL(x)},4e4)}});n.saveAs=s.saveAs=s,e.exports=s})?l.apply(t,[]):l)||(e.exports=o)},56222:(e,t,i)=>{"use strict";i.d(t,{A:()=>w});var l=i(40670),o=i(44501),n=i(14232),a=i(49995),s=i(93725),r=i(45879),d=i(4697),p=i(2407),c=i(21459),x=i(77531),h=i(37876);let u=["className","component","disableGutters","fixed","maxWidth","classes"],m=(0,x.A)(),g=(0,c.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t[`maxWidth${(0,s.A)(String(i.maxWidth))}`],i.fixed&&t.fixed,i.disableGutters&&t.disableGutters]}}),A=e=>(0,p.A)({props:e,name:"MuiContainer",defaultTheme:m});var f=i(98428),j=i(35268),b=i(31723);let w=function(e={}){let{createStyledComponent:t=g,useThemeProps:i=A,componentName:p="MuiContainer"}=e,c=t(({theme:e,ownerState:t})=>(0,o.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}}),({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce((t,i)=>{let l=e.breakpoints.values[i];return 0!==l&&(t[e.breakpoints.up(i)]={maxWidth:`${l}${e.breakpoints.unit}`}),t},{}),({theme:e,ownerState:t})=>(0,o.A)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}));return n.forwardRef(function(e,t){let n=i(e),{className:x,component:m="div",disableGutters:g=!1,fixed:A=!1,maxWidth:f="lg"}=n,j=(0,l.A)(n,u),b=(0,o.A)({},n,{component:m,disableGutters:g,fixed:A,maxWidth:f}),w=((e,t)=>{let{classes:i,fixed:l,disableGutters:o,maxWidth:n}=e,a={root:["root",n&&`maxWidth${(0,s.A)(String(n))}`,l&&"fixed",o&&"disableGutters"]};return(0,d.A)(a,e=>(0,r.Ay)(t,e),i)})(b,p);return(0,h.jsx)(c,(0,o.A)({as:m,ownerState:b,className:(0,a.A)(w.root,x),ref:t},j))})}({createStyledComponent:(0,j.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:i}=e;return[t.root,t["maxWidth".concat((0,f.A)(String(i.maxWidth)))],i.fixed&&t.fixed,i.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,b.A)({props:e,name:"MuiContainer"})})},60094:(e,t,i)=>{"use strict";i.d(t,{I:()=>l});let l=e=>null==e?void 0:e.split(/\s/).reduce((e,t)=>
1e+=t.slice(0,1),"")},78644:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>tK});var l=i(37876),o=i(14232),n=i(81003),a=i(72907),s=i(6907),r=i(63931),d=i(24349),p=i(8075),c=i(34356),x=i(59456),h=i(29578),u=i(18847),m=i.n(u),g=i(54314),A=i(83878),f=i(74695);let j=e=>{let{children:t,isNewLayout:i=!1}=e;(0,c.A)();let{isLiteDashboard:o}=(0,A.Is)(),{chatSessionList:n}=(0,f.d4)(e=>e.aiLabs);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(g.A,{customLayout:"vertical",isAiNode:!0,isSidebar:!1,isFooter:!!(!o&&(null==n?void 0:n.length)<=1),children:t})})};var b=i(9862),w=i(41316),v=i(1992),y=i(35003),C=i(60595),S=i(62712),T=i(89099),I=i(67045),P=i(53206),E=i(60094),R=i(77368),k=i(65010),_=i(54515),L=i(75329),O=i(53612),N=i(89769),M=i(35244),F=i(65675),W=i(48156),H=i(48230),D=i.n(H),z=i(69395);let B=()=>{var e,t,i,o,r,d,p,h,u,m,g,A;let f=(0,s.u)(),j=(0,T.useRouter)(),{user:b}=(0,c.A)(),H=(0,n.A)(e=>e.breakpoints.down("sm")),B=(0,n.A)(e=>e.breakpoints.down("md")),{checkPermissions:G}=(0,I.Ay)(),U=async()=>{try{return await (0,P.api)({endpoint:W.Xg})}catch(e){}},{data:K,isFetching:V}=(0,v.useQuery)(["projectList"],U),Y=e=>{let{name:t,iconurl:i}=e;return null!==i?(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:(0,l.jsx)(_.A,{src:i,sx:{width:20,height:20}})}),(0,l.jsx)(a.A,{sx:{fontSize:"14px",lineHeight:"20px",fontWeight:"500",color:f.palette.promptsColorPalette.mainText2},children:t})]}):(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,l.jsx)(_.A,{skin:f.palette.mode,color:"secondary",sx:{width:20,height:20,textTransform:"uppercase",fontWeight:"700",fontSize:"10px",lineHeight:"20px",backgroundColor:f.palette.promptsColorPalette.bgBlackInput,color:f.palette.promptsColorPalette.primary,textAlign:"center"},children:(0,E.I)(t)}),(0,l.jsx)(a.A,{sx:{fontSize:"16px",lineHeight:"24px",fontWeight:"500",color:f.palette.promptsColorPalette.mainText2},children:t})]})};return(0,l.jsx)(l.Fragment,{children:G(j.pathname,R.n.VIEW)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pb:(null==b||null==(e=b.planDetails)?void 0:e.planName)!==(null===x.td||void 0===x.td?void 0:x.td.FREE)?"8px ":"16px"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:f.palette.promptsColorPalette.mainText2,[f.breakpoints.down("sm")]:{fontSize:16}},children:(0,M.t)("Time Savers")}),(null==K||null==(t=K.data)?void 0:t.data)&&(null==K||null==(o=K.data)||null==(i=o.data)?void 0:i.length)>0?(0,l.jsx)(y.A,{component:D(),sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:f.palette.promptsColorPalette.primary,cursor:"pointer",textDecoration:"none",position:"relative",zIndex:"999"},href:"".concat(x.ij,"marketplace"),children:(0,M.t)("workflow.viewAll")}):(0,l.jsx)(l.Fragment,{})]}),V?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(w.Ay,{container:!0,spacing:B?2:6,children:null==(r=Array.from({length:B?2:3}))?void 0:r.map((e,t)=>(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsxs)(a.A,{sx:{borderRadius:"8px",height:"100%",cursor:"pointer",position:"relative",backgroundColor:f.palette.promptsColorPalette.newFinalBg},children:[(0,l.jsx)(C.A,{variant:"outlined",sx:{padding:"8px 16px",minHeight:"184px",borderRadius:"8px",border:"0px, 0px, 1px, 0px",position:"relative",backgroundSize:"cover",backgroundRepeat:"no-repeat",[f.breakpoints.down("sm")]:{width:"100%",minHeight:"132px"}},children:(0,l.jsx)(a.A,{sx:{position:"absolute",top:"12px",left:"14px"},children:(0,l.jsx)(S.A,{variant:"rectangular",sx:{width:"35px",height:"12px",borderRadius:"2px"}})})}),(0,l.jsxs)(a.A,{sx:{paddingTop:"15px"},children:[(0,l.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"4px"},children:(0,l.jsx)(S.A,{variant:"text",sx:{width:"100%"}})}),(0,l.jsx)(a.A,{sx:{pt:"6px"},children:(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"16px"},children:[(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"text",sx:{width:"50%"}})]})})]})]})},t))})}):(0,l.jsx)(l.Fragment,{children:(null==K||null==(d=K.data)?void 0:d.data)&&(null==K||null==(h=K.data)||null==(p=h.data)?void 0:p.length)>0?(0,l.jsx)(a.A,{sx:{position:"relative"},children:(0,l.jsx)(w.Ay,{container:!0,spacing:B?2:6,children:(null==K||null==(u=K.data)?void 0:u.data)&&(null==K||null==(A=K.data)||null==(g=A.data)||null==(m
1=g.slice(0,B?2:3))?void 0:m.map((e,t)=>{var i;return(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsxs)(a.A,{className:"common-border-shadow-2 noEffects",sx:{borderRadius:"8px",height:"100%",cursor:"pointer",position:"relative",backgroundColor:f.palette.promptsColorPalette.newFinalBg,[f.breakpoints.down("sm")]:{width:"100%"}},onClick:()=>{j.push({pathname:"".concat(x.ij,"marketplace/").concat(e.id,"/details"),query:{dashboard:!0}})},children:[(0,l.jsx)(a.A,{sx:{padding:"8px 16px",minHeight:"184px",borderRadius:"8px",border:"0px, 0px, 1px, 0px",backgroundColor:f.palette.promptsColorPalette.primary,position:"relative",background:(null==e?void 0:e.thumbnail)&&(null==e?void 0:e.thumbnail)!=="null"?"url(".concat(null==e?void 0:e.thumbnail,")"):"url(".concat(null===N.A||void 0===N.A?void 0:N.A.src,")"),backgroundPosition:(null==e?void 0:e.thumbnail)&&(null==e?void 0:e.thumbnail)!=="null"?"top":"bottom",backgroundSize:"cover",backgroundRepeat:"no-repeat",[f.breakpoints.down("sm")]:{minHeight:"132px"}},children:(0,l.jsx)(a.A,{sx:{position:"absolute",top:"8px",left:"8px",width:"fit-content",minWidth:"70px",height:"24px",borderRadius:"4px",padding:"0 7px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid ".concat(f.palette.promptsColorPalette.newBgColor3),background:"".concat((0,k.z)(f.palette.promptsColorPalette.darkbg,.5)),color:f.palette.promptsColorPalette.alwaysWhite,fontSize:"12px",lineHeight:"16px",fontWeight:500,textTransform:"capitalize"},children:(null==e?void 0:e.category)==="null"?"Category":null==e?void 0:e.category})}),(0,l.jsxs)(a.A,{sx:{padding:"8px 0"},children:[(0,l.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"4px"},children:(0,l.jsx)(a.A,{display:"flex",alignItems:"center",gap:"6px",sx:{maxWidth:"100%"},children:(0,l.jsx)(F.A,{placement:"top",title:null==e?void 0:e.name,children:(0,l.jsx)(y.A,{fontSize:"14px",lineHeight:"20px",fontWeight:"500",sx:{maxWidth:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",color:f.palette.promptsColorPalette.mainText2},children:e.name||"Untitled"})})})}),(0,l.jsx)(a.A,{children:(0,l.jsx)(Y,{name:"".concat(e.firstName," ").concat(e.lastName),iconurl:null!=(i=null==e?void 0:e.profilePic)?i:"/images/avatars/16.png"})})]})]},e.id)},t)}))})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",[f.breakpoints.down("sm")]:{pb:"10px"}},children:(0,l.jsx)(O.A,{img:"light"===f.palette.mode?"/images/emptyImage/marketPlace-Light.svg":"/images/emptyImage/marketPlace.svg",title:"No workflows found in the ".concat((0,M.t)(z.c.WORKFLOW_MARKETPLACE_PAGE_CONSTANTS.WORKFLOW_MARKETPLACE_PAGE_TRANSLATION_KEY.WORKFLOW_MARKETPLACE_PAGE_TITLE).toLowerCase()),subText:"",width:H?90:"110",height:H?90:"110"})})})})]}):(0,l.jsx)(C.A,{className:" ".concat(H?"common-border-shadow-2 noEffectsSmall":""),sx:{width:"100%",flexGrow:1,padding:"0",background:"".concat(f.palette.promptsColorPalette.newCardBg," !important")},children:(0,l.jsx)(L.A,{height:"265px",title:(0,M.t)("Time Savers"),subTitle:(0,l.jsxs)(l.Fragment,{children:[(0,M.t)("dashboard.restrictedText1")," ",(0,l.jsx)("br",{}),(0,M.t)("dashboard.restrictedText2")]}),isTransparent:!0})})})};var G=i(48222),U=i(45169);let K=()=>{var e,t,i,o,r,d,p,c,h;let u=(0,s.u)(),m=(0,n.A)(e=>e.breakpoints.down("sm")),g=(0,n.A)(e=>e.breakpoints.down("md")),A=(0,T.useRouter)(),{isFreePlan:f,checkPermissions:j}=(0,I.Ay)(),b=async()=>{try{return await (0,P.api)({endpoint:U.wS,params:{sort:"updatedAt",filter:"All",activeProjectWorkflows:!0}})}catch(e){console.log("error: ",e)}},{data:R,isFetching:W}=(0,v.useQuery)(["projectWorkflowList"],b),H=e=>{let{name:t,iconurl:i="/images/avatars/16.png"}=e;return null!==i?(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:(0,l.jsx)(_.A,{src:i,sx:{width:20,height:20}})}),(0,l.jsx)(a.A,{sx:{fontSize:"14px",lineHeight:"20px",fontWeight:"500",color:u.palette.promptsColorPalette.mainText2},children:t})]}):(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,l.jsx)(_.A,{skin:u.palette.mode,color:"secondary",sx:{width:20,height:20,textTransform:"uppercase",fontWeight:"700",fontSize:"10px",lineHeight:"20px",backgroundColor:u.palette.promptsColorPalette.bgBlackInput,color:u.palette.promptsColorPalette.primary,textAlign:"center"},children:(0,E.I)(t)}),(0,l.jsx)(a.A,{sx:{fontSize:"16px",lineHeight:"24px",fontWeight:"500",color:u.palette.promptsColorPalette.mainText2},children:t})]})};return(0,l.jsx)(l.Fragment,{children:j(A.pathname,G.O.VIEW_WORKFLOW)?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(a.A,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pb:"10px "}
1,children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:u.palette.promptsColorPalette.mainText2,[u.breakpoints.down("sm")]:{fontSize:16}},children:(0,M.t)("workflow.recentWorkflow")}),(null==R||null==(e=R.data)?void 0:e.data)&&(null==R||null==(i=R.data)||null==(t=i.data)?void 0:t.length)>0?(0,l.jsx)(y.A,{component:D(),sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:u.palette.promptsColorPalette.primary,cursor:"pointer",textDecoration:"none",position:"relative",zIndex:"999"},href:"".concat(x.ij,"workflow"),children:(0,M.t)("workflow.viewAll")}):(0,l.jsx)(l.Fragment,{})]}),W?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(w.Ay,{container:!0,spacing:g?2:6,children:null==(o=Array.from({length:g?2:3}))?void 0:o.map((e,t)=>(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsx)(a.A,{children:(0,l.jsxs)(a.A,{sx:{borderRadius:"8px",height:"100%",cursor:"pointer",position:"relative",backgroundColor:u.palette.promptsColorPalette.newFinalBg},children:[(0,l.jsx)(C.A,{variant:"outlined",sx:{padding:"8px 16px",minHeight:"184px",borderRadius:"8px",border:"0px, 0px, 1px, 0px",position:"relative",backgroundSize:"cover",backgroundRepeat:"no-repeat",[u.breakpoints.down("sm")]:{minHeight:"132px",width:"100%"}},children:(0,l.jsx)(a.A,{sx:{position:"absolute",top:"12px",left:"14px"},children:(0,l.jsx)(S.A,{variant:"rectangular",sx:{width:"35px",height:"12px",borderRadius:"2px"}})})}),(0,l.jsxs)(a.A,{sx:{paddingTop:"7px"},children:[(0,l.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"4px"},children:(0,l.jsx)(S.A,{variant:"text",sx:{width:"100%"}})}),(0,l.jsx)(a.A,{sx:{pt:"6px"},children:(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"16px"},children:[(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"text",sx:{width:"50%"}})]})})]})]})})},t))})}):(0,l.jsx)(l.Fragment,{children:(null==R||null==(r=R.data)?void 0:r.data)&&(null==R||null==(p=R.data)||null==(d=p.data)?void 0:d.length)>0?(0,l.jsx)(a.A,{sx:{position:"relative"},children:(0,l.jsx)(w.Ay,{container:!0,spacing:g?2:6,children:null==R||null==(h=R.data)||null==(c=h.data)?void 0:c.slice(0,g?2:3).map((e,t)=>{var i;return(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsxs)(a.A,{className:"common-border-shadow-2 noEffects",sx:{borderRadius:"8px",height:"100%",cursor:"pointer",position:"relative",backgroundColor:u.palette.promptsColorPalette.newFinalBg,[u.breakpoints.down("sm")]:{width:"100%"}},onClick:()=>{A.push({pathname:"".concat(x.ij,"workflow/").concat(e.id,"/preview"),query:{dashboard:!0}})},children:[(0,l.jsx)(a.A,{sx:{padding:"8px 16px",minHeight:"184px",borderRadius:"8px",border:"0px, 0px, 1px, 0px",backgroundColor:u.palette.promptsColorPalette.primary,position:"relative",background:(null==e?void 0:e.thumbnail)&&(null==e?void 0:e.thumbnail)!=="null"?"url(".concat(null==e?void 0:e.thumbnail,")"):"url(".concat(null===N.A||void 0===N.A?void 0:N.A.src,")"),backgroundPosition:(null==e?void 0:e.thumbnail)&&(null==e?void 0:e.thumbnail)!=="null"?"top":"bottom",backgroundSize:"cover",backgroundRepeat:"no-repeat",[u.breakpoints.down("sm")]:{minHeight:"132px"}},children:(0,l.jsx)(a.A,{sx:{position:"absolute",top:"8px",left:"8px",width:"fit-content",minWidth:"70px",height:"24px",borderRadius:"4px",padding:"0 7px",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid ".concat(u.palette.promptsColorPalette.newBgColor3),background:"".concat((0,k.z)(u.palette.promptsColorPalette.darkbg,.5)),color:u.palette.promptsColorPalette.alwaysWhite,fontSize:"12px",lineHeight:"16px",fontWeight:500,textTransform:"capitalize"},children:(null==e?void 0:e.category)?null==e?void 0:e.category:"Category"})}),(0,l.jsxs)(a.A,{sx:{padding:"8px 0"},children:[(0,l.jsx)(a.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{mb:"4px"},children:(0,l.jsx)(a.A,{display:"flex",alignItems:"center",gap:"6px",sx:{maxWidth:"100%"},children:(0,l.jsx)(F.A,{placement:"top",title:null==e?void 0:e.name,children:(0,l.jsx)(y.A,{fontSize:"14px",lineHeight:"20px",fontWeight:"500",sx:{maxWidth:"100%",color:u.palette.promptsColorPalette.mainText2,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:e.name||"Untitled"})})})}),(0,l.jsx)(a.A,{children:(0,l.jsx)(H,{name:"".concat(e.firstname," ").concat(e.lastname),iconurl:null!=(i=e.profilepic)?i:"/images/avatars/16.png"})})]})]},e.id)},t)})})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",[u.breakpoints.down("sm")]:{pb:"10px"}},children:(0,l.jsx)(O.A,{img:"light"===u.palette.mode?"/images/emptyImage/workflow-Light.svg":"/images/emptyImage/workflow.svg",title:"Explore more workflows from the marketplace ",subText:"",width:m?100:"140",height:m?100:"140"})})})})]})}):(0,l.jsx)(C.A,{className:" ".concat(m?"common-border-shadow-2 noEffectsSmall":""),sx:{width:"100%",flexGrow:1,padding:"0",background:"".concat(u.palette.promptsColorPalette.newCardBg," !important")},children:(0,l.jsx)(L.A,{height:"273px",title:(0,M.t)("workflow.recentWorkflow"),subTitle:(0,l.jsxs)(l.Fragment,{children:[(0,M.t)("dashboard.restrictedText1")," ",(0,l.jsx)("br",{}),(0,M.t)("dashboard.restrictedText2")]}),isTransparent:!0})})})};var V=i(84812),Y=i(35610),X=i(33939),J=i(35573),Q=i(84872),q=i(55425),$=i(42850),Z=i(38117),ee=i(81066),et=i(9546),ei=i(37830);let el=e=>{var t,i;let{isPublic:r=!1}=e,d=(0,s.u)();(0,T.useRouter)();let p=(0,f.wA)(),[c,x]=(0,o.useState)([]),h=(0,n.A)(e=>e.breakpoints.down("lg")),u=(0,n.A)(e=>e.breakpoints.down("md")),m=(0,n.A)(e=>e.breakpoints.down("sm")),g=(0,o.useRef)(null),[A,j]=(0,o.useState)("down");(0,o.useEffect)(()=>{let e=g.current;if(!e)return;let t=setInterval(()=>{"down"===A?(e.scrollTop+=1,e.scrollTop+e.clientHeight>=e.scrollHeight&&j("up")):(e.scrollTop-=1,e.scrollTop<=0&&j("down"))},30);return()=>clearInterval(t)},[A]);let{clearPagination:b}=(0,Y.W)({perPageData:50}),{categories:w}=(0,$.x)(),{allModelsCategories:C,isAllModelsCategoriesFetching:I}=(0,f.d4)(e=>e.aiModelsCategories);async function E(){let e=await (0,P.api)({endpoint:r?X.Q6:X.aw,params:{limit:50,skip:0,category:w}});if(!(0,J.lA)(e))return b(),[];if(e&&e.data.data){var t;let i=(null==e||null==(t=e.data)?void 0:t.data)||[];return x([...i]),b(),i}}(0,o.useEffect)(()=>{I||C.length||p((0,Z.y)())},[]);let{isFetching:R,refetch:_}=(0,v.useQuery)(["EXPLORE_HISTORY_LIST",w],E),L=m||u?2:h?4:6;return(0,l.jsxs)(a.A,{sx:{height:"330px",position:"relative",overflow:"hidden",borderRadius:"16px",[d.breakpoints.down("sm")]:{height:"280px"}},children:[(0,l.jsxs)(a.A,{sx:{position:"absolute",top:0,left:0,background:"".concat((0,k.z)(d.palette.promptsColorPalette.whiteColor,.5)," !important"),backdropFilter:"blur(2px) !important",height:"100%",width:"100%",zIndex:"999",display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column",textAlign:"center",padding:"15px",gap:"8px"},children:[(0,l.jsx)(a.A,{sx:{display:"flex",mb:"24px",[d.breakpoints.down("lg")]:{mb:"12px"},svg:{width:"292px",height:"56px",[d.breakpoints.down("lg")]:{width:"165px",height:"33px"}}},children:(0,l.jsx)(ei.A,{icon:"PromptIcon"})}
1),(0,l.jsx)(y.A,{sx:{fontSize:"32px",lineHeight:"40px",fontWeight:"700",color:d.palette.promptsColorPalette.mainText2,[d.breakpoints.down("lg")]:{fontSize:"22px",lineHeight:"30px"}},children:"Unleash Creativity with AI Art"}),(0,l.jsx)(y.A,{sx:{mb:"24px",fontSize:"18px",lineHeight:"24px",fontWeight:"500",color:d.palette.promptsColorPalette.mainText2,[d.breakpoints.down("lg")]:{fontSize:"16px",mb:"12px"}},children:"Explore stunning AI-generated masterpieces and share your own imagination with the world."}),(0,l.jsx)(V.A,{component:D(),size:"sm",variant:"contained",className:"btn-custom br4 common-shadow-one minh32 btn-workflow",color:"primary",href:et.Y.EXPLORE_GALLERY,children:"Explore Now!"})]}),(0,l.jsx)(a.A,{ref:g,component:a.A,className:"hide-all-scroll",sx:{borderRadius:"16px",maxHeight:"330px",overflowY:"auto"},children:(0,l.jsx)(a.A,{children:R?(0,l.jsx)(a.A,{sx:{display:"flex",gap:"14px"},children:null==(i=Array)||null==(t=i.from({length:4}))?void 0:t.map((e,t)=>(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"16px",flexDirection:"column"},children:[(0,l.jsx)(S.A,{variant:"rectangular",width:200,height:100,sx:{borderRadius:"6px"}}),(0,l.jsx)(S.A,{variant:"rectangular",width:200,height:100,sx:{borderRadius:"6px"}})]},t),(0,l.jsx)(S.A,{variant:"rectangular",width:300,height:216,sx:{borderRadius:"6px"}})]}))}):(null==c?void 0:c.length)>0?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(Q.Ay,{columns:L,spacing:2,defaultColumns:L,sequential:!0,sx:{m:0},children:null==c?void 0:c.map((e,t)=>{var i;return(0,l.jsxs)(a.A,{sx:{cursor:"pointer",borderRadius:"8px",position:"relative"},children:[(0,l.jsx)(a.A,{className:"show-item",children:(0,l.jsxs)(y.A,{sx:{position:"absolute",zIndex:99,left:"10px",bottom:"5px",fontWeight:500,fontSize:14,lineHeight:"20px",p:"2px 12px",borderRadius:"15px",color:d.palette.promptsColorPalette.mainText2,background:(0,k.z)(d.palette.promptsColorPalette.whiteColor,.6)},children:[null==e?void 0:e.firstName," ",null==e?void 0:e.lastName]})}),(null==e||null==(i=e.metaData)?void 0:i.thumbnailResult)?(0,l.jsx)(ee.A,{s3ImageUrlList:[null==e?void 0:e.s3Url],autoPlay:!1}):(0,l.jsx)(q.A,{src:null==e?void 0:e.s3Url,alt:null==e?void 0:e.s3Url,width:200,height:200,loading:"lazy",style:{borderRadius:"6px",display:"block",width:"100%",height:"auto",maxWidth:"100%"}})]},t)})})}):(0,l.jsx)(O.A,{img:(d.palette.mode,"/images/emptyImage/galleryimage-light.svg"),width:150,height:150,title:"No images "})})})]})};var eo=i(22023),en=i(37082),ea=i(74850),es=i(3346);let er=()=>{let e=(0,s.u)(),t=(0,T.useRouter)(),{user:i}=(0,c.A)();(0,n.A)(e=>e.breakpoints.down("sm"));let[r,d]=(0,o.useState)(),p=async()=>{try{let t=await (0,P.api)({endpoint:en.FJ,id:null==i?void 0:i.id});if((0,J.lA)(t)){var e;d(null==t||null==(e=t.data)?void 0:e.data)}else d(null)}catch(e){console.log(e)}};return(0,o.useEffect)(()=>{(null==i?void 0:i.id)&&p()},[null==i?void 0:i.id]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pb:"16px",flex:"0",width:"100%"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:e.palette.promptsColorPalette.mainText2,[e.breakpoints.down("sm")]:{fontSize:16}},children:"Social Posts"}),(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:e.palette.promptsColorPalette.primary,cursor:"pointer"},onClick:()=>t.push("".concat(x.ij,"social-community")),children:(0,M.t)("workflow.viewAll")})]}),(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",gap:"16px",[e.breakpoints.down("md")]:{flexDirection:"column"}},children:(0,l.jsx)(es.A.Provider,{value:{userId:null==i?void 0:i.id,userProfileData:r},children:(0,l.jsx)(ea.A,{isHomeComponent:!0})})}),(0,l.jsx)(a.A,{sx:{flex:"0",padding:"1px 0",width:"100%"}})]})};var ed=i(18035),ep=i(4950),ec=i(738),ex=i(19346),eh=i(41532),eu=i(72147);let em=()=>{let e=(0,s.u)(),[t,i]=(0,o.useState)(null),r=(0,n.A)(e=>e.breakpoints.down("sm")),[d,p]=(0,o.useState)(!1),c=async()=>{p(!0),i(await new Promise(e=>{let t=new Date().getTime(),i=new Image;i.src="".concat("https://upload.wikimedia.org/wikipedia/commons/3/3f/Fronalpstock_big.
1jpg","?t=").concat(t),i.onload=()=>{e((0x261c970/((new Date().getTime()-t)/1e3)/1024/1024).toFixed(2))},i.onerror=()=>{e("Error")}})),p(!1)},x=(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",gap:"16px",[e.breakpoints.down("sm")]:{mt:"4px"}},children:t&&!d&&(0,l.jsxs)(y.A,{sx:{fontSize:"14px",lineHeight:"20px",fontWeight:"500",color:e.palette.promptsColorPalette.mainText2,[e.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:"24px"}},children:["Burst Speed: ",(0,l.jsx)("strong",{children:2*t})," Mbps"]})})});return(0,l.jsxs)(l.Fragment,{children:[r?(0,l.jsx)(l.Fragment,{}):x,(0,l.jsx)(a.A,{onClick:c,disabled:d,sx:{padding:"0 12px",backgroundColor:d?e.palette.promptsColorPalette.borderColor:e.palette.promptsColorPalette.primary,color:e.palette.promptsColorPalette.alwaysWhite,borderRadius:"4px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",width:"fit-content",gap:"4px",fontWeight:"500",letterSpacing:"0",minWidth:"100px",cursor:d?"default":"pointer",[e.breakpoints.down("sm")]:{width:"100%"}},children:d?(0,l.jsx)(eu.A,{size:20,color:"inherit"}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(ei.A,{icon:"burstSpeedIcon"})," ",t?(0,M.t)("llm.retestSpeed"):(0,M.t)("llm.testSpeed")]})}),r?x:(0,l.jsx)(l.Fragment,{})]})};var eg=i(85811);let eA=e=>{let{isHomeNewUser:t=!1,isFreeUserHome:i=!1}=e,r=(0,s.u)(),{direction:d}=r,p=(0,f.wA)(),c=(0,n.A)(e=>e.breakpoints.down("sm")),h=(0,o.useRef)(null),[u,m]=(0,o.useState)(!1),[g,A]=(0,o.useState)(!0),[j,b]=(0,o.useState)([]),{allModelsCategories:w,isAllModelsCategoriesFetching:C}=(0,f.d4)(e=>e.aiModelsCategories),[S,T]=(0,o.useState)(!1);(0,o.useEffect)(()=>{C||w.length||p((0,Z.y)())},[]);let I=async()=>{var e,t;let i=await (0,P.api)({endpoint:ep.wM});return null!=(t=null==i||null==(e=i.data)?void 0:e.data)?t:[]},{data:E,isFetching:R}=(0,v.useQuery)(["LLM_HEALTH_CHECK"],I);(0,o.useEffect)(()=>{let e=null==E?void 0:E.sort((e,t)=>{let i=ec.FM.indexOf(e.model),l=ec.FM.indexOf(t.model);return(-1===i?Number.MAX_SAFE_INTEGER:i)-(-1===l?Number.MAX_SAFE_INTEGER:l)});b(e=null==e?void 0:e.map(e=>{var t,i,l,o,n;let a=null!=(l=null==(t=ec.MZ[e.model])?void 0:t.developer)?l:null==e?void 0:e.model,s=null!=(o=null==(i=ec.MZ[e.model])?void 0:i.modelType)?o:x.me.TTT;if(!a)return e;{let t=null!==(n=null==w?void 0:w.find(e=>e.developer===a&&e.modelType===s))&&void 0!==n?n:{};return{...e,...t}}}))},[E,w]);let _="primary",L={chart:{parentHeightOffset:0,offsetX:-13,offsetY:0,type:"bar",height:120,toolbar:{show:!1},sparkline:{enabled:!0}},xaxis:{show:!1},yaxis:{show:!1},tooltip:{enabled:!1},dataLabels:{enabled:!1},plotOptions:{bar:{borderRadius:2,columnWidth:"85%",startingShape:"rounded",endingShape:"rounded"}},grid:{padding:{top:0,right:0,bottom:0,left:0}},theme:{monochrome:{enabled:!0,color:r.palette[_].main}}},O=()=>{let e=h.current;e&&(m(e.scrollLeft>0),A(e.scrollWidth>e.clientWidth+e.scrollLeft))},N=e=>{let t=h.current;t&&t.scrollBy({left:"left"===e?-232:232,behavior:"smooth"})},F={position:"absolute",top:"50%",cursor:"pointer",backgroundColor:"".concat((0,k.z)(r.palette.promptsColorPalette.whiteColor,.8)," !important"),width:"40px",height:"40px",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",transform:"translate(0%, -50%)",svg:{width:"24px",height:"24px"}};function W(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return(0,l.jsxs)(a.A,{sx:{position:"relative"},children:[(0,l.jsx)(a.A,{className:"".concat(c?"hide-all-scroll":""),ref:h,onScroll:O,sx:{pt:"16px",...c?{display:"flex",overflow:"auto",gap:"16px",width:"calc(100% + 32px)",ml:"-16px",px:"16px"}:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(234px, 1fr))",gap:"16px"}},children:null==e?void 0:e.map(e=>{var t,i;return(0,l.jsxs)(a.A,{sx:{width:"100%",border:"1px solid ".concat(r.palette.promptsColorPalette.newBgColor3," !important"),backgroundColor:r.palette.promptsColorPalette.newFinalBg,borderRadius:"8px",overflow:"hidden",p:"8px 16px",[r.breakpoints.down("sm")]:{minWidth:"200px"}},children:[(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",gap:"8px",width:"100%"},children:(0,l.jsxs)(a.A,{sx:{width:"calc(100%)"},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"5px",width:"100%"},children:[(0,l.jsx)("img",{style:{marginBottom:"1px"},alt:(null==e?void 0:e.model)?"".concat(null==e?void 0:e.model,"-logo"):"AI logo",src:"dark"===r.palette.mode?null==e?void 0:e.smallLogoDark:null==e?void 0:e.smallLogoLight}
1),(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:16,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2},noWrap:!0,children:null==e?void 0:e.developer})]}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between",mb:"8px"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:r.palette.promptsColorPalette.subText},children:(0,M.t)("llm.healthStatus")}),(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:r.palette.promptsColorPalette.primary,[r.breakpoints.down("sm")]:{fontSize:16}},children:function(e){var t;let i=e.map(e=>e.avg),l=Math.min(...i),o=Math.max(...i)>3e4?Math.max(...i):3e4,n=i.map(e=>(o-e)/(o-l)*100),a=(t=(null==n?void 0:n.reduce((e,t)=>{var i;return null!=(i=e+t)?i:0},0))/(null==n?void 0:n.length),t.toFixed(2));return(0,J.WJ)(a)+"%"}(null!=(t=null==e?void 0:e.checkly_data)?t:[])})]})]})}),(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:"-18px"},children:(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:8,lineHeight:"12px",color:r.palette.promptsColorPalette.mainText2},children:"100%"})}),(0,l.jsx)(a.A,{sx:{width:"calc(100% + 18px)",display:"flex",alignItems:"center",justifyContent:"flex-start",ml:"ltr"===d?"":"-18px"},children:(0,l.jsx)(ed.A,{type:"bar",options:L,series:[{data:function(e){let t=e.map(e=>e.avg),i=Math.min(...t),l=Math.max(...t)>3e4?Math.max(...t):3e4,o=t.map(e=>(l-e)/(l-i)*100),n=null==e?void 0:e.map((t,i)=>({x:"ltr"===r.direction?i:(null==e?void 0:e.length)-i,y:(null==o?void 0:o[i])||100,fillColor:(null==o?void 0:o[i])?r.palette[_].main:r.palette.error.main}));return(null==n?void 0:n.length)<12?[...n,...Array(12-(null==n?void 0:n.length)).fill(0)]:n}(null!=(i=null==e?void 0:e.checkly_data)?i:[])}]})}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mt:"4px"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:8,lineHeight:"12px",color:r.palette.promptsColorPalette.mainText2},children:"0"}),(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:8,lineHeight:"12px",color:r.palette.promptsColorPalette.mainText2},children:"12h"})]})]},null==e?void 0:e.model)})}),u&&c&&(0,l.jsx)(a.A,{sx:{...F,left:"24px",transform:"translate(0%, -50%);",cursor:"pointer","& svg":{color:r.palette.promptsColorPalette.mainText2}},onClick:()=>N("left"),children:(0,l.jsx)(eg.In,{icon:"tabler:chevron-left",className:"arrow arrow-left"})}),g&&c&&(0,l.jsx)(a.A,{sx:{...F,right:"24px",cursor:"pointer","& svg":{color:r.palette.promptsColorPalette.mainText2}},onClick:()=>N("right"),children:(0,l.jsx)(eg.In,{icon:"tabler:chevron-right",className:"arrow arrow-right"})})]})}return(0,l.jsxs)(a.A,{sx:{width:"100%"},children:[c?(0,l.jsx)(a.A,{children:(0,l.jsxs)(a.A,{children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",mb:"12px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:16}},children:(0,M.t)("llm.title")}),(0,l.jsx)(em,{})]})}):(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap"},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"flex-start",alignItems:"center",gap:"4px",flexWrap:"wrap"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:16}},children:(0,M.t)("llm.title")}),(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:16,lineHeight:"20px",color:r.palette.promptsColorPalette.subText},children:(0,M.t)("llm.subTitle")})]}),(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:"16px",flexWrap:"wrap"},children:[(0,l.jsx)(em,{}),(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:r.palette.promptsColorPalette.primary,cursor:"pointer",whiteSpace:"pre"},onClick:()=>T(!S),children:S?(0,M.t)("workflow.miniMize"):(0,M.t)("workflow.viewAll")})]})]}),function(){var e;if(R)return(0,l.jsx)(ef,{smDown:c,theme:r});if(!(null==j?void 0:j.length))return(0,l.jsx)(eh.A,{});let i=[];if(i=S?null!=j?j:[]:null==j?void 0:j.slice(0,t?4:5),!S)return W(i);let o=Object.groupBy(j,e=>{let{modelType:t}=e;return t});return null==(e=Object.keys(null!=o?o:{}))?void 0:e.map((e,t)=>{let i=o[e];
1return(0,l.jsxs)(a.A,{children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,mt:"16px",lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2},children:(0,ex.Kc)(e)}),W(i)]},t)})}()]})},ef=e=>{let{smDown:t=!1,theme:i}=e;return(0,l.jsxs)(a.A,{className:"".concat(t?"hide-all-scroll":""),sx:{backgroundColor:i.palette.promptsColorPalette.newFinalBg,pt:"16px",...t?{display:"flex",overflow:"auto",gap:"16px",width:"calc(100% + 32px)",ml:"-16px",px:"16px"}:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(234px, 1fr))",gap:"16px"}},children:[[,,,,,].fill(0).map((e,t)=>(0,l.jsxs)(a.A,{sx:{width:"100%",p:"8px 16px",borderRadius:"8px",overflow:"hidden",border:"1px solid ".concat(i.palette.promptsColorPalette.newBgColor3," !important"),[i.breakpoints.down("sm")]:{minWidth:"200px"}},children:[(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",gap:"8px",width:"100%"},children:(0,l.jsxs)(a.A,{sx:{width:"100%"},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",width:"100%",gap:"8px",justifyContent:"space-between"},children:[(0,l.jsx)(S.A,{variant:"circular",sx:{width:"20px",height:"20px"}}),(0,l.jsx)(S.A,{variant:"text",sx:{width:"140px",height:"24px"}})]}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",width:"100%",justifyContent:"space-between"},children:[(0,l.jsx)(S.A,{variant:"text",sx:{width:"92px",height:"24px"}}),(0,l.jsx)(S.A,{variant:"text",sx:{width:"62px",height:"24px"}})]})]})}),(0,l.jsxs)(a.A,{sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"4px",mt:"8px"},children:[(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}}),(0,l.jsx)(S.A,{variant:"circular",sx:{width:"100%",height:"100px",borderRadius:"5px"}})]})]},t))," "]})};var ej=i(60310),eb=i(23667),ew=i(54227),ev=i(15660),ey=i(86452);let eC={state:!1,modelData:{}},eS=e=>{let{libraryData:t=[],refetch:i=async()=>{}}=e,a=(0,T.useRouter)(),r=(0,s.u)(),d=(0,n.A)(e=>e.breakpoints.down("md")),[p,c]=(0,o.useState)(eC);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(w.Ay,{container:!0,spacing:d?2:6,children:t&&t.length>0?t.slice(0,d?2:t.length).map(e=>{var t,i,o,n,s,p,c,x;return(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsxs)(ew.A,{sx:{borderRadius:"12px",padding:"0",gap:"12px",height:"100%",cursor:"pointer",background:d?"".concat(r.palette.promptsColorPalette.tagColor," !important"):"".concat(r.palette.promptsColorPalette.newCardBg)},onClick:()=>{a.push((0,ey.R)(z.c.PROMPT_KITS_HUB_PAGE_CONSTANTS.ROUTES.PREVIEW,{id:null==e?void 0:e.id}))},children:[(0,l.jsxs)(ew.A,{sx:{display:"flex",alignItems:"center",gap:"8px ",padding:"12px 12px 8px 12px"},children:[(0,l.jsx)(ew.A,{sx:{minHeight:"64px",width:"64px",borderRadius:"12px",backgroundColor:r.palette.promptsColorPalette.primary,position:"relative",background:(null==e||null==(t=e.actionObj)?void 0:t.actionLogo)&&(null==e||null==(i=e.actionObj)?void 0:i.actionLogo)!=="null"?"url(".concat(null==e||null==(o=e.actionObj)?void 0:o.actionLogo,")"):"url(".concat(null===N.A||void 0===N.A?void 0:N.A.src,")"),backgroundPosition:(null==e||null==(n=e.actionObj)?void 0:n.actionLogo)&&(null==e||null==(s=e.actionObj)?void 0:s.actionLogo)!=="null"?"top right":"bottom right",backgroundSize:"cover",backgroundRepeat:"no-repeat"}}),(0,l.jsx)(ew.A,{sx:{maxWidth:"calc(100% - 72px)",width:"100%"},children:(0,l.jsx)(ew.A,{display:"flex",alignItems:"center",justifyContent:"space-between",sx:{width:"100%"},children:(0,l.jsxs)(ew.A,{display:"flex",alignItems:"center",gap:"6px",sx:{maxWidth:"calc(100% - 36px)"},children:[(null==e?void 0:e.icon)&&(0,l.jsx)(ei.A,{icon:null==e?void 0:e.icon}),(0,l.jsx)(y.A,{fontSize:"18px",lineHeight:"24px",fontWeight:"500",color:r.palette.promptsColorPalette.mainText2,className:"linebreak2",children:(null==e||null==(p=e.actionObj)?void 0:p.title)||"Untitled"})]})})})]}),(0,l.jsx)(ew.A,{sx:{padding:"0 12px 12px"},children:(null==e||null==(c=e.actionObj)?void 0:c.description)?(0,l.jsx)(y.A,{fontSize:"14px",lineHeight:"20px",fontWeight:"400",color:r.palette.promptsColorPalette.newTextColor,className:"linebreak2",sx:{minHeight:"40px"},children:null==e||null==(x=e.actionObj)?void 0:x.description}):""})]},e.id)},null==e?void 0:e.id)}):null}),(0,l.jsx)(ev.A,{open:p.state,modelData:p.modelData,onModalClose:()=>{c(eC)}})]})};i(61826);var eT=i(51432);let eI=()=>{let e=(0,s.u)(),{checkPermissions:t}=(0,I.Ay)(),i=(0,n.A)(e=>e.breakpoints.down("sm")),o=(0,n.A)(e=>e.breakpoints.down("md"));(0,T.useRouter)();let r=async()=>{try{var e;let t=await (0,P.api)({endpoint:eb.Ob,params:{limit:3,skip:0,sort:"LM"}});if(!(0,J.lA)(t))return[];return(null==t||null==(e=t.data)?void 0:e.data)||[]}catch(e){}},{data:d,refetch:p,isFetching:c}=(0,v.useQuery)(["customActions"],r);async function x(){await p()}return(0,l.jsx)(l.Fragment,{children:t(z.c.PROMPT_KITS_HUB_PAGE_CONSTANTS.ROUTES.LIST,eT.J.VIEW)?(0,l.jsx)(l.Fragment,{children:c?(0,l.jsxs)(w.Ay,{container:!0,spacing:o?2:6,children:[(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsx)(S.A,{variant:"rounded",width:"100%",height:"160px"})}),(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsx)(S.A,{variant:"rounded",width:"100%",height:"160px"})}),o?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(w.Ay,{item:!0,lg:4,md:6,sm:6,xs:6,children:(0,l.jsx)(S.A,{variant:"rounded",width:"100%",height:"160px"})})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",mb:"12px"}
1,children:[(0,l.jsxs)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:e.palette.promptsColorPalette.mainText2,[e.breakpoints.down("sm")]:{fontSize:16}},children:["Explore"," ",(0,M.t)(z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)]}),d&&(null==d?void 0:d.length)>0?(0,l.jsx)(y.A,{component:D(),sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:e.palette.promptsColorPalette.primary,cursor:"pointer",textDecoration:"none",position:"relative",zIndex:"999"},href:z.c.PROMPT_KITS_HUB_PAGE_CONSTANTS.ROUTES.LIST,children:(0,M.t)("workflow.viewAll")}):(0,l.jsx)(l.Fragment,{})]}),d&&(null==d?void 0:d.length)>0?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(eS,{libraryData:d,refetch:x})}):(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center"},children:(0,l.jsx)(O.A,{img:"light"===e.palette.mode?"/images/emptyImage/customAction-Light.svg":"/images/emptyImage/customAction.svg",title:"Create your first agent",subText:""})})]})}):(0,l.jsx)(C.A,{className:" ".concat(i?"common-border-shadow-2 noEffectsSmall":""),sx:{width:"100%",flexGrow:1,padding:"0",background:"".concat(e.palette.promptsColorPalette.newCardBg," !important")},children:(0,l.jsx)(L.A,{height:"200px",title:z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TITLE,subTitle:(0,l.jsxs)(l.Fragment,{children:[(0,M.t)("dashboard.restrictedText1")," ",(0,l.jsx)("br",{}),(0,M.t)("dashboard.restrictedText2")]}),isTransparent:!0})})})};var eP=i(79978),eE=i(24960),eR=i(14568),ek=i.n(eR);let e_=()=>{var e,t,i;let r=(0,s.u)(),{user:d}=(0,c.A)(),[p,h]=(0,o.useState)([]),[u,m]=(0,o.useState)(!1),g=(0,n.A)(e=>e.breakpoints.down("sm")),A=(0,o.useRef)(null),[f,j]=(0,o.useState)(!1),[b,C]=(0,o.useState)(!0),[S,T]=(0,o.useState)(g),[I,E]=(0,o.useState)(null),[R,_]=(0,o.useState)({}),[L,O]=(0,o.useState)(!0),{paginationData:N,nextPage:F,clearPagination:W}=(0,Y.W)({perPageData:10});async function H(){let e=await (0,P.api)({endpoint:ep.mn,params:{limit:10,skip:0}});if(!(0,J.lA)(e))return W(),[];if(e&&e.data.data){var t;let i=(null==e||null==(t=e.data)?void 0:t.data)||[];return h([...i]),0===i.length?O(!1):O(!0),W(),i}}(0,o.useEffect)(()=>{I&&_(null==p?void 0:p.find(e=>e.id===I))},[p,I]);let{isFetching:D}=(0,v.useQuery)(["GET_LEARNING_MEDIA"],H);async function z(){if(N.page<=1)return;let e={limit:(null==p?void 0:p.length)>=10?null==N?void 0:N.pageSize:10,skip:(0,J.kn)(N.page,N.pageSize)},t=await (0,P.api)({endpoint:ep.mn,params:e});if(!(0,J.lA)(t))return[];{var i;let e=(null==t||null==(i=t.data)?void 0:i.data)||[];return h(t=>[...t,...e]),e.length<N.pageSize?O(!1):O(!0),e}}let{isLoading:B}=(0,v.useQuery)(["GET_LEARNING_MEDIA",null==N?void 0:N.page,null==N?void 0:N.pageSize],z),G=(0,o.useMemo)(()=>{var e;return![x.td.FREE,x.td.CREATOR].includes(null==d||null==(e=d.planDetails)?void 0:e.planName)},[null==d||null==(e=d.planDetails)?void 0:e.planName]),U=e=>{let t=A.current;t&&t.scrollBy({left:"left"===e?-232:232,behavior:"smooth"})},K={position:"absolute",top:"44px",cursor:"pointer",backgroundColor:"".concat((0,k.z)(r.palette.promptsColorPalette.whiteColor,.8)," !important"),width:"40px",height:"40px",borderRadius:"50%",display:"flex",justifyContent:"center",alignItems:"center",svg:{width:"24px",height:"24px"}};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",flex:"0",width:"100%",marginBottom:"15px"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:16}},children:"Latest Tutorials"}),g?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:r.palette.promptsColorPalette.primary,cursor:"pointer"},onClick:()=>T(!S),children:S?(0,M.t)("workflow.miniMize"):(0,M.t)("workflow.viewAll")})]}),p&&(null==p?void 0:p.length)?(0,l.jsxs)(l.Fragment,{children:[g?(0,l.jsxs)(a.A,{sx:{position:"relative"},children:[(0,l.jsx)(a.A,{className:"".concat(g?"hide-all-scroll":""),ref:A,onScroll:()=>{let e=A.current;e&&(j(e.scrollLeft>0),C(e.scrollWidth>e.clientWidth+e.scrollLeft))},sx:{display:"flex",overflow:"auto",gap:"16px",width:"calc(100% + 32px)",ml:"-16px",px:"16px"},children:null==(t=p.slice(0,S||g?p.length:3))?void 0:t.map((e,t)=>(0,l.jsxs)(a.A,{sx:{minWidth:"240px",display:"flex",flexDirection:"column",cursor:"pointer",gap:"8px",position:"relative",borderRadius:"4px"},onClick:()=>{m(!0),E(null==e?void 0:e.id)},children:[(0,l.jsxs)(a.A,{sx:{position:"relative",display:"flex",borderRadius:"4px",overflow:"hidden",border:"1px solid ".concat(r.palette.promptsColorPalette.newBgColor3," !important")},children:[(0,l.jsx)(a.A,{sx:{position:"absolute",width:"32px",height:"32px",inset:"0",margin:"auto",width:"32px",height:"32px"},children:(0,l.jsx)(ei.A,{icon:"PlayVideoIcon"})}),g?(0,l.jsx)(ek(),{muted:!0,playing:!1,url:null==e?void 0:e.videoS3Url,controls:!1,className:"cw-full ch-full cd-flex ",config:{file:{attributes:{controlsList:"nodownload",disablePictureInPicture:!0}}},style:{overflow:"hidden",display:"flex"}}):(0,l.jsx)(q.A,{src:null==e?void 0:e.imageS3Url,alt:"".concat(null==e?void 0:e.name),width:312,height:G?176:239,style:{width:"100%",objectFit:"cover",background:r.palette.promptsColorPalette.primary}})]}
1,t),(0,l.jsx)(a.A,{children:(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:16,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:14}},children:null==e?void 0:e.name})})]},t))}),f&&(0,l.jsx)(a.A,{sx:{...K,left:"24px",cursor:"pointer","& svg":{color:r.palette.promptsColorPalette.mainText2}},onClick:()=>U("left"),children:(0,l.jsx)(eg.In,{icon:"tabler:chevron-left",className:"arrow arrow-left"})}),b&&(0,l.jsx)(a.A,{sx:{...K,right:"24px",cursor:"pointer","& svg":{color:r.palette.promptsColorPalette.mainText2}},onClick:()=>U("right"),children:(0,l.jsx)(eg.In,{icon:"tabler:chevron-right",className:"arrow arrow-right"})})]}):(0,l.jsx)(w.Ay,{container:!0,spacing:g?4:6,children:null==(i=p.slice(0,S?p.length:3))?void 0:i.map((e,t)=>(0,l.jsx)(w.Ay,{item:!0,xs:12,sm:12,md:4,children:(0,l.jsxs)(a.A,{sx:{display:"flex",flexDirection:"column",cursor:"pointer",gap:"8px",position:"relative",borderRadius:"4px"},onClick:()=>{m(!0),E(null==e?void 0:e.id)},children:[(0,l.jsxs)(a.A,{sx:{position:"relative",display:"flex",borderRadius:"4px",overflow:"hidden",border:"1px solid ".concat(r.palette.promptsColorPalette.newBgColor3," !important")},children:[(0,l.jsx)(a.A,{sx:{position:"absolute",width:"32px",height:"32px",inset:"0",margin:"auto",width:"32px",height:"32px"},children:(0,l.jsx)(ei.A,{icon:"PlayVideoIcon"})}),g?(0,l.jsx)(ek(),{muted:!0,playing:!1,url:null==e?void 0:e.videoS3Url,controls:!1,className:"cw-full ch-full cd-flex ",config:{file:{attributes:{controlsList:"nodownload",disablePictureInPicture:!0}}},style:{overflow:"hidden",display:"flex"}}):(0,l.jsx)(q.A,{src:null==e?void 0:e.imageS3Url,alt:"".concat(null==e?void 0:e.name),width:312,height:G?176:239,style:{width:"100%",objectFit:"cover",background:r.palette.promptsColorPalette.primary}})]},t),(0,l.jsx)(a.A,{children:(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:16,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:14}},children:null==e?void 0:e.name})})]})},t))}),(0,l.jsx)(eE.Y,{onEnter:()=>{p.length>=N.pageSize&&!B&&!D&&L&&F()}}),B&&S?(0,l.jsx)(a.A,{sx:{justifyContent:"center",display:"flex",alignItems:"center",pt:"10px"},children:(0,l.jsx)(eu.A,{color:"secondary"})}):(0,l.jsx)(l.Fragment,{})]}):(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",fontWeight:700,fontSize:18,lineHeight:"24px",height:"80%",width:"100%",color:r.palette.promptsColorPalette.mainText2},children:(0,M.t)("dashboard.noData")}),u&&(0,l.jsx)(eP.A,{handleClose:()=>{m(!1)},open:u,videoURL:R.videoS3Url,size:"sm",manageNewUi:!0,maxWidth:"1155px",newBodyCss:{padding:"0 !important",overflow:"hidden"}})]})};var eL=i(14729);let eO=()=>{var e,t;let{user:i}=(0,c.A)(),o=(0,n.A)(e=>e.breakpoints.down("sm")),r=(0,s.u)();return(0,l.jsx)(C.A,{className:"noShadow",sx:{padding:"16px"},children:(0,l.jsxs)(a.A,{children:[(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,l.jsx)(eL.A,{alt:null!=(t=null==i?void 0:i.firstName)?t:"USER",src:(null==i?void 0:i.profilePic)||"/images/avatars/16.png",sx:{width:"56px",height:"56px"}}),(0,l.jsx)(a.A,{sx:{display:"flex",width:"calc(100% - 64px)",...o?{justifyContent:"space-between",width:"100%"}:{justifyContent:"space-between"}},children:(e=[{title:(0,M.t)("community.Posts"),value:null==i?void 0:i.totalPost},{title:(0,M.t)("community.Followers"),value:null==i?void 0:i.totalFollowers},{title:(0,M.t)("community.Following"),value:null==i?void 0:i.totalFollowing}],e.map((e,t)=>(0,l.jsxs)(a.A,{sx:{width:64,height:56,py:"6px",letterSpacing:0},children:[(0,l.jsx)(y.A,{sx:{fontSize:18,fontWeight:700,lineHeight:"24px",display:"flex",justifyContent:"center",color:r.palette.promptsColorPalette.mainText2},children:e.value}),(0,l.jsx)(y.A,{sx:{fontSize:14,fontWeight:500,lineHeight:"20px",color:r.palette.promptsColorPalette.subText,display:"flex",justifyContent:"center"},children:e.title})]},t)))})]}),(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",pt:"8px",gap:"4px"},children:(0,l.jsxs)(y.A,{sx:{fontSize:14,fontWeight:500,lineHeight:"20px",color:r.palette.promptsColorPalette.mainText2},children:[null==i?void 0:i.firstName," ",null==i?void 0:i.lastName]})})]})})};var eN=i(83067),eM=i(13865);let eF=e=>{var t,i,o,r,d,p,c,x,h,u,m,g,A,f,j,b,w,E,R,k,_,O,N,W,H,D,z,B,G,U,K,V,Y,X,J;let{isNewUser:Q=!1}=e,q=(0,s.u)(),$=(0,n.A)(e=>e.breakpoints.down("sm")),Z=(0,T.useRouter)(),{checkPermissions:ee}=(0,I.Ay)();(0,n.A)(e=>e.breakpoints.down("md"));let ei=async()=>{try{return await (0,P.api)({endpoint:ep.QI})}catch(e){}},{data:el,isFetching:eo}=(0,v.useQuery)(["StorageDashboardData"],ei);return(0,l.jsx)(l.Fragment,{children:ee(Z.pathname,eM.C.VIEW)?(0,l.jsxs)(C.A,{className:"noShadow",sx:{px:"16px",py:"8px",width:Q?"auto":"100%"},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px"}
1,children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:"18px",lineHeight:"24px",color:q.palette.promptsColorPalette.mainText2,[q.breakpoints.down("sm")]:{fontSize:16}},children:(0,M.t)("storage.storage")}),ee(Z.pathname,eM.C.VIEW)&&(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"20px",cursor:"pointer",color:q.palette.promptsColorPalette.primary},onClick:()=>{Z.push("".concat(et.Y.MY_STORAGE))},children:(0,M.t)("View")})]}),eo?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(S.A,{variant:"rounded",width:"100%",height:36,sx:{mb:"8px",mt:"16px"}}),(0,l.jsx)(S.A,{variant:"rounded",width:"100%",height:8,sx:{mb:"8px",mt:"16px"}}),(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"8px",minHeight:"20px",justifyContent:"flex-start",alignItems:"center",width:"100%"},children:[(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"circular",width:20,height:20}),(0,l.jsx)(S.A,{variant:"circular",width:20,height:20})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{pt:"24px",display:"flex",justifyContent:"space-between",alignItems:"center",[q.breakpoints.down("sm")]:{pt:"20px"}},children:[(0,l.jsxs)(y.A,{sx:{fontWeight:700,fontSize:"24px",lineHeight:"32px",color:q.palette.promptsColorPalette.mainText2,[q.breakpoints.down("sm")]:{fontSize:"20px",lineHeight:"24px"}},children:["number"==typeof(null==el||null==(i=el.data)||null==(t=i.data)?void 0:t.totalUsage)?(null==el||null==(r=el.data)||null==(o=r.data)?void 0:o.totalUsage)<1048576?"".concat(((null==el||null==(p=el.data)||null==(d=p.data)?void 0:d.totalUsage)/1024).toFixed()," MB"):"".concat(((null==el||null==(x=el.data)||null==(c=x.data)?void 0:c.totalUsage)/1024/1024).toFixed()," GB"):"0MB"," ","/"," ",(null==el||null==(u=el.data)||null==(h=u.data)?void 0:h.totalStorage)?(m=(null==el||null==(A=el.data)||null==(g=A.data)?void 0:g.totalStorage)/1024/1024,m.toFixed()):0," ","GB"]}),(0,l.jsxs)(y.A,{sx:{fontWeight:500,fontSize:"14px",lineHeight:"20px",color:q.palette.promptsColorPalette.newTextColor},children:[null==el||null==(j=el.data)||null==(f=j.data)?void 0:f.totalFiles," ",(0,M.t)("storage.files")]})]}),(0,l.jsxs)(a.A,{children:[(0,l.jsx)(a.A,{sx:{display:"flex",mb:"12px",mt:"16px",width:"100%",borderRadius:"4px",overflow:"hidden",background:q.palette.promptsColorPalette.newFinalBg},children:(b=[{color:"#498AE4",title:(0,M.t)("storage.documents"),size:null==el||null==(E=el.data)||null==(w=E.data)?void 0:w.totalDocumentSize},{color:q.palette.error.main,title:(0,M.t)("storage.photos"),size:null==el||null==(k=el.data)||null==(R=k.data)?void 0:R.totalPhotoSize},{color:"#A049E4",title:(0,M.t)("storage.videos"),size:null==el||null==(O=el.data)||null==(_=O.data)?void 0:_.totalVideoSize},{color:"#49E4C8",title:(0,M.t)("storage.audios"),size:null==el||null==(W=el.data)||null==(N=W.data)?void 0:N.totalAudioSize},{color:q.palette.promptsColorPalette.newFinalBg,title:(0,M.t)("storage.remainingStorage"),size:null==el||null==(D=el.data)||null==(H=D.data)?void 0:H.availableStorage}],b.map((e,t)=>{var i,o;return(0,l.jsx)(F.A,{placement:"bottom-start",title:(0,l.jsxs)(a.A,{sx:{textAlign:"center"},children:[(0,l.jsx)(y.A,{sx:{fontSize:"14px",lineHeight:"20px",fontWeight:"500",mb:"10px",color:q.palette.promptsColorPalette.mainText2},children:null==e?void 0:e.title}),(0,l.jsx)(y.A,{sx:{fontSize:"20px",lineHeight:"28px",fontWeight:"600",color:q.palette.promptsColorPalette.mainText2},children:(0,eN.z3)(null==e?void 0:e.size)})]}),children:(0,l.jsx)("div",{className:"progress-bar-success",role:"progressbar",style:{width:"".concat(e.size/(null==el||null==(o=el.data)||null==(i=o.data)?void 0:i.totalStorage)*100,"%"),minWidth:(null==e?void 0:e.size)===0?0:"".concat(4,"%"),height:"8px",backgroundColor:e.color,fontWeight:"600",borderRight:" ".concat((null==e?void 0:e.size)===0||(null==e?void 0:e.title)==="Remaining Storage"?"px":"1px solid ".concat(q.palette.promptsColorPalette.newBgColor3))}},t)},t)}))}),(0,l.jsx)(a.A,{sx:{display:"flex",gap:"8px"},children:(z=[{title:(0,M.t)("storage.documents"),color:"#498AE4",size:null==el||null==(G=el.data)||null==(B=G.data)?void 0:B.totalDocuments},{title:(0,M.t)("storage.photos"),color:q.palette.error.main,size:null==el||null==(K=el.data)||null==(U=K.data)?void 0:U.totalPhotos},{title:(0,M.t)("storage.videos"),color:"#A049E4",size:null==el||null==(Y=el.data)||null==(V=Y.data)?void 0:V.totalVideos}
1,{title:(0,M.t)("storage.audios"),color:"#49E4C8",size:null==el||null==(J=el.data)||null==(X=J.data)?void 0:X.totalAudios}],z.map((e,t)=>(0,l.jsx)(a.A,{children:(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"8px",alignItems:"center"},children:[(0,l.jsx)(a.A,{sx:{width:"12px",height:"12px",backgroundColor:null==e?void 0:e.color,borderRadius:"50%"}}),(0,l.jsx)(y.A,{sx:{fontWeight:400,fontSize:12,lineHeight:"16px",color:q.palette.promptsColorPalette.mainText2},children:null==e?void 0:e.title})]},t)},t)))})]})]})]}):(0,l.jsx)(C.A,{className:"".concat($?"common-border-shadow-2 noEffectsSmall":""),sx:{width:"100%",flexGrow:1,padding:"0",background:"".concat(q.palette.promptsColorPalette.newCardBg," !important")},children:(0,l.jsx)(L.A,{height:"100%",title:(0,M.t)("storage.storage"),spacing:!1,subTitle:(0,l.jsxs)(l.Fragment,{children:[(0,M.t)("dashboard.restrictedText1")," "]}),isTransparent:!0})})})};var eW=i(61575),eH=i(48399);let eD=()=>{let e=(0,s.u)(),t=(0,n.A)(e=>e.breakpoints.down("sm")),i=(0,c.A)(),{setActiveProfileTab:r,openProfileModal:d,setOpenProfileModal:p,profileCompletionAPI:x,ProfileIsCompleted:h}=(0,eo.n)();return(0,o.useEffect)(()=>{x()},[]),(0,l.jsxs)(C.A,{className:"noShadow",sx:{...t?{mt:"4px",padding:"12px 16px"}:{p:"15px 16px"}},children:[(0,l.jsxs)(a.A,{children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:"18px",lineHeight:"24px",color:e.palette.promptsColorPalette.mainText2,[e.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:"20px"}},children:(0,M.t)("dashboard.title")}),(0,l.jsx)(y.A,{sx:{fontWeight:400,fontSize:"14px",lineHeight:"20px",pt:"8px",color:e.palette.promptsColorPalette.subText},children:(0,M.t)("dashboard.subTitle")}),(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,l.jsx)(V.A,{onClick:()=>p(!0),sx:{fontWeight:500,fontSize:"14px",lineHeight:"20px",mt:"16px",mt:0,[e.breakpoints.down("md")]:{mt:"15px"}},className:"btn-custom btn-blue common-border-shadow-2 minh32 br6",children:(0,M.t)("dashboard.completeProfile")})})]}),d&&(0,l.jsx)(eW.A,{handleClose:()=>{p(!1),r(1),i.setProfileDataWithProfileApiCall(),x()},open:d,title:(0,M.t)("dashboard.completeProfile"),content:(0,l.jsx)(eH.S,{}),size:"sm",titlePosition:"start",manageNewUi:!0,maxWidth:"900px"})]})},ez={src:"/_next/static/media/homeGiftCardBgImage.eb715783.png"},eB={src:"/_next/static/media/homeGiftCardBgImageLight.8d32dbad.png"},eG={src:"/_next/static/media/HomeGiftCard.92527a32.png"},eU=()=>{let{push:e}=(0,T.useRouter)(),t=(0,s.u)();return(0,l.jsx)(C.A,{className:"pad-0 noShadow",children:(0,l.jsxs)(a.A,{sx:{backgroundImage:"url(".concat("light"===t.palette.mode?eB.src:ez.src,")"),backgroundRepeat:"no-repeat",backgroundSize:"100% 100%",height:"200px",display:"flex",justifyContent:"space-between",width:"100%"},children:[(0,l.jsxs)(a.A,{sx:{pl:"20px",pt:"20px",display:"flex",flexDirection:"column",gap:"12px"},children:[(0,l.jsxs)(a.A,{children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:24,lineHeight:"32px",color:t.palette.promptsColorPalette.mainText2},children:"Give the"}),(0,l.jsxs)(y.A,{sx:{fontWeight:700,fontSize:24,lineHeight:"32px",display:"inline-flex",alignItems:"center",justifyContent:"center",gap:"8px",flexWrap:"wrap",color:t.palette.promptsColorPalette.mainText2},children:["Gift of ",(0,l.jsx)(ei.A,{icon:"PromptSmallIcon"})," "]})]}),(0,l.jsx)(V.A,{className:"btn-custom btn-blue common-shadow-one spacing4 br6",sx:{minHeight:"25px !important"},onClick:()=>e({pathname:"".concat(x.ij,"billing-payments/gift-card/"),query:{dashboard:!0}}),children:"Explore"})]}),(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"flex-end"},children:(0,l.jsx)(q.A,{src:null==eG?void 0:eG.src,height:200,width:173})})]})})},eK=()=>{let e=(0,s.u)(),[t,i]=(0,o.useState)(0),r=((0,n.A)(e=>e.breakpoints.down("md")),{chart:{parentHeightOffset:0,toolbar:{show:!1},sparkline:{enabled:!0},background:"transparent"},tooltip:{enabled:!1},dataLabels:{enabled:!1},stroke:{width:2.5,curve:"smooth"},grid:{show:!1,padding:{top:2,bottom:17}},fill:{color:"#232323"},theme:{monochrome:{enabled:!0,color:e.palette.success.main}},xaxis:{labels:{show:!1},axisTicks:{show:!1},axisBorder:{show:!1}},yaxis:{show:!1}}),d=async()=>{let e=await (0,P.api)({endpoint:ep.T3});if((0,J.lA)(e)){var t;i(null==e||null==(t=e.data)?void 0:t.data)}};return(0,o.useEffect)(()=>{d()},[]),(0,l.jsxs)(C.A,{className:"noShadow",sx:{p:"16px 24px",width:"100%",height:"100%"},children:[(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",gap:"8px"}}),(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"24px",alignItems:"center"},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",flexDirection:"column",gap:"8px",alignItems:"center"},children:[(0,l.jsx)(ei.A,{icon:"HomeCreditCardIcon"}),(0,l.jsxs)(a.A,{sx:{textAlign:"center"}
1,children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:32,lineHeight:"40px",color:e.palette.promptsColorPalette.mainText2},children:t}),(0,l.jsx)(y.A,{sx:{fontWeight:400,fontSize:16,lineHeight:"24px",color:e.palette.promptsColorPalette.newTextColor,whiteSpace:"pre"},children:(0,M.t)("dashboard.solved")})]})]}),(0,l.jsx)(a.A,{sx:{width:"100%"},children:(0,l.jsx)(ed.A,{type:"line",height:96,options:r,series:[{data:[6,35,25,61,32,84]}]})})]})]})};var eV=i(43136),eY=i(74234),eX=i(81142),eJ=i(51804),eQ=i(59627);i(12670);var eq=i(6397),e$=i(21131),eZ=i(18189);let e0=e=>{var t;let{isNewUserDashboard:i=!1}=e,r=(0,s.u)(),p=(0,T.useRouter)(),c=(0,f.wA)(),[u,m]=(0,o.useState)(""),g=(0,n.A)(r.breakpoints.down("lg")),A=(0,n.A)(r.breakpoints.up("md"));(0,n.A)(e=>e.breakpoints.down("sm"));let[j,b]=(0,o.useState)(!1),[w,v]=(0,o.useState)(!1),{setActiveUser:S}=(0,eQ.g)(),{joinSocialSocketByRoomId:I}=(0,d.T)(),[P,R]=(0,o.useState)(crypto.randomUUID());(0,o.useEffect)(()=>{let e;e=setInterval(()=>{(0,h.N)()&&clearInterval(e),R(crypto.randomUUID())},500)},[(0,h.N)()]),(0,o.useEffect)(()=>{var e;return null===h.io||void 0===h.io||null==(e=h.io.socket)||e.on("CHAT_MESSAGE_CREATE",e=>{var t,i,l;(null==e||null==(t=e.messageData)?void 0:t.chatId)===u&&w||c((0,eq.eJ)({chatId:null==e||null==(i=e.messageData)?void 0:i.chatId,message:null==e||null==(l=e.messageData)?void 0:l.message,isUpdateCount:!0}))}),()=>{var e;null===h.io||void 0===h.io||null==(e=h.io.socket)||e.off("CHAT_MESSAGE_CREATE")}},[null===h.io||void 0===h.io||null==(t=h.io.socket)?void 0:t.on,P]);let{connectionSessionList:k,readChatMessage:_}=(0,eJ.Y)();return(0,o.useEffect)(()=>{var e,t;if(!u&&(0,h.N)()&&(null==k||null==(e=k[0])?void 0:e.id)){let e=null==k||null==(t=k[0])?void 0:t.id,i=null==k?void 0:k.find(t=>t.id===e);i&&I(null==i?void 0:i.roomName)}},[u,k,P]),(0,l.jsx)(C.A,{className:"noShadow",sx:{height:"396px",width:i?"100%":"312px",position:"relative",display:"flex",alignItems:"flex-start",flexDirection:"column",[r.breakpoints.down("md")]:{maxWidth:"100%",width:"100%"},[r.breakpoints.down("sm")]:{height:"100%"}},children:w?(0,l.jsx)(eX.r,{selectedId:u,isNewUser:!1,children:(0,l.jsx)(eZ.A,{hidden:g,mdAbove:A,dispatch:c,statusObj:{busy:"error",away:"warning",online:"success",offline:"secondary"},getInitials:E.I,handleLeftSidebarToggle:()=>b(!j),setSelectedId:m,isHomeComponent:!0,setChatIsOpen:v})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{sx:{px:"16px",pt:"16px",display:"flex",justifyContent:"space-between",alignItems:"center",flex:"0",width:"100%"},children:[(0,l.jsx)(y.A,{sx:{fontWeight:700,fontSize:18,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,[r.breakpoints.down("sm")]:{fontSize:16}},children:"Com's Channel"}),(0,l.jsx)(y.A,{sx:{fontWeight:500,fontSize:14,lineHeight:"20px",color:r.palette.promptsColorPalette.primary,cursor:"pointer"},onClick:()=>p.push("".concat(x.ij,"chat")),children:(0,M.t)("workflow.viewAll")})]}),(0,l.jsx)(a.A,{className:"common-scroll",sx:{p:"16px",display:"flex",flexDirection:"column",gap:"16px",overflow:"auto",flex:"1%",width:"100%",[r.breakpoints.down("sm")]:{maxHeight:"60dvh"}},children:(null==k?void 0:k.length)>0?null==k?void 0:k.map((e,t)=>{var i;return(0,l.jsxs)(a.A,{sx:{display:"flex",gap:"16px"},children:[(0,l.jsx)(a.A,{children:(0,l.jsx)(eL.A,{sx:{width:44,height:44},src:null!=(i=null==e?void 0:e.profilePic)?i:"/images/avatars/16.png",alt:"".concat(null==e?void 0:e.firstName," ").concat(null==e?void 0:e.lastName)})}),(0,l.jsxs)(a.A,{sx:{width:"100%",cursor:"pointer"},onClick:()=>{c((0,eq.O2)(e)),S(e),c((0,eq.Ni)(e)),m(null==e?void 0:e.id),v(!0),I(null==e?void 0:e.roomName),(null==e?void 0:e.count)&&_({chatId:e.id})},children:[(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsxs)(y.A,{sx:{fontWeight:700,fontSize:16,lineHeight:"24px",color:r.palette.promptsColorPalette.mainText2,overflow:"hidden",textOverflow:"ellipsis",width:"150px",
1whiteSpace:"nowrap"},children:[null==e?void 0:e.firstName," ",null==e?void 0:e.lastName]}),(0,l.jsx)(y.A,{sx:{fontWeight:400,fontSize:14,lineHeight:"20px",whiteSpace:"pre",color:r.palette.promptsColorPalette.newTextColor},children:(0,l.jsx)(e$.c4,{utcTimestamp:(null==e?void 0:e.lastUpdate)*1e3,timeFormate:"hh:mm A",showOnlyTime:!0})})]}),(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,l.jsx)(y.A,{className:"linebreak1",sx:{fontWeight:400,fontSize:14,lineHeight:"20px",color:r.palette.promptsColorPalette.newTextColor,width:0!==Number(null==e?void 0:e.count)?"calc(100% - 50px)":"100%"},children:null==e?void 0:e.lastmessage}),0!==Number(null==e?void 0:e.count)&&(0,l.jsx)(y.A,{sx:{height:"20px",width:"20px",borderRadius:"50%",backgroundColor:r.palette.promptsColorPalette.primary,color:r.palette.promptsColorPalette.alwaysWhite,display:"flex",justifyContent:"center",alignItems:"center",fontWeight:400,fontSize:11},children:null==e?void 0:e.count})]})]})]},t)}):(0,l.jsx)(y.A,{sx:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%"},children:"No Chat"})})]})})};var e1=i(79165),e2=i(55832);let e4=()=>{let e=(0,s.u)(),{isOrganizationAdmin:t}=(0,c.A)(),{completeWholeProfile:i}=(0,eo.n)(),o=(0,n.A)(e=>e.breakpoints.down("sm")),r=(0,n.A)(e=>e.breakpoints.down("md")),{checkPermissions:d}=(0,I.Ay)();return(0,l.jsx)(a.A,{sx:{display:"flex",flexDirection:"column",gap:"8px",width:"calc(100% - 320px)",[e.breakpoints.down("md")]:{maxWidth:"100%",width:"100%"},[e.breakpoints.down("sm")]:{gap:"4px"}},children:(0,l.jsxs)(w.Ay,{container:!0,spacing:o?4:10,children:[r&&(0,l.jsx)(w.Ay,{item:!0,xs:12,sx:{pt:"0 !important"},children:(0,l.jsx)(eO,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(a.A,{sx:{maxWidth:d(null===e1.$||void 0===e1.$?void 0:e1.$.AI_LABS,e2.B.AI_LABS_VIEW)?"814px":"100%",margin:"0 auto"},children:(0,l.jsx)(ej.A,{isHomePageComponent:!0})})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(B,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(K,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eI,{})}),r?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eF,{})}),!i()&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eD,{})}),t?(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eU,{})}):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eK,{})})]}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(el,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(er,{})})," ",r?(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eV.u,{children:(0,l.jsx)(eY.X,{children:(0,l.jsx)(e0,{})})})}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(e_,{isHomeLeftSideComponent:!0})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eA,{isHomeNewUser:!0})})]})})},e6=()=>{let{completeWholeProfile:e}=(0,eo.n)(),t=(0,s.u)(),{isOrganizationAdmin:i}=(0,c.A)();return(0,l.jsxs)(a.A,{sx:{display:"flex",position:"sticky",top:"80px",flexDirection:"column",gap:"16px",minWidth:"312px",maxWidth:"312px",height:"100%",[t.breakpoints.down("md")]:{maxWidth:"100%",width:"100%"},[t.breakpoints.down("sm")]:{gap:"16px"}},children:[(0,l.jsx)(eO,{}),(0,l.jsx)(eV.u,{children:(0,l.jsx)(eY.X,{children:(0,l.jsx)(e0,{})})}),(0,l.jsx)(eF,{}),!e()&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(eD,{}),i?(0,l.jsx)(eU,{}):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsx)(eK,{})]})},e5=e=>{let{completeWholeProfile:t}=e,i=(0,s.u)(),r=(0,n.A)(e=>e.breakpoints.down("sm")),d=(0,n.A)(e=>e.breakpoints.down("md")),[p,c]=(0,o.useState)(0);return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{maxWidth:"1320px",width:r?"calc(100% - 16px)":"calc(100% - 24px)",margin:"0 auto",padding:r?"16px 0":"40px 0"},children:(0,l.jsxs)(a.A,{sx:{display:"flex",justifyContent:"center",gap:"24px",[i.breakpoints.down("md")]:{flexDirection:"column"},[i.breakpoints.down("sm")]:{gap:"0"}},children:[(0,l.jsx)(e4,{height:p}),d?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(e6,{setHeight:c})]})})})},e3={src:"/_next/static/media/card-1.c27a2a0f.png",height:243,width:424,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAATlBMVEV0UlZmNypaLCRyQzlKJyF/OTJkPzhzc3h3OTpTNDaTEhGfLR9fQ0mBS0JWRD9kJSGaT0psJhtLVVs3JSWlf4BmHh16JBtjUlWdaGWsnJjf2L2pAAAACXRSTlP7/////
1////P5/i6XGAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMklEQVR4nAXBCQLAEAwEwEWCuFo3//+oGZwQ9rjNgdc05ncFHKNW1RKyJuqfsoCIsE94Kn8BkmF6VToAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5},e8={src:"/_next/static/media/card-2.0e6e5c57.png",height:479,width:848,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAATlBMVEUzNDI6ZnEsHRweIyYsO0IHExkjFgoRDQwbEhAdNkBCOzdRP0JiPyozHxE4Ixs3Ly4nVWFqaGJaVEUof45VoKgaZXcUKTBovsZyoqM0R0mkp4KYAAAACnRSTlP++v///fn1/f361nYbnwAAAAlwSFlzAAALEwAACxMBAJqcGAAAADNJREFUeJwFwQcCwCAIBLATbFG0da//f9QE4qzxHi8YIajGD3O0TPQ71L52SSSICnuYnwshTgGXPWwYpwAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:5},e7={src:"/_next/static/media/card-3.bceed76c.png",height:243,width:424,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAKlBMVEUDJDoAKUAIFCgCMkciTmAHaHkNYXENQFRWSVJASlYASF0aHi+8jH1hY2kpXMK7AAAAAnRSTlP+/T+gj6oAAAAJcEhZcwAACxMAAAsTAQCanBgAAAArSURBVHicJcbHDQAgDACxS0il7L8uEvhlVD3GHIISlv5iZT+9TwgoqzrhAg4CAKg2ir2vAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5},e9=()=>{let e=(0,s.u)(),{checkPermissions:t}=(0,I.Ay)(),i=[{image:e3,title:"Create powerful images with Image Studio Light",description:"",btnText:"Try Now!",url:et.Y.LORA_PLAYGROUND,isPermissionKey:t(et.Y.LORA_PLAYGROUND)},{image:e8,title:"Explore AI Prompts from the Prompts Hub",description:"",btnText:"Try Now!",url:et.Y.PROMPT_HUB_REPO,isPermissionKey:t(et.Y.PROMPT_HUB_REPO)},{image:e7,title:"Discover cutting-edge AI tools to increase efficiency",description:"",btnText:"Try Now!",url:et.Y.AI_TOOLS,isPermissionKey:t(et.Y.AI_TOOLS)}],o={maxWidth:"100%",width:"100%",objectFit:"cover",height:"auto",minHeight:"240px",borderRadius:"8px",marginBottom:"8px"},n={fontSize:"26px",lineHeight:"36px",fontWeight:"700",color:e.palette.promptsColorPalette.mainText2,[e.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:"24px"}};return(0,l.jsx)(w.Ay,{container:!0,spacing:6,children:i.map((t,i)=>(0,l.jsx)(w.Ay,{item:!0,xs:12,md:6,lg:4,children:(0,l.jsxs)(a.A,{sx:{width:"100%"},children:[(0,l.jsx)(q.A,{src:t.image,alt:"card",width:423,style:{...o}}),(0,l.jsx)(y.A,{variant:"h2",sx:{...n,marginBottom:t.description?"8px":0},children:t.title}),t.description&&(0,l.jsx)(y.A,{variant:"body1",sx:{fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:e.palette.promptsColorPalette.subText,[e.breakpoints.down("sm")]:{fontSize:"14px",lineHeight:"20px"}},children:t.description}),(null==t?void 0:t.isPermissionKey)&&(0,l.jsx)(V.A,{component:D(),className:"btn-custom btn-blue common-shadow-one",sx:{minHeight:"40px !important",borderRadius:"40px !important",marginTop:"24px",[e.breakpoints.down("sm")]:{marginTop:"12px"}},href:t.url,children:t.btnText})]})},i))})},te={src:"/_next/static/media/createProblem.385a1e1a.png",height:328,width:460,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAMAAADJ2y/JAAAADFBMVEUbHR8eICIZGx0mLDX8KhGQAAAAAXRSTlPqADnTAAAAAAlwSFlzAAALEwAACxMBAJqcGAAAACVJREFUeJw1yLENADAMgDAg//9cpVIYGIxpzmCWI1aL/Kcsp3I9CEEAQV54zaoAAAAASUVORK5CYII=",blurWidth:8,blurHeight:6},tt={src:"/_next/static/media/systemArange.d4158904.png",height:351,width:375,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAElBMVEUXGBobHB4hIiRlamtAQkM3ODrFgiFzAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAJUlEQVR4nGNgYmKAACZGGAPGYmZmYGQEsVlYoVJQPkgNAwOIBQAFCwAntIBJZQAAAABJRU5ErkJggg==",blurWidth:8,blurHeight:7},ti=()=>{let e=(0,s.u)(),{checkPermissions:t}=(0,I.Ay)(),i=(0,n.A)(e=>e.breakpoints.down("sm")),o={fontSize:"28px",lineHeight:"38px",fontWeight:"700",color:e.palette.promptsColorPalette.mainText2,marginBottom:"8px",[e.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:"24px"}},r={fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:"".concat(e.palette.promptsColorPalette.subText),[e.breakpoints.down("sm")]:{fontSize:"14px"}},d=[{title:"Create problem solving workflows and publish in ".concat((0,M.t)(z.c.WORKFLOW_MARKETPLACE_PAGE_CONSTANTS.WORKFLOW_MARKETPLACE_PAGE_TRANSLATION_KEY.WORKFLOW_MARKETPLACE_PAGE_TITLE).toLowerCase()," to enjoy more creative income"),subTitle:"Design efficient workflows, save time, and unlock your creative potential.",imgSrc:te,btnText:"Create Now",url:et.Y.WORKFLOW_LIST,isPermissionKey:t(et.Y.WORKFLOW_LIST)},{title:"System of ".concat((0,M.t)(z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)," working as a team"),subTitle:"Effortlessly build, deploy, and manage a team of ".concat((0,M.t)(z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)," in seconds—no tech expertise needed. Pre-made ").concat((0,M.t)(z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)," ready to join your AI team."),imgSrc:tt,btnText:"Try It Now",url:et.Y.CUSTOM_ACTIONS,isPermissionKey:t(et.Y.CUSTOM_ACTIONS)}];return(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(w.Ay,{container:!0,spacing:6,children:null==d?void 0:d.map((t,n)=>(0,l.jsxs)(w.Ay,{item:!0,xs:12,sm:12,md:6,children:[(0,l.jsx)(a.A,{sx:{background:e.palette.promptsColorPalette.black300,padding:1===n?i?"16px 16px 0 16px":"35px 35px 0 35px":i?"16px":"35px",borderRadius:"4px",display:"flex",minHeight:i?213:384,maxHeight:i?213:384}
1,children:(0,l.jsx)(q.A,{src:null==t?void 0:t.imgSrc,width:560,height:315,style:{width:"100%",maxWidth:"100%",height:"auto",objectFit:"contain",...1===n?{maxHeight:"350px"}:{maxHeight:"327px"}},alt:"hero-image",className:"responsiveImg"})}),(0,l.jsxs)(a.A,{sx:{marginTop:"16px"},children:[(0,l.jsx)(y.A,{variant:"h2",sx:{...o},children:null==t?void 0:t.title}),(0,l.jsx)(y.A,{sx:{...r,...1===n?{minHeight:"62px"}:{}},children:null==t?void 0:t.subTitle}),(null==t?void 0:t.isPermissionKey)&&(0,l.jsx)(V.A,{component:D(),className:"btn-custom btn-blue common-shadow-one",sx:{minHeight:"40px !important",borderRadius:"40px !important",marginTop:"24px"},href:t.url,children:t.btnText})]})]},n))})})},tl={src:"/_next/static/media/video.97c7df6b.jpg"};var to=i(73964),tn=i(71733),ta=i(99434),ts=i(71948),tr=i(79219),td=i(50705),tp=i(55527),tc=i(34728),tx=i(49548),th=i(9126),tu=i(24159),tm=i(22861),tg=i(43654),tA=i(28707),tf=i(75769),tj=i(98222),tb=i(26105),tw=i(4254);let tv={generationType:"",afterSubmit:async()=>{},afterClickOnCompareSessions:()=>{},isSingleCategoryModel:!0,chatId:"",chatSessionList:[],setStreamMessageToASession:()=>{},setChatSessionConfig:()=>{},addNewChatSession:()=>{},getALLModelsCategories:()=>{},setResetAllChatSessions:()=>{},addChatHistoryBasedOnId:()=>{},setChatId:()=>{},setChangeSessionModel:()=>{},setSelectedGenerationModel:()=>{},selectedGenerationModel:"",selectedImages:[],setSeletedImages:()=>{}
1,developerSelectionModel:{modelState:!1,chatSessionId:""},setDeveloperSelectionModel:()=>{},settingModelOpen:!1,setSettingModalOpen:()=>{},isMutipleSessionActive:!1,setIsMutipleSessionActive:()=>{},isViewAll:!1,setIsViewAll:()=>{},developerModelSearchValue:"",setDeveloperModelSearchValue:()=>{},showfinalWOTextModels:{},showfinalTextModels:{},onSubmit:()=>{},clickOnCompareSessions:()=>{}},ty={chatId:null,chatSessionList:[],aiModelList:[],syncChatInputText:"",syncInputFileValue:"",syncMediaFiles:[],syncInputFile2Value:"",syncChatSessions:[],chatHistoryData:{total:0,historyData:[]},isChatSessionNewStarted:!1,aiModelsLoader:!1,syncChatLoader:!1,isAnySessionChatStated:!1,routeModelType:"",flagForRefetchChatHistory:!1,syncChatDropdownValue:"",defaultAiLabsRoute:"".concat(x.ij,"ai-labs/").concat(tf.wPc.TEXT_TO_TEXT,"/new-chat/")},tC=(0,o.createContext)(tv),tS=e=>{var t;let{children:i,values:n=tv}=e,{generationType:a="",afterSubmit:s=async()=>{},afterClickOnCompareSessions:r=()=>{}}=n,d=(0,T.useRouter)(),p=(0,f.wA)(),c=(0,o.useMemo)(()=>!0,[]),{allModelsCategories:h,isAllModelsCategoriesFetching:u}=(0,f.d4)(e=>e.aiModelsCategories);(0,o.useEffect)(()=>{u||h.length||p((0,Z.y)())},[a]);let[m,g]=(0,o.useState)(ty),[A,j]=(0,o.useState)(x.me.CREATE_TEXT),[b,w]=(0,o.useState)([]),[v,y]=(0,o.useState)({modelState:!1,
1chatSessionId:""}),[C,S]=(0,o.useState)(!1),[I,P]=(0,o.useState)(!1),[E,R]=(0,o.useState)(!1),[k,_]=(0,o.useState)(""),[L,O]=(0,o.useState)({}),[N,M]=(0,o.useState)({}),[F,W]=(0,o.useState)(!1),{handleCreateNewChat:H}=(0,tg.A)({currentSelectedGeneration:a||x.me.CREATE_VIDEO}),{getAiModelsDefaultConfig:D}=(0,tb.A)({});(0,o.useEffect)(()=>{var e;let t=(null===ex.tp||void 0===ex.tp?void 0:ex.tp[null==d||null==(e=d.query)?void 0:e.modelType])||x.me.CREATE_TEXT;c?j(a||t):j(t)},[null==d||null==(t=d.query)?void 0:t.modelType,a,c]);let z=(0,o.useMemo)(()=>{if(h&&h.length>0&&A){let e=(0,tj.tH)(A);return h.filter(t=>e.includes(t.modelType)&&t.display)||[]}},[h,A]);(0,o.useEffect)(()=>{if(z&&(null==z?void 0:z.length)>0){let e=Object.groupBy(z.filter(e=>e.developer),e=>{let{developer:t}=e;return t});O(Object.groupBy(z.filter(e=>e.categoryOfModel),e=>{let{categoryOfModel:t}=e;return t})),M(e)}},[z]);let B={setDefaultAiLabsRoute:e=>{m.defaultAiLabsRoute=e,g({...m})},setChatHistoryData:e=>{let{total:t=null,historyData:i=[],isMerge:l=!1}=e,o={};t&&(o.total=t),i&&(o.historyData=l?[...m.chatHistoryData.historyData,...i]:i),m.chatHistoryData=o,g({...m})},setImageToImageSyncChatDropdownValue:e=>{m.syncChatDropdownValue=e,g({...m})},setChatSessionDropdownValue:e=>{let{chatSessionDropdownValue:t,chatSessionId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:i,updatedObject:{chatSessionDropdownValue:t}}),g({...m})},removeImageFromChatMessages:e=>{let{chatSessionId:t,urlToRemove:i}=e,l={chatSessionList:[...removeChatImageUrls((findDataArrayOfObject({array:m.chatSessionList,idKey:"chatSessionId",idToFind:t})||{chatSessionList:[]}).chatList,i)]};m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:l}),g({...m})},setRouteModelType:e=>{m.routeModelType=e,g({...m})},setFlagForRefetchChatHistory:e=>{m.flagForRefetchChatHistory=e,g({...m})},setIsAnySessionChatStated:e=>{m.isAnySessionChatStated=e,g({...m})},setAiModelListLoader:e=>{m.aiModelsLoader=e,g({...m})},setSyncChatLoader:e=>{m.syncChatLoader=e,g({...m})},setChatId:e=>{m.chatId=e,g({...m})},setIsChatSessionNewStarted:e=>{m.isChatSessionNewStarted=e,g({...m})},setAiModelsList:e=>{m.aiModelList=e,g({...m})},addNewChatSession:e=>
1{let{chatSessionId:t,chatAiModelId:i,config:l}=e;m.chatSessionList=[...m.chatSessionList,(0,to.Ur)(t,i,l)],g({...m})},addChatHistoryBasedOnId:e=>{let{chatSessionId:t,chatAiModelId:i,chatList:l,config:o=null,status:n=tf.g71.COMPLETED,executionId:a="",isRandomSeed:s=!0,useWebSearch:r=!1,errorMessageByModel:d=""}=e;m.chatSessionList=[...m.chatSessionList,(0,to.RJ)({chatSessionId:t,chatAiModelId:i,chatList:l,config:o,status:n,executionId:a,isRandomSeed:s,useWebSearch:r,errorMessageByModel:d})],g({...m})},removeChatSession:e=>{let{chatSessionId:t}=e,i=m.chatSessionList.filter(e=>e.chatSessionId!==t);m.chatSessionList=[...i],g({...m})},setIsNewChatStarted:e=>{let{chatSessionId:t,isNewChatStarted:i,isStream:l=!1}=e;l||(m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{isNewChatStarted:i}})),g({...m})},setAiModelId:e=>{let{chatSessionId:t,chatAiModelId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatAiModelId:i}}),g({...m})},setChatListData:e=>{let{chatSessionId:t,chatList:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatList:i}}),g({...m})},setChatMessageData:e=>{let{chatSessionId:t,message:i,role:l,s3Url:o}=e,n=findDataArrayOfObject({array:m.chatSessionList,idKey:"chatSessionId",idToFind:t})||{chatList:[]};m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatList:[...n.chatList,{message:i,role:l,s3Url:o}]}}),g({...m})},setChatSessionLoders:e=>{let{chatSessionId:t,loader:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{loader:i}}),g({...m})},setChunkSessionLoader:e=>{let{chatSessionId:t,isChunkLoader:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{isChunkLoader:i}}),g({...m})},setChatSessionConfig:e=>{let{chatSessionId:t,config:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{config:i}}),g({...m})},setResetAllChatSessions:()=>{m.chatId="hello",m.chatSessionList=[],m.syncChatInputText="",m.syncInputFileValue="",m.syncMediaFiles=[],m.syncInputFile2Value="",m.syncChatSessions=[],m.syncChatLoader=!1,m.isChatSessionNewStarted=!1,g({...m})},setResetSelectedChatSession:e=>{let{chatSessionId:t}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatList:[],chatSessionId:crypto.randomUUID(),isSessionIdReceived:!1,loader:!1,isNewChatStarted:!1,roomId:crypto.randomUUID(),signal:"",chatInputText:"",isChatSessionSync:!0,errorMessageByModel:"",status:tf.g71.COMPLETED,executionId:"",isRandomSeed:!0}
1}),g({...m})},setChatSessionId:e=>{let{chatSessionId:t,chatSessionBackendId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatSessionId:i}}),g({...m})},setChatInputText:e=>{let{chatSessionId:t,chatInputText:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatInputText:i}}),g({...m})},setUseWebSearch:e=>{let{useWebSearch:t,chatSessionId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:i,updatedObject:{useWebSearch:t}}),g({...m})},setSyncChatInput:e=>{let{syncChatInputText:t}=e;m.syncChatInputText=t,g({...m})},setSyncChatInputFileValue:e=>{let{syncInputFileValue:t,isFile2:i=!1,isReset:l=!1}=e;l?(m.syncInputFileValue="",m.syncInputFile2Value=""):i?m.syncInputFile2Value=t:m.syncInputFileValue=t,g({...m})},setSyncMediaFilesChange:e=>{let{syncMediaFiles:t,isMerge:i=!0}=e;i?m.syncMediaFiles=[...m.syncMediaFiles,...t]:m.syncMediaFiles=t,g({...m})},setSyncChatSessions:e=>{let{chatSessionId:t,isChatSessionSync:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{isChatSessionSync:i}}),g({...m})},setStatus:e=>{let{chatSessionId:t,status:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{status:i}}),g({...m})},setExecutionId:e=>{let{chatSessionId:t,executionId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{executionId:i}}),g({...m})},setIsRandomSeed:e=>{let{chatSessionId:t,isRandomSeed:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{isRandomSeed:i}}),g({...m})},removeChatHistoryBasedOnId:e=>{let{historyId:t}=e,i=m.chatHistoryData.historyData.filter(e=>e.id!==t);m.chatHistoryData.historyData=[...i],g({...m})},setStreamMessageToASession:e=>{var t;let{chatSessionId:i,chunk:l}=e,o=findDataArrayOfObject({array:m.chatSessionList,idKey:"chatSessionId",idToFind:i})||{chatList:[]},n={},a=[...null==o?void 0:o.chatList];a[a.length-1]={...a[a.length-1],message:(null==(t=a[a.length-1])?void 0:t.message)+l},n.chatList=a,m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:i,updatedObject:n})},setSessionSignal:e=>{let{chatSessionId:t,signal:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{signal:i,isNewChatStarted:!1,loader:!1}}),g({...m})},setSessionRoomId:e=>{let{chatSessionId:t,roomId:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{roomId:i,isNewChatStarted:!1,loader:!1}}),g({...m})},setErrorMessageOfModel:e=>{let{chatSessionId:t,errorMessageByModel:i}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{errorMessageByModel:i}}),g({...m})},setNumberOfGenerations:e=>{let{chatSessionId:t,numberOfGenerations:i=1}=e;m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{numberOfGenerations:i}})},setRemoveRecentRegeneratedChat:e=>{let{chatSessionId:t}=e,i=(findDataArrayOfObject({array:m.chatSessionList,idKey:"chatSessionId",idToFind:t})||{chatList:[]}).chatList.slice(0,-1);m.chatSessionList=(0,tw.R)({idKey:"chatSessionId",array:m.chatSessionList,idToUpdate:t,updatedObject:{chatList:[...i]}}),g({...m})}};async function G(e){let{chatAiModelId:t,chatSessionId:i}=e,l=await D(t);B.setAiModelId({chatSessionId:i,chatAiModelId:t}),B.setChatSessionConfig({chatSessionId:i,config:l}),B.setResetSelectedChatSession({chatSessionId:i})}async function U(){var e,t;let i=null==(e=tf.GJI[a])?void 0:e[0];i||(i=null==(t=tf.GJI[x.me.CREATE_VIDEO])?void 0:t[0]);let l=await D(i);B.addNewChatSession({chatSessionId:crypto.randomUUID(),chatAiModelId:i,config:l})}(0,o.useEffect)(()=>{B.setResetAllChatSessions(),U()},[n]);let K={...n,...B,...m,setSelectedGenerationModel:j,selectedGenerationModel:A,selectedImages:b,setSeletedImages:w,developerSelectionModel:v,setDeveloperSelectionModel:y,settingModelOpen:I,setSettingModalOpen:P,isMutipleSessionActive:E,setIsMutipleSessionActive:R,isViewAll:F,setIsViewAll:W,setChangeSessionModel:G,developerModelSearchValue:k,setDeveloperModelSearchValue:_,showfinalWOTextModels:N,showfinalTextModels:L,isSingleCategoryModel:c};async function V(){await s(K)}async function Y(){await afterCli(K)}return K.onSubmit=V,K.clickOnCompareSessions=Y,(0,l.jsx)(tC.Provider,{value:{...K},children:i})},tT=tC.Consumer;var tI=i(9395),tP=i(26088),tE=i(10085),tR=i(8589),tk=i(38152),t_=i(90738),tL=i(40901);let tO=e=>{let{isHomePageComponent:t=!1,isOnlyVideoHomePage:i=!1,...r}=e,d=(0,s.u)(),{checkPermissions:p,getDefaultValidCategories:c,hasModelPermission:h}=(0,I.Ay)(),u=(0,n.A)(e=>e.breakpoints.down("sm")),{setSelectedGenerationModel:m,selectedGenerationModel:g,selectedImages:A,developerSelectionModel:j,setDeveloperSelectionModel:b,settingModelOpen:w,setSettingModalOpen:v,setChangeSessionModel:C,setIsMutipleSessionActive:S,isViewAll:P,setIsViewAll:E,developerModelSearchValue:R,setDeveloperModelSearchValue:k,showfinalWOTextModels:_,showfinalTextModels:L,syncChatInputText:O,clickOnCompareSessions:N,allCurrentSelectedModel:W}=((0,n.A)(e=>e.breakpoints.down("md")),(null==r?void 0:r.isSingleCategoryModel)?r:(0,tc.sn)()),H=(0,f.wA)();(0,T.useRouter)();let{handleCreateNewChat:D}=(0,tg.A)({currentSelectedGeneration:g,addNewChatSession:null==r?void 0:r.addNewChatSession}),{chatAiModelId:B,chatSessionId:G,config:U,handleSendMsg:K,isChatSessionSync:V,disableSendMessageButtonsConditions:Y,mediaFiles:X,setMsg:J,msg:Q,uploadImageModel:q,setUploadImageModel:$,isGeneralFileUploadingAccept:Z,imgSrc:ee,imgSrc2:et,dropzoneKey:el,setDropzoneKey:eo,dropdownMenuValue:en,setDropdownMenuValue:ea,handleInputImageChange:es,handleNewMediaFileChange:er,handleInputImageChange2:ed,getInputProps:ep,getRootProps:ec,categoryDataWithFile:ex,isDragging:eh,isSingleCategoryModel:eu,handleInputImageReset:em,handleRemovedMediaFile:eg,sessionFiles:eA,useWebSearch:ef,useThinkLonger:ej,handleUseWebSearchChange:eb,handleUseThinkLongerChange:ew,isFileRequiredCheck:ev,getErrorMessage:ey,isModelIncluideFiles:eC,handleCanvasImageOpenModel:eS,...eT}=(0,tx.a)(),{chatSessionList:eI=[],isAnySessionChatStated:eP,syncInputFileValue:eE="",syncInputFile2Value:eR="",syncMediaFiles:ek=[]}=eu?eT:(0,f.d4)(e=>e.aiLabs),{getCategoryDataByCategoryId:e_}=(0,th.Y)(),{allModelsCategories:eL,isAllModelsCategoriesFetching:eO,allUserRolesPermissionArray:eN}=(0,f.d4)(e=>e.aiModelsCategories),eM=[x.me.TTT,x.me.ITT].includes(null==ex?void 0:ex.modelType),eF=(0,o.useMemo)(()=>{var e;let t=c(W,tg.K[g].parentKeys);return e_(B||aiModelId||(null==(e=t[0])?void 0:e.id))},[B]),eW=e=>({".MuiTabs-flexContainer":{gap:"8px",borderBottom:"none",flexWrap:"wrap",[e.breakpoints.down("sm")]:{justifyContent:"center",alignItems:"center"}},"&.MuiTabs-root":{borderBottom:"none"},"& .MuiTabs-indicator":{display:"none !important"},[e.breakpoints.down("md")]:{flexWrap:"wrap"}}),eH=e=>({gap:"4px",flex:1,padding:t?"9px 8px":"9px 10px",minHeight:"40px",minWidth:t?"125px":"80px",fontSize:"14px !important",display:"flex",fontWeight:"500",lineHeight:"20px",borderRadius:"100px",color:e.palette.promptsColorPalette.newTextColor,border:"1px solid ".concat(e.palette.promptsColorPalette.newBgColor3),"&.Mui-selected":{border:"1px solid ".concat(e.palette.promptsColorPalette.primary," !important"),backgroundColor:e.palette.promptsColorPalette.tagColor,color:e.palette.promptsColorPalette.sidebarIconColor},[e.breakpoints.down("md")]:{minWidth:t?"132px":"136px"},[e.breakpoints.down("sm")]:{maxWidth:t?"132px":"136px",fontSize:"12px",gap:"4px"}}),eD={fontSize:"16px !important",lineHeight:"22px",fontWeight:"500"},ez=(e,t)=>{var i,l;m(t);let o=null===tf.GJI||void 0===tf.GJI||null==(i=tf.GJI[t])?void 0:i[0],n=c(eL,tg.K[t].parentKeys);C({chatAiModelId:eB?o:null==(l=n[0])?void 0:l.id,chatSessionId:G})},eB=(0,tA.VS)(),eG=async()=>
1{if(null==r?void 0:r.isSingleCategoryModel)await N();else if(eI.length<5){var e;S(!0);let t=null!=(e=null===tf.GJI||void 0===tf.GJI?void 0:tf.GJI[g])?e:[],i=tg.K[g],l=eB?t:c(W,i.parentKeys);(null==l?void 0:l.length)>=1&&(l=null==(l=null==(l=null==l?void 0:l.filter(e=>null==W?void 0:W.some(t=>t.id===e)))?void 0:l.filter(e=>e!==B))?void 0:l.slice(0,2)),null==l||l.forEach(e=>{D(!1,eB?e:null==e?void 0:e.id)})}},eU=async e=>{e.preventDefault();!Y()&&(V?O:Q)&&(S(!0),K())},eK=(0,o.useMemo)(()=>{if(eL&&(null==eL?void 0:eL.length)>0){let e=[null===x.me||void 0===x.me?void 0:x.me.TTVI,null===x.me||void 0===x.me?void 0:x.me.ITV];return eL.filter(t=>e.includes(t.modelType)&&t.display&&tj.iZ.includes(t.id)&&h(t))||[]}},[eL]);return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(a.A,{textAlign:(null==eA?void 0:eA.length)>0?"center":i?"start":"center",sx:{[d.breakpoints.down("sm")]:{minHeight:"inherit",display:"flex",flexDirection:"column",justifyContent:"space-between"}},children:[i?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(y.A,{sx:{fontSize:"30px",lineHeight:"40px",fontWeight:"700",color:d.palette.promptsColorPalette.mainText2,marginBottom:"16px",[d.breakpoints.down("sm")]:{fontSize:"16px",lineHeight:"24px",marginBottom:"8px"}},children:"Create extraordinary AI videos with your imagination"}),(0,l.jsx)(y.A,{sx:{fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:d.palette.promptsColorPalette.subText,marginBottom:"16px",[d.breakpoints.down("sm")]:{fontSize:"14px",lineHeight:"20px",marginBottom:"8px"}},children:"Create Amazing videos with [prompts.ai] Video Generator. Just type your idea and watch AI generate top-quality videos for you. Make Videos with AI now! We have various models to choose from"}),(null==eF?void 0:eF.id)?(0,l.jsx)(a.A,{sx:{mb:"16px",display:"flex",alignItems:"center",justifyContent:"center",[d.breakpoints.down("sm")]:{marginBottom:"8px"}},children:(0,l.jsxs)(a.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",gap:"10px",...eD,backgroundColor:d.palette.promptsColorPalette.newCardBg,padding:u?"3px 8px":"8px 12px",borderRadius:"100px",cursor:"pointer"},onClick:()=>b({modelState:!0,chatSessionId:G}),children:[(0,l.jsxs)(a.A,{sx:{minWidth:"150px",textAlign:"left",display:"inline-flex",alignItems:"center",justifyContent:"flex-start"},children:[(null==eF?void 0:eF.smallLogoDark)?(0,l.jsx)("img",{style:{width:u?"20px":"24px",height:u?"20px":"24px",marginRight:"5px",marginBottom:"1px"},alt:"IMAGE",src:"dark"===d.palette.mode?null==eF?void 0:eF.smallLogoDark:null==eF?void 0:eF.smallLogoLight}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(y.A,{sx:{color:d.palette.promptsColorPalette.mainText2,...eD,[d.breakpoints.down("sm")]:{fontSize:"14px !important",lineHeight:"20px"}},noWrap:!0,children:null==eF?void 0:eF.displayName})," "]}),(0,l.jsx)(ei.A,{icon:"DownArrowImageDropdown",color:d.palette.promptsColorPalette.mainText2})]})}):(0,l.jsx)(l.Fragment,{}),eK&&(null==eK?void 0:eK.length)>0?(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:"8px",flexWrap:"wrap"},children:null==eK?void 0:eK.map((e,t)=>(0,l.jsxs)(a.A,{onClick:()=>{eT.setChangeSessionModel({chatAiModelId:null==e?void 0:e.id,chatSessionId:G})},sx:{minHeight:u?"32px":"40px",borderRadius:"40px",padding:u?"3px 12px":"6px 16px",fontSize:u?"14px !important":"16px !important",fontWeight:"500",lineHeight:"20px",borderRadius:"100px",display:"flex",alignItems:"center",cursor:"pointer",gap:"4px",...(null==e?void 0:e.id)===B?{border:"1px solid ".concat(d.palette.promptsColorPalette.primary," !important"),backgroundColor:d.palette.promptsColorPalette.tagColor,color:d.palette.promptsColorPalette.sidebarIconColor}:{border:"1px solid ".concat(d.palette.promptsColorPalette.newBgColor3),background:d.palette.promptsColorPalette.newInputColor,color:d.palette.promptsColorPalette.newTextColor}},children:[(0,l.jsx)("img",{style:{width:u?"20px":"24px",height:u?"20px":"24px"},alt:"IMAGE OF MODEL",src:"dark"===d.palette.mode?null==e?void 0:e.smallLogoDark:null==e?void 0:e.smallLogoLight}),null==e?void 0:e.displayName]},t))}):(0,l.jsx)(l.Fragment,{})]}):(0,l.jsxs)(l.Fragment,{children:[u&&(null==eF?void 0:eF.id)?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(a.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",gap:"10px",maxWidth:u?"calc(100% - 115px)":"
1140px",backgroundColor:d.palette.promptsColorPalette.newCardBg,padding:"3px 8px",borderRadius:"100px",margin:"16px auto 10px auto",cursor:"pointer"},onClick:()=>b({modelState:!0,chatSessionId:G}),children:[(0,l.jsxs)(a.A,{sx:{textAlign:"left",display:"inline-flex",alignItems:"center",justifyContent:"flex-start"},children:[(null==eF?void 0:eF.smallLogoDark)?(0,l.jsx)("img",{style:{marginRight:"5px",marginBottom:"1px"},alt:"IMAGE",src:"dark"===d.palette.mode?null==eF?void 0:eF.smallLogoDark:null==eF?void 0:eF.smallLogoLight}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(y.A,{sx:{color:d.palette.promptsColorPalette.mainText2,fontSize:"14px !important",lineHeight:"20px",fontWeight:"500"},noWrap:!0,children:null==eF?void 0:eF.displayName})," "]}),(0,l.jsx)(ei.A,{icon:"DownArrowImageDropdown",color:d.palette.promptsColorPalette.mainText2})]})}):(0,l.jsx)(l.Fragment,{}),(0,l.jsxs)(a.A,{children:[(0,l.jsx)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"center",margin:t?"0 0 10px":u?"0 0 10px 0":"120px 0 16px 0",svg:{width:u?"129px":"165px",height:u?"31px":"40px"}},children:(0,l.jsx)(ei.A,{icon:"PromptIcon"})}),(0,l.jsx)(y.A,{sx:{...{fontSize:u?"16px !important":"24px !important",lineHeight:u?"24px":"30px",fontWeight:"700"},mb:u?"32px":0,color:d.palette.promptsColorPalette.mainText2},children:"Save. Solve. Create."})]}),!u&&(null==eF?void 0:eF.id)?(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(a.A,{sx:{display:"inline-flex",alignItems:"center",justifyContent:"space-between",gap:"10px",...eD,backgroundColor:d.palette.promptsColorPalette.newCardBg,padding:"8px 12px",borderRadius:"100px",marginTop:t?"24px":"64px",cursor:"pointer"},onClick:()=>{(null==W?void 0:W.length)!==0&&b({modelState:!0,chatSessionId:G})},children:[(0,l.jsxs)(a.A,{sx:{minWidth:"150px",textAlign:"left",display:"inline-flex",alignItems:"center",justifyContent:"flex-start"},children:[(null==eF?void 0:eF.smallLogoDark)&&(null==W?void 0:W.length)!==0?(0,l.jsx)("img",{style:{width:"24px",height:"24px",marginRight:"5px",marginBottom:"1px"},alt:"IMAGE",src:"dark"===d.palette.mode?null==eF?void 0:eF.smallLogoDark:null==eF?void 0:eF.smallLogoLight}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(y.A,{sx:{color:d.palette.promptsColorPalette.mainText2,...eD},noWrap:!0,children:(null==W?void 0:W.length)!==0?(0,l.jsx)(l.Fragment,{children:null==eF?void 0:eF.displayName}):(0,l.jsx)(l.Fragment,{children:" No Available Model"})})," "]}),(null==W?void 0:W.length)!==0?(0,l.jsx)(ei.A,{icon:"DownArrowImageDropdown",color:d.palette.promptsColorPalette.mainText2}):(0,l.jsx)(l.Fragment,{})]})}):(0,l.jsx)(l.Fragment,{}),u?(0,l.jsx)(tr.Ay,{value:g,children:(0,l.jsx)(a.A,{sx:{borderBottom:0},children:(0,l.jsx)(td.A,{onChange:ez,"aria-label":"lab API tabs example",sx:eW(d),children:null===tj.Uo||void 0===tj.Uo?void 0:tj.Uo.map((e,t)=>(0,l.jsx)(ts.A,{label:null==e?void 0:e.name,value:null==e?void 0:e.value,sx:eH(d),icon:(0,l.jsx)(a.A,{sx:{minWidth:"20px",display:"flex"},children:(0,l.jsx)(ei.A,{icon:null==e?void 0:e.icon})}),iconPosition:"start"},t))})})}):(0,l.jsx)(l.Fragment,{})]}),(0,l.jsxs)(a.A,{component:"form",...Z()?ec():{},children:[(0,l.jsx)(a.A,{sx:{width:"100%",textAlign:"left",marginTop:t?"24px":"32px"},children:ey({customStyles:{margin:"0px 16px 8px 0px"}})}),(0,l.jsxs)(a.A,{sx:{p:"16px",width:"100%",borderRadius:(null==eA?void 0:eA.length)>0?"20px":i?"40px":"16px",position:"relative",backgroundColor:"".concat(d.palette.promptsColorPalette.newInputColor),...t?{border:"1px solid ".concat(d.palette.promptsColorPalette.newBgColor3)}:{},...(null==eA?void 0:eA.length)>0?{}:i?{display:"flex",alignItems:"center",justifyContent:"space-between"}:{}},children:[eA&&(null==eA?void 0:eA.length)>0?(0,l.jsx)(a.A,{className:"hide-scroll",sx:{display:"flex",gap:"8px",flexWrap:"wrap",maxHeight:"128px",overflow:"auto",scrollBehavior:"smooth",padding:"0 0 8px 0"},children:(0,l.jsx)(t_.A,{sessionFiles:eA,chatAiModelId:B,dropdownMenuValue:en,isModelIncluideFiles:eC,handelRemoveFiles:e=>{eM?eg(e):em(1===e)},handleCanvasImageOpenModel:eS,isCanvasImageSupported:null==eF?void 0:eF.isCanvasImageSupported})}):(0,l.jsx)(l.Fragment,{}),eh&&(0,l.jsx)(a.A,{className:"custom-dropzone",sx:{borderRadius:(null==eA?void 0:eA.length)>0?"16px":i?"40px":"16px"},children:"Drop your file here"}),(0,l.jsx)(ta.Ay,{multiline:!0,maxRows:6,sx:{width:"100%",fontSize:"14px",lineHeight:"normal",fontWeight:500,mb:(null==eA?void 0:eA.length)>0?"12px":i?0:"12px",padding:0,color:d.palette.promptsColorPalette.newTextColor," textarea":{color:d.palette.promptsColorPalette.newTextColor,"&::placeholder":{color:d.palette.promptsColorPalette.newTextColor,opacity:1}}},placeholder:"Enter Prompt...",onKeyDown:e=>{"Enter"===e.key&&!e.shiftKey&&p(null===e1.$||void 0===e1.$?void 0:e1.$.AI_LABS,e2.B.AI_LABS_CREATE)&&eU(e)},onChange:e=>{V?(null==eT?void 0:eT.setSyncChatInput)instanceof Function?null==eT||eT.setSyncChatInput({syncChatInputText:e.target.value}):H((0,to.kS)({syncChatInputText:e.target.value})):J(e.target.value)}}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",...(null==eA?void 0:eA.length)>0?{}:i?{gap:"16px"}:{}},children:[(0,l.jsx)(tL.A,{isHomePageComponent:t,selectedGenerationModel:g,setIsMutipleSessionActive:S}),(0,l.jsxs)(a.A,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:"16px"},children:[(null==eF?void 0:eF.isThinkSupported)?(0,l.jsx)(F.A,{title:"Think Longer",placement:"top",children:(0,l.jsx)(a.A,{sx:{cursor:"pointer",minWidth:"24px",display:"flex"},onClick:ew,children:(0,l.jsx)(ei.A,{icon:"thinkLongerIcon",color:ej?d.palette.promptsColorPalette.primary:d.palette.promptsColorPalette.mainText2})})}):(0,l.jsx)(l.Fragment,{}),(null==eF?void 0:eF.isWebSearchSupported)?(0,l.jsx)(F.A,{title:"Web search",placement:"top",children:(0,l.jsx)(a.A,{sx:{cursor:"pointer",minWidth:"24px",display:"flex"},onClick:eb,children:(0,l.jsx)(ei.A,{icon:"webSearchIcon",color:ef?d.palette.promptsColorPalette.primary:d.palette.promptsColorPalette.mainText2})})}):(0,l.jsx)(l.Fragment,{}),(0,l.jsx)(F.A,{title:"Select files",children:(0,l.jsx)(tk.A,{files1:V?eE:ee,files2:V?eR:et,handleFileChange:es,handleFile2Change:ed,dropdownMenuValue:en,setDropdownMenuValue:ea,routeModelType:null==ex?void 0:ex.modelType,chatAiModelId:null==ex?void 0:ex.id,chatSessionId:G,config:U,dropzoneKey:el,setDropzoneKey:eo,inputProps:Z()?ep():{},mediaFiles:V?ek:X,handleMultiMediaFileChanges:er,isFileRequired:ev()})}),!t&&(null==W?void 0:W.length)>1&&(0,l.jsx)(F.A,{title:"Compare models",children:(0,l.jsx)(tn.A,{className:"btn-custom btn-24 br0 btn-trans
1parent btn-no-shadow",onClick:()=>{eG()},children:(0,l.jsx)(ei.A,{icon:"multipleViewIcon",color:d.palette.promptsColorPalette.mainText2})})}),(0,l.jsx)(tI.A,{action:[e2.B.AI_LABS_CREATE],children:(0,l.jsx)(tn.A,{className:"btn-custom btn-blue no-space btn-24 br8 btn-no-shadow",disabled:Y(),onClick:e=>{eU(e)},children:(0,l.jsx)(tp.A,{color:d.palette.promptsColorPalette.alwaysWhite,sx:{width:"16px",height:"16px"}})})})]})]})]}),u?(0,l.jsx)(a.A,{sx:{width:"calc(100% + 32px)",ml:"-16px",mt:"16px",padding:"2px",height:"4px",background:d.palette.promptsColorPalette.newInputColor}}):(0,l.jsx)(l.Fragment,{})]}),i?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(l.Fragment,{children:u?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(a.A,{sx:{width:"100%",margin:t?"24px 0 0 0":"32px 0 0 0"},children:(0,l.jsxs)(tr.Ay,{value:g,children:[(0,l.jsx)(a.A,{sx:{borderBottom:0},children:(0,l.jsx)(td.A,{onChange:ez,"aria-label":"lab API tabs example",sx:eW(d),children:null===tj.Uo||void 0===tj.Uo?void 0:tj.Uo.map((e,t)=>(0,l.jsx)(ts.A,{label:null==e?void 0:e.name,value:null==e?void 0:e.value,sx:eH(d),icon:(0,l.jsx)(ei.A,{icon:null==e?void 0:e.icon}),iconPosition:"start"},t))})}),t?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{padding:"10px 0px",marginTop:"32px"},children:g===x.me.CREATE_TEXT?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{sx:{display:"flex",justifyContent:"space-between",width:"100%"},children:(0,l.jsx)(y.A,{sx:{fontSize:"18px",lineHeight:"24px",fontWeight:"500",color:d.palette.promptsColorPalette.mainText2},children:(0,M.t)(z.c.PROMPT_KITS_PAGE_CONSTANTS.PROMPT_KITS_PAGE_TRANSLATION_KEY.PROMPT_KITS_PAGE_TITLE)})}),(0,l.jsx)(a.A,{sx:{margin:"16px 0 0 0"},children:(0,l.jsx)(DashboardBetaWorklfowHubListing,{})})]}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tR.A,{isViewAll:P,setIsViewAll:E})})})})]})})})]}),(null==j?void 0:j.modelState)&&(0,l.jsx)(tP.A,{modalOpen:null==j?void 0:j.modelState,setModalOpen:e=>b({modelState:e,chatSessionId:""}),categoryData:eF,handleModelChange:e=>{i?eT.setChangeSessionModel({chatAiModelId:null==e?void 0:e.id,chatSessionId:G}):C({chatAiModelId:null==e?void 0:e.id,chatSessionId:G})},isSingleCategoryModel:null==r?void 0:r.isSingleCategoryModel,selectedGenerationModel:g,developerModelSearchValue:R,setDeveloperModelSearchValue:k,showfinalWOTextModels:_,showfinalTextModels:L,isOnlyVideoHomePage:i}),w&&(0,l.jsx)(tE.A,{modalOpen:w,setModalOpen:v,handleClose:()=>{v(!1)},maxWidth:"424px",title:"Settings",isIcon:!0,content:(0,l.jsx)(tR.A,{})})]})},tN=e=>{let{isHomePageComponent:t=!1,isOnlyVideoHomePage:i=!1,generationType:o=x.me.CREATE_VIDEO,afterSubmit:n=()=>{},afterClickOnCompareSessions:a=()=>{}}=e;return(0,l.jsx)(tS,{values:{generationType:o,afterSubmit:n,afterClickOnCompareSessions:a},children:(0,l.jsx)(tT,{children:e=>{var o;let{chatSessionList:n,setStreamMessageToASession:a,...s}=e;return(0,l.jsx)(l.Fragment,{children:Array.isArray(n)?(0,l.jsx)(l.Fragment,{children:null==n||null==(o=n.slice(0,i||t?1:null==n?void 0:n.length))?void 0:o.map((e,o)=>(0,l.jsx)(tu.f,{values:{sessionData:e,setStreamMessageToASession:a},children:(0,l.jsx)(tm.W,{values:{...e,setStreamMessageToASession:a,chatSessionList:n,...s,sessionIndex:o},children:(0,l.jsx)(tO,{isHomePageComponent:t,isOnlyVideoHomePage:i,...s})})},null==e?void 0:e.id))}):(0,l.jsx)(l.Fragment,{})})}})})};var tM=i(21986),tF=i(76094);let tW=e=>{let{handleAfterSubmit:t=()=>{},handleAfterClickOnCompareSessions:i=()=>{}}=e,n=(0,s.u)(),[r,d]=(0,o.useState)(""),{refetchId:p}=(0,tF.dp)();return(0,o.useEffect)(()=>{(async()=>{let e="".concat(x.Vq).concat("headerVideos/video-generation-dashboard.mp4");d(await (0,tM.D)(e)||e)})()},[p]),(0,l.jsx)(a.A,{sx:{padding:"65px 40px",[n.breakpoints.down("md")]:{padding:"16px 0"}},children:(0,l.jsxs)(w.Ay,{container:!0,spacing:6,alignItems:"center",children:[(0,l.jsx)(w.Ay,{item:!0,xs:12,md:6,lg:6,children:(0,l.jsx)(a.A,{sx:{position:"relative",display:"flex"},children:r&&(0,l.jsx)(ek(),{url:r,alt:"Video generation",width:"100%",height:"100%",controls:!1,playing:!0,playsinline:!0,muted:!0,loop:!0,config:{file:{attributes:{poster:tl.src,controlsList:"nodownload",disablePictureInPicture:!0,disableFullscreen:!0}}},style:{borderRadius:"6px",overflow:"hidden",display:"flex",maxWidth:"600px",width:"100%",height:"auto"}})})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,md:6,lg:6,children:(0,l.jsx)(tN,{isHomePageComponent:!0,isOnlyVideoHomePage:!0,generationType:x.me.CREATE_VIDEO,afterSubmit:async e=>{await t(e)},afterClickOnCompareSessions:async e=>{await i(e)}})})]})})},tH={src:"/_next/static/media/ai-lab-video-poster.42d61d93.jpg"},tD=e=>{let{handleAfterSubmit:t=()=>{},handleAfterClickOnCompareSessions:i=()=>{}}=e,r=(0,s.u)(),d=(0,n.A)(e=>e.breakpoints.down("sm")),p=(0,n.A)(e=>e.breakpoints.down("md")),[c,h]=(0,o.useState)(""),{refetchId:u}=(0,tF.dp)(),m={fontSize:"32px",lineHeight:"40px",fontWeight:"700",color:r.palette.promptsColorPalette.mainText2,marginBottom:"8px"};return(0,o.useEffect)(()=>{(async()=>{let e="".concat(x.Vq).concat("headerVideos/multi-ai-labs.mp4");h(await (0,tM.D)(e)||e)})()},[u]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(a.A,{sx:{maxWidth:"1320px",width:d?"calc(100% - 16px)":"calc(100% - 24px)",margin:"0 auto",padding:"16px 0"},children:(0,l.jsxs)(w.Ay,{container:!0,spacing:d?4:10,alignItems:"center",children:[(0,l.jsx)(w.Ay,{item:!0,xs:12,sm:12,md:6,children:(0,l.jsx)(a.A,{sx:{maxWidth:"680px",margin:"0 auto"},children:(0,l.jsx)(ej.A,{isHomePageComponent:!0})})}),p?(0,l.jsx)(l.Fragment,{}):(0,l.jsx)(w.Ay,{item:!0,xs:12,sm:12,md:6,children:(0,l.jsxs)(a.A,{sx:{padding:"24px",[r.breakpoints.down("sm")]:{flexDirection:"column",padding:"20px"}},children:[(0,l.jsxs)(a.A,{children:[(0,l.jsx)(y.A,{variant:"h1",sx:{...m},children:"Compare AI Outputs Seamlessly"}),(0,l.jsx)(y.A,{variant:"p",sx:{fontSize:"16px",fontWeight:"400",lineHeight:"24px",color:"".concat(r.palette.promptsColorPalette.subText)},children:"Get insights at a glance—side-by-side comparisons of multiple AI models for smarter decisions."})]}),c&&(0,l.jsx)(ek(),{url:c,alt:"ai Labs video",width:"100%",height:"100%",controls:!1,playing:!0,muted:!0,loop:!0,config:{file:{attributes:{poster:tH.src,c
1ontrolsList:"nodownload",disablePictureInPicture:!0}}},style:{marginTop:"16px",borderRadius:"6px",overflow:"hidden",display:"flex",maxWidth:"700px",width:"100%",height:"auto"}})]})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(e9,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(tW,{handleAfterSubmit:t,handleAfterClickOnCompareSessions:i})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(ti,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(el,{})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(e_,{isHomeLeftSideComponent:!0})}),(0,l.jsx)(w.Ay,{item:!0,xs:12,children:(0,l.jsx)(eA,{})})]})})})};var tz=i(24662),tB=i(64079);let tG=m()(()=>i.e(8945).then(i.bind(i,71326)),{loadableGenerated:{webpack:()=>[71326]},ssr:!1}),tU=()=>{(0,s.u)();let e=(0,n.A)(e=>e.breakpoints.down("sm")),t=(0,c.A)(),{leaveSocketRoom:i,joinSocketRoom:u}=(0,p.w)(),{leaveSocialSocketRoom:m,joinSocialSocketRoom:g}=(0,d.T)(),{setProfileDataWithProfileApiCall:j}=(0,c.A)(),{isLiteDashboard:w}=(0,A.Is)(),{chatSessionList:v,resetSessionId:y}=(0,f.d4)(e=>e.aiLabs);return(0,o.useEffect)(()=>((0,h.c)(),u(),g(),()=>{i(),m()}),[]),(0,o.useEffect)(()=>{j()},[]),(0,l.jsx)(l.Fragment,{children:w?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(b.A,{})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tG,{}),(0,l.jsx)(tc.AB,{children:(0,l.jsx)(tc.lC,{children:i=>{let{isMutipleSessionActive:o,handleAfterSubmit:n,runSessionsInstance:s,setRunSessionsInstance:d,handleAfterClickOnCompareSessions:p}=i;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(tB.A,{}),v&&v.length>1||o?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tz.A,{runSessionsInstance:s,setRunSessionsInstance:d})}):(0,l.jsx)(a.A,{sx:{margin:e?"40px auto 0 !important":"64px auto 0"},children:(0,l.jsx)(r.bW,{children:(0,l.jsx)(r.p7,{children:e=>{var i,o,a,s;let{completeWholeProfile:r}=e;return(0,l.jsx)(l.Fragment,{children:(null==t||null==(o=t.user)||null==(i=o.planDetails)?void 0:i.planName)===(null===x.td||void 0===x.td?void 0:x.td.FREE)||(null==t||null==(s=t.user)||null==(a=s.planDetails)?void 0:a.planName)===(null===x.td||void 0===x.td?void 0:x.td.CREATOR)?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(tD,{completeWholeProfile:r,handleAfterSubmit:n,handleAfterClickOnCompareSessions:p})}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(e5,{completeWholeProfile:r})})})}})})})]})}})},null!=y?y:"resetSessionId")]})})};tU.acl={action:"read",subject:x.eu.ALL_PROMPT_ENG},tU.getLayout=e=>(0,l.jsx)(j,{children:e});let tK=tU},81066:(e,t,i)=>{"use strict";i.d(t,{A:()=>u});var l=i(37876),o=i(72907),n=i(6907),a=i(65010),s=i(14568),r=i.n(s),d=i(14232),p=i(35003),c=i(72147),x=i(37830),h=i(35573);let u=e=>{let{s3ImageUrlList:t,isNewUI:i=!1,hoveredVideo:s=null,autoPlay:u=!1,isDonwloadEnable:m=!1}=e,g=(0,n.u)(),[A,f]=(0,d.useState)({}),[j,b]=(0,d.useState)(0),w=i?{borderRadius:"6px",border:"1px solid ".concat(g.palette.promptsColorPalette.newBgColor3," !important")}:{borderRadius:"6px"},v=async e=>{try{f(t=>({...t,[e]:!0})),await (0,h.nQ)({fileUrl:e,filename:"".concat(crypto.randomUUID(),"_promptsai")})}catch(e){}finally{f(t=>({...t,[e]:!1}))}};return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)(o.A,{display:"flex",gap:"10px",flexWrap:"wrap",position:"relative",sx:{position:"relative !important"},children:[j?(0,l.jsx)(l.Fragment,{children:(0,l.jsx)(p.A,{sx:{position:"absolute",zIndex:99,left:"5px",top:"5px",fontWeight:500,fontSize:12,lineHeight:"20px",p:"4px 10px",borderRadius:"15px",color:g.palette.promptsColorPalette.mainText2,background:(0,a.z)(g.palette.promptsColorPalette.whiteColor,.6)},children:(e=>{let t=Math.floor(e/3600),i=Math.floor(e%3600/60),l=Math.floor(e%60);return t>0?"".concat(String(t).padStart(2,"0"),":").concat(String(i).padStart(2,"0"),":").concat(String(l).padStart(2,"0")):"".concat(String(i).padStart(2,"0"),":").concat(String(l).padStart(2,"0"))})(j)})}):(0,l.jsx)(l.Fragment,{}),t&&(null==t?void 0:t.length)>0?null==t?void 0:t.map((e,t)=>(0,l.jsxs)("div",{children:[m&&(0,l.jsx)(o.A,{sx:{position:"absolute",bottom:"14px",right:"0",left:"0",margin:"0 auto",width:"40px",height:"40px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",zIndex:"99",background:(0,a.z)(g.palette.promptsColorPalette.darkbg,.5),borderRadius:"50%",padding:"5px"},children:A[e]?(0,l.jsx)(c.A,{sx:{color:"light"===g.palette.mode?"#171717":"#fff"},size:20}):(0,l.jsx)(o.A,{sx:{cursor:"pointer",minWidth:"20px",display:"flex",svg:{width:"30px",height:"30px"}},onClick:t=>{t.stopPropagation(),v(e)},children:(0,l.jsx)(x.A,{icon:"downloadStorageIcon",color:g.palette.promptsColorPalette.alwaysWhite})})}),(0,l.jsx)(o.A,{display:"flex",flexDirection:"column",sx:{position:"relative",borderRadius:"12px",...w,overflow:"hidden"},children:(0,l.jsx)(r(),{muted:!0,playing:u||s===e,loop:!0,url:e,controls:!1,className:"".concat(u?"cw-full ch-full cd-flex max-video-height max-video-width":"cw-full ch-full cd-flex"),onDuration:e=>b(e),config:{file:{attributes:{controlsList:"nodownload",disablePictureInPicture:!0}}}})})]},t)):(0,l.jsx)(l.Fragment,{})]})})}},84872:(e,t,i)=>{"use strict";i.d(t,{Ay:()=>v});var l=i(40670),o=i(44501),n=i(4697),a=i(98477),s=i(35268),r=i(31723),d=i(19668),p=i(53894),c=i(12535),x=i(61637),h=i(49995),u=i(14232),m=i(45879);function g(e){return(0,m.Ay)("MuiMasonry",e)}(0,i(47951).A)("MuiMasonry",["root"]);var A=i(37876);let f=["children","className","component","columns","spacing","defaultColumns","defaultHeight","defaultSpacing"],j=e=>Number(e.replace("px","")),b={flexBasis:"100%",width:0,margin:0,padding:0},w=(0,s.Ay)("div",{name:"MuiMasonry",slot:"Root",overridesResolver:(e,t)=>[t.root]})(({ownerState:e,theme:t})=>{let i={width:"100%",display:"flex",flexFlow:"column wrap",alignContent:"flex-start",boxSizing:"border-box","& > *":{boxSizing:"border-box"}},l={};if(e.isSSR){let n={},a=j(t.spacing(e.defaultSpacing));for(let t=1;t<=e.defaultColumns;t+=1)n[`&:nth-of-type(${e.defaultColumns}n+${t%e.defaultColumns})`]={order:t};return l.height=e.defaultHeight,l.margin=-(a/2),l["& > *"]=(0,o.A)({},i["& > *"],n,{margin:a/2,width:`calc(${(100/e.defaultColumns).toFixed(2)}% - ${a}px)`}),(0,o.A)({},i,l)}let n=(0,d.kW)({values:e.spacing,breakpoints:t.breakpoints.values}),a=(0,p.LX)(t);i=(0,c.A)(i,(0,d.NI)({theme:t},n,t=>{let i;if(("string"!=typeof t||Number.isNaN(Number(t)))&&"number"!=typeof t)i=t;else{let e=Number(t);i=(0,p._W)(a,e)}return(0,o.A)({margin:`calc(0px - (${i} / 2))`,"& > *":{margin:`calc(${i} / 2)`}}
1,e.maxColumnHeight&&{height:"number"==typeof i?Math.ceil(e.maxColumnHeight+j(i)):`calc(${e.maxColumnHeight}px + ${i})`})}));let s=(0,d.kW)({values:e.columns,breakpoints:t.breakpoints.values});return i=(0,c.A)(i,(0,d.NI)({theme:t},s,e=>{let t=Number(e),i=`${(100/t).toFixed(2)}%`,l=("string"!=typeof n||Number.isNaN(Number(n)))&&"number"!=typeof n?"0px":(0,p._W)(a,Number(n));return{"& > *":{width:`calc(${i} - ${l})`}}})),"object"==typeof n&&(i=(0,c.A)(i,(0,d.NI)({theme:t},n,(e,t)=>{if(t){let i=Number(e),l=Object.keys(s).pop(),o=(0,p._W)(a,i),n="object"==typeof s?s[t]||s[l]:s,r=`${(100/n).toFixed(2)}%`;return{"& > *":{width:`calc(${r} - ${o})`}}}return null}))),i}),v=u.forwardRef(function(e,t){let i=(0,r.A)({props:e,name:"MuiMasonry"}),{children:s,className:d,component:p="div",columns:c=4,spacing:m=1,defaultColumns:v,defaultHeight:y,defaultSpacing:C}=i,S=(0,l.A)(i,f),T=u.useRef(),[I,P]=u.useState(),E=!I&&y&&void 0!==v&&void 0!==C,[R,k]=u.useState(E?v-1:0),_=(0,o.A)({},i,{spacing:m,columns:c,maxColumnHeight:I,defaultColumns:v,defaultHeight:y,defaultSpacing:C,isSSR:E}),L=(e=>{let{classes:t}=e;return(0,n.A)({root:["root"]},g,t)})(_),O=u.useRef("undefined"==typeof ResizeObserver?void 0:new ResizeObserver(e=>{if(!T.current||!e||0===e.length)return;let t=T.current,i=T.current.firstChild,l=t.clientWidth,o=i.clientWidth;if(0===l||0===o)return;let n=window.getComputedStyle(i),s=Math.round(l/(o+j(n.marginLeft)+j(n.marginRight))),r=Array(s).fill(0),d=!1;t.childNodes.forEach(e=>{if(e.nodeType!==Node.ELEMENT_NODE||"line-break"===e.dataset.class||d)return;let t=window.getComputedStyle(e),i=j(t.marginTop),l=j(t.marginBottom),o=j(t.height)?Math.ceil(j(t.height))+i+l:0;if(0===o){d=!0;return}for(let t=0;t<e.childNodes.length;t+=1){let i=e.childNodes[t];if("IMG"===i.tagName&&0===i.clientHeight){d=!0;break}}if(!d){let t=r.indexOf(Math.min(...r));r[t]+=o,e.style.order=t+1}}),d||a.flushSync(()=>{P(Math.max(...r)),k(s>0?s-1:0)})}));u.useEffect(()=>{let e=O.current;if(void 0!==e)return T.current&&T.current.childNodes.forEach(t=>{e.observe(t)}),()=>e?e.disconnect():{}},[c,m,s]);let N=(0,x.A)(t,T),M=Array(R).fill("").map((e,t)=>(0,A.jsx)("span",{"data-class":"line-break",style:(0,o.A)({},b,{order:t+1})},t));return(0,A.jsxs)(w,(0,o.A)({as:p,className:(0,h.A)(L.root,d),ref:N,ownerState:_},S,{children:[s,M]}))})},86452:(e,t,i)=>{"use strict";i.d(t,{R:()=>l});let l=function(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},l=/\[(.*?)\]/g,o=[];for(;null!==(t=l.exec(e));){let e=t[1];(void 0===i[e]||null===i[e])&&o.push(e)}if(o.length>0)throw Error("Missing required route parameters: ".concat(o.join(", ")," for route: ").concat(e));return e.replace(l,(e,t)=>i[t])}},97279:(e,t,i)=>{"use strict";i.d(t,{F:()=>a,N:()=>n});var l=i(37876),o=i(14232);let n=(0,o.createContext)({imageGalleryApiRefetch:!1,setImageGalleryApiRefetch:()=>{},categories:"All",setCategories:()=>{}}),a=e=>{let{children:t}=e,[i,a]=(0,o.useState)(null),[s,r]=(0,o.useState)("All");return(0,l.jsx)(n.Provider,{value:{imageGalleryApiRefetch:i,setImageGalleryApiRefetch:a,categories:s,setCategories:r},children:t})}}},e=>{e.O(0,[6380,5352,6361,4140,5857,9753,8460,5227,8241,8404,3059,4655,7524,9530,8251,6436,3475,3346,6140,7443,6115,9166,7156,5438,9862,636,6593,8792],()=>e(e.s=25545)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.