n8n-editor-ui
Version:
Workflow Editor UI for n8n
2 lines • 1.81 kB
JavaScript
(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]=`03d7e6d0-8e5d-4532-a915-4e2c55d418b4`,e._sentryDebugIdIdentifier=`sentry-dbid-03d7e6d0-8e5d-4532-a915-4e2c55d418b4`)})()}catch{}import{g as e}from"./useRootStore-XEREVjMN.js";var t=e=>crypto.getRandomValues(new Uint8Array(e)),n=(e,t,n)=>{let r=(2<<Math.log(e.length-1)/Math.LN2)-1,i=-~(1.6*r*t/e.length);return(a=t)=>{let o=``;for(;;){let t=n(i),s=i|0;for(;s--;)if(o+=e[t[s]&r]||``,o.length===a)return o}}},r=((e,r=21)=>n(e,r,t))(e,16);function i(e,t,n=5,r=1){let i=[],a=new Intl.Segmenter(void 0,{granularity:`grapheme`});for(let{segment:t}of a.segment(e))i.push(t);if(i.length<=t)return e;let o=i.findLastIndex(e=>e.match(/^\s+$/))+1,s=i.slice(o);if(s.length>=r&&s.length<15){let e=i.length-t+1,n=o,r=n-e;if(r>0)return i.slice(0,r).join(``)+`…`+i.slice(n).join(``)}return n<1?i.slice(0,t).join(``)+`…`:i.slice(0,t-n-1).join(``)+`…`+i.slice(-n).join(``)}var a=/[<>:"/\\|?*\u0000-\u001F\u007F-\u009F]/g,o=/[\u200B-\u200D\u2060\uFEFF]/g,s=/[\u00A0\u2000-\u200A]/g,c=/^[\s.]+|[\s.]+$/g,l=new Set([`CON`,`PRN`,`AUX`,`NUL`,`COM1`,`COM2`,`COM3`,`COM4`,`COM5`,`COM6`,`COM7`,`COM8`,`COM9`,`LPT1`,`LPT2`,`LPT3`,`LPT4`,`LPT5`,`LPT6`,`LPT7`,`LPT8`,`LPT9`]),u=`untitled`,d=200,f=(e,t=d)=>{if(!e)return u;let n=e.trim().replace(a,`_`).replace(o,``).replace(s,` `).replace(c,``);return n||=u,l.has(n.toUpperCase())&&(n=`_${n}`),n.length>t&&(n=n.slice(0,t)),n};export{i as n,r,f as t};
//# sourceMappingURL=dist-BL9AkvYs.js.map