UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 3.24 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js","./src-legacy-B67uuxhB.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./users.store-legacy-azRUgFdP.js","./constants-legacy-2_ytuuS3.js","./settings.store-legacy-I6rZOvfF.js","./constants-legacy-Bi9z6I7b.js","./fileUtils-legacy-Dp16LI9C.js"],(function(e,t){var n,o,a,l,r,s,i,d,c,u,f,y,p,g,m,h,b,v,w,_,j,C,D,I,E,S,x,N,P,T,k;return e("n",(function(e){const t=a(!1),n=m(),o=S(),l=g(),s=u(C(e),{},{writeDefaults:!1,shallow:!0,serializer:{read:e=>{try{return k.parse(JSON.parse(e))}catch(t){return{}}},write:e=>JSON.stringify(e)}}),d=r((()=>t.value||n.allCredentials.length>0)),c=r((()=>Object.fromEntries(j.options.map((e=>{if(!N(e))return[e,null];const t=_[e];if(!t)return[e,null];const a=n.getCredentialsByType(t),l=o.moduleSettings?.["chat-hub"]?.providers[e];return l?.credentialId&&a.some((e=>e.id===l.credentialId))?[e,l.credentialId]:[e,a.toSorted(((e,t)=>+new Date(t.createdAt)-+new Date(e.createdAt)))[0]?.id??null]}))))),f=r((()=>d.value?j.options.reduce(((e,t)=>{const o=s.value[t]??null;return e[t]=o&&n.allCredentials.some((e=>e.id===o))?o:c.value[t],e}),{}):null));return i((()=>l.personalProject),(async e=>{e&&(await Promise.all([n.fetchCredentialTypes(!1),n.fetchAllCredentialsForWorkflow({projectId:e.id})]),t.value=!0)}),{immediate:!0}),{credentialsByProvider:f,selectCredential:function(e,t){s.value={...s.value,[e]:t}}}})),{setters:[function(e){n=e.$,o=e.E,a=e.Ft,l=e.N,r=e.S,s=e._n,i=e.gt,d=e.it},function(e){c=e.m,u=e.v},function(e){f=e.Pt,y=e.lt},function(e){p=e.t},function(e){g=e.ai,m=e.it,h=e.r},function(e){b=e.Jo,v=e.Jr,w=e.Ko,_=e.Kr,j=e.Qr,C=e.Us,D=e.Yo,I=e.Yr,E=e.qo},function(e){S=e.t},function(e){x=e.c},function(e){N=e._,P=e.v}],execute:function(){(T=document.createElement("style")).textContent="._component_1txea_125{background-color:var(--color--background--light-2);flex-direction:column;align-items:stretch;width:100%;display:flex;overflow:hidden}\n/*$vite$:1*/",document.head.appendChild(T);try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(a=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="95e61f5f-433d-4a4d-a23b-eb49aa78e665",t._sentryDebugIdIdentifier="sentry-dbid-95e61f5f-433d-4a4d-a23b-eb49aa78e665")}catch(t){}var t,a;k=b(j,D().or(w())),e("r",I.and(E({cachedDisplayName:D().optional(),cachedIcon:v.optional()})).transform((e=>({...e,cachedDisplayName:e.cachedDisplayName||(P(e)?e.model:"")})))),e("t",p(l({__name:"ChatLayout",setup(e){const t=y(),a=h(),{isCtrlKeyPressed:l}=f();return c(document,"keydown",(e=>{"o"===e.key.toLowerCase()&&l(e)&&e.shiftKey&&!a.isAnyModalOpen&&(e.preventDefault(),e.stopPropagation(),t.push({name:x,force:!0}))})),(e,t)=>(n(),o("div",{class:s(e.$style.component)},[d(e.$slots,"default")],2))}}),[["__cssModules",{$style:{component:"_component_1txea_125"}}]]))}}})); //# sourceMappingURL=ChatLayout-legacy-BHfkskAp.js.map