UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 1.46 kB
(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`n8n@2.16.1`}}catch{}})();try{(function(){var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`eff8a917-857f-4b3b-8839-883da4db4ab5`,e._sentryDebugIdIdentifier=`sentry-dbid-eff8a917-857f-4b3b-8839-883da4db4ab5`)})()}catch{}import{Ft as e,R as t,X as n,q as r}from"./vue.runtime.esm-bundler-C3C09Zii.js";import{Y as i,c as a}from"./core-Bz5WjPxS.js";import{xc as o}from"./constants-DuQbSl-q.js";function s({onPaste:s=()=>{}}={}){let c=t(o,e()),{copy:l,copied:u,isSupported:d,text:f}=a({legacy:!0});async function p(e){let t=c?.value?.navigator;if(t?.clipboard)try{await t.clipboard.writeText(e);return}catch{}await l(e)}let m=[`el-messsage-box`,`ignore-key-press-canvas`],h=e(!1),g=e(s||null);function _(e){if(!g.value)return;let t=e.composedPath?.();for(let e of t)if(e.className&&m.some(t=>e.className.includes?.(t)))return;let n=e.clipboardData;if(n!==null){let t=n.getData(`text/plain`);g.value(t,e)}}let v=i(_,1e3);return n(()=>{h.value||=(document.addEventListener(`paste`,v),!0)}),r(()=>{h.value&&document.removeEventListener(`paste`,v)}),{copy:p,copied:u,isSupported:d,text:f,onPaste:g}}export{s as t}; //# sourceMappingURL=useClipboard-D2UtD35U.js.map