n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 3.38 kB
JavaScript
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.13.4"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-IafOlCW8.js","./constants-legacy-DNCca_FT.js"],(function(e,t){var n,a;async function o(e,t){let n={};async function a(n,a){const o=await async function(){return await new Promise(((n,a)=>{const o=indexedDB.open(e,1);o.onupgradeneeded=()=>{o.result.createObjectStore(t,{keyPath:"key"})},o.onsuccess=()=>n(o.result),o.onerror=()=>a(o.error)}))}(),s=o.transaction(t,n),i=await a(s.objectStore(t),o);return await new Promise(((e,t)=>{s.oncomplete=()=>{o.close(),e(i)},s.onerror=()=>{o.close(),t(s.error)}}))}return await async function(){await a("readonly",(async(e,t)=>await new Promise(((a,o)=>{const s=e.openCursor();s.onsuccess=e=>{const o=e.target.result;o?(n[o.key]=o.value.value,o.continue()):(t.close(),a())},s.onerror=e=>{t.close(),o(e)}}))))}(),{getItem:function(e){return n[e]??null},removeItem:function(e){delete n[e],async function(e){await a("readwrite",(t=>{t.delete(e)}))}(e)},setItem:function(e,t){n[e]=t,async function(e,t){await a("readwrite",(n=>{n.put({key:e,value:t})}))}(e,t)},clear:function(){n={},async function(){await a("readwrite",(e=>{e.clear()}))}()},getAllWithPrefix:async function(e){const t=IDBKeyRange.bound(e,e+"",!1,!1),n={};return await a("readonly",(async e=>await new Promise(((a,o)=>{const s=e.openCursor(t);s.onsuccess=e=>{const t=e.target.result;t?(n[t.key]=t.value.value,t.continue()):a(n)},s.onerror=()=>{o(s.error)}}))))}}}return e("t",(function(){const e=n(!0),t=n(o("n8n-local","workflows").finally((()=>{e.value=!1})));async function s(){return await t.value}async function i(e){return a((await s()).getItem(e)??"",{fallbackValue:{}})}async function c(e,t){const n=await s(),a=await i(e),o={...a,...t};t.suggestedActions&&(o.suggestedActions={...a.suggestedActions??{},...t.suggestedActions}),n.setItem(e,JSON.stringify(o))}return{getWorkflowSettings:i,getMergedWorkflowSettings:async function(e){const t=await i(e),n=a((await s()).getItem("*")??"",{fallbackValue:{}});return t.suggestedActions={...t.suggestedActions??{},...n.suggestedActions??{}},t},upsertWorkflowSettings:c,updateFirstActivatedAt:async function(e){(await i(e))?.firstActivatedAt||await c(e,{firstActivatedAt:Date.now()})},ignoreSuggestedAction:async function(e,t){await c(e,{suggestedActions:{[t]:{ignored:!0}}})},ignoreAllSuggestedActionsForAllWorkflows:async function(e){await c("*",e.reduce(((e,t)=>(e.suggestedActions=e.suggestedActions??{},e.suggestedActions[t]={ignored:!0},e)),{}))},getEvaluationPreferences:async function(e){return(await i(e))?.evaluationRuns??{order:[],visibility:{}}},saveEvaluationPreferences:async function(e,t){await c(e,{evaluationRuns:t})},isCacheLoading:e}})),{setters:[function(e){n=e.Ft},function(e){a=e.$a}],execute:function(){try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(t=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a1688ac2-0cbc-4e8f-91af-c4a29e369e7a",e._sentryDebugIdIdentifier="sentry-dbid-a1688ac2-0cbc-4e8f-91af-c4a29e369e7a")}catch(e){}var e,t}}}));
//# sourceMappingURL=useWorkflowsCache-legacy-BN6T_7B1.js.map