1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43e3],{36779:function(e,s,t){t.d(s,{D:function(){return m}});var a=t(32710),r=t(27494),l=t(84569),i=t(63521),n=t(85225),d=t(46669),c=t(12553),o=t(81545);function m(e){var s;let{name:t,label:m,register:x,errors:p,setValue:u,getValues:f,watch:h,useHypermindzKeys:j,setUseHypermindzKeys:g,isAvailable:b,visibleConfigs:y,setVisibleConfigs:v,developerApiKeys:N,isExecutionMode:w=!1,onKeySourceChange:_,enterpriseKeys:I=[],selectedEnterpriseKeyId:C,onEnterpriseKeySelect:T}=e,z=t.toLowerCase(),k=Object.keys(j).find(e=>z.includes(e.toLowerCase())),F=I.length>0,[A,E]=(0,r.useState)(()=>C&&F?"enterprise":b&&k&&j[k]?"hypermindz":"own"),[S,Z]=(0,r.useState)(C||""),R=(0,r.useRef)(!1),q=(0,r.useRef)(f(t)),O=h?h(t):f(t);return(0,r.useEffect)(()=>{if(O!==q.current){if("string"==typeof O&&O.startsWith("enterprise:")){let e=O.substring(11);e!==S&&(q.current=O,Z(e))}else q.current=O}},[O,S]),(0,r.useEffect)(()=>{if(C&&F){let e="enterprise:".concat(C),s=f(t);(s===e||!s&&C)&&(q.current=e,s!==e&&u(t,e),S!==C&&Z(C),"enterprise"!==A&&E("enterprise"))}},[C,F,t,f,u,S,A]),(0,r.useEffect)(()=>{if(R.current){R.current=!1;return}let e=null!=O?O:q.current,s="string"==typeof e&&e.startsWith("enterprise:"),a="Using Hypermindz API Key"===e,r=N&&N[t]&&e===N[t];if(s){let s=e.substring(11);s&&s!==S&&Z(s),"enterprise"!==A&&E("enterprise");return}if("enterprise"!==A||!F){if(a&&b&&k){"hypermindz"!==A&&E("hypermindz");return}if(r){"developer"!==A&&E("developer");return}C&&F&&"enterprise"!==A?(E("enterprise"),Z(C)):N&&N[t]&&"developer"!==A?E("developer"):b&&k&&j[k]&&"hypermindz"!==A?E("hypermindz"):("enterprise"!==A||F)&&(A&&("own"!==A||e)||s||a||r)||E("own")}},[N,b,k,j,t,C,F,O,S,A]),(0,r.useEffect)(()=>{let e;R.current||("enterprise"===A?S&&(e="enterprise:".concat(S)):"hypermindz"===A&&b?e="Using Hypermindz API Key":"developer"===A&&N&&N[t]?e=N[t]:"own"===A&&("Using Hypermindz API Key"===f(t)||"Using Developer API Key"===f(t)||"string"==typeof f(t)&&f(t).startsWith("enterprise:"))&&(e=""),void 0!==e&&f(t)!==e&&(q.current=e,u(t,e)))},[A,t,u,f,b,N,S]),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(l._,{className:"font-medium",children:m}),(0,a.jsxs)(o.Ph,{value:A,onValueChange:e=>{if(R.current=!0,E(e),k&&g(s=>{let t={...s};return t[k]="hypermindz"===e,t}),"enterprise"!==e)Z(""),null==T||T(t,null),u(t,"");else if("enterprise"===e&&F&&1===I.length&&!S){let e=I[0];Z(e.id),u(t,"enterprise:".concat(e.id)),null==T||T(t,e.id)}null==_||_(t,e)},disabled:!b&&"hypermindz"===A,children:[(0,a.jsx)(o.i4,{className:"w-full",children:(0,a.jsx)(o.ki,{placeholder:"Select key source"})}),(0,a.jsxs)(o.Bw,{children:[F&&(0,a.jsx)(o.Ql,{value:"enterprise",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 mr-2 text-purple-500"}),(0,a.jsx)("span",{children:"Use Enterprise API Key"})]})}),(0,a.jsx)(o.Ql,{value:"hypermindz",disabled:!b,children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 mr-2 text-blue-500"}),(0,a.jsx)("span",{children:"Using Hypermindz API Key"})]})}),N&&N[t]&&(0,a.jsx)(o.Ql,{value:"developer",children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 mr-2 text-green-500"}),(0,a.jsx)("span",{children:"Using Developer API Key"})]})}),w&&N&&N[t]?null:(0,a.jsx)(o.Ql,{value:"own",children:"Use Your Own Key"})]})]}),"enterprise"===A&&F?(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(o.Ph,{value:S,onValueChange:e=>{Z(e),u(t,"enterprise:".concat(e)),null==T||T(t,e)},children:[(0,a.jsx)(o.i4,{className:"w-full",children:(0,a.jsx)(o.ki,{placeholder:"Select an enterprise key"})}),(0,a.jsx)(o.Bw,{children:I.map(e=>(0,a.jsx)(o.Ql,{value:e.id,children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 mr-2 text-purple-500"}),(0,a.jsx)("span",{children:e.name}),(0,a.jsxs)("span",{className:"ml-2 text-xs text-muted-foreground",children:["(",e.keyPrefix,"...)"]})]})},e.id))})]}),S?(0,a.jsxs)("div",{className:"bg-purple-50 text-purple-600 p-2 rounded-md border border-purple-200 flex items-center",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 mr-2"}),(0,a.jsxs)("span",{className:"text-xs",children:[(null===(s=I.find(e=>e.id===S))||void 0===s?void 0:s.name)||"Enterprise Key"," ","â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢KEY"]})]}):(0,a.jsxs)("div",{className:"bg-purple-50 text-purple-200 p-2 rounded-md border border-purple-200 flex items-center",children:[(0,a.jsx)(i.Z,{className:"h-4 w-4 mr-2 text-purple-400"}),(0,a.jsx)("span",{className:"text-xs text-purple-600",children:"Please select an enterprise key above"})]})]}):"hypermindz"===A&&b?(0,a.jsxs)("div",{className:"bg-blue-50 text-blue-600 p-2 rounded-md border border-blue-200 flex items-center",children:[(0,a.jsx)(n.Z,{className:"h-4 w-4 mr-2"}),(0,a.jsxs)("span",{className:"text-xs",children:[null==k?void 0:k.toUpperCase(),"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢KEY"]})]}):"developer"===A&&N&&N[t]?(0,a.jsxs)("div",{className:"bg-green-50 text-green-600 p-2 rounded-md border border-green-200 flex items-center",children:[(0,a.jsx)(d.Z,{className:"h-4 w-4 mr-2"}),(0,a.jsxs)("span",{className:"text-xs",children:[t.toUpperCase().replace(/_/g,"_"),"â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢â¢KEY"]})]}):"own"===A?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(c.I,{...x(t),type:"password",className:"w-full",placeholder:"Enter your ".concat(m," (e.g., sk_a...)")}),p[t]&&(0,a.jsx)("p",{className:"text-sm text-red-500",children:p[t].message}),(0,a.jsx)("div",{className:"text-xs text-gray-500",children:t})]}):null]})}},46624:function(e,s,t){t.d(s,{W:function(){return w}});var a=t(32710),r=t(27494),l=t(12553),i=t(18424),n=t(92933),d=t(81545),c=t(58500),o=t(56104),m=t
1(80395),x=t(17266),p=t(49953),u=t(9879),f=t(55237),h=t(25814),j=t(19740),g=t(28070);function b(e){let{name:s,label:t,description:i,accept:n,agentId:d,fileType:c,onChange:o,error:m}=e,[x,p]=(0,r.useState)(!1),[u,b]=(0,r.useState)(""),[y,v]=(0,r.useState)(null),N=async e=>{let t=e.target.files;if(!t||0===t.length)return;let a=t[0];v(null);let r=parseInt(g.env.NEXT_PUBLIC_MAX_UPLOAD_SIZE_MB||"5"),l=1048576*r;if(a.size>l){let e=(a.size/1024/1024).toFixed(2);v("File size (".concat(e,"MB) exceeds the ").concat(r,"MB limit. Please choose a smaller file."));return}p(!0);try{let e=new FormData;e.append("file",a),e.append("agentId",d),e.append("fileType",c),e.append("inputField",s);let t=await fetch("/api/file-upload",{method:"POST",body:e});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to upload file")}let r=await t.json();o(r.s3Path,a.name),b(a.name)}catch(e){v(e instanceof Error?e.message:"Upload failed")}finally{p(!1)}};return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:s,className:"text-sm font-medium",children:t}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(l.I,{id:s,type:"file",accept:n,className:m?"border-red-500":"",onChange:N,disabled:x}),x&&(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(f.Z,{className:"h-4 w-4 animate-spin mr-2"}),(0,a.jsx)("span",{className:"text-xs",children:"Uploading..."})]})]}),u&&(0,a.jsxs)("div",{className:"mt-2 flex items-center text-sm text-gray-500",children:[(0,a.jsx)(h.Z,{className:"h-4 w-4 mr-1"}),(0,a.jsx)("span",{children:u})]}),y&&(0,a.jsxs)("div",{className:"mt-2 flex items-center text-sm text-red-500",children:[(0,a.jsx)(j.Z,{className:"h-4 w-4 mr-1"}),(0,a.jsx)("span",{children:y})]}),i&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:i}),(0,a.jsxs)("div",{className:"mt-1 text-xs text-gray-500",children:["Max file size:"," ",parseInt(g.env.NEXT_PUBLIC_MAX_UPLOAD_SIZE_MB||"5"),"MB",n&&(0,a.jsxs)(a.Fragment,{children:[" ⢠","Accepted types: ",n.replace(/,/g,", ")]})]}),m&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:m})]})]})}var y=t(65113),v=t(74470);function N(e){let{isRequired:s=!0,isComplete:t=!1}=e;return s?(0,a.jsx)(v.pn,{children:(0,a.jsxs)(v.u,{children:[(0,a.jsx)(v.aJ,{asChild:!0,children:(0,a.jsx)("span",{className:"inline-flex h-2 w-2 rounded-full ml-1 ".concat(t?"bg-green-500":"bg-amber-500")})}),(0,a.jsx)(v._v,{children:(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)(y.Z,{className:"h-3 w-3 mr-1"}),(0,a.jsx)("span",{className:"text-xs",children:t?"Required field (completed)":"Required field"})]})})]})}):null}function w(e){var s,t,f,h,j;let{field:g,name:y,register:v,errors:_,setValue:I,getValues:C,watch:T,visibleConfigs:z,setVisibleConfigs:k,agent:F}=e,[A,E]=(0,r.useState)([0]),S=_[y];(0,r.useEffect)(()=>{if("array"===g.type){let e=T(y)||[];Array.isArray(e)&&e.length!==A.length&&E(Array.from({length:Math.max(1,e.length)},(e,s)=>s))}},[T,y,g.type,A.length]);let Z=e=>{let s=(C(y)||[]).filter((s,t)=>t!==e);I(y,s),E(A.filter((s,t)=>t!==e))};switch(g.type){case"email":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{htmlFor:y,className:"text-sm font-medium flex items-center",children:[g.label,(0,a.jsx)(N,{isRequired:!!(null===(s=g.validation)||void 0===s?void 0:s.required),isComplete:!!T(y)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"email",...v(y,{...g.validation,pattern:{value:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,message:"Invalid email address"}}),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"password":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{htmlFor:y,className:"text-sm font-medium flex items-center",children:[g.label,(0,a.jsx)(N,{isRequired:!!(null===(t=g.validation)||void 0===t?void 0:t.required),isComplete:!!T(y)})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(l.I,{id:y,type:z[y]?"text":"password",...v(y,g.validation),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),(0,a.jsx)("button",{type:"button",className:"absolute right-2 top-1/2 transform -translate-y-1/2 text-gray-500 hover:text-gray-700 focus:outline-none",onClick:()=>k(e=>({...e,[y]:!e[y]}
1)),tabIndex:-1,children:z[y]?(0,a.jsx)(m.Z,{className:"h-4 w-4"}):(0,a.jsx)(x.Z,{className:"h-4 w-4"})}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"text":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("label",{htmlFor:y,className:"text-sm font-medium flex items-center",children:[g.label,(0,a.jsx)(N,{isRequired:!!(null===(f=g.validation)||void 0===f?void 0:f.required),isComplete:!!T(y)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,...v(y,g.validation),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"number":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"number",...v(y,{setValueAs:e=>Number.parseFloat(e),...g.validation}),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"boolean":return(0,a.jsxs)("div",{className:"flex items-center justify-between space-x-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center",children:[(0,a.jsx)("input",{type:"checkbox",id:y,className:"sr-only",...v(y),onChange:e=>{I(y,e.target.checked)}}),(0,a.jsx)("button",{type:"button",className:"relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ".concat(T(y)?"bg-primary":"bg-input"),onClick:()=>I(y,!T(y)),"aria-pressed":!!T(y),children:(0,a.jsx)("span",{className:"pointer-events-none inline-block h-4 w-4 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out ".concat(T(y)?"translate-x-4":"translate-x-0"),"aria-hidden":"true"})})]}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description})]})]});case"date":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(n.f,{mode:"single",selected:T(y)?new Date(T(y)):void 0,onSelect:e=>I(y,(null==e?void 0:e.toISOString())||""),className:"border rounded p-2"}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"select":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsxs)(d.Ph,{value:T(y)||"",onValueChange:e=>I(y,e),children:[(0,a.jsx)(d.i4,{className:S?"border-red-500":"",children:(0,a.jsx)(d.ki,{placeholder:g.placeholder||"Select ".concat(g.label)})}),(0,a.jsx)(d.Bw,{children:null===(h=g.options)||void 0===h?void 0:h.map(e=>(0,a.jsx)(d.Ql,{value:e,children:e},e))})]}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"textarea":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(i.g,{id:y,...v(y,g.validation),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"object":return(0,a.jsx)("div",{className:"space-y-2",children:(0,a.jsx)(c.UQ,{t
1ype:"single",collapsible:!0,className:"w-full",children:(0,a.jsxs)(c.Qd,{value:y,children:[(0,a.jsx)(c.o4,{className:"text-sm font-medium",children:g.label}),(0,a.jsx)(c.vF,{children:(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 p-2",children:g.children&&Object.entries(g.children).map(e=>{let[s,t]=e;return(0,a.jsx)(w,{field:t,name:"".concat(y,".").concat(s),register:v,errors:_,setValue:I,getValues:C,watch:T,visibleConfigs:z,setVisibleConfigs:k,agent:F},"".concat(y,".").concat(s))})})})]})})});case"array":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("label",{htmlFor:"".concat(y,"-label"),className:"text-sm font-medium",children:g.label}),(0,a.jsxs)(o.z,{type:"button",variant:"outline",size:"sm",onClick:()=>{let e=C(y)||[];I(y,Array.isArray(e)?[...e,""]:[""]),E([...A,A.length])},children:[(0,a.jsx)(p.Z,{className:"h-4 w-4 mr-1"}),"Add Item"]})]}),(0,a.jsx)("div",{className:"space-y-2",children:A.map(e=>(0,a.jsxs)("div",{className:"flex items-start space-x-2",children:[(0,a.jsx)("div",{className:"flex-1",children:"object"===g.itemType?(0,a.jsx)(c.UQ,{type:"single",collapsible:!0,className:"w-full",children:(0,a.jsxs)(c.Qd,{value:"".concat(y,".").concat(e),children:[(0,a.jsxs)(c.o4,{className:"text-sm font-medium",children:["Item ",e+1]}),(0,a.jsx)(c.vF,{children:(0,a.jsx)("div",{className:"grid grid-cols-1 gap-4 p-2"})})]})}):(0,a.jsx)(l.I,{...v("".concat(y,".").concat(e),g.validation),placeholder:"Item ".concat(e+1),className:_["".concat(y,".").concat(e)]?"border-red-500":""})}),(0,a.jsx)(o.z,{type:"button",variant:"outline",size:"sm",onClick:()=>Z(e),disabled:A.length<=1,children:(0,a.jsx)(u.Z,{className:"h-4 w-4"})})]},e))}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]});case"url":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"url",...v(y,{...g.validation,pattern:{value:/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/,message:"Invalid URL format"}}),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"tel":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"tel",...v(y,{...g.validation,pattern:{value:/^[+]?[(]?[0-9]{3}[)]?[-\s.]?[0-9]{3}[-\s.]?[0-9]{4,6}$/,message:"Invalid phone number format"}}),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"color":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"color",...v(y,g.validation),className:"h-10 w-full"}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"number_range":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(l.I,{id:"".concat(y,"-min"),type:"number",min:g.min,max:g.max,...v("".concat(y,".min"),{setValueAs:e=>Number.parseFloat(e),...g.validation}),placeholder:"Min",className:S?"border-red-500":""}),(0,a.jsx)("span",{children:"to"}),(0,a.jsx)(l.I,{id:"".concat(y,"-max"),type:"number",min:g.min,max:g.max,...v("".concat(y,".max"),{setValueAs:e=>Number.parseFloat(e),...g.validation}),placeholder:"Max",className:S?"border-red-500":""})]}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]});case"date_range":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{className:"flex flex-col items-center",children:[(0,a.jsx)(l.I,{id:"".concat(y,"
1-start"),type:"date",...v("".concat(y,".start"),g.validation),className:S?"border-red-500":""}),(0,a.jsx)("span",{children:"to"}),(0,a.jsx)(l.I,{id:"".concat(y,"-end"),type:"date",...v("".concat(y,".end"),g.validation),className:S?"border-red-500":""})]}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]});case"time":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"time",...v(y,g.validation),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"datetime":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,type:"datetime-local",...v(y,g.validation),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]});case"checkbox":return(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("input",{type:"checkbox",id:y,className:"h-4 w-4 rounded border-gray-300 text-primary focus:ring-primary",...v(y)}),(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),g.description&&(0,a.jsx)("p",{className:"ml-6 text-xs text-gray-500",children:g.description})]});case"radio":return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:g.label}),(0,a.jsx)("div",{className:"space-y-1",children:null===(j=g.options)||void 0===j?void 0:j.map(e=>(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)("input",{type:"radio",id:"".concat(y,"-").concat(e),value:e,className:"h-4 w-4 border-gray-300 text-primary focus:ring-primary",...v(y,g.validation)}),(0,a.jsx)("label",{htmlFor:"".concat(y,"-").concat(e),className:"text-sm",children:e})]},e))}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]});case"image":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:"image/*",agentId:F.id,fileType:"image",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"pdf":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".pdf,application/pdf",agentId:F.id,fileType:"pdf",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"doc":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",agentId:F.id,fileType:"doc",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"csv":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".csv,text/csv",agentId:F.id,fileType:"csv",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"xls":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".xls,.xlsx,application/vnd.ms-excel,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",agentId:F.id,fileType:"xls",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"ppt":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".ppt,.pptx,application/vnd.ms-powerpoint,application/vnd.openxmlformats-officedocument.presentationml.presentation",agentId:F.id,fileType:"ppt",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"zip":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".zip,.rar,application/zip,application/x-zip-compressed,application/x-rar-compressed",agentId:F.id,fileType:"zip",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"audio":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".mp3,.wav,.ogg,audio/*",agentId:F.id,fileType:"audio",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"video":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".mp4,.webm,.avi,video/*",agentId:F.id,fileType:"video",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"code":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".js,.py,.java,.cpp,.c,.cs,.php,.rb,.go,.ts,.html,.css,.json,.xml",agentId:F.id,fileType:"code",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"text_file":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".txt,.md,.rtf,text/plain",agentId:F.id,fileType:"text",onCh
1ange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"3d":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".obj,.stl,.fbx,.gltf,.glb",agentId:F.id,fileType:"3d",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"font":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".ttf,.otf,.woff,.woff2",agentId:F.id,fileType:"font",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"database":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".sql,.db,.sqlite,.mdb",agentId:F.id,fileType:"database",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"vector":return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:".svg,.ai,.eps",agentId:F.id,fileType:"vector",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});case"file":let R=g.accept||".doc,.docx,.pdf,.txt,.rtf,.odt,.pages,.xls,.xlsx,.csv,.ods,.numbers,.ppt,.pptx,.odp,.key,.json,.xml,.yaml,.yml,.sql,.parquet,.jpg,.jpeg,.png,.gif,.webp,.svg,.bmp,.zip,.tar,.gz,.rar,.7z";return(0,a.jsx)(b,{name:y,label:g.label,description:g.description,accept:R,agentId:F.id,fileType:"file",onChange:(e,s)=>{I(y,e),I("".concat(y,"_filename"),s)},error:null==S?void 0:S.message});default:return(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("label",{htmlFor:y,className:"text-sm font-medium",children:g.label}),(0,a.jsxs)("div",{children:[(0,a.jsx)(l.I,{id:y,...v(y,g.validation),placeholder:g.placeholder||"Enter ".concat(g.label),className:S?"border-red-500":""}),g.description&&(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:g.description}),S&&(0,a.jsx)("p",{className:"mt-1 text-xs text-red-500",children:S.message||"This field is required"})]})]})}}},4141:function(e,s,t){t.d(s,{y:function(){return m}});var a=t(32710),r=t(19666),l=t(84569),i=t(29011),n=t(47971),d=t(57346),c=t(30531),o=t(27494);
1function m(e){let{configKeysAvailableInInventory:s,useHypermindzKeys:t,handleMainCheckboxChange:m}=e,[x,p]=(0,o.useState)(!1),u=Object.values(s).filter(Boolean).length,f=Object.keys(s).length;return(0,a.jsxs)("div",{className:"mb-6 p-4 bg-muted/30 backdrop-blur-sm rounded-lg border top-0 z-10 shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,a.jsx)(r.X,{id:"useHypermindzKeys",checked:!!Object.values(t).includes(!0),disabled:Object.values(s).every(e=>!e),onCheckedChange:e=>m(e),className:"h-4 w-4 cursor-pointer rounded-sm accented-checkbox"}),(0,a.jsxs)(l._,{htmlFor:"useHypermindzKeys",className:"text-sm text-muted-foreground font-medium cursor-pointer",children:["Use Hypermindz keys"," ",(0,a.jsx)("span",{className:"text-muted-foreground text-xs",children:"(Recommended for simplified setup)"})]})]}),(0,a.jsx)("button",{type:"button",onClick:()=>p(!x),className:"text-muted-foreground hover:text-foreground transition-colors","aria-label":x?"Collapse API key details":"Expand API key details",children:x?(0,a.jsx)(i.Z,{size:16}):(0,a.jsx)(n.Z,{size:16})})]}),(0,a.jsxs)("div",{className:"text-xs text-muted-foreground ml-6 mt-1",children:[u," of ",f," keys available."," ",u<f?"Please add the missing keys.":""]}),x&&(0,a.jsx)("div",{className:"ml-6 mt-2 space-y-1",children:Object.entries(s).map(e=>{let[s,t]=e;return(0,a.jsxs)("div",{className:"flex items-center",children:[t?(0,a.jsx)(d.Z,{className:"h-4 w-4 mr-2 text-green-500"}):(0,a.jsx)(c.Z,{className:"h-4 w-4 mr-2 text-red-500"}),(0,a.jsxs)("span",{className:"text-xs ".concat(t?"text-green-500":"text-red-500"),children:[s.toUpperCase()," ",t?"":"unavailable"]})]},s)})})]})}},58500:function(e,s,t){t.d(s,{Qd:function(){return c},UQ:function(){return d},o4:function(){return o},vF:function(){return m}});var a=t(32710),r=t(27494),l=t(61930),i=t(47971),n=t(35109);let d=l.fC,c=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)(l.ck,{ref:s,className:(0,n.cn)("border-b",t),...r})});c.displayName="AccordionItem";let o=r.forwardRef((e,s)=>{let{className:t,children:r,...d}=e;return(0,a.jsx)(l.h4,{className:"flex",children:(0,a.jsxs)(l.xz,{ref:s,className:(0,n.cn)("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...d,children:[r,(0,a.jsx)(i.Z,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})})});o.displayName=l.xz.displayName;let m=r.forwardRef((e,s)=>{let{className:t,children:r,...i}=e;return(0,a.jsx)(l.VY,{ref:s,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...i,children:(0,a.jsx)("div",{className:(0,n.cn)("pb-4 pt-0",t),children:r})})});m.displayName=l.VY.displayName},92933:function(e,s,t){t.d(s,{f:function(){return n}});var a=t(32710);t(27494);var r=t(31564),l=t(35109),i=t(56104);function n(e){let{className:s,classNames:t,showOutsideDays:n=!0,...d}=e;return(0,a.jsx)(r._W,{showOutsideDays:n,className:(0,l.cn)("p-3",s),style:{minWidth:"fit-content",width:"fit-content",maxWidth:"fit-content",overflow:"hidden"},classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:(0,l.cn)((0,i.d)({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:(0,l.cn)((0,i.d)({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...d})}
1n.displayName="Calendar"},19666:function(e,s,t){t.d(s,{X:function(){return d}});var a=t(32710),r=t(27494),l=t(90005),i=t(57346),n=t(35109);let d=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)(l.fC,{ref:s,className:(0,n.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-input ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",t),...r,children:(0,a.jsx)(l.z$,{className:(0,n.cn)("flex items-center justify-center text-current"),children:(0,a.jsx)(i.Z,{className:"h-3.5 w-3.5"})})})});d.displayName=l.fC.displayName},11854:function(e,s,t){t.d(s,{Fw:function(){return i},wy:function(){return l},zF:function(){return r}});var a=t(44998);let r=a.fC,l=a.xz,i=a.VY},92823:function(e,s,t){t.d(s,{NI:function(){return h},Wi:function(){return m},l0:function(){return c},lX:function(){return f},pf:function(){return j},xJ:function(){return u},zG:function(){return g}});var a=t(32710),r=t(27494),l=t(55213),i=t(84189),n=t(35109),d=t(84569);let c=i.RV,o=r.createContext({}),m=e=>{let{...s}=e;return(0,a.jsx)(o.Provider,{value:{name:s.name},children:(0,a.jsx)(i.Qr,{...s})})},x=()=>{let e=r.useContext(o),s=r.useContext(p),{getFieldState:t,formState:a}=(0,i.Gc)(),l=t(e.name,a);if(!e)throw Error("useFormField should be used within <FormField>");let{id:n}=s;return{id:n,name:e.name,formItemId:"".concat(n,"-form-item"),formDescriptionId:"".concat(n,"-form-item-description"),formMessageId:"".concat(n,"-form-item-message"),...l}},p=r.createContext({}),u=r.forwardRef((e,s)=>{let{className:t,...l}=e,i=r.useId();return(0,a.jsx)(p.Provider,{value:{id:i},children:(0,a.jsx)("div",{ref:s,className:(0,n.cn)("space-y-2",t),...l})})});u.displayName="FormItem";let f=r.forwardRef((e,s)=>{let{className:t,...r}=e,{error:l,formItemId:i}=x();return(0,a.jsx)(d._,{ref:s,className:(0,n.cn)(l&&"text-destructive",t),htmlFor:i,...r})});f.displayName="FormLabel";let h=r.forwardRef((e,s)=>{let{...t}=e,{error:r,formItemId:i,formDescriptionId:n,formMessageId:d}=x();return(0,a.jsx)(l.g7,{ref:s,id:i,"aria-describedby":r?"".concat(n," ").concat(d):"".concat(n),"aria-invalid":!!r,...t})});h.displayName="FormControl";let j=r.forwardRef((e,s)=>{let{className:t,...r}=e,{formDescriptionId:l}=x();return(0,a.jsx)("p",{ref:s,id:l,className:(0,n.cn)("text-[0.8rem] text-muted-foreground",t),...r})});j.displayName="FormDescription";let g=r.forwardRef((e,s)=>{let{className:t,children:r,...l}=e,{error:i,formMessageId:d}=x(),c=i?String(null==i?void 0:i.message):r;return c?(0,a.jsx)("p",{ref:s,id:d,className:(0,n.cn)("text-[0.8rem] font-medium text-destructive",t),...l,children:c}):null});g.displayName="FormMessage"},81545:function(e,s,t){t.d(s,{Bw:function(){return j},DI:function(){return x},Ph:function(){return m},Ql:function(){return g},i4:function(){return u},ki:function(){return p}});var a=t(32710),r=t(27494),l=t(93392),i=t(47971),n=t(29011),d=t(57346),c=t(35109);let o=e=>r.useCallback(s=>{"function"==typeof e?e(s):e&&(e.current=s)},[e]),m=l.fC,x=l.ZA,p=l.B4,u=r.forwardRef((e,s)=>{let{className:t,children:r,...n}=e,d=o(s);return(0,a.jsxs)(l.xz,{ref:d,className:(0,c.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),...n,children:[r,(0,a.jsx)(l.JO,{asChild:!0,children:(0,a.jsx)(i.Z,{className:"h-4 w-4 opacity-50"})})]})});u.displayName=l.xz.displayName;let f=r.forwardRef((e,s)=>{let{className:t,...r}=e,i=o(s);return(0,a.jsx)(l.u_,{ref:i,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(n.Z,{className:"h-4 w-4"})})});f.displayName=l.u_.displayName;let h=r.forwardRef((e,s)=>{let{className:t,...r}=e,n=o(s);return(0,a.jsx)(l.$G,{ref:n,className:(0,c.cn)("flex cursor-default items-center justify-center py-1",t),...r,children:(0,a.jsx)(i.Z,{className:"h-4 w-4"})})});h.displayName=l.$G.displayName;let j=r.forwardRef((e,s)=>{let{className:t,children:r,position:i="popper",...n}=e,d=o(s);return(0,a.jsx)(l.h_,{children:(0,a.jsxs)(l.VY,{ref:d,className:(0,
1c.cn)("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2","popper"===i?"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1":"",t),position:i,...n,children:[(0,a.jsx)(f,{}),(0,a.jsx)(l.l_,{className:(0,c.cn)("p-1","popper"===i?"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]":""),children:r}),(0,a.jsx)(h,{})]})})});j.displayName=l.VY.displayName,r.forwardRef((e,s)=>{let{className:t,...r}=e,i=o(s);return(0,a.jsx)(l.__,{ref:i,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",t),...r})}).displayName=l.__.displayName;let g=r.forwardRef((e,s)=>{let{className:t,children:r,...i}=e,n=o(s);return(0,a.jsxs)(l.ck,{ref:n,className:(0,c.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...i,children:[(0,a.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(l.wU,{children:(0,a.jsx)(d.Z,{className:"h-4 w-4"})})}),(0,a.jsx)(l.eT,{children:r})]})});g.displayName=l.ck.displayName,r.forwardRef((e,s)=>{let{className:t,...r}=e,i=o(s);return(0,a.jsx)(l.Z0,{ref:i,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",t),...r})}).displayName=l.Z0.displayName},18424:function(e,s,t){t.d(s,{g:function(){return i}});var a=t(32710),r=t(27494),l=t(35109);let i=r.forwardRef((e,s)=>{let{className:t,...r}=e;return(0,a.jsx)("textarea",{className:(0,l.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:s,...r})});i.displayName="Textarea"},74470:function(e,s,t){t.d(s,{_v:function(){return o},aJ:function(){return c},pn:function(){return n},u:function(){return d}});var a=t(32710),r=t(27494),l=t(7616),i=t(35109);let n=l.zt,d=l.fC,c=l.xz,o=r.forwardRef((e,s)=>{let{className:t,sideOffset:r=4,...n}=e;return(0,a.jsx)(l.h_,{children:(0,a.jsx)(l.VY,{ref:s,sideOffset:r,className:(0,i.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})})});o.displayName=l.VY.displayName},20990:function(e,s,t){t.d(s,{Am:function(){return m},pm:function(){return x}});var a=t(27494);let r=0,l=new Map,i=e=>{if(l.has(e))return;let s=setTimeout(()=>{l.delete(e),o({type:"REMOVE_TOAST",toastId:e})},3e3);l.set(e,s)},n=(e,s)=>{switch(s.type){case"ADD_TOAST":return{...e,toasts:[s.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===s.toast.id?{...e,...s.toast}:e)};case"DISMISS_TOAST":{let{toastId:t}=s;if(t)i(t);else for(let s of e.toasts)i(s.id);return{...e,toasts:e.toasts.map(e=>e.id===t||void 0===t?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===s.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==s.toastId)}}},d=[],c={toasts:[]};function o(e){for(let s of(c=n(c,e),d))s(c)}function m(e){let{...s}=e,t=(r=(r+1)%Number.MAX_VALUE).toString(),a=()=>o({type:"DISMISS_TOAST",toastId:t});return o({type:"ADD_TOAST",toast:{...s,id:t,open:!0,onOpenChange:e=>{e||a()}}}),{id:t,dismiss:a,update:e=>o({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function x(){let[e,s]=a.useState(c);return a.useEffect(()=>(d.push(s),()=>{let e=d.indexOf(s);e>-1&&d.splice(e,1)}),[]),{...e,toast:m,dismiss:e=>o({type:"DISMISS_TOAST",toastId:e})}}}}]);
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.