n8n-editor-ui
Version:
Workflow Editor UI for n8n
3 lines • 20.8 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]=`8ef9d4ec-2d10-4fd9-b4fe-9c70de1394f3`,e._sentryDebugIdIdentifier=`sentry-dbid-8ef9d4ec-2d10-4fd9-b4fe-9c70de1394f3`)})()}catch{}import{t as e}from"./chunk-CACdhNlC.js";var t=e(((e,t)=>{function n(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw Error(`map is read-only`)}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw Error(`set is read-only`)}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let r=e[t],i=typeof r;(i===`object`||i===`function`)&&!Object.isFrozen(r)&&n(r)}),e}var r=class{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function i(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}function a(e,...t){let n=Object.create(null);for(let t in e)n[t]=e[t];return t.forEach(function(e){for(let t in e)n[t]=e[t]}),n}var o=`</span>`,s=e=>!!e.scope,c=(e,{prefix:t})=>{if(e.startsWith(`language:`))return e.replace(`language:`,`language-`);if(e.includes(`.`)){let n=e.split(`.`);return[`${t}${n.shift()}`,...n.map((e,t)=>`${e}${`_`.repeat(t+1)}`)].join(` `)}return`${t}${e}`},l=class{constructor(e,t){this.buffer=``,this.classPrefix=t.classPrefix,e.walk(this)}addText(e){this.buffer+=i(e)}openNode(e){if(!s(e))return;let t=c(e.scope,{prefix:this.classPrefix});this.span(t)}closeNode(e){s(e)&&(this.buffer+=o)}value(){return this.buffer}span(e){this.buffer+=`<span class="${e}">`}},u=(e={})=>{let t={children:[]};return Object.assign(t,e),t},d=class e{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(e){this.top.children.push(e)}openNode(e){let t=u({scope:e});this.add(t),this.stack.push(t)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(e){return this.constructor._walk(e,this.rootNode)}static _walk(e,t){return typeof t==`string`?e.addText(t):t.children&&(e.openNode(t),t.children.forEach(t=>this._walk(e,t)),e.closeNode(t)),e}static _collapse(t){typeof t!=`string`&&t.children&&(t.children.every(e=>typeof e==`string`)?t.children=[t.children.join(``)]:t.children.forEach(t=>{e._collapse(t)}))}},ee=class extends d{constructor(e){super(),this.options=e}addText(e){e!==``&&this.add(e)}startScope(e){this.openNode(e)}endScope(){this.closeNode()}__addSublanguage(e,t){let n=e.root;t&&(n.scope=`language:${t}`),this.add(n)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function f(e){return e?typeof e==`string`?e:e.source:null}function p(e){return g(`(?=`,e,`)`)}function m(e){return g(`(?:`,e,`)*`)}function h(e){return g(`(?:`,e,`)?`)}function g(...e){return e.map(e=>f(e)).join(``)}function _(e){let t=e[e.length-1];return typeof t==`object`&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function v(...e){return`(`+(_(e).capture?``:`?:`)+e.map(e=>f(e)).join(`|`)+`)`}function y(e){return RegExp(e.toString()+`|`).exec(``).length-1}function te(e,t){let n=e&&e.exec(t);return n&&n.index===0}var b=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function x(e,{joinWith:t}){let n=0;return e.map(e=>{n+=1;let t=n,r=f(e),i=``;for(;r.length>0;){let e=b.exec(r);if(!e){i+=r;break}i+=r.substring(0,e.index),r=r.substring(e.index+e[0].length),e[0][0]===`\\`&&e[1]?i+=`\\`+String(Number(e[1])+t):(i+=e[0],e[0]===`(`&&n++)}return i}).map(e=>`(${e})`).join(t)}var S=/\b\B/,C=`[a-zA-Z]\\w*`,w=`[a-zA-Z_]\\w*`,T=`\\b\\d+(\\.\\d+)?`,E=`(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)`,D=`\\b(0b[01]+)`,O=`!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~`,k=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=g(t,/.*\b/,e.binary,/\b.*/)),a({scope:`meta`,begin:t,end:/$/,relevance:0,"on:begin":(e,t)=>{e.index!==0&&t.ignoreMatch()}},e)},A={begin:`\\\\[\\s\\S]`,relevance:0},j={scope:`string`,begin:`'`,end:`'`,illegal:`\\n`,contains:[A]},M={scope:`string`,begin:`"`,end:`"`,illegal:`\\n`,contains:[A]},N={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},P=function(e,t,n={}){let r=a({scope:`comment`,begin:e,end:t,contains:[]},n);r.contains.push({scope:`doctag`,begin:`[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)`,end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let i=v(`I`,`a`,`is`,`so`,`us`,`to`,`at`,`if`,`in`,`it`,`on`,/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return r.contains.push({begin:g(/[ ]+/,`(`,i,/[.]?[:]?([.][ ]|[ ])/,`){3}`)}),r},F=P(`//`,`$`),I=P(`/\\*`,`\\*/`),L=P(`#`,`$`),R={scope:`number`,begin:T,relevance:0},z={scope:`number`,begin:E,relevance:0},ne={scope:`number`,begin:D,relevance:0},re={begin:/(?=\/[^/\n]*\/)/,contains:[{scope:`regexp`,begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[A,{begin:/\[/,end:/\]/,relevance:0,contains:[A]}]}]},ie={scope:`title`,begin:C,relevance:0},ae={scope:`title`,begin:w,relevance:0},oe={begin:`\\.\\s*`+w,relevance:0},B=Object.freeze({__proto__:null,MATCH_NOTHING_RE:S,IDENT_RE:C,UNDERSCORE_IDENT_RE:w,NUMBER_RE:T,C_NUMBER_RE:E,BINARY_NUMBER_RE:D,RE_STARTERS_RE:O,SHEBANG:k,BACKSLASH_ESCAPE:A,APOS_STRING_MODE:j,QUOTE_STRING_MODE:M,PHRASAL_WORDS_MODE:N,COMMENT:P,C_LINE_COMMENT_MODE:F,C_BLOCK_COMMENT_MODE:I,HASH_COMMENT_MODE:L,NUMBER_MODE:R,C_NUMBER_MODE:z,BINARY_NUMBER_MODE:ne,REGEXP_MODE:re,TITLE_MODE:ie,UNDERSCORE_TITLE_MODE:ae,METHOD_GUARD:oe,END_SAME_AS_BEGIN:function(e){return Object.assign(e,{"on:begin":(e,t)=>{t.data._beginMatch=e[1]},"on:end":(e,t)=>{t.data._beginMatch!==e[1]&&t.ignoreMatch()}})}});function se(e,t){e.input[e.index-1]===`.`&&t.ignoreMatch()}function ce(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function le(e,t){t&&e.beginKeywords&&(e.begin=`\\b(`+e.beginKeywords.split(` `).join(`|`)+`)(?!\\.)(?=\\b|\\s)`,e.__beforeBegin=se,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ue(e,t){Array.isArray(e.illegal)&&(e.illegal=v(...e.illegal))}function de(e,t){if(e.match){if(e.begin||e.end)throw Error(`begin & end are not supported with match`);e.begin=e.match,delete e.match}}function fe(e,t){e.relevance===void 0&&(e.relevance=1)}var pe=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw Error(`beforeMatch cannot be used with starts`);let n=Object.assign({},e);Object.keys(e).forEach(t=>{delete e[t]}),e.keywords=n.keywords,e.begin=g(n.beforeMatch,p(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},me=[`of`,`and`,`for`,`in`,`not`,`or`,`if`,`then`,`parent`,`list`,`value`],he=`keyword`;function V(e,t,n=he){let r=Object.create(null);return typeof e==`string`?i(n,e.split(` `)):Array.isArray(e)?i(n,e):Object.keys(e).forEach(function(n){Object.assign(r,V(e[n],t,n))}),r;function i(e,n){t&&(n=n.map(e=>e.toLowerCase())),n.forEach(function(t){let n=t.split(`|`);r[n[0]]=[e,ge(n[0],n[1])]})}}function ge(e,t){return t?Number(t):_e(e)?0:1}function _e(e){return me.includes(e.toLowerCase())}var H={},U=e=>{console.error(e)},W=(e,...t)=>{console.log(`WARN: ${e}`,...t)},G=(e,t)=>{H[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),H[`${e}/${t}`]=!0)},K=Error();function q(e,t,{key:n}){let r=0,i=e[n],a={},o={};for(let e=1;e<=t.length;e++)o[e+r]=i[e],a[e+r]=!0,r+=y(t[e-1]);e[n]=o,e[n]._emit=a,e[n]._multi=!0}function ve(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw U(`skip, excludeBegin, returnBegin not compatible with beginScope: {}`),K;if(typeof e.beginScope!=`object`||e.beginScope===null)throw U(`beginScope must be object`),K;q(e,e.begin,{key:`beginScope`}),e.begin=x(e.begin,{joinWith:``})}}function ye(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw U(`skip, excludeEnd, returnEnd not compatible with endScope: {}`),K;if(typeof e.endScope!=`object`||e.endScope===null)throw U(`endScope must be object`),K;q(e,e.end,{key:`endScope`}),e.end=x(e.end,{joinWith:``})}}function be(e){e.scope&&typeof e.scope==`object`&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function xe(e){be(e),typeof e.beginScope==`string`&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope==`string`&&(e.endScope={_wrap:e.endScope}),ve(e),ye(e)}function Se(e){function t(t,n){return new RegExp(f(t),`m`+(e.case_insensitive?`i`:``)+(e.unicodeRegex?`u`:``)+(n?`g`:``))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(e,t){t.position=this.position++,this.matchIndexes[this.matchAt]=t,this.regexes.push([t,e]),this.matchAt+=y(e)+1}compile(){this.regexes.length===0&&(this.exec=()=>null),this.matcherRe=t(x(this.regexes.map(e=>e[1]),{joinWith:`|`}),!0),this.lastIndex=0}exec(e){this.matcherRe.lastIndex=this.lastIndex;let t=this.matcherRe.exec(e);if(!t)return null;let n=t.findIndex((e,t)=>t>0&&e!==void 0),r=this.matchIndexes[n];return t.splice(0,n),Object.assign(t,r)}}class r{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(e){if(this.multiRegexes[e])return this.multiRegexes[e];let t=new n;return this.rules.slice(e).forEach(([e,n])=>t.addRule(e,n)),t.compile(),this.multiRegexes[e]=t,t}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(e,t){this.rules.push([e,t]),t.type===`begin`&&this.count++}exec(e){let t=this.getMatcher(this.regexIndex);t.lastIndex=this.lastIndex;let n=t.exec(e);if(this.resumingScanAtSamePosition()&&!(n&&n.index===this.lastIndex)){let t=this.getMatcher(0);t.lastIndex=this.lastIndex+1,n=t.exec(e)}return n&&(this.regexIndex+=n.position+1,this.regexIndex===this.count&&this.considerAll()),n}}function i(e){let t=new r;return e.contains.forEach(e=>t.addRule(e.begin,{rule:e,type:`begin`})),e.terminatorEnd&&t.addRule(e.terminatorEnd,{type:`end`}),e.illegal&&t.addRule(e.illegal,{type:`illegal`}),t}function o(n,r){let a=n;if(n.isCompiled)return a;[ce,de,xe,pe].forEach(e=>e(n,r)),e.compilerExtensions.forEach(e=>e(n,r)),n.__beforeBegin=null,[le,ue,fe].forEach(e=>e(n,r)),n.isCompiled=!0;let s=null;return typeof n.keywords==`object`&&n.keywords.$pattern&&(n.keywords=Object.assign({},n.keywords),s=n.keywords.$pattern,delete n.keywords.$pattern),s||=/\w+/,n.keywords&&=V(n.keywords,e.case_insensitive),a.keywordPatternRe=t(s,!0),r&&(n.begin||=/\B|\b/,a.beginRe=t(a.begin),!n.end&&!n.endsWithParent&&(n.end=/\B|\b/),n.end&&(a.endRe=t(a.end)),a.terminatorEnd=f(a.end)||``,n.endsWithParent&&r.terminatorEnd&&(a.terminatorEnd+=(n.end?`|`:``)+r.terminatorEnd)),n.illegal&&(a.illegalRe=t(n.illegal)),n.contains||=[],n.contains=[].concat(...n.contains.map(function(e){return Ce(e===`self`?n:e)})),n.contains.forEach(function(e){o(e,a)}),n.starts&&o(n.starts,r),a.matcher=i(a),a}if(e.compilerExtensions||=[],e.contains&&e.contains.includes(`self`))throw Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=a(e.classNameAliases||{}),o(e)}function J(e){return e?e.endsWithParent||J(e.starts):!1}function Ce(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return a(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:J(e)?a(e,{starts:e.starts?a(e.starts):null}):Object.isFrozen(e)?a(e):e}var we=`11.8.0`,Te=class extends Error{constructor(e,t){super(e),this.name=`HTMLInjectionError`,this.html=t}},Y=i,X=a,Z=Symbol(`nomatch`),Ee=7,Q=function(e){let t=Object.create(null),i=Object.create(null),a=[],o=!0,s=`Could not find the language '{}', did you forget to load/include a language module?`,c={disableAutodetect:!0,name:`Plain text`,contains:[]},l={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:`hljs-`,cssSelector:`pre code`,languages:null,__emitter:ee};function u(e){return l.noHighlightRe.test(e)}function d(e){let t=e.className+` `;t+=e.parentNode?e.parentNode.className:``;let n=l.languageDetectRe.exec(t);if(n){let t=M(n[1]);return t||(W(s.replace(`{}`,n[1])),W(`Falling back to no-highlight mode for this block.`,e)),t?n[1]:`no-highlight`}return t.split(/\s+/).find(e=>u(e)||M(e))}function f(e,t,n){let r=``,i=``;typeof t==`object`?(r=e,n=t.ignoreIllegals,i=t.language):(G(`10.7.0`,`highlight(lang, code, ...args) has been deprecated.`),G(`10.7.0`,`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),i=e,r=t),n===void 0&&(n=!0);let a={code:r,language:i};R(`before:highlight`,a);let o=a.result?a.result:_(a.language,a.code,n);return o.code=a.code,R(`after:highlight`,o),o}function _(e,n,i,a){let c=Object.create(null);function u(e,t){return e.keywords[t]}function d(){if(!O.keywords){A.addText(j);return}let e=0;O.keywordPatternRe.lastIndex=0;let t=O.keywordPatternRe.exec(j),n=``;for(;t;){n+=j.substring(e,t.index);let r=T.case_insensitive?t[0].toLowerCase():t[0],i=u(O,r);if(i){let[e,a]=i;if(A.addText(n),n=``,c[r]=(c[r]||0)+1,c[r]<=Ee&&(N+=a),e.startsWith(`_`))n+=t[0];else{let n=T.classNameAliases[e]||e;p(t[0],n)}}else n+=t[0];e=O.keywordPatternRe.lastIndex,t=O.keywordPatternRe.exec(j)}n+=j.substring(e),A.addText(n)}function ee(){if(j===``)return;let e=null;if(typeof O.subLanguage==`string`){if(!t[O.subLanguage]){A.addText(j);return}e=_(O.subLanguage,j,!0,k[O.subLanguage]),k[O.subLanguage]=e._top}else e=b(j,O.subLanguage.length?O.subLanguage:null);O.relevance>0&&(N+=e.relevance),A.__addSublanguage(e._emitter,e.language)}function f(){O.subLanguage==null?d():ee(),j=``}function p(e,t){e!==``&&(A.startScope(t),A.addText(e),A.endScope())}function m(e,t){let n=1,r=t.length-1;for(;n<=r;){if(!e._emit[n]){n++;continue}let r=T.classNameAliases[e[n]]||e[n],i=t[n];r?p(i,r):(j=i,d(),j=``),n++}}function h(e,t){return e.scope&&typeof e.scope==`string`&&A.openNode(T.classNameAliases[e.scope]||e.scope),e.beginScope&&(e.beginScope._wrap?(p(j,T.classNameAliases[e.beginScope._wrap]||e.beginScope._wrap),j=``):e.beginScope._multi&&(m(e.beginScope,t),j=``)),O=Object.create(e,{parent:{value:O}}),O}function g(e,t,n){let i=te(e.endRe,n);if(i){if(e[`on:end`]){let n=new r(e);e[`on:end`](t,n),n.isMatchIgnored&&(i=!1)}if(i){for(;e.endsParent&&e.parent;)e=e.parent;return e}}if(e.endsWithParent)return g(e.parent,t,n)}function v(e){return O.matcher.regexIndex===0?(j+=e[0],1):(I=!0,0)}function y(e){let t=e[0],n=e.rule,i=new r(n),a=[n.__beforeBegin,n[`on:begin`]];for(let n of a)if(n&&(n(e,i),i.isMatchIgnored))return v(t);return n.skip?j+=t:(n.excludeBegin&&(j+=t),f(),!n.returnBegin&&!n.excludeBegin&&(j=t)),h(n,e),n.returnBegin?0:t.length}function x(e){let t=e[0],r=n.substring(e.index),i=g(O,e,r);if(!i)return Z;let a=O;O.endScope&&O.endScope._wrap?(f(),p(t,O.endScope._wrap)):O.endScope&&O.endScope._multi?(f(),m(O.endScope,e)):a.skip?j+=t:(a.returnEnd||a.excludeEnd||(j+=t),f(),a.excludeEnd&&(j=t));do O.scope&&A.closeNode(),!O.skip&&!O.subLanguage&&(N+=O.relevance),O=O.parent;while(O!==i.parent);return i.starts&&h(i.starts,e),a.returnEnd?0:t.length}function S(){let e=[];for(let t=O;t!==T;t=t.parent)t.scope&&e.unshift(t.scope);e.forEach(e=>A.openNode(e))}let C={};function w(t,r){let a=r&&r[0];if(j+=t,a==null)return f(),0;if(C.type===`begin`&&r.type===`end`&&C.index===r.index&&a===``){if(j+=n.slice(r.index,r.index+1),!o){let t=Error(`0 width match regex (${e})`);throw t.languageName=e,t.badRule=C.rule,t}return 1}if(C=r,r.type===`begin`)return y(r);if(r.type===`illegal`&&!i){let e=Error(`Illegal lexeme "`+a+`" for mode "`+(O.scope||`<unnamed>`)+`"`);throw e.mode=O,e}else if(r.type===`end`){let e=x(r);if(e!==Z)return e}if(r.type===`illegal`&&a===``)return 1;if(F>1e5&&F>r.index*3)throw Error(`potential infinite loop, way more iterations than matches`);return j+=a,a.length}let T=M(e);if(!T)throw U(s.replace(`{}`,e)),Error(`Unknown language: "`+e+`"`);let E=Se(T),D=``,O=a||E,k={},A=new l.__emitter(l);S();let j=``,N=0,P=0,F=0,I=!1;try{if(T.__emitTokens)T.__emitTokens(n,A);else{for(O.matcher.considerAll();;){F++,I?I=!1:O.matcher.considerAll(),O.matcher.lastIndex=P;let e=O.matcher.exec(n);if(!e)break;let t=w(n.substring(P,e.index),e);P=e.index+t}w(n.substring(P))}return A.finalize(),D=A.toHTML(),{language:e,value:D,relevance:N,illegal:!1,_emitter:A,_top:O}}catch(t){if(t.message&&t.message.includes(`Illegal`))return{language:e,value:Y(n),illegal:!0,relevance:0,_illegalBy:{message:t.message,index:P,context:n.slice(P-100,P+100),mode:t.mode,resultSoFar:D},_emitter:A};if(o)return{language:e,value:Y(n),illegal:!1,relevance:0,errorRaised:t,_emitter:A,_top:O};throw t}}function y(e){let t={value:Y(e),illegal:!1,relevance:0,_top:c,_emitter:new l.__emitter(l)};return t._emitter.addText(e),t}function b(e,n){n=n||l.languages||Object.keys(t);let r=y(e),i=n.filter(M).filter(P).map(t=>_(t,e,!1));i.unshift(r);let[a,o]=i.sort((e,t)=>{if(e.relevance!==t.relevance)return t.relevance-e.relevance;if(e.language&&t.language){if(M(e.language).supersetOf===t.language)return 1;if(M(t.language).supersetOf===e.language)return-1}return 0}),s=a;return s.secondBest=o,s}function x(e,t,n){let r=t&&i[t]||n;e.classList.add(`hljs`),e.classList.add(`language-${r}`)}function S(e){let t=null,n=d(e);if(u(n))return;if(R(`before:highlightElement`,{el:e,language:n}),e.children.length>0&&(l.ignoreUnescapedHTML||(console.warn(`One of your code blocks includes unescaped HTML. This is a potentially serious security risk.`),console.warn(`https://github.com/highlightjs/highlight.js/wiki/security`),console.warn(`The element with unescaped HTML:`),console.warn(e)),l.throwUnescapedHTML))throw new Te(`One of your code blocks includes unescaped HTML.`,e.innerHTML);t=e;let r=t.textContent,i=n?f(r,{language:n,ignoreIllegals:!0}):b(r);e.innerHTML=i.value,x(e,n,i.language),e.result={language:i.language,re:i.relevance,relevance:i.relevance},i.secondBest&&(e.secondBest={language:i.secondBest.language,relevance:i.secondBest.relevance}),R(`after:highlightElement`,{el:e,result:i,text:r})}function C(e){l=X(l,e)}let w=()=>{D(),G(`10.6.0`,`initHighlighting() deprecated. Use highlightAll() now.`)};function T(){D(),G(`10.6.0`,`initHighlightingOnLoad() deprecated. Use highlightAll() now.`)}let E=!1;function D(){if(document.readyState===`loading`){E=!0;return}document.querySelectorAll(l.cssSelector).forEach(S)}function O(){E&&D()}typeof window<`u`&&window.addEventListener&&window.addEventListener(`DOMContentLoaded`,O,!1);function k(n,r){let i=null;try{i=r(e)}catch(e){if(U(`Language definition for '{}' could not be registered.`.replace(`{}`,n)),o)U(e);else throw e;i=c}i.name||=n,t[n]=i,i.rawDefinition=r.bind(null,e),i.aliases&&N(i.aliases,{languageName:n})}function A(e){delete t[e];for(let t of Object.keys(i))i[t]===e&&delete i[t]}function j(){return Object.keys(t)}function M(e){return e=(e||``).toLowerCase(),t[e]||t[i[e]]}function N(e,{languageName:t}){typeof e==`string`&&(e=[e]),e.forEach(e=>{i[e.toLowerCase()]=t})}function P(e){let t=M(e);return t&&!t.disableAutodetect}function F(e){e[`before:highlightBlock`]&&!e[`before:highlightElement`]&&(e[`before:highlightElement`]=t=>{e[`before:highlightBlock`](Object.assign({block:t.el},t))}),e[`after:highlightBlock`]&&!e[`after:highlightElement`]&&(e[`after:highlightElement`]=t=>{e[`after:highlightBlock`](Object.assign({block:t.el},t))})}function I(e){F(e),a.push(e)}function L(e){let t=a.indexOf(e);t!==-1&&a.splice(t,1)}function R(e,t){let n=e;a.forEach(function(e){e[n]&&e[n](t)})}function z(e){return G(`10.7.0`,`highlightBlock will be removed entirely in v12.0`),G(`10.7.0`,`Please use highlightElement now.`),S(e)}Object.assign(e,{highlight:f,highlightAuto:b,highlightAll:D,highlightElement:S,highlightBlock:z,configure:C,initHighlighting:w,initHighlightingOnLoad:T,registerLanguage:k,unregisterLanguage:A,listLanguages:j,getLanguage:M,registerAliases:N,autoDetection:P,inherit:X,addPlugin:I,removePlugin:L}),e.debugMode=function(){o=!1},e.safeMode=function(){o=!0},e.versionString=we,e.regex={concat:g,lookahead:p,either:v,optional:h,anyNumberOfTimes:m};for(let e in B)typeof B[e]==`object`&&n(B[e]);return Object.assign(e,B),e},$=Q({});$.newInstance=()=>Q({}),t.exports=$,$.HighlightJS=$,$.default=$}));export{t};
//# sourceMappingURL=core-DB683MN3.js.map