PageSourceSearch

https://suraj551989-chatbots.hf.space/static/js/1433.ef510979.chunk.js

js suraj551989-chatbots.hf.space collected 2026-10-03 10:25:44 UTC 20,210 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkflowise_ui=self.webpackChunkflowise_ui||[]).push([[1433],{61844:(e,t,s)=>{s.d(t,{A:()=>a});var n=s(84738);const a={getAllAssistants:()=>n.A.get("/assistants"),getSpecificAssistant:e=>n.A.get("/assistants/".concat(e)),getAssistantObj:(e,t)=>n.A.get("/openai-assistants/".concat(e,"?credential=").concat(t)),getAllAvailableAssistants:e=>n.A.get("/openai-assistants?credential=".concat(e)),createNewAssistant:e=>n.A.post("/assistants",e),updateAssistant:(e,t)=>n.A.put("/assistants/".concat(e),t),deleteAssistant:(e,t)=>t?n.A.delete("/assistants/".concat(e,"?isDeleteBoth=true")):n.A.delete("/assistants/".concat(e))}},29836:(e,t,s)=>{s.d(t,{S:()=>v});var n=s(72176),a=s(84139),i=s(74075),o=s(87533),l=s(43831),r=s(98503),c=s(45862),d=s(88764),p=s(92683),h=s(96048),u=s(54972),x=s(32955),m=s(13706),g=s(80812);const A=(0,u.Ay)(r.A)({boxShadow:"0px 8px 10px -5px rgb(0 0 0 / 20%), 0px 16px 24px 2px rgb(0 0 0 / 14%), 0px 6px 30px 5px rgb(0 0 0 / 12%)",borderRadius:"10px",["& .".concat(o.A.listbox)]:{boxSizing:"border-box","& ul":{padding:10,margin:10}}}),v=e=>{let{name:t,nodeData:s,value:o,onSelect:r,isCreateNewOption:u,onCreateNew:v,credentialNames:f=[],disabled:j=!1,disableClearable:y=!1}=e;const b=(0,a.d4)((e=>e.customization)),[w,S]=(0,n.useState)(!1),[C,D]=(0,n.useState)([]),[N,k]=(0,n.useState)(!1),I=[{label:"- Create New -",name:"-create-"}];let[O,T]=(0,n.useState)(null!==o&&void 0!==o?o:"choose an option");return(0,n.useEffect)((()=>{k(!0),(async()=>{(async()=>{let e=f.length?await(async()=>{try{let e="";e=f.length>1?f.join("&credentialName="):f[0];const t=await x.A.getCredentialsByName(e);if(t.data){const e=[];for(let s=0;s<t.data.length;s+=1){const n={label:t.data[s].name,name:t.data[s].id};e.push(n)}return e}}catch(e){console.error(e)}})():await(async e=>{var t;let{name:s,nodeData:n}=e;const a=null===(t=n.inputParams.find((e=>e.name===s)))||void 0===t?void 0:t.loadMethod,o=localStorage.getItem("username"),l=localStorage.getItem("password");return await i.A.post("".concat(m.VY,"/api/v1/node-load-method/").concat(n.name),{...n,loadMethod:a},{auth:o&&l?{username:o,password:l}:void 0}).then((async function(e){return e.data})).catch((function(e){console.error(e)}))})({name:t,nodeData:s});D(u?[...e,...I]:[...e]),k(!1)})()})()}),[]),(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(l.A,{id:t,disabled:j,disableClearable:y,size:"small",sx:{width:"100%"},open:w,onOpen:()=>{S(!0)},onClose:()=>{S(!1)},options:C,value:function(){let e=arguments.length>1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((t=>t.name===e))}(C,O)||"",onChange:(e,t)=>
1{const s=t?t.name:"";u&&"-create-"===s?v():(T(s),r(s))},PopperComponent:A,loading:N,renderInput:e=>(0,g.jsx)(c.A,{...e,value:O,InputProps:{...e.InputProps,endAdornment:(0,g.jsxs)(n.Fragment,{children:[N?(0,g.jsx)(d.A,{color:"inherit",size:20}):null,e.InputProps.endAdornment]})}}),renderOption:(e,t)=>(0,g.jsx)(p.A,{component:"li",...e,children:(0,g.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,g.jsx)(h.A,{variant:"h5",children:t.label}),t.description&&(0,g.jsx)(h.A,{sx:{color:b.isDarkMode?"#9e9e9e":""},children:t.description})]})})})})}},66261:(e,t,s)=>{s.d(t,{X:()=>m});var n=s(72176),a=s(84139),i=s(98503),o=s(53124),l=s(45862),r=s(92683),c=s(96048),d=s(87533),p=s(43831),h=s(54972),u=s(80812);const x=(0,h.Ay)(i.A)({boxShadow:"0px 8px 10px -5px rgb(0 0 0 / 20%), 0px 16px 24px 2px rgb(0 0 0 / 14%), 0px 6px 30px 5px rgb(0 0 0 / 12%)",borderRadius:"10px",["& .".concat(d.A.listbox)]:{boxSizing:"border-box","& ul":{padding:10,margin:10}}}),m=e=>{let{name:t,value:s,options:i,onSelect:d,formControlSx:h={},disabled:m=!1,disableClearable:g=!1}=e;const A=(0,a.d4)((e=>e.customization));let[v,f]=(0,n.useState)(null!==s&&void 0!==s?s:[]);return(0,u.jsx)(o.A,{sx:{mt:1,width:"100%",...h},size:"small",children:(0,u.jsx)(p.A,{id:t,disabled:m,disableClearable:g,size:"small",multiple:!0,filterSelectedOptions:!0,options:i||[],value:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,s=[];return s=t&&"string"===typeof t?JSON.parse(t):t,e.filter((e=>s.includes(e.name)))}(i,v)||[],onChange:(e,t)=>
1{let s="";if(t.length){const e=[];for(let s=0;s<t.length;s+=1)e.push(t[s].name);s=JSON.stringify(e)}f(s),d(s)},PopperComponent:x,renderInput:e=>(0,u.jsx)(l.A,{...e,value:v}),renderOption:(e,t)=>(0,u.jsx)(r.A,{component:"li",...e,children:(0,u.jsxs)("div",{style:{display:"flex",flexDirection:"column"},children:[(0,u.jsx)(c.A,{variant:"h5",children:t.label}),t.description&&(0,u.jsx)(c.A,{sx:{color:A.isDarkMode?"#9e9e9e":""},children:t.description})]})})})})}},81746:(e,t,s)=>{s.d(t,{Z:()=>d});var n=s(72176),a=s(14743),i=s(53124),o=s(7003),l=s(75157),r=s(91597),c=s(80812);const d=e=>{let{value:t,fileType:s,onChange:d,disabled:p=!1}=e;const h=(0,a.A)(),[u,x]=(0,n.useState)(null!==t&&void 0!==t?t:"");return(0,c.jsxs)(i.A,{sx:{mt:1,width:"100%"},size:"small",children:[(0,c.jsx)("span",{style:{fontStyle:"italic",color:h.palette.grey[800],marginBottom:"1rem"},children:u?(0,r.WP)(u):"Choose a file to upload"}),(0,c.jsxs)(o.A,{disabled:p,variant:"outlined",component:"label",fullWidth:!0,startIcon:(0,c.jsx)(l.nre,{}),sx:{marginRight:"1rem"},children:["Upload File",(0,c.jsx)("input",{type:"file",multiple:!0,accept:s,hidden:!0,onChange:e=>(async e=>{if(e.target.files)if(1===e.target.files.length){const t=e.target.files[0],{name:s}=t,n=new FileReader;n.onload=e=>{var t;if(null===e||void 0===e||null===(t=e.target)||void 0===t||!t.result)return;const{result:n}=e.target,a=n+",filename:".concat(s);x(a),d(a)},n.readAsDataURL(t)}else if(e.target.files.length>0){let t=Array.from(e.target.files).map((e=>{const t=new FileReader,{name:s}=e;return new Promise((n=>{t.onload=e=>{var t;if(null===e||void 0===e||null===(t=e.target)||void 0===t||!t.result)return;const{result:a}=e.target,i=a+",filename:".concat(s);n(i)},t.readAsDataURL(e)}))}));const s=await Promise.all(t);x(JSON.stringify(s)),d(JSON.stringify(s))}})(e)})]})]})}},93059:(e,t,s)=>{s.d(t,{U:()=>o});var n=s(78373),a=s(88764),i=s(80812);const o=e=>{let{open:t}=e;return(0,i.jsx)("div",{children:(0,i.jsx)(n.A,{sx:{color:"#fff",zIndex:e=>e.zIndex.drawer+1},open:t,children:(0,i.jsx)(a.A,{color:"inherit"})})})}},31433:(e,t,s)=>{s.d(t,{A:()=>M});var n=s(43989),a=s(72176),i=s(84139),o=s(59423),l=s(37138),r=s(7003),c=s(42534),d=s(89611),p=s(27997),h=s(92683),u=s(39806),x=s(96048),m=s(71987),g=s(65773),A=s(41642),v=s(53497),f=s(62619),j=s(21280),y=s(66261),b=s(2755),w=s(81746),S=s(93059),C=s(80812);const D=e=>{let{show:t,dialogProps:s,onCancel:a,onDelete:i,onDeleteBoth:o}=e;const l=document.getElementById("portal"),h=t?(0,C.jsxs)(c.A,{fullWidth:!0,maxWidth:"xs",open:t,onClose:a,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,C.jsx)(d.A,{sx:{fontSize:"1rem"},id:"alert-dialog-title",children:s.title}),(0,C.jsxs)(p.A,{children:[(0,C.jsx)("span",{children:s.description}),(0,C.jsxs)("div",{style:{display:"flex",flexDirection:"column",marginTop:20},children:[(0,C.jsx)(v.O,{sx:{mb:1},color:"orange",variant:"contained",onClick:i,children:"Delete only from Flowise"}),(0,C.jsx)(v.O,{sx:{mb:1},color:"error",variant:"contained",onClick:o,children:"Delete from both OpenAI and Flowise"}),(0,C.jsx)(r.A,{onClick:a,children:s.cancelButtonName})]})]})]}):null;return(0,n.createPortal)(h,l)};var N=s(75157),k=s(61844),I=s(77616),O=s(96429);const T=[{label:"gpt-4-1106-preview",name:"gpt-4-1106-preview"},{label:"gpt-4-0613",name:"gpt-4-0613"},{label:"gpt-4-0314",name:"gpt-4-0314"},{label:"gpt-4",name:"gpt-4"},{label:"gpt-3.5-turbo",name:"gpt-3.5-turbo"},{label:"gpt-3.5-turbo-1106",name:"gpt-3.5-turbo-1106"},{label:"gpt-3.5-turbo-0613",name:"gpt-3.5-turbo-0613"},{label:"gpt-3.5-turbo-16k",name:"gpt-3.5-turbo-16k"},{label:"gpt-3.5-turbo-16k-0613",name:"gpt-3.5-turbo-16k-0613"}],M=e=>{let{show:t,dialogProps:s,onCancel:M,onConfirm:R}=e;const P=document.getElementById("portal");(0,O.A)();const B=(0,i.wA)(),F=function(){return B((0,o.M8)(...arguments))},J=function(){return B((0,o.mk)(...arguments))},z=(0,I.A)(k.A.getSpecificAssistant),E=(0,I.A)(k.A.getAssistantObj),[W,L]=(0,a.useState)(""),[_,U]=(0,a.useState)(""),[q,X]=(0,a.useState)(""),[Y,Z]=(0,a.useState)(""),[G,K]=(0,a.useState)("https://api.dicebear.com/7.x/bottts/svg?seed=".concat((0,l.A)())),[V,H]=(0,a.useState)(""),[Q,$]=(0,a.useState)(""),[ee,te]=(0,a.useState)(""),[se,ne]=(0,a.useState)(["code_interpreter","retrieval"]),[ae,ie]=(0,a.useState)([]),[oe,le]=(0,a.useState)(""),[re,ce]=(0,a.useState)(!1),[de,pe]=(0,a.useState)(!1),[he,ue]=(0,a.useState)({});(0,a.useEffect)((()=>(B(t?{type:o.sC}:{type:o.dv}),()=>B({type:o.dv}))),[t,B]),(0,a.useEffect)((()=>
1{if(z.data){var e,t;L(z.data.id),K(z.data.iconSrc),$(z.data.credential);const s=JSON.parse(z.data.details);U(s.id),X(s.name),Z(s.description),H(s.model),te(s.instructions),ne(null!==(e=s.tools)&&void 0!==e?e:[]),ie(null!==(t=s.files)&&void 0!==t?t:[])}}),[z.data]),(0,a.useEffect)((()=>{E.data&&xe(E.data)}),[E.data]),(0,a.useEffect)((()=>{if("EDIT"===s.type&&s.data){var e,t;L(s.data.id),K(s.data.iconSrc),$(s.data.credential);const n=JSON.parse(s.data.details);U(n.id),X(n.name),Z(n.description),H(n.model),te(n.instructions),ne(null!==(e=n.tools)&&void 0!==e?e:[]),ie(null!==(t=n.files)&&void 0!==t?t:[])}else"EDIT"===s.type&&s.assistantId?z.request(s.assistantId):"ADD"===s.type&&s.selectedOpenAIAssistantId&&s.credential?(L(""),K("https://api.dicebear.com/7.x/bottts/svg?seed=".concat((0,l.A)())),$(s.credential),E.request(s.selectedOpenAIAssistantId,s.credential)):"ADD"!==s.type||s.selectedOpenAIAssistantId||(L(""),K("https://api.dicebear.com/7.x/bottts/svg?seed=".concat((0,l.A)())),$(""),U(""),X(""),Z(""),H(""),te(""),ne(["code_interpreter","retrieval"]),le(""),ie([]));return()=>{L(""),K("https://api.dicebear.com/7.x/bottts/svg?seed=".concat((0,l.A)())),$(""),U(""),X(""),Z(""),H(""),te(""),ne(["code_interpreter","retrieval"]),le(""),ie([]),ce(!1)}}),[s]);const xe=e=>{var t;U(e.id),X(e.name),Z(e.description),H(e.model),te(e.instructions),ie(null!==(t=e.files)&&void 0!==t?t:[]);let s=[];if(e.tools&&e.tools.length)for(const n of e.tools)s.push(n.type);ne(s)},me=async e=>{pe(!1);try{(await k.A.deleteAssistant(W,e)).data&&(F({message:"Assistant deleted",options:{key:(new Date).getTime()+Math.random(),variant:"success",action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),R())}catch(t){const e=t.response.data||"".concat(t.response.status,": ").concat(t.response.statusText);F({message:"Failed to delete Assistant: ".concat(e),options:{key:(new Date).getTime()+Math.random(),variant:"error",persist:!0,action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),M()}},ge=t?(0,C.jsxs)(c.A,{fullWidth:!0,maxWidth:"md",open:t,onClose:M,"aria-labelledby":"alert-dialog-title","aria-describedby":"alert-dialog-description",children:[(0,C.jsx)(d.A,{sx:{fontSize:"1rem"},id:"alert-dialog-title",children:s.title}),(0,C.jsxs)(p.A,{children:[(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Assistant Name",(0,C.jsx)(f.J,{style:{marginLeft:10},title:"The name of the assistant. The maximum length is 256 characters."})]})}),(0,C.jsx)(m.A,{id:"assistantName",type:"string",fullWidth:!0,placeholder:"My New Assistant",value:q,name:"assistantName",onChange:e=>X(e.target.value)})]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Assistant Description",(0,C.jsx)(f.J,{style:{marginLeft:10},title:"The description of the assistant. The maximum length is 512 characters."})]})}),(0,C.jsx)(m.A,{id:"assistantDesc",type:"string",fullWidth:!0,placeholder:"Description of what the Assistant does",multiline:!0,rows:3,value:Y,name:"assistantDesc",onChange:e=>Z(e.target.value)})]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsx)(x.A,{variant:"overline",children:"Assistant Icon Src"})}),(0,C.jsx)("div",{style:{width:100,height:100,borderRadius:"50%",backgroundColor:"white"},children:(0,C.jsx)("img",{style:{width:"100%",height:"100%",padding:5,borderRadius:"50%",objectFit:"contain"},alt:q,src:G})}),(0,C.jsx)(m.A,{id:"assistantIcon",type:"string",fullWidth:!0,placeholder:"https://api.dicebear.com/7.x/bottts/svg?seed=".concat((0,l.A)()),value:G,name:"assistantIcon",onChange:e=>K(e.target.value)})]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Assistant Model",(0,C.jsx)("span",{style:{color:"red"},children:"\xa0*"})]})}),(0,C.jsx)(j.m,{name:V,options:T,onSelect:e=>H(e),value:null!==V&&void 0!==V?V:"choose an option"},V)]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["OpenAI Credential",(0,C.jsx)("span",{style:{color:"red"},children:"\xa0*"})]})}),(0,C.jsx)(b.A,{data:Q?{credential:Q}:{},inputParam:{label:"Connect Credential",name:"credential",type:"credential",credentialNames:["openAIApi"]},onSelect:e=>$(e)},Q)]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Assistant Instruction",(0,C.jsx)(f.J,{style:{marginLeft:10},title:"The system instructions that the assistant uses. The maximum length is 32768 characters."})]})}),(0,C.jsx)(m.A,{id:"assistantInstructions",type:"string",fullWidth:!0,placeholder:"You are a personal math tutor. When asked a question, write and run Python code to answer the question.",multiline:!0,rows:3,value:ee,name:"assistantInstructions",onChange:e=>te(e.target.value)})]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Assistant Tools",(0,C.jsx)(f.J,{style:{marginLeft:10},title:"A list of tool enabled on the assistant. There can be a maximum of 128 tools per assistant."})]})}),(0,C.jsx)(y.X,{name:JSON.stringify(se),options:[{label:"Code Interpreter",name:"code_interpreter"},{label:"Retrieval",name:"retrieval"}],onSelect:e=>ne(e?JSON.parse(e):[]),value:null!==se&&void 0!==se?se:"choose an option"},JSON.stringify(se))]}),(0,C.jsxs)(h.A,{sx:{p:2},children:[(0,C.jsx)(u.A,{sx:{position:"relative"},direction:"row",children:(0,C.jsxs)(x.A,{variant:"overline",children:["Knowledge Files",(0,C.jsx)(f.J,{style:{marginLeft:10},title:"Allow assistant to use the content from uploaded files for retrieval and code interpreter. MAX: 20 files"})]})}),(0,C.jsx)("div",{style:{display:"flex",flexDirection:"row"},children:ae.map(((e,t)=>(0,C.jsxs)("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",width:"max-content",height:"max-content",borderRadius:15,background:"rgb(254,252,191)",paddingLeft:15,paddingRight:15,paddingTop:5,paddingBottom:5,marginRight:10},children:[(0,C.jsx)("span",{style:{color:"rgb(116,66,16)",marginRight:10},children:e.filename}),(0,C.jsx)(g.A,{sx:{height:15,width:15,p:0},onClick:()=>(async e=>{ie(ae.filter((t=>
1t.id!==e)))})(e.id),children:(0,C.jsx)(N.MRt,{})})]},t)))}),(0,C.jsx)(w.Z,{fileType:"*",onChange:e=>le(e),value:null!==oe&&void 0!==oe?oe:"Choose a file to upload"},oe)]})]}),(0,C.jsxs)(A.A,{children:["EDIT"===s.type&&(0,C.jsx)(v.O,{color:"secondary",variant:"contained",onClick:()=>(async()=>{ce(!0);try{const e=await k.A.getAssistantObj(_,Q);e.data&&(xe(e.data),F({message:"Assistant successfully synced!",options:{key:(new Date).getTime()+Math.random(),variant:"success",action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}})),ce(!1)}catch(e){const t=e.response.data||"".concat(e.response.status,": ").concat(e.response.statusText);F({message:"Failed to sync Assistant: ".concat(t),options:{key:(new Date).getTime()+Math.random(),variant:"error",persist:!0,action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),ce(!1)}})(),children:"Sync"}),"EDIT"===s.type&&(0,C.jsx)(v.O,{color:"error",variant:"contained",onClick:()=>(ue({title:"Delete Assistant",description:"Delete Assistant ".concat(q,"?"),cancelButtonName:"Cancel"}),void pe(!0)),children:"Delete"}),(0,C.jsx)(v.O,{disabled:!(V&&Q),variant:"contained",onClick:()=>"ADD"===s.type?(async()=>{ce(!0);try{const e={id:_,name:q,description:Y,model:V,instructions:ee,tools:se,files:ae,uploadFiles:oe},t={details:JSON.stringify(e),iconSrc:G,credential:Q},s=await k.A.createNewAssistant(t);s.data&&(F({message:"New Assistant added",options:{key:(new Date).getTime()+Math.random(),variant:"success",action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),R(s.data.id)),ce(!1)}catch(e){const t=e.response.data||"".concat(e.response.status,": ").concat(e.response.statusText);F({message:"Failed to add new Assistant: ".concat(t),options:{key:(new Date).getTime()+Math.random(),variant:"error",persist:!0,action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),ce(!1),M()}})():(async()=>{ce(!0);try{const e={name:q,description:Y,model:V,instructions:ee,tools:se,files:ae,uploadFiles:oe},t={details:JSON.stringify(e),iconSrc:G,credential:Q},s=await k.A.updateAssistant(W,t);s.data&&(F({message:"Assistant saved",options:{key:(new Date).getTime()+Math.random(),variant:"success",action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),R(s.data.id)),ce(!1)}catch(e){const t=e.response.data||"".concat(e.response.status,": ").concat(e.response.statusText);F({message:"Failed to save Assistant: ".concat(t),options:{key:(new Date).getTime()+Math.random(),variant:"error",persist:!0,action:e=>(0,C.jsx)(r.A,{style:{color:"white"},onClick:()=>J(e),children:(0,C.jsx)(N.MRt,{})})}}),ce(!1),M()}})(),children:s.confirmButtonName})]}),(0,C.jsx)(D,{show:de,dialogProps:he,onCancel:()=>pe(!1),onDelete:()=>me(),onDeleteBoth:()=>me(!0)}),re&&(0,C.jsx)(S.U,{open:re})]}):null;return(0,n.createPortal)(ge,P)}},2755:(e,t,s)=>{s.d(t,{A:()=>p});var n=s(72176),a=s(65773),i=s(75157),o=s(29836),l=s(8423),r=s(19977),c=s(32955),d=s(80812);const p=e=>{var t;let{inputParam:s,data:p,onSelect:h,disabled:u=!1}=e;const x=(0,n.useRef)(null),[m,g]=(0,n.useState)(null!==(t=null===p||void 0===p?void 0:p.credential)&&void 0!==t?t:""),[A,v]=(0,n.useState)(!1),[f,j]=(0,n.useState)({}),[y,b]=(0,n.useState)(!1),[w,S]=(0,n.useState)({}),[C,D]=(0,n.useState)(Date.now().toString());return(0,d.jsxs)("div",{ref:x,children:[s&&(0,d.jsx)(d.Fragment,{children:"credential"===s.type&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{style:{marginTop:10}}),(0,d.jsxs)("div",{style:{display:"flex",flexDirection:"row"},children:[(0,d.jsx)(o.S,{disabled:u,name:s.name,nodeData:p,value:null!==m&&void 0!==m?m:"choose an option",isCreateNewOption:!0,credentialNames:s.credentialNames,onSelect:e=>{g(e),h(e)},onCreateNew:()=>(async()=>{try{let e="";e=s.credentialNames.length>1?s.credentialNames.join("&"):s.credentialNames[0];const t=await c.A.getSpecificComponentCredential(e);if(t.data)if(Array.isArray(t.data)){const e={title:"Add New Credential",componentsCredentials:t.data};j(e),v(!0)}
1else{const e={type:"ADD",cancelButtonName:"Cancel",confirmButtonName:"Add",credentialComponent:t.data};S(e),b(!0)}}catch(e){console.error(e)}})(s.name)}),m&&(0,d.jsx)(a.A,{title:"Edit",color:"primary",size:"small",onClick:()=>(e=>{S({type:"EDIT",cancelButtonName:"Cancel",confirmButtonName:"Save",credentialId:e}),b(!0)})(m),children:(0,d.jsx)(i.GI1,{})})]},C)]})}),y&&(0,d.jsx)(l.A,{show:y,dialogProps:w,onCancel:()=>b(!1),onConfirm:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";g(e),D(Date.now().toString()),S({}),b(!1),h(e)}}),A&&(0,d.jsx)(r.A,{show:A,dialogProps:f,onCancel:()=>v(!1),onCredentialSelected:e=>{v(!1);S({type:"ADD",cancelButtonName:"Cancel",confirmButtonName:"Add",credentialComponent:e}),b(!0)}})]})}}}]);
2//# sourceMappingURL=1433.ef510979.chunk.js.map

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.