PageSourceSearch

https://ecclesia.ai/_next/static/chunks/pages/[teamId]/shared-libraries/[id]/settings-80605461ff6b80a5.js

js ecclesia.ai collected 2026-10-05 13:49:26 UTC 10,830 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[26],{56282:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[teamId]/shared-libraries/[id]/settings",function(){return a(39507)}])},33914:function(e,t,a){"use strict";a.d(t,{Z:function(){return Baseof}});var s=a(85893),i=a(56626);a(1071),a(87441);var r=a(80665);a(9008);var l=a(11163),n=a(57039),d=a.n(n),c=a(74928),Baseof=e=>{let{title:t,meta_title:a,description:n,image:o,noindex:m,canonical:h,children:u,isLoggedIn:x,activePlan:b,index:_,fetchUserData:g,userData:v}=e,{meta_image:f,meta_author:p,meta_description:j}=i.metadata,{base_url:y}=i.site;return(0,l.useRouter)(),(0,s.jsxs)("div",{className:d().root,children:[(0,s.jsx)(r.Z,{fetchUserData:g,userData:v,isLoggedIn:x,activePlan:b}),(0,s.jsx)("div",{className:"".concat(d().content," pt-32"),children:u}),(0,s.jsx)(c.Z,{})]})}},89685:function(e,t,a){"use strict";a.d(t,{Z:function(){return SharedLibraryDetailLayout}});var s=a(85893),i=a(11163),r=a(67294),l=a(33914),n=a(47582),d=a(46195),c=a(25675),o=a.n(c),m=a(41664),h=a.n(m),u=a(39332),x=a(91444);let DeleteSharedLibraryModal=e=>{let{libraryId:t,libraryName:a,teamId:l,onClose:d}=e,c=(0,i.useRouter)(),[o,m]=(0,r.useState)(!1),[h,u]=(0,r.useState)(""),onConfirm=async()=>{if(h!==a){x.Am.error("Library name does not match");return}m(!0);try{await (0,n.Lx)(t),x.Am.success("Shared library deleted"),c.push("/".concat(l,"/chatbots")),d&&d()}catch(e){console.error(e),x.Am.error("Failed to delete shared library")}finally{m(!1)}};return(0,s.jsxs)("div",{className:"bg-white p-6 rounded-[21px] shadow-lg mx-4 md:mx-0 md:w-[420px]",children:[(0,s.jsxs)("h3",{className:"text-xl font-['Outfit'] font-[600] text-[#FF4242] mb-2",children:["Delete ",a,"?"]}),(0,s.jsx)("p",{className:"text-sm text-gray-600 mb-4 font-['lexend']",children:"This action cannot be undone. Any chatbots attached to this library will lose access to its sources."}),(0,s.jsx)("label",{className:"text-sm text-gray-700 font-['Outfit']",children:"Type the library name to confirm:"}),(0,s.jsx)("input",{type:"text",value:h,onChange:e=>u(e.target.value),className:"border border-gray-300 rounded p-2 w-full mt-1 font-['lexend']",placeholder:a}),(0,s.jsxs)("div",{className:"flex gap-3 mt-4",children:[(0,s.jsx)("button",{onClick:d,className:"w-1/2 border border-gray-200 rounded-lg py-2 hover:bg-gray-100",children:"Cancel"}),(0,s.jsx)("button",{onClick:onConfirm,disabled:o,className:"w-1/2 bg-[#FF4242] text-white py-2 rounded-lg disabled:opacity-60",children:o?"Deleting...":"Delete"})]})]})};var sidebar_SharedLibraryDetailsSidebar=e=>{let{tabList:t,libraryId:a,libraryName:i,teamId:r}=e,l=(0,u.usePathname)(),{openModal:n,closeModal:c}=(0,d.d)(),onTabClick=e=>{"DELETE"===e&&n({component:(0,s.jsx)(DeleteSharedLibraryModal,{libraryId:a,libraryName:i||"this library",teamId:r,onClose:c})})};return(0,s.jsx)("div",{className:"flex flex-col justify-center items-start w-full gap-5",children:t.map(e=>"DELETE"===e.id?(0,s.jsxs)("button",{onClick:()=>onTabClick(e.id),className:"w-full rounded-full ".concat(l===e.path?"bg-[#f7f9ff]":"",' p-1 flex items-center font-["Outfit"] text-black font-[600] gap-3'),children:[(0,s.jsx)("div",{className:"border-[1px] border-gray-200 rounded-full p-2",children:(0,s.jsx)(o(),{width:22,height:22,src:l===e.path?e.activeIcon:e.icon,alt:e.id})}),(0,s.jsx)("span",{className:l===e.path?"text-[#2B65DE]":"",children:e.name})]},e.id):(0,s.jsxs)(h(),{className:"w-full rounded-full ".concat(l===e.path?"bg-[#f7f9ff]":"",' p-1 flex items-center font-["Outfit"] text-black font-[600] gap-3'),href:e.path,children:[(0,s.jsx)("div",{className:"border-[1px] border-gray-200 rounded-full p-2",children:(0,s.jsx)(o(),{width:22,height:22,src:l===e.path?e.activeIcon:e.icon,alt:e.id})}),(0,s.jsx)("span",{className:l===e.path?"text-[#2B65DE]":"",children:e.name})]},e.id))})},b=a(18702),_=a.n(b),g=a(94673),v=a(76539);function SharedLibraryDetailLayout(e){let{isLoggedIn:t,activePlan:a,children:r}=e,n=(0,i.useRouter)(),{id:d}=n.query,{libraryData:c}=(0,v.m)(),{currentTeam:m}=(0,g.t)(),h=[{id:"SETTINGS",name:"Settings",icon:"/images/botclient/setting-normal.svg",activeIcon:"/images/botclient/setting-active.svg",path:"/".concat(null==m?void 0:m.id,"/shared-libraries/").concat(d,"/settings")},{id:"SOURCES",name:"Sources",icon:"/images/botclient/retrain-normal.svg",activeIcon:"/images/botclient/retrain-blue.svg",path:"/".concat(null==m?void 0:m.id,"/shared-libraries/").concat(d,"/sources")},{id:"INDEXING",name:"Indexing",icon:"/images/botclient/setting-normal.svg",activeIcon:"/images/botclient/setting-active.svg",path:"/".concat(null==m?void 0:m.id,"/shared-libraries/").concat(d,"/indexing")},{id:"DELETE",name:"Delete Library",icon:"/images/botclient/delete-chatbot.svg",activeIcon:"/images/botclient/delete-chatbot.svg",path:"/".concat(null==m?void 0:m.id,"/shared-libraries/").concat(d,"/delete")}];return(0,s.jsx)(l.Z,{isLoggedIn:t,activePlan:a,children:c?(0,s.jsx)("div",{className:_().details,children:(0,s.jsxs)("div",{className:_().details__wrpr,children:[(0,s.jsx)("div",{className:"".concat(_().details__heading," border-b-[1px] border-solid border-[#e1e7f7] "),children:(0,s.jsxs)("div",{className:_().details__title,children:[(0,s.jsxs)("div",{onClick:()=>{n.push({pathname:"/".concat(null==m?void 0:m.id,"/chatbots")})},className:_().details__back,children:[(0,s.jsx)(o(),{alt:"back",src:"/images/botclient/arrow-left-blue.svg",height:32,width:32}),(0,s.jsx)("div",{className:_()["details__back-text"],children:"Back"})]}),(0,s.jsxs)("div",{className:_().details__name,children:[c.name,(0,s.jsxs)("div",{className:_()["details__sub-title"],children:["Shared Libraries /"," ",(0,s.jsx)("span",{className:_().details__manage,children:"Manage Library"})]})]})]})}),(0,s.jsxs)("div",{className:"flex items-start gap-1 w-full min-h-screen",children:[(0,s.jsx)("div",{className:"border-r-[1px] min-w-[20%] border-gray-200 border-solid min-h-screen px-1 flex justify-start px-4 items-start pt-8",children:(0,s.jsx)(sidebar_SharedLibraryDetailsSidebar,{tabList:h,library
1Id:d,libraryName:c.name,teamId:null==m?void 0:m.id})}),(0,s.jsx)("div",{className:"w-[80%]",children:r})]})]})}):(0,s.jsx)("div",{className:"fixed inset-0 flex items-center justify-center",children:(0,s.jsx)("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-purple-500"})})})}},39507:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return settings}});var s=a(85893),i=a(89685),r=a(47582),l=a(67294),n=a(91444);let formatNumber=e=>{if(null==e)return"—";try{return Number(e).toLocaleString()}catch(t){return String(e)}},formatDate=e=>{if(!e)return"—";try{return new Date(e).toLocaleString()}catch(t){return String(e)}};var SharedLibraryDetails_SharedLibrarySettings=e=>{let{libraryData:t,refresh:a}=e,[i,d]=(0,l.useState)((null==t?void 0:t.name)||""),[c,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{d((null==t?void 0:t.name)||"")},[null==t?void 0:t.name]);let onSave=async()=>{if(!(null==i?void 0:i.trim())){n.Am.error("Name cannot be empty");return}if(i.trim()===(null==t?void 0:t.name)){n.Am.info("No change");return}try{o(!0),await (0,r.aF)(t.id,i.trim()),n.Am.success("Library renamed"),a&&a()}catch(e){console.error(e),n.Am.error("Failed to rename library")}finally{o(!1)}};return(0,s.jsxs)("div",{className:"max-w-3xl w-full mx-auto py-8 px-4 font-['Outfit']",children:[(0,s.jsx)("h1",{className:"text-2xl font-[600] mb-6",children:"Library Settings"}),(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("label",{className:"block text-sm font-[500] text-gray-700 mb-1",children:"Name"}),(0,s.jsx)("input",{type:"text",value:i,onChange:e=>d(e.target.value),className:"w-full border border-gray-300 rounded-md px-3 py-2 focus:outline-none focus:ring-2 focus:ring-[#2B65DE]"}),(0,s.jsx)("div",{className:"mt-3",children:(0,s.jsx)("button",{onClick:onSave,disabled:c,className:"bg-[#2B65DE] text-white rounded-md px-4 py-2 disabled:opacity-60",children:c?"Saving...":"Save"})})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 bg-[#f7f9ff] rounded-md p-5",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Library ID"}),(0,s.jsx)("div",{className:"font-mono text-sm break-all mt-1",children:null==t?void 0:t.id})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Team"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:(null==t?void 0:t.teamName)||(null==t?void 0:t.teamId)||"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Total Characters"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:formatNumber(null==t?void 0:t.charactersCount)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Status"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:(null==t?void 0:t.status)||"—"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Created"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:formatDate(null==t?void 0:t.createdAt)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Last Updated"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:formatDate(null==t?void 0:t.updatedAt)})]}),(null==t?void 0:t.creator)&&(0,s.jsxs)("div",{className:"md:col-span-2",children:[(0,s.jsx)("div",{className:"text-xs uppercase text-gray-500 tracking-wide",children:"Created By"}),(0,s.jsx)("div",{className:"text-sm mt-1",children:t.creator})]})]})]})},d=a(76539),settings=e=>{let{isLoggedIn:t,activePlan:a,userData:r}=e,{libraryData:l,fetchLibraryData:n}=(0,d.m)();return(0,s.jsx)(i.Z,{isLoggedIn:t,activePlan:a,userData:r,children:(0,s.jsx)(SharedLibraryDetails_SharedLibrarySettings,{libraryData:l,refresh:n})})}},57039:function(e){e.exports={root:"Base_root__1a2UN",content:"Base_content__9zaHL"}},18702:function(e){e.exports={details:"chatbotDetails_details__khAl6",details__wrpr:"chatbotDetails_details__wrpr__uUv5S",details__heading:"chatbotDetails_details__heading__ULzvW",details__title:"chatbotDetails_details__title__jJ5y2",details__back:"chatbotDetails_details__back__O5Wes","details__back-text":"chatbotDetails_details__back-text__YuYDq",details__name:"chatbotDetails_details__name__FwsgM","details__sub-title":"chatbotDetails_details__sub-title___Nmr4",details__manage:"chatbotDetails_details__manage__KLUSp",details__body:"chatbotDetails_details__body__Mulwm",details__content:"chatbotDetails_details__content__rq6tv",details__chatbot:"chatbotDetails_details__chatbot__Kk_Uz"}}},function(e){e.O(0,[8366,9774,2888,179],function(){return e(e.s=56282)}),_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.