UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 6 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(["./chunk-legacy-Dz3fjYb5.js","./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js","./src-legacy-B67uuxhB.js","./get-legacy-CLCnFf3e.js","./_plugin-vue_export-helper-legacy-DFdC_I5Z.js","./users.store-legacy-azRUgFdP.js","./useClipboard-legacy-DnQV92ly.js","./core-legacy-Dmlhxihn.js","./VueMarkdown-legacy-0OwySplk.js","./TextWithHighlights-legacy-stOhoc1K.js"],(function(e,t){var n,i,r,o,s,a,c,l,u,d,p,f,g,_,y,h,m,v,b,w,x,T,k,$,j,C;function z(e,t){const n=(0,$.escapeHtml)(e);return t?x(n,t).map((e=>e.isMatched?`<mark>${e.content}</mark>`:e.content)).join(""):n}return e("n",(function(e){const t=[];function n(n,i){n&&Object.keys(n).map((r=>{t.push({data:n[r][0],inOut:i,type:r,source:e.source,metadata:{executionTime:e.executionTime,startTime:e.startTime,subExecution:e.metadata?.subExecution}})}))}return n(e.inputOverride,"input"),n(e.data,"output"),t})),{setters:[function(e){n=e.o},function(e){i=e.$,r=e.E,o=e.N,s=e.S,a=e.T,c=e.Wt,l=e._,u=e._n,d=e.j,p=e.rt,f=e.w},function(e){g=e.at},function(e){_=e.Mi},function(e){y=e.u},function(e){h=e.t},function(e){m=e.Pn},function(e){v=e.t},function(e){b=e.t},function(e){w=e.t},function(e){x=e.n,T=e.t}],execute:function(){(k=document.createElement("style")).textContent="._runText_1f6ui_125{line-height:var(--line-height--xl);white-space:pre-line}._markdown_1f6ui_130{white-space:pre-wrap}._markdown_1f6ui_130 h1{font-size:var(--font-size--lg);line-height:var(--line-height--xl)}._markdown_1f6ui_130 h2{font-size:var(--font-size--md);line-height:var(--line-height--lg)}._markdown_1f6ui_130 h3{font-size:var(--font-size--sm);line-height:var(--line-height--md)}._markdown_1f6ui_130 pre{background:var(--chat--message--pre--background);border-radius:var(--radius);line-height:var(--line-height--xl);padding:var(--spacing--sm);font-size:var(--font-size--sm);white-space:pre-wrap}._compact_1f6ui_153 ._markdown_1f6ui_130 pre{padding:var(--spacing--3xs);font-size:var(--font-size--xs)}._compact_1f6ui_153 ._markdown_1f6ui_130 p{line-height:var(--line-height--xl)}._copyToClipboard_1f6ui_161{right:var(--spacing--sm);top:var(--spacing--sm);position:absolute}._compact_1f6ui_153 ._copyToClipboard_1f6ui_161{right:var(--spacing--2xs);top:var(--spacing--2xs)}._rawContent_1f6ui_171{position:relative}._contentText_1f6ui_175{padding-top:var(--spacing--sm);padding-left:var(--spacing--md);padding-right:var(--spacing--md);font-size:var(--font-size--sm)}._compact_1f6ui_153 ._contentText_1f6ui_175{padding-top:0;padding-inline:var(--spacing--2xs);font-size:var(--font-size--2xs)}\n/*$vite$:1*/",document.head.appendChild(k);try{t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(x=(new t.Error).stack)&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[x]="31ff9696-9d80-4520-8f46-ea813d1ce1eb",t._sentryDebugIdIdentifier="sentry-dbid-31ff9696-9d80-4520-8f46-ea813d1ce1eb")}catch(t){}var t,x;$=n(y(),1),j=["data-content-type"],C=o({__name:"RunDataParsedAiContent",props:{content:{},compact:{type:Boolean,default:!1},search:{},renderType:{}},setup(e){const n=g(),o=v(),{showMessage:y}=m(),h=s((()=>{return[(t=e.search,e=>{e.renderer.rules.text=(e,n)=>z(e[n].content,t),e.renderer.rules.code_inline=(e,n,i,r,o)=>`<code${o.renderAttrs(e[n])}>${z(e[n].content,t)}</code>`,e.renderer.rules.code_block=(e,n,i,r,o)=>`<pre${o.renderAttrs(e[n])}><code>${z(e[n].content,t)}</code></pre>\n`,e.renderer.rules.fence=(n,i,r,o,s)=>{const a=n[i],c=a.info?e.utils.unescapeAll(a.info).trim():"";let l="",u="";if(c){const e=c.split(/(\s+)/g);l=e[0],u=e.slice(2).join("")}const d=r.highlight?.(a.content,l,u)??z(a.content,t);return 0===d.indexOf("<pre")?d+"\n":`<pre><code${s.renderAttrs(a)}>${d}</code></pre>\n`}})];var t})),x={highlight(e,t){if(t&&b.getLanguage(t))try{return b.highlight(e,{language:t}).value}catch{}}};function k(e){return"```json\n"+e+"\n```"}function $(e){return"string"==typeof(n=e)&&[/^# .+/gm,/\*{1,2}.+\*{1,2}/g,/\[.+\]\(.+\)/g,/```[\s\S]+```/g].some((e=>e.test(n)))?e:Array.isArray(e)&&e.length&&"number"!=typeof e[0]?e.map((e=>$(e))).join("\n\n").trim():"string"==typeof e?function(e){try{return JSON.parse(e),!0}catch(t){return!1}}(e)?k(e):e:k(JSON.stringify(e,null,2));var n}return(t,s)=>(i(),r("div",{class:u([t.$style.component,e.compact?t.$style.compact:""])},[(i(!0),r(l,null,p(e.content,(({parsedContent:s,raw:p},g)=>(i(),r("div",{key:g,class:u(t.$style.contentText),"data-content-type":s?.type},[s&&"rendered"===e.renderType?(i(),r(l,{key:0},["json"===s.type?(i(),f(c(w),{key:0,source:$(s.data),class:u(t.$style.markdown),options:x,plugins:h.value},null,8,["source","class","plugins"])):"markdown"===s.type?(i(),f(c(w),{key:1,source:s.data,class:u(t.$style.markdown),options:x,plugins:h.value},null,8,["source","class","plugins"])):"text"===s.type?(i(),f(T,{key:2,class:u(t.$style.runText),content:String(s.data),search:e.search},null,8,["class","content","search"])):a("",!0)],64)):(i(),r("div",{key:1,class:u(t.$style.rawContent)},[d(c(_),{variant:"subtle",size:"small",class:u(t.$style.copyToClipboard),title:c(n).baseText("nodeErrorView.copyToClipboard"),icon:"files",onClick:e=>function(e){try{o.copy(JSON.stringify(e,void 0,2)),y({title:n.baseText("generic.copiedToClipboard"),type:"success"})}catch{}}(p)},null,8,["class","title","onClick"]),d(c(w),{source:$(p),class:u(t.$style.markdown),plugins:h.value},null,8,["source","class","plugins"])],2))],10,j)))),128))],2))}}),e("t",h(C,[["__cssModules",{$style:{runText:"_runText_1f6ui_125",markdown:"_markdown_1f6ui_130",compact:"_compact_1f6ui_153",copyToClipboard:"_copyToClipboard_1f6ui_161",rawContent:"_rawContent_1f6ui_171",contentText:"_contentText_1f6ui_175"}}]]))}}})); //# sourceMappingURL=RunDataParsedAiContent-legacy-DllVXNTU.js.map